@pdf-viewer/react 1.6.0-beta.3 → 1.6.0-beta.5
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-f579f051.js → RPDefaultLayout-eb8d9898.js} +699 -694
- package/dist/assets/PasswordModal.css +1 -0
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +4 -2
- package/dist/components/RPProvider.js +13 -12
- package/dist/components/layout/LayoutContainer.js +3 -2
- 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 +3 -2
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +3 -2
- 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 +3 -2
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +3 -2
- package/dist/components/page/CanvasLayer.js +3 -2
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +3 -2
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +3 -2
- package/dist/components/page/TextLayer.js +3 -2
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/PasswordModal.js +58 -0
- package/dist/contexts/DocumentPasswordContext.js +40 -0
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/RPDocumentContext.js +11 -8
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/main.js +1 -1
- package/dist/types/components/ui/PasswordModal.d.ts +3 -0
- package/dist/types/contexts/DocumentPasswordContext.d.ts +14 -0
- package/dist/types/utils/hooks/useLoadPdf.d.ts +2 -0
- package/dist/types/utils/types.d.ts +8 -0
- package/dist/utils/getZoomLevel.js +13 -14
- package/dist/utils/hooks/useFileDownload.js +3 -2
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLoadPdf.js +52 -40
- package/dist/utils/hooks/usePaginate.js +3 -2
- package/dist/utils/hooks/usePresentPage.js +3 -2
- package/dist/utils/hooks/usePrint.js +3 -2
- package/dist/utils/hooks/useScrollToPage.js +3 -2
- package/dist/utils/hooks/useSearch.js +3 -2
- package/dist/utils/hooks/useThumbnail.js +3 -2
- package/dist/utils/hooks/useVirtualReactWindow.js +3 -2
- package/dist/utils/types.js +7 -7
- package/package.json +1 -1
|
@@ -1,98 +1,100 @@
|
|
|
1
|
-
import { jsx as i, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import { useRef as W, useEffect as
|
|
1
|
+
import { jsx as i, Fragment as ge, jsxs as A } from "react/jsx-runtime";
|
|
2
|
+
import * as q from "react";
|
|
3
|
+
import { useRef as W, useEffect as k, useCallback as L, useState as $, createContext as Xe, useContext as Ye, useMemo as M, forwardRef as We, useImperativeHandle as dn, createElement as Ve, PureComponent as nr, Component as rr, memo as or } from "react";
|
|
4
4
|
import { ChevronUpIcon as Me } from "./components/icons/ChevronUpIcon.js";
|
|
5
|
-
import { UIButton as
|
|
5
|
+
import { UIButton as re } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as un } from "./components/ui/Input.js";
|
|
7
|
-
import { useScrollModeContext as
|
|
7
|
+
import { useScrollModeContext as Ne } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as X } from "./contexts/RPDocumentContext.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { useDocumentPasswordContext as ir } from "./contexts/DocumentPasswordContext.js";
|
|
10
|
+
import { useDarkModeContext as ar } from "./contexts/DarkModeContext.js";
|
|
11
|
+
import { ViewMode as Be, ScrollMode as Q, AnnotationSubType as Ft, SelectionMode as sr, ZoomLevel as at } from "./utils/types.js";
|
|
11
12
|
import { useRotationContext as Je } from "./contexts/RotationContext.js";
|
|
12
|
-
import { useLayerContext as
|
|
13
|
+
import { useLayerContext as cr } from "./contexts/LayerContext.js";
|
|
13
14
|
import { useZoomContext as Qe } from "./contexts/ZoomContext.js";
|
|
14
15
|
import { useViewModeContext as He } from "./contexts/ViewModeContext.js";
|
|
15
16
|
import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
|
|
16
17
|
import { useVirtualGridContext as pn } from "./contexts/VirtualGridContext.js";
|
|
17
|
-
import { useSelectionModeContext as
|
|
18
|
-
import { useInitialStateContext as
|
|
19
|
-
import { useFullScreenContext as
|
|
18
|
+
import { useSelectionModeContext as lr } from "./contexts/SelectionModeContext.js";
|
|
19
|
+
import { useInitialStateContext as dr } from "./contexts/InitialStateContext.js";
|
|
20
|
+
import { useFullScreenContext as ur } from "./contexts/FullScreenContext.js";
|
|
20
21
|
import "./contexts/FileInputContext.js";
|
|
21
22
|
import "./contexts/DropFileZoneContext.js";
|
|
22
23
|
import { renderPage as _t } from "./utils/renderPage.js";
|
|
23
|
-
import { highlightMatches as hn, findMatches as
|
|
24
|
+
import { highlightMatches as hn, findMatches as pr, resetDivs as mn, highlightMultipleColorMatches as hr } from "./utils/highlight.js";
|
|
24
25
|
import * as Tt from "pdfjs-dist";
|
|
25
|
-
import { PixelsPerInch as
|
|
26
|
-
import { useLayoutContainer as
|
|
26
|
+
import { PixelsPerInch as mr, AnnotationMode as fr, RenderingCancelledException as gr, AnnotationLayer as vr } from "pdfjs-dist";
|
|
27
|
+
import { useLayoutContainer as Ce } from "./contexts/LayoutContainerContext.js";
|
|
27
28
|
import { useDimensionPagesContext as tt } from "./contexts/DimensionPagesContext.js";
|
|
28
29
|
import { useLocalizationContext as se } from "./contexts/LocalizationContext.js";
|
|
29
|
-
import { useHighlightContext as
|
|
30
|
+
import { useHighlightContext as _r } from "./contexts/HighlightContext.js";
|
|
30
31
|
import "./contexts/LicenseContext.js";
|
|
31
|
-
import { useDownloadContext as
|
|
32
|
+
import { useDownloadContext as wr } from "./contexts/DownloadContext.js";
|
|
32
33
|
import { useSmoothScrollContext as fn } from "./contexts/SmoothScrollContext.js";
|
|
33
34
|
import { useLoaderContext as gn } from "./contexts/LoaderContext.js";
|
|
34
35
|
import "./components/RPConfig.js";
|
|
35
|
-
import { ThumbnailIcon as
|
|
36
|
-
import { c as
|
|
36
|
+
import { ThumbnailIcon as br } from "./components/icons/Thumbnail.js";
|
|
37
|
+
import { c as ne } from "./clsx-0c6e471a.js";
|
|
37
38
|
import { LoaderIcon as Pt } from "./components/icons/LoaderIcon.js";
|
|
38
|
-
import { useInfiniteScroll as
|
|
39
|
-
import { RPSplitter as
|
|
40
|
-
import { useToolbarComponentContext as
|
|
41
|
-
import { useIconContext as
|
|
42
|
-
import
|
|
43
|
-
import { Container as
|
|
44
|
-
import { WrapperLayout as
|
|
45
|
-
import { RPDropFileZone as
|
|
46
|
-
import { useViewportContext as
|
|
47
|
-
import { useThemeContext as
|
|
48
|
-
import { SimpleLinkService as
|
|
49
|
-
import { annotationsEvents as
|
|
50
|
-
import { _ as
|
|
51
|
-
import { useMousePressed as
|
|
52
|
-
import { useGrabScroll as
|
|
53
|
-
import { usePinch as
|
|
39
|
+
import { useInfiniteScroll as Cr } from "./utils/hooks/useInfiniteScroll.js";
|
|
40
|
+
import { RPSplitter as Tr } from "./components/layout/sidebar/RPSplitter.js";
|
|
41
|
+
import { useToolbarComponentContext as ve, ToolbarComponentProvider as Pr } from "./contexts/ToolbarComponentContext.js";
|
|
42
|
+
import { useIconContext as pe, IconProvider as Sr } from "./contexts/IconContext.js";
|
|
43
|
+
import U from "./components/ui/RPTooltip.js";
|
|
44
|
+
import { Container as yr } from "./components/layout/Container.js";
|
|
45
|
+
import { WrapperLayout as xr } from "./components/layout/WrapperLayout.js";
|
|
46
|
+
import { RPDropFileZone as Ir } from "./components/RPDropFileZone.js";
|
|
47
|
+
import { useViewportContext as Te, ViewportProvider as Lr } from "./contexts/ViewportContext.js";
|
|
48
|
+
import { useThemeContext as Rr } from "./contexts/ThemeContext.js";
|
|
49
|
+
import { SimpleLinkService as Er } from "./utils/link_service.js";
|
|
50
|
+
import { annotationsEvents as Nr, annotationEventsHandler as Or, handleClick as kt, handleAnnotationWidget as Dr, handleAnnotationLink as zr, bindLayerEvents as Ar, unbindLayerEvents as Mt } from "./utils/annotations.js";
|
|
51
|
+
import { _ as Fr, U as kr } from "./Popover-b7402893.js";
|
|
52
|
+
import { useMousePressed as Mr } from "./utils/hooks/useMousePressed.js";
|
|
53
|
+
import { useGrabScroll as Wr } from "./utils/hooks/useGrabScroll.js";
|
|
54
|
+
import { usePinch as Hr } from "./utils/hooks/usePinch.js";
|
|
54
55
|
import { useDebounce as St } from "./utils/hooks/useDebounce.js";
|
|
55
|
-
import
|
|
56
|
+
import $r from "./components/ui/PasswordModal.js";
|
|
57
|
+
import { getPositionFromPage as Gr, getPageFromPosition as Vr } from "./utils/calculatePage.js";
|
|
56
58
|
import { getThumbnailViewport as Wt } from "./utils/getThumbnailViewport.js";
|
|
57
59
|
import { smoothScrollTo as st } from "./utils/smoothScrollTo.js";
|
|
58
|
-
import { appConsole as
|
|
60
|
+
import { appConsole as qr } from "./utils/appConsole.js";
|
|
59
61
|
import { FileUploadTool as vn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
60
|
-
import { DarkModeTool as
|
|
61
|
-
import { ThreeDotIcon as
|
|
62
|
+
import { DarkModeTool as Ur } from "./components/layout/toolbar/DarkModeTool.js";
|
|
63
|
+
import { ThreeDotIcon as Zr } from "./components/icons/ThreeDotIcon.js";
|
|
62
64
|
import { UIDropDown as _n } from "./components/ui/DropDown.js";
|
|
63
|
-
import { e as
|
|
64
|
-
import { D as
|
|
65
|
-
import { a as
|
|
66
|
-
import { h as
|
|
67
|
-
import { CloseIcon as
|
|
65
|
+
import { e as Br, a as yt, P as $e, c as ke, g as xt, i as jr, k as Kr, f as Xr } from "./index-1cb41342.js";
|
|
66
|
+
import { D as Yr, u as ct } from "./index-aa2d3884.js";
|
|
67
|
+
import { a as Jr, u as Qr, F as eo, b as to, G as je } from "./index-7279fb4e.js";
|
|
68
|
+
import { h as no } from "./component-1da194e8.js";
|
|
69
|
+
import { CloseIcon as ro } from "./components/icons/CloseIcon.js";
|
|
68
70
|
import { dateFormatter as Ht } from "./utils/dateFormatter.js";
|
|
69
|
-
import { PropertyItem as
|
|
70
|
-
import { useOtherToolContext as
|
|
71
|
-
import { DocumentProperties as
|
|
72
|
-
import { RotateTool as
|
|
73
|
-
import { ViewModeTool as
|
|
74
|
-
import { ScrollModeTool as
|
|
71
|
+
import { PropertyItem as oo } from "./components/layout/toolbar/PropertyItem.js";
|
|
72
|
+
import { useOtherToolContext as io, OtherToolProvider as ao } from "./contexts/OtherToolContext.js";
|
|
73
|
+
import { DocumentProperties as so } from "./components/layout/toolbar/DocumentProperties.js";
|
|
74
|
+
import { RotateTool as co } from "./components/layout/toolbar/RotateTool.js";
|
|
75
|
+
import { ViewModeTool as lo } from "./components/layout/toolbar/ViewModeTool.js";
|
|
76
|
+
import { ScrollModeTool as uo } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
75
77
|
import { MenuSeparator as It } from "./components/layout/toolbar/MenuSeparator.js";
|
|
76
|
-
import { FileDownloadDefaultIcon as
|
|
77
|
-
import { MenuItem as
|
|
78
|
-
import { PrintDefaultTool as
|
|
78
|
+
import { FileDownloadDefaultIcon as po } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
79
|
+
import { MenuItem as be } from "./components/layout/toolbar/MenuItem.js";
|
|
80
|
+
import { PrintDefaultTool as ho } from "./components/icons/PrintDefaultIcon.js";
|
|
79
81
|
import { FullScreenTool as wn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
80
82
|
import { GoToDownIcon as bn } from "./components/icons/GoToDownIcon.js";
|
|
81
|
-
import { SelectionModeTool as
|
|
82
|
-
import { ZoomInIcon as
|
|
83
|
-
import { ZoomOutIcon as
|
|
83
|
+
import { SelectionModeTool as mo } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
84
|
+
import { ZoomInIcon as fo } from "./components/icons/ZoomInIcon.js";
|
|
85
|
+
import { ZoomOutIcon as go } from "./components/icons/ZoomOutIcon.js";
|
|
84
86
|
import { PAGE_PADDING as $t } from "./utils/constants.js";
|
|
85
|
-
import { getZoomLevel as
|
|
86
|
-
import { SearchIcon as
|
|
87
|
+
import { getZoomLevel as vo } from "./utils/getZoomLevel.js";
|
|
88
|
+
import { SearchIcon as _o } from "./components/icons/SearchIcon.js";
|
|
87
89
|
import { c as K, S as Gt } from "./SearchCloseButton-959cc1ed.js";
|
|
88
90
|
import { UICheckbox as Vt } from "./components/ui/Checkbox.js";
|
|
89
|
-
import { ClearIcon as
|
|
90
|
-
import { InfoIcon as
|
|
91
|
+
import { ClearIcon as wo } from "./components/icons/ClearIcon.js";
|
|
92
|
+
import { InfoIcon as qt } from "./components/icons/InfoIcon.js";
|
|
91
93
|
import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) => r < t ? n + o : n, 0), Cn = () => {
|
|
92
|
-
const { viewMode: e } = He(), { scrollMode: t } =
|
|
93
|
-
|
|
94
|
+
const { viewMode: e } = He(), { scrollMode: t } = Ne(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), c = W(), { columnCount: s } = pn(), { widths: d, heights: u } = tt(), p = W(t), f = W(e), h = W(s), { targetScrollPage: g } = fn();
|
|
95
|
+
k(() => {
|
|
94
96
|
n != null && n.scrollToItem && (c.current = n);
|
|
95
|
-
}, [n]),
|
|
97
|
+
}, [n]), k(() => {
|
|
96
98
|
p.current = t, f.current = e;
|
|
97
99
|
}, [t, e]);
|
|
98
100
|
const P = L(
|
|
@@ -120,27 +122,27 @@ import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) =>
|
|
|
120
122
|
},
|
|
121
123
|
[r, d, st]
|
|
122
124
|
);
|
|
123
|
-
return
|
|
125
|
+
return k(() => {
|
|
124
126
|
p.current = t, f.current = e;
|
|
125
|
-
}, [t, e]),
|
|
127
|
+
}, [t, e]), k(() => {
|
|
126
128
|
h.current = s;
|
|
127
129
|
}, [s]), { scrollToPage: L(
|
|
128
130
|
(v, S = "smooth") => {
|
|
129
131
|
a(v);
|
|
130
132
|
const m = v - 1;
|
|
131
133
|
let w = m, C = 0;
|
|
132
|
-
if (f.current === Be.DUAL_PAGE && p.current ===
|
|
134
|
+
if (f.current === Be.DUAL_PAGE && p.current === Q.PAGE_SCROLLING) {
|
|
133
135
|
P(v, S);
|
|
134
136
|
return;
|
|
135
137
|
}
|
|
136
|
-
if (p.current ===
|
|
138
|
+
if (p.current === Q.PAGE_SCROLLING) {
|
|
137
139
|
a(v);
|
|
138
140
|
return;
|
|
139
141
|
}
|
|
140
142
|
if (!c.current || !o)
|
|
141
143
|
return;
|
|
142
144
|
const l = o;
|
|
143
|
-
if (g.current = v, p.current ===
|
|
145
|
+
if (g.current = v, p.current === Q.HORIZONTAL_SCROLLING) {
|
|
144
146
|
C = m;
|
|
145
147
|
const y = {
|
|
146
148
|
left: Ge(d, C),
|
|
@@ -181,8 +183,8 @@ import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) =>
|
|
|
181
183
|
d
|
|
182
184
|
]
|
|
183
185
|
) };
|
|
184
|
-
},
|
|
185
|
-
const [t, n] =
|
|
186
|
+
}, bo = (e = 1) => {
|
|
187
|
+
const [t, n] = $(e), [o, r] = $(0), { scrollToPage: a } = Cn(), c = W(1), { viewMode: s } = He(), { scrollMode: d } = Ne(), u = St(t, 100), p = L(
|
|
186
188
|
(b) => {
|
|
187
189
|
if (!/^[0-9]*$/g.test(b.toString()) || !b)
|
|
188
190
|
return { success: !1, currentPage: c.current };
|
|
@@ -224,12 +226,12 @@ import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) =>
|
|
|
224
226
|
},
|
|
225
227
|
nextPage: () => {
|
|
226
228
|
}
|
|
227
|
-
}),
|
|
229
|
+
}), ie = () => {
|
|
228
230
|
const e = Ye(Tn);
|
|
229
|
-
return typeof (e == null ? void 0 : e.focusedPage) > "u" &&
|
|
230
|
-
},
|
|
231
|
-
const { pdf: t } = X(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: d } =
|
|
232
|
-
return
|
|
231
|
+
return typeof (e == null ? void 0 : e.focusedPage) > "u" && qr.error("Please use this hooks inside children component of RPProvider"), e;
|
|
232
|
+
}, Os = ({ children: e }) => {
|
|
233
|
+
const { pdf: t } = X(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: d } = bo();
|
|
234
|
+
return k(() => {
|
|
233
235
|
t != null && t.numPages && (a(t.numPages), r(1));
|
|
234
236
|
}, [t, a, r]), /* @__PURE__ */ i(
|
|
235
237
|
Tn.Provider,
|
|
@@ -247,13 +249,13 @@ import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) =>
|
|
|
247
249
|
}
|
|
248
250
|
);
|
|
249
251
|
};
|
|
250
|
-
const
|
|
251
|
-
const { pdf: e, pages: t } = X(), [n, o] =
|
|
252
|
+
const Co = () => {
|
|
253
|
+
const { pdf: e, pages: t } = X(), [n, o] = $({
|
|
252
254
|
loadedPages: 0,
|
|
253
255
|
totalPages: 0,
|
|
254
256
|
percentage: 0
|
|
255
|
-
}), [r, a] =
|
|
256
|
-
|
|
257
|
+
}), [r, a] = $(!1), [c, s] = $(!1), [d, u] = $(null), p = W(!1);
|
|
258
|
+
k(() => {
|
|
257
259
|
p.current;
|
|
258
260
|
}, [p]);
|
|
259
261
|
const f = L(() => {
|
|
@@ -281,11 +283,11 @@ const _o = () => {
|
|
|
281
283
|
h();
|
|
282
284
|
return;
|
|
283
285
|
}
|
|
284
|
-
const I = _ /
|
|
286
|
+
const I = _ / mr.PDF;
|
|
285
287
|
w.width = Math.floor(T.width * I), w.height = Math.floor(T.height * I);
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
const [R,
|
|
288
|
+
const O = w.getContext("2d");
|
|
289
|
+
O.save(), O.fillStyle = "rgb(255, 255, 255)", O.fillRect(0, 0, w.width, w.height), O.restore();
|
|
290
|
+
const [R, F] = await Promise.all([
|
|
289
291
|
C.getPage(l),
|
|
290
292
|
E
|
|
291
293
|
]);
|
|
@@ -293,19 +295,19 @@ const _o = () => {
|
|
|
293
295
|
h();
|
|
294
296
|
return;
|
|
295
297
|
}
|
|
296
|
-
const
|
|
297
|
-
canvasContext:
|
|
298
|
+
const z = {
|
|
299
|
+
canvasContext: O,
|
|
298
300
|
transform: [I, 0, 0, I, 0, 0],
|
|
299
301
|
viewport: R.getViewport({ scale: 1, rotation: T.rotation }),
|
|
300
302
|
intent: "print",
|
|
301
|
-
annotationMode:
|
|
303
|
+
annotationMode: fr.ENABLE_STORAGE,
|
|
302
304
|
optionalContentConfigPromise: y,
|
|
303
|
-
printAnnotationStorage:
|
|
305
|
+
printAnnotationStorage: F
|
|
304
306
|
};
|
|
305
307
|
try {
|
|
306
|
-
return R.render(
|
|
307
|
-
} catch (
|
|
308
|
-
throw
|
|
308
|
+
return R.render(z).promise;
|
|
309
|
+
} catch (N) {
|
|
310
|
+
throw N instanceof gr || console.error(N), N;
|
|
309
311
|
}
|
|
310
312
|
}, b = L(() => {
|
|
311
313
|
const w = window.print;
|
|
@@ -353,12 +355,12 @@ const _o = () => {
|
|
|
353
355
|
const T = e.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
|
|
354
356
|
e.annotationStorage.print ?? void 0
|
|
355
357
|
), y = t.size;
|
|
356
|
-
for (const [I,
|
|
358
|
+
for (const [I, O] of t) {
|
|
357
359
|
if (p.current) {
|
|
358
360
|
h();
|
|
359
361
|
return;
|
|
360
362
|
}
|
|
361
|
-
const R =
|
|
363
|
+
const R = O.page.getViewport({ scale: 1 });
|
|
362
364
|
if (await P({
|
|
363
365
|
scratchCanvas: w,
|
|
364
366
|
pdfDocument: e,
|
|
@@ -371,13 +373,13 @@ const _o = () => {
|
|
|
371
373
|
h();
|
|
372
374
|
return;
|
|
373
375
|
}
|
|
374
|
-
const
|
|
375
|
-
C.push(
|
|
376
|
-
const
|
|
376
|
+
const F = await v(w);
|
|
377
|
+
C.push(F);
|
|
378
|
+
const z = parseFloat((C.length / y * 100).toFixed(2));
|
|
377
379
|
o({
|
|
378
380
|
loadedPages: I,
|
|
379
381
|
totalPages: y,
|
|
380
|
-
percentage:
|
|
382
|
+
percentage: z
|
|
381
383
|
});
|
|
382
384
|
}
|
|
383
385
|
if (p.current) {
|
|
@@ -392,7 +394,7 @@ const _o = () => {
|
|
|
392
394
|
w.height = 0, w.width = 0;
|
|
393
395
|
}
|
|
394
396
|
}, [e, t, p]);
|
|
395
|
-
return
|
|
397
|
+
return k(() => {
|
|
396
398
|
const w = () => {
|
|
397
399
|
h(), f();
|
|
398
400
|
};
|
|
@@ -424,8 +426,8 @@ const _o = () => {
|
|
|
424
426
|
console.error("Error in setOnError callback:", t);
|
|
425
427
|
}
|
|
426
428
|
}
|
|
427
|
-
}),
|
|
428
|
-
const [t, n] =
|
|
429
|
+
}), Ds = ({ children: e }) => {
|
|
430
|
+
const [t, n] = $(null), [o, r] = $(null), { print: a, cancel: c, progress: s, isComplete: d, isError: u, error: p } = Co(), f = L((v) => {
|
|
429
431
|
v && typeof v == "function" && r(() => v);
|
|
430
432
|
}, []), h = (v) => {
|
|
431
433
|
p && v(p);
|
|
@@ -435,13 +437,13 @@ const _o = () => {
|
|
|
435
437
|
},
|
|
436
438
|
[s, t]
|
|
437
439
|
);
|
|
438
|
-
|
|
440
|
+
k(() => {
|
|
439
441
|
d && o && P();
|
|
440
|
-
}, [d, o]),
|
|
442
|
+
}, [d, o]), k(() => {
|
|
441
443
|
u && h((v) => {
|
|
442
444
|
console.error(v);
|
|
443
445
|
});
|
|
444
|
-
}, [u]),
|
|
446
|
+
}, [u]), k(() => {
|
|
445
447
|
s && t && t(s);
|
|
446
448
|
}, [s, t]);
|
|
447
449
|
const P = () => {
|
|
@@ -460,8 +462,8 @@ const _o = () => {
|
|
|
460
462
|
if (!e)
|
|
461
463
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
462
464
|
return e;
|
|
463
|
-
},
|
|
464
|
-
const [e, t] =
|
|
465
|
+
}, To = () => {
|
|
466
|
+
const [e, t] = $({}), { pages: n } = X(), { rotate: o } = Je(), r = M(() => Object.keys(e).length, [e]), a = L(
|
|
465
467
|
(s) => {
|
|
466
468
|
if (!n.size || s > n.size)
|
|
467
469
|
return;
|
|
@@ -501,7 +503,7 @@ const _o = () => {
|
|
|
501
503
|
},
|
|
502
504
|
[n, o]
|
|
503
505
|
);
|
|
504
|
-
|
|
506
|
+
k(() => {
|
|
505
507
|
a(10);
|
|
506
508
|
}, [a]);
|
|
507
509
|
const c = L(
|
|
@@ -547,11 +549,11 @@ const _o = () => {
|
|
|
547
549
|
setActive: (e) => {
|
|
548
550
|
},
|
|
549
551
|
active: !1
|
|
550
|
-
}), yn = () => Ye(Sn),
|
|
552
|
+
}), yn = () => Ye(Sn), zs = ({
|
|
551
553
|
children: e,
|
|
552
554
|
initialThumbnailsVisible: t
|
|
553
555
|
}) => {
|
|
554
|
-
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } =
|
|
556
|
+
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = To(), [c, s] = $(t);
|
|
555
557
|
return /* @__PURE__ */ i(
|
|
556
558
|
Sn.Provider,
|
|
557
559
|
{
|
|
@@ -559,33 +561,33 @@ const _o = () => {
|
|
|
559
561
|
children: e
|
|
560
562
|
}
|
|
561
563
|
);
|
|
562
|
-
},
|
|
563
|
-
const [n, o] =
|
|
564
|
-
|
|
564
|
+
}, Po = (e = {}, t = "") => {
|
|
565
|
+
const [n, o] = $(t), [r, a] = $(!1), { pdf: c, pages: s } = X(), d = tt(), u = W(!n), { currentZoom: p } = Qe(), [f, h] = $([]), { setFocusedPage: g } = ie(), [P, b] = $(0), { pageScrollElementRef: v, virtualScrollableElementRef: S } = et(), { scrollMode: m } = Ne(), { pagesRef: w } = Ce(), [C, l] = $(null), T = W({}), _ = M(() => P === 0 ? null : f[P - 1], [P, f]), y = M(() => f.length, [f]);
|
|
566
|
+
k(() => {
|
|
565
567
|
if (!_ || !s)
|
|
566
568
|
return;
|
|
567
569
|
const R = S || v;
|
|
568
570
|
if (!R || !w)
|
|
569
571
|
return;
|
|
570
|
-
const
|
|
571
|
-
let x = 0,
|
|
572
|
-
m ===
|
|
573
|
-
let
|
|
574
|
-
if (!
|
|
572
|
+
const F = s.get(_.page), z = w.clientHeight / 2, N = w.clientWidth / 2;
|
|
573
|
+
let x = 0, D = 0;
|
|
574
|
+
m === Q.PAGE_SCROLLING && g(_.page), m === Q.VERTICAL_SCROLLING && (x = d.heights.slice(0, _.page - 1).reduce((j, B) => j + B, 0)), m === Q.HORIZONTAL_SCROLLING && (D = d.widths.slice(0, _.page - 1).reduce((j, B) => j + B, 0));
|
|
575
|
+
let H;
|
|
576
|
+
if (!F)
|
|
575
577
|
return;
|
|
576
|
-
const
|
|
577
|
-
|
|
578
|
+
const Z = T.current[_.page], Y = F.page.getViewport({ scale: 1 });
|
|
579
|
+
H = new Tt.TextLayer({
|
|
578
580
|
viewport: Y,
|
|
579
|
-
textContentSource:
|
|
581
|
+
textContentSource: Z,
|
|
580
582
|
container: document.createElement("div")
|
|
581
|
-
}),
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
const
|
|
585
|
-
left: Math.max(
|
|
586
|
-
top: Math.max(
|
|
583
|
+
}), H.render().then(() => {
|
|
584
|
+
const j = H.textDivs[_.start.idx], [B] = hn([_], Z, H.textDivs), ee = d.widths[_.page - 1], ae = d.heights[_.page - 1], J = document.createElement("div"), te = document.createElement("div");
|
|
585
|
+
j.style.position = "absolute", j.style.color = "transparent", te.style.position = "absolute", te.style.top = "0", te.style.setProperty("--scale-factor", `${p}`), J.style.position = "relative", J.style.width = `${ee}px`, J.style.height = `${ae}px`, J.style.zIndex = "-1", J.appendChild(j), te.appendChild(J), w.prepend(te);
|
|
586
|
+
const he = B.element.getBoundingClientRect(), le = te.getBoundingClientRect(), Oe = he.top - le.top, _e = he.left - le.left, me = x + Oe - z + he.height / 2, de = D + _e - N + he.width / 2, De = {
|
|
587
|
+
left: Math.max(de, 0),
|
|
588
|
+
top: Math.max(me, 0)
|
|
587
589
|
};
|
|
588
|
-
w.removeChild(
|
|
590
|
+
w.removeChild(te), R.scrollTo({
|
|
589
591
|
...De
|
|
590
592
|
});
|
|
591
593
|
});
|
|
@@ -603,39 +605,39 @@ const _o = () => {
|
|
|
603
605
|
b((R) => y ? R + 1 > y ? 1 : R + 1 : 0);
|
|
604
606
|
}, [y]), I = L(() => {
|
|
605
607
|
b((R) => y ? R - 1 <= 0 ? y : R - 1 : 0);
|
|
606
|
-
}, [y]),
|
|
608
|
+
}, [y]), O = L(async (R) => {
|
|
607
609
|
if (!R)
|
|
608
610
|
return {};
|
|
609
|
-
const
|
|
610
|
-
for (let
|
|
611
|
+
const F = R.numPages, z = {};
|
|
612
|
+
for (let N = 1; N <= F; N++) {
|
|
611
613
|
if (u.current)
|
|
612
614
|
throw "close pop over";
|
|
613
|
-
const x = await R.getPage(
|
|
614
|
-
|
|
615
|
+
const x = await R.getPage(N);
|
|
616
|
+
z[N.toString()] = await x.getTextContent();
|
|
615
617
|
}
|
|
616
|
-
return
|
|
618
|
+
return z;
|
|
617
619
|
}, []);
|
|
618
|
-
return
|
|
620
|
+
return k(() => {
|
|
619
621
|
if (!n) {
|
|
620
622
|
u.current = !0, h([]), b(0);
|
|
621
623
|
return;
|
|
622
624
|
}
|
|
623
|
-
u.current = !1, a(!0), h([]), b(0),
|
|
625
|
+
u.current = !1, a(!0), h([]), b(0), O(c).then((R) => {
|
|
624
626
|
T.current = R;
|
|
625
|
-
const
|
|
626
|
-
const
|
|
627
|
+
const z = Object.keys(R).reduce((N, x) => {
|
|
628
|
+
const D = pr(
|
|
627
629
|
[n],
|
|
628
630
|
R[x],
|
|
629
631
|
Number(x) - 1,
|
|
630
632
|
e
|
|
631
|
-
).map((
|
|
632
|
-
return [...
|
|
633
|
+
).map((H, Z) => ({ ...H, page: Number(x), pageMatchIdx: Z }));
|
|
634
|
+
return [...N, ...D];
|
|
633
635
|
}, []);
|
|
634
|
-
h(
|
|
636
|
+
h(z), b(z.length ? 1 : 0);
|
|
635
637
|
}).catch(() => {
|
|
636
638
|
h([]), b(0);
|
|
637
639
|
}).finally(() => a(!1));
|
|
638
|
-
}, [n,
|
|
640
|
+
}, [n, O, c, e]), {
|
|
639
641
|
search: n,
|
|
640
642
|
setSearch: o,
|
|
641
643
|
loading: r,
|
|
@@ -666,11 +668,11 @@ const _o = () => {
|
|
|
666
668
|
currentMatchElement: null,
|
|
667
669
|
setCurrentMatchElement: (e) => {
|
|
668
670
|
}
|
|
669
|
-
}),
|
|
671
|
+
}), As = ({
|
|
670
672
|
children: e,
|
|
671
673
|
initialSearch: t
|
|
672
674
|
}) => {
|
|
673
|
-
const [n, o] =
|
|
675
|
+
const [n, o] = $({}), {
|
|
674
676
|
loading: r,
|
|
675
677
|
setSearch: a,
|
|
676
678
|
totalMatches: c,
|
|
@@ -682,7 +684,7 @@ const _o = () => {
|
|
|
682
684
|
prevMatch: h,
|
|
683
685
|
currentMatchElement: g,
|
|
684
686
|
setCurrentMatchElement: P
|
|
685
|
-
} =
|
|
687
|
+
} = Po(n, t);
|
|
686
688
|
return /* @__PURE__ */ i(
|
|
687
689
|
xn.Provider,
|
|
688
690
|
{
|
|
@@ -704,7 +706,7 @@ const _o = () => {
|
|
|
704
706
|
children: e
|
|
705
707
|
}
|
|
706
708
|
);
|
|
707
|
-
}, Lt = () => Ye(xn),
|
|
709
|
+
}, Lt = () => Ye(xn), ue = {
|
|
708
710
|
"rp-pages": "_rp-pages_1776r_1",
|
|
709
711
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
|
|
710
712
|
"rp-pages-container": "_rp-pages-container_1776r_11",
|
|
@@ -717,9 +719,9 @@ const _o = () => {
|
|
|
717
719
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
718
720
|
"rp-page": "_rp-page_h7a2q_1",
|
|
719
721
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
720
|
-
},
|
|
722
|
+
}, So = (e) => {
|
|
721
723
|
const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = W(null), { pages: a } = X(), { rotate: c } = Je(), s = W(), { currentZoom: d } = Qe();
|
|
722
|
-
return
|
|
724
|
+
return k(() => {
|
|
723
725
|
if (!a || d === 0)
|
|
724
726
|
return;
|
|
725
727
|
const u = a.get(t);
|
|
@@ -743,13 +745,13 @@ const _o = () => {
|
|
|
743
745
|
(p = s.current) == null || p.cancel();
|
|
744
746
|
};
|
|
745
747
|
}, [a, t, c, d, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${t}-canvas`, ref: r });
|
|
746
|
-
},
|
|
748
|
+
}, yo = "_selecting_1x8te_9", xo = "_endOfContent_1x8te_24", ze = {
|
|
747
749
|
"rp-text-layer": "_rp-text-layer_1x8te_1",
|
|
748
|
-
selecting:
|
|
749
|
-
endOfContent:
|
|
750
|
+
selecting: yo,
|
|
751
|
+
endOfContent: xo,
|
|
750
752
|
"rp-text-layer-text": "_rp-text-layer-text_1x8te_38"
|
|
751
|
-
},
|
|
752
|
-
const { pageNumber: t } = e, { pages: n } = X(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = Lt(), [s, d] =
|
|
753
|
+
}, Io = (e) => {
|
|
754
|
+
const { pageNumber: t } = e, { pages: n } = X(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = Lt(), [s, d] = $(
|
|
753
755
|
[]
|
|
754
756
|
), u = W(), p = W(), f = W(), h = M(() => r.filter((w) => w.pageIndex === t - 1), [r, t]), g = L(
|
|
755
757
|
(w, C, l = !1) => {
|
|
@@ -762,7 +764,7 @@ const _o = () => {
|
|
|
762
764
|
},
|
|
763
765
|
[h]
|
|
764
766
|
), P = W(), b = W(!1), v = L(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
765
|
-
|
|
767
|
+
k(() => ((() => {
|
|
766
768
|
if (P.current)
|
|
767
769
|
return;
|
|
768
770
|
P.current = new AbortController();
|
|
@@ -801,7 +803,7 @@ const _o = () => {
|
|
|
801
803
|
document.addEventListener(
|
|
802
804
|
"selectionchange",
|
|
803
805
|
() => {
|
|
804
|
-
var
|
|
806
|
+
var z, N;
|
|
805
807
|
const _ = document.getSelection();
|
|
806
808
|
if (!_)
|
|
807
809
|
return;
|
|
@@ -811,26 +813,26 @@ const _o = () => {
|
|
|
811
813
|
}
|
|
812
814
|
const y = /* @__PURE__ */ new Set();
|
|
813
815
|
for (let x = 0; x < _.rangeCount; x++) {
|
|
814
|
-
const
|
|
815
|
-
v().forEach((
|
|
816
|
-
|
|
816
|
+
const D = _.getRangeAt(x);
|
|
817
|
+
v().forEach((H) => {
|
|
818
|
+
D.intersectsNode(H) && !y.has(H) && y.add(H);
|
|
817
819
|
});
|
|
818
820
|
}
|
|
819
821
|
v().forEach((x) => {
|
|
820
822
|
if (y.has(x))
|
|
821
823
|
x.classList.add("selecting");
|
|
822
824
|
else {
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
+
const D = x.querySelector(".endOfContent");
|
|
826
|
+
D && (x.appendChild(D), D.style.width = "", D.style.height = "", x.classList.remove("selecting"));
|
|
825
827
|
}
|
|
826
828
|
});
|
|
827
829
|
const E = _.getRangeAt(0);
|
|
828
|
-
let
|
|
829
|
-
|
|
830
|
-
const R = (
|
|
830
|
+
let O = T && (E.compareBoundaryPoints(Range.END_TO_END, T) === 0 || E.compareBoundaryPoints(Range.START_TO_END, T) === 0) ? E.startContainer : E.endContainer;
|
|
831
|
+
O.nodeType === Node.TEXT_NODE && (O = O.parentNode);
|
|
832
|
+
const R = (z = O.parentElement) == null ? void 0 : z.closest(
|
|
831
833
|
ze["rp-text-layer"]
|
|
832
|
-
),
|
|
833
|
-
|
|
834
|
+
), F = R == null ? void 0 : R.querySelector(".endOfContent");
|
|
835
|
+
F && R && (F.style.width = R.style.width, F.style.height = R.style.height, (N = O.parentElement) == null || N.insertBefore(F, O.nextSibling)), T = E.cloneRange();
|
|
834
836
|
},
|
|
835
837
|
{ signal: C }
|
|
836
838
|
);
|
|
@@ -843,7 +845,7 @@ const _o = () => {
|
|
|
843
845
|
}, []), m = L(() => {
|
|
844
846
|
o.current && o.current.classList.remove("selecting");
|
|
845
847
|
}, []);
|
|
846
|
-
return
|
|
848
|
+
return k(() => {
|
|
847
849
|
var l;
|
|
848
850
|
if ((l = f.current) == null || l.classList.remove("selected"), !s.length || !a || a.pageIndex !== t - 1)
|
|
849
851
|
return;
|
|
@@ -854,7 +856,7 @@ const _o = () => {
|
|
|
854
856
|
return;
|
|
855
857
|
const C = s.find((T) => T.index === w);
|
|
856
858
|
C && (f.current = C.element, c(C.element), C.element.classList.add("selected"));
|
|
857
|
-
}, [a, s, h]),
|
|
859
|
+
}, [a, s, h]), k(() => {
|
|
858
860
|
const w = n.get(t);
|
|
859
861
|
if (!w || !o.current)
|
|
860
862
|
return;
|
|
@@ -880,7 +882,7 @@ const _o = () => {
|
|
|
880
882
|
var l;
|
|
881
883
|
(l = u.current) == null || l.cancel();
|
|
882
884
|
};
|
|
883
|
-
}, [n, t]),
|
|
885
|
+
}, [n, t]), k(() => {
|
|
884
886
|
var l;
|
|
885
887
|
[].slice.call(o.current.children).forEach((T) => {
|
|
886
888
|
T.classList.add(ze["rp-text-layer-text"]);
|
|
@@ -897,29 +899,29 @@ const _o = () => {
|
|
|
897
899
|
onMouseUp: m
|
|
898
900
|
}
|
|
899
901
|
);
|
|
900
|
-
},
|
|
902
|
+
}, Lo = {
|
|
901
903
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
902
904
|
};
|
|
903
|
-
let
|
|
904
|
-
const
|
|
905
|
-
const { pageNumber: t } = e, n = W(null), { pages: o, pdf: r } = X(), a = W(), [c, s] =
|
|
906
|
-
|
|
905
|
+
let Ro = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
906
|
+
const Eo = (e) => {
|
|
907
|
+
const { pageNumber: t } = e, n = W(null), { pages: o, pdf: r } = X(), a = W(), [c, s] = $(), { setFocusedPage: d, goToPage: u } = ie(), { scrollMode: p } = Ne(), { print: f } = nt(), { download: h } = qn(), g = M(() => o.get(t), [o, t]), P = M(() => g == null ? void 0 : g.page.getViewport(), [g]);
|
|
908
|
+
k(() => {
|
|
907
909
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
908
|
-
}, [r]),
|
|
910
|
+
}, [r]), k(() => {
|
|
909
911
|
g && g.page.getAnnotations().then((v) => {
|
|
910
912
|
a.current = void 0, s(v), n.current && (n.current.innerText = "");
|
|
911
913
|
});
|
|
912
914
|
}, [g]);
|
|
913
915
|
const b = L(
|
|
914
916
|
(v) => {
|
|
915
|
-
!c || !r || (
|
|
917
|
+
!c || !r || (Nr(v), Or(v, r, c).then((S) => {
|
|
916
918
|
var m, w;
|
|
917
919
|
((m = S == null ? void 0 : S.data) == null ? void 0 : m.action) === "Print" ? f() : ((w = S == null ? void 0 : S.data) == null ? void 0 : w.action) === "SaveAs" && h();
|
|
918
|
-
}), p ===
|
|
920
|
+
}), p === Q.PAGE_SCROLLING ? kt(v, c, r, (S) => d(S.pageIndex + 1)) : kt(v, c, r, (S) => u(S.pageIndex + 1)));
|
|
919
921
|
},
|
|
920
922
|
[r, c, u, d, p, f, h]
|
|
921
923
|
);
|
|
922
|
-
return
|
|
924
|
+
return k(() => {
|
|
923
925
|
if (!g || !c)
|
|
924
926
|
return;
|
|
925
927
|
const v = g.page.getViewport();
|
|
@@ -934,17 +936,17 @@ const Io = (e) => {
|
|
|
934
936
|
const { annotationType: l } = C;
|
|
935
937
|
switch (l) {
|
|
936
938
|
case Ft.Link:
|
|
937
|
-
|
|
939
|
+
zr(C);
|
|
938
940
|
break;
|
|
939
941
|
case Ft.Widget:
|
|
940
|
-
|
|
942
|
+
Dr(C, v, S);
|
|
941
943
|
break;
|
|
942
944
|
}
|
|
943
945
|
}
|
|
944
946
|
const m = new AbortController();
|
|
945
947
|
return (async () => {
|
|
946
948
|
var T;
|
|
947
|
-
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new
|
|
949
|
+
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new vr({
|
|
948
950
|
div: n.current,
|
|
949
951
|
accessibilityManager: void 0,
|
|
950
952
|
annotationCanvasMap: void 0,
|
|
@@ -964,14 +966,14 @@ const Io = (e) => {
|
|
|
964
966
|
div: n.current,
|
|
965
967
|
viewport: v.clone({ dontFlip: !0 }),
|
|
966
968
|
page: g.page,
|
|
967
|
-
imageResourcesPath:
|
|
969
|
+
imageResourcesPath: Ro,
|
|
968
970
|
renderForms: !0,
|
|
969
|
-
linkService: new
|
|
971
|
+
linkService: new Er(),
|
|
970
972
|
downloadManager: null,
|
|
971
973
|
enableScripting: !1
|
|
972
974
|
});
|
|
973
975
|
})().then(() => {
|
|
974
|
-
n.current &&
|
|
976
|
+
n.current && Ar(n.current, b);
|
|
975
977
|
}).catch((C) => {
|
|
976
978
|
if (C !== "abort")
|
|
977
979
|
throw C;
|
|
@@ -983,21 +985,21 @@ const Io = (e) => {
|
|
|
983
985
|
{
|
|
984
986
|
"data-rp": `page-${t}-annotationLayer`,
|
|
985
987
|
style: { width: `${P == null ? void 0 : P.width}px`, height: `${P == null ? void 0 : P.height}px` },
|
|
986
|
-
className:
|
|
988
|
+
className: Lo["rp-annotation-layer"],
|
|
987
989
|
ref: n
|
|
988
990
|
}
|
|
989
991
|
);
|
|
990
992
|
}, dt = {
|
|
991
993
|
"rp-text-highlight-layer": "_rp-text-highlight-layer_1fxd3_1",
|
|
992
994
|
"rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1fxd3_14"
|
|
993
|
-
},
|
|
994
|
-
const t = W(null), n = W(), o = W(), { pages: r } = X(), { highlightMatches: a } =
|
|
995
|
+
}, No = ({ pageNumber: e }) => {
|
|
996
|
+
const t = W(null), n = W(), o = W(), { pages: r } = X(), { highlightMatches: a } = _r(), c = M(() => a.filter((u) => u.pageIndex === e - 1), [a]), s = L(
|
|
995
997
|
(d, u, p = !1) => {
|
|
996
|
-
p && mn(d, u),
|
|
998
|
+
p && mn(d, u), hr(c, d, u);
|
|
997
999
|
},
|
|
998
1000
|
[c, r, e]
|
|
999
1001
|
);
|
|
1000
|
-
return
|
|
1002
|
+
return k(() => {
|
|
1001
1003
|
const d = r.get(e);
|
|
1002
1004
|
if (!d || !t.current)
|
|
1003
1005
|
return;
|
|
@@ -1021,14 +1023,14 @@ const Io = (e) => {
|
|
|
1021
1023
|
var p;
|
|
1022
1024
|
(p = n.current) == null || p.cancel();
|
|
1023
1025
|
};
|
|
1024
|
-
}, [r, e]),
|
|
1026
|
+
}, [r, e]), k(() => {
|
|
1025
1027
|
var p;
|
|
1026
1028
|
[].slice.call(t.current.children).forEach((f) => {
|
|
1027
1029
|
f.classList.add(dt["rp-text-highlight-layer-text"]);
|
|
1028
1030
|
});
|
|
1029
1031
|
const u = (p = n.current) == null ? void 0 : p.textDivs;
|
|
1030
1032
|
u && o.current && s(o.current, u, !0);
|
|
1031
|
-
}, [s]), /* @__PURE__ */ i(
|
|
1033
|
+
}, [s]), /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ i(
|
|
1032
1034
|
"div",
|
|
1033
1035
|
{
|
|
1034
1036
|
"data-rp": `page-${e}-textHighlightLayer`,
|
|
@@ -1037,11 +1039,11 @@ const Io = (e) => {
|
|
|
1037
1039
|
}
|
|
1038
1040
|
) });
|
|
1039
1041
|
}, Rt = We((e, t) => {
|
|
1040
|
-
const { pageNumber: n, style: o, ...r } = e, { pages: a } = X(), { rotate: c } = Je(), { textLayer: s } =
|
|
1042
|
+
const { pageNumber: n, style: o, ...r } = e, { pages: a } = X(), { rotate: c } = Je(), { textLayer: s } = cr(), { currentZoom: d } = Qe(), u = W(a.get(n)), [p, f] = $(!1), h = W(null), [g, P] = $({
|
|
1041
1043
|
width: 0,
|
|
1042
1044
|
height: 0
|
|
1043
1045
|
});
|
|
1044
|
-
dn(t, () => h.current),
|
|
1046
|
+
dn(t, () => h.current), k(() => {
|
|
1045
1047
|
if (a && (u.current = a.get(n), u.current)) {
|
|
1046
1048
|
const m = u.current.page.getViewport({ scale: d, rotation: c });
|
|
1047
1049
|
P(m);
|
|
@@ -1085,18 +1087,18 @@ const Io = (e) => {
|
|
|
1085
1087
|
},
|
|
1086
1088
|
className: lt["rp-page"],
|
|
1087
1089
|
children: [
|
|
1088
|
-
/* @__PURE__ */ i(
|
|
1090
|
+
/* @__PURE__ */ i(So, { onLoading: v, onLoaded: S, pageNumber: n }),
|
|
1089
1091
|
p && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Pt, {}) }),
|
|
1090
|
-
s && /* @__PURE__ */ i(
|
|
1091
|
-
/* @__PURE__ */ i(
|
|
1092
|
-
/* @__PURE__ */ i(
|
|
1092
|
+
s && /* @__PURE__ */ i(Io, { pageNumber: n }),
|
|
1093
|
+
/* @__PURE__ */ i(No, { pageNumber: n }),
|
|
1094
|
+
/* @__PURE__ */ i(Eo, { pageNumber: n })
|
|
1093
1095
|
]
|
|
1094
1096
|
}
|
|
1095
1097
|
)
|
|
1096
1098
|
}
|
|
1097
1099
|
);
|
|
1098
1100
|
});
|
|
1099
|
-
function
|
|
1101
|
+
function Ut(e) {
|
|
1100
1102
|
if (e === void 0)
|
|
1101
1103
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1102
1104
|
return e;
|
|
@@ -1106,25 +1108,25 @@ function wt(e, t) {
|
|
|
1106
1108
|
return n.__proto__ = o, n;
|
|
1107
1109
|
}, wt(e, t);
|
|
1108
1110
|
}
|
|
1109
|
-
function
|
|
1111
|
+
function Oo(e, t) {
|
|
1110
1112
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, wt(e, t);
|
|
1111
1113
|
}
|
|
1112
1114
|
var Zt = Number.isNaN || function(t) {
|
|
1113
1115
|
return typeof t == "number" && t !== t;
|
|
1114
1116
|
};
|
|
1115
|
-
function
|
|
1117
|
+
function Do(e, t) {
|
|
1116
1118
|
return !!(e === t || Zt(e) && Zt(t));
|
|
1117
1119
|
}
|
|
1118
|
-
function
|
|
1120
|
+
function zo(e, t) {
|
|
1119
1121
|
if (e.length !== t.length)
|
|
1120
1122
|
return !1;
|
|
1121
1123
|
for (var n = 0; n < e.length; n++)
|
|
1122
|
-
if (!
|
|
1124
|
+
if (!Do(e[n], t[n]))
|
|
1123
1125
|
return !1;
|
|
1124
1126
|
return !0;
|
|
1125
1127
|
}
|
|
1126
1128
|
function ut(e, t) {
|
|
1127
|
-
t === void 0 && (t =
|
|
1129
|
+
t === void 0 && (t = zo);
|
|
1128
1130
|
var n, o = [], r, a = !1;
|
|
1129
1131
|
function c() {
|
|
1130
1132
|
for (var s = [], d = 0; d < arguments.length; d++)
|
|
@@ -1145,7 +1147,7 @@ function Bt(e, t) {
|
|
|
1145
1147
|
}
|
|
1146
1148
|
return n;
|
|
1147
1149
|
}
|
|
1148
|
-
var
|
|
1150
|
+
var Ao = typeof performance == "object" && typeof performance.now == "function", jt = Ao ? function() {
|
|
1149
1151
|
return performance.now();
|
|
1150
1152
|
} : function() {
|
|
1151
1153
|
return Date.now();
|
|
@@ -1153,7 +1155,7 @@ var Oo = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1153
1155
|
function Kt(e) {
|
|
1154
1156
|
cancelAnimationFrame(e.id);
|
|
1155
1157
|
}
|
|
1156
|
-
function
|
|
1158
|
+
function Fo(e, t) {
|
|
1157
1159
|
var n = jt();
|
|
1158
1160
|
function o() {
|
|
1159
1161
|
jt() - n >= t ? e.call(null) : r.id = requestAnimationFrame(o);
|
|
@@ -1164,54 +1166,54 @@ function Do(e, t) {
|
|
|
1164
1166
|
return r;
|
|
1165
1167
|
}
|
|
1166
1168
|
var pt = -1;
|
|
1167
|
-
function
|
|
1169
|
+
function ko(e) {
|
|
1168
1170
|
if (e === void 0 && (e = !1), pt === -1 || e) {
|
|
1169
1171
|
var t = document.createElement("div"), n = t.style;
|
|
1170
1172
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), pt = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
1171
1173
|
}
|
|
1172
1174
|
return pt;
|
|
1173
1175
|
}
|
|
1174
|
-
var
|
|
1176
|
+
var Le = null;
|
|
1175
1177
|
function Xt(e) {
|
|
1176
|
-
if (e === void 0 && (e = !1),
|
|
1178
|
+
if (e === void 0 && (e = !1), Le === null || e) {
|
|
1177
1179
|
var t = document.createElement("div"), n = t.style;
|
|
1178
1180
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
1179
1181
|
var o = document.createElement("div"), r = o.style;
|
|
1180
|
-
return r.width = "100px", r.height = "100px", t.appendChild(o), document.body.appendChild(t), t.scrollLeft > 0 ?
|
|
1182
|
+
return r.width = "100px", r.height = "100px", t.appendChild(o), document.body.appendChild(t), t.scrollLeft > 0 ? Le = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? Le = "negative" : Le = "positive-ascending"), document.body.removeChild(t), Le;
|
|
1181
1183
|
}
|
|
1182
|
-
return
|
|
1184
|
+
return Le;
|
|
1183
1185
|
}
|
|
1184
|
-
var
|
|
1186
|
+
var Mo = 150, Wo = function(t) {
|
|
1185
1187
|
var n = t.columnIndex;
|
|
1186
1188
|
t.data;
|
|
1187
1189
|
var o = t.rowIndex;
|
|
1188
1190
|
return o + ":" + n;
|
|
1189
|
-
},
|
|
1190
|
-
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (
|
|
1191
|
-
function
|
|
1191
|
+
}, qe = null, Ue = null, Ze = null;
|
|
1192
|
+
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (qe = /* @__PURE__ */ new WeakSet(), Ue = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet());
|
|
1193
|
+
function Ho(e) {
|
|
1192
1194
|
var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, d = e.getOffsetForColumnAndAlignment, u = e.getOffsetForRowAndAlignment, p = e.getRowHeight, f = e.getRowOffset, h = e.getRowStartIndexForOffset, g = e.getRowStopIndexForStartIndex, P = e.initInstanceProps, b = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
|
|
1193
1195
|
return t = /* @__PURE__ */ function(S) {
|
|
1194
|
-
|
|
1196
|
+
Oo(m, S);
|
|
1195
1197
|
function m(C) {
|
|
1196
1198
|
var l;
|
|
1197
|
-
return l = S.call(this, C) || this, l._instanceProps = P(l.props,
|
|
1198
|
-
instance:
|
|
1199
|
+
return l = S.call(this, C) || this, l._instanceProps = P(l.props, Ut(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
|
|
1200
|
+
instance: Ut(l),
|
|
1199
1201
|
isScrolling: !1,
|
|
1200
1202
|
horizontalScrollDirection: "forward",
|
|
1201
1203
|
scrollLeft: typeof l.props.initialScrollLeft == "number" ? l.props.initialScrollLeft : 0,
|
|
1202
1204
|
scrollTop: typeof l.props.initialScrollTop == "number" ? l.props.initialScrollTop : 0,
|
|
1203
1205
|
scrollUpdateWasRequested: !1,
|
|
1204
1206
|
verticalScrollDirection: "forward"
|
|
1205
|
-
}, l._callOnItemsRendered = void 0, l._callOnItemsRendered = ut(function(T, _, y, E, I,
|
|
1207
|
+
}, l._callOnItemsRendered = void 0, l._callOnItemsRendered = ut(function(T, _, y, E, I, O, R, F) {
|
|
1206
1208
|
return l.props.onItemsRendered({
|
|
1207
1209
|
overscanColumnStartIndex: T,
|
|
1208
1210
|
overscanColumnStopIndex: _,
|
|
1209
1211
|
overscanRowStartIndex: y,
|
|
1210
1212
|
overscanRowStopIndex: E,
|
|
1211
1213
|
visibleColumnStartIndex: I,
|
|
1212
|
-
visibleColumnStopIndex:
|
|
1214
|
+
visibleColumnStopIndex: O,
|
|
1213
1215
|
visibleRowStartIndex: R,
|
|
1214
|
-
visibleRowStopIndex:
|
|
1216
|
+
visibleRowStopIndex: F
|
|
1215
1217
|
});
|
|
1216
1218
|
}), l._callOnScroll = void 0, l._callOnScroll = ut(function(T, _, y, E, I) {
|
|
1217
1219
|
return l.props.onScroll({
|
|
@@ -1222,46 +1224,46 @@ function ko(e) {
|
|
|
1222
1224
|
scrollUpdateWasRequested: I
|
|
1223
1225
|
});
|
|
1224
1226
|
}), l._getItemStyle = void 0, l._getItemStyle = function(T, _) {
|
|
1225
|
-
var y = l.props, E = y.columnWidth, I = y.direction,
|
|
1226
|
-
if (R.hasOwnProperty(
|
|
1227
|
-
|
|
1227
|
+
var y = l.props, E = y.columnWidth, I = y.direction, O = y.rowHeight, R = l._getItemStyleCache(b && E, b && I, b && O), F = T + ":" + _, z;
|
|
1228
|
+
if (R.hasOwnProperty(F))
|
|
1229
|
+
z = R[F];
|
|
1228
1230
|
else {
|
|
1229
|
-
var
|
|
1230
|
-
R[
|
|
1231
|
+
var N = n(l.props, _, l._instanceProps), x = I === "rtl";
|
|
1232
|
+
R[F] = z = {
|
|
1231
1233
|
position: "absolute",
|
|
1232
|
-
left: x ? void 0 :
|
|
1233
|
-
right: x ?
|
|
1234
|
+
left: x ? void 0 : N,
|
|
1235
|
+
right: x ? N : void 0,
|
|
1234
1236
|
top: f(l.props, T, l._instanceProps),
|
|
1235
1237
|
height: p(l.props, T, l._instanceProps),
|
|
1236
1238
|
width: a(l.props, _, l._instanceProps)
|
|
1237
1239
|
};
|
|
1238
1240
|
}
|
|
1239
|
-
return
|
|
1241
|
+
return z;
|
|
1240
1242
|
}, l._getItemStyleCache = void 0, l._getItemStyleCache = ut(function(T, _, y) {
|
|
1241
1243
|
return {};
|
|
1242
1244
|
}), l._onScroll = function(T) {
|
|
1243
|
-
var _ = T.currentTarget, y = _.clientHeight, E = _.clientWidth, I = _.scrollLeft,
|
|
1244
|
-
l.setState(function(
|
|
1245
|
-
if (
|
|
1245
|
+
var _ = T.currentTarget, y = _.clientHeight, E = _.clientWidth, I = _.scrollLeft, O = _.scrollTop, R = _.scrollHeight, F = _.scrollWidth;
|
|
1246
|
+
l.setState(function(z) {
|
|
1247
|
+
if (z.scrollLeft === I && z.scrollTop === O)
|
|
1246
1248
|
return null;
|
|
1247
|
-
var
|
|
1248
|
-
if (
|
|
1249
|
+
var N = l.props.direction, x = I;
|
|
1250
|
+
if (N === "rtl")
|
|
1249
1251
|
switch (Xt()) {
|
|
1250
1252
|
case "negative":
|
|
1251
1253
|
x = -I;
|
|
1252
1254
|
break;
|
|
1253
1255
|
case "positive-descending":
|
|
1254
|
-
x =
|
|
1256
|
+
x = F - E - I;
|
|
1255
1257
|
break;
|
|
1256
1258
|
}
|
|
1257
|
-
x = Math.max(0, Math.min(x,
|
|
1258
|
-
var
|
|
1259
|
+
x = Math.max(0, Math.min(x, F - E));
|
|
1260
|
+
var D = Math.max(0, Math.min(O, R - y));
|
|
1259
1261
|
return {
|
|
1260
1262
|
isScrolling: !0,
|
|
1261
|
-
horizontalScrollDirection:
|
|
1263
|
+
horizontalScrollDirection: z.scrollLeft < I ? "forward" : "backward",
|
|
1262
1264
|
scrollLeft: x,
|
|
1263
|
-
scrollTop:
|
|
1264
|
-
verticalScrollDirection:
|
|
1265
|
+
scrollTop: D,
|
|
1266
|
+
verticalScrollDirection: z.scrollTop < O ? "forward" : "backward",
|
|
1265
1267
|
scrollUpdateWasRequested: !1
|
|
1266
1268
|
};
|
|
1267
1269
|
}, l._resetIsScrollingDebounced);
|
|
@@ -1269,7 +1271,7 @@ function ko(e) {
|
|
|
1269
1271
|
var _ = l.props.outerRef;
|
|
1270
1272
|
l._outerRef = T, typeof _ == "function" ? _(T) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = T);
|
|
1271
1273
|
}, l._resetIsScrollingDebounced = function() {
|
|
1272
|
-
l._resetIsScrollingTimeoutId !== null && Kt(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId =
|
|
1274
|
+
l._resetIsScrollingTimeoutId !== null && Kt(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId = Fo(l._resetIsScrolling, Mo);
|
|
1273
1275
|
}, l._resetIsScrolling = function() {
|
|
1274
1276
|
l._resetIsScrollingTimeoutId = null, l.setState({
|
|
1275
1277
|
isScrolling: !1
|
|
@@ -1279,7 +1281,7 @@ function ko(e) {
|
|
|
1279
1281
|
}, l;
|
|
1280
1282
|
}
|
|
1281
1283
|
m.getDerivedStateFromProps = function(l, T) {
|
|
1282
|
-
return
|
|
1284
|
+
return $o(l, T), v(l), null;
|
|
1283
1285
|
};
|
|
1284
1286
|
var w = m.prototype;
|
|
1285
1287
|
return w.scrollTo = function(l) {
|
|
@@ -1294,12 +1296,12 @@ function ko(e) {
|
|
|
1294
1296
|
};
|
|
1295
1297
|
}, this._resetIsScrollingDebounced);
|
|
1296
1298
|
}, w.scrollToItem = function(l) {
|
|
1297
|
-
var T = l.align, _ = T === void 0 ? "auto" : T, y = l.columnIndex, E = l.rowIndex, I = this.props,
|
|
1298
|
-
y !== void 0 && (y = Math.max(0, Math.min(y,
|
|
1299
|
-
var
|
|
1299
|
+
var T = l.align, _ = T === void 0 ? "auto" : T, y = l.columnIndex, E = l.rowIndex, I = this.props, O = I.columnCount, R = I.height, F = I.rowCount, z = I.width, N = this.state, x = N.scrollLeft, D = N.scrollTop, H = ko();
|
|
1300
|
+
y !== void 0 && (y = Math.max(0, Math.min(y, O - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, F - 1)));
|
|
1301
|
+
var Z = c(this.props, this._instanceProps), Y = s(this.props, this._instanceProps), j = Y > z ? H : 0, B = Z > R ? H : 0;
|
|
1300
1302
|
this.scrollTo({
|
|
1301
1303
|
scrollLeft: y !== void 0 ? d(this.props, y, _, x, this._instanceProps, B) : x,
|
|
1302
|
-
scrollTop: E !== void 0 ? u(this.props, E, _,
|
|
1304
|
+
scrollTop: E !== void 0 ? u(this.props, E, _, D, this._instanceProps, j) : D
|
|
1303
1305
|
});
|
|
1304
1306
|
}, w.componentDidMount = function() {
|
|
1305
1307
|
var l = this.props, T = l.initialScrollLeft, _ = l.initialScrollTop;
|
|
@@ -1321,8 +1323,8 @@ function ko(e) {
|
|
|
1321
1323
|
I.scrollLeft = _;
|
|
1322
1324
|
break;
|
|
1323
1325
|
default:
|
|
1324
|
-
var
|
|
1325
|
-
I.scrollLeft = R -
|
|
1326
|
+
var O = I.clientWidth, R = I.scrollWidth;
|
|
1327
|
+
I.scrollLeft = R - O - _;
|
|
1326
1328
|
break;
|
|
1327
1329
|
}
|
|
1328
1330
|
else
|
|
@@ -1333,28 +1335,28 @@ function ko(e) {
|
|
|
1333
1335
|
}, w.componentWillUnmount = function() {
|
|
1334
1336
|
this._resetIsScrollingTimeoutId !== null && Kt(this._resetIsScrollingTimeoutId);
|
|
1335
1337
|
}, w.render = function() {
|
|
1336
|
-
var l = this.props, T = l.children, _ = l.className, y = l.columnCount, E = l.direction, I = l.height,
|
|
1337
|
-
if (y > 0 &&
|
|
1338
|
-
for (var
|
|
1339
|
-
for (var
|
|
1340
|
-
|
|
1341
|
-
columnIndex:
|
|
1342
|
-
data:
|
|
1343
|
-
isScrolling:
|
|
1338
|
+
var l = this.props, T = l.children, _ = l.className, y = l.columnCount, E = l.direction, I = l.height, O = l.innerRef, R = l.innerElementType, F = l.innerTagName, z = l.itemData, N = l.itemKey, x = N === void 0 ? Wo : N, D = l.outerElementType, H = l.outerTagName, Z = l.rowCount, Y = l.style, j = l.useIsScrolling, B = l.width, ee = this.state.isScrolling, ae = this._getHorizontalRangeToRender(), J = ae[0], te = ae[1], he = this._getVerticalRangeToRender(), le = he[0], Oe = he[1], _e = [];
|
|
1339
|
+
if (y > 0 && Z)
|
|
1340
|
+
for (var me = le; me <= Oe; me++)
|
|
1341
|
+
for (var de = J; de <= te; de++)
|
|
1342
|
+
_e.push(Ve(T, {
|
|
1343
|
+
columnIndex: de,
|
|
1344
|
+
data: z,
|
|
1345
|
+
isScrolling: j ? ee : void 0,
|
|
1344
1346
|
key: x({
|
|
1345
|
-
columnIndex:
|
|
1346
|
-
data:
|
|
1347
|
-
rowIndex:
|
|
1347
|
+
columnIndex: de,
|
|
1348
|
+
data: z,
|
|
1349
|
+
rowIndex: me
|
|
1348
1350
|
}),
|
|
1349
|
-
rowIndex:
|
|
1350
|
-
style: this._getItemStyle(
|
|
1351
|
+
rowIndex: me,
|
|
1352
|
+
style: this._getItemStyle(me, de)
|
|
1351
1353
|
}));
|
|
1352
1354
|
var De = c(this.props, this._instanceProps), rt = s(this.props, this._instanceProps);
|
|
1353
|
-
return Ve(
|
|
1355
|
+
return Ve(D || H || "div", {
|
|
1354
1356
|
className: _,
|
|
1355
1357
|
onScroll: this._onScroll,
|
|
1356
1358
|
ref: this._outerRefSetter,
|
|
1357
|
-
style:
|
|
1359
|
+
style: Fr({
|
|
1358
1360
|
position: "relative",
|
|
1359
1361
|
height: I,
|
|
1360
1362
|
width: B,
|
|
@@ -1363,48 +1365,48 @@ function ko(e) {
|
|
|
1363
1365
|
willChange: "transform",
|
|
1364
1366
|
direction: E
|
|
1365
1367
|
}, Y)
|
|
1366
|
-
}, Ve(R ||
|
|
1367
|
-
children:
|
|
1368
|
-
ref:
|
|
1368
|
+
}, Ve(R || F || "div", {
|
|
1369
|
+
children: _e,
|
|
1370
|
+
ref: O,
|
|
1369
1371
|
style: {
|
|
1370
1372
|
height: De,
|
|
1371
|
-
pointerEvents:
|
|
1373
|
+
pointerEvents: ee ? "none" : void 0,
|
|
1372
1374
|
width: rt
|
|
1373
1375
|
}
|
|
1374
1376
|
}));
|
|
1375
1377
|
}, w._callPropsCallbacks = function() {
|
|
1376
1378
|
var l = this.props, T = l.columnCount, _ = l.onItemsRendered, y = l.onScroll, E = l.rowCount;
|
|
1377
1379
|
if (typeof _ == "function" && T > 0 && E > 0) {
|
|
1378
|
-
var I = this._getHorizontalRangeToRender(),
|
|
1379
|
-
this._callOnItemsRendered(
|
|
1380
|
+
var I = this._getHorizontalRangeToRender(), O = I[0], R = I[1], F = I[2], z = I[3], N = this._getVerticalRangeToRender(), x = N[0], D = N[1], H = N[2], Z = N[3];
|
|
1381
|
+
this._callOnItemsRendered(O, R, x, D, F, z, H, Z);
|
|
1380
1382
|
}
|
|
1381
1383
|
if (typeof y == "function") {
|
|
1382
|
-
var Y = this.state,
|
|
1383
|
-
this._callOnScroll(B,
|
|
1384
|
+
var Y = this.state, j = Y.horizontalScrollDirection, B = Y.scrollLeft, ee = Y.scrollTop, ae = Y.scrollUpdateWasRequested, J = Y.verticalScrollDirection;
|
|
1385
|
+
this._callOnScroll(B, ee, j, J, ae);
|
|
1384
1386
|
}
|
|
1385
1387
|
}, w._getHorizontalRangeToRender = function() {
|
|
1386
|
-
var l = this.props, T = l.columnCount, _ = l.overscanColumnCount, y = l.overscanColumnsCount, E = l.overscanCount, I = l.rowCount,
|
|
1388
|
+
var l = this.props, T = l.columnCount, _ = l.overscanColumnCount, y = l.overscanColumnsCount, E = l.overscanCount, I = l.rowCount, O = this.state, R = O.horizontalScrollDirection, F = O.isScrolling, z = O.scrollLeft, N = _ || y || E || 1;
|
|
1387
1389
|
if (T === 0 || I === 0)
|
|
1388
1390
|
return [0, 0, 0, 0];
|
|
1389
|
-
var x = o(this.props,
|
|
1390
|
-
return [Math.max(0, x -
|
|
1391
|
+
var x = o(this.props, z, this._instanceProps), D = r(this.props, x, z, this._instanceProps), H = !F || R === "backward" ? Math.max(1, N) : 1, Z = !F || R === "forward" ? Math.max(1, N) : 1;
|
|
1392
|
+
return [Math.max(0, x - H), Math.max(0, Math.min(T - 1, D + Z)), x, D];
|
|
1391
1393
|
}, w._getVerticalRangeToRender = function() {
|
|
1392
|
-
var l = this.props, T = l.columnCount, _ = l.overscanCount, y = l.overscanRowCount, E = l.overscanRowsCount, I = l.rowCount,
|
|
1394
|
+
var l = this.props, T = l.columnCount, _ = l.overscanCount, y = l.overscanRowCount, E = l.overscanRowsCount, I = l.rowCount, O = this.state, R = O.isScrolling, F = O.verticalScrollDirection, z = O.scrollTop, N = y || E || _ || 1;
|
|
1393
1395
|
if (T === 0 || I === 0)
|
|
1394
1396
|
return [0, 0, 0, 0];
|
|
1395
|
-
var x = h(this.props,
|
|
1396
|
-
return [Math.max(0, x -
|
|
1397
|
+
var x = h(this.props, z, this._instanceProps), D = g(this.props, x, z, this._instanceProps), H = !R || F === "backward" ? Math.max(1, N) : 1, Z = !R || F === "forward" ? Math.max(1, N) : 1;
|
|
1398
|
+
return [Math.max(0, x - H), Math.max(0, Math.min(I - 1, D + Z)), x, D];
|
|
1397
1399
|
}, m;
|
|
1398
|
-
}(
|
|
1400
|
+
}(nr), t.defaultProps = {
|
|
1399
1401
|
direction: "ltr",
|
|
1400
1402
|
itemData: void 0,
|
|
1401
1403
|
useIsScrolling: !1
|
|
1402
1404
|
}, t;
|
|
1403
1405
|
}
|
|
1404
|
-
var
|
|
1406
|
+
var $o = function(t, n) {
|
|
1405
1407
|
var o = t.children, r = t.direction, a = t.height, c = t.innerTagName, s = t.outerTagName, d = t.overscanColumnsCount, u = t.overscanCount, p = t.overscanRowsCount, f = t.width, h = n.instance;
|
|
1406
1408
|
if (process.env.NODE_ENV !== "production") {
|
|
1407
|
-
if (typeof u == "number" &&
|
|
1409
|
+
if (typeof u == "number" && qe && !qe.has(h) && (qe.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof p == "number") && Ue && !Ue.has(h) && (Ue.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && Ze && !Ze.has(h) && (Ze.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1408
1410
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1409
1411
|
switch (r) {
|
|
1410
1412
|
case "ltr":
|
|
@@ -1434,7 +1436,7 @@ var Mo = function(t, n) {
|
|
|
1434
1436
|
}
|
|
1435
1437
|
var u = o - c - 1, p = u * a;
|
|
1436
1438
|
return s + p;
|
|
1437
|
-
},
|
|
1439
|
+
}, fe = function(t, n, o, r) {
|
|
1438
1440
|
var a, c, s;
|
|
1439
1441
|
if (t === "column" ? (a = r.columnMetadataMap, c = n.columnWidth, s = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, c = n.rowHeight, s = r.lastMeasuredRowIndex), o > s) {
|
|
1440
1442
|
var d = 0;
|
|
@@ -1456,21 +1458,21 @@ var Mo = function(t, n) {
|
|
|
1456
1458
|
var a, c;
|
|
1457
1459
|
t === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
|
|
1458
1460
|
var s = c > 0 ? a[c].offset : 0;
|
|
1459
|
-
return s >= r ? Rn(t, n, o, c, 0, r) :
|
|
1461
|
+
return s >= r ? Rn(t, n, o, c, 0, r) : Go(t, n, o, Math.max(0, c), r);
|
|
1460
1462
|
}, Rn = function(t, n, o, r, a, c) {
|
|
1461
1463
|
for (; a <= r; ) {
|
|
1462
|
-
var s = a + Math.floor((r - a) / 2), d =
|
|
1464
|
+
var s = a + Math.floor((r - a) / 2), d = fe(t, n, s, o).offset;
|
|
1463
1465
|
if (d === c)
|
|
1464
1466
|
return s;
|
|
1465
1467
|
d < c ? a = s + 1 : d > c && (r = s - 1);
|
|
1466
1468
|
}
|
|
1467
1469
|
return a > 0 ? a - 1 : 0;
|
|
1468
|
-
},
|
|
1469
|
-
for (var c = t === "column" ? n.columnCount : n.rowCount, s = 1; r < c &&
|
|
1470
|
+
}, Go = function(t, n, o, r, a) {
|
|
1471
|
+
for (var c = t === "column" ? n.columnCount : n.rowCount, s = 1; r < c && fe(t, n, r, o).offset < a; )
|
|
1470
1472
|
r += s, s *= 2;
|
|
1471
1473
|
return Rn(t, n, o, Math.min(r, c - 1), Math.floor(r / 2), a);
|
|
1472
1474
|
}, Qt = function(t, n, o, r, a, c, s) {
|
|
1473
|
-
var d = t === "column" ? n.width : n.height, u =
|
|
1475
|
+
var d = t === "column" ? n.width : n.height, u = fe(t, n, o, c), p = t === "column" ? Ln(n, c) : In(n, c), f = Math.max(0, Math.min(p - d, u.offset)), h = Math.max(0, u.offset - d + s + u.size);
|
|
1474
1476
|
switch (r === "smart" && (a >= h - d && a <= f + d ? r = "auto" : r = "center"), r) {
|
|
1475
1477
|
case "start":
|
|
1476
1478
|
return f;
|
|
@@ -1482,16 +1484,16 @@ var Mo = function(t, n) {
|
|
|
1482
1484
|
default:
|
|
1483
1485
|
return a >= h && a <= f ? a : h > f || a < h ? h : f;
|
|
1484
1486
|
}
|
|
1485
|
-
},
|
|
1487
|
+
}, Vo = /* @__PURE__ */ Ho({
|
|
1486
1488
|
getColumnOffset: function(t, n, o) {
|
|
1487
|
-
return
|
|
1489
|
+
return fe("column", t, n, o).offset;
|
|
1488
1490
|
},
|
|
1489
1491
|
getColumnStartIndexForOffset: function(t, n, o) {
|
|
1490
1492
|
return Jt("column", t, o, n);
|
|
1491
1493
|
},
|
|
1492
1494
|
getColumnStopIndexForStartIndex: function(t, n, o, r) {
|
|
1493
|
-
for (var a = t.columnCount, c = t.width, s =
|
|
1494
|
-
p++, u +=
|
|
1495
|
+
for (var a = t.columnCount, c = t.width, s = fe("column", t, n, r), d = o + c, u = s.offset + s.size, p = n; p < a - 1 && u < d; )
|
|
1496
|
+
p++, u += fe("column", t, p, r).size;
|
|
1495
1497
|
return p;
|
|
1496
1498
|
},
|
|
1497
1499
|
getColumnWidth: function(t, n, o) {
|
|
@@ -1506,7 +1508,7 @@ var Mo = function(t, n) {
|
|
|
1506
1508
|
return Qt("row", t, n, o, r, a, c);
|
|
1507
1509
|
},
|
|
1508
1510
|
getRowOffset: function(t, n, o) {
|
|
1509
|
-
return
|
|
1511
|
+
return fe("row", t, n, o).offset;
|
|
1510
1512
|
},
|
|
1511
1513
|
getRowHeight: function(t, n, o) {
|
|
1512
1514
|
return o.rowMetadataMap[n].size;
|
|
@@ -1515,8 +1517,8 @@ var Mo = function(t, n) {
|
|
|
1515
1517
|
return Jt("row", t, o, n);
|
|
1516
1518
|
},
|
|
1517
1519
|
getRowStopIndexForStartIndex: function(t, n, o, r) {
|
|
1518
|
-
for (var a = t.rowCount, c = t.height, s =
|
|
1519
|
-
p++, u +=
|
|
1520
|
+
for (var a = t.rowCount, c = t.height, s = fe("row", t, n, r), d = o + c, u = s.offset + s.size, p = n; p < a - 1 && u < d; )
|
|
1521
|
+
p++, u += fe("row", t, p, r).size;
|
|
1520
1522
|
return p;
|
|
1521
1523
|
},
|
|
1522
1524
|
initInstanceProps: function(t, n) {
|
|
@@ -1564,23 +1566,23 @@ function en(e, t) {
|
|
|
1564
1566
|
return !0;
|
|
1565
1567
|
return !1;
|
|
1566
1568
|
}
|
|
1567
|
-
var
|
|
1568
|
-
function
|
|
1569
|
-
var n = e.style, o = Bt(e,
|
|
1569
|
+
var qo = ["style"], Uo = ["style"];
|
|
1570
|
+
function Zo(e, t) {
|
|
1571
|
+
var n = e.style, o = Bt(e, qo), r = t.style, a = Bt(t, Uo);
|
|
1570
1572
|
return !en(n, r) && !en(o, a);
|
|
1571
1573
|
}
|
|
1572
|
-
const
|
|
1573
|
-
const { viewMode: e } = He(), { scrollMode: t } =
|
|
1574
|
+
const Bo = () => {
|
|
1575
|
+
const { viewMode: e } = He(), { scrollMode: t } = Ne(), { setColumnCount: n } = pn(), { virtualScrollableElementRef: o } = et(), r = tt(), a = L(
|
|
1574
1576
|
(g) => r.widths[g] || 0,
|
|
1575
1577
|
[r.widths]
|
|
1576
1578
|
), c = L(
|
|
1577
1579
|
(g) => r.heights[g] || 0,
|
|
1578
1580
|
[r.heights]
|
|
1579
|
-
), s = M(() => r.heights.length, [r.heights]), d = M(() => Math.max(...r.widths), [r.widths]), u = M(() => t ===
|
|
1580
|
-
|
|
1581
|
+
), s = M(() => r.heights.length, [r.heights]), d = M(() => Math.max(...r.widths), [r.widths]), u = M(() => t === Q.HORIZONTAL_SCROLLING ? s : e === Be.DUAL_PAGE ? 2 : 1, [e, t, t, s, o, d]);
|
|
1582
|
+
k(() => {
|
|
1581
1583
|
n(u);
|
|
1582
1584
|
}, [u, n]);
|
|
1583
|
-
const p = M(() => t ===
|
|
1585
|
+
const p = M(() => t === Q.HORIZONTAL_SCROLLING || t === Q.PAGE_SCROLLING ? 1 : Math.round(s / u), [u, s, t]), f = M(() => r.heights.reduce((g, P) => g + P, 0) / r.heights.length || 0, [r]), h = M(() => r.widths.reduce((g, P) => g + P, 0) / r.heights.length || 0, [r]);
|
|
1584
1586
|
return {
|
|
1585
1587
|
rowCount: p,
|
|
1586
1588
|
rowHeight: c,
|
|
@@ -1591,10 +1593,10 @@ const Uo = () => {
|
|
|
1591
1593
|
estimatedColumnWidth: h
|
|
1592
1594
|
};
|
|
1593
1595
|
};
|
|
1594
|
-
let
|
|
1595
|
-
typeof window < "u" ?
|
|
1596
|
+
let oe;
|
|
1597
|
+
typeof window < "u" ? oe = window : typeof self < "u" ? oe = self : oe = global;
|
|
1596
1598
|
let bt = null, Ct = null;
|
|
1597
|
-
const tn = 20, ht =
|
|
1599
|
+
const tn = 20, ht = oe.clearTimeout, nn = oe.setTimeout, mt = oe.cancelAnimationFrame || oe.mozCancelAnimationFrame || oe.webkitCancelAnimationFrame, rn = oe.requestAnimationFrame || oe.mozRequestAnimationFrame || oe.webkitRequestAnimationFrame;
|
|
1598
1600
|
mt == null || rn == null ? (bt = ht, Ct = function(t) {
|
|
1599
1601
|
return nn(t, tn);
|
|
1600
1602
|
}) : (bt = function([t, n]) {
|
|
@@ -1607,7 +1609,7 @@ mt == null || rn == null ? (bt = ht, Ct = function(t) {
|
|
|
1607
1609
|
}, tn);
|
|
1608
1610
|
return [n, o];
|
|
1609
1611
|
});
|
|
1610
|
-
function
|
|
1612
|
+
function jo(e) {
|
|
1611
1613
|
let t, n, o, r, a, c, s;
|
|
1612
1614
|
const d = typeof document < "u" && document.attachEvent;
|
|
1613
1615
|
if (!d) {
|
|
@@ -1654,7 +1656,7 @@ function qo(e) {
|
|
|
1654
1656
|
h.attachEvent("onresize", g);
|
|
1655
1657
|
else {
|
|
1656
1658
|
if (!h.__resizeTriggers__) {
|
|
1657
|
-
const P = h.ownerDocument, b =
|
|
1659
|
+
const P = h.ownerDocument, b = oe.getComputedStyle(h);
|
|
1658
1660
|
b && b.position === "static" && (h.style.position = "relative"), u(P), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = P.createElement("div")).className = "resize-triggers";
|
|
1659
1661
|
const v = P.createElement("div");
|
|
1660
1662
|
v.className = "expand-trigger", v.appendChild(P.createElement("div"));
|
|
@@ -1679,7 +1681,7 @@ function qo(e) {
|
|
|
1679
1681
|
}
|
|
1680
1682
|
};
|
|
1681
1683
|
}
|
|
1682
|
-
class
|
|
1684
|
+
class Ko extends rr {
|
|
1683
1685
|
constructor(...t) {
|
|
1684
1686
|
super(...t), this.state = {
|
|
1685
1687
|
height: this.props.defaultHeight || 0,
|
|
@@ -1720,7 +1722,7 @@ class Zo extends nr {
|
|
|
1720
1722
|
const o = n.ownerDocument.defaultView.ResizeObserver;
|
|
1721
1723
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1722
1724
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1723
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1725
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = jo(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1724
1726
|
}
|
|
1725
1727
|
}
|
|
1726
1728
|
componentWillUnmount() {
|
|
@@ -1758,8 +1760,8 @@ class Zo extends nr {
|
|
|
1758
1760
|
}, !m && t(S));
|
|
1759
1761
|
}
|
|
1760
1762
|
}
|
|
1761
|
-
const
|
|
1762
|
-
const { focusedPage: n, totalPages: o } =
|
|
1763
|
+
const Xo = ({ widths: e, heights: t }) => {
|
|
1764
|
+
const { focusedPage: n, totalPages: o } = ie(), r = M(() => {
|
|
1763
1765
|
const s = [], d = Math.ceil(n / 2) * 2 - 1;
|
|
1764
1766
|
if (s.push(d), d + 1 < o) {
|
|
1765
1767
|
const u = d + 1;
|
|
@@ -1782,8 +1784,8 @@ const Bo = ({ widths: e, heights: t }) => {
|
|
|
1782
1784
|
}
|
|
1783
1785
|
], [e, t, r]), c = M(() => a.reduce((s, d) => s + Number(d.width || 0), 0), [a]);
|
|
1784
1786
|
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: r.map((s, d) => /* @__PURE__ */ i(Rt, { style: a[d], pageNumber: s }, s)) });
|
|
1785
|
-
},
|
|
1786
|
-
const { focusedPage: n } =
|
|
1787
|
+
}, Yo = ({ widths: e, heights: t }) => {
|
|
1788
|
+
const { focusedPage: n } = ie(), o = M(() => ({
|
|
1787
1789
|
position: "absolute",
|
|
1788
1790
|
width: e(n - 1),
|
|
1789
1791
|
height: t(n - 1)
|
|
@@ -1798,9 +1800,9 @@ const Bo = ({ widths: e, heights: t }) => {
|
|
|
1798
1800
|
children: /* @__PURE__ */ i(Rt, { style: o, pageNumber: n }, n)
|
|
1799
1801
|
}
|
|
1800
1802
|
);
|
|
1801
|
-
},
|
|
1802
|
-
const o = W(), { contentRef: r } =
|
|
1803
|
-
const v = c[b], S =
|
|
1803
|
+
}, Jo = (e, t, n) => {
|
|
1804
|
+
const o = W(), { contentRef: r } = Ce(), { heights: a, widths: c } = tt(), { setFocusedPage: s } = ie(), [d, u] = $([]), { targetScrollPage: p } = fn(), f = St(d, 0, 500), h = M(() => a.map((P, b) => {
|
|
1805
|
+
const v = c[b], S = Gr(b + 1, e), m = v * S.columnIndex, w = P * S.rowIndex, C = m + v, l = w + P;
|
|
1804
1806
|
return {
|
|
1805
1807
|
pageNumber: b + 1,
|
|
1806
1808
|
...S,
|
|
@@ -1812,7 +1814,7 @@ const Bo = ({ widths: e, heights: t }) => {
|
|
|
1812
1814
|
endY: l
|
|
1813
1815
|
};
|
|
1814
1816
|
}), [a, c, e, t]);
|
|
1815
|
-
|
|
1817
|
+
k(() => {
|
|
1816
1818
|
var b;
|
|
1817
1819
|
f.length > 0 && !p.current && s(f[0].pageNumber);
|
|
1818
1820
|
let P = (b = f[0]) == null ? void 0 : b.ratio;
|
|
@@ -1841,17 +1843,17 @@ const Bo = ({ widths: e, heights: t }) => {
|
|
|
1841
1843
|
},
|
|
1842
1844
|
[r, h]
|
|
1843
1845
|
);
|
|
1844
|
-
|
|
1846
|
+
k(() => {
|
|
1845
1847
|
if (n)
|
|
1846
1848
|
return n == null || n.addEventListener("scroll", g), () => {
|
|
1847
1849
|
n == null || n.removeEventListener("scroll", g);
|
|
1848
1850
|
};
|
|
1849
1851
|
}, [n, g]);
|
|
1850
|
-
},
|
|
1851
|
-
const r =
|
|
1852
|
+
}, Qo = or(({ columnIndex: e, rowIndex: t, data: n, style: o }) => {
|
|
1853
|
+
const r = Vr(t, e, n.columnCount);
|
|
1852
1854
|
return /* @__PURE__ */ i(Rt, { style: o, pageNumber: r }, r);
|
|
1853
|
-
},
|
|
1854
|
-
const { initialPage: e = 1, initialScrollMode: t, instanceId: n } =
|
|
1855
|
+
}, Zo), Fs = () => {
|
|
1856
|
+
const { initialPage: e = 1, initialScrollMode: t, instanceId: n } = dr(), { pagesRef: o, setPagesRef: r } = Ce(), { scrollToPage: a } = Cn(), {
|
|
1855
1857
|
virtualScrollRef: c,
|
|
1856
1858
|
getVirtualScrollRef: s,
|
|
1857
1859
|
getPageScrollElementRef: d,
|
|
@@ -1860,135 +1862,135 @@ const Bo = ({ widths: e, heights: t }) => {
|
|
|
1860
1862
|
virtualScrollableElementRef: f,
|
|
1861
1863
|
totalInnerDimensions: h,
|
|
1862
1864
|
pageScrollElementRef: g
|
|
1863
|
-
} = et(), P = W(!0), { nextPage: b, prevPage: v, setFocusedPage: S, focusedPage: m } =
|
|
1865
|
+
} = et(), P = W(!0), { nextPage: b, prevPage: v, setFocusedPage: S, focusedPage: m } = ie(), { scrollMode: w } = Ne(), { viewMode: C } = He(), l = W(null), { loading: T } = X(), { passwordRequired: _ } = ir(), { LoaderImageComponent: y } = gn(), E = W(
|
|
1864
1866
|
h
|
|
1865
|
-
),
|
|
1867
|
+
), I = W({
|
|
1866
1868
|
viewMode: C,
|
|
1867
1869
|
scrollMode: w
|
|
1868
|
-
}),
|
|
1870
|
+
}), O = W(!1), R = W(), { isFullScreen: F } = ur(), {
|
|
1869
1871
|
pageDimension: z,
|
|
1870
|
-
rowCount:
|
|
1871
|
-
rowHeight:
|
|
1872
|
-
columnCount:
|
|
1873
|
-
columnWidth:
|
|
1874
|
-
estimatedColumnWidth:
|
|
1875
|
-
estimatedRowHeight:
|
|
1876
|
-
} =
|
|
1877
|
-
|
|
1878
|
-
const
|
|
1872
|
+
rowCount: N,
|
|
1873
|
+
rowHeight: x,
|
|
1874
|
+
columnCount: D,
|
|
1875
|
+
columnWidth: H,
|
|
1876
|
+
estimatedColumnWidth: Z,
|
|
1877
|
+
estimatedRowHeight: Y
|
|
1878
|
+
} = Bo(), j = St(h, 100), B = W();
|
|
1879
|
+
Jo(D, N, f);
|
|
1880
|
+
const ee = W({
|
|
1879
1881
|
scrollTop: 0,
|
|
1880
1882
|
scrollLeft: 0
|
|
1881
1883
|
});
|
|
1882
|
-
|
|
1883
|
-
const { isPressed:
|
|
1884
|
-
isPressed:
|
|
1885
|
-
}),
|
|
1886
|
-
columnCount:
|
|
1887
|
-
}), [
|
|
1884
|
+
Hr(o);
|
|
1885
|
+
const { isPressed: ae } = Mr(), { selectionMode: J } = lr(), { initializeGrabScroll: te, resetGrabState: he } = Wr({
|
|
1886
|
+
isPressed: ae
|
|
1887
|
+
}), le = M(() => J === sr.HAND, [J]), Oe = M(() => ({
|
|
1888
|
+
columnCount: D
|
|
1889
|
+
}), [D]), _e = L(
|
|
1888
1890
|
(G) => {
|
|
1889
1891
|
const V = document.activeElement !== o;
|
|
1890
|
-
!
|
|
1892
|
+
!F && V || (["ArrowUp", "ArrowLeft"].includes(G.key) ? (G.preventDefault(), v()) : ["ArrowDown", "ArrowRight"].includes(G.key) && (G.preventDefault(), b()));
|
|
1891
1893
|
},
|
|
1892
|
-
[b, v,
|
|
1894
|
+
[b, v, F, w]
|
|
1893
1895
|
);
|
|
1894
|
-
|
|
1895
|
-
window.removeEventListener("keydown",
|
|
1896
|
-
}), [
|
|
1896
|
+
k(() => (window.addEventListener("keydown", _e), () => {
|
|
1897
|
+
window.removeEventListener("keydown", _e);
|
|
1898
|
+
}), [_e]), k(() => {
|
|
1897
1899
|
if (l.current && (l.current.style.position = "relative"), !!c)
|
|
1898
|
-
for (let G = 0; G <
|
|
1899
|
-
for (let V = 0; V <
|
|
1900
|
+
for (let G = 0; G < N; G++)
|
|
1901
|
+
for (let V = 0; V < D; V++)
|
|
1900
1902
|
c.resetAfterIndices({
|
|
1901
1903
|
columnIndex: V,
|
|
1902
1904
|
rowIndex: G,
|
|
1903
1905
|
shouldForceUpdate: !0
|
|
1904
1906
|
});
|
|
1905
|
-
}, [
|
|
1906
|
-
const
|
|
1907
|
+
}, [N, D, z, c]);
|
|
1908
|
+
const me = L(
|
|
1907
1909
|
(G, V) => {
|
|
1908
1910
|
if (!f)
|
|
1909
1911
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
1910
|
-
const
|
|
1911
|
-
return
|
|
1912
|
+
const Pe = ee.current.scrollTop > V, Se = ee.current.scrollLeft > G;
|
|
1913
|
+
return Pe || Se ? ee.current : {
|
|
1912
1914
|
scrollTop: f.scrollTop,
|
|
1913
1915
|
scrollLeft: f.scrollLeft
|
|
1914
1916
|
};
|
|
1915
1917
|
},
|
|
1916
1918
|
[f]
|
|
1917
|
-
),
|
|
1919
|
+
), de = L(
|
|
1918
1920
|
(G, V) => {
|
|
1919
|
-
if (
|
|
1920
|
-
|
|
1921
|
+
if (I.current.viewMode !== C || I.current.scrollMode !== w) {
|
|
1922
|
+
B.current && clearTimeout(B.current), O.current = !0, a(m, "auto"), B.current = setTimeout(() => {
|
|
1921
1923
|
requestAnimationFrame(() => {
|
|
1922
|
-
|
|
1924
|
+
I.current = { viewMode: C, scrollMode: w };
|
|
1923
1925
|
});
|
|
1924
1926
|
}, 100);
|
|
1925
1927
|
return;
|
|
1926
1928
|
}
|
|
1927
|
-
const
|
|
1929
|
+
const Se = G.scrollTop, ot = G.scrollLeft;
|
|
1928
1930
|
if (!V.height || !V.width)
|
|
1929
1931
|
return;
|
|
1930
|
-
|
|
1931
|
-
const { height:
|
|
1932
|
-
if (zt ===
|
|
1932
|
+
O.current = !0;
|
|
1933
|
+
const { height: ye, width: it } = V, { height: zt, width: At } = E.current;
|
|
1934
|
+
if (zt === ye && At === it)
|
|
1933
1935
|
return;
|
|
1934
|
-
const
|
|
1935
|
-
|
|
1936
|
+
const Jn = Se / zt * ye, Qn = ot / At * it, er = Math.round(Math.min(Jn, ye)) || 0, tr = Math.round(Math.min(Qn, it)) || 0;
|
|
1937
|
+
R.current = setTimeout(() => {
|
|
1936
1938
|
requestAnimationFrame(() => {
|
|
1937
1939
|
c == null || c.scrollTo({
|
|
1938
|
-
scrollTop:
|
|
1939
|
-
scrollLeft:
|
|
1940
|
+
scrollTop: er,
|
|
1941
|
+
scrollLeft: tr
|
|
1940
1942
|
});
|
|
1941
1943
|
});
|
|
1942
|
-
}, 0),
|
|
1944
|
+
}, 0), E.current = {
|
|
1943
1945
|
height: V.height,
|
|
1944
1946
|
width: V.width
|
|
1945
1947
|
};
|
|
1946
1948
|
},
|
|
1947
1949
|
[c, C, w, a]
|
|
1948
1950
|
);
|
|
1949
|
-
|
|
1950
|
-
clearTimeout(
|
|
1951
|
-
const G = Array.from({ length:
|
|
1952
|
-
(
|
|
1951
|
+
k(() => {
|
|
1952
|
+
clearTimeout(R.current);
|
|
1953
|
+
const G = Array.from({ length: N }).reduce(
|
|
1954
|
+
(Se, ot, ye) => Se + x(ye),
|
|
1953
1955
|
0
|
|
1954
|
-
), V = Array.from({ length:
|
|
1955
|
-
(
|
|
1956
|
+
), V = Array.from({ length: D }).reduce(
|
|
1957
|
+
(Se, ot, ye) => Se + H(ye),
|
|
1956
1958
|
0
|
|
1957
|
-
),
|
|
1958
|
-
|
|
1959
|
+
), Pe = me(V, G);
|
|
1960
|
+
ee.current = Pe, de(Pe, { height: G, width: V }), p({
|
|
1959
1961
|
height: G,
|
|
1960
1962
|
width: V
|
|
1961
1963
|
});
|
|
1962
|
-
}, [z,
|
|
1963
|
-
const
|
|
1964
|
+
}, [z, N, D, de]);
|
|
1965
|
+
const De = L(
|
|
1964
1966
|
(G) => {
|
|
1965
|
-
|
|
1967
|
+
ee.current = {
|
|
1966
1968
|
scrollTop: G.scrollTop,
|
|
1967
1969
|
scrollLeft: G.scrollLeft
|
|
1968
1970
|
};
|
|
1969
1971
|
},
|
|
1970
1972
|
[f]
|
|
1971
1973
|
);
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
+
k(() => () => {
|
|
1975
|
+
B.current && clearTimeout(B.current);
|
|
1974
1976
|
}, []);
|
|
1975
|
-
const
|
|
1976
|
-
[
|
|
1977
|
-
[
|
|
1978
|
-
}), [
|
|
1977
|
+
const rt = M(() => ne(ue["rp-pages-container"], {
|
|
1978
|
+
[ue["rp-cursor-grab"]]: le && !ae,
|
|
1979
|
+
[ue["rp-cursor-grabbing"]]: le && ae
|
|
1980
|
+
}), [le, ae]), Yn = L(
|
|
1979
1981
|
(G) => {
|
|
1980
|
-
if (
|
|
1981
|
-
const V =
|
|
1982
|
-
|
|
1982
|
+
if (le && G) {
|
|
1983
|
+
const V = ne(ue["rp-pages"]), Pe = document.querySelector(`.${V}`);
|
|
1984
|
+
te(Pe);
|
|
1983
1985
|
}
|
|
1984
1986
|
},
|
|
1985
|
-
[
|
|
1987
|
+
[le, te, ue]
|
|
1986
1988
|
);
|
|
1987
|
-
return
|
|
1988
|
-
T &&
|
|
1989
|
-
}, [T]),
|
|
1990
|
-
if (!(
|
|
1991
|
-
if (t ===
|
|
1989
|
+
return k(() => {
|
|
1990
|
+
T && he();
|
|
1991
|
+
}, [T]), k(() => {
|
|
1992
|
+
if (!(j.height === 0 || !P.current)) {
|
|
1993
|
+
if (t === Q.PAGE_SCROLLING) {
|
|
1992
1994
|
e !== m && g && S(e), P.current = !1;
|
|
1993
1995
|
return;
|
|
1994
1996
|
}
|
|
@@ -1999,51 +2001,54 @@ const Bo = ({ widths: e, heights: t }) => {
|
|
|
1999
2001
|
t,
|
|
2000
2002
|
g,
|
|
2001
2003
|
S,
|
|
2002
|
-
|
|
2003
|
-
]), /* @__PURE__ */
|
|
2004
|
-
"div",
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2004
|
+
j
|
|
2005
|
+
]), /* @__PURE__ */ A(ge, { children: [
|
|
2006
|
+
/* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Ko, { style: { minHeight: "50px" }, children: ({ width: G, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Yn, style: { width: G, height: V }, children: w === Q.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2007
|
+
"div",
|
|
2008
|
+
{
|
|
2009
|
+
ref: d,
|
|
2010
|
+
style: { width: G, height: V },
|
|
2011
|
+
className: ne(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
|
|
2012
|
+
children: C === Be.DUAL_PAGE ? /* @__PURE__ */ i(Xo, { widths: H, heights: x }) : /* @__PURE__ */ i(Yo, { widths: H, heights: x })
|
|
2013
|
+
}
|
|
2014
|
+
) : Z ? /* @__PURE__ */ i(
|
|
2015
|
+
Vo,
|
|
2016
|
+
{
|
|
2017
|
+
ref: s,
|
|
2018
|
+
itemData: Oe,
|
|
2019
|
+
outerRef: u,
|
|
2020
|
+
innerRef: l,
|
|
2021
|
+
onScroll: De,
|
|
2022
|
+
columnCount: D,
|
|
2023
|
+
columnWidth: H,
|
|
2024
|
+
rowHeight: x,
|
|
2025
|
+
height: V,
|
|
2026
|
+
width: G,
|
|
2027
|
+
estimatedColumnWidth: Z,
|
|
2028
|
+
estimatedRowHeight: Y,
|
|
2029
|
+
rowCount: N,
|
|
2030
|
+
className: ne(
|
|
2031
|
+
ue["rp-pages"],
|
|
2032
|
+
w === Q.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
|
|
2033
|
+
),
|
|
2034
|
+
children: Qo
|
|
2035
|
+
}
|
|
2036
|
+
) : T ? null : /* @__PURE__ */ i(
|
|
2037
|
+
"div",
|
|
2038
|
+
{
|
|
2039
|
+
className: ue["rp-loader"],
|
|
2040
|
+
style: {
|
|
2041
|
+
display: "flex",
|
|
2042
|
+
justifyContent: "center",
|
|
2043
|
+
alignItems: "center",
|
|
2044
|
+
height: "100%",
|
|
2045
|
+
width: "100%"
|
|
2046
|
+
},
|
|
2047
|
+
children: y && /* @__PURE__ */ i(y, {})
|
|
2048
|
+
}
|
|
2049
|
+
) }) }) }),
|
|
2050
|
+
_ && /* @__PURE__ */ i($r, {})
|
|
2051
|
+
] });
|
|
2047
2052
|
}, Ae = {
|
|
2048
2053
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
2049
2054
|
"rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
|
|
@@ -2054,15 +2059,15 @@ const Bo = ({ widths: e, heights: t }) => {
|
|
|
2054
2059
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
2055
2060
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
2056
2061
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
2057
|
-
},
|
|
2058
|
-
const { prevIcon: e } =
|
|
2062
|
+
}, ei = () => {
|
|
2063
|
+
const { prevIcon: e } = pe();
|
|
2059
2064
|
return e || /* @__PURE__ */ i(Me, {});
|
|
2060
|
-
},
|
|
2061
|
-
const { nextIcon: e } =
|
|
2065
|
+
}, ti = () => {
|
|
2066
|
+
const { nextIcon: e } = pe();
|
|
2062
2067
|
return e || /* @__PURE__ */ i(Me, { style: { transform: "rotate(180deg" } });
|
|
2063
|
-
},
|
|
2064
|
-
const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } =
|
|
2065
|
-
|
|
2068
|
+
}, ni = () => {
|
|
2069
|
+
const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [c, s] = $(e.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: u } = Te(), { localeMessages: p } = se();
|
|
2070
|
+
k(() => {
|
|
2066
2071
|
s(e.toString());
|
|
2067
2072
|
}, [e]);
|
|
2068
2073
|
const f = L((b) => {
|
|
@@ -2090,16 +2095,16 @@ const Bo = ({ widths: e, heights: t }) => {
|
|
|
2090
2095
|
changePage: n
|
|
2091
2096
|
}
|
|
2092
2097
|
) : d ? /* @__PURE__ */ A("div", { className: ft["rp-paginate"], children: [
|
|
2093
|
-
!u && /* @__PURE__ */ i(
|
|
2094
|
-
|
|
2098
|
+
!u && /* @__PURE__ */ i(U, { content: p == null ? void 0 : p.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2099
|
+
re,
|
|
2095
2100
|
{
|
|
2096
2101
|
onClick: r,
|
|
2097
2102
|
"aria-label": p == null ? void 0 : p.previousPageTooltip,
|
|
2098
2103
|
"aria-disabled": e === 1,
|
|
2099
|
-
children: /* @__PURE__ */ i(
|
|
2104
|
+
children: /* @__PURE__ */ i(ei, {})
|
|
2100
2105
|
}
|
|
2101
2106
|
) }),
|
|
2102
|
-
/* @__PURE__ */ i(
|
|
2107
|
+
/* @__PURE__ */ i(U, { content: p == null ? void 0 : p.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2103
2108
|
un,
|
|
2104
2109
|
{
|
|
2105
2110
|
onKeyDown: P,
|
|
@@ -2113,18 +2118,18 @@ const Bo = ({ widths: e, heights: t }) => {
|
|
|
2113
2118
|
"/",
|
|
2114
2119
|
t
|
|
2115
2120
|
] }),
|
|
2116
|
-
!u && /* @__PURE__ */ i(
|
|
2117
|
-
|
|
2121
|
+
!u && /* @__PURE__ */ i(U, { content: p == null ? void 0 : p.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2122
|
+
re,
|
|
2118
2123
|
{
|
|
2119
2124
|
onClick: o,
|
|
2120
2125
|
"aria-label": p == null ? void 0 : p.nextPageTooltip,
|
|
2121
2126
|
"aria-disabled": e === t,
|
|
2122
|
-
children: /* @__PURE__ */ i(
|
|
2127
|
+
children: /* @__PURE__ */ i(ti, {})
|
|
2123
2128
|
}
|
|
2124
2129
|
) })
|
|
2125
2130
|
] }) : null;
|
|
2126
2131
|
};
|
|
2127
|
-
var Et = "Dialog", [En,
|
|
2132
|
+
var Et = "Dialog", [En, ks] = Br(Et), [ri, ce] = En(Et), Nn = (e) => {
|
|
2128
2133
|
const {
|
|
2129
2134
|
__scopeDialog: t,
|
|
2130
2135
|
children: n,
|
|
@@ -2132,13 +2137,13 @@ var Et = "Dialog", [En, Os] = Ur(Et), [ei, ce] = En(Et), Nn = (e) => {
|
|
|
2132
2137
|
defaultOpen: r,
|
|
2133
2138
|
onOpenChange: a,
|
|
2134
2139
|
modal: c = !0
|
|
2135
|
-
} = e, s =
|
|
2140
|
+
} = e, s = q.useRef(null), d = q.useRef(null), [u = !1, p] = Xr({
|
|
2136
2141
|
prop: o,
|
|
2137
2142
|
defaultProp: r,
|
|
2138
2143
|
onChange: a
|
|
2139
2144
|
});
|
|
2140
2145
|
return /* @__PURE__ */ i(
|
|
2141
|
-
|
|
2146
|
+
ri,
|
|
2142
2147
|
{
|
|
2143
2148
|
scope: t,
|
|
2144
2149
|
triggerRef: s,
|
|
@@ -2148,14 +2153,14 @@ var Et = "Dialog", [En, Os] = Ur(Et), [ei, ce] = En(Et), Nn = (e) => {
|
|
|
2148
2153
|
descriptionId: ct(),
|
|
2149
2154
|
open: u,
|
|
2150
2155
|
onOpenChange: p,
|
|
2151
|
-
onOpenToggle:
|
|
2156
|
+
onOpenToggle: q.useCallback(() => p((f) => !f), [p]),
|
|
2152
2157
|
modal: c,
|
|
2153
2158
|
children: n
|
|
2154
2159
|
}
|
|
2155
2160
|
);
|
|
2156
2161
|
};
|
|
2157
2162
|
Nn.displayName = Et;
|
|
2158
|
-
var On = "DialogTrigger",
|
|
2163
|
+
var On = "DialogTrigger", oi = q.forwardRef(
|
|
2159
2164
|
(e, t) => {
|
|
2160
2165
|
const { __scopeDialog: n, ...o } = e, r = ce(On, n), a = yt(t, r.triggerRef);
|
|
2161
2166
|
return /* @__PURE__ */ i(
|
|
@@ -2173,28 +2178,28 @@ var On = "DialogTrigger", ti = U.forwardRef(
|
|
|
2173
2178
|
);
|
|
2174
2179
|
}
|
|
2175
2180
|
);
|
|
2176
|
-
|
|
2177
|
-
var Nt = "DialogPortal", [
|
|
2181
|
+
oi.displayName = On;
|
|
2182
|
+
var Nt = "DialogPortal", [ii, Dn] = En(Nt, {
|
|
2178
2183
|
forceMount: void 0
|
|
2179
2184
|
}), zn = (e) => {
|
|
2180
2185
|
const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = ce(Nt, t);
|
|
2181
|
-
return /* @__PURE__ */ i(
|
|
2186
|
+
return /* @__PURE__ */ i(ii, { scope: t, forceMount: n, children: q.Children.map(o, (c) => /* @__PURE__ */ i(xt, { present: n || a.open, children: /* @__PURE__ */ i(to, { asChild: !0, container: r, children: c }) })) });
|
|
2182
2187
|
};
|
|
2183
2188
|
zn.displayName = Nt;
|
|
2184
|
-
var Ke = "DialogOverlay", An =
|
|
2189
|
+
var Ke = "DialogOverlay", An = q.forwardRef(
|
|
2185
2190
|
(e, t) => {
|
|
2186
2191
|
const n = Dn(Ke, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(Ke, e.__scopeDialog);
|
|
2187
|
-
return a.modal ? /* @__PURE__ */ i(xt, { present: o || a.open, children: /* @__PURE__ */ i(
|
|
2192
|
+
return a.modal ? /* @__PURE__ */ i(xt, { present: o || a.open, children: /* @__PURE__ */ i(ai, { ...r, ref: t }) }) : null;
|
|
2188
2193
|
}
|
|
2189
2194
|
);
|
|
2190
2195
|
An.displayName = Ke;
|
|
2191
|
-
var
|
|
2196
|
+
var ai = q.forwardRef(
|
|
2192
2197
|
(e, t) => {
|
|
2193
2198
|
const { __scopeDialog: n, ...o } = e, r = ce(Ke, n);
|
|
2194
2199
|
return (
|
|
2195
2200
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2196
2201
|
// ie. when `Overlay` and `Content` are siblings
|
|
2197
|
-
/* @__PURE__ */ i(
|
|
2202
|
+
/* @__PURE__ */ i(Jr, { as: jr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
2198
2203
|
$e.div,
|
|
2199
2204
|
{
|
|
2200
2205
|
"data-state": Dt(r.open),
|
|
@@ -2205,20 +2210,20 @@ var ri = U.forwardRef(
|
|
|
2205
2210
|
) })
|
|
2206
2211
|
);
|
|
2207
2212
|
}
|
|
2208
|
-
),
|
|
2213
|
+
), Ie = "DialogContent", Fn = q.forwardRef(
|
|
2209
2214
|
(e, t) => {
|
|
2210
|
-
const n = Dn(
|
|
2211
|
-
return /* @__PURE__ */ i(xt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(
|
|
2215
|
+
const n = Dn(Ie, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(Ie, e.__scopeDialog);
|
|
2216
|
+
return /* @__PURE__ */ i(xt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(si, { ...r, ref: t }) : /* @__PURE__ */ i(ci, { ...r, ref: t }) });
|
|
2212
2217
|
}
|
|
2213
2218
|
);
|
|
2214
|
-
Fn.displayName =
|
|
2215
|
-
var
|
|
2219
|
+
Fn.displayName = Ie;
|
|
2220
|
+
var si = q.forwardRef(
|
|
2216
2221
|
(e, t) => {
|
|
2217
|
-
const n = ce(
|
|
2218
|
-
return
|
|
2222
|
+
const n = ce(Ie, e.__scopeDialog), o = q.useRef(null), r = yt(t, n.contentRef, o);
|
|
2223
|
+
return q.useEffect(() => {
|
|
2219
2224
|
const a = o.current;
|
|
2220
2225
|
if (a)
|
|
2221
|
-
return
|
|
2226
|
+
return no(a);
|
|
2222
2227
|
}, []), /* @__PURE__ */ i(
|
|
2223
2228
|
kn,
|
|
2224
2229
|
{
|
|
@@ -2241,9 +2246,9 @@ var oi = U.forwardRef(
|
|
|
2241
2246
|
}
|
|
2242
2247
|
);
|
|
2243
2248
|
}
|
|
2244
|
-
),
|
|
2249
|
+
), ci = q.forwardRef(
|
|
2245
2250
|
(e, t) => {
|
|
2246
|
-
const n = ce(
|
|
2251
|
+
const n = ce(Ie, e.__scopeDialog), o = q.useRef(!1), r = q.useRef(!1);
|
|
2247
2252
|
return /* @__PURE__ */ i(
|
|
2248
2253
|
kn,
|
|
2249
2254
|
{
|
|
@@ -2264,12 +2269,12 @@ var oi = U.forwardRef(
|
|
|
2264
2269
|
}
|
|
2265
2270
|
);
|
|
2266
2271
|
}
|
|
2267
|
-
), kn =
|
|
2272
|
+
), kn = q.forwardRef(
|
|
2268
2273
|
(e, t) => {
|
|
2269
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = e, s = ce(
|
|
2270
|
-
return
|
|
2274
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = e, s = ce(Ie, n), d = q.useRef(null), u = yt(t, d);
|
|
2275
|
+
return Qr(), /* @__PURE__ */ A(ge, { children: [
|
|
2271
2276
|
/* @__PURE__ */ i(
|
|
2272
|
-
|
|
2277
|
+
eo,
|
|
2273
2278
|
{
|
|
2274
2279
|
asChild: !0,
|
|
2275
2280
|
loop: !0,
|
|
@@ -2277,7 +2282,7 @@ var oi = U.forwardRef(
|
|
|
2277
2282
|
onMountAutoFocus: r,
|
|
2278
2283
|
onUnmountAutoFocus: a,
|
|
2279
2284
|
children: /* @__PURE__ */ i(
|
|
2280
|
-
|
|
2285
|
+
Yr,
|
|
2281
2286
|
{
|
|
2282
2287
|
role: "dialog",
|
|
2283
2288
|
id: s.contentId,
|
|
@@ -2291,27 +2296,27 @@ var oi = U.forwardRef(
|
|
|
2291
2296
|
)
|
|
2292
2297
|
}
|
|
2293
2298
|
),
|
|
2294
|
-
/* @__PURE__ */ A(
|
|
2295
|
-
/* @__PURE__ */ i(
|
|
2296
|
-
/* @__PURE__ */ i(
|
|
2299
|
+
/* @__PURE__ */ A(ge, { children: [
|
|
2300
|
+
/* @__PURE__ */ i(di, { titleId: s.titleId }),
|
|
2301
|
+
/* @__PURE__ */ i(pi, { contentRef: d, descriptionId: s.descriptionId })
|
|
2297
2302
|
] })
|
|
2298
2303
|
] });
|
|
2299
2304
|
}
|
|
2300
|
-
), Ot = "DialogTitle", Mn =
|
|
2305
|
+
), Ot = "DialogTitle", Mn = q.forwardRef(
|
|
2301
2306
|
(e, t) => {
|
|
2302
2307
|
const { __scopeDialog: n, ...o } = e, r = ce(Ot, n);
|
|
2303
2308
|
return /* @__PURE__ */ i($e.h2, { id: r.titleId, ...o, ref: t });
|
|
2304
2309
|
}
|
|
2305
2310
|
);
|
|
2306
2311
|
Mn.displayName = Ot;
|
|
2307
|
-
var Wn = "DialogDescription",
|
|
2312
|
+
var Wn = "DialogDescription", li = q.forwardRef(
|
|
2308
2313
|
(e, t) => {
|
|
2309
2314
|
const { __scopeDialog: n, ...o } = e, r = ce(Wn, n);
|
|
2310
2315
|
return /* @__PURE__ */ i($e.p, { id: r.descriptionId, ...o, ref: t });
|
|
2311
2316
|
}
|
|
2312
2317
|
);
|
|
2313
|
-
|
|
2314
|
-
var Hn = "DialogClose", $n =
|
|
2318
|
+
li.displayName = Wn;
|
|
2319
|
+
var Hn = "DialogClose", $n = q.forwardRef(
|
|
2315
2320
|
(e, t) => {
|
|
2316
2321
|
const { __scopeDialog: n, ...o } = e, r = ce(Hn, n);
|
|
2317
2322
|
return /* @__PURE__ */ i(
|
|
@@ -2329,28 +2334,28 @@ $n.displayName = Hn;
|
|
|
2329
2334
|
function Dt(e) {
|
|
2330
2335
|
return e ? "open" : "closed";
|
|
2331
2336
|
}
|
|
2332
|
-
var Gn = "DialogTitleWarning", [
|
|
2333
|
-
contentName:
|
|
2337
|
+
var Gn = "DialogTitleWarning", [Ms, Vn] = Kr(Gn, {
|
|
2338
|
+
contentName: Ie,
|
|
2334
2339
|
titleName: Ot,
|
|
2335
2340
|
docsSlug: "dialog"
|
|
2336
|
-
}),
|
|
2341
|
+
}), di = ({ titleId: e }) => {
|
|
2337
2342
|
const t = Vn(Gn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2338
2343
|
|
|
2339
2344
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2340
2345
|
|
|
2341
2346
|
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
2342
|
-
return
|
|
2347
|
+
return q.useEffect(() => {
|
|
2343
2348
|
e && (document.getElementById(e) || console.error(n));
|
|
2344
2349
|
}, [n, e]), null;
|
|
2345
|
-
},
|
|
2346
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(
|
|
2347
|
-
return
|
|
2350
|
+
}, ui = "DialogDescriptionWarning", pi = ({ contentRef: e, descriptionId: t }) => {
|
|
2351
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(ui).contentName}}.`;
|
|
2352
|
+
return q.useEffect(() => {
|
|
2348
2353
|
var a;
|
|
2349
2354
|
const r = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2350
2355
|
t && r && (document.getElementById(t) || console.warn(o));
|
|
2351
2356
|
}, [o, e, t]), null;
|
|
2352
|
-
},
|
|
2353
|
-
const
|
|
2357
|
+
}, hi = Nn, mi = zn, fi = An, gi = Fn, vi = Mn, _i = $n;
|
|
2358
|
+
const xe = {
|
|
2354
2359
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2355
2360
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
2356
2361
|
"rp-document-dialog": "_rp-document-dialog_slqo7_13",
|
|
@@ -2358,8 +2363,8 @@ const ye = {
|
|
|
2358
2363
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2359
2364
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2360
2365
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2361
|
-
},
|
|
2362
|
-
const { pdfProperties: e } = X(), { container: t } =
|
|
2366
|
+
}, wi = () => {
|
|
2367
|
+
const { pdfProperties: e } = X(), { container: t } = Ce(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = io(), { localeMessages: r } = se(), a = M(() => {
|
|
2363
2368
|
if (!e)
|
|
2364
2369
|
return [];
|
|
2365
2370
|
const {
|
|
@@ -2399,21 +2404,21 @@ const ye = {
|
|
|
2399
2404
|
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: S }
|
|
2400
2405
|
];
|
|
2401
2406
|
}, [e, r]);
|
|
2402
|
-
return /* @__PURE__ */ i(
|
|
2403
|
-
/* @__PURE__ */ i(
|
|
2404
|
-
/* @__PURE__ */ A(
|
|
2405
|
-
/* @__PURE__ */ i(
|
|
2406
|
-
/* @__PURE__ */ i("div", { className:
|
|
2407
|
-
/* @__PURE__ */ i(
|
|
2407
|
+
return /* @__PURE__ */ i(hi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(mi, { container: t, children: /* @__PURE__ */ A("div", { className: xe["rp-dialog-wrapper"], children: [
|
|
2408
|
+
/* @__PURE__ */ i(fi, { className: xe["rp-dialog-overlay"] }),
|
|
2409
|
+
/* @__PURE__ */ A(gi, { className: xe["rp-document-dialog"], children: [
|
|
2410
|
+
/* @__PURE__ */ i(vi, { className: xe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2411
|
+
/* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(oo, { label: c.label, value: c.value }) }, s)) }),
|
|
2412
|
+
/* @__PURE__ */ i(_i, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ i(ro, {}) })
|
|
2408
2413
|
] })
|
|
2409
2414
|
] }) }) });
|
|
2410
|
-
},
|
|
2415
|
+
}, bi = {
|
|
2411
2416
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2412
|
-
}, on = ".pdf",
|
|
2417
|
+
}, on = ".pdf", Ci = (e) => URL.createObjectURL(e), Ti = async (e) => {
|
|
2413
2418
|
const n = await (await fetch(e)).blob();
|
|
2414
|
-
return
|
|
2415
|
-
},
|
|
2416
|
-
const { filename: e, pdfSrc: t } = X(), { downloadFilename: n } =
|
|
2419
|
+
return Ci(n);
|
|
2420
|
+
}, qn = () => {
|
|
2421
|
+
const { filename: e, pdfSrc: t } = X(), { downloadFilename: n } = wr(), o = (a) => {
|
|
2417
2422
|
const c = n || a;
|
|
2418
2423
|
return c.endsWith(on) ? c : `${c}${on}`;
|
|
2419
2424
|
};
|
|
@@ -2421,26 +2426,26 @@ const ye = {
|
|
|
2421
2426
|
if (!e || !t)
|
|
2422
2427
|
throw new Error("There is no PDF source to download");
|
|
2423
2428
|
const a = document.createElement("a");
|
|
2424
|
-
a.href = await
|
|
2429
|
+
a.href = await Ti(t), a.download = o(e), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2425
2430
|
}, [e, t]) };
|
|
2426
|
-
},
|
|
2427
|
-
const { downloadIcon: e } =
|
|
2428
|
-
return e || /* @__PURE__ */ i(
|
|
2429
|
-
}, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(
|
|
2430
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2431
|
+
}, Un = () => {
|
|
2432
|
+
const { downloadIcon: e } = pe();
|
|
2433
|
+
return e || /* @__PURE__ */ i(po, {});
|
|
2434
|
+
}, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(U, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }), Pi = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(Zn, { localeMessages: t, children: /* @__PURE__ */ i(re, { onClick: e, "aria-label": t == null ? void 0 : t.downloadFileTooltip, children: /* @__PURE__ */ i(Un, {}) }) }), Si = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(be, { onClick: e, children: /* @__PURE__ */ A(Zn, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2435
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Un, {}) }),
|
|
2431
2436
|
t == null ? void 0 : t.downloadFileLabel
|
|
2432
2437
|
] }) }), Bn = () => {
|
|
2433
|
-
const { download: e } =
|
|
2434
|
-
return t ? n ? /* @__PURE__ */ i(
|
|
2438
|
+
const { download: e } = qn(), { downloadTool: t = !0 } = ve(), { isSmallScreen: n } = Te(), { localeMessages: o } = se();
|
|
2439
|
+
return t ? n ? /* @__PURE__ */ i(Si, { download: e, localeMessages: o }) : typeof t == "function" ? /* @__PURE__ */ i(t, { download: e }) : t ? /* @__PURE__ */ i(Pi, { download: e, localeMessages: o }) : null : null;
|
|
2435
2440
|
}, jn = () => {
|
|
2436
|
-
const { printIcon: e } =
|
|
2437
|
-
return e || /* @__PURE__ */ i(
|
|
2438
|
-
}, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(
|
|
2441
|
+
const { printIcon: e } = pe();
|
|
2442
|
+
return e || /* @__PURE__ */ i(ho, {});
|
|
2443
|
+
}, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(U, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }), yi = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(Kn, { localeMessages: t, children: /* @__PURE__ */ i(re, { onClick: e, "aria-label": t == null ? void 0 : t.printTooltip, children: /* @__PURE__ */ i(jn, {}) }) }), xi = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(be, { onClick: e, children: /* @__PURE__ */ A(Kn, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2439
2444
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(jn, {}) }),
|
|
2440
2445
|
t == null ? void 0 : t.printLabel
|
|
2441
2446
|
] }) }), Xn = () => {
|
|
2442
|
-
const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = nt(), { printTool: c = !0 } =
|
|
2443
|
-
return c ? s ? /* @__PURE__ */ i(
|
|
2447
|
+
const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = nt(), { printTool: c = !0 } = ve(), { isSmallScreen: s } = Te(), { localeMessages: d } = se();
|
|
2448
|
+
return c ? s ? /* @__PURE__ */ i(xi, { print: e, localeMessages: d }) : typeof c == "function" ? /* @__PURE__ */ i(
|
|
2444
2449
|
c,
|
|
2445
2450
|
{
|
|
2446
2451
|
print: e,
|
|
@@ -2450,34 +2455,34 @@ const ye = {
|
|
|
2450
2455
|
setOnComplete: o,
|
|
2451
2456
|
progress: a
|
|
2452
2457
|
}
|
|
2453
|
-
) : c ? /* @__PURE__ */ i(
|
|
2454
|
-
},
|
|
2458
|
+
) : c ? /* @__PURE__ */ i(yi, { print: e, localeMessages: d }) : null : null;
|
|
2459
|
+
}, Ii = {
|
|
2455
2460
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2456
|
-
},
|
|
2457
|
-
const { goToFirstPageIcon: e } =
|
|
2458
|
-
return e || /* @__PURE__ */ i(bn, { className:
|
|
2459
|
-
},
|
|
2460
|
-
const { goToLastPageIcon: e } =
|
|
2461
|
+
}, Li = () => {
|
|
2462
|
+
const { goToFirstPageIcon: e } = pe();
|
|
2463
|
+
return e || /* @__PURE__ */ i(bn, { className: Ii["rp-go-to-Top"] });
|
|
2464
|
+
}, Ri = () => {
|
|
2465
|
+
const { goToLastPageIcon: e } = pe();
|
|
2461
2466
|
return e || /* @__PURE__ */ i(bn, {});
|
|
2462
|
-
}, an = { width: "100%" },
|
|
2463
|
-
const { goToPage: e, totalPages: t, focusedPage: n } =
|
|
2467
|
+
}, an = { width: "100%" }, Ei = () => {
|
|
2468
|
+
const { goToPage: e, totalPages: t, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = M(() => n === 1, [n]), c = M(() => n === t, [n, t]), s = L(() => {
|
|
2464
2469
|
e(1);
|
|
2465
2470
|
}, [e]), d = L(() => {
|
|
2466
2471
|
e(t);
|
|
2467
2472
|
}, [e, t]);
|
|
2468
2473
|
return o ? /* @__PURE__ */ A(je, { children: [
|
|
2469
|
-
/* @__PURE__ */ i(
|
|
2470
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2474
|
+
/* @__PURE__ */ i(be, { onClick: s, children: /* @__PURE__ */ i(U, { content: r == null ? void 0 : r.firstPageTooltip, style: an, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2475
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Li, {}) }),
|
|
2471
2476
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2472
2477
|
] }) }) }),
|
|
2473
|
-
/* @__PURE__ */ i(
|
|
2474
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2478
|
+
/* @__PURE__ */ i(be, { onClick: d, children: /* @__PURE__ */ i(U, { content: r == null ? void 0 : r.lastPageTooltip, style: an, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2479
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ri, {}) }),
|
|
2475
2480
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2476
2481
|
] }) }) }),
|
|
2477
2482
|
/* @__PURE__ */ i(It, {})
|
|
2478
2483
|
] }) : null;
|
|
2479
|
-
},
|
|
2480
|
-
const { container: e } =
|
|
2484
|
+
}, Ni = () => {
|
|
2485
|
+
const { container: e } = Ce(), { isSmallScreen: t } = Te(), {
|
|
2481
2486
|
openFileTool: n,
|
|
2482
2487
|
downloadTool: o,
|
|
2483
2488
|
documentProperties: r,
|
|
@@ -2487,7 +2492,7 @@ const ye = {
|
|
|
2487
2492
|
jumpNavigationTool: d,
|
|
2488
2493
|
printTool: u,
|
|
2489
2494
|
fullscreenTool: p
|
|
2490
|
-
} =
|
|
2495
|
+
} = ve(), { localeMessages: f } = se();
|
|
2491
2496
|
return M(() => {
|
|
2492
2497
|
const g = d || c || s || a || r;
|
|
2493
2498
|
let P = !1;
|
|
@@ -2501,13 +2506,13 @@ const ye = {
|
|
|
2501
2506
|
s,
|
|
2502
2507
|
d,
|
|
2503
2508
|
t
|
|
2504
|
-
]) ? /* @__PURE__ */ A(
|
|
2509
|
+
]) ? /* @__PURE__ */ A(ao, { children: [
|
|
2505
2510
|
/* @__PURE__ */ i(
|
|
2506
2511
|
_n,
|
|
2507
2512
|
{
|
|
2508
2513
|
container: e,
|
|
2509
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(
|
|
2510
|
-
children: /* @__PURE__ */ A("div", { className:
|
|
2514
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(U, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Zr, {}) }) }) }),
|
|
2515
|
+
children: /* @__PURE__ */ A("div", { className: bi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2511
2516
|
t && /* @__PURE__ */ A(je, { children: [
|
|
2512
2517
|
/* @__PURE__ */ i(vn, {}),
|
|
2513
2518
|
/* @__PURE__ */ i(Bn, {}),
|
|
@@ -2515,43 +2520,43 @@ const ye = {
|
|
|
2515
2520
|
/* @__PURE__ */ i(wn, {}),
|
|
2516
2521
|
/* @__PURE__ */ i(It, {})
|
|
2517
2522
|
] }),
|
|
2518
|
-
/* @__PURE__ */ i(
|
|
2519
|
-
/* @__PURE__ */ i(
|
|
2523
|
+
/* @__PURE__ */ i(Ei, {}),
|
|
2524
|
+
/* @__PURE__ */ i(co, {}),
|
|
2525
|
+
/* @__PURE__ */ i(mo, {}),
|
|
2526
|
+
/* @__PURE__ */ i(lo, {}),
|
|
2520
2527
|
/* @__PURE__ */ i(uo, {}),
|
|
2521
|
-
/* @__PURE__ */ i(
|
|
2522
|
-
/* @__PURE__ */ i(so, {}),
|
|
2523
|
-
/* @__PURE__ */ i(oo, {})
|
|
2528
|
+
/* @__PURE__ */ i(so, {})
|
|
2524
2529
|
] })
|
|
2525
2530
|
}
|
|
2526
2531
|
),
|
|
2527
|
-
/* @__PURE__ */ i(
|
|
2532
|
+
/* @__PURE__ */ i(wi, {})
|
|
2528
2533
|
] }) : null;
|
|
2529
|
-
},
|
|
2530
|
-
const { isSmallScreen: e } =
|
|
2531
|
-
return /* @__PURE__ */ A(
|
|
2532
|
-
/* @__PURE__ */ i(
|
|
2533
|
-
!e && /* @__PURE__ */ A(
|
|
2534
|
+
}, Oi = () => {
|
|
2535
|
+
const { isSmallScreen: e } = Te();
|
|
2536
|
+
return /* @__PURE__ */ A(ge, { children: [
|
|
2537
|
+
/* @__PURE__ */ i(Ur, {}),
|
|
2538
|
+
!e && /* @__PURE__ */ A(ge, { children: [
|
|
2534
2539
|
/* @__PURE__ */ i(vn, {}),
|
|
2535
2540
|
/* @__PURE__ */ i(Bn, {}),
|
|
2536
2541
|
/* @__PURE__ */ i(Xn, {}),
|
|
2537
2542
|
/* @__PURE__ */ i(wn, {})
|
|
2538
2543
|
] }),
|
|
2539
|
-
/* @__PURE__ */ i(
|
|
2544
|
+
/* @__PURE__ */ i(Ni, {})
|
|
2540
2545
|
] });
|
|
2541
|
-
},
|
|
2546
|
+
}, Re = {
|
|
2542
2547
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
2543
2548
|
"rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_cocqs_6",
|
|
2544
2549
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2545
2550
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2546
2551
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2547
|
-
},
|
|
2548
|
-
const { zoomInIcon: e } =
|
|
2549
|
-
return e || /* @__PURE__ */ i(
|
|
2550
|
-
},
|
|
2551
|
-
const { zoomOutIcon: e } =
|
|
2552
|
-
return e || /* @__PURE__ */ i(
|
|
2553
|
-
},
|
|
2554
|
-
const { zoomLevel: e, setZoomLevel: t } = Qe(), { container: n, contentRef: o } =
|
|
2552
|
+
}, Di = 25, gt = 1e3, zi = [50, 75, 100, 125, 150, 200, 300, 400], Ai = () => {
|
|
2553
|
+
const { zoomInIcon: e } = pe();
|
|
2554
|
+
return e || /* @__PURE__ */ i(fo, {});
|
|
2555
|
+
}, Fi = () => {
|
|
2556
|
+
const { zoomOutIcon: e } = pe();
|
|
2557
|
+
return e || /* @__PURE__ */ i(go, {});
|
|
2558
|
+
}, ki = () => {
|
|
2559
|
+
const { zoomLevel: e, setZoomLevel: t } = Qe(), { container: n, contentRef: o } = Ce(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: c } = Je(), { pages: s } = X(), { isSmallScreen: d } = Te(), { localeMessages: u } = se(), { viewMode: p } = He(), f = L(() => {
|
|
2555
2560
|
t((m) => {
|
|
2556
2561
|
const w = Math.floor(m / 25) * 25;
|
|
2557
2562
|
return Math.min(w + 25, gt);
|
|
@@ -2561,12 +2566,12 @@ const ye = {
|
|
|
2561
2566
|
const w = Math.ceil(m / 25) * 25;
|
|
2562
2567
|
return Math.min(w - 25, gt);
|
|
2563
2568
|
});
|
|
2564
|
-
}, [t]), g = M(() => e ===
|
|
2569
|
+
}, [t]), g = M(() => e === Di, [e]), P = M(() => e === gt, [e]), b = M(() => {
|
|
2565
2570
|
var m;
|
|
2566
2571
|
return (m = s.get(a)) == null ? void 0 : m.page.getViewport({ scale: 1, rotation: c });
|
|
2567
2572
|
}, [s, a, c]), v = L(
|
|
2568
2573
|
(m) => {
|
|
2569
|
-
const w = ((b == null ? void 0 : b.width) || 0) + 2 * $t, C = ((b == null ? void 0 : b.height) || 0) + 2 * $t, l = (o == null ? void 0 : o.clientWidth) || 0, T = (o == null ? void 0 : o.clientHeight) || 0, _ =
|
|
2574
|
+
const w = ((b == null ? void 0 : b.width) || 0) + 2 * $t, C = ((b == null ? void 0 : b.height) || 0) + 2 * $t, l = (o == null ? void 0 : o.clientWidth) || 0, T = (o == null ? void 0 : o.clientHeight) || 0, _ = vo(
|
|
2570
2575
|
m,
|
|
2571
2576
|
l,
|
|
2572
2577
|
T,
|
|
@@ -2583,55 +2588,55 @@ const ye = {
|
|
|
2583
2588
|
},
|
|
2584
2589
|
[t, v]
|
|
2585
2590
|
);
|
|
2586
|
-
return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: e, setZoomLevel: t }) : r ? /* @__PURE__ */ A("div", { className:
|
|
2587
|
-
/* @__PURE__ */ i(
|
|
2588
|
-
|
|
2591
|
+
return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: e, setZoomLevel: t }) : r ? /* @__PURE__ */ A("div", { className: Re["rp-zoom-wrapper"], children: [
|
|
2592
|
+
/* @__PURE__ */ i(U, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2593
|
+
re,
|
|
2589
2594
|
{
|
|
2590
2595
|
disabled: g,
|
|
2591
2596
|
onClick: h,
|
|
2592
2597
|
"aria-label": u == null ? void 0 : u.zoomOutTooltip,
|
|
2593
|
-
children: /* @__PURE__ */ i(
|
|
2598
|
+
children: /* @__PURE__ */ i(Fi, {})
|
|
2594
2599
|
}
|
|
2595
2600
|
) }),
|
|
2596
2601
|
!d && /* @__PURE__ */ i(
|
|
2597
2602
|
_n,
|
|
2598
2603
|
{
|
|
2599
2604
|
container: n,
|
|
2600
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(
|
|
2601
|
-
|
|
2605
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(U, { content: u == null ? void 0 : u.zoomSelectTooltip, children: /* @__PURE__ */ A(
|
|
2606
|
+
re,
|
|
2602
2607
|
{
|
|
2603
|
-
className:
|
|
2608
|
+
className: Re["rp-current-zoom-wrapper"],
|
|
2604
2609
|
"aria-label": u == null ? void 0 : u.zoomSelectTooltip,
|
|
2605
2610
|
children: [
|
|
2606
|
-
/* @__PURE__ */ i("span", { className:
|
|
2607
|
-
/* @__PURE__ */ i("span", { className:
|
|
2608
|
-
/* @__PURE__ */ i(Me, { className:
|
|
2611
|
+
/* @__PURE__ */ i("span", { className: Re["rp-current-zoom-text"], children: e }),
|
|
2612
|
+
/* @__PURE__ */ i("span", { className: Re["rp-current-zoom-text"], children: "%" }),
|
|
2613
|
+
/* @__PURE__ */ i(Me, { className: Re["rp-current-zoom-icon"] })
|
|
2609
2614
|
]
|
|
2610
2615
|
}
|
|
2611
2616
|
) }) }),
|
|
2612
2617
|
style: { minWidth: "200px" },
|
|
2613
2618
|
align: "center",
|
|
2614
|
-
children: /* @__PURE__ */ A("div", { className:
|
|
2619
|
+
children: /* @__PURE__ */ A("div", { className: Re["rp-zoom-dropdown-content"], children: [
|
|
2615
2620
|
/* @__PURE__ */ A(je, { children: [
|
|
2616
|
-
/* @__PURE__ */ i(
|
|
2617
|
-
/* @__PURE__ */ i(
|
|
2618
|
-
/* @__PURE__ */ i(
|
|
2621
|
+
/* @__PURE__ */ i(be, { onClick: () => S(at.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
|
|
2622
|
+
/* @__PURE__ */ i(be, { onClick: () => S(at.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
|
|
2623
|
+
/* @__PURE__ */ i(be, { onClick: () => S(at.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
|
|
2619
2624
|
] }),
|
|
2620
2625
|
/* @__PURE__ */ i(It, {}),
|
|
2621
|
-
/* @__PURE__ */ i(je, { children:
|
|
2626
|
+
/* @__PURE__ */ i(je, { children: zi.map((m) => /* @__PURE__ */ A(be, { onClick: () => S(m), children: [
|
|
2622
2627
|
m,
|
|
2623
2628
|
" %"
|
|
2624
2629
|
] }, m)) })
|
|
2625
2630
|
] })
|
|
2626
2631
|
}
|
|
2627
2632
|
),
|
|
2628
|
-
/* @__PURE__ */ i(
|
|
2629
|
-
|
|
2633
|
+
/* @__PURE__ */ i(U, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2634
|
+
re,
|
|
2630
2635
|
{
|
|
2631
2636
|
disabled: P,
|
|
2632
2637
|
onClick: f,
|
|
2633
2638
|
"aria-label": u == null ? void 0 : u.zoomInTooltip,
|
|
2634
|
-
children: /* @__PURE__ */ i(
|
|
2639
|
+
children: /* @__PURE__ */ i(Ai, {})
|
|
2635
2640
|
}
|
|
2636
2641
|
) })
|
|
2637
2642
|
] }) : null;
|
|
@@ -2641,15 +2646,15 @@ const ye = {
|
|
|
2641
2646
|
nextMatch: t,
|
|
2642
2647
|
prevMatch: n
|
|
2643
2648
|
} = Lt(), { localeMessages: o } = se();
|
|
2644
|
-
return /* @__PURE__ */ A(
|
|
2645
|
-
/* @__PURE__ */ i(
|
|
2649
|
+
return /* @__PURE__ */ A(ge, { children: [
|
|
2650
|
+
/* @__PURE__ */ i(U, { content: o == null ? void 0 : o.searchPrevTooltip, className: K["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(re, { onClick: n, "aria-label": o == null ? void 0 : o.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
2646
2651
|
Me,
|
|
2647
2652
|
{
|
|
2648
2653
|
className: K["rp-search-tool-input-icon"],
|
|
2649
2654
|
"aria-disabled": !e
|
|
2650
2655
|
}
|
|
2651
2656
|
) }) }),
|
|
2652
|
-
/* @__PURE__ */ i(
|
|
2657
|
+
/* @__PURE__ */ i(U, { content: o == null ? void 0 : o.searchNextTooltip, className: K["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": o == null ? void 0 : o.searchNextTooltip, children: /* @__PURE__ */ i(
|
|
2653
2658
|
Me,
|
|
2654
2659
|
{
|
|
2655
2660
|
style: { transform: "rotate(180deg" },
|
|
@@ -2659,10 +2664,10 @@ const ye = {
|
|
|
2659
2664
|
) }) })
|
|
2660
2665
|
] });
|
|
2661
2666
|
}, cn = () => {
|
|
2662
|
-
const { searchIcon: e } =
|
|
2663
|
-
return e || /* @__PURE__ */ i(
|
|
2664
|
-
},
|
|
2665
|
-
const { container: e } =
|
|
2667
|
+
const { searchIcon: e } = pe();
|
|
2668
|
+
return e || /* @__PURE__ */ i(_o, {});
|
|
2669
|
+
}, Mi = () => {
|
|
2670
|
+
const { container: e } = Ce(), [t, n] = $(!1), { pdf: o } = X(), [r, a] = $(null), {
|
|
2666
2671
|
searchOptions: c,
|
|
2667
2672
|
setSearchOptions: s,
|
|
2668
2673
|
loading: d,
|
|
@@ -2672,13 +2677,13 @@ const ye = {
|
|
|
2672
2677
|
nextMatch: h,
|
|
2673
2678
|
prevMatch: g,
|
|
2674
2679
|
search: P
|
|
2675
|
-
} = Lt(), { searchTool: b = !0 } =
|
|
2680
|
+
} = Lt(), { searchTool: b = !0 } = ve(), [v, S] = $(P), { localeMessages: m } = se(), { isSmallScreen: w } = Te(), C = L(() => {
|
|
2676
2681
|
n(!0);
|
|
2677
2682
|
}, []), l = L(() => {
|
|
2678
2683
|
u(""), S(""), n(!1);
|
|
2679
2684
|
}, [u]), T = (x) => {
|
|
2680
|
-
const
|
|
2681
|
-
(
|
|
2685
|
+
const D = x.key === "Enter", H = x.key === " ";
|
|
2686
|
+
(D || H) && l();
|
|
2682
2687
|
}, _ = L(
|
|
2683
2688
|
(x) => {
|
|
2684
2689
|
x.key === "Escape" && t && l();
|
|
@@ -2690,38 +2695,38 @@ const ye = {
|
|
|
2690
2695
|
},
|
|
2691
2696
|
[v, g, h, u, P]
|
|
2692
2697
|
);
|
|
2693
|
-
|
|
2698
|
+
k(() => (window.addEventListener("keydown", _), () => {
|
|
2694
2699
|
window.removeEventListener("keydown", _);
|
|
2695
|
-
}), [_]),
|
|
2700
|
+
}), [_]), k(() => {
|
|
2696
2701
|
r && r.focus();
|
|
2697
2702
|
}, [r]);
|
|
2698
2703
|
const E = L((x) => {
|
|
2699
2704
|
S(x.target.value);
|
|
2700
2705
|
}, []), I = L(() => {
|
|
2701
2706
|
S(""), u("");
|
|
2702
|
-
}, [u]),
|
|
2707
|
+
}, [u]), O = M(() => `${f} / ${p}`, [f, p]), { wholeWords: R, matchCase: F } = M(() => c, [c]), z = L(
|
|
2703
2708
|
(x) => {
|
|
2704
|
-
s((
|
|
2709
|
+
s((D) => ({ ...D, matchCase: x }));
|
|
2705
2710
|
},
|
|
2706
2711
|
[s]
|
|
2707
|
-
),
|
|
2712
|
+
), N = L(
|
|
2708
2713
|
(x) => {
|
|
2709
|
-
s((
|
|
2714
|
+
s((D) => ({ ...D, wholeWords: x }));
|
|
2710
2715
|
},
|
|
2711
2716
|
[s]
|
|
2712
2717
|
);
|
|
2713
|
-
return
|
|
2718
|
+
return k(() => {
|
|
2714
2719
|
l();
|
|
2715
|
-
}, [o, l]), b ? /* @__PURE__ */ i(
|
|
2716
|
-
|
|
2720
|
+
}, [o, l]), b ? /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ i(
|
|
2721
|
+
kr,
|
|
2717
2722
|
{
|
|
2718
2723
|
open: t,
|
|
2719
2724
|
container: e,
|
|
2720
|
-
triggerComponent: /* @__PURE__ */ i(
|
|
2725
|
+
triggerComponent: /* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(re, { onClick: C, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(cn, {}) }) }),
|
|
2721
2726
|
children: /* @__PURE__ */ A("div", { className: K["rp-search-tool-content"], children: [
|
|
2722
2727
|
/* @__PURE__ */ A("div", { className: K["rp-search-tool-input-wrapper"], children: [
|
|
2723
2728
|
/* @__PURE__ */ A("div", { className: K["rp-search-tool-input"], children: [
|
|
2724
|
-
/* @__PURE__ */ i(
|
|
2729
|
+
/* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2725
2730
|
un,
|
|
2726
2731
|
{
|
|
2727
2732
|
value: v,
|
|
@@ -2731,18 +2736,18 @@ const ye = {
|
|
|
2731
2736
|
placeholder: m == null ? void 0 : m.searchInputPlaceholder,
|
|
2732
2737
|
className: K["rp-search-input"],
|
|
2733
2738
|
ref: a,
|
|
2734
|
-
children: !!v && /* @__PURE__ */ i("span", { className: K["rp-search-tool-input-clear"], onClick: I, children: /* @__PURE__ */ i(
|
|
2739
|
+
children: !!v && /* @__PURE__ */ i("span", { className: K["rp-search-tool-input-clear"], onClick: I, children: /* @__PURE__ */ i(wo, {}) })
|
|
2735
2740
|
}
|
|
2736
2741
|
) }),
|
|
2737
|
-
d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Pt, { className: K["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children:
|
|
2742
|
+
d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Pt, { className: K["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: O }),
|
|
2738
2743
|
w && /* @__PURE__ */ i("div", { className: K["rp-search-tool-controls"], children: /* @__PURE__ */ i(Gt, { onKeyPress: T, handleClose: l }) })
|
|
2739
2744
|
] }),
|
|
2740
2745
|
/* @__PURE__ */ A("div", { className: K["rp-search-tool-input-checkboxes"], children: [
|
|
2741
2746
|
w && /* @__PURE__ */ i(sn, {}),
|
|
2742
|
-
/* @__PURE__ */ i(Vt, { name: "matchCase", value:
|
|
2743
|
-
!w && /* @__PURE__ */ i(
|
|
2744
|
-
/* @__PURE__ */ i(Vt, { name: "wholeWord", value: R, onChange:
|
|
2745
|
-
!w && /* @__PURE__ */ i(
|
|
2747
|
+
/* @__PURE__ */ i(Vt, { name: "matchCase", value: F, onChange: z, children: m == null ? void 0 : m.searchMatchCaseLabel }),
|
|
2748
|
+
!w && /* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(qt, {}) }) }),
|
|
2749
|
+
/* @__PURE__ */ i(Vt, { name: "wholeWord", value: R, onChange: N, children: m == null ? void 0 : m.searchWholeWordsLabel }),
|
|
2750
|
+
!w && /* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(qt, {}) }) })
|
|
2746
2751
|
] })
|
|
2747
2752
|
] }),
|
|
2748
2753
|
!w && /* @__PURE__ */ A("div", { className: K["rp-search-tool-controls"], children: [
|
|
@@ -2752,42 +2757,42 @@ const ye = {
|
|
|
2752
2757
|
] })
|
|
2753
2758
|
}
|
|
2754
2759
|
) }) : null;
|
|
2755
|
-
},
|
|
2760
|
+
}, Wi = "_loading_vpexk_1", Ee = {
|
|
2756
2761
|
"rp-loading-overlay": "_rp-loading-overlay_vpexk_1",
|
|
2757
2762
|
"rp-loading-modal": "_rp-loading-modal_vpexk_14",
|
|
2758
2763
|
"rp-loading-title": "_rp-loading-title_vpexk_27",
|
|
2759
2764
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_vpexk_35",
|
|
2760
2765
|
"rp-loading-progress": "_rp-loading-progress_vpexk_35",
|
|
2761
2766
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_vpexk_55",
|
|
2762
|
-
loading:
|
|
2763
|
-
},
|
|
2767
|
+
loading: Wi
|
|
2768
|
+
}, Hi = ({ percentage: e }) => {
|
|
2764
2769
|
const { cancel: t } = nt(), { localeMessages: n } = se();
|
|
2765
|
-
return e < 1 ? null : /* @__PURE__ */ i("div", { className:
|
|
2766
|
-
/* @__PURE__ */ A("div", { className:
|
|
2770
|
+
return e < 1 ? null : /* @__PURE__ */ i("div", { className: ne(Ee["rp-loading-overlay"]), children: /* @__PURE__ */ A("div", { className: ne(Ee["rp-loading-modal"]), children: [
|
|
2771
|
+
/* @__PURE__ */ A("div", { className: ne(Ee["rp-loading-title"]), children: [
|
|
2767
2772
|
n == null ? void 0 : n.printLoadingMessage,
|
|
2768
2773
|
"..."
|
|
2769
2774
|
] }),
|
|
2770
|
-
/* @__PURE__ */ i("div", { className:
|
|
2775
|
+
/* @__PURE__ */ i("div", { className: ne(Ee["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
|
|
2771
2776
|
"div",
|
|
2772
2777
|
{
|
|
2773
|
-
className:
|
|
2778
|
+
className: ne(Ee["rp-loading-progress"]),
|
|
2774
2779
|
style: { width: `${e}%` }
|
|
2775
2780
|
}
|
|
2776
2781
|
) }),
|
|
2777
|
-
/* @__PURE__ */ i("button", { className:
|
|
2782
|
+
/* @__PURE__ */ i("button", { className: ne(Ee["rp-loading-cancel-button"]), onClick: t, children: n == null ? void 0 : n.printCancelLabel })
|
|
2778
2783
|
] }) });
|
|
2779
|
-
},
|
|
2780
|
-
const { showPrintProgress: n } =
|
|
2784
|
+
}, $i = We((e, t) => {
|
|
2785
|
+
const { showPrintProgress: n } = ve(), { progress: o } = nt(), { isSmallScreen: r } = Te(), { percentage: a } = o || {}, c = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2781
2786
|
return /* @__PURE__ */ A("div", { children: [
|
|
2782
2787
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: t, className: Ae["rp-toolbar-content"], children: /* @__PURE__ */ A("div", { className: Ae["rp-toolbar-wrapper"], style: c(), children: [
|
|
2783
2788
|
/* @__PURE__ */ A("div", { "data-rp": "topBarLeft", className: Ae["rp-toolbar-start"], children: [
|
|
2784
|
-
/* @__PURE__ */ i(
|
|
2785
|
-
/* @__PURE__ */ i(
|
|
2789
|
+
/* @__PURE__ */ i(Mi, {}),
|
|
2790
|
+
/* @__PURE__ */ i(ni, {})
|
|
2786
2791
|
] }),
|
|
2787
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(
|
|
2788
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
2792
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(ki, {}) }),
|
|
2793
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(Oi, {}) })
|
|
2789
2794
|
] }) }),
|
|
2790
|
-
n && a ? /* @__PURE__ */ i(
|
|
2795
|
+
n && a ? /* @__PURE__ */ i(Hi, { percentage: a }) : null
|
|
2791
2796
|
] });
|
|
2792
2797
|
}), vt = {
|
|
2793
2798
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
@@ -2800,8 +2805,8 @@ const ye = {
|
|
|
2800
2805
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2801
2806
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2802
2807
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2803
|
-
},
|
|
2804
|
-
const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } =
|
|
2808
|
+
}, Gi = (e) => {
|
|
2809
|
+
const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } = ie(), c = M(() => o ? Fe["rp-thumbnail-active"] : "", [o]), s = M(() => ({
|
|
2805
2810
|
width: Math.round(r.width),
|
|
2806
2811
|
height: Math.round(r.height)
|
|
2807
2812
|
}), [r]), d = L(() => {
|
|
@@ -2814,7 +2819,7 @@ const ye = {
|
|
|
2814
2819
|
id: `page-${n}`,
|
|
2815
2820
|
className: Fe["rp-thumbnail-wrapper"],
|
|
2816
2821
|
children: [
|
|
2817
|
-
/* @__PURE__ */ i("div", { className:
|
|
2822
|
+
/* @__PURE__ */ i("div", { className: ne(c, Fe["rp-thumbnail"]), children: t ? /* @__PURE__ */ i(
|
|
2818
2823
|
"img",
|
|
2819
2824
|
{
|
|
2820
2825
|
src: t,
|
|
@@ -2840,22 +2845,22 @@ const ye = {
|
|
|
2840
2845
|
}, ln = {
|
|
2841
2846
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2842
2847
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2843
|
-
},
|
|
2848
|
+
}, Vi = 16, qi = (e, t) => {
|
|
2844
2849
|
const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
|
|
2845
|
-
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
2846
|
-
},
|
|
2847
|
-
const { show: n } = e, { focusedPage: o, totalPages: r } =
|
|
2850
|
+
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Vi);
|
|
2851
|
+
}, Ui = We((e, t) => {
|
|
2852
|
+
const { show: n } = e, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: d } = yn(), u = W(null), p = W(1);
|
|
2848
2853
|
dn(t, () => u.current);
|
|
2849
2854
|
const f = M(() => Object.values(a), [a]), h = L(() => {
|
|
2850
2855
|
const g = s + 1;
|
|
2851
2856
|
g <= r && c(g);
|
|
2852
2857
|
}, [c, r, s]);
|
|
2853
|
-
return
|
|
2854
|
-
o > s ? d(o) : n && p.current !== o && (
|
|
2855
|
-
}, [o, s, d, n, f]),
|
|
2858
|
+
return k(() => {
|
|
2859
|
+
o > s ? d(o) : n && p.current !== o && (qi(u.current, o), p.current = o);
|
|
2860
|
+
}, [o, s, d, n, f]), Cr(u.current, h), /* @__PURE__ */ i("div", { ref: u, className: ln["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: ln["rp-thumbnails"], children: n ? f.map((g, P) => {
|
|
2856
2861
|
var b, v;
|
|
2857
2862
|
return /* @__PURE__ */ i(
|
|
2858
|
-
|
|
2863
|
+
Gi,
|
|
2859
2864
|
{
|
|
2860
2865
|
isFocused: o === ((b = g.page) == null ? void 0 : b.pageNumber),
|
|
2861
2866
|
pageNumber: (v = g.page) == null ? void 0 : v.pageNumber,
|
|
@@ -2866,22 +2871,22 @@ const ye = {
|
|
|
2866
2871
|
P
|
|
2867
2872
|
);
|
|
2868
2873
|
}) : null }) });
|
|
2869
|
-
}),
|
|
2870
|
-
const { thumbnailIcon: e } =
|
|
2871
|
-
return e || /* @__PURE__ */ i(
|
|
2872
|
-
},
|
|
2873
|
-
const { active: e, setActive: t } = yn(), [n, o] =
|
|
2874
|
+
}), Zi = () => {
|
|
2875
|
+
const { thumbnailIcon: e } = pe();
|
|
2876
|
+
return e || /* @__PURE__ */ i(br, {});
|
|
2877
|
+
}, Bi = () => {
|
|
2878
|
+
const { active: e, setActive: t } = yn(), [n, o] = $(200), r = W(null), { thumbnailTool: a, sidebarEnable: c } = ve(), { localeMessages: s } = se(), d = L(() => {
|
|
2874
2879
|
t((p) => !p);
|
|
2875
|
-
}, []), u = M(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: e }) : a ? /* @__PURE__ */ i(
|
|
2876
|
-
|
|
2880
|
+
}, []), u = M(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: e }) : a ? /* @__PURE__ */ i(U, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
2881
|
+
re,
|
|
2877
2882
|
{
|
|
2878
2883
|
onClick: d,
|
|
2879
2884
|
active: e,
|
|
2880
2885
|
"aria-label": s == null ? void 0 : s.thumbnailTooltip,
|
|
2881
|
-
children: /* @__PURE__ */ i(
|
|
2886
|
+
children: /* @__PURE__ */ i(Zi, {})
|
|
2882
2887
|
}
|
|
2883
2888
|
) }) : null, [a, e, d, s]);
|
|
2884
|
-
return /* @__PURE__ */ i(
|
|
2889
|
+
return /* @__PURE__ */ i(ge, { children: c && /* @__PURE__ */ A(
|
|
2885
2890
|
"div",
|
|
2886
2891
|
{
|
|
2887
2892
|
style: { "--rp-thumbnail-width": `${n}px` },
|
|
@@ -2896,33 +2901,33 @@ const ye = {
|
|
|
2896
2901
|
hidden: !e,
|
|
2897
2902
|
className: vt["rp-thumbnails-wrapper"],
|
|
2898
2903
|
children: [
|
|
2899
|
-
/* @__PURE__ */ i(
|
|
2900
|
-
/* @__PURE__ */ i(
|
|
2904
|
+
/* @__PURE__ */ i(Ui, { show: e, ref: r }),
|
|
2905
|
+
/* @__PURE__ */ i(Tr, { onWidthChange: o, thumbnailRef: r })
|
|
2901
2906
|
]
|
|
2902
2907
|
}
|
|
2903
2908
|
)
|
|
2904
2909
|
]
|
|
2905
2910
|
}
|
|
2906
2911
|
) });
|
|
2907
|
-
},
|
|
2908
|
-
"rp-layout": "_rp-
|
|
2909
|
-
"rp-content": "_rp-
|
|
2910
|
-
"rp-pages": "_rp-
|
|
2911
|
-
"rp-container": "_rp-
|
|
2912
|
-
"rp-loader": "_rp-
|
|
2913
|
-
"rp-theme-variables": "_rp-theme-
|
|
2914
|
-
"rp-dark-mode": "_rp-dark-
|
|
2915
|
-
},
|
|
2912
|
+
}, we = {
|
|
2913
|
+
"rp-layout": "_rp-layout_bfglg_1",
|
|
2914
|
+
"rp-content": "_rp-content_bfglg_5",
|
|
2915
|
+
"rp-pages": "_rp-pages_bfglg_11",
|
|
2916
|
+
"rp-container": "_rp-container_bfglg_16",
|
|
2917
|
+
"rp-loader": "_rp-loader_bfglg_52",
|
|
2918
|
+
"rp-theme-variables": "_rp-theme-variables_bfglg_56",
|
|
2919
|
+
"rp-dark-mode": "_rp-dark-mode_bfglg_161"
|
|
2920
|
+
}, ji = We(
|
|
2916
2921
|
(e, t) => {
|
|
2917
|
-
const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: c, customDarkVariables: s } =
|
|
2922
|
+
const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: c, customDarkVariables: s } = Rr(), { darkMode: d } = ar();
|
|
2918
2923
|
return /* @__PURE__ */ i(
|
|
2919
2924
|
"div",
|
|
2920
2925
|
{
|
|
2921
2926
|
ref: t,
|
|
2922
|
-
className:
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
d ?
|
|
2927
|
+
className: ne(
|
|
2928
|
+
we["rp-theme-variables"],
|
|
2929
|
+
we["rp-container"],
|
|
2930
|
+
d ? we["rp-dark-mode"] : "",
|
|
2926
2931
|
a
|
|
2927
2932
|
),
|
|
2928
2933
|
style: {
|
|
@@ -2935,7 +2940,7 @@ const ye = {
|
|
|
2935
2940
|
}
|
|
2936
2941
|
);
|
|
2937
2942
|
}
|
|
2938
|
-
),
|
|
2943
|
+
), Ws = We((e, t) => {
|
|
2939
2944
|
const {
|
|
2940
2945
|
children: n,
|
|
2941
2946
|
slots: o,
|
|
@@ -2946,24 +2951,24 @@ const ye = {
|
|
|
2946
2951
|
onLoaded: d,
|
|
2947
2952
|
cleanupOnLoaded: u,
|
|
2948
2953
|
onLayoutWidthChange: p
|
|
2949
|
-
} = e, [f, h] =
|
|
2950
|
-
return
|
|
2954
|
+
} = e, [f, h] = $(null), { setContainer: g, setContentRef: P } = Ce(), { loading: b } = X(), { LoaderImageComponent: v } = gn();
|
|
2955
|
+
return k(() => (d && d(), () => {
|
|
2951
2956
|
u && u();
|
|
2952
|
-
}), [d, u]), /* @__PURE__ */ i(
|
|
2953
|
-
/* @__PURE__ */ A(
|
|
2954
|
-
/* @__PURE__ */ A("div", { className:
|
|
2955
|
-
/* @__PURE__ */ i(
|
|
2956
|
-
/* @__PURE__ */ A("div", { className:
|
|
2957
|
-
/* @__PURE__ */ i("div", { className:
|
|
2958
|
-
/* @__PURE__ */ i("div", { ref: P, className:
|
|
2957
|
+
}), [d, u]), /* @__PURE__ */ i(ji, { toolbarRef: f, ref: t, children: /* @__PURE__ */ i(Lr, { mobileWidth: s, onLayoutWidthChange: p, children: /* @__PURE__ */ i(Pr, { slots: o, children: /* @__PURE__ */ i(Sr, { icons: r, children: /* @__PURE__ */ A(yr, { getContainerRef: g, style: a, className: c, children: [
|
|
2958
|
+
/* @__PURE__ */ A(xr, { children: [
|
|
2959
|
+
/* @__PURE__ */ A("div", { className: we["rp-layout"], children: [
|
|
2960
|
+
/* @__PURE__ */ i($i, { ref: h }),
|
|
2961
|
+
/* @__PURE__ */ A("div", { className: we["rp-content"], children: [
|
|
2962
|
+
/* @__PURE__ */ i("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ i(Bi, {}) }),
|
|
2963
|
+
/* @__PURE__ */ i("div", { ref: P, className: we["rp-pages"], children: n })
|
|
2959
2964
|
] })
|
|
2960
2965
|
] }),
|
|
2961
|
-
/* @__PURE__ */ i(
|
|
2966
|
+
/* @__PURE__ */ i(Ir, {})
|
|
2962
2967
|
] }),
|
|
2963
2968
|
b ? /* @__PURE__ */ i(
|
|
2964
2969
|
"div",
|
|
2965
2970
|
{
|
|
2966
|
-
className:
|
|
2971
|
+
className: we["rp-loader"],
|
|
2967
2972
|
style: {
|
|
2968
2973
|
position: "absolute",
|
|
2969
2974
|
top: 0,
|
|
@@ -2991,49 +2996,49 @@ const ye = {
|
|
|
2991
2996
|
] }) }) }) }) });
|
|
2992
2997
|
});
|
|
2993
2998
|
export {
|
|
2994
|
-
|
|
2999
|
+
Eo as A,
|
|
2995
3000
|
sn as B,
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
3001
|
+
So as C,
|
|
3002
|
+
Xo as D,
|
|
3003
|
+
Mi as E,
|
|
2999
3004
|
Bn as F,
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3005
|
+
$i as G,
|
|
3006
|
+
Gi as H,
|
|
3007
|
+
Ui as I,
|
|
3008
|
+
Bi as J,
|
|
3009
|
+
ji as K,
|
|
3010
|
+
Hi as L,
|
|
3011
|
+
Ei as M,
|
|
3012
|
+
Ni as O,
|
|
3013
|
+
Os as P,
|
|
3014
|
+
Fs as R,
|
|
3015
|
+
As as S,
|
|
3016
|
+
zs as T,
|
|
3017
|
+
ki as Z,
|
|
3018
|
+
Ds as a,
|
|
3019
|
+
Ws as b,
|
|
3020
|
+
qn as c,
|
|
3016
3021
|
nt as d,
|
|
3017
3022
|
Lt as e,
|
|
3018
3023
|
Cn as f,
|
|
3019
|
-
|
|
3024
|
+
bo as g,
|
|
3020
3025
|
Tn as h,
|
|
3021
|
-
|
|
3026
|
+
Co as i,
|
|
3022
3027
|
Pn as j,
|
|
3023
|
-
|
|
3028
|
+
To as k,
|
|
3024
3029
|
Sn as l,
|
|
3025
3030
|
yn as m,
|
|
3026
|
-
|
|
3031
|
+
Po as n,
|
|
3027
3032
|
xn as o,
|
|
3028
|
-
|
|
3029
|
-
|
|
3033
|
+
Io as p,
|
|
3034
|
+
No as q,
|
|
3030
3035
|
Rt as r,
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3036
|
+
Bo as s,
|
|
3037
|
+
Yo as t,
|
|
3038
|
+
ie as u,
|
|
3039
|
+
Jo as v,
|
|
3040
|
+
ni as w,
|
|
3041
|
+
wi as x,
|
|
3037
3042
|
Xn as y,
|
|
3038
|
-
|
|
3043
|
+
Oi as z
|
|
3039
3044
|
};
|