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