@react-pdf-kit/viewer 2.7.3-rc.3 → 2.7.4-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/{AnnotationLayer-SQbmx6wX.js → AnnotationLayer-C_Sk3ZMg.js} +1 -1
  2. package/dist/{PaginationContext-B3qzCYJu.js → PaginationContext-BmPajxlU.js} +24 -16
  3. package/dist/{RPPage-BdoE0RrK.js → RPPage-B1UMGNSI.js} +1 -1
  4. package/dist/{RPPages-Dw7lGXzM.js → RPPages-Dh4RWlPS.js} +346 -341
  5. package/dist/{Thumbnail-BVjnCNxv.js → Thumbnail-BOvkeGXM.js} +1 -1
  6. package/dist/{Thumbnails-CrKLESh3.js → Thumbnails-jteSWSw9.js} +2 -2
  7. package/dist/components/RPController.js +1 -1
  8. package/dist/components/RPPages.js +1 -1
  9. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  10. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  11. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  12. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  13. package/dist/components/layout/toolbar/Paginate.js +1 -1
  14. package/dist/components/layout/toolbar/ScrollModeTool.js +4 -4
  15. package/dist/components/layout/toolbar/ToolbarCustom.js +1 -1
  16. package/dist/components/layout/toolbar/ToolbarDefault.js +1 -1
  17. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +1 -1
  18. package/dist/components/layout/toolbar/tools/FirstPageTool.js +1 -1
  19. package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +2 -2
  20. package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
  21. package/dist/components/layout/toolbar/tools/LastPageTool.js +1 -1
  22. package/dist/components/layout/toolbar/tools/NextPageTool.js +1 -1
  23. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
  24. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +1 -1
  25. package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +5 -5
  26. package/dist/components/page/AnnotationLayer.js +1 -1
  27. package/dist/components/page/DualPage.js +2 -2
  28. package/dist/components/page/DualPageWithCover.js +2 -2
  29. package/dist/components/page/RPPage.js +1 -1
  30. package/dist/components/page/SinglePage.js +2 -2
  31. package/dist/contexts/ElementThumbnailContext.js +1 -1
  32. package/dist/contexts/PaginationContext.js +1 -1
  33. package/dist/contexts/RenderQueueProvider.js +1 -1
  34. package/dist/{de_DE-C1OrwQKj.js → de_DE-x4Z-jQrz.js} +12 -0
  35. package/dist/{main-CdlJS0xf.js → main-ByQlDC9E.js} +1 -1
  36. package/dist/main.js +3 -3
  37. package/dist/types/locales/de_DE.json.d.ts +2 -0
  38. package/dist/types/locales/en_US.json.d.ts +2 -0
  39. package/dist/types/locales/it_IT.json.d.ts +2 -0
  40. package/dist/types/locales/pt_PT.json.d.ts +2 -0
  41. package/dist/types/locales/th_TH.json.d.ts +2 -0
  42. package/dist/types/locales/zh_CN.json.d.ts +2 -0
  43. package/dist/types/utils/const.d.ts +1 -0
  44. package/dist/types/utils/types.d.ts +4 -1
  45. package/dist/utils/const.js +2 -2
  46. package/dist/utils/hooks/useLicense.js +1 -1
  47. package/dist/utils/hooks/useLoadPdf.js +66 -57
  48. package/dist/utils/hooks/useLocalization.js +1 -1
  49. package/dist/utils/hooks/usePaginate.js +1 -1
  50. package/dist/utils/hooks/usePresentPage.js +1 -1
  51. package/dist/utils/hooks/useScrollToPage.js +1 -1
  52. package/dist/utils/hooks/useSearch.js +1 -1
  53. package/dist/utils/types.js +2 -2
  54. package/package.json +1 -1
@@ -1,39 +1,40 @@
1
1
  import { ErrorType as e, ScrollMode as t, SelectionMode as n, ViewMode as r } from "./utils/types.js";
2
2
  import { useDocumentPasswordContext as i } from "./contexts/DocumentPasswordContext.js";
3
- import { useDocumentContext as a } from "./contexts/RPDocumentContext.js";
4
- import { useInitialStateContext as o } from "./contexts/InitialStateContext.js";
5
- import { useScrollModeContext as s } from "./contexts/ScrollModeContext.js";
6
- import { useViewModeContext as c } from "./contexts/ViewModeContext.js";
7
- import { useVirtualScrollContext as l } from "./contexts/VirtualScrollContext.js";
8
- import { useLayoutContainer as u } from "./contexts/LayoutContainerContext.js";
9
- import { useEventCallbackContext as d } from "./contexts/EventCallbackContext.js";
10
- import { useDebounce as f } from "./utils/hooks/useDebounce.js";
11
- import { getPageFromPosition as p } from "./utils/calculatePage.js";
12
- import { a as m, r as h } from "./PaginationContext-B3qzCYJu.js";
13
- import { useSelectionModeContext as g } from "./contexts/SelectionModeContext.js";
14
- import { useFullScreenContext as _ } from "./contexts/FullScreenContext.js";
15
- import { t as v } from "./clsx-B7LyVm5O.js";
16
- import { useLoaderContext as ee } from "./contexts/LoaderContext.js";
17
- import { t as y } from "./RPPage-BdoE0RrK.js";
18
- import { useVirtualReactWindow as te } from "./utils/hooks/useVirtualReactWindow.js";
19
- import { DualPage as ne } from "./components/page/DualPage.js";
20
- import { DualPageWithCover as re } from "./components/page/DualPageWithCover.js";
21
- import { SinglePage as ie } from "./components/page/SinglePage.js";
22
- import { useMousePressed as ae } from "./utils/hooks/useMousePressed.js";
23
- import { useGrabScroll as oe } from "./utils/hooks/useGrabScroll.js";
3
+ import { BROWSER_NOT_SUPPORTED_MESSAGE as a, INVALID_OR_CORRUPTED_PDF_MESSAGE as o, WASM_URL_REQUIRED_MESSAGE as s } from "./utils/const.js";
4
+ import { useDocumentContext as c } from "./contexts/RPDocumentContext.js";
5
+ import { useInitialStateContext as l } from "./contexts/InitialStateContext.js";
6
+ import { useScrollModeContext as u } from "./contexts/ScrollModeContext.js";
7
+ import { useViewModeContext as d } from "./contexts/ViewModeContext.js";
8
+ import { useVirtualScrollContext as f } from "./contexts/VirtualScrollContext.js";
9
+ import { useLayoutContainer as p } from "./contexts/LayoutContainerContext.js";
10
+ import { useEventCallbackContext as m } from "./contexts/EventCallbackContext.js";
11
+ import { useDebounce as h } from "./utils/hooks/useDebounce.js";
12
+ import { getPageFromPosition as g } from "./utils/calculatePage.js";
13
+ import { a as _, r as ee } from "./PaginationContext-BmPajxlU.js";
14
+ import { useSelectionModeContext as te } from "./contexts/SelectionModeContext.js";
15
+ import { useFullScreenContext as v } from "./contexts/FullScreenContext.js";
16
+ import { t as y } from "./clsx-B7LyVm5O.js";
17
+ import { useLoaderContext as ne } from "./contexts/LoaderContext.js";
18
+ import { t as b } from "./RPPage-B1UMGNSI.js";
19
+ import { useVirtualReactWindow as re } from "./utils/hooks/useVirtualReactWindow.js";
20
+ import { DualPage as ie } from "./components/page/DualPage.js";
21
+ import { DualPageWithCover as ae } from "./components/page/DualPageWithCover.js";
22
+ import { SinglePage as oe } from "./components/page/SinglePage.js";
23
+ import { useMousePressed as x } from "./utils/hooks/useMousePressed.js";
24
+ import { useGrabScroll as S } from "./utils/hooks/useGrabScroll.js";
24
25
  import { usePinch as se } from "./utils/hooks/usePinch.js";
