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