@pdf-viewer/react 1.5.0-beta.5 → 1.5.0-beta.6
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-6f52691a.js → RPDefaultLayout-e1e07d65.js} +569 -568
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +12 -11
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +3 -3
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- 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/RotateTool.js +1 -1
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +2 -2
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/Checkbox.js +14 -13
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/RPTooltip.js +689 -331
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/index-2e540713.js +23 -0
- package/dist/index-353ec0a6.js +172 -0
- package/dist/index-5ff5dbd0.js +1675 -0
- package/dist/index-71898eb9.js +139 -0
- package/dist/main.js +1 -1
- package/dist/utils/hooks/useFileDownload.js +2 -2
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLoadWorker.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
- package/dist/index-1cb41342.js +0 -307
- package/dist/index-7279fb4e.js +0 -1557
- package/dist/index-aa2d3884.js +0 -140
|
@@ -1,82 +1,83 @@
|
|
|
1
1
|
import { jsx as a, Fragment as xe, jsxs as D } from "react/jsx-runtime";
|
|
2
2
|
import * as U from "react";
|
|
3
|
-
import { useRef as W, useEffect as A, useCallback as L, useState as $, createContext as je, useContext as Be, useMemo as F, forwardRef as We, useImperativeHandle as
|
|
3
|
+
import { useRef as W, useEffect as A, useCallback as L, useState as $, createContext as je, useContext as Be, useMemo as F, forwardRef as We, useImperativeHandle as ar, createElement as He, PureComponent as Qr, Component as en, memo as tn } from "react";
|
|
4
4
|
import { ChevronUpIcon as ke } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as ee } from "./components/ui/Button.js";
|
|
6
|
-
import { UIInput as
|
|
6
|
+
import { UIInput as sr } from "./components/ui/Input.js";
|
|
7
7
|
import { useScrollModeContext as Ee } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as K } from "./contexts/RPDocumentContext.js";
|
|
9
|
-
import { useDarkModeContext as
|
|
10
|
-
import { ViewMode as Ue, ScrollMode as X, AnnotationSubType as At, SelectionMode as
|
|
9
|
+
import { useDarkModeContext as rn } from "./contexts/DarkModeContext.js";
|
|
10
|
+
import { ViewMode as Ue, ScrollMode as X, AnnotationSubType as At, SelectionMode as nn, ZoomLevel as ot } from "./utils/types.js";
|
|
11
11
|
import { useRotationContext as Ke } from "./contexts/RotationContext.js";
|
|
12
|
-
import { useLayerContext as
|
|
12
|
+
import { useLayerContext as on } from "./contexts/LayerContext.js";
|
|
13
13
|
import { useZoomContext as Xe } from "./contexts/ZoomContext.js";
|
|
14
14
|
import { useViewModeContext as Ye } from "./contexts/ViewModeContext.js";
|
|
15
15
|
import { useVirtualScrollContext as Je } from "./contexts/VirtualScrollContext.js";
|
|
16
|
-
import { useVirtualGridContext as
|
|
17
|
-
import { useSelectionModeContext as
|
|
18
|
-
import { useInitialStateContext as
|
|
19
|
-
import { useFullScreenContext as
|
|
16
|
+
import { useVirtualGridContext as cr } from "./contexts/VirtualGridContext.js";
|
|
17
|
+
import { useSelectionModeContext as an } from "./contexts/SelectionModeContext.js";
|
|
18
|
+
import { useInitialStateContext as sn } from "./contexts/InitialStateContext.js";
|
|
19
|
+
import { useFullScreenContext as cn } from "./contexts/FullScreenContext.js";
|
|
20
20
|
import "./contexts/FileInputContext.js";
|
|
21
21
|
import "./contexts/DropFileZoneContext.js";
|
|
22
22
|
import { renderPage as vt } from "./utils/renderPage.js";
|
|
23
|
-
import { highlightMatches as
|
|
23
|
+
import { highlightMatches as lr, findMatches as ln, resetDivs as dr, highlightMultipleColorMatches as dn } from "./utils/highlight.js";
|
|
24
24
|
import * as Ct from "pdfjs-dist";
|
|
25
|
-
import { PixelsPerInch as
|
|
25
|
+
import { PixelsPerInch as un, AnnotationMode as pn, RenderingCancelledException as hn, AnnotationLayer as mn } from "pdfjs-dist";
|
|
26
26
|
import { useLayoutContainer as be } from "./contexts/LayoutContainerContext.js";
|
|
27
27
|
import { useDimensionPagesContext as Qe } from "./contexts/DimensionPagesContext.js";
|
|
28
28
|
import { useLocalizationContext as ue } from "./contexts/LocalizationContext.js";
|
|
29
|
-
import { useHighlightContext as
|
|
30
|
-
import { useDownloadContext as
|
|
29
|
+
import { useHighlightContext as fn } from "./contexts/HighlightContext.js";
|
|
30
|
+
import { useDownloadContext as gn } from "./contexts/DownloadContext.js";
|
|
31
31
|
import { useSmoothScrollContext as Tt } from "./contexts/SmoothScrollContext.js";
|
|
32
|
-
import { useLoaderContext as
|
|
32
|
+
import { useLoaderContext as ur } from "./contexts/LoaderContext.js";
|
|
33
33
|
import "./contexts/LicenseContext.js";
|
|
34
34
|
import "./components/RPConfig.js";
|
|
35
|
-
import { ThumbnailIcon as
|
|
36
|
-
import { c as
|
|
35
|
+
import { ThumbnailIcon as vn } from "./components/icons/Thumbnail.js";
|
|
36
|
+
import { c as ne } from "./clsx-0c6e471a.js";
|
|
37
37
|
import { LoaderIcon as Pt } from "./components/icons/LoaderIcon.js";
|
|
38
|
-
import { useInfiniteScroll as
|
|
39
|
-
import { RPSplitter as
|
|
40
|
-
import { useToolbarComponentContext as ge, ToolbarComponentProvider as
|
|
41
|
-
import { useIconContext as pe, IconProvider as
|
|
38
|
+
import { useInfiniteScroll as _n } from "./utils/hooks/useInfiniteScroll.js";
|
|
39
|
+
import { RPSplitter as wn } from "./components/layout/sidebar/RPSplitter.js";
|
|
40
|
+
import { useToolbarComponentContext as ge, ToolbarComponentProvider as bn } from "./contexts/ToolbarComponentContext.js";
|
|
41
|
+
import { useIconContext as pe, IconProvider as Cn } from "./contexts/IconContext.js";
|
|
42
42
|
import q from "./components/ui/RPTooltip.js";
|
|
43
|
-
import { Container as
|
|
44
|
-
import { WrapperLayout as
|
|
45
|
-
import { RPDropFileZone as
|
|
46
|
-
import { useViewportContext as ye, ViewportProvider 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
|
|
43
|
+
import { Container as Tn } from "./components/layout/Container.js";
|
|
44
|
+
import { WrapperLayout as Pn } from "./components/layout/WrapperLayout.js";
|
|
45
|
+
import { RPDropFileZone as Sn } from "./components/RPDropFileZone.js";
|
|
46
|
+
import { useViewportContext as ye, ViewportProvider as xn } from "./contexts/ViewportContext.js";
|
|
47
|
+
import { useThemeContext as In } from "./contexts/ThemeContext.js";
|
|
48
|
+
import { SimpleLinkService as yn } from "./utils/link_service.js";
|
|
49
|
+
import { annotationsEvents as Ln, annotationEventsHandler as Rn, handleClick as Ft, handleAnnotationWidget as Nn, handleAnnotationLink as En, bindLayerEvents as On, unbindLayerEvents as kt } from "./utils/annotations.js";
|
|
50
|
+
import { _ as Dn, U as zn } from "./Popover-b7402893.js";
|
|
51
|
+
import { useMousePressed as An } from "./utils/hooks/useMousePressed.js";
|
|
52
|
+
import { useGrabScroll as Fn } from "./utils/hooks/useGrabScroll.js";
|
|
53
|
+
import { usePinch as kn } from "./utils/hooks/usePinch.js";
|
|
54
54
|
import { useDebounce as St } from "./utils/hooks/useDebounce.js";
|
|
55
|
-
import { getPositionFromPage as
|
|
55
|
+
import { getPositionFromPage as Wn, getPageFromPosition as Mn } from "./utils/calculatePage.js";
|
|
56
56
|
import { getThumbnailViewport as Wt } from "./utils/getThumbnailViewport.js";
|
|
57
57
|
import { smoothScrollTo as it } from "./utils/smoothScrollTo.js";
|
|
58
|
-
import { appConsole as
|
|
59
|
-
import { FileUploadTool as
|
|
60
|
-
import { DarkModeTool as $
|
|
61
|
-
import { ThreeDotIcon as
|
|
62
|
-
import { UIDropDown as
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import { a as
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
58
|
+
import { appConsole as Hn } from "./utils/appConsole.js";
|
|
59
|
+
import { FileUploadTool as pr } from "./components/layout/toolbar/FileUploadTool.js";
|
|
60
|
+
import { DarkModeTool as $n } from "./components/layout/toolbar/DarkModeTool.js";
|
|
61
|
+
import { ThreeDotIcon as Gn } from "./components/icons/ThreeDotIcon.js";
|
|
62
|
+
import { UIDropDown as hr } from "./components/ui/DropDown.js";
|
|
63
|
+
import { u as xt, P as Me, c as Fe, a as It, S as Vn } from "./index-353ec0a6.js";
|
|
64
|
+
import { c as Un, e as qn, b as Zn } from "./index-71898eb9.js";
|
|
65
|
+
import { a as at } from "./index-2e540713.js";
|
|
66
|
+
import { a as jn, u as Bn, F as Kn, D as Xn, b as Yn, G as qe } from "./index-5ff5dbd0.js";
|
|
67
|
+
import { h as Jn } from "./component-1da194e8.js";
|
|
68
|
+
import { CloseIcon as mr } from "./components/icons/CloseIcon.js";
|
|
68
69
|
import { dateFormatter as Mt } from "./utils/dateFormatter.js";
|
|
69
|
-
import { PropertyItem as
|
|
70
|
+
import { PropertyItem as Qn } from "./components/layout/toolbar/PropertyItem.js";
|
|
70
71
|
import { useOtherToolContext as eo, OtherToolProvider as to } from "./contexts/OtherToolContext.js";
|
|
71
|
-
import { DocumentProperties as
|
|
72
|
-
import { RotateTool as
|
|
72
|
+
import { DocumentProperties as ro } from "./components/layout/toolbar/DocumentProperties.js";
|
|
73
|
+
import { RotateTool as no } from "./components/layout/toolbar/RotateTool.js";
|
|
73
74
|
import { ScrollModeTool as oo } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
74
75
|
import { MenuSeparator as yt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
75
76
|
import { FileDownloadDefaultIcon as io } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
76
77
|
import { MenuItem as we } from "./components/layout/toolbar/MenuItem.js";
|
|
77
78
|
import { PrintDefaultTool as ao } from "./components/icons/PrintDefaultIcon.js";
|
|
78
|
-
import { FullScreenTool as
|
|
79
|
-
import { GoToDownIcon as
|
|
79
|
+
import { FullScreenTool as fr } from "./components/layout/toolbar/FullScreenTool.js";
|
|
80
|
+
import { GoToDownIcon as gr } from "./components/icons/GoToDownIcon.js";
|
|
80
81
|
import { SelectionModeTool as so } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
81
82
|
import { ZoomInIcon as co } from "./components/icons/ZoomInIcon.js";
|
|
82
83
|
import { ZoomOutIcon as lo } from "./components/icons/ZoomOutIcon.js";
|
|
@@ -86,16 +87,16 @@ import { SearchIcon as po } from "./components/icons/SearchIcon.js";
|
|
|
86
87
|
import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
87
88
|
import { ClearIcon as ho } from "./components/icons/ClearIcon.js";
|
|
88
89
|
import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
|
|
89
|
-
import './assets/RPDefaultLayout.css';const
|
|
90
|
-
const { viewMode: e } = Ye(), { scrollMode: t } = Ee(), { virtualScrollRef:
|
|
90
|
+
import './assets/RPDefaultLayout.css';const vr = () => {
|
|
91
|
+
const { viewMode: e } = Ye(), { scrollMode: t } = Ee(), { virtualScrollRef: r, virtualScrollableElementRef: o, pageScrollElementRef: n } = Je(), { setFocusedPage: i } = ie(), c = W(), { columnCount: s } = cr(), { widths: l, heights: d } = Qe(), u = W(t), f = W(e), h = W(s), { targetScrollPosition: g, smoothScrolling: b } = Tt();
|
|
91
92
|
A(() => {
|
|
92
|
-
|
|
93
|
-
}, [
|
|
93
|
+
r != null && r.scrollToItem && (c.current = r);
|
|
94
|
+
}, [r]), A(() => {
|
|
94
95
|
u.current = t, f.current = e;
|
|
95
96
|
}, [t, e]);
|
|
96
97
|
const w = L(
|
|
97
98
|
(_, m) => {
|
|
98
|
-
if (!
|
|
99
|
+
if (!n)
|
|
99
100
|
return;
|
|
100
101
|
const T = Math.ceil(_ / 2) * 2 - 1;
|
|
101
102
|
if (_ === T + 1) {
|
|
@@ -104,19 +105,19 @@ import './assets/RPDefaultLayout.css';const _n = () => {
|
|
|
104
105
|
top: 0
|
|
105
106
|
};
|
|
106
107
|
return g.current = p, new Promise(
|
|
107
|
-
(P) => it(
|
|
108
|
+
(P) => it(n, p, P)
|
|
108
109
|
);
|
|
109
110
|
}
|
|
110
111
|
const S = {
|
|
111
112
|
left: 0,
|
|
112
113
|
top: 0
|
|
113
114
|
};
|
|
114
|
-
return g.current = S,
|
|
115
|
+
return g.current = S, n == null ? void 0 : n.scrollTo({
|
|
115
116
|
...S,
|
|
116
117
|
behavior: m
|
|
117
118
|
});
|
|
118
119
|
},
|
|
119
|
-
[
|
|
120
|
+
[n, l, it]
|
|
120
121
|
);
|
|
121
122
|
return A(() => {
|
|
122
123
|
u.current = t, f.current = e;
|
|
@@ -179,12 +180,12 @@ import './assets/RPDefaultLayout.css';const _n = () => {
|
|
|
179
180
|
]
|
|
180
181
|
) };
|
|
181
182
|
}, mo = (e = 1) => {
|
|
182
|
-
const [t,
|
|
183
|
+
const [t, r] = $(e), [o, n] = $(0), { scrollToPage: i } = vr(), c = W(1), { viewMode: s } = Ye(), { scrollMode: l } = Ee(), d = St(t, 100), u = L(
|
|
183
184
|
(w) => {
|
|
184
185
|
if (!/^[0-9]*$/g.test(w.toString()) || !w)
|
|
185
186
|
return { success: !1, currentPage: c.current };
|
|
186
187
|
const _ = +w;
|
|
187
|
-
return _ < 0 || _ > o ? { success: !1, currentPage: c.current } : (
|
|
188
|
+
return _ < 0 || _ > o ? { success: !1, currentPage: c.current } : (r(_), c.current = _, { success: !0, currentPage: +w });
|
|
188
189
|
},
|
|
189
190
|
[o]
|
|
190
191
|
), f = L(u, [u]), h = L(
|
|
@@ -204,12 +205,12 @@ import './assets/RPDefaultLayout.css';const _n = () => {
|
|
|
204
205
|
focusedPage: d,
|
|
205
206
|
totalPages: o,
|
|
206
207
|
setFocusedPage: f,
|
|
207
|
-
setTotalPages:
|
|
208
|
+
setTotalPages: n,
|
|
208
209
|
nextPage: b,
|
|
209
210
|
prevPage: g,
|
|
210
211
|
goToPage: h
|
|
211
212
|
};
|
|
212
|
-
},
|
|
213
|
+
}, _r = je({
|
|
213
214
|
focusedPage: 0,
|
|
214
215
|
setFocusedPage: (e) => {
|
|
215
216
|
},
|
|
@@ -222,19 +223,19 @@ import './assets/RPDefaultLayout.css';const _n = () => {
|
|
|
222
223
|
nextPage: () => {
|
|
223
224
|
}
|
|
224
225
|
}), ie = () => {
|
|
225
|
-
const e = Be(
|
|
226
|
-
return typeof (e == null ? void 0 : e.focusedPage) > "u" &&
|
|
227
|
-
},
|
|
228
|
-
const { pdf: t } = K(), { focusedPage:
|
|
226
|
+
const e = Be(_r);
|
|
227
|
+
return typeof (e == null ? void 0 : e.focusedPage) > "u" && Hn.error("Please use this hooks inside children component of RPProvider"), e;
|
|
228
|
+
}, Cs = ({ children: e }) => {
|
|
229
|
+
const { pdf: t } = K(), { focusedPage: r, totalPages: o, setFocusedPage: n, setTotalPages: i, goToPage: c, nextPage: s, prevPage: l } = mo();
|
|
229
230
|
return A(() => {
|
|
230
|
-
t != null && t.numPages && (i(t.numPages),
|
|
231
|
-
}, [t, i,
|
|
232
|
-
|
|
231
|
+
t != null && t.numPages && (i(t.numPages), n(1));
|
|
232
|
+
}, [t, i, n]), /* @__PURE__ */ a(
|
|
233
|
+
_r.Provider,
|
|
233
234
|
{
|
|
234
235
|
value: {
|
|
235
|
-
focusedPage:
|
|
236
|
+
focusedPage: r,
|
|
236
237
|
totalPages: o,
|
|
237
|
-
setFocusedPage:
|
|
238
|
+
setFocusedPage: n,
|
|
238
239
|
setTotalPages: i,
|
|
239
240
|
nextPage: s,
|
|
240
241
|
prevPage: l,
|
|
@@ -245,11 +246,11 @@ import './assets/RPDefaultLayout.css';const _n = () => {
|
|
|
245
246
|
);
|
|
246
247
|
};
|
|
247
248
|
const fo = () => {
|
|
248
|
-
const { pdf: e, pages: t } = K(), [
|
|
249
|
+
const { pdf: e, pages: t } = K(), [r, o] = $({
|
|
249
250
|
loadedPages: 0,
|
|
250
251
|
totalPages: 0,
|
|
251
252
|
percentage: 0
|
|
252
|
-
}), [
|
|
253
|
+
}), [n, i] = $(!1), [c, s] = $(!1), [l, d] = $(null), u = W(!1);
|
|
253
254
|
A(() => {
|
|
254
255
|
u.current;
|
|
255
256
|
}, [u]);
|
|
@@ -278,7 +279,7 @@ const fo = () => {
|
|
|
278
279
|
h();
|
|
279
280
|
return;
|
|
280
281
|
}
|
|
281
|
-
const I = C /
|
|
282
|
+
const I = C / un.PDF;
|
|
282
283
|
T.width = Math.floor(P.width * I), T.height = Math.floor(P.height * I);
|
|
283
284
|
const O = T.getContext("2d");
|
|
284
285
|
O.save(), O.fillStyle = "rgb(255, 255, 255)", O.fillRect(0, 0, T.width, T.height), O.restore();
|
|
@@ -295,14 +296,14 @@ const fo = () => {
|
|
|
295
296
|
transform: [I, 0, 0, I, 0, 0],
|
|
296
297
|
viewport: R.getViewport({ scale: 1, rotation: P.rotation }),
|
|
297
298
|
intent: "print",
|
|
298
|
-
annotationMode:
|
|
299
|
+
annotationMode: pn.ENABLE_STORAGE,
|
|
299
300
|
optionalContentConfigPromise: x,
|
|
300
301
|
printAnnotationStorage: k
|
|
301
302
|
};
|
|
302
303
|
try {
|
|
303
304
|
return R.render(z).promise;
|
|
304
305
|
} catch (y) {
|
|
305
|
-
throw y instanceof
|
|
306
|
+
throw y instanceof hn || console.error(y), y;
|
|
306
307
|
}
|
|
307
308
|
}, w = L(() => {
|
|
308
309
|
const T = window.print;
|
|
@@ -399,12 +400,12 @@ const fo = () => {
|
|
|
399
400
|
}, [f, h]), {
|
|
400
401
|
print: m,
|
|
401
402
|
cancel: g,
|
|
402
|
-
progress:
|
|
403
|
-
isComplete:
|
|
403
|
+
progress: r,
|
|
404
|
+
isComplete: n,
|
|
404
405
|
isError: c,
|
|
405
406
|
error: l
|
|
406
407
|
};
|
|
407
|
-
},
|
|
408
|
+
}, wr = je({
|
|
408
409
|
print: () => {
|
|
409
410
|
},
|
|
410
411
|
cancel: () => {
|
|
@@ -421,14 +422,14 @@ const fo = () => {
|
|
|
421
422
|
console.error("Error in setOnError callback:", t);
|
|
422
423
|
}
|
|
423
424
|
}
|
|
424
|
-
}),
|
|
425
|
-
const [t,
|
|
426
|
-
v && typeof v == "function" &&
|
|
425
|
+
}), Ts = ({ children: e }) => {
|
|
426
|
+
const [t, r] = $(null), [o, n] = $(null), { print: i, cancel: c, progress: s, isComplete: l, isError: d, error: u } = fo(), f = L((v) => {
|
|
427
|
+
v && typeof v == "function" && n(() => v);
|
|
427
428
|
}, []), h = (v) => {
|
|
428
429
|
u && v(u);
|
|
429
430
|
}, g = L(
|
|
430
431
|
(v) => {
|
|
431
|
-
|
|
432
|
+
r(() => v);
|
|
432
433
|
},
|
|
433
434
|
[s, t]
|
|
434
435
|
);
|
|
@@ -442,7 +443,7 @@ const fo = () => {
|
|
|
442
443
|
s && t && t(s);
|
|
443
444
|
}, [s, t]);
|
|
444
445
|
const b = () => {
|
|
445
|
-
o && (o(),
|
|
446
|
+
o && (o(), n(null));
|
|
446
447
|
}, w = {
|
|
447
448
|
print: i,
|
|
448
449
|
cancel: c,
|
|
@@ -451,18 +452,18 @@ const fo = () => {
|
|
|
451
452
|
setOnError: h,
|
|
452
453
|
progress: s
|
|
453
454
|
};
|
|
454
|
-
return /* @__PURE__ */ a(
|
|
455
|
+
return /* @__PURE__ */ a(wr.Provider, { value: w, children: e });
|
|
455
456
|
}, et = () => {
|
|
456
|
-
const e = Be(
|
|
457
|
+
const e = Be(wr);
|
|
457
458
|
if (!e)
|
|
458
459
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
459
460
|
return e;
|
|
460
461
|
}, go = () => {
|
|
461
|
-
const [e, t] = $({}), { pages:
|
|
462
|
+
const [e, t] = $({}), { pages: r } = K(), { rotate: o } = Ke(), n = F(() => Object.keys(e).length, [e]), i = L(
|
|
462
463
|
(s) => {
|
|
463
|
-
if (!
|
|
464
|
+
if (!r.size || s > r.size)
|
|
464
465
|
return;
|
|
465
|
-
const l = Array.from(
|
|
466
|
+
const l = Array.from(r.values()).slice(0, s).map((f) => {
|
|
466
467
|
const { thumbnailViewport: h, scale: g } = Wt(f.page, o);
|
|
467
468
|
return {
|
|
468
469
|
scale: g,
|
|
@@ -496,16 +497,16 @@ const fo = () => {
|
|
|
496
497
|
}).catch(() => {
|
|
497
498
|
});
|
|
498
499
|
},
|
|
499
|
-
[
|
|
500
|
+
[r, o]
|
|
500
501
|
);
|
|
501
502
|
A(() => {
|
|
502
503
|
i(10);
|
|
503
504
|
}, [i]);
|
|
504
505
|
const c = L(
|
|
505
506
|
(s) => {
|
|
506
|
-
if (!
|
|
507
|
+
if (!r)
|
|
507
508
|
return;
|
|
508
|
-
const l =
|
|
509
|
+
const l = r.get(s);
|
|
509
510
|
if (!l)
|
|
510
511
|
return;
|
|
511
512
|
t((u) => ({
|
|
@@ -531,10 +532,10 @@ const fo = () => {
|
|
|
531
532
|
t((f) => ({ ...f, [s]: u }));
|
|
532
533
|
});
|
|
533
534
|
},
|
|
534
|
-
[
|
|
535
|
+
[r, o]
|
|
535
536
|
);
|
|
536
|
-
return { thumbnailPages: e, addPage: c, addToPage: i, thumbnailLength:
|
|
537
|
-
},
|
|
537
|
+
return { thumbnailPages: e, addPage: c, addToPage: i, thumbnailLength: n };
|
|
538
|
+
}, br = je({
|
|
538
539
|
thumbnailPages: {},
|
|
539
540
|
addPage: (e) => {
|
|
540
541
|
},
|
|
@@ -544,20 +545,20 @@ const fo = () => {
|
|
|
544
545
|
setActive: (e) => {
|
|
545
546
|
},
|
|
546
547
|
active: !1
|
|
547
|
-
}),
|
|
548
|
+
}), Cr = () => Be(br), Ps = ({
|
|
548
549
|
children: e,
|
|
549
550
|
initialThumbnailsVisible: t
|
|
550
551
|
}) => {
|
|
551
|
-
const { thumbnailPages:
|
|
552
|
+
const { thumbnailPages: r, addPage: o, addToPage: n, thumbnailLength: i } = go(), [c, s] = $(t);
|
|
552
553
|
return /* @__PURE__ */ a(
|
|
553
|
-
|
|
554
|
+
br.Provider,
|
|
554
555
|
{
|
|
555
|
-
value: { thumbnailPages:
|
|
556
|
+
value: { thumbnailPages: r, addPage: o, addToPage: n, thumbnailLength: i, active: c, setActive: s },
|
|
556
557
|
children: e
|
|
557
558
|
}
|
|
558
559
|
);
|
|
559
560
|
}, vo = (e = {}, t = "") => {
|
|
560
|
-
const [
|
|
561
|
+
const [r, o] = $(t), [n, i] = $(!1), { pdf: c, pages: s } = K(), l = Qe(), d = W(!r), { currentZoom: u } = Xe(), [f, h] = $([]), { setFocusedPage: g } = ie(), [b, w] = $(0), { pageScrollElementRef: v, virtualScrollableElementRef: _ } = Je(), { scrollMode: m } = Ee(), { pagesRef: T } = be(), [S, p] = $(null), P = W({}), C = F(() => b === 0 ? null : f[b - 1], [b, f]), x = F(() => f.length, [f]);
|
|
561
562
|
A(() => {
|
|
562
563
|
if (!C || !s)
|
|
563
564
|
return;
|
|
@@ -576,13 +577,13 @@ const fo = () => {
|
|
|
576
577
|
textContentSource: Z,
|
|
577
578
|
container: document.createElement("div")
|
|
578
579
|
}), V.render().then(() => {
|
|
579
|
-
const B = V.textDivs[C.start.idx], [j] =
|
|
580
|
-
B.style.position = "absolute", B.style.color = "transparent",
|
|
581
|
-
const he = j.element.getBoundingClientRect(), ce =
|
|
580
|
+
const B = V.textDivs[C.start.idx], [j] = lr([C], Z, V.textDivs), te = l.widths[C.page - 1], ae = l.heights[C.page - 1], J = document.createElement("div"), re = document.createElement("div");
|
|
581
|
+
B.style.position = "absolute", B.style.color = "transparent", re.style.position = "absolute", re.style.top = "0", re.style.setProperty("--scale-factor", `${u}`), J.style.position = "relative", J.style.width = `${te}px`, J.style.height = `${ae}px`, J.style.zIndex = "-1", J.appendChild(B), re.appendChild(J), T.prepend(re);
|
|
582
|
+
const he = j.element.getBoundingClientRect(), ce = re.getBoundingClientRect(), Oe = he.top - ce.top, ve = he.left - ce.left, me = N + Oe - z + he.height / 2, le = M + ve - y + he.width / 2, De = {
|
|
582
583
|
left: Math.max(le, 0),
|
|
583
584
|
top: Math.max(me, 0)
|
|
584
585
|
};
|
|
585
|
-
T.removeChild(
|
|
586
|
+
T.removeChild(re), R.scrollTo({
|
|
586
587
|
...De
|
|
587
588
|
});
|
|
588
589
|
});
|
|
@@ -613,15 +614,15 @@ const fo = () => {
|
|
|
613
614
|
return z;
|
|
614
615
|
}, []);
|
|
615
616
|
return A(() => {
|
|
616
|
-
if (!
|
|
617
|
+
if (!r) {
|
|
617
618
|
d.current = !0, h([]), w(0);
|
|
618
619
|
return;
|
|
619
620
|
}
|
|
620
621
|
d.current = !1, i(!0), h([]), w(0), O(c).then((R) => {
|
|
621
622
|
P.current = R;
|
|
622
623
|
const z = Object.keys(R).reduce((y, N) => {
|
|
623
|
-
const M =
|
|
624
|
-
[
|
|
624
|
+
const M = ln(
|
|
625
|
+
[r],
|
|
625
626
|
R[N],
|
|
626
627
|
Number(N) - 1,
|
|
627
628
|
e
|
|
@@ -632,10 +633,10 @@ const fo = () => {
|
|
|
632
633
|
}).catch(() => {
|
|
633
634
|
h([]), w(0);
|
|
634
635
|
}).finally(() => i(!1));
|
|
635
|
-
}, [
|
|
636
|
-
search:
|
|
636
|
+
}, [r, O, c, e]), {
|
|
637
|
+
search: r,
|
|
637
638
|
setSearch: o,
|
|
638
|
-
loading:
|
|
639
|
+
loading: n,
|
|
639
640
|
matches: f,
|
|
640
641
|
totalMatches: x,
|
|
641
642
|
currentMatchPosition: b,
|
|
@@ -645,7 +646,7 @@ const fo = () => {
|
|
|
645
646
|
currentMatchElement: S,
|
|
646
647
|
setCurrentMatchElement: p
|
|
647
648
|
};
|
|
648
|
-
},
|
|
649
|
+
}, Tr = je({
|
|
649
650
|
search: "",
|
|
650
651
|
setSearch: (e) => {
|
|
651
652
|
},
|
|
@@ -663,12 +664,12 @@ const fo = () => {
|
|
|
663
664
|
currentMatchElement: null,
|
|
664
665
|
setCurrentMatchElement: (e) => {
|
|
665
666
|
}
|
|
666
|
-
}),
|
|
667
|
+
}), Ss = ({
|
|
667
668
|
children: e,
|
|
668
669
|
initialSearch: t
|
|
669
670
|
}) => {
|
|
670
|
-
const [
|
|
671
|
-
loading:
|
|
671
|
+
const [r, o] = $({}), {
|
|
672
|
+
loading: n,
|
|
672
673
|
setSearch: i,
|
|
673
674
|
totalMatches: c,
|
|
674
675
|
currentMatchPosition: s,
|
|
@@ -679,14 +680,14 @@ const fo = () => {
|
|
|
679
680
|
prevMatch: h,
|
|
680
681
|
currentMatchElement: g,
|
|
681
682
|
setCurrentMatchElement: b
|
|
682
|
-
} = vo(
|
|
683
|
+
} = vo(r, t);
|
|
683
684
|
return /* @__PURE__ */ a(
|
|
684
|
-
|
|
685
|
+
Tr.Provider,
|
|
685
686
|
{
|
|
686
687
|
value: {
|
|
687
|
-
searchOptions:
|
|
688
|
+
searchOptions: r,
|
|
688
689
|
setSearchOptions: o,
|
|
689
|
-
loading:
|
|
690
|
+
loading: n,
|
|
690
691
|
setSearch: i,
|
|
691
692
|
totalMatches: c,
|
|
692
693
|
currentMatchPosition: s,
|
|
@@ -701,7 +702,7 @@ const fo = () => {
|
|
|
701
702
|
children: e
|
|
702
703
|
}
|
|
703
704
|
);
|
|
704
|
-
},
|
|
705
|
+
}, Pr = () => Be(Tr), de = {
|
|
705
706
|
"rp-pages": "_rp-pages_1776r_1",
|
|
706
707
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
|
|
707
708
|
"rp-pages-container": "_rp-pages-container_1776r_11",
|
|
@@ -715,13 +716,13 @@ const fo = () => {
|
|
|
715
716
|
"rp-page": "_rp-page_h7a2q_1",
|
|
716
717
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
717
718
|
}, _o = (e) => {
|
|
718
|
-
const { pageNumber: t, onLoaded:
|
|
719
|
+
const { pageNumber: t, onLoaded: r, onLoading: o } = e, n = W(null), { pages: i } = K(), { rotate: c } = Ke(), s = W(), { currentZoom: l } = Xe();
|
|
719
720
|
return A(() => {
|
|
720
721
|
if (!i || l === 0)
|
|
721
722
|
return;
|
|
722
723
|
const d = i.get(t);
|
|
723
|
-
if (
|
|
724
|
-
const u =
|
|
724
|
+
if (n.current && d) {
|
|
725
|
+
const u = n.current;
|
|
725
726
|
u.hidden = !0;
|
|
726
727
|
const f = s.current;
|
|
727
728
|
f && f.cancel(), o && o(), s.current = vt(d.page, u, {
|
|
@@ -732,27 +733,27 @@ const fo = () => {
|
|
|
732
733
|
u.hidden = !1;
|
|
733
734
|
}).catch(() => {
|
|
734
735
|
}).finally(() => {
|
|
735
|
-
|
|
736
|
+
r && r();
|
|
736
737
|
});
|
|
737
738
|
}
|
|
738
739
|
return () => {
|
|
739
740
|
var u;
|
|
740
741
|
(u = s.current) == null || u.cancel();
|
|
741
742
|
};
|
|
742
|
-
}, [i, t, c, l, o,
|
|
743
|
+
}, [i, t, c, l, o, r]), /* @__PURE__ */ a("canvas", { "data-rp": `page-${t}-canvas`, ref: n });
|
|
743
744
|
}, ct = {
|
|
744
745
|
"rp-text-layer": "_rp-text-layer_kwwfn_1",
|
|
745
746
|
"rp-text-layer-text": "_rp-text-layer-text_kwwfn_9"
|
|
746
747
|
}, wo = (e) => {
|
|
747
|
-
const { pageNumber: t } = e, { pages:
|
|
748
|
+
const { pageNumber: t } = e, { pages: r } = K(), o = W(null), { matches: n, currentMatch: i, setCurrentMatchElement: c } = Pr(), [s, l] = $(
|
|
748
749
|
[]
|
|
749
|
-
), d = W(), u = W(), f = W(), h = F(() =>
|
|
750
|
+
), d = W(), u = W(), f = W(), h = F(() => n.filter((b) => b.pageIndex === t - 1), [n, t]), g = L(
|
|
750
751
|
(b, w, v = !1) => {
|
|
751
|
-
if (v &&
|
|
752
|
+
if (v && dr(b, w), !h.length) {
|
|
752
753
|
f.current = void 0, l([]);
|
|
753
754
|
return;
|
|
754
755
|
}
|
|
755
|
-
const _ =
|
|
756
|
+
const _ = lr(h, b, w);
|
|
756
757
|
l(_);
|
|
757
758
|
},
|
|
758
759
|
[h]
|
|
@@ -769,7 +770,7 @@ const fo = () => {
|
|
|
769
770
|
const w = s.find((_) => _.index === b);
|
|
770
771
|
w && (f.current = w.element, c(w.element), w.element.classList.add("selected"));
|
|
771
772
|
}, [i, s, h]), A(() => {
|
|
772
|
-
const b =
|
|
773
|
+
const b = r.get(t);
|
|
773
774
|
if (!b || !o.current)
|
|
774
775
|
return;
|
|
775
776
|
const w = o.current;
|
|
@@ -792,7 +793,7 @@ const fo = () => {
|
|
|
792
793
|
var v;
|
|
793
794
|
(v = d.current) == null || v.cancel();
|
|
794
795
|
};
|
|
795
|
-
}, [
|
|
796
|
+
}, [r, t]), A(() => {
|
|
796
797
|
var v;
|
|
797
798
|
[].slice.call(o.current.children).forEach((_) => {
|
|
798
799
|
_.classList.add(ct["rp-text-layer-text"]);
|
|
@@ -812,22 +813,22 @@ const fo = () => {
|
|
|
812
813
|
};
|
|
813
814
|
let Co = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
814
815
|
const To = (e) => {
|
|
815
|
-
const { pageNumber: t } = e,
|
|
816
|
+
const { pageNumber: t } = e, r = W(null), { pages: o, pdf: n } = K(), i = W(), [c, s] = $(), { setFocusedPage: l, goToPage: d } = ie(), { scrollMode: u } = Ee(), { print: f } = et(), { download: h } = $r(), g = F(() => o.get(t), [o, t]), b = F(() => g == null ? void 0 : g.page.getViewport(), [g]);
|
|
816
817
|
A(() => {
|
|
817
818
|
i.current && (i.current.div.replaceChildren(), i.current = void 0);
|
|
818
|
-
}, [
|
|
819
|
+
}, [n]), A(() => {
|
|
819
820
|
g && g.page.getAnnotations().then((v) => {
|
|
820
|
-
i.current = void 0, s(v),
|
|
821
|
+
i.current = void 0, s(v), r.current && (r.current.innerText = "");
|
|
821
822
|
});
|
|
822
823
|
}, [g]);
|
|
823
824
|
const w = L(
|
|
824
825
|
(v) => {
|
|
825
|
-
!c || !
|
|
826
|
+
!c || !n || (Ln(v), Rn(v, n, c).then((_) => {
|
|
826
827
|
var m, T;
|
|
827
828
|
((m = _ == null ? void 0 : _.data) == null ? void 0 : m.action) === "Print" ? f() : ((T = _ == null ? void 0 : _.data) == null ? void 0 : T.action) === "SaveAs" && h();
|
|
828
|
-
}), u === X.PAGE_SCROLLING ? Ft(v, c,
|
|
829
|
+
}), u === X.PAGE_SCROLLING ? Ft(v, c, n, (_) => l(_.pageIndex + 1)) : Ft(v, c, n, (_) => d(_.pageIndex + 1)));
|
|
829
830
|
},
|
|
830
|
-
[
|
|
831
|
+
[n, c, d, l, u, f, h]
|
|
831
832
|
);
|
|
832
833
|
return A(() => {
|
|
833
834
|
if (!g || !c)
|
|
@@ -844,99 +845,99 @@ const To = (e) => {
|
|
|
844
845
|
const { annotationType: p } = S;
|
|
845
846
|
switch (p) {
|
|
846
847
|
case At.Link:
|
|
847
|
-
|
|
848
|
+
En(S);
|
|
848
849
|
break;
|
|
849
850
|
case At.Widget:
|
|
850
|
-
|
|
851
|
+
Nn(S, v, _);
|
|
851
852
|
break;
|
|
852
853
|
}
|
|
853
854
|
}
|
|
854
855
|
const m = new AbortController();
|
|
855
856
|
return (async () => {
|
|
856
857
|
var P;
|
|
857
|
-
i.current && (i.current.div.replaceChildren(), i.current = void 0),
|
|
858
|
-
div:
|
|
858
|
+
i.current && (i.current.div.replaceChildren(), i.current = void 0), r.current && (r.current.innerText = ""), i.current = new mn({
|
|
859
|
+
div: r.current,
|
|
859
860
|
accessibilityManager: void 0,
|
|
860
861
|
annotationCanvasMap: void 0,
|
|
861
862
|
annotationEditorUIManager: void 0,
|
|
862
863
|
structTreeLayer: null,
|
|
863
864
|
page: g.page,
|
|
864
865
|
viewport: v.clone({ dontFlip: !0 })
|
|
865
|
-
}),
|
|
866
|
-
const S = await (
|
|
866
|
+
}), r.current && kt(r.current, w);
|
|
867
|
+
const S = await (n == null ? void 0 : n.hasJSActions()), p = await (n == null ? void 0 : n.getFieldObjects());
|
|
867
868
|
if (m.signal.aborted)
|
|
868
869
|
throw "abort";
|
|
869
870
|
return (P = i.current) == null ? void 0 : P.render({
|
|
870
871
|
annotations: c,
|
|
871
|
-
annotationStorage:
|
|
872
|
+
annotationStorage: n == null ? void 0 : n.annotationStorage,
|
|
872
873
|
hasJSActions: S,
|
|
873
874
|
fieldObjects: p,
|
|
874
|
-
div:
|
|
875
|
+
div: r.current,
|
|
875
876
|
viewport: v.clone({ dontFlip: !0 }),
|
|
876
877
|
page: g.page,
|
|
877
878
|
imageResourcesPath: Co,
|
|
878
879
|
renderForms: !0,
|
|
879
|
-
linkService: new
|
|
880
|
+
linkService: new yn(),
|
|
880
881
|
downloadManager: null,
|
|
881
882
|
enableScripting: !1
|
|
882
883
|
});
|
|
883
884
|
})().then(() => {
|
|
884
|
-
|
|
885
|
+
r.current && On(r.current, w);
|
|
885
886
|
}).catch((S) => {
|
|
886
887
|
if (S !== "abort")
|
|
887
888
|
throw S;
|
|
888
889
|
}), () => {
|
|
889
|
-
m.abort("clear"),
|
|
890
|
+
m.abort("clear"), r.current && kt(r.current, w);
|
|
890
891
|
};
|
|
891
|
-
}, [
|
|
892
|
+
}, [n, c, w]), /* @__PURE__ */ a(
|
|
892
893
|
"div",
|
|
893
894
|
{
|
|
894
895
|
"data-rp": `page-${t}-annotationLayer`,
|
|
895
896
|
style: { width: `${b == null ? void 0 : b.width}px`, height: `${b == null ? void 0 : b.height}px` },
|
|
896
897
|
className: bo["rp-annotation-layer"],
|
|
897
|
-
ref:
|
|
898
|
+
ref: r
|
|
898
899
|
}
|
|
899
900
|
);
|
|
900
901
|
}, lt = {
|
|
901
902
|
"rp-text-highlight-layer": "_rp-text-highlight-layer_1470i_1",
|
|
902
903
|
"rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1470i_9"
|
|
903
904
|
}, Po = ({ pageNumber: e }) => {
|
|
904
|
-
const t = W(null),
|
|
905
|
+
const t = W(null), r = W(), o = W(), { pages: n } = K(), { highlightMatches: i } = fn(), c = F(() => i.filter((d) => d.pageIndex === e - 1), [i]), s = L(
|
|
905
906
|
(l, d, u = !1) => {
|
|
906
|
-
u &&
|
|
907
|
+
u && dr(l, d), dn(c, l, d);
|
|
907
908
|
},
|
|
908
|
-
[c,
|
|
909
|
+
[c, n, e]
|
|
909
910
|
);
|
|
910
911
|
return A(() => {
|
|
911
|
-
const l =
|
|
912
|
+
const l = n.get(e);
|
|
912
913
|
if (!l || !t.current)
|
|
913
914
|
return;
|
|
914
915
|
const d = t.current;
|
|
915
|
-
return
|
|
916
|
+
return r.current && r.current.cancel(), l.page.getTextContent().then((u) => {
|
|
916
917
|
const f = l.page.getViewport({ scale: 1 });
|
|
917
|
-
return
|
|
918
|
+
return r.current = new Ct.TextLayer({
|
|
918
919
|
viewport: f,
|
|
919
920
|
textContentSource: u,
|
|
920
921
|
container: d
|
|
921
|
-
}), o.current = u, d && (d.innerText = ""),
|
|
922
|
+
}), o.current = u, d && (d.innerText = ""), r.current.render();
|
|
922
923
|
}).then(() => {
|
|
923
924
|
var h;
|
|
924
925
|
[].slice.call(d.children).forEach((g) => {
|
|
925
926
|
g.classList.add(lt["rp-text-highlight-layer-text"]);
|
|
926
927
|
});
|
|
927
|
-
const f = (h =
|
|
928
|
+
const f = (h = r.current) == null ? void 0 : h.textDivs;
|
|
928
929
|
f && o.current && s(o.current, f);
|
|
929
930
|
}).catch(() => {
|
|
930
931
|
}), () => {
|
|
931
932
|
var u;
|
|
932
|
-
(u =
|
|
933
|
+
(u = r.current) == null || u.cancel();
|
|
933
934
|
};
|
|
934
|
-
}, [
|
|
935
|
+
}, [n, e]), A(() => {
|
|
935
936
|
var u;
|
|
936
937
|
[].slice.call(t.current.children).forEach((f) => {
|
|
937
938
|
f.classList.add(lt["rp-text-highlight-layer-text"]);
|
|
938
939
|
});
|
|
939
|
-
const d = (u =
|
|
940
|
+
const d = (u = r.current) == null ? void 0 : u.textDivs;
|
|
940
941
|
d && o.current && s(o.current, d, !0);
|
|
941
942
|
}, [s]), /* @__PURE__ */ a(xe, { children: /* @__PURE__ */ a(
|
|
942
943
|
"div",
|
|
@@ -947,16 +948,16 @@ const To = (e) => {
|
|
|
947
948
|
}
|
|
948
949
|
) });
|
|
949
950
|
}, Lt = We((e, t) => {
|
|
950
|
-
const { pageNumber:
|
|
951
|
+
const { pageNumber: r, style: o, ...n } = e, { pages: i } = K(), { rotate: c } = Ke(), { textLayer: s } = on(), { currentZoom: l } = Xe(), d = W(i.get(r)), [u, f] = $(!1), h = W(null), [g, b] = $({
|
|
951
952
|
width: 0,
|
|
952
953
|
height: 0
|
|
953
954
|
});
|
|
954
|
-
|
|
955
|
-
if (i && (d.current = i.get(
|
|
955
|
+
ar(t, () => h.current), A(() => {
|
|
956
|
+
if (i && (d.current = i.get(r), d.current)) {
|
|
956
957
|
const m = d.current.page.getViewport({ scale: l, rotation: c });
|
|
957
958
|
b(m);
|
|
958
959
|
}
|
|
959
|
-
}, [i,
|
|
960
|
+
}, [i, r, c, l]);
|
|
960
961
|
const w = F(() => {
|
|
961
962
|
switch (c) {
|
|
962
963
|
case 90:
|
|
@@ -976,9 +977,9 @@ const To = (e) => {
|
|
|
976
977
|
"div",
|
|
977
978
|
{
|
|
978
979
|
ref: h,
|
|
979
|
-
id: `page-${
|
|
980
|
-
"data-rp": `page-${
|
|
981
|
-
...
|
|
980
|
+
id: `page-${r}`,
|
|
981
|
+
"data-rp": `page-${r}`,
|
|
982
|
+
...n,
|
|
982
983
|
style: {
|
|
983
984
|
...o,
|
|
984
985
|
"--rp-rotate": `${c}deg`,
|
|
@@ -995,11 +996,11 @@ const To = (e) => {
|
|
|
995
996
|
},
|
|
996
997
|
className: st["rp-page"],
|
|
997
998
|
children: [
|
|
998
|
-
/* @__PURE__ */ a(_o, { onLoading: v, onLoaded: _, pageNumber:
|
|
999
|
+
/* @__PURE__ */ a(_o, { onLoading: v, onLoaded: _, pageNumber: r }),
|
|
999
1000
|
u && /* @__PURE__ */ a("div", { className: st["rp-loader-wrapper"], children: /* @__PURE__ */ a(Pt, {}) }),
|
|
1000
|
-
s && /* @__PURE__ */ a(wo, { pageNumber:
|
|
1001
|
-
/* @__PURE__ */ a(Po, { pageNumber:
|
|
1002
|
-
/* @__PURE__ */ a(To, { pageNumber:
|
|
1001
|
+
s && /* @__PURE__ */ a(wo, { pageNumber: r }),
|
|
1002
|
+
/* @__PURE__ */ a(Po, { pageNumber: r }),
|
|
1003
|
+
/* @__PURE__ */ a(To, { pageNumber: r })
|
|
1003
1004
|
]
|
|
1004
1005
|
}
|
|
1005
1006
|
)
|
|
@@ -1012,8 +1013,8 @@ function Vt(e) {
|
|
|
1012
1013
|
return e;
|
|
1013
1014
|
}
|
|
1014
1015
|
function _t(e, t) {
|
|
1015
|
-
return _t = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(
|
|
1016
|
-
return
|
|
1016
|
+
return _t = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1017
|
+
return r.__proto__ = o, r;
|
|
1017
1018
|
}, _t(e, t);
|
|
1018
1019
|
}
|
|
1019
1020
|
function So(e, t) {
|
|
@@ -1028,32 +1029,32 @@ function xo(e, t) {
|
|
|
1028
1029
|
function Io(e, t) {
|
|
1029
1030
|
if (e.length !== t.length)
|
|
1030
1031
|
return !1;
|
|
1031
|
-
for (var
|
|
1032
|
-
if (!xo(e[
|
|
1032
|
+
for (var r = 0; r < e.length; r++)
|
|
1033
|
+
if (!xo(e[r], t[r]))
|
|
1033
1034
|
return !1;
|
|
1034
1035
|
return !0;
|
|
1035
1036
|
}
|
|
1036
1037
|
function dt(e, t) {
|
|
1037
1038
|
t === void 0 && (t = Io);
|
|
1038
|
-
var
|
|
1039
|
+
var r, o = [], n, i = !1;
|
|
1039
1040
|
function c() {
|
|
1040
1041
|
for (var s = [], l = 0; l < arguments.length; l++)
|
|
1041
1042
|
s[l] = arguments[l];
|
|
1042
|
-
return i &&
|
|
1043
|
+
return i && r === this && t(s, o) || (n = e.apply(this, s), i = !0, r = this, o = s), n;
|
|
1043
1044
|
}
|
|
1044
1045
|
return c;
|
|
1045
1046
|
}
|
|
1046
1047
|
function qt(e, t) {
|
|
1047
1048
|
if (e == null)
|
|
1048
1049
|
return {};
|
|
1049
|
-
var
|
|
1050
|
+
var r = {};
|
|
1050
1051
|
for (var o in e)
|
|
1051
1052
|
if ({}.hasOwnProperty.call(e, o)) {
|
|
1052
1053
|
if (t.indexOf(o) !== -1)
|
|
1053
1054
|
continue;
|
|
1054
|
-
|
|
1055
|
+
r[o] = e[o];
|
|
1055
1056
|
}
|
|
1056
|
-
return
|
|
1057
|
+
return r;
|
|
1057
1058
|
}
|
|
1058
1059
|
var yo = typeof performance == "object" && typeof performance.now == "function", Zt = yo ? function() {
|
|
1059
1060
|
return performance.now();
|
|
@@ -1064,42 +1065,42 @@ function jt(e) {
|
|
|
1064
1065
|
cancelAnimationFrame(e.id);
|
|
1065
1066
|
}
|
|
1066
1067
|
function Lo(e, t) {
|
|
1067
|
-
var
|
|
1068
|
+
var r = Zt();
|
|
1068
1069
|
function o() {
|
|
1069
|
-
Zt() -
|
|
1070
|
+
Zt() - r >= t ? e.call(null) : n.id = requestAnimationFrame(o);
|
|
1070
1071
|
}
|
|
1071
|
-
var
|
|
1072
|
+
var n = {
|
|
1072
1073
|
id: requestAnimationFrame(o)
|
|
1073
1074
|
};
|
|
1074
|
-
return
|
|
1075
|
+
return n;
|
|
1075
1076
|
}
|
|
1076
1077
|
var ut = -1;
|
|
1077
1078
|
function Ro(e) {
|
|
1078
1079
|
if (e === void 0 && (e = !1), ut === -1 || e) {
|
|
1079
|
-
var t = document.createElement("div"),
|
|
1080
|
-
|
|
1080
|
+
var t = document.createElement("div"), r = t.style;
|
|
1081
|
+
r.width = "50px", r.height = "50px", r.overflow = "scroll", document.body.appendChild(t), ut = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
1081
1082
|
}
|
|
1082
1083
|
return ut;
|
|
1083
1084
|
}
|
|
1084
1085
|
var Le = null;
|
|
1085
1086
|
function Bt(e) {
|
|
1086
1087
|
if (e === void 0 && (e = !1), Le === null || e) {
|
|
1087
|
-
var t = document.createElement("div"),
|
|
1088
|
-
|
|
1089
|
-
var o = document.createElement("div"),
|
|
1090
|
-
return
|
|
1088
|
+
var t = document.createElement("div"), r = t.style;
|
|
1089
|
+
r.width = "50px", r.height = "50px", r.overflow = "scroll", r.direction = "rtl";
|
|
1090
|
+
var o = document.createElement("div"), n = o.style;
|
|
1091
|
+
return n.width = "100px", n.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;
|
|
1091
1092
|
}
|
|
1092
1093
|
return Le;
|
|
1093
1094
|
}
|
|
1094
1095
|
var No = 150, Eo = function(t) {
|
|
1095
|
-
var
|
|
1096
|
+
var r = t.columnIndex;
|
|
1096
1097
|
t.data;
|
|
1097
1098
|
var o = t.rowIndex;
|
|
1098
|
-
return o + ":" +
|
|
1099
|
+
return o + ":" + r;
|
|
1099
1100
|
}, $e = null, Ge = null, Ve = null;
|
|
1100
1101
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && ($e = /* @__PURE__ */ new WeakSet(), Ge = /* @__PURE__ */ new WeakSet(), Ve = /* @__PURE__ */ new WeakSet());
|
|
1101
1102
|
function Oo(e) {
|
|
1102
|
-
var t,
|
|
1103
|
+
var t, r = e.getColumnOffset, o = e.getColumnStartIndexForOffset, n = e.getColumnStopIndexForStartIndex, i = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, l = e.getOffsetForColumnAndAlignment, d = e.getOffsetForRowAndAlignment, u = e.getRowHeight, f = e.getRowOffset, h = e.getRowStartIndexForOffset, g = e.getRowStopIndexForStartIndex, b = e.initInstanceProps, w = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
|
|
1103
1104
|
return t = /* @__PURE__ */ function(_) {
|
|
1104
1105
|
So(m, _);
|
|
1105
1106
|
function m(S) {
|
|
@@ -1136,7 +1137,7 @@ function Oo(e) {
|
|
|
1136
1137
|
if (R.hasOwnProperty(k))
|
|
1137
1138
|
z = R[k];
|
|
1138
1139
|
else {
|
|
1139
|
-
var y =
|
|
1140
|
+
var y = r(p.props, C, p._instanceProps), N = I === "rtl";
|
|
1140
1141
|
R[k] = z = {
|
|
1141
1142
|
position: "absolute",
|
|
1142
1143
|
left: N ? void 0 : y,
|
|
@@ -1243,10 +1244,10 @@ function Oo(e) {
|
|
|
1243
1244
|
}, T.componentWillUnmount = function() {
|
|
1244
1245
|
this._resetIsScrollingTimeoutId !== null && jt(this._resetIsScrollingTimeoutId);
|
|
1245
1246
|
}, T.render = function() {
|
|
1246
|
-
var p = this.props, P = p.children, C = p.className, x = p.columnCount, E = p.direction, I = p.height, O = p.innerRef, R = p.innerElementType, k = p.innerTagName, z = p.itemData, y = p.itemKey, N = y === void 0 ? Eo : y, M = p.outerElementType, V = p.outerTagName, Z = p.rowCount, Y = p.style, B = p.useIsScrolling, j = p.width, te = this.state.isScrolling, ae = this._getHorizontalRangeToRender(), J = ae[0],
|
|
1247
|
+
var p = this.props, P = p.children, C = p.className, x = p.columnCount, E = p.direction, I = p.height, O = p.innerRef, R = p.innerElementType, k = p.innerTagName, z = p.itemData, y = p.itemKey, N = y === void 0 ? Eo : y, M = p.outerElementType, V = p.outerTagName, Z = p.rowCount, Y = p.style, B = p.useIsScrolling, j = p.width, te = this.state.isScrolling, ae = this._getHorizontalRangeToRender(), J = ae[0], re = ae[1], he = this._getVerticalRangeToRender(), ce = he[0], Oe = he[1], ve = [];
|
|
1247
1248
|
if (x > 0 && Z)
|
|
1248
1249
|
for (var me = ce; me <= Oe; me++)
|
|
1249
|
-
for (var le = J; le <=
|
|
1250
|
+
for (var le = J; le <= re; le++)
|
|
1250
1251
|
ve.push(He(P, {
|
|
1251
1252
|
columnIndex: le,
|
|
1252
1253
|
data: z,
|
|
@@ -1264,7 +1265,7 @@ function Oo(e) {
|
|
|
1264
1265
|
className: C,
|
|
1265
1266
|
onScroll: this._onScroll,
|
|
1266
1267
|
ref: this._outerRefSetter,
|
|
1267
|
-
style:
|
|
1268
|
+
style: Dn({
|
|
1268
1269
|
position: "relative",
|
|
1269
1270
|
height: I,
|
|
1270
1271
|
width: j,
|
|
@@ -1296,7 +1297,7 @@ function Oo(e) {
|
|
|
1296
1297
|
var p = this.props, P = p.columnCount, C = p.overscanColumnCount, x = p.overscanColumnsCount, E = p.overscanCount, I = p.rowCount, O = this.state, R = O.horizontalScrollDirection, k = O.isScrolling, z = O.scrollLeft, y = C || x || E || 1;
|
|
1297
1298
|
if (P === 0 || I === 0)
|
|
1298
1299
|
return [0, 0, 0, 0];
|
|
1299
|
-
var N = o(this.props, z, this._instanceProps), M =
|
|
1300
|
+
var N = o(this.props, z, this._instanceProps), M = n(this.props, N, z, this._instanceProps), V = !k || R === "backward" ? Math.max(1, y) : 1, Z = !k || R === "forward" ? Math.max(1, y) : 1;
|
|
1300
1301
|
return [Math.max(0, N - V), Math.max(0, Math.min(P - 1, M + Z)), N, M];
|
|
1301
1302
|
}, T._getVerticalRangeToRender = function() {
|
|
1302
1303
|
var p = this.props, P = p.columnCount, C = p.overscanCount, x = p.overscanRowCount, E = p.overscanRowsCount, I = p.rowCount, O = this.state, R = O.isScrolling, k = O.verticalScrollDirection, z = O.scrollTop, y = x || E || C || 1;
|
|
@@ -1305,48 +1306,48 @@ function Oo(e) {
|
|
|
1305
1306
|
var N = h(this.props, z, this._instanceProps), M = g(this.props, N, z, this._instanceProps), V = !R || k === "backward" ? Math.max(1, y) : 1, Z = !R || k === "forward" ? Math.max(1, y) : 1;
|
|
1306
1307
|
return [Math.max(0, N - V), Math.max(0, Math.min(I - 1, M + Z)), N, M];
|
|
1307
1308
|
}, m;
|
|
1308
|
-
}(
|
|
1309
|
+
}(Qr), t.defaultProps = {
|
|
1309
1310
|
direction: "ltr",
|
|
1310
1311
|
itemData: void 0,
|
|
1311
1312
|
useIsScrolling: !1
|
|
1312
1313
|
}, t;
|
|
1313
1314
|
}
|
|
1314
|
-
var Do = function(t,
|
|
1315
|
-
var o = t.children,
|
|
1315
|
+
var Do = function(t, r) {
|
|
1316
|
+
var o = t.children, n = t.direction, i = t.height, c = t.innerTagName, s = t.outerTagName, l = t.overscanColumnsCount, d = t.overscanCount, u = t.overscanRowsCount, f = t.width, h = r.instance;
|
|
1316
1317
|
if (process.env.NODE_ENV !== "production") {
|
|
1317
1318
|
if (typeof d == "number" && $e && !$e.has(h) && ($e.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof l == "number" || typeof u == "number") && Ge && !Ge.has(h) && (Ge.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && Ve && !Ve.has(h) && (Ve.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1318
1319
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1319
|
-
switch (
|
|
1320
|
+
switch (n) {
|
|
1320
1321
|
case "ltr":
|
|
1321
1322
|
case "rtl":
|
|
1322
1323
|
break;
|
|
1323
1324
|
default:
|
|
1324
|
-
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' +
|
|
1325
|
+
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + n + '" was specified.'));
|
|
1325
1326
|
}
|
|
1326
1327
|
if (typeof f != "number")
|
|
1327
1328
|
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (f === null ? "null" : typeof f) + '" was specified.'));
|
|
1328
1329
|
if (typeof i != "number")
|
|
1329
1330
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
|
|
1330
1331
|
}
|
|
1331
|
-
}, Kt = 50,
|
|
1332
|
-
var o = t.rowCount,
|
|
1332
|
+
}, Kt = 50, Sr = function(t, r) {
|
|
1333
|
+
var o = t.rowCount, n = r.rowMetadataMap, i = r.estimatedRowHeight, c = r.lastMeasuredRowIndex, s = 0;
|
|
1333
1334
|
if (c >= o && (c = o - 1), c >= 0) {
|
|
1334
|
-
var l =
|
|
1335
|
+
var l = n[c];
|
|
1335
1336
|
s = l.offset + l.size;
|
|
1336
1337
|
}
|
|
1337
1338
|
var d = o - c - 1, u = d * i;
|
|
1338
1339
|
return s + u;
|
|
1339
|
-
},
|
|
1340
|
-
var o = t.columnCount,
|
|
1340
|
+
}, xr = function(t, r) {
|
|
1341
|
+
var o = t.columnCount, n = r.columnMetadataMap, i = r.estimatedColumnWidth, c = r.lastMeasuredColumnIndex, s = 0;
|
|
1341
1342
|
if (c >= o && (c = o - 1), c >= 0) {
|
|
1342
|
-
var l =
|
|
1343
|
+
var l = n[c];
|
|
1343
1344
|
s = l.offset + l.size;
|
|
1344
1345
|
}
|
|
1345
1346
|
var d = o - c - 1, u = d * i;
|
|
1346
1347
|
return s + u;
|
|
1347
|
-
}, fe = function(t,
|
|
1348
|
+
}, fe = function(t, r, o, n) {
|
|
1348
1349
|
var i, c, s;
|
|
1349
|
-
if (t === "column" ? (i =
|
|
1350
|
+
if (t === "column" ? (i = n.columnMetadataMap, c = r.columnWidth, s = n.lastMeasuredColumnIndex) : (i = n.rowMetadataMap, c = r.rowHeight, s = n.lastMeasuredRowIndex), o > s) {
|
|
1350
1351
|
var l = 0;
|
|
1351
1352
|
if (s >= 0) {
|
|
1352
1353
|
var d = i[s];
|
|
@@ -1359,29 +1360,29 @@ var Do = function(t, n) {
|
|
|
1359
1360
|
size: f
|
|
1360
1361
|
}, l += f;
|
|
1361
1362
|
}
|
|
1362
|
-
t === "column" ?
|
|
1363
|
+
t === "column" ? n.lastMeasuredColumnIndex = o : n.lastMeasuredRowIndex = o;
|
|
1363
1364
|
}
|
|
1364
1365
|
return i[o];
|
|
1365
|
-
}, Xt = function(t,
|
|
1366
|
+
}, Xt = function(t, r, o, n) {
|
|
1366
1367
|
var i, c;
|
|
1367
1368
|
t === "column" ? (i = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (i = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
|
|
1368
1369
|
var s = c > 0 ? i[c].offset : 0;
|
|
1369
|
-
return s >=
|
|
1370
|
-
},
|
|
1371
|
-
for (; i <=
|
|
1372
|
-
var s = i + Math.floor((
|
|
1370
|
+
return s >= n ? Ir(t, r, o, c, 0, n) : zo(t, r, o, Math.max(0, c), n);
|
|
1371
|
+
}, Ir = function(t, r, o, n, i, c) {
|
|
1372
|
+
for (; i <= n; ) {
|
|
1373
|
+
var s = i + Math.floor((n - i) / 2), l = fe(t, r, s, o).offset;
|
|
1373
1374
|
if (l === c)
|
|
1374
1375
|
return s;
|
|
1375
|
-
l < c ? i = s + 1 : l > c && (
|
|
1376
|
+
l < c ? i = s + 1 : l > c && (n = s - 1);
|
|
1376
1377
|
}
|
|
1377
1378
|
return i > 0 ? i - 1 : 0;
|
|
1378
|
-
}, zo = function(t,
|
|
1379
|
-
for (var c = t === "column" ?
|
|
1380
|
-
|
|
1381
|
-
return
|
|
1382
|
-
}, Yt = function(t,
|
|
1383
|
-
var l = t === "column" ?
|
|
1384
|
-
switch (
|
|
1379
|
+
}, zo = function(t, r, o, n, i) {
|
|
1380
|
+
for (var c = t === "column" ? r.columnCount : r.rowCount, s = 1; n < c && fe(t, r, n, o).offset < i; )
|
|
1381
|
+
n += s, s *= 2;
|
|
1382
|
+
return Ir(t, r, o, Math.min(n, c - 1), Math.floor(n / 2), i);
|
|
1383
|
+
}, Yt = function(t, r, o, n, i, c, s) {
|
|
1384
|
+
var l = t === "column" ? r.width : r.height, d = fe(t, r, o, c), u = t === "column" ? xr(r, c) : Sr(r, c), f = Math.max(0, Math.min(u - l, d.offset)), h = Math.max(0, d.offset - l + s + d.size);
|
|
1385
|
+
switch (n === "smart" && (i >= h - l && i <= f + l ? n = "auto" : n = "center"), n) {
|
|
1385
1386
|
case "start":
|
|
1386
1387
|
return f;
|
|
1387
1388
|
case "end":
|
|
@@ -1393,72 +1394,72 @@ var Do = function(t, n) {
|
|
|
1393
1394
|
return i >= h && i <= f ? i : h > f || i < h ? h : f;
|
|
1394
1395
|
}
|
|
1395
1396
|
}, Ao = /* @__PURE__ */ Oo({
|
|
1396
|
-
getColumnOffset: function(t,
|
|
1397
|
-
return fe("column", t,
|
|
1397
|
+
getColumnOffset: function(t, r, o) {
|
|
1398
|
+
return fe("column", t, r, o).offset;
|
|
1398
1399
|
},
|
|
1399
|
-
getColumnStartIndexForOffset: function(t,
|
|
1400
|
-
return Xt("column", t, o,
|
|
1400
|
+
getColumnStartIndexForOffset: function(t, r, o) {
|
|
1401
|
+
return Xt("column", t, o, r);
|
|
1401
1402
|
},
|
|
1402
|
-
getColumnStopIndexForStartIndex: function(t,
|
|
1403
|
-
for (var i = t.columnCount, c = t.width, s = fe("column", t,
|
|
1404
|
-
u++, d += fe("column", t, u,
|
|
1403
|
+
getColumnStopIndexForStartIndex: function(t, r, o, n) {
|
|
1404
|
+
for (var i = t.columnCount, c = t.width, s = fe("column", t, r, n), l = o + c, d = s.offset + s.size, u = r; u < i - 1 && d < l; )
|
|
1405
|
+
u++, d += fe("column", t, u, n).size;
|
|
1405
1406
|
return u;
|
|
1406
1407
|
},
|
|
1407
|
-
getColumnWidth: function(t,
|
|
1408
|
-
return o.columnMetadataMap[
|
|
1408
|
+
getColumnWidth: function(t, r, o) {
|
|
1409
|
+
return o.columnMetadataMap[r].size;
|
|
1409
1410
|
},
|
|
1410
|
-
getEstimatedTotalHeight:
|
|
1411
|
-
getEstimatedTotalWidth:
|
|
1412
|
-
getOffsetForColumnAndAlignment: function(t,
|
|
1413
|
-
return Yt("column", t,
|
|
1411
|
+
getEstimatedTotalHeight: Sr,
|
|
1412
|
+
getEstimatedTotalWidth: xr,
|
|
1413
|
+
getOffsetForColumnAndAlignment: function(t, r, o, n, i, c) {
|
|
1414
|
+
return Yt("column", t, r, o, n, i, c);
|
|
1414
1415
|
},
|
|
1415
|
-
getOffsetForRowAndAlignment: function(t,
|
|
1416
|
-
return Yt("row", t,
|
|
1416
|
+
getOffsetForRowAndAlignment: function(t, r, o, n, i, c) {
|
|
1417
|
+
return Yt("row", t, r, o, n, i, c);
|
|
1417
1418
|
},
|
|
1418
|
-
getRowOffset: function(t,
|
|
1419
|
-
return fe("row", t,
|
|
1419
|
+
getRowOffset: function(t, r, o) {
|
|
1420
|
+
return fe("row", t, r, o).offset;
|
|
1420
1421
|
},
|
|
1421
|
-
getRowHeight: function(t,
|
|
1422
|
-
return o.rowMetadataMap[
|
|
1422
|
+
getRowHeight: function(t, r, o) {
|
|
1423
|
+
return o.rowMetadataMap[r].size;
|
|
1423
1424
|
},
|
|
1424
|
-
getRowStartIndexForOffset: function(t,
|
|
1425
|
-
return Xt("row", t, o,
|
|
1425
|
+
getRowStartIndexForOffset: function(t, r, o) {
|
|
1426
|
+
return Xt("row", t, o, r);
|
|
1426
1427
|
},
|
|
1427
|
-
getRowStopIndexForStartIndex: function(t,
|
|
1428
|
-
for (var i = t.rowCount, c = t.height, s = fe("row", t,
|
|
1429
|
-
u++, d += fe("row", t, u,
|
|
1428
|
+
getRowStopIndexForStartIndex: function(t, r, o, n) {
|
|
1429
|
+
for (var i = t.rowCount, c = t.height, s = fe("row", t, r, n), l = o + c, d = s.offset + s.size, u = r; u < i - 1 && d < l; )
|
|
1430
|
+
u++, d += fe("row", t, u, n).size;
|
|
1430
1431
|
return u;
|
|
1431
1432
|
},
|
|
1432
|
-
initInstanceProps: function(t,
|
|
1433
|
-
var o = t,
|
|
1433
|
+
initInstanceProps: function(t, r) {
|
|
1434
|
+
var o = t, n = o.estimatedColumnWidth, i = o.estimatedRowHeight, c = {
|
|
1434
1435
|
columnMetadataMap: {},
|
|
1435
|
-
estimatedColumnWidth:
|
|
1436
|
+
estimatedColumnWidth: n || Kt,
|
|
1436
1437
|
estimatedRowHeight: i || Kt,
|
|
1437
1438
|
lastMeasuredColumnIndex: -1,
|
|
1438
1439
|
lastMeasuredRowIndex: -1,
|
|
1439
1440
|
rowMetadataMap: {}
|
|
1440
1441
|
};
|
|
1441
|
-
return
|
|
1442
|
-
l === void 0 && (l = !0),
|
|
1442
|
+
return r.resetAfterColumnIndex = function(s, l) {
|
|
1443
|
+
l === void 0 && (l = !0), r.resetAfterIndices({
|
|
1443
1444
|
columnIndex: s,
|
|
1444
1445
|
shouldForceUpdate: l
|
|
1445
1446
|
});
|
|
1446
|
-
},
|
|
1447
|
-
l === void 0 && (l = !0),
|
|
1447
|
+
}, r.resetAfterRowIndex = function(s, l) {
|
|
1448
|
+
l === void 0 && (l = !0), r.resetAfterIndices({
|
|
1448
1449
|
rowIndex: s,
|
|
1449
1450
|
shouldForceUpdate: l
|
|
1450
1451
|
});
|
|
1451
|
-
},
|
|
1452
|
+
}, r.resetAfterIndices = function(s) {
|
|
1452
1453
|
var l = s.columnIndex, d = s.rowIndex, u = s.shouldForceUpdate, f = u === void 0 ? !0 : u;
|
|
1453
|
-
typeof l == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, l - 1)), typeof d == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, d - 1)),
|
|
1454
|
+
typeof l == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, l - 1)), typeof d == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, d - 1)), r._getItemStyleCache(-1), f && r.forceUpdate();
|
|
1454
1455
|
}, c;
|
|
1455
1456
|
},
|
|
1456
1457
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
1457
1458
|
validateProps: function(t) {
|
|
1458
|
-
var
|
|
1459
|
+
var r = t.columnWidth, o = t.rowHeight;
|
|
1459
1460
|
if (process.env.NODE_ENV !== "production") {
|
|
1460
|
-
if (typeof
|
|
1461
|
-
throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (
|
|
1461
|
+
if (typeof r != "function")
|
|
1462
|
+
throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
1462
1463
|
if (typeof o != "function")
|
|
1463
1464
|
throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1464
1465
|
}
|
|
@@ -1466,8 +1467,8 @@ var Do = function(t, n) {
|
|
|
1466
1467
|
});
|
|
1467
1468
|
process.env.NODE_ENV;
|
|
1468
1469
|
function Jt(e, t) {
|
|
1469
|
-
for (var
|
|
1470
|
-
if (!(
|
|
1470
|
+
for (var r in e)
|
|
1471
|
+
if (!(r in t))
|
|
1471
1472
|
return !0;
|
|
1472
1473
|
for (var o in t)
|
|
1473
1474
|
if (e[o] !== t[o])
|
|
@@ -1476,27 +1477,27 @@ function Jt(e, t) {
|
|
|
1476
1477
|
}
|
|
1477
1478
|
var Fo = ["style"], ko = ["style"];
|
|
1478
1479
|
function Wo(e, t) {
|
|
1479
|
-
var
|
|
1480
|
-
return !Jt(
|
|
1480
|
+
var r = e.style, o = qt(e, Fo), n = t.style, i = qt(t, ko);
|
|
1481
|
+
return !Jt(r, n) && !Jt(o, i);
|
|
1481
1482
|
}
|
|
1482
1483
|
const Mo = () => {
|
|
1483
|
-
const { viewMode: e } = Ye(), { scrollMode: t } = Ee(), { setColumnCount:
|
|
1484
|
-
(g) =>
|
|
1485
|
-
[
|
|
1484
|
+
const { viewMode: e } = Ye(), { scrollMode: t } = Ee(), { setColumnCount: r } = cr(), { virtualScrollableElementRef: o } = Je(), n = Qe(), i = L(
|
|
1485
|
+
(g) => n.widths[g] || 0,
|
|
1486
|
+
[n.widths]
|
|
1486
1487
|
), c = L(
|
|
1487
|
-
(g) =>
|
|
1488
|
-
[
|
|
1489
|
-
), s = F(() =>
|
|
1488
|
+
(g) => n.heights[g] || 0,
|
|
1489
|
+
[n.heights]
|
|
1490
|
+
), s = F(() => n.heights.length, [n.heights]), l = F(() => Math.max(...n.widths), [n.widths]), d = F(() => t === X.HORIZONTAL_SCROLLING ? s : e === Ue.DUAL_PAGE ? 2 : 1, [e, t, t, s, o, l]);
|
|
1490
1491
|
A(() => {
|
|
1491
|
-
|
|
1492
|
-
}, [d,
|
|
1493
|
-
const u = F(() => t === X.HORIZONTAL_SCROLLING || t === X.PAGE_SCROLLING ? 1 : Math.round(s / d), [d, s, t]), f = F(() =>
|
|
1492
|
+
r(d);
|
|
1493
|
+
}, [d, r]);
|
|
1494
|
+
const u = F(() => t === X.HORIZONTAL_SCROLLING || t === X.PAGE_SCROLLING ? 1 : Math.round(s / d), [d, s, t]), f = F(() => n.heights.reduce((g, b) => g + b, 0) / n.heights.length || 0, [n]), h = F(() => n.widths.reduce((g, b) => g + b, 0) / n.heights.length || 0, [n]);
|
|
1494
1495
|
return {
|
|
1495
1496
|
rowCount: u,
|
|
1496
1497
|
rowHeight: c,
|
|
1497
1498
|
columnCount: d,
|
|
1498
1499
|
columnWidth: i,
|
|
1499
|
-
pageDimension:
|
|
1500
|
+
pageDimension: n,
|
|
1500
1501
|
estimatedRowHeight: f,
|
|
1501
1502
|
estimatedColumnWidth: h
|
|
1502
1503
|
};
|
|
@@ -1504,21 +1505,21 @@ const Mo = () => {
|
|
|
1504
1505
|
let oe;
|
|
1505
1506
|
typeof window < "u" ? oe = window : typeof self < "u" ? oe = self : oe = global;
|
|
1506
1507
|
let wt = null, bt = null;
|
|
1507
|
-
const Qt = 20, pt = oe.clearTimeout,
|
|
1508
|
-
ht == null ||
|
|
1509
|
-
return
|
|
1510
|
-
}) : (wt = function([t,
|
|
1511
|
-
ht(t), pt(
|
|
1508
|
+
const Qt = 20, pt = oe.clearTimeout, er = oe.setTimeout, ht = oe.cancelAnimationFrame || oe.mozCancelAnimationFrame || oe.webkitCancelAnimationFrame, tr = oe.requestAnimationFrame || oe.mozRequestAnimationFrame || oe.webkitRequestAnimationFrame;
|
|
1509
|
+
ht == null || tr == null ? (wt = pt, bt = function(t) {
|
|
1510
|
+
return er(t, Qt);
|
|
1511
|
+
}) : (wt = function([t, r]) {
|
|
1512
|
+
ht(t), pt(r);
|
|
1512
1513
|
}, bt = function(t) {
|
|
1513
|
-
const
|
|
1514
|
+
const r = tr(function() {
|
|
1514
1515
|
pt(o), t();
|
|
1515
|
-
}), o =
|
|
1516
|
-
ht(
|
|
1516
|
+
}), o = er(function() {
|
|
1517
|
+
ht(r), t();
|
|
1517
1518
|
}, Qt);
|
|
1518
|
-
return [
|
|
1519
|
+
return [r, o];
|
|
1519
1520
|
});
|
|
1520
1521
|
function Ho(e) {
|
|
1521
|
-
let t,
|
|
1522
|
+
let t, r, o, n, i, c, s;
|
|
1522
1523
|
const l = typeof document < "u" && document.attachEvent;
|
|
1523
1524
|
if (!l) {
|
|
1524
1525
|
c = function(_) {
|
|
@@ -1550,11 +1551,11 @@ function Ho(e) {
|
|
|
1550
1551
|
}
|
|
1551
1552
|
}
|
|
1552
1553
|
}
|
|
1553
|
-
|
|
1554
|
+
r = "resizeanim", t = "@" + g + "keyframes " + r + " { from { opacity: 0; } to { opacity: 0; } } ", n = g + "animation: 1ms " + r + "; ";
|
|
1554
1555
|
}
|
|
1555
1556
|
const d = function(h) {
|
|
1556
1557
|
if (!h.getElementById("detectElementResize")) {
|
|
1557
|
-
const g = (t || "") + ".resize-triggers { " + (
|
|
1558
|
+
const g = (t || "") + ".resize-triggers { " + (n || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', b = h.head || h.getElementsByTagName("head")[0], w = h.createElement("style");
|
|
1558
1559
|
w.id = "detectElementResize", w.type = "text/css", e != null && w.setAttribute("nonce", e), w.styleSheet ? w.styleSheet.cssText = g : w.appendChild(h.createTextNode(g)), b.appendChild(w);
|
|
1559
1560
|
}
|
|
1560
1561
|
};
|
|
@@ -1570,7 +1571,7 @@ function Ho(e) {
|
|
|
1570
1571
|
v.className = "expand-trigger", v.appendChild(b.createElement("div"));
|
|
1571
1572
|
const _ = b.createElement("div");
|
|
1572
1573
|
_.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(_), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(T) {
|
|
1573
|
-
T.animationName ===
|
|
1574
|
+
T.animationName === r && c(h);
|
|
1574
1575
|
}, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
|
|
1575
1576
|
}
|
|
1576
1577
|
h.__resizeListeners__.push(g);
|
|
@@ -1589,7 +1590,7 @@ function Ho(e) {
|
|
|
1589
1590
|
}
|
|
1590
1591
|
};
|
|
1591
1592
|
}
|
|
1592
|
-
class $o extends
|
|
1593
|
+
class $o extends en {
|
|
1593
1594
|
constructor(...t) {
|
|
1594
1595
|
super(...t), this.state = {
|
|
1595
1596
|
height: this.props.defaultHeight || 0,
|
|
@@ -1599,38 +1600,38 @@ class $o extends tr {
|
|
|
1599
1600
|
}, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
|
|
1600
1601
|
this._timeoutId = null;
|
|
1601
1602
|
const {
|
|
1602
|
-
disableHeight:
|
|
1603
|
+
disableHeight: r,
|
|
1603
1604
|
disableWidth: o,
|
|
1604
|
-
onResize:
|
|
1605
|
+
onResize: n
|
|
1605
1606
|
} = this.props;
|
|
1606
1607
|
if (this._parentNode) {
|
|
1607
1608
|
const i = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(i.paddingLeft || "0"), s = parseFloat(i.paddingRight || "0"), l = parseFloat(i.paddingTop || "0"), d = parseFloat(i.paddingBottom || "0"), u = this._parentNode.getBoundingClientRect(), f = u.height - l - d, h = u.width - c - s, g = this._parentNode.offsetHeight - l - d, b = this._parentNode.offsetWidth - c - s;
|
|
1608
|
-
(!
|
|
1609
|
+
(!r && (this.state.height !== g || this.state.scaledHeight !== f) || !o && (this.state.width !== b || this.state.scaledWidth !== h)) && (this.setState({
|
|
1609
1610
|
height: g,
|
|
1610
1611
|
width: b,
|
|
1611
1612
|
scaledHeight: f,
|
|
1612
1613
|
scaledWidth: h
|
|
1613
|
-
}), typeof
|
|
1614
|
+
}), typeof n == "function" && n({
|
|
1614
1615
|
height: g,
|
|
1615
1616
|
scaledHeight: f,
|
|
1616
1617
|
scaledWidth: h,
|
|
1617
1618
|
width: b
|
|
1618
1619
|
}));
|
|
1619
1620
|
}
|
|
1620
|
-
}, this._setRef = (
|
|
1621
|
-
this._autoSizer =
|
|
1621
|
+
}, this._setRef = (r) => {
|
|
1622
|
+
this._autoSizer = r;
|
|
1622
1623
|
};
|
|
1623
1624
|
}
|
|
1624
1625
|
componentDidMount() {
|
|
1625
1626
|
const {
|
|
1626
1627
|
nonce: t
|
|
1627
|
-
} = this.props,
|
|
1628
|
-
if (
|
|
1629
|
-
this._parentNode =
|
|
1630
|
-
const o =
|
|
1628
|
+
} = this.props, r = this._autoSizer ? this._autoSizer.parentNode : null;
|
|
1629
|
+
if (r != null && r.ownerDocument && r.ownerDocument.defaultView && r instanceof r.ownerDocument.defaultView.HTMLElement) {
|
|
1630
|
+
this._parentNode = r;
|
|
1631
|
+
const o = r.ownerDocument.defaultView.ResizeObserver;
|
|
1631
1632
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1632
1633
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1633
|
-
}), this._resizeObserver.observe(
|
|
1634
|
+
}), this._resizeObserver.observe(r)) : (this._detectElementResize = Ho(t), this._detectElementResize.addResizeListener(r, this._onResize)), this._onResize();
|
|
1634
1635
|
}
|
|
1635
1636
|
}
|
|
1636
1637
|
componentWillUnmount() {
|
|
@@ -1639,9 +1640,9 @@ class $o extends tr {
|
|
|
1639
1640
|
render() {
|
|
1640
1641
|
const {
|
|
1641
1642
|
children: t,
|
|
1642
|
-
defaultHeight:
|
|
1643
|
+
defaultHeight: r,
|
|
1643
1644
|
defaultWidth: o,
|
|
1644
|
-
disableHeight:
|
|
1645
|
+
disableHeight: n = !1,
|
|
1645
1646
|
disableWidth: i = !1,
|
|
1646
1647
|
doNotBailOutOnEmptyChildren: c = !1,
|
|
1647
1648
|
nonce: s,
|
|
@@ -1658,7 +1659,7 @@ class $o extends tr {
|
|
|
1658
1659
|
overflow: "visible"
|
|
1659
1660
|
}, _ = {};
|
|
1660
1661
|
let m = !1;
|
|
1661
|
-
return
|
|
1662
|
+
return n || (h === 0 && (m = !0), v.height = 0, _.height = h, _.scaledHeight = g), i || (w === 0 && (m = !0), v.width = 0, _.width = w, _.scaledWidth = b), c && (m = !1), He(u, {
|
|
1662
1663
|
ref: this._setRef,
|
|
1663
1664
|
style: {
|
|
1664
1665
|
...v,
|
|
@@ -1669,48 +1670,48 @@ class $o extends tr {
|
|
|
1669
1670
|
}
|
|
1670
1671
|
}
|
|
1671
1672
|
const Go = ({ widths: e, heights: t }) => {
|
|
1672
|
-
const { focusedPage:
|
|
1673
|
-
const s = [], l = Math.ceil(
|
|
1673
|
+
const { focusedPage: r, totalPages: o } = ie(), n = F(() => {
|
|
1674
|
+
const s = [], l = Math.ceil(r / 2) * 2 - 1;
|
|
1674
1675
|
if (s.push(l), l + 1 < o) {
|
|
1675
1676
|
const d = l + 1;
|
|
1676
1677
|
s.push(d);
|
|
1677
1678
|
}
|
|
1678
1679
|
return s;
|
|
1679
|
-
}, [
|
|
1680
|
+
}, [r, o]), i = F(() => [
|
|
1680
1681
|
{
|
|
1681
1682
|
position: "absolute",
|
|
1682
1683
|
left: 0,
|
|
1683
|
-
width: e(
|
|
1684
|
-
height: t(
|
|
1684
|
+
width: e(r - 1),
|
|
1685
|
+
height: t(r - 1)
|
|
1685
1686
|
},
|
|
1686
1687
|
{
|
|
1687
1688
|
position: "absolute",
|
|
1688
|
-
left: e(
|
|
1689
|
+
left: e(r),
|
|
1689
1690
|
top: 0,
|
|
1690
|
-
width: e(
|
|
1691
|
-
height: t(
|
|
1691
|
+
width: e(r),
|
|
1692
|
+
height: t(r)
|
|
1692
1693
|
}
|
|
1693
|
-
], [e, t,
|
|
1694
|
-
return /* @__PURE__ */ a("div", { style: { width: c, position: "relative" }, children:
|
|
1694
|
+
], [e, t, n]), c = F(() => i.reduce((s, l) => s + Number(l.width || 0), 0), [i]);
|
|
1695
|
+
return /* @__PURE__ */ a("div", { style: { width: c, position: "relative" }, children: n.map((s, l) => /* @__PURE__ */ a(Lt, { style: i[l], pageNumber: s }, s)) });
|
|
1695
1696
|
}, Vo = ({ widths: e, heights: t }) => {
|
|
1696
|
-
const { focusedPage:
|
|
1697
|
+
const { focusedPage: r } = ie(), o = F(() => ({
|
|
1697
1698
|
position: "absolute",
|
|
1698
|
-
width: e(
|
|
1699
|
-
height: t(
|
|
1700
|
-
}), [e, t,
|
|
1699
|
+
width: e(r - 1),
|
|
1700
|
+
height: t(r - 1)
|
|
1701
|
+
}), [e, t, r]), n = F(() => e(r - 1), [e]);
|
|
1701
1702
|
return /* @__PURE__ */ a(
|
|
1702
1703
|
"div",
|
|
1703
1704
|
{
|
|
1704
1705
|
style: {
|
|
1705
|
-
width:
|
|
1706
|
+
width: n,
|
|
1706
1707
|
position: "relative"
|
|
1707
1708
|
},
|
|
1708
|
-
children: /* @__PURE__ */ a(Lt, { style: o, pageNumber:
|
|
1709
|
+
children: /* @__PURE__ */ a(Lt, { style: o, pageNumber: r }, r)
|
|
1709
1710
|
}
|
|
1710
1711
|
);
|
|
1711
|
-
}, Uo = (e, t,
|
|
1712
|
-
const o = W(), { contentRef:
|
|
1713
|
-
const v = c[w], _ =
|
|
1712
|
+
}, Uo = (e, t, r) => {
|
|
1713
|
+
const o = W(), { contentRef: n } = be(), { heights: i, widths: c } = Qe(), { setFocusedPage: s } = ie(), [l, d] = $([]), { smoothScrolling: u } = Tt(), f = St(l, 100, 500), h = F(() => i.map((b, w) => {
|
|
1714
|
+
const v = c[w], _ = Wn(w + 1, e), m = v * _.columnIndex, T = b * _.rowIndex, S = m + v, p = T + b;
|
|
1714
1715
|
return {
|
|
1715
1716
|
pageNumber: w + 1,
|
|
1716
1717
|
..._,
|
|
@@ -1746,19 +1747,19 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1746
1747
|
d(_);
|
|
1747
1748
|
});
|
|
1748
1749
|
},
|
|
1749
|
-
[
|
|
1750
|
+
[n, h]
|
|
1750
1751
|
);
|
|
1751
1752
|
A(() => {
|
|
1752
|
-
if (
|
|
1753
|
-
return
|
|
1754
|
-
|
|
1753
|
+
if (r)
|
|
1754
|
+
return r == null || r.addEventListener("scroll", g), () => {
|
|
1755
|
+
r == null || r.removeEventListener("scroll", g);
|
|
1755
1756
|
};
|
|
1756
|
-
}, [
|
|
1757
|
-
}, qo =
|
|
1758
|
-
const
|
|
1759
|
-
return /* @__PURE__ */ a(Lt, { style: o, pageNumber:
|
|
1760
|
-
}, Wo),
|
|
1761
|
-
const { initialPage: e = 1, initialScrollMode: t } =
|
|
1757
|
+
}, [r, g]);
|
|
1758
|
+
}, qo = tn(({ columnIndex: e, rowIndex: t, data: r, style: o }) => {
|
|
1759
|
+
const n = Mn(t, e, r.columnCount);
|
|
1760
|
+
return /* @__PURE__ */ a(Lt, { style: o, pageNumber: n }, n);
|
|
1761
|
+
}, Wo), xs = () => {
|
|
1762
|
+
const { initialPage: e = 1, initialScrollMode: t } = sn(), { pagesRef: r, setPagesRef: o } = be(), { scrollToPage: n } = vr(), {
|
|
1762
1763
|
virtualScrollRef: i,
|
|
1763
1764
|
getVirtualScrollRef: c,
|
|
1764
1765
|
getPageScrollElementRef: s,
|
|
@@ -1767,12 +1768,12 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1767
1768
|
virtualScrollableElementRef: u,
|
|
1768
1769
|
totalInnerDimensions: f,
|
|
1769
1770
|
pageScrollElementRef: h
|
|
1770
|
-
} = Je(), g = W(!0), { nextPage: b, prevPage: w, setFocusedPage: v, focusedPage: _ } = ie(), { scrollMode: m } = Ee(), { viewMode: T } = Ye(), S = W(null), { loading: p } = K(), { LoaderImageComponent: P } =
|
|
1771
|
+
} = Je(), g = W(!0), { nextPage: b, prevPage: w, setFocusedPage: v, focusedPage: _ } = ie(), { scrollMode: m } = Ee(), { viewMode: T } = Ye(), S = W(null), { loading: p } = K(), { LoaderImageComponent: P } = ur(), { smoothScrolling: C, targetScrollPosition: x } = Tt(), E = W(
|
|
1771
1772
|
f
|
|
1772
1773
|
), I = W({
|
|
1773
1774
|
viewMode: T,
|
|
1774
1775
|
scrollMode: m
|
|
1775
|
-
}), O = W(!1), R = W(), { isFullScreen: k } =
|
|
1776
|
+
}), O = W(!1), R = W(), { isFullScreen: k } = cn(), {
|
|
1776
1777
|
pageDimension: z,
|
|
1777
1778
|
rowCount: y,
|
|
1778
1779
|
rowHeight: N,
|
|
@@ -1786,14 +1787,14 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1786
1787
|
scrollTop: 0,
|
|
1787
1788
|
scrollLeft: 0
|
|
1788
1789
|
});
|
|
1789
|
-
|
|
1790
|
-
const { isPressed: ae } =
|
|
1790
|
+
kn(r);
|
|
1791
|
+
const { isPressed: ae } = An(), { selectionMode: J } = an(), { initializeGrabScroll: re, resetGrabState: he } = Fn({
|
|
1791
1792
|
isPressed: ae
|
|
1792
|
-
}), ce = F(() => J ===
|
|
1793
|
+
}), ce = F(() => J === nn.HAND, [J]), Oe = F(() => ({
|
|
1793
1794
|
columnCount: M
|
|
1794
1795
|
}), [M]), ve = L(
|
|
1795
1796
|
(H) => {
|
|
1796
|
-
const G = document.activeElement !==
|
|
1797
|
+
const G = document.activeElement !== r;
|
|
1797
1798
|
!k && G || (["ArrowUp", "ArrowLeft"].includes(H.key) ? (H.preventDefault(), w()) : ["ArrowDown", "ArrowRight"].includes(H.key) && (H.preventDefault(), b()));
|
|
1798
1799
|
},
|
|
1799
1800
|
[b, w, k, m]
|
|
@@ -1824,26 +1825,26 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1824
1825
|
), le = L(
|
|
1825
1826
|
(H, G) => {
|
|
1826
1827
|
if (I.current.viewMode !== T || I.current.scrollMode !== m) {
|
|
1827
|
-
j.current && clearTimeout(j.current), O.current = !0,
|
|
1828
|
+
j.current && clearTimeout(j.current), O.current = !0, n(_, "auto"), j.current = setTimeout(() => {
|
|
1828
1829
|
requestAnimationFrame(() => {
|
|
1829
1830
|
I.current = { viewMode: T, scrollMode: m };
|
|
1830
1831
|
});
|
|
1831
1832
|
}, 100);
|
|
1832
1833
|
return;
|
|
1833
1834
|
}
|
|
1834
|
-
const Te = H.scrollTop,
|
|
1835
|
+
const Te = H.scrollTop, rt = H.scrollLeft;
|
|
1835
1836
|
if (!G.height || !G.width)
|
|
1836
1837
|
return;
|
|
1837
1838
|
O.current = !0;
|
|
1838
|
-
const { height: Pe, width:
|
|
1839
|
-
if (Dt === Pe && zt ===
|
|
1839
|
+
const { height: Pe, width: nt } = G, { height: Dt, width: zt } = E.current;
|
|
1840
|
+
if (Dt === Pe && zt === nt)
|
|
1840
1841
|
return;
|
|
1841
|
-
const
|
|
1842
|
+
const Kr = Te / Dt * Pe, Xr = rt / zt * nt, Yr = Math.round(Math.min(Kr, Pe)) || 0, Jr = Math.round(Math.min(Xr, nt)) || 0;
|
|
1842
1843
|
R.current = setTimeout(() => {
|
|
1843
1844
|
requestAnimationFrame(() => {
|
|
1844
1845
|
i == null || i.scrollTo({
|
|
1845
|
-
scrollTop:
|
|
1846
|
-
scrollLeft:
|
|
1846
|
+
scrollTop: Yr,
|
|
1847
|
+
scrollLeft: Jr
|
|
1847
1848
|
});
|
|
1848
1849
|
});
|
|
1849
1850
|
}, 0), E.current = {
|
|
@@ -1856,10 +1857,10 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1856
1857
|
A(() => {
|
|
1857
1858
|
clearTimeout(R.current);
|
|
1858
1859
|
const H = Array.from({ length: y }).reduce(
|
|
1859
|
-
(Te,
|
|
1860
|
+
(Te, rt, Pe) => Te + N(Pe),
|
|
1860
1861
|
0
|
|
1861
1862
|
), G = Array.from({ length: M }).reduce(
|
|
1862
|
-
(Te,
|
|
1863
|
+
(Te, rt, Pe) => Te + V(Pe),
|
|
1863
1864
|
0
|
|
1864
1865
|
), Ce = me(G, H);
|
|
1865
1866
|
te.current = Ce, le(Ce, { height: H, width: G }), d({
|
|
@@ -1876,17 +1877,17 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1876
1877
|
A(() => () => {
|
|
1877
1878
|
j.current && clearTimeout(j.current);
|
|
1878
1879
|
}, []);
|
|
1879
|
-
const tt = F(() =>
|
|
1880
|
+
const tt = F(() => ne(de["rp-pages-container"], {
|
|
1880
1881
|
[de["rp-cursor-grab"]]: ce && !ae,
|
|
1881
1882
|
[de["rp-cursor-grabbing"]]: ce && ae
|
|
1882
|
-
}), [ce, ae]),
|
|
1883
|
+
}), [ce, ae]), Br = L(
|
|
1883
1884
|
(H) => {
|
|
1884
1885
|
if (ce && H) {
|
|
1885
|
-
const G =
|
|
1886
|
-
|
|
1886
|
+
const G = ne(de["rp-pages"]), Ce = document.querySelector(`.${G}`);
|
|
1887
|
+
re(Ce);
|
|
1887
1888
|
}
|
|
1888
1889
|
},
|
|
1889
|
-
[ce,
|
|
1890
|
+
[ce, re, de]
|
|
1890
1891
|
);
|
|
1891
1892
|
return A(() => {
|
|
1892
1893
|
p && he();
|
|
@@ -1922,12 +1923,12 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1922
1923
|
h,
|
|
1923
1924
|
v,
|
|
1924
1925
|
B
|
|
1925
|
-
]), /* @__PURE__ */ a("div", { ref: o, tabIndex: -1, className: tt, children: /* @__PURE__ */ a($o, { style: { minHeight: "50px" }, children: ({ width: H, height: G }) => /* @__PURE__ */ a("div", { "data-rp": "pages", ref:
|
|
1926
|
+
]), /* @__PURE__ */ a("div", { ref: o, tabIndex: -1, className: tt, children: /* @__PURE__ */ a($o, { style: { minHeight: "50px" }, children: ({ width: H, height: G }) => /* @__PURE__ */ a("div", { "data-rp": "pages", ref: Br, style: { width: H, height: G }, children: m === X.PAGE_SCROLLING ? /* @__PURE__ */ a(
|
|
1926
1927
|
"div",
|
|
1927
1928
|
{
|
|
1928
1929
|
ref: s,
|
|
1929
1930
|
style: { width: H, height: G },
|
|
1930
|
-
className:
|
|
1931
|
+
className: ne(de["rp-pages"], de["rp-page-scrolling-wrapper"]),
|
|
1931
1932
|
children: T === Ue.DUAL_PAGE ? /* @__PURE__ */ a(Go, { widths: V, heights: N }) : /* @__PURE__ */ a(Vo, { widths: V, heights: N })
|
|
1932
1933
|
}
|
|
1933
1934
|
) : Z ? /* @__PURE__ */ a(
|
|
@@ -1946,7 +1947,7 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1946
1947
|
estimatedColumnWidth: Z,
|
|
1947
1948
|
estimatedRowHeight: Y,
|
|
1948
1949
|
rowCount: y,
|
|
1949
|
-
className:
|
|
1950
|
+
className: ne(
|
|
1950
1951
|
de["rp-pages"],
|
|
1951
1952
|
m === X.HORIZONTAL_SCROLLING ? de["rp-pages-horizontal-scroll"] : ""
|
|
1952
1953
|
),
|
|
@@ -1983,7 +1984,7 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1983
1984
|
const { nextIcon: e } = pe();
|
|
1984
1985
|
return e || /* @__PURE__ */ a(ke, { style: { transform: "rotate(180deg" } });
|
|
1985
1986
|
}, Bo = () => {
|
|
1986
|
-
const { focusedPage: e, totalPages: t, setFocusedPage:
|
|
1987
|
+
const { focusedPage: e, totalPages: t, setFocusedPage: r, nextPage: o, prevPage: n, goToPage: i } = ie(), [c, s] = $(e.toString()), { pageNavigationTool: l = !0 } = ge(), { isSmallScreen: d } = ye(), { localeMessages: u } = ue();
|
|
1987
1988
|
A(() => {
|
|
1988
1989
|
s(e.toString());
|
|
1989
1990
|
}, [e]);
|
|
@@ -2007,22 +2008,22 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
2007
2008
|
total: t,
|
|
2008
2009
|
current: e,
|
|
2009
2010
|
nextPage: o,
|
|
2010
|
-
prevPage:
|
|
2011
|
+
prevPage: n,
|
|
2011
2012
|
goToPage: i,
|
|
2012
|
-
changePage:
|
|
2013
|
+
changePage: r
|
|
2013
2014
|
}
|
|
2014
2015
|
) : l ? /* @__PURE__ */ D("div", { className: mt["rp-paginate"], children: [
|
|
2015
2016
|
!d && /* @__PURE__ */ a(q, { content: u == null ? void 0 : u.previousPageTooltip, children: /* @__PURE__ */ a(
|
|
2016
2017
|
ee,
|
|
2017
2018
|
{
|
|
2018
|
-
onClick:
|
|
2019
|
+
onClick: n,
|
|
2019
2020
|
"aria-label": u == null ? void 0 : u.previousPageTooltip,
|
|
2020
2021
|
"aria-disabled": e === 1,
|
|
2021
2022
|
children: /* @__PURE__ */ a(Zo, {})
|
|
2022
2023
|
}
|
|
2023
2024
|
) }),
|
|
2024
2025
|
/* @__PURE__ */ a(q, { content: u == null ? void 0 : u.currentPageTooltip, children: /* @__PURE__ */ a(
|
|
2025
|
-
|
|
2026
|
+
sr,
|
|
2026
2027
|
{
|
|
2027
2028
|
onKeyDown: b,
|
|
2028
2029
|
onBlur: g,
|
|
@@ -2046,17 +2047,17 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
2046
2047
|
) })
|
|
2047
2048
|
] }) : null;
|
|
2048
2049
|
};
|
|
2049
|
-
var Rt = "Dialog", [
|
|
2050
|
+
var Rt = "Dialog", [yr, Is] = Un(Rt), [Ko, se] = yr(Rt), Lr = (e) => {
|
|
2050
2051
|
const {
|
|
2051
2052
|
__scopeDialog: t,
|
|
2052
|
-
children:
|
|
2053
|
+
children: r,
|
|
2053
2054
|
open: o,
|
|
2054
|
-
defaultOpen:
|
|
2055
|
+
defaultOpen: n,
|
|
2055
2056
|
onOpenChange: i,
|
|
2056
2057
|
modal: c = !0
|
|
2057
|
-
} = e, s = U.useRef(null), l = U.useRef(null), [d = !1, u] =
|
|
2058
|
+
} = e, s = U.useRef(null), l = U.useRef(null), [d = !1, u] = Zn({
|
|
2058
2059
|
prop: o,
|
|
2059
|
-
defaultProp:
|
|
2060
|
+
defaultProp: n,
|
|
2060
2061
|
onChange: i
|
|
2061
2062
|
});
|
|
2062
2063
|
return /* @__PURE__ */ a(
|
|
@@ -2072,54 +2073,54 @@ var Rt = "Dialog", [Ln, xs] = Vr(Rt), [Ko, se] = Ln(Rt), Rn = (e) => {
|
|
|
2072
2073
|
onOpenChange: u,
|
|
2073
2074
|
onOpenToggle: U.useCallback(() => u((f) => !f), [u]),
|
|
2074
2075
|
modal: c,
|
|
2075
|
-
children:
|
|
2076
|
+
children: r
|
|
2076
2077
|
}
|
|
2077
2078
|
);
|
|
2078
2079
|
};
|
|
2079
|
-
|
|
2080
|
-
var
|
|
2080
|
+
Lr.displayName = Rt;
|
|
2081
|
+
var Rr = "DialogTrigger", Xo = U.forwardRef(
|
|
2081
2082
|
(e, t) => {
|
|
2082
|
-
const { __scopeDialog:
|
|
2083
|
+
const { __scopeDialog: r, ...o } = e, n = se(Rr, r), i = xt(t, n.triggerRef);
|
|
2083
2084
|
return /* @__PURE__ */ a(
|
|
2084
2085
|
Me.button,
|
|
2085
2086
|
{
|
|
2086
2087
|
type: "button",
|
|
2087
2088
|
"aria-haspopup": "dialog",
|
|
2088
|
-
"aria-expanded":
|
|
2089
|
-
"aria-controls":
|
|
2090
|
-
"data-state": Ot(
|
|
2089
|
+
"aria-expanded": n.open,
|
|
2090
|
+
"aria-controls": n.contentId,
|
|
2091
|
+
"data-state": Ot(n.open),
|
|
2091
2092
|
...o,
|
|
2092
2093
|
ref: i,
|
|
2093
|
-
onClick: Fe(e.onClick,
|
|
2094
|
+
onClick: Fe(e.onClick, n.onOpenToggle)
|
|
2094
2095
|
}
|
|
2095
2096
|
);
|
|
2096
2097
|
}
|
|
2097
2098
|
);
|
|
2098
|
-
Xo.displayName =
|
|
2099
|
-
var Nt = "DialogPortal", [Yo,
|
|
2099
|
+
Xo.displayName = Rr;
|
|
2100
|
+
var Nt = "DialogPortal", [Yo, Nr] = yr(Nt, {
|
|
2100
2101
|
forceMount: void 0
|
|
2101
|
-
}),
|
|
2102
|
-
const { __scopeDialog: t, forceMount:
|
|
2103
|
-
return /* @__PURE__ */ a(Yo, { scope: t, forceMount:
|
|
2102
|
+
}), Er = (e) => {
|
|
2103
|
+
const { __scopeDialog: t, forceMount: r, children: o, container: n } = e, i = se(Nt, t);
|
|
2104
|
+
return /* @__PURE__ */ a(Yo, { scope: t, forceMount: r, children: U.Children.map(o, (c) => /* @__PURE__ */ a(It, { present: r || i.open, children: /* @__PURE__ */ a(Yn, { asChild: !0, container: n, children: c }) })) });
|
|
2104
2105
|
};
|
|
2105
|
-
|
|
2106
|
-
var Ze = "DialogOverlay",
|
|
2106
|
+
Er.displayName = Nt;
|
|
2107
|
+
var Ze = "DialogOverlay", Or = U.forwardRef(
|
|
2107
2108
|
(e, t) => {
|
|
2108
|
-
const
|
|
2109
|
-
return i.modal ? /* @__PURE__ */ a(It, { present: o || i.open, children: /* @__PURE__ */ a(Jo, { ...
|
|
2109
|
+
const r = Nr(Ze, e.__scopeDialog), { forceMount: o = r.forceMount, ...n } = e, i = se(Ze, e.__scopeDialog);
|
|
2110
|
+
return i.modal ? /* @__PURE__ */ a(It, { present: o || i.open, children: /* @__PURE__ */ a(Jo, { ...n, ref: t }) }) : null;
|
|
2110
2111
|
}
|
|
2111
2112
|
);
|
|
2112
|
-
|
|
2113
|
+
Or.displayName = Ze;
|
|
2113
2114
|
var Jo = U.forwardRef(
|
|
2114
2115
|
(e, t) => {
|
|
2115
|
-
const { __scopeDialog:
|
|
2116
|
+
const { __scopeDialog: r, ...o } = e, n = se(Ze, r);
|
|
2116
2117
|
return (
|
|
2117
2118
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2118
2119
|
// ie. when `Overlay` and `Content` are siblings
|
|
2119
|
-
/* @__PURE__ */ a(
|
|
2120
|
+
/* @__PURE__ */ a(jn, { as: Vn, allowPinchZoom: !0, shards: [n.contentRef], children: /* @__PURE__ */ a(
|
|
2120
2121
|
Me.div,
|
|
2121
2122
|
{
|
|
2122
|
-
"data-state": Ot(
|
|
2123
|
+
"data-state": Ot(n.open),
|
|
2123
2124
|
...o,
|
|
2124
2125
|
ref: t,
|
|
2125
2126
|
style: { pointerEvents: "auto", ...o.style }
|
|
@@ -2127,30 +2128,30 @@ var Jo = U.forwardRef(
|
|
|
2127
2128
|
) })
|
|
2128
2129
|
);
|
|
2129
2130
|
}
|
|
2130
|
-
), Ie = "DialogContent",
|
|
2131
|
+
), Ie = "DialogContent", Dr = U.forwardRef(
|
|
2131
2132
|
(e, t) => {
|
|
2132
|
-
const
|
|
2133
|
-
return /* @__PURE__ */ a(It, { present: o || i.open, children: i.modal ? /* @__PURE__ */ a(Qo, { ...
|
|
2133
|
+
const r = Nr(Ie, e.__scopeDialog), { forceMount: o = r.forceMount, ...n } = e, i = se(Ie, e.__scopeDialog);
|
|
2134
|
+
return /* @__PURE__ */ a(It, { present: o || i.open, children: i.modal ? /* @__PURE__ */ a(Qo, { ...n, ref: t }) : /* @__PURE__ */ a(ei, { ...n, ref: t }) });
|
|
2134
2135
|
}
|
|
2135
2136
|
);
|
|
2136
|
-
|
|
2137
|
+
Dr.displayName = Ie;
|
|
2137
2138
|
var Qo = U.forwardRef(
|
|
2138
2139
|
(e, t) => {
|
|
2139
|
-
const
|
|
2140
|
+
const r = se(Ie, e.__scopeDialog), o = U.useRef(null), n = xt(t, r.contentRef, o);
|
|
2140
2141
|
return U.useEffect(() => {
|
|
2141
2142
|
const i = o.current;
|
|
2142
2143
|
if (i)
|
|
2143
|
-
return
|
|
2144
|
+
return Jn(i);
|
|
2144
2145
|
}, []), /* @__PURE__ */ a(
|
|
2145
|
-
|
|
2146
|
+
zr,
|
|
2146
2147
|
{
|
|
2147
2148
|
...e,
|
|
2148
|
-
ref:
|
|
2149
|
-
trapFocus:
|
|
2149
|
+
ref: n,
|
|
2150
|
+
trapFocus: r.open,
|
|
2150
2151
|
disableOutsidePointerEvents: !0,
|
|
2151
2152
|
onCloseAutoFocus: Fe(e.onCloseAutoFocus, (i) => {
|
|
2152
2153
|
var c;
|
|
2153
|
-
i.preventDefault(), (c =
|
|
2154
|
+
i.preventDefault(), (c = r.triggerRef.current) == null || c.focus();
|
|
2154
2155
|
}),
|
|
2155
2156
|
onPointerDownOutside: Fe(e.onPointerDownOutside, (i) => {
|
|
2156
2157
|
const c = i.detail.originalEvent, s = c.button === 0 && c.ctrlKey === !0;
|
|
@@ -2165,9 +2166,9 @@ var Qo = U.forwardRef(
|
|
|
2165
2166
|
}
|
|
2166
2167
|
), ei = U.forwardRef(
|
|
2167
2168
|
(e, t) => {
|
|
2168
|
-
const
|
|
2169
|
+
const r = se(Ie, e.__scopeDialog), o = U.useRef(!1), n = U.useRef(!1);
|
|
2169
2170
|
return /* @__PURE__ */ a(
|
|
2170
|
-
|
|
2171
|
+
zr,
|
|
2171
2172
|
{
|
|
2172
2173
|
...e,
|
|
2173
2174
|
ref: t,
|
|
@@ -2175,31 +2176,31 @@ var Qo = U.forwardRef(
|
|
|
2175
2176
|
disableOutsidePointerEvents: !1,
|
|
2176
2177
|
onCloseAutoFocus: (i) => {
|
|
2177
2178
|
var c, s;
|
|
2178
|
-
(c = e.onCloseAutoFocus) == null || c.call(e, i), i.defaultPrevented || (o.current || (s =
|
|
2179
|
+
(c = e.onCloseAutoFocus) == null || c.call(e, i), i.defaultPrevented || (o.current || (s = r.triggerRef.current) == null || s.focus(), i.preventDefault()), o.current = !1, n.current = !1;
|
|
2179
2180
|
},
|
|
2180
2181
|
onInteractOutside: (i) => {
|
|
2181
2182
|
var l, d;
|
|
2182
|
-
(l = e.onInteractOutside) == null || l.call(e, i), i.defaultPrevented || (o.current = !0, i.detail.originalEvent.type === "pointerdown" && (
|
|
2183
|
+
(l = e.onInteractOutside) == null || l.call(e, i), i.defaultPrevented || (o.current = !0, i.detail.originalEvent.type === "pointerdown" && (n.current = !0));
|
|
2183
2184
|
const c = i.target;
|
|
2184
|
-
((d =
|
|
2185
|
+
((d = r.triggerRef.current) == null ? void 0 : d.contains(c)) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && n.current && i.preventDefault();
|
|
2185
2186
|
}
|
|
2186
2187
|
}
|
|
2187
2188
|
);
|
|
2188
2189
|
}
|
|
2189
|
-
),
|
|
2190
|
+
), zr = U.forwardRef(
|
|
2190
2191
|
(e, t) => {
|
|
2191
|
-
const { __scopeDialog:
|
|
2192
|
-
return
|
|
2192
|
+
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: n, onCloseAutoFocus: i, ...c } = e, s = se(Ie, r), l = U.useRef(null), d = xt(t, l);
|
|
2193
|
+
return Bn(), /* @__PURE__ */ D(xe, { children: [
|
|
2193
2194
|
/* @__PURE__ */ a(
|
|
2194
|
-
|
|
2195
|
+
Kn,
|
|
2195
2196
|
{
|
|
2196
2197
|
asChild: !0,
|
|
2197
2198
|
loop: !0,
|
|
2198
2199
|
trapped: o,
|
|
2199
|
-
onMountAutoFocus:
|
|
2200
|
+
onMountAutoFocus: n,
|
|
2200
2201
|
onUnmountAutoFocus: i,
|
|
2201
2202
|
children: /* @__PURE__ */ a(
|
|
2202
|
-
|
|
2203
|
+
Xn,
|
|
2203
2204
|
{
|
|
2204
2205
|
role: "dialog",
|
|
2205
2206
|
id: s.contentId,
|
|
@@ -2214,64 +2215,64 @@ var Qo = U.forwardRef(
|
|
|
2214
2215
|
}
|
|
2215
2216
|
),
|
|
2216
2217
|
/* @__PURE__ */ D(xe, { children: [
|
|
2217
|
-
/* @__PURE__ */ a(
|
|
2218
|
+
/* @__PURE__ */ a(ri, { titleId: s.titleId }),
|
|
2218
2219
|
/* @__PURE__ */ a(oi, { contentRef: l, descriptionId: s.descriptionId })
|
|
2219
2220
|
] })
|
|
2220
2221
|
] });
|
|
2221
2222
|
}
|
|
2222
|
-
), Et = "DialogTitle",
|
|
2223
|
+
), Et = "DialogTitle", Ar = U.forwardRef(
|
|
2223
2224
|
(e, t) => {
|
|
2224
|
-
const { __scopeDialog:
|
|
2225
|
-
return /* @__PURE__ */ a(Me.h2, { id:
|
|
2225
|
+
const { __scopeDialog: r, ...o } = e, n = se(Et, r);
|
|
2226
|
+
return /* @__PURE__ */ a(Me.h2, { id: n.titleId, ...o, ref: t });
|
|
2226
2227
|
}
|
|
2227
2228
|
);
|
|
2228
|
-
|
|
2229
|
-
var
|
|
2229
|
+
Ar.displayName = Et;
|
|
2230
|
+
var Fr = "DialogDescription", ti = U.forwardRef(
|
|
2230
2231
|
(e, t) => {
|
|
2231
|
-
const { __scopeDialog:
|
|
2232
|
-
return /* @__PURE__ */ a(Me.p, { id:
|
|
2232
|
+
const { __scopeDialog: r, ...o } = e, n = se(Fr, r);
|
|
2233
|
+
return /* @__PURE__ */ a(Me.p, { id: n.descriptionId, ...o, ref: t });
|
|
2233
2234
|
}
|
|
2234
2235
|
);
|
|
2235
|
-
ti.displayName =
|
|
2236
|
-
var
|
|
2236
|
+
ti.displayName = Fr;
|
|
2237
|
+
var kr = "DialogClose", Wr = U.forwardRef(
|
|
2237
2238
|
(e, t) => {
|
|
2238
|
-
const { __scopeDialog:
|
|
2239
|
+
const { __scopeDialog: r, ...o } = e, n = se(kr, r);
|
|
2239
2240
|
return /* @__PURE__ */ a(
|
|
2240
2241
|
Me.button,
|
|
2241
2242
|
{
|
|
2242
2243
|
type: "button",
|
|
2243
2244
|
...o,
|
|
2244
2245
|
ref: t,
|
|
2245
|
-
onClick: Fe(e.onClick, () =>
|
|
2246
|
+
onClick: Fe(e.onClick, () => n.onOpenChange(!1))
|
|
2246
2247
|
}
|
|
2247
2248
|
);
|
|
2248
2249
|
}
|
|
2249
2250
|
);
|
|
2250
|
-
|
|
2251
|
+
Wr.displayName = kr;
|
|
2251
2252
|
function Ot(e) {
|
|
2252
2253
|
return e ? "open" : "closed";
|
|
2253
2254
|
}
|
|
2254
|
-
var
|
|
2255
|
+
var Mr = "DialogTitleWarning", [ys, Hr] = qn(Mr, {
|
|
2255
2256
|
contentName: Ie,
|
|
2256
2257
|
titleName: Et,
|
|
2257
2258
|
docsSlug: "dialog"
|
|
2258
|
-
}),
|
|
2259
|
-
const t =
|
|
2259
|
+
}), ri = ({ titleId: e }) => {
|
|
2260
|
+
const t = Hr(Mr), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2260
2261
|
|
|
2261
2262
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2262
2263
|
|
|
2263
2264
|
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
2264
2265
|
return U.useEffect(() => {
|
|
2265
|
-
e && (document.getElementById(e) || console.error(
|
|
2266
|
-
}, [
|
|
2267
|
-
},
|
|
2268
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2266
|
+
e && (document.getElementById(e) || console.error(r));
|
|
2267
|
+
}, [r, e]), null;
|
|
2268
|
+
}, ni = "DialogDescriptionWarning", oi = ({ contentRef: e, descriptionId: t }) => {
|
|
2269
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hr(ni).contentName}}.`;
|
|
2269
2270
|
return U.useEffect(() => {
|
|
2270
2271
|
var i;
|
|
2271
|
-
const
|
|
2272
|
-
t &&
|
|
2272
|
+
const n = (i = e.current) == null ? void 0 : i.getAttribute("aria-describedby");
|
|
2273
|
+
t && n && (document.getElementById(t) || console.warn(o));
|
|
2273
2274
|
}, [o, e, t]), null;
|
|
2274
|
-
}, ii =
|
|
2275
|
+
}, ii = Lr, ai = Er, si = Or, ci = Dr, li = Ar, di = Wr;
|
|
2275
2276
|
const Se = {
|
|
2276
2277
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2277
2278
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2281,7 +2282,7 @@ const Se = {
|
|
|
2281
2282
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2282
2283
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2283
2284
|
}, ui = () => {
|
|
2284
|
-
const { pdfProperties: e } = K(), { container: t } = be(), { activeDocumentProperties:
|
|
2285
|
+
const { pdfProperties: e } = K(), { container: t } = be(), { activeDocumentProperties: r, setActiveDocumentProperties: o } = eo(), { localeMessages: n } = ue(), i = F(() => {
|
|
2285
2286
|
if (!e)
|
|
2286
2287
|
return [];
|
|
2287
2288
|
const {
|
|
@@ -2299,45 +2300,45 @@ const Se = {
|
|
|
2299
2300
|
pageCount: _
|
|
2300
2301
|
} = e;
|
|
2301
2302
|
return [
|
|
2302
|
-
{ label:
|
|
2303
|
-
{ label:
|
|
2303
|
+
{ label: n == null ? void 0 : n.propertiesFilenameLabel, value: s },
|
|
2304
|
+
{ label: n == null ? void 0 : n.propertiesFileSizeLabel, value: c },
|
|
2304
2305
|
{ separate: !0 },
|
|
2305
|
-
{ label:
|
|
2306
|
-
{ label:
|
|
2307
|
-
{ label:
|
|
2308
|
-
{ label:
|
|
2309
|
-
{ label:
|
|
2306
|
+
{ label: n == null ? void 0 : n.propertiesTitleLabel, value: l },
|
|
2307
|
+
{ label: n == null ? void 0 : n.propertiesAuthorLabel, value: d },
|
|
2308
|
+
{ label: n == null ? void 0 : n.propertiesSubjectLabel, value: u },
|
|
2309
|
+
{ label: n == null ? void 0 : n.propertiesKeywordLabel, value: g },
|
|
2310
|
+
{ label: n == null ? void 0 : n.propertiesCreatorLabel, value: h },
|
|
2310
2311
|
{
|
|
2311
|
-
label:
|
|
2312
|
+
label: n == null ? void 0 : n.propertiesCreateOnLabel,
|
|
2312
2313
|
value: f ? Mt(f) : ""
|
|
2313
2314
|
},
|
|
2314
2315
|
{
|
|
2315
|
-
label:
|
|
2316
|
+
label: n == null ? void 0 : n.propertiesModifiedOnLabel,
|
|
2316
2317
|
value: b ? Mt(b) : ""
|
|
2317
2318
|
},
|
|
2318
2319
|
{ separate: !0 },
|
|
2319
|
-
{ label:
|
|
2320
|
-
{ label:
|
|
2321
|
-
{ label:
|
|
2320
|
+
{ label: n == null ? void 0 : n.propertiesPDFProducerLabel, value: w },
|
|
2321
|
+
{ label: n == null ? void 0 : n.propertiesPDFVersionLabel, value: v },
|
|
2322
|
+
{ label: n == null ? void 0 : n.propertiesPageCountLabel, value: _ }
|
|
2322
2323
|
];
|
|
2323
|
-
}, [e,
|
|
2324
|
-
return /* @__PURE__ */ a(ii, { open:
|
|
2324
|
+
}, [e, n]);
|
|
2325
|
+
return /* @__PURE__ */ a(ii, { open: r, onOpenChange: o, children: /* @__PURE__ */ a(ai, { container: t, children: /* @__PURE__ */ D("div", { className: Se["rp-dialog-wrapper"], children: [
|
|
2325
2326
|
/* @__PURE__ */ a(si, { className: Se["rp-dialog-overlay"] }),
|
|
2326
2327
|
/* @__PURE__ */ D(ci, { className: Se["rp-document-dialog"], children: [
|
|
2327
|
-
/* @__PURE__ */ a(li, { className: Se["rp-dialog-title"], children:
|
|
2328
|
-
/* @__PURE__ */ a("div", { className: Se["rp-document-properties"], children: i.map((c, s) => /* @__PURE__ */ a("div", { children: c.separate ? /* @__PURE__ */ a("div", { className: Se["rp-properties-divider"] }) : /* @__PURE__ */ a(
|
|
2329
|
-
/* @__PURE__ */ a(di, { asChild: !0, className: Se["rp-dialog-close"], children: /* @__PURE__ */ a(
|
|
2328
|
+
/* @__PURE__ */ a(li, { className: Se["rp-dialog-title"], children: n == null ? void 0 : n.documentPropertiesLabel }),
|
|
2329
|
+
/* @__PURE__ */ a("div", { className: Se["rp-document-properties"], children: i.map((c, s) => /* @__PURE__ */ a("div", { children: c.separate ? /* @__PURE__ */ a("div", { className: Se["rp-properties-divider"] }) : /* @__PURE__ */ a(Qn, { label: c.label, value: c.value }) }, s)) }),
|
|
2330
|
+
/* @__PURE__ */ a(di, { asChild: !0, className: Se["rp-dialog-close"], children: /* @__PURE__ */ a(mr, {}) })
|
|
2330
2331
|
] })
|
|
2331
2332
|
] }) }) });
|
|
2332
2333
|
}, pi = {
|
|
2333
2334
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2334
|
-
},
|
|
2335
|
-
const
|
|
2336
|
-
return hi(
|
|
2337
|
-
},
|
|
2338
|
-
const { filename: e, pdfSrc: t } = K(), { downloadFilename:
|
|
2339
|
-
const c =
|
|
2340
|
-
return c.endsWith(
|
|
2335
|
+
}, rr = ".pdf", hi = (e) => URL.createObjectURL(e), mi = async (e) => {
|
|
2336
|
+
const r = await (await fetch(e)).blob();
|
|
2337
|
+
return hi(r);
|
|
2338
|
+
}, $r = () => {
|
|
2339
|
+
const { filename: e, pdfSrc: t } = K(), { downloadFilename: r } = gn(), o = (i) => {
|
|
2340
|
+
const c = r || i;
|
|
2341
|
+
return c.endsWith(rr) ? c : `${c}${rr}`;
|
|
2341
2342
|
};
|
|
2342
2343
|
return { download: L(async () => {
|
|
2343
2344
|
if (!e || !t)
|
|
@@ -2345,30 +2346,30 @@ const Se = {
|
|
|
2345
2346
|
const i = document.createElement("a");
|
|
2346
2347
|
i.href = await mi(t), i.download = o(e), document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
2347
2348
|
}, [e, t]) };
|
|
2348
|
-
},
|
|
2349
|
+
}, Gr = () => {
|
|
2349
2350
|
const { downloadIcon: e } = pe();
|
|
2350
2351
|
return e || /* @__PURE__ */ a(io, {});
|
|
2351
|
-
},
|
|
2352
|
-
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(
|
|
2352
|
+
}, Vr = ({ children: e, className: t, localeMessages: r }) => /* @__PURE__ */ a(q, { className: t, content: r == null ? void 0 : r.downloadFileTooltip, children: e }), fi = ({ download: e, localeMessages: t }) => /* @__PURE__ */ a(Vr, { localeMessages: t, children: /* @__PURE__ */ a(ee, { onClick: e, "aria-label": t == null ? void 0 : t.downloadFileTooltip, children: /* @__PURE__ */ a(Gr, {}) }) }), gi = ({ download: e, localeMessages: t }) => /* @__PURE__ */ a(we, { onClick: e, children: /* @__PURE__ */ D(Vr, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2353
|
+
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Gr, {}) }),
|
|
2353
2354
|
t == null ? void 0 : t.downloadFileLabel
|
|
2354
|
-
] }) }),
|
|
2355
|
-
const { download: e } =
|
|
2356
|
-
return t ?
|
|
2357
|
-
},
|
|
2355
|
+
] }) }), Ur = () => {
|
|
2356
|
+
const { download: e } = $r(), { downloadTool: t = !0 } = ge(), { isSmallScreen: r } = ye(), { localeMessages: o } = ue();
|
|
2357
|
+
return t ? r ? /* @__PURE__ */ a(gi, { download: e, localeMessages: o }) : typeof t == "function" ? /* @__PURE__ */ a(t, { download: e }) : t ? /* @__PURE__ */ a(fi, { download: e, localeMessages: o }) : null : null;
|
|
2358
|
+
}, qr = () => {
|
|
2358
2359
|
const { printIcon: e } = pe();
|
|
2359
2360
|
return e || /* @__PURE__ */ a(ao, {});
|
|
2360
|
-
},
|
|
2361
|
-
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(
|
|
2361
|
+
}, Zr = ({ children: e, className: t, localeMessages: r }) => /* @__PURE__ */ a(q, { className: t, content: r == null ? void 0 : r.printTooltip, children: e }), vi = ({ print: e, localeMessages: t }) => /* @__PURE__ */ a(Zr, { localeMessages: t, children: /* @__PURE__ */ a(ee, { onClick: e, "aria-label": t == null ? void 0 : t.printTooltip, children: /* @__PURE__ */ a(qr, {}) }) }), _i = ({ print: e, localeMessages: t }) => /* @__PURE__ */ a(we, { onClick: e, children: /* @__PURE__ */ D(Zr, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2362
|
+
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(qr, {}) }),
|
|
2362
2363
|
t == null ? void 0 : t.printLabel
|
|
2363
|
-
] }) }),
|
|
2364
|
-
const { print: e, cancel: t, setOnProgress:
|
|
2364
|
+
] }) }), jr = () => {
|
|
2365
|
+
const { print: e, cancel: t, setOnProgress: r, setOnComplete: o, setOnError: n, progress: i } = et(), { printTool: c = !0 } = ge(), { isSmallScreen: s } = ye(), { localeMessages: l } = ue();
|
|
2365
2366
|
return c ? s ? /* @__PURE__ */ a(_i, { print: e, localeMessages: l }) : typeof c == "function" ? /* @__PURE__ */ a(
|
|
2366
2367
|
c,
|
|
2367
2368
|
{
|
|
2368
2369
|
print: e,
|
|
2369
2370
|
cancel: t,
|
|
2370
|
-
setOnProgress:
|
|
2371
|
-
setOnError:
|
|
2371
|
+
setOnProgress: r,
|
|
2372
|
+
setOnError: n,
|
|
2372
2373
|
setOnComplete: o,
|
|
2373
2374
|
progress: i
|
|
2374
2375
|
}
|
|
@@ -2377,32 +2378,32 @@ const Se = {
|
|
|
2377
2378
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2378
2379
|
}, bi = () => {
|
|
2379
2380
|
const { goToFirstPageIcon: e } = pe();
|
|
2380
|
-
return e || /* @__PURE__ */ a(
|
|
2381
|
+
return e || /* @__PURE__ */ a(gr, { className: wi["rp-go-to-Top"] });
|
|
2381
2382
|
}, Ci = () => {
|
|
2382
2383
|
const { goToLastPageIcon: e } = pe();
|
|
2383
|
-
return e || /* @__PURE__ */ a(
|
|
2384
|
-
},
|
|
2385
|
-
const { goToPage: e, totalPages: t, focusedPage:
|
|
2384
|
+
return e || /* @__PURE__ */ a(gr, {});
|
|
2385
|
+
}, nr = { width: "100%" }, Ti = () => {
|
|
2386
|
+
const { goToPage: e, totalPages: t, focusedPage: r } = ie(), { jumpNavigationTool: o = !0 } = ge(), { localeMessages: n } = ue(), i = F(() => r === 1, [r]), c = F(() => r === t, [r, t]), s = L(() => {
|
|
2386
2387
|
e(1);
|
|
2387
2388
|
}, [e]), l = L(() => {
|
|
2388
2389
|
e(t);
|
|
2389
2390
|
}, [e, t]);
|
|
2390
2391
|
return o ? /* @__PURE__ */ D(qe, { children: [
|
|
2391
|
-
/* @__PURE__ */ a(we, { onClick: s, children: /* @__PURE__ */ a(q, { content:
|
|
2392
|
+
/* @__PURE__ */ a(we, { onClick: s, children: /* @__PURE__ */ a(q, { content: n == null ? void 0 : n.firstPageTooltip, style: nr, children: /* @__PURE__ */ D("div", { className: "rp-menu-item", "aria-disabled": i, children: [
|
|
2392
2393
|
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(bi, {}) }),
|
|
2393
|
-
/* @__PURE__ */ a("span", { children:
|
|
2394
|
+
/* @__PURE__ */ a("span", { children: n == null ? void 0 : n.firstPageLabel })
|
|
2394
2395
|
] }) }) }),
|
|
2395
|
-
/* @__PURE__ */ a(we, { onClick: l, children: /* @__PURE__ */ a(q, { content:
|
|
2396
|
+
/* @__PURE__ */ a(we, { onClick: l, children: /* @__PURE__ */ a(q, { content: n == null ? void 0 : n.lastPageTooltip, style: nr, children: /* @__PURE__ */ D("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2396
2397
|
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Ci, {}) }),
|
|
2397
|
-
/* @__PURE__ */ a("span", { children:
|
|
2398
|
+
/* @__PURE__ */ a("span", { children: n == null ? void 0 : n.lastPageLabel })
|
|
2398
2399
|
] }) }) }),
|
|
2399
2400
|
/* @__PURE__ */ a(yt, {})
|
|
2400
2401
|
] }) : null;
|
|
2401
2402
|
}, Pi = () => {
|
|
2402
2403
|
const { container: e } = be(), { isSmallScreen: t } = ye(), {
|
|
2403
|
-
openFileTool:
|
|
2404
|
+
openFileTool: r,
|
|
2404
2405
|
downloadTool: o,
|
|
2405
|
-
documentProperties:
|
|
2406
|
+
documentProperties: n,
|
|
2406
2407
|
scrollModeTool: i,
|
|
2407
2408
|
rotateTool: c,
|
|
2408
2409
|
selectionModeTool: s,
|
|
@@ -2411,13 +2412,13 @@ const Se = {
|
|
|
2411
2412
|
fullscreenTool: u
|
|
2412
2413
|
} = ge(), { localeMessages: f } = ue();
|
|
2413
2414
|
return F(() => {
|
|
2414
|
-
const g = l || c || s || i ||
|
|
2415
|
+
const g = l || c || s || i || n;
|
|
2415
2416
|
let b = !1;
|
|
2416
|
-
return t && (b = !(!
|
|
2417
|
+
return t && (b = !(!r && !o && !d && !u)), g || b;
|
|
2417
2418
|
}, [
|
|
2418
|
-
n,
|
|
2419
|
-
o,
|
|
2420
2419
|
r,
|
|
2420
|
+
o,
|
|
2421
|
+
n,
|
|
2421
2422
|
i,
|
|
2422
2423
|
c,
|
|
2423
2424
|
s,
|
|
@@ -2425,23 +2426,23 @@ const Se = {
|
|
|
2425
2426
|
t
|
|
2426
2427
|
]) ? /* @__PURE__ */ D(to, { children: [
|
|
2427
2428
|
/* @__PURE__ */ a(
|
|
2428
|
-
|
|
2429
|
+
hr,
|
|
2429
2430
|
{
|
|
2430
2431
|
container: e,
|
|
2431
|
-
triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(q, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ a(ee, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ a(
|
|
2432
|
+
triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(q, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ a(ee, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ a(Gn, {}) }) }) }),
|
|
2432
2433
|
children: /* @__PURE__ */ D("div", { className: pi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2433
2434
|
t && /* @__PURE__ */ D(qe, { children: [
|
|
2434
|
-
/* @__PURE__ */ a(
|
|
2435
|
-
/* @__PURE__ */ a(
|
|
2436
|
-
/* @__PURE__ */ a(
|
|
2437
|
-
/* @__PURE__ */ a(
|
|
2435
|
+
/* @__PURE__ */ a(pr, {}),
|
|
2436
|
+
/* @__PURE__ */ a(Ur, {}),
|
|
2437
|
+
/* @__PURE__ */ a(jr, {}),
|
|
2438
|
+
/* @__PURE__ */ a(fr, {}),
|
|
2438
2439
|
/* @__PURE__ */ a(yt, {})
|
|
2439
2440
|
] }),
|
|
2440
2441
|
/* @__PURE__ */ a(Ti, {}),
|
|
2441
|
-
/* @__PURE__ */ a(
|
|
2442
|
+
/* @__PURE__ */ a(no, {}),
|
|
2442
2443
|
/* @__PURE__ */ a(so, {}),
|
|
2443
2444
|
/* @__PURE__ */ a(oo, {}),
|
|
2444
|
-
/* @__PURE__ */ a(
|
|
2445
|
+
/* @__PURE__ */ a(ro, {})
|
|
2445
2446
|
] })
|
|
2446
2447
|
}
|
|
2447
2448
|
),
|
|
@@ -2450,12 +2451,12 @@ const Se = {
|
|
|
2450
2451
|
}, Si = () => {
|
|
2451
2452
|
const { isSmallScreen: e } = ye();
|
|
2452
2453
|
return /* @__PURE__ */ D(xe, { children: [
|
|
2453
|
-
/* @__PURE__ */ a($
|
|
2454
|
+
/* @__PURE__ */ a($n, {}),
|
|
2454
2455
|
!e && /* @__PURE__ */ D(xe, { children: [
|
|
2455
|
-
/* @__PURE__ */ a(
|
|
2456
|
-
/* @__PURE__ */ a(
|
|
2457
|
-
/* @__PURE__ */ a(
|
|
2458
|
-
/* @__PURE__ */ a(
|
|
2456
|
+
/* @__PURE__ */ a(pr, {}),
|
|
2457
|
+
/* @__PURE__ */ a(Ur, {}),
|
|
2458
|
+
/* @__PURE__ */ a(jr, {}),
|
|
2459
|
+
/* @__PURE__ */ a(fr, {})
|
|
2459
2460
|
] }),
|
|
2460
2461
|
/* @__PURE__ */ a(Pi, {})
|
|
2461
2462
|
] });
|
|
@@ -2472,7 +2473,7 @@ const Se = {
|
|
|
2472
2473
|
const { zoomOutIcon: e } = pe();
|
|
2473
2474
|
return e || /* @__PURE__ */ a(lo, {});
|
|
2474
2475
|
}, Ri = () => {
|
|
2475
|
-
const { zoomLevel: e, setZoomLevel: t } = Xe(), { container:
|
|
2476
|
+
const { zoomLevel: e, setZoomLevel: t } = Xe(), { container: r, contentRef: o } = be(), { zoomTool: n = !0 } = ge(), { focusedPage: i } = ie(), { rotate: c } = Ke(), { pages: s } = K(), { isSmallScreen: l } = ye(), { localeMessages: d } = ue(), u = L(() => {
|
|
2476
2477
|
t((_) => {
|
|
2477
2478
|
const m = Math.floor(_ / 25) * 25;
|
|
2478
2479
|
return Math.min(m + 25, ft);
|
|
@@ -2497,7 +2498,7 @@ const Se = {
|
|
|
2497
2498
|
},
|
|
2498
2499
|
[t, w]
|
|
2499
2500
|
);
|
|
2500
|
-
return typeof
|
|
2501
|
+
return typeof n != "boolean" ? /* @__PURE__ */ a(n, { zoomLevel: e, setZoomLevel: t }) : n ? /* @__PURE__ */ D("div", { className: Re["rp-zoom-wrapper"], children: [
|
|
2501
2502
|
/* @__PURE__ */ a(q, { content: d == null ? void 0 : d.zoomOutTooltip, children: /* @__PURE__ */ a(
|
|
2502
2503
|
ee,
|
|
2503
2504
|
{
|
|
@@ -2508,9 +2509,9 @@ const Se = {
|
|
|
2508
2509
|
}
|
|
2509
2510
|
) }),
|
|
2510
2511
|
!l && /* @__PURE__ */ a(
|
|
2511
|
-
|
|
2512
|
+
hr,
|
|
2512
2513
|
{
|
|
2513
|
-
container:
|
|
2514
|
+
container: r,
|
|
2514
2515
|
triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(q, { content: d == null ? void 0 : d.zoomSelectTooltip, children: /* @__PURE__ */ D(
|
|
2515
2516
|
ee,
|
|
2516
2517
|
{
|
|
@@ -2560,11 +2561,11 @@ const Se = {
|
|
|
2560
2561
|
"rp-search-input": "_rp-search-input_1j25f_60",
|
|
2561
2562
|
"rp-search-icon-info": "_rp-search-icon-info_1j25f_65",
|
|
2562
2563
|
"rp-search-loader-icon": "_rp-search-loader-icon_1j25f_74"
|
|
2563
|
-
},
|
|
2564
|
+
}, or = () => {
|
|
2564
2565
|
const { searchIcon: e } = pe();
|
|
2565
2566
|
return e || /* @__PURE__ */ a(po, {});
|
|
2566
2567
|
}, Ni = () => {
|
|
2567
|
-
const { container: e } = be(), [t,
|
|
2568
|
+
const { container: e } = be(), [t, r] = $(!1), { pdf: o } = K(), [n, i] = $(null), {
|
|
2568
2569
|
searchOptions: c,
|
|
2569
2570
|
setSearchOptions: s,
|
|
2570
2571
|
loading: l,
|
|
@@ -2574,10 +2575,10 @@ const Se = {
|
|
|
2574
2575
|
nextMatch: h,
|
|
2575
2576
|
prevMatch: g,
|
|
2576
2577
|
search: b
|
|
2577
|
-
} =
|
|
2578
|
-
|
|
2578
|
+
} = Pr(), { searchTool: w = !0 } = ge(), [v, _] = $(b), { localeMessages: m } = ue(), T = L(() => {
|
|
2579
|
+
r(!0);
|
|
2579
2580
|
}, []), S = L(() => {
|
|
2580
|
-
d(""), _(""),
|
|
2581
|
+
d(""), _(""), r(!1);
|
|
2581
2582
|
}, [d]), p = (y) => {
|
|
2582
2583
|
const N = y.key === "Enter", M = y.key === " ";
|
|
2583
2584
|
(N || M) && S();
|
|
@@ -2595,8 +2596,8 @@ const Se = {
|
|
|
2595
2596
|
A(() => (window.addEventListener("keydown", P), () => {
|
|
2596
2597
|
window.removeEventListener("keydown", P);
|
|
2597
2598
|
}), [P]), A(() => {
|
|
2598
|
-
|
|
2599
|
-
}, [
|
|
2599
|
+
n && n.focus();
|
|
2600
|
+
}, [n]);
|
|
2600
2601
|
const x = L((y) => {
|
|
2601
2602
|
_(y.target.value);
|
|
2602
2603
|
}, []), E = L(() => {
|
|
@@ -2615,21 +2616,21 @@ const Se = {
|
|
|
2615
2616
|
return A(() => {
|
|
2616
2617
|
S();
|
|
2617
2618
|
}, [o, S]), w ? /* @__PURE__ */ a(xe, { children: /* @__PURE__ */ a(
|
|
2618
|
-
|
|
2619
|
+
zn,
|
|
2619
2620
|
{
|
|
2620
2621
|
open: t,
|
|
2621
2622
|
container: e,
|
|
2622
|
-
triggerComponent: /* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ a(ee, { onClick: T, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ a(
|
|
2623
|
+
triggerComponent: /* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ a(ee, { onClick: T, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ a(or, {}) }) }),
|
|
2623
2624
|
children: /* @__PURE__ */ D("div", { className: Q["rp-search-tool-content"], children: [
|
|
2624
2625
|
/* @__PURE__ */ D("div", { className: Q["rp-search-tool-input-wrapper"], children: [
|
|
2625
2626
|
/* @__PURE__ */ D("div", { className: Q["rp-search-tool-input"], children: [
|
|
2626
2627
|
/* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ a(
|
|
2627
|
-
|
|
2628
|
+
sr,
|
|
2628
2629
|
{
|
|
2629
2630
|
value: v,
|
|
2630
2631
|
onKeyDown: C,
|
|
2631
2632
|
onChange: x,
|
|
2632
|
-
icon: /* @__PURE__ */ a(
|
|
2633
|
+
icon: /* @__PURE__ */ a(or, {}),
|
|
2633
2634
|
placeholder: m == null ? void 0 : m.searchInputPlaceholder,
|
|
2634
2635
|
className: Q["rp-search-input"],
|
|
2635
2636
|
ref: i,
|
|
@@ -2666,7 +2667,7 @@ const Se = {
|
|
|
2666
2667
|
{
|
|
2667
2668
|
onKeyDown: p,
|
|
2668
2669
|
"aria-label": m == null ? void 0 : m.searchCloseButtonTooltip,
|
|
2669
|
-
children: /* @__PURE__ */ a(
|
|
2670
|
+
children: /* @__PURE__ */ a(mr, { onClick: S, className: Q["rp-search-tool-input-icon"] })
|
|
2670
2671
|
}
|
|
2671
2672
|
) })
|
|
2672
2673
|
] })
|
|
@@ -2682,23 +2683,23 @@ const Se = {
|
|
|
2682
2683
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_vpexk_55",
|
|
2683
2684
|
loading: Ei
|
|
2684
2685
|
}, Oi = ({ percentage: e }) => {
|
|
2685
|
-
const { cancel: t } = et(), { localeMessages:
|
|
2686
|
-
return e < 1 ? null : /* @__PURE__ */ a("div", { className:
|
|
2687
|
-
/* @__PURE__ */ D("div", { className:
|
|
2688
|
-
|
|
2686
|
+
const { cancel: t } = et(), { localeMessages: r } = ue();
|
|
2687
|
+
return e < 1 ? null : /* @__PURE__ */ a("div", { className: ne(Ne["rp-loading-overlay"]), children: /* @__PURE__ */ D("div", { className: ne(Ne["rp-loading-modal"]), children: [
|
|
2688
|
+
/* @__PURE__ */ D("div", { className: ne(Ne["rp-loading-title"]), children: [
|
|
2689
|
+
r == null ? void 0 : r.printLoadingMessage,
|
|
2689
2690
|
"..."
|
|
2690
2691
|
] }),
|
|
2691
|
-
/* @__PURE__ */ a("div", { className:
|
|
2692
|
+
/* @__PURE__ */ a("div", { className: ne(Ne["rp-loading-progress-bar"]), children: /* @__PURE__ */ a(
|
|
2692
2693
|
"div",
|
|
2693
2694
|
{
|
|
2694
|
-
className:
|
|
2695
|
+
className: ne(Ne["rp-loading-progress"]),
|
|
2695
2696
|
style: { width: `${e}%` }
|
|
2696
2697
|
}
|
|
2697
2698
|
) }),
|
|
2698
|
-
/* @__PURE__ */ a("button", { className:
|
|
2699
|
+
/* @__PURE__ */ a("button", { className: ne(Ne["rp-loading-cancel-button"]), onClick: t, children: r == null ? void 0 : r.printCancelLabel })
|
|
2699
2700
|
] }) });
|
|
2700
2701
|
}, Di = We((e, t) => {
|
|
2701
|
-
const { showPrintProgress:
|
|
2702
|
+
const { showPrintProgress: r } = ge(), { progress: o } = et(), { isSmallScreen: n } = ye(), { percentage: i } = o || {}, c = () => n ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2702
2703
|
return /* @__PURE__ */ D("div", { children: [
|
|
2703
2704
|
/* @__PURE__ */ a("div", { "data-rp": "topBar", ref: t, className: ze["rp-toolbar-content"], children: /* @__PURE__ */ D("div", { className: ze["rp-toolbar-wrapper"], style: c(), children: [
|
|
2704
2705
|
/* @__PURE__ */ D("div", { "data-rp": "topBarLeft", className: ze["rp-toolbar-start"], children: [
|
|
@@ -2708,7 +2709,7 @@ const Se = {
|
|
|
2708
2709
|
/* @__PURE__ */ a("div", { "data-rp": "topBarCenter", className: ze["rp-toolbar-middle"], children: /* @__PURE__ */ a(Ri, {}) }),
|
|
2709
2710
|
/* @__PURE__ */ a("div", { "data-rp": "topBarRight", className: ze["rp-toolbar-end"], children: /* @__PURE__ */ a(Si, {}) })
|
|
2710
2711
|
] }) }),
|
|
2711
|
-
|
|
2712
|
+
r && i ? /* @__PURE__ */ a(Oi, { percentage: i }) : null
|
|
2712
2713
|
] });
|
|
2713
2714
|
}), gt = {
|
|
2714
2715
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
@@ -2722,20 +2723,20 @@ const Se = {
|
|
|
2722
2723
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2723
2724
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2724
2725
|
}, zi = (e) => {
|
|
2725
|
-
const { thumbnailSrc: t, pageNumber:
|
|
2726
|
-
width: Math.round(
|
|
2727
|
-
height: Math.round(
|
|
2728
|
-
}), [
|
|
2729
|
-
|
|
2730
|
-
}, [i,
|
|
2726
|
+
const { thumbnailSrc: t, pageNumber: r, isFocused: o, viewport: n } = e, { goToPage: i } = ie(), c = F(() => o ? Ae["rp-thumbnail-active"] : "", [o]), s = F(() => ({
|
|
2727
|
+
width: Math.round(n.width),
|
|
2728
|
+
height: Math.round(n.height)
|
|
2729
|
+
}), [n]), l = L(() => {
|
|
2730
|
+
r && i(r);
|
|
2731
|
+
}, [i, r]);
|
|
2731
2732
|
return /* @__PURE__ */ D(
|
|
2732
2733
|
"div",
|
|
2733
2734
|
{
|
|
2734
2735
|
onClick: l,
|
|
2735
|
-
id: `page-${
|
|
2736
|
+
id: `page-${r}`,
|
|
2736
2737
|
className: Ae["rp-thumbnail-wrapper"],
|
|
2737
2738
|
children: [
|
|
2738
|
-
/* @__PURE__ */ a("div", { className:
|
|
2739
|
+
/* @__PURE__ */ a("div", { className: ne(c, Ae["rp-thumbnail"]), children: t ? /* @__PURE__ */ a(
|
|
2739
2740
|
"img",
|
|
2740
2741
|
{
|
|
2741
2742
|
src: t,
|
|
@@ -2754,26 +2755,26 @@ const Se = {
|
|
|
2754
2755
|
children: /* @__PURE__ */ a(Pt, {})
|
|
2755
2756
|
}
|
|
2756
2757
|
) }),
|
|
2757
|
-
/* @__PURE__ */ a("div", { className: Ae["rp-thumbnail-text"], children:
|
|
2758
|
+
/* @__PURE__ */ a("div", { className: Ae["rp-thumbnail-text"], children: r })
|
|
2758
2759
|
]
|
|
2759
2760
|
}
|
|
2760
2761
|
);
|
|
2761
|
-
},
|
|
2762
|
+
}, ir = {
|
|
2762
2763
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2763
2764
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2764
2765
|
}, Ai = 16, Fi = (e, t) => {
|
|
2765
|
-
const
|
|
2766
|
-
e && (
|
|
2766
|
+
const r = e == null ? void 0 : e.querySelector(`#page-${t}`);
|
|
2767
|
+
e && (r != null && r.offsetTop) && (e.scrollTop = (r == null ? void 0 : r.offsetTop) - Ai);
|
|
2767
2768
|
}, ki = We((e, t) => {
|
|
2768
|
-
const { show:
|
|
2769
|
-
|
|
2769
|
+
const { show: r } = e, { focusedPage: o, totalPages: n } = ie(), { thumbnailPages: i, addPage: c, thumbnailLength: s, addToPage: l } = Cr(), d = W(null), u = W(1);
|
|
2770
|
+
ar(t, () => d.current);
|
|
2770
2771
|
const f = F(() => Object.values(i), [i]), h = L(() => {
|
|
2771
2772
|
const g = s + 1;
|
|
2772
|
-
g <=
|
|
2773
|
-
}, [c,
|
|
2773
|
+
g <= n && c(g);
|
|
2774
|
+
}, [c, n, s]);
|
|
2774
2775
|
return A(() => {
|
|
2775
|
-
o > s ? l(o) :
|
|
2776
|
-
}, [o, s, l,
|
|
2776
|
+
o > s ? l(o) : r && u.current !== o && (Fi(d.current, o), u.current = o);
|
|
2777
|
+
}, [o, s, l, r, f]), _n(d.current, h), /* @__PURE__ */ a("div", { ref: d, className: ir["rp-thumbnails-container"], children: /* @__PURE__ */ a("div", { className: ir["rp-thumbnails"], children: r ? f.map((g, b) => {
|
|
2777
2778
|
var w, v;
|
|
2778
2779
|
return /* @__PURE__ */ a(
|
|
2779
2780
|
zi,
|
|
@@ -2789,9 +2790,9 @@ const Se = {
|
|
|
2789
2790
|
}) : null }) });
|
|
2790
2791
|
}), Wi = () => {
|
|
2791
2792
|
const { thumbnailIcon: e } = pe();
|
|
2792
|
-
return e || /* @__PURE__ */ a(
|
|
2793
|
+
return e || /* @__PURE__ */ a(vn, {});
|
|
2793
2794
|
}, Mi = () => {
|
|
2794
|
-
const { active: e, setActive: t } =
|
|
2795
|
+
const { active: e, setActive: t } = Cr(), [r, o] = $(200), n = W(null), { thumbnailTool: i, sidebarEnable: c } = ge(), { localeMessages: s } = ue(), l = L(() => {
|
|
2795
2796
|
t((u) => !u);
|
|
2796
2797
|
}, []), d = F(() => typeof i != "boolean" && i ? /* @__PURE__ */ a(i, { onClick: l, active: e }) : i ? /* @__PURE__ */ a(q, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ a(
|
|
2797
2798
|
ee,
|
|
@@ -2805,7 +2806,7 @@ const Se = {
|
|
|
2805
2806
|
return /* @__PURE__ */ a(xe, { children: c && /* @__PURE__ */ D(
|
|
2806
2807
|
"div",
|
|
2807
2808
|
{
|
|
2808
|
-
style: { "--rp-thumbnail-width": `${
|
|
2809
|
+
style: { "--rp-thumbnail-width": `${r}px` },
|
|
2809
2810
|
className: gt["rp-sidebar-content-wrapper"],
|
|
2810
2811
|
"data-rp": "sidebar",
|
|
2811
2812
|
children: [
|
|
@@ -2817,8 +2818,8 @@ const Se = {
|
|
|
2817
2818
|
hidden: !e,
|
|
2818
2819
|
className: gt["rp-thumbnails-wrapper"],
|
|
2819
2820
|
children: [
|
|
2820
|
-
/* @__PURE__ */ a(ki, { show: e, ref:
|
|
2821
|
-
/* @__PURE__ */ a(
|
|
2821
|
+
/* @__PURE__ */ a(ki, { show: e, ref: n }),
|
|
2822
|
+
/* @__PURE__ */ a(wn, { onWidthChange: o, thumbnailRef: n })
|
|
2822
2823
|
]
|
|
2823
2824
|
}
|
|
2824
2825
|
)
|
|
@@ -2835,12 +2836,12 @@ const Se = {
|
|
|
2835
2836
|
"rp-dark-mode": "_rp-dark-mode_12d1x_147"
|
|
2836
2837
|
}, Hi = We(
|
|
2837
2838
|
(e, t) => {
|
|
2838
|
-
const { children:
|
|
2839
|
+
const { children: r, toolbarRef: o, style: n, className: i } = e, { customVariables: c, customDarkVariables: s } = In(), { darkMode: l } = rn();
|
|
2839
2840
|
return /* @__PURE__ */ a(
|
|
2840
2841
|
"div",
|
|
2841
2842
|
{
|
|
2842
2843
|
ref: t,
|
|
2843
|
-
className:
|
|
2844
|
+
className: ne(
|
|
2844
2845
|
_e["rp-theme-variables"],
|
|
2845
2846
|
_e["rp-container"],
|
|
2846
2847
|
l ? _e["rp-dark-mode"] : "",
|
|
@@ -2850,36 +2851,36 @@ const Se = {
|
|
|
2850
2851
|
"--rp-toolbar-height": `${(o == null ? void 0 : o.clientHeight) || 48}px`,
|
|
2851
2852
|
...c,
|
|
2852
2853
|
...l ? s : {},
|
|
2853
|
-
...
|
|
2854
|
+
...n
|
|
2854
2855
|
},
|
|
2855
|
-
children:
|
|
2856
|
+
children: r
|
|
2856
2857
|
}
|
|
2857
2858
|
);
|
|
2858
2859
|
}
|
|
2859
|
-
),
|
|
2860
|
+
), Ls = We((e, t) => {
|
|
2860
2861
|
const {
|
|
2861
|
-
children:
|
|
2862
|
+
children: r,
|
|
2862
2863
|
slots: o,
|
|
2863
|
-
icons:
|
|
2864
|
+
icons: n,
|
|
2864
2865
|
style: i,
|
|
2865
2866
|
className: c,
|
|
2866
2867
|
mobileWidth: s,
|
|
2867
2868
|
onLoaded: l,
|
|
2868
2869
|
cleanupOnLoaded: d,
|
|
2869
2870
|
onLayoutWidthChange: u
|
|
2870
|
-
} = e, [f, h] = $(null), { setContainer: g, setContentRef: b } = be(), { loading: w } = K(), { LoaderImageComponent: v } =
|
|
2871
|
+
} = e, [f, h] = $(null), { setContainer: g, setContentRef: b } = be(), { loading: w } = K(), { LoaderImageComponent: v } = ur();
|
|
2871
2872
|
return A(() => (l && l(), () => {
|
|
2872
2873
|
d && d();
|
|
2873
|
-
}), [l, d]), /* @__PURE__ */ a(Hi, { toolbarRef: f, ref: t, children: /* @__PURE__ */ a(
|
|
2874
|
-
/* @__PURE__ */ D(
|
|
2874
|
+
}), [l, d]), /* @__PURE__ */ a(Hi, { toolbarRef: f, ref: t, children: /* @__PURE__ */ a(xn, { mobileWidth: s, onLayoutWidthChange: u, children: /* @__PURE__ */ a(bn, { slots: o, children: /* @__PURE__ */ a(Cn, { icons: n, children: /* @__PURE__ */ D(Tn, { getContainerRef: g, style: i, className: c, children: [
|
|
2875
|
+
/* @__PURE__ */ D(Pn, { children: [
|
|
2875
2876
|
/* @__PURE__ */ D("div", { className: _e["rp-layout"], children: [
|
|
2876
2877
|
/* @__PURE__ */ a(Di, { ref: h }),
|
|
2877
2878
|
/* @__PURE__ */ D("div", { className: _e["rp-content"], children: [
|
|
2878
2879
|
/* @__PURE__ */ a("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ a(Mi, {}) }),
|
|
2879
|
-
/* @__PURE__ */ a("div", { ref: b, className: _e["rp-pages"], children:
|
|
2880
|
+
/* @__PURE__ */ a("div", { ref: b, className: _e["rp-pages"], children: r })
|
|
2880
2881
|
] })
|
|
2881
2882
|
] }),
|
|
2882
|
-
/* @__PURE__ */ a(
|
|
2883
|
+
/* @__PURE__ */ a(Sn, {})
|
|
2883
2884
|
] }),
|
|
2884
2885
|
w ? /* @__PURE__ */ a(
|
|
2885
2886
|
"div",
|
|
@@ -2917,7 +2918,7 @@ export {
|
|
|
2917
2918
|
_o as C,
|
|
2918
2919
|
Go as D,
|
|
2919
2920
|
Di as E,
|
|
2920
|
-
|
|
2921
|
+
Ur as F,
|
|
2921
2922
|
zi as G,
|
|
2922
2923
|
ki as H,
|
|
2923
2924
|
Mi as I,
|
|
@@ -2925,26 +2926,26 @@ export {
|
|
|
2925
2926
|
Oi as L,
|
|
2926
2927
|
Ti as M,
|
|
2927
2928
|
Pi as O,
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2929
|
+
Cs as P,
|
|
2930
|
+
xs as R,
|
|
2931
|
+
Ss as S,
|
|
2932
|
+
Ps as T,
|
|
2932
2933
|
Ri as Z,
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2934
|
+
Ts as a,
|
|
2935
|
+
Ls as b,
|
|
2936
|
+
$r as c,
|
|
2936
2937
|
et as d,
|
|
2937
|
-
|
|
2938
|
-
|
|
2938
|
+
Pr as e,
|
|
2939
|
+
vr as f,
|
|
2939
2940
|
mo as g,
|
|
2940
|
-
|
|
2941
|
+
_r as h,
|
|
2941
2942
|
fo as i,
|
|
2942
|
-
|
|
2943
|
+
wr as j,
|
|
2943
2944
|
go as k,
|
|
2944
|
-
|
|
2945
|
-
|
|
2945
|
+
br as l,
|
|
2946
|
+
Cr as m,
|
|
2946
2947
|
vo as n,
|
|
2947
|
-
|
|
2948
|
+
Tr as o,
|
|
2948
2949
|
wo as p,
|
|
2949
2950
|
Po as q,
|
|
2950
2951
|
Lt as r,
|
|
@@ -2954,6 +2955,6 @@ export {
|
|
|
2954
2955
|
Uo as v,
|
|
2955
2956
|
Bo as w,
|
|
2956
2957
|
ui as x,
|
|
2957
|
-
|
|
2958
|
+
jr as y,
|
|
2958
2959
|
Si as z
|
|
2959
2960
|
};
|