25
- import { t as b } from "./PasswordModal-BW_C2ULg.js";
26
- import { usePresentPage as x } from "./utils/hooks/usePresentPage.js";
27
- import { LayoutContainer as ce } from "./components/layout/LayoutContainer.js";
28
- import { LayoutWrapper as le } from "./components/layout/LayoutWrapper.js";
29
- import { useCopyText as ue } from "./utils/hooks/useCopyText.js";
30
- import { useTextSelection as de } from "./utils/hooks/useTextSelection.js";
31
- import { approximateFraction as fe } from "./utils/approximateFragtion.js";
32
- import { Component as pe, PureComponent as S, createElement as C, memo as me, useCallback as w, useEffect as T, useMemo as he, useRef as E, useState as ge } from "react";
33
- import { OutputScale as _e } from "pdfjs-dist";
34
- import { Fragment as ve, jsx as D, jsxs as ye } from "react/jsx-runtime";
26
+ import { t as ce } from "./PasswordModal-BW_C2ULg.js";
27
+ import { usePresentPage as le } from "./utils/hooks/usePresentPage.js";
28
+ import { LayoutContainer as ue } from "./components/layout/LayoutContainer.js";
29
+ import { LayoutWrapper as de } from "./components/layout/LayoutWrapper.js";
30
+ import { useCopyText as fe } from "./utils/hooks/useCopyText.js";
31
+ import { useTextSelection as pe } from "./utils/hooks/useTextSelection.js";
32
+ import { approximateFraction as me } from "./utils/approximateFragtion.js";
33
+ import { Component as he, PureComponent as C, createElement as w, memo as ge, useCallback as T, useEffect as E, useMemo as _e, useRef as D, useState as ve } from "react";
34
+ import { OutputScale as ye } from "pdfjs-dist";
35
+ import { Fragment as be, jsx as O, jsxs as xe } from "react/jsx-runtime";
35
36
  import './assets/RPPages.css';//#region lib/components/RPPages.module.css
