@pdf-viewer/react 1.4.0-beta.6 → 1.4.0-beta.7
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/Popover-aaa4344e.js +1445 -0
- package/dist/{RPDefaultLayout-3344b69e.js → RPDefaultLayout-525b5c82.js} +635 -643
- package/dist/component-1da194e8.js +337 -0
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/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 +2 -2
- 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 +2 -2
- 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/Popover.js +4 -3058
- package/dist/components/ui/RPTooltip.js +687 -328
- 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/floating-ui.react-dom-15b9b819.js +1310 -0
- 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 +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.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/floating-ui.react-dom-88a86594.js +0 -1447
- package/dist/index-48ca3f30.js +0 -307
- package/dist/index-4ba3ab9a.js +0 -1877
|
@@ -1,113 +1,115 @@
|
|
|
1
1
|
import { jsx as i, Fragment as Ie, jsxs as z } from "react/jsx-runtime";
|
|
2
2
|
import * as V from "react";
|
|
3
|
-
import { useRef as W, useEffect as O, useCallback as x, useState as $, createContext as Ze, useContext as je, useMemo as k, forwardRef as Be, useImperativeHandle as
|
|
3
|
+
import { useRef as W, useEffect as O, useCallback as x, useState as $, createContext as Ze, useContext as je, useMemo as k, forwardRef as Be, useImperativeHandle as ir, createElement as Me, PureComponent as tn, Component as rn, memo as nn } from "react";
|
|
4
4
|
import { ChevronUpIcon as ke } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as te } from "./components/ui/Button.js";
|
|
6
|
-
import { UIInput as
|
|
6
|
+
import { UIInput as ar } from "./components/ui/Input.js";
|
|
7
7
|
import { useScrollModeContext as Oe } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as X } from "./contexts/RPDocumentContext.js";
|
|
9
9
|
import "./contexts/DarkModeContext.js";
|
|
10
|
-
import { ViewMode as Ve, ScrollMode as K, AnnotationSubType as
|
|
10
|
+
import { ViewMode as Ve, ScrollMode as K, AnnotationSubType as zt, SelectionMode as on, 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 an } from "./contexts/LayerContext.js";
|
|
13
13
|
import { useZoomContext as Xe } from "./contexts/ZoomContext.js";
|
|
14
14
|
import { useViewModeContext as Je } from "./contexts/ViewModeContext.js";
|
|
15
15
|
import { useVirtualScrollContext as Ye } from "./contexts/VirtualScrollContext.js";
|
|
16
|
-
import { useVirtualGridContext as
|
|
16
|
+
import { useVirtualGridContext as sr } from "./contexts/VirtualGridContext.js";
|
|
17
17
|
import { useScrollStateContext as Qe } from "./contexts/ScrollStateContext.js";
|
|
18
|
-
import { useSelectionModeContext as
|
|
19
|
-
import { useInitialStateContext as
|
|
20
|
-
import { useFullScreenContext as
|
|
18
|
+
import { useSelectionModeContext as sn } from "./contexts/SelectionModeContext.js";
|
|
19
|
+
import { useInitialStateContext as cn } from "./contexts/InitialStateContext.js";
|
|
20
|
+
import { useFullScreenContext as ln } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
23
|
import { renderPage as gt } from "./utils/renderPage.js";
|
|
24
|
-
import { highlightMatches as
|
|
25
|
-
import * as
|
|
26
|
-
import { PixelsPerInch as
|
|
24
|
+
import { highlightMatches as cr, findMatches as un, resetDivs as lr, highlightMultipleColorMatches as dn } from "./utils/highlight.js";
|
|
25
|
+
import * as Ct from "pdfjs-dist";
|
|
26
|
+
import { PixelsPerInch as pn, AnnotationMode as hn, RenderingCancelledException as mn, AnnotationLayer as fn } from "pdfjs-dist";
|
|
27
27
|
import { useLayoutContainer as xe } from "./contexts/LayoutContainerContext.js";
|
|
28
|
-
import { useDimensionPagesContext as
|
|
28
|
+
import { useDimensionPagesContext as Tt } from "./contexts/DimensionPagesContext.js";
|
|
29
29
|
import { useLocalizationContext as me } from "./contexts/LocalizationContext.js";
|
|
30
|
-
import { useHighlightContext as
|
|
31
|
-
import { useLoaderContext as
|
|
30
|
+
import { useHighlightContext as gn } from "./contexts/HighlightContext.js";
|
|
31
|
+
import { useLoaderContext as ur } from "./contexts/LoaderContext.js";
|
|
32
32
|
import "./components/RPConfig.js";
|
|
33
|
-
import { ThumbnailIcon as
|
|
33
|
+
import { ThumbnailIcon as vn } from "./components/icons/Thumbnail.js";
|
|
34
34
|
import { c as oe } from "./clsx-0c6e471a.js";
|
|
35
|
-
import { LoaderIcon as
|
|
36
|
-
import { useInfiniteScroll as
|
|
37
|
-
import { RPSplitter as
|
|
38
|
-
import { useToolbarComponentContext as _e, ToolbarComponentProvider as
|
|
39
|
-
import { useIconContext as fe, IconProvider as
|
|
35
|
+
import { LoaderIcon as Pt } from "./components/icons/LoaderIcon.js";
|
|
36
|
+
import { useInfiniteScroll as _n } from "./utils/hooks/useInfiniteScroll.js";
|
|
37
|
+
import { RPSplitter as wn } from "./components/layout/sidebar/RPSplitter.js";
|
|
38
|
+
import { useToolbarComponentContext as _e, ToolbarComponentProvider as bn } from "./contexts/ToolbarComponentContext.js";
|
|
39
|
+
import { useIconContext as fe, IconProvider as Cn } from "./contexts/IconContext.js";
|
|
40
40
|
import q from "./components/ui/RPTooltip.js";
|
|
41
|
-
import { c as Pe, C as
|
|
42
|
-
import { WrapperLayout as
|
|
43
|
-
import { RPDropFileZone as
|
|
44
|
-
import { useViewportContext as Re, ViewportProvider as
|
|
41
|
+
import { c as Pe, C as Tn } from "./Container-8fea0875.js";
|
|
42
|
+
import { WrapperLayout as Pn } from "./components/layout/WrapperLayout.js";
|
|
43
|
+
import { RPDropFileZone as Sn } from "./components/RPDropFileZone.js";
|
|
44
|
+
import { useViewportContext as Re, ViewportProvider as In } from "./contexts/ViewportContext.js";
|
|
45
45
|
import "./contexts/ThemeContext.js";
|
|
46
|
-
import { SimpleLinkService as
|
|
47
|
-
import { annotationsEvents as
|
|
48
|
-
import { useWatermark as
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
46
|
+
import { SimpleLinkService as yn } from "./utils/link_service.js";
|
|
47
|
+
import { annotationsEvents as xn, annotationEventsHandler as Rn, handleClick as At, handleAnnotationWidget as Ln, handleAnnotationLink as Nn, bindLayerEvents as En, unbindLayerEvents as Ft } from "./utils/annotations.js";
|
|
48
|
+
import { useWatermark as On } from "./utils/hooks/useWatermark.js";
|
|
49
|
+
import { _ as Dn, U as zn } from "./Popover-aaa4344e.js";
|
|
50
|
+
import { useMousePressed as An } from "./utils/hooks/useMousePressed.js";
|
|
51
|
+
import { useGrabScroll as Fn } from "./utils/hooks/useGrabScroll.js";
|
|
52
|
+
import { usePinch as kn } from "./utils/hooks/usePinch.js";
|
|
52
53
|
import { useDebounce as vt } from "./utils/hooks/useDebounce.js";
|
|
53
|
-
import { getThumbnailViewport as
|
|
54
|
-
import { smoothScrollTo as
|
|
55
|
-
import { appConsole as
|
|
56
|
-
import { FileUploadTool as
|
|
57
|
-
import { DarkModeTool as
|
|
58
|
-
import { ThreeDotIcon as
|
|
59
|
-
import { UIDropDown as
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import { a as
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
54
|
+
import { getThumbnailViewport as kt } from "./utils/getThumbnailViewport.js";
|
|
55
|
+
import { smoothScrollTo as Wt } from "./utils/smoothScrollTo.js";
|
|
56
|
+
import { appConsole as Wn } from "./utils/appConsole.js";
|
|
57
|
+
import { FileUploadTool as dr } from "./components/layout/toolbar/FileUploadTool.js";
|
|
58
|
+
import { DarkModeTool as Mn } from "./components/layout/toolbar/DarkModeTool.js";
|
|
59
|
+
import { ThreeDotIcon as Hn } from "./components/icons/ThreeDotIcon.js";
|
|
60
|
+
import { UIDropDown as pr } from "./components/ui/DropDown.js";
|
|
61
|
+
import { u as St, P as We, c as Fe, a as It, S as $n } from "./index-353ec0a6.js";
|
|
62
|
+
import { c as Gn, e as Vn, b as Un } from "./index-71898eb9.js";
|
|
63
|
+
import { a as it } from "./index-2e540713.js";
|
|
64
|
+
import { a as qn, u as Zn, F as jn, D as Bn, b as Kn, G as Ue } from "./index-5ff5dbd0.js";
|
|
65
|
+
import { h as Xn } from "./component-1da194e8.js";
|
|
66
|
+
import { CloseIcon as hr } from "./components/icons/CloseIcon.js";
|
|
67
|
+
import { dateFormatter as Mt } from "./utils/dateFormatter.js";
|
|
68
|
+
import { PropertyItem as Jn } from "./components/layout/toolbar/PropertyItem.js";
|
|
69
|
+
import { useOtherToolContext as Yn, OtherToolProvider as Qn } from "./contexts/OtherToolContext.js";
|
|
70
|
+
import { DocumentProperties as eo } from "./components/layout/toolbar/DocumentProperties.js";
|
|
71
|
+
import { RotateTool as to } from "./components/layout/toolbar/RotateTool.js";
|
|
72
|
+
import { ScrollModeTool as ro } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
73
|
+
import { MenuSeparator as yt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
71
74
|
import { FileDownloadDefaultIcon as no } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
72
75
|
import { MenuItem as we } from "./components/layout/toolbar/MenuItem.js";
|
|
73
|
-
import { PrintDefaultTool as
|
|
74
|
-
import { FullScreenTool as
|
|
75
|
-
import { GoToDownIcon as
|
|
76
|
-
import { SelectionModeTool as
|
|
77
|
-
import { ZoomInIcon as
|
|
78
|
-
import { ZoomOutIcon as
|
|
79
|
-
import { PAGE_PADDING as
|
|
80
|
-
import { getZoomLevel as
|
|
81
|
-
import { SearchIcon as
|
|
82
|
-
import { UICheckbox as
|
|
83
|
-
import { ClearIcon as
|
|
84
|
-
import { InfoIcon as
|
|
85
|
-
import
|
|
86
|
-
|
|
87
|
-
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = Ye(), { setFocusedPage: a } = ce(), c = W(), { columnCount: s } = ln(), { widths: u, heights: l } = Pt(), d = W(e), f = W(t), h = W(s);
|
|
76
|
+
import { PrintDefaultTool as oo } from "./components/icons/PrintDefaultIcon.js";
|
|
77
|
+
import { FullScreenTool as mr } from "./components/layout/toolbar/FullScreenTool.js";
|
|
78
|
+
import { GoToDownIcon as fr } from "./components/icons/GoToDownIcon.js";
|
|
79
|
+
import { SelectionModeTool as io } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
80
|
+
import { ZoomInIcon as ao } from "./components/icons/ZoomInIcon.js";
|
|
81
|
+
import { ZoomOutIcon as so } from "./components/icons/ZoomOutIcon.js";
|
|
82
|
+
import { PAGE_PADDING as Ht } from "./utils/constants.js";
|
|
83
|
+
import { getZoomLevel as co } from "./utils/getZoomLevel.js";
|
|
84
|
+
import { SearchIcon as lo } from "./components/icons/SearchIcon.js";
|
|
85
|
+
import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
86
|
+
import { ClearIcon as uo } from "./components/icons/ClearIcon.js";
|
|
87
|
+
import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
|
|
88
|
+
import './assets/RPDefaultLayout.css';const gr = () => {
|
|
89
|
+
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { virtualScrollRef: r, virtualScrollableElementRef: o, pageScrollElementRef: n } = Ye(), { setFocusedPage: a } = ce(), c = W(), { columnCount: s } = sr(), { widths: u, heights: l } = Tt(), d = W(e), f = W(t), h = W(s);
|
|
88
90
|
O(() => {
|
|
89
|
-
|
|
90
|
-
}, [
|
|
91
|
+
r != null && r.scrollToItem && (c.current = r);
|
|
92
|
+
}, [r]), O(() => {
|
|
91
93
|
d.current = e, f.current = t;
|
|
92
94
|
}, [e, t]);
|
|
93
95
|
const g = x(
|
|
94
96
|
(b) => {
|
|
95
|
-
if (!
|
|
97
|
+
if (!n)
|
|
96
98
|
return;
|
|
97
99
|
const v = Math.ceil(b / 2) * 2 - 1;
|
|
98
100
|
return b === v + 1 ? new Promise((w) => {
|
|
99
|
-
|
|
101
|
+
n.scrollTo({
|
|
100
102
|
left: u[v],
|
|
101
103
|
top: 0
|
|
102
104
|
}), w();
|
|
103
105
|
}) : new Promise((w) => {
|
|
104
|
-
|
|
106
|
+
n.scrollTo({
|
|
105
107
|
left: 0,
|
|
106
108
|
top: 0
|
|
107
109
|
}), w();
|
|
108
110
|
});
|
|
109
111
|
},
|
|
110
|
-
[
|
|
112
|
+
[n, u, Wt]
|
|
111
113
|
);
|
|
112
114
|
return O(() => {
|
|
113
115
|
d.current = e, f.current = t;
|
|
@@ -160,18 +162,18 @@ import './assets/RPDefaultLayout.css';const _n = () => {
|
|
|
160
162
|
s,
|
|
161
163
|
g,
|
|
162
164
|
a,
|
|
163
|
-
|
|
165
|
+
Wt,
|
|
164
166
|
l,
|
|
165
167
|
u
|
|
166
168
|
]
|
|
167
169
|
) };
|
|
168
170
|
}, po = (t = 1) => {
|
|
169
|
-
const [e,
|
|
171
|
+
const [e, r] = $(t), [o, n] = $(0), { scrollToPage: a } = gr(), c = W(1), { isScrolling: s } = Qe(), { viewMode: u } = Je(), { scrollMode: l } = Oe(), d = vt(e, 100), f = x(
|
|
170
172
|
(v) => {
|
|
171
173
|
if (!/^[0-9]*$/g.test(v.toString()) || !v)
|
|
172
174
|
return { success: !1, currentPage: c.current };
|
|
173
175
|
const m = +v;
|
|
174
|
-
return m < 0 || m > o ? { success: !1, currentPage: c.current } : (
|
|
176
|
+
return m < 0 || m > o ? { success: !1, currentPage: c.current } : (r(m), c.current = m, { success: !0, currentPage: +v });
|
|
175
177
|
},
|
|
176
178
|
[o]
|
|
177
179
|
), h = x(f, [f]), g = x(
|
|
@@ -193,12 +195,12 @@ import './assets/RPDefaultLayout.css';const _n = () => {
|
|
|
193
195
|
focusedPage: d,
|
|
194
196
|
totalPages: o,
|
|
195
197
|
setFocusedPage: h,
|
|
196
|
-
setTotalPages:
|
|
198
|
+
setTotalPages: n,
|
|
197
199
|
nextPage: b,
|
|
198
200
|
prevPage: _,
|
|
199
201
|
goToPage: g
|
|
200
202
|
};
|
|
201
|
-
},
|
|
203
|
+
}, vr = Ze({
|
|
202
204
|
focusedPage: 0,
|
|
203
205
|
setFocusedPage: (t) => {
|
|
204
206
|
},
|
|
@@ -211,19 +213,19 @@ import './assets/RPDefaultLayout.css';const _n = () => {
|
|
|
211
213
|
nextPage: () => {
|
|
212
214
|
}
|
|
213
215
|
}), ce = () => {
|
|
214
|
-
const t = je(
|
|
215
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
216
|
-
},
|
|
217
|
-
const { pdf: e } = X(), { focusedPage:
|
|
216
|
+
const t = je(vr);
|
|
217
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && Wn.error("Please use this hooks inside children component of RPProvider"), t;
|
|
218
|
+
}, gs = ({ children: t }) => {
|
|
219
|
+
const { pdf: e } = X(), { focusedPage: r, totalPages: o, setFocusedPage: n, setTotalPages: a, goToPage: c, nextPage: s, prevPage: u } = po();
|
|
218
220
|
return O(() => {
|
|
219
221
|
e != null && e.numPages && a(e.numPages);
|
|
220
222
|
}, [e, a]), /* @__PURE__ */ i(
|
|
221
|
-
|
|
223
|
+
vr.Provider,
|
|
222
224
|
{
|
|
223
225
|
value: {
|
|
224
|
-
focusedPage:
|
|
226
|
+
focusedPage: r,
|
|
225
227
|
totalPages: o,
|
|
226
|
-
setFocusedPage:
|
|
228
|
+
setFocusedPage: n,
|
|
227
229
|
setTotalPages: a,
|
|
228
230
|
nextPage: s,
|
|
229
231
|
prevPage: u,
|
|
@@ -234,11 +236,11 @@ import './assets/RPDefaultLayout.css';const _n = () => {
|
|
|
234
236
|
);
|
|
235
237
|
};
|
|
236
238
|
const ho = () => {
|
|
237
|
-
const { pdf: t, pages: e } = X(), [
|
|
239
|
+
const { pdf: t, pages: e } = X(), [r, o] = $({
|
|
238
240
|
loadedPages: 0,
|
|
239
241
|
totalPages: 0,
|
|
240
242
|
percentage: 0
|
|
241
|
-
}), [
|
|
243
|
+
}), [n, a] = $(!1), [c, s] = $(!1), [u, l] = $(null), d = W(!1);
|
|
242
244
|
O(() => {
|
|
243
245
|
d.current;
|
|
244
246
|
}, [d]);
|
|
@@ -267,7 +269,7 @@ const ho = () => {
|
|
|
267
269
|
h();
|
|
268
270
|
return;
|
|
269
271
|
}
|
|
270
|
-
const R = C /
|
|
272
|
+
const R = C / pn.PDF;
|
|
271
273
|
T.width = Math.floor(P.width * R), T.height = Math.floor(P.height * R);
|
|
272
274
|
const D = T.getContext("2d");
|
|
273
275
|
D.save(), D.fillStyle = "rgb(255, 255, 255)", D.fillRect(0, 0, T.width, T.height), D.restore();
|
|
@@ -284,14 +286,14 @@ const ho = () => {
|
|
|
284
286
|
transform: [R, 0, 0, R, 0, 0],
|
|
285
287
|
viewport: L.getViewport({ scale: 1, rotation: P.rotation }),
|
|
286
288
|
intent: "print",
|
|
287
|
-
annotationMode:
|
|
289
|
+
annotationMode: hn.ENABLE_STORAGE,
|
|
288
290
|
optionalContentConfigPromise: S,
|
|
289
291
|
printAnnotationStorage: F
|
|
290
292
|
};
|
|
291
293
|
try {
|
|
292
294
|
return L.render(E).promise;
|
|
293
295
|
} catch (y) {
|
|
294
|
-
throw y instanceof
|
|
296
|
+
throw y instanceof mn || console.error(y), y;
|
|
295
297
|
}
|
|
296
298
|
}, b = x(() => {
|
|
297
299
|
const T = window.print;
|
|
@@ -388,12 +390,12 @@ const ho = () => {
|
|
|
388
390
|
}, [f, h]), {
|
|
389
391
|
print: m,
|
|
390
392
|
cancel: g,
|
|
391
|
-
progress:
|
|
392
|
-
isComplete:
|
|
393
|
+
progress: r,
|
|
394
|
+
isComplete: n,
|
|
393
395
|
isError: c,
|
|
394
396
|
error: u
|
|
395
397
|
};
|
|
396
|
-
},
|
|
398
|
+
}, _r = Ze({
|
|
397
399
|
print: () => {
|
|
398
400
|
},
|
|
399
401
|
cancel: () => {
|
|
@@ -410,14 +412,14 @@ const ho = () => {
|
|
|
410
412
|
console.error("Error in setOnError callback:", e);
|
|
411
413
|
}
|
|
412
414
|
}
|
|
413
|
-
}),
|
|
414
|
-
const [e,
|
|
415
|
-
v && typeof v == "function" &&
|
|
415
|
+
}), vs = ({ children: t }) => {
|
|
416
|
+
const [e, r] = $(null), [o, n] = $(null), { print: a, cancel: c, progress: s, isComplete: u, isError: l, error: d } = ho(), f = x((v) => {
|
|
417
|
+
v && typeof v == "function" && n(() => v);
|
|
416
418
|
}, []), h = (v) => {
|
|
417
419
|
d && v(d);
|
|
418
420
|
}, g = x(
|
|
419
421
|
(v) => {
|
|
420
|
-
|
|
422
|
+
r(() => v);
|
|
421
423
|
},
|
|
422
424
|
[s, e]
|
|
423
425
|
);
|
|
@@ -431,7 +433,7 @@ const ho = () => {
|
|
|
431
433
|
s && e && e(s);
|
|
432
434
|
}, [s, e]);
|
|
433
435
|
const _ = () => {
|
|
434
|
-
o && (o(),
|
|
436
|
+
o && (o(), n(null));
|
|
435
437
|
}, b = {
|
|
436
438
|
print: a,
|
|
437
439
|
cancel: c,
|
|
@@ -440,19 +442,19 @@ const ho = () => {
|
|
|
440
442
|
setOnError: h,
|
|
441
443
|
progress: s
|
|
442
444
|
};
|
|
443
|
-
return /* @__PURE__ */ i(
|
|
445
|
+
return /* @__PURE__ */ i(_r.Provider, { value: b, children: t });
|
|
444
446
|
}, et = () => {
|
|
445
|
-
const t = je(
|
|
447
|
+
const t = je(_r);
|
|
446
448
|
if (!t)
|
|
447
449
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
448
450
|
return t;
|
|
449
451
|
}, mo = () => {
|
|
450
|
-
const [t, e] = $({}), { pages:
|
|
452
|
+
const [t, e] = $({}), { pages: r } = X(), { rotate: o } = Ke(), n = k(() => Object.keys(t).length, [t]), a = x(
|
|
451
453
|
(s) => {
|
|
452
|
-
if (!
|
|
454
|
+
if (!r.size)
|
|
453
455
|
return;
|
|
454
|
-
const u = Array.from(
|
|
455
|
-
const { thumbnailViewport: h, scale: g } =
|
|
456
|
+
const u = Array.from(r.values()).slice(0, s).map((f) => {
|
|
457
|
+
const { thumbnailViewport: h, scale: g } = kt(f.page, o);
|
|
456
458
|
return {
|
|
457
459
|
scale: g,
|
|
458
460
|
page: f.page,
|
|
@@ -484,16 +486,16 @@ const ho = () => {
|
|
|
484
486
|
e((g) => ({ ...g, ...h }));
|
|
485
487
|
});
|
|
486
488
|
},
|
|
487
|
-
[
|
|
489
|
+
[r, o]
|
|
488
490
|
);
|
|
489
491
|
O(() => {
|
|
490
492
|
a(10);
|
|
491
493
|
}, [a]);
|
|
492
494
|
const c = x(
|
|
493
495
|
(s) => {
|
|
494
|
-
if (!
|
|
496
|
+
if (!r)
|
|
495
497
|
return;
|
|
496
|
-
const u =
|
|
498
|
+
const u = r.get(s);
|
|
497
499
|
if (!u)
|
|
498
500
|
return;
|
|
499
501
|
e((d) => ({
|
|
@@ -507,7 +509,7 @@ const ho = () => {
|
|
|
507
509
|
}));
|
|
508
510
|
const l = document.createElement("canvas");
|
|
509
511
|
gt(u.page, l, { scale: u.thumbnailScale, rotate: o }).promise.then(() => {
|
|
510
|
-
const d = l.toDataURL(), { thumbnailViewport: f, scale: h } =
|
|
512
|
+
const d = l.toDataURL(), { thumbnailViewport: f, scale: h } = kt(u.page, o);
|
|
511
513
|
return {
|
|
512
514
|
scale: h,
|
|
513
515
|
thumbnailSrc: d,
|
|
@@ -519,10 +521,10 @@ const ho = () => {
|
|
|
519
521
|
e((f) => ({ ...f, [s]: d }));
|
|
520
522
|
});
|
|
521
523
|
},
|
|
522
|
-
[
|
|
524
|
+
[r, o]
|
|
523
525
|
);
|
|
524
|
-
return { thumbnailPages: t, addPage: c, addToPage: a, thumbnailLength:
|
|
525
|
-
},
|
|
526
|
+
return { thumbnailPages: t, addPage: c, addToPage: a, thumbnailLength: n };
|
|
527
|
+
}, wr = Ze({
|
|
526
528
|
thumbnailPages: {},
|
|
527
529
|
addPage: (t) => {
|
|
528
530
|
},
|
|
@@ -532,20 +534,20 @@ const ho = () => {
|
|
|
532
534
|
setActive: (t) => {
|
|
533
535
|
},
|
|
534
536
|
active: !1
|
|
535
|
-
}),
|
|
537
|
+
}), br = () => je(wr), _s = ({
|
|
536
538
|
children: t,
|
|
537
539
|
initialThumbnailsVisible: e
|
|
538
540
|
}) => {
|
|
539
|
-
const { thumbnailPages:
|
|
541
|
+
const { thumbnailPages: r, addPage: o, addToPage: n, thumbnailLength: a } = mo(), [c, s] = $(e);
|
|
540
542
|
return /* @__PURE__ */ i(
|
|
541
|
-
|
|
543
|
+
wr.Provider,
|
|
542
544
|
{
|
|
543
|
-
value: { thumbnailPages:
|
|
545
|
+
value: { thumbnailPages: r, addPage: o, addToPage: n, thumbnailLength: a, active: c, setActive: s },
|
|
544
546
|
children: t
|
|
545
547
|
}
|
|
546
548
|
);
|
|
547
549
|
}, fo = (t = {}, e = "") => {
|
|
548
|
-
const [
|
|
550
|
+
const [r, o] = $(e), [n, a] = $(!1), { pdf: c, pages: s } = X(), u = Tt(), l = W(!r), { currentZoom: d } = Xe(), [f, h] = $([]), { setFocusedPage: g } = ce(), [_, b] = $(0), { pageScrollElementRef: v, virtualScrollableElementRef: w } = Ye(), { scrollMode: m } = Oe(), { pagesRef: T } = xe(), [I, p] = $(null), P = W({}), C = k(() => _ === 0 ? null : f[_ - 1], [_, f]), S = k(() => f.length, [f]);
|
|
549
551
|
O(() => {
|
|
550
552
|
if (!C || !s)
|
|
551
553
|
return;
|
|
@@ -559,13 +561,13 @@ const ho = () => {
|
|
|
559
561
|
if (!F)
|
|
560
562
|
return;
|
|
561
563
|
const Z = P.current[C.page], ee = F.page.getViewport({ scale: 1 });
|
|
562
|
-
U = new
|
|
564
|
+
U = new Ct.TextLayer({
|
|
563
565
|
viewport: ee,
|
|
564
566
|
textContentSource: Z,
|
|
565
567
|
container: document.createElement("div")
|
|
566
568
|
}), U.render().then(() => {
|
|
567
|
-
const j = U.textDivs[C.start.idx], [J] =
|
|
568
|
-
j.style.position = "absolute", j.style.color = "transparent", Y.style.position = "absolute", Y.style.top = "0", Y.style.setProperty("--scale-factor", `${d}`), B.style.position = "relative", B.style.width = `${ae}px`, B.style.height = `${
|
|
569
|
+
const j = U.textDivs[C.start.idx], [J] = cr([C], Z, U.textDivs), ae = u.widths[C.page - 1], re = u.heights[C.page - 1], B = document.createElement("div"), Y = document.createElement("div");
|
|
570
|
+
j.style.position = "absolute", j.style.color = "transparent", Y.style.position = "absolute", Y.style.top = "0", Y.style.setProperty("--scale-factor", `${d}`), B.style.position = "relative", B.style.width = `${ae}px`, B.style.height = `${re}px`, B.style.zIndex = "-1", B.appendChild(j), Y.appendChild(B), T.prepend(Y);
|
|
569
571
|
const ue = J.element.getBoundingClientRect(), be = Y.getBoundingClientRect(), De = ue.top - be.top, de = ue.left - be.left, pe = N + De - E + ue.height / 2, ge = G + de - y + ue.width / 2, Ce = {
|
|
570
572
|
left: Math.max(ge, 0),
|
|
571
573
|
top: Math.max(pe, 0)
|
|
@@ -601,15 +603,15 @@ const ho = () => {
|
|
|
601
603
|
return E;
|
|
602
604
|
}, []);
|
|
603
605
|
return O(() => {
|
|
604
|
-
if (!
|
|
606
|
+
if (!r) {
|
|
605
607
|
l.current = !0, h([]), b(0);
|
|
606
608
|
return;
|
|
607
609
|
}
|
|
608
610
|
l.current = !1, a(!0), h([]), b(0), D(c).then((L) => {
|
|
609
611
|
P.current = L;
|
|
610
612
|
const E = Object.keys(L).reduce((y, N) => {
|
|
611
|
-
const G =
|
|
612
|
-
[
|
|
613
|
+
const G = un(
|
|
614
|
+
[r],
|
|
613
615
|
L[N],
|
|
614
616
|
Number(N) - 1,
|
|
615
617
|
t
|
|
@@ -620,10 +622,10 @@ const ho = () => {
|
|
|
620
622
|
}).catch(() => {
|
|
621
623
|
h([]), b(0);
|
|
622
624
|
}).finally(() => a(!1));
|
|
623
|
-
}, [
|
|
624
|
-
search:
|
|
625
|
+
}, [r, D, c, t]), {
|
|
626
|
+
search: r,
|
|
625
627
|
setSearch: o,
|
|
626
|
-
loading:
|
|
628
|
+
loading: n,
|
|
627
629
|
matches: f,
|
|
628
630
|
totalMatches: S,
|
|
629
631
|
currentMatchPosition: _,
|
|
@@ -633,7 +635,7 @@ const ho = () => {
|
|
|
633
635
|
currentMatchElement: I,
|
|
634
636
|
setCurrentMatchElement: p
|
|
635
637
|
};
|
|
636
|
-
},
|
|
638
|
+
}, Cr = Ze({
|
|
637
639
|
search: "",
|
|
638
640
|
setSearch: (t) => {
|
|
639
641
|
},
|
|
@@ -651,12 +653,12 @@ const ho = () => {
|
|
|
651
653
|
currentMatchElement: null,
|
|
652
654
|
setCurrentMatchElement: (t) => {
|
|
653
655
|
}
|
|
654
|
-
}),
|
|
656
|
+
}), ws = ({
|
|
655
657
|
children: t,
|
|
656
658
|
initialSearch: e
|
|
657
659
|
}) => {
|
|
658
|
-
const [
|
|
659
|
-
loading:
|
|
660
|
+
const [r, o] = $({}), {
|
|
661
|
+
loading: n,
|
|
660
662
|
setSearch: a,
|
|
661
663
|
totalMatches: c,
|
|
662
664
|
currentMatchPosition: s,
|
|
@@ -667,14 +669,14 @@ const ho = () => {
|
|
|
667
669
|
prevMatch: h,
|
|
668
670
|
currentMatchElement: g,
|
|
669
671
|
setCurrentMatchElement: _
|
|
670
|
-
} = fo(
|
|
672
|
+
} = fo(r, e);
|
|
671
673
|
return /* @__PURE__ */ i(
|
|
672
|
-
|
|
674
|
+
Cr.Provider,
|
|
673
675
|
{
|
|
674
676
|
value: {
|
|
675
|
-
searchOptions:
|
|
677
|
+
searchOptions: r,
|
|
676
678
|
setSearchOptions: o,
|
|
677
|
-
loading:
|
|
679
|
+
loading: n,
|
|
678
680
|
setSearch: a,
|
|
679
681
|
totalMatches: c,
|
|
680
682
|
currentMatchPosition: s,
|
|
@@ -689,7 +691,7 @@ const ho = () => {
|
|
|
689
691
|
children: t
|
|
690
692
|
}
|
|
691
693
|
);
|
|
692
|
-
},
|
|
694
|
+
}, Tr = () => je(Cr), he = {
|
|
693
695
|
"rp-pages": "_rp-pages_1776r_1",
|
|
694
696
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
|
|
695
697
|
"rp-pages-container": "_rp-pages-container_1776r_11",
|
|
@@ -703,13 +705,13 @@ const ho = () => {
|
|
|
703
705
|
"rp-page": "_rp-page_h7a2q_1",
|
|
704
706
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
705
707
|
}, go = (t) => {
|
|
706
|
-
const { pageNumber: e, onLoaded:
|
|
708
|
+
const { pageNumber: e, onLoaded: r, onLoading: o } = t, n = W(null), { pages: a } = X(), { rotate: c } = Ke(), s = W(), { currentZoom: u } = Xe();
|
|
707
709
|
return O(() => {
|
|
708
710
|
if (!a || u === 0)
|
|
709
711
|
return;
|
|
710
712
|
const l = a.get(e);
|
|
711
|
-
if (
|
|
712
|
-
const d =
|
|
713
|
+
if (n.current && l) {
|
|
714
|
+
const d = n.current;
|
|
713
715
|
d.hidden = !0;
|
|
714
716
|
const f = s.current;
|
|
715
717
|
f && f.cancel(), o && o(), s.current = gt(l.page, d, {
|
|
@@ -720,23 +722,23 @@ const ho = () => {
|
|
|
720
722
|
d.hidden = !1;
|
|
721
723
|
}).catch((h) => {
|
|
722
724
|
}).finally(() => {
|
|
723
|
-
|
|
725
|
+
r && r();
|
|
724
726
|
});
|
|
725
727
|
}
|
|
726
|
-
}, [a, e, c, u, o,
|
|
728
|
+
}, [a, e, c, u, o, r]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: n });
|
|
727
729
|
}, st = {
|
|
728
730
|
"rp-text-layer": "_rp-text-layer_kwwfn_1",
|
|
729
731
|
"rp-text-layer-text": "_rp-text-layer-text_kwwfn_9"
|
|
730
732
|
}, vo = (t) => {
|
|
731
|
-
const { pageNumber: e } = t, { pages:
|
|
733
|
+
const { pageNumber: e } = t, { pages: r } = X(), o = W(null), { matches: n, currentMatch: a, setCurrentMatchElement: c } = Tr(), [s, u] = $(
|
|
732
734
|
[]
|
|
733
|
-
), l = W(), d = W(), f = W(), h = k(() =>
|
|
735
|
+
), l = W(), d = W(), f = W(), h = k(() => n.filter((_) => _.pageIndex === e - 1), [n, e]), g = x(
|
|
734
736
|
(_, b, v = !1) => {
|
|
735
|
-
if (v &&
|
|
737
|
+
if (v && lr(_, b), !h.length) {
|
|
736
738
|
f.current = void 0, u([]);
|
|
737
739
|
return;
|
|
738
740
|
}
|
|
739
|
-
const w =
|
|
741
|
+
const w = cr(h, _, b);
|
|
740
742
|
u(w);
|
|
741
743
|
},
|
|
742
744
|
[h]
|
|
@@ -753,11 +755,11 @@ const ho = () => {
|
|
|
753
755
|
const b = s.find((w) => w.index === _);
|
|
754
756
|
b && (f.current = b.element, c(b.element), b.element.classList.add("selected"));
|
|
755
757
|
}, [a, s, h]), O(() => {
|
|
756
|
-
const _ =
|
|
758
|
+
const _ = r.get(e);
|
|
757
759
|
if (!(!_ || !o.current))
|
|
758
760
|
return l.current && l.current.cancel(), _.page.getTextContent().then((b) => {
|
|
759
761
|
const v = _.page.getViewport({ scale: 1 });
|
|
760
|
-
return l.current = new
|
|
762
|
+
return l.current = new Ct.TextLayer({
|
|
761
763
|
viewport: v,
|
|
762
764
|
textContentSource: b,
|
|
763
765
|
container: o.current
|
|
@@ -774,7 +776,7 @@ const ho = () => {
|
|
|
774
776
|
var b;
|
|
775
777
|
(b = l.current) == null || b.cancel();
|
|
776
778
|
};
|
|
777
|
-
}, [
|
|
779
|
+
}, [r, e]), O(() => {
|
|
778
780
|
var v;
|
|
779
781
|
[].slice.call(o.current.children).forEach((w) => {
|
|
780
782
|
w.classList.add(st["rp-text-layer-text"]);
|
|
@@ -794,22 +796,22 @@ const ho = () => {
|
|
|
794
796
|
};
|
|
795
797
|
let wo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
796
798
|
const bo = (t) => {
|
|
797
|
-
const { pageNumber: e } = t,
|
|
799
|
+
const { pageNumber: e } = t, r = W(null), { pages: o, pdf: n } = X(), a = W(), [c, s] = $(), { setFocusedPage: u, goToPage: l } = ce(), { scrollMode: d } = Oe(), { print: f } = et(), { download: h } = Hr(), g = k(() => o.get(e), [o, e]), _ = k(() => g == null ? void 0 : g.page.getViewport(), [g]);
|
|
798
800
|
O(() => {
|
|
799
801
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
800
|
-
}, [
|
|
802
|
+
}, [n]), O(() => {
|
|
801
803
|
g && g.page.getAnnotations().then((v) => {
|
|
802
|
-
a.current = void 0, s(v),
|
|
804
|
+
a.current = void 0, s(v), r.current && (r.current.innerText = "");
|
|
803
805
|
});
|
|
804
806
|
}, [g]);
|
|
805
807
|
const b = x(
|
|
806
808
|
(v) => {
|
|
807
|
-
!c || !
|
|
809
|
+
!c || !n || (xn(v), Rn(v, n, c).then((w) => {
|
|
808
810
|
var m, T;
|
|
809
811
|
((m = w == null ? void 0 : w.data) == null ? void 0 : m.action) === "Print" ? f() : ((T = w == null ? void 0 : w.data) == null ? void 0 : T.action) === "SaveAs" && h();
|
|
810
|
-
}), d === K.PAGE_SCROLLING ?
|
|
812
|
+
}), d === K.PAGE_SCROLLING ? At(v, c, n, (w) => u(w.pageIndex + 1)) : At(v, c, n, (w) => l(w.pageIndex + 1)));
|
|
811
813
|
},
|
|
812
|
-
[
|
|
814
|
+
[n, c, l, u, d, f, h]
|
|
813
815
|
);
|
|
814
816
|
return O(() => {
|
|
815
817
|
if (!g || !c)
|
|
@@ -825,97 +827,97 @@ const bo = (t) => {
|
|
|
825
827
|
for (const I of c) {
|
|
826
828
|
const { annotationType: p } = I;
|
|
827
829
|
switch (p) {
|
|
828
|
-
case
|
|
829
|
-
|
|
830
|
+
case zt.Link:
|
|
831
|
+
Nn(I);
|
|
830
832
|
break;
|
|
831
|
-
case
|
|
832
|
-
|
|
833
|
+
case zt.Widget:
|
|
834
|
+
Ln(I, v, w);
|
|
833
835
|
break;
|
|
834
836
|
}
|
|
835
837
|
}
|
|
836
838
|
const m = new AbortController();
|
|
837
839
|
return (async () => {
|
|
838
|
-
a.current && (a.current.div.replaceChildren(), a.current = void 0),
|
|
839
|
-
div:
|
|
840
|
+
a.current && (a.current.div.replaceChildren(), a.current = void 0), r.current && (r.current.innerText = ""), a.current = new fn({
|
|
841
|
+
div: r.current,
|
|
840
842
|
accessibilityManager: void 0,
|
|
841
843
|
annotationCanvasMap: void 0,
|
|
842
844
|
annotationEditorUIManager: void 0,
|
|
843
845
|
structTreeLayer: null,
|
|
844
846
|
page: g.page,
|
|
845
847
|
viewport: v.clone({ dontFlip: !0 })
|
|
846
|
-
}),
|
|
847
|
-
const I = await (
|
|
848
|
+
}), r.current && Ft(r.current, b);
|
|
849
|
+
const I = await (n == null ? void 0 : n.hasJSActions()), p = await (n == null ? void 0 : n.getFieldObjects());
|
|
848
850
|
if (m.signal.aborted)
|
|
849
851
|
throw "abort";
|
|
850
852
|
return a.current.render({
|
|
851
853
|
annotations: c,
|
|
852
|
-
annotationStorage:
|
|
854
|
+
annotationStorage: n == null ? void 0 : n.annotationStorage,
|
|
853
855
|
hasJSActions: I,
|
|
854
856
|
fieldObjects: p,
|
|
855
|
-
div:
|
|
857
|
+
div: r.current,
|
|
856
858
|
viewport: v.clone({ dontFlip: !0 }),
|
|
857
859
|
page: g.page,
|
|
858
860
|
imageResourcesPath: wo,
|
|
859
861
|
renderForms: !0,
|
|
860
|
-
linkService: new
|
|
862
|
+
linkService: new yn(),
|
|
861
863
|
downloadManager: null,
|
|
862
864
|
enableScripting: !1
|
|
863
865
|
});
|
|
864
866
|
})().then(() => {
|
|
865
|
-
|
|
867
|
+
r.current && En(r.current, b);
|
|
866
868
|
}).catch((I) => {
|
|
867
869
|
if (I !== "abort")
|
|
868
870
|
throw I;
|
|
869
871
|
}), () => {
|
|
870
|
-
m.abort("clear"),
|
|
872
|
+
m.abort("clear"), r.current && Ft(r.current, b);
|
|
871
873
|
};
|
|
872
|
-
}, [
|
|
874
|
+
}, [n, c, b]), /* @__PURE__ */ i(
|
|
873
875
|
"div",
|
|
874
876
|
{
|
|
875
877
|
"data-rp": `page-${e}-annotationLayer`,
|
|
876
878
|
style: { width: `${_ == null ? void 0 : _.width}px`, height: `${_ == null ? void 0 : _.height}px` },
|
|
877
879
|
className: _o["rp-annotation-layer"],
|
|
878
|
-
ref:
|
|
880
|
+
ref: r
|
|
879
881
|
}
|
|
880
882
|
);
|
|
881
883
|
}, ct = {
|
|
882
884
|
"rp-text-highlight-layer": "_rp-text-highlight-layer_1470i_1",
|
|
883
885
|
"rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1470i_9"
|
|
884
886
|
}, Co = ({ pageNumber: t }) => {
|
|
885
|
-
const e = W(null),
|
|
887
|
+
const e = W(null), r = W(), o = W(), { pages: n } = X(), { highlightMatches: a } = gn(), c = k(() => a.filter((l) => l.pageIndex === t - 1), [a]), s = x(
|
|
886
888
|
(u, l, d = !1) => {
|
|
887
|
-
d &&
|
|
889
|
+
d && lr(u, l), dn(c, u, l);
|
|
888
890
|
},
|
|
889
|
-
[c,
|
|
891
|
+
[c, n, t]
|
|
890
892
|
);
|
|
891
893
|
return O(() => {
|
|
892
|
-
const u =
|
|
894
|
+
const u = n.get(t);
|
|
893
895
|
if (!(!u || !e.current))
|
|
894
|
-
return
|
|
896
|
+
return r.current && r.current.cancel(), u.page.getTextContent().then((l) => {
|
|
895
897
|
const d = u.page.getViewport({ scale: 1 });
|
|
896
|
-
return
|
|
898
|
+
return r.current = new Ct.TextLayer({
|
|
897
899
|
viewport: d,
|
|
898
900
|
textContentSource: l,
|
|
899
901
|
container: e.current
|
|
900
|
-
}), o.current = l, e.current && (e.current.innerText = ""),
|
|
902
|
+
}), o.current = l, e.current && (e.current.innerText = ""), r.current.render();
|
|
901
903
|
}).then(() => {
|
|
902
904
|
var f;
|
|
903
905
|
[].slice.call(e.current.children).forEach((h) => {
|
|
904
906
|
h.classList.add(ct["rp-text-highlight-layer-text"]);
|
|
905
907
|
});
|
|
906
|
-
const d = (f =
|
|
908
|
+
const d = (f = r.current) == null ? void 0 : f.textDivs;
|
|
907
909
|
d && o.current && s(o.current, d);
|
|
908
910
|
}).catch(() => {
|
|
909
911
|
}), () => {
|
|
910
912
|
var l;
|
|
911
|
-
(l =
|
|
913
|
+
(l = r.current) == null || l.cancel();
|
|
912
914
|
};
|
|
913
|
-
}, [
|
|
915
|
+
}, [n, t]), O(() => {
|
|
914
916
|
var d;
|
|
915
917
|
[].slice.call(e.current.children).forEach((f) => {
|
|
916
918
|
f.classList.add(ct["rp-text-highlight-layer-text"]);
|
|
917
919
|
});
|
|
918
|
-
const l = (d =
|
|
920
|
+
const l = (d = r.current) == null ? void 0 : d.textDivs;
|
|
919
921
|
l && o.current && s(o.current, l, !0);
|
|
920
922
|
}, [s]), /* @__PURE__ */ i(Ie, { children: /* @__PURE__ */ i(
|
|
921
923
|
"div",
|
|
@@ -925,17 +927,17 @@ const bo = (t) => {
|
|
|
925
927
|
ref: e
|
|
926
928
|
}
|
|
927
929
|
) });
|
|
928
|
-
}, To = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))),
|
|
929
|
-
const { pageNumber:
|
|
930
|
+
}, To = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))), xt = Be((t, e) => {
|
|
931
|
+
const { pageNumber: r, style: o, onIntersectRatioChange: n, ...a } = t, { pages: c } = X(), { rotate: s } = Ke(), { textLayer: u } = an(), { currentZoom: l } = Xe(), d = W(c.get(r)), [f, h] = $(!1), g = W(null), [_, b] = $({
|
|
930
932
|
width: 0,
|
|
931
933
|
height: 0
|
|
932
934
|
});
|
|
933
|
-
|
|
934
|
-
if (c && (d.current = c.get(
|
|
935
|
+
ir(e, () => g.current), O(() => {
|
|
936
|
+
if (c && (d.current = c.get(r), d.current)) {
|
|
935
937
|
const T = d.current.page.getViewport({ scale: l, rotation: s });
|
|
936
938
|
b(T);
|
|
937
939
|
}
|
|
938
|
-
}, [c,
|
|
940
|
+
}, [c, r, s, l]);
|
|
939
941
|
const v = k(() => {
|
|
940
942
|
switch (s) {
|
|
941
943
|
case 90:
|
|
@@ -954,19 +956,19 @@ const bo = (t) => {
|
|
|
954
956
|
return O(() => {
|
|
955
957
|
const T = new IntersectionObserver(
|
|
956
958
|
(I) => {
|
|
957
|
-
r
|
|
959
|
+
n(r, I[0].intersectionRatio);
|
|
958
960
|
},
|
|
959
961
|
{ threshold: To }
|
|
960
962
|
);
|
|
961
963
|
return g.current && T.observe(g.current), () => {
|
|
962
|
-
T.disconnect(), r
|
|
964
|
+
T.disconnect(), n(r, -1);
|
|
963
965
|
};
|
|
964
|
-
}, [
|
|
966
|
+
}, [n, r, s, _]), /* @__PURE__ */ i(
|
|
965
967
|
"div",
|
|
966
968
|
{
|
|
967
969
|
ref: g,
|
|
968
|
-
id: `page-${
|
|
969
|
-
"data-rp": `page-${
|
|
970
|
+
id: `page-${r}`,
|
|
971
|
+
"data-rp": `page-${r}`,
|
|
970
972
|
...a,
|
|
971
973
|
style: {
|
|
972
974
|
...o,
|
|
@@ -984,127 +986,117 @@ const bo = (t) => {
|
|
|
984
986
|
},
|
|
985
987
|
className: at["rp-page"],
|
|
986
988
|
children: [
|
|
987
|
-
/* @__PURE__ */ i(go, { onLoading: w, onLoaded: m, pageNumber:
|
|
988
|
-
f && /* @__PURE__ */ i("div", { className: at["rp-loader-wrapper"], children: /* @__PURE__ */ i(
|
|
989
|
-
u && /* @__PURE__ */ i(vo, { pageNumber:
|
|
990
|
-
/* @__PURE__ */ i(Co, { pageNumber:
|
|
991
|
-
/* @__PURE__ */ i(bo, { pageNumber:
|
|
989
|
+
/* @__PURE__ */ i(go, { onLoading: w, onLoaded: m, pageNumber: r }),
|
|
990
|
+
f && /* @__PURE__ */ i("div", { className: at["rp-loader-wrapper"], children: /* @__PURE__ */ i(Pt, {}) }),
|
|
991
|
+
u && /* @__PURE__ */ i(vo, { pageNumber: r }),
|
|
992
|
+
/* @__PURE__ */ i(Co, { pageNumber: r }),
|
|
993
|
+
/* @__PURE__ */ i(bo, { pageNumber: r })
|
|
992
994
|
]
|
|
993
995
|
}
|
|
994
996
|
)
|
|
995
997
|
}
|
|
996
998
|
);
|
|
997
999
|
});
|
|
998
|
-
function
|
|
999
|
-
return _t = Object.assign ? Object.assign.bind() : function(t) {
|
|
1000
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1001
|
-
var n = arguments[e];
|
|
1002
|
-
for (var o in n)
|
|
1003
|
-
({}).hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
1004
|
-
}
|
|
1005
|
-
return t;
|
|
1006
|
-
}, _t.apply(null, arguments);
|
|
1007
|
-
}
|
|
1008
|
-
function Ut(t) {
|
|
1000
|
+
function Vt(t) {
|
|
1009
1001
|
if (t === void 0)
|
|
1010
1002
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1011
1003
|
return t;
|
|
1012
1004
|
}
|
|
1013
|
-
function
|
|
1014
|
-
return
|
|
1015
|
-
return
|
|
1016
|
-
},
|
|
1005
|
+
function _t(t, e) {
|
|
1006
|
+
return _t = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1007
|
+
return r.__proto__ = o, r;
|
|
1008
|
+
}, _t(t, e);
|
|
1017
1009
|
}
|
|
1018
1010
|
function Po(t, e) {
|
|
1019
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t,
|
|
1011
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, _t(t, e);
|
|
1020
1012
|
}
|
|
1021
|
-
var
|
|
1013
|
+
var Ut = Number.isNaN || function(e) {
|
|
1022
1014
|
return typeof e == "number" && e !== e;
|
|
1023
1015
|
};
|
|
1024
1016
|
function So(t, e) {
|
|
1025
|
-
return !!(t === e ||
|
|
1017
|
+
return !!(t === e || Ut(t) && Ut(e));
|
|
1026
1018
|
}
|
|
1027
1019
|
function Io(t, e) {
|
|
1028
1020
|
if (t.length !== e.length)
|
|
1029
1021
|
return !1;
|
|
1030
|
-
for (var
|
|
1031
|
-
if (!So(t[
|
|
1022
|
+
for (var r = 0; r < t.length; r++)
|
|
1023
|
+
if (!So(t[r], e[r]))
|
|
1032
1024
|
return !1;
|
|
1033
1025
|
return !0;
|
|
1034
1026
|
}
|
|
1035
1027
|
function lt(t, e) {
|
|
1036
1028
|
e === void 0 && (e = Io);
|
|
1037
|
-
var
|
|
1029
|
+
var r, o = [], n, a = !1;
|
|
1038
1030
|
function c() {
|
|
1039
1031
|
for (var s = [], u = 0; u < arguments.length; u++)
|
|
1040
1032
|
s[u] = arguments[u];
|
|
1041
|
-
return a &&
|
|
1033
|
+
return a && r === this && e(s, o) || (n = t.apply(this, s), a = !0, r = this, o = s), n;
|
|
1042
1034
|
}
|
|
1043
1035
|
return c;
|
|
1044
1036
|
}
|
|
1045
|
-
function
|
|
1037
|
+
function qt(t, e) {
|
|
1046
1038
|
if (t == null)
|
|
1047
1039
|
return {};
|
|
1048
|
-
var
|
|
1040
|
+
var r = {};
|
|
1049
1041
|
for (var o in t)
|
|
1050
1042
|
if ({}.hasOwnProperty.call(t, o)) {
|
|
1051
1043
|
if (e.indexOf(o) !== -1)
|
|
1052
1044
|
continue;
|
|
1053
|
-
|
|
1045
|
+
r[o] = t[o];
|
|
1054
1046
|
}
|
|
1055
|
-
return
|
|
1047
|
+
return r;
|
|
1056
1048
|
}
|
|
1057
|
-
var yo = typeof performance == "object" && typeof performance.now == "function",
|
|
1049
|
+
var yo = typeof performance == "object" && typeof performance.now == "function", Zt = yo ? function() {
|
|
1058
1050
|
return performance.now();
|
|
1059
1051
|
} : function() {
|
|
1060
1052
|
return Date.now();
|
|
1061
1053
|
};
|
|
1062
|
-
function
|
|
1054
|
+
function jt(t) {
|
|
1063
1055
|
cancelAnimationFrame(t.id);
|
|
1064
1056
|
}
|
|
1065
1057
|
function xo(t, e) {
|
|
1066
|
-
var
|
|
1058
|
+
var r = Zt();
|
|
1067
1059
|
function o() {
|
|
1068
|
-
|
|
1060
|
+
Zt() - r >= e ? t.call(null) : n.id = requestAnimationFrame(o);
|
|
1069
1061
|
}
|
|
1070
|
-
var
|
|
1062
|
+
var n = {
|
|
1071
1063
|
id: requestAnimationFrame(o)
|
|
1072
1064
|
};
|
|
1073
|
-
return
|
|
1065
|
+
return n;
|
|
1074
1066
|
}
|
|
1075
1067
|
var ut = -1;
|
|
1076
1068
|
function Ro(t) {
|
|
1077
1069
|
if (t === void 0 && (t = !1), ut === -1 || t) {
|
|
1078
|
-
var e = document.createElement("div"),
|
|
1079
|
-
|
|
1070
|
+
var e = document.createElement("div"), r = e.style;
|
|
1071
|
+
r.width = "50px", r.height = "50px", r.overflow = "scroll", document.body.appendChild(e), ut = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
1080
1072
|
}
|
|
1081
1073
|
return ut;
|
|
1082
1074
|
}
|
|
1083
1075
|
var Le = null;
|
|
1084
|
-
function
|
|
1076
|
+
function Bt(t) {
|
|
1085
1077
|
if (t === void 0 && (t = !1), Le === null || t) {
|
|
1086
|
-
var e = document.createElement("div"),
|
|
1087
|
-
|
|
1088
|
-
var o = document.createElement("div"),
|
|
1089
|
-
return
|
|
1078
|
+
var e = document.createElement("div"), r = e.style;
|
|
1079
|
+
r.width = "50px", r.height = "50px", r.overflow = "scroll", r.direction = "rtl";
|
|
1080
|
+
var o = document.createElement("div"), n = o.style;
|
|
1081
|
+
return n.width = "100px", n.height = "100px", e.appendChild(o), document.body.appendChild(e), e.scrollLeft > 0 ? Le = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? Le = "negative" : Le = "positive-ascending"), document.body.removeChild(e), Le;
|
|
1090
1082
|
}
|
|
1091
1083
|
return Le;
|
|
1092
1084
|
}
|
|
1093
1085
|
var Lo = 150, No = function(e) {
|
|
1094
|
-
var
|
|
1086
|
+
var r = e.columnIndex;
|
|
1095
1087
|
e.data;
|
|
1096
1088
|
var o = e.rowIndex;
|
|
1097
|
-
return o + ":" +
|
|
1089
|
+
return o + ":" + r;
|
|
1098
1090
|
}, He = null, $e = null, Ge = null;
|
|
1099
1091
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (He = /* @__PURE__ */ new WeakSet(), $e = /* @__PURE__ */ new WeakSet(), Ge = /* @__PURE__ */ new WeakSet());
|
|
1100
1092
|
function Eo(t) {
|
|
1101
|
-
var e,
|
|
1093
|
+
var e, r = t.getColumnOffset, o = t.getColumnStartIndexForOffset, n = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, c = t.getEstimatedTotalHeight, s = t.getEstimatedTotalWidth, u = t.getOffsetForColumnAndAlignment, l = t.getOffsetForRowAndAlignment, d = t.getRowHeight, f = t.getRowOffset, h = t.getRowStartIndexForOffset, g = t.getRowStopIndexForStartIndex, _ = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, v = t.validateProps;
|
|
1102
1094
|
return e = /* @__PURE__ */ function(w) {
|
|
1103
1095
|
Po(m, w);
|
|
1104
1096
|
function m(I) {
|
|
1105
1097
|
var p;
|
|
1106
|
-
return p = w.call(this, I) || this, p._instanceProps = _(p.props,
|
|
1107
|
-
instance:
|
|
1098
|
+
return p = w.call(this, I) || this, p._instanceProps = _(p.props, Vt(p)), p._resetIsScrollingTimeoutId = null, p._outerRef = void 0, p.state = {
|
|
1099
|
+
instance: Vt(p),
|
|
1108
1100
|
isScrolling: !1,
|
|
1109
1101
|
horizontalScrollDirection: "forward",
|
|
1110
1102
|
scrollLeft: typeof p.props.initialScrollLeft == "number" ? p.props.initialScrollLeft : 0,
|
|
@@ -1135,7 +1127,7 @@ function Eo(t) {
|
|
|
1135
1127
|
if (L.hasOwnProperty(F))
|
|
1136
1128
|
E = L[F];
|
|
1137
1129
|
else {
|
|
1138
|
-
var y =
|
|
1130
|
+
var y = r(p.props, C, p._instanceProps), N = R === "rtl";
|
|
1139
1131
|
L[F] = E = {
|
|
1140
1132
|
position: "absolute",
|
|
1141
1133
|
left: N ? void 0 : y,
|
|
@@ -1155,7 +1147,7 @@ function Eo(t) {
|
|
|
1155
1147
|
return null;
|
|
1156
1148
|
var y = p.props.direction, N = R;
|
|
1157
1149
|
if (y === "rtl")
|
|
1158
|
-
switch (
|
|
1150
|
+
switch (Bt()) {
|
|
1159
1151
|
case "negative":
|
|
1160
1152
|
N = -R;
|
|
1161
1153
|
break;
|
|
@@ -1178,7 +1170,7 @@ function Eo(t) {
|
|
|
1178
1170
|
var C = p.props.outerRef;
|
|
1179
1171
|
p._outerRef = P, typeof C == "function" ? C(P) : C != null && typeof C == "object" && C.hasOwnProperty("current") && (C.current = P);
|
|
1180
1172
|
}, p._resetIsScrollingDebounced = function() {
|
|
1181
|
-
p._resetIsScrollingTimeoutId !== null &&
|
|
1173
|
+
p._resetIsScrollingTimeoutId !== null && jt(p._resetIsScrollingTimeoutId), p._resetIsScrollingTimeoutId = xo(p._resetIsScrolling, Lo);
|
|
1182
1174
|
}, p._resetIsScrolling = function() {
|
|
1183
1175
|
p._resetIsScrollingTimeoutId = null, p.setState({
|
|
1184
1176
|
isScrolling: !1
|
|
@@ -1222,7 +1214,7 @@ function Eo(t) {
|
|
|
1222
1214
|
if (A && this._outerRef != null) {
|
|
1223
1215
|
var R = this._outerRef;
|
|
1224
1216
|
if (p === "rtl")
|
|
1225
|
-
switch (
|
|
1217
|
+
switch (Bt()) {
|
|
1226
1218
|
case "negative":
|
|
1227
1219
|
R.scrollLeft = -C;
|
|
1228
1220
|
break;
|
|
@@ -1240,9 +1232,9 @@ function Eo(t) {
|
|
|
1240
1232
|
}
|
|
1241
1233
|
this._callPropsCallbacks();
|
|
1242
1234
|
}, T.componentWillUnmount = function() {
|
|
1243
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1235
|
+
this._resetIsScrollingTimeoutId !== null && jt(this._resetIsScrollingTimeoutId);
|
|
1244
1236
|
}, T.render = function() {
|
|
1245
|
-
var p = this.props, P = p.children, C = p.className, S = p.columnCount, A = p.direction, R = p.height, D = p.innerRef, L = p.innerElementType, F = p.innerTagName, E = p.itemData, y = p.itemKey, N = y === void 0 ? No : y, G = p.outerElementType, U = p.outerTagName, Z = p.rowCount, ee = p.style, j = p.useIsScrolling, J = p.width, ae = this.state.isScrolling,
|
|
1237
|
+
var p = this.props, P = p.children, C = p.className, S = p.columnCount, A = p.direction, R = p.height, D = p.innerRef, L = p.innerElementType, F = p.innerTagName, E = p.itemData, y = p.itemKey, N = y === void 0 ? No : y, G = p.outerElementType, U = p.outerTagName, Z = p.rowCount, ee = p.style, j = p.useIsScrolling, J = p.width, ae = this.state.isScrolling, re = this._getHorizontalRangeToRender(), B = re[0], Y = re[1], ue = this._getVerticalRangeToRender(), be = ue[0], De = ue[1], de = [];
|
|
1246
1238
|
if (S > 0 && Z)
|
|
1247
1239
|
for (var pe = be; pe <= De; pe++)
|
|
1248
1240
|
for (var ge = B; ge <= Y; ge++)
|
|
@@ -1263,7 +1255,7 @@ function Eo(t) {
|
|
|
1263
1255
|
className: C,
|
|
1264
1256
|
onScroll: this._onScroll,
|
|
1265
1257
|
ref: this._outerRefSetter,
|
|
1266
|
-
style:
|
|
1258
|
+
style: Dn({
|
|
1267
1259
|
position: "relative",
|
|
1268
1260
|
height: R,
|
|
1269
1261
|
width: J,
|
|
@@ -1288,14 +1280,14 @@ function Eo(t) {
|
|
|
1288
1280
|
this._callOnItemsRendered(D, L, N, G, F, E, U, Z);
|
|
1289
1281
|
}
|
|
1290
1282
|
if (typeof S == "function") {
|
|
1291
|
-
var ee = this.state, j = ee.horizontalScrollDirection, J = ee.scrollLeft, ae = ee.scrollTop,
|
|
1292
|
-
this._callOnScroll(J, ae, j, B,
|
|
1283
|
+
var ee = this.state, j = ee.horizontalScrollDirection, J = ee.scrollLeft, ae = ee.scrollTop, re = ee.scrollUpdateWasRequested, B = ee.verticalScrollDirection;
|
|
1284
|
+
this._callOnScroll(J, ae, j, B, re);
|
|
1293
1285
|
}
|
|
1294
1286
|
}, T._getHorizontalRangeToRender = function() {
|
|
1295
1287
|
var p = this.props, P = p.columnCount, C = p.overscanColumnCount, S = p.overscanColumnsCount, A = p.overscanCount, R = p.rowCount, D = this.state, L = D.horizontalScrollDirection, F = D.isScrolling, E = D.scrollLeft, y = C || S || A || 1;
|
|
1296
1288
|
if (P === 0 || R === 0)
|
|
1297
1289
|
return [0, 0, 0, 0];
|
|
1298
|
-
var N = o(this.props, E, this._instanceProps), G =
|
|
1290
|
+
var N = o(this.props, E, this._instanceProps), G = n(this.props, N, E, this._instanceProps), U = !F || L === "backward" ? Math.max(1, y) : 1, Z = !F || L === "forward" ? Math.max(1, y) : 1;
|
|
1299
1291
|
return [Math.max(0, N - U), Math.max(0, Math.min(P - 1, G + Z)), N, G];
|
|
1300
1292
|
}, T._getVerticalRangeToRender = function() {
|
|
1301
1293
|
var p = this.props, P = p.columnCount, C = p.overscanCount, S = p.overscanRowCount, A = p.overscanRowsCount, R = p.rowCount, D = this.state, L = D.isScrolling, F = D.verticalScrollDirection, E = D.scrollTop, y = S || A || C || 1;
|
|
@@ -1304,48 +1296,48 @@ function Eo(t) {
|
|
|
1304
1296
|
var N = h(this.props, E, this._instanceProps), G = g(this.props, N, E, this._instanceProps), U = !L || F === "backward" ? Math.max(1, y) : 1, Z = !L || F === "forward" ? Math.max(1, y) : 1;
|
|
1305
1297
|
return [Math.max(0, N - U), Math.max(0, Math.min(R - 1, G + Z)), N, G];
|
|
1306
1298
|
}, m;
|
|
1307
|
-
}(
|
|
1299
|
+
}(tn), e.defaultProps = {
|
|
1308
1300
|
direction: "ltr",
|
|
1309
1301
|
itemData: void 0,
|
|
1310
1302
|
useIsScrolling: !1
|
|
1311
1303
|
}, e;
|
|
1312
1304
|
}
|
|
1313
|
-
var Oo = function(e,
|
|
1314
|
-
var o = e.children,
|
|
1305
|
+
var Oo = function(e, r) {
|
|
1306
|
+
var o = e.children, n = e.direction, a = e.height, c = e.innerTagName, s = e.outerTagName, u = e.overscanColumnsCount, l = e.overscanCount, d = e.overscanRowsCount, f = e.width, h = r.instance;
|
|
1315
1307
|
if (process.env.NODE_ENV !== "production") {
|
|
1316
1308
|
if (typeof l == "number" && He && !He.has(h) && (He.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof d == "number") && $e && !$e.has(h) && ($e.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && Ge && !Ge.has(h) && (Ge.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1317
1309
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1318
|
-
switch (
|
|
1310
|
+
switch (n) {
|
|
1319
1311
|
case "ltr":
|
|
1320
1312
|
case "rtl":
|
|
1321
1313
|
break;
|
|
1322
1314
|
default:
|
|
1323
|
-
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' +
|
|
1315
|
+
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + n + '" was specified.'));
|
|
1324
1316
|
}
|
|
1325
1317
|
if (typeof f != "number")
|
|
1326
1318
|
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (f === null ? "null" : typeof f) + '" was specified.'));
|
|
1327
1319
|
if (typeof a != "number")
|
|
1328
1320
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1329
1321
|
}
|
|
1330
|
-
},
|
|
1331
|
-
var o = e.rowCount,
|
|
1322
|
+
}, Kt = 50, Pr = function(e, r) {
|
|
1323
|
+
var o = e.rowCount, n = r.rowMetadataMap, a = r.estimatedRowHeight, c = r.lastMeasuredRowIndex, s = 0;
|
|
1332
1324
|
if (c >= o && (c = o - 1), c >= 0) {
|
|
1333
|
-
var u =
|
|
1325
|
+
var u = n[c];
|
|
1334
1326
|
s = u.offset + u.size;
|
|
1335
1327
|
}
|
|
1336
1328
|
var l = o - c - 1, d = l * a;
|
|
1337
1329
|
return s + d;
|
|
1338
|
-
},
|
|
1339
|
-
var o = e.columnCount,
|
|
1330
|
+
}, Sr = function(e, r) {
|
|
1331
|
+
var o = e.columnCount, n = r.columnMetadataMap, a = r.estimatedColumnWidth, c = r.lastMeasuredColumnIndex, s = 0;
|
|
1340
1332
|
if (c >= o && (c = o - 1), c >= 0) {
|
|
1341
|
-
var u =
|
|
1333
|
+
var u = n[c];
|
|
1342
1334
|
s = u.offset + u.size;
|
|
1343
1335
|
}
|
|
1344
1336
|
var l = o - c - 1, d = l * a;
|
|
1345
1337
|
return s + d;
|
|
1346
|
-
}, ve = function(e,
|
|
1338
|
+
}, ve = function(e, r, o, n) {
|
|
1347
1339
|
var a, c, s;
|
|
1348
|
-
if (e === "column" ? (a =
|
|
1340
|
+
if (e === "column" ? (a = n.columnMetadataMap, c = r.columnWidth, s = n.lastMeasuredColumnIndex) : (a = n.rowMetadataMap, c = r.rowHeight, s = n.lastMeasuredRowIndex), o > s) {
|
|
1349
1341
|
var u = 0;
|
|
1350
1342
|
if (s >= 0) {
|
|
1351
1343
|
var l = a[s];
|
|
@@ -1358,29 +1350,29 @@ var Oo = function(e, n) {
|
|
|
1358
1350
|
size: f
|
|
1359
1351
|
}, u += f;
|
|
1360
1352
|
}
|
|
1361
|
-
e === "column" ?
|
|
1353
|
+
e === "column" ? n.lastMeasuredColumnIndex = o : n.lastMeasuredRowIndex = o;
|
|
1362
1354
|
}
|
|
1363
1355
|
return a[o];
|
|
1364
|
-
},
|
|
1356
|
+
}, Xt = function(e, r, o, n) {
|
|
1365
1357
|
var a, c;
|
|
1366
1358
|
e === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
|
|
1367
1359
|
var s = c > 0 ? a[c].offset : 0;
|
|
1368
|
-
return s >=
|
|
1369
|
-
},
|
|
1370
|
-
for (; a <=
|
|
1371
|
-
var s = a + Math.floor((
|
|
1360
|
+
return s >= n ? Ir(e, r, o, c, 0, n) : Do(e, r, o, Math.max(0, c), n);
|
|
1361
|
+
}, Ir = function(e, r, o, n, a, c) {
|
|
1362
|
+
for (; a <= n; ) {
|
|
1363
|
+
var s = a + Math.floor((n - a) / 2), u = ve(e, r, s, o).offset;
|
|
1372
1364
|
if (u === c)
|
|
1373
1365
|
return s;
|
|
1374
|
-
u < c ? a = s + 1 : u > c && (
|
|
1366
|
+
u < c ? a = s + 1 : u > c && (n = s - 1);
|
|
1375
1367
|
}
|
|
1376
1368
|
return a > 0 ? a - 1 : 0;
|
|
1377
|
-
}, Do = function(e,
|
|
1378
|
-
for (var c = e === "column" ?
|
|
1379
|
-
|
|
1380
|
-
return
|
|
1381
|
-
},
|
|
1382
|
-
var u = e === "column" ?
|
|
1383
|
-
switch (
|
|
1369
|
+
}, Do = function(e, r, o, n, a) {
|
|
1370
|
+
for (var c = e === "column" ? r.columnCount : r.rowCount, s = 1; n < c && ve(e, r, n, o).offset < a; )
|
|
1371
|
+
n += s, s *= 2;
|
|
1372
|
+
return Ir(e, r, o, Math.min(n, c - 1), Math.floor(n / 2), a);
|
|
1373
|
+
}, Jt = function(e, r, o, n, a, c, s) {
|
|
1374
|
+
var u = e === "column" ? r.width : r.height, l = ve(e, r, o, c), d = e === "column" ? Sr(r, c) : Pr(r, c), f = Math.max(0, Math.min(d - u, l.offset)), h = Math.max(0, l.offset - u + s + l.size);
|
|
1375
|
+
switch (n === "smart" && (a >= h - u && a <= f + u ? n = "auto" : n = "center"), n) {
|
|
1384
1376
|
case "start":
|
|
1385
1377
|
return f;
|
|
1386
1378
|
case "end":
|
|
@@ -1392,81 +1384,81 @@ var Oo = function(e, n) {
|
|
|
1392
1384
|
return a >= h && a <= f ? a : h > f || a < h ? h : f;
|
|
1393
1385
|
}
|
|
1394
1386
|
}, zo = /* @__PURE__ */ Eo({
|
|
1395
|
-
getColumnOffset: function(e,
|
|
1396
|
-
return ve("column", e,
|
|
1387
|
+
getColumnOffset: function(e, r, o) {
|
|
1388
|
+
return ve("column", e, r, o).offset;
|
|
1397
1389
|
},
|
|
1398
|
-
getColumnStartIndexForOffset: function(e,
|
|
1399
|
-
return
|
|
1390
|
+
getColumnStartIndexForOffset: function(e, r, o) {
|
|
1391
|
+
return Xt("column", e, o, r);
|
|
1400
1392
|
},
|
|
1401
|
-
getColumnStopIndexForStartIndex: function(e,
|
|
1402
|
-
for (var a = e.columnCount, c = e.width, s = ve("column", e,
|
|
1403
|
-
d++, l += ve("column", e, d,
|
|
1393
|
+
getColumnStopIndexForStartIndex: function(e, r, o, n) {
|
|
1394
|
+
for (var a = e.columnCount, c = e.width, s = ve("column", e, r, n), u = o + c, l = s.offset + s.size, d = r; d < a - 1 && l < u; )
|
|
1395
|
+
d++, l += ve("column", e, d, n).size;
|
|
1404
1396
|
return d;
|
|
1405
1397
|
},
|
|
1406
|
-
getColumnWidth: function(e,
|
|
1407
|
-
return o.columnMetadataMap[
|
|
1398
|
+
getColumnWidth: function(e, r, o) {
|
|
1399
|
+
return o.columnMetadataMap[r].size;
|
|
1408
1400
|
},
|
|
1409
|
-
getEstimatedTotalHeight:
|
|
1410
|
-
getEstimatedTotalWidth:
|
|
1411
|
-
getOffsetForColumnAndAlignment: function(e,
|
|
1412
|
-
return
|
|
1401
|
+
getEstimatedTotalHeight: Pr,
|
|
1402
|
+
getEstimatedTotalWidth: Sr,
|
|
1403
|
+
getOffsetForColumnAndAlignment: function(e, r, o, n, a, c) {
|
|
1404
|
+
return Jt("column", e, r, o, n, a, c);
|
|
1413
1405
|
},
|
|
1414
|
-
getOffsetForRowAndAlignment: function(e,
|
|
1415
|
-
return
|
|
1406
|
+
getOffsetForRowAndAlignment: function(e, r, o, n, a, c) {
|
|
1407
|
+
return Jt("row", e, r, o, n, a, c);
|
|
1416
1408
|
},
|
|
1417
|
-
getRowOffset: function(e,
|
|
1418
|
-
return ve("row", e,
|
|
1409
|
+
getRowOffset: function(e, r, o) {
|
|
1410
|
+
return ve("row", e, r, o).offset;
|
|
1419
1411
|
},
|
|
1420
|
-
getRowHeight: function(e,
|
|
1421
|
-
return o.rowMetadataMap[
|
|
1412
|
+
getRowHeight: function(e, r, o) {
|
|
1413
|
+
return o.rowMetadataMap[r].size;
|
|
1422
1414
|
},
|
|
1423
|
-
getRowStartIndexForOffset: function(e,
|
|
1424
|
-
return
|
|
1415
|
+
getRowStartIndexForOffset: function(e, r, o) {
|
|
1416
|
+
return Xt("row", e, o, r);
|
|
1425
1417
|
},
|
|
1426
|
-
getRowStopIndexForStartIndex: function(e,
|
|
1427
|
-
for (var a = e.rowCount, c = e.height, s = ve("row", e,
|
|
1428
|
-
d++, l += ve("row", e, d,
|
|
1418
|
+
getRowStopIndexForStartIndex: function(e, r, o, n) {
|
|
1419
|
+
for (var a = e.rowCount, c = e.height, s = ve("row", e, r, n), u = o + c, l = s.offset + s.size, d = r; d < a - 1 && l < u; )
|
|
1420
|
+
d++, l += ve("row", e, d, n).size;
|
|
1429
1421
|
return d;
|
|
1430
1422
|
},
|
|
1431
|
-
initInstanceProps: function(e,
|
|
1432
|
-
var o = e,
|
|
1423
|
+
initInstanceProps: function(e, r) {
|
|
1424
|
+
var o = e, n = o.estimatedColumnWidth, a = o.estimatedRowHeight, c = {
|
|
1433
1425
|
columnMetadataMap: {},
|
|
1434
|
-
estimatedColumnWidth:
|
|
1435
|
-
estimatedRowHeight: a ||
|
|
1426
|
+
estimatedColumnWidth: n || Kt,
|
|
1427
|
+
estimatedRowHeight: a || Kt,
|
|
1436
1428
|
lastMeasuredColumnIndex: -1,
|
|
1437
1429
|
lastMeasuredRowIndex: -1,
|
|
1438
1430
|
rowMetadataMap: {}
|
|
1439
1431
|
};
|
|
1440
|
-
return
|
|
1441
|
-
u === void 0 && (u = !0),
|
|
1432
|
+
return r.resetAfterColumnIndex = function(s, u) {
|
|
1433
|
+
u === void 0 && (u = !0), r.resetAfterIndices({
|
|
1442
1434
|
columnIndex: s,
|
|
1443
1435
|
shouldForceUpdate: u
|
|
1444
1436
|
});
|
|
1445
|
-
},
|
|
1446
|
-
u === void 0 && (u = !0),
|
|
1437
|
+
}, r.resetAfterRowIndex = function(s, u) {
|
|
1438
|
+
u === void 0 && (u = !0), r.resetAfterIndices({
|
|
1447
1439
|
rowIndex: s,
|
|
1448
1440
|
shouldForceUpdate: u
|
|
1449
1441
|
});
|
|
1450
|
-
},
|
|
1442
|
+
}, r.resetAfterIndices = function(s) {
|
|
1451
1443
|
var u = s.columnIndex, l = s.rowIndex, d = s.shouldForceUpdate, f = d === void 0 ? !0 : d;
|
|
1452
|
-
typeof u == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, u - 1)), typeof l == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, l - 1)),
|
|
1444
|
+
typeof u == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, u - 1)), typeof l == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, l - 1)), r._getItemStyleCache(-1), f && r.forceUpdate();
|
|
1453
1445
|
}, c;
|
|
1454
1446
|
},
|
|
1455
1447
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
1456
1448
|
validateProps: function(e) {
|
|
1457
|
-
var
|
|
1449
|
+
var r = e.columnWidth, o = e.rowHeight;
|
|
1458
1450
|
if (process.env.NODE_ENV !== "production") {
|
|
1459
|
-
if (typeof
|
|
1460
|
-
throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (
|
|
1451
|
+
if (typeof r != "function")
|
|
1452
|
+
throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
1461
1453
|
if (typeof o != "function")
|
|
1462
1454
|
throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1463
1455
|
}
|
|
1464
1456
|
}
|
|
1465
1457
|
});
|
|
1466
1458
|
process.env.NODE_ENV;
|
|
1467
|
-
function
|
|
1468
|
-
for (var
|
|
1469
|
-
if (!(
|
|
1459
|
+
function Yt(t, e) {
|
|
1460
|
+
for (var r in t)
|
|
1461
|
+
if (!(r in e))
|
|
1470
1462
|
return !0;
|
|
1471
1463
|
for (var o in e)
|
|
1472
1464
|
if (t[o] !== e[o])
|
|
@@ -1475,49 +1467,49 @@ function Qt(t, e) {
|
|
|
1475
1467
|
}
|
|
1476
1468
|
var Ao = ["style"], Fo = ["style"];
|
|
1477
1469
|
function ko(t, e) {
|
|
1478
|
-
var
|
|
1479
|
-
return !
|
|
1470
|
+
var r = t.style, o = qt(t, Ao), n = e.style, a = qt(e, Fo);
|
|
1471
|
+
return !Yt(r, n) && !Yt(o, a);
|
|
1480
1472
|
}
|
|
1481
1473
|
const Wo = () => {
|
|
1482
|
-
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { setColumnCount:
|
|
1483
|
-
(g) =>
|
|
1484
|
-
[
|
|
1474
|
+
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { setColumnCount: r } = sr(), { virtualScrollableElementRef: o } = Ye(), n = Tt(), a = x(
|
|
1475
|
+
(g) => n.widths[g] || 0,
|
|
1476
|
+
[n.widths]
|
|
1485
1477
|
), c = x(
|
|
1486
|
-
(g) =>
|
|
1487
|
-
[
|
|
1488
|
-
), s = k(() =>
|
|
1478
|
+
(g) => n.heights[g] || 0,
|
|
1479
|
+
[n.heights]
|
|
1480
|
+
), s = k(() => n.heights.length, [n.heights]), u = k(() => Math.max(...n.widths), [n.widths]), l = k(() => e === K.HORIZONTAL_SCROLLING ? s : t === Ve.DUAL_PAGE ? 2 : 1, [t, e, e, s, o, u]);
|
|
1489
1481
|
O(() => {
|
|
1490
|
-
|
|
1491
|
-
}, [l,
|
|
1492
|
-
const d = k(() => e === K.HORIZONTAL_SCROLLING || e === K.PAGE_SCROLLING ? 1 : Math.round(s / l), [l, s, e]), f = k(() =>
|
|
1482
|
+
r(l);
|
|
1483
|
+
}, [l, r]);
|
|
1484
|
+
const d = k(() => e === K.HORIZONTAL_SCROLLING || e === K.PAGE_SCROLLING ? 1 : Math.round(s / l), [l, s, e]), f = k(() => n.heights.reduce((g, _) => g + _, 0) / n.heights.length || 0, [n]), h = k(() => n.widths.reduce((g, _) => g + _, 0) / n.heights.length || 0, [n]);
|
|
1493
1485
|
return {
|
|
1494
1486
|
rowCount: d,
|
|
1495
1487
|
rowHeight: c,
|
|
1496
1488
|
columnCount: l,
|
|
1497
1489
|
columnWidth: a,
|
|
1498
|
-
pageDimension:
|
|
1490
|
+
pageDimension: n,
|
|
1499
1491
|
estimatedRowHeight: f,
|
|
1500
1492
|
estimatedColumnWidth: h
|
|
1501
1493
|
};
|
|
1502
1494
|
};
|
|
1503
1495
|
let ie;
|
|
1504
1496
|
typeof window < "u" ? ie = window : typeof self < "u" ? ie = self : ie = global;
|
|
1505
|
-
let
|
|
1506
|
-
const
|
|
1507
|
-
pt == null ||
|
|
1508
|
-
return
|
|
1509
|
-
}) : (
|
|
1510
|
-
pt(e), dt(
|
|
1511
|
-
},
|
|
1512
|
-
const
|
|
1497
|
+
let wt = null, bt = null;
|
|
1498
|
+
const Qt = 20, dt = ie.clearTimeout, er = ie.setTimeout, pt = ie.cancelAnimationFrame || ie.mozCancelAnimationFrame || ie.webkitCancelAnimationFrame, tr = ie.requestAnimationFrame || ie.mozRequestAnimationFrame || ie.webkitRequestAnimationFrame;
|
|
1499
|
+
pt == null || tr == null ? (wt = dt, bt = function(e) {
|
|
1500
|
+
return er(e, Qt);
|
|
1501
|
+
}) : (wt = function([e, r]) {
|
|
1502
|
+
pt(e), dt(r);
|
|
1503
|
+
}, bt = function(e) {
|
|
1504
|
+
const r = tr(function() {
|
|
1513
1505
|
dt(o), e();
|
|
1514
|
-
}), o =
|
|
1515
|
-
pt(
|
|
1516
|
-
},
|
|
1517
|
-
return [
|
|
1506
|
+
}), o = er(function() {
|
|
1507
|
+
pt(r), e();
|
|
1508
|
+
}, Qt);
|
|
1509
|
+
return [r, o];
|
|
1518
1510
|
});
|
|
1519
1511
|
function Mo(t) {
|
|
1520
|
-
let e,
|
|
1512
|
+
let e, r, o, n, a, c, s;
|
|
1521
1513
|
const u = typeof document < "u" && document.attachEvent;
|
|
1522
1514
|
if (!u) {
|
|
1523
1515
|
c = function(w) {
|
|
@@ -1529,7 +1521,7 @@ function Mo(t) {
|
|
|
1529
1521
|
if (w.target.className && typeof w.target.className.indexOf == "function" && w.target.className.indexOf("contract-trigger") < 0 && w.target.className.indexOf("expand-trigger") < 0)
|
|
1530
1522
|
return;
|
|
1531
1523
|
const m = this;
|
|
1532
|
-
c(this), this.__resizeRAF__ &&
|
|
1524
|
+
c(this), this.__resizeRAF__ && wt(this.__resizeRAF__), this.__resizeRAF__ = bt(function() {
|
|
1533
1525
|
a(m) && (m.__resizeLast__.width = m.offsetWidth, m.__resizeLast__.height = m.offsetHeight, m.__resizeListeners__.forEach(function(p) {
|
|
1534
1526
|
p.call(m, w);
|
|
1535
1527
|
}));
|
|
@@ -1549,11 +1541,11 @@ function Mo(t) {
|
|
|
1549
1541
|
}
|
|
1550
1542
|
}
|
|
1551
1543
|
}
|
|
1552
|
-
|
|
1544
|
+
r = "resizeanim", e = "@" + g + "keyframes " + r + " { from { opacity: 0; } to { opacity: 0; } } ", n = g + "animation: 1ms " + r + "; ";
|
|
1553
1545
|
}
|
|
1554
1546
|
const l = function(h) {
|
|
1555
1547
|
if (!h.getElementById("detectElementResize")) {
|
|
1556
|
-
const g = (e || "") + ".resize-triggers { " + (
|
|
1548
|
+
const g = (e || "") + ".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%; }', _ = h.head || h.getElementsByTagName("head")[0], b = h.createElement("style");
|
|
1557
1549
|
b.id = "detectElementResize", b.type = "text/css", t != null && b.setAttribute("nonce", t), b.styleSheet ? b.styleSheet.cssText = g : b.appendChild(h.createTextNode(g)), _.appendChild(b);
|
|
1558
1550
|
}
|
|
1559
1551
|
};
|
|
@@ -1569,7 +1561,7 @@ function Mo(t) {
|
|
|
1569
1561
|
v.className = "expand-trigger", v.appendChild(_.createElement("div"));
|
|
1570
1562
|
const w = _.createElement("div");
|
|
1571
1563
|
w.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(w), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(T) {
|
|
1572
|
-
T.animationName ===
|
|
1564
|
+
T.animationName === r && c(h);
|
|
1573
1565
|
}, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
|
|
1574
1566
|
}
|
|
1575
1567
|
h.__resizeListeners__.push(g);
|
|
@@ -1588,7 +1580,7 @@ function Mo(t) {
|
|
|
1588
1580
|
}
|
|
1589
1581
|
};
|
|
1590
1582
|
}
|
|
1591
|
-
class Ho extends
|
|
1583
|
+
class Ho extends rn {
|
|
1592
1584
|
constructor(...e) {
|
|
1593
1585
|
super(...e), this.state = {
|
|
1594
1586
|
height: this.props.defaultHeight || 0,
|
|
@@ -1598,38 +1590,38 @@ class Ho extends or {
|
|
|
1598
1590
|
}, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
|
|
1599
1591
|
this._timeoutId = null;
|
|
1600
1592
|
const {
|
|
1601
|
-
disableHeight:
|
|
1593
|
+
disableHeight: r,
|
|
1602
1594
|
disableWidth: o,
|
|
1603
|
-
onResize:
|
|
1595
|
+
onResize: n
|
|
1604
1596
|
} = this.props;
|
|
1605
1597
|
if (this._parentNode) {
|
|
1606
1598
|
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), l = parseFloat(a.paddingBottom || "0"), d = this._parentNode.getBoundingClientRect(), f = d.height - u - l, h = d.width - c - s, g = this._parentNode.offsetHeight - u - l, _ = this._parentNode.offsetWidth - c - s;
|
|
1607
|
-
(!
|
|
1599
|
+
(!r && (this.state.height !== g || this.state.scaledHeight !== f) || !o && (this.state.width !== _ || this.state.scaledWidth !== h)) && (this.setState({
|
|
1608
1600
|
height: g,
|
|
1609
1601
|
width: _,
|
|
1610
1602
|
scaledHeight: f,
|
|
1611
1603
|
scaledWidth: h
|
|
1612
|
-
}), typeof
|
|
1604
|
+
}), typeof n == "function" && n({
|
|
1613
1605
|
height: g,
|
|
1614
1606
|
scaledHeight: f,
|
|
1615
1607
|
scaledWidth: h,
|
|
1616
1608
|
width: _
|
|
1617
1609
|
}));
|
|
1618
1610
|
}
|
|
1619
|
-
}, this._setRef = (
|
|
1620
|
-
this._autoSizer =
|
|
1611
|
+
}, this._setRef = (r) => {
|
|
1612
|
+
this._autoSizer = r;
|
|
1621
1613
|
};
|
|
1622
1614
|
}
|
|
1623
1615
|
componentDidMount() {
|
|
1624
1616
|
const {
|
|
1625
1617
|
nonce: e
|
|
1626
|
-
} = this.props,
|
|
1627
|
-
if (
|
|
1628
|
-
this._parentNode =
|
|
1629
|
-
const o =
|
|
1618
|
+
} = this.props, r = this._autoSizer ? this._autoSizer.parentNode : null;
|
|
1619
|
+
if (r != null && r.ownerDocument && r.ownerDocument.defaultView && r instanceof r.ownerDocument.defaultView.HTMLElement) {
|
|
1620
|
+
this._parentNode = r;
|
|
1621
|
+
const o = r.ownerDocument.defaultView.ResizeObserver;
|
|
1630
1622
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1631
1623
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1632
|
-
}), this._resizeObserver.observe(
|
|
1624
|
+
}), this._resizeObserver.observe(r)) : (this._detectElementResize = Mo(e), this._detectElementResize.addResizeListener(r, this._onResize)), this._onResize();
|
|
1633
1625
|
}
|
|
1634
1626
|
}
|
|
1635
1627
|
componentWillUnmount() {
|
|
@@ -1638,9 +1630,9 @@ class Ho extends or {
|
|
|
1638
1630
|
render() {
|
|
1639
1631
|
const {
|
|
1640
1632
|
children: e,
|
|
1641
|
-
defaultHeight:
|
|
1633
|
+
defaultHeight: r,
|
|
1642
1634
|
defaultWidth: o,
|
|
1643
|
-
disableHeight:
|
|
1635
|
+
disableHeight: n = !1,
|
|
1644
1636
|
disableWidth: a = !1,
|
|
1645
1637
|
doNotBailOutOnEmptyChildren: c = !1,
|
|
1646
1638
|
nonce: s,
|
|
@@ -1657,7 +1649,7 @@ class Ho extends or {
|
|
|
1657
1649
|
overflow: "visible"
|
|
1658
1650
|
}, w = {};
|
|
1659
1651
|
let m = !1;
|
|
1660
|
-
return
|
|
1652
|
+
return n || (h === 0 && (m = !0), v.height = 0, w.height = h, w.scaledHeight = g), a || (b === 0 && (m = !0), v.width = 0, w.width = b, w.scaledWidth = _), c && (m = !1), Me(d, {
|
|
1661
1653
|
ref: this._setRef,
|
|
1662
1654
|
style: {
|
|
1663
1655
|
...v,
|
|
@@ -1668,44 +1660,44 @@ class Ho extends or {
|
|
|
1668
1660
|
}
|
|
1669
1661
|
}
|
|
1670
1662
|
const $o = ({ widths: t, heights: e }) => {
|
|
1671
|
-
const { focusedPage:
|
|
1672
|
-
const u = [], l = Math.ceil(
|
|
1663
|
+
const { focusedPage: r, totalPages: o } = ce(), { isScrolling: n } = Qe(), a = k(() => {
|
|
1664
|
+
const u = [], l = Math.ceil(r / 2) * 2 - 1;
|
|
1673
1665
|
if (u.push(l), l + 1 < o) {
|
|
1674
1666
|
const d = l + 1;
|
|
1675
1667
|
u.push(d);
|
|
1676
1668
|
}
|
|
1677
1669
|
return u;
|
|
1678
|
-
}, [
|
|
1670
|
+
}, [r, o]), c = k(() => [
|
|
1679
1671
|
{
|
|
1680
1672
|
position: "absolute",
|
|
1681
1673
|
left: 0,
|
|
1682
|
-
width: t(
|
|
1683
|
-
height: e(
|
|
1674
|
+
width: t(r - 1),
|
|
1675
|
+
height: e(r - 1)
|
|
1684
1676
|
},
|
|
1685
1677
|
{
|
|
1686
1678
|
position: "absolute",
|
|
1687
|
-
left: t(
|
|
1679
|
+
left: t(r),
|
|
1688
1680
|
top: 0,
|
|
1689
|
-
width: t(
|
|
1690
|
-
height: e(
|
|
1681
|
+
width: t(r),
|
|
1682
|
+
height: e(r)
|
|
1691
1683
|
}
|
|
1692
1684
|
], [t, e, a]);
|
|
1693
1685
|
O(() => {
|
|
1694
|
-
|
|
1695
|
-
}, [
|
|
1686
|
+
n.current = !1;
|
|
1687
|
+
}, [r]);
|
|
1696
1688
|
const s = k(() => c.reduce((u, l) => u + Number(l.width || 0), 0), [c]);
|
|
1697
|
-
return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: a.map((u, l) => /* @__PURE__ */ i(
|
|
1689
|
+
return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: a.map((u, l) => /* @__PURE__ */ i(xt, { onIntersectRatioChange: () => {
|
|
1698
1690
|
}, style: c[l], pageNumber: u }, u)) });
|
|
1699
1691
|
}, Go = ({ widths: t, heights: e }) => {
|
|
1700
|
-
const { focusedPage:
|
|
1692
|
+
const { focusedPage: r } = ce(), { isScrolling: o } = Qe(), n = k(() => ({
|
|
1701
1693
|
position: "absolute",
|
|
1702
|
-
width: t(
|
|
1703
|
-
height: e(
|
|
1704
|
-
}), [t, e,
|
|
1694
|
+
width: t(r - 1),
|
|
1695
|
+
height: e(r - 1)
|
|
1696
|
+
}), [t, e, r]);
|
|
1705
1697
|
O(() => {
|
|
1706
1698
|
o.current = !1;
|
|
1707
|
-
}, [
|
|
1708
|
-
const a = k(() => t(
|
|
1699
|
+
}, [r]);
|
|
1700
|
+
const a = k(() => t(r - 1), [t]);
|
|
1709
1701
|
return /* @__PURE__ */ i(
|
|
1710
1702
|
"div",
|
|
1711
1703
|
{
|
|
@@ -1714,32 +1706,32 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1714
1706
|
position: "relative"
|
|
1715
1707
|
},
|
|
1716
1708
|
children: /* @__PURE__ */ i(
|
|
1717
|
-
|
|
1709
|
+
xt,
|
|
1718
1710
|
{
|
|
1719
|
-
style:
|
|
1711
|
+
style: n,
|
|
1720
1712
|
onIntersectRatioChange: () => {
|
|
1721
1713
|
},
|
|
1722
|
-
pageNumber:
|
|
1714
|
+
pageNumber: r
|
|
1723
1715
|
},
|
|
1724
|
-
|
|
1716
|
+
r
|
|
1725
1717
|
)
|
|
1726
1718
|
}
|
|
1727
1719
|
);
|
|
1728
|
-
}, Vo =
|
|
1729
|
-
const
|
|
1720
|
+
}, Vo = nn(({ columnIndex: t, rowIndex: e, data: r, style: o }) => {
|
|
1721
|
+
const n = t + 1 + e * r.columnCount;
|
|
1730
1722
|
return /* @__PURE__ */ i(
|
|
1731
|
-
|
|
1723
|
+
xt,
|
|
1732
1724
|
{
|
|
1733
1725
|
style: o,
|
|
1734
|
-
onIntersectRatioChange:
|
|
1735
|
-
pageNumber:
|
|
1726
|
+
onIntersectRatioChange: r.handleIntersectRatioChange,
|
|
1727
|
+
pageNumber: n
|
|
1736
1728
|
},
|
|
1737
|
-
|
|
1729
|
+
n
|
|
1738
1730
|
);
|
|
1739
|
-
}, ko),
|
|
1740
|
-
const { initialPage: t = 1, initialScrollMode: e } =
|
|
1741
|
-
|
|
1742
|
-
const { scrollToPage:
|
|
1731
|
+
}, ko), bs = () => {
|
|
1732
|
+
const { initialPage: t = 1, initialScrollMode: e } = cn(), { pagesRef: r, setPagesRef: o } = xe();
|
|
1733
|
+
On(r);
|
|
1734
|
+
const { scrollToPage: n } = gr(), {
|
|
1743
1735
|
virtualScrollRef: a,
|
|
1744
1736
|
getVirtualScrollRef: c,
|
|
1745
1737
|
getPageScrollElementRef: s,
|
|
@@ -1748,12 +1740,12 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1748
1740
|
virtualScrollableElementRef: d,
|
|
1749
1741
|
totalInnerDimensions: f,
|
|
1750
1742
|
pageScrollElementRef: h
|
|
1751
|
-
} = Ye(), g = W(!0), { nextPage: _, prevPage: b, setFocusedPage: v, focusedPage: w } = ce(), { scrollMode: m } = Oe(), { viewMode: T } = Je(), I = W(null), { loading: p } = X(), { LoaderImageComponent: P } =
|
|
1743
|
+
} = Ye(), g = W(!0), { nextPage: _, prevPage: b, setFocusedPage: v, focusedPage: w } = ce(), { scrollMode: m } = Oe(), { viewMode: T } = Je(), I = W(null), { loading: p } = X(), { LoaderImageComponent: P } = ur(), C = W(
|
|
1752
1744
|
f
|
|
1753
1745
|
), S = W({
|
|
1754
1746
|
viewMode: T,
|
|
1755
1747
|
scrollMode: m
|
|
1756
|
-
}), A = W(!1), R = W(), { isFullScreen: D } =
|
|
1748
|
+
}), A = W(!1), R = W(), { isFullScreen: D } = ln(), {
|
|
1757
1749
|
pageDimension: L,
|
|
1758
1750
|
rowCount: F,
|
|
1759
1751
|
rowHeight: E,
|
|
@@ -1761,21 +1753,21 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1761
1753
|
columnWidth: N,
|
|
1762
1754
|
estimatedColumnWidth: G,
|
|
1763
1755
|
estimatedRowHeight: U
|
|
1764
|
-
} = Wo(), Z = vt(f, 100), [ee, j] = $({}), J = vt(ee, 100), { isScrolling: ae } = Qe(),
|
|
1756
|
+
} = Wo(), Z = vt(f, 100), [ee, j] = $({}), J = vt(ee, 100), { isScrolling: ae } = Qe(), re = W(), B = W({
|
|
1765
1757
|
scrollTop: 0,
|
|
1766
1758
|
scrollLeft: 0
|
|
1767
1759
|
});
|
|
1768
|
-
|
|
1769
|
-
const { isPressed: Y } =
|
|
1760
|
+
kn(r);
|
|
1761
|
+
const { isPressed: Y } = An(), { selectionMode: ue } = sn(), { initializeGrabScroll: be, resetGrabState: De } = Fn({
|
|
1770
1762
|
isPressed: Y
|
|
1771
|
-
}), de = k(() => ue ===
|
|
1763
|
+
}), de = k(() => ue === on.HAND, [ue]), pe = x((M, H) => {
|
|
1772
1764
|
j((Q) => H > -1 ? { ...Q, [M]: Math.round(H * 100) } : (delete Q[M], Q));
|
|
1773
1765
|
}, []), ge = k(() => ({
|
|
1774
1766
|
columnCount: y,
|
|
1775
1767
|
handleIntersectRatioChange: pe
|
|
1776
1768
|
}), [y, pe]), Ce = x(
|
|
1777
1769
|
(M) => {
|
|
1778
|
-
const H = document.activeElement !==
|
|
1770
|
+
const H = document.activeElement !== r;
|
|
1779
1771
|
!D && H || (["ArrowUp", "ArrowLeft"].includes(M.key) ? (M.preventDefault(), b()) : ["ArrowDown", "ArrowRight"].includes(M.key) && (M.preventDefault(), _()));
|
|
1780
1772
|
},
|
|
1781
1773
|
[_, b, D, m]
|
|
@@ -1803,33 +1795,33 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1803
1795
|
};
|
|
1804
1796
|
},
|
|
1805
1797
|
[d]
|
|
1806
|
-
),
|
|
1798
|
+
), jr = x(
|
|
1807
1799
|
(M, H) => {
|
|
1808
1800
|
if (ae.current)
|
|
1809
1801
|
return;
|
|
1810
1802
|
if (S.current.viewMode !== T || S.current.scrollMode !== m) {
|
|
1811
|
-
|
|
1803
|
+
re.current && clearTimeout(re.current), j({}), A.current = !0, n(w), m === K.HORIZONTAL_SCROLLING && (a == null || a.scrollTo({
|
|
1812
1804
|
scrollTop: 0
|
|
1813
|
-
})),
|
|
1805
|
+
})), re.current = setTimeout(() => {
|
|
1814
1806
|
requestAnimationFrame(() => {
|
|
1815
1807
|
S.current = { viewMode: T, scrollMode: m };
|
|
1816
1808
|
});
|
|
1817
1809
|
}, 100);
|
|
1818
1810
|
return;
|
|
1819
1811
|
}
|
|
1820
|
-
const se = M.scrollTop,
|
|
1812
|
+
const se = M.scrollTop, rt = M.scrollLeft;
|
|
1821
1813
|
if (!H.height || !H.width)
|
|
1822
1814
|
return;
|
|
1823
1815
|
A.current = !0;
|
|
1824
|
-
const { height: Te, width:
|
|
1825
|
-
if (
|
|
1816
|
+
const { height: Te, width: nt } = H, { height: Ot, width: Dt } = C.current;
|
|
1817
|
+
if (Ot === Te && Dt === nt)
|
|
1826
1818
|
return;
|
|
1827
|
-
const
|
|
1819
|
+
const Jr = se / Ot * Te, Yr = rt / Dt * nt, Qr = Math.round(Math.min(Jr, Te)) || 0, en = Math.round(Math.min(Yr, nt)) || 0;
|
|
1828
1820
|
R.current = setTimeout(() => {
|
|
1829
1821
|
requestAnimationFrame(() => {
|
|
1830
1822
|
a == null || a.scrollTo({
|
|
1831
|
-
scrollTop:
|
|
1832
|
-
scrollLeft:
|
|
1823
|
+
scrollTop: Qr,
|
|
1824
|
+
scrollLeft: en
|
|
1833
1825
|
});
|
|
1834
1826
|
});
|
|
1835
1827
|
}, 0), C.current = {
|
|
@@ -1842,18 +1834,18 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1842
1834
|
O(() => {
|
|
1843
1835
|
clearTimeout(R.current);
|
|
1844
1836
|
const M = Array.from({ length: F }).reduce(
|
|
1845
|
-
(se,
|
|
1837
|
+
(se, rt, Te) => se + E(Te),
|
|
1846
1838
|
0
|
|
1847
1839
|
), H = Array.from({ length: y }).reduce(
|
|
1848
|
-
(se,
|
|
1840
|
+
(se, rt, Te) => se + N(Te),
|
|
1849
1841
|
0
|
|
1850
1842
|
), Q = tt(H, M);
|
|
1851
|
-
B.current = Q,
|
|
1843
|
+
B.current = Q, jr(Q, { height: M, width: H }), l({
|
|
1852
1844
|
height: M,
|
|
1853
1845
|
width: H
|
|
1854
1846
|
});
|
|
1855
1847
|
}, [L, F, y]);
|
|
1856
|
-
const
|
|
1848
|
+
const Br = x((M) => {
|
|
1857
1849
|
B.current = {
|
|
1858
1850
|
scrollTop: M.scrollTop,
|
|
1859
1851
|
scrollLeft: M.scrollLeft
|
|
@@ -1868,12 +1860,12 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1868
1860
|
Q < se[1] && (H = Number(se[0]), Q = se[1]);
|
|
1869
1861
|
}), H && v(H);
|
|
1870
1862
|
}, [J, v]), O(() => () => {
|
|
1871
|
-
|
|
1863
|
+
re.current && clearTimeout(re.current);
|
|
1872
1864
|
}, []);
|
|
1873
|
-
const
|
|
1865
|
+
const Kr = k(() => oe(he["rp-pages-container"], {
|
|
1874
1866
|
[he["rp-cursor-grab"]]: de && !Y,
|
|
1875
1867
|
[he["rp-cursor-grabbing"]]: de && Y
|
|
1876
|
-
}), [de, Y]),
|
|
1868
|
+
}), [de, Y]), Xr = x(
|
|
1877
1869
|
(M) => {
|
|
1878
1870
|
if (de && M) {
|
|
1879
1871
|
const H = oe(he["rp-pages"]), Q = document.querySelector(`.${H}`);
|
|
@@ -1916,7 +1908,7 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1916
1908
|
h,
|
|
1917
1909
|
v,
|
|
1918
1910
|
Z
|
|
1919
|
-
]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className:
|
|
1911
|
+
]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: Kr, children: /* @__PURE__ */ i(Ho, { style: { minHeight: "50px" }, children: ({ width: M, height: H }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Xr, style: { width: M, height: H }, children: m === K.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
1920
1912
|
"div",
|
|
1921
1913
|
{
|
|
1922
1914
|
ref: s,
|
|
@@ -1931,7 +1923,7 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1931
1923
|
itemData: ge,
|
|
1932
1924
|
outerRef: u,
|
|
1933
1925
|
innerRef: I,
|
|
1934
|
-
onScroll:
|
|
1926
|
+
onScroll: Br,
|
|
1935
1927
|
columnCount: y,
|
|
1936
1928
|
columnWidth: N,
|
|
1937
1929
|
rowHeight: E,
|
|
@@ -1977,7 +1969,7 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1977
1969
|
const { nextIcon: t } = fe();
|
|
1978
1970
|
return t || /* @__PURE__ */ i(ke, { style: { transform: "rotate(180deg" } });
|
|
1979
1971
|
}, Zo = () => {
|
|
1980
|
-
const { focusedPage: t, totalPages: e, setFocusedPage:
|
|
1972
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: r, nextPage: o, prevPage: n, goToPage: a } = ce(), [c, s] = $(t.toString()), { pageNavigationTool: u = !0 } = _e(), { isSmallScreen: l } = Re(), { localeMessages: d } = me();
|
|
1981
1973
|
O(() => {
|
|
1982
1974
|
s(t.toString());
|
|
1983
1975
|
}, [t]);
|
|
@@ -2001,22 +1993,22 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
2001
1993
|
total: e,
|
|
2002
1994
|
current: t,
|
|
2003
1995
|
nextPage: o,
|
|
2004
|
-
prevPage:
|
|
1996
|
+
prevPage: n,
|
|
2005
1997
|
goToPage: a,
|
|
2006
|
-
changePage:
|
|
1998
|
+
changePage: r
|
|
2007
1999
|
}
|
|
2008
2000
|
) : u ? /* @__PURE__ */ z("div", { className: ht["rp-paginate"], children: [
|
|
2009
2001
|
!l && /* @__PURE__ */ i(q, { content: d == null ? void 0 : d.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2010
2002
|
te,
|
|
2011
2003
|
{
|
|
2012
|
-
onClick:
|
|
2004
|
+
onClick: n,
|
|
2013
2005
|
"aria-label": d == null ? void 0 : d.previousPageTooltip,
|
|
2014
2006
|
"aria-disabled": t === 1,
|
|
2015
2007
|
children: /* @__PURE__ */ i(Uo, {})
|
|
2016
2008
|
}
|
|
2017
2009
|
) }),
|
|
2018
2010
|
/* @__PURE__ */ i(q, { content: d == null ? void 0 : d.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2019
|
-
|
|
2011
|
+
ar,
|
|
2020
2012
|
{
|
|
2021
2013
|
onKeyDown: _,
|
|
2022
2014
|
onBlur: g,
|
|
@@ -2040,17 +2032,17 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
2040
2032
|
) })
|
|
2041
2033
|
] }) : null;
|
|
2042
2034
|
};
|
|
2043
|
-
var
|
|
2035
|
+
var Rt = "Dialog", [yr, Cs] = Gn(Rt), [jo, le] = yr(Rt), xr = (t) => {
|
|
2044
2036
|
const {
|
|
2045
2037
|
__scopeDialog: e,
|
|
2046
|
-
children:
|
|
2038
|
+
children: r,
|
|
2047
2039
|
open: o,
|
|
2048
|
-
defaultOpen:
|
|
2040
|
+
defaultOpen: n,
|
|
2049
2041
|
onOpenChange: a,
|
|
2050
2042
|
modal: c = !0
|
|
2051
|
-
} = t, s = V.useRef(null), u = V.useRef(null), [l = !1, d] =
|
|
2043
|
+
} = t, s = V.useRef(null), u = V.useRef(null), [l = !1, d] = Un({
|
|
2052
2044
|
prop: o,
|
|
2053
|
-
defaultProp:
|
|
2045
|
+
defaultProp: n,
|
|
2054
2046
|
onChange: a
|
|
2055
2047
|
});
|
|
2056
2048
|
return /* @__PURE__ */ i(
|
|
@@ -2066,54 +2058,54 @@ var Lt = "Dialog", [Rn, ws] = Hr(Lt), [jo, le] = Rn(Lt), Ln = (t) => {
|
|
|
2066
2058
|
onOpenChange: d,
|
|
2067
2059
|
onOpenToggle: V.useCallback(() => d((f) => !f), [d]),
|
|
2068
2060
|
modal: c,
|
|
2069
|
-
children:
|
|
2061
|
+
children: r
|
|
2070
2062
|
}
|
|
2071
2063
|
);
|
|
2072
2064
|
};
|
|
2073
|
-
|
|
2074
|
-
var
|
|
2065
|
+
xr.displayName = Rt;
|
|
2066
|
+
var Rr = "DialogTrigger", Bo = V.forwardRef(
|
|
2075
2067
|
(t, e) => {
|
|
2076
|
-
const { __scopeDialog:
|
|
2068
|
+
const { __scopeDialog: r, ...o } = t, n = le(Rr, r), a = St(e, n.triggerRef);
|
|
2077
2069
|
return /* @__PURE__ */ i(
|
|
2078
2070
|
We.button,
|
|
2079
2071
|
{
|
|
2080
2072
|
type: "button",
|
|
2081
2073
|
"aria-haspopup": "dialog",
|
|
2082
|
-
"aria-expanded":
|
|
2083
|
-
"aria-controls":
|
|
2084
|
-
"data-state":
|
|
2074
|
+
"aria-expanded": n.open,
|
|
2075
|
+
"aria-controls": n.contentId,
|
|
2076
|
+
"data-state": Et(n.open),
|
|
2085
2077
|
...o,
|
|
2086
2078
|
ref: a,
|
|
2087
|
-
onClick: Fe(t.onClick,
|
|
2079
|
+
onClick: Fe(t.onClick, n.onOpenToggle)
|
|
2088
2080
|
}
|
|
2089
2081
|
);
|
|
2090
2082
|
}
|
|
2091
2083
|
);
|
|
2092
|
-
Bo.displayName =
|
|
2093
|
-
var
|
|
2084
|
+
Bo.displayName = Rr;
|
|
2085
|
+
var Lt = "DialogPortal", [Ko, Lr] = yr(Lt, {
|
|
2094
2086
|
forceMount: void 0
|
|
2095
|
-
}),
|
|
2096
|
-
const { __scopeDialog: e, forceMount:
|
|
2097
|
-
return /* @__PURE__ */ i(Ko, { scope: e, forceMount:
|
|
2087
|
+
}), Nr = (t) => {
|
|
2088
|
+
const { __scopeDialog: e, forceMount: r, children: o, container: n } = t, a = le(Lt, e);
|
|
2089
|
+
return /* @__PURE__ */ i(Ko, { scope: e, forceMount: r, children: V.Children.map(o, (c) => /* @__PURE__ */ i(It, { present: r || a.open, children: /* @__PURE__ */ i(Kn, { asChild: !0, container: n, children: c }) })) });
|
|
2098
2090
|
};
|
|
2099
|
-
|
|
2100
|
-
var qe = "DialogOverlay",
|
|
2091
|
+
Nr.displayName = Lt;
|
|
2092
|
+
var qe = "DialogOverlay", Er = V.forwardRef(
|
|
2101
2093
|
(t, e) => {
|
|
2102
|
-
const
|
|
2103
|
-
return a.modal ? /* @__PURE__ */ i(
|
|
2094
|
+
const r = Lr(qe, t.__scopeDialog), { forceMount: o = r.forceMount, ...n } = t, a = le(qe, t.__scopeDialog);
|
|
2095
|
+
return a.modal ? /* @__PURE__ */ i(It, { present: o || a.open, children: /* @__PURE__ */ i(Xo, { ...n, ref: e }) }) : null;
|
|
2104
2096
|
}
|
|
2105
2097
|
);
|
|
2106
|
-
|
|
2098
|
+
Er.displayName = qe;
|
|
2107
2099
|
var Xo = V.forwardRef(
|
|
2108
2100
|
(t, e) => {
|
|
2109
|
-
const { __scopeDialog:
|
|
2101
|
+
const { __scopeDialog: r, ...o } = t, n = le(qe, r);
|
|
2110
2102
|
return (
|
|
2111
2103
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2112
2104
|
// ie. when `Overlay` and `Content` are siblings
|
|
2113
|
-
/* @__PURE__ */ i(
|
|
2105
|
+
/* @__PURE__ */ i(qn, { as: $n, allowPinchZoom: !0, shards: [n.contentRef], children: /* @__PURE__ */ i(
|
|
2114
2106
|
We.div,
|
|
2115
2107
|
{
|
|
2116
|
-
"data-state":
|
|
2108
|
+
"data-state": Et(n.open),
|
|
2117
2109
|
...o,
|
|
2118
2110
|
ref: e,
|
|
2119
2111
|
style: { pointerEvents: "auto", ...o.style }
|
|
@@ -2121,30 +2113,30 @@ var Xo = V.forwardRef(
|
|
|
2121
2113
|
) })
|
|
2122
2114
|
);
|
|
2123
2115
|
}
|
|
2124
|
-
), ye = "DialogContent",
|
|
2116
|
+
), ye = "DialogContent", Or = V.forwardRef(
|
|
2125
2117
|
(t, e) => {
|
|
2126
|
-
const
|
|
2127
|
-
return /* @__PURE__ */ i(
|
|
2118
|
+
const r = Lr(ye, t.__scopeDialog), { forceMount: o = r.forceMount, ...n } = t, a = le(ye, t.__scopeDialog);
|
|
2119
|
+
return /* @__PURE__ */ i(It, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(Jo, { ...n, ref: e }) : /* @__PURE__ */ i(Yo, { ...n, ref: e }) });
|
|
2128
2120
|
}
|
|
2129
2121
|
);
|
|
2130
|
-
|
|
2122
|
+
Or.displayName = ye;
|
|
2131
2123
|
var Jo = V.forwardRef(
|
|
2132
2124
|
(t, e) => {
|
|
2133
|
-
const
|
|
2125
|
+
const r = le(ye, t.__scopeDialog), o = V.useRef(null), n = St(e, r.contentRef, o);
|
|
2134
2126
|
return V.useEffect(() => {
|
|
2135
2127
|
const a = o.current;
|
|
2136
2128
|
if (a)
|
|
2137
|
-
return
|
|
2129
|
+
return Xn(a);
|
|
2138
2130
|
}, []), /* @__PURE__ */ i(
|
|
2139
|
-
|
|
2131
|
+
Dr,
|
|
2140
2132
|
{
|
|
2141
2133
|
...t,
|
|
2142
|
-
ref:
|
|
2143
|
-
trapFocus:
|
|
2134
|
+
ref: n,
|
|
2135
|
+
trapFocus: r.open,
|
|
2144
2136
|
disableOutsidePointerEvents: !0,
|
|
2145
2137
|
onCloseAutoFocus: Fe(t.onCloseAutoFocus, (a) => {
|
|
2146
2138
|
var c;
|
|
2147
|
-
a.preventDefault(), (c =
|
|
2139
|
+
a.preventDefault(), (c = r.triggerRef.current) == null || c.focus();
|
|
2148
2140
|
}),
|
|
2149
2141
|
onPointerDownOutside: Fe(t.onPointerDownOutside, (a) => {
|
|
2150
2142
|
const c = a.detail.originalEvent, s = c.button === 0 && c.ctrlKey === !0;
|
|
@@ -2159,9 +2151,9 @@ var Jo = V.forwardRef(
|
|
|
2159
2151
|
}
|
|
2160
2152
|
), Yo = V.forwardRef(
|
|
2161
2153
|
(t, e) => {
|
|
2162
|
-
const
|
|
2154
|
+
const r = le(ye, t.__scopeDialog), o = V.useRef(!1), n = V.useRef(!1);
|
|
2163
2155
|
return /* @__PURE__ */ i(
|
|
2164
|
-
|
|
2156
|
+
Dr,
|
|
2165
2157
|
{
|
|
2166
2158
|
...t,
|
|
2167
2159
|
ref: e,
|
|
@@ -2169,37 +2161,37 @@ var Jo = V.forwardRef(
|
|
|
2169
2161
|
disableOutsidePointerEvents: !1,
|
|
2170
2162
|
onCloseAutoFocus: (a) => {
|
|
2171
2163
|
var c, s;
|
|
2172
|
-
(c = t.onCloseAutoFocus) == null || c.call(t, a), a.defaultPrevented || (o.current || (s =
|
|
2164
|
+
(c = t.onCloseAutoFocus) == null || c.call(t, a), a.defaultPrevented || (o.current || (s = r.triggerRef.current) == null || s.focus(), a.preventDefault()), o.current = !1, n.current = !1;
|
|
2173
2165
|
},
|
|
2174
2166
|
onInteractOutside: (a) => {
|
|
2175
2167
|
var u, l;
|
|
2176
|
-
(u = t.onInteractOutside) == null || u.call(t, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (
|
|
2168
|
+
(u = t.onInteractOutside) == null || u.call(t, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (n.current = !0));
|
|
2177
2169
|
const c = a.target;
|
|
2178
|
-
((l =
|
|
2170
|
+
((l = r.triggerRef.current) == null ? void 0 : l.contains(c)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && n.current && a.preventDefault();
|
|
2179
2171
|
}
|
|
2180
2172
|
}
|
|
2181
2173
|
);
|
|
2182
2174
|
}
|
|
2183
|
-
),
|
|
2175
|
+
), Dr = V.forwardRef(
|
|
2184
2176
|
(t, e) => {
|
|
2185
|
-
const { __scopeDialog:
|
|
2186
|
-
return
|
|
2177
|
+
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: n, onCloseAutoFocus: a, ...c } = t, s = le(ye, r), u = V.useRef(null), l = St(e, u);
|
|
2178
|
+
return Zn(), /* @__PURE__ */ z(Ie, { children: [
|
|
2187
2179
|
/* @__PURE__ */ i(
|
|
2188
|
-
|
|
2180
|
+
jn,
|
|
2189
2181
|
{
|
|
2190
2182
|
asChild: !0,
|
|
2191
2183
|
loop: !0,
|
|
2192
2184
|
trapped: o,
|
|
2193
|
-
onMountAutoFocus:
|
|
2185
|
+
onMountAutoFocus: n,
|
|
2194
2186
|
onUnmountAutoFocus: a,
|
|
2195
2187
|
children: /* @__PURE__ */ i(
|
|
2196
|
-
|
|
2188
|
+
Bn,
|
|
2197
2189
|
{
|
|
2198
2190
|
role: "dialog",
|
|
2199
2191
|
id: s.contentId,
|
|
2200
2192
|
"aria-describedby": s.descriptionId,
|
|
2201
2193
|
"aria-labelledby": s.titleId,
|
|
2202
|
-
"data-state":
|
|
2194
|
+
"data-state": Et(s.open),
|
|
2203
2195
|
...c,
|
|
2204
2196
|
ref: l,
|
|
2205
2197
|
onDismiss: () => s.onOpenChange(!1)
|
|
@@ -2209,63 +2201,63 @@ var Jo = V.forwardRef(
|
|
|
2209
2201
|
),
|
|
2210
2202
|
/* @__PURE__ */ z(Ie, { children: [
|
|
2211
2203
|
/* @__PURE__ */ i(ei, { titleId: s.titleId }),
|
|
2212
|
-
/* @__PURE__ */ i(
|
|
2204
|
+
/* @__PURE__ */ i(ri, { contentRef: u, descriptionId: s.descriptionId })
|
|
2213
2205
|
] })
|
|
2214
2206
|
] });
|
|
2215
2207
|
}
|
|
2216
|
-
),
|
|
2208
|
+
), Nt = "DialogTitle", zr = V.forwardRef(
|
|
2217
2209
|
(t, e) => {
|
|
2218
|
-
const { __scopeDialog:
|
|
2219
|
-
return /* @__PURE__ */ i(We.h2, { id:
|
|
2210
|
+
const { __scopeDialog: r, ...o } = t, n = le(Nt, r);
|
|
2211
|
+
return /* @__PURE__ */ i(We.h2, { id: n.titleId, ...o, ref: e });
|
|
2220
2212
|
}
|
|
2221
2213
|
);
|
|
2222
|
-
|
|
2223
|
-
var
|
|
2214
|
+
zr.displayName = Nt;
|
|
2215
|
+
var Ar = "DialogDescription", Qo = V.forwardRef(
|
|
2224
2216
|
(t, e) => {
|
|
2225
|
-
const { __scopeDialog:
|
|
2226
|
-
return /* @__PURE__ */ i(We.p, { id:
|
|
2217
|
+
const { __scopeDialog: r, ...o } = t, n = le(Ar, r);
|
|
2218
|
+
return /* @__PURE__ */ i(We.p, { id: n.descriptionId, ...o, ref: e });
|
|
2227
2219
|
}
|
|
2228
2220
|
);
|
|
2229
|
-
Qo.displayName =
|
|
2230
|
-
var
|
|
2221
|
+
Qo.displayName = Ar;
|
|
2222
|
+
var Fr = "DialogClose", kr = V.forwardRef(
|
|
2231
2223
|
(t, e) => {
|
|
2232
|
-
const { __scopeDialog:
|
|
2224
|
+
const { __scopeDialog: r, ...o } = t, n = le(Fr, r);
|
|
2233
2225
|
return /* @__PURE__ */ i(
|
|
2234
2226
|
We.button,
|
|
2235
2227
|
{
|
|
2236
2228
|
type: "button",
|
|
2237
2229
|
...o,
|
|
2238
2230
|
ref: e,
|
|
2239
|
-
onClick: Fe(t.onClick, () =>
|
|
2231
|
+
onClick: Fe(t.onClick, () => n.onOpenChange(!1))
|
|
2240
2232
|
}
|
|
2241
2233
|
);
|
|
2242
2234
|
}
|
|
2243
2235
|
);
|
|
2244
|
-
|
|
2245
|
-
function
|
|
2236
|
+
kr.displayName = Fr;
|
|
2237
|
+
function Et(t) {
|
|
2246
2238
|
return t ? "open" : "closed";
|
|
2247
2239
|
}
|
|
2248
|
-
var
|
|
2240
|
+
var Wr = "DialogTitleWarning", [Ts, Mr] = Vn(Wr, {
|
|
2249
2241
|
contentName: ye,
|
|
2250
|
-
titleName:
|
|
2242
|
+
titleName: Nt,
|
|
2251
2243
|
docsSlug: "dialog"
|
|
2252
2244
|
}), ei = ({ titleId: t }) => {
|
|
2253
|
-
const e =
|
|
2245
|
+
const e = Mr(Wr), r = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2254
2246
|
|
|
2255
2247
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2256
2248
|
|
|
2257
2249
|
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;
|
|
2258
2250
|
return V.useEffect(() => {
|
|
2259
|
-
t && (document.getElementById(t) || console.error(
|
|
2260
|
-
}, [
|
|
2261
|
-
}, ti = "DialogDescriptionWarning",
|
|
2262
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2251
|
+
t && (document.getElementById(t) || console.error(r));
|
|
2252
|
+
}, [r, t]), null;
|
|
2253
|
+
}, ti = "DialogDescriptionWarning", ri = ({ contentRef: t, descriptionId: e }) => {
|
|
2254
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mr(ti).contentName}}.`;
|
|
2263
2255
|
return V.useEffect(() => {
|
|
2264
2256
|
var a;
|
|
2265
|
-
const
|
|
2266
|
-
e &&
|
|
2257
|
+
const n = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2258
|
+
e && n && (document.getElementById(e) || console.warn(o));
|
|
2267
2259
|
}, [o, t, e]), null;
|
|
2268
|
-
},
|
|
2260
|
+
}, ni = xr, oi = Nr, ii = Er, ai = Or, si = zr, ci = kr;
|
|
2269
2261
|
const Se = {
|
|
2270
2262
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2271
2263
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2275,7 +2267,7 @@ const Se = {
|
|
|
2275
2267
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2276
2268
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2277
2269
|
}, li = () => {
|
|
2278
|
-
const { pdfProperties: t } = X(), { container: e } = xe(), { activeDocumentProperties:
|
|
2270
|
+
const { pdfProperties: t } = X(), { container: e } = xe(), { activeDocumentProperties: r, setActiveDocumentProperties: o } = Yn(), { localeMessages: n } = me(), a = k(() => {
|
|
2279
2271
|
if (!t)
|
|
2280
2272
|
return [];
|
|
2281
2273
|
const {
|
|
@@ -2293,42 +2285,42 @@ const Se = {
|
|
|
2293
2285
|
pageCount: w
|
|
2294
2286
|
} = t;
|
|
2295
2287
|
return [
|
|
2296
|
-
{ label:
|
|
2297
|
-
{ label:
|
|
2288
|
+
{ label: n == null ? void 0 : n.propertiesFilenameLabel, value: s },
|
|
2289
|
+
{ label: n == null ? void 0 : n.propertiesFileSizeLabel, value: c },
|
|
2298
2290
|
{ separate: !0 },
|
|
2299
|
-
{ label:
|
|
2300
|
-
{ label:
|
|
2301
|
-
{ label:
|
|
2302
|
-
{ label:
|
|
2303
|
-
{ label:
|
|
2291
|
+
{ label: n == null ? void 0 : n.propertiesTitleLabel, value: u },
|
|
2292
|
+
{ label: n == null ? void 0 : n.propertiesAuthorLabel, value: l },
|
|
2293
|
+
{ label: n == null ? void 0 : n.propertiesSubjectLabel, value: d },
|
|
2294
|
+
{ label: n == null ? void 0 : n.propertiesKeywordLabel, value: g },
|
|
2295
|
+
{ label: n == null ? void 0 : n.propertiesCreatorLabel, value: h },
|
|
2304
2296
|
{
|
|
2305
|
-
label:
|
|
2306
|
-
value: f ?
|
|
2297
|
+
label: n == null ? void 0 : n.propertiesCreateOnLabel,
|
|
2298
|
+
value: f ? Mt(f) : ""
|
|
2307
2299
|
},
|
|
2308
2300
|
{
|
|
2309
|
-
label:
|
|
2310
|
-
value: _ ?
|
|
2301
|
+
label: n == null ? void 0 : n.propertiesModifiedOnLabel,
|
|
2302
|
+
value: _ ? Mt(_) : ""
|
|
2311
2303
|
},
|
|
2312
2304
|
{ separate: !0 },
|
|
2313
|
-
{ label:
|
|
2314
|
-
{ label:
|
|
2315
|
-
{ label:
|
|
2305
|
+
{ label: n == null ? void 0 : n.propertiesPDFProducerLabel, value: b },
|
|
2306
|
+
{ label: n == null ? void 0 : n.propertiesPDFVersionLabel, value: v },
|
|
2307
|
+
{ label: n == null ? void 0 : n.propertiesPageCountLabel, value: w }
|
|
2316
2308
|
];
|
|
2317
|
-
}, [t,
|
|
2318
|
-
return /* @__PURE__ */ i(
|
|
2309
|
+
}, [t, n]);
|
|
2310
|
+
return /* @__PURE__ */ i(ni, { open: r, onOpenChange: o, children: /* @__PURE__ */ i(oi, { container: e, children: /* @__PURE__ */ z("div", { className: Se["rp-dialog-wrapper"], children: [
|
|
2319
2311
|
/* @__PURE__ */ i(ii, { className: Se["rp-dialog-overlay"] }),
|
|
2320
2312
|
/* @__PURE__ */ z(ai, { className: Se["rp-document-dialog"], children: [
|
|
2321
|
-
/* @__PURE__ */ i(si, { className: Se["rp-dialog-title"], children:
|
|
2322
|
-
/* @__PURE__ */ i("div", { className: Se["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Se["rp-properties-divider"] }) : /* @__PURE__ */ i(
|
|
2323
|
-
/* @__PURE__ */ i(ci, { asChild: !0, className: Se["rp-dialog-close"], children: /* @__PURE__ */ i(
|
|
2313
|
+
/* @__PURE__ */ i(si, { className: Se["rp-dialog-title"], children: n == null ? void 0 : n.documentPropertiesLabel }),
|
|
2314
|
+
/* @__PURE__ */ i("div", { className: Se["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Se["rp-properties-divider"] }) : /* @__PURE__ */ i(Jn, { label: c.label, value: c.value }) }, s)) }),
|
|
2315
|
+
/* @__PURE__ */ i(ci, { asChild: !0, className: Se["rp-dialog-close"], children: /* @__PURE__ */ i(hr, {}) })
|
|
2324
2316
|
] })
|
|
2325
2317
|
] }) }) });
|
|
2326
2318
|
}, ui = {
|
|
2327
2319
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2328
2320
|
}, di = (t) => URL.createObjectURL(t), pi = async (t) => {
|
|
2329
|
-
const
|
|
2330
|
-
return di(
|
|
2331
|
-
},
|
|
2321
|
+
const r = await (await fetch(t)).blob();
|
|
2322
|
+
return di(r);
|
|
2323
|
+
}, Hr = () => {
|
|
2332
2324
|
const { filename: t, pdfSrc: e } = X();
|
|
2333
2325
|
return { download: x(async () => {
|
|
2334
2326
|
if (!t || !e)
|
|
@@ -2336,30 +2328,30 @@ const Se = {
|
|
|
2336
2328
|
const o = document.createElement("a");
|
|
2337
2329
|
o.href = await pi(e), o.download = t, document.body.appendChild(o), o.click(), document.body.removeChild(o);
|
|
2338
2330
|
}, [t, e]) };
|
|
2339
|
-
},
|
|
2331
|
+
}, $r = () => {
|
|
2340
2332
|
const { downloadIcon: t } = fe();
|
|
2341
2333
|
return t || /* @__PURE__ */ i(no, {});
|
|
2342
|
-
},
|
|
2343
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2334
|
+
}, Gr = ({ children: t, className: e, localeMessages: r }) => /* @__PURE__ */ i(q, { className: e, content: r == null ? void 0 : r.downloadFileTooltip, children: t }), hi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Gr, { localeMessages: e, children: /* @__PURE__ */ i(te, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i($r, {}) }) }), mi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ z(Gr, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2335
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i($r, {}) }),
|
|
2344
2336
|
e == null ? void 0 : e.downloadFileLabel
|
|
2345
|
-
] }) }),
|
|
2346
|
-
const { download: t } =
|
|
2347
|
-
return e ?
|
|
2348
|
-
},
|
|
2337
|
+
] }) }), Vr = () => {
|
|
2338
|
+
const { download: t } = Hr(), { downloadTool: e = !0 } = _e(), { isSmallScreen: r } = Re(), { localeMessages: o } = me();
|
|
2339
|
+
return e ? r ? /* @__PURE__ */ i(mi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(hi, { download: t, localeMessages: o }) : null : null;
|
|
2340
|
+
}, Ur = () => {
|
|
2349
2341
|
const { printIcon: t } = fe();
|
|
2350
|
-
return t || /* @__PURE__ */ i(
|
|
2351
|
-
},
|
|
2352
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2342
|
+
return t || /* @__PURE__ */ i(oo, {});
|
|
2343
|
+
}, qr = ({ children: t, className: e, localeMessages: r }) => /* @__PURE__ */ i(q, { className: e, content: r == null ? void 0 : r.printTooltip, children: t }), fi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(qr, { localeMessages: e, children: /* @__PURE__ */ i(te, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Ur, {}) }) }), gi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ z(qr, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2344
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ur, {}) }),
|
|
2353
2345
|
e == null ? void 0 : e.printLabel
|
|
2354
|
-
] }) }),
|
|
2355
|
-
const { print: t, cancel: e, setOnProgress:
|
|
2346
|
+
] }) }), Zr = () => {
|
|
2347
|
+
const { print: t, cancel: e, setOnProgress: r, setOnComplete: o, setOnError: n, progress: a } = et(), { printTool: c = !0 } = _e(), { isSmallScreen: s } = Re(), { localeMessages: u } = me();
|
|
2356
2348
|
return c ? s ? /* @__PURE__ */ i(gi, { print: t, localeMessages: u }) : typeof c == "function" ? /* @__PURE__ */ i(
|
|
2357
2349
|
c,
|
|
2358
2350
|
{
|
|
2359
2351
|
print: t,
|
|
2360
2352
|
cancel: e,
|
|
2361
|
-
setOnProgress:
|
|
2362
|
-
setOnError:
|
|
2353
|
+
setOnProgress: r,
|
|
2354
|
+
setOnError: n,
|
|
2363
2355
|
setOnComplete: o,
|
|
2364
2356
|
progress: a
|
|
2365
2357
|
}
|
|
@@ -2368,32 +2360,32 @@ const Se = {
|
|
|
2368
2360
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2369
2361
|
}, _i = () => {
|
|
2370
2362
|
const { goToFirstPageIcon: t } = fe();
|
|
2371
|
-
return t || /* @__PURE__ */ i(
|
|
2363
|
+
return t || /* @__PURE__ */ i(fr, { className: vi["rp-go-to-Top"] });
|
|
2372
2364
|
}, wi = () => {
|
|
2373
2365
|
const { goToLastPageIcon: t } = fe();
|
|
2374
|
-
return t || /* @__PURE__ */ i(
|
|
2375
|
-
},
|
|
2376
|
-
const { goToPage: t, totalPages: e, focusedPage:
|
|
2366
|
+
return t || /* @__PURE__ */ i(fr, {});
|
|
2367
|
+
}, rr = { width: "100%" }, bi = () => {
|
|
2368
|
+
const { goToPage: t, totalPages: e, focusedPage: r } = ce(), { jumpNavigationTool: o = !0 } = _e(), { localeMessages: n } = me(), a = k(() => r === 1, [r]), c = k(() => r === e, [r, e]), s = x(() => {
|
|
2377
2369
|
t(1);
|
|
2378
2370
|
}, [t]), u = x(() => {
|
|
2379
2371
|
t(e);
|
|
2380
2372
|
}, [t, e]);
|
|
2381
2373
|
return o ? /* @__PURE__ */ z(Ue, { children: [
|
|
2382
|
-
/* @__PURE__ */ i(we, { onClick: s, children: /* @__PURE__ */ i(q, { content:
|
|
2374
|
+
/* @__PURE__ */ i(we, { onClick: s, children: /* @__PURE__ */ i(q, { content: n == null ? void 0 : n.firstPageTooltip, style: rr, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2383
2375
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(_i, {}) }),
|
|
2384
|
-
/* @__PURE__ */ i("span", { children:
|
|
2376
|
+
/* @__PURE__ */ i("span", { children: n == null ? void 0 : n.firstPageLabel })
|
|
2385
2377
|
] }) }) }),
|
|
2386
|
-
/* @__PURE__ */ i(we, { onClick: u, children: /* @__PURE__ */ i(q, { content:
|
|
2378
|
+
/* @__PURE__ */ i(we, { onClick: u, children: /* @__PURE__ */ i(q, { content: n == null ? void 0 : n.lastPageTooltip, style: rr, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2387
2379
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(wi, {}) }),
|
|
2388
|
-
/* @__PURE__ */ i("span", { children:
|
|
2380
|
+
/* @__PURE__ */ i("span", { children: n == null ? void 0 : n.lastPageLabel })
|
|
2389
2381
|
] }) }) }),
|
|
2390
|
-
/* @__PURE__ */ i(
|
|
2382
|
+
/* @__PURE__ */ i(yt, {})
|
|
2391
2383
|
] }) : null;
|
|
2392
2384
|
}, Ci = () => {
|
|
2393
2385
|
const { container: t } = xe(), { isSmallScreen: e } = Re(), {
|
|
2394
|
-
openFileTool:
|
|
2386
|
+
openFileTool: r,
|
|
2395
2387
|
downloadTool: o,
|
|
2396
|
-
documentProperties:
|
|
2388
|
+
documentProperties: n,
|
|
2397
2389
|
scrollModeTool: a,
|
|
2398
2390
|
rotateTool: c,
|
|
2399
2391
|
selectionModeTool: s,
|
|
@@ -2402,37 +2394,37 @@ const Se = {
|
|
|
2402
2394
|
fullscreenTool: d
|
|
2403
2395
|
} = _e(), { localeMessages: f } = me();
|
|
2404
2396
|
return k(() => {
|
|
2405
|
-
const g = u || c || s || a ||
|
|
2397
|
+
const g = u || c || s || a || n;
|
|
2406
2398
|
let _ = !1;
|
|
2407
|
-
return e && (_ = !(!
|
|
2399
|
+
return e && (_ = !(!r && !o && !l && !d)), g || _;
|
|
2408
2400
|
}, [
|
|
2409
|
-
n,
|
|
2410
|
-
o,
|
|
2411
2401
|
r,
|
|
2402
|
+
o,
|
|
2403
|
+
n,
|
|
2412
2404
|
a,
|
|
2413
2405
|
c,
|
|
2414
2406
|
s,
|
|
2415
2407
|
u,
|
|
2416
2408
|
e
|
|
2417
|
-
]) ? /* @__PURE__ */ z(
|
|
2409
|
+
]) ? /* @__PURE__ */ z(Qn, { children: [
|
|
2418
2410
|
/* @__PURE__ */ i(
|
|
2419
|
-
|
|
2411
|
+
pr,
|
|
2420
2412
|
{
|
|
2421
2413
|
container: t,
|
|
2422
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(te, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(
|
|
2414
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(te, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Hn, {}) }) }) }),
|
|
2423
2415
|
children: /* @__PURE__ */ z("div", { className: ui["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2424
2416
|
e && /* @__PURE__ */ z(Ue, { children: [
|
|
2425
|
-
/* @__PURE__ */ i(
|
|
2426
|
-
/* @__PURE__ */ i(
|
|
2427
|
-
/* @__PURE__ */ i(
|
|
2428
|
-
/* @__PURE__ */ i(
|
|
2429
|
-
/* @__PURE__ */ i(
|
|
2417
|
+
/* @__PURE__ */ i(dr, {}),
|
|
2418
|
+
/* @__PURE__ */ i(Vr, {}),
|
|
2419
|
+
/* @__PURE__ */ i(Zr, {}),
|
|
2420
|
+
/* @__PURE__ */ i(mr, {}),
|
|
2421
|
+
/* @__PURE__ */ i(yt, {})
|
|
2430
2422
|
] }),
|
|
2431
2423
|
/* @__PURE__ */ i(bi, {}),
|
|
2432
|
-
/* @__PURE__ */ i(eo, {}),
|
|
2433
|
-
/* @__PURE__ */ i(oo, {}),
|
|
2434
2424
|
/* @__PURE__ */ i(to, {}),
|
|
2435
|
-
/* @__PURE__ */ i(
|
|
2425
|
+
/* @__PURE__ */ i(io, {}),
|
|
2426
|
+
/* @__PURE__ */ i(ro, {}),
|
|
2427
|
+
/* @__PURE__ */ i(eo, {})
|
|
2436
2428
|
] })
|
|
2437
2429
|
}
|
|
2438
2430
|
),
|
|
@@ -2441,12 +2433,12 @@ const Se = {
|
|
|
2441
2433
|
}, Ti = () => {
|
|
2442
2434
|
const { isSmallScreen: t } = Re();
|
|
2443
2435
|
return /* @__PURE__ */ z(Ie, { children: [
|
|
2444
|
-
/* @__PURE__ */ i(
|
|
2436
|
+
/* @__PURE__ */ i(Mn, {}),
|
|
2445
2437
|
!t && /* @__PURE__ */ z(Ie, { children: [
|
|
2446
|
-
/* @__PURE__ */ i(
|
|
2447
|
-
/* @__PURE__ */ i(
|
|
2448
|
-
/* @__PURE__ */ i(
|
|
2449
|
-
/* @__PURE__ */ i(
|
|
2438
|
+
/* @__PURE__ */ i(dr, {}),
|
|
2439
|
+
/* @__PURE__ */ i(Vr, {}),
|
|
2440
|
+
/* @__PURE__ */ i(Zr, {}),
|
|
2441
|
+
/* @__PURE__ */ i(mr, {})
|
|
2450
2442
|
] }),
|
|
2451
2443
|
/* @__PURE__ */ i(Ci, {})
|
|
2452
2444
|
] });
|
|
@@ -2458,12 +2450,12 @@ const Se = {
|
|
|
2458
2450
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2459
2451
|
}, Pi = 25, mt = 1e3, Si = [50, 75, 100, 125, 150, 200, 300, 400], Ii = () => {
|
|
2460
2452
|
const { zoomInIcon: t } = fe();
|
|
2461
|
-
return t || /* @__PURE__ */ i(
|
|
2453
|
+
return t || /* @__PURE__ */ i(ao, {});
|
|
2462
2454
|
}, yi = () => {
|
|
2463
2455
|
const { zoomOutIcon: t } = fe();
|
|
2464
|
-
return t || /* @__PURE__ */ i(
|
|
2456
|
+
return t || /* @__PURE__ */ i(so, {});
|
|
2465
2457
|
}, xi = () => {
|
|
2466
|
-
const { zoomLevel: t, setZoomLevel: e } = Xe(), { container:
|
|
2458
|
+
const { zoomLevel: t, setZoomLevel: e } = Xe(), { container: r, contentRef: o } = xe(), { zoomTool: n = !0 } = _e(), { focusedPage: a } = ce(), { rotate: c } = Ke(), { pages: s } = X(), { isSmallScreen: u } = Re(), { localeMessages: l } = me(), d = x(() => {
|
|
2467
2459
|
e((w) => {
|
|
2468
2460
|
const m = Math.floor(w / 25) * 25;
|
|
2469
2461
|
return Math.min(m + 25, mt);
|
|
@@ -2478,7 +2470,7 @@ const Se = {
|
|
|
2478
2470
|
return (w = s.get(a)) == null ? void 0 : w.page.getViewport({ scale: 1, rotation: c });
|
|
2479
2471
|
}, [s, a, c]), b = x(
|
|
2480
2472
|
(w) => {
|
|
2481
|
-
const m = ((_ == null ? void 0 : _.width) || 0) + 2 *
|
|
2473
|
+
const m = ((_ == null ? void 0 : _.width) || 0) + 2 * Ht, T = ((_ == null ? void 0 : _.height) || 0) + 2 * Ht, I = (o == null ? void 0 : o.clientWidth) || 0, p = (o == null ? void 0 : o.clientHeight) || 0, P = co(w, I, p, m, T);
|
|
2482
2474
|
e(P);
|
|
2483
2475
|
},
|
|
2484
2476
|
[e, _]
|
|
@@ -2488,7 +2480,7 @@ const Se = {
|
|
|
2488
2480
|
},
|
|
2489
2481
|
[e, b]
|
|
2490
2482
|
);
|
|
2491
|
-
return typeof
|
|
2483
|
+
return typeof n != "boolean" ? /* @__PURE__ */ i(n, { zoomLevel: t, setZoomLevel: e }) : n ? /* @__PURE__ */ z("div", { className: Ne["rp-zoom-wrapper"], children: [
|
|
2492
2484
|
/* @__PURE__ */ i(q, { content: l == null ? void 0 : l.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2493
2485
|
te,
|
|
2494
2486
|
{
|
|
@@ -2499,9 +2491,9 @@ const Se = {
|
|
|
2499
2491
|
}
|
|
2500
2492
|
) }),
|
|
2501
2493
|
!u && /* @__PURE__ */ i(
|
|
2502
|
-
|
|
2494
|
+
pr,
|
|
2503
2495
|
{
|
|
2504
|
-
container:
|
|
2496
|
+
container: r,
|
|
2505
2497
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: l == null ? void 0 : l.zoomSelectTooltip, children: /* @__PURE__ */ z(
|
|
2506
2498
|
te,
|
|
2507
2499
|
{
|
|
@@ -2522,7 +2514,7 @@ const Se = {
|
|
|
2522
2514
|
/* @__PURE__ */ i(we, { onClick: () => v(ot.PAGE_FIT), children: l == null ? void 0 : l.zoomPageFit }),
|
|
2523
2515
|
/* @__PURE__ */ i(we, { onClick: () => v(ot.PAGE_WIDTH), children: l == null ? void 0 : l.zoomPageWidth })
|
|
2524
2516
|
] }),
|
|
2525
|
-
/* @__PURE__ */ i(
|
|
2517
|
+
/* @__PURE__ */ i(yt, {}),
|
|
2526
2518
|
/* @__PURE__ */ i(Ue, { children: Si.map((w) => /* @__PURE__ */ z(we, { onClick: () => v(w), children: [
|
|
2527
2519
|
w,
|
|
2528
2520
|
" %"
|
|
@@ -2540,7 +2532,7 @@ const Se = {
|
|
|
2540
2532
|
}
|
|
2541
2533
|
) })
|
|
2542
2534
|
] }) : null;
|
|
2543
|
-
},
|
|
2535
|
+
}, ne = {
|
|
2544
2536
|
"rp-search-tool-content": "_rp-search-tool-content_jvchu_1",
|
|
2545
2537
|
"rp-search-tool-input": "_rp-search-tool-input_jvchu_8",
|
|
2546
2538
|
"rp-search-tool-input-icon": "_rp-search-tool-input-icon_jvchu_14",
|
|
@@ -2550,11 +2542,11 @@ const Se = {
|
|
|
2550
2542
|
"rp-search-tool-input-clear": "_rp-search-tool-input-clear_jvchu_43",
|
|
2551
2543
|
"rp-search-input": "_rp-search-input_jvchu_57",
|
|
2552
2544
|
"rp-search-icon-info": "_rp-search-icon-info_jvchu_62"
|
|
2553
|
-
},
|
|
2545
|
+
}, nr = () => {
|
|
2554
2546
|
const { searchIcon: t } = fe();
|
|
2555
|
-
return t || /* @__PURE__ */ i(
|
|
2547
|
+
return t || /* @__PURE__ */ i(lo, {});
|
|
2556
2548
|
}, Ri = () => {
|
|
2557
|
-
const { container: t } = xe(), [e,
|
|
2549
|
+
const { container: t } = xe(), [e, r] = $(!1), { pdf: o } = X(), [n, a] = $(null), {
|
|
2558
2550
|
searchOptions: c,
|
|
2559
2551
|
setSearchOptions: s,
|
|
2560
2552
|
loading: u,
|
|
@@ -2564,10 +2556,10 @@ const Se = {
|
|
|
2564
2556
|
nextMatch: h,
|
|
2565
2557
|
prevMatch: g,
|
|
2566
2558
|
search: _
|
|
2567
|
-
} =
|
|
2568
|
-
|
|
2559
|
+
} = Tr(), { searchTool: b = !0 } = _e(), [v, w] = $(_), { localeMessages: m } = me(), T = x(() => {
|
|
2560
|
+
r(!0);
|
|
2569
2561
|
}, []), I = x(() => {
|
|
2570
|
-
l(""), w(""),
|
|
2562
|
+
l(""), w(""), r(!1);
|
|
2571
2563
|
}, [l]), p = (y) => {
|
|
2572
2564
|
const N = y.key === "Enter", G = y.key === " ";
|
|
2573
2565
|
(N || G) && I();
|
|
@@ -2585,8 +2577,8 @@ const Se = {
|
|
|
2585
2577
|
O(() => (window.addEventListener("keydown", P), () => {
|
|
2586
2578
|
window.removeEventListener("keydown", P);
|
|
2587
2579
|
}), [P]), O(() => {
|
|
2588
|
-
|
|
2589
|
-
}, [
|
|
2580
|
+
n && n.focus();
|
|
2581
|
+
}, [n]);
|
|
2590
2582
|
const S = x((y) => {
|
|
2591
2583
|
w(y.target.value);
|
|
2592
2584
|
}, []), A = x(() => {
|
|
@@ -2605,41 +2597,41 @@ const Se = {
|
|
|
2605
2597
|
return O(() => {
|
|
2606
2598
|
I();
|
|
2607
2599
|
}, [o, I]), b ? /* @__PURE__ */ i(Ie, { children: /* @__PURE__ */ i(
|
|
2608
|
-
|
|
2600
|
+
zn,
|
|
2609
2601
|
{
|
|
2610
2602
|
open: e,
|
|
2611
2603
|
container: t,
|
|
2612
|
-
triggerComponent: /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(te, { onClick: T, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(
|
|
2613
|
-
children: /* @__PURE__ */ z("div", { className:
|
|
2614
|
-
/* @__PURE__ */ z("div", { className:
|
|
2615
|
-
/* @__PURE__ */ z("div", { className:
|
|
2604
|
+
triggerComponent: /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(te, { onClick: T, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(nr, {}) }) }),
|
|
2605
|
+
children: /* @__PURE__ */ z("div", { className: ne["rp-search-tool-content"], children: [
|
|
2606
|
+
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-input-wrapper"], children: [
|
|
2607
|
+
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-input"], children: [
|
|
2616
2608
|
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2617
|
-
|
|
2609
|
+
ar,
|
|
2618
2610
|
{
|
|
2619
2611
|
value: v,
|
|
2620
2612
|
onKeyDown: C,
|
|
2621
2613
|
onChange: S,
|
|
2622
|
-
icon: /* @__PURE__ */ i(
|
|
2614
|
+
icon: /* @__PURE__ */ i(nr, {}),
|
|
2623
2615
|
placeholder: m == null ? void 0 : m.searchInputPlaceholder,
|
|
2624
|
-
className:
|
|
2616
|
+
className: ne["rp-search-input"],
|
|
2625
2617
|
ref: a,
|
|
2626
|
-
children: !!v && /* @__PURE__ */ i("span", { className:
|
|
2618
|
+
children: !!v && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: A, children: /* @__PURE__ */ i(uo, {}) })
|
|
2627
2619
|
}
|
|
2628
2620
|
) }),
|
|
2629
|
-
u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
2621
|
+
u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Pt, {}) }) : /* @__PURE__ */ i("span", { children: R })
|
|
2630
2622
|
] }),
|
|
2631
|
-
/* @__PURE__ */ z("div", { className:
|
|
2632
|
-
/* @__PURE__ */ i(
|
|
2633
|
-
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className:
|
|
2634
|
-
/* @__PURE__ */ i(
|
|
2635
|
-
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className:
|
|
2623
|
+
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
|
|
2624
|
+
/* @__PURE__ */ i($t, { name: "matchCase", value: L, onChange: F, children: m == null ? void 0 : m.searchMatchCaseLabel }),
|
|
2625
|
+
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
|
|
2626
|
+
/* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: E, children: m == null ? void 0 : m.searchWholeWordsLabel }),
|
|
2627
|
+
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
|
|
2636
2628
|
] })
|
|
2637
2629
|
] }),
|
|
2638
|
-
/* @__PURE__ */ z("div", { className:
|
|
2630
|
+
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-controls"], children: [
|
|
2639
2631
|
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchPrevTooltip, children: /* @__PURE__ */ i(te, { onClick: g, "aria-label": m == null ? void 0 : m.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
2640
2632
|
ke,
|
|
2641
2633
|
{
|
|
2642
|
-
className:
|
|
2634
|
+
className: ne["rp-search-tool-input-icon"],
|
|
2643
2635
|
"aria-disabled": !d
|
|
2644
2636
|
}
|
|
2645
2637
|
) }) }),
|
|
@@ -2647,7 +2639,7 @@ const Se = {
|
|
|
2647
2639
|
ke,
|
|
2648
2640
|
{
|
|
2649
2641
|
style: { transform: "rotate(180deg" },
|
|
2650
|
-
className:
|
|
2642
|
+
className: ne["rp-search-tool-input-icon"],
|
|
2651
2643
|
"aria-disabled": !d
|
|
2652
2644
|
}
|
|
2653
2645
|
) }) }),
|
|
@@ -2656,7 +2648,7 @@ const Se = {
|
|
|
2656
2648
|
{
|
|
2657
2649
|
onKeyDown: p,
|
|
2658
2650
|
"aria-label": m == null ? void 0 : m.searchCloseButtonTooltip,
|
|
2659
|
-
children: /* @__PURE__ */ i(
|
|
2651
|
+
children: /* @__PURE__ */ i(hr, { onClick: I, className: ne["rp-search-tool-input-icon"] })
|
|
2660
2652
|
}
|
|
2661
2653
|
) })
|
|
2662
2654
|
] })
|
|
@@ -2672,10 +2664,10 @@ const Se = {
|
|
|
2672
2664
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_1ln1d_52",
|
|
2673
2665
|
loading: Li
|
|
2674
2666
|
}, Ni = ({ percentage: t }) => {
|
|
2675
|
-
const { cancel: e } = et(), { localeMessages:
|
|
2667
|
+
const { cancel: e } = et(), { localeMessages: r } = me();
|
|
2676
2668
|
return t < 1 ? null : /* @__PURE__ */ i("div", { className: oe(Ee["rp-loading-overlay"]), children: /* @__PURE__ */ z("div", { className: oe(Ee["rp-loading-modal"]), children: [
|
|
2677
2669
|
/* @__PURE__ */ z("div", { className: oe(Ee["rp-loading-title"]), children: [
|
|
2678
|
-
|
|
2670
|
+
r == null ? void 0 : r.printLoadingMessage,
|
|
2679
2671
|
"..."
|
|
2680
2672
|
] }),
|
|
2681
2673
|
/* @__PURE__ */ i("div", { className: oe(Ee["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
|
|
@@ -2685,10 +2677,10 @@ const Se = {
|
|
|
2685
2677
|
style: { width: `${t}%` }
|
|
2686
2678
|
}
|
|
2687
2679
|
) }),
|
|
2688
|
-
/* @__PURE__ */ i("button", { className: oe(Ee["rp-loading-cancel-button"]), onClick: e, children:
|
|
2680
|
+
/* @__PURE__ */ i("button", { className: oe(Ee["rp-loading-cancel-button"]), onClick: e, children: r == null ? void 0 : r.printCancelLabel })
|
|
2689
2681
|
] }) });
|
|
2690
2682
|
}, Ei = Be((t, e) => {
|
|
2691
|
-
const { showPrintProgress:
|
|
2683
|
+
const { showPrintProgress: r } = _e(), { progress: o } = et(), { isSmallScreen: n } = Re(), { percentage: a } = o || {}, c = () => n ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2692
2684
|
return /* @__PURE__ */ z("div", { children: [
|
|
2693
2685
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: ze["rp-toolbar-content"], children: /* @__PURE__ */ z("div", { className: ze["rp-toolbar-wrapper"], style: c(), children: [
|
|
2694
2686
|
/* @__PURE__ */ z("div", { "data-rp": "topBarLeft", className: ze["rp-toolbar-start"], children: [
|
|
@@ -2698,7 +2690,7 @@ const Se = {
|
|
|
2698
2690
|
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: ze["rp-toolbar-middle"], children: /* @__PURE__ */ i(xi, {}) }),
|
|
2699
2691
|
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: ze["rp-toolbar-end"], children: /* @__PURE__ */ i(Ti, {}) })
|
|
2700
2692
|
] }) }),
|
|
2701
|
-
|
|
2693
|
+
r && a ? /* @__PURE__ */ i(Ni, { percentage: a }) : null
|
|
2702
2694
|
] });
|
|
2703
2695
|
}), ft = {
|
|
2704
2696
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_4wlw3_1",
|
|
@@ -2712,17 +2704,17 @@ const Se = {
|
|
|
2712
2704
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2713
2705
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2714
2706
|
}, Oi = (t) => {
|
|
2715
|
-
const { thumbnailSrc: e, pageNumber:
|
|
2716
|
-
width: Math.round(
|
|
2717
|
-
height: Math.round(
|
|
2718
|
-
}), [
|
|
2719
|
-
|
|
2720
|
-
}, [a,
|
|
2707
|
+
const { thumbnailSrc: e, pageNumber: r, isFocused: o, viewport: n } = t, { goToPage: a } = ce(), c = k(() => o ? Ae["rp-thumbnail-active"] : "", [o]), s = k(() => ({
|
|
2708
|
+
width: Math.round(n.width),
|
|
2709
|
+
height: Math.round(n.height)
|
|
2710
|
+
}), [n]), u = x(() => {
|
|
2711
|
+
r && a(r);
|
|
2712
|
+
}, [a, r]);
|
|
2721
2713
|
return /* @__PURE__ */ z(
|
|
2722
2714
|
"div",
|
|
2723
2715
|
{
|
|
2724
2716
|
onClick: u,
|
|
2725
|
-
id: `page-${
|
|
2717
|
+
id: `page-${r}`,
|
|
2726
2718
|
className: Ae["rp-thumbnail-wrapper"],
|
|
2727
2719
|
children: [
|
|
2728
2720
|
/* @__PURE__ */ i("div", { className: oe(c, Ae["rp-thumbnail"]), children: e ? /* @__PURE__ */ i(
|
|
@@ -2741,29 +2733,29 @@ const Se = {
|
|
|
2741
2733
|
width: `${s.width}px`,
|
|
2742
2734
|
height: `${s.height}px`
|
|
2743
2735
|
},
|
|
2744
|
-
children: /* @__PURE__ */ i(
|
|
2736
|
+
children: /* @__PURE__ */ i(Pt, {})
|
|
2745
2737
|
}
|
|
2746
2738
|
) }),
|
|
2747
|
-
/* @__PURE__ */ i("div", { className: Ae["rp-thumbnail-text"], children:
|
|
2739
|
+
/* @__PURE__ */ i("div", { className: Ae["rp-thumbnail-text"], children: r })
|
|
2748
2740
|
]
|
|
2749
2741
|
}
|
|
2750
2742
|
);
|
|
2751
|
-
},
|
|
2743
|
+
}, or = {
|
|
2752
2744
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2753
2745
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2754
2746
|
}, Di = 16, zi = (t, e) => {
|
|
2755
|
-
const
|
|
2756
|
-
t && (
|
|
2747
|
+
const r = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
2748
|
+
t && (r != null && r.offsetTop) && (t.scrollTop = (r == null ? void 0 : r.offsetTop) - Di);
|
|
2757
2749
|
}, Ai = Be((t, e) => {
|
|
2758
|
-
const { show:
|
|
2759
|
-
|
|
2750
|
+
const { show: r } = t, { focusedPage: o, totalPages: n } = ce(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: u } = br(), l = W(null), d = W(1);
|
|
2751
|
+
ir(e, () => l.current);
|
|
2760
2752
|
const f = k(() => Object.values(a), [a]), h = x(() => {
|
|
2761
2753
|
const g = s + 1;
|
|
2762
|
-
g <=
|
|
2763
|
-
}, [c,
|
|
2754
|
+
g <= n && c(g);
|
|
2755
|
+
}, [c, n, s]);
|
|
2764
2756
|
return O(() => {
|
|
2765
|
-
o > s ? u(o) :
|
|
2766
|
-
}, [o, s, u,
|
|
2757
|
+
o > s ? u(o) : r && d.current !== o && (zi(l.current, o), d.current = o);
|
|
2758
|
+
}, [o, s, u, r, f]), _n(l.current, h), /* @__PURE__ */ i("div", { ref: l, className: or["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: or["rp-thumbnails"], children: r ? f.map((g, _) => {
|
|
2767
2759
|
var b, v;
|
|
2768
2760
|
return /* @__PURE__ */ i(
|
|
2769
2761
|
Oi,
|
|
@@ -2779,9 +2771,9 @@ const Se = {
|
|
|
2779
2771
|
}) : null }) });
|
|
2780
2772
|
}), Fi = () => {
|
|
2781
2773
|
const { thumbnailIcon: t } = fe();
|
|
2782
|
-
return t || /* @__PURE__ */ i(
|
|
2774
|
+
return t || /* @__PURE__ */ i(vn, {});
|
|
2783
2775
|
}, ki = () => {
|
|
2784
|
-
const { active: t, setActive: e } =
|
|
2776
|
+
const { active: t, setActive: e } = br(), [r, o] = $(200), n = W(null), { thumbnailTool: a, sidebarEnable: c } = _e(), { localeMessages: s } = me(), u = x(() => {
|
|
2785
2777
|
e((d) => !d);
|
|
2786
2778
|
}, []), l = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: t }) : a ? /* @__PURE__ */ i(q, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
2787
2779
|
te,
|
|
@@ -2795,7 +2787,7 @@ const Se = {
|
|
|
2795
2787
|
return /* @__PURE__ */ i(Ie, { children: c && /* @__PURE__ */ z(
|
|
2796
2788
|
"div",
|
|
2797
2789
|
{
|
|
2798
|
-
style: { "--rp-thumbnail-width": `${
|
|
2790
|
+
style: { "--rp-thumbnail-width": `${r}px` },
|
|
2799
2791
|
className: ft["rp-sidebar-content-wrapper"],
|
|
2800
2792
|
"data-rp": "sidebar",
|
|
2801
2793
|
children: [
|
|
@@ -2807,35 +2799,35 @@ const Se = {
|
|
|
2807
2799
|
hidden: !t,
|
|
2808
2800
|
className: ft["rp-thumbnails-wrapper"],
|
|
2809
2801
|
children: [
|
|
2810
|
-
/* @__PURE__ */ i(Ai, { show: t, ref:
|
|
2811
|
-
/* @__PURE__ */ i(
|
|
2802
|
+
/* @__PURE__ */ i(Ai, { show: t, ref: n }),
|
|
2803
|
+
/* @__PURE__ */ i(wn, { onWidthChange: o, thumbnailRef: n })
|
|
2812
2804
|
]
|
|
2813
2805
|
}
|
|
2814
2806
|
)
|
|
2815
2807
|
]
|
|
2816
2808
|
}
|
|
2817
2809
|
) });
|
|
2818
|
-
},
|
|
2819
|
-
const { children:
|
|
2810
|
+
}, Ps = Be((t, e) => {
|
|
2811
|
+
const { children: r, slots: o, icons: n, style: a, className: c, mobileWidth: s, onLoaded: u, cleanupOnLoaded: l } = t, [d, f] = $(null), { setContainer: h, setContentRef: g } = xe(), { loading: _ } = X(), { LoaderImageComponent: b } = ur();
|
|
2820
2812
|
return O(() => (u && u(), () => {
|
|
2821
2813
|
l && l();
|
|
2822
|
-
}), [u, l]), /* @__PURE__ */ i("div", { ref: e, className: oe(Pe["rp-theme-variables"], Pe["rp-container"]), children: /* @__PURE__ */ i(
|
|
2823
|
-
|
|
2814
|
+
}), [u, l]), /* @__PURE__ */ i("div", { ref: e, className: oe(Pe["rp-theme-variables"], Pe["rp-container"]), children: /* @__PURE__ */ i(In, { mobileWidth: s, children: /* @__PURE__ */ i(bn, { slots: o, children: /* @__PURE__ */ i(Cn, { icons: n, children: /* @__PURE__ */ z(
|
|
2815
|
+
Tn,
|
|
2824
2816
|
{
|
|
2825
2817
|
getContainerRef: h,
|
|
2826
2818
|
toolbarRef: d,
|
|
2827
2819
|
style: a,
|
|
2828
2820
|
className: c,
|
|
2829
2821
|
children: [
|
|
2830
|
-
/* @__PURE__ */ z(
|
|
2822
|
+
/* @__PURE__ */ z(Pn, { children: [
|
|
2831
2823
|
/* @__PURE__ */ z("div", { className: Pe["rp-layout"], children: [
|
|
2832
2824
|
/* @__PURE__ */ i(Ei, { ref: f }),
|
|
2833
2825
|
/* @__PURE__ */ z("div", { className: Pe["rp-content"], children: [
|
|
2834
2826
|
/* @__PURE__ */ i("div", { className: Pe["rp-sidebar"], children: /* @__PURE__ */ i(ki, {}) }),
|
|
2835
|
-
/* @__PURE__ */ i("div", { ref: g, className: Pe["rp-pages"], children:
|
|
2827
|
+
/* @__PURE__ */ i("div", { ref: g, className: Pe["rp-pages"], children: r })
|
|
2836
2828
|
] })
|
|
2837
2829
|
] }),
|
|
2838
|
-
/* @__PURE__ */ i(
|
|
2830
|
+
/* @__PURE__ */ i(Sn, {})
|
|
2839
2831
|
] }),
|
|
2840
2832
|
_ ? /* @__PURE__ */ i(
|
|
2841
2833
|
"div",
|
|
@@ -2875,41 +2867,41 @@ export {
|
|
|
2875
2867
|
go as C,
|
|
2876
2868
|
$o as D,
|
|
2877
2869
|
Oi as E,
|
|
2878
|
-
|
|
2870
|
+
Vr as F,
|
|
2879
2871
|
Ai as G,
|
|
2880
2872
|
ki as H,
|
|
2881
2873
|
Ni as L,
|
|
2882
2874
|
bi as M,
|
|
2883
2875
|
Ci as O,
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2876
|
+
gs as P,
|
|
2877
|
+
bs as R,
|
|
2878
|
+
ws as S,
|
|
2879
|
+
_s as T,
|
|
2888
2880
|
xi as Z,
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2881
|
+
vs as a,
|
|
2882
|
+
Ps as b,
|
|
2883
|
+
Hr as c,
|
|
2892
2884
|
et as d,
|
|
2893
|
-
|
|
2894
|
-
|
|
2885
|
+
Tr as e,
|
|
2886
|
+
gr as f,
|
|
2895
2887
|
po as g,
|
|
2896
|
-
|
|
2888
|
+
vr as h,
|
|
2897
2889
|
ho as i,
|
|
2898
|
-
|
|
2890
|
+
_r as j,
|
|
2899
2891
|
mo as k,
|
|
2900
|
-
|
|
2901
|
-
|
|
2892
|
+
wr as l,
|
|
2893
|
+
br as m,
|
|
2902
2894
|
fo as n,
|
|
2903
|
-
|
|
2895
|
+
Cr as o,
|
|
2904
2896
|
vo as p,
|
|
2905
2897
|
Co as q,
|
|
2906
|
-
|
|
2898
|
+
xt as r,
|
|
2907
2899
|
Wo as s,
|
|
2908
2900
|
Go as t,
|
|
2909
2901
|
ce as u,
|
|
2910
2902
|
Zo as v,
|
|
2911
2903
|
li as w,
|
|
2912
|
-
|
|
2904
|
+
Zr as x,
|
|
2913
2905
|
Ti as y,
|
|
2914
2906
|
Ri as z
|
|
2915
2907
|
};
|