@pdf-viewer/react 1.17.0-beta.2 → 1.17.0-beta.4
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/RPSplitter-b942c039.js +68 -0
- package/dist/{ToolbarLayout.module-60ee3cc4.js → ToolbarLayout.module-e348917a.js} +888 -893
- package/dist/assets/style.css +1 -1
- package/dist/assets/style.js +28 -26
- package/dist/components/RPController.js +3 -3
- package/dist/components/RPPages.js +2 -2
- package/dist/components/RPProvider.js +2 -2
- package/dist/components/layout/LayoutContainer.js +2 -2
- package/dist/components/layout/RPDefaultLayout.js +2 -2
- package/dist/components/layout/RPLayout.js +2 -2
- package/dist/components/layout/sidebar/RPSidebar.js +3 -3
- package/dist/components/layout/sidebar/RPSplitter.js +6 -59
- package/dist/components/layout/sidebar/Thumbnail.js +2 -2
- package/dist/components/layout/sidebar/Thumbnails.js +2 -2
- package/dist/components/layout/toolbar/DocumentDialog.js +2 -2
- package/dist/components/layout/toolbar/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/MostPageTool.js +2 -2
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- package/dist/components/layout/toolbar/Paginate.js +2 -2
- package/dist/components/layout/toolbar/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/RPMoreOptions.js +2 -2
- package/dist/components/layout/toolbar/RPToolbar.js +2 -2
- package/dist/components/layout/toolbar/RPToolbarEnd.js +2 -2
- package/dist/components/layout/toolbar/SearchResultNavigator.js +2 -2
- package/dist/components/layout/toolbar/SearchTool.js +2 -2
- package/dist/components/layout/toolbar/ThumbnailTool.js +2 -2
- package/dist/components/layout/toolbar/ToolbarCustom.js +10 -10
- package/dist/components/layout/toolbar/ToolbarDefault.js +4 -4
- package/dist/components/layout/toolbar/ToolbarLayout.js +2 -2
- package/dist/components/layout/toolbar/ZoomTool.js +2 -2
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +2 -2
- package/dist/components/layout/toolbar/tools/DualPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +2 -2
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +35 -0
- package/dist/components/layout/toolbar/tools/InputPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/NextPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +35 -0
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +2 -2
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +35 -0
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +2 -2
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +2 -2
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +2 -2
- package/dist/components/page/AnnotationLayer.js +2 -2
- package/dist/components/page/CanvasLayer.js +2 -2
- package/dist/components/page/DualPage.js +2 -2
- package/dist/components/page/DualPageWithCover.js +2 -2
- package/dist/components/page/RPPage.js +2 -2
- package/dist/components/page/SinglePage.js +2 -2
- package/dist/components/page/TextHighlightLayer.js +2 -2
- package/dist/components/page/TextLayer.js +2 -2
- package/dist/components/ui/LoadingIndicator.js +2 -2
- package/dist/contexts/PaginationContext.js +2 -2
- package/dist/contexts/PrintContext.js +2 -2
- package/dist/contexts/RenderQueueProvider.js +2 -2
- package/dist/contexts/SearchContext.js +2 -2
- package/dist/contexts/ThumbnailsContext.js +2 -2
- package/dist/main.js +35 -29
- package/dist/types/components/layout/toolbar/tools/HorizontalScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/PageScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/VerticalScrollingTool.d.ts +3 -0
- package/dist/types/main.d.ts +3 -0
- package/dist/utils/hooks/useFileDownload.js +2 -2
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +2 -2
- package/dist/utils/hooks/usePresentPage.js +2 -2
- package/dist/utils/hooks/usePrint.js +2 -2
- package/dist/utils/hooks/useScrollToPage.js +2 -2
- package/dist/utils/hooks/useSearch.js +2 -2
- package/dist/utils/hooks/useThumbnail.js +2 -2
- package/dist/utils/hooks/useVirtualReactWindow.js +2 -2
- package/package.json +1 -1
|
@@ -1,119 +1,119 @@
|
|
|
1
1
|
import { jsx as i, Fragment as he, jsxs as k } from "react/jsx-runtime";
|
|
2
2
|
import * as X from "react";
|
|
3
|
-
import { useRef as M, useEffect as A, useCallback as N, useState as H, useMemo as W, createContext as Be, useContext as
|
|
4
|
-
import { ChevronUpIcon as
|
|
3
|
+
import { useRef as M, useEffect as A, useCallback as N, useState as H, useMemo as W, createContext as Be, useContext as Ze, useImperativeHandle as mn, createElement as Qe, PureComponent as po, Component as ho, memo as It, Fragment as fo, forwardRef as mo } from "react";
|
|
4
|
+
import { ChevronUpIcon as Ve } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as de } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as gn } from "./components/ui/Input.js";
|
|
7
|
-
import { ViewMode as
|
|
7
|
+
import { ViewMode as oe, ScrollMode as ie, AnnotationSubType as $t, SelectionMode as go, ErrorType as vo, ZoomLevel as Me } from "./utils/types.js";
|
|
8
8
|
import { useScrollModeContext as Ae } 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 wo } from "./contexts/DocumentPasswordContext.js";
|
|
11
|
+
import { useDarkModeContext as bo } from "./contexts/DarkModeContext.js";
|
|
12
12
|
import "./contexts/RotationContext.js";
|
|
13
|
-
import { useLayerContext as
|
|
14
|
-
import { useZoomContext as
|
|
13
|
+
import { useLayerContext as _o } from "./contexts/LayerContext.js";
|
|
14
|
+
import { useZoomContext as ot } from "./contexts/ZoomContext.js";
|
|
15
15
|
import { useViewModeContext as He } from "./contexts/ViewModeContext.js";
|
|
16
|
-
import { useVirtualScrollContext as
|
|
16
|
+
import { useVirtualScrollContext as rt } from "./contexts/VirtualScrollContext.js";
|
|
17
17
|
import { useVirtualGridContext as vn } from "./contexts/VirtualGridContext.js";
|
|
18
|
-
import { useSelectionModeContext as
|
|
18
|
+
import { useSelectionModeContext as Po } from "./contexts/SelectionModeContext.js";
|
|
19
19
|
import { useInitialStateContext as xt } from "./contexts/InitialStateContext.js";
|
|
20
|
-
import { useFullScreenContext as
|
|
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 yo, highlightMatches as Io, isMatchEntireWord as xo } from "./utils/highlight.js";
|
|
24
24
|
import { useLayoutContainer as Te } from "./contexts/LayoutContainerContext.js";
|
|
25
|
-
import { useDimensionPagesContext as
|
|
25
|
+
import { useDimensionPagesContext as je } 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
|
|
29
|
+
import { useDownloadContext as Ro } from "./contexts/DownloadContext.js";
|
|
30
30
|
import { useSmoothScrollContext as wn } from "./contexts/SmoothScrollContext.js";
|
|
31
31
|
import "./contexts/ElementPageContext.js";
|
|
32
32
|
import { usePagesRotateContext as it } from "./contexts/PagesRotateContext.js";
|
|
33
|
-
import { Queue as
|
|
34
|
-
import { renderPage as
|
|
35
|
-
import { useGlobalCurrentPage as
|
|
33
|
+
import { Queue as Lo } from "./utils/Queue.js";
|
|
34
|
+
import { renderPage as Eo } from "./utils/renderPage.js";
|
|
35
|
+
import { useGlobalCurrentPage as No } from "./contexts/GlobalCurrentPage.js";
|
|
36
36
|
import { useLoaderContext as St } from "./contexts/LoaderContext.js";
|
|
37
37
|
import { useToolComponentContext as xe } from "./contexts/ToolComponentContext.js";
|
|
38
38
|
import { useIconToolContext as ge } from "./contexts/IconToolContext.js";
|
|
39
|
-
import { useOtherToolContext as
|
|
40
|
-
import { useEventCallbackContext as
|
|
41
|
-
import { useThemeContext as
|
|
39
|
+
import { useOtherToolContext as Oo } from "./contexts/OtherToolContext.js";
|
|
40
|
+
import { useEventCallbackContext as Do } from "./contexts/EventCallbackContext.js";
|
|
41
|
+
import { useThemeContext as Ao } from "./contexts/ThemeContext.js";
|
|
42
42
|
import "./contexts/ConfigContext.js";
|
|
43
|
-
import * as
|
|
44
|
-
import { PixelsPerInch as
|
|
45
|
-
import { ThumbnailIcon as
|
|
43
|
+
import * as zo from "pdfjs-dist";
|
|
44
|
+
import { PixelsPerInch as Wo, AnnotationMode as Fo, RenderingCancelledException as ko, AnnotationLayer as Mo } from "pdfjs-dist";
|
|
45
|
+
import { ThumbnailIcon as Ho } from "./components/icons/Thumbnail.js";
|
|
46
|
+
import { c as Xe, R as $o } from "./RPSplitter-b942c039.js";
|
|
46
47
|
import { c as se } from "./clsx-0c6e471a.js";
|
|
47
|
-
import { LoaderIcon as
|
|
48
|
-
import { Container as
|
|
49
|
-
import { useViewportContext as Se, ViewportProvider as
|
|
50
|
-
import { useToolbarComponentContext as Ce, ToolbarComponentProvider as
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import { c as ye, L as Br } from "./LayoutWrapper-3f4d0a19.js";
|
|
48
|
+
import { LoaderIcon as bn } from "./components/icons/LoaderIcon.js";
|
|
49
|
+
import { Container as Go } from "./components/layout/Container.js";
|
|
50
|
+
import { useViewportContext as Se, ViewportProvider as Uo } from "./contexts/ViewportContext.js";
|
|
51
|
+
import { useToolbarComponentContext as Ce, ToolbarComponentProvider as Vo } from "./contexts/ToolbarComponentContext.js";
|
|
52
|
+
import { WrapperLayout as qo } from "./components/layout/WrapperLayout.js";
|
|
53
|
+
import { RPDropFileZone as Bo } from "./components/RPDropFileZone.js";
|
|
54
|
+
import { c as ye, L as Zo } from "./LayoutWrapper-3f4d0a19.js";
|
|
55
55
|
import { SkipLink as Gt } from "./components/layout/SkipLink.js";
|
|
56
|
-
import { c as ne, S as
|
|
57
|
-
import { UICheckbox as
|
|
58
|
-
import { useIconContext as ve, IconProvider as
|
|
56
|
+
import { c as ne, S as Ut } from "./SearchCloseButton-08d57275.js";
|
|
57
|
+
import { UICheckbox as Vt } from "./components/ui/Checkbox.js";
|
|
58
|
+
import { useIconContext as ve, IconProvider as jo } from "./contexts/IconContext.js";
|
|
59
59
|
import K from "./components/ui/RPTooltip.js";
|
|
60
60
|
import { UIDropDown as Rt } from "./components/ui/DropDown.js";
|
|
61
61
|
import { MenuItem as Ie } from "./components/layout/toolbar/MenuItem.js";
|
|
62
62
|
import { MenuSeparator as Lt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
63
|
-
import { dateFormatter as
|
|
64
|
-
import { PropertyItem as
|
|
63
|
+
import { dateFormatter as qt } from "./utils/dateFormatter.js";
|
|
64
|
+
import { PropertyItem as Ko } from "./components/layout/toolbar/PropertyItem.js";
|
|
65
65
|
import "./RotateTool.module-67946714.js";
|
|
66
66
|
import { withRef as at } from "./utils/withRef.js";
|
|
67
|
-
import { useInfiniteScroll as
|
|
68
|
-
import { MAX_ZOOM_SCALE as Bt, THUMBNAIL_MIN_WIDTH as
|
|
69
|
-
import { SimpleLinkService as
|
|
70
|
-
import { annotationsEvents as
|
|
71
|
-
import { normalizeSingleKeyword as
|
|
72
|
-
import { CustomElement as
|
|
73
|
-
import { getGridDimension as Et, getPositionFromPage as
|
|
74
|
-
import { useMousePressed as
|
|
75
|
-
import { useGrabScroll as
|
|
76
|
-
import { usePinch as
|
|
67
|
+
import { useInfiniteScroll as Xo } from "./utils/hooks/useInfiniteScroll.js";
|
|
68
|
+
import { MAX_ZOOM_SCALE as Bt, THUMBNAIL_MIN_WIDTH as Qo } from "./utils/constants.js";
|
|
69
|
+
import { SimpleLinkService as Yo } from "./utils/link_service.js";
|
|
70
|
+
import { annotationsEvents as Jo, annotationEventsHandler as er, handleAnnotationWidget as tr, handleAnnotationLink as nr, bindLayerEvents as or, fixTabIndexAccessibility as Zt, enhanceLinkAccessibility as jt, unbindLayerEvents as Kt } from "./utils/annotations.js";
|
|
71
|
+
import { normalizeSingleKeyword as rr, sortHighlightPosition as ir, unwrap as ar } from "./components/page/searchHighlight.js";
|
|
72
|
+
import { CustomElement as sr } from "./components/page/CustomElement.js";
|
|
73
|
+
import { getGridDimension as Et, getPositionFromPage as cr, getPageFromPosition as lr } from "./utils/calculatePage.js";
|
|
74
|
+
import { useMousePressed as dr } from "./utils/hooks/useMousePressed.js";
|
|
75
|
+
import { useGrabScroll as ur } from "./utils/hooks/useGrabScroll.js";
|
|
76
|
+
import { usePinch as pr } from "./utils/hooks/usePinch.js";
|
|
77
77
|
import { useDebounce as Nt } from "./utils/hooks/useDebounce.js";
|
|
78
|
-
import
|
|
79
|
-
import { useCopyText as
|
|
78
|
+
import hr from "./components/ui/PasswordModal.js";
|
|
79
|
+
import { useCopyText as fr } from "./utils/hooks/useCopyText.js";
|
|
80
80
|
import { getScrollDistance as ke } from "./utils/getScrollDistance.js";
|
|
81
|
-
import { getWordPositionInPage as
|
|
82
|
-
import { getThumbnailViewport as
|
|
81
|
+
import { getWordPositionInPage as mr } from "./utils/getWordPositionInPage.js";
|
|
82
|
+
import { getThumbnailViewport as gr } from "./utils/getThumbnailViewport.js";
|
|
83
83
|
import { smoothScrollTo as ht } from "./utils/smoothScrollTo.js";
|
|
84
|
-
import { appConsole as
|
|
85
|
-
import { FileUploadTool as
|
|
86
|
-
import { DarkModeTool as
|
|
87
|
-
import { ThreeDotIcon as
|
|
88
|
-
import { c as
|
|
89
|
-
import { D as
|
|
90
|
-
import { a as
|
|
91
|
-
import { CloseIcon as
|
|
92
|
-
import { DocumentProperties as
|
|
93
|
-
import { RotateTool as
|
|
94
|
-
import { ViewModeTool as
|
|
95
|
-
import { ScrollModeTool as
|
|
96
|
-
import { FileDownloadDefaultIcon as
|
|
97
|
-
import { PrintDefaultTool as
|
|
84
|
+
import { appConsole as vr } from "./utils/appConsole.js";
|
|
85
|
+
import { FileUploadTool as _n } from "./components/layout/toolbar/FileUploadTool.js";
|
|
86
|
+
import { DarkModeTool as wr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
87
|
+
import { ThreeDotIcon as br } from "./components/icons/ThreeDotIcon.js";
|
|
88
|
+
import { c as _r, u as Ot, P as Ke, a as Ue, b as Dt, k as Pr, e as Tr, i as Cr } from "./index-35c7f4a2.js";
|
|
89
|
+
import { D as yr, e as ft } from "./floating-ui.react-dom-6b2fe0df.js";
|
|
90
|
+
import { a as Ir, h as xr, u as Sr, F as Rr, b as Lr, G as tt } from "./index-f563c6f0.js";
|
|
91
|
+
import { CloseIcon as Er } from "./components/icons/CloseIcon.js";
|
|
92
|
+
import { DocumentProperties as Nr } from "./components/layout/toolbar/DocumentProperties.js";
|
|
93
|
+
import { RotateTool as Or } from "./components/layout/toolbar/RotateTool.js";
|
|
94
|
+
import { ViewModeTool as Dr } from "./components/layout/toolbar/ViewModeTool.js";
|
|
95
|
+
import { ScrollModeTool as Ar } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
96
|
+
import { FileDownloadDefaultIcon as zr } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
97
|
+
import { PrintDefaultTool as Wr } from "./components/icons/PrintDefaultIcon.js";
|
|
98
98
|
import { FullScreenTool as Pn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
99
99
|
import { GoToDownIcon as Tn } from "./components/icons/GoToDownIcon.js";
|
|
100
|
-
import { SelectionModeTool as
|
|
101
|
-
import { ZoomInIcon as
|
|
102
|
-
import { ZoomOutIcon as
|
|
103
|
-
import { isZoomOutDisabled as
|
|
100
|
+
import { SelectionModeTool as Fr } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
101
|
+
import { ZoomInIcon as kr } from "./components/icons/ZoomInIcon.js";
|
|
102
|
+
import { ZoomOutIcon as Mr } from "./components/icons/ZoomOutIcon.js";
|
|
103
|
+
import { isZoomOutDisabled as Hr, isZoomInDisabled as $r } from "./utils/zoom.js";
|
|
104
104
|
import { SearchIcon as Cn } from "./components/icons/SearchIcon.js";
|
|
105
|
-
import { ClearIcon as
|
|
105
|
+
import { ClearIcon as Gr } from "./components/icons/ClearIcon.js";
|
|
106
106
|
import { InfoIcon as Xt } from "./components/icons/InfoIcon.js";
|
|
107
107
|
const yn = () => {
|
|
108
|
-
const { viewMode: t } = He(), { scrollMode: e } = Ae(), { virtualScrollRef: n, virtualScrollableElementRef:
|
|
108
|
+
const { viewMode: t } = He(), { scrollMode: e } = Ae(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = rt(), { setFocusedPage: a } = ce(), c = M(), { columnCount: d } = vn(), { widths: s, heights: f } = je(), m = M(e), C = M(t), u = M(d), { targetScrollPage: T } = wn();
|
|
109
109
|
A(() => {
|
|
110
110
|
n != null && n.scrollToItem && (c.current = n);
|
|
111
111
|
}, [n]), A(() => {
|
|
112
112
|
m.current = e, C.current = t;
|
|
113
113
|
}, [e, t]);
|
|
114
|
-
const
|
|
114
|
+
const b = N(
|
|
115
115
|
(y, w) => {
|
|
116
|
-
if (!
|
|
116
|
+
if (!o)
|
|
117
117
|
return;
|
|
118
118
|
const g = Math.ceil(y / 2) * 2 - 1;
|
|
119
119
|
if (y === g + 1) {
|
|
@@ -122,19 +122,19 @@ const yn = () => {
|
|
|
122
122
|
top: 0
|
|
123
123
|
};
|
|
124
124
|
return new Promise(
|
|
125
|
-
(l) => ht(
|
|
125
|
+
(l) => ht(o, p, l)
|
|
126
126
|
);
|
|
127
127
|
}
|
|
128
128
|
const h = {
|
|
129
129
|
left: 0,
|
|
130
130
|
top: 0
|
|
131
131
|
};
|
|
132
|
-
return
|
|
132
|
+
return o == null ? void 0 : o.scrollTo({
|
|
133
133
|
...h,
|
|
134
134
|
behavior: w
|
|
135
135
|
});
|
|
136
136
|
},
|
|
137
|
-
[
|
|
137
|
+
[o, s, ht]
|
|
138
138
|
);
|
|
139
139
|
return A(() => {
|
|
140
140
|
m.current = e, C.current = t;
|
|
@@ -145,19 +145,19 @@ const yn = () => {
|
|
|
145
145
|
a(y);
|
|
146
146
|
const g = y - 1;
|
|
147
147
|
let h = g, p = 0;
|
|
148
|
-
if (C.current ===
|
|
149
|
-
|
|
148
|
+
if (C.current === oe.DUAL_PAGE && m.current === ie.PAGE_SCROLLING) {
|
|
149
|
+
b(y, w);
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
152
|
if (m.current === ie.PAGE_SCROLLING) {
|
|
153
153
|
a(y);
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
156
|
-
if (!c.current || !
|
|
156
|
+
if (!c.current || !r)
|
|
157
157
|
return;
|
|
158
|
-
const l =
|
|
158
|
+
const l = r;
|
|
159
159
|
w === "smooth" && (T.current = y);
|
|
160
|
-
const { columnsWidth: v, rowsHeight:
|
|
160
|
+
const { columnsWidth: v, rowsHeight: _ } = Et(
|
|
161
161
|
{ widths: s, heights: f },
|
|
162
162
|
d
|
|
163
163
|
);
|
|
@@ -172,9 +172,9 @@ const yn = () => {
|
|
|
172
172
|
behavior: w
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
|
-
if (C.current ===
|
|
175
|
+
if (C.current === oe.DUAL_PAGE) {
|
|
176
176
|
p = g % 2, h = Math.floor(g / 2);
|
|
177
|
-
const R = ke(v, p), O = ke(
|
|
177
|
+
const R = ke(v, p), O = ke(_, h), D = {
|
|
178
178
|
left: Math.floor(R),
|
|
179
179
|
top: Math.floor(O)
|
|
180
180
|
};
|
|
@@ -183,7 +183,7 @@ const yn = () => {
|
|
|
183
183
|
behavior: w
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
|
-
const I = ke(
|
|
186
|
+
const I = ke(_, h), S = {
|
|
187
187
|
left: 0,
|
|
188
188
|
top: Math.floor(I)
|
|
189
189
|
};
|
|
@@ -193,25 +193,25 @@ const yn = () => {
|
|
|
193
193
|
});
|
|
194
194
|
},
|
|
195
195
|
[
|
|
196
|
-
|
|
196
|
+
r,
|
|
197
197
|
d,
|
|
198
|
-
|
|
198
|
+
b,
|
|
199
199
|
a,
|
|
200
200
|
ht,
|
|
201
201
|
f,
|
|
202
202
|
s
|
|
203
203
|
]
|
|
204
204
|
) };
|
|
205
|
-
},
|
|
206
|
-
const [e, n] = H(t), [
|
|
205
|
+
}, Ur = (t = 1) => {
|
|
206
|
+
const [e, n] = H(t), [r, o] = H(0), { scrollToPage: a } = yn(), c = M(1), { viewMode: d } = He(), { scrollMode: s } = Ae(), { widths: f } = je(), { pagesRef: m } = Te(), C = Nt(e, 100), u = N(
|
|
207
207
|
(h) => {
|
|
208
208
|
if (!/^[0-9]*$/g.test(h.toString()) || !h)
|
|
209
209
|
return { success: !1, currentPage: c.current };
|
|
210
210
|
const l = +h;
|
|
211
|
-
return l < 0 || l >
|
|
211
|
+
return l < 0 || l > r ? { success: !1, currentPage: c.current } : (n(l), c.current = l, { success: !0, currentPage: +h });
|
|
212
212
|
},
|
|
213
|
-
[
|
|
214
|
-
), T = N(u, [u]),
|
|
213
|
+
[r]
|
|
214
|
+
), T = N(u, [u]), b = N(
|
|
215
215
|
(h) => {
|
|
216
216
|
const p = u(h);
|
|
217
217
|
return p.success && a(p.currentPage), p;
|
|
@@ -222,24 +222,24 @@ const yn = () => {
|
|
|
222
222
|
if (!m || p)
|
|
223
223
|
return !1;
|
|
224
224
|
const l = p ? f[h] : f[h - 1], v = p ? f[h + 1] : f[h];
|
|
225
|
-
return d ===
|
|
226
|
-
}, [d, f, m,
|
|
225
|
+
return d === oe.DUAL_PAGE && l + v < m.clientWidth;
|
|
226
|
+
}, [d, f, m, r]), y = N(() => {
|
|
227
227
|
let h = e - 1;
|
|
228
|
-
P(h) && (h = e - 2),
|
|
229
|
-
}, [
|
|
228
|
+
P(h) && (h = e - 2), b(h);
|
|
229
|
+
}, [b, e, d, s, P]), w = W(() => d === oe.DUAL_PAGE && s === ie.PAGE_SCROLLING ? e === r - 1 : e === r, [e, r, d, s]), g = N(() => {
|
|
230
230
|
if (w)
|
|
231
231
|
return;
|
|
232
232
|
let h = e + 1;
|
|
233
|
-
P(h) && (h = e + 2),
|
|
234
|
-
}, [
|
|
233
|
+
P(h) && (h = e + 2), b(h);
|
|
234
|
+
}, [b, e, P, d, s, w]);
|
|
235
235
|
return {
|
|
236
236
|
focusedPage: C,
|
|
237
|
-
totalPages:
|
|
237
|
+
totalPages: r,
|
|
238
238
|
setFocusedPage: T,
|
|
239
|
-
setTotalPages:
|
|
239
|
+
setTotalPages: o,
|
|
240
240
|
nextPage: g,
|
|
241
241
|
prevPage: y,
|
|
242
|
-
goToPage:
|
|
242
|
+
goToPage: b
|
|
243
243
|
};
|
|
244
244
|
}, In = Be({
|
|
245
245
|
focusedPage: 0,
|
|
@@ -254,20 +254,20 @@ const yn = () => {
|
|
|
254
254
|
nextPage: () => {
|
|
255
255
|
}
|
|
256
256
|
}), ce = () => {
|
|
257
|
-
const t =
|
|
258
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
259
|
-
},
|
|
260
|
-
const { pdf: e } =
|
|
257
|
+
const t = Ze(In);
|
|
258
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && vr.error("Please use this hooks inside children component of RPProvider"), t;
|
|
259
|
+
}, bc = ({ children: t }) => {
|
|
260
|
+
const { pdf: e } = re(), { setCurrentPage: n } = No(), { focusedPage: r, totalPages: o, setFocusedPage: a, setTotalPages: c, goToPage: d, nextPage: s, prevPage: f } = Ur();
|
|
261
261
|
return A(() => {
|
|
262
262
|
e != null && e.numPages && (c(e.numPages), a(1));
|
|
263
263
|
}, [e, c, a]), A(() => {
|
|
264
|
-
n(
|
|
265
|
-
}, [
|
|
264
|
+
n(r);
|
|
265
|
+
}, [r, n]), /* @__PURE__ */ i(
|
|
266
266
|
In.Provider,
|
|
267
267
|
{
|
|
268
268
|
value: {
|
|
269
|
-
focusedPage:
|
|
270
|
-
totalPages:
|
|
269
|
+
focusedPage: r,
|
|
270
|
+
totalPages: o,
|
|
271
271
|
setFocusedPage: a,
|
|
272
272
|
setTotalPages: c,
|
|
273
273
|
nextPage: s,
|
|
@@ -277,12 +277,12 @@ const yn = () => {
|
|
|
277
277
|
children: t
|
|
278
278
|
}
|
|
279
279
|
);
|
|
280
|
-
},
|
|
281
|
-
const { pdf: t, pages: e } =
|
|
280
|
+
}, Vr = () => {
|
|
281
|
+
const { pdf: t, pages: e } = re(), [n, r] = H({
|
|
282
282
|
loadedPages: 0,
|
|
283
283
|
totalPages: 0,
|
|
284
284
|
percentage: 0
|
|
285
|
-
}), [
|
|
285
|
+
}), [o, a] = H(!1), [c, d] = H(!1), [s, f] = H(null), [m, C] = H(void 0), u = M(!1);
|
|
286
286
|
A(() => {
|
|
287
287
|
u.current;
|
|
288
288
|
}, [u]);
|
|
@@ -290,8 +290,8 @@ const yn = () => {
|
|
|
290
290
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
291
291
|
const l = document.querySelector(".rp-print-zone");
|
|
292
292
|
l && l.remove();
|
|
293
|
-
}, []),
|
|
294
|
-
u.current = !1, a(!1), d(!1), f(null), C(void 0),
|
|
293
|
+
}, []), b = N(() => {
|
|
294
|
+
u.current = !1, a(!1), d(!1), f(null), C(void 0), r({
|
|
295
295
|
loadedPages: 0,
|
|
296
296
|
totalPages: 0,
|
|
297
297
|
percentage: 0
|
|
@@ -301,26 +301,26 @@ const yn = () => {
|
|
|
301
301
|
}, y = async ({
|
|
302
302
|
scratchCanvas: l,
|
|
303
303
|
pdfDocument: v,
|
|
304
|
-
pageNumber:
|
|
304
|
+
pageNumber: _,
|
|
305
305
|
viewerPdfPage: I,
|
|
306
306
|
printResolution: S,
|
|
307
307
|
optionalContentConfigPromise: x,
|
|
308
308
|
printAnnotationStoragePromise: R
|
|
309
309
|
}) => {
|
|
310
310
|
if (u.current) {
|
|
311
|
-
|
|
311
|
+
b();
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
|
-
const O = S /
|
|
314
|
+
const O = S / Wo.PDF;
|
|
315
315
|
l.width = Math.floor(I.width * O), l.height = Math.floor(I.height * O);
|
|
316
316
|
const D = l.getContext("2d");
|
|
317
317
|
D.save(), D.fillStyle = "rgb(255, 255, 255)", D.fillRect(0, 0, l.width, l.height), D.restore();
|
|
318
318
|
const [z, E] = await Promise.all([
|
|
319
|
-
v.getPage(
|
|
319
|
+
v.getPage(_),
|
|
320
320
|
R
|
|
321
321
|
]);
|
|
322
322
|
if (u.current) {
|
|
323
|
-
|
|
323
|
+
b();
|
|
324
324
|
return;
|
|
325
325
|
}
|
|
326
326
|
const L = {
|
|
@@ -328,59 +328,59 @@ const yn = () => {
|
|
|
328
328
|
transform: [O, 0, 0, O, 0, 0],
|
|
329
329
|
viewport: z.getViewport({ scale: 1, rotation: I.rotation }),
|
|
330
330
|
intent: "print",
|
|
331
|
-
annotationMode:
|
|
331
|
+
annotationMode: Fo.ENABLE_STORAGE,
|
|
332
332
|
optionalContentConfigPromise: x,
|
|
333
333
|
printAnnotationStorage: E
|
|
334
334
|
};
|
|
335
335
|
try {
|
|
336
336
|
return z.render(L).promise;
|
|
337
337
|
} catch (F) {
|
|
338
|
-
throw F instanceof
|
|
338
|
+
throw F instanceof ko || console.error(F), F;
|
|
339
339
|
}
|
|
340
340
|
}, w = N(() => {
|
|
341
341
|
const l = window.print;
|
|
342
342
|
return new Promise((v) => {
|
|
343
|
-
const
|
|
343
|
+
const _ = (x) => {
|
|
344
344
|
setTimeout(() => {
|
|
345
345
|
l.call(window), setTimeout(() => x(), 20);
|
|
346
346
|
}, 0);
|
|
347
347
|
};
|
|
348
348
|
if (document.querySelector(".rp-print-zone")) {
|
|
349
|
-
|
|
349
|
+
_(v);
|
|
350
350
|
return;
|
|
351
351
|
}
|
|
352
352
|
const S = new MutationObserver(() => {
|
|
353
|
-
document.querySelector(".rp-print-zone") && (
|
|
353
|
+
document.querySelector(".rp-print-zone") && (_(v), S.disconnect());
|
|
354
354
|
});
|
|
355
355
|
S.observe(document.body, { childList: !0, subtree: !0 });
|
|
356
356
|
});
|
|
357
357
|
}, []), g = async (l) => {
|
|
358
|
-
const v = document.createElement("img"),
|
|
359
|
-
return
|
|
358
|
+
const v = document.createElement("img"), _ = document.createElement("div");
|
|
359
|
+
return _.classList.add("rp-print-page"), await new Promise((I, S) => {
|
|
360
360
|
l.toBlob((x) => {
|
|
361
361
|
x ? (v.src = URL.createObjectURL(x), v.onload = () => {
|
|
362
362
|
URL.revokeObjectURL(v.src), I();
|
|
363
363
|
}, v.onerror = S) : S(new Error("Failed to create blob"));
|
|
364
364
|
});
|
|
365
365
|
}).catch(() => {
|
|
366
|
-
}),
|
|
366
|
+
}), _.appendChild(v), _;
|
|
367
367
|
}, h = (l, v) => {
|
|
368
|
-
const
|
|
369
|
-
|
|
368
|
+
const _ = document.createElement("div");
|
|
369
|
+
_.classList.add("rp-print-zone");
|
|
370
370
|
const I = document.createElement("style"), S = v.get(1);
|
|
371
371
|
if (S) {
|
|
372
372
|
const { width: x, height: R } = S == null ? void 0 : S.page.getViewport({ scale: 1 });
|
|
373
373
|
I.innerHTML = `@page { size: ${x}px ${R}px }`;
|
|
374
374
|
}
|
|
375
|
-
return
|
|
375
|
+
return _.appendChild(I), _.append(...l), _;
|
|
376
376
|
}, p = N(
|
|
377
377
|
async (l) => {
|
|
378
378
|
if (!t)
|
|
379
379
|
return;
|
|
380
|
-
|
|
380
|
+
b();
|
|
381
381
|
const v = l && "visibleDefaultProgress" in l ? l : void 0;
|
|
382
382
|
(v == null ? void 0 : v.visibleDefaultProgress) !== void 0 ? C(v.visibleDefaultProgress) : C(!0);
|
|
383
|
-
const
|
|
383
|
+
const _ = document.createElement("canvas"), I = [];
|
|
384
384
|
try {
|
|
385
385
|
t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
386
386
|
const x = t.getOptionalContentConfig({ intent: "print" }), R = Promise.resolve(
|
|
@@ -388,12 +388,12 @@ const yn = () => {
|
|
|
388
388
|
), O = e.size;
|
|
389
389
|
for (const [z, E] of e) {
|
|
390
390
|
if (u.current) {
|
|
391
|
-
|
|
391
|
+
b();
|
|
392
392
|
return;
|
|
393
393
|
}
|
|
394
394
|
const L = E.page.getViewport({ scale: 1 });
|
|
395
395
|
if (await y({
|
|
396
|
-
scratchCanvas:
|
|
396
|
+
scratchCanvas: _,
|
|
397
397
|
pdfDocument: t,
|
|
398
398
|
pageNumber: z,
|
|
399
399
|
viewerPdfPage: L,
|
|
@@ -401,20 +401,20 @@ const yn = () => {
|
|
|
401
401
|
optionalContentConfigPromise: x,
|
|
402
402
|
printAnnotationStoragePromise: R
|
|
403
403
|
}), u.current) {
|
|
404
|
-
|
|
404
|
+
b();
|
|
405
405
|
return;
|
|
406
406
|
}
|
|
407
|
-
const F = await g(
|
|
407
|
+
const F = await g(_);
|
|
408
408
|
I.push(F);
|
|
409
409
|
const G = parseFloat((I.length / O * 100).toFixed(2));
|
|
410
|
-
|
|
410
|
+
r({
|
|
411
411
|
loadedPages: z,
|
|
412
412
|
totalPages: O,
|
|
413
413
|
percentage: G
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
416
|
if (u.current) {
|
|
417
|
-
|
|
417
|
+
b();
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
420
420
|
const D = h(I, e);
|
|
@@ -422,23 +422,23 @@ const yn = () => {
|
|
|
422
422
|
} catch (S) {
|
|
423
423
|
d(!0), S instanceof Error && f(S);
|
|
424
424
|
} finally {
|
|
425
|
-
|
|
425
|
+
_.height = 0, _.width = 0;
|
|
426
426
|
}
|
|
427
427
|
},
|
|
428
|
-
[t, e, u,
|
|
428
|
+
[t, e, u, b, h, w]
|
|
429
429
|
);
|
|
430
430
|
return A(() => {
|
|
431
431
|
const l = () => {
|
|
432
|
-
|
|
432
|
+
b(), T();
|
|
433
433
|
};
|
|
434
434
|
return window.addEventListener("afterprint", l, !0), () => {
|
|
435
435
|
window.removeEventListener("afterprint", l, !0);
|
|
436
436
|
};
|
|
437
|
-
}, [T,
|
|
437
|
+
}, [T, b]), {
|
|
438
438
|
print: p,
|
|
439
439
|
cancel: P,
|
|
440
440
|
progress: n,
|
|
441
|
-
isComplete:
|
|
441
|
+
isComplete: o,
|
|
442
442
|
isError: c,
|
|
443
443
|
error: s,
|
|
444
444
|
showDefaultProgress: m
|
|
@@ -460,20 +460,20 @@ const yn = () => {
|
|
|
460
460
|
console.error("Error in setOnError callback:", e);
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
}),
|
|
464
|
-
const [e, n] = H(null), [
|
|
465
|
-
w && typeof w == "function" &&
|
|
463
|
+
}), _c = ({ children: t }) => {
|
|
464
|
+
const [e, n] = H(null), [r, o] = H(null), { print: a, cancel: c, progress: d, isComplete: s, isError: f, error: m, showDefaultProgress: C } = Vr(), u = N((w) => {
|
|
465
|
+
w && typeof w == "function" && o(() => w);
|
|
466
466
|
}, []), T = (w) => {
|
|
467
467
|
m && w(m);
|
|
468
|
-
},
|
|
468
|
+
}, b = N(
|
|
469
469
|
(w) => {
|
|
470
470
|
n(() => w);
|
|
471
471
|
},
|
|
472
472
|
[d, e]
|
|
473
473
|
);
|
|
474
474
|
A(() => {
|
|
475
|
-
s &&
|
|
476
|
-
}, [s,
|
|
475
|
+
s && r && P();
|
|
476
|
+
}, [s, r]), A(() => {
|
|
477
477
|
f && T((w) => {
|
|
478
478
|
console.error(w);
|
|
479
479
|
});
|
|
@@ -481,11 +481,11 @@ const yn = () => {
|
|
|
481
481
|
d && e && e(d);
|
|
482
482
|
}, [d, e]);
|
|
483
483
|
const P = () => {
|
|
484
|
-
|
|
484
|
+
r && (r(), o(null));
|
|
485
485
|
}, y = {
|
|
486
486
|
print: a,
|
|
487
487
|
cancel: c,
|
|
488
|
-
setOnProgress:
|
|
488
|
+
setOnProgress: b,
|
|
489
489
|
setOnComplete: u,
|
|
490
490
|
setOnError: T,
|
|
491
491
|
progress: d,
|
|
@@ -493,17 +493,17 @@ const yn = () => {
|
|
|
493
493
|
};
|
|
494
494
|
return /* @__PURE__ */ i(xn.Provider, { value: y, children: t });
|
|
495
495
|
}, st = () => {
|
|
496
|
-
const t =
|
|
496
|
+
const t = Ze(xn);
|
|
497
497
|
if (!t)
|
|
498
498
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
499
499
|
return t;
|
|
500
|
-
},
|
|
501
|
-
const [t, e] = H({}), { pages: n } =
|
|
500
|
+
}, qr = () => {
|
|
501
|
+
const [t, e] = H({}), { pages: n } = re(), r = W(() => Object.keys(t).length, [t]), o = N(
|
|
502
502
|
(c) => {
|
|
503
503
|
if (!n.size)
|
|
504
504
|
return;
|
|
505
505
|
const d = c > n.size ? n.size : c, f = Array.from(n.values()).slice(0, d).map((m) => {
|
|
506
|
-
const { thumbnailViewport: C, scale: u } =
|
|
506
|
+
const { thumbnailViewport: C, scale: u } = gr(m.page, m.defaultRotation);
|
|
507
507
|
return {
|
|
508
508
|
scale: u,
|
|
509
509
|
page: m.page,
|
|
@@ -517,8 +517,8 @@ const yn = () => {
|
|
|
517
517
|
[n]
|
|
518
518
|
);
|
|
519
519
|
A(() => {
|
|
520
|
-
|
|
521
|
-
}, [
|
|
520
|
+
o(10);
|
|
521
|
+
}, [o]);
|
|
522
522
|
const a = N(
|
|
523
523
|
(c) => {
|
|
524
524
|
if (!n)
|
|
@@ -537,7 +537,7 @@ const yn = () => {
|
|
|
537
537
|
},
|
|
538
538
|
[n]
|
|
539
539
|
);
|
|
540
|
-
return { thumbnailPages: t, addPage: a, addToPage:
|
|
540
|
+
return { thumbnailPages: t, addPage: a, addToPage: o, thumbnailLength: r };
|
|
541
541
|
}, Sn = Be({
|
|
542
542
|
thumbnailPages: {},
|
|
543
543
|
addPage: (t) => {
|
|
@@ -548,20 +548,20 @@ const yn = () => {
|
|
|
548
548
|
setActive: (t) => {
|
|
549
549
|
},
|
|
550
550
|
active: !1
|
|
551
|
-
}), Rn = () =>
|
|
551
|
+
}), Rn = () => Ze(Sn), Pc = ({
|
|
552
552
|
children: t,
|
|
553
553
|
initialThumbnailsVisible: e
|
|
554
554
|
}) => {
|
|
555
|
-
const { thumbnailPages: n, addPage:
|
|
555
|
+
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } = qr(), [c, d] = H(e);
|
|
556
556
|
return /* @__PURE__ */ i(
|
|
557
557
|
Sn.Provider,
|
|
558
558
|
{
|
|
559
|
-
value: { thumbnailPages: n, addPage:
|
|
559
|
+
value: { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a, active: c, setActive: d },
|
|
560
560
|
children: t
|
|
561
561
|
}
|
|
562
562
|
);
|
|
563
|
-
},
|
|
564
|
-
const [n,
|
|
563
|
+
}, Br = (t = {}, e = "") => {
|
|
564
|
+
const [n, r] = H(e), [o, a] = H(!1), { pdf: c, pages: d } = re(), { widths: s, heights: f } = je(), m = M(!n), { currentZoom: C } = ot(), [u, T] = H([]), { setFocusedPage: b } = ce(), { columnCount: P } = He(), { pageRotate: y } = it(), [w, g] = H(0), { pageScrollElementRef: h, virtualScrollableElementRef: p } = rt(), { scrollMode: l } = Ae(), { pagesRef: v } = Te(), _ = M({}), I = M(0), S = W(() => w === 0 ? null : u[w - 1], [w, u]), x = W(() => u.length, [u]), R = N(
|
|
565
565
|
(E) => {
|
|
566
566
|
if (E === 0)
|
|
567
567
|
return;
|
|
@@ -572,24 +572,24 @@ const yn = () => {
|
|
|
572
572
|
if (!F || !v)
|
|
573
573
|
return;
|
|
574
574
|
const G = d.get(L.page);
|
|
575
|
-
if (l === ie.PAGE_SCROLLING &&
|
|
575
|
+
if (l === ie.PAGE_SCROLLING && b(L.page), !G)
|
|
576
576
|
return;
|
|
577
|
-
let
|
|
577
|
+
let U = 0, V = 0;
|
|
578
578
|
if (l === ie.VERTICAL_SCROLLING) {
|
|
579
579
|
const ee = L.page - 1, Y = P, we = ee % Y, me = Math.floor(ee / Y);
|
|
580
|
-
|
|
580
|
+
U = ke(f, me), V = ke(s, we);
|
|
581
581
|
}
|
|
582
|
-
l === ie.HORIZONTAL_SCROLLING && (
|
|
582
|
+
l === ie.HORIZONTAL_SCROLLING && (V = s.slice(0, L.page - 1).reduce((ee, Y) => ee + Y, 0));
|
|
583
583
|
const B = {
|
|
584
584
|
height: f[L.page - 1],
|
|
585
585
|
width: s[L.page - 1]
|
|
586
|
-
},
|
|
586
|
+
}, Z = y[L.page], { leftInPage: ae, topInPage: $ } = mr(
|
|
587
587
|
B,
|
|
588
588
|
v,
|
|
589
589
|
L.rect,
|
|
590
590
|
C,
|
|
591
|
-
|
|
592
|
-
), Q =
|
|
591
|
+
Z
|
|
592
|
+
), Q = V + ae, J = U + $, te = {
|
|
593
593
|
left: Math.max(Q, 0),
|
|
594
594
|
top: Math.max(J, 0)
|
|
595
595
|
};
|
|
@@ -600,7 +600,7 @@ const yn = () => {
|
|
|
600
600
|
},
|
|
601
601
|
[
|
|
602
602
|
d,
|
|
603
|
-
|
|
603
|
+
b,
|
|
604
604
|
s,
|
|
605
605
|
f,
|
|
606
606
|
l,
|
|
@@ -630,8 +630,8 @@ const yn = () => {
|
|
|
630
630
|
for (let G = 1; G <= L; G++) {
|
|
631
631
|
if (m.current)
|
|
632
632
|
throw "close pop over";
|
|
633
|
-
const
|
|
634
|
-
F[G.toString()] = await
|
|
633
|
+
const U = await E.getPage(G);
|
|
634
|
+
F[G.toString()] = await U.getTextContent();
|
|
635
635
|
}
|
|
636
636
|
return F;
|
|
637
637
|
}, []);
|
|
@@ -641,15 +641,15 @@ const yn = () => {
|
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
643
|
m.current = !1, a(!0), T([]), g(0), z(c).then((E) => {
|
|
644
|
-
|
|
645
|
-
const F = Object.keys(E).reduce((G,
|
|
646
|
-
const
|
|
644
|
+
_.current = E;
|
|
645
|
+
const F = Object.keys(E).reduce((G, U) => {
|
|
646
|
+
const V = Co(
|
|
647
647
|
[n],
|
|
648
|
-
E[
|
|
649
|
-
Number(
|
|
648
|
+
E[U],
|
|
649
|
+
Number(U) - 1,
|
|
650
650
|
t
|
|
651
|
-
).map((B,
|
|
652
|
-
return [...G, ...
|
|
651
|
+
).map((B, Z) => ({ ...B, page: Number(U), pageMatchIdx: Z }));
|
|
652
|
+
return [...G, ...V];
|
|
653
653
|
}, []);
|
|
654
654
|
T(F), g(F.length ? 1 : 0);
|
|
655
655
|
}).catch(() => {
|
|
@@ -657,8 +657,8 @@ const yn = () => {
|
|
|
657
657
|
}).finally(() => a(!1));
|
|
658
658
|
}, [n, z, c, t]), {
|
|
659
659
|
search: n,
|
|
660
|
-
setSearch:
|
|
661
|
-
loading:
|
|
660
|
+
setSearch: r,
|
|
661
|
+
loading: o,
|
|
662
662
|
matches: u,
|
|
663
663
|
totalMatches: x,
|
|
664
664
|
currentMatchPosition: w,
|
|
@@ -687,8 +687,8 @@ const yn = () => {
|
|
|
687
687
|
children: t,
|
|
688
688
|
initialSearch: e
|
|
689
689
|
}) => {
|
|
690
|
-
const [n,
|
|
691
|
-
loading:
|
|
690
|
+
const [n, r] = H({}), {
|
|
691
|
+
loading: o,
|
|
692
692
|
setSearch: a,
|
|
693
693
|
totalMatches: c,
|
|
694
694
|
currentMatchPosition: d,
|
|
@@ -698,14 +698,14 @@ const yn = () => {
|
|
|
698
698
|
nextMatch: C,
|
|
699
699
|
prevMatch: u,
|
|
700
700
|
setCurrentMatchPosition: T
|
|
701
|
-
} =
|
|
701
|
+
} = Br(n, e);
|
|
702
702
|
return /* @__PURE__ */ i(
|
|
703
703
|
Ln.Provider,
|
|
704
704
|
{
|
|
705
705
|
value: {
|
|
706
706
|
searchOptions: n,
|
|
707
|
-
setSearchOptions:
|
|
708
|
-
loading:
|
|
707
|
+
setSearchOptions: r,
|
|
708
|
+
loading: o,
|
|
709
709
|
setSearch: a,
|
|
710
710
|
totalMatches: c,
|
|
711
711
|
currentMatchPosition: d,
|
|
@@ -719,10 +719,10 @@ const yn = () => {
|
|
|
719
719
|
children: t
|
|
720
720
|
}
|
|
721
721
|
);
|
|
722
|
-
}, At = () =>
|
|
723
|
-
const e = M(!1), [n,
|
|
724
|
-
|
|
725
|
-
}, []), a = W(() => new
|
|
722
|
+
}, At = () => Ze(Ln), En = Be(null), Cc = ({ children: t }) => {
|
|
723
|
+
const e = M(!1), [n, r] = H([]), o = N((s) => {
|
|
724
|
+
r((f) => [...f, { id: s.page.pageNumber.toString(), data: s, priority: 0 }]);
|
|
725
|
+
}, []), a = W(() => new Lo(o), [o]), { focusedPage: c } = ce(), d = N((s) => (e.current = !0, Eo(
|
|
726
726
|
s.data.page,
|
|
727
727
|
s.data.canvasElem,
|
|
728
728
|
s.data.options
|
|
@@ -740,12 +740,12 @@ const yn = () => {
|
|
|
740
740
|
const f = a.dequeue();
|
|
741
741
|
f ? d(f).finally(() => {
|
|
742
742
|
s();
|
|
743
|
-
}) : (e.current = !1,
|
|
743
|
+
}) : (e.current = !1, r(a.peekAll()));
|
|
744
744
|
};
|
|
745
745
|
s();
|
|
746
746
|
}, [a, d, n]), /* @__PURE__ */ i(En.Provider, { value: a, children: t });
|
|
747
747
|
}, Nn = () => {
|
|
748
|
-
const t =
|
|
748
|
+
const t = Ze(En);
|
|
749
749
|
if (!t)
|
|
750
750
|
throw new Error("RenderQueue not found");
|
|
751
751
|
return t;
|
|
@@ -764,17 +764,17 @@ const yn = () => {
|
|
|
764
764
|
"rp-page-wrapper": "_rp-page-wrapper_ii91u_1",
|
|
765
765
|
"rp-page": "_rp-page_ii91u_1",
|
|
766
766
|
"rp-loader-wrapper": "_rp-loader-wrapper_ii91u_15"
|
|
767
|
-
},
|
|
768
|
-
const { pageNumber: e, onLoaded: n, onLoading:
|
|
767
|
+
}, Zr = (t) => {
|
|
768
|
+
const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = M(null), { pages: a } = re(), { pageRotate: c } = it(), d = M(), { currentZoom: s } = ot(), { interactiveForm: f } = xt(), m = Nn(), C = M(`page-${e}`);
|
|
769
769
|
return A(() => {
|
|
770
770
|
if (!a || s === 0)
|
|
771
771
|
return;
|
|
772
772
|
const u = a.get(e);
|
|
773
|
-
if (
|
|
774
|
-
const T =
|
|
773
|
+
if (o.current && u) {
|
|
774
|
+
const T = o.current;
|
|
775
775
|
T.hidden = !0;
|
|
776
|
-
const
|
|
777
|
-
|
|
776
|
+
const b = d.current;
|
|
777
|
+
b && b.cancel(), r && r(), m.enqueue(
|
|
778
778
|
C.current,
|
|
779
779
|
{
|
|
780
780
|
page: u.page,
|
|
@@ -793,58 +793,58 @@ const yn = () => {
|
|
|
793
793
|
return () => {
|
|
794
794
|
m.removeQueue(C.current);
|
|
795
795
|
};
|
|
796
|
-
}, [a, e, c, s,
|
|
797
|
-
},
|
|
796
|
+
}, [a, e, c, s, r, n, m, f]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
|
|
797
|
+
}, jr = "_selecting_1oep2_10", Kr = "_markedContent_1oep2_33", _e = {
|
|
798
798
|
"rp-text-layer": "_rp-text-layer_1oep2_1",
|
|
799
|
-
selecting:
|
|
800
|
-
markedContent:
|
|
799
|
+
selecting: jr,
|
|
800
|
+
markedContent: Kr,
|
|
801
801
|
"rp-text-layer-text": "_rp-text-layer-text_1oep2_52"
|
|
802
|
-
},
|
|
803
|
-
const { pageNumber: e } = t, { pages: n } =
|
|
802
|
+
}, Xr = (t) => {
|
|
803
|
+
const { pageNumber: e } = t, { pages: n } = re(), r = M(null), { matches: o, currentMatch: a } = At(), [c, d] = H(
|
|
804
804
|
[]
|
|
805
|
-
), s = M(), f = M(), m = M([]), C = W(() =>
|
|
805
|
+
), s = M(), f = M(), m = M([]), C = W(() => o.filter((g) => g.pageIndex === e - 1), [o, e]), u = N(
|
|
806
806
|
(g, h, p = !1) => {
|
|
807
|
-
if (p &&
|
|
807
|
+
if (p && yo(g, h), !C.length) {
|
|
808
808
|
m.current = [], d([]);
|
|
809
809
|
return;
|
|
810
810
|
}
|
|
811
|
-
const l =
|
|
811
|
+
const l = Io(C, g, h);
|
|
812
812
|
d(l);
|
|
813
813
|
},
|
|
814
814
|
[C]
|
|
815
|
-
), T = M(),
|
|
815
|
+
), T = M(), b = M(!1), P = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
816
816
|
A(() => ((() => {
|
|
817
817
|
if (T.current)
|
|
818
818
|
return;
|
|
819
819
|
T.current = new AbortController();
|
|
820
820
|
const { signal: h } = T.current, p = () => {
|
|
821
821
|
P().forEach((v) => {
|
|
822
|
-
const
|
|
823
|
-
|
|
822
|
+
const _ = v.querySelector(".endOfContent");
|
|
823
|
+
_ && (v.appendChild(_), _.style.width = "", _.style.height = "", v.classList.remove(_e.selecting));
|
|
824
824
|
});
|
|
825
825
|
};
|
|
826
826
|
document.addEventListener(
|
|
827
827
|
"pointerdown",
|
|
828
828
|
() => {
|
|
829
|
-
|
|
829
|
+
b.current = !0;
|
|
830
830
|
},
|
|
831
831
|
{ signal: h }
|
|
832
832
|
), document.addEventListener(
|
|
833
833
|
"pointerup",
|
|
834
834
|
() => {
|
|
835
|
-
|
|
835
|
+
b.current = !1, p();
|
|
836
836
|
},
|
|
837
837
|
{ signal: h }
|
|
838
838
|
), window.addEventListener(
|
|
839
839
|
"blur",
|
|
840
840
|
() => {
|
|
841
|
-
|
|
841
|
+
b.current = !1, p();
|
|
842
842
|
},
|
|
843
843
|
{ signal: h }
|
|
844
844
|
), document.addEventListener(
|
|
845
845
|
"keyup",
|
|
846
846
|
() => {
|
|
847
|
-
|
|
847
|
+
b.current || p();
|
|
848
848
|
},
|
|
849
849
|
{ signal: h }
|
|
850
850
|
);
|
|
@@ -860,26 +860,26 @@ const yn = () => {
|
|
|
860
860
|
p();
|
|
861
861
|
return;
|
|
862
862
|
}
|
|
863
|
-
const
|
|
863
|
+
const _ = /* @__PURE__ */ new Set();
|
|
864
864
|
for (let E = 0; E < v.rangeCount; E++) {
|
|
865
865
|
const L = v.getRangeAt(E);
|
|
866
866
|
P().forEach((F) => {
|
|
867
|
-
L.intersectsNode(F) && !
|
|
867
|
+
L.intersectsNode(F) && !_.has(F) && _.add(F);
|
|
868
868
|
});
|
|
869
869
|
}
|
|
870
870
|
P().forEach((E) => {
|
|
871
|
-
if (
|
|
872
|
-
E.classList.add(
|
|
871
|
+
if (_.has(E))
|
|
872
|
+
E.classList.add(_e.selecting);
|
|
873
873
|
else {
|
|
874
874
|
const L = E.querySelector(".endOfContent");
|
|
875
|
-
L && (E.appendChild(L), L.style.width = "", L.style.height = "", E.classList.remove(
|
|
875
|
+
L && (E.appendChild(L), L.style.width = "", L.style.height = "", E.classList.remove(_e.selecting));
|
|
876
876
|
}
|
|
877
877
|
});
|
|
878
878
|
const I = v.getRangeAt(0);
|
|
879
879
|
let x = l && (I.compareBoundaryPoints(Range.END_TO_END, l) === 0 || I.compareBoundaryPoints(Range.START_TO_END, l) === 0) ? I.startContainer : I.endContainer;
|
|
880
880
|
x.nodeType === Node.TEXT_NODE && (x = x.parentNode);
|
|
881
881
|
const R = (D = x.parentElement) == null ? void 0 : D.closest(
|
|
882
|
-
|
|
882
|
+
_e["rp-text-layer"]
|
|
883
883
|
), O = R == null ? void 0 : R.querySelector(".endOfContent");
|
|
884
884
|
O && R && (O.style.width = R.style.width, O.style.height = R.style.height, (z = x.parentElement) == null || z.insertBefore(O, x.nextSibling)), l = I.cloneRange();
|
|
885
885
|
},
|
|
@@ -890,9 +890,9 @@ const yn = () => {
|
|
|
890
890
|
(h = T.current) == null || h.abort(), T.current = void 0;
|
|
891
891
|
}), [P]);
|
|
892
892
|
const y = N(() => {
|
|
893
|
-
|
|
893
|
+
r.current && r.current.classList.add(_e.selecting);
|
|
894
894
|
}, []), w = N(() => {
|
|
895
|
-
|
|
895
|
+
r.current && r.current.classList.remove(_e.selecting);
|
|
896
896
|
}, []);
|
|
897
897
|
return A(() => {
|
|
898
898
|
if (m.current.forEach((p) => {
|
|
@@ -910,25 +910,25 @@ const yn = () => {
|
|
|
910
910
|
}));
|
|
911
911
|
}, [a, c, C]), A(() => {
|
|
912
912
|
const g = n.get(e);
|
|
913
|
-
if (!g || !
|
|
913
|
+
if (!g || !r.current)
|
|
914
914
|
return;
|
|
915
|
-
const h =
|
|
915
|
+
const h = r.current;
|
|
916
916
|
return s.current && s.current.cancel(), g.page.getTextContent().then((p) => {
|
|
917
917
|
const l = g.page.getViewport({ scale: 1 });
|
|
918
|
-
return s.current = new
|
|
918
|
+
return s.current = new zo.TextLayer({
|
|
919
919
|
viewport: l,
|
|
920
920
|
textContentSource: p,
|
|
921
921
|
container: h
|
|
922
922
|
}), f.current = p, h && (h.innerText = ""), s.current.render();
|
|
923
923
|
}).then(() => {
|
|
924
|
-
var
|
|
924
|
+
var _, I;
|
|
925
925
|
[].slice.call(h.children).forEach((S) => {
|
|
926
|
-
S.classList.add(
|
|
926
|
+
S.classList.add(_e["rp-text-layer-text"]), S.setAttribute("data-rp", "rp-text-layer-text");
|
|
927
927
|
});
|
|
928
|
-
const l = (
|
|
928
|
+
const l = (_ = s.current) == null ? void 0 : _.textDivs;
|
|
929
929
|
l && f.current && u(f.current, l);
|
|
930
930
|
const v = document.createElement("div");
|
|
931
|
-
v.className = "endOfContent", (I =
|
|
931
|
+
v.className = "endOfContent", (I = r.current) == null || I.appendChild(v);
|
|
932
932
|
}).catch(() => {
|
|
933
933
|
}), () => {
|
|
934
934
|
var p;
|
|
@@ -936,8 +936,8 @@ const yn = () => {
|
|
|
936
936
|
};
|
|
937
937
|
}, [n, e]), A(() => {
|
|
938
938
|
var p;
|
|
939
|
-
[].slice.call(
|
|
940
|
-
l.classList.add(
|
|
939
|
+
[].slice.call(r.current.children).forEach((l) => {
|
|
940
|
+
l.classList.add(_e["rp-text-layer-text"]);
|
|
941
941
|
});
|
|
942
942
|
const h = (p = s.current) == null ? void 0 : p.textDivs;
|
|
943
943
|
h && f.current && u(f.current, h, !0);
|
|
@@ -946,38 +946,38 @@ const yn = () => {
|
|
|
946
946
|
{
|
|
947
947
|
"data-rp-text-layer": !0,
|
|
948
948
|
"data-rp": `page-${e}-textLayer`,
|
|
949
|
-
className:
|
|
950
|
-
ref:
|
|
949
|
+
className: _e["rp-text-layer"],
|
|
950
|
+
ref: r,
|
|
951
951
|
onMouseDown: y,
|
|
952
952
|
onMouseUp: w
|
|
953
953
|
}
|
|
954
954
|
);
|
|
955
|
-
},
|
|
955
|
+
}, Qr = {
|
|
956
956
|
"rp-annotation-layer": "_rp-annotation-layer_1udza_1"
|
|
957
957
|
};
|
|
958
|
-
let
|
|
959
|
-
const
|
|
960
|
-
const { pageNumber: e } = t, n = M(null), { pages:
|
|
958
|
+
let Yr = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
959
|
+
const Jr = (t) => {
|
|
960
|
+
const { pageNumber: e } = t, n = M(null), { pages: r, pdf: o } = re(), { interactiveForm: a } = xt(), c = M(), [d, s] = H(), { goToPage: f } = ce(), { scrollMode: m } = Ae(), { print: C } = st(), { download: u } = Xn(), T = M(null), b = W(() => r.get(e), [r, e]), P = W(() => b == null ? void 0 : b.page.getViewport(), [b]);
|
|
961
961
|
A(() => {
|
|
962
962
|
c.current && (c.current.div.replaceChildren(), c.current = void 0);
|
|
963
|
-
}, [
|
|
964
|
-
|
|
963
|
+
}, [o]), A(() => {
|
|
964
|
+
b && b.page.getAnnotations().then((w) => {
|
|
965
965
|
c.current = void 0, s(w), n.current && (n.current.innerText = "");
|
|
966
966
|
});
|
|
967
|
-
}, [
|
|
967
|
+
}, [b]);
|
|
968
968
|
const y = N(
|
|
969
969
|
(w) => {
|
|
970
|
-
!d || !
|
|
970
|
+
!d || !o || (Jo(w), er(w, o, d).then((g) => {
|
|
971
971
|
var h, p;
|
|
972
972
|
((h = g == null ? void 0 : g.data) == null ? void 0 : h.action) === "Print" ? C() : ((p = g == null ? void 0 : g.data) == null ? void 0 : p.action) === "SaveAs" && u();
|
|
973
973
|
}));
|
|
974
974
|
},
|
|
975
|
-
[
|
|
975
|
+
[o, d, m, C, u]
|
|
976
976
|
);
|
|
977
977
|
return A(() => {
|
|
978
|
-
if (!
|
|
978
|
+
if (!b || !d)
|
|
979
979
|
return;
|
|
980
|
-
const w =
|
|
980
|
+
const w = b.page.getViewport();
|
|
981
981
|
if (c.current) {
|
|
982
982
|
c.current.update({
|
|
983
983
|
viewport: w.clone({ dontFlip: !0 })
|
|
@@ -989,45 +989,45 @@ const Jo = (t) => {
|
|
|
989
989
|
const { annotationType: v } = l;
|
|
990
990
|
switch (v) {
|
|
991
991
|
case $t.Link:
|
|
992
|
-
|
|
992
|
+
nr(l);
|
|
993
993
|
break;
|
|
994
994
|
case $t.Widget:
|
|
995
|
-
|
|
995
|
+
tr(l, w, g);
|
|
996
996
|
break;
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
const h = new AbortController();
|
|
1000
1000
|
return (async () => {
|
|
1001
|
-
var
|
|
1002
|
-
c.current && (c.current.div.replaceChildren(), c.current = void 0), n.current && (n.current.innerText = ""), c.current = new
|
|
1001
|
+
var _;
|
|
1002
|
+
c.current && (c.current.div.replaceChildren(), c.current = void 0), n.current && (n.current.innerText = ""), c.current = new Mo({
|
|
1003
1003
|
div: n.current,
|
|
1004
1004
|
accessibilityManager: void 0,
|
|
1005
1005
|
annotationCanvasMap: void 0,
|
|
1006
1006
|
annotationEditorUIManager: void 0,
|
|
1007
1007
|
structTreeLayer: null,
|
|
1008
|
-
page:
|
|
1008
|
+
page: b.page,
|
|
1009
1009
|
viewport: w.clone({ dontFlip: !0 })
|
|
1010
1010
|
}), n.current && Kt(n.current, y);
|
|
1011
|
-
const l = await (
|
|
1011
|
+
const l = await (o == null ? void 0 : o.hasJSActions()), v = await (o == null ? void 0 : o.getFieldObjects());
|
|
1012
1012
|
if (h.signal.aborted)
|
|
1013
1013
|
throw "abort";
|
|
1014
|
-
return (
|
|
1014
|
+
return (_ = c.current) == null ? void 0 : _.render({
|
|
1015
1015
|
annotations: d,
|
|
1016
|
-
annotationStorage:
|
|
1016
|
+
annotationStorage: o == null ? void 0 : o.annotationStorage,
|
|
1017
1017
|
hasJSActions: l,
|
|
1018
1018
|
fieldObjects: v,
|
|
1019
1019
|
div: n.current,
|
|
1020
1020
|
viewport: w.clone({ dontFlip: !0 }),
|
|
1021
|
-
page:
|
|
1022
|
-
imageResourcesPath:
|
|
1021
|
+
page: b.page,
|
|
1022
|
+
imageResourcesPath: Yr,
|
|
1023
1023
|
renderForms: a ?? !0,
|
|
1024
|
-
linkService: new
|
|
1024
|
+
linkService: new Yo(o, f),
|
|
1025
1025
|
downloadManager: null,
|
|
1026
1026
|
enableScripting: !1
|
|
1027
1027
|
});
|
|
1028
1028
|
})().then(() => {
|
|
1029
|
-
n.current && (
|
|
1030
|
-
n.current && (
|
|
1029
|
+
n.current && (or(n.current, y), Zt(n.current), jt(n.current), T.current && T.current.disconnect(), T.current = new MutationObserver(() => {
|
|
1030
|
+
n.current && (Zt(n.current), jt(n.current));
|
|
1031
1031
|
}), T.current.observe(n.current, {
|
|
1032
1032
|
childList: !0,
|
|
1033
1033
|
subtree: !0,
|
|
@@ -1042,34 +1042,34 @@ const Jo = (t) => {
|
|
|
1042
1042
|
}), () => {
|
|
1043
1043
|
h.abort("clear"), n.current && Kt(n.current, y), T.current && (T.current.disconnect(), T.current = null);
|
|
1044
1044
|
};
|
|
1045
|
-
}, [
|
|
1045
|
+
}, [o, d, y, f]), /* @__PURE__ */ i(
|
|
1046
1046
|
"div",
|
|
1047
1047
|
{
|
|
1048
1048
|
"data-rp": `page-${e}-annotationLayer`,
|
|
1049
1049
|
style: { width: `${P == null ? void 0 : P.width}px`, height: `${P == null ? void 0 : P.height}px` },
|
|
1050
|
-
className:
|
|
1050
|
+
className: Qr["rp-annotation-layer"],
|
|
1051
1051
|
ref: n
|
|
1052
1052
|
}
|
|
1053
1053
|
);
|
|
1054
1054
|
}, ei = {
|
|
1055
1055
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1056
1056
|
}, ti = ({ pageNumber: t, viewport: e }) => {
|
|
1057
|
-
const [n,
|
|
1057
|
+
const [n, r] = H(), { pages: o } = re(), { highlightKeywords: a } = So(), c = !0, d = M(null), [s, f] = H(null), [m, C] = H([]);
|
|
1058
1058
|
A(() => {
|
|
1059
1059
|
d.current && f(d.current.parentElement);
|
|
1060
1060
|
}, [d]), A(() => {
|
|
1061
1061
|
(async () => {
|
|
1062
|
-
const h =
|
|
1062
|
+
const h = o.get(t);
|
|
1063
1063
|
if (!h || !d.current)
|
|
1064
1064
|
return;
|
|
1065
1065
|
const p = await h.page.getTextContent();
|
|
1066
|
-
|
|
1066
|
+
r(p);
|
|
1067
1067
|
})();
|
|
1068
|
-
}, [
|
|
1068
|
+
}, [o, t]);
|
|
1069
1069
|
const u = W(() => a ? a.map((g) => {
|
|
1070
1070
|
var h, p;
|
|
1071
1071
|
return {
|
|
1072
|
-
...
|
|
1072
|
+
...rr(g.keyword, (h = g.options) == null ? void 0 : h.matchCase, (p = g.options) == null ? void 0 : p.wholeWords),
|
|
1073
1073
|
color: g.highlightColor
|
|
1074
1074
|
};
|
|
1075
1075
|
}) : [], [a]);
|
|
@@ -1089,7 +1089,7 @@ const Jo = (t) => {
|
|
|
1089
1089
|
}).observe(g, { childList: !0, subtree: !0 });
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function b(g) {
|
|
1093
1093
|
return new Promise((h) => {
|
|
1094
1094
|
const p = g.querySelectorAll(
|
|
1095
1095
|
'[data-rp="rp-text-layer-text"]'
|
|
@@ -1098,32 +1098,32 @@ const Jo = (t) => {
|
|
|
1098
1098
|
h(Array.from(p));
|
|
1099
1099
|
return;
|
|
1100
1100
|
}
|
|
1101
|
-
new MutationObserver((v,
|
|
1101
|
+
new MutationObserver((v, _) => {
|
|
1102
1102
|
const I = g.querySelectorAll(
|
|
1103
1103
|
".rp-text-layer-text"
|
|
1104
1104
|
);
|
|
1105
|
-
I.length && (h(Array.from(I)),
|
|
1105
|
+
I.length && (h(Array.from(I)), _.disconnect());
|
|
1106
1106
|
}).observe(g, { childList: !0, subtree: !0 });
|
|
1107
1107
|
});
|
|
1108
1108
|
}
|
|
1109
1109
|
const P = (g, h, p, l) => {
|
|
1110
|
-
var
|
|
1111
|
-
const v = document.createRange(),
|
|
1112
|
-
if (!
|
|
1110
|
+
var V;
|
|
1111
|
+
const v = document.createRange(), _ = p.firstChild;
|
|
1112
|
+
if (!_ || _.nodeType !== Node.TEXT_NODE)
|
|
1113
1113
|
return null;
|
|
1114
|
-
const I = ((
|
|
1114
|
+
const I = ((V = _.textContent) == null ? void 0 : V.length) ?? 0, S = l[0].charIdxInSpan, x = l.length === 1 ? S : l[l.length - 1].charIdxInSpan;
|
|
1115
1115
|
if (S > I || x + 1 > I)
|
|
1116
1116
|
return null;
|
|
1117
|
-
v.setStart(
|
|
1117
|
+
v.setStart(_, S), v.setEnd(_, x + 1);
|
|
1118
1118
|
const R = document.createElement("span");
|
|
1119
1119
|
R.style.width = "auto", v.surroundContents(R);
|
|
1120
|
-
const O = R.getBoundingClientRect(), D = g.getBoundingClientRect(), z = D.height, E = D.width, L = 100 * (O.left - D.left) / E, F = 100 * (O.top - D.top) / z, G = 100 * O.height / z,
|
|
1121
|
-
return
|
|
1120
|
+
const O = R.getBoundingClientRect(), D = g.getBoundingClientRect(), z = D.height, E = D.width, L = 100 * (O.left - D.left) / E, F = 100 * (O.top - D.top) / z, G = 100 * O.height / z, U = 100 * O.width / E;
|
|
1121
|
+
return ar(R), {
|
|
1122
1122
|
keywordStr: h,
|
|
1123
1123
|
left: L,
|
|
1124
1124
|
top: F,
|
|
1125
1125
|
height: G,
|
|
1126
|
-
width:
|
|
1126
|
+
width: U,
|
|
1127
1127
|
pageHeight: z,
|
|
1128
1128
|
pageWidth: E
|
|
1129
1129
|
};
|
|
@@ -1132,7 +1132,7 @@ const Jo = (t) => {
|
|
|
1132
1132
|
const p = await T(s, g);
|
|
1133
1133
|
if (!p)
|
|
1134
1134
|
return;
|
|
1135
|
-
const l = await
|
|
1135
|
+
const l = await b(p);
|
|
1136
1136
|
if (l.length) {
|
|
1137
1137
|
const v = l.map((I) => I.tagName === "BR" ? " " : I.textContent).reduce(
|
|
1138
1138
|
(I, S, x) => I.concat(
|
|
@@ -1149,15 +1149,15 @@ const Jo = (t) => {
|
|
|
1149
1149
|
spanIdx: 0
|
|
1150
1150
|
}
|
|
1151
1151
|
]
|
|
1152
|
-
).slice(1),
|
|
1153
|
-
C(
|
|
1152
|
+
).slice(1), _ = w(p, h, l, v);
|
|
1153
|
+
C(_);
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
1156
|
const w = (g, h, p, l) => {
|
|
1157
1157
|
const v = h.length;
|
|
1158
1158
|
if (!l.length || !v)
|
|
1159
1159
|
return [];
|
|
1160
|
-
const
|
|
1160
|
+
const _ = [], I = l.map((S) => S.char).join("");
|
|
1161
1161
|
return u.forEach((S) => {
|
|
1162
1162
|
const { keyword: x, regExp: R, wholeWords: O, color: D } = S, z = x;
|
|
1163
1163
|
if (!z.trim())
|
|
@@ -1166,38 +1166,38 @@ const Jo = (t) => {
|
|
|
1166
1166
|
let L;
|
|
1167
1167
|
const F = [];
|
|
1168
1168
|
for (; (L = E.exec(I)) !== null; )
|
|
1169
|
-
O && !
|
|
1169
|
+
O && !xo(I, L.index, L[0].length) || F.push({
|
|
1170
1170
|
keyword: E,
|
|
1171
1171
|
startIndex: L.index,
|
|
1172
1172
|
endIndex: E.lastIndex
|
|
1173
1173
|
});
|
|
1174
|
-
const G = F.map((
|
|
1175
|
-
keyword:
|
|
1176
|
-
indexes: l.slice(
|
|
1174
|
+
const G = F.map((U) => ({
|
|
1175
|
+
keyword: U.keyword,
|
|
1176
|
+
indexes: l.slice(U.startIndex, U.endIndex),
|
|
1177
1177
|
color: D
|
|
1178
1178
|
}));
|
|
1179
|
-
for (const
|
|
1180
|
-
const
|
|
1181
|
-
(B,
|
|
1179
|
+
for (const U of G) {
|
|
1180
|
+
const V = U.indexes.reduce(
|
|
1181
|
+
(B, Z) => (B[Z.spanIdx] = (B[Z.spanIdx] || []).concat([Z]), B),
|
|
1182
1182
|
{}
|
|
1183
1183
|
);
|
|
1184
|
-
for (const B of Object.values(
|
|
1184
|
+
for (const B of Object.values(V))
|
|
1185
1185
|
if (B.length !== 1 || B[0].char.trim() !== "") {
|
|
1186
|
-
const
|
|
1186
|
+
const Z = B, ae = p[Z[0].spanIdx], $ = P(
|
|
1187
1187
|
g,
|
|
1188
1188
|
z,
|
|
1189
1189
|
ae,
|
|
1190
|
-
|
|
1190
|
+
Z
|
|
1191
1191
|
);
|
|
1192
1192
|
if ($) {
|
|
1193
1193
|
const { left: Q, top: J } = $;
|
|
1194
|
-
if (
|
|
1194
|
+
if (_.find((ee) => ee.left === Q && ee.top === J))
|
|
1195
1195
|
continue;
|
|
1196
|
-
|
|
1196
|
+
_.push({ ...$, highlightColor: U.color });
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
1200
|
-
}),
|
|
1200
|
+
}), _.sort(ir), _;
|
|
1201
1201
|
};
|
|
1202
1202
|
return A(() => {
|
|
1203
1203
|
(async () => {
|
|
@@ -1225,8 +1225,8 @@ const Jo = (t) => {
|
|
|
1225
1225
|
},
|
|
1226
1226
|
h
|
|
1227
1227
|
)) }) });
|
|
1228
|
-
},
|
|
1229
|
-
const { pageNumber: n, style:
|
|
1228
|
+
}, qe = at((t, e) => {
|
|
1229
|
+
const { pageNumber: n, style: r, ...o } = t, { pages: a } = re(), { pageRotate: c } = it(), { textLayer: d } = _o(), { currentZoom: s } = ot(), { LoaderImageComponent: f } = St(), m = M(a.get(n)), [C, u] = H(!1), T = M(null), [b, P] = H({
|
|
1230
1230
|
width: 0,
|
|
1231
1231
|
height: 0
|
|
1232
1232
|
});
|
|
@@ -1244,14 +1244,14 @@ const Jo = (t) => {
|
|
|
1244
1244
|
const w = W(() => {
|
|
1245
1245
|
switch (y) {
|
|
1246
1246
|
case 90:
|
|
1247
|
-
return `${
|
|
1247
|
+
return `${b.width / 2}px ${b.width / 2}px`;
|
|
1248
1248
|
case -90:
|
|
1249
1249
|
case 270:
|
|
1250
|
-
return `${
|
|
1250
|
+
return `${b.height / 2}px ${b.height / 2}px`;
|
|
1251
1251
|
default:
|
|
1252
1252
|
return "center";
|
|
1253
1253
|
}
|
|
1254
|
-
}, [y,
|
|
1254
|
+
}, [y, b]), g = N(() => {
|
|
1255
1255
|
u(!0);
|
|
1256
1256
|
}, []), h = N(() => {
|
|
1257
1257
|
u(!1);
|
|
@@ -1262,9 +1262,9 @@ const Jo = (t) => {
|
|
|
1262
1262
|
ref: T,
|
|
1263
1263
|
id: `page-${n}`,
|
|
1264
1264
|
"data-rp": `page-${n}`,
|
|
1265
|
-
...
|
|
1265
|
+
...o,
|
|
1266
1266
|
style: {
|
|
1267
|
-
...
|
|
1267
|
+
...r,
|
|
1268
1268
|
"--rp-rotate": `${y}deg`,
|
|
1269
1269
|
"--rp-page-rotate-translate": `${w}`,
|
|
1270
1270
|
"--scale-factor": s
|
|
@@ -1274,17 +1274,17 @@ const Jo = (t) => {
|
|
|
1274
1274
|
"div",
|
|
1275
1275
|
{
|
|
1276
1276
|
style: {
|
|
1277
|
-
width: `${
|
|
1278
|
-
height: `${
|
|
1277
|
+
width: `${b.width}px`,
|
|
1278
|
+
height: `${b.height}px`
|
|
1279
1279
|
},
|
|
1280
1280
|
className: mt["rp-page"],
|
|
1281
1281
|
children: [
|
|
1282
|
-
/* @__PURE__ */ i(
|
|
1282
|
+
/* @__PURE__ */ i(Zr, { onLoading: g, onLoaded: h, pageNumber: n }),
|
|
1283
1283
|
C && f && /* @__PURE__ */ i("div", { className: mt["rp-loader-wrapper"], children: /* @__PURE__ */ i(f, {}) }),
|
|
1284
|
-
/* @__PURE__ */ i(
|
|
1285
|
-
d && /* @__PURE__ */ i(
|
|
1286
|
-
/* @__PURE__ */ i(ti, { pageNumber: n, viewport:
|
|
1287
|
-
/* @__PURE__ */ i(
|
|
1284
|
+
/* @__PURE__ */ i(sr, { pageNumber: n }),
|
|
1285
|
+
d && /* @__PURE__ */ i(Xr, { pageNumber: n }),
|
|
1286
|
+
/* @__PURE__ */ i(ti, { pageNumber: n, viewport: b }),
|
|
1287
|
+
/* @__PURE__ */ i(Jr, { pageNumber: n })
|
|
1288
1288
|
]
|
|
1289
1289
|
}
|
|
1290
1290
|
)
|
|
@@ -1295,8 +1295,8 @@ function Pt() {
|
|
|
1295
1295
|
return Pt = Object.assign ? Object.assign.bind() : function(t) {
|
|
1296
1296
|
for (var e = 1; e < arguments.length; e++) {
|
|
1297
1297
|
var n = arguments[e];
|
|
1298
|
-
for (var
|
|
1299
|
-
({}).hasOwnProperty.call(n,
|
|
1298
|
+
for (var r in n)
|
|
1299
|
+
({}).hasOwnProperty.call(n, r) && (t[r] = n[r]);
|
|
1300
1300
|
}
|
|
1301
1301
|
return t;
|
|
1302
1302
|
}, Pt.apply(null, arguments);
|
|
@@ -1307,8 +1307,8 @@ function Qt(t) {
|
|
|
1307
1307
|
return t;
|
|
1308
1308
|
}
|
|
1309
1309
|
function Tt(t, e) {
|
|
1310
|
-
return Tt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n,
|
|
1311
|
-
return n.__proto__ =
|
|
1310
|
+
return Tt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
|
|
1311
|
+
return n.__proto__ = r, n;
|
|
1312
1312
|
}, Tt(t, e);
|
|
1313
1313
|
}
|
|
1314
1314
|
function ni(t, e) {
|
|
@@ -1317,24 +1317,24 @@ function ni(t, e) {
|
|
|
1317
1317
|
var Yt = Number.isNaN || function(e) {
|
|
1318
1318
|
return typeof e == "number" && e !== e;
|
|
1319
1319
|
};
|
|
1320
|
-
function
|
|
1320
|
+
function oi(t, e) {
|
|
1321
1321
|
return !!(t === e || Yt(t) && Yt(e));
|
|
1322
1322
|
}
|
|
1323
|
-
function
|
|
1323
|
+
function ri(t, e) {
|
|
1324
1324
|
if (t.length !== e.length)
|
|
1325
1325
|
return !1;
|
|
1326
1326
|
for (var n = 0; n < t.length; n++)
|
|
1327
|
-
if (!
|
|
1327
|
+
if (!oi(t[n], e[n]))
|
|
1328
1328
|
return !1;
|
|
1329
1329
|
return !0;
|
|
1330
1330
|
}
|
|
1331
1331
|
function gt(t, e) {
|
|
1332
|
-
e === void 0 && (e =
|
|
1333
|
-
var n,
|
|
1332
|
+
e === void 0 && (e = ri);
|
|
1333
|
+
var n, r = [], o, a = !1;
|
|
1334
1334
|
function c() {
|
|
1335
1335
|
for (var d = [], s = 0; s < arguments.length; s++)
|
|
1336
1336
|
d[s] = arguments[s];
|
|
1337
|
-
return a && n === this && e(d,
|
|
1337
|
+
return a && n === this && e(d, r) || (o = t.apply(this, d), a = !0, n = this, r = d), o;
|
|
1338
1338
|
}
|
|
1339
1339
|
return c;
|
|
1340
1340
|
}
|
|
@@ -1342,11 +1342,11 @@ function Jt(t, e) {
|
|
|
1342
1342
|
if (t == null)
|
|
1343
1343
|
return {};
|
|
1344
1344
|
var n = {};
|
|
1345
|
-
for (var
|
|
1346
|
-
if ({}.hasOwnProperty.call(t,
|
|
1347
|
-
if (e.indexOf(
|
|
1345
|
+
for (var r in t)
|
|
1346
|
+
if ({}.hasOwnProperty.call(t, r)) {
|
|
1347
|
+
if (e.indexOf(r) !== -1)
|
|
1348
1348
|
continue;
|
|
1349
|
-
n[
|
|
1349
|
+
n[r] = t[r];
|
|
1350
1350
|
}
|
|
1351
1351
|
return n;
|
|
1352
1352
|
}
|
|
@@ -1360,13 +1360,13 @@ function tn(t) {
|
|
|
1360
1360
|
}
|
|
1361
1361
|
function ai(t, e) {
|
|
1362
1362
|
var n = en();
|
|
1363
|
-
function
|
|
1364
|
-
en() - n >= e ? t.call(null) :
|
|
1363
|
+
function r() {
|
|
1364
|
+
en() - n >= e ? t.call(null) : o.id = requestAnimationFrame(r);
|
|
1365
1365
|
}
|
|
1366
|
-
var
|
|
1367
|
-
id: requestAnimationFrame(
|
|
1366
|
+
var o = {
|
|
1367
|
+
id: requestAnimationFrame(r)
|
|
1368
1368
|
};
|
|
1369
|
-
return
|
|
1369
|
+
return o;
|
|
1370
1370
|
}
|
|
1371
1371
|
var vt = -1;
|
|
1372
1372
|
function si(t) {
|
|
@@ -1381,25 +1381,25 @@ function nn(t) {
|
|
|
1381
1381
|
if (t === void 0 && (t = !1), ze === null || t) {
|
|
1382
1382
|
var e = document.createElement("div"), n = e.style;
|
|
1383
1383
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
1384
|
-
var
|
|
1385
|
-
return
|
|
1384
|
+
var r = document.createElement("div"), o = r.style;
|
|
1385
|
+
return o.width = "100px", o.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? ze = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? ze = "negative" : ze = "positive-ascending"), document.body.removeChild(e), ze;
|
|
1386
1386
|
}
|
|
1387
1387
|
return ze;
|
|
1388
1388
|
}
|
|
1389
1389
|
var ci = 150, li = function(e) {
|
|
1390
1390
|
var n = e.columnIndex;
|
|
1391
1391
|
e.data;
|
|
1392
|
-
var
|
|
1393
|
-
return
|
|
1392
|
+
var r = e.rowIndex;
|
|
1393
|
+
return r + ":" + n;
|
|
1394
1394
|
}, Ye = null, Je = null, et = null;
|
|
1395
1395
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ye = /* @__PURE__ */ new WeakSet(), Je = /* @__PURE__ */ new WeakSet(), et = /* @__PURE__ */ new WeakSet());
|
|
1396
1396
|
function di(t) {
|
|
1397
|
-
var e, n = t.getColumnOffset,
|
|
1397
|
+
var e, n = t.getColumnOffset, r = t.getColumnStartIndexForOffset, o = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, c = t.getEstimatedTotalHeight, d = t.getEstimatedTotalWidth, s = t.getOffsetForColumnAndAlignment, f = t.getOffsetForRowAndAlignment, m = t.getRowHeight, C = t.getRowOffset, u = t.getRowStartIndexForOffset, T = t.getRowStopIndexForStartIndex, b = t.initInstanceProps, P = t.shouldResetStyleCacheOnItemSizeChange, y = t.validateProps;
|
|
1398
1398
|
return e = /* @__PURE__ */ function(w) {
|
|
1399
1399
|
ni(g, w);
|
|
1400
1400
|
function g(p) {
|
|
1401
1401
|
var l;
|
|
1402
|
-
return l = w.call(this, p) || this, l._instanceProps =
|
|
1402
|
+
return l = w.call(this, p) || this, l._instanceProps = b(l.props, Qt(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
|
|
1403
1403
|
instance: Qt(l),
|
|
1404
1404
|
isScrolling: !1,
|
|
1405
1405
|
horizontalScrollDirection: "forward",
|
|
@@ -1407,10 +1407,10 @@ function di(t) {
|
|
|
1407
1407
|
scrollTop: typeof l.props.initialScrollTop == "number" ? l.props.initialScrollTop : 0,
|
|
1408
1408
|
scrollUpdateWasRequested: !1,
|
|
1409
1409
|
verticalScrollDirection: "forward"
|
|
1410
|
-
}, l._callOnItemsRendered = void 0, l._callOnItemsRendered = gt(function(v,
|
|
1410
|
+
}, l._callOnItemsRendered = void 0, l._callOnItemsRendered = gt(function(v, _, I, S, x, R, O, D) {
|
|
1411
1411
|
return l.props.onItemsRendered({
|
|
1412
1412
|
overscanColumnStartIndex: v,
|
|
1413
|
-
overscanColumnStopIndex:
|
|
1413
|
+
overscanColumnStopIndex: _,
|
|
1414
1414
|
overscanRowStartIndex: I,
|
|
1415
1415
|
overscanRowStopIndex: S,
|
|
1416
1416
|
visibleColumnStartIndex: x,
|
|
@@ -1418,34 +1418,34 @@ function di(t) {
|
|
|
1418
1418
|
visibleRowStartIndex: O,
|
|
1419
1419
|
visibleRowStopIndex: D
|
|
1420
1420
|
});
|
|
1421
|
-
}), l._callOnScroll = void 0, l._callOnScroll = gt(function(v,
|
|
1421
|
+
}), l._callOnScroll = void 0, l._callOnScroll = gt(function(v, _, I, S, x) {
|
|
1422
1422
|
return l.props.onScroll({
|
|
1423
1423
|
horizontalScrollDirection: I,
|
|
1424
1424
|
scrollLeft: v,
|
|
1425
|
-
scrollTop:
|
|
1425
|
+
scrollTop: _,
|
|
1426
1426
|
verticalScrollDirection: S,
|
|
1427
1427
|
scrollUpdateWasRequested: x
|
|
1428
1428
|
});
|
|
1429
|
-
}), l._getItemStyle = void 0, l._getItemStyle = function(v,
|
|
1430
|
-
var I = l.props, S = I.columnWidth, x = I.direction, R = I.rowHeight, O = l._getItemStyleCache(P && S, P && x, P && R), D = v + ":" +
|
|
1429
|
+
}), l._getItemStyle = void 0, l._getItemStyle = function(v, _) {
|
|
1430
|
+
var I = l.props, S = I.columnWidth, x = I.direction, R = I.rowHeight, O = l._getItemStyleCache(P && S, P && x, P && R), D = v + ":" + _, z;
|
|
1431
1431
|
if (O.hasOwnProperty(D))
|
|
1432
1432
|
z = O[D];
|
|
1433
1433
|
else {
|
|
1434
|
-
var E = n(l.props,
|
|
1434
|
+
var E = n(l.props, _, l._instanceProps), L = x === "rtl";
|
|
1435
1435
|
O[D] = z = {
|
|
1436
1436
|
position: "absolute",
|
|
1437
1437
|
left: L ? void 0 : E,
|
|
1438
1438
|
right: L ? E : void 0,
|
|
1439
1439
|
top: C(l.props, v, l._instanceProps),
|
|
1440
1440
|
height: m(l.props, v, l._instanceProps),
|
|
1441
|
-
width: a(l.props,
|
|
1441
|
+
width: a(l.props, _, l._instanceProps)
|
|
1442
1442
|
};
|
|
1443
1443
|
}
|
|
1444
1444
|
return z;
|
|
1445
|
-
}, l._getItemStyleCache = void 0, l._getItemStyleCache = gt(function(v,
|
|
1445
|
+
}, l._getItemStyleCache = void 0, l._getItemStyleCache = gt(function(v, _, I) {
|
|
1446
1446
|
return {};
|
|
1447
1447
|
}), l._onScroll = function(v) {
|
|
1448
|
-
var
|
|
1448
|
+
var _ = v.currentTarget, I = _.clientHeight, S = _.clientWidth, x = _.scrollLeft, R = _.scrollTop, O = _.scrollHeight, D = _.scrollWidth;
|
|
1449
1449
|
l.setState(function(z) {
|
|
1450
1450
|
if (z.scrollLeft === x && z.scrollTop === R)
|
|
1451
1451
|
return null;
|
|
@@ -1471,8 +1471,8 @@ function di(t) {
|
|
|
1471
1471
|
};
|
|
1472
1472
|
}, l._resetIsScrollingDebounced);
|
|
1473
1473
|
}, l._outerRefSetter = function(v) {
|
|
1474
|
-
var
|
|
1475
|
-
l._outerRef = v, typeof
|
|
1474
|
+
var _ = l.props.outerRef;
|
|
1475
|
+
l._outerRef = v, typeof _ == "function" ? _(v) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = v);
|
|
1476
1476
|
}, l._resetIsScrollingDebounced = function() {
|
|
1477
1477
|
l._resetIsScrollingTimeoutId !== null && tn(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId = ai(l._resetIsScrolling, ci);
|
|
1478
1478
|
}, l._resetIsScrolling = function() {
|
|
@@ -1488,58 +1488,58 @@ function di(t) {
|
|
|
1488
1488
|
};
|
|
1489
1489
|
var h = g.prototype;
|
|
1490
1490
|
return h.scrollTo = function(l) {
|
|
1491
|
-
var v = l.scrollLeft,
|
|
1492
|
-
v !== void 0 && (v = Math.max(0, v)),
|
|
1493
|
-
return v === void 0 && (v = I.scrollLeft),
|
|
1491
|
+
var v = l.scrollLeft, _ = l.scrollTop;
|
|
1492
|
+
v !== void 0 && (v = Math.max(0, v)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(I) {
|
|
1493
|
+
return v === void 0 && (v = I.scrollLeft), _ === void 0 && (_ = I.scrollTop), I.scrollLeft === v && I.scrollTop === _ ? null : {
|
|
1494
1494
|
horizontalScrollDirection: I.scrollLeft < v ? "forward" : "backward",
|
|
1495
1495
|
scrollLeft: v,
|
|
1496
|
-
scrollTop:
|
|
1496
|
+
scrollTop: _,
|
|
1497
1497
|
scrollUpdateWasRequested: !0,
|
|
1498
|
-
verticalScrollDirection: I.scrollTop <
|
|
1498
|
+
verticalScrollDirection: I.scrollTop < _ ? "forward" : "backward"
|
|
1499
1499
|
};
|
|
1500
1500
|
}, this._resetIsScrollingDebounced);
|
|
1501
1501
|
}, h.scrollToItem = function(l) {
|
|
1502
|
-
var v = l.align,
|
|
1502
|
+
var v = l.align, _ = v === void 0 ? "auto" : v, I = l.columnIndex, S = l.rowIndex, x = this.props, R = x.columnCount, O = x.height, D = x.rowCount, z = x.width, E = this.state, L = E.scrollLeft, F = E.scrollTop, G = si();
|
|
1503
1503
|
I !== void 0 && (I = Math.max(0, Math.min(I, R - 1))), S !== void 0 && (S = Math.max(0, Math.min(S, D - 1)));
|
|
1504
|
-
var
|
|
1504
|
+
var U = c(this.props, this._instanceProps), V = d(this.props, this._instanceProps), B = V > z ? G : 0, Z = U > O ? G : 0;
|
|
1505
1505
|
this.scrollTo({
|
|
1506
|
-
scrollLeft: I !== void 0 ? s(this.props, I,
|
|
1507
|
-
scrollTop: S !== void 0 ? f(this.props, S,
|
|
1506
|
+
scrollLeft: I !== void 0 ? s(this.props, I, _, L, this._instanceProps, Z) : L,
|
|
1507
|
+
scrollTop: S !== void 0 ? f(this.props, S, _, F, this._instanceProps, B) : F
|
|
1508
1508
|
});
|
|
1509
1509
|
}, h.componentDidMount = function() {
|
|
1510
|
-
var l = this.props, v = l.initialScrollLeft,
|
|
1510
|
+
var l = this.props, v = l.initialScrollLeft, _ = l.initialScrollTop;
|
|
1511
1511
|
if (this._outerRef != null) {
|
|
1512
1512
|
var I = this._outerRef;
|
|
1513
|
-
typeof v == "number" && (I.scrollLeft = v), typeof
|
|
1513
|
+
typeof v == "number" && (I.scrollLeft = v), typeof _ == "number" && (I.scrollTop = _);
|
|
1514
1514
|
}
|
|
1515
1515
|
this._callPropsCallbacks();
|
|
1516
1516
|
}, h.componentDidUpdate = function() {
|
|
1517
|
-
var l = this.props.direction, v = this.state,
|
|
1517
|
+
var l = this.props.direction, v = this.state, _ = v.scrollLeft, I = v.scrollTop, S = v.scrollUpdateWasRequested;
|
|
1518
1518
|
if (S && this._outerRef != null) {
|
|
1519
1519
|
var x = this._outerRef;
|
|
1520
1520
|
if (l === "rtl")
|
|
1521
1521
|
switch (nn()) {
|
|
1522
1522
|
case "negative":
|
|
1523
|
-
x.scrollLeft = -
|
|
1523
|
+
x.scrollLeft = -_;
|
|
1524
1524
|
break;
|
|
1525
1525
|
case "positive-ascending":
|
|
1526
|
-
x.scrollLeft =
|
|
1526
|
+
x.scrollLeft = _;
|
|
1527
1527
|
break;
|
|
1528
1528
|
default:
|
|
1529
1529
|
var R = x.clientWidth, O = x.scrollWidth;
|
|
1530
|
-
x.scrollLeft = O - R -
|
|
1530
|
+
x.scrollLeft = O - R - _;
|
|
1531
1531
|
break;
|
|
1532
1532
|
}
|
|
1533
1533
|
else
|
|
1534
|
-
x.scrollLeft = Math.max(0,
|
|
1534
|
+
x.scrollLeft = Math.max(0, _);
|
|
1535
1535
|
x.scrollTop = Math.max(0, I);
|
|
1536
1536
|
}
|
|
1537
1537
|
this._callPropsCallbacks();
|
|
1538
1538
|
}, h.componentWillUnmount = function() {
|
|
1539
1539
|
this._resetIsScrollingTimeoutId !== null && tn(this._resetIsScrollingTimeoutId);
|
|
1540
1540
|
}, h.render = function() {
|
|
1541
|
-
var l = this.props, v = l.children,
|
|
1542
|
-
if (I > 0 &&
|
|
1541
|
+
var l = this.props, v = l.children, _ = l.className, I = l.columnCount, S = l.direction, x = l.height, R = l.innerRef, O = l.innerElementType, D = l.innerTagName, z = l.itemData, E = l.itemKey, L = E === void 0 ? li : E, F = l.outerElementType, G = l.outerTagName, U = l.rowCount, V = l.style, B = l.useIsScrolling, Z = l.width, ae = this.state.isScrolling, $ = this._getHorizontalRangeToRender(), Q = $[0], J = $[1], te = this._getVerticalRangeToRender(), ee = te[0], Y = te[1], we = [];
|
|
1542
|
+
if (I > 0 && U)
|
|
1543
1543
|
for (var me = ee; me <= Y; me++)
|
|
1544
1544
|
for (var Re = Q; Re <= J; Re++)
|
|
1545
1545
|
we.push(Qe(v, {
|
|
@@ -1556,18 +1556,18 @@ function di(t) {
|
|
|
1556
1556
|
}));
|
|
1557
1557
|
var Le = c(this.props, this._instanceProps), lt = d(this.props, this._instanceProps);
|
|
1558
1558
|
return Qe(F || G || "div", {
|
|
1559
|
-
className:
|
|
1559
|
+
className: _,
|
|
1560
1560
|
onScroll: this._onScroll,
|
|
1561
1561
|
ref: this._outerRefSetter,
|
|
1562
1562
|
style: Pt({
|
|
1563
1563
|
position: "relative",
|
|
1564
1564
|
height: x,
|
|
1565
|
-
width:
|
|
1565
|
+
width: Z,
|
|
1566
1566
|
overflow: "auto",
|
|
1567
1567
|
WebkitOverflowScrolling: "touch",
|
|
1568
1568
|
willChange: "transform",
|
|
1569
1569
|
direction: S
|
|
1570
|
-
},
|
|
1570
|
+
}, V)
|
|
1571
1571
|
}, Qe(O || D || "div", {
|
|
1572
1572
|
children: we,
|
|
1573
1573
|
ref: R,
|
|
@@ -1578,105 +1578,105 @@ function di(t) {
|
|
|
1578
1578
|
}
|
|
1579
1579
|
}));
|
|
1580
1580
|
}, h._callPropsCallbacks = function() {
|
|
1581
|
-
var l = this.props, v = l.columnCount,
|
|
1582
|
-
if (typeof
|
|
1583
|
-
var x = this._getHorizontalRangeToRender(), R = x[0], O = x[1], D = x[2], z = x[3], E = this._getVerticalRangeToRender(), L = E[0], F = E[1], G = E[2],
|
|
1584
|
-
this._callOnItemsRendered(R, O, L, F, D, z, G,
|
|
1581
|
+
var l = this.props, v = l.columnCount, _ = l.onItemsRendered, I = l.onScroll, S = l.rowCount;
|
|
1582
|
+
if (typeof _ == "function" && v > 0 && S > 0) {
|
|
1583
|
+
var x = this._getHorizontalRangeToRender(), R = x[0], O = x[1], D = x[2], z = x[3], E = this._getVerticalRangeToRender(), L = E[0], F = E[1], G = E[2], U = E[3];
|
|
1584
|
+
this._callOnItemsRendered(R, O, L, F, D, z, G, U);
|
|
1585
1585
|
}
|
|
1586
1586
|
if (typeof I == "function") {
|
|
1587
|
-
var
|
|
1588
|
-
this._callOnScroll(
|
|
1587
|
+
var V = this.state, B = V.horizontalScrollDirection, Z = V.scrollLeft, ae = V.scrollTop, $ = V.scrollUpdateWasRequested, Q = V.verticalScrollDirection;
|
|
1588
|
+
this._callOnScroll(Z, ae, B, Q, $);
|
|
1589
1589
|
}
|
|
1590
1590
|
}, h._getHorizontalRangeToRender = function() {
|
|
1591
|
-
var l = this.props, v = l.columnCount,
|
|
1591
|
+
var l = this.props, v = l.columnCount, _ = l.overscanColumnCount, I = l.overscanColumnsCount, S = l.overscanCount, x = l.rowCount, R = this.state, O = R.horizontalScrollDirection, D = R.isScrolling, z = R.scrollLeft, E = _ || I || S || 1;
|
|
1592
1592
|
if (v === 0 || x === 0)
|
|
1593
1593
|
return [0, 0, 0, 0];
|
|
1594
|
-
var L =
|
|
1595
|
-
return [Math.max(0, L - G), Math.max(0, Math.min(v - 1, F +
|
|
1594
|
+
var L = r(this.props, z, this._instanceProps), F = o(this.props, L, z, this._instanceProps), G = !D || O === "backward" ? Math.max(1, E) : 1, U = !D || O === "forward" ? Math.max(1, E) : 1;
|
|
1595
|
+
return [Math.max(0, L - G), Math.max(0, Math.min(v - 1, F + U)), L, F];
|
|
1596
1596
|
}, h._getVerticalRangeToRender = function() {
|
|
1597
|
-
var l = this.props, v = l.columnCount,
|
|
1597
|
+
var l = this.props, v = l.columnCount, _ = l.overscanCount, I = l.overscanRowCount, S = l.overscanRowsCount, x = l.rowCount, R = this.state, O = R.isScrolling, D = R.verticalScrollDirection, z = R.scrollTop, E = I || S || _ || 1;
|
|
1598
1598
|
if (v === 0 || x === 0)
|
|
1599
1599
|
return [0, 0, 0, 0];
|
|
1600
|
-
var L = u(this.props, z, this._instanceProps), F = T(this.props, L, z, this._instanceProps), G = !O || D === "backward" ? Math.max(1, E) : 1,
|
|
1601
|
-
return [Math.max(0, L - G), Math.max(0, Math.min(x - 1, F +
|
|
1600
|
+
var L = u(this.props, z, this._instanceProps), F = T(this.props, L, z, this._instanceProps), G = !O || D === "backward" ? Math.max(1, E) : 1, U = !O || D === "forward" ? Math.max(1, E) : 1;
|
|
1601
|
+
return [Math.max(0, L - G), Math.max(0, Math.min(x - 1, F + U)), L, F];
|
|
1602
1602
|
}, g;
|
|
1603
|
-
}(
|
|
1603
|
+
}(po), e.defaultProps = {
|
|
1604
1604
|
direction: "ltr",
|
|
1605
1605
|
itemData: void 0,
|
|
1606
1606
|
useIsScrolling: !1
|
|
1607
1607
|
}, e;
|
|
1608
1608
|
}
|
|
1609
1609
|
var ui = function(e, n) {
|
|
1610
|
-
var
|
|
1610
|
+
var r = e.children, o = e.direction, a = e.height, c = e.innerTagName, d = e.outerTagName, s = e.overscanColumnsCount, f = e.overscanCount, m = e.overscanRowsCount, C = e.width, u = n.instance;
|
|
1611
1611
|
if (process.env.NODE_ENV !== "production") {
|
|
1612
|
-
if (typeof f == "number" && Ye && !Ye.has(u) && (Ye.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof s == "number" || typeof m == "number") && Je && !Je.has(u) && (Je.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || d != null) && et && !et.has(u) && (et.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")),
|
|
1613
|
-
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (
|
|
1614
|
-
switch (
|
|
1612
|
+
if (typeof f == "number" && Ye && !Ye.has(u) && (Ye.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof s == "number" || typeof m == "number") && Je && !Je.has(u) && (Je.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || d != null) && et && !et.has(u) && (et.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
|
|
1613
|
+
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
1614
|
+
switch (o) {
|
|
1615
1615
|
case "ltr":
|
|
1616
1616
|
case "rtl":
|
|
1617
1617
|
break;
|
|
1618
1618
|
default:
|
|
1619
|
-
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' +
|
|
1619
|
+
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + o + '" was specified.'));
|
|
1620
1620
|
}
|
|
1621
1621
|
if (typeof C != "number")
|
|
1622
1622
|
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (C === null ? "null" : typeof C) + '" was specified.'));
|
|
1623
1623
|
if (typeof a != "number")
|
|
1624
1624
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1625
1625
|
}
|
|
1626
|
-
},
|
|
1627
|
-
var
|
|
1628
|
-
if (c >=
|
|
1629
|
-
var s =
|
|
1626
|
+
}, on = 50, On = function(e, n) {
|
|
1627
|
+
var r = e.rowCount, o = n.rowMetadataMap, a = n.estimatedRowHeight, c = n.lastMeasuredRowIndex, d = 0;
|
|
1628
|
+
if (c >= r && (c = r - 1), c >= 0) {
|
|
1629
|
+
var s = o[c];
|
|
1630
1630
|
d = s.offset + s.size;
|
|
1631
1631
|
}
|
|
1632
|
-
var f =
|
|
1632
|
+
var f = r - c - 1, m = f * a;
|
|
1633
1633
|
return d + m;
|
|
1634
1634
|
}, Dn = function(e, n) {
|
|
1635
|
-
var
|
|
1636
|
-
if (c >=
|
|
1637
|
-
var s =
|
|
1635
|
+
var r = e.columnCount, o = n.columnMetadataMap, a = n.estimatedColumnWidth, c = n.lastMeasuredColumnIndex, d = 0;
|
|
1636
|
+
if (c >= r && (c = r - 1), c >= 0) {
|
|
1637
|
+
var s = o[c];
|
|
1638
1638
|
d = s.offset + s.size;
|
|
1639
1639
|
}
|
|
1640
|
-
var f =
|
|
1640
|
+
var f = r - c - 1, m = f * a;
|
|
1641
1641
|
return d + m;
|
|
1642
|
-
}, Pe = function(e, n,
|
|
1642
|
+
}, Pe = function(e, n, r, o) {
|
|
1643
1643
|
var a, c, d;
|
|
1644
|
-
if (e === "column" ? (a =
|
|
1644
|
+
if (e === "column" ? (a = o.columnMetadataMap, c = n.columnWidth, d = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = n.rowHeight, d = o.lastMeasuredRowIndex), r > d) {
|
|
1645
1645
|
var s = 0;
|
|
1646
1646
|
if (d >= 0) {
|
|
1647
1647
|
var f = a[d];
|
|
1648
1648
|
s = f.offset + f.size;
|
|
1649
1649
|
}
|
|
1650
|
-
for (var m = d + 1; m <=
|
|
1650
|
+
for (var m = d + 1; m <= r; m++) {
|
|
1651
1651
|
var C = c(m);
|
|
1652
1652
|
a[m] = {
|
|
1653
1653
|
offset: s,
|
|
1654
1654
|
size: C
|
|
1655
1655
|
}, s += C;
|
|
1656
1656
|
}
|
|
1657
|
-
e === "column" ?
|
|
1657
|
+
e === "column" ? o.lastMeasuredColumnIndex = r : o.lastMeasuredRowIndex = r;
|
|
1658
1658
|
}
|
|
1659
|
-
return a[
|
|
1660
|
-
},
|
|
1659
|
+
return a[r];
|
|
1660
|
+
}, rn = function(e, n, r, o) {
|
|
1661
1661
|
var a, c;
|
|
1662
|
-
e === "column" ? (a =
|
|
1662
|
+
e === "column" ? (a = r.columnMetadataMap, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, c = r.lastMeasuredRowIndex);
|
|
1663
1663
|
var d = c > 0 ? a[c].offset : 0;
|
|
1664
|
-
return d >=
|
|
1665
|
-
}, An = function(e, n,
|
|
1666
|
-
for (; a <=
|
|
1667
|
-
var d = a + Math.floor((
|
|
1664
|
+
return d >= o ? An(e, n, r, c, 0, o) : pi(e, n, r, Math.max(0, c), o);
|
|
1665
|
+
}, An = function(e, n, r, o, a, c) {
|
|
1666
|
+
for (; a <= o; ) {
|
|
1667
|
+
var d = a + Math.floor((o - a) / 2), s = Pe(e, n, d, r).offset;
|
|
1668
1668
|
if (s === c)
|
|
1669
1669
|
return d;
|
|
1670
|
-
s < c ? a = d + 1 : s > c && (
|
|
1670
|
+
s < c ? a = d + 1 : s > c && (o = d - 1);
|
|
1671
1671
|
}
|
|
1672
1672
|
return a > 0 ? a - 1 : 0;
|
|
1673
|
-
}, pi = function(e, n,
|
|
1674
|
-
for (var c = e === "column" ? n.columnCount : n.rowCount, d = 1;
|
|
1675
|
-
|
|
1676
|
-
return An(e, n,
|
|
1677
|
-
}, an = function(e, n,
|
|
1678
|
-
var s = e === "column" ? n.width : n.height, f = Pe(e, n,
|
|
1679
|
-
switch (
|
|
1673
|
+
}, pi = function(e, n, r, o, a) {
|
|
1674
|
+
for (var c = e === "column" ? n.columnCount : n.rowCount, d = 1; o < c && Pe(e, n, o, r).offset < a; )
|
|
1675
|
+
o += d, d *= 2;
|
|
1676
|
+
return An(e, n, r, Math.min(o, c - 1), Math.floor(o / 2), a);
|
|
1677
|
+
}, an = function(e, n, r, o, a, c, d) {
|
|
1678
|
+
var s = e === "column" ? n.width : n.height, f = Pe(e, n, r, c), m = e === "column" ? Dn(n, c) : On(n, c), C = Math.max(0, Math.min(m - s, f.offset)), u = Math.max(0, f.offset - s + d + f.size);
|
|
1679
|
+
switch (o === "smart" && (a >= u - s && a <= C + s ? o = "auto" : o = "center"), o) {
|
|
1680
1680
|
case "start":
|
|
1681
1681
|
return C;
|
|
1682
1682
|
case "end":
|
|
@@ -1688,47 +1688,47 @@ var ui = function(e, n) {
|
|
|
1688
1688
|
return a >= u && a <= C ? a : u > C || a < u ? u : C;
|
|
1689
1689
|
}
|
|
1690
1690
|
}, hi = /* @__PURE__ */ di({
|
|
1691
|
-
getColumnOffset: function(e, n,
|
|
1692
|
-
return Pe("column", e, n,
|
|
1691
|
+
getColumnOffset: function(e, n, r) {
|
|
1692
|
+
return Pe("column", e, n, r).offset;
|
|
1693
1693
|
},
|
|
1694
|
-
getColumnStartIndexForOffset: function(e, n,
|
|
1695
|
-
return
|
|
1694
|
+
getColumnStartIndexForOffset: function(e, n, r) {
|
|
1695
|
+
return rn("column", e, r, n);
|
|
1696
1696
|
},
|
|
1697
|
-
getColumnStopIndexForStartIndex: function(e, n,
|
|
1698
|
-
for (var a = e.columnCount, c = e.width, d = Pe("column", e, n,
|
|
1699
|
-
m++, f += Pe("column", e, m,
|
|
1697
|
+
getColumnStopIndexForStartIndex: function(e, n, r, o) {
|
|
1698
|
+
for (var a = e.columnCount, c = e.width, d = Pe("column", e, n, o), s = r + c, f = d.offset + d.size, m = n; m < a - 1 && f < s; )
|
|
1699
|
+
m++, f += Pe("column", e, m, o).size;
|
|
1700
1700
|
return m;
|
|
1701
1701
|
},
|
|
1702
|
-
getColumnWidth: function(e, n,
|
|
1703
|
-
return
|
|
1702
|
+
getColumnWidth: function(e, n, r) {
|
|
1703
|
+
return r.columnMetadataMap[n].size;
|
|
1704
1704
|
},
|
|
1705
1705
|
getEstimatedTotalHeight: On,
|
|
1706
1706
|
getEstimatedTotalWidth: Dn,
|
|
1707
|
-
getOffsetForColumnAndAlignment: function(e, n,
|
|
1708
|
-
return an("column", e, n,
|
|
1707
|
+
getOffsetForColumnAndAlignment: function(e, n, r, o, a, c) {
|
|
1708
|
+
return an("column", e, n, r, o, a, c);
|
|
1709
1709
|
},
|
|
1710
|
-
getOffsetForRowAndAlignment: function(e, n,
|
|
1711
|
-
return an("row", e, n,
|
|
1710
|
+
getOffsetForRowAndAlignment: function(e, n, r, o, a, c) {
|
|
1711
|
+
return an("row", e, n, r, o, a, c);
|
|
1712
1712
|
},
|
|
1713
|
-
getRowOffset: function(e, n,
|
|
1714
|
-
return Pe("row", e, n,
|
|
1713
|
+
getRowOffset: function(e, n, r) {
|
|
1714
|
+
return Pe("row", e, n, r).offset;
|
|
1715
1715
|
},
|
|
1716
|
-
getRowHeight: function(e, n,
|
|
1717
|
-
return
|
|
1716
|
+
getRowHeight: function(e, n, r) {
|
|
1717
|
+
return r.rowMetadataMap[n].size;
|
|
1718
1718
|
},
|
|
1719
|
-
getRowStartIndexForOffset: function(e, n,
|
|
1720
|
-
return
|
|
1719
|
+
getRowStartIndexForOffset: function(e, n, r) {
|
|
1720
|
+
return rn("row", e, r, n);
|
|
1721
1721
|
},
|
|
1722
|
-
getRowStopIndexForStartIndex: function(e, n,
|
|
1723
|
-
for (var a = e.rowCount, c = e.height, d = Pe("row", e, n,
|
|
1724
|
-
m++, f += Pe("row", e, m,
|
|
1722
|
+
getRowStopIndexForStartIndex: function(e, n, r, o) {
|
|
1723
|
+
for (var a = e.rowCount, c = e.height, d = Pe("row", e, n, o), s = r + c, f = d.offset + d.size, m = n; m < a - 1 && f < s; )
|
|
1724
|
+
m++, f += Pe("row", e, m, o).size;
|
|
1725
1725
|
return m;
|
|
1726
1726
|
},
|
|
1727
1727
|
initInstanceProps: function(e, n) {
|
|
1728
|
-
var
|
|
1728
|
+
var r = e, o = r.estimatedColumnWidth, a = r.estimatedRowHeight, c = {
|
|
1729
1729
|
columnMetadataMap: {},
|
|
1730
|
-
estimatedColumnWidth:
|
|
1731
|
-
estimatedRowHeight: a ||
|
|
1730
|
+
estimatedColumnWidth: o || on,
|
|
1731
|
+
estimatedRowHeight: a || on,
|
|
1732
1732
|
lastMeasuredColumnIndex: -1,
|
|
1733
1733
|
lastMeasuredRowIndex: -1,
|
|
1734
1734
|
rowMetadataMap: {}
|
|
@@ -1750,12 +1750,12 @@ var ui = function(e, n) {
|
|
|
1750
1750
|
},
|
|
1751
1751
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
1752
1752
|
validateProps: function(e) {
|
|
1753
|
-
var n = e.columnWidth,
|
|
1753
|
+
var n = e.columnWidth, r = e.rowHeight;
|
|
1754
1754
|
if (process.env.NODE_ENV !== "production") {
|
|
1755
1755
|
if (typeof n != "function")
|
|
1756
1756
|
throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (n === null ? "null" : typeof n) + '" was specified.'));
|
|
1757
|
-
if (typeof
|
|
1758
|
-
throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. ' + ('"' + (
|
|
1757
|
+
if (typeof r != "function")
|
|
1758
|
+
throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
1759
1759
|
}
|
|
1760
1760
|
}
|
|
1761
1761
|
});
|
|
@@ -1764,21 +1764,21 @@ function sn(t, e) {
|
|
|
1764
1764
|
for (var n in t)
|
|
1765
1765
|
if (!(n in e))
|
|
1766
1766
|
return !0;
|
|
1767
|
-
for (var
|
|
1768
|
-
if (t[
|
|
1767
|
+
for (var r in e)
|
|
1768
|
+
if (t[r] !== e[r])
|
|
1769
1769
|
return !0;
|
|
1770
1770
|
return !1;
|
|
1771
1771
|
}
|
|
1772
1772
|
var fi = ["style"], mi = ["style"];
|
|
1773
1773
|
function gi(t, e) {
|
|
1774
|
-
var n = t.style,
|
|
1775
|
-
return !sn(n,
|
|
1774
|
+
var n = t.style, r = Jt(t, fi), o = e.style, a = Jt(e, mi);
|
|
1775
|
+
return !sn(n, o) && !sn(r, a);
|
|
1776
1776
|
}
|
|
1777
1777
|
const vi = () => {
|
|
1778
|
-
const { viewMode: t } = He(), { scrollMode: e } = Ae(), { setColumnCount: n } = vn(), { virtualScrollableElementRef:
|
|
1779
|
-
if (t ===
|
|
1778
|
+
const { viewMode: t } = He(), { scrollMode: e } = Ae(), { setColumnCount: n } = vn(), { virtualScrollableElementRef: r } = rt(), o = je(), a = W(() => o.heights.length, [o.heights]), c = W(() => e === ie.HORIZONTAL_SCROLLING ? a : t === oe.DUAL_PAGE || t === oe.DUAL_PAGE_WITH_COVER ? 2 : 1, [t, e, e, a, r]), d = W(() => {
|
|
1779
|
+
if (t === oe.DUAL_PAGE_WITH_COVER && o.widths.length > 0) {
|
|
1780
1780
|
const w = [0, 0];
|
|
1781
|
-
return
|
|
1781
|
+
return o.widths.forEach((g, h) => {
|
|
1782
1782
|
const p = h + 1;
|
|
1783
1783
|
if (p === 1)
|
|
1784
1784
|
return;
|
|
@@ -1786,11 +1786,11 @@ const vi = () => {
|
|
|
1786
1786
|
w[l] = Math.max(w[l] || 0, g);
|
|
1787
1787
|
}), w;
|
|
1788
1788
|
}
|
|
1789
|
-
return
|
|
1789
|
+
return o.widths.reduce((w, g, h) => {
|
|
1790
1790
|
const p = h % c;
|
|
1791
1791
|
return (!w[p] || g > w[p]) && (w[p] = g), w;
|
|
1792
1792
|
}, []);
|
|
1793
|
-
}, [
|
|
1793
|
+
}, [o.widths, c, t]), s = N(
|
|
1794
1794
|
(P) => {
|
|
1795
1795
|
const y = P % d.length;
|
|
1796
1796
|
return d[y] || 0;
|
|
@@ -1798,30 +1798,30 @@ const vi = () => {
|
|
|
1798
1798
|
[d]
|
|
1799
1799
|
), f = N(
|
|
1800
1800
|
(P) => {
|
|
1801
|
-
if (t ===
|
|
1801
|
+
if (t === oe.DUAL_PAGE_WITH_COVER) {
|
|
1802
1802
|
if (P === 0)
|
|
1803
|
-
return
|
|
1804
|
-
const g = 1 + (P - 1) * c + 1, p = Array.from({ length: c }, (l, v) => g + v - 1).filter((l) => l <
|
|
1803
|
+
return o.heights[0] || 0;
|
|
1804
|
+
const g = 1 + (P - 1) * c + 1, p = Array.from({ length: c }, (l, v) => g + v - 1).filter((l) => l < o.heights.length).map((l) => o.heights[l] || 0);
|
|
1805
1805
|
return Math.max(...p, 0);
|
|
1806
1806
|
}
|
|
1807
1807
|
const w = Array.from({ length: c }, (g, h) => {
|
|
1808
1808
|
const p = P * c + h;
|
|
1809
|
-
return
|
|
1809
|
+
return o.heights[p] || 0;
|
|
1810
1810
|
});
|
|
1811
1811
|
return Math.max(...w);
|
|
1812
1812
|
},
|
|
1813
|
-
[
|
|
1813
|
+
[o.heights, c, t]
|
|
1814
1814
|
);
|
|
1815
1815
|
A(() => {
|
|
1816
1816
|
n(c);
|
|
1817
1817
|
}, [c, n]);
|
|
1818
|
-
const m = W(() => e === ie.HORIZONTAL_SCROLLING || e === ie.PAGE_SCROLLING ? 1 : t ===
|
|
1819
|
-
const P = t ===
|
|
1818
|
+
const m = W(() => e === ie.HORIZONTAL_SCROLLING || e === ie.PAGE_SCROLLING ? 1 : t === oe.DUAL_PAGE_WITH_COVER && a > 0 ? 1 + Math.ceil((a - 1) / c) : Math.round(a / c), [c, a, e, t]), C = W(() => o.heights.reduce((P, y) => P + y, 0) / o.heights.length || 0, [o]), u = W(() => o.widths.reduce((P, y) => P + y, 0) / o.widths.length || 0, [o]), T = W(() => {
|
|
1819
|
+
const P = t === oe.DUAL_PAGE_WITH_COVER, { rowsHeight: y, columnsWidth: w } = Et(o, c, P);
|
|
1820
1820
|
return {
|
|
1821
1821
|
rowsHeight: y,
|
|
1822
1822
|
columnsWidth: w
|
|
1823
1823
|
};
|
|
1824
|
-
}, [
|
|
1824
|
+
}, [o, c, t]), b = W(() => ({
|
|
1825
1825
|
width: T.columnsWidth.reduce((P, y) => P + y, 0),
|
|
1826
1826
|
height: T.rowsHeight.reduce((P, y) => P + y, 0)
|
|
1827
1827
|
}), [T]);
|
|
@@ -1830,31 +1830,31 @@ const vi = () => {
|
|
|
1830
1830
|
rowHeight: f,
|
|
1831
1831
|
columnCount: c,
|
|
1832
1832
|
columnWidth: s,
|
|
1833
|
-
pageDimension:
|
|
1833
|
+
pageDimension: o,
|
|
1834
1834
|
estimatedRowHeight: C,
|
|
1835
1835
|
estimatedColumnWidth: u,
|
|
1836
1836
|
gridDimension: T,
|
|
1837
|
-
totalDimension:
|
|
1837
|
+
totalDimension: b
|
|
1838
1838
|
};
|
|
1839
1839
|
};
|
|
1840
1840
|
let ue;
|
|
1841
1841
|
typeof window < "u" ? ue = window : typeof self < "u" ? ue = self : ue = global;
|
|
1842
1842
|
let Ct = null, yt = null;
|
|
1843
|
-
const cn = 20, wt = ue.clearTimeout, ln = ue.setTimeout,
|
|
1844
|
-
|
|
1843
|
+
const cn = 20, wt = ue.clearTimeout, ln = ue.setTimeout, bt = ue.cancelAnimationFrame || ue.mozCancelAnimationFrame || ue.webkitCancelAnimationFrame, dn = ue.requestAnimationFrame || ue.mozRequestAnimationFrame || ue.webkitRequestAnimationFrame;
|
|
1844
|
+
bt == null || dn == null ? (Ct = wt, yt = function(e) {
|
|
1845
1845
|
return ln(e, cn);
|
|
1846
1846
|
}) : (Ct = function([e, n]) {
|
|
1847
|
-
|
|
1847
|
+
bt(e), wt(n);
|
|
1848
1848
|
}, yt = function(e) {
|
|
1849
1849
|
const n = dn(function() {
|
|
1850
|
-
wt(
|
|
1851
|
-
}),
|
|
1852
|
-
|
|
1850
|
+
wt(r), e();
|
|
1851
|
+
}), r = ln(function() {
|
|
1852
|
+
bt(n), e();
|
|
1853
1853
|
}, cn);
|
|
1854
|
-
return [n,
|
|
1854
|
+
return [n, r];
|
|
1855
1855
|
});
|
|
1856
1856
|
function wi(t) {
|
|
1857
|
-
let e, n,
|
|
1857
|
+
let e, n, r, o, a, c, d;
|
|
1858
1858
|
const s = typeof document < "u" && document.attachEvent;
|
|
1859
1859
|
if (!s) {
|
|
1860
1860
|
c = function(w) {
|
|
@@ -1873,25 +1873,25 @@ function wi(t) {
|
|
|
1873
1873
|
});
|
|
1874
1874
|
};
|
|
1875
1875
|
let u = !1, T = "";
|
|
1876
|
-
|
|
1877
|
-
const
|
|
1876
|
+
r = "animationstart";
|
|
1877
|
+
const b = "Webkit Moz O ms".split(" ");
|
|
1878
1878
|
let P = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), y = "";
|
|
1879
1879
|
{
|
|
1880
1880
|
const w = document.createElement("fakeelement");
|
|
1881
1881
|
if (w.style.animationName !== void 0 && (u = !0), u === !1) {
|
|
1882
|
-
for (let g = 0; g <
|
|
1883
|
-
if (w.style[
|
|
1884
|
-
y =
|
|
1882
|
+
for (let g = 0; g < b.length; g++)
|
|
1883
|
+
if (w.style[b[g] + "AnimationName"] !== void 0) {
|
|
1884
|
+
y = b[g], T = "-" + y.toLowerCase() + "-", r = P[g], u = !0;
|
|
1885
1885
|
break;
|
|
1886
1886
|
}
|
|
1887
1887
|
}
|
|
1888
1888
|
}
|
|
1889
|
-
n = "resizeanim", e = "@" + T + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ",
|
|
1889
|
+
n = "resizeanim", e = "@" + T + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", o = T + "animation: 1ms " + n + "; ";
|
|
1890
1890
|
}
|
|
1891
1891
|
const f = function(u) {
|
|
1892
1892
|
if (!u.getElementById("detectElementResize")) {
|
|
1893
|
-
const T = (e || "") + ".resize-triggers { " + (
|
|
1894
|
-
P.id = "detectElementResize", P.type = "text/css", t != null && P.setAttribute("nonce", t), P.styleSheet ? P.styleSheet.cssText = T : P.appendChild(u.createTextNode(T)),
|
|
1893
|
+
const T = (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%; }', b = u.head || u.getElementsByTagName("head")[0], P = u.createElement("style");
|
|
1894
|
+
P.id = "detectElementResize", P.type = "text/css", t != null && P.setAttribute("nonce", t), P.styleSheet ? P.styleSheet.cssText = T : P.appendChild(u.createTextNode(T)), b.appendChild(P);
|
|
1895
1895
|
}
|
|
1896
1896
|
};
|
|
1897
1897
|
return {
|
|
@@ -1900,14 +1900,14 @@ function wi(t) {
|
|
|
1900
1900
|
u.attachEvent("onresize", T);
|
|
1901
1901
|
else {
|
|
1902
1902
|
if (!u.__resizeTriggers__) {
|
|
1903
|
-
const
|
|
1904
|
-
P && P.position === "static" && (u.style.position = "relative"), f(
|
|
1905
|
-
const y =
|
|
1906
|
-
y.className = "expand-trigger", y.appendChild(
|
|
1907
|
-
const w =
|
|
1908
|
-
w.className = "contract-trigger", u.__resizeTriggers__.appendChild(y), u.__resizeTriggers__.appendChild(w), u.appendChild(u.__resizeTriggers__), c(u), u.addEventListener("scroll", d, !0),
|
|
1903
|
+
const b = u.ownerDocument, P = ue.getComputedStyle(u);
|
|
1904
|
+
P && P.position === "static" && (u.style.position = "relative"), f(b), u.__resizeLast__ = {}, u.__resizeListeners__ = [], (u.__resizeTriggers__ = b.createElement("div")).className = "resize-triggers";
|
|
1905
|
+
const y = b.createElement("div");
|
|
1906
|
+
y.className = "expand-trigger", y.appendChild(b.createElement("div"));
|
|
1907
|
+
const w = b.createElement("div");
|
|
1908
|
+
w.className = "contract-trigger", u.__resizeTriggers__.appendChild(y), u.__resizeTriggers__.appendChild(w), u.appendChild(u.__resizeTriggers__), c(u), u.addEventListener("scroll", d, !0), r && (u.__resizeTriggers__.__animationListener__ = function(h) {
|
|
1909
1909
|
h.animationName === n && c(u);
|
|
1910
|
-
}, u.__resizeTriggers__.addEventListener(
|
|
1910
|
+
}, u.__resizeTriggers__.addEventListener(r, u.__resizeTriggers__.__animationListener__));
|
|
1911
1911
|
}
|
|
1912
1912
|
u.__resizeListeners__.push(T);
|
|
1913
1913
|
}
|
|
@@ -1916,7 +1916,7 @@ function wi(t) {
|
|
|
1916
1916
|
if (s)
|
|
1917
1917
|
u.detachEvent("onresize", T);
|
|
1918
1918
|
else if (u.__resizeListeners__.splice(u.__resizeListeners__.indexOf(T), 1), !u.__resizeListeners__.length) {
|
|
1919
|
-
u.removeEventListener("scroll", d, !0), u.__resizeTriggers__.__animationListener__ && (u.__resizeTriggers__.removeEventListener(
|
|
1919
|
+
u.removeEventListener("scroll", d, !0), u.__resizeTriggers__.__animationListener__ && (u.__resizeTriggers__.removeEventListener(r, u.__resizeTriggers__.__animationListener__), u.__resizeTriggers__.__animationListener__ = null);
|
|
1920
1920
|
try {
|
|
1921
1921
|
u.__resizeTriggers__ = !u.removeChild(u.__resizeTriggers__);
|
|
1922
1922
|
} catch {
|
|
@@ -1925,7 +1925,7 @@ function wi(t) {
|
|
|
1925
1925
|
}
|
|
1926
1926
|
};
|
|
1927
1927
|
}
|
|
1928
|
-
class
|
|
1928
|
+
class bi extends ho {
|
|
1929
1929
|
constructor(...e) {
|
|
1930
1930
|
super(...e), this.state = {
|
|
1931
1931
|
height: this.props.defaultHeight || 0,
|
|
@@ -1934,12 +1934,12 @@ class _i extends pr {
|
|
|
1934
1934
|
this._timeoutId = null;
|
|
1935
1935
|
const {
|
|
1936
1936
|
disableHeight: n,
|
|
1937
|
-
disableWidth:
|
|
1938
|
-
onResize:
|
|
1937
|
+
disableWidth: r,
|
|
1938
|
+
onResize: o
|
|
1939
1939
|
} = this.props;
|
|
1940
1940
|
if (this._parentNode) {
|
|
1941
1941
|
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), d = parseFloat(a.paddingRight || "0"), s = parseFloat(a.paddingTop || "0"), f = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), C = m.height - s - f, u = m.width - c - d;
|
|
1942
|
-
if (!n && this.state.height !== C || !
|
|
1942
|
+
if (!n && this.state.height !== C || !r && this.state.width !== u) {
|
|
1943
1943
|
this.setState({
|
|
1944
1944
|
height: C,
|
|
1945
1945
|
width: u
|
|
@@ -1947,7 +1947,7 @@ class _i extends pr {
|
|
|
1947
1947
|
const T = () => {
|
|
1948
1948
|
this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
|
|
1949
1949
|
};
|
|
1950
|
-
typeof
|
|
1950
|
+
typeof o == "function" && o({
|
|
1951
1951
|
height: C,
|
|
1952
1952
|
width: u,
|
|
1953
1953
|
// TODO Remove these params in the next major release
|
|
@@ -1970,8 +1970,8 @@ class _i extends pr {
|
|
|
1970
1970
|
} = this.props, n = this._autoSizer ? this._autoSizer.parentNode : null;
|
|
1971
1971
|
if (n != null && n.ownerDocument && n.ownerDocument.defaultView && n instanceof n.ownerDocument.defaultView.HTMLElement) {
|
|
1972
1972
|
this._parentNode = n;
|
|
1973
|
-
const
|
|
1974
|
-
|
|
1973
|
+
const r = n.ownerDocument.defaultView.ResizeObserver;
|
|
1974
|
+
r != null ? (this._resizeObserver = new r(() => {
|
|
1975
1975
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1976
1976
|
}), this._resizeObserver.observe(n)) : (this._detectElementResize = wi(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1977
1977
|
}
|
|
@@ -1983,8 +1983,8 @@ class _i extends pr {
|
|
|
1983
1983
|
const {
|
|
1984
1984
|
children: e,
|
|
1985
1985
|
defaultHeight: n,
|
|
1986
|
-
defaultWidth:
|
|
1987
|
-
disableHeight:
|
|
1986
|
+
defaultWidth: r,
|
|
1987
|
+
disableHeight: o = !1,
|
|
1988
1988
|
disableWidth: a = !1,
|
|
1989
1989
|
doNotBailOutOnEmptyChildren: c = !1,
|
|
1990
1990
|
nonce: d,
|
|
@@ -1995,29 +1995,29 @@ class _i extends pr {
|
|
|
1995
1995
|
} = this.props, {
|
|
1996
1996
|
height: u,
|
|
1997
1997
|
width: T
|
|
1998
|
-
} = this.state,
|
|
1998
|
+
} = this.state, b = {
|
|
1999
1999
|
overflow: "visible"
|
|
2000
2000
|
}, P = {};
|
|
2001
2001
|
let y = !1;
|
|
2002
|
-
return
|
|
2002
|
+
return o || (u === 0 && (y = !0), b.height = 0, P.height = u, P.scaledHeight = u), a || (T === 0 && (y = !0), b.width = 0, P.width = T, P.scaledWidth = T), c && (y = !1), Qe(m, {
|
|
2003
2003
|
ref: this._setRef,
|
|
2004
2004
|
style: {
|
|
2005
|
-
...
|
|
2005
|
+
...b,
|
|
2006
2006
|
...f
|
|
2007
2007
|
},
|
|
2008
2008
|
...C
|
|
2009
2009
|
}, !y && e(P));
|
|
2010
2010
|
}
|
|
2011
2011
|
}
|
|
2012
|
-
const
|
|
2013
|
-
const { focusedPage: n, totalPages:
|
|
2012
|
+
const _i = It(({ widths: t, heights: e }) => {
|
|
2013
|
+
const { focusedPage: n, totalPages: r } = ce(), o = W(() => {
|
|
2014
2014
|
const d = [], s = Math.ceil(n / 2) * 2 - 1;
|
|
2015
|
-
if (d.push(s), s + 1 <=
|
|
2015
|
+
if (d.push(s), s + 1 <= r) {
|
|
2016
2016
|
const f = s + 1;
|
|
2017
2017
|
d.push(f);
|
|
2018
2018
|
}
|
|
2019
2019
|
return d;
|
|
2020
|
-
}, [n,
|
|
2020
|
+
}, [n, r]), a = W(() => {
|
|
2021
2021
|
const d = n % 2 === 1 ? n - 1 : n - 2, s = Math.floor(d / 2), f = e(s), m = t(d), C = t(d + 1);
|
|
2022
2022
|
return [
|
|
2023
2023
|
{
|
|
@@ -2033,25 +2033,25 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2033
2033
|
height: f
|
|
2034
2034
|
}
|
|
2035
2035
|
];
|
|
2036
|
-
}, [t, e,
|
|
2037
|
-
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children:
|
|
2036
|
+
}, [t, e, o]), c = W(() => a.reduce((d, s) => d + Number(s.width || 0), 0), [a]);
|
|
2037
|
+
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: o.map((d, s) => /* @__PURE__ */ i(qe, { style: a[s], pageNumber: d }, d)) });
|
|
2038
2038
|
}), Pi = It(({ widths: t, heights: e }) => {
|
|
2039
|
-
const { focusedPage: n, totalPages:
|
|
2039
|
+
const { focusedPage: n, totalPages: r } = ce(), o = W(() => {
|
|
2040
2040
|
const d = [];
|
|
2041
2041
|
if (n === 1)
|
|
2042
2042
|
return d.push(1), d;
|
|
2043
2043
|
const s = n - 1, m = Math.ceil(s / 2) * 2;
|
|
2044
|
-
return d.push(m), m + 1 <=
|
|
2045
|
-
}, [n,
|
|
2046
|
-
if (
|
|
2047
|
-
const T =
|
|
2048
|
-
let P =
|
|
2049
|
-
if (
|
|
2044
|
+
return d.push(m), m + 1 <= r && d.push(m + 1), d;
|
|
2045
|
+
}, [n, r]), a = W(() => {
|
|
2046
|
+
if (o.length === 1) {
|
|
2047
|
+
const T = o[0] - 1, b = t(T);
|
|
2048
|
+
let P = b * 2;
|
|
2049
|
+
if (r >= 3) {
|
|
2050
2050
|
const y = t(1), w = t(2);
|
|
2051
2051
|
P = y + w;
|
|
2052
|
-
} else if (
|
|
2052
|
+
} else if (r >= 2) {
|
|
2053
2053
|
const y = t(1);
|
|
2054
|
-
P =
|
|
2054
|
+
P = b + y;
|
|
2055
2055
|
}
|
|
2056
2056
|
return {
|
|
2057
2057
|
width: P,
|
|
@@ -2061,14 +2061,14 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2061
2061
|
alignItems: "flex-start"
|
|
2062
2062
|
};
|
|
2063
2063
|
}
|
|
2064
|
-
const s =
|
|
2064
|
+
const s = o[0] - 1, f = t(s), m = o.length > 1 ? t(s + 1) : 0;
|
|
2065
2065
|
return {
|
|
2066
2066
|
width: f + m,
|
|
2067
2067
|
position: "relative"
|
|
2068
2068
|
};
|
|
2069
|
-
}, [t,
|
|
2070
|
-
if (
|
|
2071
|
-
const
|
|
2069
|
+
}, [t, o, r]), c = W(() => {
|
|
2070
|
+
if (o.length === 1) {
|
|
2071
|
+
const b = o[0], P = b - 1, y = e(b === 1 ? 0 : Math.floor((b - 2) / 2) + 1);
|
|
2072
2072
|
return [{
|
|
2073
2073
|
width: t(P),
|
|
2074
2074
|
height: y,
|
|
@@ -2076,7 +2076,7 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2076
2076
|
// Use relative for flexbox centering
|
|
2077
2077
|
}];
|
|
2078
2078
|
}
|
|
2079
|
-
const d =
|
|
2079
|
+
const d = o[0], s = d - 1, f = Math.floor((d - 2) / 2) + 1, m = e(f), C = t(s), u = t(s + 1);
|
|
2080
2080
|
return [
|
|
2081
2081
|
{
|
|
2082
2082
|
position: "absolute",
|
|
@@ -2091,50 +2091,50 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2091
2091
|
height: m
|
|
2092
2092
|
}
|
|
2093
2093
|
];
|
|
2094
|
-
}, [t, e,
|
|
2095
|
-
return /* @__PURE__ */ i("div", { style: a, children:
|
|
2094
|
+
}, [t, e, o]);
|
|
2095
|
+
return /* @__PURE__ */ i("div", { style: a, children: o.map((d, s) => /* @__PURE__ */ i(qe, { style: c[s], pageNumber: d }, d)) });
|
|
2096
2096
|
}), Ti = ({ widths: t, heights: e }) => {
|
|
2097
|
-
const { focusedPage: n } = ce(),
|
|
2097
|
+
const { focusedPage: n } = ce(), r = W(() => ({
|
|
2098
2098
|
position: "absolute",
|
|
2099
2099
|
width: t(n - 1),
|
|
2100
2100
|
height: e(n - 1)
|
|
2101
|
-
}), [t, e, n]),
|
|
2101
|
+
}), [t, e, n]), o = W(() => t(n - 1), [t]);
|
|
2102
2102
|
return /* @__PURE__ */ i(
|
|
2103
2103
|
"div",
|
|
2104
2104
|
{
|
|
2105
2105
|
style: {
|
|
2106
|
-
width:
|
|
2106
|
+
width: o,
|
|
2107
2107
|
position: "relative"
|
|
2108
2108
|
},
|
|
2109
|
-
children: /* @__PURE__ */ i(
|
|
2109
|
+
children: /* @__PURE__ */ i(qe, { style: r, pageNumber: n }, n)
|
|
2110
2110
|
}
|
|
2111
2111
|
);
|
|
2112
|
-
}, Ci = (t, e, n,
|
|
2113
|
-
const
|
|
2114
|
-
const P =
|
|
2112
|
+
}, Ci = (t, e, n, r) => {
|
|
2113
|
+
const o = M(), { contentRef: a } = Te(), { heights: c, widths: d } = je(), { setFocusedPage: s } = ce(), [f, m] = H([]), { targetScrollPage: C } = wn(), u = Nt(f, 0, 500), T = W(() => {
|
|
2114
|
+
const P = r === oe.DUAL_PAGE_WITH_COVER, { rowsHeight: y, columnsWidth: w } = Et({ heights: c, widths: d }, t, P);
|
|
2115
2115
|
return c.map((g, h) => {
|
|
2116
|
-
const p = d[h], l =
|
|
2116
|
+
const p = d[h], l = cr(h + 1, t, P), v = w.slice(0, l.columnIndex).reduce((x, R) => x + R, 0), _ = y.slice(0, l.rowIndex).reduce((x, R) => x + R, 0), I = v + p, S = _ + g;
|
|
2117
2117
|
return {
|
|
2118
2118
|
pageNumber: h + 1,
|
|
2119
2119
|
...l,
|
|
2120
2120
|
width: p,
|
|
2121
2121
|
height: g,
|
|
2122
2122
|
startX: v,
|
|
2123
|
-
startY:
|
|
2123
|
+
startY: _,
|
|
2124
2124
|
endX: I,
|
|
2125
2125
|
endY: S
|
|
2126
2126
|
};
|
|
2127
2127
|
});
|
|
2128
|
-
}, [c, d, t, e,
|
|
2128
|
+
}, [c, d, t, e, r]);
|
|
2129
2129
|
A(() => {
|
|
2130
2130
|
var y;
|
|
2131
2131
|
u.length > 0 && !C.current && s(u[0].pageNumber), ((y = u[0]) == null ? void 0 : y.ratio) && u.some((w) => w.pageNumber === C.current) && setTimeout(() => {
|
|
2132
2132
|
C.current = void 0;
|
|
2133
2133
|
}, 500);
|
|
2134
2134
|
}, [u, s]);
|
|
2135
|
-
const
|
|
2135
|
+
const b = N(
|
|
2136
2136
|
(P) => {
|
|
2137
|
-
|
|
2137
|
+
o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
|
|
2138
2138
|
const y = P.target, w = {
|
|
2139
2139
|
startTop: y.scrollTop,
|
|
2140
2140
|
startLeft: y.scrollLeft,
|
|
@@ -2144,7 +2144,7 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2144
2144
|
const p = h.endX >= w.startLeft && h.endY >= w.startTop, l = h.startX <= w.endLeft && h.startY <= w.endTop;
|
|
2145
2145
|
return p && l;
|
|
2146
2146
|
}).map((h) => {
|
|
2147
|
-
const p = w.startLeft > h.startX ? w.startLeft : h.startX, l = w.startTop > h.startY ? w.startTop : h.startY, v = w.endLeft < h.endX ? w.endLeft : h.endX,
|
|
2147
|
+
const p = w.startLeft > h.startX ? w.startLeft : h.startX, l = w.startTop > h.startY ? w.startTop : h.startY, v = w.endLeft < h.endX ? w.endLeft : h.endX, _ = w.endTop < h.endY ? w.endTop : h.endY, I = v - p, S = _ - l, R = +(I * S / (h.width * h.height) * 100).toFixed(2);
|
|
2148
2148
|
return {
|
|
2149
2149
|
pageNumber: h.pageNumber,
|
|
2150
2150
|
ratio: R
|
|
@@ -2157,12 +2157,12 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2157
2157
|
);
|
|
2158
2158
|
A(() => {
|
|
2159
2159
|
if (n)
|
|
2160
|
-
return n == null || n.addEventListener("scroll",
|
|
2161
|
-
n == null || n.removeEventListener("scroll",
|
|
2160
|
+
return n == null || n.addEventListener("scroll", b), () => {
|
|
2161
|
+
n == null || n.removeEventListener("scroll", b);
|
|
2162
2162
|
};
|
|
2163
|
-
}, [n,
|
|
2163
|
+
}, [n, b]);
|
|
2164
2164
|
}, zn = at((t, e) => {
|
|
2165
|
-
const { children: n, toolbarRef:
|
|
2165
|
+
const { children: n, toolbarRef: r, style: o, className: a, ...c } = t, { customVariables: d, customDarkVariables: s } = Ao(), { darkMode: f } = bo();
|
|
2166
2166
|
return /* @__PURE__ */ i(
|
|
2167
2167
|
"div",
|
|
2168
2168
|
{
|
|
@@ -2175,41 +2175,41 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2175
2175
|
a
|
|
2176
2176
|
),
|
|
2177
2177
|
style: {
|
|
2178
|
-
"--rp-toolbar-height": `${(
|
|
2178
|
+
"--rp-toolbar-height": `${(r == null ? void 0 : r.clientHeight) || 48}px`,
|
|
2179
2179
|
...d,
|
|
2180
2180
|
...f ? s : {},
|
|
2181
|
-
...
|
|
2181
|
+
...o
|
|
2182
2182
|
},
|
|
2183
2183
|
children: n
|
|
2184
2184
|
}
|
|
2185
2185
|
);
|
|
2186
|
-
}), yi = It(({ columnIndex: t, rowIndex: e, data: n, style:
|
|
2187
|
-
const
|
|
2188
|
-
if (
|
|
2186
|
+
}), yi = It(({ columnIndex: t, rowIndex: e, data: n, style: r }) => {
|
|
2187
|
+
const o = lr(e, t, n.columnCount, n.isDualPageWithCover);
|
|
2188
|
+
if (o <= 0)
|
|
2189
2189
|
return null;
|
|
2190
2190
|
if (n.isDualPageWithCover) {
|
|
2191
|
-
const c =
|
|
2192
|
-
if (e === 0 &&
|
|
2191
|
+
const c = o === n.totalPages && n.totalPages % 2 === 0;
|
|
2192
|
+
if (e === 0 && o === 1 || c && t === 0) {
|
|
2193
2193
|
const s = n.columnWidths.reduce((f, m) => f + m, 0);
|
|
2194
2194
|
return /* @__PURE__ */ i(
|
|
2195
2195
|
"div",
|
|
2196
2196
|
{
|
|
2197
2197
|
style: {
|
|
2198
|
-
...
|
|
2198
|
+
...r,
|
|
2199
2199
|
width: s,
|
|
2200
2200
|
display: "flex",
|
|
2201
2201
|
justifyContent: "center",
|
|
2202
2202
|
alignItems: "flex-start"
|
|
2203
2203
|
},
|
|
2204
|
-
children: /* @__PURE__ */ i(
|
|
2204
|
+
children: /* @__PURE__ */ i(qe, { style: { position: "relative" }, pageNumber: o }, o)
|
|
2205
2205
|
}
|
|
2206
2206
|
);
|
|
2207
2207
|
}
|
|
2208
2208
|
}
|
|
2209
|
-
return /* @__PURE__ */ i(
|
|
2209
|
+
return /* @__PURE__ */ i(qe, { style: r, pageNumber: o }, o);
|
|
2210
2210
|
}, gi), yc = () => {
|
|
2211
|
-
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = xt(), { pagesRef:
|
|
2212
|
-
|
|
2211
|
+
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = xt(), { pagesRef: r, setPagesRef: o, setContentRef: a } = Te(), { scrollToPage: c } = yn();
|
|
2212
|
+
fr(r);
|
|
2213
2213
|
const {
|
|
2214
2214
|
virtualScrollRef: d,
|
|
2215
2215
|
getVirtualScrollRef: s,
|
|
@@ -2218,70 +2218,70 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2218
2218
|
setTotalInnerDimensions: C,
|
|
2219
2219
|
virtualScrollableElementRef: u,
|
|
2220
2220
|
totalInnerDimensions: T,
|
|
2221
|
-
pageScrollElementRef:
|
|
2222
|
-
} =
|
|
2221
|
+
pageScrollElementRef: b
|
|
2222
|
+
} = rt(), P = M(!0), { nextPage: y, prevPage: w, setFocusedPage: g, focusedPage: h, totalPages: p } = ce(), { scrollMode: l } = Ae(), { viewMode: v } = He(), _ = M(null), { loading: I, error: S } = re(), { passwordRequired: x } = wo(), { LoaderImageComponent: R } = St(), O = M(
|
|
2223
2223
|
T
|
|
2224
2224
|
), D = M({
|
|
2225
2225
|
viewMode: v,
|
|
2226
2226
|
scrollMode: l
|
|
2227
|
-
}), z = M(!1), E = M(), { isFullScreen: L } =
|
|
2227
|
+
}), z = M(!1), E = M(), { isFullScreen: L } = To(), {
|
|
2228
2228
|
pageDimension: F,
|
|
2229
2229
|
rowCount: G,
|
|
2230
|
-
rowHeight:
|
|
2231
|
-
columnCount:
|
|
2230
|
+
rowHeight: U,
|
|
2231
|
+
columnCount: V,
|
|
2232
2232
|
columnWidth: B,
|
|
2233
|
-
estimatedColumnWidth:
|
|
2233
|
+
estimatedColumnWidth: Z,
|
|
2234
2234
|
estimatedRowHeight: ae,
|
|
2235
2235
|
totalDimension: $
|
|
2236
|
-
} = vi(), Q = Nt(T, 100), { onScroll: J } =
|
|
2237
|
-
Ci(
|
|
2236
|
+
} = vi(), Q = Nt(T, 100), { onScroll: J } = Do(), te = M();
|
|
2237
|
+
Ci(V, G, u, v);
|
|
2238
2238
|
const ee = M({
|
|
2239
2239
|
scrollTop: 0,
|
|
2240
2240
|
scrollLeft: 0
|
|
2241
2241
|
});
|
|
2242
|
-
|
|
2243
|
-
const { isPressed: Y } =
|
|
2242
|
+
pr(r);
|
|
2243
|
+
const { isPressed: Y } = dr(), { selectionMode: we } = Po(), { initializeGrabScroll: me, resetGrabState: Re } = ur({
|
|
2244
2244
|
isPressed: Y
|
|
2245
|
-
}), Le = W(() => we ===
|
|
2246
|
-
const
|
|
2245
|
+
}), Le = W(() => we === go.HAND, [we]), lt = W(() => {
|
|
2246
|
+
const q = Array.from({ length: V }, (j, be) => B(be));
|
|
2247
2247
|
return {
|
|
2248
|
-
columnCount:
|
|
2249
|
-
isDualPageWithCover: v ===
|
|
2250
|
-
columnWidths:
|
|
2248
|
+
columnCount: V,
|
|
2249
|
+
isDualPageWithCover: v === oe.DUAL_PAGE_WITH_COVER,
|
|
2250
|
+
columnWidths: q,
|
|
2251
2251
|
totalPages: p
|
|
2252
2252
|
};
|
|
2253
|
-
}, [
|
|
2254
|
-
(
|
|
2255
|
-
const
|
|
2256
|
-
!L &&
|
|
2253
|
+
}, [V, v, B, p]), dt = N(
|
|
2254
|
+
(q) => {
|
|
2255
|
+
const j = document.activeElement !== r;
|
|
2256
|
+
!L && j || (["ArrowUp", "ArrowLeft"].includes(q.key) ? (q.preventDefault(), w()) : ["ArrowDown", "ArrowRight"].includes(q.key) && (q.preventDefault(), y()));
|
|
2257
2257
|
},
|
|
2258
2258
|
[y, w, L, l]
|
|
2259
2259
|
);
|
|
2260
2260
|
A(() => (window.addEventListener("keydown", dt), () => {
|
|
2261
2261
|
window.removeEventListener("keydown", dt);
|
|
2262
2262
|
}), [dt]), A(() => {
|
|
2263
|
-
if (
|
|
2264
|
-
for (let
|
|
2265
|
-
for (let
|
|
2263
|
+
if (_.current && (_.current.style.position = "relative"), !!d)
|
|
2264
|
+
for (let q = 0; q < G; q++)
|
|
2265
|
+
for (let j = 0; j < V; j++)
|
|
2266
2266
|
d.resetAfterIndices({
|
|
2267
|
-
columnIndex:
|
|
2268
|
-
rowIndex:
|
|
2267
|
+
columnIndex: j,
|
|
2268
|
+
rowIndex: q,
|
|
2269
2269
|
shouldForceUpdate: !0
|
|
2270
2270
|
});
|
|
2271
|
-
}, [G,
|
|
2272
|
-
const
|
|
2273
|
-
(
|
|
2271
|
+
}, [G, V, F, d]);
|
|
2272
|
+
const oo = N(
|
|
2273
|
+
(q, j) => {
|
|
2274
2274
|
if (!u)
|
|
2275
2275
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
2276
|
-
const
|
|
2277
|
-
return
|
|
2276
|
+
const be = ee.current.scrollTop > j, Ee = ee.current.scrollLeft > q;
|
|
2277
|
+
return be || Ee ? ee.current : {
|
|
2278
2278
|
scrollTop: u.scrollTop,
|
|
2279
2279
|
scrollLeft: u.scrollLeft
|
|
2280
2280
|
};
|
|
2281
2281
|
},
|
|
2282
2282
|
[u]
|
|
2283
2283
|
), kt = N(
|
|
2284
|
-
(
|
|
2284
|
+
(q, j) => {
|
|
2285
2285
|
if (D.current.viewMode !== v || D.current.scrollMode !== l) {
|
|
2286
2286
|
te.current && clearTimeout(te.current), z.current = !0, c(h, "auto"), te.current = setTimeout(() => {
|
|
2287
2287
|
requestAnimationFrame(() => {
|
|
@@ -2290,68 +2290,68 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2290
2290
|
}, 100);
|
|
2291
2291
|
return;
|
|
2292
2292
|
}
|
|
2293
|
-
const Ee =
|
|
2294
|
-
if (!
|
|
2293
|
+
const Ee = q.scrollTop, ut = q.scrollLeft;
|
|
2294
|
+
if (!j.height || !j.width)
|
|
2295
2295
|
return;
|
|
2296
2296
|
z.current = !0;
|
|
2297
|
-
const { height: Ne, width: pt } =
|
|
2297
|
+
const { height: Ne, width: pt } = j, { height: Mt, width: Ht } = O.current;
|
|
2298
2298
|
if (Mt === Ne && Ht === pt)
|
|
2299
2299
|
return;
|
|
2300
|
-
const
|
|
2300
|
+
const so = Ee / Mt * Ne, co = ut / Ht * pt, lo = Math.round(Math.min(so, Ne)) || 0, uo = Math.round(Math.min(co, pt)) || 0;
|
|
2301
2301
|
E.current = setTimeout(() => {
|
|
2302
2302
|
requestAnimationFrame(() => {
|
|
2303
2303
|
u == null || u.scrollTo({
|
|
2304
|
-
top:
|
|
2305
|
-
left:
|
|
2304
|
+
top: lo,
|
|
2305
|
+
left: uo,
|
|
2306
2306
|
behavior: "auto"
|
|
2307
2307
|
});
|
|
2308
2308
|
});
|
|
2309
2309
|
}, 0), O.current = {
|
|
2310
|
-
height:
|
|
2311
|
-
width:
|
|
2310
|
+
height: j.height,
|
|
2311
|
+
width: j.width
|
|
2312
2312
|
};
|
|
2313
2313
|
},
|
|
2314
2314
|
[u, v, l, c]
|
|
2315
2315
|
);
|
|
2316
2316
|
A(() => {
|
|
2317
2317
|
clearTimeout(E.current);
|
|
2318
|
-
const
|
|
2319
|
-
(Ee, ut, Ne) => Ee +
|
|
2318
|
+
const q = Array.from({ length: G }).reduce(
|
|
2319
|
+
(Ee, ut, Ne) => Ee + U(Ne),
|
|
2320
2320
|
0
|
|
2321
|
-
),
|
|
2321
|
+
), j = Array.from({ length: V }).reduce(
|
|
2322
2322
|
(Ee, ut, Ne) => Ee + B(Ne),
|
|
2323
2323
|
0
|
|
2324
|
-
),
|
|
2325
|
-
ee.current =
|
|
2326
|
-
height:
|
|
2327
|
-
width:
|
|
2324
|
+
), be = oo(j, q);
|
|
2325
|
+
ee.current = be, kt(be, { height: q, width: j }), C({
|
|
2326
|
+
height: q,
|
|
2327
|
+
width: j
|
|
2328
2328
|
});
|
|
2329
|
-
}, [F, G,
|
|
2330
|
-
const
|
|
2331
|
-
(
|
|
2329
|
+
}, [F, G, V, kt]);
|
|
2330
|
+
const ro = N(
|
|
2331
|
+
(q) => {
|
|
2332
2332
|
ee.current = {
|
|
2333
|
-
scrollTop:
|
|
2334
|
-
scrollLeft:
|
|
2333
|
+
scrollTop: q.scrollTop,
|
|
2334
|
+
scrollLeft: q.scrollLeft
|
|
2335
2335
|
};
|
|
2336
2336
|
},
|
|
2337
2337
|
[u]
|
|
2338
2338
|
);
|
|
2339
2339
|
A(() => {
|
|
2340
2340
|
if (J)
|
|
2341
|
-
return
|
|
2342
|
-
|
|
2341
|
+
return b && b.addEventListener("scroll", J), u && u.addEventListener("scroll", J), () => {
|
|
2342
|
+
b == null || b.removeEventListener("scroll", J), u == null || u.removeEventListener("scroll", J);
|
|
2343
2343
|
};
|
|
2344
|
-
}, [u,
|
|
2344
|
+
}, [u, b, J]), A(() => () => {
|
|
2345
2345
|
te.current && clearTimeout(te.current);
|
|
2346
2346
|
}, []);
|
|
2347
|
-
const
|
|
2347
|
+
const io = W(() => se(le["rp-pages-container"], {
|
|
2348
2348
|
[le["rp-cursor-grab"]]: Le && !Y,
|
|
2349
2349
|
[le["rp-cursor-grabbing"]]: Le && Y
|
|
2350
|
-
}), [Le, Y]),
|
|
2351
|
-
(
|
|
2352
|
-
if (Le &&
|
|
2353
|
-
const
|
|
2354
|
-
me(
|
|
2350
|
+
}), [Le, Y]), ao = N(
|
|
2351
|
+
(q) => {
|
|
2352
|
+
if (Le && q) {
|
|
2353
|
+
const j = se(le["rp-pages"]), be = document.querySelector(`.${j}`);
|
|
2354
|
+
me(be);
|
|
2355
2355
|
}
|
|
2356
2356
|
},
|
|
2357
2357
|
[Le, me, le]
|
|
@@ -2361,7 +2361,7 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2361
2361
|
}, [I]), A(() => {
|
|
2362
2362
|
if (!(Q.height === 0 || !P.current)) {
|
|
2363
2363
|
if (e === ie.PAGE_SCROLLING) {
|
|
2364
|
-
t !== h &&
|
|
2364
|
+
t !== h && b && g(t), P.current = !1;
|
|
2365
2365
|
return;
|
|
2366
2366
|
}
|
|
2367
2367
|
c(t, "auto"), g(t), P.current = !1;
|
|
@@ -2369,24 +2369,24 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2369
2369
|
}, [
|
|
2370
2370
|
c,
|
|
2371
2371
|
e,
|
|
2372
|
-
|
|
2372
|
+
b,
|
|
2373
2373
|
g,
|
|
2374
2374
|
Q
|
|
2375
2375
|
]), /* @__PURE__ */ k(he, { children: [
|
|
2376
|
-
/* @__PURE__ */ i(
|
|
2376
|
+
/* @__PURE__ */ i(Zo, { ref: a, children: /* @__PURE__ */ i(
|
|
2377
2377
|
zn,
|
|
2378
2378
|
{
|
|
2379
2379
|
id: n,
|
|
2380
|
-
ref:
|
|
2380
|
+
ref: o,
|
|
2381
2381
|
tabIndex: -1,
|
|
2382
|
-
className:
|
|
2383
|
-
children: /* @__PURE__ */ i(
|
|
2382
|
+
className: io,
|
|
2383
|
+
children: /* @__PURE__ */ i(bi, { style: { minHeight: "50px" }, children: ({ width: q, height: j }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: ao, style: { width: q, height: j }, children: l === ie.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2384
2384
|
"div",
|
|
2385
2385
|
{
|
|
2386
2386
|
ref: f,
|
|
2387
|
-
style: { width:
|
|
2387
|
+
style: { width: q, height: j },
|
|
2388
2388
|
className: se(le["rp-pages"], le["rp-page-scrolling-wrapper"]),
|
|
2389
|
-
children: v ===
|
|
2389
|
+
children: v === oe.DUAL_PAGE ? /* @__PURE__ */ i(_i, { widths: B, heights: U }) : v === oe.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ i(Pi, { widths: B, heights: U }) : /* @__PURE__ */ i(Ti, { widths: B, heights: U })
|
|
2390
2390
|
}
|
|
2391
2391
|
) : ae ? /* @__PURE__ */ i(
|
|
2392
2392
|
hi,
|
|
@@ -2394,14 +2394,14 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2394
2394
|
ref: s,
|
|
2395
2395
|
itemData: lt,
|
|
2396
2396
|
outerRef: m,
|
|
2397
|
-
innerRef:
|
|
2398
|
-
onScroll:
|
|
2399
|
-
columnCount:
|
|
2397
|
+
innerRef: _,
|
|
2398
|
+
onScroll: ro,
|
|
2399
|
+
columnCount: V,
|
|
2400
2400
|
columnWidth: B,
|
|
2401
|
-
rowHeight:
|
|
2402
|
-
height:
|
|
2403
|
-
width:
|
|
2404
|
-
estimatedColumnWidth:
|
|
2401
|
+
rowHeight: U,
|
|
2402
|
+
height: j,
|
|
2403
|
+
width: q,
|
|
2404
|
+
estimatedColumnWidth: Z,
|
|
2405
2405
|
estimatedRowHeight: ae,
|
|
2406
2406
|
rowCount: G,
|
|
2407
2407
|
className: se(
|
|
@@ -2412,7 +2412,7 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2412
2412
|
"--rp-pages-height": `${$.height}px`,
|
|
2413
2413
|
"--rp-pages-width": `${$.width}px`,
|
|
2414
2414
|
"--rp-row-count": `${G}`,
|
|
2415
|
-
"--rp-column-count": `${
|
|
2415
|
+
"--rp-column-count": `${V}`
|
|
2416
2416
|
},
|
|
2417
2417
|
children: yi
|
|
2418
2418
|
}
|
|
@@ -2429,7 +2429,7 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2429
2429
|
},
|
|
2430
2430
|
children: R && /* @__PURE__ */ i(R, {})
|
|
2431
2431
|
}
|
|
2432
|
-
) : S ===
|
|
2432
|
+
) : S === vo.NOT_SUPPORTED ? /* @__PURE__ */ i("div", { className: le["rp-not-supported"], children: /* @__PURE__ */ k("div", { className: le["rp-not-supported-content"], children: [
|
|
2433
2433
|
"React PDF is unable to render on this browser. Please use the supported browsers from the list below:",
|
|
2434
2434
|
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ k("ul", { children: [
|
|
2435
2435
|
/* @__PURE__ */ i("li", { children: "Chrome 119+" }),
|
|
@@ -2442,7 +2442,7 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2442
2442
|
] }) }) : null }) })
|
|
2443
2443
|
}
|
|
2444
2444
|
) }),
|
|
2445
|
-
x && /* @__PURE__ */ i(
|
|
2445
|
+
x && /* @__PURE__ */ i(hr, {})
|
|
2446
2446
|
] });
|
|
2447
2447
|
}, $e = {
|
|
2448
2448
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
@@ -2450,22 +2450,22 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2450
2450
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
2451
2451
|
"rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
|
|
2452
2452
|
"rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
|
|
2453
|
-
},
|
|
2453
|
+
}, _t = {
|
|
2454
2454
|
"rp-paginate": "_rp-paginate_1yinm_1",
|
|
2455
2455
|
"rp-page-input": "_rp-page-input_1yinm_6",
|
|
2456
2456
|
"rp-total-page": "_rp-total-page_1yinm_29"
|
|
2457
2457
|
}, Ii = () => {
|
|
2458
2458
|
const { prevIcon: t } = ve(), { prevIcon: e } = ge();
|
|
2459
|
-
return t || e || /* @__PURE__ */ i(
|
|
2459
|
+
return t || e || /* @__PURE__ */ i(Ve, {});
|
|
2460
2460
|
}, xi = () => {
|
|
2461
2461
|
const { nextIcon: t } = ve(), { nextIcon: e } = ge();
|
|
2462
|
-
return t || e || /* @__PURE__ */ i(
|
|
2462
|
+
return t || e || /* @__PURE__ */ i(Ve, { style: { transform: "rotate(180deg" } });
|
|
2463
2463
|
}, Si = () => {
|
|
2464
|
-
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage:
|
|
2464
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: a } = ce(), [c, d] = H(t.toString()), { pageNavigationTool: s = !0 } = Ce(), { pageNavigationTool: f = !0 } = xe(), { isSmallScreen: m } = Se(), { viewMode: C } = He(), { scrollMode: u } = Ae(), { localeMessages: T } = pe();
|
|
2465
2465
|
A(() => {
|
|
2466
2466
|
d(t.toString());
|
|
2467
2467
|
}, [t]);
|
|
2468
|
-
const
|
|
2468
|
+
const b = N((h) => {
|
|
2469
2469
|
const p = h.target.value;
|
|
2470
2470
|
d(p);
|
|
2471
2471
|
}, []), P = N(async () => {
|
|
@@ -2478,14 +2478,14 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2478
2478
|
h.key === "Enter" && P();
|
|
2479
2479
|
},
|
|
2480
2480
|
[P]
|
|
2481
|
-
), g = W(() => C ===
|
|
2481
|
+
), g = W(() => C === oe.DUAL_PAGE && u === ie.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, C, u]);
|
|
2482
2482
|
return !s || !f ? null : typeof s != "boolean" ? /* @__PURE__ */ i(
|
|
2483
2483
|
s,
|
|
2484
2484
|
{
|
|
2485
2485
|
total: e,
|
|
2486
2486
|
current: t,
|
|
2487
|
-
nextPage:
|
|
2488
|
-
prevPage:
|
|
2487
|
+
nextPage: r,
|
|
2488
|
+
prevPage: o,
|
|
2489
2489
|
goToPage: a,
|
|
2490
2490
|
changePage: n
|
|
2491
2491
|
}
|
|
@@ -2494,16 +2494,16 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2494
2494
|
{
|
|
2495
2495
|
total: e,
|
|
2496
2496
|
current: t,
|
|
2497
|
-
nextPage:
|
|
2498
|
-
prevPage:
|
|
2497
|
+
nextPage: r,
|
|
2498
|
+
prevPage: o,
|
|
2499
2499
|
goToPage: a,
|
|
2500
2500
|
changePage: n
|
|
2501
2501
|
}
|
|
2502
|
-
) : /* @__PURE__ */ k("div", { className:
|
|
2502
|
+
) : /* @__PURE__ */ k("div", { className: _t["rp-paginate"], children: [
|
|
2503
2503
|
!m && /* @__PURE__ */ i(K, { content: T == null ? void 0 : T.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2504
2504
|
de,
|
|
2505
2505
|
{
|
|
2506
|
-
onClick:
|
|
2506
|
+
onClick: o,
|
|
2507
2507
|
"aria-label": T == null ? void 0 : T.previousPageTooltip,
|
|
2508
2508
|
"aria-disabled": t === 1,
|
|
2509
2509
|
children: /* @__PURE__ */ i(Ii, {})
|
|
@@ -2514,9 +2514,9 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2514
2514
|
{
|
|
2515
2515
|
onKeyDown: w,
|
|
2516
2516
|
onBlur: y,
|
|
2517
|
-
onChange:
|
|
2517
|
+
onChange: b,
|
|
2518
2518
|
value: c,
|
|
2519
|
-
className:
|
|
2519
|
+
className: _t["rp-page-input"],
|
|
2520
2520
|
id: "page-input",
|
|
2521
2521
|
name: "page-input",
|
|
2522
2522
|
"aria-label": T == null ? void 0 : T.currentPageTooltip,
|
|
@@ -2528,14 +2528,14 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2528
2528
|
max: e
|
|
2529
2529
|
}
|
|
2530
2530
|
) }),
|
|
2531
|
-
/* @__PURE__ */ k("span", { className:
|
|
2531
|
+
/* @__PURE__ */ k("span", { className: _t["rp-total-page"], children: [
|
|
2532
2532
|
"/",
|
|
2533
2533
|
e
|
|
2534
2534
|
] }),
|
|
2535
2535
|
!m && /* @__PURE__ */ i(K, { content: T == null ? void 0 : T.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2536
2536
|
de,
|
|
2537
2537
|
{
|
|
2538
|
-
onClick:
|
|
2538
|
+
onClick: r,
|
|
2539
2539
|
"aria-label": T == null ? void 0 : T.nextPageTooltip,
|
|
2540
2540
|
"aria-disabled": g,
|
|
2541
2541
|
children: /* @__PURE__ */ i(xi, {})
|
|
@@ -2543,17 +2543,17 @@ const bi = It(({ widths: t, heights: e }) => {
|
|
|
2543
2543
|
) })
|
|
2544
2544
|
] });
|
|
2545
2545
|
};
|
|
2546
|
-
var ct = "Dialog", [Wn, Ic] =
|
|
2546
|
+
var ct = "Dialog", [Wn, Ic] = _r(ct), [Ri, fe] = Wn(ct), Fn = (t) => {
|
|
2547
2547
|
const {
|
|
2548
2548
|
__scopeDialog: e,
|
|
2549
2549
|
children: n,
|
|
2550
|
-
open:
|
|
2551
|
-
defaultOpen:
|
|
2550
|
+
open: r,
|
|
2551
|
+
defaultOpen: o,
|
|
2552
2552
|
onOpenChange: a,
|
|
2553
2553
|
modal: c = !0
|
|
2554
|
-
} = t, d = X.useRef(null), s = X.useRef(null), [f, m] =
|
|
2555
|
-
prop:
|
|
2556
|
-
defaultProp:
|
|
2554
|
+
} = t, d = X.useRef(null), s = X.useRef(null), [f, m] = Tr({
|
|
2555
|
+
prop: r,
|
|
2556
|
+
defaultProp: o ?? !1,
|
|
2557
2557
|
onChange: a,
|
|
2558
2558
|
caller: ct
|
|
2559
2559
|
});
|
|
@@ -2577,18 +2577,18 @@ var ct = "Dialog", [Wn, Ic] = bo(ct), [Ri, fe] = Wn(ct), Fn = (t) => {
|
|
|
2577
2577
|
Fn.displayName = ct;
|
|
2578
2578
|
var kn = "DialogTrigger", Li = X.forwardRef(
|
|
2579
2579
|
(t, e) => {
|
|
2580
|
-
const { __scopeDialog: n, ...
|
|
2580
|
+
const { __scopeDialog: n, ...r } = t, o = fe(kn, n), a = Ot(e, o.triggerRef);
|
|
2581
2581
|
return /* @__PURE__ */ i(
|
|
2582
2582
|
Ke.button,
|
|
2583
2583
|
{
|
|
2584
2584
|
type: "button",
|
|
2585
2585
|
"aria-haspopup": "dialog",
|
|
2586
|
-
"aria-expanded":
|
|
2587
|
-
"aria-controls":
|
|
2588
|
-
"data-state": Ft(
|
|
2589
|
-
...
|
|
2586
|
+
"aria-expanded": o.open,
|
|
2587
|
+
"aria-controls": o.contentId,
|
|
2588
|
+
"data-state": Ft(o.open),
|
|
2589
|
+
...r,
|
|
2590
2590
|
ref: a,
|
|
2591
|
-
onClick:
|
|
2591
|
+
onClick: Ue(t.onClick, o.onOpenToggle)
|
|
2592
2592
|
}
|
|
2593
2593
|
);
|
|
2594
2594
|
}
|
|
@@ -2597,64 +2597,64 @@ Li.displayName = kn;
|
|
|
2597
2597
|
var zt = "DialogPortal", [Ei, Mn] = Wn(zt, {
|
|
2598
2598
|
forceMount: void 0
|
|
2599
2599
|
}), Hn = (t) => {
|
|
2600
|
-
const { __scopeDialog: e, forceMount: n, children:
|
|
2601
|
-
return /* @__PURE__ */ i(Ei, { scope: e, forceMount: n, children: X.Children.map(
|
|
2600
|
+
const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, a = fe(zt, e);
|
|
2601
|
+
return /* @__PURE__ */ i(Ei, { scope: e, forceMount: n, children: X.Children.map(r, (c) => /* @__PURE__ */ i(Dt, { present: n || a.open, children: /* @__PURE__ */ i(Lr, { asChild: !0, container: o, children: c }) })) });
|
|
2602
2602
|
};
|
|
2603
2603
|
Hn.displayName = zt;
|
|
2604
2604
|
var nt = "DialogOverlay", $n = X.forwardRef(
|
|
2605
2605
|
(t, e) => {
|
|
2606
|
-
const n = Mn(nt, t.__scopeDialog), { forceMount:
|
|
2607
|
-
return a.modal ? /* @__PURE__ */ i(Dt, { present:
|
|
2606
|
+
const n = Mn(nt, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, a = fe(nt, t.__scopeDialog);
|
|
2607
|
+
return a.modal ? /* @__PURE__ */ i(Dt, { present: r || a.open, children: /* @__PURE__ */ i(Oi, { ...o, ref: e }) }) : null;
|
|
2608
2608
|
}
|
|
2609
2609
|
);
|
|
2610
2610
|
$n.displayName = nt;
|
|
2611
|
-
var Ni =
|
|
2611
|
+
var Ni = Cr("DialogOverlay.RemoveScroll"), Oi = X.forwardRef(
|
|
2612
2612
|
(t, e) => {
|
|
2613
|
-
const { __scopeDialog: n, ...
|
|
2613
|
+
const { __scopeDialog: n, ...r } = t, o = fe(nt, n);
|
|
2614
2614
|
return (
|
|
2615
2615
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2616
2616
|
// ie. when `Overlay` and `Content` are siblings
|
|
2617
|
-
/* @__PURE__ */ i(
|
|
2617
|
+
/* @__PURE__ */ i(Ir, { as: Ni, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ i(
|
|
2618
2618
|
Ke.div,
|
|
2619
2619
|
{
|
|
2620
|
-
"data-state": Ft(
|
|
2621
|
-
...
|
|
2620
|
+
"data-state": Ft(o.open),
|
|
2621
|
+
...r,
|
|
2622
2622
|
ref: e,
|
|
2623
|
-
style: { pointerEvents: "auto", ...
|
|
2623
|
+
style: { pointerEvents: "auto", ...r.style }
|
|
2624
2624
|
}
|
|
2625
2625
|
) })
|
|
2626
2626
|
);
|
|
2627
2627
|
}
|
|
2628
2628
|
), De = "DialogContent", Gn = X.forwardRef(
|
|
2629
2629
|
(t, e) => {
|
|
2630
|
-
const n = Mn(De, t.__scopeDialog), { forceMount:
|
|
2631
|
-
return /* @__PURE__ */ i(Dt, { present:
|
|
2630
|
+
const n = Mn(De, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, a = fe(De, t.__scopeDialog);
|
|
2631
|
+
return /* @__PURE__ */ i(Dt, { present: r || a.open, children: a.modal ? /* @__PURE__ */ i(Di, { ...o, ref: e }) : /* @__PURE__ */ i(Ai, { ...o, ref: e }) });
|
|
2632
2632
|
}
|
|
2633
2633
|
);
|
|
2634
2634
|
Gn.displayName = De;
|
|
2635
2635
|
var Di = X.forwardRef(
|
|
2636
2636
|
(t, e) => {
|
|
2637
|
-
const n = fe(De, t.__scopeDialog),
|
|
2637
|
+
const n = fe(De, t.__scopeDialog), r = X.useRef(null), o = Ot(e, n.contentRef, r);
|
|
2638
2638
|
return X.useEffect(() => {
|
|
2639
|
-
const a =
|
|
2639
|
+
const a = r.current;
|
|
2640
2640
|
if (a)
|
|
2641
|
-
return
|
|
2641
|
+
return xr(a);
|
|
2642
2642
|
}, []), /* @__PURE__ */ i(
|
|
2643
|
-
|
|
2643
|
+
Un,
|
|
2644
2644
|
{
|
|
2645
2645
|
...t,
|
|
2646
|
-
ref:
|
|
2646
|
+
ref: o,
|
|
2647
2647
|
trapFocus: n.open,
|
|
2648
2648
|
disableOutsidePointerEvents: !0,
|
|
2649
|
-
onCloseAutoFocus:
|
|
2649
|
+
onCloseAutoFocus: Ue(t.onCloseAutoFocus, (a) => {
|
|
2650
2650
|
var c;
|
|
2651
2651
|
a.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
|
|
2652
2652
|
}),
|
|
2653
|
-
onPointerDownOutside:
|
|
2653
|
+
onPointerDownOutside: Ue(t.onPointerDownOutside, (a) => {
|
|
2654
2654
|
const c = a.detail.originalEvent, d = c.button === 0 && c.ctrlKey === !0;
|
|
2655
2655
|
(c.button === 2 || d) && a.preventDefault();
|
|
2656
2656
|
}),
|
|
2657
|
-
onFocusOutside:
|
|
2657
|
+
onFocusOutside: Ue(
|
|
2658
2658
|
t.onFocusOutside,
|
|
2659
2659
|
(a) => a.preventDefault()
|
|
2660
2660
|
)
|
|
@@ -2663,9 +2663,9 @@ var Di = X.forwardRef(
|
|
|
2663
2663
|
}
|
|
2664
2664
|
), Ai = X.forwardRef(
|
|
2665
2665
|
(t, e) => {
|
|
2666
|
-
const n = fe(De, t.__scopeDialog),
|
|
2666
|
+
const n = fe(De, t.__scopeDialog), r = X.useRef(!1), o = X.useRef(!1);
|
|
2667
2667
|
return /* @__PURE__ */ i(
|
|
2668
|
-
|
|
2668
|
+
Un,
|
|
2669
2669
|
{
|
|
2670
2670
|
...t,
|
|
2671
2671
|
ref: e,
|
|
@@ -2673,31 +2673,31 @@ var Di = X.forwardRef(
|
|
|
2673
2673
|
disableOutsidePointerEvents: !1,
|
|
2674
2674
|
onCloseAutoFocus: (a) => {
|
|
2675
2675
|
var c, d;
|
|
2676
|
-
(c = t.onCloseAutoFocus) == null || c.call(t, a), a.defaultPrevented || (
|
|
2676
|
+
(c = t.onCloseAutoFocus) == null || c.call(t, a), a.defaultPrevented || (r.current || (d = n.triggerRef.current) == null || d.focus(), a.preventDefault()), r.current = !1, o.current = !1;
|
|
2677
2677
|
},
|
|
2678
2678
|
onInteractOutside: (a) => {
|
|
2679
2679
|
var s, f;
|
|
2680
|
-
(s = t.onInteractOutside) == null || s.call(t, a), a.defaultPrevented || (
|
|
2680
|
+
(s = t.onInteractOutside) == null || s.call(t, a), a.defaultPrevented || (r.current = !0, a.detail.originalEvent.type === "pointerdown" && (o.current = !0));
|
|
2681
2681
|
const c = a.target;
|
|
2682
|
-
((f = n.triggerRef.current) == null ? void 0 : f.contains(c)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" &&
|
|
2682
|
+
((f = n.triggerRef.current) == null ? void 0 : f.contains(c)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && o.current && a.preventDefault();
|
|
2683
2683
|
}
|
|
2684
2684
|
}
|
|
2685
2685
|
);
|
|
2686
2686
|
}
|
|
2687
|
-
),
|
|
2687
|
+
), Un = X.forwardRef(
|
|
2688
2688
|
(t, e) => {
|
|
2689
|
-
const { __scopeDialog: n, trapFocus:
|
|
2690
|
-
return
|
|
2689
|
+
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = t, d = fe(De, n), s = X.useRef(null), f = Ot(e, s);
|
|
2690
|
+
return Sr(), /* @__PURE__ */ k(he, { children: [
|
|
2691
2691
|
/* @__PURE__ */ i(
|
|
2692
|
-
|
|
2692
|
+
Rr,
|
|
2693
2693
|
{
|
|
2694
2694
|
asChild: !0,
|
|
2695
2695
|
loop: !0,
|
|
2696
|
-
trapped:
|
|
2697
|
-
onMountAutoFocus:
|
|
2696
|
+
trapped: r,
|
|
2697
|
+
onMountAutoFocus: o,
|
|
2698
2698
|
onUnmountAutoFocus: a,
|
|
2699
2699
|
children: /* @__PURE__ */ i(
|
|
2700
|
-
|
|
2700
|
+
yr,
|
|
2701
2701
|
{
|
|
2702
2702
|
role: "dialog",
|
|
2703
2703
|
id: d.contentId,
|
|
@@ -2717,44 +2717,44 @@ var Di = X.forwardRef(
|
|
|
2717
2717
|
] })
|
|
2718
2718
|
] });
|
|
2719
2719
|
}
|
|
2720
|
-
), Wt = "DialogTitle",
|
|
2720
|
+
), Wt = "DialogTitle", Vn = X.forwardRef(
|
|
2721
2721
|
(t, e) => {
|
|
2722
|
-
const { __scopeDialog: n, ...
|
|
2723
|
-
return /* @__PURE__ */ i(Ke.h2, { id:
|
|
2722
|
+
const { __scopeDialog: n, ...r } = t, o = fe(Wt, n);
|
|
2723
|
+
return /* @__PURE__ */ i(Ke.h2, { id: o.titleId, ...r, ref: e });
|
|
2724
2724
|
}
|
|
2725
2725
|
);
|
|
2726
|
-
|
|
2727
|
-
var
|
|
2726
|
+
Vn.displayName = Wt;
|
|
2727
|
+
var qn = "DialogDescription", zi = X.forwardRef(
|
|
2728
2728
|
(t, e) => {
|
|
2729
|
-
const { __scopeDialog: n, ...
|
|
2730
|
-
return /* @__PURE__ */ i(Ke.p, { id:
|
|
2729
|
+
const { __scopeDialog: n, ...r } = t, o = fe(qn, n);
|
|
2730
|
+
return /* @__PURE__ */ i(Ke.p, { id: o.descriptionId, ...r, ref: e });
|
|
2731
2731
|
}
|
|
2732
2732
|
);
|
|
2733
|
-
zi.displayName =
|
|
2734
|
-
var Bn = "DialogClose",
|
|
2733
|
+
zi.displayName = qn;
|
|
2734
|
+
var Bn = "DialogClose", Zn = X.forwardRef(
|
|
2735
2735
|
(t, e) => {
|
|
2736
|
-
const { __scopeDialog: n, ...
|
|
2736
|
+
const { __scopeDialog: n, ...r } = t, o = fe(Bn, n);
|
|
2737
2737
|
return /* @__PURE__ */ i(
|
|
2738
2738
|
Ke.button,
|
|
2739
2739
|
{
|
|
2740
2740
|
type: "button",
|
|
2741
|
-
...
|
|
2741
|
+
...r,
|
|
2742
2742
|
ref: e,
|
|
2743
|
-
onClick:
|
|
2743
|
+
onClick: Ue(t.onClick, () => o.onOpenChange(!1))
|
|
2744
2744
|
}
|
|
2745
2745
|
);
|
|
2746
2746
|
}
|
|
2747
2747
|
);
|
|
2748
|
-
|
|
2748
|
+
Zn.displayName = Bn;
|
|
2749
2749
|
function Ft(t) {
|
|
2750
2750
|
return t ? "open" : "closed";
|
|
2751
2751
|
}
|
|
2752
|
-
var
|
|
2752
|
+
var jn = "DialogTitleWarning", [xc, Kn] = Pr(jn, {
|
|
2753
2753
|
contentName: De,
|
|
2754
2754
|
titleName: Wt,
|
|
2755
2755
|
docsSlug: "dialog"
|
|
2756
2756
|
}), Wi = ({ titleId: t }) => {
|
|
2757
|
-
const e = Kn(
|
|
2757
|
+
const e = Kn(jn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2758
2758
|
|
|
2759
2759
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2760
2760
|
|
|
@@ -2763,13 +2763,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2763
2763
|
t && (document.getElementById(t) || console.error(n));
|
|
2764
2764
|
}, [n, t]), null;
|
|
2765
2765
|
}, Fi = "DialogDescriptionWarning", ki = ({ contentRef: t, descriptionId: e }) => {
|
|
2766
|
-
const
|
|
2766
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Kn(Fi).contentName}}.`;
|
|
2767
2767
|
return X.useEffect(() => {
|
|
2768
2768
|
var a;
|
|
2769
|
-
const
|
|
2770
|
-
e &&
|
|
2771
|
-
}, [
|
|
2772
|
-
}, Mi = Fn, Hi = Hn, $i = $n, Gi = Gn,
|
|
2769
|
+
const o = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2770
|
+
e && o && (document.getElementById(e) || console.warn(r));
|
|
2771
|
+
}, [r, t, e]), null;
|
|
2772
|
+
}, Mi = Fn, Hi = Hn, $i = $n, Gi = Gn, Ui = Vn, Vi = Zn;
|
|
2773
2773
|
const Oe = {
|
|
2774
2774
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2775
2775
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2778,8 +2778,8 @@ const Oe = {
|
|
|
2778
2778
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2779
2779
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2780
2780
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2781
|
-
},
|
|
2782
|
-
const { pdfProperties: t } =
|
|
2781
|
+
}, qi = () => {
|
|
2782
|
+
const { pdfProperties: t } = re(), { container: e } = Te(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = Oo(), { localeMessages: o } = pe(), a = W(() => {
|
|
2783
2783
|
if (!t)
|
|
2784
2784
|
return [];
|
|
2785
2785
|
const {
|
|
@@ -2791,49 +2791,49 @@ const Oe = {
|
|
|
2791
2791
|
createdOn: C,
|
|
2792
2792
|
creator: u,
|
|
2793
2793
|
keywords: T,
|
|
2794
|
-
modifiedOn:
|
|
2794
|
+
modifiedOn: b,
|
|
2795
2795
|
pdfProducer: P,
|
|
2796
2796
|
pdfVersion: y,
|
|
2797
2797
|
pageCount: w
|
|
2798
2798
|
} = t;
|
|
2799
2799
|
return [
|
|
2800
|
-
{ label:
|
|
2801
|
-
{ label:
|
|
2800
|
+
{ label: o == null ? void 0 : o.propertiesFilenameLabel, value: d },
|
|
2801
|
+
{ label: o == null ? void 0 : o.propertiesFileSizeLabel, value: c },
|
|
2802
2802
|
{ separate: !0 },
|
|
2803
|
-
{ label:
|
|
2804
|
-
{ label:
|
|
2805
|
-
{ label:
|
|
2806
|
-
{ label:
|
|
2807
|
-
{ label:
|
|
2803
|
+
{ label: o == null ? void 0 : o.propertiesTitleLabel, value: s },
|
|
2804
|
+
{ label: o == null ? void 0 : o.propertiesAuthorLabel, value: f },
|
|
2805
|
+
{ label: o == null ? void 0 : o.propertiesSubjectLabel, value: m },
|
|
2806
|
+
{ label: o == null ? void 0 : o.propertiesKeywordLabel, value: T },
|
|
2807
|
+
{ label: o == null ? void 0 : o.propertiesCreatorLabel, value: u },
|
|
2808
2808
|
{
|
|
2809
|
-
label:
|
|
2810
|
-
value: C ?
|
|
2809
|
+
label: o == null ? void 0 : o.propertiesCreateOnLabel,
|
|
2810
|
+
value: C ? qt(C) : ""
|
|
2811
2811
|
},
|
|
2812
2812
|
{
|
|
2813
|
-
label:
|
|
2814
|
-
value:
|
|
2813
|
+
label: o == null ? void 0 : o.propertiesModifiedOnLabel,
|
|
2814
|
+
value: b ? qt(b) : ""
|
|
2815
2815
|
},
|
|
2816
2816
|
{ separate: !0 },
|
|
2817
|
-
{ label:
|
|
2818
|
-
{ label:
|
|
2819
|
-
{ label:
|
|
2817
|
+
{ label: o == null ? void 0 : o.propertiesPDFProducerLabel, value: P },
|
|
2818
|
+
{ label: o == null ? void 0 : o.propertiesPDFVersionLabel, value: y },
|
|
2819
|
+
{ label: o == null ? void 0 : o.propertiesPageCountLabel, value: w }
|
|
2820
2820
|
];
|
|
2821
|
-
}, [t,
|
|
2822
|
-
return /* @__PURE__ */ i(Mi, { open: n, onOpenChange:
|
|
2821
|
+
}, [t, o]);
|
|
2822
|
+
return /* @__PURE__ */ i(Mi, { open: n, onOpenChange: r, children: /* @__PURE__ */ i(Hi, { container: e, children: /* @__PURE__ */ k("div", { className: Oe["rp-dialog-wrapper"], children: [
|
|
2823
2823
|
/* @__PURE__ */ i($i, { className: Oe["rp-dialog-overlay"] }),
|
|
2824
2824
|
/* @__PURE__ */ k(Gi, { className: Oe["rp-document-dialog"], "aria-labelledby": "document-properties-title", children: [
|
|
2825
|
-
/* @__PURE__ */ i(
|
|
2826
|
-
/* @__PURE__ */ i("div", { className: Oe["rp-document-properties"], role: "region", "aria-labelledby": "document-properties-title", children: a.map((c, d) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Oe["rp-properties-divider"], role: "separator", "aria-orientation": "horizontal" }) : /* @__PURE__ */ i(
|
|
2827
|
-
/* @__PURE__ */ i(
|
|
2825
|
+
/* @__PURE__ */ i(Ui, { id: "document-properties-title", className: Oe["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
|
|
2826
|
+
/* @__PURE__ */ i("div", { className: Oe["rp-document-properties"], role: "region", "aria-labelledby": "document-properties-title", children: a.map((c, d) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Oe["rp-properties-divider"], role: "separator", "aria-orientation": "horizontal" }) : /* @__PURE__ */ i(Ko, { label: c.label, value: c.value }) }, d)) }),
|
|
2827
|
+
/* @__PURE__ */ i(Vi, { asChild: !0, className: Oe["rp-dialog-close"], "aria-label": (o == null ? void 0 : o.searchCloseButtonTooltip) || "Close dialog", children: /* @__PURE__ */ i(Er, { "aria-hidden": "true" }) })
|
|
2828
2828
|
] })
|
|
2829
2829
|
] }) }) });
|
|
2830
2830
|
}, Bi = {
|
|
2831
2831
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2832
|
-
}, un = ".pdf",
|
|
2832
|
+
}, un = ".pdf", Zi = (t) => URL.createObjectURL(t), ji = async (t) => {
|
|
2833
2833
|
const n = await (await fetch(t)).blob();
|
|
2834
|
-
return
|
|
2834
|
+
return Zi(n);
|
|
2835
2835
|
}, Xn = () => {
|
|
2836
|
-
const { filename: t, pdfSrc: e } =
|
|
2836
|
+
const { filename: t, pdfSrc: e } = re(), { downloadFilename: n } = Ro(), r = (a) => {
|
|
2837
2837
|
const c = n || a;
|
|
2838
2838
|
return c.endsWith(un) ? c : `${c}${un}`;
|
|
2839
2839
|
};
|
|
@@ -2841,33 +2841,33 @@ const Oe = {
|
|
|
2841
2841
|
if (!t || !e)
|
|
2842
2842
|
throw new Error("There is no PDF source to download");
|
|
2843
2843
|
const a = document.createElement("a");
|
|
2844
|
-
a.href = await
|
|
2844
|
+
a.href = await ji(e), a.download = r(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2845
2845
|
}, [t, e]) };
|
|
2846
2846
|
}, Qn = () => {
|
|
2847
2847
|
const { downloadIcon: t } = ve(), { downloadIcon: e } = ge();
|
|
2848
|
-
return t || e || /* @__PURE__ */ i(
|
|
2848
|
+
return t || e || /* @__PURE__ */ i(zr, {});
|
|
2849
2849
|
}, Yn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ki = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Yn, { localeMessages: e, children: /* @__PURE__ */ i(de, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Qn, {}) }) }), Xi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Ie, { onClick: t, children: /* @__PURE__ */ k(Yn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2850
2850
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Qn, {}) }),
|
|
2851
2851
|
e == null ? void 0 : e.downloadFileLabel
|
|
2852
2852
|
] }) }), Jn = () => {
|
|
2853
|
-
const { download: t } = Xn(), { downloadTool: e = !0 } = Ce(), { downloadTool: n = !0 } = xe(), { isSmallScreen:
|
|
2854
|
-
return !e || !n ? null :
|
|
2855
|
-
},
|
|
2853
|
+
const { download: t } = Xn(), { downloadTool: e = !0 } = Ce(), { downloadTool: n = !0 } = xe(), { isSmallScreen: r } = Se(), { localeMessages: o } = pe(), a = o == null ? void 0 : o.downloadFileTooltip;
|
|
2854
|
+
return !e || !n ? null : r ? /* @__PURE__ */ i(Xi, { 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(Ki, { download: t, localeMessages: o });
|
|
2855
|
+
}, eo = () => {
|
|
2856
2856
|
const { printIcon: t } = ve(), { printIcon: e } = ge();
|
|
2857
|
-
return t || e || /* @__PURE__ */ i(
|
|
2858
|
-
},
|
|
2859
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2857
|
+
return t || e || /* @__PURE__ */ i(Wr, {});
|
|
2858
|
+
}, to = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Qi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(to, { localeMessages: e, children: /* @__PURE__ */ i(de, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(eo, {}) }) }), Yi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Ie, { onClick: t, children: /* @__PURE__ */ k(to, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2859
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(eo, {}) }),
|
|
2860
2860
|
e == null ? void 0 : e.printLabel
|
|
2861
|
-
] }) }),
|
|
2862
|
-
const { print: t, cancel: e, setOnProgress: n, setOnComplete:
|
|
2861
|
+
] }) }), no = () => {
|
|
2862
|
+
const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: a, showDefaultProgress: c } = st(), { printTool: d = !0 } = Ce(), { printTool: s = !0 } = xe(), { isSmallScreen: f } = Se(), { localeMessages: m } = pe(), C = m == null ? void 0 : m.printTooltip;
|
|
2863
2863
|
return !d || !s ? null : f ? /* @__PURE__ */ i(Yi, { print: t, localeMessages: m }) : typeof d == "function" ? /* @__PURE__ */ i(K, { content: C, children: /* @__PURE__ */ i(
|
|
2864
2864
|
d,
|
|
2865
2865
|
{
|
|
2866
2866
|
print: t,
|
|
2867
2867
|
cancel: e,
|
|
2868
2868
|
setOnProgress: n,
|
|
2869
|
-
setOnError:
|
|
2870
|
-
setOnComplete:
|
|
2869
|
+
setOnError: o,
|
|
2870
|
+
setOnComplete: r,
|
|
2871
2871
|
progress: a,
|
|
2872
2872
|
showDefaultProgress: c
|
|
2873
2873
|
}
|
|
@@ -2877,8 +2877,8 @@ const Oe = {
|
|
|
2877
2877
|
print: t,
|
|
2878
2878
|
cancel: e,
|
|
2879
2879
|
setOnProgress: n,
|
|
2880
|
-
setOnError:
|
|
2881
|
-
setOnComplete:
|
|
2880
|
+
setOnError: o,
|
|
2881
|
+
setOnComplete: r,
|
|
2882
2882
|
progress: a,
|
|
2883
2883
|
showDefaultProgress: c
|
|
2884
2884
|
}
|
|
@@ -2892,12 +2892,12 @@ const Oe = {
|
|
|
2892
2892
|
const { goToLastPageIcon: t } = ve(), { goToLastPageIcon: e } = ge();
|
|
2893
2893
|
return t || e || /* @__PURE__ */ i(Tn, {});
|
|
2894
2894
|
}, pn = { width: "100%" }, na = () => {
|
|
2895
|
-
const { goToPage: t, totalPages: e, focusedPage: n } = ce(), { jumpNavigationTool:
|
|
2895
|
+
const { goToPage: t, totalPages: e, focusedPage: n } = ce(), { jumpNavigationTool: r = !0 } = Ce(), { jumpNavigationTool: o = !0 } = xe(), { localeMessages: a } = pe(), c = W(() => n === 1, [n]), d = W(() => n === e, [n, e]), s = N(() => {
|
|
2896
2896
|
t(1);
|
|
2897
2897
|
}, [t]), f = N(() => {
|
|
2898
2898
|
t(e);
|
|
2899
2899
|
}, [t, e]);
|
|
2900
|
-
return !
|
|
2900
|
+
return !r || !o ? null : /* @__PURE__ */ k(tt, { children: [
|
|
2901
2901
|
/* @__PURE__ */ i(Ie, { onClick: s, children: /* @__PURE__ */ i(K, { content: a == null ? void 0 : a.firstPageTooltip, style: pn, children: /* @__PURE__ */ k("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2902
2902
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(ea, {}) }),
|
|
2903
2903
|
/* @__PURE__ */ i("span", { children: a == null ? void 0 : a.firstPageLabel })
|
|
@@ -2908,8 +2908,8 @@ const Oe = {
|
|
|
2908
2908
|
] }) }) }),
|
|
2909
2909
|
/* @__PURE__ */ i(Lt, {})
|
|
2910
2910
|
] });
|
|
2911
|
-
},
|
|
2912
|
-
const [t, e] = H(!1), { container: n, pagesRef:
|
|
2911
|
+
}, oa = () => {
|
|
2912
|
+
const [t, e] = H(!1), { container: n, pagesRef: r } = Te(), { isSmallScreen: o } = Se(), {
|
|
2913
2913
|
openFileTool: a,
|
|
2914
2914
|
downloadTool: c,
|
|
2915
2915
|
documentProperties: d,
|
|
@@ -2919,7 +2919,7 @@ const Oe = {
|
|
|
2919
2919
|
jumpNavigationTool: C,
|
|
2920
2920
|
printTool: u,
|
|
2921
2921
|
fullscreenTool: T,
|
|
2922
|
-
viewModeTool:
|
|
2922
|
+
viewModeTool: b
|
|
2923
2923
|
} = Ce(), {
|
|
2924
2924
|
openFileTool: P,
|
|
2925
2925
|
downloadTool: y,
|
|
@@ -2929,13 +2929,13 @@ const Oe = {
|
|
|
2929
2929
|
selectionModeTool: p,
|
|
2930
2930
|
jumpNavigationTool: l,
|
|
2931
2931
|
printTool: v,
|
|
2932
|
-
fullscreenTool:
|
|
2932
|
+
fullscreenTool: _,
|
|
2933
2933
|
viewModeTool: I
|
|
2934
2934
|
} = xe(), { localeMessages: S } = pe(), [x, R] = H(0), O = M(
|
|
2935
2935
|
new ResizeObserver((E) => {
|
|
2936
2936
|
R(E[0].contentRect.height);
|
|
2937
2937
|
})
|
|
2938
|
-
), D = W(() => C || f || m || s || d ||
|
|
2938
|
+
), D = W(() => C || f || m || s || d || b || o && (a || c || u || T), [
|
|
2939
2939
|
a,
|
|
2940
2940
|
c,
|
|
2941
2941
|
u,
|
|
@@ -2945,22 +2945,22 @@ const Oe = {
|
|
|
2945
2945
|
f,
|
|
2946
2946
|
m,
|
|
2947
2947
|
C,
|
|
2948
|
-
|
|
2949
|
-
]), z = W(() => l || h || p || g || w || I ||
|
|
2948
|
+
o
|
|
2949
|
+
]), z = W(() => l || h || p || g || w || I || o && (P || y || v || _), [
|
|
2950
2950
|
P,
|
|
2951
2951
|
y,
|
|
2952
2952
|
v,
|
|
2953
|
-
|
|
2953
|
+
_,
|
|
2954
2954
|
w,
|
|
2955
2955
|
g,
|
|
2956
2956
|
h,
|
|
2957
2957
|
p,
|
|
2958
2958
|
l,
|
|
2959
|
-
|
|
2959
|
+
o
|
|
2960
2960
|
]);
|
|
2961
|
-
return A(() => (
|
|
2961
|
+
return A(() => (r && O.current.observe(r), () => {
|
|
2962
2962
|
O.current.disconnect();
|
|
2963
|
-
}), [
|
|
2963
|
+
}), [r]), !D || !z ? null : /* @__PURE__ */ k(he, { children: [
|
|
2964
2964
|
/* @__PURE__ */ i(
|
|
2965
2965
|
Rt,
|
|
2966
2966
|
{
|
|
@@ -2972,7 +2972,7 @@ const Oe = {
|
|
|
2972
2972
|
active: t,
|
|
2973
2973
|
"aria-label": S == null ? void 0 : S.moreOptionTooltip,
|
|
2974
2974
|
"aria-expanded": t,
|
|
2975
|
-
children: /* @__PURE__ */ i(
|
|
2975
|
+
children: /* @__PURE__ */ i(br, { "aria-hidden": "true" })
|
|
2976
2976
|
}
|
|
2977
2977
|
) }) }),
|
|
2978
2978
|
side: "bottom",
|
|
@@ -2984,37 +2984,37 @@ const Oe = {
|
|
|
2984
2984
|
className: Bi["rp-other-tool-content"],
|
|
2985
2985
|
"data-rp": "moreOptionsDropdown",
|
|
2986
2986
|
children: [
|
|
2987
|
-
|
|
2988
|
-
/* @__PURE__ */ i(
|
|
2987
|
+
o && /* @__PURE__ */ k(tt, { children: [
|
|
2988
|
+
/* @__PURE__ */ i(_n, {}),
|
|
2989
2989
|
/* @__PURE__ */ i(Jn, {}),
|
|
2990
|
-
/* @__PURE__ */ i(
|
|
2990
|
+
/* @__PURE__ */ i(no, {}),
|
|
2991
2991
|
/* @__PURE__ */ i(Pn, {}),
|
|
2992
2992
|
/* @__PURE__ */ i(Lt, {})
|
|
2993
2993
|
] }),
|
|
2994
2994
|
/* @__PURE__ */ i(na, {}),
|
|
2995
|
-
/* @__PURE__ */ i(
|
|
2996
|
-
/* @__PURE__ */ i(
|
|
2997
|
-
/* @__PURE__ */ i(
|
|
2998
|
-
/* @__PURE__ */ i(
|
|
2999
|
-
/* @__PURE__ */ i(
|
|
2995
|
+
/* @__PURE__ */ i(Or, {}),
|
|
2996
|
+
/* @__PURE__ */ i(Fr, {}),
|
|
2997
|
+
/* @__PURE__ */ i(Dr, {}),
|
|
2998
|
+
/* @__PURE__ */ i(Ar, {}),
|
|
2999
|
+
/* @__PURE__ */ i(Nr, {})
|
|
3000
3000
|
]
|
|
3001
3001
|
}
|
|
3002
3002
|
)
|
|
3003
3003
|
}
|
|
3004
3004
|
),
|
|
3005
|
-
/* @__PURE__ */ i(
|
|
3005
|
+
/* @__PURE__ */ i(qi, {})
|
|
3006
3006
|
] });
|
|
3007
|
-
},
|
|
3007
|
+
}, ra = () => {
|
|
3008
3008
|
const { isSmallScreen: t } = Se();
|
|
3009
3009
|
return /* @__PURE__ */ k(he, { children: [
|
|
3010
|
-
/* @__PURE__ */ i(
|
|
3010
|
+
/* @__PURE__ */ i(wr, {}),
|
|
3011
3011
|
!t && /* @__PURE__ */ k(he, { children: [
|
|
3012
|
-
/* @__PURE__ */ i(
|
|
3012
|
+
/* @__PURE__ */ i(_n, {}),
|
|
3013
3013
|
/* @__PURE__ */ i(Jn, {}),
|
|
3014
|
-
/* @__PURE__ */ i(
|
|
3014
|
+
/* @__PURE__ */ i(no, {}),
|
|
3015
3015
|
/* @__PURE__ */ i(Pn, {})
|
|
3016
3016
|
] }),
|
|
3017
|
-
/* @__PURE__ */ i(
|
|
3017
|
+
/* @__PURE__ */ i(oa, {})
|
|
3018
3018
|
] });
|
|
3019
3019
|
}, ia = "_active_1yldl_11", We = {
|
|
3020
3020
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_1yldl_1",
|
|
@@ -3025,7 +3025,7 @@ const Oe = {
|
|
|
3025
3025
|
"rp-current-zoom-text": "_rp-current-zoom-text_1yldl_24",
|
|
3026
3026
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_1yldl_28"
|
|
3027
3027
|
}, aa = ({ zoomLevel: t, className: e }) => {
|
|
3028
|
-
const { localeMessages: n } = pe(),
|
|
3028
|
+
const { localeMessages: n } = pe(), r = W(() => {
|
|
3029
3029
|
switch (t) {
|
|
3030
3030
|
case Me.ACTUAL:
|
|
3031
3031
|
return n == null ? void 0 : n.zoomActualSize;
|
|
@@ -3036,22 +3036,22 @@ const Oe = {
|
|
|
3036
3036
|
}
|
|
3037
3037
|
return t.toString();
|
|
3038
3038
|
}, [t, n]);
|
|
3039
|
-
return /* @__PURE__ */ i(he, { children: typeof t == "number" ? /* @__PURE__ */ k(
|
|
3039
|
+
return /* @__PURE__ */ i(he, { children: typeof t == "number" ? /* @__PURE__ */ k(fo, { children: [
|
|
3040
3040
|
/* @__PURE__ */ i("span", { className: e, children: t }),
|
|
3041
3041
|
/* @__PURE__ */ i("span", { className: e, children: "%" })
|
|
3042
|
-
] }) : /* @__PURE__ */ i("span", { className: e, children:
|
|
3042
|
+
] }) : /* @__PURE__ */ i("span", { className: e, children: r }) });
|
|
3043
3043
|
}, sa = [50, 75, 100, 125, 150, 200, 300, 400], ca = () => {
|
|
3044
3044
|
const { zoomInIcon: t } = ve(), { zoomInIcon: e } = ge();
|
|
3045
|
-
return t || e || /* @__PURE__ */ i(
|
|
3045
|
+
return t || e || /* @__PURE__ */ i(kr, {});
|
|
3046
3046
|
}, la = () => {
|
|
3047
3047
|
const { zoomOutIcon: t } = ve(), { zoomOutIcon: e } = ge();
|
|
3048
|
-
return t || e || /* @__PURE__ */ i(
|
|
3048
|
+
return t || e || /* @__PURE__ */ i(Mr, {});
|
|
3049
3049
|
}, da = () => {
|
|
3050
|
-
const { zoomLevel: t, setZoomLevel: e, currentZoom: n } =
|
|
3050
|
+
const { zoomLevel: t, setZoomLevel: e, currentZoom: n } = ot(), { container: r, pagesRef: o } = Te(), { zoomTool: a = !0 } = Ce(), { zoomTool: c = !0 } = xe(), { isSmallScreen: d } = Se(), { localeMessages: s } = pe(), [f, m] = H(0), [C, u] = H(!1), T = M(
|
|
3051
3051
|
new ResizeObserver((g) => {
|
|
3052
3052
|
m(g[0].contentRect.height);
|
|
3053
3053
|
})
|
|
3054
|
-
),
|
|
3054
|
+
), b = N(() => {
|
|
3055
3055
|
e(() => {
|
|
3056
3056
|
const g = Math.floor(n * 100 / 25) * 25;
|
|
3057
3057
|
return Math.min(g + 25, Bt);
|
|
@@ -3061,10 +3061,10 @@ const Oe = {
|
|
|
3061
3061
|
const g = Math.ceil(n * 100 / 25) * 25;
|
|
3062
3062
|
return Math.min(g - 25, Bt);
|
|
3063
3063
|
});
|
|
3064
|
-
}, [e, n]), y = W(() =>
|
|
3065
|
-
return A(() => (
|
|
3064
|
+
}, [e, n]), y = W(() => Hr(n), [n]), w = W(() => $r(n), [n]);
|
|
3065
|
+
return A(() => (o && T.current.observe(o), () => {
|
|
3066
3066
|
T.current.disconnect();
|
|
3067
|
-
}), [
|
|
3067
|
+
}), [o]), !a || !c ? null : typeof a == "function" ? /* @__PURE__ */ i(a, { zoomLevel: t, setZoomLevel: e }) : typeof c == "function" ? /* @__PURE__ */ i(c, { zoomLevel: t, setZoomLevel: e }) : /* @__PURE__ */ k("div", { className: We["rp-zoom-wrapper"], children: [
|
|
3068
3068
|
/* @__PURE__ */ i(K, { content: s == null ? void 0 : s.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
3069
3069
|
de,
|
|
3070
3070
|
{
|
|
@@ -3077,7 +3077,7 @@ const Oe = {
|
|
|
3077
3077
|
!d && /* @__PURE__ */ i(
|
|
3078
3078
|
Rt,
|
|
3079
3079
|
{
|
|
3080
|
-
container:
|
|
3080
|
+
container: r,
|
|
3081
3081
|
open: C,
|
|
3082
3082
|
onOpenChange: u,
|
|
3083
3083
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.zoomSelectTooltip, children: /* @__PURE__ */ k(
|
|
@@ -3096,7 +3096,7 @@ const Oe = {
|
|
|
3096
3096
|
className: We["rp-current-zoom-text"]
|
|
3097
3097
|
}
|
|
3098
3098
|
),
|
|
3099
|
-
/* @__PURE__ */ i(
|
|
3099
|
+
/* @__PURE__ */ i(Ve, { className: We["rp-current-zoom-icon"] })
|
|
3100
3100
|
]
|
|
3101
3101
|
}
|
|
3102
3102
|
) }) }),
|
|
@@ -3129,30 +3129,30 @@ const Oe = {
|
|
|
3129
3129
|
de,
|
|
3130
3130
|
{
|
|
3131
3131
|
disabled: w,
|
|
3132
|
-
onClick:
|
|
3132
|
+
onClick: b,
|
|
3133
3133
|
"aria-label": s == null ? void 0 : s.zoomInTooltip,
|
|
3134
3134
|
children: /* @__PURE__ */ i(ca, {})
|
|
3135
3135
|
}
|
|
3136
3136
|
) })
|
|
3137
3137
|
] });
|
|
3138
3138
|
}, hn = () => {
|
|
3139
|
-
const { totalMatches: t, nextMatch: e, prevMatch: n } = At(), { localeMessages:
|
|
3139
|
+
const { totalMatches: t, nextMatch: e, prevMatch: n } = At(), { localeMessages: r } = pe(), o = !t || t === 0;
|
|
3140
3140
|
return /* @__PURE__ */ k(he, { children: [
|
|
3141
3141
|
/* @__PURE__ */ i(
|
|
3142
3142
|
K,
|
|
3143
3143
|
{
|
|
3144
|
-
content:
|
|
3144
|
+
content: r == null ? void 0 : r.searchPrevTooltip,
|
|
3145
3145
|
className: ne["rp-search-tool-result-navigator"],
|
|
3146
3146
|
children: /* @__PURE__ */ i(
|
|
3147
3147
|
de,
|
|
3148
3148
|
{
|
|
3149
3149
|
tabIndex: 0,
|
|
3150
3150
|
onClick: n,
|
|
3151
|
-
"aria-label":
|
|
3152
|
-
disabled:
|
|
3153
|
-
"aria-disabled":
|
|
3151
|
+
"aria-label": r == null ? void 0 : r.searchPrevTooltip,
|
|
3152
|
+
disabled: o,
|
|
3153
|
+
"aria-disabled": o,
|
|
3154
3154
|
children: /* @__PURE__ */ i(
|
|
3155
|
-
|
|
3155
|
+
Ve,
|
|
3156
3156
|
{
|
|
3157
3157
|
className: ne["rp-search-tool-input-icon"],
|
|
3158
3158
|
"aria-hidden": "true"
|
|
@@ -3165,18 +3165,18 @@ const Oe = {
|
|
|
3165
3165
|
/* @__PURE__ */ i(
|
|
3166
3166
|
K,
|
|
3167
3167
|
{
|
|
3168
|
-
content:
|
|
3168
|
+
content: r == null ? void 0 : r.searchNextTooltip,
|
|
3169
3169
|
className: ne["rp-search-tool-result-navigator"],
|
|
3170
3170
|
children: /* @__PURE__ */ i(
|
|
3171
3171
|
de,
|
|
3172
3172
|
{
|
|
3173
3173
|
tabIndex: 0,
|
|
3174
3174
|
onClick: e,
|
|
3175
|
-
"aria-label":
|
|
3176
|
-
disabled:
|
|
3177
|
-
"aria-disabled":
|
|
3175
|
+
"aria-label": r == null ? void 0 : r.searchNextTooltip,
|
|
3176
|
+
disabled: o,
|
|
3177
|
+
"aria-disabled": o,
|
|
3178
3178
|
children: /* @__PURE__ */ i(
|
|
3179
|
-
|
|
3179
|
+
Ve,
|
|
3180
3180
|
{
|
|
3181
3181
|
style: { transform: "rotate(180deg" },
|
|
3182
3182
|
className: ne["rp-search-tool-input-icon"],
|
|
@@ -3192,7 +3192,7 @@ const Oe = {
|
|
|
3192
3192
|
const { searchIcon: t } = ve(), { searchIcon: e } = ge();
|
|
3193
3193
|
return t || e || /* @__PURE__ */ i(Cn, {});
|
|
3194
3194
|
}, pa = ({ icon: t }) => {
|
|
3195
|
-
const { container: e } = Te(), [n,
|
|
3195
|
+
const { container: e } = Te(), [n, r] = H(!1), { pdf: o } = re(), [a, c] = H(null), {
|
|
3196
3196
|
searchOptions: d,
|
|
3197
3197
|
setSearchOptions: s,
|
|
3198
3198
|
loading: f,
|
|
@@ -3200,12 +3200,12 @@ const Oe = {
|
|
|
3200
3200
|
totalMatches: C,
|
|
3201
3201
|
currentMatchPosition: u,
|
|
3202
3202
|
nextMatch: T,
|
|
3203
|
-
prevMatch:
|
|
3203
|
+
prevMatch: b,
|
|
3204
3204
|
search: P
|
|
3205
|
-
} = At(), { searchTool: y = !0 } = Ce(), { searchTool: w = !0 } = xe(), [g, h] = H(P), { localeMessages: p } = pe(), { isSmallScreen: l } = Se(), [v,
|
|
3206
|
-
|
|
3205
|
+
} = At(), { searchTool: y = !0 } = Ce(), { searchTool: w = !0 } = xe(), [g, h] = H(P), { localeMessages: p } = pe(), { isSmallScreen: l } = Se(), [v, _] = H(null), [I, S] = H(!1), x = N(() => {
|
|
3206
|
+
r(!0);
|
|
3207
3207
|
}, []), R = N(() => {
|
|
3208
|
-
m(""), h(""),
|
|
3208
|
+
m(""), h(""), r(!1);
|
|
3209
3209
|
}, [m]), O = ($) => {
|
|
3210
3210
|
const Q = $.key === "Enter", J = $.key === " ";
|
|
3211
3211
|
(Q || J) && R();
|
|
@@ -3216,15 +3216,15 @@ const Oe = {
|
|
|
3216
3216
|
[n]
|
|
3217
3217
|
), z = N(
|
|
3218
3218
|
($) => {
|
|
3219
|
-
$.shiftKey && $.key === "Enter" ?
|
|
3219
|
+
$.shiftKey && $.key === "Enter" ? b() : $.key === "Enter" && P !== g ? m(g) : $.key === "Enter" && T();
|
|
3220
3220
|
},
|
|
3221
|
-
[g,
|
|
3221
|
+
[g, b, T, m, P]
|
|
3222
3222
|
);
|
|
3223
3223
|
A(() => {
|
|
3224
3224
|
h(P);
|
|
3225
3225
|
}, [P]), A(() => {
|
|
3226
|
-
P &&
|
|
3227
|
-
}, [P,
|
|
3226
|
+
P && o && S(!0);
|
|
3227
|
+
}, [P, o]), A(() => {
|
|
3228
3228
|
P && P.trim() !== "" && (h(P), m(P));
|
|
3229
3229
|
}, []), A(() => (window.addEventListener("keydown", D), () => {
|
|
3230
3230
|
window.removeEventListener("keydown", D);
|
|
@@ -3237,7 +3237,7 @@ const Oe = {
|
|
|
3237
3237
|
h($.target.value);
|
|
3238
3238
|
}, []), L = N(() => {
|
|
3239
3239
|
h(""), m("");
|
|
3240
|
-
}, [m]), F = W(() => `${u} / ${C}`, [u, C]), { wholeWords: G, matchCase:
|
|
3240
|
+
}, [m]), F = W(() => `${u} / ${C}`, [u, C]), { wholeWords: G, matchCase: U } = W(() => d, [d]), V = N(
|
|
3241
3241
|
($) => {
|
|
3242
3242
|
s((Q) => ({ ...Q, matchCase: $ }));
|
|
3243
3243
|
},
|
|
@@ -3249,31 +3249,31 @@ const Oe = {
|
|
|
3249
3249
|
[s]
|
|
3250
3250
|
);
|
|
3251
3251
|
A(() => {
|
|
3252
|
-
|
|
3253
|
-
}, [
|
|
3254
|
-
const
|
|
3252
|
+
o && I && R();
|
|
3253
|
+
}, [o, R]);
|
|
3254
|
+
const Z = W(() => (v == null ? void 0 : v.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [v]), ae = N(
|
|
3255
3255
|
($) => {
|
|
3256
3256
|
if ($.key === "Tab") {
|
|
3257
3257
|
const Q = document.activeElement;
|
|
3258
3258
|
let J = 0;
|
|
3259
|
-
|
|
3259
|
+
Z.forEach((Y, we) => {
|
|
3260
3260
|
Y === Q && (J = we);
|
|
3261
3261
|
});
|
|
3262
3262
|
let te = J + 1;
|
|
3263
3263
|
$.shiftKey && (te = J - 1);
|
|
3264
|
-
const ee =
|
|
3264
|
+
const ee = Z[te];
|
|
3265
3265
|
if (ee)
|
|
3266
3266
|
ee.focus();
|
|
3267
|
-
else if (te >
|
|
3268
|
-
const Y =
|
|
3267
|
+
else if (te > Z.length - 1) {
|
|
3268
|
+
const Y = Z[0];
|
|
3269
3269
|
Y && Y.focus();
|
|
3270
3270
|
} else {
|
|
3271
|
-
const Y =
|
|
3271
|
+
const Y = Z[Z.length - 1];
|
|
3272
3272
|
Y && Y.focus();
|
|
3273
3273
|
}
|
|
3274
3274
|
}
|
|
3275
3275
|
},
|
|
3276
|
-
[
|
|
3276
|
+
[Z]
|
|
3277
3277
|
);
|
|
3278
3278
|
return !y || !w ? null : /* @__PURE__ */ i(he, { children: /* @__PURE__ */ i(
|
|
3279
3279
|
Rt,
|
|
@@ -3298,7 +3298,7 @@ const Oe = {
|
|
|
3298
3298
|
children: /* @__PURE__ */ k(
|
|
3299
3299
|
"div",
|
|
3300
3300
|
{
|
|
3301
|
-
ref:
|
|
3301
|
+
ref: _,
|
|
3302
3302
|
className: ne["rp-search-tool-content"],
|
|
3303
3303
|
tabIndex: 0,
|
|
3304
3304
|
onKeyDown: ae,
|
|
@@ -3333,30 +3333,30 @@ const Oe = {
|
|
|
3333
3333
|
onKeyDown: ($) => {
|
|
3334
3334
|
($.key === "Enter" || $.key === " ") && ($.preventDefault(), L());
|
|
3335
3335
|
},
|
|
3336
|
-
children: /* @__PURE__ */ i(
|
|
3336
|
+
children: /* @__PURE__ */ i(Gr, {})
|
|
3337
3337
|
}
|
|
3338
3338
|
)
|
|
3339
3339
|
}
|
|
3340
3340
|
) }),
|
|
3341
|
-
f ? /* @__PURE__ */ i("span", { "aria-live": "polite", "aria-label": "Searching", children: /* @__PURE__ */ i(
|
|
3342
|
-
l && /* @__PURE__ */ i("div", { className: ne["rp-search-tool-controls"], children: /* @__PURE__ */ i(
|
|
3341
|
+
f ? /* @__PURE__ */ i("span", { "aria-live": "polite", "aria-label": "Searching", children: /* @__PURE__ */ i(bn, { className: ne["rp-search-loader-icon"], "aria-hidden": "true" }) }) : /* @__PURE__ */ i("span", { id: "search-results-count", "aria-live": "polite", children: F }),
|
|
3342
|
+
l && /* @__PURE__ */ i("div", { className: ne["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ut, { onKeyPress: O, handleClose: R }) })
|
|
3343
3343
|
] }),
|
|
3344
3344
|
/* @__PURE__ */ k("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
|
|
3345
3345
|
l && /* @__PURE__ */ i(hn, {}),
|
|
3346
3346
|
/* @__PURE__ */ i(
|
|
3347
|
-
|
|
3347
|
+
Vt,
|
|
3348
3348
|
{
|
|
3349
3349
|
tabIndex: 0,
|
|
3350
3350
|
name: "matchCase",
|
|
3351
|
-
value:
|
|
3352
|
-
onChange:
|
|
3351
|
+
value: U,
|
|
3352
|
+
onChange: V,
|
|
3353
3353
|
"aria-label": p == null ? void 0 : p.searchMatchCaseLabel,
|
|
3354
3354
|
children: p == null ? void 0 : p.searchMatchCaseLabel
|
|
3355
3355
|
}
|
|
3356
3356
|
),
|
|
3357
3357
|
!l && /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Xt, {}) }) }),
|
|
3358
3358
|
/* @__PURE__ */ i(
|
|
3359
|
-
|
|
3359
|
+
Vt,
|
|
3360
3360
|
{
|
|
3361
3361
|
tabIndex: 0,
|
|
3362
3362
|
name: "wholeWord",
|
|
@@ -3371,7 +3371,7 @@ const Oe = {
|
|
|
3371
3371
|
] }),
|
|
3372
3372
|
!l && /* @__PURE__ */ k("div", { className: ne["rp-search-tool-controls"], children: [
|
|
3373
3373
|
/* @__PURE__ */ i(hn, {}),
|
|
3374
|
-
/* @__PURE__ */ i(
|
|
3374
|
+
/* @__PURE__ */ i(Ut, { onKeyPress: O, handleClose: R })
|
|
3375
3375
|
] })
|
|
3376
3376
|
]
|
|
3377
3377
|
}
|
|
@@ -3403,8 +3403,8 @@ const Oe = {
|
|
|
3403
3403
|
/* @__PURE__ */ i("button", { className: se(Fe["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
3404
3404
|
] }) });
|
|
3405
3405
|
}, ma = at((t, e) => {
|
|
3406
|
-
const { showPrintProgress: n = !0 } = Ce(), { showPrintProgress:
|
|
3407
|
-
if (!(!(a ?? (n &&
|
|
3406
|
+
const { showPrintProgress: n = !0 } = Ce(), { showPrintProgress: r = !0 } = xe(), { progress: o, showDefaultProgress: a } = st(), { isSmallScreen: c } = Se(), { percentage: d } = o || {}, s = () => c ? { gridTemplateColumns: "25% 60% 15%" } : void 0, f = () => {
|
|
3407
|
+
if (!(!(a ?? (n && r)) || !d))
|
|
3408
3408
|
return /* @__PURE__ */ i(fa, { percentage: d });
|
|
3409
3409
|
};
|
|
3410
3410
|
return /* @__PURE__ */ k("div", { children: [
|
|
@@ -3414,28 +3414,23 @@ const Oe = {
|
|
|
3414
3414
|
/* @__PURE__ */ i(Si, {})
|
|
3415
3415
|
] }),
|
|
3416
3416
|
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: $e["rp-toolbar-middle"], children: /* @__PURE__ */ i(da, {}) }),
|
|
3417
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: $e["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
3417
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: $e["rp-toolbar-end"], children: /* @__PURE__ */ i(ra, {}) })
|
|
3418
3418
|
] }) }),
|
|
3419
3419
|
/* @__PURE__ */ i(f, {})
|
|
3420
3420
|
] });
|
|
3421
|
-
}),
|
|
3422
|
-
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_15j5q_1",
|
|
3423
|
-
"rp-sidebar-content": "_rp-sidebar-content_15j5q_1",
|
|
3424
|
-
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_15j5q_18",
|
|
3425
|
-
"rp-thumbnails-wrapper-hidden": "_rp-thumbnails-wrapper-hidden_15j5q_25"
|
|
3426
|
-
}, Ge = {
|
|
3421
|
+
}), Ge = {
|
|
3427
3422
|
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
|
|
3428
3423
|
"rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
|
|
3429
3424
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
3430
3425
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
3431
3426
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
3432
3427
|
}, ga = (t) => {
|
|
3433
|
-
const { pageNumber: e, isFocused: n, viewport:
|
|
3434
|
-
width: Math.round(
|
|
3435
|
-
height: Math.round(
|
|
3436
|
-
}), [
|
|
3437
|
-
e &&
|
|
3438
|
-
}, [
|
|
3428
|
+
const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = ce(), { pageRotate: a } = it(), c = M(null), d = Nn(), { pages: s } = re(), [f, m] = H(null), C = M(!1), u = M(), T = W(() => n ? Ge["rp-thumbnail-active"] : "", [n]), b = W(() => ({
|
|
3429
|
+
width: Math.round(r.width),
|
|
3430
|
+
height: Math.round(r.height)
|
|
3431
|
+
}), [r]), P = N(() => {
|
|
3432
|
+
e && o(e);
|
|
3433
|
+
}, [o, e]);
|
|
3439
3434
|
return A(() => {
|
|
3440
3435
|
const y = s.get(e);
|
|
3441
3436
|
u.current === y || (m(null), u.current = y);
|
|
@@ -3503,8 +3498,8 @@ const Oe = {
|
|
|
3503
3498
|
"img",
|
|
3504
3499
|
{
|
|
3505
3500
|
src: f,
|
|
3506
|
-
width:
|
|
3507
|
-
height:
|
|
3501
|
+
width: b.width,
|
|
3502
|
+
height: b.height,
|
|
3508
3503
|
alt: `Page ${e} thumbnail`,
|
|
3509
3504
|
"aria-hidden": "true"
|
|
3510
3505
|
}
|
|
@@ -3513,10 +3508,10 @@ const Oe = {
|
|
|
3513
3508
|
{
|
|
3514
3509
|
className: Ge["rp-thumbnail-loader"],
|
|
3515
3510
|
style: {
|
|
3516
|
-
width: `${
|
|
3517
|
-
height: `${
|
|
3511
|
+
width: `${b.width}px`,
|
|
3512
|
+
height: `${b.height}px`
|
|
3518
3513
|
},
|
|
3519
|
-
children: /* @__PURE__ */ i(
|
|
3514
|
+
children: /* @__PURE__ */ i(bn, { "aria-hidden": "true" })
|
|
3520
3515
|
}
|
|
3521
3516
|
)
|
|
3522
3517
|
}
|
|
@@ -3526,39 +3521,39 @@ const Oe = {
|
|
|
3526
3521
|
}
|
|
3527
3522
|
);
|
|
3528
3523
|
}, fn = {
|
|
3529
|
-
"rp-thumbnails-container": "_rp-thumbnails-
|
|
3530
|
-
"rp-thumbnails": "_rp-
|
|
3524
|
+
"rp-thumbnails-container": "_rp-thumbnails-container_heze1_1",
|
|
3525
|
+
"rp-thumbnails": "_rp-thumbnails_heze1_1"
|
|
3531
3526
|
}, va = 16, wa = (t, e) => {
|
|
3532
3527
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3533
3528
|
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - va);
|
|
3534
|
-
},
|
|
3535
|
-
const { show: n, width:
|
|
3529
|
+
}, ba = at((t, e) => {
|
|
3530
|
+
const { show: n, width: r } = t, { focusedPage: o, totalPages: a } = ce(), { thumbnailPages: c, addPage: d, thumbnailLength: s, addToPage: f } = Rn(), m = M(null), C = M(1);
|
|
3536
3531
|
mn(e, () => m.current);
|
|
3537
3532
|
const u = W(() => Object.values(c), [c]), T = N(() => {
|
|
3538
|
-
const
|
|
3539
|
-
|
|
3533
|
+
const b = s + 1;
|
|
3534
|
+
b <= a && d(b);
|
|
3540
3535
|
}, [d, a, s]);
|
|
3541
3536
|
return A(() => {
|
|
3542
|
-
|
|
3543
|
-
}, [
|
|
3537
|
+
o > s && a > s ? f(o) : n && C.current !== o && (wa(m.current, o), C.current = o);
|
|
3538
|
+
}, [o, s, f, n, u]), Xo(m.current, T), /* @__PURE__ */ i("div", { ref: m, className: fn["rp-thumbnails-container"], style: { width: r }, children: /* @__PURE__ */ i("div", { className: fn["rp-thumbnails"], children: n ? u.map((b, P) => {
|
|
3544
3539
|
var y, w;
|
|
3545
3540
|
return /* @__PURE__ */ i(
|
|
3546
3541
|
ga,
|
|
3547
3542
|
{
|
|
3548
|
-
isFocused:
|
|
3549
|
-
pageNumber: (w =
|
|
3550
|
-
loading:
|
|
3551
|
-
viewport:
|
|
3552
|
-
defaultRotation:
|
|
3543
|
+
isFocused: o === ((y = b.page) == null ? void 0 : y.pageNumber),
|
|
3544
|
+
pageNumber: (w = b.page) == null ? void 0 : w.pageNumber,
|
|
3545
|
+
loading: b.loading,
|
|
3546
|
+
viewport: b.viewport,
|
|
3547
|
+
defaultRotation: b.defaultRotation
|
|
3553
3548
|
},
|
|
3554
3549
|
P
|
|
3555
3550
|
);
|
|
3556
3551
|
}) : null }) });
|
|
3557
|
-
}),
|
|
3552
|
+
}), _a = () => {
|
|
3558
3553
|
const { thumbnailIcon: t } = ve(), { thumbnailIcon: e } = ge();
|
|
3559
|
-
return t || e || /* @__PURE__ */ i(
|
|
3554
|
+
return t || e || /* @__PURE__ */ i(Ho, {});
|
|
3560
3555
|
}, Pa = () => {
|
|
3561
|
-
const { active: t, setActive: e } = Rn(), [n,
|
|
3556
|
+
const { active: t, setActive: e } = Rn(), [n, r] = H(Qo), o = M(null), a = M(null), { thumbnailTool: c, sidebarEnable: d } = Ce(), { localeMessages: s } = pe(), f = N(() => {
|
|
3562
3557
|
e((C) => !C);
|
|
3563
3558
|
}, []), m = W(() => typeof c != "boolean" && c ? /* @__PURE__ */ i(c, { onClick: f, active: t }) : c ? /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
3564
3559
|
de,
|
|
@@ -3566,7 +3561,7 @@ const Oe = {
|
|
|
3566
3561
|
onClick: f,
|
|
3567
3562
|
active: t,
|
|
3568
3563
|
"aria-label": s == null ? void 0 : s.thumbnailTooltip,
|
|
3569
|
-
children: /* @__PURE__ */ i(
|
|
3564
|
+
children: /* @__PURE__ */ i(_a, {})
|
|
3570
3565
|
}
|
|
3571
3566
|
) }) : null, [c, t, f, s]);
|
|
3572
3567
|
return /* @__PURE__ */ i(he, { children: d && /* @__PURE__ */ k(
|
|
@@ -3583,12 +3578,12 @@ const Oe = {
|
|
|
3583
3578
|
"data-rp": "thumbnailSidebar",
|
|
3584
3579
|
className: `${Xe["rp-thumbnails-wrapper"]} ${t ? "" : Xe["rp-thumbnails-wrapper-hidden"]}`,
|
|
3585
3580
|
children: [
|
|
3586
|
-
/* @__PURE__ */ i(
|
|
3581
|
+
/* @__PURE__ */ i(ba, { show: t, ref: o }),
|
|
3587
3582
|
/* @__PURE__ */ i(
|
|
3588
|
-
|
|
3583
|
+
$o,
|
|
3589
3584
|
{
|
|
3590
|
-
onWidthChange:
|
|
3591
|
-
thumbnailRef:
|
|
3585
|
+
onWidthChange: r,
|
|
3586
|
+
thumbnailRef: o,
|
|
3592
3587
|
leftSidebarRef: a
|
|
3593
3588
|
}
|
|
3594
3589
|
)
|
|
@@ -3598,25 +3593,25 @@ const Oe = {
|
|
|
3598
3593
|
]
|
|
3599
3594
|
}
|
|
3600
3595
|
) });
|
|
3601
|
-
}, Sc =
|
|
3596
|
+
}, Sc = mo((t, e) => {
|
|
3602
3597
|
const {
|
|
3603
3598
|
children: n,
|
|
3604
|
-
slots:
|
|
3605
|
-
icons:
|
|
3599
|
+
slots: r,
|
|
3600
|
+
icons: o,
|
|
3606
3601
|
style: a,
|
|
3607
3602
|
className: c,
|
|
3608
3603
|
mobileWidth: d,
|
|
3609
3604
|
onLoaded: s,
|
|
3610
3605
|
cleanupOnLoaded: f,
|
|
3611
3606
|
onLayoutWidthChange: m
|
|
3612
|
-
} = t, [C, u] = H(null), { setContainer: T, setContentRef:
|
|
3607
|
+
} = t, [C, u] = H(null), { setContainer: T, setContentRef: b } = Te(), { loading: P } = re(), { LoaderImageComponent: y } = St();
|
|
3613
3608
|
return A(() => (s && s(), () => {
|
|
3614
3609
|
f && f();
|
|
3615
3610
|
}), [s, f]), // TODO: deprecated in v2.0.0, remove later ~
|
|
3616
|
-
/* @__PURE__ */ i(zn, { toolbarRef: C, ref: e, children: /* @__PURE__ */ i(
|
|
3611
|
+
/* @__PURE__ */ i(zn, { toolbarRef: C, ref: e, children: /* @__PURE__ */ i(Uo, { mobileWidth: d, onLayoutWidthChange: m, children: /* @__PURE__ */ i(Vo, { slots: r, children: /* @__PURE__ */ i(jo, { icons: o, children: /* @__PURE__ */ k(Go, { getContainerRef: T, style: a, className: c, children: [
|
|
3617
3612
|
/* @__PURE__ */ i(Gt, { href: "#rp-navigation", label: "Skip to navigation" }),
|
|
3618
3613
|
/* @__PURE__ */ i(Gt, { href: "#rp-main-content", label: "Skip to main content" }),
|
|
3619
|
-
/* @__PURE__ */ k(
|
|
3614
|
+
/* @__PURE__ */ k(qo, { children: [
|
|
3620
3615
|
/* @__PURE__ */ k("div", { className: ye["rp-layout"], children: [
|
|
3621
3616
|
/* @__PURE__ */ i("nav", { id: "rp-navigation", role: "navigation", "aria-label": "PDF viewer toolbar", children: /* @__PURE__ */ i(
|
|
3622
3617
|
ma,
|
|
@@ -3638,7 +3633,7 @@ const Oe = {
|
|
|
3638
3633
|
"main",
|
|
3639
3634
|
{
|
|
3640
3635
|
id: "rp-main-content",
|
|
3641
|
-
ref:
|
|
3636
|
+
ref: b,
|
|
3642
3637
|
className: ye["rp-pages"],
|
|
3643
3638
|
role: "main",
|
|
3644
3639
|
"aria-label": "PDF document pages",
|
|
@@ -3647,7 +3642,7 @@ const Oe = {
|
|
|
3647
3642
|
)
|
|
3648
3643
|
] })
|
|
3649
3644
|
] }),
|
|
3650
|
-
/* @__PURE__ */ i(
|
|
3645
|
+
/* @__PURE__ */ i(Bo, {})
|
|
3651
3646
|
] }),
|
|
3652
3647
|
P ? /* @__PURE__ */ i(
|
|
3653
3648
|
"div",
|
|
@@ -3679,30 +3674,30 @@ const Oe = {
|
|
|
3679
3674
|
) : null
|
|
3680
3675
|
] }) }) }) }) });
|
|
3681
3676
|
}), Rc = {
|
|
3682
|
-
"rp-toolbar-layout": "_rp-toolbar-
|
|
3683
|
-
"rp-content": "_rp-
|
|
3684
|
-
"rp-topbar-content": "_rp-topbar-
|
|
3685
|
-
"rp-sidebar-content": "_rp-sidebar-
|
|
3686
|
-
"rp-pages": "_rp-
|
|
3687
|
-
"rp-thumbnails-wrapper": "_rp-thumbnails-
|
|
3688
|
-
"rp-thumbnails-wrapper-hidden": "_rp-thumbnails-wrapper-
|
|
3677
|
+
"rp-toolbar-layout": "_rp-toolbar-layout_yancp_1",
|
|
3678
|
+
"rp-content": "_rp-content_yancp_7",
|
|
3679
|
+
"rp-topbar-content": "_rp-topbar-content_yancp_13",
|
|
3680
|
+
"rp-sidebar-content": "_rp-sidebar-content_yancp_22",
|
|
3681
|
+
"rp-pages": "_rp-pages_yancp_32",
|
|
3682
|
+
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_yancp_37",
|
|
3683
|
+
"rp-thumbnails-wrapper-hidden": "_rp-thumbnails-wrapper-hidden_yancp_45"
|
|
3689
3684
|
};
|
|
3690
3685
|
export {
|
|
3691
3686
|
ma as $,
|
|
3692
3687
|
Sn as A,
|
|
3693
|
-
|
|
3688
|
+
Br as B,
|
|
3694
3689
|
Ln as C,
|
|
3695
|
-
|
|
3690
|
+
qi as D,
|
|
3696
3691
|
En as E,
|
|
3697
3692
|
Nn as F,
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3693
|
+
Zr as G,
|
|
3694
|
+
Xr as H,
|
|
3695
|
+
Jr as I,
|
|
3701
3696
|
ti as J,
|
|
3702
|
-
|
|
3697
|
+
qe as K,
|
|
3703
3698
|
zn as L,
|
|
3704
3699
|
vi as M,
|
|
3705
|
-
|
|
3700
|
+
_i as N,
|
|
3706
3701
|
Pi as O,
|
|
3707
3702
|
Si as P,
|
|
3708
3703
|
Ti as Q,
|
|
@@ -3711,9 +3706,9 @@ export {
|
|
|
3711
3706
|
Pc as T,
|
|
3712
3707
|
Ci as U,
|
|
3713
3708
|
Jn as V,
|
|
3714
|
-
|
|
3709
|
+
no as W,
|
|
3715
3710
|
na as X,
|
|
3716
|
-
|
|
3711
|
+
oa as Y,
|
|
3717
3712
|
aa as Z,
|
|
3718
3713
|
hn as _,
|
|
3719
3714
|
Sc as a,
|
|
@@ -3723,25 +3718,25 @@ export {
|
|
|
3723
3718
|
st as c,
|
|
3724
3719
|
At as d,
|
|
3725
3720
|
Rn as e,
|
|
3726
|
-
|
|
3721
|
+
_t as f,
|
|
3727
3722
|
We as g,
|
|
3728
3723
|
$e as h,
|
|
3729
3724
|
da as i,
|
|
3730
|
-
|
|
3731
|
-
|
|
3725
|
+
ra as j,
|
|
3726
|
+
bc as k,
|
|
3732
3727
|
Tc as l,
|
|
3733
3728
|
Cc as m,
|
|
3734
|
-
|
|
3729
|
+
_c as n,
|
|
3735
3730
|
Rc as o,
|
|
3736
|
-
|
|
3731
|
+
ba as p,
|
|
3737
3732
|
fa as q,
|
|
3738
3733
|
Bi as r,
|
|
3739
3734
|
Ji as s,
|
|
3740
3735
|
yn as t,
|
|
3741
3736
|
ce as u,
|
|
3742
|
-
|
|
3737
|
+
Ur as v,
|
|
3743
3738
|
In as w,
|
|
3744
|
-
|
|
3739
|
+
Vr as x,
|
|
3745
3740
|
xn as y,
|
|
3746
|
-
|
|
3741
|
+
qr as z
|
|
3747
3742
|
};
|