@pdf-viewer/react 1.7.1-rc.0 → 1.7.1-rc.2
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.
- package/dist/{RPDefaultLayout-f9f79b4d.js → RPDefaultLayout-83caa88c.js} +325 -325
- package/dist/assets/Button.css +1 -1
- package/dist/assets/PasswordModal.css +1 -1
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/assets/RPTooltip.css +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/Button.js +6 -6
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/PasswordModal.js +21 -21
- package/dist/components/ui/RPTooltip.js +35 -35
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/main.js +15 -14
- package/dist/types/main.d.ts +1 -1
- package/dist/types/utils/types.d.ts +5 -1
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLoadPdf.js +13 -15
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/dist/utils/types.js +4 -4
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as i, Fragment as fe, jsxs as F } from "react/jsx-runtime";
|
|
2
2
|
import * as B from "react";
|
|
3
|
-
import { useRef as H, useEffect as
|
|
3
|
+
import { useRef as H, useEffect as W, useCallback as N, useState as $, useMemo as k, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as qe, PureComponent as Qn, Component as er, memo as ln } from "react";
|
|
4
4
|
import { ChevronUpIcon as He } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as re } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as dn } from "./components/ui/Input.js";
|
|
7
|
-
import { ViewMode as
|
|
7
|
+
import { ViewMode as xe, ScrollMode as J, AnnotationSubType as zt, SelectionMode as tr, ZoomLevel as at } from "./utils/types.js";
|
|
8
8
|
import { useScrollModeContext as Re } from "./contexts/ScrollModeContext.js";
|
|
9
9
|
import { useDocumentContext as Q } from "./contexts/RPDocumentContext.js";
|
|
10
10
|
import { useDocumentPasswordContext as nr } from "./contexts/DocumentPasswordContext.js";
|
|
@@ -45,20 +45,20 @@ import { RPDropFileZone as Cr } from "./components/RPDropFileZone.js";
|
|
|
45
45
|
import { useViewportContext as Ce, ViewportProvider as Pr } from "./contexts/ViewportContext.js";
|
|
46
46
|
import { useThemeContext as Tr } from "./contexts/ThemeContext.js";
|
|
47
47
|
import * as Sr from "pdfjs-dist";
|
|
48
|
-
import { PixelsPerInch as yr, AnnotationMode as
|
|
48
|
+
import { PixelsPerInch as yr, AnnotationMode as Ir, RenderingCancelledException as xr, AnnotationLayer as Lr } from "pdfjs-dist";
|
|
49
49
|
import { SimpleLinkService as Rr } from "./utils/link_service.js";
|
|
50
|
-
import { annotationsEvents as Er, annotationEventsHandler as Nr, handleClick as
|
|
51
|
-
import { normalizeSingleKeyword as
|
|
52
|
-
import { _ as
|
|
50
|
+
import { annotationsEvents as Er, annotationEventsHandler as Nr, handleClick as At, handleAnnotationWidget as Or, handleAnnotationLink as Dr, bindLayerEvents as zr, unbindLayerEvents as Ft } from "./utils/annotations.js";
|
|
51
|
+
import { normalizeSingleKeyword as Ar, sortHighlightPosition as Fr, unwrap as Wr } from "./components/page/searchHighlight.js";
|
|
52
|
+
import { _ as kr, U as Mr } from "./Popover-b7402893.js";
|
|
53
53
|
import { useMousePressed as Hr } from "./utils/hooks/useMousePressed.js";
|
|
54
54
|
import { useGrabScroll as $r } from "./utils/hooks/useGrabScroll.js";
|
|
55
55
|
import { usePinch as Gr } from "./utils/hooks/usePinch.js";
|
|
56
56
|
import { useDebounce as Pt } from "./utils/hooks/useDebounce.js";
|
|
57
57
|
import Ur from "./components/ui/PasswordModal.js";
|
|
58
58
|
import { getPositionFromPage as Vr, getPageFromPosition as qr } from "./utils/calculatePage.js";
|
|
59
|
-
import { getScrollDistance as
|
|
59
|
+
import { getScrollDistance as Ae } from "./utils/getScrollDistance.js";
|
|
60
60
|
import { getWordPositionInPage as Br } from "./utils/getWordPositionInPage.js";
|
|
61
|
-
import { getThumbnailViewport as
|
|
61
|
+
import { getThumbnailViewport as Wt } from "./utils/getThumbnailViewport.js";
|
|
62
62
|
import { smoothScrollTo as st } from "./utils/smoothScrollTo.js";
|
|
63
63
|
import { appConsole as Zr } from "./utils/appConsole.js";
|
|
64
64
|
import { FileUploadTool as mn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
@@ -70,7 +70,7 @@ import { D as eo, u as ct } from "./index-aa2d3884.js";
|
|
|
70
70
|
import { a as to, u as no, F as ro, b as oo, G as Ke } from "./index-7279fb4e.js";
|
|
71
71
|
import { h as io } from "./component-1da194e8.js";
|
|
72
72
|
import { CloseIcon as ao } from "./components/icons/CloseIcon.js";
|
|
73
|
-
import { dateFormatter as
|
|
73
|
+
import { dateFormatter as kt } from "./utils/dateFormatter.js";
|
|
74
74
|
import { PropertyItem as so } from "./components/layout/toolbar/PropertyItem.js";
|
|
75
75
|
import { useOtherToolContext as co, OtherToolProvider as lo } from "./contexts/OtherToolContext.js";
|
|
76
76
|
import { DocumentProperties as uo } from "./components/layout/toolbar/DocumentProperties.js";
|
|
@@ -95,9 +95,9 @@ import { ClearIcon as Po } from "./components/icons/ClearIcon.js";
|
|
|
95
95
|
import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
|
|
96
96
|
import './assets/RPDefaultLayout.css';const wn = () => {
|
|
97
97
|
const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: d, heights: p } = Ue(), f = H(e), _ = H(t), h = H(c), { targetScrollPage: v } = pn();
|
|
98
|
-
|
|
98
|
+
W(() => {
|
|
99
99
|
n != null && n.scrollToItem && (l.current = n);
|
|
100
|
-
}, [n]),
|
|
100
|
+
}, [n]), W(() => {
|
|
101
101
|
f.current = e, _.current = t;
|
|
102
102
|
}, [e, t]);
|
|
103
103
|
const w = N(
|
|
@@ -125,16 +125,16 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
125
125
|
},
|
|
126
126
|
[r, d, st]
|
|
127
127
|
);
|
|
128
|
-
return
|
|
128
|
+
return W(() => {
|
|
129
129
|
f.current = e, _.current = t;
|
|
130
|
-
}, [e, t]),
|
|
130
|
+
}, [e, t]), W(() => {
|
|
131
131
|
h.current = c;
|
|
132
132
|
}, [c]), { scrollToPage: N(
|
|
133
133
|
(P, S = "smooth") => {
|
|
134
134
|
a(P);
|
|
135
135
|
const u = P - 1;
|
|
136
136
|
let m = u, g = 0;
|
|
137
|
-
if (_.current ===
|
|
137
|
+
if (_.current === xe.DUAL_PAGE && f.current === J.PAGE_SCROLLING) {
|
|
138
138
|
w(P, S);
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
@@ -148,7 +148,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
148
148
|
if (v.current = P, f.current === J.HORIZONTAL_SCROLLING) {
|
|
149
149
|
g = u;
|
|
150
150
|
const y = {
|
|
151
|
-
left:
|
|
151
|
+
left: Ae(d, g),
|
|
152
152
|
top: 0
|
|
153
153
|
};
|
|
154
154
|
return s.scrollTo({
|
|
@@ -156,11 +156,11 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
156
156
|
behavior: S
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
if (_.current ===
|
|
159
|
+
if (_.current === xe.DUAL_PAGE) {
|
|
160
160
|
g = u % 2, m = Math.floor(u / 2);
|
|
161
161
|
const y = {
|
|
162
|
-
left:
|
|
163
|
-
top:
|
|
162
|
+
left: Ae(d, g),
|
|
163
|
+
top: Ae(p, m)
|
|
164
164
|
};
|
|
165
165
|
return s.scrollTo({
|
|
166
166
|
...y,
|
|
@@ -169,7 +169,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
169
169
|
}
|
|
170
170
|
const C = {
|
|
171
171
|
left: 0,
|
|
172
|
-
top:
|
|
172
|
+
top: Ae(p, m)
|
|
173
173
|
};
|
|
174
174
|
return s.scrollTo({
|
|
175
175
|
...C,
|
|
@@ -206,11 +206,11 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
206
206
|
if (!f || g)
|
|
207
207
|
return !1;
|
|
208
208
|
const s = g ? p[m] : p[m - 1], C = g ? p[m + 1] : p[m];
|
|
209
|
-
return c ===
|
|
209
|
+
return c === xe.DUAL_PAGE && s + C < f.clientWidth;
|
|
210
210
|
}, [c, p, f, o]), P = N(() => {
|
|
211
211
|
let m = e - 1;
|
|
212
212
|
T(m) && (m = e - 2), w(m);
|
|
213
|
-
}, [w, e, c, d, T]), S =
|
|
213
|
+
}, [w, e, c, d, T]), S = k(() => c === xe.DUAL_PAGE && d === J.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, d]), u = N(() => {
|
|
214
214
|
if (S)
|
|
215
215
|
return;
|
|
216
216
|
let m = e + 1;
|
|
@@ -242,7 +242,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
242
242
|
return typeof (t == null ? void 0 : t.focusedPage) > "u" && Zr.error("Please use this hooks inside children component of RPProvider"), t;
|
|
243
243
|
}, Ms = ({ children: t }) => {
|
|
244
244
|
const { pdf: e } = Q(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: c, prevPage: d } = To();
|
|
245
|
-
return
|
|
245
|
+
return W(() => {
|
|
246
246
|
e != null && e.numPages && (a(e.numPages), r(1));
|
|
247
247
|
}, [e, a, r]), /* @__PURE__ */ i(
|
|
248
248
|
_n.Provider,
|
|
@@ -266,7 +266,7 @@ const So = () => {
|
|
|
266
266
|
totalPages: 0,
|
|
267
267
|
percentage: 0
|
|
268
268
|
}), [r, a] = $(!1), [l, c] = $(!1), [d, p] = $(null), f = H(!1);
|
|
269
|
-
|
|
269
|
+
W(() => {
|
|
270
270
|
f.current;
|
|
271
271
|
}, [f]);
|
|
272
272
|
const _ = N(() => {
|
|
@@ -294,11 +294,11 @@ const So = () => {
|
|
|
294
294
|
h();
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
|
-
const
|
|
298
|
-
m.width = Math.floor(C.width *
|
|
297
|
+
const I = b / yr.PDF;
|
|
298
|
+
m.width = Math.floor(C.width * I), m.height = Math.floor(C.height * I);
|
|
299
299
|
const L = m.getContext("2d");
|
|
300
300
|
L.save(), L.fillStyle = "rgb(255, 255, 255)", L.fillRect(0, 0, m.width, m.height), L.restore();
|
|
301
|
-
const [D,
|
|
301
|
+
const [D, z] = await Promise.all([
|
|
302
302
|
g.getPage(s),
|
|
303
303
|
E
|
|
304
304
|
]);
|
|
@@ -306,19 +306,19 @@ const So = () => {
|
|
|
306
306
|
h();
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
309
|
-
const
|
|
309
|
+
const A = {
|
|
310
310
|
canvasContext: L,
|
|
311
|
-
transform: [
|
|
311
|
+
transform: [I, 0, 0, I, 0, 0],
|
|
312
312
|
viewport: D.getViewport({ scale: 1, rotation: C.rotation }),
|
|
313
313
|
intent: "print",
|
|
314
|
-
annotationMode:
|
|
314
|
+
annotationMode: Ir.ENABLE_STORAGE,
|
|
315
315
|
optionalContentConfigPromise: y,
|
|
316
|
-
printAnnotationStorage:
|
|
316
|
+
printAnnotationStorage: z
|
|
317
317
|
};
|
|
318
318
|
try {
|
|
319
|
-
return D.render(
|
|
319
|
+
return D.render(A).promise;
|
|
320
320
|
} catch (R) {
|
|
321
|
-
throw R instanceof
|
|
321
|
+
throw R instanceof xr || console.error(R), R;
|
|
322
322
|
}
|
|
323
323
|
}, T = N(() => {
|
|
324
324
|
const m = window.print;
|
|
@@ -366,7 +366,7 @@ const So = () => {
|
|
|
366
366
|
const C = t.getOptionalContentConfig({ intent: "print" }), b = Promise.resolve(
|
|
367
367
|
t.annotationStorage.print ?? void 0
|
|
368
368
|
), y = e.size;
|
|
369
|
-
for (const [
|
|
369
|
+
for (const [I, L] of e) {
|
|
370
370
|
if (f.current) {
|
|
371
371
|
h();
|
|
372
372
|
return;
|
|
@@ -375,7 +375,7 @@ const So = () => {
|
|
|
375
375
|
if (await w({
|
|
376
376
|
scratchCanvas: m,
|
|
377
377
|
pdfDocument: t,
|
|
378
|
-
pageNumber:
|
|
378
|
+
pageNumber: I,
|
|
379
379
|
viewerPdfPage: D,
|
|
380
380
|
printResolution: 150,
|
|
381
381
|
optionalContentConfigPromise: C,
|
|
@@ -384,13 +384,13 @@ const So = () => {
|
|
|
384
384
|
h();
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
387
|
-
const
|
|
388
|
-
g.push(
|
|
389
|
-
const
|
|
387
|
+
const z = await P(m);
|
|
388
|
+
g.push(z);
|
|
389
|
+
const A = parseFloat((g.length / y * 100).toFixed(2));
|
|
390
390
|
o({
|
|
391
|
-
loadedPages:
|
|
391
|
+
loadedPages: I,
|
|
392
392
|
totalPages: y,
|
|
393
|
-
percentage:
|
|
393
|
+
percentage: A
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
if (f.current) {
|
|
@@ -405,7 +405,7 @@ const So = () => {
|
|
|
405
405
|
m.height = 0, m.width = 0;
|
|
406
406
|
}
|
|
407
407
|
}, [t, e, f]);
|
|
408
|
-
return
|
|
408
|
+
return W(() => {
|
|
409
409
|
const m = () => {
|
|
410
410
|
h(), _();
|
|
411
411
|
};
|
|
@@ -448,13 +448,13 @@ const So = () => {
|
|
|
448
448
|
},
|
|
449
449
|
[c, e]
|
|
450
450
|
);
|
|
451
|
-
|
|
451
|
+
W(() => {
|
|
452
452
|
d && o && w();
|
|
453
|
-
}, [d, o]),
|
|
453
|
+
}, [d, o]), W(() => {
|
|
454
454
|
p && h((P) => {
|
|
455
455
|
console.error(P);
|
|
456
456
|
});
|
|
457
|
-
}, [p]),
|
|
457
|
+
}, [p]), W(() => {
|
|
458
458
|
c && e && e(c);
|
|
459
459
|
}, [c, e]);
|
|
460
460
|
const w = () => {
|
|
@@ -474,12 +474,12 @@ const So = () => {
|
|
|
474
474
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
475
475
|
return t;
|
|
476
476
|
}, yo = () => {
|
|
477
|
-
const [t, e] = $({}), { pages: n } = Q(), { rotate: o } = Ge(), r =
|
|
477
|
+
const [t, e] = $({}), { pages: n } = Q(), { rotate: o } = Ge(), r = k(() => Object.keys(t).length, [t]), a = N(
|
|
478
478
|
(c) => {
|
|
479
479
|
if (!n.size)
|
|
480
480
|
return;
|
|
481
481
|
const d = c > n.size ? n.size : c, p = Array.from(n.values()).slice(0, d).map((h) => {
|
|
482
|
-
const { thumbnailViewport: v, scale: w } =
|
|
482
|
+
const { thumbnailViewport: v, scale: w } = Wt(h.page, o);
|
|
483
483
|
return {
|
|
484
484
|
scale: w,
|
|
485
485
|
page: h.page,
|
|
@@ -514,7 +514,7 @@ const So = () => {
|
|
|
514
514
|
},
|
|
515
515
|
[n, o]
|
|
516
516
|
);
|
|
517
|
-
|
|
517
|
+
W(() => {
|
|
518
518
|
a(10);
|
|
519
519
|
}, [a]);
|
|
520
520
|
const l = N(
|
|
@@ -535,7 +535,7 @@ const So = () => {
|
|
|
535
535
|
}));
|
|
536
536
|
const p = document.createElement("canvas");
|
|
537
537
|
vt(d.page, p, { scale: d.thumbnailScale, rotate: o }).promise.then(() => {
|
|
538
|
-
const f = p.toDataURL(), { thumbnailViewport: _, scale: h } =
|
|
538
|
+
const f = p.toDataURL(), { thumbnailViewport: _, scale: h } = Wt(d.page, o);
|
|
539
539
|
return {
|
|
540
540
|
scale: h,
|
|
541
541
|
thumbnailSrc: f,
|
|
@@ -572,33 +572,33 @@ const So = () => {
|
|
|
572
572
|
children: t
|
|
573
573
|
}
|
|
574
574
|
);
|
|
575
|
-
},
|
|
576
|
-
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: p } = Ue(), f = H(!n), { currentZoom: _ } = Qe(), [h, v] = $([]), { setFocusedPage: w } = ie(), { columnCount: T } = Ee(), { rotate: P } = Ge(), [S, u] = $(0), { pageScrollElementRef: m, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Re(), { pagesRef: C } = ge(), [b, y] = $(null), E = H({}),
|
|
577
|
-
|
|
578
|
-
if (!
|
|
575
|
+
}, Io = (t = {}, e = "") => {
|
|
576
|
+
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: p } = Ue(), f = H(!n), { currentZoom: _ } = Qe(), [h, v] = $([]), { setFocusedPage: w } = ie(), { columnCount: T } = Ee(), { rotate: P } = Ge(), [S, u] = $(0), { pageScrollElementRef: m, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Re(), { pagesRef: C } = ge(), [b, y] = $(null), E = H({}), I = k(() => S === 0 ? null : h[S - 1], [S, h]), L = k(() => h.length, [h]);
|
|
577
|
+
W(() => {
|
|
578
|
+
if (!I || !c)
|
|
579
579
|
return;
|
|
580
580
|
const R = g || m;
|
|
581
581
|
if (!R || !C)
|
|
582
582
|
return;
|
|
583
|
-
const
|
|
584
|
-
if (s === J.PAGE_SCROLLING && w(
|
|
583
|
+
const x = c.get(I.page);
|
|
584
|
+
if (s === J.PAGE_SCROLLING && w(I.page), !x)
|
|
585
585
|
return;
|
|
586
586
|
let O = 0, M = 0;
|
|
587
587
|
if (s === J.VERTICAL_SCROLLING) {
|
|
588
|
-
const ae =
|
|
589
|
-
O =
|
|
588
|
+
const ae = I.page - 1, de = T, te = ae % de, Fe = Math.floor(ae / de);
|
|
589
|
+
O = Ae(p, Fe), M = Ae(d, te);
|
|
590
590
|
}
|
|
591
|
-
s === J.HORIZONTAL_SCROLLING && (M = d.slice(0,
|
|
591
|
+
s === J.HORIZONTAL_SCROLLING && (M = d.slice(0, I.page - 1).reduce((ae, de) => ae + de, 0));
|
|
592
592
|
const G = {
|
|
593
593
|
top: C.clientHeight / 2,
|
|
594
594
|
left: C.clientWidth / 2
|
|
595
595
|
}, Z = {
|
|
596
|
-
height: p[
|
|
597
|
-
width: d[
|
|
596
|
+
height: p[I.page - 1],
|
|
597
|
+
width: d[I.page - 1]
|
|
598
598
|
}, { leftInPage: j, topInPage: q } = Br(
|
|
599
599
|
Z,
|
|
600
600
|
G,
|
|
601
|
-
|
|
601
|
+
I.rect,
|
|
602
602
|
_,
|
|
603
603
|
P
|
|
604
604
|
), ee = M + j, X = O + q, le = {
|
|
@@ -613,7 +613,7 @@ const So = () => {
|
|
|
613
613
|
w,
|
|
614
614
|
d,
|
|
615
615
|
p,
|
|
616
|
-
|
|
616
|
+
I,
|
|
617
617
|
s,
|
|
618
618
|
g,
|
|
619
619
|
m,
|
|
@@ -621,13 +621,13 @@ const So = () => {
|
|
|
621
621
|
]);
|
|
622
622
|
const D = N(() => {
|
|
623
623
|
u((R) => L ? R + 1 > L ? 1 : R + 1 : 0);
|
|
624
|
-
}, [L]),
|
|
624
|
+
}, [L]), z = N(() => {
|
|
625
625
|
u((R) => L ? R - 1 <= 0 ? L : R - 1 : 0);
|
|
626
|
-
}, [L]),
|
|
626
|
+
}, [L]), A = N(async (R) => {
|
|
627
627
|
if (!R)
|
|
628
628
|
return {};
|
|
629
|
-
const
|
|
630
|
-
for (let M = 1; M <=
|
|
629
|
+
const x = R.numPages, O = {};
|
|
630
|
+
for (let M = 1; M <= x; M++) {
|
|
631
631
|
if (f.current)
|
|
632
632
|
throw "close pop over";
|
|
633
633
|
const G = await R.getPage(M);
|
|
@@ -635,12 +635,12 @@ const So = () => {
|
|
|
635
635
|
}
|
|
636
636
|
return O;
|
|
637
637
|
}, []);
|
|
638
|
-
return
|
|
638
|
+
return W(() => {
|
|
639
639
|
if (!n) {
|
|
640
640
|
f.current = !0, v([]), u(0);
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
|
-
f.current = !1, a(!0), v([]), u(0),
|
|
643
|
+
f.current = !1, a(!0), v([]), u(0), A(l).then((R) => {
|
|
644
644
|
E.current = R;
|
|
645
645
|
const O = Object.keys(R).reduce((M, G) => {
|
|
646
646
|
const Z = cr(
|
|
@@ -655,16 +655,16 @@ const So = () => {
|
|
|
655
655
|
}).catch(() => {
|
|
656
656
|
v([]), u(0);
|
|
657
657
|
}).finally(() => a(!1));
|
|
658
|
-
}, [n,
|
|
658
|
+
}, [n, A, l, t]), {
|
|
659
659
|
search: n,
|
|
660
660
|
setSearch: o,
|
|
661
661
|
loading: r,
|
|
662
662
|
matches: h,
|
|
663
663
|
totalMatches: L,
|
|
664
664
|
currentMatchPosition: S,
|
|
665
|
-
currentMatch:
|
|
665
|
+
currentMatch: I,
|
|
666
666
|
nextMatch: D,
|
|
667
|
-
prevMatch:
|
|
667
|
+
prevMatch: z,
|
|
668
668
|
currentMatchElement: b,
|
|
669
669
|
setCurrentMatchElement: y
|
|
670
670
|
};
|
|
@@ -702,7 +702,7 @@ const So = () => {
|
|
|
702
702
|
prevMatch: h,
|
|
703
703
|
currentMatchElement: v,
|
|
704
704
|
setCurrentMatchElement: w
|
|
705
|
-
} =
|
|
705
|
+
} = Io(n, e);
|
|
706
706
|
return /* @__PURE__ */ i(
|
|
707
707
|
Tn.Provider,
|
|
708
708
|
{
|
|
@@ -724,7 +724,7 @@ const So = () => {
|
|
|
724
724
|
children: t
|
|
725
725
|
}
|
|
726
726
|
);
|
|
727
|
-
},
|
|
727
|
+
}, It = () => Je(Tn), ue = {
|
|
728
728
|
"rp-pages": "_rp-pages_1776r_1",
|
|
729
729
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
|
|
730
730
|
"rp-pages-container": "_rp-pages-container_1776r_11",
|
|
@@ -737,9 +737,9 @@ const So = () => {
|
|
|
737
737
|
"rp-page-wrapper": "_rp-page-wrapper_14ohm_1",
|
|
738
738
|
"rp-page": "_rp-page_14ohm_1",
|
|
739
739
|
"rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
|
|
740
|
-
},
|
|
740
|
+
}, xo = (t) => {
|
|
741
741
|
const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = H(null), { pages: a } = Q(), { rotate: l } = Ge(), c = H(), { currentZoom: d } = Qe();
|
|
742
|
-
return
|
|
742
|
+
return W(() => {
|
|
743
743
|
if (!a || d === 0)
|
|
744
744
|
return;
|
|
745
745
|
const p = a.get(e);
|
|
@@ -769,9 +769,9 @@ const So = () => {
|
|
|
769
769
|
endOfContent: Ro,
|
|
770
770
|
"rp-text-layer-text": "_rp-text-layer-text_1x8te_38"
|
|
771
771
|
}, Eo = (t) => {
|
|
772
|
-
const { pageNumber: e } = t, { pages: n } = Q(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } =
|
|
772
|
+
const { pageNumber: e } = t, { pages: n } = Q(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = It(), [c, d] = $(
|
|
773
773
|
[]
|
|
774
|
-
), p = H(), f = H(), _ = H([]), h =
|
|
774
|
+
), p = H(), f = H(), _ = H([]), h = k(() => r.filter((m) => m.pageIndex === e - 1), [r, e]), v = N(
|
|
775
775
|
(m, g, s = !1) => {
|
|
776
776
|
if (s && lr(m, g), !h.length) {
|
|
777
777
|
_.current = [], d([]);
|
|
@@ -782,7 +782,7 @@ const So = () => {
|
|
|
782
782
|
},
|
|
783
783
|
[h]
|
|
784
784
|
), w = H(), T = H(!1), P = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
785
|
-
|
|
785
|
+
W(() => ((() => {
|
|
786
786
|
if (w.current)
|
|
787
787
|
return;
|
|
788
788
|
w.current = new AbortController();
|
|
@@ -821,7 +821,7 @@ const So = () => {
|
|
|
821
821
|
document.addEventListener(
|
|
822
822
|
"selectionchange",
|
|
823
823
|
() => {
|
|
824
|
-
var
|
|
824
|
+
var A, R;
|
|
825
825
|
const b = document.getSelection();
|
|
826
826
|
if (!b)
|
|
827
827
|
return;
|
|
@@ -830,27 +830,27 @@ const So = () => {
|
|
|
830
830
|
return;
|
|
831
831
|
}
|
|
832
832
|
const y = /* @__PURE__ */ new Set();
|
|
833
|
-
for (let
|
|
834
|
-
const O = b.getRangeAt(
|
|
833
|
+
for (let x = 0; x < b.rangeCount; x++) {
|
|
834
|
+
const O = b.getRangeAt(x);
|
|
835
835
|
P().forEach((M) => {
|
|
836
836
|
O.intersectsNode(M) && !y.has(M) && y.add(M);
|
|
837
837
|
});
|
|
838
838
|
}
|
|
839
|
-
P().forEach((
|
|
840
|
-
if (y.has(
|
|
841
|
-
|
|
839
|
+
P().forEach((x) => {
|
|
840
|
+
if (y.has(x))
|
|
841
|
+
x.classList.add(he.selecting);
|
|
842
842
|
else {
|
|
843
|
-
const O =
|
|
844
|
-
O && (
|
|
843
|
+
const O = x.querySelector(".endOfContent");
|
|
844
|
+
O && (x.appendChild(O), O.style.width = "", O.style.height = "", x.classList.remove(he.selecting));
|
|
845
845
|
}
|
|
846
846
|
});
|
|
847
847
|
const E = b.getRangeAt(0);
|
|
848
848
|
let L = C && (E.compareBoundaryPoints(Range.END_TO_END, C) === 0 || E.compareBoundaryPoints(Range.START_TO_END, C) === 0) ? E.startContainer : E.endContainer;
|
|
849
849
|
L.nodeType === Node.TEXT_NODE && (L = L.parentNode);
|
|
850
|
-
const D = (
|
|
850
|
+
const D = (A = L.parentElement) == null ? void 0 : A.closest(
|
|
851
851
|
he["rp-text-layer"]
|
|
852
|
-
),
|
|
853
|
-
|
|
852
|
+
), z = D == null ? void 0 : D.querySelector(".endOfContent");
|
|
853
|
+
z && D && (z.style.width = D.style.width, z.style.height = D.style.height, (R = L.parentElement) == null || R.insertBefore(z, L.nextSibling)), C = E.cloneRange();
|
|
854
854
|
},
|
|
855
855
|
{ signal: g }
|
|
856
856
|
);
|
|
@@ -863,7 +863,7 @@ const So = () => {
|
|
|
863
863
|
}, []), u = N(() => {
|
|
864
864
|
o.current && o.current.classList.remove(he.selecting);
|
|
865
865
|
}, []);
|
|
866
|
-
return
|
|
866
|
+
return W(() => {
|
|
867
867
|
if (_.current.forEach((s) => {
|
|
868
868
|
s.classList.remove("selected");
|
|
869
869
|
}), !c.length || !a || a.pageIndex !== e - 1)
|
|
@@ -877,7 +877,7 @@ const So = () => {
|
|
|
877
877
|
g.length && (_.current = g.map((s) => s.element), l(g[0].element), g.forEach((s) => {
|
|
878
878
|
s.element.classList.add("selected");
|
|
879
879
|
}));
|
|
880
|
-
}, [a, c, h]),
|
|
880
|
+
}, [a, c, h]), W(() => {
|
|
881
881
|
const m = n.get(e);
|
|
882
882
|
if (!m || !o.current)
|
|
883
883
|
return;
|
|
@@ -891,8 +891,8 @@ const So = () => {
|
|
|
891
891
|
}), f.current = s, g && (g.innerText = ""), p.current.render();
|
|
892
892
|
}).then(() => {
|
|
893
893
|
var y, E;
|
|
894
|
-
[].slice.call(g.children).forEach((
|
|
895
|
-
|
|
894
|
+
[].slice.call(g.children).forEach((I) => {
|
|
895
|
+
I.classList.add(he["rp-text-layer-text"]), I.setAttribute("data-rp", "rp-text-layer-text");
|
|
896
896
|
});
|
|
897
897
|
const C = (y = p.current) == null ? void 0 : y.textDivs;
|
|
898
898
|
C && f.current && v(f.current, C);
|
|
@@ -903,7 +903,7 @@ const So = () => {
|
|
|
903
903
|
var s;
|
|
904
904
|
(s = p.current) == null || s.cancel();
|
|
905
905
|
};
|
|
906
|
-
}, [n, e]),
|
|
906
|
+
}, [n, e]), W(() => {
|
|
907
907
|
var s;
|
|
908
908
|
[].slice.call(o.current.children).forEach((C) => {
|
|
909
909
|
C.classList.add(he["rp-text-layer-text"]);
|
|
@@ -925,10 +925,10 @@ const So = () => {
|
|
|
925
925
|
};
|
|
926
926
|
let Oo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
927
927
|
const Do = (t) => {
|
|
928
|
-
const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage: p } = ie(), { scrollMode: f } = Re(), { print: _ } = tt(), { download: h } = $n(), v =
|
|
929
|
-
|
|
928
|
+
const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage: p } = ie(), { scrollMode: f } = Re(), { print: _ } = tt(), { download: h } = $n(), v = k(() => o.get(e), [o, e]), w = k(() => v == null ? void 0 : v.page.getViewport(), [v]);
|
|
929
|
+
W(() => {
|
|
930
930
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
931
|
-
}, [r]),
|
|
931
|
+
}, [r]), W(() => {
|
|
932
932
|
v && v.page.getAnnotations().then((P) => {
|
|
933
933
|
a.current = void 0, c(P), n.current && (n.current.innerText = "");
|
|
934
934
|
});
|
|
@@ -938,11 +938,11 @@ const Do = (t) => {
|
|
|
938
938
|
!l || !r || (Er(P), Nr(P, r, l).then((S) => {
|
|
939
939
|
var u, m;
|
|
940
940
|
((u = S == null ? void 0 : S.data) == null ? void 0 : u.action) === "Print" ? _() : ((m = S == null ? void 0 : S.data) == null ? void 0 : m.action) === "SaveAs" && h();
|
|
941
|
-
}), f === J.PAGE_SCROLLING ?
|
|
941
|
+
}), f === J.PAGE_SCROLLING ? At(P, l, r, (S) => d(S.pageIndex + 1)) : At(P, l, r, (S) => p(S.pageIndex + 1)));
|
|
942
942
|
},
|
|
943
943
|
[r, l, p, d, f, _, h]
|
|
944
944
|
);
|
|
945
|
-
return
|
|
945
|
+
return W(() => {
|
|
946
946
|
if (!v || !l)
|
|
947
947
|
return;
|
|
948
948
|
const P = v.page.getViewport();
|
|
@@ -956,10 +956,10 @@ const Do = (t) => {
|
|
|
956
956
|
for (const g of l) {
|
|
957
957
|
const { annotationType: s } = g;
|
|
958
958
|
switch (s) {
|
|
959
|
-
case
|
|
959
|
+
case zt.Link:
|
|
960
960
|
Dr(g);
|
|
961
961
|
break;
|
|
962
|
-
case
|
|
962
|
+
case zt.Widget:
|
|
963
963
|
Or(g, P, S);
|
|
964
964
|
break;
|
|
965
965
|
}
|
|
@@ -994,7 +994,7 @@ const Do = (t) => {
|
|
|
994
994
|
enableScripting: !1
|
|
995
995
|
});
|
|
996
996
|
})().then(() => {
|
|
997
|
-
n.current &&
|
|
997
|
+
n.current && zr(n.current, T);
|
|
998
998
|
}).catch((g) => {
|
|
999
999
|
if (g !== "abort")
|
|
1000
1000
|
throw g;
|
|
@@ -1010,13 +1010,13 @@ const Do = (t) => {
|
|
|
1010
1010
|
ref: n
|
|
1011
1011
|
}
|
|
1012
1012
|
);
|
|
1013
|
-
},
|
|
1013
|
+
}, zo = {
|
|
1014
1014
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1015
|
-
},
|
|
1015
|
+
}, Ao = ({ pageNumber: t, viewport: e }) => {
|
|
1016
1016
|
const [n, o] = $(), { pages: r } = Q(), { highlightKeywords: a } = pr(), l = !0, c = H(null), [d, p] = $(null), [f, _] = $([]);
|
|
1017
|
-
|
|
1017
|
+
W(() => {
|
|
1018
1018
|
c.current && p(c.current.parentElement);
|
|
1019
|
-
}, [c]),
|
|
1019
|
+
}, [c]), W(() => {
|
|
1020
1020
|
(async () => {
|
|
1021
1021
|
const m = r.get(t);
|
|
1022
1022
|
if (!m || !c.current)
|
|
@@ -1025,10 +1025,10 @@ const Do = (t) => {
|
|
|
1025
1025
|
o(g);
|
|
1026
1026
|
})();
|
|
1027
1027
|
}, [r, t]);
|
|
1028
|
-
const h =
|
|
1028
|
+
const h = k(() => a ? a.map((u) => {
|
|
1029
1029
|
var m, g;
|
|
1030
1030
|
return {
|
|
1031
|
-
...
|
|
1031
|
+
...Ar(u.keyword, (m = u.options) == null ? void 0 : m.matchCase, (g = u.options) == null ? void 0 : g.wholeWords),
|
|
1032
1032
|
color: u.highlightColor
|
|
1033
1033
|
};
|
|
1034
1034
|
}) : [], [a]);
|
|
@@ -1043,8 +1043,8 @@ const Do = (t) => {
|
|
|
1043
1043
|
return;
|
|
1044
1044
|
}
|
|
1045
1045
|
new MutationObserver((y, E) => {
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1046
|
+
const I = u.querySelector(g);
|
|
1047
|
+
I && (s(I), E.disconnect());
|
|
1048
1048
|
}).observe(u, { childList: !0, subtree: !0 });
|
|
1049
1049
|
});
|
|
1050
1050
|
}
|
|
@@ -1070,20 +1070,20 @@ const Do = (t) => {
|
|
|
1070
1070
|
const C = document.createRange(), b = g.firstChild;
|
|
1071
1071
|
if (!b || b.nodeType !== Node.TEXT_NODE)
|
|
1072
1072
|
return null;
|
|
1073
|
-
const y = ((Z = b.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan,
|
|
1074
|
-
if (E > y ||
|
|
1073
|
+
const y = ((Z = b.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, I = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
|
|
1074
|
+
if (E > y || I + 1 > y)
|
|
1075
1075
|
return null;
|
|
1076
|
-
C.setStart(b, E), C.setEnd(b,
|
|
1076
|
+
C.setStart(b, E), C.setEnd(b, I + 1);
|
|
1077
1077
|
const L = document.createElement("span");
|
|
1078
1078
|
L.style.width = "auto", C.surroundContents(L);
|
|
1079
|
-
const D = L.getBoundingClientRect(),
|
|
1080
|
-
return
|
|
1079
|
+
const D = L.getBoundingClientRect(), z = u.getBoundingClientRect(), A = z.height, R = z.width, x = 100 * (D.left - z.left) / R, O = 100 * (D.top - z.top) / A, M = 100 * D.height / A, G = 100 * D.width / R;
|
|
1080
|
+
return Wr(L), {
|
|
1081
1081
|
keywordStr: m,
|
|
1082
|
-
left:
|
|
1082
|
+
left: x,
|
|
1083
1083
|
top: O,
|
|
1084
1084
|
height: M,
|
|
1085
1085
|
width: G,
|
|
1086
|
-
pageHeight:
|
|
1086
|
+
pageHeight: A,
|
|
1087
1087
|
pageWidth: R
|
|
1088
1088
|
};
|
|
1089
1089
|
};
|
|
@@ -1094,11 +1094,11 @@ const Do = (t) => {
|
|
|
1094
1094
|
const s = await w(g);
|
|
1095
1095
|
if (s.length) {
|
|
1096
1096
|
const C = s.map((y) => y.tagName === "BR" ? " " : y.textContent).reduce(
|
|
1097
|
-
(y, E,
|
|
1097
|
+
(y, E, I) => y.concat(
|
|
1098
1098
|
E.split("").map((L, D) => ({
|
|
1099
1099
|
char: L,
|
|
1100
1100
|
charIdxInSpan: D,
|
|
1101
|
-
spanIdx:
|
|
1101
|
+
spanIdx: I
|
|
1102
1102
|
}))
|
|
1103
1103
|
),
|
|
1104
1104
|
[
|
|
@@ -1118,22 +1118,22 @@ const Do = (t) => {
|
|
|
1118
1118
|
return [];
|
|
1119
1119
|
const b = [], y = s.map((E) => E.char).join("");
|
|
1120
1120
|
return h.forEach((E) => {
|
|
1121
|
-
const { keyword:
|
|
1122
|
-
if (!
|
|
1121
|
+
const { keyword: I, regExp: L, wholeWords: D, color: z } = E, A = I;
|
|
1122
|
+
if (!A.trim())
|
|
1123
1123
|
return;
|
|
1124
1124
|
const R = L.flags.indexOf("g") === -1 ? new RegExp(L, `${L.flags}g`) : L;
|
|
1125
|
-
let
|
|
1125
|
+
let x;
|
|
1126
1126
|
const O = [];
|
|
1127
|
-
for (; (
|
|
1128
|
-
D && !ur(y,
|
|
1127
|
+
for (; (x = R.exec(y)) !== null; )
|
|
1128
|
+
D && !ur(y, x.index, x[0].length) || O.push({
|
|
1129
1129
|
keyword: R,
|
|
1130
|
-
startIndex:
|
|
1130
|
+
startIndex: x.index,
|
|
1131
1131
|
endIndex: R.lastIndex
|
|
1132
1132
|
});
|
|
1133
1133
|
const M = O.map((G) => ({
|
|
1134
1134
|
keyword: G.keyword,
|
|
1135
1135
|
indexes: s.slice(G.startIndex, G.endIndex),
|
|
1136
|
-
color:
|
|
1136
|
+
color: z
|
|
1137
1137
|
}));
|
|
1138
1138
|
for (const G of M) {
|
|
1139
1139
|
const Z = G.indexes.reduce(
|
|
@@ -1144,7 +1144,7 @@ const Do = (t) => {
|
|
|
1144
1144
|
if (j.length !== 1 || j[0].char.trim() !== "") {
|
|
1145
1145
|
const q = j, ee = g[q[0].spanIdx], X = T(
|
|
1146
1146
|
u,
|
|
1147
|
-
|
|
1147
|
+
A,
|
|
1148
1148
|
ee,
|
|
1149
1149
|
q
|
|
1150
1150
|
);
|
|
@@ -1158,7 +1158,7 @@ const Do = (t) => {
|
|
|
1158
1158
|
}
|
|
1159
1159
|
}), b.sort(Fr), b;
|
|
1160
1160
|
};
|
|
1161
|
-
return
|
|
1161
|
+
return W(() => {
|
|
1162
1162
|
(async () => {
|
|
1163
1163
|
if (!(!a || a.length === 0))
|
|
1164
1164
|
try {
|
|
@@ -1170,7 +1170,7 @@ const Do = (t) => {
|
|
|
1170
1170
|
}, [l, a, t, n, e]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: f.map((u, m) => /* @__PURE__ */ i(
|
|
1171
1171
|
"div",
|
|
1172
1172
|
{
|
|
1173
|
-
className:
|
|
1173
|
+
className: zo["rp-text-highlight"],
|
|
1174
1174
|
style: {
|
|
1175
1175
|
top: `${u.top}%`,
|
|
1176
1176
|
left: `${u.left}%`,
|
|
@@ -1181,18 +1181,18 @@ const Do = (t) => {
|
|
|
1181
1181
|
},
|
|
1182
1182
|
m
|
|
1183
1183
|
)) }) });
|
|
1184
|
-
},
|
|
1184
|
+
}, xt = $e((t, e) => {
|
|
1185
1185
|
const { pageNumber: n, style: o, ...r } = t, { pages: a } = Q(), { rotate: l } = Ge(), { textLayer: c } = or(), { currentZoom: d } = Qe(), p = H(a.get(n)), [f, _] = $(!1), h = H(null), [v, w] = $({
|
|
1186
1186
|
width: 0,
|
|
1187
1187
|
height: 0
|
|
1188
1188
|
});
|
|
1189
|
-
cn(e, () => h.current),
|
|
1189
|
+
cn(e, () => h.current), W(() => {
|
|
1190
1190
|
if (a && (p.current = a.get(n), p.current)) {
|
|
1191
1191
|
const u = p.current.page.getViewport({ scale: d, rotation: l });
|
|
1192
1192
|
w(u);
|
|
1193
1193
|
}
|
|
1194
1194
|
}, [a, n, l, d]);
|
|
1195
|
-
const T =
|
|
1195
|
+
const T = k(() => {
|
|
1196
1196
|
switch (l) {
|
|
1197
1197
|
case 90:
|
|
1198
1198
|
return `${v.width / 2}px ${v.width / 2}px`;
|
|
@@ -1230,10 +1230,10 @@ const Do = (t) => {
|
|
|
1230
1230
|
},
|
|
1231
1231
|
className: lt["rp-page"],
|
|
1232
1232
|
children: [
|
|
1233
|
-
/* @__PURE__ */ i(
|
|
1233
|
+
/* @__PURE__ */ i(xo, { onLoading: P, onLoaded: S, pageNumber: n }),
|
|
1234
1234
|
f && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
|
|
1235
1235
|
c && /* @__PURE__ */ i(Eo, { pageNumber: n }),
|
|
1236
|
-
/* @__PURE__ */ i(
|
|
1236
|
+
/* @__PURE__ */ i(Ao, { pageNumber: n, viewport: v }),
|
|
1237
1237
|
/* @__PURE__ */ i(Do, { pageNumber: n })
|
|
1238
1238
|
]
|
|
1239
1239
|
}
|
|
@@ -1257,19 +1257,19 @@ function Fo(t, e) {
|
|
|
1257
1257
|
var Vt = Number.isNaN || function(e) {
|
|
1258
1258
|
return typeof e == "number" && e !== e;
|
|
1259
1259
|
};
|
|
1260
|
-
function
|
|
1260
|
+
function Wo(t, e) {
|
|
1261
1261
|
return !!(t === e || Vt(t) && Vt(e));
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function ko(t, e) {
|
|
1264
1264
|
if (t.length !== e.length)
|
|
1265
1265
|
return !1;
|
|
1266
1266
|
for (var n = 0; n < t.length; n++)
|
|
1267
|
-
if (!
|
|
1267
|
+
if (!Wo(t[n], e[n]))
|
|
1268
1268
|
return !1;
|
|
1269
1269
|
return !0;
|
|
1270
1270
|
}
|
|
1271
1271
|
function dt(t, e) {
|
|
1272
|
-
e === void 0 && (e =
|
|
1272
|
+
e === void 0 && (e = ko);
|
|
1273
1273
|
var n, o = [], r, a = !1;
|
|
1274
1274
|
function l() {
|
|
1275
1275
|
for (var c = [], d = 0; d < arguments.length; d++)
|
|
@@ -1347,66 +1347,66 @@ function Vo(t) {
|
|
|
1347
1347
|
scrollTop: typeof s.props.initialScrollTop == "number" ? s.props.initialScrollTop : 0,
|
|
1348
1348
|
scrollUpdateWasRequested: !1,
|
|
1349
1349
|
verticalScrollDirection: "forward"
|
|
1350
|
-
}, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(C, b, y, E,
|
|
1350
|
+
}, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(C, b, y, E, I, L, D, z) {
|
|
1351
1351
|
return s.props.onItemsRendered({
|
|
1352
1352
|
overscanColumnStartIndex: C,
|
|
1353
1353
|
overscanColumnStopIndex: b,
|
|
1354
1354
|
overscanRowStartIndex: y,
|
|
1355
1355
|
overscanRowStopIndex: E,
|
|
1356
|
-
visibleColumnStartIndex:
|
|
1356
|
+
visibleColumnStartIndex: I,
|
|
1357
1357
|
visibleColumnStopIndex: L,
|
|
1358
1358
|
visibleRowStartIndex: D,
|
|
1359
|
-
visibleRowStopIndex:
|
|
1359
|
+
visibleRowStopIndex: z
|
|
1360
1360
|
});
|
|
1361
|
-
}), s._callOnScroll = void 0, s._callOnScroll = dt(function(C, b, y, E,
|
|
1361
|
+
}), s._callOnScroll = void 0, s._callOnScroll = dt(function(C, b, y, E, I) {
|
|
1362
1362
|
return s.props.onScroll({
|
|
1363
1363
|
horizontalScrollDirection: y,
|
|
1364
1364
|
scrollLeft: C,
|
|
1365
1365
|
scrollTop: b,
|
|
1366
1366
|
verticalScrollDirection: E,
|
|
1367
|
-
scrollUpdateWasRequested:
|
|
1367
|
+
scrollUpdateWasRequested: I
|
|
1368
1368
|
});
|
|
1369
1369
|
}), s._getItemStyle = void 0, s._getItemStyle = function(C, b) {
|
|
1370
|
-
var y = s.props, E = y.columnWidth,
|
|
1371
|
-
if (D.hasOwnProperty(
|
|
1372
|
-
|
|
1370
|
+
var y = s.props, E = y.columnWidth, I = y.direction, L = y.rowHeight, D = s._getItemStyleCache(T && E, T && I, T && L), z = C + ":" + b, A;
|
|
1371
|
+
if (D.hasOwnProperty(z))
|
|
1372
|
+
A = D[z];
|
|
1373
1373
|
else {
|
|
1374
|
-
var R = n(s.props, b, s._instanceProps),
|
|
1375
|
-
D[
|
|
1374
|
+
var R = n(s.props, b, s._instanceProps), x = I === "rtl";
|
|
1375
|
+
D[z] = A = {
|
|
1376
1376
|
position: "absolute",
|
|
1377
|
-
left:
|
|
1378
|
-
right:
|
|
1377
|
+
left: x ? void 0 : R,
|
|
1378
|
+
right: x ? R : void 0,
|
|
1379
1379
|
top: _(s.props, C, s._instanceProps),
|
|
1380
1380
|
height: f(s.props, C, s._instanceProps),
|
|
1381
1381
|
width: a(s.props, b, s._instanceProps)
|
|
1382
1382
|
};
|
|
1383
1383
|
}
|
|
1384
|
-
return
|
|
1384
|
+
return A;
|
|
1385
1385
|
}, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(C, b, y) {
|
|
1386
1386
|
return {};
|
|
1387
1387
|
}), s._onScroll = function(C) {
|
|
1388
|
-
var b = C.currentTarget, y = b.clientHeight, E = b.clientWidth,
|
|
1389
|
-
s.setState(function(
|
|
1390
|
-
if (
|
|
1388
|
+
var b = C.currentTarget, y = b.clientHeight, E = b.clientWidth, I = b.scrollLeft, L = b.scrollTop, D = b.scrollHeight, z = b.scrollWidth;
|
|
1389
|
+
s.setState(function(A) {
|
|
1390
|
+
if (A.scrollLeft === I && A.scrollTop === L)
|
|
1391
1391
|
return null;
|
|
1392
|
-
var R = s.props.direction,
|
|
1392
|
+
var R = s.props.direction, x = I;
|
|
1393
1393
|
if (R === "rtl")
|
|
1394
1394
|
switch (jt()) {
|
|
1395
1395
|
case "negative":
|
|
1396
|
-
|
|
1396
|
+
x = -I;
|
|
1397
1397
|
break;
|
|
1398
1398
|
case "positive-descending":
|
|
1399
|
-
|
|
1399
|
+
x = z - E - I;
|
|
1400
1400
|
break;
|
|
1401
1401
|
}
|
|
1402
|
-
|
|
1402
|
+
x = Math.max(0, Math.min(x, z - E));
|
|
1403
1403
|
var O = Math.max(0, Math.min(L, D - y));
|
|
1404
1404
|
return {
|
|
1405
1405
|
isScrolling: !0,
|
|
1406
|
-
horizontalScrollDirection:
|
|
1407
|
-
scrollLeft:
|
|
1406
|
+
horizontalScrollDirection: A.scrollLeft < I ? "forward" : "backward",
|
|
1407
|
+
scrollLeft: x,
|
|
1408
1408
|
scrollTop: O,
|
|
1409
|
-
verticalScrollDirection:
|
|
1409
|
+
verticalScrollDirection: A.scrollTop < L ? "forward" : "backward",
|
|
1410
1410
|
scrollUpdateWasRequested: !1
|
|
1411
1411
|
};
|
|
1412
1412
|
}, s._resetIsScrollingDebounced);
|
|
@@ -1439,11 +1439,11 @@ function Vo(t) {
|
|
|
1439
1439
|
};
|
|
1440
1440
|
}, this._resetIsScrollingDebounced);
|
|
1441
1441
|
}, m.scrollToItem = function(s) {
|
|
1442
|
-
var C = s.align, b = C === void 0 ? "auto" : C, y = s.columnIndex, E = s.rowIndex,
|
|
1443
|
-
y !== void 0 && (y = Math.max(0, Math.min(y, L - 1))), E !== void 0 && (E = Math.max(0, Math.min(E,
|
|
1444
|
-
var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z >
|
|
1442
|
+
var C = s.align, b = C === void 0 ? "auto" : C, y = s.columnIndex, E = s.rowIndex, I = this.props, L = I.columnCount, D = I.height, z = I.rowCount, A = I.width, R = this.state, x = R.scrollLeft, O = R.scrollTop, M = $o();
|
|
1443
|
+
y !== void 0 && (y = Math.max(0, Math.min(y, L - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, z - 1)));
|
|
1444
|
+
var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > A ? M : 0, q = G > D ? M : 0;
|
|
1445
1445
|
this.scrollTo({
|
|
1446
|
-
scrollLeft: y !== void 0 ? d(this.props, y, b,
|
|
1446
|
+
scrollLeft: y !== void 0 ? d(this.props, y, b, x, this._instanceProps, q) : x,
|
|
1447
1447
|
scrollTop: E !== void 0 ? p(this.props, E, b, O, this._instanceProps, j) : O
|
|
1448
1448
|
});
|
|
1449
1449
|
}, m.componentDidMount = function() {
|
|
@@ -1456,39 +1456,39 @@ function Vo(t) {
|
|
|
1456
1456
|
}, m.componentDidUpdate = function() {
|
|
1457
1457
|
var s = this.props.direction, C = this.state, b = C.scrollLeft, y = C.scrollTop, E = C.scrollUpdateWasRequested;
|
|
1458
1458
|
if (E && this._outerRef != null) {
|
|
1459
|
-
var
|
|
1459
|
+
var I = this._outerRef;
|
|
1460
1460
|
if (s === "rtl")
|
|
1461
1461
|
switch (jt()) {
|
|
1462
1462
|
case "negative":
|
|
1463
|
-
|
|
1463
|
+
I.scrollLeft = -b;
|
|
1464
1464
|
break;
|
|
1465
1465
|
case "positive-ascending":
|
|
1466
|
-
|
|
1466
|
+
I.scrollLeft = b;
|
|
1467
1467
|
break;
|
|
1468
1468
|
default:
|
|
1469
|
-
var L =
|
|
1470
|
-
|
|
1469
|
+
var L = I.clientWidth, D = I.scrollWidth;
|
|
1470
|
+
I.scrollLeft = D - L - b;
|
|
1471
1471
|
break;
|
|
1472
1472
|
}
|
|
1473
1473
|
else
|
|
1474
|
-
|
|
1475
|
-
|
|
1474
|
+
I.scrollLeft = Math.max(0, b);
|
|
1475
|
+
I.scrollTop = Math.max(0, y);
|
|
1476
1476
|
}
|
|
1477
1477
|
this._callPropsCallbacks();
|
|
1478
1478
|
}, m.componentWillUnmount = function() {
|
|
1479
1479
|
this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
|
|
1480
1480
|
}, m.render = function() {
|
|
1481
|
-
var s = this.props, C = s.children, b = s.className, y = s.columnCount, E = s.direction,
|
|
1481
|
+
var s = this.props, C = s.children, b = s.className, y = s.columnCount, E = s.direction, I = s.height, L = s.innerRef, D = s.innerElementType, z = s.innerTagName, A = s.itemData, R = s.itemKey, x = R === void 0 ? Uo : R, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, q = s.width, ee = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Fe = de[1], Ne = [];
|
|
1482
1482
|
if (y > 0 && G)
|
|
1483
1483
|
for (var Pe = te; Pe <= Fe; Pe++)
|
|
1484
1484
|
for (var we = le; we <= ae; we++)
|
|
1485
1485
|
Ne.push(qe(C, {
|
|
1486
1486
|
columnIndex: we,
|
|
1487
|
-
data:
|
|
1487
|
+
data: A,
|
|
1488
1488
|
isScrolling: j ? ee : void 0,
|
|
1489
|
-
key:
|
|
1489
|
+
key: x({
|
|
1490
1490
|
columnIndex: we,
|
|
1491
|
-
data:
|
|
1491
|
+
data: A,
|
|
1492
1492
|
rowIndex: Pe
|
|
1493
1493
|
}),
|
|
1494
1494
|
rowIndex: Pe,
|
|
@@ -1499,16 +1499,16 @@ function Vo(t) {
|
|
|
1499
1499
|
className: b,
|
|
1500
1500
|
onScroll: this._onScroll,
|
|
1501
1501
|
ref: this._outerRefSetter,
|
|
1502
|
-
style:
|
|
1502
|
+
style: kr({
|
|
1503
1503
|
position: "relative",
|
|
1504
|
-
height:
|
|
1504
|
+
height: I,
|
|
1505
1505
|
width: q,
|
|
1506
1506
|
overflow: "auto",
|
|
1507
1507
|
WebkitOverflowScrolling: "touch",
|
|
1508
1508
|
willChange: "transform",
|
|
1509
1509
|
direction: E
|
|
1510
1510
|
}, Z)
|
|
1511
|
-
}, qe(D ||
|
|
1511
|
+
}, qe(D || z || "div", {
|
|
1512
1512
|
children: Ne,
|
|
1513
1513
|
ref: L,
|
|
1514
1514
|
style: {
|
|
@@ -1520,25 +1520,25 @@ function Vo(t) {
|
|
|
1520
1520
|
}, m._callPropsCallbacks = function() {
|
|
1521
1521
|
var s = this.props, C = s.columnCount, b = s.onItemsRendered, y = s.onScroll, E = s.rowCount;
|
|
1522
1522
|
if (typeof b == "function" && C > 0 && E > 0) {
|
|
1523
|
-
var
|
|
1524
|
-
this._callOnItemsRendered(L, D,
|
|
1523
|
+
var I = this._getHorizontalRangeToRender(), L = I[0], D = I[1], z = I[2], A = I[3], R = this._getVerticalRangeToRender(), x = R[0], O = R[1], M = R[2], G = R[3];
|
|
1524
|
+
this._callOnItemsRendered(L, D, x, O, z, A, M, G);
|
|
1525
1525
|
}
|
|
1526
1526
|
if (typeof y == "function") {
|
|
1527
1527
|
var Z = this.state, j = Z.horizontalScrollDirection, q = Z.scrollLeft, ee = Z.scrollTop, X = Z.scrollUpdateWasRequested, le = Z.verticalScrollDirection;
|
|
1528
1528
|
this._callOnScroll(q, ee, j, le, X);
|
|
1529
1529
|
}
|
|
1530
1530
|
}, m._getHorizontalRangeToRender = function() {
|
|
1531
|
-
var s = this.props, C = s.columnCount, b = s.overscanColumnCount, y = s.overscanColumnsCount, E = s.overscanCount,
|
|
1532
|
-
if (C === 0 ||
|
|
1531
|
+
var s = this.props, C = s.columnCount, b = s.overscanColumnCount, y = s.overscanColumnsCount, E = s.overscanCount, I = s.rowCount, L = this.state, D = L.horizontalScrollDirection, z = L.isScrolling, A = L.scrollLeft, R = b || y || E || 1;
|
|
1532
|
+
if (C === 0 || I === 0)
|
|
1533
1533
|
return [0, 0, 0, 0];
|
|
1534
|
-
var
|
|
1535
|
-
return [Math.max(0,
|
|
1534
|
+
var x = o(this.props, A, this._instanceProps), O = r(this.props, x, A, this._instanceProps), M = !z || D === "backward" ? Math.max(1, R) : 1, G = !z || D === "forward" ? Math.max(1, R) : 1;
|
|
1535
|
+
return [Math.max(0, x - M), Math.max(0, Math.min(C - 1, O + G)), x, O];
|
|
1536
1536
|
}, m._getVerticalRangeToRender = function() {
|
|
1537
|
-
var s = this.props, C = s.columnCount, b = s.overscanCount, y = s.overscanRowCount, E = s.overscanRowsCount,
|
|
1538
|
-
if (C === 0 ||
|
|
1537
|
+
var s = this.props, C = s.columnCount, b = s.overscanCount, y = s.overscanRowCount, E = s.overscanRowsCount, I = s.rowCount, L = this.state, D = L.isScrolling, z = L.verticalScrollDirection, A = L.scrollTop, R = y || E || b || 1;
|
|
1538
|
+
if (C === 0 || I === 0)
|
|
1539
1539
|
return [0, 0, 0, 0];
|
|
1540
|
-
var
|
|
1541
|
-
return [Math.max(0,
|
|
1540
|
+
var x = h(this.props, A, this._instanceProps), O = v(this.props, x, A, this._instanceProps), M = !D || z === "backward" ? Math.max(1, R) : 1, G = !D || z === "forward" ? Math.max(1, R) : 1;
|
|
1541
|
+
return [Math.max(0, x - M), Math.max(0, Math.min(I - 1, O + G)), x, O];
|
|
1542
1542
|
}, u;
|
|
1543
1543
|
}(Qn), e.defaultProps = {
|
|
1544
1544
|
direction: "ltr",
|
|
@@ -1601,8 +1601,8 @@ var qo = function(e, n) {
|
|
|
1601
1601
|
var a, l;
|
|
1602
1602
|
e === "column" ? (a = o.columnMetadataMap, l = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, l = o.lastMeasuredRowIndex);
|
|
1603
1603
|
var c = l > 0 ? a[l].offset : 0;
|
|
1604
|
-
return c >= r ?
|
|
1605
|
-
},
|
|
1604
|
+
return c >= r ? In(e, n, o, l, 0, r) : Bo(e, n, o, Math.max(0, l), r);
|
|
1605
|
+
}, In = function(e, n, o, r, a, l) {
|
|
1606
1606
|
for (; a <= r; ) {
|
|
1607
1607
|
var c = a + Math.floor((r - a) / 2), d = me(e, n, c, o).offset;
|
|
1608
1608
|
if (d === l)
|
|
@@ -1613,7 +1613,7 @@ var qo = function(e, n) {
|
|
|
1613
1613
|
}, Bo = function(e, n, o, r, a) {
|
|
1614
1614
|
for (var l = e === "column" ? n.columnCount : n.rowCount, c = 1; r < l && me(e, n, r, o).offset < a; )
|
|
1615
1615
|
r += c, c *= 2;
|
|
1616
|
-
return
|
|
1616
|
+
return In(e, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
|
|
1617
1617
|
}, Yt = function(e, n, o, r, a, l, c) {
|
|
1618
1618
|
var d = e === "column" ? n.width : n.height, p = me(e, n, o, l), f = e === "column" ? yn(n, l) : Sn(n, l), _ = Math.max(0, Math.min(f - d, p.offset)), h = Math.max(0, p.offset - d + c + p.size);
|
|
1619
1619
|
switch (r === "smart" && (a >= h - d && a <= _ + d ? r = "auto" : r = "center"), r) {
|
|
@@ -1715,7 +1715,7 @@ function Xo(t, e) {
|
|
|
1715
1715
|
return !Jt(n, r) && !Jt(o, a);
|
|
1716
1716
|
}
|
|
1717
1717
|
const Yo = () => {
|
|
1718
|
-
const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ue(), a =
|
|
1718
|
+
const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ue(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === J.HORIZONTAL_SCROLLING ? a : t === xe.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((w, T, P) => {
|
|
1719
1719
|
const S = P % l;
|
|
1720
1720
|
return (!w[S] || T > w[S]) && (w[S] = T), w;
|
|
1721
1721
|
}, []), [r.widths, l]), d = N(
|
|
@@ -1728,10 +1728,10 @@ const Yo = () => {
|
|
|
1728
1728
|
(v) => r.heights[v] || 0,
|
|
1729
1729
|
[r.heights]
|
|
1730
1730
|
);
|
|
1731
|
-
|
|
1731
|
+
W(() => {
|
|
1732
1732
|
n(l);
|
|
1733
1733
|
}, [l, n]);
|
|
1734
|
-
const f =
|
|
1734
|
+
const f = k(() => e === J.HORIZONTAL_SCROLLING || e === J.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), _ = k(() => r.heights.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]), h = k(() => r.widths.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]);
|
|
1735
1735
|
return {
|
|
1736
1736
|
rowCount: f,
|
|
1737
1737
|
rowHeight: p,
|
|
@@ -1910,14 +1910,14 @@ class Qo extends er {
|
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
1912
|
const ei = ln(({ widths: t, heights: e }) => {
|
|
1913
|
-
const { focusedPage: n, totalPages: o } = ie(), r =
|
|
1913
|
+
const { focusedPage: n, totalPages: o } = ie(), r = k(() => {
|
|
1914
1914
|
const c = [], d = Math.ceil(n / 2) * 2 - 1;
|
|
1915
1915
|
if (c.push(d), d + 1 <= o) {
|
|
1916
1916
|
const p = d + 1;
|
|
1917
1917
|
c.push(p);
|
|
1918
1918
|
}
|
|
1919
1919
|
return c;
|
|
1920
|
-
}, [n, o]), a =
|
|
1920
|
+
}, [n, o]), a = k(() => {
|
|
1921
1921
|
const c = n % 2 === 1 ? n - 1 : n - 2, d = t(c), p = e(c), f = t(c + 1), _ = e(c + 1), h = p > _ ? p : _, v = p < _ ? p : _, w = h / 2 - v / 2;
|
|
1922
1922
|
return [
|
|
1923
1923
|
{
|
|
@@ -1935,14 +1935,14 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
1935
1935
|
height: _
|
|
1936
1936
|
}
|
|
1937
1937
|
];
|
|
1938
|
-
}, [t, e, r]), l =
|
|
1939
|
-
return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, d) => /* @__PURE__ */ i(
|
|
1938
|
+
}, [t, e, r]), l = k(() => a.reduce((c, d) => c + Number(d.width || 0), 0), [a]);
|
|
1939
|
+
return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, d) => /* @__PURE__ */ i(xt, { style: a[d], pageNumber: c }, c)) });
|
|
1940
1940
|
}), ti = ({ widths: t, heights: e }) => {
|
|
1941
|
-
const { focusedPage: n } = ie(), o =
|
|
1941
|
+
const { focusedPage: n } = ie(), o = k(() => ({
|
|
1942
1942
|
position: "absolute",
|
|
1943
1943
|
width: t(n - 1),
|
|
1944
1944
|
height: e(n - 1)
|
|
1945
|
-
}), [t, e, n]), r =
|
|
1945
|
+
}), [t, e, n]), r = k(() => t(n - 1), [t]);
|
|
1946
1946
|
return /* @__PURE__ */ i(
|
|
1947
1947
|
"div",
|
|
1948
1948
|
{
|
|
@@ -1950,11 +1950,11 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
1950
1950
|
width: r,
|
|
1951
1951
|
position: "relative"
|
|
1952
1952
|
},
|
|
1953
|
-
children: /* @__PURE__ */ i(
|
|
1953
|
+
children: /* @__PURE__ */ i(xt, { style: o, pageNumber: n }, n)
|
|
1954
1954
|
}
|
|
1955
1955
|
);
|
|
1956
1956
|
}, ni = (t, e, n) => {
|
|
1957
|
-
const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = Ue(), { setFocusedPage: c } = ie(), [d, p] = $([]), { targetScrollPage: f } = pn(), _ = Pt(d, 0, 500), h =
|
|
1957
|
+
const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = Ue(), { setFocusedPage: c } = ie(), [d, p] = $([]), { targetScrollPage: f } = pn(), _ = Pt(d, 0, 500), h = k(() => a.map((w, T) => {
|
|
1958
1958
|
const P = l[T], S = Vr(T + 1, t), u = P * S.columnIndex, m = w * S.rowIndex, g = u + P, s = m + w;
|
|
1959
1959
|
return {
|
|
1960
1960
|
pageNumber: T + 1,
|
|
@@ -1967,7 +1967,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
1967
1967
|
endY: s
|
|
1968
1968
|
};
|
|
1969
1969
|
}), [a, l, t, e]);
|
|
1970
|
-
|
|
1970
|
+
W(() => {
|
|
1971
1971
|
var T;
|
|
1972
1972
|
_.length > 0 && !f.current && c(_[0].pageNumber);
|
|
1973
1973
|
let w = (T = _[0]) == null ? void 0 : T.ratio;
|
|
@@ -1987,10 +1987,10 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
1987
1987
|
const m = u.endX >= P.startLeft && u.endY >= P.startTop, g = u.startX <= P.endLeft && u.startY <= P.endTop;
|
|
1988
1988
|
return m && g;
|
|
1989
1989
|
}).map((u) => {
|
|
1990
|
-
const m = P.startLeft > u.startX ? P.startLeft : u.startX, g = P.startTop > u.startY ? P.startTop : u.startY, s = P.endLeft < u.endX ? P.endLeft : u.endX, C = P.endTop < u.endY ? P.endTop : u.endY, b = s - m, y = C - g,
|
|
1990
|
+
const m = P.startLeft > u.startX ? P.startLeft : u.startX, g = P.startTop > u.startY ? P.startTop : u.startY, s = P.endLeft < u.endX ? P.endLeft : u.endX, C = P.endTop < u.endY ? P.endTop : u.endY, b = s - m, y = C - g, I = +(b * y / (u.width * u.height) * 100).toFixed(2);
|
|
1991
1991
|
return {
|
|
1992
1992
|
pageNumber: u.pageNumber,
|
|
1993
|
-
ratio:
|
|
1993
|
+
ratio: I
|
|
1994
1994
|
};
|
|
1995
1995
|
}).sort((u, m) => m.ratio - u.ratio);
|
|
1996
1996
|
p(S);
|
|
@@ -1998,7 +1998,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
1998
1998
|
},
|
|
1999
1999
|
[r, h]
|
|
2000
2000
|
);
|
|
2001
|
-
|
|
2001
|
+
W(() => {
|
|
2002
2002
|
if (n)
|
|
2003
2003
|
return n == null || n.addEventListener("scroll", v), () => {
|
|
2004
2004
|
n == null || n.removeEventListener("scroll", v);
|
|
@@ -2006,7 +2006,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2006
2006
|
}, [n, v]);
|
|
2007
2007
|
}, ri = ln(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
|
|
2008
2008
|
const r = qr(e, t, n.columnCount);
|
|
2009
|
-
return /* @__PURE__ */ i(
|
|
2009
|
+
return /* @__PURE__ */ i(xt, { style: o, pageNumber: r }, r);
|
|
2010
2010
|
}, Xo), Us = () => {
|
|
2011
2011
|
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = ar(), { pagesRef: o, setPagesRef: r } = ge(), { scrollToPage: a } = wn(), {
|
|
2012
2012
|
virtualScrollRef: l,
|
|
@@ -2019,13 +2019,13 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2019
2019
|
pageScrollElementRef: v
|
|
2020
2020
|
} = et(), w = H(!0), { nextPage: T, prevPage: P, setFocusedPage: S, focusedPage: u } = ie(), { scrollMode: m } = Re(), { viewMode: g } = Ee(), s = H(null), { loading: C } = Q(), { passwordRequired: b } = nr(), { LoaderImageComponent: y } = hn(), E = H(
|
|
2021
2021
|
h
|
|
2022
|
-
),
|
|
2022
|
+
), I = H({
|
|
2023
2023
|
viewMode: g,
|
|
2024
2024
|
scrollMode: m
|
|
2025
|
-
}), L = H(!1), D = H(), { isFullScreen:
|
|
2026
|
-
pageDimension:
|
|
2025
|
+
}), L = H(!1), D = H(), { isFullScreen: z } = sr(), {
|
|
2026
|
+
pageDimension: A,
|
|
2027
2027
|
rowCount: R,
|
|
2028
|
-
rowHeight:
|
|
2028
|
+
rowHeight: x,
|
|
2029
2029
|
columnCount: O,
|
|
2030
2030
|
columnWidth: M,
|
|
2031
2031
|
estimatedColumnWidth: G,
|
|
@@ -2039,18 +2039,18 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2039
2039
|
Gr(o);
|
|
2040
2040
|
const { isPressed: X } = Hr(), { selectionMode: le } = ir(), { initializeGrabScroll: ae, resetGrabState: de } = $r({
|
|
2041
2041
|
isPressed: X
|
|
2042
|
-
}), te =
|
|
2042
|
+
}), te = k(() => le === tr.HAND, [le]), Fe = k(() => ({
|
|
2043
2043
|
columnCount: O
|
|
2044
2044
|
}), [O]), Ne = N(
|
|
2045
2045
|
(U) => {
|
|
2046
2046
|
const V = document.activeElement !== o;
|
|
2047
|
-
!
|
|
2047
|
+
!z && V || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), P()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(), T()));
|
|
2048
2048
|
},
|
|
2049
|
-
[T, P,
|
|
2049
|
+
[T, P, z, m]
|
|
2050
2050
|
);
|
|
2051
|
-
|
|
2051
|
+
W(() => (window.addEventListener("keydown", Ne), () => {
|
|
2052
2052
|
window.removeEventListener("keydown", Ne);
|
|
2053
|
-
}), [Ne]),
|
|
2053
|
+
}), [Ne]), W(() => {
|
|
2054
2054
|
if (s.current && (s.current.style.position = "relative"), !!l)
|
|
2055
2055
|
for (let U = 0; U < R; U++)
|
|
2056
2056
|
for (let V = 0; V < O; V++)
|
|
@@ -2059,7 +2059,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2059
2059
|
rowIndex: U,
|
|
2060
2060
|
shouldForceUpdate: !0
|
|
2061
2061
|
});
|
|
2062
|
-
}, [R, O,
|
|
2062
|
+
}, [R, O, A, l]);
|
|
2063
2063
|
const Pe = N(
|
|
2064
2064
|
(U, V) => {
|
|
2065
2065
|
if (!_)
|
|
@@ -2073,10 +2073,10 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2073
2073
|
[_]
|
|
2074
2074
|
), we = N(
|
|
2075
2075
|
(U, V) => {
|
|
2076
|
-
if (
|
|
2076
|
+
if (I.current.viewMode !== g || I.current.scrollMode !== m) {
|
|
2077
2077
|
q.current && clearTimeout(q.current), L.current = !0, a(u, "auto"), q.current = setTimeout(() => {
|
|
2078
2078
|
requestAnimationFrame(() => {
|
|
2079
|
-
|
|
2079
|
+
I.current = { viewMode: g, scrollMode: m };
|
|
2080
2080
|
});
|
|
2081
2081
|
}, 100);
|
|
2082
2082
|
return;
|
|
@@ -2103,10 +2103,10 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2103
2103
|
},
|
|
2104
2104
|
[l, g, m, a]
|
|
2105
2105
|
);
|
|
2106
|
-
|
|
2106
|
+
W(() => {
|
|
2107
2107
|
clearTimeout(D.current);
|
|
2108
2108
|
const U = Array.from({ length: R }).reduce(
|
|
2109
|
-
(Se, ot, ye) => Se +
|
|
2109
|
+
(Se, ot, ye) => Se + x(ye),
|
|
2110
2110
|
0
|
|
2111
2111
|
), V = Array.from({ length: O }).reduce(
|
|
2112
2112
|
(Se, ot, ye) => Se + M(ye),
|
|
@@ -2116,7 +2116,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2116
2116
|
height: U,
|
|
2117
2117
|
width: V
|
|
2118
2118
|
});
|
|
2119
|
-
}, [
|
|
2119
|
+
}, [A, R, O, we]);
|
|
2120
2120
|
const nt = N(
|
|
2121
2121
|
(U) => {
|
|
2122
2122
|
ee.current = {
|
|
@@ -2126,10 +2126,10 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2126
2126
|
},
|
|
2127
2127
|
[_]
|
|
2128
2128
|
);
|
|
2129
|
-
|
|
2129
|
+
W(() => () => {
|
|
2130
2130
|
q.current && clearTimeout(q.current);
|
|
2131
2131
|
}, []);
|
|
2132
|
-
const rt =
|
|
2132
|
+
const rt = k(() => ne(ue["rp-pages-container"], {
|
|
2133
2133
|
[ue["rp-cursor-grab"]]: te && !X,
|
|
2134
2134
|
[ue["rp-cursor-grabbing"]]: te && X
|
|
2135
2135
|
}), [te, X]), jn = N(
|
|
@@ -2141,9 +2141,9 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2141
2141
|
},
|
|
2142
2142
|
[te, ae, ue]
|
|
2143
2143
|
);
|
|
2144
|
-
return
|
|
2144
|
+
return W(() => {
|
|
2145
2145
|
C && de();
|
|
2146
|
-
}, [C]),
|
|
2146
|
+
}, [C]), W(() => {
|
|
2147
2147
|
if (!(j.height === 0 || !w.current)) {
|
|
2148
2148
|
if (e === J.PAGE_SCROLLING) {
|
|
2149
2149
|
t !== u && v && S(t), w.current = !1;
|
|
@@ -2164,7 +2164,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2164
2164
|
ref: d,
|
|
2165
2165
|
style: { width: U, height: V },
|
|
2166
2166
|
className: ne(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
|
|
2167
|
-
children: g ===
|
|
2167
|
+
children: g === xe.DUAL_PAGE ? /* @__PURE__ */ i(ei, { widths: M, heights: x }) : /* @__PURE__ */ i(ti, { widths: M, heights: x })
|
|
2168
2168
|
}
|
|
2169
2169
|
) : G ? /* @__PURE__ */ i(
|
|
2170
2170
|
Zo,
|
|
@@ -2176,7 +2176,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2176
2176
|
onScroll: nt,
|
|
2177
2177
|
columnCount: O,
|
|
2178
2178
|
columnWidth: M,
|
|
2179
|
-
rowHeight:
|
|
2179
|
+
rowHeight: x,
|
|
2180
2180
|
height: V,
|
|
2181
2181
|
width: U,
|
|
2182
2182
|
estimatedColumnWidth: G,
|
|
@@ -2204,7 +2204,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2204
2204
|
) }) }) }),
|
|
2205
2205
|
b && /* @__PURE__ */ i(Ur, {})
|
|
2206
2206
|
] });
|
|
2207
|
-
},
|
|
2207
|
+
}, We = {
|
|
2208
2208
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
2209
2209
|
"rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
|
|
2210
2210
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
@@ -2222,7 +2222,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2222
2222
|
return t || /* @__PURE__ */ i(He, { style: { transform: "rotate(180deg" } });
|
|
2223
2223
|
}, ai = () => {
|
|
2224
2224
|
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: p } = Ce(), { localeMessages: f } = se(), { viewMode: _ } = Ee(), { scrollMode: h } = Re();
|
|
2225
|
-
|
|
2225
|
+
W(() => {
|
|
2226
2226
|
c(t.toString());
|
|
2227
2227
|
}, [t]);
|
|
2228
2228
|
const v = N((u) => {
|
|
@@ -2238,7 +2238,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2238
2238
|
u.key === "Enter" && w();
|
|
2239
2239
|
},
|
|
2240
2240
|
[w]
|
|
2241
|
-
), S =
|
|
2241
|
+
), S = k(() => _ === xe.DUAL_PAGE && h === J.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, _, h]);
|
|
2242
2242
|
return typeof d != "boolean" ? /* @__PURE__ */ i(
|
|
2243
2243
|
d,
|
|
2244
2244
|
{
|
|
@@ -2284,7 +2284,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2284
2284
|
) })
|
|
2285
2285
|
] }) : null;
|
|
2286
2286
|
};
|
|
2287
|
-
var Lt = "Dialog", [
|
|
2287
|
+
var Lt = "Dialog", [xn, Vs] = Xr(Lt), [si, ce] = xn(Lt), Ln = (t) => {
|
|
2288
2288
|
const {
|
|
2289
2289
|
__scopeDialog: e,
|
|
2290
2290
|
children: n,
|
|
@@ -2334,7 +2334,7 @@ var Rn = "DialogTrigger", ci = B.forwardRef(
|
|
|
2334
2334
|
}
|
|
2335
2335
|
);
|
|
2336
2336
|
ci.displayName = Rn;
|
|
2337
|
-
var Rt = "DialogPortal", [li, En] =
|
|
2337
|
+
var Rt = "DialogPortal", [li, En] = xn(Rt, {
|
|
2338
2338
|
forceMount: void 0
|
|
2339
2339
|
}), Nn = (t) => {
|
|
2340
2340
|
const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = ce(Rt, e);
|
|
@@ -2380,7 +2380,7 @@ var ui = B.forwardRef(
|
|
|
2380
2380
|
if (a)
|
|
2381
2381
|
return io(a);
|
|
2382
2382
|
}, []), /* @__PURE__ */ i(
|
|
2383
|
-
|
|
2383
|
+
zn,
|
|
2384
2384
|
{
|
|
2385
2385
|
...t,
|
|
2386
2386
|
ref: r,
|
|
@@ -2405,7 +2405,7 @@ var ui = B.forwardRef(
|
|
|
2405
2405
|
(t, e) => {
|
|
2406
2406
|
const n = ce(Le, t.__scopeDialog), o = B.useRef(!1), r = B.useRef(!1);
|
|
2407
2407
|
return /* @__PURE__ */ i(
|
|
2408
|
-
|
|
2408
|
+
zn,
|
|
2409
2409
|
{
|
|
2410
2410
|
...t,
|
|
2411
2411
|
ref: e,
|
|
@@ -2424,7 +2424,7 @@ var ui = B.forwardRef(
|
|
|
2424
2424
|
}
|
|
2425
2425
|
);
|
|
2426
2426
|
}
|
|
2427
|
-
),
|
|
2427
|
+
), zn = B.forwardRef(
|
|
2428
2428
|
(t, e) => {
|
|
2429
2429
|
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = ce(Le, n), d = B.useRef(null), p = Tt(e, d);
|
|
2430
2430
|
return no(), /* @__PURE__ */ F(fe, { children: [
|
|
@@ -2457,13 +2457,13 @@ var ui = B.forwardRef(
|
|
|
2457
2457
|
] })
|
|
2458
2458
|
] });
|
|
2459
2459
|
}
|
|
2460
|
-
), Et = "DialogTitle",
|
|
2460
|
+
), Et = "DialogTitle", An = B.forwardRef(
|
|
2461
2461
|
(t, e) => {
|
|
2462
2462
|
const { __scopeDialog: n, ...o } = t, r = ce(Et, n);
|
|
2463
2463
|
return /* @__PURE__ */ i(Ve.h2, { id: r.titleId, ...o, ref: e });
|
|
2464
2464
|
}
|
|
2465
2465
|
);
|
|
2466
|
-
|
|
2466
|
+
An.displayName = Et;
|
|
2467
2467
|
var Fn = "DialogDescription", hi = B.forwardRef(
|
|
2468
2468
|
(t, e) => {
|
|
2469
2469
|
const { __scopeDialog: n, ...o } = t, r = ce(Fn, n);
|
|
@@ -2471,9 +2471,9 @@ var Fn = "DialogDescription", hi = B.forwardRef(
|
|
|
2471
2471
|
}
|
|
2472
2472
|
);
|
|
2473
2473
|
hi.displayName = Fn;
|
|
2474
|
-
var
|
|
2474
|
+
var Wn = "DialogClose", kn = B.forwardRef(
|
|
2475
2475
|
(t, e) => {
|
|
2476
|
-
const { __scopeDialog: n, ...o } = t, r = ce(
|
|
2476
|
+
const { __scopeDialog: n, ...o } = t, r = ce(Wn, n);
|
|
2477
2477
|
return /* @__PURE__ */ i(
|
|
2478
2478
|
Ve.button,
|
|
2479
2479
|
{
|
|
@@ -2485,7 +2485,7 @@ var kn = "DialogClose", Wn = B.forwardRef(
|
|
|
2485
2485
|
);
|
|
2486
2486
|
}
|
|
2487
2487
|
);
|
|
2488
|
-
|
|
2488
|
+
kn.displayName = Wn;
|
|
2489
2489
|
function Nt(t) {
|
|
2490
2490
|
return t ? "open" : "closed";
|
|
2491
2491
|
}
|
|
@@ -2509,8 +2509,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2509
2509
|
const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2510
2510
|
e && r && (document.getElementById(e) || console.warn(o));
|
|
2511
2511
|
}, [o, t, e]), null;
|
|
2512
|
-
}, vi = Ln, wi = Nn, _i = On, bi = Dn, Ci =
|
|
2513
|
-
const
|
|
2512
|
+
}, vi = Ln, wi = Nn, _i = On, bi = Dn, Ci = An, Pi = kn;
|
|
2513
|
+
const Ie = {
|
|
2514
2514
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2515
2515
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
2516
2516
|
"rp-document-dialog": "_rp-document-dialog_slqo7_13",
|
|
@@ -2519,7 +2519,7 @@ const xe = {
|
|
|
2519
2519
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2520
2520
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2521
2521
|
}, Ti = () => {
|
|
2522
|
-
const { pdfProperties: t } = Q(), { container: e } = ge(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = co(), { localeMessages: r } = se(), a =
|
|
2522
|
+
const { pdfProperties: t } = Q(), { container: e } = ge(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = co(), { localeMessages: r } = se(), a = k(() => {
|
|
2523
2523
|
if (!t)
|
|
2524
2524
|
return [];
|
|
2525
2525
|
const {
|
|
@@ -2547,11 +2547,11 @@ const xe = {
|
|
|
2547
2547
|
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
|
|
2548
2548
|
{
|
|
2549
2549
|
label: r == null ? void 0 : r.propertiesCreateOnLabel,
|
|
2550
|
-
value: _ ?
|
|
2550
|
+
value: _ ? kt(_) : ""
|
|
2551
2551
|
},
|
|
2552
2552
|
{
|
|
2553
2553
|
label: r == null ? void 0 : r.propertiesModifiedOnLabel,
|
|
2554
|
-
value: w ?
|
|
2554
|
+
value: w ? kt(w) : ""
|
|
2555
2555
|
},
|
|
2556
2556
|
{ separate: !0 },
|
|
2557
2557
|
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: T },
|
|
@@ -2559,17 +2559,17 @@ const xe = {
|
|
|
2559
2559
|
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: S }
|
|
2560
2560
|
];
|
|
2561
2561
|
}, [t, r]);
|
|
2562
|
-
return /* @__PURE__ */ i(vi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(wi, { container: e, children: /* @__PURE__ */ F("div", { className:
|
|
2563
|
-
/* @__PURE__ */ i(_i, { className:
|
|
2564
|
-
/* @__PURE__ */ F(bi, { className:
|
|
2565
|
-
/* @__PURE__ */ i(Ci, { className:
|
|
2566
|
-
/* @__PURE__ */ i("div", { className:
|
|
2567
|
-
/* @__PURE__ */ i(Pi, { asChild: !0, className:
|
|
2562
|
+
return /* @__PURE__ */ i(vi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(wi, { container: e, children: /* @__PURE__ */ F("div", { className: Ie["rp-dialog-wrapper"], children: [
|
|
2563
|
+
/* @__PURE__ */ i(_i, { className: Ie["rp-dialog-overlay"] }),
|
|
2564
|
+
/* @__PURE__ */ F(bi, { className: Ie["rp-document-dialog"], children: [
|
|
2565
|
+
/* @__PURE__ */ i(Ci, { className: Ie["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2566
|
+
/* @__PURE__ */ i("div", { className: Ie["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ i(so, { label: l.label, value: l.value }) }, c)) }),
|
|
2567
|
+
/* @__PURE__ */ i(Pi, { asChild: !0, className: Ie["rp-dialog-close"], children: /* @__PURE__ */ i(ao, {}) })
|
|
2568
2568
|
] })
|
|
2569
2569
|
] }) }) });
|
|
2570
2570
|
}, Si = {
|
|
2571
2571
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2572
|
-
}, nn = ".pdf", yi = (t) => URL.createObjectURL(t),
|
|
2572
|
+
}, nn = ".pdf", yi = (t) => URL.createObjectURL(t), Ii = async (t) => {
|
|
2573
2573
|
const n = await (await fetch(t)).blob();
|
|
2574
2574
|
return yi(n);
|
|
2575
2575
|
}, $n = () => {
|
|
@@ -2581,17 +2581,17 @@ const xe = {
|
|
|
2581
2581
|
if (!t || !e)
|
|
2582
2582
|
throw new Error("There is no PDF source to download");
|
|
2583
2583
|
const a = document.createElement("a");
|
|
2584
|
-
a.href = await
|
|
2584
|
+
a.href = await Ii(e), a.download = o(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2585
2585
|
}, [t, e]) };
|
|
2586
2586
|
}, Gn = () => {
|
|
2587
2587
|
const { downloadIcon: t } = pe();
|
|
2588
2588
|
return t || /* @__PURE__ */ i(fo, {});
|
|
2589
|
-
}, Un = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }),
|
|
2589
|
+
}, Un = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), xi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Un, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Gn, {}) }) }), Li = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ F(Un, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2590
2590
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Gn, {}) }),
|
|
2591
2591
|
e == null ? void 0 : e.downloadFileLabel
|
|
2592
2592
|
] }) }), Vn = () => {
|
|
2593
2593
|
const { download: t } = $n(), { downloadTool: e = !0 } = ve(), { isSmallScreen: n } = Ce(), { localeMessages: o } = se();
|
|
2594
|
-
return e ? n ? /* @__PURE__ */ i(Li, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(
|
|
2594
|
+
return e ? n ? /* @__PURE__ */ i(Li, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(xi, { download: t, localeMessages: o }) : null : null;
|
|
2595
2595
|
}, qn = () => {
|
|
2596
2596
|
const { printIcon: t } = pe();
|
|
2597
2597
|
return t || /* @__PURE__ */ i(go, {});
|
|
@@ -2619,8 +2619,8 @@ const xe = {
|
|
|
2619
2619
|
}, Di = () => {
|
|
2620
2620
|
const { goToLastPageIcon: t } = pe();
|
|
2621
2621
|
return t || /* @__PURE__ */ i(vn, {});
|
|
2622
|
-
}, rn = { width: "100%" },
|
|
2623
|
-
const { goToPage: t, totalPages: e, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a =
|
|
2622
|
+
}, rn = { width: "100%" }, zi = () => {
|
|
2623
|
+
const { goToPage: t, totalPages: e, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = k(() => n === 1, [n]), l = k(() => n === e, [n, e]), c = N(() => {
|
|
2624
2624
|
t(1);
|
|
2625
2625
|
}, [t]), d = N(() => {
|
|
2626
2626
|
t(e);
|
|
@@ -2636,7 +2636,7 @@ const xe = {
|
|
|
2636
2636
|
] }) }) }),
|
|
2637
2637
|
/* @__PURE__ */ i(yt, {})
|
|
2638
2638
|
] }) : null;
|
|
2639
|
-
},
|
|
2639
|
+
}, Ai = () => {
|
|
2640
2640
|
const { container: t } = ge(), { isSmallScreen: e } = Ce(), {
|
|
2641
2641
|
openFileTool: n,
|
|
2642
2642
|
downloadTool: o,
|
|
@@ -2648,7 +2648,7 @@ const xe = {
|
|
|
2648
2648
|
printTool: p,
|
|
2649
2649
|
fullscreenTool: f
|
|
2650
2650
|
} = ve(), { localeMessages: _ } = se();
|
|
2651
|
-
return
|
|
2651
|
+
return k(() => {
|
|
2652
2652
|
const v = d || l || c || a || r;
|
|
2653
2653
|
let w = !1;
|
|
2654
2654
|
return e && (w = !(!n && !o && !p && !f)), v || w;
|
|
@@ -2675,7 +2675,7 @@ const xe = {
|
|
|
2675
2675
|
/* @__PURE__ */ i(gn, {}),
|
|
2676
2676
|
/* @__PURE__ */ i(yt, {})
|
|
2677
2677
|
] }),
|
|
2678
|
-
/* @__PURE__ */ i(
|
|
2678
|
+
/* @__PURE__ */ i(zi, {}),
|
|
2679
2679
|
/* @__PURE__ */ i(po, {}),
|
|
2680
2680
|
/* @__PURE__ */ i(vo, {}),
|
|
2681
2681
|
/* @__PURE__ */ i(ho, {}),
|
|
@@ -2696,7 +2696,7 @@ const xe = {
|
|
|
2696
2696
|
/* @__PURE__ */ i(Zn, {}),
|
|
2697
2697
|
/* @__PURE__ */ i(gn, {})
|
|
2698
2698
|
] }),
|
|
2699
|
-
/* @__PURE__ */ i(
|
|
2699
|
+
/* @__PURE__ */ i(Ai, {})
|
|
2700
2700
|
] });
|
|
2701
2701
|
}, De = {
|
|
2702
2702
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
@@ -2704,7 +2704,7 @@ const xe = {
|
|
|
2704
2704
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2705
2705
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2706
2706
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2707
|
-
},
|
|
2707
|
+
}, Wi = 25, ft = 1e3, ki = [50, 75, 100, 125, 150, 200, 300, 400], Mi = () => {
|
|
2708
2708
|
const { zoomInIcon: t } = pe();
|
|
2709
2709
|
return t || /* @__PURE__ */ i(wo, {});
|
|
2710
2710
|
}, Hi = () => {
|
|
@@ -2721,7 +2721,7 @@ const xe = {
|
|
|
2721
2721
|
const m = Math.ceil(u / 25) * 25;
|
|
2722
2722
|
return Math.min(m - 25, ft);
|
|
2723
2723
|
});
|
|
2724
|
-
}, [e]), v =
|
|
2724
|
+
}, [e]), v = k(() => t === Wi, [t]), w = k(() => t === ft, [t]), T = k(() => {
|
|
2725
2725
|
var u;
|
|
2726
2726
|
return (u = c.get(a)) == null ? void 0 : u.page.getViewport({ scale: 1, rotation: l });
|
|
2727
2727
|
}, [c, a, l]), P = N(
|
|
@@ -2778,7 +2778,7 @@ const xe = {
|
|
|
2778
2778
|
/* @__PURE__ */ i(be, { onClick: () => S(at.PAGE_WIDTH), children: p == null ? void 0 : p.zoomPageWidth })
|
|
2779
2779
|
] }),
|
|
2780
2780
|
/* @__PURE__ */ i(yt, {}),
|
|
2781
|
-
/* @__PURE__ */ i(Ke, { children:
|
|
2781
|
+
/* @__PURE__ */ i(Ke, { children: ki.map((u) => /* @__PURE__ */ F(be, { onClick: () => S(u), children: [
|
|
2782
2782
|
u,
|
|
2783
2783
|
" %"
|
|
2784
2784
|
] }, u)) })
|
|
@@ -2800,7 +2800,7 @@ const xe = {
|
|
|
2800
2800
|
totalMatches: t,
|
|
2801
2801
|
nextMatch: e,
|
|
2802
2802
|
prevMatch: n
|
|
2803
|
-
} =
|
|
2803
|
+
} = It(), { localeMessages: o } = se();
|
|
2804
2804
|
return /* @__PURE__ */ F(fe, { children: [
|
|
2805
2805
|
/* @__PURE__ */ i(K, { content: o == null ? void 0 : o.searchPrevTooltip, className: Y["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(re, { onClick: n, "aria-label": o == null ? void 0 : o.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
2806
2806
|
He,
|
|
@@ -2832,45 +2832,45 @@ const xe = {
|
|
|
2832
2832
|
nextMatch: h,
|
|
2833
2833
|
prevMatch: v,
|
|
2834
2834
|
search: w
|
|
2835
|
-
} =
|
|
2835
|
+
} = It(), { searchTool: T = !0 } = ve(), [P, S] = $(w), { localeMessages: u } = se(), { isSmallScreen: m } = Ce(), g = N(() => {
|
|
2836
2836
|
n(!0);
|
|
2837
2837
|
}, []), s = N(() => {
|
|
2838
2838
|
p(""), S(""), n(!1);
|
|
2839
|
-
}, [p]), C = (
|
|
2840
|
-
const O =
|
|
2839
|
+
}, [p]), C = (x) => {
|
|
2840
|
+
const O = x.key === "Enter", M = x.key === " ";
|
|
2841
2841
|
(O || M) && s();
|
|
2842
2842
|
}, b = N(
|
|
2843
|
-
(
|
|
2844
|
-
|
|
2843
|
+
(x) => {
|
|
2844
|
+
x.key === "Escape" && e && s();
|
|
2845
2845
|
},
|
|
2846
2846
|
[e]
|
|
2847
2847
|
), y = N(
|
|
2848
|
-
(
|
|
2849
|
-
|
|
2848
|
+
(x) => {
|
|
2849
|
+
x.shiftKey && x.key === "Enter" ? v() : x.key === "Enter" && w !== P ? p(P) : x.key === "Enter" && h();
|
|
2850
2850
|
},
|
|
2851
2851
|
[P, v, h, p, w]
|
|
2852
2852
|
);
|
|
2853
|
-
|
|
2853
|
+
W(() => (window.addEventListener("keydown", b), () => {
|
|
2854
2854
|
window.removeEventListener("keydown", b);
|
|
2855
|
-
}), [b]),
|
|
2855
|
+
}), [b]), W(() => {
|
|
2856
2856
|
r && r.focus();
|
|
2857
2857
|
}, [r]);
|
|
2858
|
-
const E = N((
|
|
2859
|
-
S(
|
|
2860
|
-
}, []),
|
|
2858
|
+
const E = N((x) => {
|
|
2859
|
+
S(x.target.value);
|
|
2860
|
+
}, []), I = N(() => {
|
|
2861
2861
|
S(""), p("");
|
|
2862
|
-
}, [p]), L =
|
|
2863
|
-
(
|
|
2864
|
-
c((O) => ({ ...O, matchCase:
|
|
2862
|
+
}, [p]), L = k(() => `${_} / ${f}`, [_, f]), { wholeWords: D, matchCase: z } = k(() => l, [l]), A = N(
|
|
2863
|
+
(x) => {
|
|
2864
|
+
c((O) => ({ ...O, matchCase: x }));
|
|
2865
2865
|
},
|
|
2866
2866
|
[c]
|
|
2867
2867
|
), R = N(
|
|
2868
|
-
(
|
|
2869
|
-
c((O) => ({ ...O, wholeWords:
|
|
2868
|
+
(x) => {
|
|
2869
|
+
c((O) => ({ ...O, wholeWords: x }));
|
|
2870
2870
|
},
|
|
2871
2871
|
[c]
|
|
2872
2872
|
);
|
|
2873
|
-
return
|
|
2873
|
+
return W(() => {
|
|
2874
2874
|
s();
|
|
2875
2875
|
}, [o, s]), T ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
|
|
2876
2876
|
Mr,
|
|
@@ -2891,7 +2891,7 @@ const xe = {
|
|
|
2891
2891
|
placeholder: u == null ? void 0 : u.searchInputPlaceholder,
|
|
2892
2892
|
className: Y["rp-search-input"],
|
|
2893
2893
|
ref: a,
|
|
2894
|
-
children: !!P && /* @__PURE__ */ i("span", { className: Y["rp-search-tool-input-clear"], onClick:
|
|
2894
|
+
children: !!P && /* @__PURE__ */ i("span", { className: Y["rp-search-tool-input-clear"], onClick: I, children: /* @__PURE__ */ i(Po, {}) })
|
|
2895
2895
|
}
|
|
2896
2896
|
) }),
|
|
2897
2897
|
d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: Y["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: L }),
|
|
@@ -2899,7 +2899,7 @@ const xe = {
|
|
|
2899
2899
|
] }),
|
|
2900
2900
|
/* @__PURE__ */ F("div", { className: Y["rp-search-tool-input-checkboxes"], children: [
|
|
2901
2901
|
m && /* @__PURE__ */ i(on, {}),
|
|
2902
|
-
/* @__PURE__ */ i($t, { name: "matchCase", value:
|
|
2902
|
+
/* @__PURE__ */ i($t, { name: "matchCase", value: z, onChange: A, children: u == null ? void 0 : u.searchMatchCaseLabel }),
|
|
2903
2903
|
!m && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
|
|
2904
2904
|
/* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: R, children: u == null ? void 0 : u.searchWholeWordsLabel }),
|
|
2905
2905
|
!m && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
|
|
@@ -2912,40 +2912,40 @@ const xe = {
|
|
|
2912
2912
|
] })
|
|
2913
2913
|
}
|
|
2914
2914
|
) }) : null;
|
|
2915
|
-
}, Ui = "
|
|
2916
|
-
"rp-loading-overlay": "_rp-loading-
|
|
2917
|
-
"rp-loading-modal": "_rp-loading-
|
|
2918
|
-
"rp-loading-title": "_rp-loading-
|
|
2919
|
-
"rp-loading-progress-bar": "_rp-loading-progress-
|
|
2920
|
-
"rp-loading-progress": "_rp-loading-
|
|
2921
|
-
"rp-loading-cancel-button": "_rp-loading-cancel-
|
|
2915
|
+
}, Ui = "_loading_wazy2_1", ze = {
|
|
2916
|
+
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
|
|
2917
|
+
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
|
|
2918
|
+
"rp-loading-title": "_rp-loading-title_wazy2_27",
|
|
2919
|
+
"rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
|
|
2920
|
+
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
|
|
2921
|
+
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
|
|
2922
2922
|
loading: Ui
|
|
2923
2923
|
}, Vi = ({ percentage: t }) => {
|
|
2924
2924
|
const { cancel: e } = tt(), { localeMessages: n } = se();
|
|
2925
|
-
return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(
|
|
2926
|
-
/* @__PURE__ */ F("div", { className: ne(
|
|
2925
|
+
return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(ze["rp-loading-overlay"]), children: /* @__PURE__ */ F("div", { className: ne(ze["rp-loading-modal"]), children: [
|
|
2926
|
+
/* @__PURE__ */ F("div", { className: ne(ze["rp-loading-title"]), children: [
|
|
2927
2927
|
n == null ? void 0 : n.printLoadingMessage,
|
|
2928
2928
|
"..."
|
|
2929
2929
|
] }),
|
|
2930
|
-
/* @__PURE__ */ i("div", { className: ne(
|
|
2930
|
+
/* @__PURE__ */ i("div", { className: ne(ze["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
|
|
2931
2931
|
"div",
|
|
2932
2932
|
{
|
|
2933
|
-
className: ne(
|
|
2933
|
+
className: ne(ze["rp-loading-progress"]),
|
|
2934
2934
|
style: { width: `${t}%` }
|
|
2935
2935
|
}
|
|
2936
2936
|
) }),
|
|
2937
|
-
/* @__PURE__ */ i("button", { className: ne(
|
|
2937
|
+
/* @__PURE__ */ i("button", { className: ne(ze["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
2938
2938
|
] }) });
|
|
2939
2939
|
}, qi = $e((t, e) => {
|
|
2940
2940
|
const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {}, l = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2941
2941
|
return /* @__PURE__ */ F("div", { children: [
|
|
2942
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className:
|
|
2943
|
-
/* @__PURE__ */ F("div", { "data-rp": "topBarLeft", className:
|
|
2942
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: We["rp-toolbar-content"], children: /* @__PURE__ */ F("div", { className: We["rp-toolbar-wrapper"], style: l(), children: [
|
|
2943
|
+
/* @__PURE__ */ F("div", { "data-rp": "topBarLeft", className: We["rp-toolbar-start"], children: [
|
|
2944
2944
|
/* @__PURE__ */ i(Gi, {}),
|
|
2945
2945
|
/* @__PURE__ */ i(ai, {})
|
|
2946
2946
|
] }),
|
|
2947
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className:
|
|
2948
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className:
|
|
2947
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: We["rp-toolbar-middle"], children: /* @__PURE__ */ i($i, {}) }),
|
|
2948
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: We["rp-toolbar-end"], children: /* @__PURE__ */ i(Fi, {}) })
|
|
2949
2949
|
] }) }),
|
|
2950
2950
|
n && a ? /* @__PURE__ */ i(Vi, { percentage: a }) : null
|
|
2951
2951
|
] });
|
|
@@ -2954,14 +2954,14 @@ const xe = {
|
|
|
2954
2954
|
"rp-sidebar-content": "_rp-sidebar-content_1sdl6_1",
|
|
2955
2955
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1sdl6_16",
|
|
2956
2956
|
"rp-thumbnail-dragging": "_rp-thumbnail-dragging_1sdl6_21"
|
|
2957
|
-
},
|
|
2957
|
+
}, ke = {
|
|
2958
2958
|
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
|
|
2959
2959
|
"rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
|
|
2960
2960
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2961
2961
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2962
2962
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2963
2963
|
}, Bi = (t) => {
|
|
2964
|
-
const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ie(), l =
|
|
2964
|
+
const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ie(), l = k(() => o ? ke["rp-thumbnail-active"] : "", [o]), c = k(() => ({
|
|
2965
2965
|
width: Math.round(r.width),
|
|
2966
2966
|
height: Math.round(r.height)
|
|
2967
2967
|
}), [r]), d = N(() => {
|
|
@@ -2972,9 +2972,9 @@ const xe = {
|
|
|
2972
2972
|
{
|
|
2973
2973
|
onClick: d,
|
|
2974
2974
|
id: `page-${n}`,
|
|
2975
|
-
className:
|
|
2975
|
+
className: ke["rp-thumbnail-wrapper"],
|
|
2976
2976
|
children: [
|
|
2977
|
-
/* @__PURE__ */ i("div", { className: ne(l,
|
|
2977
|
+
/* @__PURE__ */ i("div", { className: ne(l, ke["rp-thumbnail"]), children: e ? /* @__PURE__ */ i(
|
|
2978
2978
|
"img",
|
|
2979
2979
|
{
|
|
2980
2980
|
src: e,
|
|
@@ -2985,7 +2985,7 @@ const xe = {
|
|
|
2985
2985
|
) : /* @__PURE__ */ i(
|
|
2986
2986
|
"div",
|
|
2987
2987
|
{
|
|
2988
|
-
className:
|
|
2988
|
+
className: ke["rp-thumbnail-loader"],
|
|
2989
2989
|
style: {
|
|
2990
2990
|
width: `${c.width}px`,
|
|
2991
2991
|
height: `${c.height}px`
|
|
@@ -2993,7 +2993,7 @@ const xe = {
|
|
|
2993
2993
|
children: /* @__PURE__ */ i(Ct, {})
|
|
2994
2994
|
}
|
|
2995
2995
|
) }),
|
|
2996
|
-
/* @__PURE__ */ i("div", { className:
|
|
2996
|
+
/* @__PURE__ */ i("div", { className: ke["rp-thumbnail-text"], children: n })
|
|
2997
2997
|
]
|
|
2998
2998
|
}
|
|
2999
2999
|
);
|
|
@@ -3006,11 +3006,11 @@ const xe = {
|
|
|
3006
3006
|
}, Ki = $e((t, e) => {
|
|
3007
3007
|
const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: d } = Pn(), p = H(null), f = H(1);
|
|
3008
3008
|
cn(e, () => p.current);
|
|
3009
|
-
const _ =
|
|
3009
|
+
const _ = k(() => Object.values(a), [a]), h = N(() => {
|
|
3010
3010
|
const v = c + 1;
|
|
3011
3011
|
v <= r && l(v);
|
|
3012
3012
|
}, [l, r, c]);
|
|
3013
|
-
return
|
|
3013
|
+
return W(() => {
|
|
3014
3014
|
o > c ? d(o) : n && f.current !== o && (ji(p.current, o), f.current = o);
|
|
3015
3015
|
}, [o, c, d, n, _]), fr(p.current, h), /* @__PURE__ */ i("div", { ref: p, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? _.map((v, w) => {
|
|
3016
3016
|
var T, P;
|
|
@@ -3032,7 +3032,7 @@ const xe = {
|
|
|
3032
3032
|
}, Yi = () => {
|
|
3033
3033
|
const { active: t, setActive: e } = Pn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ve(), { localeMessages: c } = se(), d = N(() => {
|
|
3034
3034
|
e((f) => !f);
|
|
3035
|
-
}, []), p =
|
|
3035
|
+
}, []), p = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
3036
3036
|
re,
|
|
3037
3037
|
{
|
|
3038
3038
|
onClick: d,
|
|
@@ -3065,13 +3065,13 @@ const xe = {
|
|
|
3065
3065
|
}
|
|
3066
3066
|
) });
|
|
3067
3067
|
}, _e = {
|
|
3068
|
-
"rp-layout": "_rp-
|
|
3069
|
-
"rp-content": "_rp-
|
|
3070
|
-
"rp-pages": "_rp-
|
|
3071
|
-
"rp-container": "_rp-
|
|
3072
|
-
"rp-loader": "_rp-
|
|
3073
|
-
"rp-theme-variables": "_rp-theme-
|
|
3074
|
-
"rp-dark-mode": "_rp-dark-
|
|
3068
|
+
"rp-layout": "_rp-layout_ah61i_1",
|
|
3069
|
+
"rp-content": "_rp-content_ah61i_5",
|
|
3070
|
+
"rp-pages": "_rp-pages_ah61i_11",
|
|
3071
|
+
"rp-container": "_rp-container_ah61i_16",
|
|
3072
|
+
"rp-loader": "_rp-loader_ah61i_52",
|
|
3073
|
+
"rp-theme-variables": "_rp-theme-variables_ah61i_56",
|
|
3074
|
+
"rp-dark-mode": "_rp-dark-mode_ah61i_167"
|
|
3075
3075
|
}, Ji = $e(
|
|
3076
3076
|
(t, e) => {
|
|
3077
3077
|
const { children: n, toolbarRef: o, style: r, className: a } = t, { customVariables: l, customDarkVariables: c } = Tr(), { darkMode: d } = rr();
|
|
@@ -3107,7 +3107,7 @@ const xe = {
|
|
|
3107
3107
|
cleanupOnLoaded: p,
|
|
3108
3108
|
onLayoutWidthChange: f
|
|
3109
3109
|
} = t, [_, h] = $(null), { setContainer: v, setContentRef: w } = ge(), { loading: T } = Q(), { LoaderImageComponent: P } = hn();
|
|
3110
|
-
return
|
|
3110
|
+
return W(() => (d && d(), () => {
|
|
3111
3111
|
p && p();
|
|
3112
3112
|
}), [d, p]), /* @__PURE__ */ i(Ji, { toolbarRef: _, ref: e, children: /* @__PURE__ */ i(Pr, { mobileWidth: c, onLayoutWidthChange: f, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ F(_r, { getContainerRef: v, style: a, className: l, children: [
|
|
3113
3113
|
/* @__PURE__ */ F(br, { children: [
|
|
@@ -3153,7 +3153,7 @@ const xe = {
|
|
|
3153
3153
|
export {
|
|
3154
3154
|
Do as A,
|
|
3155
3155
|
on as B,
|
|
3156
|
-
|
|
3156
|
+
xo as C,
|
|
3157
3157
|
ei as D,
|
|
3158
3158
|
Gi as E,
|
|
3159
3159
|
Vn as F,
|
|
@@ -3163,8 +3163,8 @@ export {
|
|
|
3163
3163
|
Yi as J,
|
|
3164
3164
|
Ji as K,
|
|
3165
3165
|
Vi as L,
|
|
3166
|
-
|
|
3167
|
-
|
|
3166
|
+
zi as M,
|
|
3167
|
+
Ai as O,
|
|
3168
3168
|
Ms as P,
|
|
3169
3169
|
Us as R,
|
|
3170
3170
|
Gs as S,
|
|
@@ -3174,7 +3174,7 @@ export {
|
|
|
3174
3174
|
Bs as b,
|
|
3175
3175
|
$n as c,
|
|
3176
3176
|
tt as d,
|
|
3177
|
-
|
|
3177
|
+
It as e,
|
|
3178
3178
|
wn as f,
|
|
3179
3179
|
To as g,
|
|
3180
3180
|
_n as h,
|
|
@@ -3183,11 +3183,11 @@ export {
|
|
|
3183
3183
|
yo as k,
|
|
3184
3184
|
Cn as l,
|
|
3185
3185
|
Pn as m,
|
|
3186
|
-
|
|
3186
|
+
Io as n,
|
|
3187
3187
|
Tn as o,
|
|
3188
3188
|
Eo as p,
|
|
3189
|
-
|
|
3190
|
-
|
|
3189
|
+
Ao as q,
|
|
3190
|
+
xt as r,
|
|
3191
3191
|
Yo as s,
|
|
3192
3192
|
ti as t,
|
|
3193
3193
|
ie as u,
|