@pdf-viewer/react 1.7.0-beta.3 → 1.7.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{RPDefaultLayout-d16fdf0e.js → RPDefaultLayout-45eb04c1.js} +1210 -1201
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- package/dist/components/layout/toolbar/Paginate.js +5 -2
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/main.js +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/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as i, Fragment as
|
|
1
|
+
import { jsx as i, Fragment as me, jsxs as F } from "react/jsx-runtime";
|
|
2
2
|
import * as B from "react";
|
|
3
|
-
import { useRef as H, useEffect as k, useCallback as N, useState as $,
|
|
4
|
-
import { ChevronUpIcon as
|
|
3
|
+
import { useRef as H, useEffect as k, useCallback as N, useState as $, useMemo as W, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as Ve, PureComponent as Qn, Component as er, memo as ln } from "react";
|
|
4
|
+
import { ChevronUpIcon as He } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as re } from "./components/ui/Button.js";
|
|
6
|
-
import { UIInput as
|
|
7
|
-
import { ViewMode as
|
|
8
|
-
import { useScrollModeContext as
|
|
9
|
-
import { useDocumentContext as
|
|
6
|
+
import { UIInput as dn } from "./components/ui/Input.js";
|
|
7
|
+
import { ViewMode as Ie, ScrollMode as J, AnnotationSubType as At, SelectionMode as tr, ZoomLevel as at } from "./utils/types.js";
|
|
8
|
+
import { useScrollModeContext as Re } from "./contexts/ScrollModeContext.js";
|
|
9
|
+
import { useDocumentContext as Q } from "./contexts/RPDocumentContext.js";
|
|
10
10
|
import { useDocumentPasswordContext as nr } from "./contexts/DocumentPasswordContext.js";
|
|
11
11
|
import { useDarkModeContext as rr } from "./contexts/DarkModeContext.js";
|
|
12
12
|
import { useRotationContext as Ge } from "./contexts/RotationContext.js";
|
|
13
13
|
import { useLayerContext as or } from "./contexts/LayerContext.js";
|
|
14
14
|
import { useZoomContext as Qe } from "./contexts/ZoomContext.js";
|
|
15
|
-
import { useViewModeContext as
|
|
15
|
+
import { useViewModeContext as Ee } from "./contexts/ViewModeContext.js";
|
|
16
16
|
import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
|
|
17
|
-
import { useVirtualGridContext as
|
|
17
|
+
import { useVirtualGridContext as un } from "./contexts/VirtualGridContext.js";
|
|
18
18
|
import { useSelectionModeContext as ir } from "./contexts/SelectionModeContext.js";
|
|
19
19
|
import { useInitialStateContext as ar } from "./contexts/InitialStateContext.js";
|
|
20
20
|
import { useFullScreenContext as sr } from "./contexts/FullScreenContext.js";
|
|
@@ -28,13 +28,13 @@ import { useLocalizationContext as se } from "./contexts/LocalizationContext.js"
|
|
|
28
28
|
import { useHighlightContext as pr } from "./contexts/HighlightContext.js";
|
|
29
29
|
import "./contexts/LicenseContext.js";
|
|
30
30
|
import { useDownloadContext as hr } from "./contexts/DownloadContext.js";
|
|
31
|
-
import { useSmoothScrollContext as
|
|
32
|
-
import { useLoaderContext as
|
|
31
|
+
import { useSmoothScrollContext as pn } from "./contexts/SmoothScrollContext.js";
|
|
32
|
+
import { useLoaderContext as hn } from "./contexts/LoaderContext.js";
|
|
33
33
|
import "./components/RPConfig.js";
|
|
34
|
-
import { ThumbnailIcon as
|
|
34
|
+
import { ThumbnailIcon as fr } from "./components/icons/Thumbnail.js";
|
|
35
35
|
import { c as ne } from "./clsx-0c6e471a.js";
|
|
36
36
|
import { LoaderIcon as Ct } from "./components/icons/LoaderIcon.js";
|
|
37
|
-
import { useInfiniteScroll as
|
|
37
|
+
import { useInfiniteScroll as mr } from "./utils/hooks/useInfiniteScroll.js";
|
|
38
38
|
import { RPSplitter as gr } from "./components/layout/sidebar/RPSplitter.js";
|
|
39
39
|
import { useToolbarComponentContext as ve, ToolbarComponentProvider as vr } from "./contexts/ToolbarComponentContext.js";
|
|
40
40
|
import { useIconContext as pe, IconProvider as wr } from "./contexts/IconContext.js";
|
|
@@ -42,30 +42,30 @@ import K from "./components/ui/RPTooltip.js";
|
|
|
42
42
|
import { Container as _r } from "./components/layout/Container.js";
|
|
43
43
|
import { WrapperLayout as br } from "./components/layout/WrapperLayout.js";
|
|
44
44
|
import { RPDropFileZone as Cr } from "./components/RPDropFileZone.js";
|
|
45
|
-
import { useViewportContext as Ce, ViewportProvider as
|
|
46
|
-
import { useThemeContext as
|
|
45
|
+
import { useViewportContext as Ce, ViewportProvider as Pr } from "./contexts/ViewportContext.js";
|
|
46
|
+
import { useThemeContext as Tr } from "./contexts/ThemeContext.js";
|
|
47
47
|
import * as Sr from "pdfjs-dist";
|
|
48
|
-
import { PixelsPerInch as yr, AnnotationMode as xr, RenderingCancelledException as Ir, AnnotationLayer as
|
|
49
|
-
import { SimpleLinkService as
|
|
48
|
+
import { PixelsPerInch as yr, AnnotationMode as xr, RenderingCancelledException as Ir, AnnotationLayer as Lr } from "pdfjs-dist";
|
|
49
|
+
import { SimpleLinkService as Rr } from "./utils/link_service.js";
|
|
50
50
|
import { annotationsEvents as Er, annotationEventsHandler as Nr, handleClick as zt, handleAnnotationWidget as Or, handleAnnotationLink as Dr, bindLayerEvents as Ar, unbindLayerEvents as Ft } from "./utils/annotations.js";
|
|
51
51
|
import { normalizeSingleKeyword as zr, sortHighlightPosition as Fr, unwrap as kr } from "./components/page/searchHighlight.js";
|
|
52
52
|
import { _ as Wr, U as Mr } from "./Popover-b7402893.js";
|
|
53
53
|
import { useMousePressed as Hr } from "./utils/hooks/useMousePressed.js";
|
|
54
54
|
import { useGrabScroll as $r } from "./utils/hooks/useGrabScroll.js";
|
|
55
55
|
import { usePinch as Gr } from "./utils/hooks/usePinch.js";
|
|
56
|
-
import { useDebounce as
|
|
56
|
+
import { useDebounce as Pt } from "./utils/hooks/useDebounce.js";
|
|
57
57
|
import qr from "./components/ui/PasswordModal.js";
|
|
58
|
-
import { getPositionFromPage as
|
|
59
|
-
import { getScrollDistance as
|
|
58
|
+
import { getPositionFromPage as Ur, getPageFromPosition as Vr } from "./utils/calculatePage.js";
|
|
59
|
+
import { getScrollDistance as ze } from "./utils/getScrollDistance.js";
|
|
60
60
|
import { getWordPositionInPage as Br } from "./utils/getWordPositionInPage.js";
|
|
61
61
|
import { getThumbnailViewport as kt } from "./utils/getThumbnailViewport.js";
|
|
62
62
|
import { smoothScrollTo as st } from "./utils/smoothScrollTo.js";
|
|
63
63
|
import { appConsole as Zr } from "./utils/appConsole.js";
|
|
64
|
-
import { FileUploadTool as
|
|
64
|
+
import { FileUploadTool as fn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
65
65
|
import { DarkModeTool as jr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
66
66
|
import { ThreeDotIcon as Kr } from "./components/icons/ThreeDotIcon.js";
|
|
67
67
|
import { UIDropDown as mn } from "./components/ui/DropDown.js";
|
|
68
|
-
import { e as Xr, a as
|
|
68
|
+
import { e as Xr, a as Tt, P as Ue, c as Me, g as St, i as Yr, k as Jr, f as Qr } from "./index-1cb41342.js";
|
|
69
69
|
import { D as eo, u as ct } from "./index-aa2d3884.js";
|
|
70
70
|
import { a as to, u as no, F as ro, b as oo, G as Ke } from "./index-7279fb4e.js";
|
|
71
71
|
import { h as io } from "./component-1da194e8.js";
|
|
@@ -76,13 +76,13 @@ import { useOtherToolContext as co, OtherToolProvider as lo } from "./contexts/O
|
|
|
76
76
|
import { DocumentProperties as uo } from "./components/layout/toolbar/DocumentProperties.js";
|
|
77
77
|
import { RotateTool as po } from "./components/layout/toolbar/RotateTool.js";
|
|
78
78
|
import { ViewModeTool as ho } from "./components/layout/toolbar/ViewModeTool.js";
|
|
79
|
-
import { ScrollModeTool as
|
|
79
|
+
import { ScrollModeTool as fo } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
80
80
|
import { MenuSeparator as yt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
81
|
-
import { FileDownloadDefaultIcon as
|
|
81
|
+
import { FileDownloadDefaultIcon as mo } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
82
82
|
import { MenuItem as be } from "./components/layout/toolbar/MenuItem.js";
|
|
83
83
|
import { PrintDefaultTool as go } from "./components/icons/PrintDefaultIcon.js";
|
|
84
|
-
import { FullScreenTool as
|
|
85
|
-
import { GoToDownIcon as
|
|
84
|
+
import { FullScreenTool as gn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
85
|
+
import { GoToDownIcon as vn } from "./components/icons/GoToDownIcon.js";
|
|
86
86
|
import { SelectionModeTool as vo } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
87
87
|
import { ZoomInIcon as wo } from "./components/icons/ZoomInIcon.js";
|
|
88
88
|
import { ZoomOutIcon as _o } from "./components/icons/ZoomOutIcon.js";
|
|
@@ -91,23 +91,23 @@ import { getZoomLevel as bo } from "./utils/getZoomLevel.js";
|
|
|
91
91
|
import { SearchIcon as Co } from "./components/icons/SearchIcon.js";
|
|
92
92
|
import { c as Y, S as Ht } from "./SearchCloseButton-ddb9877e.js";
|
|
93
93
|
import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
94
|
-
import { ClearIcon as
|
|
94
|
+
import { ClearIcon as Po } from "./components/icons/ClearIcon.js";
|
|
95
95
|
import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
|
|
96
|
-
import './assets/RPDefaultLayout.css';const
|
|
97
|
-
const { viewMode:
|
|
96
|
+
import './assets/RPDefaultLayout.css';const wn = () => {
|
|
97
|
+
const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: d, heights: p } = qe(), m = H(e), v = H(t), h = H(c), { targetScrollPage: w } = pn();
|
|
98
98
|
k(() => {
|
|
99
|
-
n != null && n.scrollToItem && (
|
|
99
|
+
n != null && n.scrollToItem && (l.current = n);
|
|
100
100
|
}, [n]), k(() => {
|
|
101
|
-
m.current =
|
|
102
|
-
}, [
|
|
103
|
-
const
|
|
104
|
-
(
|
|
101
|
+
m.current = e, v.current = t;
|
|
102
|
+
}, [e, t]);
|
|
103
|
+
const C = N(
|
|
104
|
+
(P, T) => {
|
|
105
105
|
if (!r)
|
|
106
106
|
return;
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
107
|
+
const u = Math.ceil(P / 2) * 2 - 1;
|
|
108
|
+
if (P === u + 1) {
|
|
109
109
|
const g = {
|
|
110
|
-
left: u
|
|
110
|
+
left: d[u],
|
|
111
111
|
top: 0
|
|
112
112
|
};
|
|
113
113
|
return new Promise(
|
|
@@ -120,150 +120,152 @@ import './assets/RPDefaultLayout.css';const vn = () => {
|
|
|
120
120
|
};
|
|
121
121
|
return r == null ? void 0 : r.scrollTo({
|
|
122
122
|
...f,
|
|
123
|
-
behavior:
|
|
123
|
+
behavior: T
|
|
124
124
|
});
|
|
125
125
|
},
|
|
126
|
-
[r,
|
|
126
|
+
[r, d, st]
|
|
127
127
|
);
|
|
128
128
|
return k(() => {
|
|
129
|
-
m.current =
|
|
130
|
-
}, [
|
|
131
|
-
h.current =
|
|
132
|
-
}, [
|
|
133
|
-
(
|
|
134
|
-
a(
|
|
135
|
-
const
|
|
136
|
-
let f =
|
|
137
|
-
if (v.current ===
|
|
138
|
-
|
|
129
|
+
m.current = e, v.current = t;
|
|
130
|
+
}, [e, t]), k(() => {
|
|
131
|
+
h.current = c;
|
|
132
|
+
}, [c]), { scrollToPage: N(
|
|
133
|
+
(P, T = "smooth") => {
|
|
134
|
+
a(P);
|
|
135
|
+
const u = P - 1;
|
|
136
|
+
let f = u, g = 0;
|
|
137
|
+
if (v.current === Ie.DUAL_PAGE && m.current === J.PAGE_SCROLLING) {
|
|
138
|
+
C(P, T);
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
|
-
if (m.current ===
|
|
142
|
-
a(
|
|
141
|
+
if (m.current === J.PAGE_SCROLLING) {
|
|
142
|
+
a(P);
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
|
-
if (!
|
|
145
|
+
if (!l.current || !o)
|
|
146
146
|
return;
|
|
147
147
|
const s = o;
|
|
148
|
-
if (w.current =
|
|
149
|
-
g =
|
|
148
|
+
if (w.current = P, m.current === J.HORIZONTAL_SCROLLING) {
|
|
149
|
+
g = u;
|
|
150
150
|
const S = {
|
|
151
|
-
left:
|
|
151
|
+
left: ze(d, g),
|
|
152
152
|
top: 0
|
|
153
153
|
};
|
|
154
154
|
return s.scrollTo({
|
|
155
155
|
...S,
|
|
156
|
-
behavior:
|
|
156
|
+
behavior: T
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
if (v.current ===
|
|
160
|
-
g =
|
|
159
|
+
if (v.current === Ie.DUAL_PAGE) {
|
|
160
|
+
g = u % 2, f = Math.floor(u / 2);
|
|
161
161
|
const S = {
|
|
162
|
-
left:
|
|
163
|
-
top:
|
|
162
|
+
left: ze(d, g),
|
|
163
|
+
top: ze(p, f)
|
|
164
164
|
};
|
|
165
165
|
return s.scrollTo({
|
|
166
166
|
...S,
|
|
167
|
-
behavior:
|
|
167
|
+
behavior: T
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
const b = {
|
|
171
171
|
left: 0,
|
|
172
|
-
top:
|
|
172
|
+
top: ze(p, f)
|
|
173
173
|
};
|
|
174
174
|
return s.scrollTo({
|
|
175
175
|
...b,
|
|
176
|
-
behavior:
|
|
176
|
+
behavior: T
|
|
177
177
|
});
|
|
178
178
|
},
|
|
179
179
|
[
|
|
180
180
|
o,
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
c,
|
|
182
|
+
C,
|
|
183
183
|
a,
|
|
184
184
|
st,
|
|
185
185
|
p,
|
|
186
|
-
|
|
186
|
+
d
|
|
187
187
|
]
|
|
188
188
|
) };
|
|
189
|
-
},
|
|
190
|
-
const [
|
|
191
|
-
(
|
|
192
|
-
if (!/^[0-9]*$/g.test(
|
|
193
|
-
return { success: !1, currentPage:
|
|
194
|
-
const
|
|
195
|
-
return
|
|
189
|
+
}, To = (t = 1) => {
|
|
190
|
+
const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ee(), { scrollMode: d } = Re(), { widths: p } = qe(), { pagesRef: m } = ge(), v = Pt(e, 100), h = N(
|
|
191
|
+
(f) => {
|
|
192
|
+
if (!/^[0-9]*$/g.test(f.toString()) || !f)
|
|
193
|
+
return { success: !1, currentPage: l.current };
|
|
194
|
+
const s = +f;
|
|
195
|
+
return s < 0 || s > o ? { success: !1, currentPage: l.current } : (n(s), l.current = s, { success: !0, currentPage: +f });
|
|
196
196
|
},
|
|
197
197
|
[o]
|
|
198
|
-
), w = N(h, [h]),
|
|
199
|
-
(
|
|
200
|
-
const
|
|
201
|
-
return
|
|
198
|
+
), w = N(h, [h]), C = N(
|
|
199
|
+
(f) => {
|
|
200
|
+
const g = h(f);
|
|
201
|
+
return g.success && a(g.currentPage), g;
|
|
202
202
|
},
|
|
203
203
|
[h, a]
|
|
204
|
-
),
|
|
205
|
-
const
|
|
206
|
-
if (!m ||
|
|
204
|
+
), y = N((f) => {
|
|
205
|
+
const g = f % 2 === 1;
|
|
206
|
+
if (!m || g)
|
|
207
207
|
return !1;
|
|
208
|
-
const
|
|
209
|
-
return
|
|
210
|
-
}, [
|
|
211
|
-
let
|
|
212
|
-
|
|
213
|
-
}, [T,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
208
|
+
const s = g ? p[f] : p[f - 1], b = g ? p[f + 1] : p[f];
|
|
209
|
+
return c === Ie.DUAL_PAGE && s + b < m.clientWidth;
|
|
210
|
+
}, [c, p, m, o]), P = N(() => {
|
|
211
|
+
let f = e - 1;
|
|
212
|
+
y(f) && (f = e - 2), C(f);
|
|
213
|
+
}, [C, e, c, d, y]), T = W(() => c === Ie.DUAL_PAGE && d === J.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, d]), u = N(() => {
|
|
214
|
+
if (T)
|
|
215
|
+
return;
|
|
216
|
+
let f = e + 1;
|
|
217
|
+
y(f) && (f = e + 2), C(f);
|
|
218
|
+
}, [C, e, y, c, d, T]);
|
|
217
219
|
return {
|
|
218
220
|
focusedPage: v,
|
|
219
221
|
totalPages: o,
|
|
220
222
|
setFocusedPage: w,
|
|
221
223
|
setTotalPages: r,
|
|
222
|
-
nextPage:
|
|
223
|
-
prevPage:
|
|
224
|
-
goToPage:
|
|
224
|
+
nextPage: u,
|
|
225
|
+
prevPage: P,
|
|
226
|
+
goToPage: C
|
|
225
227
|
};
|
|
226
|
-
},
|
|
228
|
+
}, _n = Ye({
|
|
227
229
|
focusedPage: 0,
|
|
228
|
-
setFocusedPage: (
|
|
230
|
+
setFocusedPage: (t) => {
|
|
229
231
|
},
|
|
230
|
-
goToPage: (
|
|
232
|
+
goToPage: (t) => ({ success: !!t, currentPage: +t }),
|
|
231
233
|
totalPages: 0,
|
|
232
|
-
setTotalPages: (
|
|
234
|
+
setTotalPages: (t) => {
|
|
233
235
|
},
|
|
234
236
|
prevPage: () => {
|
|
235
237
|
},
|
|
236
238
|
nextPage: () => {
|
|
237
239
|
}
|
|
238
240
|
}), ie = () => {
|
|
239
|
-
const
|
|
240
|
-
return typeof (
|
|
241
|
-
}, Ms = ({ children:
|
|
242
|
-
const { pdf:
|
|
241
|
+
const t = Je(_n);
|
|
242
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && Zr.error("Please use this hooks inside children component of RPProvider"), t;
|
|
243
|
+
}, Ms = ({ children: t }) => {
|
|
244
|
+
const { pdf: e } = Q(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: c, prevPage: d } = To();
|
|
243
245
|
return k(() => {
|
|
244
|
-
|
|
245
|
-
}, [
|
|
246
|
-
|
|
246
|
+
e != null && e.numPages && (a(e.numPages), r(1));
|
|
247
|
+
}, [e, a, r]), /* @__PURE__ */ i(
|
|
248
|
+
_n.Provider,
|
|
247
249
|
{
|
|
248
250
|
value: {
|
|
249
251
|
focusedPage: n,
|
|
250
252
|
totalPages: o,
|
|
251
253
|
setFocusedPage: r,
|
|
252
254
|
setTotalPages: a,
|
|
253
|
-
nextPage:
|
|
254
|
-
prevPage:
|
|
255
|
-
goToPage:
|
|
255
|
+
nextPage: c,
|
|
256
|
+
prevPage: d,
|
|
257
|
+
goToPage: l
|
|
256
258
|
},
|
|
257
|
-
children:
|
|
259
|
+
children: t
|
|
258
260
|
}
|
|
259
261
|
);
|
|
260
262
|
};
|
|
261
263
|
const So = () => {
|
|
262
|
-
const { pdf:
|
|
264
|
+
const { pdf: t, pages: e } = Q(), [n, o] = $({
|
|
263
265
|
loadedPages: 0,
|
|
264
266
|
totalPages: 0,
|
|
265
267
|
percentage: 0
|
|
266
|
-
}), [r, a] = $(!1), [
|
|
268
|
+
}), [r, a] = $(!1), [l, c] = $(!1), [d, p] = $(null), m = H(!1);
|
|
267
269
|
k(() => {
|
|
268
270
|
m.current;
|
|
269
271
|
}, [m]);
|
|
@@ -272,14 +274,14 @@ const So = () => {
|
|
|
272
274
|
const f = document.querySelector(".rp-print-zone");
|
|
273
275
|
f && f.remove();
|
|
274
276
|
}, []), h = N(() => {
|
|
275
|
-
m.current = !1, a(!1),
|
|
277
|
+
m.current = !1, a(!1), c(!1), p(null), o({
|
|
276
278
|
loadedPages: 0,
|
|
277
279
|
totalPages: 0,
|
|
278
280
|
percentage: 0
|
|
279
281
|
});
|
|
280
282
|
}, []), w = () => {
|
|
281
283
|
m.current = !0;
|
|
282
|
-
},
|
|
284
|
+
}, C = async ({
|
|
283
285
|
scratchCanvas: f,
|
|
284
286
|
pdfDocument: g,
|
|
285
287
|
pageNumber: s,
|
|
@@ -294,8 +296,8 @@ const So = () => {
|
|
|
294
296
|
}
|
|
295
297
|
const x = _ / yr.PDF;
|
|
296
298
|
f.width = Math.floor(b.width * x), f.height = Math.floor(b.height * x);
|
|
297
|
-
const
|
|
298
|
-
|
|
299
|
+
const L = f.getContext("2d");
|
|
300
|
+
L.save(), L.fillStyle = "rgb(255, 255, 255)", L.fillRect(0, 0, f.width, f.height), L.restore();
|
|
299
301
|
const [D, A] = await Promise.all([
|
|
300
302
|
g.getPage(s),
|
|
301
303
|
E
|
|
@@ -305,7 +307,7 @@ const So = () => {
|
|
|
305
307
|
return;
|
|
306
308
|
}
|
|
307
309
|
const z = {
|
|
308
|
-
canvasContext:
|
|
310
|
+
canvasContext: L,
|
|
309
311
|
transform: [x, 0, 0, x, 0, 0],
|
|
310
312
|
viewport: D.getViewport({ scale: 1, rotation: b.rotation }),
|
|
311
313
|
intent: "print",
|
|
@@ -315,10 +317,10 @@ const So = () => {
|
|
|
315
317
|
};
|
|
316
318
|
try {
|
|
317
319
|
return D.render(z).promise;
|
|
318
|
-
} catch (
|
|
319
|
-
throw
|
|
320
|
+
} catch (R) {
|
|
321
|
+
throw R instanceof Ir || console.error(R), R;
|
|
320
322
|
}
|
|
321
|
-
},
|
|
323
|
+
}, y = N(() => {
|
|
322
324
|
const f = window.print;
|
|
323
325
|
return new Promise((g) => {
|
|
324
326
|
const s = (S) => {
|
|
@@ -335,7 +337,7 @@ const So = () => {
|
|
|
335
337
|
});
|
|
336
338
|
_.observe(document.body, { childList: !0, subtree: !0 });
|
|
337
339
|
});
|
|
338
|
-
}, []),
|
|
340
|
+
}, []), P = async (f) => {
|
|
339
341
|
const g = document.createElement("img"), s = document.createElement("div");
|
|
340
342
|
return s.classList.add("rp-print-page"), await new Promise((b, _) => {
|
|
341
343
|
f.toBlob((S) => {
|
|
@@ -345,7 +347,7 @@ const So = () => {
|
|
|
345
347
|
});
|
|
346
348
|
}).catch(() => {
|
|
347
349
|
}), s.appendChild(g), s;
|
|
348
|
-
},
|
|
350
|
+
}, T = (f, g) => {
|
|
349
351
|
const s = document.createElement("div");
|
|
350
352
|
s.classList.add("rp-print-zone");
|
|
351
353
|
const b = document.createElement("style"), _ = g.get(1);
|
|
@@ -354,25 +356,25 @@ const So = () => {
|
|
|
354
356
|
b.innerHTML = `@page { size: ${S}px ${E}px }`;
|
|
355
357
|
}
|
|
356
358
|
return s.appendChild(b), s.append(...f), s;
|
|
357
|
-
},
|
|
358
|
-
if (!
|
|
359
|
+
}, u = N(async () => {
|
|
360
|
+
if (!t)
|
|
359
361
|
return;
|
|
360
362
|
h();
|
|
361
363
|
const f = document.createElement("canvas"), g = [];
|
|
362
364
|
try {
|
|
363
|
-
|
|
364
|
-
const b =
|
|
365
|
-
|
|
366
|
-
), S =
|
|
367
|
-
for (const [x,
|
|
365
|
+
t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
366
|
+
const b = t.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
|
|
367
|
+
t.annotationStorage.print ?? void 0
|
|
368
|
+
), S = e.size;
|
|
369
|
+
for (const [x, L] of e) {
|
|
368
370
|
if (m.current) {
|
|
369
371
|
h();
|
|
370
372
|
return;
|
|
371
373
|
}
|
|
372
|
-
const D =
|
|
373
|
-
if (await
|
|
374
|
+
const D = L.page.getViewport({ scale: 1 });
|
|
375
|
+
if (await C({
|
|
374
376
|
scratchCanvas: f,
|
|
375
|
-
pdfDocument:
|
|
377
|
+
pdfDocument: t,
|
|
376
378
|
pageNumber: x,
|
|
377
379
|
viewerPdfPage: D,
|
|
378
380
|
printResolution: 150,
|
|
@@ -382,7 +384,7 @@ const So = () => {
|
|
|
382
384
|
h();
|
|
383
385
|
return;
|
|
384
386
|
}
|
|
385
|
-
const A = await
|
|
387
|
+
const A = await P(f);
|
|
386
388
|
g.push(A);
|
|
387
389
|
const z = parseFloat((g.length / S * 100).toFixed(2));
|
|
388
390
|
o({
|
|
@@ -395,14 +397,14 @@ const So = () => {
|
|
|
395
397
|
h();
|
|
396
398
|
return;
|
|
397
399
|
}
|
|
398
|
-
const E =
|
|
399
|
-
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await
|
|
400
|
+
const E = T(g, e);
|
|
401
|
+
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await y();
|
|
400
402
|
} catch (s) {
|
|
401
|
-
|
|
403
|
+
c(!0), s instanceof Error && p(s);
|
|
402
404
|
} finally {
|
|
403
405
|
f.height = 0, f.width = 0;
|
|
404
406
|
}
|
|
405
|
-
}, [
|
|
407
|
+
}, [t, e, m]);
|
|
406
408
|
return k(() => {
|
|
407
409
|
const f = () => {
|
|
408
410
|
h(), v();
|
|
@@ -411,72 +413,72 @@ const So = () => {
|
|
|
411
413
|
window.removeEventListener("afterprint", f, !0);
|
|
412
414
|
};
|
|
413
415
|
}, [v, h]), {
|
|
414
|
-
print:
|
|
416
|
+
print: u,
|
|
415
417
|
cancel: w,
|
|
416
418
|
progress: n,
|
|
417
419
|
isComplete: r,
|
|
418
|
-
isError:
|
|
419
|
-
error:
|
|
420
|
+
isError: l,
|
|
421
|
+
error: d
|
|
420
422
|
};
|
|
421
|
-
},
|
|
423
|
+
}, bn = Ye({
|
|
422
424
|
print: () => {
|
|
423
425
|
},
|
|
424
426
|
cancel: () => {
|
|
425
427
|
},
|
|
426
|
-
setOnProgress: (
|
|
428
|
+
setOnProgress: (t) => {
|
|
427
429
|
},
|
|
428
430
|
progress: {},
|
|
429
|
-
setOnComplete: (
|
|
430
|
-
setOnError: (
|
|
431
|
+
setOnComplete: (t) => t(),
|
|
432
|
+
setOnError: (t) => {
|
|
431
433
|
try {
|
|
432
|
-
const
|
|
433
|
-
e
|
|
434
|
-
} catch (
|
|
435
|
-
console.error("Error in setOnError callback:",
|
|
434
|
+
const e = new Error("Print error occurred");
|
|
435
|
+
t(e);
|
|
436
|
+
} catch (e) {
|
|
437
|
+
console.error("Error in setOnError callback:", e);
|
|
436
438
|
}
|
|
437
439
|
}
|
|
438
|
-
}), Hs = ({ children:
|
|
439
|
-
const [
|
|
440
|
-
|
|
441
|
-
}, []), h = (
|
|
442
|
-
m &&
|
|
440
|
+
}), Hs = ({ children: t }) => {
|
|
441
|
+
const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: d, isError: p, error: m } = So(), v = N((P) => {
|
|
442
|
+
P && typeof P == "function" && r(() => P);
|
|
443
|
+
}, []), h = (P) => {
|
|
444
|
+
m && P(m);
|
|
443
445
|
}, w = N(
|
|
444
|
-
(
|
|
445
|
-
n(() =>
|
|
446
|
+
(P) => {
|
|
447
|
+
n(() => P);
|
|
446
448
|
},
|
|
447
|
-
[
|
|
449
|
+
[c, e]
|
|
448
450
|
);
|
|
449
451
|
k(() => {
|
|
450
|
-
|
|
451
|
-
}, [
|
|
452
|
-
p && h((
|
|
453
|
-
console.error(
|
|
452
|
+
d && o && C();
|
|
453
|
+
}, [d, o]), k(() => {
|
|
454
|
+
p && h((P) => {
|
|
455
|
+
console.error(P);
|
|
454
456
|
});
|
|
455
457
|
}, [p]), k(() => {
|
|
456
|
-
|
|
457
|
-
}, [
|
|
458
|
-
const
|
|
458
|
+
c && e && e(c);
|
|
459
|
+
}, [c, e]);
|
|
460
|
+
const C = () => {
|
|
459
461
|
o && (o(), r(null));
|
|
460
|
-
},
|
|
462
|
+
}, y = {
|
|
461
463
|
print: a,
|
|
462
|
-
cancel:
|
|
464
|
+
cancel: l,
|
|
463
465
|
setOnProgress: w,
|
|
464
466
|
setOnComplete: v,
|
|
465
467
|
setOnError: h,
|
|
466
|
-
progress:
|
|
468
|
+
progress: c
|
|
467
469
|
};
|
|
468
|
-
return /* @__PURE__ */ i(
|
|
470
|
+
return /* @__PURE__ */ i(bn.Provider, { value: y, children: t });
|
|
469
471
|
}, tt = () => {
|
|
470
|
-
const
|
|
471
|
-
if (!
|
|
472
|
+
const t = Je(bn);
|
|
473
|
+
if (!t)
|
|
472
474
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
473
|
-
return
|
|
475
|
+
return t;
|
|
474
476
|
}, yo = () => {
|
|
475
|
-
const [
|
|
476
|
-
(
|
|
477
|
-
if (!n.size ||
|
|
477
|
+
const [t, e] = $({}), { pages: n } = Q(), { rotate: o } = Ge(), r = W(() => Object.keys(t).length, [t]), a = N(
|
|
478
|
+
(c) => {
|
|
479
|
+
if (!n.size || c > n.size)
|
|
478
480
|
return;
|
|
479
|
-
const
|
|
481
|
+
const d = Array.from(n.values()).slice(0, c).map((v) => {
|
|
480
482
|
const { thumbnailViewport: h, scale: w } = kt(v.page, o);
|
|
481
483
|
return {
|
|
482
484
|
scale: w,
|
|
@@ -484,18 +486,18 @@ const So = () => {
|
|
|
484
486
|
loading: !0,
|
|
485
487
|
viewport: h
|
|
486
488
|
};
|
|
487
|
-
}), p =
|
|
488
|
-
|
|
489
|
+
}), p = d.reduce((v, h) => (v[h.page.pageNumber] = h, v), {});
|
|
490
|
+
e(p);
|
|
489
491
|
const m = [];
|
|
490
|
-
for (const v of
|
|
492
|
+
for (const v of d) {
|
|
491
493
|
const h = document.createElement("canvas"), w = vt(v.page, h, {
|
|
492
494
|
scale: v.scale,
|
|
493
495
|
rotate: o
|
|
494
496
|
}).promise.then(() => {
|
|
495
|
-
const
|
|
497
|
+
const C = h.toDataURL();
|
|
496
498
|
return {
|
|
497
499
|
...v,
|
|
498
|
-
thumbnailSrc:
|
|
500
|
+
thumbnailSrc: C,
|
|
499
501
|
loading: !1
|
|
500
502
|
};
|
|
501
503
|
});
|
|
@@ -503,10 +505,10 @@ const So = () => {
|
|
|
503
505
|
}
|
|
504
506
|
Promise.all(m).then((v) => {
|
|
505
507
|
const h = v.reduce(
|
|
506
|
-
(w,
|
|
508
|
+
(w, C) => (w[C.page.pageNumber] = C, w),
|
|
507
509
|
{}
|
|
508
510
|
);
|
|
509
|
-
|
|
511
|
+
e((w) => ({ ...w, ...h }));
|
|
510
512
|
}).catch(() => {
|
|
511
513
|
});
|
|
512
514
|
},
|
|
@@ -515,101 +517,101 @@ const So = () => {
|
|
|
515
517
|
k(() => {
|
|
516
518
|
a(10);
|
|
517
519
|
}, [a]);
|
|
518
|
-
const
|
|
519
|
-
(
|
|
520
|
+
const l = N(
|
|
521
|
+
(c) => {
|
|
520
522
|
if (!n)
|
|
521
523
|
return;
|
|
522
|
-
const
|
|
523
|
-
if (!
|
|
524
|
+
const d = n.get(c);
|
|
525
|
+
if (!d)
|
|
524
526
|
return;
|
|
525
|
-
|
|
527
|
+
e((m) => ({
|
|
526
528
|
...m,
|
|
527
|
-
[
|
|
529
|
+
[c]: {
|
|
528
530
|
loading: !0,
|
|
529
|
-
page:
|
|
530
|
-
viewport:
|
|
531
|
-
scale:
|
|
531
|
+
page: d.page,
|
|
532
|
+
viewport: d.thumbnailViewport,
|
|
533
|
+
scale: d.thumbnailScale
|
|
532
534
|
}
|
|
533
535
|
}));
|
|
534
536
|
const p = document.createElement("canvas");
|
|
535
|
-
vt(
|
|
536
|
-
const m = p.toDataURL(), { thumbnailViewport: v, scale: h } = kt(
|
|
537
|
+
vt(d.page, p, { scale: d.thumbnailScale, rotate: o }).promise.then(() => {
|
|
538
|
+
const m = p.toDataURL(), { thumbnailViewport: v, scale: h } = kt(d.page, o);
|
|
537
539
|
return {
|
|
538
540
|
scale: h,
|
|
539
541
|
thumbnailSrc: m,
|
|
540
|
-
page:
|
|
542
|
+
page: d.page,
|
|
541
543
|
loading: !1,
|
|
542
544
|
viewport: v
|
|
543
545
|
};
|
|
544
546
|
}).then((m) => {
|
|
545
|
-
|
|
547
|
+
e((v) => ({ ...v, [c]: m }));
|
|
546
548
|
});
|
|
547
549
|
},
|
|
548
550
|
[n, o]
|
|
549
551
|
);
|
|
550
|
-
return { thumbnailPages:
|
|
551
|
-
},
|
|
552
|
+
return { thumbnailPages: t, addPage: l, addToPage: a, thumbnailLength: r };
|
|
553
|
+
}, Cn = Ye({
|
|
552
554
|
thumbnailPages: {},
|
|
553
|
-
addPage: (
|
|
555
|
+
addPage: (t) => {
|
|
554
556
|
},
|
|
555
|
-
addToPage: (
|
|
557
|
+
addToPage: (t) => {
|
|
556
558
|
},
|
|
557
559
|
thumbnailLength: 0,
|
|
558
|
-
setActive: (
|
|
560
|
+
setActive: (t) => {
|
|
559
561
|
},
|
|
560
562
|
active: !1
|
|
561
|
-
}),
|
|
562
|
-
children:
|
|
563
|
-
initialThumbnailsVisible:
|
|
563
|
+
}), Pn = () => Je(Cn), $s = ({
|
|
564
|
+
children: t,
|
|
565
|
+
initialThumbnailsVisible: e
|
|
564
566
|
}) => {
|
|
565
|
-
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = yo(), [
|
|
567
|
+
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = yo(), [l, c] = $(e);
|
|
566
568
|
return /* @__PURE__ */ i(
|
|
567
|
-
|
|
569
|
+
Cn.Provider,
|
|
568
570
|
{
|
|
569
|
-
value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active:
|
|
570
|
-
children:
|
|
571
|
+
value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: l, setActive: c },
|
|
572
|
+
children: t
|
|
571
573
|
}
|
|
572
574
|
);
|
|
573
|
-
}, xo = (
|
|
574
|
-
const [n, o] = $(
|
|
575
|
+
}, xo = (t = {}, e = "") => {
|
|
576
|
+
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: p } = qe(), m = H(!n), { currentZoom: v } = Qe(), [h, w] = $([]), { setFocusedPage: C } = ie(), { columnCount: y } = Ee(), { rotate: P } = Ge(), [T, u] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Re(), { pagesRef: b } = ge(), [_, S] = $(null), E = H({}), x = W(() => T === 0 ? null : h[T - 1], [T, h]), L = W(() => h.length, [h]);
|
|
575
577
|
k(() => {
|
|
576
|
-
if (!x || !
|
|
578
|
+
if (!x || !c)
|
|
577
579
|
return;
|
|
578
|
-
const
|
|
579
|
-
if (!
|
|
580
|
+
const R = g || f;
|
|
581
|
+
if (!R || !b)
|
|
580
582
|
return;
|
|
581
|
-
const I =
|
|
582
|
-
if (s ===
|
|
583
|
+
const I = c.get(x.page);
|
|
584
|
+
if (s === J.PAGE_SCROLLING && C(x.page), !I)
|
|
583
585
|
return;
|
|
584
|
-
let O = 0,
|
|
585
|
-
if (s ===
|
|
586
|
-
const ae = x.page - 1, de =
|
|
587
|
-
O =
|
|
586
|
+
let O = 0, M = 0;
|
|
587
|
+
if (s === J.VERTICAL_SCROLLING) {
|
|
588
|
+
const ae = x.page - 1, de = y, te = ae % de, Fe = Math.floor(ae / de);
|
|
589
|
+
O = ze(p, Fe), M = ze(d, te);
|
|
588
590
|
}
|
|
589
|
-
s ===
|
|
591
|
+
s === J.HORIZONTAL_SCROLLING && (M = d.slice(0, x.page - 1).reduce((ae, de) => ae + de, 0));
|
|
590
592
|
const G = {
|
|
591
593
|
top: b.clientHeight / 2,
|
|
592
594
|
left: b.clientWidth / 2
|
|
593
595
|
}, Z = {
|
|
594
596
|
height: p[x.page - 1],
|
|
595
|
-
width:
|
|
596
|
-
}, { leftInPage: j, topInPage:
|
|
597
|
+
width: d[x.page - 1]
|
|
598
|
+
}, { leftInPage: j, topInPage: V } = Br(
|
|
597
599
|
Z,
|
|
598
600
|
G,
|
|
599
601
|
x.rect,
|
|
600
602
|
v,
|
|
601
|
-
|
|
602
|
-
),
|
|
603
|
-
left: Math.max(
|
|
603
|
+
P
|
|
604
|
+
), ee = M + j, X = O + V, le = {
|
|
605
|
+
left: Math.max(ee, 0),
|
|
604
606
|
top: Math.max(X, 0)
|
|
605
607
|
};
|
|
606
|
-
|
|
608
|
+
R.scrollTo({
|
|
607
609
|
...le
|
|
608
610
|
});
|
|
609
611
|
}, [
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
612
|
+
c,
|
|
613
|
+
C,
|
|
614
|
+
d,
|
|
613
615
|
p,
|
|
614
616
|
x,
|
|
615
617
|
s,
|
|
@@ -618,48 +620,48 @@ const So = () => {
|
|
|
618
620
|
b
|
|
619
621
|
]);
|
|
620
622
|
const D = N(() => {
|
|
621
|
-
|
|
622
|
-
}, [
|
|
623
|
-
|
|
624
|
-
}, [
|
|
625
|
-
if (!
|
|
623
|
+
u((R) => L ? R + 1 > L ? 1 : R + 1 : 0);
|
|
624
|
+
}, [L]), A = N(() => {
|
|
625
|
+
u((R) => L ? R - 1 <= 0 ? L : R - 1 : 0);
|
|
626
|
+
}, [L]), z = N(async (R) => {
|
|
627
|
+
if (!R)
|
|
626
628
|
return {};
|
|
627
|
-
const I =
|
|
628
|
-
for (let
|
|
629
|
+
const I = R.numPages, O = {};
|
|
630
|
+
for (let M = 1; M <= I; M++) {
|
|
629
631
|
if (m.current)
|
|
630
632
|
throw "close pop over";
|
|
631
|
-
const G = await
|
|
632
|
-
O[
|
|
633
|
+
const G = await R.getPage(M);
|
|
634
|
+
O[M.toString()] = await G.getTextContent();
|
|
633
635
|
}
|
|
634
636
|
return O;
|
|
635
637
|
}, []);
|
|
636
638
|
return k(() => {
|
|
637
639
|
if (!n) {
|
|
638
|
-
m.current = !0, w([]),
|
|
640
|
+
m.current = !0, w([]), u(0);
|
|
639
641
|
return;
|
|
640
642
|
}
|
|
641
|
-
m.current = !1, a(!0), w([]),
|
|
642
|
-
E.current =
|
|
643
|
-
const O = Object.keys(
|
|
643
|
+
m.current = !1, a(!0), w([]), u(0), z(l).then((R) => {
|
|
644
|
+
E.current = R;
|
|
645
|
+
const O = Object.keys(R).reduce((M, G) => {
|
|
644
646
|
const Z = cr(
|
|
645
647
|
[n],
|
|
646
|
-
|
|
648
|
+
R[G],
|
|
647
649
|
Number(G) - 1,
|
|
648
|
-
|
|
649
|
-
).map((j,
|
|
650
|
-
return [...
|
|
650
|
+
t
|
|
651
|
+
).map((j, V) => ({ ...j, page: Number(G), pageMatchIdx: V }));
|
|
652
|
+
return [...M, ...Z];
|
|
651
653
|
}, []);
|
|
652
|
-
w(O),
|
|
654
|
+
w(O), u(O.length ? 1 : 0);
|
|
653
655
|
}).catch(() => {
|
|
654
|
-
w([]),
|
|
656
|
+
w([]), u(0);
|
|
655
657
|
}).finally(() => a(!1));
|
|
656
|
-
}, [n, z,
|
|
658
|
+
}, [n, z, l, t]), {
|
|
657
659
|
search: n,
|
|
658
660
|
setSearch: o,
|
|
659
661
|
loading: r,
|
|
660
662
|
matches: h,
|
|
661
|
-
totalMatches:
|
|
662
|
-
currentMatchPosition:
|
|
663
|
+
totalMatches: L,
|
|
664
|
+
currentMatchPosition: T,
|
|
663
665
|
currentMatch: x,
|
|
664
666
|
nextMatch: D,
|
|
665
667
|
prevMatch: A,
|
|
@@ -668,7 +670,7 @@ const So = () => {
|
|
|
668
670
|
};
|
|
669
671
|
}, Tn = Ye({
|
|
670
672
|
search: "",
|
|
671
|
-
setSearch: (
|
|
673
|
+
setSearch: (t) => {
|
|
672
674
|
},
|
|
673
675
|
loading: !1,
|
|
674
676
|
matches: [],
|
|
@@ -680,27 +682,27 @@ const So = () => {
|
|
|
680
682
|
prevMatch: () => {
|
|
681
683
|
},
|
|
682
684
|
searchOptions: {},
|
|
683
|
-
setSearchOptions: (
|
|
685
|
+
setSearchOptions: (t) => t,
|
|
684
686
|
currentMatchElement: null,
|
|
685
|
-
setCurrentMatchElement: (
|
|
687
|
+
setCurrentMatchElement: (t) => {
|
|
686
688
|
}
|
|
687
689
|
}), Gs = ({
|
|
688
|
-
children:
|
|
689
|
-
initialSearch:
|
|
690
|
+
children: t,
|
|
691
|
+
initialSearch: e
|
|
690
692
|
}) => {
|
|
691
693
|
const [n, o] = $({}), {
|
|
692
694
|
loading: r,
|
|
693
695
|
setSearch: a,
|
|
694
|
-
totalMatches:
|
|
695
|
-
currentMatchPosition:
|
|
696
|
-
currentMatch:
|
|
696
|
+
totalMatches: l,
|
|
697
|
+
currentMatchPosition: c,
|
|
698
|
+
currentMatch: d,
|
|
697
699
|
search: p,
|
|
698
700
|
matches: m,
|
|
699
701
|
nextMatch: v,
|
|
700
702
|
prevMatch: h,
|
|
701
703
|
currentMatchElement: w,
|
|
702
|
-
setCurrentMatchElement:
|
|
703
|
-
} = xo(n,
|
|
704
|
+
setCurrentMatchElement: C
|
|
705
|
+
} = xo(n, e);
|
|
704
706
|
return /* @__PURE__ */ i(
|
|
705
707
|
Tn.Provider,
|
|
706
708
|
{
|
|
@@ -709,17 +711,17 @@ const So = () => {
|
|
|
709
711
|
setSearchOptions: o,
|
|
710
712
|
loading: r,
|
|
711
713
|
setSearch: a,
|
|
712
|
-
totalMatches:
|
|
713
|
-
currentMatchPosition:
|
|
714
|
-
currentMatch:
|
|
714
|
+
totalMatches: l,
|
|
715
|
+
currentMatchPosition: c,
|
|
716
|
+
currentMatch: d,
|
|
715
717
|
nextMatch: v,
|
|
716
718
|
prevMatch: h,
|
|
717
719
|
search: p,
|
|
718
720
|
matches: m,
|
|
719
721
|
currentMatchElement: w,
|
|
720
|
-
setCurrentMatchElement:
|
|
722
|
+
setCurrentMatchElement: C
|
|
721
723
|
},
|
|
722
|
-
children:
|
|
724
|
+
children: t
|
|
723
725
|
}
|
|
724
726
|
);
|
|
725
727
|
}, xt = () => Je(Tn), ue = {
|
|
@@ -735,21 +737,21 @@ const So = () => {
|
|
|
735
737
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
736
738
|
"rp-page": "_rp-page_h7a2q_1",
|
|
737
739
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
738
|
-
}, Io = (
|
|
739
|
-
const { pageNumber:
|
|
740
|
+
}, Io = (t) => {
|
|
741
|
+
const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = H(null), { pages: a } = Q(), { rotate: l } = Ge(), c = H(), { currentZoom: d } = Qe();
|
|
740
742
|
return k(() => {
|
|
741
|
-
if (!a ||
|
|
743
|
+
if (!a || d === 0)
|
|
742
744
|
return;
|
|
743
|
-
const p = a.get(
|
|
745
|
+
const p = a.get(e);
|
|
744
746
|
if (r.current && p) {
|
|
745
747
|
const m = r.current;
|
|
746
748
|
m.hidden = !0;
|
|
747
|
-
const v =
|
|
748
|
-
v && v.cancel(), o && o(),
|
|
749
|
-
scale:
|
|
750
|
-
rotate:
|
|
749
|
+
const v = c.current;
|
|
750
|
+
v && v.cancel(), o && o(), c.current = vt(p.page, m, {
|
|
751
|
+
scale: d,
|
|
752
|
+
rotate: l,
|
|
751
753
|
renderForms: !0
|
|
752
|
-
}),
|
|
754
|
+
}), c.current.promise.then(() => {
|
|
753
755
|
m.hidden = !1;
|
|
754
756
|
}).catch(() => {
|
|
755
757
|
}).finally(() => {
|
|
@@ -758,34 +760,34 @@ const So = () => {
|
|
|
758
760
|
}
|
|
759
761
|
return () => {
|
|
760
762
|
var m;
|
|
761
|
-
(m =
|
|
763
|
+
(m = c.current) == null || m.cancel();
|
|
762
764
|
};
|
|
763
|
-
}, [a,
|
|
764
|
-
},
|
|
765
|
+
}, [a, e, l, d, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
|
|
766
|
+
}, Lo = "_selecting_1x8te_9", Ro = "_endOfContent_1x8te_24", he = {
|
|
765
767
|
"rp-text-layer": "_rp-text-layer_1x8te_1",
|
|
766
|
-
selecting:
|
|
767
|
-
endOfContent:
|
|
768
|
+
selecting: Lo,
|
|
769
|
+
endOfContent: Ro,
|
|
768
770
|
"rp-text-layer-text": "_rp-text-layer-text_1x8te_38"
|
|
769
|
-
}, Eo = (
|
|
770
|
-
const { pageNumber:
|
|
771
|
+
}, Eo = (t) => {
|
|
772
|
+
const { pageNumber: e } = t, { pages: n } = Q(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = xt(), [c, d] = $(
|
|
771
773
|
[]
|
|
772
|
-
), p = H(), m = H(), v = H(), h =
|
|
774
|
+
), p = H(), m = H(), v = H([]), h = W(() => r.filter((f) => f.pageIndex === e - 1), [r, e]), w = N(
|
|
773
775
|
(f, g, s = !1) => {
|
|
774
776
|
if (s && lr(f, g), !h.length) {
|
|
775
|
-
v.current =
|
|
777
|
+
v.current = [], d([]);
|
|
776
778
|
return;
|
|
777
779
|
}
|
|
778
780
|
const b = dr(h, f, g);
|
|
779
|
-
|
|
781
|
+
d(b);
|
|
780
782
|
},
|
|
781
783
|
[h]
|
|
782
|
-
),
|
|
784
|
+
), C = H(), y = H(!1), P = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
783
785
|
k(() => ((() => {
|
|
784
|
-
if (
|
|
786
|
+
if (C.current)
|
|
785
787
|
return;
|
|
786
|
-
|
|
787
|
-
const { signal: g } =
|
|
788
|
-
|
|
788
|
+
C.current = new AbortController();
|
|
789
|
+
const { signal: g } = C.current, s = () => {
|
|
790
|
+
P().forEach((_) => {
|
|
789
791
|
const S = _.querySelector(".endOfContent");
|
|
790
792
|
S && (_.appendChild(S), S.style.width = "", S.style.height = "", _.classList.remove(he.selecting));
|
|
791
793
|
});
|
|
@@ -793,25 +795,25 @@ const So = () => {
|
|
|
793
795
|
document.addEventListener(
|
|
794
796
|
"pointerdown",
|
|
795
797
|
() => {
|
|
796
|
-
|
|
798
|
+
y.current = !0;
|
|
797
799
|
},
|
|
798
800
|
{ signal: g }
|
|
799
801
|
), document.addEventListener(
|
|
800
802
|
"pointerup",
|
|
801
803
|
() => {
|
|
802
|
-
|
|
804
|
+
y.current = !1, s();
|
|
803
805
|
},
|
|
804
806
|
{ signal: g }
|
|
805
807
|
), window.addEventListener(
|
|
806
808
|
"blur",
|
|
807
809
|
() => {
|
|
808
|
-
|
|
810
|
+
y.current = !1, s();
|
|
809
811
|
},
|
|
810
812
|
{ signal: g }
|
|
811
813
|
), document.addEventListener(
|
|
812
814
|
"keyup",
|
|
813
815
|
() => {
|
|
814
|
-
|
|
816
|
+
y.current || s();
|
|
815
817
|
},
|
|
816
818
|
{ signal: g }
|
|
817
819
|
);
|
|
@@ -819,7 +821,7 @@ const So = () => {
|
|
|
819
821
|
document.addEventListener(
|
|
820
822
|
"selectionchange",
|
|
821
823
|
() => {
|
|
822
|
-
var z,
|
|
824
|
+
var z, R;
|
|
823
825
|
const _ = document.getSelection();
|
|
824
826
|
if (!_)
|
|
825
827
|
return;
|
|
@@ -830,11 +832,11 @@ const So = () => {
|
|
|
830
832
|
const S = /* @__PURE__ */ new Set();
|
|
831
833
|
for (let I = 0; I < _.rangeCount; I++) {
|
|
832
834
|
const O = _.getRangeAt(I);
|
|
833
|
-
|
|
834
|
-
O.intersectsNode(
|
|
835
|
+
P().forEach((M) => {
|
|
836
|
+
O.intersectsNode(M) && !S.has(M) && S.add(M);
|
|
835
837
|
});
|
|
836
838
|
}
|
|
837
|
-
|
|
839
|
+
P().forEach((I) => {
|
|
838
840
|
if (S.has(I))
|
|
839
841
|
I.classList.add(he.selecting);
|
|
840
842
|
else {
|
|
@@ -843,37 +845,40 @@ const So = () => {
|
|
|
843
845
|
}
|
|
844
846
|
});
|
|
845
847
|
const E = _.getRangeAt(0);
|
|
846
|
-
let
|
|
847
|
-
|
|
848
|
-
const D = (z =
|
|
848
|
+
let L = b && (E.compareBoundaryPoints(Range.END_TO_END, b) === 0 || E.compareBoundaryPoints(Range.START_TO_END, b) === 0) ? E.startContainer : E.endContainer;
|
|
849
|
+
L.nodeType === Node.TEXT_NODE && (L = L.parentNode);
|
|
850
|
+
const D = (z = L.parentElement) == null ? void 0 : z.closest(
|
|
849
851
|
he["rp-text-layer"]
|
|
850
852
|
), A = D == null ? void 0 : D.querySelector(".endOfContent");
|
|
851
|
-
A && D && (A.style.width = D.style.width, A.style.height = D.style.height, (
|
|
853
|
+
A && D && (A.style.width = D.style.width, A.style.height = D.style.height, (R = L.parentElement) == null || R.insertBefore(A, L.nextSibling)), b = E.cloneRange();
|
|
852
854
|
},
|
|
853
855
|
{ signal: g }
|
|
854
856
|
);
|
|
855
857
|
})(), () => {
|
|
856
858
|
var g;
|
|
857
|
-
(g =
|
|
858
|
-
}), [
|
|
859
|
-
const
|
|
859
|
+
(g = C.current) == null || g.abort(), C.current = void 0;
|
|
860
|
+
}), [P]);
|
|
861
|
+
const T = N(() => {
|
|
860
862
|
o.current && o.current.classList.add(he.selecting);
|
|
861
|
-
}, []),
|
|
863
|
+
}, []), u = N(() => {
|
|
862
864
|
o.current && o.current.classList.remove(he.selecting);
|
|
863
865
|
}, []);
|
|
864
866
|
return k(() => {
|
|
865
|
-
|
|
866
|
-
|
|
867
|
+
if (v.current.forEach((s) => {
|
|
868
|
+
s.classList.remove("selected");
|
|
869
|
+
}), !c.length || !a || a.pageIndex !== e - 1)
|
|
867
870
|
return;
|
|
868
871
|
const f = h.findIndex(
|
|
869
|
-
(
|
|
872
|
+
(s) => JSON.stringify(s) === JSON.stringify(a)
|
|
870
873
|
);
|
|
871
874
|
if (f === -1)
|
|
872
875
|
return;
|
|
873
|
-
const g =
|
|
874
|
-
g && (v.current = g.element,
|
|
875
|
-
|
|
876
|
-
|
|
876
|
+
const g = c.filter((s) => s.index === f);
|
|
877
|
+
g.length && (v.current = g.map((s) => s.element), l(g[0].element), g.forEach((s) => {
|
|
878
|
+
s.element.classList.add("selected");
|
|
879
|
+
}));
|
|
880
|
+
}, [a, c, h]), k(() => {
|
|
881
|
+
const f = n.get(e);
|
|
877
882
|
if (!f || !o.current)
|
|
878
883
|
return;
|
|
879
884
|
const g = o.current;
|
|
@@ -898,7 +903,7 @@ const So = () => {
|
|
|
898
903
|
var s;
|
|
899
904
|
(s = p.current) == null || s.cancel();
|
|
900
905
|
};
|
|
901
|
-
}, [n,
|
|
906
|
+
}, [n, e]), k(() => {
|
|
902
907
|
var s;
|
|
903
908
|
[].slice.call(o.current.children).forEach((b) => {
|
|
904
909
|
b.classList.add(he["rp-text-layer-text"]);
|
|
@@ -908,144 +913,144 @@ const So = () => {
|
|
|
908
913
|
}, [w]), /* @__PURE__ */ i(
|
|
909
914
|
"div",
|
|
910
915
|
{
|
|
911
|
-
"data-rp": `page-${
|
|
916
|
+
"data-rp": `page-${e}-textLayer`,
|
|
912
917
|
className: he["rp-text-layer"],
|
|
913
918
|
ref: o,
|
|
914
|
-
onMouseDown:
|
|
915
|
-
onMouseUp:
|
|
919
|
+
onMouseDown: T,
|
|
920
|
+
onMouseUp: u
|
|
916
921
|
}
|
|
917
922
|
);
|
|
918
923
|
}, No = {
|
|
919
924
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
920
925
|
};
|
|
921
926
|
let Oo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
922
|
-
const Do = (
|
|
923
|
-
const { pageNumber:
|
|
927
|
+
const Do = (t) => {
|
|
928
|
+
const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage: p } = ie(), { scrollMode: m } = Re(), { print: v } = tt(), { download: h } = $n(), w = W(() => o.get(e), [o, e]), C = W(() => w == null ? void 0 : w.page.getViewport(), [w]);
|
|
924
929
|
k(() => {
|
|
925
930
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
926
931
|
}, [r]), k(() => {
|
|
927
|
-
w && w.page.getAnnotations().then((
|
|
928
|
-
a.current = void 0,
|
|
932
|
+
w && w.page.getAnnotations().then((P) => {
|
|
933
|
+
a.current = void 0, c(P), n.current && (n.current.innerText = "");
|
|
929
934
|
});
|
|
930
935
|
}, [w]);
|
|
931
|
-
const
|
|
932
|
-
(
|
|
933
|
-
!
|
|
934
|
-
var
|
|
935
|
-
((
|
|
936
|
-
}), m ===
|
|
936
|
+
const y = N(
|
|
937
|
+
(P) => {
|
|
938
|
+
!l || !r || (Er(P), Nr(P, r, l).then((T) => {
|
|
939
|
+
var u, f;
|
|
940
|
+
((u = T == null ? void 0 : T.data) == null ? void 0 : u.action) === "Print" ? v() : ((f = T == null ? void 0 : T.data) == null ? void 0 : f.action) === "SaveAs" && h();
|
|
941
|
+
}), m === J.PAGE_SCROLLING ? zt(P, l, r, (T) => d(T.pageIndex + 1)) : zt(P, l, r, (T) => p(T.pageIndex + 1)));
|
|
937
942
|
},
|
|
938
|
-
[r,
|
|
943
|
+
[r, l, p, d, m, v, h]
|
|
939
944
|
);
|
|
940
945
|
return k(() => {
|
|
941
|
-
if (!w || !
|
|
946
|
+
if (!w || !l)
|
|
942
947
|
return;
|
|
943
|
-
const
|
|
948
|
+
const P = w.page.getViewport();
|
|
944
949
|
if (a.current) {
|
|
945
950
|
a.current.update({
|
|
946
|
-
viewport:
|
|
951
|
+
viewport: P.clone({ dontFlip: !0 })
|
|
947
952
|
});
|
|
948
953
|
return;
|
|
949
954
|
}
|
|
950
|
-
const
|
|
951
|
-
for (const g of
|
|
955
|
+
const T = /* @__PURE__ */ new Map([]);
|
|
956
|
+
for (const g of l) {
|
|
952
957
|
const { annotationType: s } = g;
|
|
953
958
|
switch (s) {
|
|
954
959
|
case At.Link:
|
|
955
960
|
Dr(g);
|
|
956
961
|
break;
|
|
957
962
|
case At.Widget:
|
|
958
|
-
Or(g,
|
|
963
|
+
Or(g, P, T);
|
|
959
964
|
break;
|
|
960
965
|
}
|
|
961
966
|
}
|
|
962
|
-
const
|
|
967
|
+
const u = new AbortController();
|
|
963
968
|
return (async () => {
|
|
964
969
|
var b;
|
|
965
|
-
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new
|
|
970
|
+
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new Lr({
|
|
966
971
|
div: n.current,
|
|
967
972
|
accessibilityManager: void 0,
|
|
968
973
|
annotationCanvasMap: void 0,
|
|
969
974
|
annotationEditorUIManager: void 0,
|
|
970
975
|
structTreeLayer: null,
|
|
971
976
|
page: w.page,
|
|
972
|
-
viewport:
|
|
973
|
-
}), n.current && Ft(n.current,
|
|
977
|
+
viewport: P.clone({ dontFlip: !0 })
|
|
978
|
+
}), n.current && Ft(n.current, y);
|
|
974
979
|
const g = await (r == null ? void 0 : r.hasJSActions()), s = await (r == null ? void 0 : r.getFieldObjects());
|
|
975
|
-
if (
|
|
980
|
+
if (u.signal.aborted)
|
|
976
981
|
throw "abort";
|
|
977
982
|
return (b = a.current) == null ? void 0 : b.render({
|
|
978
|
-
annotations:
|
|
983
|
+
annotations: l,
|
|
979
984
|
annotationStorage: r == null ? void 0 : r.annotationStorage,
|
|
980
985
|
hasJSActions: g,
|
|
981
986
|
fieldObjects: s,
|
|
982
987
|
div: n.current,
|
|
983
|
-
viewport:
|
|
988
|
+
viewport: P.clone({ dontFlip: !0 }),
|
|
984
989
|
page: w.page,
|
|
985
990
|
imageResourcesPath: Oo,
|
|
986
991
|
renderForms: !0,
|
|
987
|
-
linkService: new
|
|
992
|
+
linkService: new Rr(),
|
|
988
993
|
downloadManager: null,
|
|
989
994
|
enableScripting: !1
|
|
990
995
|
});
|
|
991
996
|
})().then(() => {
|
|
992
|
-
n.current && Ar(n.current,
|
|
997
|
+
n.current && Ar(n.current, y);
|
|
993
998
|
}).catch((g) => {
|
|
994
999
|
if (g !== "abort")
|
|
995
1000
|
throw g;
|
|
996
1001
|
}), () => {
|
|
997
|
-
|
|
1002
|
+
u.abort("clear"), n.current && Ft(n.current, y);
|
|
998
1003
|
};
|
|
999
|
-
}, [r,
|
|
1004
|
+
}, [r, l, y]), /* @__PURE__ */ i(
|
|
1000
1005
|
"div",
|
|
1001
1006
|
{
|
|
1002
|
-
"data-rp": `page-${
|
|
1003
|
-
style: { width: `${
|
|
1007
|
+
"data-rp": `page-${e}-annotationLayer`,
|
|
1008
|
+
style: { width: `${C == null ? void 0 : C.width}px`, height: `${C == null ? void 0 : C.height}px` },
|
|
1004
1009
|
className: No["rp-annotation-layer"],
|
|
1005
1010
|
ref: n
|
|
1006
1011
|
}
|
|
1007
1012
|
);
|
|
1008
1013
|
}, Ao = {
|
|
1009
1014
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1010
|
-
}, zo = ({ pageNumber:
|
|
1011
|
-
const [n, o] = $(), { pages: r } =
|
|
1015
|
+
}, zo = ({ pageNumber: t, viewport: e }) => {
|
|
1016
|
+
const [n, o] = $(), { pages: r } = Q(), { highlightKeywords: a } = pr(), l = !0, c = H(null), [d, p] = $(null), [m, v] = $([]);
|
|
1012
1017
|
k(() => {
|
|
1013
|
-
|
|
1014
|
-
}, [
|
|
1018
|
+
c.current && p(c.current.parentElement);
|
|
1019
|
+
}, [c]), k(() => {
|
|
1015
1020
|
(async () => {
|
|
1016
|
-
const f = r.get(
|
|
1017
|
-
if (!f || !
|
|
1021
|
+
const f = r.get(t);
|
|
1022
|
+
if (!f || !c.current)
|
|
1018
1023
|
return;
|
|
1019
1024
|
const g = await f.page.getTextContent();
|
|
1020
1025
|
o(g);
|
|
1021
1026
|
})();
|
|
1022
|
-
}, [r,
|
|
1023
|
-
const h =
|
|
1027
|
+
}, [r, t]);
|
|
1028
|
+
const h = W(() => a ? a.map((u) => {
|
|
1024
1029
|
var f, g;
|
|
1025
1030
|
return {
|
|
1026
|
-
...zr(
|
|
1027
|
-
color:
|
|
1031
|
+
...zr(u.keyword, (f = u.options) == null ? void 0 : f.matchCase, (g = u.options) == null ? void 0 : g.wholeWords),
|
|
1032
|
+
color: u.highlightColor
|
|
1028
1033
|
};
|
|
1029
1034
|
}) : [], [a]);
|
|
1030
|
-
function w(
|
|
1031
|
-
if (!
|
|
1035
|
+
function w(u, f) {
|
|
1036
|
+
if (!u)
|
|
1032
1037
|
return;
|
|
1033
1038
|
const g = `[data-rp="page-${f}-textLayer"]`;
|
|
1034
1039
|
return new Promise((s) => {
|
|
1035
|
-
const b =
|
|
1040
|
+
const b = u.querySelector(g);
|
|
1036
1041
|
if (b) {
|
|
1037
1042
|
s(b);
|
|
1038
1043
|
return;
|
|
1039
1044
|
}
|
|
1040
1045
|
new MutationObserver((S, E) => {
|
|
1041
|
-
const x =
|
|
1046
|
+
const x = u.querySelector(g);
|
|
1042
1047
|
x && (s(x), E.disconnect());
|
|
1043
|
-
}).observe(
|
|
1048
|
+
}).observe(u, { childList: !0, subtree: !0 });
|
|
1044
1049
|
});
|
|
1045
1050
|
}
|
|
1046
|
-
function
|
|
1051
|
+
function C(u) {
|
|
1047
1052
|
return new Promise((f) => {
|
|
1048
|
-
const g =
|
|
1053
|
+
const g = u.querySelectorAll(
|
|
1049
1054
|
'[data-rp="rp-text-layer-text"]'
|
|
1050
1055
|
);
|
|
1051
1056
|
if (g.length) {
|
|
@@ -1053,14 +1058,14 @@ const Do = (e) => {
|
|
|
1053
1058
|
return;
|
|
1054
1059
|
}
|
|
1055
1060
|
new MutationObserver((b, _) => {
|
|
1056
|
-
const S =
|
|
1061
|
+
const S = u.querySelectorAll(
|
|
1057
1062
|
".vpv-text-layer-text"
|
|
1058
1063
|
);
|
|
1059
1064
|
S.length && (f(Array.from(S)), _.disconnect());
|
|
1060
|
-
}).observe(
|
|
1065
|
+
}).observe(u, { childList: !0, subtree: !0 });
|
|
1061
1066
|
});
|
|
1062
1067
|
}
|
|
1063
|
-
const
|
|
1068
|
+
const y = (u, f, g, s) => {
|
|
1064
1069
|
var Z;
|
|
1065
1070
|
const b = document.createRange(), _ = g.firstChild;
|
|
1066
1071
|
if (!_ || _.nodeType !== Node.TEXT_NODE)
|
|
@@ -1069,29 +1074,29 @@ const Do = (e) => {
|
|
|
1069
1074
|
if (E > S || x + 1 > S)
|
|
1070
1075
|
return null;
|
|
1071
1076
|
b.setStart(_, E), b.setEnd(_, x + 1);
|
|
1072
|
-
const
|
|
1073
|
-
|
|
1074
|
-
const D =
|
|
1075
|
-
return kr(
|
|
1077
|
+
const L = document.createElement("span");
|
|
1078
|
+
L.style.width = "auto", b.surroundContents(L);
|
|
1079
|
+
const D = L.getBoundingClientRect(), A = u.getBoundingClientRect(), z = A.height, R = A.width, I = 100 * (D.left - A.left) / R, O = 100 * (D.top - A.top) / z, M = 100 * D.height / z, G = 100 * D.width / R;
|
|
1080
|
+
return kr(L), {
|
|
1076
1081
|
keywordStr: f,
|
|
1077
1082
|
left: I,
|
|
1078
1083
|
top: O,
|
|
1079
|
-
height:
|
|
1084
|
+
height: M,
|
|
1080
1085
|
width: G,
|
|
1081
1086
|
pageHeight: z,
|
|
1082
|
-
pageWidth:
|
|
1087
|
+
pageWidth: R
|
|
1083
1088
|
};
|
|
1084
1089
|
};
|
|
1085
|
-
async function
|
|
1086
|
-
const g = await w(
|
|
1090
|
+
async function P(u, f) {
|
|
1091
|
+
const g = await w(d, u);
|
|
1087
1092
|
if (!g)
|
|
1088
1093
|
return;
|
|
1089
|
-
const s = await
|
|
1094
|
+
const s = await C(g);
|
|
1090
1095
|
if (s.length) {
|
|
1091
1096
|
const b = s.map((S) => S.tagName === "BR" ? " " : S.textContent).reduce(
|
|
1092
1097
|
(S, E, x) => S.concat(
|
|
1093
|
-
E.split("").map((
|
|
1094
|
-
char:
|
|
1098
|
+
E.split("").map((L, D) => ({
|
|
1099
|
+
char: L,
|
|
1095
1100
|
charIdxInSpan: D,
|
|
1096
1101
|
spanIdx: x
|
|
1097
1102
|
}))
|
|
@@ -1103,45 +1108,45 @@ const Do = (e) => {
|
|
|
1103
1108
|
spanIdx: 0
|
|
1104
1109
|
}
|
|
1105
1110
|
]
|
|
1106
|
-
).slice(1), _ =
|
|
1111
|
+
).slice(1), _ = T(g, f, s, b);
|
|
1107
1112
|
v(_);
|
|
1108
1113
|
}
|
|
1109
1114
|
}
|
|
1110
|
-
const
|
|
1115
|
+
const T = (u, f, g, s) => {
|
|
1111
1116
|
const b = f.length;
|
|
1112
1117
|
if (!s.length || !b)
|
|
1113
1118
|
return [];
|
|
1114
1119
|
const _ = [], S = s.map((E) => E.char).join("");
|
|
1115
1120
|
return h.forEach((E) => {
|
|
1116
|
-
const { keyword: x, regExp:
|
|
1121
|
+
const { keyword: x, regExp: L, wholeWords: D, color: A } = E, z = x;
|
|
1117
1122
|
if (!z.trim())
|
|
1118
1123
|
return;
|
|
1119
|
-
const
|
|
1124
|
+
const R = L.flags.indexOf("g") === -1 ? new RegExp(L, `${L.flags}g`) : L;
|
|
1120
1125
|
let I;
|
|
1121
1126
|
const O = [];
|
|
1122
|
-
for (; (I =
|
|
1127
|
+
for (; (I = R.exec(S)) !== null; )
|
|
1123
1128
|
D && !ur(S, I.index, I[0].length) || O.push({
|
|
1124
|
-
keyword:
|
|
1129
|
+
keyword: R,
|
|
1125
1130
|
startIndex: I.index,
|
|
1126
|
-
endIndex:
|
|
1131
|
+
endIndex: R.lastIndex
|
|
1127
1132
|
});
|
|
1128
|
-
const
|
|
1133
|
+
const M = O.map((G) => ({
|
|
1129
1134
|
keyword: G.keyword,
|
|
1130
1135
|
indexes: s.slice(G.startIndex, G.endIndex),
|
|
1131
1136
|
color: A
|
|
1132
1137
|
}));
|
|
1133
|
-
for (const G of
|
|
1138
|
+
for (const G of M) {
|
|
1134
1139
|
const Z = G.indexes.reduce(
|
|
1135
|
-
(j,
|
|
1140
|
+
(j, V) => (j[V.spanIdx] = (j[V.spanIdx] || []).concat([V]), j),
|
|
1136
1141
|
{}
|
|
1137
1142
|
);
|
|
1138
1143
|
for (const j of Object.values(Z))
|
|
1139
1144
|
if (j.length !== 1 || j[0].char.trim() !== "") {
|
|
1140
|
-
const
|
|
1141
|
-
|
|
1145
|
+
const V = j, ee = g[V[0].spanIdx], X = y(
|
|
1146
|
+
u,
|
|
1142
1147
|
z,
|
|
1143
|
-
|
|
1144
|
-
|
|
1148
|
+
ee,
|
|
1149
|
+
V
|
|
1145
1150
|
);
|
|
1146
1151
|
if (X) {
|
|
1147
1152
|
const { left: le, top: ae } = X;
|
|
@@ -1157,38 +1162,38 @@ const Do = (e) => {
|
|
|
1157
1162
|
(async () => {
|
|
1158
1163
|
if (!(!a || a.length === 0))
|
|
1159
1164
|
try {
|
|
1160
|
-
await
|
|
1165
|
+
await P(t, a);
|
|
1161
1166
|
} catch (f) {
|
|
1162
1167
|
console.error(f);
|
|
1163
1168
|
}
|
|
1164
1169
|
})();
|
|
1165
|
-
}, [
|
|
1170
|
+
}, [l, a, t, n, e]), /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((u, f) => /* @__PURE__ */ i(
|
|
1166
1171
|
"div",
|
|
1167
1172
|
{
|
|
1168
1173
|
className: Ao["rp-text-highlight"],
|
|
1169
1174
|
style: {
|
|
1170
|
-
top: `${
|
|
1171
|
-
left: `${
|
|
1172
|
-
width: `${
|
|
1173
|
-
height: `${
|
|
1174
|
-
backgroundColor:
|
|
1175
|
+
top: `${u.top}%`,
|
|
1176
|
+
left: `${u.left}%`,
|
|
1177
|
+
width: `${u.width}%`,
|
|
1178
|
+
height: `${u.height}%`,
|
|
1179
|
+
backgroundColor: u.highlightColor
|
|
1175
1180
|
}
|
|
1176
1181
|
},
|
|
1177
1182
|
f
|
|
1178
1183
|
)) }) });
|
|
1179
|
-
}, It = $e((
|
|
1180
|
-
const { pageNumber: n, style: o, ...r } =
|
|
1184
|
+
}, It = $e((t, e) => {
|
|
1185
|
+
const { pageNumber: n, style: o, ...r } = t, { pages: a } = Q(), { rotate: l } = Ge(), { textLayer: c } = or(), { currentZoom: d } = Qe(), p = H(a.get(n)), [m, v] = $(!1), h = H(null), [w, C] = $({
|
|
1181
1186
|
width: 0,
|
|
1182
1187
|
height: 0
|
|
1183
1188
|
});
|
|
1184
|
-
cn(
|
|
1189
|
+
cn(e, () => h.current), k(() => {
|
|
1185
1190
|
if (a && (p.current = a.get(n), p.current)) {
|
|
1186
|
-
const
|
|
1187
|
-
|
|
1191
|
+
const u = p.current.page.getViewport({ scale: d, rotation: l });
|
|
1192
|
+
C(u);
|
|
1188
1193
|
}
|
|
1189
|
-
}, [a, n,
|
|
1190
|
-
const
|
|
1191
|
-
switch (
|
|
1194
|
+
}, [a, n, l, d]);
|
|
1195
|
+
const y = W(() => {
|
|
1196
|
+
switch (l) {
|
|
1192
1197
|
case 90:
|
|
1193
1198
|
return `${w.width / 2}px ${w.width / 2}px`;
|
|
1194
1199
|
case -90:
|
|
@@ -1197,9 +1202,9 @@ const Do = (e) => {
|
|
|
1197
1202
|
default:
|
|
1198
1203
|
return "center";
|
|
1199
1204
|
}
|
|
1200
|
-
}, [
|
|
1205
|
+
}, [l, w]), P = N(() => {
|
|
1201
1206
|
v(!0);
|
|
1202
|
-
}, []),
|
|
1207
|
+
}, []), T = N(() => {
|
|
1203
1208
|
v(!1);
|
|
1204
1209
|
}, []);
|
|
1205
1210
|
return /* @__PURE__ */ i(
|
|
@@ -1211,9 +1216,9 @@ const Do = (e) => {
|
|
|
1211
1216
|
...r,
|
|
1212
1217
|
style: {
|
|
1213
1218
|
...o,
|
|
1214
|
-
"--rp-rotate": `${
|
|
1215
|
-
"--rp-page-rotate-translate": `${
|
|
1216
|
-
"--scale-factor":
|
|
1219
|
+
"--rp-rotate": `${l}deg`,
|
|
1220
|
+
"--rp-page-rotate-translate": `${y}`,
|
|
1221
|
+
"--scale-factor": d
|
|
1217
1222
|
},
|
|
1218
1223
|
className: lt["rp-page-wrapper"],
|
|
1219
1224
|
children: /* @__PURE__ */ F(
|
|
@@ -1225,9 +1230,9 @@ const Do = (e) => {
|
|
|
1225
1230
|
},
|
|
1226
1231
|
className: lt["rp-page"],
|
|
1227
1232
|
children: [
|
|
1228
|
-
/* @__PURE__ */ i(Io, { onLoading:
|
|
1233
|
+
/* @__PURE__ */ i(Io, { onLoading: P, onLoaded: T, pageNumber: n }),
|
|
1229
1234
|
m && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
|
|
1230
|
-
|
|
1235
|
+
c && /* @__PURE__ */ i(Eo, { pageNumber: n }),
|
|
1231
1236
|
/* @__PURE__ */ i(zo, { pageNumber: n, viewport: w }),
|
|
1232
1237
|
/* @__PURE__ */ i(Do, { pageNumber: n })
|
|
1233
1238
|
]
|
|
@@ -1236,52 +1241,52 @@ const Do = (e) => {
|
|
|
1236
1241
|
}
|
|
1237
1242
|
);
|
|
1238
1243
|
});
|
|
1239
|
-
function qt(
|
|
1240
|
-
if (
|
|
1244
|
+
function qt(t) {
|
|
1245
|
+
if (t === void 0)
|
|
1241
1246
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1242
|
-
return
|
|
1247
|
+
return t;
|
|
1243
1248
|
}
|
|
1244
|
-
function wt(
|
|
1249
|
+
function wt(t, e) {
|
|
1245
1250
|
return wt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
|
|
1246
1251
|
return n.__proto__ = o, n;
|
|
1247
|
-
}, wt(
|
|
1252
|
+
}, wt(t, e);
|
|
1248
1253
|
}
|
|
1249
|
-
function Fo(
|
|
1250
|
-
|
|
1254
|
+
function Fo(t, e) {
|
|
1255
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, wt(t, e);
|
|
1251
1256
|
}
|
|
1252
|
-
var
|
|
1253
|
-
return typeof
|
|
1257
|
+
var Ut = Number.isNaN || function(e) {
|
|
1258
|
+
return typeof e == "number" && e !== e;
|
|
1254
1259
|
};
|
|
1255
|
-
function ko(
|
|
1256
|
-
return !!(
|
|
1260
|
+
function ko(t, e) {
|
|
1261
|
+
return !!(t === e || Ut(t) && Ut(e));
|
|
1257
1262
|
}
|
|
1258
|
-
function Wo(
|
|
1259
|
-
if (
|
|
1263
|
+
function Wo(t, e) {
|
|
1264
|
+
if (t.length !== e.length)
|
|
1260
1265
|
return !1;
|
|
1261
|
-
for (var n = 0; n <
|
|
1262
|
-
if (!ko(
|
|
1266
|
+
for (var n = 0; n < t.length; n++)
|
|
1267
|
+
if (!ko(t[n], e[n]))
|
|
1263
1268
|
return !1;
|
|
1264
1269
|
return !0;
|
|
1265
1270
|
}
|
|
1266
|
-
function dt(
|
|
1267
|
-
|
|
1271
|
+
function dt(t, e) {
|
|
1272
|
+
e === void 0 && (e = Wo);
|
|
1268
1273
|
var n, o = [], r, a = !1;
|
|
1269
|
-
function
|
|
1270
|
-
for (var
|
|
1271
|
-
|
|
1272
|
-
return a && n === this &&
|
|
1274
|
+
function l() {
|
|
1275
|
+
for (var c = [], d = 0; d < arguments.length; d++)
|
|
1276
|
+
c[d] = arguments[d];
|
|
1277
|
+
return a && n === this && e(c, o) || (r = t.apply(this, c), a = !0, n = this, o = c), r;
|
|
1273
1278
|
}
|
|
1274
|
-
return
|
|
1279
|
+
return l;
|
|
1275
1280
|
}
|
|
1276
|
-
function
|
|
1277
|
-
if (
|
|
1281
|
+
function Vt(t, e) {
|
|
1282
|
+
if (t == null)
|
|
1278
1283
|
return {};
|
|
1279
1284
|
var n = {};
|
|
1280
|
-
for (var o in
|
|
1281
|
-
if ({}.hasOwnProperty.call(
|
|
1282
|
-
if (
|
|
1285
|
+
for (var o in t)
|
|
1286
|
+
if ({}.hasOwnProperty.call(t, o)) {
|
|
1287
|
+
if (e.indexOf(o) !== -1)
|
|
1283
1288
|
continue;
|
|
1284
|
-
n[o] =
|
|
1289
|
+
n[o] = t[o];
|
|
1285
1290
|
}
|
|
1286
1291
|
return n;
|
|
1287
1292
|
}
|
|
@@ -1290,13 +1295,13 @@ var Mo = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1290
1295
|
} : function() {
|
|
1291
1296
|
return Date.now();
|
|
1292
1297
|
};
|
|
1293
|
-
function Zt(
|
|
1294
|
-
cancelAnimationFrame(
|
|
1298
|
+
function Zt(t) {
|
|
1299
|
+
cancelAnimationFrame(t.id);
|
|
1295
1300
|
}
|
|
1296
|
-
function Ho(
|
|
1301
|
+
function Ho(t, e) {
|
|
1297
1302
|
var n = Bt();
|
|
1298
1303
|
function o() {
|
|
1299
|
-
Bt() - n >=
|
|
1304
|
+
Bt() - n >= e ? t.call(null) : r.id = requestAnimationFrame(o);
|
|
1300
1305
|
}
|
|
1301
1306
|
var r = {
|
|
1302
1307
|
id: requestAnimationFrame(o)
|
|
@@ -1304,37 +1309,37 @@ function Ho(e, t) {
|
|
|
1304
1309
|
return r;
|
|
1305
1310
|
}
|
|
1306
1311
|
var ut = -1;
|
|
1307
|
-
function $o(
|
|
1308
|
-
if (
|
|
1309
|
-
var
|
|
1310
|
-
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(
|
|
1312
|
+
function $o(t) {
|
|
1313
|
+
if (t === void 0 && (t = !1), ut === -1 || t) {
|
|
1314
|
+
var e = document.createElement("div"), n = e.style;
|
|
1315
|
+
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), ut = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
1311
1316
|
}
|
|
1312
1317
|
return ut;
|
|
1313
1318
|
}
|
|
1314
|
-
var
|
|
1315
|
-
function jt(
|
|
1316
|
-
if (
|
|
1317
|
-
var
|
|
1319
|
+
var Oe = null;
|
|
1320
|
+
function jt(t) {
|
|
1321
|
+
if (t === void 0 && (t = !1), Oe === null || t) {
|
|
1322
|
+
var e = document.createElement("div"), n = e.style;
|
|
1318
1323
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
1319
1324
|
var o = document.createElement("div"), r = o.style;
|
|
1320
|
-
return r.width = "100px", r.height = "100px",
|
|
1325
|
+
return r.width = "100px", r.height = "100px", e.appendChild(o), document.body.appendChild(e), e.scrollLeft > 0 ? Oe = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? Oe = "negative" : Oe = "positive-ascending"), document.body.removeChild(e), Oe;
|
|
1321
1326
|
}
|
|
1322
|
-
return
|
|
1327
|
+
return Oe;
|
|
1323
1328
|
}
|
|
1324
|
-
var Go = 150, qo = function(
|
|
1325
|
-
var n =
|
|
1326
|
-
|
|
1327
|
-
var o =
|
|
1329
|
+
var Go = 150, qo = function(e) {
|
|
1330
|
+
var n = e.columnIndex;
|
|
1331
|
+
e.data;
|
|
1332
|
+
var o = e.rowIndex;
|
|
1328
1333
|
return o + ":" + n;
|
|
1329
1334
|
}, Be = null, Ze = null, je = null;
|
|
1330
1335
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet());
|
|
1331
|
-
function
|
|
1332
|
-
var
|
|
1333
|
-
return
|
|
1334
|
-
Fo(
|
|
1335
|
-
function
|
|
1336
|
+
function Uo(t) {
|
|
1337
|
+
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, p = t.getOffsetForRowAndAlignment, m = t.getRowHeight, v = t.getRowOffset, h = t.getRowStartIndexForOffset, w = t.getRowStopIndexForStartIndex, C = t.initInstanceProps, y = t.shouldResetStyleCacheOnItemSizeChange, P = t.validateProps;
|
|
1338
|
+
return e = /* @__PURE__ */ function(T) {
|
|
1339
|
+
Fo(u, T);
|
|
1340
|
+
function u(g) {
|
|
1336
1341
|
var s;
|
|
1337
|
-
return s =
|
|
1342
|
+
return s = T.call(this, g) || this, s._instanceProps = C(s.props, qt(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
|
|
1338
1343
|
instance: qt(s),
|
|
1339
1344
|
isScrolling: !1,
|
|
1340
1345
|
horizontalScrollDirection: "forward",
|
|
@@ -1342,14 +1347,14 @@ function Vo(e) {
|
|
|
1342
1347
|
scrollTop: typeof s.props.initialScrollTop == "number" ? s.props.initialScrollTop : 0,
|
|
1343
1348
|
scrollUpdateWasRequested: !1,
|
|
1344
1349
|
verticalScrollDirection: "forward"
|
|
1345
|
-
}, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(b, _, S, E, x,
|
|
1350
|
+
}, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(b, _, S, E, x, L, D, A) {
|
|
1346
1351
|
return s.props.onItemsRendered({
|
|
1347
1352
|
overscanColumnStartIndex: b,
|
|
1348
1353
|
overscanColumnStopIndex: _,
|
|
1349
1354
|
overscanRowStartIndex: S,
|
|
1350
1355
|
overscanRowStopIndex: E,
|
|
1351
1356
|
visibleColumnStartIndex: x,
|
|
1352
|
-
visibleColumnStopIndex:
|
|
1357
|
+
visibleColumnStopIndex: L,
|
|
1353
1358
|
visibleRowStartIndex: D,
|
|
1354
1359
|
visibleRowStopIndex: A
|
|
1355
1360
|
});
|
|
@@ -1362,15 +1367,15 @@ function Vo(e) {
|
|
|
1362
1367
|
scrollUpdateWasRequested: x
|
|
1363
1368
|
});
|
|
1364
1369
|
}), s._getItemStyle = void 0, s._getItemStyle = function(b, _) {
|
|
1365
|
-
var S = s.props, E = S.columnWidth, x = S.direction,
|
|
1370
|
+
var S = s.props, E = S.columnWidth, x = S.direction, L = S.rowHeight, D = s._getItemStyleCache(y && E, y && x, y && L), A = b + ":" + _, z;
|
|
1366
1371
|
if (D.hasOwnProperty(A))
|
|
1367
1372
|
z = D[A];
|
|
1368
1373
|
else {
|
|
1369
|
-
var
|
|
1374
|
+
var R = n(s.props, _, s._instanceProps), I = x === "rtl";
|
|
1370
1375
|
D[A] = z = {
|
|
1371
1376
|
position: "absolute",
|
|
1372
|
-
left: I ? void 0 :
|
|
1373
|
-
right: I ?
|
|
1377
|
+
left: I ? void 0 : R,
|
|
1378
|
+
right: I ? R : void 0,
|
|
1374
1379
|
top: v(s.props, b, s._instanceProps),
|
|
1375
1380
|
height: m(s.props, b, s._instanceProps),
|
|
1376
1381
|
width: a(s.props, _, s._instanceProps)
|
|
@@ -1380,12 +1385,12 @@ function Vo(e) {
|
|
|
1380
1385
|
}, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(b, _, S) {
|
|
1381
1386
|
return {};
|
|
1382
1387
|
}), s._onScroll = function(b) {
|
|
1383
|
-
var _ = b.currentTarget, S = _.clientHeight, E = _.clientWidth, x = _.scrollLeft,
|
|
1388
|
+
var _ = b.currentTarget, S = _.clientHeight, E = _.clientWidth, x = _.scrollLeft, L = _.scrollTop, D = _.scrollHeight, A = _.scrollWidth;
|
|
1384
1389
|
s.setState(function(z) {
|
|
1385
|
-
if (z.scrollLeft === x && z.scrollTop ===
|
|
1390
|
+
if (z.scrollLeft === x && z.scrollTop === L)
|
|
1386
1391
|
return null;
|
|
1387
|
-
var
|
|
1388
|
-
if (
|
|
1392
|
+
var R = s.props.direction, I = x;
|
|
1393
|
+
if (R === "rtl")
|
|
1389
1394
|
switch (jt()) {
|
|
1390
1395
|
case "negative":
|
|
1391
1396
|
I = -x;
|
|
@@ -1395,13 +1400,13 @@ function Vo(e) {
|
|
|
1395
1400
|
break;
|
|
1396
1401
|
}
|
|
1397
1402
|
I = Math.max(0, Math.min(I, A - E));
|
|
1398
|
-
var O = Math.max(0, Math.min(
|
|
1403
|
+
var O = Math.max(0, Math.min(L, D - S));
|
|
1399
1404
|
return {
|
|
1400
1405
|
isScrolling: !0,
|
|
1401
1406
|
horizontalScrollDirection: z.scrollLeft < x ? "forward" : "backward",
|
|
1402
1407
|
scrollLeft: I,
|
|
1403
1408
|
scrollTop: O,
|
|
1404
|
-
verticalScrollDirection: z.scrollTop <
|
|
1409
|
+
verticalScrollDirection: z.scrollTop < L ? "forward" : "backward",
|
|
1405
1410
|
scrollUpdateWasRequested: !1
|
|
1406
1411
|
};
|
|
1407
1412
|
}, s._resetIsScrollingDebounced);
|
|
@@ -1418,10 +1423,10 @@ function Vo(e) {
|
|
|
1418
1423
|
});
|
|
1419
1424
|
}, s;
|
|
1420
1425
|
}
|
|
1421
|
-
|
|
1422
|
-
return
|
|
1426
|
+
u.getDerivedStateFromProps = function(s, b) {
|
|
1427
|
+
return Vo(s, b), P(s), null;
|
|
1423
1428
|
};
|
|
1424
|
-
var f =
|
|
1429
|
+
var f = u.prototype;
|
|
1425
1430
|
return f.scrollTo = function(s) {
|
|
1426
1431
|
var b = s.scrollLeft, _ = s.scrollTop;
|
|
1427
1432
|
b !== void 0 && (b = Math.max(0, b)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(S) {
|
|
@@ -1434,11 +1439,11 @@ function Vo(e) {
|
|
|
1434
1439
|
};
|
|
1435
1440
|
}, this._resetIsScrollingDebounced);
|
|
1436
1441
|
}, f.scrollToItem = function(s) {
|
|
1437
|
-
var b = s.align, _ = b === void 0 ? "auto" : b, S = s.columnIndex, E = s.rowIndex, x = this.props,
|
|
1438
|
-
S !== void 0 && (S = Math.max(0, Math.min(S,
|
|
1439
|
-
var G =
|
|
1442
|
+
var b = s.align, _ = b === void 0 ? "auto" : b, S = s.columnIndex, E = s.rowIndex, x = this.props, L = x.columnCount, D = x.height, A = x.rowCount, z = x.width, R = this.state, I = R.scrollLeft, O = R.scrollTop, M = $o();
|
|
1443
|
+
S !== void 0 && (S = Math.max(0, Math.min(S, L - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, A - 1)));
|
|
1444
|
+
var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > z ? M : 0, V = G > D ? M : 0;
|
|
1440
1445
|
this.scrollTo({
|
|
1441
|
-
scrollLeft: S !== void 0 ?
|
|
1446
|
+
scrollLeft: S !== void 0 ? d(this.props, S, _, I, this._instanceProps, V) : I,
|
|
1442
1447
|
scrollTop: E !== void 0 ? p(this.props, E, _, O, this._instanceProps, j) : O
|
|
1443
1448
|
});
|
|
1444
1449
|
}, f.componentDidMount = function() {
|
|
@@ -1461,8 +1466,8 @@ function Vo(e) {
|
|
|
1461
1466
|
x.scrollLeft = _;
|
|
1462
1467
|
break;
|
|
1463
1468
|
default:
|
|
1464
|
-
var
|
|
1465
|
-
x.scrollLeft = D -
|
|
1469
|
+
var L = x.clientWidth, D = x.scrollWidth;
|
|
1470
|
+
x.scrollLeft = D - L - _;
|
|
1466
1471
|
break;
|
|
1467
1472
|
}
|
|
1468
1473
|
else
|
|
@@ -1473,78 +1478,78 @@ function Vo(e) {
|
|
|
1473
1478
|
}, f.componentWillUnmount = function() {
|
|
1474
1479
|
this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
|
|
1475
1480
|
}, f.render = function() {
|
|
1476
|
-
var s = this.props, b = s.children, _ = s.className, S = s.columnCount, E = s.direction, x = s.height,
|
|
1481
|
+
var s = this.props, b = s.children, _ = s.className, S = s.columnCount, E = s.direction, x = s.height, L = s.innerRef, D = s.innerElementType, A = s.innerTagName, z = s.itemData, R = s.itemKey, I = R === void 0 ? qo : R, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, V = s.width, ee = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Fe = de[1], Ne = [];
|
|
1477
1482
|
if (S > 0 && G)
|
|
1478
|
-
for (var
|
|
1483
|
+
for (var Pe = te; Pe <= Fe; Pe++)
|
|
1479
1484
|
for (var we = le; we <= ae; we++)
|
|
1480
|
-
|
|
1485
|
+
Ne.push(Ve(b, {
|
|
1481
1486
|
columnIndex: we,
|
|
1482
1487
|
data: z,
|
|
1483
|
-
isScrolling: j ?
|
|
1488
|
+
isScrolling: j ? ee : void 0,
|
|
1484
1489
|
key: I({
|
|
1485
1490
|
columnIndex: we,
|
|
1486
1491
|
data: z,
|
|
1487
|
-
rowIndex:
|
|
1492
|
+
rowIndex: Pe
|
|
1488
1493
|
}),
|
|
1489
|
-
rowIndex:
|
|
1490
|
-
style: this._getItemStyle(
|
|
1494
|
+
rowIndex: Pe,
|
|
1495
|
+
style: this._getItemStyle(Pe, we)
|
|
1491
1496
|
}));
|
|
1492
|
-
var nt =
|
|
1493
|
-
return
|
|
1497
|
+
var nt = l(this.props, this._instanceProps), rt = c(this.props, this._instanceProps);
|
|
1498
|
+
return Ve(O || M || "div", {
|
|
1494
1499
|
className: _,
|
|
1495
1500
|
onScroll: this._onScroll,
|
|
1496
1501
|
ref: this._outerRefSetter,
|
|
1497
1502
|
style: Wr({
|
|
1498
1503
|
position: "relative",
|
|
1499
1504
|
height: x,
|
|
1500
|
-
width:
|
|
1505
|
+
width: V,
|
|
1501
1506
|
overflow: "auto",
|
|
1502
1507
|
WebkitOverflowScrolling: "touch",
|
|
1503
1508
|
willChange: "transform",
|
|
1504
1509
|
direction: E
|
|
1505
1510
|
}, Z)
|
|
1506
|
-
},
|
|
1507
|
-
children:
|
|
1508
|
-
ref:
|
|
1511
|
+
}, Ve(D || A || "div", {
|
|
1512
|
+
children: Ne,
|
|
1513
|
+
ref: L,
|
|
1509
1514
|
style: {
|
|
1510
1515
|
height: nt,
|
|
1511
|
-
pointerEvents:
|
|
1516
|
+
pointerEvents: ee ? "none" : void 0,
|
|
1512
1517
|
width: rt
|
|
1513
1518
|
}
|
|
1514
1519
|
}));
|
|
1515
1520
|
}, f._callPropsCallbacks = function() {
|
|
1516
1521
|
var s = this.props, b = s.columnCount, _ = s.onItemsRendered, S = s.onScroll, E = s.rowCount;
|
|
1517
1522
|
if (typeof _ == "function" && b > 0 && E > 0) {
|
|
1518
|
-
var x = this._getHorizontalRangeToRender(),
|
|
1519
|
-
this._callOnItemsRendered(
|
|
1523
|
+
var x = this._getHorizontalRangeToRender(), L = x[0], D = x[1], A = x[2], z = x[3], R = this._getVerticalRangeToRender(), I = R[0], O = R[1], M = R[2], G = R[3];
|
|
1524
|
+
this._callOnItemsRendered(L, D, I, O, A, z, M, G);
|
|
1520
1525
|
}
|
|
1521
1526
|
if (typeof S == "function") {
|
|
1522
|
-
var Z = this.state, j = Z.horizontalScrollDirection,
|
|
1523
|
-
this._callOnScroll(
|
|
1527
|
+
var Z = this.state, j = Z.horizontalScrollDirection, V = Z.scrollLeft, ee = Z.scrollTop, X = Z.scrollUpdateWasRequested, le = Z.verticalScrollDirection;
|
|
1528
|
+
this._callOnScroll(V, ee, j, le, X);
|
|
1524
1529
|
}
|
|
1525
1530
|
}, f._getHorizontalRangeToRender = function() {
|
|
1526
|
-
var s = this.props, b = s.columnCount, _ = s.overscanColumnCount, S = s.overscanColumnsCount, E = s.overscanCount, x = s.rowCount,
|
|
1531
|
+
var s = this.props, b = s.columnCount, _ = s.overscanColumnCount, S = s.overscanColumnsCount, E = s.overscanCount, x = s.rowCount, L = this.state, D = L.horizontalScrollDirection, A = L.isScrolling, z = L.scrollLeft, R = _ || S || E || 1;
|
|
1527
1532
|
if (b === 0 || x === 0)
|
|
1528
1533
|
return [0, 0, 0, 0];
|
|
1529
|
-
var I = o(this.props, z, this._instanceProps), O = r(this.props, I, z, this._instanceProps),
|
|
1530
|
-
return [Math.max(0, I -
|
|
1534
|
+
var I = o(this.props, z, this._instanceProps), O = r(this.props, I, z, this._instanceProps), M = !A || D === "backward" ? Math.max(1, R) : 1, G = !A || D === "forward" ? Math.max(1, R) : 1;
|
|
1535
|
+
return [Math.max(0, I - M), Math.max(0, Math.min(b - 1, O + G)), I, O];
|
|
1531
1536
|
}, f._getVerticalRangeToRender = function() {
|
|
1532
|
-
var s = this.props, b = s.columnCount, _ = s.overscanCount, S = s.overscanRowCount, E = s.overscanRowsCount, x = s.rowCount,
|
|
1537
|
+
var s = this.props, b = s.columnCount, _ = s.overscanCount, S = s.overscanRowCount, E = s.overscanRowsCount, x = s.rowCount, L = this.state, D = L.isScrolling, A = L.verticalScrollDirection, z = L.scrollTop, R = S || E || _ || 1;
|
|
1533
1538
|
if (b === 0 || x === 0)
|
|
1534
1539
|
return [0, 0, 0, 0];
|
|
1535
|
-
var I = h(this.props, z, this._instanceProps), O = w(this.props, I, z, this._instanceProps),
|
|
1536
|
-
return [Math.max(0, I -
|
|
1537
|
-
},
|
|
1538
|
-
}(
|
|
1540
|
+
var I = h(this.props, z, this._instanceProps), O = w(this.props, I, z, this._instanceProps), M = !D || A === "backward" ? Math.max(1, R) : 1, G = !D || A === "forward" ? Math.max(1, R) : 1;
|
|
1541
|
+
return [Math.max(0, I - M), Math.max(0, Math.min(x - 1, O + G)), I, O];
|
|
1542
|
+
}, u;
|
|
1543
|
+
}(Qn), e.defaultProps = {
|
|
1539
1544
|
direction: "ltr",
|
|
1540
1545
|
itemData: void 0,
|
|
1541
1546
|
useIsScrolling: !1
|
|
1542
|
-
},
|
|
1547
|
+
}, e;
|
|
1543
1548
|
}
|
|
1544
|
-
var
|
|
1545
|
-
var o =
|
|
1549
|
+
var Vo = function(e, n) {
|
|
1550
|
+
var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount, p = e.overscanCount, m = e.overscanRowsCount, v = e.width, h = n.instance;
|
|
1546
1551
|
if (process.env.NODE_ENV !== "production") {
|
|
1547
|
-
if (typeof p == "number" && Be && !Be.has(h) && (Be.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof
|
|
1552
|
+
if (typeof p == "number" && Be && !Be.has(h) && (Be.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof m == "number") && Ze && !Ze.has(h) && (Ze.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || c != null) && je && !je.has(h) && (je.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1548
1553
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1549
1554
|
switch (r) {
|
|
1550
1555
|
case "ltr":
|
|
@@ -1558,60 +1563,60 @@ var Uo = function(t, n) {
|
|
|
1558
1563
|
if (typeof a != "number")
|
|
1559
1564
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1560
1565
|
}
|
|
1561
|
-
}, Kt = 50,
|
|
1562
|
-
var o =
|
|
1563
|
-
if (
|
|
1564
|
-
var
|
|
1565
|
-
|
|
1566
|
+
}, Kt = 50, Sn = function(e, n) {
|
|
1567
|
+
var o = e.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, l = n.lastMeasuredRowIndex, c = 0;
|
|
1568
|
+
if (l >= o && (l = o - 1), l >= 0) {
|
|
1569
|
+
var d = r[l];
|
|
1570
|
+
c = d.offset + d.size;
|
|
1566
1571
|
}
|
|
1567
|
-
var p = o -
|
|
1568
|
-
return
|
|
1569
|
-
},
|
|
1570
|
-
var o =
|
|
1571
|
-
if (
|
|
1572
|
-
var
|
|
1573
|
-
|
|
1572
|
+
var p = o - l - 1, m = p * a;
|
|
1573
|
+
return c + m;
|
|
1574
|
+
}, yn = function(e, n) {
|
|
1575
|
+
var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, l = n.lastMeasuredColumnIndex, c = 0;
|
|
1576
|
+
if (l >= o && (l = o - 1), l >= 0) {
|
|
1577
|
+
var d = r[l];
|
|
1578
|
+
c = d.offset + d.size;
|
|
1574
1579
|
}
|
|
1575
|
-
var p = o -
|
|
1576
|
-
return
|
|
1577
|
-
},
|
|
1578
|
-
var a,
|
|
1579
|
-
if (
|
|
1580
|
-
var
|
|
1581
|
-
if (
|
|
1582
|
-
var p = a[
|
|
1583
|
-
|
|
1580
|
+
var p = o - l - 1, m = p * a;
|
|
1581
|
+
return c + m;
|
|
1582
|
+
}, fe = function(e, n, o, r) {
|
|
1583
|
+
var a, l, c;
|
|
1584
|
+
if (e === "column" ? (a = r.columnMetadataMap, l = n.columnWidth, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, l = n.rowHeight, c = r.lastMeasuredRowIndex), o > c) {
|
|
1585
|
+
var d = 0;
|
|
1586
|
+
if (c >= 0) {
|
|
1587
|
+
var p = a[c];
|
|
1588
|
+
d = p.offset + p.size;
|
|
1584
1589
|
}
|
|
1585
|
-
for (var m =
|
|
1586
|
-
var v =
|
|
1590
|
+
for (var m = c + 1; m <= o; m++) {
|
|
1591
|
+
var v = l(m);
|
|
1587
1592
|
a[m] = {
|
|
1588
|
-
offset:
|
|
1593
|
+
offset: d,
|
|
1589
1594
|
size: v
|
|
1590
|
-
},
|
|
1595
|
+
}, d += v;
|
|
1591
1596
|
}
|
|
1592
|
-
|
|
1597
|
+
e === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
|
|
1593
1598
|
}
|
|
1594
1599
|
return a[o];
|
|
1595
|
-
}, Xt = function(
|
|
1596
|
-
var a,
|
|
1597
|
-
|
|
1598
|
-
var
|
|
1599
|
-
return
|
|
1600
|
-
},
|
|
1600
|
+
}, Xt = function(e, n, o, r) {
|
|
1601
|
+
var a, l;
|
|
1602
|
+
e === "column" ? (a = o.columnMetadataMap, l = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, l = o.lastMeasuredRowIndex);
|
|
1603
|
+
var c = l > 0 ? a[l].offset : 0;
|
|
1604
|
+
return c >= r ? xn(e, n, o, l, 0, r) : Bo(e, n, o, Math.max(0, l), r);
|
|
1605
|
+
}, xn = function(e, n, o, r, a, l) {
|
|
1601
1606
|
for (; a <= r; ) {
|
|
1602
|
-
var
|
|
1603
|
-
if (
|
|
1604
|
-
return
|
|
1605
|
-
|
|
1607
|
+
var c = a + Math.floor((r - a) / 2), d = fe(e, n, c, o).offset;
|
|
1608
|
+
if (d === l)
|
|
1609
|
+
return c;
|
|
1610
|
+
d < l ? a = c + 1 : d > l && (r = c - 1);
|
|
1606
1611
|
}
|
|
1607
1612
|
return a > 0 ? a - 1 : 0;
|
|
1608
|
-
}, Bo = function(
|
|
1609
|
-
for (var
|
|
1610
|
-
r +=
|
|
1611
|
-
return
|
|
1612
|
-
}, Yt = function(
|
|
1613
|
-
var
|
|
1614
|
-
switch (r === "smart" && (a >= h -
|
|
1613
|
+
}, Bo = function(e, n, o, r, a) {
|
|
1614
|
+
for (var l = e === "column" ? n.columnCount : n.rowCount, c = 1; r < l && fe(e, n, r, o).offset < a; )
|
|
1615
|
+
r += c, c *= 2;
|
|
1616
|
+
return xn(e, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
|
|
1617
|
+
}, Yt = function(e, n, o, r, a, l, c) {
|
|
1618
|
+
var d = e === "column" ? n.width : n.height, p = fe(e, n, o, l), m = e === "column" ? yn(n, l) : Sn(n, l), v = Math.max(0, Math.min(m - d, p.offset)), h = Math.max(0, p.offset - d + c + p.size);
|
|
1619
|
+
switch (r === "smart" && (a >= h - d && a <= v + d ? r = "auto" : r = "center"), r) {
|
|
1615
1620
|
case "start":
|
|
1616
1621
|
return v;
|
|
1617
1622
|
case "end":
|
|
@@ -1622,45 +1627,45 @@ var Uo = function(t, n) {
|
|
|
1622
1627
|
default:
|
|
1623
1628
|
return a >= h && a <= v ? a : h > v || a < h ? h : v;
|
|
1624
1629
|
}
|
|
1625
|
-
}, Zo = /* @__PURE__ */
|
|
1626
|
-
getColumnOffset: function(
|
|
1627
|
-
return
|
|
1630
|
+
}, Zo = /* @__PURE__ */ Uo({
|
|
1631
|
+
getColumnOffset: function(e, n, o) {
|
|
1632
|
+
return fe("column", e, n, o).offset;
|
|
1628
1633
|
},
|
|
1629
|
-
getColumnStartIndexForOffset: function(
|
|
1630
|
-
return Xt("column",
|
|
1634
|
+
getColumnStartIndexForOffset: function(e, n, o) {
|
|
1635
|
+
return Xt("column", e, o, n);
|
|
1631
1636
|
},
|
|
1632
|
-
getColumnStopIndexForStartIndex: function(
|
|
1633
|
-
for (var a =
|
|
1634
|
-
m++, p +=
|
|
1637
|
+
getColumnStopIndexForStartIndex: function(e, n, o, r) {
|
|
1638
|
+
for (var a = e.columnCount, l = e.width, c = fe("column", e, n, r), d = o + l, p = c.offset + c.size, m = n; m < a - 1 && p < d; )
|
|
1639
|
+
m++, p += fe("column", e, m, r).size;
|
|
1635
1640
|
return m;
|
|
1636
1641
|
},
|
|
1637
|
-
getColumnWidth: function(
|
|
1642
|
+
getColumnWidth: function(e, n, o) {
|
|
1638
1643
|
return o.columnMetadataMap[n].size;
|
|
1639
1644
|
},
|
|
1640
|
-
getEstimatedTotalHeight:
|
|
1641
|
-
getEstimatedTotalWidth:
|
|
1642
|
-
getOffsetForColumnAndAlignment: function(
|
|
1643
|
-
return Yt("column",
|
|
1645
|
+
getEstimatedTotalHeight: Sn,
|
|
1646
|
+
getEstimatedTotalWidth: yn,
|
|
1647
|
+
getOffsetForColumnAndAlignment: function(e, n, o, r, a, l) {
|
|
1648
|
+
return Yt("column", e, n, o, r, a, l);
|
|
1644
1649
|
},
|
|
1645
|
-
getOffsetForRowAndAlignment: function(
|
|
1646
|
-
return Yt("row",
|
|
1650
|
+
getOffsetForRowAndAlignment: function(e, n, o, r, a, l) {
|
|
1651
|
+
return Yt("row", e, n, o, r, a, l);
|
|
1647
1652
|
},
|
|
1648
|
-
getRowOffset: function(
|
|
1649
|
-
return
|
|
1653
|
+
getRowOffset: function(e, n, o) {
|
|
1654
|
+
return fe("row", e, n, o).offset;
|
|
1650
1655
|
},
|
|
1651
|
-
getRowHeight: function(
|
|
1656
|
+
getRowHeight: function(e, n, o) {
|
|
1652
1657
|
return o.rowMetadataMap[n].size;
|
|
1653
1658
|
},
|
|
1654
|
-
getRowStartIndexForOffset: function(
|
|
1655
|
-
return Xt("row",
|
|
1659
|
+
getRowStartIndexForOffset: function(e, n, o) {
|
|
1660
|
+
return Xt("row", e, o, n);
|
|
1656
1661
|
},
|
|
1657
|
-
getRowStopIndexForStartIndex: function(
|
|
1658
|
-
for (var a =
|
|
1659
|
-
m++, p +=
|
|
1662
|
+
getRowStopIndexForStartIndex: function(e, n, o, r) {
|
|
1663
|
+
for (var a = e.rowCount, l = e.height, c = fe("row", e, n, r), d = o + l, p = c.offset + c.size, m = n; m < a - 1 && p < d; )
|
|
1664
|
+
m++, p += fe("row", e, m, r).size;
|
|
1660
1665
|
return m;
|
|
1661
1666
|
},
|
|
1662
|
-
initInstanceProps: function(
|
|
1663
|
-
var o =
|
|
1667
|
+
initInstanceProps: function(e, n) {
|
|
1668
|
+
var o = e, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, l = {
|
|
1664
1669
|
columnMetadataMap: {},
|
|
1665
1670
|
estimatedColumnWidth: r || Kt,
|
|
1666
1671
|
estimatedRowHeight: a || Kt,
|
|
@@ -1668,24 +1673,24 @@ var Uo = function(t, n) {
|
|
|
1668
1673
|
lastMeasuredRowIndex: -1,
|
|
1669
1674
|
rowMetadataMap: {}
|
|
1670
1675
|
};
|
|
1671
|
-
return n.resetAfterColumnIndex = function(
|
|
1672
|
-
|
|
1673
|
-
columnIndex:
|
|
1674
|
-
shouldForceUpdate:
|
|
1676
|
+
return n.resetAfterColumnIndex = function(c, d) {
|
|
1677
|
+
d === void 0 && (d = !0), n.resetAfterIndices({
|
|
1678
|
+
columnIndex: c,
|
|
1679
|
+
shouldForceUpdate: d
|
|
1675
1680
|
});
|
|
1676
|
-
}, n.resetAfterRowIndex = function(
|
|
1677
|
-
|
|
1678
|
-
rowIndex:
|
|
1679
|
-
shouldForceUpdate:
|
|
1681
|
+
}, n.resetAfterRowIndex = function(c, d) {
|
|
1682
|
+
d === void 0 && (d = !0), n.resetAfterIndices({
|
|
1683
|
+
rowIndex: c,
|
|
1684
|
+
shouldForceUpdate: d
|
|
1680
1685
|
});
|
|
1681
|
-
}, n.resetAfterIndices = function(
|
|
1682
|
-
var
|
|
1683
|
-
typeof
|
|
1684
|
-
},
|
|
1686
|
+
}, n.resetAfterIndices = function(c) {
|
|
1687
|
+
var d = c.columnIndex, p = c.rowIndex, m = c.shouldForceUpdate, v = m === void 0 ? !0 : m;
|
|
1688
|
+
typeof d == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, d - 1)), typeof p == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, p - 1)), n._getItemStyleCache(-1), v && n.forceUpdate();
|
|
1689
|
+
}, l;
|
|
1685
1690
|
},
|
|
1686
1691
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
1687
|
-
validateProps: function(
|
|
1688
|
-
var n =
|
|
1692
|
+
validateProps: function(e) {
|
|
1693
|
+
var n = e.columnWidth, o = e.rowHeight;
|
|
1689
1694
|
if (process.env.NODE_ENV !== "production") {
|
|
1690
1695
|
if (typeof n != "function")
|
|
1691
1696
|
throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (n === null ? "null" : typeof n) + '" was specified.'));
|
|
@@ -1695,43 +1700,43 @@ var Uo = function(t, n) {
|
|
|
1695
1700
|
}
|
|
1696
1701
|
});
|
|
1697
1702
|
process.env.NODE_ENV;
|
|
1698
|
-
function Jt(
|
|
1699
|
-
for (var n in
|
|
1700
|
-
if (!(n in
|
|
1703
|
+
function Jt(t, e) {
|
|
1704
|
+
for (var n in t)
|
|
1705
|
+
if (!(n in e))
|
|
1701
1706
|
return !0;
|
|
1702
|
-
for (var o in
|
|
1703
|
-
if (
|
|
1707
|
+
for (var o in e)
|
|
1708
|
+
if (t[o] !== e[o])
|
|
1704
1709
|
return !0;
|
|
1705
1710
|
return !1;
|
|
1706
1711
|
}
|
|
1707
1712
|
var jo = ["style"], Ko = ["style"];
|
|
1708
|
-
function Xo(
|
|
1709
|
-
var n =
|
|
1713
|
+
function Xo(t, e) {
|
|
1714
|
+
var n = t.style, o = Vt(t, jo), r = e.style, a = Vt(e, Ko);
|
|
1710
1715
|
return !Jt(n, r) && !Jt(o, a);
|
|
1711
1716
|
}
|
|
1712
1717
|
const Yo = () => {
|
|
1713
|
-
const { viewMode:
|
|
1714
|
-
const
|
|
1715
|
-
return (!T
|
|
1716
|
-
}, []), [r.widths,
|
|
1718
|
+
const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = qe(), a = W(() => r.heights.length, [r.heights]), l = W(() => e === J.HORIZONTAL_SCROLLING ? a : t === Ie.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = W(() => r.widths.reduce((C, y, P) => {
|
|
1719
|
+
const T = P % l;
|
|
1720
|
+
return (!C[T] || y > C[T]) && (C[T] = y), C;
|
|
1721
|
+
}, []), [r.widths, l]), d = N(
|
|
1717
1722
|
(w) => {
|
|
1718
|
-
const
|
|
1719
|
-
return
|
|
1723
|
+
const C = w % c.length;
|
|
1724
|
+
return c[C] || 0;
|
|
1720
1725
|
},
|
|
1721
|
-
[
|
|
1726
|
+
[c]
|
|
1722
1727
|
), p = N(
|
|
1723
1728
|
(w) => r.heights[w] || 0,
|
|
1724
1729
|
[r.heights]
|
|
1725
1730
|
);
|
|
1726
1731
|
k(() => {
|
|
1727
|
-
n(
|
|
1728
|
-
}, [
|
|
1729
|
-
const m =
|
|
1732
|
+
n(l);
|
|
1733
|
+
}, [l, n]);
|
|
1734
|
+
const m = W(() => e === J.HORIZONTAL_SCROLLING || e === J.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), v = W(() => r.heights.reduce((w, C) => w + C, 0) / r.heights.length || 0, [r]), h = W(() => r.widths.reduce((w, C) => w + C, 0) / r.heights.length || 0, [r]);
|
|
1730
1735
|
return {
|
|
1731
1736
|
rowCount: m,
|
|
1732
1737
|
rowHeight: p,
|
|
1733
|
-
columnCount:
|
|
1734
|
-
columnWidth:
|
|
1738
|
+
columnCount: l,
|
|
1739
|
+
columnWidth: d,
|
|
1735
1740
|
pageDimension: r,
|
|
1736
1741
|
estimatedRowHeight: v,
|
|
1737
1742
|
estimatedColumnWidth: h
|
|
@@ -1741,82 +1746,82 @@ let oe;
|
|
|
1741
1746
|
typeof window < "u" ? oe = window : typeof self < "u" ? oe = self : oe = global;
|
|
1742
1747
|
let _t = null, bt = null;
|
|
1743
1748
|
const Qt = 20, pt = oe.clearTimeout, en = oe.setTimeout, ht = oe.cancelAnimationFrame || oe.mozCancelAnimationFrame || oe.webkitCancelAnimationFrame, tn = oe.requestAnimationFrame || oe.mozRequestAnimationFrame || oe.webkitRequestAnimationFrame;
|
|
1744
|
-
ht == null || tn == null ? (_t = pt, bt = function(
|
|
1745
|
-
return en(
|
|
1746
|
-
}) : (_t = function([
|
|
1747
|
-
ht(
|
|
1748
|
-
}, bt = function(
|
|
1749
|
+
ht == null || tn == null ? (_t = pt, bt = function(e) {
|
|
1750
|
+
return en(e, Qt);
|
|
1751
|
+
}) : (_t = function([e, n]) {
|
|
1752
|
+
ht(e), pt(n);
|
|
1753
|
+
}, bt = function(e) {
|
|
1749
1754
|
const n = tn(function() {
|
|
1750
|
-
pt(o),
|
|
1755
|
+
pt(o), e();
|
|
1751
1756
|
}), o = en(function() {
|
|
1752
|
-
ht(n),
|
|
1757
|
+
ht(n), e();
|
|
1753
1758
|
}, Qt);
|
|
1754
1759
|
return [n, o];
|
|
1755
1760
|
});
|
|
1756
|
-
function Jo(
|
|
1757
|
-
let
|
|
1758
|
-
const
|
|
1759
|
-
if (!
|
|
1760
|
-
|
|
1761
|
-
const
|
|
1761
|
+
function Jo(t) {
|
|
1762
|
+
let e, n, o, r, a, l, c;
|
|
1763
|
+
const d = typeof document < "u" && document.attachEvent;
|
|
1764
|
+
if (!d) {
|
|
1765
|
+
l = function(T) {
|
|
1766
|
+
const u = T.__resizeTriggers__, f = u.firstElementChild, g = u.lastElementChild, s = f.firstElementChild;
|
|
1762
1767
|
g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, s.style.width = f.offsetWidth + 1 + "px", s.style.height = f.offsetHeight + 1 + "px", f.scrollLeft = f.scrollWidth, f.scrollTop = f.scrollHeight;
|
|
1763
|
-
}, a = function(
|
|
1764
|
-
return
|
|
1765
|
-
},
|
|
1766
|
-
if (
|
|
1768
|
+
}, a = function(T) {
|
|
1769
|
+
return T.offsetWidth !== T.__resizeLast__.width || T.offsetHeight !== T.__resizeLast__.height;
|
|
1770
|
+
}, c = function(T) {
|
|
1771
|
+
if (T.target.className && typeof T.target.className.indexOf == "function" && T.target.className.indexOf("contract-trigger") < 0 && T.target.className.indexOf("expand-trigger") < 0)
|
|
1767
1772
|
return;
|
|
1768
|
-
const
|
|
1769
|
-
|
|
1770
|
-
a(
|
|
1771
|
-
s.call(
|
|
1773
|
+
const u = this;
|
|
1774
|
+
l(this), this.__resizeRAF__ && _t(this.__resizeRAF__), this.__resizeRAF__ = bt(function() {
|
|
1775
|
+
a(u) && (u.__resizeLast__.width = u.offsetWidth, u.__resizeLast__.height = u.offsetHeight, u.__resizeListeners__.forEach(function(s) {
|
|
1776
|
+
s.call(u, T);
|
|
1772
1777
|
}));
|
|
1773
1778
|
});
|
|
1774
1779
|
};
|
|
1775
1780
|
let h = !1, w = "";
|
|
1776
1781
|
o = "animationstart";
|
|
1777
|
-
const
|
|
1778
|
-
let
|
|
1782
|
+
const C = "Webkit Moz O ms".split(" ");
|
|
1783
|
+
let y = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), P = "";
|
|
1779
1784
|
{
|
|
1780
|
-
const
|
|
1781
|
-
if (
|
|
1782
|
-
for (let
|
|
1783
|
-
if (
|
|
1784
|
-
|
|
1785
|
+
const T = document.createElement("fakeelement");
|
|
1786
|
+
if (T.style.animationName !== void 0 && (h = !0), h === !1) {
|
|
1787
|
+
for (let u = 0; u < C.length; u++)
|
|
1788
|
+
if (T.style[C[u] + "AnimationName"] !== void 0) {
|
|
1789
|
+
P = C[u], w = "-" + P.toLowerCase() + "-", o = y[u], h = !0;
|
|
1785
1790
|
break;
|
|
1786
1791
|
}
|
|
1787
1792
|
}
|
|
1788
1793
|
}
|
|
1789
|
-
n = "resizeanim",
|
|
1794
|
+
n = "resizeanim", e = "@" + w + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = w + "animation: 1ms " + n + "; ";
|
|
1790
1795
|
}
|
|
1791
1796
|
const p = function(h) {
|
|
1792
1797
|
if (!h.getElementById("detectElementResize")) {
|
|
1793
|
-
const w = (
|
|
1794
|
-
|
|
1798
|
+
const w = (e || "") + ".resize-triggers { " + (r || "") + '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%; }', C = h.head || h.getElementsByTagName("head")[0], y = h.createElement("style");
|
|
1799
|
+
y.id = "detectElementResize", y.type = "text/css", t != null && y.setAttribute("nonce", t), y.styleSheet ? y.styleSheet.cssText = w : y.appendChild(h.createTextNode(w)), C.appendChild(y);
|
|
1795
1800
|
}
|
|
1796
1801
|
};
|
|
1797
1802
|
return {
|
|
1798
1803
|
addResizeListener: function(h, w) {
|
|
1799
|
-
if (
|
|
1804
|
+
if (d)
|
|
1800
1805
|
h.attachEvent("onresize", w);
|
|
1801
1806
|
else {
|
|
1802
1807
|
if (!h.__resizeTriggers__) {
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1805
|
-
const
|
|
1806
|
-
|
|
1807
|
-
const
|
|
1808
|
-
|
|
1809
|
-
f.animationName === n &&
|
|
1808
|
+
const C = h.ownerDocument, y = oe.getComputedStyle(h);
|
|
1809
|
+
y && y.position === "static" && (h.style.position = "relative"), p(C), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = C.createElement("div")).className = "resize-triggers";
|
|
1810
|
+
const P = C.createElement("div");
|
|
1811
|
+
P.className = "expand-trigger", P.appendChild(C.createElement("div"));
|
|
1812
|
+
const T = C.createElement("div");
|
|
1813
|
+
T.className = "contract-trigger", h.__resizeTriggers__.appendChild(P), h.__resizeTriggers__.appendChild(T), h.appendChild(h.__resizeTriggers__), l(h), h.addEventListener("scroll", c, !0), o && (h.__resizeTriggers__.__animationListener__ = function(f) {
|
|
1814
|
+
f.animationName === n && l(h);
|
|
1810
1815
|
}, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
|
|
1811
1816
|
}
|
|
1812
1817
|
h.__resizeListeners__.push(w);
|
|
1813
1818
|
}
|
|
1814
1819
|
},
|
|
1815
1820
|
removeResizeListener: function(h, w) {
|
|
1816
|
-
if (
|
|
1821
|
+
if (d)
|
|
1817
1822
|
h.detachEvent("onresize", w);
|
|
1818
1823
|
else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(w), 1), !h.__resizeListeners__.length) {
|
|
1819
|
-
h.removeEventListener("scroll",
|
|
1824
|
+
h.removeEventListener("scroll", c, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(o, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
|
|
1820
1825
|
try {
|
|
1821
1826
|
h.__resizeTriggers__ = !h.removeChild(h.__resizeTriggers__);
|
|
1822
1827
|
} catch {
|
|
@@ -1825,9 +1830,9 @@ function Jo(e) {
|
|
|
1825
1830
|
}
|
|
1826
1831
|
};
|
|
1827
1832
|
}
|
|
1828
|
-
class Qo extends
|
|
1829
|
-
constructor(...
|
|
1830
|
-
super(...
|
|
1833
|
+
class Qo extends er {
|
|
1834
|
+
constructor(...e) {
|
|
1835
|
+
super(...e), this.state = {
|
|
1831
1836
|
height: this.props.defaultHeight || 0,
|
|
1832
1837
|
scaledHeight: this.props.defaultHeight || 0,
|
|
1833
1838
|
scaledWidth: this.props.defaultWidth || 0,
|
|
@@ -1840,17 +1845,17 @@ class Qo extends Qn {
|
|
|
1840
1845
|
onResize: r
|
|
1841
1846
|
} = this.props;
|
|
1842
1847
|
if (this._parentNode) {
|
|
1843
|
-
const a = window.getComputedStyle(this._parentNode) || {},
|
|
1844
|
-
(!n && (this.state.height !== w || this.state.scaledHeight !== v) || !o && (this.state.width !==
|
|
1848
|
+
const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), p = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), v = m.height - d - p, h = m.width - l - c, w = this._parentNode.offsetHeight - d - p, C = this._parentNode.offsetWidth - l - c;
|
|
1849
|
+
(!n && (this.state.height !== w || this.state.scaledHeight !== v) || !o && (this.state.width !== C || this.state.scaledWidth !== h)) && (this.setState({
|
|
1845
1850
|
height: w,
|
|
1846
|
-
width:
|
|
1851
|
+
width: C,
|
|
1847
1852
|
scaledHeight: v,
|
|
1848
1853
|
scaledWidth: h
|
|
1849
1854
|
}), typeof r == "function" && r({
|
|
1850
1855
|
height: w,
|
|
1851
1856
|
scaledHeight: v,
|
|
1852
1857
|
scaledWidth: h,
|
|
1853
|
-
width:
|
|
1858
|
+
width: C
|
|
1854
1859
|
}));
|
|
1855
1860
|
}
|
|
1856
1861
|
}, this._setRef = (n) => {
|
|
@@ -1859,14 +1864,14 @@ class Qo extends Qn {
|
|
|
1859
1864
|
}
|
|
1860
1865
|
componentDidMount() {
|
|
1861
1866
|
const {
|
|
1862
|
-
nonce:
|
|
1867
|
+
nonce: e
|
|
1863
1868
|
} = this.props, n = this._autoSizer ? this._autoSizer.parentNode : null;
|
|
1864
1869
|
if (n != null && n.ownerDocument && n.ownerDocument.defaultView && n instanceof n.ownerDocument.defaultView.HTMLElement) {
|
|
1865
1870
|
this._parentNode = n;
|
|
1866
1871
|
const o = n.ownerDocument.defaultView.ResizeObserver;
|
|
1867
1872
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1868
1873
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1869
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize = Jo(
|
|
1874
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = Jo(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1870
1875
|
}
|
|
1871
1876
|
}
|
|
1872
1877
|
componentWillUnmount() {
|
|
@@ -1874,66 +1879,70 @@ class Qo extends Qn {
|
|
|
1874
1879
|
}
|
|
1875
1880
|
render() {
|
|
1876
1881
|
const {
|
|
1877
|
-
children:
|
|
1882
|
+
children: e,
|
|
1878
1883
|
defaultHeight: n,
|
|
1879
1884
|
defaultWidth: o,
|
|
1880
1885
|
disableHeight: r = !1,
|
|
1881
1886
|
disableWidth: a = !1,
|
|
1882
|
-
doNotBailOutOnEmptyChildren:
|
|
1883
|
-
nonce:
|
|
1884
|
-
onResize:
|
|
1887
|
+
doNotBailOutOnEmptyChildren: l = !1,
|
|
1888
|
+
nonce: c,
|
|
1889
|
+
onResize: d,
|
|
1885
1890
|
style: p = {},
|
|
1886
1891
|
tagName: m = "div",
|
|
1887
1892
|
...v
|
|
1888
1893
|
} = this.props, {
|
|
1889
1894
|
height: h,
|
|
1890
1895
|
scaledHeight: w,
|
|
1891
|
-
scaledWidth:
|
|
1892
|
-
width:
|
|
1893
|
-
} = this.state,
|
|
1896
|
+
scaledWidth: C,
|
|
1897
|
+
width: y
|
|
1898
|
+
} = this.state, P = {
|
|
1894
1899
|
overflow: "visible"
|
|
1895
|
-
},
|
|
1896
|
-
let
|
|
1897
|
-
return r || (h === 0 && (
|
|
1900
|
+
}, T = {};
|
|
1901
|
+
let u = !1;
|
|
1902
|
+
return r || (h === 0 && (u = !0), P.height = 0, T.height = h, T.scaledHeight = w), a || (y === 0 && (u = !0), P.width = 0, T.width = y, T.scaledWidth = C), l && (u = !1), Ve(m, {
|
|
1898
1903
|
ref: this._setRef,
|
|
1899
1904
|
style: {
|
|
1900
|
-
...
|
|
1905
|
+
...P,
|
|
1901
1906
|
...p
|
|
1902
1907
|
},
|
|
1903
1908
|
...v
|
|
1904
|
-
}, !
|
|
1909
|
+
}, !u && e(T));
|
|
1905
1910
|
}
|
|
1906
1911
|
}
|
|
1907
|
-
const ei = ({ widths:
|
|
1908
|
-
const { focusedPage: n, totalPages: o } = ie(), r =
|
|
1909
|
-
const
|
|
1910
|
-
if (
|
|
1911
|
-
const p =
|
|
1912
|
-
|
|
1913
|
-
}
|
|
1914
|
-
return l;
|
|
1915
|
-
}, [n, o]), a = M(() => [
|
|
1916
|
-
{
|
|
1917
|
-
position: "absolute",
|
|
1918
|
-
left: 0,
|
|
1919
|
-
width: e(n - 1),
|
|
1920
|
-
height: t(n - 1)
|
|
1921
|
-
},
|
|
1922
|
-
{
|
|
1923
|
-
position: "absolute",
|
|
1924
|
-
left: e(n),
|
|
1925
|
-
top: 0,
|
|
1926
|
-
width: e(n),
|
|
1927
|
-
height: t(n)
|
|
1912
|
+
const ei = ln(({ widths: t, heights: e }) => {
|
|
1913
|
+
const { focusedPage: n, totalPages: o } = ie(), r = W(() => {
|
|
1914
|
+
const c = [], d = Math.ceil(n / 2) * 2 - 1;
|
|
1915
|
+
if (c.push(d), d + 1 <= o) {
|
|
1916
|
+
const p = d + 1;
|
|
1917
|
+
c.push(p);
|
|
1928
1918
|
}
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1919
|
+
return c;
|
|
1920
|
+
}, [n, o]), a = W(() => {
|
|
1921
|
+
const c = t(n - 1), d = e(n - 1), p = t(n), m = e(n), v = d > m ? d : m, h = d < m ? d : m, w = v / 2 - h / 2;
|
|
1922
|
+
return [
|
|
1923
|
+
{
|
|
1924
|
+
position: "absolute",
|
|
1925
|
+
left: 0,
|
|
1926
|
+
top: v === d ? 0 : w,
|
|
1927
|
+
width: c,
|
|
1928
|
+
height: d
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
position: "absolute",
|
|
1932
|
+
left: c,
|
|
1933
|
+
top: v === m ? 0 : w,
|
|
1934
|
+
width: p,
|
|
1935
|
+
height: m
|
|
1936
|
+
}
|
|
1937
|
+
];
|
|
1938
|
+
}, [t, e, r]), l = W(() => a.reduce((c, d) => c + Number(d.width || 0), 0), [a]);
|
|
1939
|
+
return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, d) => /* @__PURE__ */ i(It, { style: a[d], pageNumber: c }, c)) });
|
|
1940
|
+
}), ti = ({ widths: t, heights: e }) => {
|
|
1941
|
+
const { focusedPage: n } = ie(), o = W(() => ({
|
|
1933
1942
|
position: "absolute",
|
|
1934
|
-
width:
|
|
1935
|
-
height:
|
|
1936
|
-
}), [
|
|
1943
|
+
width: t(n - 1),
|
|
1944
|
+
height: e(n - 1)
|
|
1945
|
+
}), [t, e, n]), r = W(() => t(n - 1), [t]);
|
|
1937
1946
|
return /* @__PURE__ */ i(
|
|
1938
1947
|
"div",
|
|
1939
1948
|
{
|
|
@@ -1944,47 +1953,47 @@ const ei = ({ widths: e, heights: t }) => {
|
|
|
1944
1953
|
children: /* @__PURE__ */ i(It, { style: o, pageNumber: n }, n)
|
|
1945
1954
|
}
|
|
1946
1955
|
);
|
|
1947
|
-
}, ni = (
|
|
1948
|
-
const o = H(), { contentRef: r } = ge(), { heights: a, widths:
|
|
1949
|
-
const
|
|
1956
|
+
}, ni = (t, e, n) => {
|
|
1957
|
+
const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = qe(), { setFocusedPage: c } = ie(), [d, p] = $([]), { targetScrollPage: m } = pn(), v = Pt(d, 0, 500), h = W(() => a.map((C, y) => {
|
|
1958
|
+
const P = l[y], T = Ur(y + 1, t), u = P * T.columnIndex, f = C * T.rowIndex, g = u + P, s = f + C;
|
|
1950
1959
|
return {
|
|
1951
|
-
pageNumber:
|
|
1952
|
-
...
|
|
1953
|
-
width:
|
|
1954
|
-
height:
|
|
1955
|
-
startX:
|
|
1960
|
+
pageNumber: y + 1,
|
|
1961
|
+
...T,
|
|
1962
|
+
width: P,
|
|
1963
|
+
height: C,
|
|
1964
|
+
startX: u,
|
|
1956
1965
|
startY: f,
|
|
1957
1966
|
endX: g,
|
|
1958
1967
|
endY: s
|
|
1959
1968
|
};
|
|
1960
|
-
}), [a,
|
|
1969
|
+
}), [a, l, t, e]);
|
|
1961
1970
|
k(() => {
|
|
1962
|
-
var
|
|
1963
|
-
v.length > 0 && !m.current &&
|
|
1964
|
-
let
|
|
1965
|
-
|
|
1971
|
+
var y;
|
|
1972
|
+
v.length > 0 && !m.current && c(v[0].pageNumber);
|
|
1973
|
+
let C = (y = v[0]) == null ? void 0 : y.ratio;
|
|
1974
|
+
C && v.filter((P) => Math.round(P.ratio) === Math.round(C)).some((P) => P.pageNumber === m.current) && setTimeout(() => {
|
|
1966
1975
|
m.current = void 0;
|
|
1967
1976
|
}, 500);
|
|
1968
|
-
}, [v,
|
|
1977
|
+
}, [v, c]);
|
|
1969
1978
|
const w = N(
|
|
1970
|
-
(
|
|
1979
|
+
(C) => {
|
|
1971
1980
|
o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
|
|
1972
|
-
const
|
|
1973
|
-
startTop:
|
|
1974
|
-
startLeft:
|
|
1975
|
-
endTop:
|
|
1976
|
-
endLeft:
|
|
1977
|
-
},
|
|
1978
|
-
const f =
|
|
1981
|
+
const y = C.target, P = {
|
|
1982
|
+
startTop: y.scrollTop,
|
|
1983
|
+
startLeft: y.scrollLeft,
|
|
1984
|
+
endTop: y.scrollTop + y.clientHeight,
|
|
1985
|
+
endLeft: y.scrollLeft + y.clientWidth
|
|
1986
|
+
}, T = h.filter((u) => {
|
|
1987
|
+
const f = u.endX >= P.startLeft && u.endY >= P.startTop, g = u.startX <= P.endLeft && u.startY <= P.endTop;
|
|
1979
1988
|
return f && g;
|
|
1980
|
-
}).map((
|
|
1981
|
-
const f =
|
|
1989
|
+
}).map((u) => {
|
|
1990
|
+
const f = P.startLeft > u.startX ? P.startLeft : u.startX, g = P.startTop > u.startY ? P.startTop : u.startY, s = P.endLeft < u.endX ? P.endLeft : u.endX, b = P.endTop < u.endY ? P.endTop : u.endY, _ = s - f, S = b - g, x = +(_ * S / (u.width * u.height) * 100).toFixed(2);
|
|
1982
1991
|
return {
|
|
1983
|
-
pageNumber:
|
|
1992
|
+
pageNumber: u.pageNumber,
|
|
1984
1993
|
ratio: x
|
|
1985
1994
|
};
|
|
1986
|
-
}).sort((
|
|
1987
|
-
p(
|
|
1995
|
+
}).sort((u, f) => f.ratio - u.ratio);
|
|
1996
|
+
p(T);
|
|
1988
1997
|
});
|
|
1989
1998
|
},
|
|
1990
1999
|
[r, h]
|
|
@@ -1995,77 +2004,77 @@ const ei = ({ widths: e, heights: t }) => {
|
|
|
1995
2004
|
n == null || n.removeEventListener("scroll", w);
|
|
1996
2005
|
};
|
|
1997
2006
|
}, [n, w]);
|
|
1998
|
-
}, ri =
|
|
1999
|
-
const r =
|
|
2007
|
+
}, ri = ln(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
|
|
2008
|
+
const r = Vr(e, t, n.columnCount);
|
|
2000
2009
|
return /* @__PURE__ */ i(It, { style: o, pageNumber: r }, r);
|
|
2001
2010
|
}, Xo), qs = () => {
|
|
2002
|
-
const { initialPage:
|
|
2003
|
-
virtualScrollRef:
|
|
2004
|
-
getVirtualScrollRef:
|
|
2005
|
-
getPageScrollElementRef:
|
|
2011
|
+
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = ar(), { pagesRef: o, setPagesRef: r } = ge(), { scrollToPage: a } = wn(), {
|
|
2012
|
+
virtualScrollRef: l,
|
|
2013
|
+
getVirtualScrollRef: c,
|
|
2014
|
+
getPageScrollElementRef: d,
|
|
2006
2015
|
getVirtualScrollableElementRef: p,
|
|
2007
2016
|
setTotalInnerDimensions: m,
|
|
2008
2017
|
virtualScrollableElementRef: v,
|
|
2009
2018
|
totalInnerDimensions: h,
|
|
2010
2019
|
pageScrollElementRef: w
|
|
2011
|
-
} = et(),
|
|
2020
|
+
} = et(), C = H(!0), { nextPage: y, prevPage: P, setFocusedPage: T, focusedPage: u } = ie(), { scrollMode: f } = Re(), { viewMode: g } = Ee(), s = H(null), { loading: b } = Q(), { passwordRequired: _ } = nr(), { LoaderImageComponent: S } = hn(), E = H(
|
|
2012
2021
|
h
|
|
2013
2022
|
), x = H({
|
|
2014
2023
|
viewMode: g,
|
|
2015
2024
|
scrollMode: f
|
|
2016
|
-
}),
|
|
2025
|
+
}), L = H(!1), D = H(), { isFullScreen: A } = sr(), {
|
|
2017
2026
|
pageDimension: z,
|
|
2018
|
-
rowCount:
|
|
2027
|
+
rowCount: R,
|
|
2019
2028
|
rowHeight: I,
|
|
2020
2029
|
columnCount: O,
|
|
2021
|
-
columnWidth:
|
|
2030
|
+
columnWidth: M,
|
|
2022
2031
|
estimatedColumnWidth: G,
|
|
2023
2032
|
estimatedRowHeight: Z
|
|
2024
|
-
} = Yo(), j =
|
|
2025
|
-
ni(O,
|
|
2026
|
-
const
|
|
2033
|
+
} = Yo(), j = Pt(h, 100), V = H();
|
|
2034
|
+
ni(O, R, v);
|
|
2035
|
+
const ee = H({
|
|
2027
2036
|
scrollTop: 0,
|
|
2028
2037
|
scrollLeft: 0
|
|
2029
2038
|
});
|
|
2030
2039
|
Gr(o);
|
|
2031
2040
|
const { isPressed: X } = Hr(), { selectionMode: le } = ir(), { initializeGrabScroll: ae, resetGrabState: de } = $r({
|
|
2032
2041
|
isPressed: X
|
|
2033
|
-
}), te =
|
|
2042
|
+
}), te = W(() => le === tr.HAND, [le]), Fe = W(() => ({
|
|
2034
2043
|
columnCount: O
|
|
2035
|
-
}), [O]),
|
|
2044
|
+
}), [O]), Ne = N(
|
|
2036
2045
|
(q) => {
|
|
2037
|
-
const
|
|
2038
|
-
!A &&
|
|
2046
|
+
const U = document.activeElement !== o;
|
|
2047
|
+
!A && U || (["ArrowUp", "ArrowLeft"].includes(q.key) ? (q.preventDefault(), P()) : ["ArrowDown", "ArrowRight"].includes(q.key) && (q.preventDefault(), y()));
|
|
2039
2048
|
},
|
|
2040
|
-
[
|
|
2049
|
+
[y, P, A, f]
|
|
2041
2050
|
);
|
|
2042
|
-
k(() => (window.addEventListener("keydown",
|
|
2043
|
-
window.removeEventListener("keydown",
|
|
2044
|
-
}), [
|
|
2045
|
-
if (s.current && (s.current.style.position = "relative"), !!
|
|
2046
|
-
for (let q = 0; q <
|
|
2047
|
-
for (let
|
|
2048
|
-
|
|
2049
|
-
columnIndex:
|
|
2051
|
+
k(() => (window.addEventListener("keydown", Ne), () => {
|
|
2052
|
+
window.removeEventListener("keydown", Ne);
|
|
2053
|
+
}), [Ne]), k(() => {
|
|
2054
|
+
if (s.current && (s.current.style.position = "relative"), !!l)
|
|
2055
|
+
for (let q = 0; q < R; q++)
|
|
2056
|
+
for (let U = 0; U < O; U++)
|
|
2057
|
+
l.resetAfterIndices({
|
|
2058
|
+
columnIndex: U,
|
|
2050
2059
|
rowIndex: q,
|
|
2051
2060
|
shouldForceUpdate: !0
|
|
2052
2061
|
});
|
|
2053
|
-
}, [
|
|
2054
|
-
const
|
|
2055
|
-
(q,
|
|
2062
|
+
}, [R, O, z, l]);
|
|
2063
|
+
const Pe = N(
|
|
2064
|
+
(q, U) => {
|
|
2056
2065
|
if (!v)
|
|
2057
2066
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
2058
|
-
const
|
|
2059
|
-
return
|
|
2067
|
+
const Te = ee.current.scrollTop > U, Se = ee.current.scrollLeft > q;
|
|
2068
|
+
return Te || Se ? ee.current : {
|
|
2060
2069
|
scrollTop: v.scrollTop,
|
|
2061
2070
|
scrollLeft: v.scrollLeft
|
|
2062
2071
|
};
|
|
2063
2072
|
},
|
|
2064
2073
|
[v]
|
|
2065
2074
|
), we = N(
|
|
2066
|
-
(q,
|
|
2075
|
+
(q, U) => {
|
|
2067
2076
|
if (x.current.viewMode !== g || x.current.scrollMode !== f) {
|
|
2068
|
-
|
|
2077
|
+
V.current && clearTimeout(V.current), L.current = !0, a(u, "auto"), V.current = setTimeout(() => {
|
|
2069
2078
|
requestAnimationFrame(() => {
|
|
2070
2079
|
x.current = { viewMode: g, scrollMode: f };
|
|
2071
2080
|
});
|
|
@@ -2073,44 +2082,44 @@ const ei = ({ widths: e, heights: t }) => {
|
|
|
2073
2082
|
return;
|
|
2074
2083
|
}
|
|
2075
2084
|
const Se = q.scrollTop, ot = q.scrollLeft;
|
|
2076
|
-
if (!
|
|
2085
|
+
if (!U.height || !U.width)
|
|
2077
2086
|
return;
|
|
2078
|
-
|
|
2079
|
-
const { height: ye, width: it } =
|
|
2087
|
+
L.current = !0;
|
|
2088
|
+
const { height: ye, width: it } = U, { height: Ot, width: Dt } = E.current;
|
|
2080
2089
|
if (Ot === ye && Dt === it)
|
|
2081
2090
|
return;
|
|
2082
|
-
const
|
|
2091
|
+
const Kn = Se / Ot * ye, Xn = ot / Dt * it, Yn = Math.round(Math.min(Kn, ye)) || 0, Jn = Math.round(Math.min(Xn, it)) || 0;
|
|
2083
2092
|
D.current = setTimeout(() => {
|
|
2084
2093
|
requestAnimationFrame(() => {
|
|
2085
|
-
|
|
2086
|
-
scrollTop:
|
|
2087
|
-
scrollLeft:
|
|
2094
|
+
l == null || l.scrollTo({
|
|
2095
|
+
scrollTop: Yn,
|
|
2096
|
+
scrollLeft: Jn
|
|
2088
2097
|
});
|
|
2089
2098
|
});
|
|
2090
2099
|
}, 0), E.current = {
|
|
2091
|
-
height:
|
|
2092
|
-
width:
|
|
2100
|
+
height: U.height,
|
|
2101
|
+
width: U.width
|
|
2093
2102
|
};
|
|
2094
2103
|
},
|
|
2095
|
-
[
|
|
2104
|
+
[l, g, f, a]
|
|
2096
2105
|
);
|
|
2097
2106
|
k(() => {
|
|
2098
2107
|
clearTimeout(D.current);
|
|
2099
|
-
const q = Array.from({ length:
|
|
2108
|
+
const q = Array.from({ length: R }).reduce(
|
|
2100
2109
|
(Se, ot, ye) => Se + I(ye),
|
|
2101
2110
|
0
|
|
2102
|
-
),
|
|
2103
|
-
(Se, ot, ye) => Se +
|
|
2111
|
+
), U = Array.from({ length: O }).reduce(
|
|
2112
|
+
(Se, ot, ye) => Se + M(ye),
|
|
2104
2113
|
0
|
|
2105
|
-
),
|
|
2106
|
-
|
|
2114
|
+
), Te = Pe(U, q);
|
|
2115
|
+
ee.current = Te, we(Te, { height: q, width: U }), m({
|
|
2107
2116
|
height: q,
|
|
2108
|
-
width:
|
|
2117
|
+
width: U
|
|
2109
2118
|
});
|
|
2110
|
-
}, [z,
|
|
2119
|
+
}, [z, R, O, we]);
|
|
2111
2120
|
const nt = N(
|
|
2112
2121
|
(q) => {
|
|
2113
|
-
|
|
2122
|
+
ee.current = {
|
|
2114
2123
|
scrollTop: q.scrollTop,
|
|
2115
2124
|
scrollLeft: q.scrollLeft
|
|
2116
2125
|
};
|
|
@@ -2118,16 +2127,16 @@ const ei = ({ widths: e, heights: t }) => {
|
|
|
2118
2127
|
[v]
|
|
2119
2128
|
);
|
|
2120
2129
|
k(() => () => {
|
|
2121
|
-
|
|
2130
|
+
V.current && clearTimeout(V.current);
|
|
2122
2131
|
}, []);
|
|
2123
|
-
const rt =
|
|
2132
|
+
const rt = W(() => ne(ue["rp-pages-container"], {
|
|
2124
2133
|
[ue["rp-cursor-grab"]]: te && !X,
|
|
2125
2134
|
[ue["rp-cursor-grabbing"]]: te && X
|
|
2126
|
-
}), [te, X]),
|
|
2135
|
+
}), [te, X]), jn = N(
|
|
2127
2136
|
(q) => {
|
|
2128
2137
|
if (te && q) {
|
|
2129
|
-
const
|
|
2130
|
-
ae(
|
|
2138
|
+
const U = ne(ue["rp-pages"]), Te = document.querySelector(`.${U}`);
|
|
2139
|
+
ae(Te);
|
|
2131
2140
|
}
|
|
2132
2141
|
},
|
|
2133
2142
|
[te, ae, ue]
|
|
@@ -2135,47 +2144,47 @@ const ei = ({ widths: e, heights: t }) => {
|
|
|
2135
2144
|
return k(() => {
|
|
2136
2145
|
b && de();
|
|
2137
2146
|
}, [b]), k(() => {
|
|
2138
|
-
if (!(j.height === 0 || !
|
|
2139
|
-
if (
|
|
2140
|
-
|
|
2147
|
+
if (!(j.height === 0 || !C.current)) {
|
|
2148
|
+
if (e === J.PAGE_SCROLLING) {
|
|
2149
|
+
t !== u && w && T(t), C.current = !1;
|
|
2141
2150
|
return;
|
|
2142
2151
|
}
|
|
2143
|
-
a(
|
|
2152
|
+
a(t, "auto"), T(t), C.current = !1;
|
|
2144
2153
|
}
|
|
2145
2154
|
}, [
|
|
2146
2155
|
a,
|
|
2147
|
-
|
|
2156
|
+
e,
|
|
2148
2157
|
w,
|
|
2149
|
-
|
|
2158
|
+
T,
|
|
2150
2159
|
j
|
|
2151
|
-
]), /* @__PURE__ */ F(
|
|
2152
|
-
/* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Qo, { style: { minHeight: "50px" }, children: ({ width: q, height:
|
|
2160
|
+
]), /* @__PURE__ */ F(me, { children: [
|
|
2161
|
+
/* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Qo, { style: { minHeight: "50px" }, children: ({ width: q, height: U }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: jn, style: { width: q, height: U }, children: f === J.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2153
2162
|
"div",
|
|
2154
2163
|
{
|
|
2155
|
-
ref:
|
|
2156
|
-
style: { width: q, height:
|
|
2164
|
+
ref: d,
|
|
2165
|
+
style: { width: q, height: U },
|
|
2157
2166
|
className: ne(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
|
|
2158
|
-
children: g ===
|
|
2167
|
+
children: g === Ie.DUAL_PAGE ? /* @__PURE__ */ i(ei, { widths: M, heights: I }) : /* @__PURE__ */ i(ti, { widths: M, heights: I })
|
|
2159
2168
|
}
|
|
2160
2169
|
) : G ? /* @__PURE__ */ i(
|
|
2161
2170
|
Zo,
|
|
2162
2171
|
{
|
|
2163
|
-
ref:
|
|
2164
|
-
itemData:
|
|
2172
|
+
ref: c,
|
|
2173
|
+
itemData: Fe,
|
|
2165
2174
|
outerRef: p,
|
|
2166
2175
|
innerRef: s,
|
|
2167
2176
|
onScroll: nt,
|
|
2168
2177
|
columnCount: O,
|
|
2169
|
-
columnWidth:
|
|
2178
|
+
columnWidth: M,
|
|
2170
2179
|
rowHeight: I,
|
|
2171
|
-
height:
|
|
2180
|
+
height: U,
|
|
2172
2181
|
width: q,
|
|
2173
2182
|
estimatedColumnWidth: G,
|
|
2174
2183
|
estimatedRowHeight: Z,
|
|
2175
|
-
rowCount:
|
|
2184
|
+
rowCount: R,
|
|
2176
2185
|
className: ne(
|
|
2177
2186
|
ue["rp-pages"],
|
|
2178
|
-
f ===
|
|
2187
|
+
f === J.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
|
|
2179
2188
|
),
|
|
2180
2189
|
children: ri
|
|
2181
2190
|
}
|
|
@@ -2195,95 +2204,95 @@ const ei = ({ widths: e, heights: t }) => {
|
|
|
2195
2204
|
) }) }) }),
|
|
2196
2205
|
_ && /* @__PURE__ */ i(qr, {})
|
|
2197
2206
|
] });
|
|
2198
|
-
},
|
|
2207
|
+
}, ke = {
|
|
2199
2208
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
2200
2209
|
"rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
|
|
2201
2210
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
2202
2211
|
"rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
|
|
2203
2212
|
"rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
|
|
2204
|
-
},
|
|
2213
|
+
}, ft = {
|
|
2205
2214
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
2206
2215
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
2207
2216
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
2208
2217
|
}, oi = () => {
|
|
2209
|
-
const { prevIcon:
|
|
2210
|
-
return
|
|
2218
|
+
const { prevIcon: t } = pe();
|
|
2219
|
+
return t || /* @__PURE__ */ i(He, {});
|
|
2211
2220
|
}, ii = () => {
|
|
2212
|
-
const { nextIcon:
|
|
2213
|
-
return
|
|
2221
|
+
const { nextIcon: t } = pe();
|
|
2222
|
+
return t || /* @__PURE__ */ i(He, { style: { transform: "rotate(180deg" } });
|
|
2214
2223
|
}, ai = () => {
|
|
2215
|
-
const { focusedPage:
|
|
2224
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: p } = Ce(), { localeMessages: m } = se(), { viewMode: v } = Ee(), { scrollMode: h } = Re();
|
|
2216
2225
|
k(() => {
|
|
2217
|
-
|
|
2218
|
-
}, [
|
|
2219
|
-
const
|
|
2220
|
-
const
|
|
2221
|
-
|
|
2222
|
-
}, []),
|
|
2223
|
-
const
|
|
2224
|
-
|
|
2225
|
-
}, [a,
|
|
2226
|
-
|
|
2227
|
-
}, [
|
|
2228
|
-
(
|
|
2229
|
-
|
|
2226
|
+
c(t.toString());
|
|
2227
|
+
}, [t]);
|
|
2228
|
+
const w = N((u) => {
|
|
2229
|
+
const f = u.target.value;
|
|
2230
|
+
c(f);
|
|
2231
|
+
}, []), C = N(async () => {
|
|
2232
|
+
const u = a(l);
|
|
2233
|
+
u.success || c(u.currentPage.toString());
|
|
2234
|
+
}, [a, l, e]), y = N(() => {
|
|
2235
|
+
c(t.toString());
|
|
2236
|
+
}, [t]), P = N(
|
|
2237
|
+
(u) => {
|
|
2238
|
+
u.key === "Enter" && C();
|
|
2230
2239
|
},
|
|
2231
|
-
[
|
|
2232
|
-
);
|
|
2233
|
-
return typeof
|
|
2234
|
-
|
|
2240
|
+
[C]
|
|
2241
|
+
), T = W(() => v === Ie.DUAL_PAGE && h === J.PAGE_SCROLLING ? t === e - 1 : t === e, [t, e, v, h]);
|
|
2242
|
+
return typeof d != "boolean" ? /* @__PURE__ */ i(
|
|
2243
|
+
d,
|
|
2235
2244
|
{
|
|
2236
|
-
total:
|
|
2237
|
-
current:
|
|
2245
|
+
total: e,
|
|
2246
|
+
current: t,
|
|
2238
2247
|
nextPage: o,
|
|
2239
2248
|
prevPage: r,
|
|
2240
2249
|
goToPage: a,
|
|
2241
2250
|
changePage: n
|
|
2242
2251
|
}
|
|
2243
|
-
) :
|
|
2252
|
+
) : d ? /* @__PURE__ */ F("div", { className: ft["rp-paginate"], children: [
|
|
2244
2253
|
!p && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2245
2254
|
re,
|
|
2246
2255
|
{
|
|
2247
2256
|
onClick: r,
|
|
2248
2257
|
"aria-label": m == null ? void 0 : m.previousPageTooltip,
|
|
2249
|
-
"aria-disabled":
|
|
2258
|
+
"aria-disabled": t === 1,
|
|
2250
2259
|
children: /* @__PURE__ */ i(oi, {})
|
|
2251
2260
|
}
|
|
2252
2261
|
) }),
|
|
2253
2262
|
/* @__PURE__ */ i(K, { content: m == null ? void 0 : m.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2254
|
-
|
|
2263
|
+
dn,
|
|
2255
2264
|
{
|
|
2256
|
-
onKeyDown:
|
|
2257
|
-
onBlur:
|
|
2258
|
-
onChange:
|
|
2259
|
-
value:
|
|
2260
|
-
className:
|
|
2265
|
+
onKeyDown: P,
|
|
2266
|
+
onBlur: y,
|
|
2267
|
+
onChange: w,
|
|
2268
|
+
value: l,
|
|
2269
|
+
className: ft["rp-page-input"]
|
|
2261
2270
|
}
|
|
2262
2271
|
) }),
|
|
2263
|
-
/* @__PURE__ */ F("span", { className:
|
|
2272
|
+
/* @__PURE__ */ F("span", { className: ft["rp-total-page"], children: [
|
|
2264
2273
|
"/",
|
|
2265
|
-
|
|
2274
|
+
e
|
|
2266
2275
|
] }),
|
|
2267
2276
|
!p && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2268
2277
|
re,
|
|
2269
2278
|
{
|
|
2270
2279
|
onClick: o,
|
|
2271
2280
|
"aria-label": m == null ? void 0 : m.nextPageTooltip,
|
|
2272
|
-
"aria-disabled":
|
|
2281
|
+
"aria-disabled": T,
|
|
2273
2282
|
children: /* @__PURE__ */ i(ii, {})
|
|
2274
2283
|
}
|
|
2275
2284
|
) })
|
|
2276
2285
|
] }) : null;
|
|
2277
2286
|
};
|
|
2278
|
-
var
|
|
2287
|
+
var Lt = "Dialog", [In, Us] = Xr(Lt), [si, ce] = In(Lt), Ln = (t) => {
|
|
2279
2288
|
const {
|
|
2280
|
-
__scopeDialog:
|
|
2289
|
+
__scopeDialog: e,
|
|
2281
2290
|
children: n,
|
|
2282
2291
|
open: o,
|
|
2283
2292
|
defaultOpen: r,
|
|
2284
2293
|
onOpenChange: a,
|
|
2285
|
-
modal:
|
|
2286
|
-
} =
|
|
2294
|
+
modal: l = !0
|
|
2295
|
+
} = t, c = B.useRef(null), d = B.useRef(null), [p = !1, m] = Qr({
|
|
2287
2296
|
prop: o,
|
|
2288
2297
|
defaultProp: r,
|
|
2289
2298
|
onChange: a
|
|
@@ -2291,26 +2300,26 @@ var Rt = "Dialog", [xn, Vs] = Xr(Rt), [si, ce] = xn(Rt), In = (e) => {
|
|
|
2291
2300
|
return /* @__PURE__ */ i(
|
|
2292
2301
|
si,
|
|
2293
2302
|
{
|
|
2294
|
-
scope:
|
|
2295
|
-
triggerRef:
|
|
2296
|
-
contentRef:
|
|
2303
|
+
scope: e,
|
|
2304
|
+
triggerRef: c,
|
|
2305
|
+
contentRef: d,
|
|
2297
2306
|
contentId: ct(),
|
|
2298
2307
|
titleId: ct(),
|
|
2299
2308
|
descriptionId: ct(),
|
|
2300
2309
|
open: p,
|
|
2301
2310
|
onOpenChange: m,
|
|
2302
2311
|
onOpenToggle: B.useCallback(() => m((v) => !v), [m]),
|
|
2303
|
-
modal:
|
|
2312
|
+
modal: l,
|
|
2304
2313
|
children: n
|
|
2305
2314
|
}
|
|
2306
2315
|
);
|
|
2307
2316
|
};
|
|
2308
|
-
|
|
2317
|
+
Ln.displayName = Lt;
|
|
2309
2318
|
var Rn = "DialogTrigger", ci = B.forwardRef(
|
|
2310
|
-
(
|
|
2311
|
-
const { __scopeDialog: n, ...o } =
|
|
2319
|
+
(t, e) => {
|
|
2320
|
+
const { __scopeDialog: n, ...o } = t, r = ce(Rn, n), a = Tt(e, r.triggerRef);
|
|
2312
2321
|
return /* @__PURE__ */ i(
|
|
2313
|
-
|
|
2322
|
+
Ue.button,
|
|
2314
2323
|
{
|
|
2315
2324
|
type: "button",
|
|
2316
2325
|
"aria-haspopup": "dialog",
|
|
@@ -2319,106 +2328,106 @@ var Rn = "DialogTrigger", ci = B.forwardRef(
|
|
|
2319
2328
|
"data-state": Nt(r.open),
|
|
2320
2329
|
...o,
|
|
2321
2330
|
ref: a,
|
|
2322
|
-
onClick:
|
|
2331
|
+
onClick: Me(t.onClick, r.onOpenToggle)
|
|
2323
2332
|
}
|
|
2324
2333
|
);
|
|
2325
2334
|
}
|
|
2326
2335
|
);
|
|
2327
2336
|
ci.displayName = Rn;
|
|
2328
|
-
var
|
|
2337
|
+
var Rt = "DialogPortal", [li, En] = In(Rt, {
|
|
2329
2338
|
forceMount: void 0
|
|
2330
|
-
}),
|
|
2331
|
-
const { __scopeDialog:
|
|
2332
|
-
return /* @__PURE__ */ i(li, { scope:
|
|
2339
|
+
}), Nn = (t) => {
|
|
2340
|
+
const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = ce(Rt, e);
|
|
2341
|
+
return /* @__PURE__ */ i(li, { scope: e, forceMount: n, children: B.Children.map(o, (l) => /* @__PURE__ */ i(St, { present: n || a.open, children: /* @__PURE__ */ i(oo, { asChild: !0, container: r, children: l }) })) });
|
|
2333
2342
|
};
|
|
2334
|
-
|
|
2335
|
-
var Xe = "DialogOverlay",
|
|
2336
|
-
(
|
|
2337
|
-
const n =
|
|
2338
|
-
return a.modal ? /* @__PURE__ */ i(St, { present: o || a.open, children: /* @__PURE__ */ i(di, { ...r, ref:
|
|
2343
|
+
Nn.displayName = Rt;
|
|
2344
|
+
var Xe = "DialogOverlay", On = B.forwardRef(
|
|
2345
|
+
(t, e) => {
|
|
2346
|
+
const n = En(Xe, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Xe, t.__scopeDialog);
|
|
2347
|
+
return a.modal ? /* @__PURE__ */ i(St, { present: o || a.open, children: /* @__PURE__ */ i(di, { ...r, ref: e }) }) : null;
|
|
2339
2348
|
}
|
|
2340
2349
|
);
|
|
2341
|
-
|
|
2350
|
+
On.displayName = Xe;
|
|
2342
2351
|
var di = B.forwardRef(
|
|
2343
|
-
(
|
|
2344
|
-
const { __scopeDialog: n, ...o } =
|
|
2352
|
+
(t, e) => {
|
|
2353
|
+
const { __scopeDialog: n, ...o } = t, r = ce(Xe, n);
|
|
2345
2354
|
return (
|
|
2346
2355
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2347
2356
|
// ie. when `Overlay` and `Content` are siblings
|
|
2348
2357
|
/* @__PURE__ */ i(to, { as: Yr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
2349
|
-
|
|
2358
|
+
Ue.div,
|
|
2350
2359
|
{
|
|
2351
2360
|
"data-state": Nt(r.open),
|
|
2352
2361
|
...o,
|
|
2353
|
-
ref:
|
|
2362
|
+
ref: e,
|
|
2354
2363
|
style: { pointerEvents: "auto", ...o.style }
|
|
2355
2364
|
}
|
|
2356
2365
|
) })
|
|
2357
2366
|
);
|
|
2358
2367
|
}
|
|
2359
|
-
),
|
|
2360
|
-
(
|
|
2361
|
-
const n =
|
|
2362
|
-
return /* @__PURE__ */ i(St, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(ui, { ...r, ref:
|
|
2368
|
+
), Le = "DialogContent", Dn = B.forwardRef(
|
|
2369
|
+
(t, e) => {
|
|
2370
|
+
const n = En(Le, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Le, t.__scopeDialog);
|
|
2371
|
+
return /* @__PURE__ */ i(St, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(ui, { ...r, ref: e }) : /* @__PURE__ */ i(pi, { ...r, ref: e }) });
|
|
2363
2372
|
}
|
|
2364
2373
|
);
|
|
2365
|
-
|
|
2374
|
+
Dn.displayName = Le;
|
|
2366
2375
|
var ui = B.forwardRef(
|
|
2367
|
-
(
|
|
2368
|
-
const n = ce(
|
|
2376
|
+
(t, e) => {
|
|
2377
|
+
const n = ce(Le, t.__scopeDialog), o = B.useRef(null), r = Tt(e, n.contentRef, o);
|
|
2369
2378
|
return B.useEffect(() => {
|
|
2370
2379
|
const a = o.current;
|
|
2371
2380
|
if (a)
|
|
2372
2381
|
return io(a);
|
|
2373
2382
|
}, []), /* @__PURE__ */ i(
|
|
2374
|
-
|
|
2383
|
+
An,
|
|
2375
2384
|
{
|
|
2376
|
-
...
|
|
2385
|
+
...t,
|
|
2377
2386
|
ref: r,
|
|
2378
2387
|
trapFocus: n.open,
|
|
2379
2388
|
disableOutsidePointerEvents: !0,
|
|
2380
|
-
onCloseAutoFocus:
|
|
2381
|
-
var
|
|
2382
|
-
a.preventDefault(), (
|
|
2389
|
+
onCloseAutoFocus: Me(t.onCloseAutoFocus, (a) => {
|
|
2390
|
+
var l;
|
|
2391
|
+
a.preventDefault(), (l = n.triggerRef.current) == null || l.focus();
|
|
2383
2392
|
}),
|
|
2384
|
-
onPointerDownOutside:
|
|
2385
|
-
const
|
|
2386
|
-
(
|
|
2393
|
+
onPointerDownOutside: Me(t.onPointerDownOutside, (a) => {
|
|
2394
|
+
const l = a.detail.originalEvent, c = l.button === 0 && l.ctrlKey === !0;
|
|
2395
|
+
(l.button === 2 || c) && a.preventDefault();
|
|
2387
2396
|
}),
|
|
2388
|
-
onFocusOutside:
|
|
2389
|
-
|
|
2397
|
+
onFocusOutside: Me(
|
|
2398
|
+
t.onFocusOutside,
|
|
2390
2399
|
(a) => a.preventDefault()
|
|
2391
2400
|
)
|
|
2392
2401
|
}
|
|
2393
2402
|
);
|
|
2394
2403
|
}
|
|
2395
2404
|
), pi = B.forwardRef(
|
|
2396
|
-
(
|
|
2397
|
-
const n = ce(
|
|
2405
|
+
(t, e) => {
|
|
2406
|
+
const n = ce(Le, t.__scopeDialog), o = B.useRef(!1), r = B.useRef(!1);
|
|
2398
2407
|
return /* @__PURE__ */ i(
|
|
2399
|
-
|
|
2408
|
+
An,
|
|
2400
2409
|
{
|
|
2401
|
-
...
|
|
2402
|
-
ref:
|
|
2410
|
+
...t,
|
|
2411
|
+
ref: e,
|
|
2403
2412
|
trapFocus: !1,
|
|
2404
2413
|
disableOutsidePointerEvents: !1,
|
|
2405
2414
|
onCloseAutoFocus: (a) => {
|
|
2406
|
-
var
|
|
2407
|
-
(
|
|
2415
|
+
var l, c;
|
|
2416
|
+
(l = t.onCloseAutoFocus) == null || l.call(t, a), a.defaultPrevented || (o.current || (c = n.triggerRef.current) == null || c.focus(), a.preventDefault()), o.current = !1, r.current = !1;
|
|
2408
2417
|
},
|
|
2409
2418
|
onInteractOutside: (a) => {
|
|
2410
|
-
var
|
|
2411
|
-
(
|
|
2412
|
-
const
|
|
2413
|
-
((p = n.triggerRef.current) == null ? void 0 : p.contains(
|
|
2419
|
+
var d, p;
|
|
2420
|
+
(d = t.onInteractOutside) == null || d.call(t, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
2421
|
+
const l = a.target;
|
|
2422
|
+
((p = n.triggerRef.current) == null ? void 0 : p.contains(l)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
|
|
2414
2423
|
}
|
|
2415
2424
|
}
|
|
2416
2425
|
);
|
|
2417
2426
|
}
|
|
2418
|
-
),
|
|
2419
|
-
(
|
|
2420
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...
|
|
2421
|
-
return no(), /* @__PURE__ */ F(
|
|
2427
|
+
), An = B.forwardRef(
|
|
2428
|
+
(t, e) => {
|
|
2429
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = ce(Le, n), d = B.useRef(null), p = Tt(e, d);
|
|
2430
|
+
return no(), /* @__PURE__ */ F(me, { children: [
|
|
2422
2431
|
/* @__PURE__ */ i(
|
|
2423
2432
|
ro,
|
|
2424
2433
|
{
|
|
@@ -2431,76 +2440,76 @@ var ui = B.forwardRef(
|
|
|
2431
2440
|
eo,
|
|
2432
2441
|
{
|
|
2433
2442
|
role: "dialog",
|
|
2434
|
-
id:
|
|
2435
|
-
"aria-describedby":
|
|
2436
|
-
"aria-labelledby":
|
|
2437
|
-
"data-state": Nt(
|
|
2438
|
-
...
|
|
2443
|
+
id: c.contentId,
|
|
2444
|
+
"aria-describedby": c.descriptionId,
|
|
2445
|
+
"aria-labelledby": c.titleId,
|
|
2446
|
+
"data-state": Nt(c.open),
|
|
2447
|
+
...l,
|
|
2439
2448
|
ref: p,
|
|
2440
|
-
onDismiss: () =>
|
|
2449
|
+
onDismiss: () => c.onOpenChange(!1)
|
|
2441
2450
|
}
|
|
2442
2451
|
)
|
|
2443
2452
|
}
|
|
2444
2453
|
),
|
|
2445
|
-
/* @__PURE__ */ F(
|
|
2446
|
-
/* @__PURE__ */ i(
|
|
2447
|
-
/* @__PURE__ */ i(gi, { contentRef:
|
|
2454
|
+
/* @__PURE__ */ F(me, { children: [
|
|
2455
|
+
/* @__PURE__ */ i(fi, { titleId: c.titleId }),
|
|
2456
|
+
/* @__PURE__ */ i(gi, { contentRef: d, descriptionId: c.descriptionId })
|
|
2448
2457
|
] })
|
|
2449
2458
|
] });
|
|
2450
2459
|
}
|
|
2451
|
-
), Et = "DialogTitle",
|
|
2452
|
-
(
|
|
2453
|
-
const { __scopeDialog: n, ...o } =
|
|
2454
|
-
return /* @__PURE__ */ i(
|
|
2460
|
+
), Et = "DialogTitle", zn = B.forwardRef(
|
|
2461
|
+
(t, e) => {
|
|
2462
|
+
const { __scopeDialog: n, ...o } = t, r = ce(Et, n);
|
|
2463
|
+
return /* @__PURE__ */ i(Ue.h2, { id: r.titleId, ...o, ref: e });
|
|
2455
2464
|
}
|
|
2456
2465
|
);
|
|
2457
|
-
|
|
2458
|
-
var
|
|
2459
|
-
(
|
|
2460
|
-
const { __scopeDialog: n, ...o } =
|
|
2461
|
-
return /* @__PURE__ */ i(
|
|
2466
|
+
zn.displayName = Et;
|
|
2467
|
+
var Fn = "DialogDescription", hi = B.forwardRef(
|
|
2468
|
+
(t, e) => {
|
|
2469
|
+
const { __scopeDialog: n, ...o } = t, r = ce(Fn, n);
|
|
2470
|
+
return /* @__PURE__ */ i(Ue.p, { id: r.descriptionId, ...o, ref: e });
|
|
2462
2471
|
}
|
|
2463
2472
|
);
|
|
2464
|
-
hi.displayName =
|
|
2465
|
-
var
|
|
2466
|
-
(
|
|
2467
|
-
const { __scopeDialog: n, ...o } =
|
|
2473
|
+
hi.displayName = Fn;
|
|
2474
|
+
var kn = "DialogClose", Wn = B.forwardRef(
|
|
2475
|
+
(t, e) => {
|
|
2476
|
+
const { __scopeDialog: n, ...o } = t, r = ce(kn, n);
|
|
2468
2477
|
return /* @__PURE__ */ i(
|
|
2469
|
-
|
|
2478
|
+
Ue.button,
|
|
2470
2479
|
{
|
|
2471
2480
|
type: "button",
|
|
2472
2481
|
...o,
|
|
2473
|
-
ref:
|
|
2474
|
-
onClick:
|
|
2482
|
+
ref: e,
|
|
2483
|
+
onClick: Me(t.onClick, () => r.onOpenChange(!1))
|
|
2475
2484
|
}
|
|
2476
2485
|
);
|
|
2477
2486
|
}
|
|
2478
2487
|
);
|
|
2479
|
-
|
|
2480
|
-
function Nt(
|
|
2481
|
-
return
|
|
2488
|
+
Wn.displayName = kn;
|
|
2489
|
+
function Nt(t) {
|
|
2490
|
+
return t ? "open" : "closed";
|
|
2482
2491
|
}
|
|
2483
|
-
var
|
|
2484
|
-
contentName:
|
|
2492
|
+
var Mn = "DialogTitleWarning", [Vs, Hn] = Jr(Mn, {
|
|
2493
|
+
contentName: Le,
|
|
2485
2494
|
titleName: Et,
|
|
2486
2495
|
docsSlug: "dialog"
|
|
2487
|
-
}),
|
|
2488
|
-
const
|
|
2496
|
+
}), fi = ({ titleId: t }) => {
|
|
2497
|
+
const e = Hn(Mn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2489
2498
|
|
|
2490
|
-
If you want to hide the \`${
|
|
2499
|
+
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2491
2500
|
|
|
2492
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${
|
|
2501
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;
|
|
2493
2502
|
return B.useEffect(() => {
|
|
2494
|
-
|
|
2495
|
-
}, [n,
|
|
2496
|
-
},
|
|
2497
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2503
|
+
t && (document.getElementById(t) || console.error(n));
|
|
2504
|
+
}, [n, t]), null;
|
|
2505
|
+
}, mi = "DialogDescriptionWarning", gi = ({ contentRef: t, descriptionId: e }) => {
|
|
2506
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hn(mi).contentName}}.`;
|
|
2498
2507
|
return B.useEffect(() => {
|
|
2499
2508
|
var a;
|
|
2500
|
-
const r = (a =
|
|
2501
|
-
|
|
2502
|
-
}, [o,
|
|
2503
|
-
}, vi =
|
|
2509
|
+
const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2510
|
+
e && r && (document.getElementById(e) || console.warn(o));
|
|
2511
|
+
}, [o, t, e]), null;
|
|
2512
|
+
}, vi = Ln, wi = Nn, _i = On, bi = Dn, Ci = zn, Pi = Wn;
|
|
2504
2513
|
const xe = {
|
|
2505
2514
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2506
2515
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2509,29 +2518,29 @@ const xe = {
|
|
|
2509
2518
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2510
2519
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2511
2520
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2512
|
-
},
|
|
2513
|
-
const { pdfProperties:
|
|
2514
|
-
if (!
|
|
2521
|
+
}, Ti = () => {
|
|
2522
|
+
const { pdfProperties: t } = Q(), { container: e } = ge(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = co(), { localeMessages: r } = se(), a = W(() => {
|
|
2523
|
+
if (!t)
|
|
2515
2524
|
return [];
|
|
2516
2525
|
const {
|
|
2517
|
-
fileSize:
|
|
2518
|
-
filename:
|
|
2519
|
-
title:
|
|
2526
|
+
fileSize: l,
|
|
2527
|
+
filename: c,
|
|
2528
|
+
title: d,
|
|
2520
2529
|
author: p,
|
|
2521
2530
|
subject: m,
|
|
2522
2531
|
createdOn: v,
|
|
2523
2532
|
creator: h,
|
|
2524
2533
|
keywords: w,
|
|
2525
|
-
modifiedOn:
|
|
2526
|
-
pdfProducer:
|
|
2527
|
-
pdfVersion:
|
|
2528
|
-
pageCount:
|
|
2529
|
-
} =
|
|
2534
|
+
modifiedOn: C,
|
|
2535
|
+
pdfProducer: y,
|
|
2536
|
+
pdfVersion: P,
|
|
2537
|
+
pageCount: T
|
|
2538
|
+
} = t;
|
|
2530
2539
|
return [
|
|
2531
|
-
{ label: r == null ? void 0 : r.propertiesFilenameLabel, value:
|
|
2532
|
-
{ label: r == null ? void 0 : r.propertiesFileSizeLabel, value:
|
|
2540
|
+
{ label: r == null ? void 0 : r.propertiesFilenameLabel, value: c },
|
|
2541
|
+
{ label: r == null ? void 0 : r.propertiesFileSizeLabel, value: l },
|
|
2533
2542
|
{ separate: !0 },
|
|
2534
|
-
{ label: r == null ? void 0 : r.propertiesTitleLabel, value:
|
|
2543
|
+
{ label: r == null ? void 0 : r.propertiesTitleLabel, value: d },
|
|
2535
2544
|
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value: p },
|
|
2536
2545
|
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value: m },
|
|
2537
2546
|
{ label: r == null ? void 0 : r.propertiesKeywordLabel, value: w },
|
|
@@ -2542,199 +2551,199 @@ const xe = {
|
|
|
2542
2551
|
},
|
|
2543
2552
|
{
|
|
2544
2553
|
label: r == null ? void 0 : r.propertiesModifiedOnLabel,
|
|
2545
|
-
value:
|
|
2554
|
+
value: C ? Wt(C) : ""
|
|
2546
2555
|
},
|
|
2547
2556
|
{ separate: !0 },
|
|
2548
|
-
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value:
|
|
2549
|
-
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value:
|
|
2550
|
-
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value:
|
|
2557
|
+
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: y },
|
|
2558
|
+
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: P },
|
|
2559
|
+
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: T }
|
|
2551
2560
|
];
|
|
2552
|
-
}, [
|
|
2553
|
-
return /* @__PURE__ */ i(vi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(wi, { container:
|
|
2561
|
+
}, [t, r]);
|
|
2562
|
+
return /* @__PURE__ */ i(vi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(wi, { container: e, children: /* @__PURE__ */ F("div", { className: xe["rp-dialog-wrapper"], children: [
|
|
2554
2563
|
/* @__PURE__ */ i(_i, { className: xe["rp-dialog-overlay"] }),
|
|
2555
2564
|
/* @__PURE__ */ F(bi, { className: xe["rp-document-dialog"], children: [
|
|
2556
2565
|
/* @__PURE__ */ i(Ci, { className: xe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2557
|
-
/* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((
|
|
2558
|
-
/* @__PURE__ */ i(
|
|
2566
|
+
/* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(so, { label: l.label, value: l.value }) }, c)) }),
|
|
2567
|
+
/* @__PURE__ */ i(Pi, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ i(ao, {}) })
|
|
2559
2568
|
] })
|
|
2560
2569
|
] }) }) });
|
|
2561
2570
|
}, Si = {
|
|
2562
2571
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2563
|
-
}, nn = ".pdf", yi = (
|
|
2564
|
-
const n = await (await fetch(
|
|
2572
|
+
}, nn = ".pdf", yi = (t) => URL.createObjectURL(t), xi = async (t) => {
|
|
2573
|
+
const n = await (await fetch(t)).blob();
|
|
2565
2574
|
return yi(n);
|
|
2566
|
-
},
|
|
2567
|
-
const { filename:
|
|
2568
|
-
const
|
|
2569
|
-
return
|
|
2575
|
+
}, $n = () => {
|
|
2576
|
+
const { filename: t, pdfSrc: e } = Q(), { downloadFilename: n } = hr(), o = (a) => {
|
|
2577
|
+
const l = n || a;
|
|
2578
|
+
return l.endsWith(nn) ? l : `${l}${nn}`;
|
|
2570
2579
|
};
|
|
2571
2580
|
return { download: N(async () => {
|
|
2572
|
-
if (!
|
|
2581
|
+
if (!t || !e)
|
|
2573
2582
|
throw new Error("There is no PDF source to download");
|
|
2574
2583
|
const a = document.createElement("a");
|
|
2575
|
-
a.href = await xi(
|
|
2576
|
-
}, [
|
|
2577
|
-
},
|
|
2578
|
-
const { downloadIcon:
|
|
2579
|
-
return
|
|
2580
|
-
},
|
|
2581
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2582
|
-
|
|
2583
|
-
] }) }),
|
|
2584
|
-
const { download:
|
|
2585
|
-
return
|
|
2584
|
+
a.href = await xi(e), a.download = o(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2585
|
+
}, [t, e]) };
|
|
2586
|
+
}, Gn = () => {
|
|
2587
|
+
const { downloadIcon: t } = pe();
|
|
2588
|
+
return t || /* @__PURE__ */ i(mo, {});
|
|
2589
|
+
}, qn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ii = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(qn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Gn, {}) }) }), Li = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ F(qn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2590
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Gn, {}) }),
|
|
2591
|
+
e == null ? void 0 : e.downloadFileLabel
|
|
2592
|
+
] }) }), Un = () => {
|
|
2593
|
+
const { download: t } = $n(), { downloadTool: e = !0 } = ve(), { isSmallScreen: n } = Ce(), { localeMessages: o } = se();
|
|
2594
|
+
return e ? n ? /* @__PURE__ */ i(Li, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(Ii, { download: t, localeMessages: o }) : null : null;
|
|
2586
2595
|
}, Vn = () => {
|
|
2587
|
-
const { printIcon:
|
|
2588
|
-
return
|
|
2589
|
-
},
|
|
2596
|
+
const { printIcon: t } = pe();
|
|
2597
|
+
return t || /* @__PURE__ */ i(go, {});
|
|
2598
|
+
}, Bn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Ri = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Bn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Vn, {}) }) }), Ei = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ F(Bn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2590
2599
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Vn, {}) }),
|
|
2591
|
-
|
|
2592
|
-
] }) }),
|
|
2593
|
-
const { print:
|
|
2594
|
-
return
|
|
2595
|
-
|
|
2600
|
+
e == null ? void 0 : e.printLabel
|
|
2601
|
+
] }) }), Zn = () => {
|
|
2602
|
+
const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: l = !0 } = ve(), { isSmallScreen: c } = Ce(), { localeMessages: d } = se();
|
|
2603
|
+
return l ? c ? /* @__PURE__ */ i(Ei, { print: t, localeMessages: d }) : typeof l == "function" ? /* @__PURE__ */ i(
|
|
2604
|
+
l,
|
|
2596
2605
|
{
|
|
2597
|
-
print:
|
|
2598
|
-
cancel:
|
|
2606
|
+
print: t,
|
|
2607
|
+
cancel: e,
|
|
2599
2608
|
setOnProgress: n,
|
|
2600
2609
|
setOnError: r,
|
|
2601
2610
|
setOnComplete: o,
|
|
2602
2611
|
progress: a
|
|
2603
2612
|
}
|
|
2604
|
-
) :
|
|
2613
|
+
) : l ? /* @__PURE__ */ i(Ri, { print: t, localeMessages: d }) : null : null;
|
|
2605
2614
|
}, Ni = {
|
|
2606
2615
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2607
2616
|
}, Oi = () => {
|
|
2608
|
-
const { goToFirstPageIcon:
|
|
2609
|
-
return
|
|
2617
|
+
const { goToFirstPageIcon: t } = pe();
|
|
2618
|
+
return t || /* @__PURE__ */ i(vn, { className: Ni["rp-go-to-Top"] });
|
|
2610
2619
|
}, Di = () => {
|
|
2611
|
-
const { goToLastPageIcon:
|
|
2612
|
-
return
|
|
2620
|
+
const { goToLastPageIcon: t } = pe();
|
|
2621
|
+
return t || /* @__PURE__ */ i(vn, {});
|
|
2613
2622
|
}, rn = { width: "100%" }, Ai = () => {
|
|
2614
|
-
const { goToPage:
|
|
2615
|
-
|
|
2616
|
-
}, [
|
|
2617
|
-
e
|
|
2618
|
-
}, [
|
|
2623
|
+
const { goToPage: t, totalPages: e, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = W(() => n === 1, [n]), l = W(() => n === e, [n, e]), c = N(() => {
|
|
2624
|
+
t(1);
|
|
2625
|
+
}, [t]), d = N(() => {
|
|
2626
|
+
t(e);
|
|
2627
|
+
}, [t, e]);
|
|
2619
2628
|
return o ? /* @__PURE__ */ F(Ke, { children: [
|
|
2620
|
-
/* @__PURE__ */ i(be, { onClick:
|
|
2629
|
+
/* @__PURE__ */ i(be, { onClick: c, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ F("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2621
2630
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Oi, {}) }),
|
|
2622
2631
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2623
2632
|
] }) }) }),
|
|
2624
|
-
/* @__PURE__ */ i(be, { onClick:
|
|
2633
|
+
/* @__PURE__ */ i(be, { onClick: d, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ F("div", { className: "rp-menu-item", "aria-disabled": l, children: [
|
|
2625
2634
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Di, {}) }),
|
|
2626
2635
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2627
2636
|
] }) }) }),
|
|
2628
2637
|
/* @__PURE__ */ i(yt, {})
|
|
2629
2638
|
] }) : null;
|
|
2630
2639
|
}, zi = () => {
|
|
2631
|
-
const { container:
|
|
2640
|
+
const { container: t } = ge(), { isSmallScreen: e } = Ce(), {
|
|
2632
2641
|
openFileTool: n,
|
|
2633
2642
|
downloadTool: o,
|
|
2634
2643
|
documentProperties: r,
|
|
2635
2644
|
scrollModeTool: a,
|
|
2636
|
-
rotateTool:
|
|
2637
|
-
selectionModeTool:
|
|
2638
|
-
jumpNavigationTool:
|
|
2645
|
+
rotateTool: l,
|
|
2646
|
+
selectionModeTool: c,
|
|
2647
|
+
jumpNavigationTool: d,
|
|
2639
2648
|
printTool: p,
|
|
2640
2649
|
fullscreenTool: m
|
|
2641
2650
|
} = ve(), { localeMessages: v } = se();
|
|
2642
|
-
return
|
|
2643
|
-
const w =
|
|
2644
|
-
let
|
|
2645
|
-
return
|
|
2651
|
+
return W(() => {
|
|
2652
|
+
const w = d || l || c || a || r;
|
|
2653
|
+
let C = !1;
|
|
2654
|
+
return e && (C = !(!n && !o && !p && !m)), w || C;
|
|
2646
2655
|
}, [
|
|
2647
2656
|
n,
|
|
2648
2657
|
o,
|
|
2649
2658
|
r,
|
|
2650
2659
|
a,
|
|
2651
|
-
c,
|
|
2652
2660
|
l,
|
|
2653
|
-
|
|
2654
|
-
|
|
2661
|
+
c,
|
|
2662
|
+
d,
|
|
2663
|
+
e
|
|
2655
2664
|
]) ? /* @__PURE__ */ F(lo, { children: [
|
|
2656
2665
|
/* @__PURE__ */ i(
|
|
2657
2666
|
mn,
|
|
2658
2667
|
{
|
|
2659
|
-
container:
|
|
2668
|
+
container: t,
|
|
2660
2669
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: v == null ? void 0 : v.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": v == null ? void 0 : v.moreOptionTooltip, children: /* @__PURE__ */ i(Kr, {}) }) }) }),
|
|
2661
2670
|
children: /* @__PURE__ */ F("div", { className: Si["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2662
|
-
|
|
2663
|
-
/* @__PURE__ */ i(hn, {}),
|
|
2664
|
-
/* @__PURE__ */ i(qn, {}),
|
|
2665
|
-
/* @__PURE__ */ i(Bn, {}),
|
|
2671
|
+
e && /* @__PURE__ */ F(Ke, { children: [
|
|
2666
2672
|
/* @__PURE__ */ i(fn, {}),
|
|
2673
|
+
/* @__PURE__ */ i(Un, {}),
|
|
2674
|
+
/* @__PURE__ */ i(Zn, {}),
|
|
2675
|
+
/* @__PURE__ */ i(gn, {}),
|
|
2667
2676
|
/* @__PURE__ */ i(yt, {})
|
|
2668
2677
|
] }),
|
|
2669
2678
|
/* @__PURE__ */ i(Ai, {}),
|
|
2670
2679
|
/* @__PURE__ */ i(po, {}),
|
|
2671
2680
|
/* @__PURE__ */ i(vo, {}),
|
|
2672
2681
|
/* @__PURE__ */ i(ho, {}),
|
|
2673
|
-
/* @__PURE__ */ i(
|
|
2682
|
+
/* @__PURE__ */ i(fo, {}),
|
|
2674
2683
|
/* @__PURE__ */ i(uo, {})
|
|
2675
2684
|
] })
|
|
2676
2685
|
}
|
|
2677
2686
|
),
|
|
2678
|
-
/* @__PURE__ */ i(
|
|
2687
|
+
/* @__PURE__ */ i(Ti, {})
|
|
2679
2688
|
] }) : null;
|
|
2680
2689
|
}, Fi = () => {
|
|
2681
|
-
const { isSmallScreen:
|
|
2682
|
-
return /* @__PURE__ */ F(
|
|
2690
|
+
const { isSmallScreen: t } = Ce();
|
|
2691
|
+
return /* @__PURE__ */ F(me, { children: [
|
|
2683
2692
|
/* @__PURE__ */ i(jr, {}),
|
|
2684
|
-
!
|
|
2685
|
-
/* @__PURE__ */ i(
|
|
2686
|
-
/* @__PURE__ */ i(
|
|
2687
|
-
/* @__PURE__ */ i(
|
|
2688
|
-
/* @__PURE__ */ i(
|
|
2693
|
+
!t && /* @__PURE__ */ F(me, { children: [
|
|
2694
|
+
/* @__PURE__ */ i(fn, {}),
|
|
2695
|
+
/* @__PURE__ */ i(Un, {}),
|
|
2696
|
+
/* @__PURE__ */ i(Zn, {}),
|
|
2697
|
+
/* @__PURE__ */ i(gn, {})
|
|
2689
2698
|
] }),
|
|
2690
2699
|
/* @__PURE__ */ i(zi, {})
|
|
2691
2700
|
] });
|
|
2692
|
-
},
|
|
2701
|
+
}, De = {
|
|
2693
2702
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
2694
2703
|
"rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_cocqs_6",
|
|
2695
2704
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2696
2705
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2697
2706
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2698
|
-
}, ki = 25,
|
|
2699
|
-
const { zoomInIcon:
|
|
2700
|
-
return
|
|
2707
|
+
}, ki = 25, mt = 1e3, Wi = [50, 75, 100, 125, 150, 200, 300, 400], Mi = () => {
|
|
2708
|
+
const { zoomInIcon: t } = pe();
|
|
2709
|
+
return t || /* @__PURE__ */ i(wo, {});
|
|
2701
2710
|
}, Hi = () => {
|
|
2702
|
-
const { zoomOutIcon:
|
|
2703
|
-
return
|
|
2711
|
+
const { zoomOutIcon: t } = pe();
|
|
2712
|
+
return t || /* @__PURE__ */ i(_o, {});
|
|
2704
2713
|
}, $i = () => {
|
|
2705
|
-
const { zoomLevel:
|
|
2706
|
-
|
|
2707
|
-
const f = Math.floor(
|
|
2708
|
-
return Math.min(f + 25,
|
|
2714
|
+
const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, contentRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: l } = Ge(), { pages: c } = Q(), { isSmallScreen: d } = Ce(), { localeMessages: p } = se(), { viewMode: m } = Ee(), v = N(() => {
|
|
2715
|
+
e((u) => {
|
|
2716
|
+
const f = Math.floor(u / 25) * 25;
|
|
2717
|
+
return Math.min(f + 25, mt);
|
|
2709
2718
|
});
|
|
2710
|
-
}, [
|
|
2711
|
-
|
|
2712
|
-
const f = Math.ceil(
|
|
2713
|
-
return Math.min(f - 25,
|
|
2719
|
+
}, [e]), h = N(() => {
|
|
2720
|
+
e((u) => {
|
|
2721
|
+
const f = Math.ceil(u / 25) * 25;
|
|
2722
|
+
return Math.min(f - 25, mt);
|
|
2714
2723
|
});
|
|
2715
|
-
}, [
|
|
2716
|
-
var
|
|
2717
|
-
return (
|
|
2718
|
-
}, [
|
|
2719
|
-
(
|
|
2720
|
-
const f = ((
|
|
2721
|
-
|
|
2724
|
+
}, [e]), w = W(() => t === ki, [t]), C = W(() => t === mt, [t]), y = W(() => {
|
|
2725
|
+
var u;
|
|
2726
|
+
return (u = c.get(a)) == null ? void 0 : u.page.getViewport({ scale: 1, rotation: l });
|
|
2727
|
+
}, [c, a, l]), P = N(
|
|
2728
|
+
(u) => {
|
|
2729
|
+
const f = ((y == null ? void 0 : y.width) || 0) + 2 * Mt, g = ((y == null ? void 0 : y.height) || 0) + 2 * Mt, s = (o == null ? void 0 : o.clientWidth) || 0, b = (o == null ? void 0 : o.clientHeight) || 0, _ = bo(
|
|
2730
|
+
u,
|
|
2722
2731
|
s,
|
|
2723
2732
|
b,
|
|
2724
2733
|
f,
|
|
2725
2734
|
g,
|
|
2726
2735
|
m
|
|
2727
2736
|
);
|
|
2728
|
-
|
|
2737
|
+
e(_);
|
|
2729
2738
|
},
|
|
2730
|
-
[
|
|
2731
|
-
),
|
|
2732
|
-
(
|
|
2733
|
-
typeof
|
|
2739
|
+
[e, y]
|
|
2740
|
+
), T = N(
|
|
2741
|
+
(u) => {
|
|
2742
|
+
typeof u == "number" ? e(u) : P(u);
|
|
2734
2743
|
},
|
|
2735
|
-
[
|
|
2744
|
+
[e, P]
|
|
2736
2745
|
);
|
|
2737
|
-
return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel:
|
|
2746
|
+
return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ F("div", { className: De["rp-zoom-wrapper"], children: [
|
|
2738
2747
|
/* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2739
2748
|
re,
|
|
2740
2749
|
{
|
|
@@ -2744,42 +2753,42 @@ const xe = {
|
|
|
2744
2753
|
children: /* @__PURE__ */ i(Hi, {})
|
|
2745
2754
|
}
|
|
2746
2755
|
) }),
|
|
2747
|
-
!
|
|
2756
|
+
!d && /* @__PURE__ */ i(
|
|
2748
2757
|
mn,
|
|
2749
2758
|
{
|
|
2750
2759
|
container: n,
|
|
2751
2760
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomSelectTooltip, children: /* @__PURE__ */ F(
|
|
2752
2761
|
re,
|
|
2753
2762
|
{
|
|
2754
|
-
className:
|
|
2763
|
+
className: De["rp-current-zoom-wrapper"],
|
|
2755
2764
|
"aria-label": p == null ? void 0 : p.zoomSelectTooltip,
|
|
2756
2765
|
children: [
|
|
2757
|
-
/* @__PURE__ */ i("span", { className:
|
|
2758
|
-
/* @__PURE__ */ i("span", { className:
|
|
2759
|
-
/* @__PURE__ */ i(
|
|
2766
|
+
/* @__PURE__ */ i("span", { className: De["rp-current-zoom-text"], children: t }),
|
|
2767
|
+
/* @__PURE__ */ i("span", { className: De["rp-current-zoom-text"], children: "%" }),
|
|
2768
|
+
/* @__PURE__ */ i(He, { className: De["rp-current-zoom-icon"] })
|
|
2760
2769
|
]
|
|
2761
2770
|
}
|
|
2762
2771
|
) }) }),
|
|
2763
2772
|
style: { minWidth: "200px" },
|
|
2764
2773
|
align: "center",
|
|
2765
|
-
children: /* @__PURE__ */ F("div", { className:
|
|
2774
|
+
children: /* @__PURE__ */ F("div", { className: De["rp-zoom-dropdown-content"], children: [
|
|
2766
2775
|
/* @__PURE__ */ F(Ke, { children: [
|
|
2767
|
-
/* @__PURE__ */ i(be, { onClick: () =>
|
|
2768
|
-
/* @__PURE__ */ i(be, { onClick: () =>
|
|
2769
|
-
/* @__PURE__ */ i(be, { onClick: () =>
|
|
2776
|
+
/* @__PURE__ */ i(be, { onClick: () => T(at.ACTUAL), children: p == null ? void 0 : p.zoomActualSize }),
|
|
2777
|
+
/* @__PURE__ */ i(be, { onClick: () => T(at.PAGE_FIT), children: p == null ? void 0 : p.zoomPageFit }),
|
|
2778
|
+
/* @__PURE__ */ i(be, { onClick: () => T(at.PAGE_WIDTH), children: p == null ? void 0 : p.zoomPageWidth })
|
|
2770
2779
|
] }),
|
|
2771
2780
|
/* @__PURE__ */ i(yt, {}),
|
|
2772
|
-
/* @__PURE__ */ i(Ke, { children: Wi.map((
|
|
2773
|
-
|
|
2781
|
+
/* @__PURE__ */ i(Ke, { children: Wi.map((u) => /* @__PURE__ */ F(be, { onClick: () => T(u), children: [
|
|
2782
|
+
u,
|
|
2774
2783
|
" %"
|
|
2775
|
-
] },
|
|
2784
|
+
] }, u)) })
|
|
2776
2785
|
] })
|
|
2777
2786
|
}
|
|
2778
2787
|
),
|
|
2779
2788
|
/* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2780
2789
|
re,
|
|
2781
2790
|
{
|
|
2782
|
-
disabled:
|
|
2791
|
+
disabled: C,
|
|
2783
2792
|
onClick: v,
|
|
2784
2793
|
"aria-label": p == null ? void 0 : p.zoomInTooltip,
|
|
2785
2794
|
children: /* @__PURE__ */ i(Mi, {})
|
|
@@ -2788,58 +2797,58 @@ const xe = {
|
|
|
2788
2797
|
] }) : null;
|
|
2789
2798
|
}, on = () => {
|
|
2790
2799
|
const {
|
|
2791
|
-
totalMatches:
|
|
2792
|
-
nextMatch:
|
|
2800
|
+
totalMatches: t,
|
|
2801
|
+
nextMatch: e,
|
|
2793
2802
|
prevMatch: n
|
|
2794
2803
|
} = xt(), { localeMessages: o } = se();
|
|
2795
|
-
return /* @__PURE__ */ F(
|
|
2804
|
+
return /* @__PURE__ */ F(me, { children: [
|
|
2796
2805
|
/* @__PURE__ */ i(K, { content: o == null ? void 0 : o.searchPrevTooltip, className: Y["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(re, { onClick: n, "aria-label": o == null ? void 0 : o.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
2797
|
-
|
|
2806
|
+
He,
|
|
2798
2807
|
{
|
|
2799
2808
|
className: Y["rp-search-tool-input-icon"],
|
|
2800
|
-
"aria-disabled": !
|
|
2809
|
+
"aria-disabled": !t
|
|
2801
2810
|
}
|
|
2802
2811
|
) }) }),
|
|
2803
|
-
/* @__PURE__ */ i(K, { content: o == null ? void 0 : o.searchNextTooltip, className: Y["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(re, { onClick:
|
|
2804
|
-
|
|
2812
|
+
/* @__PURE__ */ i(K, { content: o == null ? void 0 : o.searchNextTooltip, className: Y["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(re, { onClick: e, "aria-label": o == null ? void 0 : o.searchNextTooltip, children: /* @__PURE__ */ i(
|
|
2813
|
+
He,
|
|
2805
2814
|
{
|
|
2806
2815
|
style: { transform: "rotate(180deg" },
|
|
2807
2816
|
className: Y["rp-search-tool-input-icon"],
|
|
2808
|
-
"aria-disabled": !
|
|
2817
|
+
"aria-disabled": !t
|
|
2809
2818
|
}
|
|
2810
2819
|
) }) })
|
|
2811
2820
|
] });
|
|
2812
2821
|
}, an = () => {
|
|
2813
|
-
const { searchIcon:
|
|
2814
|
-
return
|
|
2822
|
+
const { searchIcon: t } = pe();
|
|
2823
|
+
return t || /* @__PURE__ */ i(Co, {});
|
|
2815
2824
|
}, Gi = () => {
|
|
2816
|
-
const { container:
|
|
2817
|
-
searchOptions:
|
|
2818
|
-
setSearchOptions:
|
|
2819
|
-
loading:
|
|
2825
|
+
const { container: t } = ge(), [e, n] = $(!1), { pdf: o } = Q(), [r, a] = $(null), {
|
|
2826
|
+
searchOptions: l,
|
|
2827
|
+
setSearchOptions: c,
|
|
2828
|
+
loading: d,
|
|
2820
2829
|
setSearch: p,
|
|
2821
2830
|
totalMatches: m,
|
|
2822
2831
|
currentMatchPosition: v,
|
|
2823
2832
|
nextMatch: h,
|
|
2824
2833
|
prevMatch: w,
|
|
2825
|
-
search:
|
|
2826
|
-
} = xt(), { searchTool:
|
|
2834
|
+
search: C
|
|
2835
|
+
} = xt(), { searchTool: y = !0 } = ve(), [P, T] = $(C), { localeMessages: u } = se(), { isSmallScreen: f } = Ce(), g = N(() => {
|
|
2827
2836
|
n(!0);
|
|
2828
2837
|
}, []), s = N(() => {
|
|
2829
|
-
p(""),
|
|
2838
|
+
p(""), T(""), n(!1);
|
|
2830
2839
|
}, [p]), b = (I) => {
|
|
2831
|
-
const O = I.key === "Enter",
|
|
2832
|
-
(O ||
|
|
2840
|
+
const O = I.key === "Enter", M = I.key === " ";
|
|
2841
|
+
(O || M) && s();
|
|
2833
2842
|
}, _ = N(
|
|
2834
2843
|
(I) => {
|
|
2835
|
-
I.key === "Escape" &&
|
|
2844
|
+
I.key === "Escape" && e && s();
|
|
2836
2845
|
},
|
|
2837
|
-
[
|
|
2846
|
+
[e]
|
|
2838
2847
|
), S = N(
|
|
2839
2848
|
(I) => {
|
|
2840
|
-
I.shiftKey && I.key === "Enter" ? w() : I.key === "Enter" &&
|
|
2849
|
+
I.shiftKey && I.key === "Enter" ? w() : I.key === "Enter" && C !== P ? p(P) : I.key === "Enter" && h();
|
|
2841
2850
|
},
|
|
2842
|
-
[
|
|
2851
|
+
[P, w, h, p, C]
|
|
2843
2852
|
);
|
|
2844
2853
|
k(() => (window.addEventListener("keydown", _), () => {
|
|
2845
2854
|
window.removeEventListener("keydown", _);
|
|
@@ -2847,53 +2856,53 @@ const xe = {
|
|
|
2847
2856
|
r && r.focus();
|
|
2848
2857
|
}, [r]);
|
|
2849
2858
|
const E = N((I) => {
|
|
2850
|
-
|
|
2859
|
+
T(I.target.value);
|
|
2851
2860
|
}, []), x = N(() => {
|
|
2852
|
-
|
|
2853
|
-
}, [p]),
|
|
2861
|
+
T(""), p("");
|
|
2862
|
+
}, [p]), L = W(() => `${v} / ${m}`, [v, m]), { wholeWords: D, matchCase: A } = W(() => l, [l]), z = N(
|
|
2854
2863
|
(I) => {
|
|
2855
|
-
|
|
2864
|
+
c((O) => ({ ...O, matchCase: I }));
|
|
2856
2865
|
},
|
|
2857
|
-
[
|
|
2858
|
-
),
|
|
2866
|
+
[c]
|
|
2867
|
+
), R = N(
|
|
2859
2868
|
(I) => {
|
|
2860
|
-
|
|
2869
|
+
c((O) => ({ ...O, wholeWords: I }));
|
|
2861
2870
|
},
|
|
2862
|
-
[
|
|
2871
|
+
[c]
|
|
2863
2872
|
);
|
|
2864
2873
|
return k(() => {
|
|
2865
2874
|
s();
|
|
2866
|
-
}, [o, s]),
|
|
2875
|
+
}, [o, s]), y ? /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i(
|
|
2867
2876
|
Mr,
|
|
2868
2877
|
{
|
|
2869
|
-
open:
|
|
2870
|
-
container:
|
|
2871
|
-
triggerComponent: /* @__PURE__ */ i(K, { content:
|
|
2878
|
+
open: e,
|
|
2879
|
+
container: t,
|
|
2880
|
+
triggerComponent: /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchButtonTooltip, children: /* @__PURE__ */ i(re, { onClick: g, "aria-label": u == null ? void 0 : u.searchButtonTooltip, children: /* @__PURE__ */ i(an, {}) }) }),
|
|
2872
2881
|
children: /* @__PURE__ */ F("div", { className: Y["rp-search-tool-content"], children: [
|
|
2873
2882
|
/* @__PURE__ */ F("div", { className: Y["rp-search-tool-input-wrapper"], children: [
|
|
2874
2883
|
/* @__PURE__ */ F("div", { className: Y["rp-search-tool-input"], children: [
|
|
2875
|
-
/* @__PURE__ */ i(K, { content:
|
|
2876
|
-
|
|
2884
|
+
/* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2885
|
+
dn,
|
|
2877
2886
|
{
|
|
2878
|
-
value:
|
|
2887
|
+
value: P,
|
|
2879
2888
|
onKeyDown: S,
|
|
2880
2889
|
onChange: E,
|
|
2881
2890
|
icon: /* @__PURE__ */ i(an, {}),
|
|
2882
|
-
placeholder:
|
|
2891
|
+
placeholder: u == null ? void 0 : u.searchInputPlaceholder,
|
|
2883
2892
|
className: Y["rp-search-input"],
|
|
2884
2893
|
ref: a,
|
|
2885
|
-
children: !!
|
|
2894
|
+
children: !!P && /* @__PURE__ */ i("span", { className: Y["rp-search-tool-input-clear"], onClick: x, children: /* @__PURE__ */ i(Po, {}) })
|
|
2886
2895
|
}
|
|
2887
2896
|
) }),
|
|
2888
|
-
|
|
2897
|
+
d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: Y["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: L }),
|
|
2889
2898
|
f && /* @__PURE__ */ i("div", { className: Y["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: b, handleClose: s }) })
|
|
2890
2899
|
] }),
|
|
2891
2900
|
/* @__PURE__ */ F("div", { className: Y["rp-search-tool-input-checkboxes"], children: [
|
|
2892
2901
|
f && /* @__PURE__ */ i(on, {}),
|
|
2893
|
-
/* @__PURE__ */ i($t, { name: "matchCase", value: A, onChange: z, children:
|
|
2894
|
-
!f && /* @__PURE__ */ i(K, { content:
|
|
2895
|
-
/* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange:
|
|
2896
|
-
!f && /* @__PURE__ */ i(K, { content:
|
|
2902
|
+
/* @__PURE__ */ i($t, { name: "matchCase", value: A, onChange: z, children: u == null ? void 0 : u.searchMatchCaseLabel }),
|
|
2903
|
+
!f && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
|
|
2904
|
+
/* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: R, children: u == null ? void 0 : u.searchWholeWordsLabel }),
|
|
2905
|
+
!f && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
|
|
2897
2906
|
] })
|
|
2898
2907
|
] }),
|
|
2899
2908
|
!f && /* @__PURE__ */ F("div", { className: Y["rp-search-tool-controls"], children: [
|
|
@@ -2903,7 +2912,7 @@ const xe = {
|
|
|
2903
2912
|
] })
|
|
2904
2913
|
}
|
|
2905
2914
|
) }) : null;
|
|
2906
|
-
}, qi = "_loading_vpexk_1",
|
|
2915
|
+
}, qi = "_loading_vpexk_1", Ae = {
|
|
2907
2916
|
"rp-loading-overlay": "_rp-loading-overlay_vpexk_1",
|
|
2908
2917
|
"rp-loading-modal": "_rp-loading-modal_vpexk_14",
|
|
2909
2918
|
"rp-loading-title": "_rp-loading-title_vpexk_27",
|
|
@@ -2911,128 +2920,128 @@ const xe = {
|
|
|
2911
2920
|
"rp-loading-progress": "_rp-loading-progress_vpexk_35",
|
|
2912
2921
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_vpexk_55",
|
|
2913
2922
|
loading: qi
|
|
2914
|
-
},
|
|
2915
|
-
const { cancel:
|
|
2916
|
-
return
|
|
2917
|
-
/* @__PURE__ */ F("div", { className: ne(
|
|
2923
|
+
}, Ui = ({ percentage: t }) => {
|
|
2924
|
+
const { cancel: e } = tt(), { localeMessages: n } = se();
|
|
2925
|
+
return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(Ae["rp-loading-overlay"]), children: /* @__PURE__ */ F("div", { className: ne(Ae["rp-loading-modal"]), children: [
|
|
2926
|
+
/* @__PURE__ */ F("div", { className: ne(Ae["rp-loading-title"]), children: [
|
|
2918
2927
|
n == null ? void 0 : n.printLoadingMessage,
|
|
2919
2928
|
"..."
|
|
2920
2929
|
] }),
|
|
2921
|
-
/* @__PURE__ */ i("div", { className: ne(
|
|
2930
|
+
/* @__PURE__ */ i("div", { className: ne(Ae["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
|
|
2922
2931
|
"div",
|
|
2923
2932
|
{
|
|
2924
|
-
className: ne(
|
|
2925
|
-
style: { width: `${
|
|
2933
|
+
className: ne(Ae["rp-loading-progress"]),
|
|
2934
|
+
style: { width: `${t}%` }
|
|
2926
2935
|
}
|
|
2927
2936
|
) }),
|
|
2928
|
-
/* @__PURE__ */ i("button", { className: ne(
|
|
2937
|
+
/* @__PURE__ */ i("button", { className: ne(Ae["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
2929
2938
|
] }) });
|
|
2930
|
-
},
|
|
2931
|
-
const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {},
|
|
2939
|
+
}, Vi = $e((t, e) => {
|
|
2940
|
+
const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {}, l = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2932
2941
|
return /* @__PURE__ */ F("div", { children: [
|
|
2933
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref:
|
|
2934
|
-
/* @__PURE__ */ F("div", { "data-rp": "topBarLeft", className:
|
|
2942
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: ke["rp-toolbar-content"], children: /* @__PURE__ */ F("div", { className: ke["rp-toolbar-wrapper"], style: l(), children: [
|
|
2943
|
+
/* @__PURE__ */ F("div", { "data-rp": "topBarLeft", className: ke["rp-toolbar-start"], children: [
|
|
2935
2944
|
/* @__PURE__ */ i(Gi, {}),
|
|
2936
2945
|
/* @__PURE__ */ i(ai, {})
|
|
2937
2946
|
] }),
|
|
2938
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className:
|
|
2939
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className:
|
|
2947
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: ke["rp-toolbar-middle"], children: /* @__PURE__ */ i($i, {}) }),
|
|
2948
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: ke["rp-toolbar-end"], children: /* @__PURE__ */ i(Fi, {}) })
|
|
2940
2949
|
] }) }),
|
|
2941
|
-
n && a ? /* @__PURE__ */ i(
|
|
2950
|
+
n && a ? /* @__PURE__ */ i(Ui, { percentage: a }) : null
|
|
2942
2951
|
] });
|
|
2943
2952
|
}), gt = {
|
|
2944
2953
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
2945
2954
|
"rp-sidebar-content": "_rp-sidebar-content_1sdl6_1",
|
|
2946
2955
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1sdl6_16",
|
|
2947
2956
|
"rp-thumbnail-dragging": "_rp-thumbnail-dragging_1sdl6_21"
|
|
2948
|
-
},
|
|
2957
|
+
}, We = {
|
|
2949
2958
|
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
|
|
2950
2959
|
"rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
|
|
2951
2960
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2952
2961
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2953
2962
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2954
|
-
}, Bi = (
|
|
2955
|
-
const { thumbnailSrc:
|
|
2963
|
+
}, Bi = (t) => {
|
|
2964
|
+
const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ie(), l = W(() => o ? We["rp-thumbnail-active"] : "", [o]), c = W(() => ({
|
|
2956
2965
|
width: Math.round(r.width),
|
|
2957
2966
|
height: Math.round(r.height)
|
|
2958
|
-
}), [r]),
|
|
2967
|
+
}), [r]), d = N(() => {
|
|
2959
2968
|
n && a(n);
|
|
2960
2969
|
}, [a, n]);
|
|
2961
2970
|
return /* @__PURE__ */ F(
|
|
2962
2971
|
"div",
|
|
2963
2972
|
{
|
|
2964
|
-
onClick:
|
|
2973
|
+
onClick: d,
|
|
2965
2974
|
id: `page-${n}`,
|
|
2966
|
-
className:
|
|
2975
|
+
className: We["rp-thumbnail-wrapper"],
|
|
2967
2976
|
children: [
|
|
2968
|
-
/* @__PURE__ */ i("div", { className: ne(
|
|
2977
|
+
/* @__PURE__ */ i("div", { className: ne(l, We["rp-thumbnail"]), children: e ? /* @__PURE__ */ i(
|
|
2969
2978
|
"img",
|
|
2970
2979
|
{
|
|
2971
|
-
src:
|
|
2972
|
-
width:
|
|
2973
|
-
height:
|
|
2980
|
+
src: e,
|
|
2981
|
+
width: c.width,
|
|
2982
|
+
height: c.height,
|
|
2974
2983
|
alt: "thumbnail"
|
|
2975
2984
|
}
|
|
2976
2985
|
) : /* @__PURE__ */ i(
|
|
2977
2986
|
"div",
|
|
2978
2987
|
{
|
|
2979
|
-
className:
|
|
2988
|
+
className: We["rp-thumbnail-loader"],
|
|
2980
2989
|
style: {
|
|
2981
|
-
width: `${
|
|
2982
|
-
height: `${
|
|
2990
|
+
width: `${c.width}px`,
|
|
2991
|
+
height: `${c.height}px`
|
|
2983
2992
|
},
|
|
2984
2993
|
children: /* @__PURE__ */ i(Ct, {})
|
|
2985
2994
|
}
|
|
2986
2995
|
) }),
|
|
2987
|
-
/* @__PURE__ */ i("div", { className:
|
|
2996
|
+
/* @__PURE__ */ i("div", { className: We["rp-thumbnail-text"], children: n })
|
|
2988
2997
|
]
|
|
2989
2998
|
}
|
|
2990
2999
|
);
|
|
2991
3000
|
}, sn = {
|
|
2992
3001
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2993
3002
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2994
|
-
}, Zi = 16, ji = (
|
|
2995
|
-
const n =
|
|
2996
|
-
|
|
2997
|
-
}, Ki = $e((
|
|
2998
|
-
const { show: n } =
|
|
2999
|
-
cn(
|
|
3000
|
-
const v =
|
|
3001
|
-
const w =
|
|
3002
|
-
w <= r &&
|
|
3003
|
-
}, [
|
|
3003
|
+
}, Zi = 16, ji = (t, e) => {
|
|
3004
|
+
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3005
|
+
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Zi);
|
|
3006
|
+
}, Ki = $e((t, e) => {
|
|
3007
|
+
const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: d } = Pn(), p = H(null), m = H(1);
|
|
3008
|
+
cn(e, () => p.current);
|
|
3009
|
+
const v = W(() => Object.values(a), [a]), h = N(() => {
|
|
3010
|
+
const w = c + 1;
|
|
3011
|
+
w <= r && l(w);
|
|
3012
|
+
}, [l, r, c]);
|
|
3004
3013
|
return k(() => {
|
|
3005
|
-
o >
|
|
3006
|
-
}, [o,
|
|
3007
|
-
var
|
|
3014
|
+
o > c ? d(o) : n && m.current !== o && (ji(p.current, o), m.current = o);
|
|
3015
|
+
}, [o, c, d, n, v]), mr(p.current, h), /* @__PURE__ */ i("div", { ref: p, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? v.map((w, C) => {
|
|
3016
|
+
var y, P;
|
|
3008
3017
|
return /* @__PURE__ */ i(
|
|
3009
3018
|
Bi,
|
|
3010
3019
|
{
|
|
3011
|
-
isFocused: o === ((
|
|
3012
|
-
pageNumber: (
|
|
3020
|
+
isFocused: o === ((y = w.page) == null ? void 0 : y.pageNumber),
|
|
3021
|
+
pageNumber: (P = w.page) == null ? void 0 : P.pageNumber,
|
|
3013
3022
|
thumbnailSrc: w.thumbnailSrc,
|
|
3014
3023
|
loading: w.loading,
|
|
3015
3024
|
viewport: w.viewport
|
|
3016
3025
|
},
|
|
3017
|
-
|
|
3026
|
+
C
|
|
3018
3027
|
);
|
|
3019
3028
|
}) : null }) });
|
|
3020
3029
|
}), Xi = () => {
|
|
3021
|
-
const { thumbnailIcon:
|
|
3022
|
-
return
|
|
3030
|
+
const { thumbnailIcon: t } = pe();
|
|
3031
|
+
return t || /* @__PURE__ */ i(fr, {});
|
|
3023
3032
|
}, Yi = () => {
|
|
3024
|
-
const { active:
|
|
3025
|
-
|
|
3026
|
-
}, []), p =
|
|
3033
|
+
const { active: t, setActive: e } = Pn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ve(), { localeMessages: c } = se(), d = N(() => {
|
|
3034
|
+
e((m) => !m);
|
|
3035
|
+
}, []), p = W(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
3027
3036
|
re,
|
|
3028
3037
|
{
|
|
3029
|
-
onClick:
|
|
3030
|
-
active:
|
|
3031
|
-
"aria-label":
|
|
3038
|
+
onClick: d,
|
|
3039
|
+
active: t,
|
|
3040
|
+
"aria-label": c == null ? void 0 : c.thumbnailTooltip,
|
|
3032
3041
|
children: /* @__PURE__ */ i(Xi, {})
|
|
3033
3042
|
}
|
|
3034
|
-
) }) : null, [a,
|
|
3035
|
-
return /* @__PURE__ */ i(
|
|
3043
|
+
) }) : null, [a, t, d, c]);
|
|
3044
|
+
return /* @__PURE__ */ i(me, { children: l && /* @__PURE__ */ F(
|
|
3036
3045
|
"div",
|
|
3037
3046
|
{
|
|
3038
3047
|
style: { "--rp-thumbnail-width": `${n}px` },
|
|
@@ -3044,10 +3053,10 @@ const xe = {
|
|
|
3044
3053
|
"div",
|
|
3045
3054
|
{
|
|
3046
3055
|
"data-rp": "thumbnailSidebar",
|
|
3047
|
-
hidden: !
|
|
3056
|
+
hidden: !t,
|
|
3048
3057
|
className: gt["rp-thumbnails-wrapper"],
|
|
3049
3058
|
children: [
|
|
3050
|
-
/* @__PURE__ */ i(Ki, { show:
|
|
3059
|
+
/* @__PURE__ */ i(Ki, { show: t, ref: r }),
|
|
3051
3060
|
/* @__PURE__ */ i(gr, { onWidthChange: o, thumbnailRef: r })
|
|
3052
3061
|
]
|
|
3053
3062
|
}
|
|
@@ -3064,54 +3073,54 @@ const xe = {
|
|
|
3064
3073
|
"rp-theme-variables": "_rp-theme-variables_1uujy_56",
|
|
3065
3074
|
"rp-dark-mode": "_rp-dark-mode_1uujy_162"
|
|
3066
3075
|
}, Ji = $e(
|
|
3067
|
-
(
|
|
3068
|
-
const { children: n, toolbarRef: o, style: r, className: a } =
|
|
3076
|
+
(t, e) => {
|
|
3077
|
+
const { children: n, toolbarRef: o, style: r, className: a } = t, { customVariables: l, customDarkVariables: c } = Tr(), { darkMode: d } = rr();
|
|
3069
3078
|
return /* @__PURE__ */ i(
|
|
3070
3079
|
"div",
|
|
3071
3080
|
{
|
|
3072
|
-
ref:
|
|
3081
|
+
ref: e,
|
|
3073
3082
|
className: ne(
|
|
3074
3083
|
_e["rp-theme-variables"],
|
|
3075
3084
|
_e["rp-container"],
|
|
3076
|
-
|
|
3085
|
+
d ? _e["rp-dark-mode"] : "",
|
|
3077
3086
|
a
|
|
3078
3087
|
),
|
|
3079
3088
|
style: {
|
|
3080
3089
|
"--rp-toolbar-height": `${(o == null ? void 0 : o.clientHeight) || 48}px`,
|
|
3081
|
-
...
|
|
3082
|
-
...
|
|
3090
|
+
...l,
|
|
3091
|
+
...d ? c : {},
|
|
3083
3092
|
...r
|
|
3084
3093
|
},
|
|
3085
3094
|
children: n
|
|
3086
3095
|
}
|
|
3087
3096
|
);
|
|
3088
3097
|
}
|
|
3089
|
-
), Bs = $e((
|
|
3098
|
+
), Bs = $e((t, e) => {
|
|
3090
3099
|
const {
|
|
3091
3100
|
children: n,
|
|
3092
3101
|
slots: o,
|
|
3093
3102
|
icons: r,
|
|
3094
3103
|
style: a,
|
|
3095
|
-
className:
|
|
3096
|
-
mobileWidth:
|
|
3097
|
-
onLoaded:
|
|
3104
|
+
className: l,
|
|
3105
|
+
mobileWidth: c,
|
|
3106
|
+
onLoaded: d,
|
|
3098
3107
|
cleanupOnLoaded: p,
|
|
3099
3108
|
onLayoutWidthChange: m
|
|
3100
|
-
} =
|
|
3101
|
-
return k(() => (
|
|
3109
|
+
} = t, [v, h] = $(null), { setContainer: w, setContentRef: C } = ge(), { loading: y } = Q(), { LoaderImageComponent: P } = hn();
|
|
3110
|
+
return k(() => (d && d(), () => {
|
|
3102
3111
|
p && p();
|
|
3103
|
-
}), [
|
|
3112
|
+
}), [d, p]), /* @__PURE__ */ i(Ji, { toolbarRef: v, ref: e, children: /* @__PURE__ */ i(Pr, { mobileWidth: c, onLayoutWidthChange: m, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ F(_r, { getContainerRef: w, style: a, className: l, children: [
|
|
3104
3113
|
/* @__PURE__ */ F(br, { children: [
|
|
3105
3114
|
/* @__PURE__ */ F("div", { className: _e["rp-layout"], children: [
|
|
3106
|
-
/* @__PURE__ */ i(
|
|
3115
|
+
/* @__PURE__ */ i(Vi, { ref: h }),
|
|
3107
3116
|
/* @__PURE__ */ F("div", { className: _e["rp-content"], children: [
|
|
3108
3117
|
/* @__PURE__ */ i("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ i(Yi, {}) }),
|
|
3109
|
-
/* @__PURE__ */ i("div", { ref:
|
|
3118
|
+
/* @__PURE__ */ i("div", { ref: C, className: _e["rp-pages"], children: n })
|
|
3110
3119
|
] })
|
|
3111
3120
|
] }),
|
|
3112
3121
|
/* @__PURE__ */ i(Cr, {})
|
|
3113
3122
|
] }),
|
|
3114
|
-
|
|
3123
|
+
y ? /* @__PURE__ */ i(
|
|
3115
3124
|
"div",
|
|
3116
3125
|
{
|
|
3117
3126
|
className: _e["rp-loader"],
|
|
@@ -3134,7 +3143,7 @@ const xe = {
|
|
|
3134
3143
|
height: "100%",
|
|
3135
3144
|
width: "100%"
|
|
3136
3145
|
},
|
|
3137
|
-
children:
|
|
3146
|
+
children: P && /* @__PURE__ */ i(P, {})
|
|
3138
3147
|
}
|
|
3139
3148
|
)
|
|
3140
3149
|
}
|
|
@@ -3147,13 +3156,13 @@ export {
|
|
|
3147
3156
|
Io as C,
|
|
3148
3157
|
ei as D,
|
|
3149
3158
|
Gi as E,
|
|
3150
|
-
|
|
3151
|
-
|
|
3159
|
+
Un as F,
|
|
3160
|
+
Vi as G,
|
|
3152
3161
|
Bi as H,
|
|
3153
3162
|
Ki as I,
|
|
3154
3163
|
Yi as J,
|
|
3155
3164
|
Ji as K,
|
|
3156
|
-
|
|
3165
|
+
Ui as L,
|
|
3157
3166
|
Ai as M,
|
|
3158
3167
|
zi as O,
|
|
3159
3168
|
Ms as P,
|
|
@@ -3163,17 +3172,17 @@ export {
|
|
|
3163
3172
|
$i as Z,
|
|
3164
3173
|
Hs as a,
|
|
3165
3174
|
Bs as b,
|
|
3166
|
-
|
|
3175
|
+
$n as c,
|
|
3167
3176
|
tt as d,
|
|
3168
3177
|
xt as e,
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3178
|
+
wn as f,
|
|
3179
|
+
To as g,
|
|
3180
|
+
_n as h,
|
|
3172
3181
|
So as i,
|
|
3173
|
-
|
|
3182
|
+
bn as j,
|
|
3174
3183
|
yo as k,
|
|
3175
|
-
|
|
3176
|
-
|
|
3184
|
+
Cn as l,
|
|
3185
|
+
Pn as m,
|
|
3177
3186
|
xo as n,
|
|
3178
3187
|
Tn as o,
|
|
3179
3188
|
Eo as p,
|
|
@@ -3184,7 +3193,7 @@ export {
|
|
|
3184
3193
|
ie as u,
|
|
3185
3194
|
ni as v,
|
|
3186
3195
|
ai as w,
|
|
3187
|
-
|
|
3188
|
-
|
|
3196
|
+
Ti as x,
|
|
3197
|
+
Zn as y,
|
|
3189
3198
|
Fi as z
|
|
3190
3199
|
};
|