36
- var O = {
37
+ var k = {
37
38
  "rp-pages": "_rp-pages_fn8tz_1",
38
39
  "rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_fn8tz_6",
39
40
  "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_fn8tz_11",
@@ -50,48 +51,48 @@ var O = {
50
51
  };
51
52
  //#endregion
52
53
  //#region node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/extends.js
53
- function k() {
54
- return k = Object.assign ? Object.assign.bind() : function(e) {
54
+ function Se() {
55
+ return Se = Object.assign ? Object.assign.bind() : function(e) {
55
56
  for (var t = 1; t < arguments.length; t++) {
56
57
  var n = arguments[t];
57
58
  for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
58
59
  }
59
60
  return e;
60
- }, k.apply(null, arguments);
61
+ }, Se.apply(null, arguments);
61
62
  }
62
63
  //#endregion
63
64
  //#region node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
64
- function A(e) {
65
+ function Ce(e) {
65
66
  if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
66
67
  return e;
67
68
  }
68
69
  //#endregion
69
70
  //#region node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
70
- function be(e, t) {
71
- return be = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
71
+ function we(e, t) {
72
+ return we = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
72
73
  return e.__proto__ = t, e;
73
- }, be(e, t);
74
+ }, we(e, t);
74
75
  }
75
76
  //#endregion
76
77
  //#region node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
77
- function xe(e, t) {
78
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, be(e, t);
78
+ function A(e, t) {
79
+ e.prototype = Object.create(t.prototype), e.prototype.constructor = e, we(e, t);
79
80
  }
80
81
  //#endregion
81
82
  //#region node_modules/.pnpm/memoize-one@5.2.1/node_modules/memoize-one/dist/memoize-one.esm.js
82
- var Se = Number.isNaN || function(e) {
83
+ var Te = Number.isNaN || function(e) {
83
84
  return typeof e == "number" && e !== e;
84
85
  };
85
- function Ce(e, t) {
86
- return !!(e === t || Se(e) && Se(t));
87
- }
88
86
  function j(e, t) {
87
+ return !!(e === t || Te(e) && Te(t));
88
+ }
89
+ function M(e, t) {
89
90
  if (e.length !== t.length) return !1;
90
- for (var n = 0; n < e.length; n++) if (!Ce(e[n], t[n])) return !1;
91
+ for (var n = 0; n < e.length; n++) if (!j(e[n], t[n])) return !1;
91
92
  return !0;
92
93
  }
93
- function M(e, t) {
94
- t === void 0 && (t = j);
94
+ function Ee(e, t) {
95
+ t === void 0 && (t = M);
95
96
  var n, r = [], i, a = !1;
96
97
  function o() {
97
98
  var o = [...arguments];
@@ -101,7 +102,7 @@ function M(e, t) {
101
102
  }
102
103
  //#endregion
103
104
  //#region node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
104
- function N(e, t) {
105
+ function De(e, t) {
105
106
  if (e == null) return {};
106
107
  var n = {};
107
108
  for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -112,60 +113,60 @@ function N(e, t) {
112
113
  }
113
114
  //#endregion
114
115
  //#region node_modules/.pnpm/react-window@1.8.11_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-window/dist/index.esm.js
115
- var P = typeof performance == "object" && typeof performance.now == "function" ? function() {
116
+ var Oe = typeof performance == "object" && typeof performance.now == "function" ? function() {
116
117
  return performance.now();
117
118
  } : function() {
118
119
  return Date.now();
119
120
  };
120
- function we(e) {
121
+ function ke(e) {
121
122
  cancelAnimationFrame(e.id);
122
123
  }
123
- function Te(e, t) {
124
- var n = P();
124
+ function Ae(e, t) {
125
+ var n = Oe();
125
126
  function r() {
126
- P() - n >= t ? e.call(null) : i.id = requestAnimationFrame(r);
127
+ Oe() - n >= t ? e.call(null) : i.id = requestAnimationFrame(r);
127
128
  }
128
129
  var i = { id: requestAnimationFrame(r) };
129
130
  return i;
130
131
  }
131
- var F = -1;
132
- function Ee(e) {
133
- if (e === void 0 && (e = !1), F === -1 || e) {
132
+ var N = -1;
133
+ function je(e) {
134
+ if (e === void 0 && (e = !1), N === -1 || e) {
134
135
  var t = document.createElement("div"), n = t.style;
135
- n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), F = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
136
+ n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), N = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
136
137
  }
137
- return F;
138
+ return N;
138
139
  }
139
- var I = null;
140
- function De(e) {
141
- if (e === void 0 && (e = !1), I === null || e) {
140
+ var P = null;
141
+ function F(e) {
142
+ if (e === void 0 && (e = !1), P === null || e) {
142
143
  var t = document.createElement("div"), n = t.style;
143
144
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
144
145
  var r = document.createElement("div"), i = r.style;
145
- return i.width = "100px", i.height = "100px", t.appendChild(r), document.body.appendChild(t), t.scrollLeft > 0 ? I = "positive-descending" : (t.scrollLeft = 1, I = t.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(t), I;
146
+ return i.width = "100px", i.height = "100px", t.appendChild(r), document.body.appendChild(t), t.scrollLeft > 0 ? P = "positive-descending" : (t.scrollLeft = 1, P = t.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(t), P;
146
147
  }
147
- return I;
148
+ return P;
148
149
  }
149
- var Oe = 150, L = function(e) {
150
+ var Me = 150, Ne = function(e) {
150
151
  var t = e.columnIndex;
151
152
  return e.data, e.rowIndex + ":" + t;
152
- }, R = null, z = null, B = null;
153
- process.env.NODE_ENV !== "production" && typeof window < "u" && window.WeakSet !== void 0 && (R = /* @__PURE__ */ new WeakSet(), z = /* @__PURE__ */ new WeakSet(), B = /* @__PURE__ */ new WeakSet());
154
- function ke(e) {
153
+ }, I = null, L = null, R = null;
154
+ process.env.NODE_ENV !== "production" && typeof window < "u" && window.WeakSet !== void 0 && (I = /* @__PURE__ */ new WeakSet(), L = /* @__PURE__ */ new WeakSet(), R = /* @__PURE__ */ new WeakSet());
155
+ function Pe(e) {
155
156
  var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, i = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, o = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, c = e.getOffsetForColumnAndAlignment, l = e.getOffsetForRowAndAlignment, u = e.getRowHeight, d = e.getRowOffset, f = e.getRowStartIndexForOffset, p = e.getRowStopIndexForStartIndex, m = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, g = e.validateProps;
156
157
  return t = /* @__PURE__ */ function(e) {
157
- xe(t, e);
158
+ A(t, e);
158
159
  function t(t) {
159
160
  var r = e.call(this, t) || this;
160
- return r._instanceProps = m(r.props, A(r)), r._resetIsScrollingTimeoutId = null, r._outerRef = void 0, r.state = {
161
- instance: A(r),
161
+ return r._instanceProps = m(r.props, Ce(r)), r._resetIsScrollingTimeoutId = null, r._outerRef = void 0, r.state = {
162
+ instance: Ce(r),
162
163
  isScrolling: !1,
163
164
  horizontalScrollDirection: "forward",
164
165
  scrollLeft: typeof r.props.initialScrollLeft == "number" ? r.props.initialScrollLeft : 0,
165
166
  scrollTop: typeof r.props.initialScrollTop == "number" ? r.props.initialScrollTop : 0,
166
167
  scrollUpdateWasRequested: !1,
167
168
  verticalScrollDirection: "forward"
168
- }, r._callOnItemsRendered = void 0, r._callOnItemsRendered = M(function(e, t, n, i, a, o, s, c) {
169
+ }, r._callOnItemsRendered = void 0, r._callOnItemsRendered = Ee(function(e, t, n, i, a, o, s, c) {
169
170
  return r.props.onItemsRendered({
170
171
  overscanColumnStartIndex: e,
171
172
  overscanColumnStopIndex: t,
@@ -176,7 +177,7 @@ function ke(e) {
176
177
  visibleRowStartIndex: s,
177
178
  visibleRowStopIndex: c
178
179
  });
179
- }), r._callOnScroll = void 0, r._callOnScroll = M(function(e, t, n, i, a) {
180
+ }), r._callOnScroll = void 0, r._callOnScroll = Ee(function(e, t, n, i, a) {
180
181
  return r.props.onScroll({
181
182
  horizontalScrollDirection: n,
182
183
  scrollLeft: e,
@@ -199,14 +200,14 @@ function ke(e) {
199
200
  };
200
201
  }
201
202
  return p;
202
- }, r._getItemStyleCache = void 0, r._getItemStyleCache = M(function(e, t, n) {
203
+ }, r._getItemStyleCache = void 0, r._getItemStyleCache = Ee(function(e, t, n) {
203
204
  return {};
204
205
  }), r._onScroll = function(e) {
205
206
  var t = e.currentTarget, n = t.clientHeight, i = t.clientWidth, a = t.scrollLeft, o = t.scrollTop, s = t.scrollHeight, c = t.scrollWidth;
206
207
  r.setState(function(e) {
207
208
  if (e.scrollLeft === a && e.scrollTop === o) return null;
208
209
  var t = r.props.direction, l = a;
209
- if (t === "rtl") switch (De()) {
210
+ if (t === "rtl") switch (F()) {
210
211
  case "negative":
211
212
  l = -a;
212
213
  break;
@@ -229,7 +230,7 @@ function ke(e) {
229
230
  var t = r.props.outerRef;
230
231
  r._outerRef = e, typeof t == "function" ? t(e) : typeof t == "object" && t && t.hasOwnProperty("current") && (t.current = e);
231
232
  }, r._resetIsScrollingDebounced = function() {
232
- r._resetIsScrollingTimeoutId !== null && we(r._resetIsScrollingTimeoutId), r._resetIsScrollingTimeoutId = Te(r._resetIsScrolling, Oe);
233
+ r._resetIsScrollingTimeoutId !== null && ke(r._resetIsScrollingTimeoutId), r._resetIsScrollingTimeoutId = Ae(r._resetIsScrolling, Me);
233
234
  }, r._resetIsScrolling = function() {
234
235
  r._resetIsScrollingTimeoutId = null, r.setState({ isScrolling: !1 }, function() {
235
236
  r._getItemStyleCache(-1);
@@ -237,7 +238,7 @@ function ke(e) {
237
238
  }, r;
238
239
  }
239
240
  t.getDerivedStateFromProps = function(e, t) {
240
- return V(e, t), g(e), null;
241
+ return z(e, t), g(e), null;
241
242
  };
242
243
  var _ = t.prototype;
243
244
  return _.scrollTo = function(e) {
@@ -252,12 +253,12 @@ function ke(e) {
252
253
  };
253
254
  }, this._resetIsScrollingDebounced);
254
255
  }, _.scrollToItem = function(e) {
255
- var t = e.align, n = t === void 0 ? "auto" : t, r = e.columnIndex, i = e.rowIndex, a = this.props, u = a.columnCount, d = a.height, f = a.rowCount, p = a.width, m = this.state, h = m.scrollLeft, g = m.scrollTop, _ = Ee();
256
+ var t = e.align, n = t === void 0 ? "auto" : t, r = e.columnIndex, i = e.rowIndex, a = this.props, u = a.columnCount, d = a.height, f = a.rowCount, p = a.width, m = this.state, h = m.scrollLeft, g = m.scrollTop, _ = je();
256
257
  r !== void 0 && (r = Math.max(0, Math.min(r, u - 1))), i !== void 0 && (i = Math.max(0, Math.min(i, f - 1)));
257
- var v = o(this.props, this._instanceProps), ee = s(this.props, this._instanceProps) > p ? _ : 0, y = v > d ? _ : 0;
258
+ var ee = o(this.props, this._instanceProps), te = s(this.props, this._instanceProps) > p ? _ : 0, v = ee > d ? _ : 0;
258
259
  this.scrollTo({
259
- scrollLeft: r === void 0 ? h : c(this.props, r, n, h, this._instanceProps, y),
260
- scrollTop: i === void 0 ? g : l(this.props, i, n, g, this._instanceProps, ee)
260
+ scrollLeft: r === void 0 ? h : c(this.props, r, n, h, this._instanceProps, v),
261
+ scrollTop: i === void 0 ? g : l(this.props, i, n, g, this._instanceProps, te)
261
262
  });
262
263
  }, _.componentDidMount = function() {
263
264
  var e = this.props, t = e.initialScrollLeft, n = e.initialScrollTop;
@@ -270,7 +271,7 @@ function ke(e) {
270
271
  var e = this.props.direction, t = this.state, n = t.scrollLeft, r = t.scrollTop;
271
272
  if (t.scrollUpdateWasRequested && this._outerRef != null) {
272
273
  var i = this._outerRef;
273
- if (e === "rtl") switch (De()) {
274
+ if (e === "rtl") switch (F()) {
274
275
  case "negative":
275
276
  i.scrollLeft = -n;
276
277
  break;
@@ -287,42 +288,42 @@ function ke(e) {
287
288
  }
288
289
  this._callPropsCallbacks();
289
290
  }, _.componentWillUnmount = function() {
290
- this._resetIsScrollingTimeoutId !== null && we(this._resetIsScrollingTimeoutId);
291
+ this._resetIsScrollingTimeoutId !== null && ke(this._resetIsScrollingTimeoutId);
291
292
  }, _.render = function() {
292
- var e = this.props, t = e.children, n = e.className, r = e.columnCount, i = e.direction, a = e.height, c = e.innerRef, l = e.innerElementType, u = e.innerTagName, d = e.itemData, f = e.itemKey, p = f === void 0 ? L : f, m = e.outerElementType, h = e.outerTagName, g = e.rowCount, _ = e.style, v = e.useIsScrolling, ee = e.width, y = this.state.isScrolling, te = this._getHorizontalRangeToRender(), ne = te[0], re = te[1], ie = this._getVerticalRangeToRender(), ae = ie[0], oe = ie[1], se = [];
293
- if (r > 0 && g) for (var b = ae; b <= oe; b++) for (var x = ne; x <= re; x++) se.push(C(t, {
294
- columnIndex: x,
293
+ var e = this.props, t = e.children, n = e.className, r = e.columnCount, i = e.direction, a = e.height, c = e.innerRef, l = e.innerElementType, u = e.innerTagName, d = e.itemData, f = e.itemKey, p = f === void 0 ? Ne : f, m = e.outerElementType, h = e.outerTagName, g = e.rowCount, _ = e.style, ee = e.useIsScrolling, te = e.width, v = this.state.isScrolling, y = this._getHorizontalRangeToRender(), ne = y[0], b = y[1], re = this._getVerticalRangeToRender(), ie = re[0], ae = re[1], oe = [];
294
+ if (r > 0 && g) for (var x = ie; x <= ae; x++) for (var S = ne; S <= b; S++) oe.push(w(t, {
295
+ columnIndex: S,
295
296
  data: d,
296
- isScrolling: v ? y : void 0,
297
+ isScrolling: ee ? v : void 0,
297
298
  key: p({
298
- columnIndex: x,
299
+ columnIndex: S,
299
300
  data: d,
300
- rowIndex: b
301
+ rowIndex: x
301
302
  }),
302
- rowIndex: b,
303
- style: this._getItemStyle(b, x)
303
+ rowIndex: x,
304
+ style: this._getItemStyle(x, S)
304
305
  }));
305
- var ce = o(this.props, this._instanceProps), le = s(this.props, this._instanceProps);
306
- return C(m || h || "div", {
306
+ var se = o(this.props, this._instanceProps), ce = s(this.props, this._instanceProps);
307
+ return w(m || h || "div", {
307
308
  className: n,
308
309
  onScroll: this._onScroll,
309
310
  ref: this._outerRefSetter,
310
- style: k({
311
+ style: Se({
311
312
  position: "relative",
312
313
  height: a,
313
- width: ee,
314
+ width: te,
314
315
  overflow: "auto",
315
316
  WebkitOverflowScrolling: "touch",
316
317
  willChange: "transform",
317
318
  direction: i
318
319
  }, _)
319
- }, C(l || u || "div", {
320
- children: se,
320
+ }, w(l || u || "div", {
321
+ children: oe,
321
322
  ref: c,
322
323
  style: {
323
- height: ce,
324
- pointerEvents: y ? "none" : void 0,
325
- width: le
324
+ height: se,
325
+ pointerEvents: v ? "none" : void 0,
326
+ width: ce
326
327
  }
327
328
  }));
328
329
  }, _._callPropsCallbacks = function() {
@@ -332,8 +333,8 @@ function ke(e) {
332
333
  this._callOnItemsRendered(o, s, d, f, c, l, p, m);
333
334
  }
334
335
  if (typeof r == "function") {
335
- var h = this.state, g = h.horizontalScrollDirection, _ = h.scrollLeft, v = h.scrollTop, ee = h.scrollUpdateWasRequested, y = h.verticalScrollDirection;
336
- this._callOnScroll(_, v, g, y, ee);
336
+ var h = this.state, g = h.horizontalScrollDirection, _ = h.scrollLeft, ee = h.scrollTop, te = h.scrollUpdateWasRequested, v = h.verticalScrollDirection;
337
+ this._callOnScroll(_, ee, g, v, te);
337
338
  }
338
339
  }, _._getHorizontalRangeToRender = function() {
339
340
  var e = this.props, t = e.columnCount, n = e.overscanColumnCount, a = e.overscanColumnsCount, o = e.overscanCount, s = e.rowCount, c = this.state, l = c.horizontalScrollDirection, u = c.isScrolling, d = c.scrollLeft, f = n || a || o || 1;
@@ -366,16 +367,16 @@ function ke(e) {
366
367
  m
367
368
  ];
368
369
  }, t;
369
- }(S), t.defaultProps = {
370
+ }(C), t.defaultProps = {
370
371
  direction: "ltr",
371
372
  itemData: void 0,
372
373
  useIsScrolling: !1
373
374
  }, t;
374
375
  }
375
- var V = function(e, t) {
376
+ var z = function(e, t) {
376
377
  var n = e.children, r = e.direction, i = e.height, a = e.innerTagName, o = e.outerTagName, s = e.overscanColumnsCount, c = e.overscanCount, l = e.overscanRowsCount, u = e.width, d = t.instance;
377
378
  if (process.env.NODE_ENV !== "production") {
378
- if (typeof c == "number" && R && !R.has(d) && (R.add(d), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof s == "number" || typeof l == "number") && z && !z.has(d) && (z.add(d), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || o != null) && B && !B.has(d) && (B.add(d), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), n == null) throw Error("An invalid \"children\" prop has been specified. Value should be a React component. " + ("\"" + (n === null ? "null" : typeof n) + "\" was specified."));
379
+ if (typeof c == "number" && I && !I.has(d) && (I.add(d), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof s == "number" || typeof l == "number") && L && !L.has(d) && (L.add(d), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || o != null) && R && !R.has(d) && (R.add(d), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), n == null) throw Error("An invalid \"children\" prop has been specified. Value should be a React component. " + ("\"" + (n === null ? "null" : typeof n) + "\" was specified."));
379
380
  switch (r) {
380
381
  case "ltr":
381
382
  case "rtl": break;
@@ -384,7 +385,7 @@ var V = function(e, t) {
384
385
  if (typeof u != "number") throw Error("An invalid \"width\" prop has been specified. Grids must specify a number for width. " + ("\"" + (u === null ? "null" : typeof u) + "\" was specified."));
385
386
  if (typeof i != "number") throw Error("An invalid \"height\" prop has been specified. Grids must specify a number for height. " + ("\"" + (i === null ? "null" : typeof i) + "\" was specified."));
386
387
  }
387
- }, Ae = 50, je = function(e, t) {
388
+ }, B = 50, Fe = function(e, t) {
388
389
  var n = e.rowCount, r = t.rowMetadataMap, i = t.estimatedRowHeight, a = t.lastMeasuredRowIndex, o = 0;
389
390
  if (a >= n && (a = n - 1), a >= 0) {
390
391
  var s = r[a];
@@ -392,7 +393,7 @@ var V = function(e, t) {
392
393
  }
393
394
  var c = (n - a - 1) * i;
394
395
  return o + c;
395
- }, H = function(e, t) {
396
+ }, Ie = function(e, t) {
396
397
  var n = e.columnCount, r = t.columnMetadataMap, i = t.estimatedColumnWidth, a = t.lastMeasuredColumnIndex, o = 0;
397
398
  if (a >= n && (a = n - 1), a >= 0) {
398
399
  var s = r[a];
@@ -400,7 +401,7 @@ var V = function(e, t) {
400
401
  }
401
402
  var c = (n - a - 1) * i;
402
403
  return o + c;
403
- }, U = function(e, t, n, r) {
404
+ }, V = function(e, t, n, r) {
404
405
  var i, a, o;
405
406
  if (e === "column" ? (i = r.columnMetadataMap, a = t.columnWidth, o = r.lastMeasuredColumnIndex) : (i = r.rowMetadataMap, a = t.rowHeight, o = r.lastMeasuredRowIndex), n > o) {
406
407
  var s = 0;
@@ -418,67 +419,67 @@ var V = function(e, t) {
418
419
  e === "column" ? r.lastMeasuredColumnIndex = n : r.lastMeasuredRowIndex = n;
419
420
  }
420
421
  return i[n];
421
- }, Me = function(e, t, n, r) {
422
+ }, Le = function(e, t, n, r) {
422
423
  var i, a;
423
- return e === "column" ? (i = n.columnMetadataMap, a = n.lastMeasuredColumnIndex) : (i = n.rowMetadataMap, a = n.lastMeasuredRowIndex), (a > 0 ? i[a].offset : 0) >= r ? Ne(e, t, n, a, 0, r) : Pe(e, t, n, Math.max(0, a), r);
424
- }, Ne = function(e, t, n, r, i, a) {
424
+ return e === "column" ? (i = n.columnMetadataMap, a = n.lastMeasuredColumnIndex) : (i = n.rowMetadataMap, a = n.lastMeasuredRowIndex), (a > 0 ? i[a].offset : 0) >= r ? H(e, t, n, a, 0, r) : U(e, t, n, Math.max(0, a), r);
425
+ }, H = function(e, t, n, r, i, a) {
425
426
  for (; i <= r;) {
426
- var o = i + Math.floor((r - i) / 2), s = U(e, t, o, n).offset;
427
+ var o = i + Math.floor((r - i) / 2), s = V(e, t, o, n).offset;
427
428
  if (s === a) return o;
428
429
  s < a ? i = o + 1 : s > a && (r = o - 1);
429
430
  }
430
431
  return i > 0 ? i - 1 : 0;
431
- }, Pe = function(e, t, n, r, i) {
432
- for (var a = e === "column" ? t.columnCount : t.rowCount, o = 1; r < a && U(e, t, r, n).offset < i;) r += o, o *= 2;
433
- return Ne(e, t, n, Math.min(r, a - 1), Math.floor(r / 2), i);
434
- }, Fe = function(e, t, n, r, i, a, o) {
435
- var s = e === "column" ? t.width : t.height, c = U(e, t, n, a), l = e === "column" ? H(t, a) : je(t, a), u = Math.max(0, Math.min(l - s, c.offset)), d = Math.max(0, c.offset - s + o + c.size);
432
+ }, U = function(e, t, n, r, i) {
433
+ for (var a = e === "column" ? t.columnCount : t.rowCount, o = 1; r < a && V(e, t, r, n).offset < i;) r += o, o *= 2;
434
+ return H(e, t, n, Math.min(r, a - 1), Math.floor(r / 2), i);
435
+ }, W = function(e, t, n, r, i, a, o) {
436
+ var s = e === "column" ? t.width : t.height, c = V(e, t, n, a), l = e === "column" ? Ie(t, a) : Fe(t, a), u = Math.max(0, Math.min(l - s, c.offset)), d = Math.max(0, c.offset - s + o + c.size);
436
437
  switch (r === "smart" && (r = i >= d - s && i <= u + s ? "auto" : "center"), r) {
437
438
  case "start": return u;
438
439
  case "end": return d;
439
440
  case "center": return Math.round(d + (u - d) / 2);
440
441
  default: return i >= d && i <= u ? i : d > u || i < d ? d : u;
441
442
  }
442
- }, Ie = /* @__PURE__ */ ke({
443
+ }, Re = /* @__PURE__ */ Pe({
443
444
  getColumnOffset: function(e, t, n) {
444
- return U("column", e, t, n).offset;
445
+ return V("column", e, t, n).offset;
445
446
  },
446
447
  getColumnStartIndexForOffset: function(e, t, n) {
447
- return Me("column", e, n, t);
448
+ return Le("column", e, n, t);
448
449
  },
449
450
  getColumnStopIndexForStartIndex: function(e, t, n, r) {
450
- for (var i = e.columnCount, a = e.width, o = U("column", e, t, r), s = n + a, c = o.offset + o.size, l = t; l < i - 1 && c < s;) l++, c += U("column", e, l, r).size;
451
+ for (var i = e.columnCount, a = e.width, o = V("column", e, t, r), s = n + a, c = o.offset + o.size, l = t; l < i - 1 && c < s;) l++, c += V("column", e, l, r).size;
451
452
  return l;
452
453
  },
453
454
  getColumnWidth: function(e, t, n) {
454
455
  return n.columnMetadataMap[t].size;
455
456
  },
456
- getEstimatedTotalHeight: je,
457
- getEstimatedTotalWidth: H,
457
+ getEstimatedTotalHeight: Fe,
458
+ getEstimatedTotalWidth: Ie,
458
459
  getOffsetForColumnAndAlignment: function(e, t, n, r, i, a) {
459
- return Fe("column", e, t, n, r, i, a);
460
+ return W("column", e, t, n, r, i, a);
460
461
  },
461
462
  getOffsetForRowAndAlignment: function(e, t, n, r, i, a) {
462
- return Fe("row", e, t, n, r, i, a);
463
+ return W("row", e, t, n, r, i, a);
463
464
  },
464
465
  getRowOffset: function(e, t, n) {
465
- return U("row", e, t, n).offset;
466
+ return V("row", e, t, n).offset;
466
467
  },
467
468
  getRowHeight: function(e, t, n) {
468
469
  return n.rowMetadataMap[t].size;
469
470
  },
470
471
  getRowStartIndexForOffset: function(e, t, n) {
471
- return Me("row", e, n, t);
472
+ return Le("row", e, n, t);
472
473
  },
473
474
  getRowStopIndexForStartIndex: function(e, t, n, r) {
474
- for (var i = e.rowCount, a = e.height, o = U("row", e, t, r), s = n + a, c = o.offset + o.size, l = t; l < i - 1 && c < s;) l++, c += U("row", e, l, r).size;
475
+ for (var i = e.rowCount, a = e.height, o = V("row", e, t, r), s = n + a, c = o.offset + o.size, l = t; l < i - 1 && c < s;) l++, c += V("row", e, l, r).size;
475
476
  return l;
476
477
  },
477
478
  initInstanceProps: function(e, t) {
478
479
  var n = e, r = n.estimatedColumnWidth, i = n.estimatedRowHeight, a = {
479
480
  columnMetadataMap: {},
480
- estimatedColumnWidth: r || Ae,
481
- estimatedRowHeight: i || Ae,
481
+ estimatedColumnWidth: r || B,
482
+ estimatedRowHeight: i || B,
482
483
  lastMeasuredColumnIndex: -1,
483
484
  lastMeasuredRowIndex: -1,
484
485
  rowMetadataMap: {}
@@ -508,32 +509,32 @@ var V = function(e, t) {
508
509
  }
509
510
  });
510
511
  process.env.NODE_ENV !== "production" && typeof window < "u" && window.WeakSet;
511
- function W(e, t) {
512
+ function G(e, t) {
512
513
  for (var n in e) if (!(n in t)) return !0;
513
514
  for (var r in t) if (e[r] !== t[r]) return !0;
514
515
  return !1;
515
516
  }
516
- var G = ["style"], K = ["style"];
517
- function q(e, t) {
518
- var n = e.style, r = N(e, G), i = t.style, a = N(t, K);
519
- return !W(n, i) && !W(r, a);
517
+ var ze = ["style"], Be = ["style"];
518
+ function Ve(e, t) {
519
+ var n = e.style, r = De(e, ze), i = t.style, a = De(t, Be);
520
+ return !G(n, i) && !G(r, a);
520
521
  }
521
522
  //#endregion
522
523
  //#region node_modules/.pnpm/react-virtualized-auto-sizer@1.0.26_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-virtualized-auto-sizer/dist/react-virtualized-auto-sizer.esm.js
523
- var J = typeof window < "u" ? window : typeof self < "u" ? self : global, Y = null, X = null, Le = 20, Z = J.clearTimeout, Re = J.setTimeout, Q = J.cancelAnimationFrame || J.mozCancelAnimationFrame || J.webkitCancelAnimationFrame, $ = J.requestAnimationFrame || J.mozRequestAnimationFrame || J.webkitRequestAnimationFrame;
524
- Q == null || $ == null ? (Y = Z, X = function(e) {
525
- return Re(e, Le);
526
- }) : (Y = function([e, t]) {
527
- Q(e), Z(t);
528
- }, X = function(e) {
529
- let t = $(function() {
530
- Z(n), e();
531
- }), n = Re(function() {
532
- Q(t), e();
533
- }, Le);
524
+ var K = typeof window < "u" ? window : typeof self < "u" ? self : global, q = null, He = null, J = 20, Y = K.clearTimeout, X = K.setTimeout, Z = K.cancelAnimationFrame || K.mozCancelAnimationFrame || K.webkitCancelAnimationFrame, Q = K.requestAnimationFrame || K.mozRequestAnimationFrame || K.webkitRequestAnimationFrame;
525
+ Z == null || Q == null ? (q = Y, He = function(e) {
526
+ return X(e, J);
527
+ }) : (q = function([e, t]) {
528
+ Z(e), Y(t);
529
+ }, He = function(e) {
530
+ let t = Q(function() {
531
+ Y(n), e();
532
+ }), n = X(function() {
533
+ Z(t), e();
534
+ }, J);
534
535
  return [t, n];
535
536
  });
536
- function ze(e) {
537
+ function Ue(e) {
537
538
  let t, n, r, i, a, o, s, c = typeof document < "u" && document.attachEvent;
538
539
  if (!c) {
539
540
  o = function(e) {
@@ -544,7 +545,7 @@ function ze(e) {
544
545
  }, s = function(e) {
545
546
  if (e.target.className && typeof e.target.className.indexOf == "function" && e.target.className.indexOf("contract-trigger") < 0 && e.target.className.indexOf("expand-trigger") < 0) return;
546
547
  let t = this;
547
- o(this), this.__resizeRAF__ && Y(this.__resizeRAF__), this.__resizeRAF__ = X(function() {
548
+ o(this), this.__resizeRAF__ && q(this.__resizeRAF__), this.__resizeRAF__ = He(function() {
548
549
  a(t) && (t.__resizeLast__.width = t.offsetWidth, t.__resizeLast__.height = t.offsetHeight, t.__resizeListeners__.forEach(function(n) {
549
550
  n.call(t, e);
550
551
  }));
@@ -575,7 +576,7 @@ function ze(e) {
575
576
  if (c) e.attachEvent("onresize", t);
576
577
  else {
577
578
  if (!e.__resizeTriggers__) {
578
- let t = e.ownerDocument, i = J.getComputedStyle(e);
579
+ let t = e.ownerDocument, i = K.getComputedStyle(e);
579
580
  i && i.position === "static" && (e.style.position = "relative"), l(t), e.__resizeLast__ = {}, e.__resizeListeners__ = [], (e.__resizeTriggers__ = t.createElement("div")).className = "resize-triggers";
580
581
  let a = t.createElement("div");
581
582
  a.className = "expand-trigger", a.appendChild(t.createElement("div"));
@@ -598,7 +599,7 @@ function ze(e) {
598
599
  }
599
600
  };
600
601
  }
601
- var Be = class extends pe {
602
+ var We = class extends he {
602
603
  constructor(...e) {
603
604
  super(...e), this.state = {
604
605
  height: this.props.defaultHeight || 0,
@@ -637,7 +638,7 @@ var Be = class extends pe {
637
638
  if (t != null && t.ownerDocument && t.ownerDocument.defaultView && t instanceof t.ownerDocument.defaultView.HTMLElement) {
638
639
  this._parentNode = t;
639
640
  let n = t.ownerDocument.defaultView.ResizeObserver;
640
- n == null ? (this._detectElementResize = ze(e), this._detectElementResize.addResizeListener(t, this._onResize)) : (this._resizeObserver = new n(() => {
641
+ n == null ? (this._detectElementResize = Ue(e), this._detectElementResize.addResizeListener(t, this._onResize)) : (this._resizeObserver = new n(() => {
641
642
  this._timeoutId = setTimeout(this._onResize, 0);
642
643
  }), this._resizeObserver.observe(t)), this._onResize();
643
644
  }
@@ -647,7 +648,7 @@ var Be = class extends pe {
647
648
  }
648
649
  render() {
649
650
  let { children: e, defaultHeight: t, defaultWidth: n, disableHeight: r = !1, disableWidth: i = !1, doNotBailOutOnEmptyChildren: a = !1, nonce: o, onResize: s, style: c = {}, tagName: l = "div", ...u } = this.props, { height: d, width: f } = this.state, p = { overflow: "visible" }, m = {}, h = !1;
650
- return r || (d === 0 && (h = !0), p.height = 0, m.height = d, m.scaledHeight = d), i || (f === 0 && (h = !0), p.width = 0, m.width = f, m.scaledWidth = f), a && (h = !1), C(l, {
651
+ return r || (d === 0 && (h = !0), p.height = 0, m.height = d, m.scaledHeight = d), i || (f === 0 && (h = !0), p.width = 0, m.width = f, m.scaledWidth = f), a && (h = !1), w(l, {
651
652
  ref: this._setRef,
652
653
  style: {
653
654
  ...p,
@@ -656,14 +657,14 @@ var Be = class extends pe {
656
657
  ...u
657
658
  }, !h && e(m));
658
659
  }
659
- }, Ve = me(({ columnIndex: e, rowIndex: t, data: n, style: r }) => {
660
- let i = p(t, e, n.columnCount, n.isDualPageWithCover);
660
+ }, Ge = ge(({ columnIndex: e, rowIndex: t, data: n, style: r }) => {
661
+ let i = g(t, e, n.columnCount, n.isDualPageWithCover);
661
662
  if (i <= 0) return null;
662
663
  if (n.isDualPageWithCover) {
663
664
  let a = i === n.totalPages && n.totalPages % 2 == 0;
664
665
  if (t === 0 && i === 1 || a && e === 0) {
665
666
  let e = n.columnWidths.reduce((e, t) => e + t, 0);
666
- return /* @__PURE__ */ D("div", {
667
+ return /* @__PURE__ */ O("div", {
667
668
  style: {
668
669
  ...r,
669
670
  width: e,
@@ -671,99 +672,103 @@ var Be = class extends pe {
671
672
  justifyContent: "center",
672
673
  alignItems: "flex-start"
673
674
  },
674
- children: /* @__PURE__ */ D(y, {
675
+ children: /* @__PURE__ */ O(b, {
675
676
  style: { position: "relative" },
676
677
  pageNumber: i
677
678
  }, i)
678
679
  });
679
680
  }
680
681
  }
681
- return n.columnCount === 2 ? /* @__PURE__ */ D("div", {
682
+ return n.columnCount === 2 ? /* @__PURE__ */ O("div", {
682
683
  style: {
683
684
  ...r,
684
685
  display: "flex",
685
686
  justifyContent: e === 0 ? "flex-end" : "flex-start",
686
687
  alignItems: "flex-start"
687
688
  },
688
- children: /* @__PURE__ */ D(y, {
689
+ children: /* @__PURE__ */ O(b, {
689
690
  style: { position: "relative" },
690
691
  pageNumber: i
691
692
  }, i)
692
- }) : /* @__PURE__ */ D(y, {
693
+ }) : /* @__PURE__ */ O(b, {
693
694
  style: r,
694
695
  pageNumber: i
695
696
  }, i);
696
- }, q), He = () => {
697
- let p = E(new _e()), { initialPage: y = 1, initialScrollMode: pe } = o(), { pagesRef: S, setPagesRef: C, setContentRef: me } = u(), { scrollToPage: k } = m();
698
- ue(S);
699
- let { virtualScrollRef: A, getVirtualScrollRef: be, getPageScrollElementRef: xe, getVirtualScrollableElementRef: Se, setTotalInnerDimensions: Ce, virtualScrollableElementRef: j, totalInnerDimensions: M, pageScrollElementRef: N } = l(), P = E(y > 1), [we, Te] = ge(y > 1), { nextPage: F, prevPage: Ee, setFocusedPage: I, focusedPage: De, totalPages: Oe } = h(), { scrollMode: L } = s(), { viewMode: R } = c(), z = E(null), B = E(null), { loading: ke, error: V } = a(), { passwordRequired: Ae } = i(), { LoaderImageComponent: je } = ee(), H = E(M), U = E({
700
- viewMode: R,
701
- scrollMode: L
702
- }), Me = E(!1), Ne = E(), { isFullScreen: Pe } = _(), { pageDimension: Fe, rowCount: W, rowHeight: G, columnCount: K, columnWidth: q, estimatedColumnWidth: J, estimatedRowHeight: Y, totalDimension: X } = te(), Le = f(M, 100), { onScroll: Z, onTextSelect: Re } = d();
703
- de({
704
- onTextSelect: Re,
705
- pagesRef: S
697
+ }, Ve), Ke = (t) => {
698
+ if (t === e.WASM_URL_REQUIRED) return s;
699
+ if (t === e.INVALID_OR_CORRUPTED_PDF) return o;
700
+ if (t === e.NOT_SUPPORTED) return a;
701
+ }, qe = () => {
702
+ let a = D(new ye()), { initialPage: o = 1, initialScrollMode: s } = l(), { pagesRef: g, setPagesRef: b, setContentRef: he } = p(), { scrollToPage: C } = _();
703
+ fe(g);
704
+ let { virtualScrollRef: w, getVirtualScrollRef: ge, getPageScrollElementRef: Se, getVirtualScrollableElementRef: Ce, setTotalInnerDimensions: we, virtualScrollableElementRef: A, totalInnerDimensions: Te, pageScrollElementRef: j } = f(), M = D(o > 1), [Ee, De] = ve(o > 1), { nextPage: Oe, prevPage: ke, setFocusedPage: Ae, focusedPage: N, totalPages: je } = ee(), { scrollMode: P } = u(), { viewMode: F } = d(), Me = D(null), Ne = D(null), { loading: I, error: L } = c(), { passwordRequired: R } = i(), { LoaderImageComponent: Pe } = ne(), z = D(Te), B = D({
705
+ viewMode: F,
706
+ scrollMode: P
707
+ }), Fe = D(!1), Ie = D(), { isFullScreen: V } = v(), { pageDimension: Le, rowCount: H, rowHeight: U, columnCount: W, columnWidth: G, estimatedColumnWidth: ze, estimatedRowHeight: Be, totalDimension: Ve } = re(), K = h(Te, 100), { onScroll: q, onTextSelect: He } = m(), J = Ke(L);
708
+ pe({
709
+ onTextSelect: He,
710
+ pagesRef: g
706
711
  });
707
- let Q = E();
708
- x(K, W, j, R);
709
- let $ = E({
712
+ let Y = D();
713
+ le(W, H, A, F);
714
+ let X = D({
710
715
  scrollTop: 0,
711
716
  scrollLeft: 0
712
717
  });
713
- se(S);
714
- let { isPressed: ze } = ae(), { selectionMode: He } = g(), { initializeGrabScroll: Ue, resetGrabState: We } = oe({ isPressed: ze }), Ge = he(() => He === n.HAND, [He]), Ke = he(() => {
715
- let e = Array.from({ length: K }, (e, t) => q(t));
718
+ se(g);
719
+ let { isPressed: Z } = x(), { selectionMode: Q } = te(), { initializeGrabScroll: Ue, resetGrabState: qe } = S({ isPressed: Z }), $ = _e(() => Q === n.HAND, [Q]), Je = _e(() => {
720
+ let e = Array.from({ length: W }, (e, t) => G(t));
716
721
  return {
717
- columnCount: K,
718
- isDualPageWithCover: R === r.DUAL_PAGE_WITH_COVER,
722
+ columnCount: W,
723
+ isDualPageWithCover: F === r.DUAL_PAGE_WITH_COVER,
719
724
  columnWidths: e,
720
- totalPages: Oe
725
+ totalPages: je
721
726
  };
722
727
  }, [
723
- K,
724
- R,
725
- q,
726
- Oe
727
- ]), qe = w((e) => {
728
- let t = document.activeElement !== S;
729
- !Pe && t || (["ArrowUp", "ArrowLeft"].includes(e.key) ? (e.preventDefault(), Ee()) : ["ArrowDown", "ArrowRight"].includes(e.key) && (e.preventDefault(), F()));
730
- }, [
728
+ W,
731
729
  F,
732
- Ee,
733
- Pe,
734
- L
730
+ G,
731
+ je
732
+ ]), Ye = T((e) => {
733
+ let t = document.activeElement !== g;
734
+ !V && t || (["ArrowUp", "ArrowLeft"].includes(e.key) ? (e.preventDefault(), ke()) : ["ArrowDown", "ArrowRight"].includes(e.key) && (e.preventDefault(), Oe()));
735
+ }, [
736
+ Oe,
737
+ ke,
738
+ V,
739
+ P
735
740
  ]);
736
- T(() => (window.addEventListener("keydown", qe), () => {
737
- window.removeEventListener("keydown", qe);
738
- }), [qe]), T(() => {
739
- if (z.current && (z.current.style.position = "relative"), A) for (let e = 0; e < W; e++) for (let t = 0; t < K; t++) A.resetAfterIndices({
741
+ E(() => (window.addEventListener("keydown", Ye), () => {
742
+ window.removeEventListener("keydown", Ye);
743
+ }), [Ye]), E(() => {
744
+ if (Me.current && (Me.current.style.position = "relative"), w) for (let e = 0; e < H; e++) for (let t = 0; t < W; t++) w.resetAfterIndices({
740
745
  columnIndex: t,
741
746
  rowIndex: e,
742
747
  shouldForceUpdate: !0
743
748
  });
744
749
  }, [
750
+ H,
745
751
  W,
746
- K,
747
- Fe,
748
- A
752
+ Le,
753
+ w
749
754
  ]);
750
- let Je = w((e, t) => {
751
- if (!j) return {
755
+ let Xe = T((e, t) => {
756
+ if (!A) return {
752
757
  scrollTop: 0,
753
758
  scrollLeft: 0
754
759
  };
755
- let n = $.current.scrollTop > t, r = $.current.scrollLeft > e;
756
- return n || r ? $.current : {
757
- scrollTop: j.scrollTop,
758
- scrollLeft: j.scrollLeft
760
+ let n = X.current.scrollTop > t, r = X.current.scrollLeft > e;
761
+ return n || r ? X.current : {
762
+ scrollTop: A.scrollTop,
763
+ scrollLeft: A.scrollLeft
759
764
  };
760
- }, [j]), Ye = w((e, t) => {
761
- if (U.current.viewMode !== R || U.current.scrollMode !== L) {
762
- Q.current && clearTimeout(Q.current), Me.current = !0, k(De, "auto"), Q.current = setTimeout(() => {
765
+ }, [A]), Ze = T((e, t) => {
766
+ if (B.current.viewMode !== F || B.current.scrollMode !== P) {
767
+ Y.current && clearTimeout(Y.current), Fe.current = !0, C(N, "auto"), Y.current = setTimeout(() => {
763
768
  requestAnimationFrame(() => {
764
- U.current = {
765
- viewMode: R,
766
- scrollMode: L
769
+ B.current = {
770
+ viewMode: F,
771
+ scrollMode: P
767
772
  };
768
773
  });
769
774
  }, 100);
@@ -771,144 +776,144 @@ var Be = class extends pe {
771
776
  }
772
777
  let n = e.scrollTop, r = e.scrollLeft;
773
778
  if (!t.height || !t.width) return;
774
- Me.current = !0;
775
- let { height: i, width: a } = t, { height: o, width: s } = H.current;
776
- if (o === i && s === a) return;
777
- if (P.current && y > 1) {
778
- H.current = {
779
+ Fe.current = !0;
780
+ let { height: i, width: a } = t, { height: s, width: c } = z.current;
781
+ if (s === i && c === a) return;
782
+ if (M.current && o > 1) {
783
+ z.current = {
779
784
  height: t.height,
780
785
  width: t.width
781
786
  };
782
787
  return;
783
788
  }
784
- if (!o || !s) {
785
- H.current = {
789
+ if (!s || !c) {
790
+ z.current = {
786
791
  height: t.height,
787
792
  width: t.width
788
793
  };
789
794
  return;
790
795
  }
791
796
  if (n === 0 && r === 0) {
792
- H.current = {
797
+ z.current = {
793
798
  height: t.height,
794
799
  width: t.width
795
800
  };
796
801
  return;
797
802
  }
798
- let c = n / o * i, l = r / s * a, u = Math.round(Math.min(c, i)) || 0, d = Math.round(Math.min(l, a)) || 0;
799
- Ne.current = setTimeout(() => {
803
+ let l = n / s * i, u = r / c * a, d = Math.round(Math.min(l, i)) || 0, f = Math.round(Math.min(u, a)) || 0;
804
+ Ie.current = setTimeout(() => {
800
805
  requestAnimationFrame(() => {
801
- j?.scrollTo({
802
- top: u,
803
- left: d,
806
+ A?.scrollTo({
807
+ top: d,
808
+ left: f,
804
809
  behavior: "auto"
805
810
  });
806
811
  });
807
- }, 0), H.current = {
812
+ }, 0), z.current = {
808
813
  height: t.height,
809
814
  width: t.width
810
815
  };
811
816
  }, [
812
- j,
813
- R,
814
- L,
815
- k,
816
- y
817
+ A,
818
+ F,
819
+ P,
820
+ C,
821
+ o
817
822
  ]);
818
- T(() => {
819
- clearTimeout(Ne.current);
820
- let e = Array.from({ length: W }).reduce((e, t, n) => e + G(n), 0), t = Array.from({ length: K }).reduce((e, t, n) => e + q(n), 0), n = Je(t, e);
821
- $.current = n, Ye(n, {
823
+ E(() => {
824
+ clearTimeout(Ie.current);
825
+ let e = Array.from({ length: H }).reduce((e, t, n) => e + U(n), 0), t = Array.from({ length: W }).reduce((e, t, n) => e + G(n), 0), n = Xe(t, e);
826
+ X.current = n, Ze(n, {
822
827
  height: e,
823
828
  width: t
824
- }), Ce({
829
+ }), we({
825
830
  height: e,
826
831
  width: t
827
832
  });
828
833
  }, [
829
- Fe,
834
+ Le,
835
+ H,
830
836
  W,
831
- K,
832
- Ye
837
+ Ze
833
838
  ]);
834
- let Xe = w((e) => {
835
- $.current = {
839
+ let Qe = T((e) => {
840
+ X.current = {
836
841
  scrollTop: e.scrollTop,
837
842
  scrollLeft: e.scrollLeft
838
843
  };
839
- }, [j]);
840
- T(() => {
841
- if (Z) return N && N.addEventListener("scroll", Z), j && j.addEventListener("scroll", Z), () => {
842
- N?.removeEventListener("scroll", Z), j?.removeEventListener("scroll", Z);
844
+ }, [A]);
845
+ E(() => {
846
+ if (q) return j && j.addEventListener("scroll", q), A && A.addEventListener("scroll", q), () => {
847
+ j?.removeEventListener("scroll", q), A?.removeEventListener("scroll", q);
843
848
  };
844
849
  }, [
850
+ A,
845
851
  j,
846
- N,
847
- Z
848
- ]), T(() => () => {
849
- Q.current && clearTimeout(Q.current);
852
+ q
853
+ ]), E(() => () => {
854
+ Y.current && clearTimeout(Y.current);
850
855
  }, []);
851
- let Ze = he(() => v(O["rp-pages-container"], {
852
- [O["rp-cursor-grab"]]: Ge && !ze,
853
- [O["rp-cursor-grabbing"]]: Ge && ze
854
- }), [Ge, ze]), Qe = w((e) => {
855
- if (Ge && e) {
856
- let e = v(O["rp-pages"]);
856
+ let $e = _e(() => y(k["rp-pages-container"], {
857
+ [k["rp-cursor-grab"]]: $ && !Z,
858
+ [k["rp-cursor-grabbing"]]: $ && Z
859
+ }), [$, Z]), et = T((e) => {
860
+ if ($ && e) {
861
+ let e = y(k["rp-pages"]);
857
862
  Ue(document.querySelector(`.${e}`));
858
863
  }
859
864
  }, [
860
- Ge,
865
+ $,
861
866
  Ue,
862
- O
867
+ k
863
868
  ]);
864
- return T(() => {
865
- ke && We();
866
- }, [ke]), T(() => {
867
- if (V !== e.INVALID_OR_CORRUPTED_PDF) return;
868
- let t = requestAnimationFrame(() => {
869
- B.current?.focus();
869
+ return E(() => {
870
+ I && qe();
871
+ }, [I]), E(() => {
872
+ if (!J) return;
873
+ let e = requestAnimationFrame(() => {
874
+ Ne.current?.focus();
870
875
  });
871
876
  return () => {
872
- cancelAnimationFrame(t);
877
+ cancelAnimationFrame(e);
873
878
  };
874
- }, [V]), T(() => {
875
- if (!(Le.height === 0 || !P.current)) {
876
- if (pe === t.PAGE_SCROLLING) {
877
- y !== De && N && I(y), P.current = !1, Te(!1);
879
+ }, [J]), E(() => {
880
+ if (!(K.height === 0 || !M.current)) {
881
+ if (s === t.PAGE_SCROLLING) {
882
+ o !== N && j && Ae(o), M.current = !1, De(!1);
878
883
  return;
879
884
  }
880
- j && (k(y, "auto"), (j.scrollLeft > 0 || j.scrollTop > 0) && (I(y), P.current = !1, Te(!1)));
885
+ A && (C(o, "auto"), (A.scrollLeft > 0 || A.scrollTop > 0) && (Ae(o), M.current = !1, De(!1)));
881
886
  }
882
887
  }, [
883
- k,
884
- pe,
885
- N,
886
- I,
887
- Le,
888
- j
889
- ]), /* @__PURE__ */ ye(ve, { children: [/* @__PURE__ */ D(le, {
890
- ref: me,
891
- children: /* @__PURE__ */ D(ce, {
892
- ref: C,
888
+ C,
889
+ s,
890
+ j,
891
+ Ae,
892
+ K,
893
+ A
894
+ ]), /* @__PURE__ */ xe(be, { children: [/* @__PURE__ */ O(de, {
895
+ ref: he,
896
+ children: /* @__PURE__ */ O(ue, {
897
+ ref: b,
893
898
  tabIndex: -1,
894
- className: Ze,
899
+ className: $e,
895
900
  style: {
896
- "--scale-round-x": `${fe(p.current.sx)[1]}px`,
897
- "--scale-round-y": `${fe(p.current.sy)[1]}px`
901
+ "--scale-round-x": `${me(a.current.sx)[1]}px`,
902
+ "--scale-round-y": `${me(a.current.sy)[1]}px`
898
903
  },
899
- children: /* @__PURE__ */ D(Be, {
904
+ children: /* @__PURE__ */ O(We, {
900
905
  style: { minHeight: "50px" },
901
- children: ({ width: n, height: i }) => /* @__PURE__ */ D("div", {
906
+ children: ({ width: n, height: i }) => /* @__PURE__ */ O("div", {
902
907
  "data-rp": "pages",
903
- ref: Qe,
908
+ ref: et,
904
909
  style: {
905
910
  width: n,
906
911
  height: i,
907
- ...we && { visibility: "hidden" }
912
+ ...Ee && { visibility: "hidden" }
908
913
  },
909
- children: L === t.PAGE_SCROLLING ? V === e.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ D("div", {
910
- ref: B,
911
- className: O["rp-load-error"],
914
+ children: P === t.PAGE_SCROLLING ? J ? /* @__PURE__ */ O("div", {
915
+ ref: Ne,
916
+ className: k["rp-load-error"],
912
917
  style: {
913
918
  width: n,
914
919
  height: i
@@ -917,51 +922,51 @@ var Be = class extends pe {
917
922
  role: "alert",
918
923
  "aria-live": "assertive",
919
924
  "aria-atomic": "true",
920
- children: /* @__PURE__ */ D("div", {
921
- className: O["rp-load-error-message"],
922
- children: "Invalid or corrupted PDF file."
925
+ children: /* @__PURE__ */ O("div", {
926
+ className: k["rp-load-error-message"],
927
+ children: J
923
928
  })
924
- }) : /* @__PURE__ */ D("div", {
925
- ref: xe,
929
+ }) : /* @__PURE__ */ O("div", {
930
+ ref: Se,
926
931
  style: {
927
932
  width: n,
928
933
  height: i
929
934
  },
930
- className: v(O["rp-pages"], O["rp-page-scrolling-wrapper"]),
931
- children: R === r.DUAL_PAGE ? /* @__PURE__ */ D(ne, {
932
- widths: q,
933
- heights: G
934
- }) : R === r.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ D(re, {
935
- widths: q,
936
- heights: G
937
- }) : /* @__PURE__ */ D(ie, {
938
- widths: q,
939
- heights: G
935
+ className: y(k["rp-pages"], k["rp-page-scrolling-wrapper"]),
936
+ children: F === r.DUAL_PAGE ? /* @__PURE__ */ O(ie, {
937
+ widths: G,
938
+ heights: U
939
+ }) : F === r.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ O(ae, {
940
+ widths: G,
941
+ heights: U
942
+ }) : /* @__PURE__ */ O(oe, {
943
+ widths: G,
944
+ heights: U
940
945
  })
941
- }) : Y ? /* @__PURE__ */ D(Ie, {
942
- ref: be,
943
- itemData: Ke,
944
- outerRef: Se,
945
- innerRef: z,
946
- onScroll: Xe,
947
- columnCount: K,
948
- columnWidth: q,
949
- rowHeight: G,
946
+ }) : Be && !L ? /* @__PURE__ */ O(Re, {
947
+ ref: ge,
948
+ itemData: Je,
949
+ outerRef: Ce,
950
+ innerRef: Me,
951
+ onScroll: Qe,
952
+ columnCount: W,
953
+ columnWidth: G,
954
+ rowHeight: U,
950
955
  height: i,
951
956
  width: n,
952
- estimatedColumnWidth: J,
953
- estimatedRowHeight: Y,
954
- rowCount: W,
955
- className: v(O["rp-pages"], L === t.HORIZONTAL_SCROLLING ? O["rp-pages-horizontal-scroll"] : ""),
957
+ estimatedColumnWidth: ze,
958
+ estimatedRowHeight: Be,
959
+ rowCount: H,
960
+ className: y(k["rp-pages"], P === t.HORIZONTAL_SCROLLING ? k["rp-pages-horizontal-scroll"] : ""),
956
961
  style: {
957
- "--rp-pages-height": `${X.height}px`,
958
- "--rp-pages-width": `${X.width}px`,
959
- "--rp-row-count": `${W}`,
960
- "--rp-column-count": `${K}`
962
+ "--rp-pages-height": `${Ve.height}px`,
963
+ "--rp-pages-width": `${Ve.width}px`,
964
+ "--rp-row-count": `${H}`,
965
+ "--rp-column-count": `${W}`
961
966
  },
962
- children: Ve
963
- }) : !ke && !V ? /* @__PURE__ */ D("div", {
964
- className: O["rp-loader"],
967
+ children: Ge
968
+ }) : !I && !L ? /* @__PURE__ */ O("div", {
969
+ className: k["rp-loader"],
965
970
  style: {
966
971
  display: "flex",
967
972
  justifyContent: "center",
@@ -969,39 +974,39 @@ var Be = class extends pe {
969
974
  height: "100%",
970
975
  width: "100%"
971
976
  },
972
- children: je && /* @__PURE__ */ D(je, {})
973
- }) : V === e.NOT_SUPPORTED ? /* @__PURE__ */ D("div", {
974
- className: O["rp-not-supported"],
975
- children: /* @__PURE__ */ ye("div", {
976
- className: O["rp-not-supported-content"],
977
- children: ["React PDF Kit is unable to render on this browser. Please use the supported browsers from the list below:", /* @__PURE__ */ D("div", { children: /* @__PURE__ */ ye("ul", {
978
- className: O["rp-not-supported-list"],
977
+ children: Pe && /* @__PURE__ */ O(Pe, {})
978
+ }) : L === e.NOT_SUPPORTED ? /* @__PURE__ */ O("div", {
979
+ className: k["rp-not-supported"],
980
+ children: /* @__PURE__ */ xe("div", {
981
+ className: k["rp-not-supported-content"],
982
+ children: ["React PDF Kit is unable to render on this browser. Please use the supported browsers from the list below:", /* @__PURE__ */ O("div", { children: /* @__PURE__ */ xe("ul", {
983
+ className: k["rp-not-supported-list"],
979
984
  children: [
980
- /* @__PURE__ */ D("li", { children: "Chrome 126+" }),
981
- /* @__PURE__ */ D("li", { children: "Edge 126+" }),
982
- /* @__PURE__ */ D("li", { children: "Firefox 126+" }),
983
- /* @__PURE__ */ D("li", { children: "Safari 18.4+" }),
984
- /* @__PURE__ */ D("li", { children: "Safari iOS 18.4+" }),
985
- /* @__PURE__ */ D("li", { children: "Chrome Android 126+" })
985
+ /* @__PURE__ */ O("li", { children: "Chrome 126+" }),
986
+ /* @__PURE__ */ O("li", { children: "Edge 126+" }),
987
+ /* @__PURE__ */ O("li", { children: "Firefox 126+" }),
988
+ /* @__PURE__ */ O("li", { children: "Safari 18.4+" }),
989
+ /* @__PURE__ */ O("li", { children: "Safari iOS 18.4+" }),
990
+ /* @__PURE__ */ O("li", { children: "Chrome Android 126+" })
986
991
  ]
987
992
  }) })]
988
993
  })
989
- }) : V === e.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ D("div", {
990
- ref: B,
991
- className: O["rp-load-error"],
994
+ }) : J ? /* @__PURE__ */ O("div", {
995
+ ref: Ne,
996
+ className: k["rp-load-error"],
992
997
  tabIndex: -1,
993
998
  role: "alert",
994
999
  "aria-live": "assertive",
995
1000
  "aria-atomic": "true",
996
- children: /* @__PURE__ */ D("div", {
997
- className: O["rp-load-error-message"],
998
- children: "Invalid or corrupted PDF file."
1001
+ children: /* @__PURE__ */ O("div", {
1002
+ className: k["rp-load-error-message"],
1003
+ children: J
999
1004
  })
1000
1005
  }) : null
1001
1006
  })
1002
1007
  })
1003
1008
  })
1004
- }), Ae && /* @__PURE__ */ D(b, {})] });
1009
+ }), R && /* @__PURE__ */ O(ce, {})] });
1005
1010
  };
1006
1011
  //#endregion
1007
- export { He as t };
1012
+ export { qe as t };