@pdf-viewer/react 1.15.0-beta.4 → 1.15.0-rc.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-533a6d5a.js → ToolbarLayout.module-e3f86395.js} +990 -1034
- package/dist/components/RPController.js +7 -6
- package/dist/components/RPPages.js +6 -5
- package/dist/components/RPProvider.js +7 -6
- package/dist/components/layout/LayoutContainer.js +6 -5
- package/dist/components/layout/RPDefaultLayout.js +6 -5
- package/dist/components/layout/RPLayout.js +7 -6
- package/dist/components/layout/sidebar/RPSidebar.js +6 -5
- package/dist/components/layout/sidebar/Thumbnail.js +6 -5
- package/dist/components/layout/sidebar/Thumbnails.js +6 -5
- package/dist/components/layout/toolbar/DarkModeTool.js +2 -2
- package/dist/components/layout/toolbar/DocumentDialog.js +6 -5
- package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/FileDownloadTool.js +6 -5
- 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 +6 -5
- package/dist/components/layout/toolbar/OtherTool.js +6 -5
- package/dist/components/layout/toolbar/Paginate.js +6 -5
- package/dist/components/layout/toolbar/PrintTool.js +6 -5
- package/dist/components/layout/toolbar/RPMenuItem.js +3 -3
- package/dist/components/layout/toolbar/RPMoreOptions.js +7 -6
- package/dist/components/layout/toolbar/RPToolbar.js +6 -5
- package/dist/components/layout/toolbar/RPToolbarEnd.js +6 -5
- 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 +6 -5
- package/dist/components/layout/toolbar/SearchTool.js +6 -5
- package/dist/components/layout/toolbar/SelectionModeTool.js +3 -3
- package/dist/components/layout/toolbar/ThumbnailTool.js +7 -6
- package/dist/components/layout/toolbar/ToolbarCustom.js +7 -6
- package/dist/components/layout/toolbar/ToolbarDefault.js +7 -6
- package/dist/components/layout/toolbar/ToolbarLayout.js +7 -6
- package/dist/components/layout/toolbar/ViewModeTool.js +3 -3
- package/dist/components/layout/toolbar/ZoomTool.js +6 -5
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +7 -6
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +7 -6
- 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 +7 -6
- package/dist/components/layout/toolbar/tools/NextPageTool.js +7 -6
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +7 -6
- package/dist/components/layout/toolbar/tools/PrintTool.js +7 -6
- 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 +7 -6
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +6 -5
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +7 -6
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +2 -2
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +7 -6
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +7 -6
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +7 -6
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +7 -6
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +7 -6
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +7 -6
- 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 +6 -5
- package/dist/components/page/CanvasLayer.js +6 -5
- package/dist/components/page/DualPage.js +6 -5
- package/dist/components/page/RPPage.js +6 -5
- package/dist/components/page/SinglePage.js +6 -5
- package/dist/components/page/TextHighlightLayer.js +6 -5
- package/dist/components/page/TextLayer.js +6 -5
- package/dist/components/ui/Checkbox.js +1 -1
- package/dist/components/ui/DropDown.js +3 -3
- package/dist/components/ui/LoadingIndicator.js +6 -5
- package/dist/components/ui/RPTooltip.js +415 -201
- package/dist/contexts/PaginationContext.js +8 -7
- package/dist/contexts/PrintContext.js +8 -7
- package/dist/contexts/RenderQueueProvider.js +8 -7
- package/dist/contexts/SearchContext.js +8 -7
- package/dist/contexts/ThumbnailsContext.js +8 -7
- package/dist/floating-ui.react-dom-6b2fe0df.js +1474 -0
- package/dist/{index-c9a2990a.js → index-35c7f4a2.js} +3 -3
- package/dist/index-f563c6f0.js +1889 -0
- package/dist/main.js +91 -90
- package/dist/types/utils/hooks/useCopyText.d.ts +1 -0
- package/dist/utils/annotations.js +108 -116
- package/dist/utils/hooks/useCopyText.js +36 -0
- package/dist/utils/hooks/useFileDownload.js +6 -5
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +6 -5
- package/dist/utils/hooks/usePresentPage.js +6 -5
- package/dist/utils/hooks/usePrint.js +6 -5
- package/dist/utils/hooks/useScrollToPage.js +6 -5
- package/dist/utils/hooks/useSearch.js +6 -5
- package/dist/utils/hooks/useThumbnail.js +6 -5
- package/dist/utils/hooks/useVirtualReactWindow.js +6 -5
- package/package.json +1 -1
- package/dist/index-808ea7bf.js +0 -1685
- package/dist/index-a48ec088.js +0 -1672
|
@@ -1,112 +1,113 @@
|
|
|
1
|
-
import { jsx as i, Fragment as
|
|
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
|
|
4
|
-
import { ChevronUpIcon as
|
|
5
|
-
import { UIButton as
|
|
6
|
-
import { UIInput as
|
|
7
|
-
import { ViewMode as
|
|
8
|
-
import { useScrollModeContext 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
|
+
import { ChevronUpIcon as Ue } from "./components/icons/ChevronUpIcon.js";
|
|
5
|
+
import { UIButton as ce } from "./components/ui/Button.js";
|
|
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
|
+
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
|
|
14
|
-
import { useZoomContext as
|
|
15
|
-
import { useViewModeContext as
|
|
16
|
-
import { useVirtualScrollContext as
|
|
17
|
-
import { useVirtualGridContext as
|
|
18
|
-
import { useSelectionModeContext as
|
|
19
|
-
import { useInitialStateContext as
|
|
20
|
-
import { useFullScreenContext as
|
|
13
|
+
import { useLayerContext as vo } from "./contexts/LayerContext.js";
|
|
14
|
+
import { useZoomContext as tt } from "./contexts/ZoomContext.js";
|
|
15
|
+
import { useViewModeContext as Me } from "./contexts/ViewModeContext.js";
|
|
16
|
+
import { useVirtualScrollContext as nt } from "./contexts/VirtualScrollContext.js";
|
|
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
|
+
import { useFullScreenContext as _o } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
|
-
import { findMatches as
|
|
24
|
-
import { useLayoutContainer as
|
|
25
|
-
import { useDimensionPagesContext as
|
|
26
|
-
import { useLocalizationContext as
|
|
27
|
-
import { useHighlightContext as
|
|
23
|
+
import { findMatches as bo, resetDivs as To, highlightMatches as Co, isMatchEntireWord as Po } from "./utils/highlight.js";
|
|
24
|
+
import { useLayoutContainer as Te } from "./contexts/LayoutContainerContext.js";
|
|
25
|
+
import { useDimensionPagesContext as Ze } from "./contexts/DimensionPagesContext.js";
|
|
26
|
+
import { useLocalizationContext as de } from "./contexts/LocalizationContext.js";
|
|
27
|
+
import { useHighlightContext as yo } from "./contexts/HighlightContext.js";
|
|
28
28
|
import "./contexts/LicenseContext.js";
|
|
29
|
-
import { useDownloadContext as
|
|
30
|
-
import { useSmoothScrollContext as
|
|
29
|
+
import { useDownloadContext as Io } from "./contexts/DownloadContext.js";
|
|
30
|
+
import { useSmoothScrollContext as mn } from "./contexts/SmoothScrollContext.js";
|
|
31
31
|
import "./contexts/ElementPageContext.js";
|
|
32
|
-
import { usePagesRotateContext as
|
|
33
|
-
import { Queue as
|
|
34
|
-
import { renderPage as
|
|
35
|
-
import { useGlobalCurrentPage as
|
|
36
|
-
import { useLoaderContext as
|
|
37
|
-
import { useToolComponentContext as
|
|
38
|
-
import { useIconToolContext as
|
|
39
|
-
import { useOtherToolContext as
|
|
40
|
-
import { useEventCallbackContext as
|
|
41
|
-
import { useThemeContext as
|
|
32
|
+
import { usePagesRotateContext as ot } from "./contexts/PagesRotateContext.js";
|
|
33
|
+
import { Queue as So } from "./utils/Queue.js";
|
|
34
|
+
import { renderPage as xo } from "./utils/renderPage.js";
|
|
35
|
+
import { useGlobalCurrentPage as Ro } from "./contexts/GlobalCurrentPage.js";
|
|
36
|
+
import { useLoaderContext as yt } from "./contexts/LoaderContext.js";
|
|
37
|
+
import { useToolComponentContext as Ie } from "./contexts/ToolComponentContext.js";
|
|
38
|
+
import { useIconToolContext as me } from "./contexts/IconToolContext.js";
|
|
39
|
+
import { useOtherToolContext as Lo } from "./contexts/OtherToolContext.js";
|
|
40
|
+
import { useEventCallbackContext as Eo } from "./contexts/EventCallbackContext.js";
|
|
41
|
+
import { useThemeContext as No } from "./contexts/ThemeContext.js";
|
|
42
42
|
import "./contexts/ConfigContext.js";
|
|
43
|
-
import * as
|
|
44
|
-
import { PixelsPerInch as
|
|
45
|
-
import { ThumbnailIcon as
|
|
46
|
-
import { c as
|
|
47
|
-
import { LoaderIcon as
|
|
48
|
-
import { Container as
|
|
49
|
-
import { useViewportContext as
|
|
50
|
-
import { useToolbarComponentContext as
|
|
51
|
-
import { RPSplitter as
|
|
52
|
-
import { WrapperLayout as
|
|
53
|
-
import { c as
|
|
54
|
-
import { RPDropFileZone as
|
|
55
|
-
import { c as ne, S as
|
|
56
|
-
import { UICheckbox as
|
|
57
|
-
import { useIconContext as
|
|
43
|
+
import * as Oo from "pdfjs-dist";
|
|
44
|
+
import { PixelsPerInch as Do, AnnotationMode as zo, RenderingCancelledException as Ao, AnnotationLayer as Fo } from "pdfjs-dist";
|
|
45
|
+
import { ThumbnailIcon as ko } from "./components/icons/Thumbnail.js";
|
|
46
|
+
import { c as se } from "./clsx-0c6e471a.js";
|
|
47
|
+
import { LoaderIcon as gn } from "./components/icons/LoaderIcon.js";
|
|
48
|
+
import { Container as Wo } from "./components/layout/Container.js";
|
|
49
|
+
import { useViewportContext as Se, ViewportProvider as Mo } from "./contexts/ViewportContext.js";
|
|
50
|
+
import { useToolbarComponentContext as Ce, ToolbarComponentProvider as Ho } from "./contexts/ToolbarComponentContext.js";
|
|
51
|
+
import { RPSplitter as $o } from "./components/layout/sidebar/RPSplitter.js";
|
|
52
|
+
import { WrapperLayout as Go } from "./components/layout/WrapperLayout.js";
|
|
53
|
+
import { c as Pe, L as qo } from "./LayoutWrapper-6224491f.js";
|
|
54
|
+
import { RPDropFileZone as Uo } from "./components/RPDropFileZone.js";
|
|
55
|
+
import { c as ne, S as Ht } from "./SearchCloseButton-08d57275.js";
|
|
56
|
+
import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
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
|
|
60
|
-
import { MenuItem as
|
|
61
|
-
import { MenuSeparator as
|
|
62
|
-
import { dateFormatter as
|
|
63
|
-
import { PropertyItem as
|
|
59
|
+
import { UIDropDown as It } from "./components/ui/DropDown.js";
|
|
60
|
+
import { MenuItem as ye } from "./components/layout/toolbar/MenuItem.js";
|
|
61
|
+
import { MenuSeparator as St } from "./components/layout/toolbar/MenuSeparator.js";
|
|
62
|
+
import { dateFormatter as Gt } from "./utils/dateFormatter.js";
|
|
63
|
+
import { PropertyItem as Bo } from "./components/layout/toolbar/PropertyItem.js";
|
|
64
64
|
import "./RotateTool.module-67946714.js";
|
|
65
|
-
import { withRef as
|
|
66
|
-
import { useInfiniteScroll as
|
|
67
|
-
import { MAX_ZOOM_SCALE as
|
|
68
|
-
import { SimpleLinkService as
|
|
69
|
-
import { annotationsEvents as
|
|
70
|
-
import { normalizeSingleKeyword as
|
|
71
|
-
import { CustomElement as
|
|
72
|
-
import { getGridDimension as
|
|
73
|
-
import { useMousePressed as
|
|
74
|
-
import { useGrabScroll as
|
|
75
|
-
import { usePinch as
|
|
76
|
-
import { useDebounce as
|
|
77
|
-
import
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
65
|
+
import { withRef as rt } from "./utils/withRef.js";
|
|
66
|
+
import { useInfiniteScroll as Zo } from "./utils/hooks/useInfiniteScroll.js";
|
|
67
|
+
import { MAX_ZOOM_SCALE as qt, THUMBNAIL_MIN_WIDTH as jo } from "./utils/constants.js";
|
|
68
|
+
import { SimpleLinkService as Ko } from "./utils/link_service.js";
|
|
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
|
+
import { normalizeSingleKeyword as tr, sortHighlightPosition as nr, unwrap as or } from "./components/page/searchHighlight.js";
|
|
71
|
+
import { CustomElement as rr } from "./components/page/CustomElement.js";
|
|
72
|
+
import { getGridDimension as xt, getPositionFromPage as ir, getPageFromPosition as sr } from "./utils/calculatePage.js";
|
|
73
|
+
import { useMousePressed as ar } from "./utils/hooks/useMousePressed.js";
|
|
74
|
+
import { useGrabScroll as cr } from "./utils/hooks/useGrabScroll.js";
|
|
75
|
+
import { usePinch as lr } from "./utils/hooks/usePinch.js";
|
|
76
|
+
import { useDebounce as Rt } from "./utils/hooks/useDebounce.js";
|
|
77
|
+
import dr from "./components/ui/PasswordModal.js";
|
|
78
|
+
import { useCopyText as ur } from "./utils/hooks/useCopyText.js";
|
|
79
|
+
import { getScrollDistance as ke } from "./utils/getScrollDistance.js";
|
|
80
|
+
import { getWordPositionInPage as pr } from "./utils/getWordPositionInPage.js";
|
|
81
|
+
import { getThumbnailViewport as hr } from "./utils/getThumbnailViewport.js";
|
|
82
|
+
import { smoothScrollTo as dt } from "./utils/smoothScrollTo.js";
|
|
83
|
+
import { appConsole as fr } from "./utils/appConsole.js";
|
|
84
|
+
import { FileUploadTool as vn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
85
|
+
import { DarkModeTool as mr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
86
|
+
import { ThreeDotIcon as gr } from "./components/icons/ThreeDotIcon.js";
|
|
87
|
+
import { c as vr, u as Lt, P as je, a as qe, b as Et, k as wr, e as _r, i as br } from "./index-35c7f4a2.js";
|
|
88
|
+
import { D as Tr, e as ut } from "./floating-ui.react-dom-6b2fe0df.js";
|
|
89
|
+
import { a as Cr, h as Pr, u as yr, F as Ir, b as Sr, G as Je } from "./index-f563c6f0.js";
|
|
90
|
+
import { CloseIcon as xr } from "./components/icons/CloseIcon.js";
|
|
91
|
+
import { DocumentProperties as Rr } from "./components/layout/toolbar/DocumentProperties.js";
|
|
92
|
+
import { RotateTool as Lr } from "./components/layout/toolbar/RotateTool.js";
|
|
93
|
+
import { ViewModeTool as Er } from "./components/layout/toolbar/ViewModeTool.js";
|
|
94
|
+
import { ScrollModeTool as Nr } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
95
|
+
import { FileDownloadDefaultIcon as Or } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
96
|
+
import { PrintDefaultTool as Dr } from "./components/icons/PrintDefaultIcon.js";
|
|
97
|
+
import { FullScreenTool as wn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
98
|
+
import { GoToDownIcon as _n } from "./components/icons/GoToDownIcon.js";
|
|
99
|
+
import { SelectionModeTool as zr } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
100
|
+
import { ZoomInIcon as Ar } from "./components/icons/ZoomInIcon.js";
|
|
101
|
+
import { ZoomOutIcon as Fr } from "./components/icons/ZoomOutIcon.js";
|
|
102
|
+
import { isZoomOutDisabled as kr, isZoomInDisabled as Wr } from "./utils/zoom.js";
|
|
103
|
+
import { SearchIcon as bn } from "./components/icons/SearchIcon.js";
|
|
104
|
+
import { ClearIcon as Mr } from "./components/icons/ClearIcon.js";
|
|
105
|
+
import { InfoIcon as Bt } from "./components/icons/InfoIcon.js";
|
|
106
|
+
const Tn = () => {
|
|
107
|
+
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();
|
|
108
|
+
z(() => {
|
|
108
109
|
n != null && n.scrollToItem && (a.current = n);
|
|
109
|
-
}, [n]),
|
|
110
|
+
}, [n]), z(() => {
|
|
110
111
|
g.current = e, C.current = t;
|
|
111
112
|
}, [e, t]);
|
|
112
113
|
const _ = N(
|
|
@@ -120,7 +121,7 @@ const Ln = () => {
|
|
|
120
121
|
top: 0
|
|
121
122
|
};
|
|
122
123
|
return new Promise(
|
|
123
|
-
(l) =>
|
|
124
|
+
(l) => dt(o, f, l)
|
|
124
125
|
);
|
|
125
126
|
}
|
|
126
127
|
const h = {
|
|
@@ -132,18 +133,18 @@ const Ln = () => {
|
|
|
132
133
|
behavior: P
|
|
133
134
|
});
|
|
134
135
|
},
|
|
135
|
-
[o, c,
|
|
136
|
+
[o, c, dt]
|
|
136
137
|
);
|
|
137
|
-
return
|
|
138
|
+
return z(() => {
|
|
138
139
|
g.current = e, C.current = t;
|
|
139
|
-
}, [e, t]),
|
|
140
|
+
}, [e, t]), z(() => {
|
|
140
141
|
u.current = d;
|
|
141
142
|
}, [d]), { scrollToPage: N(
|
|
142
143
|
(T, P = "smooth") => {
|
|
143
144
|
s(T);
|
|
144
145
|
const p = T - 1;
|
|
145
146
|
let h = p, f = 0;
|
|
146
|
-
if (C.current ===
|
|
147
|
+
if (C.current === Ne.DUAL_PAGE && g.current === oe.PAGE_SCROLLING) {
|
|
147
148
|
_(T, P);
|
|
148
149
|
return;
|
|
149
150
|
}
|
|
@@ -155,14 +156,14 @@ const Ln = () => {
|
|
|
155
156
|
return;
|
|
156
157
|
const l = r;
|
|
157
158
|
P === "smooth" && (y.current = T);
|
|
158
|
-
const { columnsWidth: v, rowsHeight: w } =
|
|
159
|
+
const { columnsWidth: v, rowsHeight: w } = xt(
|
|
159
160
|
{ widths: c, heights: m },
|
|
160
161
|
d
|
|
161
162
|
);
|
|
162
163
|
if (g.current === oe.HORIZONTAL_SCROLLING) {
|
|
163
164
|
f = p;
|
|
164
|
-
const
|
|
165
|
-
left: Math.floor(
|
|
165
|
+
const S = ke(v, f), L = {
|
|
166
|
+
left: Math.floor(S),
|
|
166
167
|
top: 0
|
|
167
168
|
};
|
|
168
169
|
return l.scrollTo({
|
|
@@ -170,23 +171,23 @@ const Ln = () => {
|
|
|
170
171
|
behavior: P
|
|
171
172
|
});
|
|
172
173
|
}
|
|
173
|
-
if (C.current ===
|
|
174
|
+
if (C.current === Ne.DUAL_PAGE) {
|
|
174
175
|
f = p % 2, h = Math.floor(p / 2);
|
|
175
|
-
const L =
|
|
176
|
+
const L = ke(v, f), O = ke(w, h), D = {
|
|
176
177
|
left: Math.floor(L),
|
|
177
178
|
top: Math.floor(O)
|
|
178
179
|
};
|
|
179
180
|
return l.scrollTo({
|
|
180
|
-
...
|
|
181
|
+
...D,
|
|
181
182
|
behavior: P
|
|
182
183
|
});
|
|
183
184
|
}
|
|
184
|
-
const I =
|
|
185
|
+
const I = ke(w, h), x = {
|
|
185
186
|
left: 0,
|
|
186
187
|
top: Math.floor(I)
|
|
187
188
|
};
|
|
188
189
|
return l.scrollTo({
|
|
189
|
-
...
|
|
190
|
+
...x,
|
|
190
191
|
behavior: P
|
|
191
192
|
});
|
|
192
193
|
},
|
|
@@ -195,13 +196,13 @@ const Ln = () => {
|
|
|
195
196
|
d,
|
|
196
197
|
_,
|
|
197
198
|
s,
|
|
198
|
-
|
|
199
|
+
dt,
|
|
199
200
|
m,
|
|
200
201
|
c
|
|
201
202
|
]
|
|
202
203
|
) };
|
|
203
|
-
},
|
|
204
|
-
const [e, n] = $(t), [r, o] = $(0), { scrollToPage: s } =
|
|
204
|
+
}, Hr = (t = 1) => {
|
|
205
|
+
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
206
|
(h) => {
|
|
206
207
|
if (!/^[0-9]*$/g.test(h.toString()) || !h)
|
|
207
208
|
return { success: !1, currentPage: a.current };
|
|
@@ -220,11 +221,11 @@ const Ln = () => {
|
|
|
220
221
|
if (!g || f)
|
|
221
222
|
return !1;
|
|
222
223
|
const l = f ? m[h] : m[h - 1], v = f ? m[h + 1] : m[h];
|
|
223
|
-
return d ===
|
|
224
|
+
return d === Ne.DUAL_PAGE && l + v < g.clientWidth;
|
|
224
225
|
}, [d, m, g, r]), T = N(() => {
|
|
225
226
|
let h = e - 1;
|
|
226
227
|
b(h) && (h = e - 2), _(h);
|
|
227
|
-
}, [_, e, d, c, b]), P = k(() => d ===
|
|
228
|
+
}, [_, 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
229
|
if (P)
|
|
229
230
|
return;
|
|
230
231
|
let h = e + 1;
|
|
@@ -239,7 +240,7 @@ const Ln = () => {
|
|
|
239
240
|
prevPage: T,
|
|
240
241
|
goToPage: _
|
|
241
242
|
};
|
|
242
|
-
},
|
|
243
|
+
}, Cn = Ve({
|
|
243
244
|
focusedPage: 0,
|
|
244
245
|
setFocusedPage: (t) => {
|
|
245
246
|
},
|
|
@@ -251,17 +252,17 @@ const Ln = () => {
|
|
|
251
252
|
},
|
|
252
253
|
nextPage: () => {
|
|
253
254
|
}
|
|
254
|
-
}),
|
|
255
|
-
const t =
|
|
256
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
257
|
-
},
|
|
258
|
-
const { pdf: e } = re(), { setCurrentPage: n } =
|
|
259
|
-
return
|
|
255
|
+
}), ue = () => {
|
|
256
|
+
const t = Be(Cn);
|
|
257
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && fr.error("Please use this hooks inside children component of RPProvider"), t;
|
|
258
|
+
}, fc = ({ children: t }) => {
|
|
259
|
+
const { pdf: e } = re(), { setCurrentPage: n } = Ro(), { focusedPage: r, totalPages: o, setFocusedPage: s, setTotalPages: a, goToPage: d, nextPage: c, prevPage: m } = Hr();
|
|
260
|
+
return z(() => {
|
|
260
261
|
e != null && e.numPages && (a(e.numPages), s(1));
|
|
261
|
-
}, [e, a, s]),
|
|
262
|
+
}, [e, a, s]), z(() => {
|
|
262
263
|
n(r);
|
|
263
264
|
}, [r, n]), /* @__PURE__ */ i(
|
|
264
|
-
|
|
265
|
+
Cn.Provider,
|
|
265
266
|
{
|
|
266
267
|
value: {
|
|
267
268
|
focusedPage: r,
|
|
@@ -275,13 +276,13 @@ const Ln = () => {
|
|
|
275
276
|
children: t
|
|
276
277
|
}
|
|
277
278
|
);
|
|
278
|
-
},
|
|
279
|
+
}, $r = () => {
|
|
279
280
|
const { pdf: t, pages: e } = re(), [n, r] = $({
|
|
280
281
|
loadedPages: 0,
|
|
281
282
|
totalPages: 0,
|
|
282
283
|
percentage: 0
|
|
283
284
|
}), [o, s] = $(!1), [a, d] = $(!1), [c, m] = $(null), [g, C] = $(void 0), u = M(!1);
|
|
284
|
-
|
|
285
|
+
z(() => {
|
|
285
286
|
u.current;
|
|
286
287
|
}, [u]);
|
|
287
288
|
const y = N(() => {
|
|
@@ -301,18 +302,18 @@ const Ln = () => {
|
|
|
301
302
|
pdfDocument: v,
|
|
302
303
|
pageNumber: w,
|
|
303
304
|
viewerPdfPage: I,
|
|
304
|
-
printResolution:
|
|
305
|
-
optionalContentConfigPromise:
|
|
305
|
+
printResolution: x,
|
|
306
|
+
optionalContentConfigPromise: S,
|
|
306
307
|
printAnnotationStoragePromise: L
|
|
307
308
|
}) => {
|
|
308
309
|
if (u.current) {
|
|
309
310
|
_();
|
|
310
311
|
return;
|
|
311
312
|
}
|
|
312
|
-
const O =
|
|
313
|
+
const O = x / Do.PDF;
|
|
313
314
|
l.width = Math.floor(I.width * O), l.height = Math.floor(I.height * O);
|
|
314
|
-
const
|
|
315
|
-
|
|
315
|
+
const D = l.getContext("2d");
|
|
316
|
+
D.save(), D.fillStyle = "rgb(255, 255, 255)", D.fillRect(0, 0, l.width, l.height), D.restore();
|
|
316
317
|
const [F, E] = await Promise.all([
|
|
317
318
|
v.getPage(w),
|
|
318
319
|
L
|
|
@@ -322,53 +323,53 @@ const Ln = () => {
|
|
|
322
323
|
return;
|
|
323
324
|
}
|
|
324
325
|
const R = {
|
|
325
|
-
canvasContext:
|
|
326
|
+
canvasContext: D,
|
|
326
327
|
transform: [O, 0, 0, O, 0, 0],
|
|
327
328
|
viewport: F.getViewport({ scale: 1, rotation: I.rotation }),
|
|
328
329
|
intent: "print",
|
|
329
|
-
annotationMode:
|
|
330
|
-
optionalContentConfigPromise:
|
|
330
|
+
annotationMode: zo.ENABLE_STORAGE,
|
|
331
|
+
optionalContentConfigPromise: S,
|
|
331
332
|
printAnnotationStorage: E
|
|
332
333
|
};
|
|
333
334
|
try {
|
|
334
335
|
return F.render(R).promise;
|
|
335
336
|
} catch (A) {
|
|
336
|
-
throw A instanceof
|
|
337
|
+
throw A instanceof Ao || console.error(A), A;
|
|
337
338
|
}
|
|
338
339
|
}, P = N(() => {
|
|
339
340
|
const l = window.print;
|
|
340
341
|
return new Promise((v) => {
|
|
341
|
-
const w = (
|
|
342
|
+
const w = (S) => {
|
|
342
343
|
setTimeout(() => {
|
|
343
|
-
l.call(window), setTimeout(() =>
|
|
344
|
+
l.call(window), setTimeout(() => S(), 20);
|
|
344
345
|
}, 0);
|
|
345
346
|
};
|
|
346
347
|
if (document.querySelector(".rp-print-zone")) {
|
|
347
348
|
w(v);
|
|
348
349
|
return;
|
|
349
350
|
}
|
|
350
|
-
const
|
|
351
|
-
document.querySelector(".rp-print-zone") && (w(v),
|
|
351
|
+
const x = new MutationObserver(() => {
|
|
352
|
+
document.querySelector(".rp-print-zone") && (w(v), x.disconnect());
|
|
352
353
|
});
|
|
353
|
-
|
|
354
|
+
x.observe(document.body, { childList: !0, subtree: !0 });
|
|
354
355
|
});
|
|
355
356
|
}, []), p = async (l) => {
|
|
356
357
|
const v = document.createElement("img"), w = document.createElement("div");
|
|
357
|
-
return w.classList.add("rp-print-page"), await new Promise((I,
|
|
358
|
-
l.toBlob((
|
|
359
|
-
|
|
358
|
+
return w.classList.add("rp-print-page"), await new Promise((I, x) => {
|
|
359
|
+
l.toBlob((S) => {
|
|
360
|
+
S ? (v.src = URL.createObjectURL(S), v.onload = () => {
|
|
360
361
|
URL.revokeObjectURL(v.src), I();
|
|
361
|
-
}, v.onerror =
|
|
362
|
+
}, v.onerror = x) : x(new Error("Failed to create blob"));
|
|
362
363
|
});
|
|
363
364
|
}).catch(() => {
|
|
364
365
|
}), w.appendChild(v), w;
|
|
365
366
|
}, h = (l, v) => {
|
|
366
367
|
const w = document.createElement("div");
|
|
367
368
|
w.classList.add("rp-print-zone");
|
|
368
|
-
const I = document.createElement("style"),
|
|
369
|
-
if (
|
|
370
|
-
const { width:
|
|
371
|
-
I.innerHTML = `@page { size: ${
|
|
369
|
+
const I = document.createElement("style"), x = v.get(1);
|
|
370
|
+
if (x) {
|
|
371
|
+
const { width: S, height: L } = x == null ? void 0 : x.page.getViewport({ scale: 1 });
|
|
372
|
+
I.innerHTML = `@page { size: ${S}px ${L}px }`;
|
|
372
373
|
}
|
|
373
374
|
return w.appendChild(I), w.append(...l), w;
|
|
374
375
|
}, f = N(
|
|
@@ -381,7 +382,7 @@ const Ln = () => {
|
|
|
381
382
|
const w = document.createElement("canvas"), I = [];
|
|
382
383
|
try {
|
|
383
384
|
t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
384
|
-
const
|
|
385
|
+
const S = t.getOptionalContentConfig({ intent: "print" }), L = Promise.resolve(
|
|
385
386
|
t.annotationStorage.print ?? void 0
|
|
386
387
|
), O = e.size;
|
|
387
388
|
for (const [F, E] of e) {
|
|
@@ -396,7 +397,7 @@ const Ln = () => {
|
|
|
396
397
|
pageNumber: F,
|
|
397
398
|
viewerPdfPage: R,
|
|
398
399
|
printResolution: 150,
|
|
399
|
-
optionalContentConfigPromise:
|
|
400
|
+
optionalContentConfigPromise: S,
|
|
400
401
|
printAnnotationStoragePromise: L
|
|
401
402
|
}), u.current) {
|
|
402
403
|
_();
|
|
@@ -415,17 +416,17 @@ const Ln = () => {
|
|
|
415
416
|
_();
|
|
416
417
|
return;
|
|
417
418
|
}
|
|
418
|
-
const
|
|
419
|
-
document.body.appendChild(
|
|
420
|
-
} catch (
|
|
421
|
-
d(!0),
|
|
419
|
+
const D = h(I, e);
|
|
420
|
+
document.body.appendChild(D), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), s(!0), await P();
|
|
421
|
+
} catch (x) {
|
|
422
|
+
d(!0), x instanceof Error && m(x);
|
|
422
423
|
} finally {
|
|
423
424
|
w.height = 0, w.width = 0;
|
|
424
425
|
}
|
|
425
426
|
},
|
|
426
427
|
[t, e, u, _, h, P]
|
|
427
428
|
);
|
|
428
|
-
return
|
|
429
|
+
return z(() => {
|
|
429
430
|
const l = () => {
|
|
430
431
|
_(), y();
|
|
431
432
|
};
|
|
@@ -441,7 +442,7 @@ const Ln = () => {
|
|
|
441
442
|
error: c,
|
|
442
443
|
showDefaultProgress: g
|
|
443
444
|
};
|
|
444
|
-
},
|
|
445
|
+
}, Pn = Ve({
|
|
445
446
|
print: async () => {
|
|
446
447
|
},
|
|
447
448
|
cancel: () => {
|
|
@@ -458,8 +459,8 @@ const Ln = () => {
|
|
|
458
459
|
console.error("Error in setOnError callback:", e);
|
|
459
460
|
}
|
|
460
461
|
}
|
|
461
|
-
}),
|
|
462
|
-
const [e, n] = $(null), [r, o] = $(null), { print: s, cancel: a, progress: d, isComplete: c, isError: m, error: g, showDefaultProgress: C } =
|
|
462
|
+
}), mc = ({ children: t }) => {
|
|
463
|
+
const [e, n] = $(null), [r, o] = $(null), { print: s, cancel: a, progress: d, isComplete: c, isError: m, error: g, showDefaultProgress: C } = $r(), u = N((P) => {
|
|
463
464
|
P && typeof P == "function" && o(() => P);
|
|
464
465
|
}, []), y = (P) => {
|
|
465
466
|
g && P(g);
|
|
@@ -469,13 +470,13 @@ const Ln = () => {
|
|
|
469
470
|
},
|
|
470
471
|
[d, e]
|
|
471
472
|
);
|
|
472
|
-
|
|
473
|
+
z(() => {
|
|
473
474
|
c && r && b();
|
|
474
|
-
}, [c, r]),
|
|
475
|
+
}, [c, r]), z(() => {
|
|
475
476
|
m && y((P) => {
|
|
476
477
|
console.error(P);
|
|
477
478
|
});
|
|
478
|
-
}, [m]),
|
|
479
|
+
}, [m]), z(() => {
|
|
479
480
|
d && e && e(d);
|
|
480
481
|
}, [d, e]);
|
|
481
482
|
const b = () => {
|
|
@@ -489,19 +490,19 @@ const Ln = () => {
|
|
|
489
490
|
progress: d,
|
|
490
491
|
showDefaultProgress: C
|
|
491
492
|
};
|
|
492
|
-
return /* @__PURE__ */ i(
|
|
493
|
-
},
|
|
494
|
-
const t =
|
|
493
|
+
return /* @__PURE__ */ i(Pn.Provider, { value: T, children: t });
|
|
494
|
+
}, it = () => {
|
|
495
|
+
const t = Be(Pn);
|
|
495
496
|
if (!t)
|
|
496
497
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
497
498
|
return t;
|
|
498
|
-
},
|
|
499
|
+
}, Gr = () => {
|
|
499
500
|
const [t, e] = $({}), { pages: n } = re(), r = k(() => Object.keys(t).length, [t]), o = N(
|
|
500
501
|
(a) => {
|
|
501
502
|
if (!n.size)
|
|
502
503
|
return;
|
|
503
504
|
const d = a > n.size ? n.size : a, m = Array.from(n.values()).slice(0, d).map((g) => {
|
|
504
|
-
const { thumbnailViewport: C, scale: u } =
|
|
505
|
+
const { thumbnailViewport: C, scale: u } = hr(g.page, g.defaultRotation);
|
|
505
506
|
return {
|
|
506
507
|
scale: u,
|
|
507
508
|
page: g.page,
|
|
@@ -514,7 +515,7 @@ const Ln = () => {
|
|
|
514
515
|
},
|
|
515
516
|
[n]
|
|
516
517
|
);
|
|
517
|
-
|
|
518
|
+
z(() => {
|
|
518
519
|
o(10);
|
|
519
520
|
}, [o]);
|
|
520
521
|
const s = N(
|
|
@@ -536,7 +537,7 @@ const Ln = () => {
|
|
|
536
537
|
[n]
|
|
537
538
|
);
|
|
538
539
|
return { thumbnailPages: t, addPage: s, addToPage: o, thumbnailLength: r };
|
|
539
|
-
},
|
|
540
|
+
}, yn = Ve({
|
|
540
541
|
thumbnailPages: {},
|
|
541
542
|
addPage: (t) => {
|
|
542
543
|
},
|
|
@@ -546,20 +547,20 @@ const Ln = () => {
|
|
|
546
547
|
setActive: (t) => {
|
|
547
548
|
},
|
|
548
549
|
active: !1
|
|
549
|
-
}),
|
|
550
|
+
}), In = () => Be(yn), gc = ({
|
|
550
551
|
children: t,
|
|
551
552
|
initialThumbnailsVisible: e
|
|
552
553
|
}) => {
|
|
553
|
-
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: s } =
|
|
554
|
+
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: s } = Gr(), [a, d] = $(e);
|
|
554
555
|
return /* @__PURE__ */ i(
|
|
555
|
-
|
|
556
|
+
yn.Provider,
|
|
556
557
|
{
|
|
557
558
|
value: { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: s, active: a, setActive: d },
|
|
558
559
|
children: t
|
|
559
560
|
}
|
|
560
561
|
);
|
|
561
|
-
},
|
|
562
|
-
const [n, r] = $(e), [o, s] = $(!1), { pdf: a, pages: d } = re(), { widths: c, heights: m } =
|
|
562
|
+
}, qr = (t = {}, e = "") => {
|
|
563
|
+
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
564
|
(E) => {
|
|
564
565
|
if (E === 0)
|
|
565
566
|
return;
|
|
@@ -572,23 +573,23 @@ const Ln = () => {
|
|
|
572
573
|
const G = d.get(R.page);
|
|
573
574
|
if (l === oe.PAGE_SCROLLING && _(R.page), !G)
|
|
574
575
|
return;
|
|
575
|
-
let H = 0,
|
|
576
|
+
let H = 0, U = 0;
|
|
576
577
|
if (l === oe.VERTICAL_SCROLLING) {
|
|
577
|
-
const J = R.page - 1, ee = b,
|
|
578
|
-
H =
|
|
578
|
+
const J = R.page - 1, ee = b, ve = J % ee, we = Math.floor(J / ee);
|
|
579
|
+
H = ke(m, we), U = ke(c, ve);
|
|
579
580
|
}
|
|
580
|
-
l === oe.HORIZONTAL_SCROLLING && (
|
|
581
|
+
l === oe.HORIZONTAL_SCROLLING && (U = c.slice(0, R.page - 1).reduce((J, ee) => J + ee, 0));
|
|
581
582
|
const X = {
|
|
582
583
|
height: m[R.page - 1],
|
|
583
584
|
width: c[R.page - 1]
|
|
584
|
-
},
|
|
585
|
+
}, V = T[R.page], { leftInPage: ie, topInPage: q } = pr(
|
|
585
586
|
X,
|
|
586
587
|
v,
|
|
587
588
|
R.rect,
|
|
588
589
|
C,
|
|
589
|
-
|
|
590
|
-
),
|
|
591
|
-
left: Math.max(
|
|
590
|
+
V
|
|
591
|
+
), Z = U + ie, Y = H + q, te = {
|
|
592
|
+
left: Math.max(Z, 0),
|
|
592
593
|
top: Math.max(Y, 0)
|
|
593
594
|
};
|
|
594
595
|
A.scrollTo({
|
|
@@ -608,20 +609,20 @@ const Ln = () => {
|
|
|
608
609
|
u
|
|
609
610
|
]
|
|
610
611
|
);
|
|
611
|
-
|
|
612
|
+
z(() => {
|
|
612
613
|
P && L(P);
|
|
613
614
|
}, [P]);
|
|
614
615
|
const O = N(() => {
|
|
615
616
|
p((E) => {
|
|
616
617
|
let R;
|
|
617
|
-
return
|
|
618
|
+
return S ? E + 1 > S ? R = 1 : R = E + 1 : R = 0, I.current = R, R;
|
|
618
619
|
}), I.current === 1 && L(I.current);
|
|
619
|
-
}, [
|
|
620
|
+
}, [S, L]), D = N(() => {
|
|
620
621
|
p((E) => {
|
|
621
622
|
let R;
|
|
622
|
-
return
|
|
623
|
+
return S ? E - 1 <= 0 ? R = S : R = E - 1 : R = 0, I.current = R, R;
|
|
623
624
|
}), I.current === 1 && L(I.current);
|
|
624
|
-
}, [
|
|
625
|
+
}, [S, L]), F = N(async (E) => {
|
|
625
626
|
if (!E)
|
|
626
627
|
return {};
|
|
627
628
|
const R = E.numPages, A = {};
|
|
@@ -633,7 +634,7 @@ const Ln = () => {
|
|
|
633
634
|
}
|
|
634
635
|
return A;
|
|
635
636
|
}, []);
|
|
636
|
-
return
|
|
637
|
+
return z(() => {
|
|
637
638
|
if (!n) {
|
|
638
639
|
g.current = !0, y([]), p(0);
|
|
639
640
|
return;
|
|
@@ -641,13 +642,13 @@ const Ln = () => {
|
|
|
641
642
|
g.current = !1, s(!0), y([]), p(0), F(a).then((E) => {
|
|
642
643
|
w.current = E;
|
|
643
644
|
const A = Object.keys(E).reduce((G, H) => {
|
|
644
|
-
const
|
|
645
|
+
const U = bo(
|
|
645
646
|
[n],
|
|
646
647
|
E[H],
|
|
647
648
|
Number(H) - 1,
|
|
648
649
|
t
|
|
649
|
-
).map((X,
|
|
650
|
-
return [...G, ...
|
|
650
|
+
).map((X, V) => ({ ...X, page: Number(H), pageMatchIdx: V }));
|
|
651
|
+
return [...G, ...U];
|
|
651
652
|
}, []);
|
|
652
653
|
y(A), p(A.length ? 1 : 0);
|
|
653
654
|
}).catch(() => {
|
|
@@ -658,14 +659,14 @@ const Ln = () => {
|
|
|
658
659
|
setSearch: r,
|
|
659
660
|
loading: o,
|
|
660
661
|
matches: u,
|
|
661
|
-
totalMatches:
|
|
662
|
+
totalMatches: S,
|
|
662
663
|
currentMatchPosition: P,
|
|
663
|
-
currentMatch:
|
|
664
|
+
currentMatch: x,
|
|
664
665
|
nextMatch: O,
|
|
665
|
-
prevMatch:
|
|
666
|
+
prevMatch: D,
|
|
666
667
|
setCurrentMatchPosition: p
|
|
667
668
|
};
|
|
668
|
-
},
|
|
669
|
+
}, Sn = Ve({
|
|
669
670
|
search: "",
|
|
670
671
|
setSearch: (t) => {
|
|
671
672
|
},
|
|
@@ -681,7 +682,7 @@ const Ln = () => {
|
|
|
681
682
|
searchOptions: {},
|
|
682
683
|
setSearchOptions: (t) => t,
|
|
683
684
|
setCurrentMatchPosition: (t) => t
|
|
684
|
-
}),
|
|
685
|
+
}), vc = ({
|
|
685
686
|
children: t,
|
|
686
687
|
initialSearch: e
|
|
687
688
|
}) => {
|
|
@@ -696,9 +697,9 @@ const Ln = () => {
|
|
|
696
697
|
nextMatch: C,
|
|
697
698
|
prevMatch: u,
|
|
698
699
|
setCurrentMatchPosition: y
|
|
699
|
-
} =
|
|
700
|
+
} = qr(n, e);
|
|
700
701
|
return /* @__PURE__ */ i(
|
|
701
|
-
|
|
702
|
+
Sn.Provider,
|
|
702
703
|
{
|
|
703
704
|
value: {
|
|
704
705
|
searchOptions: n,
|
|
@@ -717,10 +718,10 @@ const Ln = () => {
|
|
|
717
718
|
children: t
|
|
718
719
|
}
|
|
719
720
|
);
|
|
720
|
-
},
|
|
721
|
+
}, Nt = () => Be(Sn), xn = Ve(null), wc = ({ children: t }) => {
|
|
721
722
|
const e = M(!1), [n, r] = $([]), o = N((c) => {
|
|
722
723
|
r((m) => [...m, { id: c.page.pageNumber.toString(), data: c, priority: 0 }]);
|
|
723
|
-
}, []), s = k(() => new
|
|
724
|
+
}, []), s = k(() => new So(o), [o]), { focusedPage: a } = ue(), d = N((c) => (e.current = !0, xo(
|
|
724
725
|
c.data.page,
|
|
725
726
|
c.data.canvasElem,
|
|
726
727
|
c.data.options
|
|
@@ -729,9 +730,9 @@ const Ln = () => {
|
|
|
729
730
|
}).finally(() => {
|
|
730
731
|
c.data.onLoaded && c.data.onLoaded();
|
|
731
732
|
})), []);
|
|
732
|
-
return
|
|
733
|
+
return z(() => {
|
|
733
734
|
a && (s.changePagePriority(`^page-${a}`, 0), s.changePagePriority(`^thumbnail-${a}`, 1));
|
|
734
|
-
}, [a]),
|
|
735
|
+
}, [a]), z(() => {
|
|
735
736
|
if (s.isEmpty() || e.current)
|
|
736
737
|
return;
|
|
737
738
|
const c = () => {
|
|
@@ -741,13 +742,13 @@ const Ln = () => {
|
|
|
741
742
|
}) : (e.current = !1, r(s.peekAll()));
|
|
742
743
|
};
|
|
743
744
|
c();
|
|
744
|
-
}, [s, d, n]), /* @__PURE__ */ i(
|
|
745
|
-
},
|
|
746
|
-
const t =
|
|
745
|
+
}, [s, d, n]), /* @__PURE__ */ i(xn.Provider, { value: s, children: t });
|
|
746
|
+
}, Rn = () => {
|
|
747
|
+
const t = Be(xn);
|
|
747
748
|
if (!t)
|
|
748
749
|
throw new Error("RenderQueue not found");
|
|
749
750
|
return t;
|
|
750
|
-
},
|
|
751
|
+
}, ae = {
|
|
751
752
|
"rp-pages": "_rp-pages_u7m2r_1",
|
|
752
753
|
"rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_u7m2r_6",
|
|
753
754
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_u7m2r_11",
|
|
@@ -758,13 +759,13 @@ const Ln = () => {
|
|
|
758
759
|
"rp-loader": "_rp-loader_u7m2r_78",
|
|
759
760
|
"rp-not-supported": "_rp-not-supported_u7m2r_86",
|
|
760
761
|
"rp-not-supported-content": "_rp-not-supported-content_u7m2r_102"
|
|
761
|
-
},
|
|
762
|
+
}, pt = {
|
|
762
763
|
"rp-page-wrapper": "_rp-page-wrapper_ii91u_1",
|
|
763
764
|
"rp-page": "_rp-page_ii91u_1",
|
|
764
765
|
"rp-loader-wrapper": "_rp-loader-wrapper_ii91u_15"
|
|
765
|
-
},
|
|
766
|
-
const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = M(null), { pages: s } = re(), { pageRotate: a } =
|
|
767
|
-
return
|
|
766
|
+
}, Ur = (t) => {
|
|
767
|
+
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}`);
|
|
768
|
+
return z(() => {
|
|
768
769
|
if (!s || c === 0)
|
|
769
770
|
return;
|
|
770
771
|
const u = s.get(e);
|
|
@@ -792,33 +793,33 @@ const Ln = () => {
|
|
|
792
793
|
g.removeQueue(C.current);
|
|
793
794
|
};
|
|
794
795
|
}, [s, e, a, c, r, n, g, m]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
|
|
795
|
-
},
|
|
796
|
+
}, Vr = "_selecting_ppr5g_10", Br = "_markedContent_ppr5g_33", _e = {
|
|
796
797
|
"rp-text-layer": "_rp-text-layer_ppr5g_1",
|
|
797
|
-
selecting:
|
|
798
|
-
markedContent:
|
|
798
|
+
selecting: Vr,
|
|
799
|
+
markedContent: Br,
|
|
799
800
|
"rp-text-layer-text": "_rp-text-layer-text_ppr5g_52"
|
|
800
|
-
},
|
|
801
|
-
const { pageNumber: e } = t, { pages: n } = re(), r = M(null), { matches: o, currentMatch: s } =
|
|
801
|
+
}, Zr = (t) => {
|
|
802
|
+
const { pageNumber: e } = t, { pages: n } = re(), r = M(null), { matches: o, currentMatch: s } = Nt(), [a, d] = $(
|
|
802
803
|
[]
|
|
803
804
|
), c = M(), m = M(), g = M([]), C = k(() => o.filter((p) => p.pageIndex === e - 1), [o, e]), u = N(
|
|
804
805
|
(p, h, f = !1) => {
|
|
805
|
-
if (f &&
|
|
806
|
+
if (f && To(p, h), !C.length) {
|
|
806
807
|
g.current = [], d([]);
|
|
807
808
|
return;
|
|
808
809
|
}
|
|
809
|
-
const l =
|
|
810
|
+
const l = Co(C, p, h);
|
|
810
811
|
d(l);
|
|
811
812
|
},
|
|
812
813
|
[C]
|
|
813
814
|
), y = M(), _ = M(!1), b = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
814
|
-
|
|
815
|
+
z(() => ((() => {
|
|
815
816
|
if (y.current)
|
|
816
817
|
return;
|
|
817
818
|
y.current = new AbortController();
|
|
818
819
|
const { signal: h } = y.current, f = () => {
|
|
819
820
|
b().forEach((v) => {
|
|
820
821
|
const w = v.querySelector(".endOfContent");
|
|
821
|
-
w && (v.appendChild(w), w.style.width = "", w.style.height = "", v.classList.remove(
|
|
822
|
+
w && (v.appendChild(w), w.style.width = "", w.style.height = "", v.classList.remove(_e.selecting));
|
|
822
823
|
});
|
|
823
824
|
};
|
|
824
825
|
document.addEventListener(
|
|
@@ -850,7 +851,7 @@ const Ln = () => {
|
|
|
850
851
|
document.addEventListener(
|
|
851
852
|
"selectionchange",
|
|
852
853
|
() => {
|
|
853
|
-
var
|
|
854
|
+
var D, F;
|
|
854
855
|
const v = document.getSelection();
|
|
855
856
|
if (!v)
|
|
856
857
|
return;
|
|
@@ -867,19 +868,19 @@ const Ln = () => {
|
|
|
867
868
|
}
|
|
868
869
|
b().forEach((E) => {
|
|
869
870
|
if (w.has(E))
|
|
870
|
-
E.classList.add(
|
|
871
|
+
E.classList.add(_e.selecting);
|
|
871
872
|
else {
|
|
872
873
|
const R = E.querySelector(".endOfContent");
|
|
873
|
-
R && (E.appendChild(R), R.style.width = "", R.style.height = "", E.classList.remove(
|
|
874
|
+
R && (E.appendChild(R), R.style.width = "", R.style.height = "", E.classList.remove(_e.selecting));
|
|
874
875
|
}
|
|
875
876
|
});
|
|
876
877
|
const I = v.getRangeAt(0);
|
|
877
|
-
let
|
|
878
|
-
|
|
879
|
-
const L = (
|
|
880
|
-
|
|
878
|
+
let S = l && (I.compareBoundaryPoints(Range.END_TO_END, l) === 0 || I.compareBoundaryPoints(Range.START_TO_END, l) === 0) ? I.startContainer : I.endContainer;
|
|
879
|
+
S.nodeType === Node.TEXT_NODE && (S = S.parentNode);
|
|
880
|
+
const L = (D = S.parentElement) == null ? void 0 : D.closest(
|
|
881
|
+
_e["rp-text-layer"]
|
|
881
882
|
), O = L == null ? void 0 : L.querySelector(".endOfContent");
|
|
882
|
-
O && L && (O.style.width = L.style.width, O.style.height = L.style.height, (F =
|
|
883
|
+
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();
|
|
883
884
|
},
|
|
884
885
|
{ signal: h }
|
|
885
886
|
);
|
|
@@ -888,11 +889,11 @@ const Ln = () => {
|
|
|
888
889
|
(h = y.current) == null || h.abort(), y.current = void 0;
|
|
889
890
|
}), [b]);
|
|
890
891
|
const T = N(() => {
|
|
891
|
-
r.current && r.current.classList.add(
|
|
892
|
+
r.current && r.current.classList.add(_e.selecting);
|
|
892
893
|
}, []), P = N(() => {
|
|
893
|
-
r.current && r.current.classList.remove(
|
|
894
|
+
r.current && r.current.classList.remove(_e.selecting);
|
|
894
895
|
}, []);
|
|
895
|
-
return
|
|
896
|
+
return z(() => {
|
|
896
897
|
if (g.current.forEach((f) => {
|
|
897
898
|
f.classList.remove("selected");
|
|
898
899
|
}), !a.length || !s || s.pageIndex !== e - 1)
|
|
@@ -906,22 +907,22 @@ const Ln = () => {
|
|
|
906
907
|
h.length && (g.current = h.map((f) => f.element), h.forEach((f) => {
|
|
907
908
|
f.element.classList.add("selected");
|
|
908
909
|
}));
|
|
909
|
-
}, [s, a, C]),
|
|
910
|
+
}, [s, a, C]), z(() => {
|
|
910
911
|
const p = n.get(e);
|
|
911
912
|
if (!p || !r.current)
|
|
912
913
|
return;
|
|
913
914
|
const h = r.current;
|
|
914
915
|
return c.current && c.current.cancel(), p.page.getTextContent().then((f) => {
|
|
915
916
|
const l = p.page.getViewport({ scale: 1 });
|
|
916
|
-
return c.current = new
|
|
917
|
+
return c.current = new Oo.TextLayer({
|
|
917
918
|
viewport: l,
|
|
918
919
|
textContentSource: f,
|
|
919
920
|
container: h
|
|
920
921
|
}), m.current = f, h && (h.innerText = ""), c.current.render();
|
|
921
922
|
}).then(() => {
|
|
922
923
|
var w, I;
|
|
923
|
-
[].slice.call(h.children).forEach((
|
|
924
|
-
|
|
924
|
+
[].slice.call(h.children).forEach((x) => {
|
|
925
|
+
x.classList.add(_e["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
|
|
925
926
|
});
|
|
926
927
|
const l = (w = c.current) == null ? void 0 : w.textDivs;
|
|
927
928
|
l && m.current && u(m.current, l);
|
|
@@ -932,10 +933,10 @@ const Ln = () => {
|
|
|
932
933
|
var f;
|
|
933
934
|
(f = c.current) == null || f.cancel();
|
|
934
935
|
};
|
|
935
|
-
}, [n, e]),
|
|
936
|
+
}, [n, e]), z(() => {
|
|
936
937
|
var f;
|
|
937
938
|
[].slice.call(r.current.children).forEach((l) => {
|
|
938
|
-
l.classList.add(
|
|
939
|
+
l.classList.add(_e["rp-text-layer-text"]);
|
|
939
940
|
});
|
|
940
941
|
const h = (f = c.current) == null ? void 0 : f.textDivs;
|
|
941
942
|
h && m.current && u(m.current, h, !0);
|
|
@@ -944,35 +945,35 @@ const Ln = () => {
|
|
|
944
945
|
{
|
|
945
946
|
"data-rp-text-layer": !0,
|
|
946
947
|
"data-rp": `page-${e}-textLayer`,
|
|
947
|
-
className:
|
|
948
|
+
className: _e["rp-text-layer"],
|
|
948
949
|
ref: r,
|
|
949
950
|
onMouseDown: T,
|
|
950
951
|
onMouseUp: P
|
|
951
952
|
}
|
|
952
953
|
);
|
|
953
|
-
},
|
|
954
|
+
}, jr = {
|
|
954
955
|
"rp-annotation-layer": "_rp-annotation-layer_1udza_1"
|
|
955
956
|
};
|
|
956
|
-
let
|
|
957
|
-
const
|
|
958
|
-
const { pageNumber: e } = t, n = M(null), { pages: r, pdf: o } = re(), { interactiveForm: s } =
|
|
959
|
-
|
|
957
|
+
let Kr = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
958
|
+
const Xr = (t) => {
|
|
959
|
+
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(), [_]);
|
|
960
|
+
z(() => {
|
|
960
961
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
961
|
-
}, [o]),
|
|
962
|
+
}, [o]), z(() => {
|
|
962
963
|
_ && _.page.getAnnotations().then((P) => {
|
|
963
964
|
a.current = void 0, c(P), n.current && (n.current.innerText = "");
|
|
964
965
|
});
|
|
965
966
|
}, [_]);
|
|
966
967
|
const T = N(
|
|
967
968
|
(P) => {
|
|
968
|
-
!d || !o || (
|
|
969
|
+
!d || !o || (Xo(P), Qo(P, o, d).then((p) => {
|
|
969
970
|
var h, f;
|
|
970
971
|
((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 ?
|
|
972
|
+
}), C === oe.PAGE_SCROLLING ? Ut(P, d, o, (p) => m(p.pageIndex + 1)) : Ut(P, d, o, (p) => g(p.pageIndex + 1)));
|
|
972
973
|
},
|
|
973
974
|
[o, d, g, m, C, u, y]
|
|
974
975
|
);
|
|
975
|
-
return
|
|
976
|
+
return z(() => {
|
|
976
977
|
if (!_ || !d)
|
|
977
978
|
return;
|
|
978
979
|
const P = _.page.getViewport();
|
|
@@ -986,18 +987,18 @@ const ti = (t) => {
|
|
|
986
987
|
for (const l of d) {
|
|
987
988
|
const { annotationType: v } = l;
|
|
988
989
|
switch (v) {
|
|
989
|
-
case
|
|
990
|
-
|
|
990
|
+
case Mt.Link:
|
|
991
|
+
Jo(l);
|
|
991
992
|
break;
|
|
992
|
-
case
|
|
993
|
-
|
|
993
|
+
case Mt.Widget:
|
|
994
|
+
Yo(l, P, p);
|
|
994
995
|
break;
|
|
995
996
|
}
|
|
996
997
|
}
|
|
997
998
|
const h = new AbortController();
|
|
998
999
|
return (async () => {
|
|
999
1000
|
var w;
|
|
1000
|
-
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new
|
|
1001
|
+
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new Fo({
|
|
1001
1002
|
div: n.current,
|
|
1002
1003
|
accessibilityManager: void 0,
|
|
1003
1004
|
annotationCanvasMap: void 0,
|
|
@@ -1005,7 +1006,7 @@ const ti = (t) => {
|
|
|
1005
1006
|
structTreeLayer: null,
|
|
1006
1007
|
page: _.page,
|
|
1007
1008
|
viewport: P.clone({ dontFlip: !0 })
|
|
1008
|
-
}), n.current &&
|
|
1009
|
+
}), n.current && Vt(n.current, T);
|
|
1009
1010
|
const l = await (o == null ? void 0 : o.hasJSActions()), v = await (o == null ? void 0 : o.getFieldObjects());
|
|
1010
1011
|
if (h.signal.aborted)
|
|
1011
1012
|
throw "abort";
|
|
@@ -1017,36 +1018,36 @@ const ti = (t) => {
|
|
|
1017
1018
|
div: n.current,
|
|
1018
1019
|
viewport: P.clone({ dontFlip: !0 }),
|
|
1019
1020
|
page: _.page,
|
|
1020
|
-
imageResourcesPath:
|
|
1021
|
+
imageResourcesPath: Kr,
|
|
1021
1022
|
renderForms: s ?? !0,
|
|
1022
|
-
linkService: new
|
|
1023
|
+
linkService: new Ko(),
|
|
1023
1024
|
downloadManager: null,
|
|
1024
1025
|
enableScripting: !1
|
|
1025
1026
|
});
|
|
1026
1027
|
})().then(() => {
|
|
1027
|
-
n.current &&
|
|
1028
|
+
n.current && er(n.current, T);
|
|
1028
1029
|
}).catch((l) => {
|
|
1029
1030
|
if (l !== "abort")
|
|
1030
1031
|
throw l;
|
|
1031
1032
|
}), () => {
|
|
1032
|
-
h.abort("clear"), n.current &&
|
|
1033
|
+
h.abort("clear"), n.current && Vt(n.current, T);
|
|
1033
1034
|
};
|
|
1034
1035
|
}, [o, d, T]), /* @__PURE__ */ i(
|
|
1035
1036
|
"div",
|
|
1036
1037
|
{
|
|
1037
1038
|
"data-rp": `page-${e}-annotationLayer`,
|
|
1038
1039
|
style: { width: `${b == null ? void 0 : b.width}px`, height: `${b == null ? void 0 : b.height}px` },
|
|
1039
|
-
className:
|
|
1040
|
+
className: jr["rp-annotation-layer"],
|
|
1040
1041
|
ref: n
|
|
1041
1042
|
}
|
|
1042
1043
|
);
|
|
1043
|
-
},
|
|
1044
|
+
}, Qr = {
|
|
1044
1045
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1045
|
-
},
|
|
1046
|
-
const [n, r] = $(), { pages: o } = re(), { highlightKeywords: s } =
|
|
1047
|
-
|
|
1046
|
+
}, Yr = ({ pageNumber: t, viewport: e }) => {
|
|
1047
|
+
const [n, r] = $(), { pages: o } = re(), { highlightKeywords: s } = yo(), a = !0, d = M(null), [c, m] = $(null), [g, C] = $([]);
|
|
1048
|
+
z(() => {
|
|
1048
1049
|
d.current && m(d.current.parentElement);
|
|
1049
|
-
}, [d]),
|
|
1050
|
+
}, [d]), z(() => {
|
|
1050
1051
|
(async () => {
|
|
1051
1052
|
const h = o.get(t);
|
|
1052
1053
|
if (!h || !d.current)
|
|
@@ -1058,7 +1059,7 @@ const ti = (t) => {
|
|
|
1058
1059
|
const u = k(() => s ? s.map((p) => {
|
|
1059
1060
|
var h, f;
|
|
1060
1061
|
return {
|
|
1061
|
-
...
|
|
1062
|
+
...tr(p.keyword, (h = p.options) == null ? void 0 : h.matchCase, (f = p.options) == null ? void 0 : f.wholeWords),
|
|
1062
1063
|
color: p.highlightColor
|
|
1063
1064
|
};
|
|
1064
1065
|
}) : [], [s]);
|
|
@@ -1072,9 +1073,9 @@ const ti = (t) => {
|
|
|
1072
1073
|
l(v);
|
|
1073
1074
|
return;
|
|
1074
1075
|
}
|
|
1075
|
-
new MutationObserver((I,
|
|
1076
|
-
const
|
|
1077
|
-
|
|
1076
|
+
new MutationObserver((I, x) => {
|
|
1077
|
+
const S = p.querySelector(f);
|
|
1078
|
+
S && (l(S), x.disconnect());
|
|
1078
1079
|
}).observe(p, { childList: !0, subtree: !0 });
|
|
1079
1080
|
});
|
|
1080
1081
|
}
|
|
@@ -1096,18 +1097,18 @@ const ti = (t) => {
|
|
|
1096
1097
|
});
|
|
1097
1098
|
}
|
|
1098
1099
|
const b = (p, h, f, l) => {
|
|
1099
|
-
var
|
|
1100
|
+
var U;
|
|
1100
1101
|
const v = document.createRange(), w = f.firstChild;
|
|
1101
1102
|
if (!w || w.nodeType !== Node.TEXT_NODE)
|
|
1102
1103
|
return null;
|
|
1103
|
-
const I = ((
|
|
1104
|
-
if (
|
|
1104
|
+
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;
|
|
1105
|
+
if (x > I || S + 1 > I)
|
|
1105
1106
|
return null;
|
|
1106
|
-
v.setStart(w,
|
|
1107
|
+
v.setStart(w, x), v.setEnd(w, S + 1);
|
|
1107
1108
|
const L = document.createElement("span");
|
|
1108
1109
|
L.style.width = "auto", v.surroundContents(L);
|
|
1109
|
-
const O = L.getBoundingClientRect(),
|
|
1110
|
-
return
|
|
1110
|
+
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;
|
|
1111
|
+
return or(L), {
|
|
1111
1112
|
keywordStr: h,
|
|
1112
1113
|
left: R,
|
|
1113
1114
|
top: A,
|
|
@@ -1124,11 +1125,11 @@ const ti = (t) => {
|
|
|
1124
1125
|
const l = await _(f);
|
|
1125
1126
|
if (l.length) {
|
|
1126
1127
|
const v = l.map((I) => I.tagName === "BR" ? " " : I.textContent).reduce(
|
|
1127
|
-
(I,
|
|
1128
|
-
|
|
1128
|
+
(I, x, S) => I.concat(
|
|
1129
|
+
x.split("").map((L, O) => ({
|
|
1129
1130
|
char: L,
|
|
1130
1131
|
charIdxInSpan: O,
|
|
1131
|
-
spanIdx:
|
|
1132
|
+
spanIdx: S
|
|
1132
1133
|
}))
|
|
1133
1134
|
),
|
|
1134
1135
|
[
|
|
@@ -1146,16 +1147,16 @@ const ti = (t) => {
|
|
|
1146
1147
|
const v = h.length;
|
|
1147
1148
|
if (!l.length || !v)
|
|
1148
1149
|
return [];
|
|
1149
|
-
const w = [], I = l.map((
|
|
1150
|
-
return u.forEach((
|
|
1151
|
-
const { keyword:
|
|
1150
|
+
const w = [], I = l.map((x) => x.char).join("");
|
|
1151
|
+
return u.forEach((x) => {
|
|
1152
|
+
const { keyword: S, regExp: L, wholeWords: O, color: D } = x, F = S;
|
|
1152
1153
|
if (!F.trim())
|
|
1153
1154
|
return;
|
|
1154
1155
|
const E = L.flags.indexOf("g") === -1 ? new RegExp(L, `${L.flags}g`) : L;
|
|
1155
1156
|
let R;
|
|
1156
1157
|
const A = [];
|
|
1157
1158
|
for (; (R = E.exec(I)) !== null; )
|
|
1158
|
-
O && !
|
|
1159
|
+
O && !Po(I, R.index, R[0].length) || A.push({
|
|
1159
1160
|
keyword: E,
|
|
1160
1161
|
startIndex: R.index,
|
|
1161
1162
|
endIndex: E.lastIndex
|
|
@@ -1163,32 +1164,32 @@ const ti = (t) => {
|
|
|
1163
1164
|
const G = A.map((H) => ({
|
|
1164
1165
|
keyword: H.keyword,
|
|
1165
1166
|
indexes: l.slice(H.startIndex, H.endIndex),
|
|
1166
|
-
color:
|
|
1167
|
+
color: D
|
|
1167
1168
|
}));
|
|
1168
1169
|
for (const H of G) {
|
|
1169
|
-
const
|
|
1170
|
-
(X,
|
|
1170
|
+
const U = H.indexes.reduce(
|
|
1171
|
+
(X, V) => (X[V.spanIdx] = (X[V.spanIdx] || []).concat([V]), X),
|
|
1171
1172
|
{}
|
|
1172
1173
|
);
|
|
1173
|
-
for (const X of Object.values(
|
|
1174
|
+
for (const X of Object.values(U))
|
|
1174
1175
|
if (X.length !== 1 || X[0].char.trim() !== "") {
|
|
1175
|
-
const
|
|
1176
|
+
const V = X, ie = f[V[0].spanIdx], q = b(
|
|
1176
1177
|
p,
|
|
1177
1178
|
F,
|
|
1178
|
-
|
|
1179
|
-
|
|
1179
|
+
ie,
|
|
1180
|
+
V
|
|
1180
1181
|
);
|
|
1181
1182
|
if (q) {
|
|
1182
|
-
const { left:
|
|
1183
|
-
if (w.find((J) => J.left ===
|
|
1183
|
+
const { left: Z, top: Y } = q;
|
|
1184
|
+
if (w.find((J) => J.left === Z && J.top === Y))
|
|
1184
1185
|
continue;
|
|
1185
1186
|
w.push({ ...q, highlightColor: H.color });
|
|
1186
1187
|
}
|
|
1187
1188
|
}
|
|
1188
1189
|
}
|
|
1189
|
-
}), w.sort(
|
|
1190
|
+
}), w.sort(nr), w;
|
|
1190
1191
|
};
|
|
1191
|
-
return
|
|
1192
|
+
return z(() => {
|
|
1192
1193
|
(async () => {
|
|
1193
1194
|
if (!s || s.length === 0) {
|
|
1194
1195
|
C([]);
|
|
@@ -1200,10 +1201,10 @@ const ti = (t) => {
|
|
|
1200
1201
|
console.error(h);
|
|
1201
1202
|
}
|
|
1202
1203
|
})();
|
|
1203
|
-
}, [a, s, t, n, e]), /* @__PURE__ */ i(
|
|
1204
|
+
}, [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(
|
|
1204
1205
|
"div",
|
|
1205
1206
|
{
|
|
1206
|
-
className:
|
|
1207
|
+
className: Qr["rp-text-highlight"],
|
|
1207
1208
|
style: {
|
|
1208
1209
|
top: `${p.top}%`,
|
|
1209
1210
|
left: `${p.left}%`,
|
|
@@ -1214,14 +1215,14 @@ const ti = (t) => {
|
|
|
1214
1215
|
},
|
|
1215
1216
|
h
|
|
1216
1217
|
)) }) });
|
|
1217
|
-
},
|
|
1218
|
-
const { pageNumber: n, style: r, ...o } = t, { pages: s } = re(), { pageRotate: a } =
|
|
1218
|
+
}, Ot = rt((t, e) => {
|
|
1219
|
+
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] = $({
|
|
1219
1220
|
width: 0,
|
|
1220
1221
|
height: 0
|
|
1221
1222
|
});
|
|
1222
|
-
|
|
1223
|
+
un(e, () => y.current);
|
|
1223
1224
|
const T = k(() => g.current ? a[n] : 0, [n, a]);
|
|
1224
|
-
|
|
1225
|
+
z(() => {
|
|
1225
1226
|
if (s && (g.current = s.get(n), g.current)) {
|
|
1226
1227
|
const f = g.current.page.getViewport({
|
|
1227
1228
|
scale: c,
|
|
@@ -1258,7 +1259,7 @@ const ti = (t) => {
|
|
|
1258
1259
|
"--rp-page-rotate-translate": `${P}`,
|
|
1259
1260
|
"--scale-factor": c
|
|
1260
1261
|
},
|
|
1261
|
-
className:
|
|
1262
|
+
className: pt["rp-page-wrapper"],
|
|
1262
1263
|
children: /* @__PURE__ */ W(
|
|
1263
1264
|
"div",
|
|
1264
1265
|
{
|
|
@@ -1266,59 +1267,59 @@ const ti = (t) => {
|
|
|
1266
1267
|
width: `${_.width}px`,
|
|
1267
1268
|
height: `${_.height}px`
|
|
1268
1269
|
},
|
|
1269
|
-
className:
|
|
1270
|
+
className: pt["rp-page"],
|
|
1270
1271
|
children: [
|
|
1271
|
-
/* @__PURE__ */ i(
|
|
1272
|
-
C && m && /* @__PURE__ */ i("div", { className:
|
|
1273
|
-
/* @__PURE__ */ i(
|
|
1274
|
-
d && /* @__PURE__ */ i(
|
|
1275
|
-
/* @__PURE__ */ i(
|
|
1276
|
-
/* @__PURE__ */ i(
|
|
1272
|
+
/* @__PURE__ */ i(Ur, { onLoading: p, onLoaded: h, pageNumber: n }),
|
|
1273
|
+
C && m && /* @__PURE__ */ i("div", { className: pt["rp-loader-wrapper"], children: /* @__PURE__ */ i(m, {}) }),
|
|
1274
|
+
/* @__PURE__ */ i(rr, { pageNumber: n }),
|
|
1275
|
+
d && /* @__PURE__ */ i(Zr, { pageNumber: n }),
|
|
1276
|
+
/* @__PURE__ */ i(Yr, { pageNumber: n, viewport: _ }),
|
|
1277
|
+
/* @__PURE__ */ i(Xr, { pageNumber: n })
|
|
1277
1278
|
]
|
|
1278
1279
|
}
|
|
1279
1280
|
)
|
|
1280
1281
|
}
|
|
1281
1282
|
);
|
|
1282
1283
|
});
|
|
1283
|
-
function
|
|
1284
|
-
return
|
|
1284
|
+
function _t() {
|
|
1285
|
+
return _t = Object.assign ? Object.assign.bind() : function(t) {
|
|
1285
1286
|
for (var e = 1; e < arguments.length; e++) {
|
|
1286
1287
|
var n = arguments[e];
|
|
1287
1288
|
for (var r in n)
|
|
1288
1289
|
({}).hasOwnProperty.call(n, r) && (t[r] = n[r]);
|
|
1289
1290
|
}
|
|
1290
1291
|
return t;
|
|
1291
|
-
},
|
|
1292
|
+
}, _t.apply(null, arguments);
|
|
1292
1293
|
}
|
|
1293
|
-
function
|
|
1294
|
+
function Zt(t) {
|
|
1294
1295
|
if (t === void 0)
|
|
1295
1296
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1296
1297
|
return t;
|
|
1297
1298
|
}
|
|
1298
|
-
function
|
|
1299
|
-
return
|
|
1299
|
+
function bt(t, e) {
|
|
1300
|
+
return bt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
|
|
1300
1301
|
return n.__proto__ = r, n;
|
|
1301
|
-
},
|
|
1302
|
+
}, bt(t, e);
|
|
1302
1303
|
}
|
|
1303
|
-
function
|
|
1304
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t,
|
|
1304
|
+
function Jr(t, e) {
|
|
1305
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, bt(t, e);
|
|
1305
1306
|
}
|
|
1306
|
-
var
|
|
1307
|
+
var jt = Number.isNaN || function(e) {
|
|
1307
1308
|
return typeof e == "number" && e !== e;
|
|
1308
1309
|
};
|
|
1309
|
-
function
|
|
1310
|
-
return !!(t === e ||
|
|
1310
|
+
function ei(t, e) {
|
|
1311
|
+
return !!(t === e || jt(t) && jt(e));
|
|
1311
1312
|
}
|
|
1312
|
-
function
|
|
1313
|
+
function ti(t, e) {
|
|
1313
1314
|
if (t.length !== e.length)
|
|
1314
1315
|
return !1;
|
|
1315
1316
|
for (var n = 0; n < t.length; n++)
|
|
1316
|
-
if (!
|
|
1317
|
+
if (!ei(t[n], e[n]))
|
|
1317
1318
|
return !1;
|
|
1318
1319
|
return !0;
|
|
1319
1320
|
}
|
|
1320
|
-
function
|
|
1321
|
-
e === void 0 && (e =
|
|
1321
|
+
function ht(t, e) {
|
|
1322
|
+
e === void 0 && (e = ti);
|
|
1322
1323
|
var n, r = [], o, s = !1;
|
|
1323
1324
|
function a() {
|
|
1324
1325
|
for (var d = [], c = 0; c < arguments.length; c++)
|
|
@@ -1327,7 +1328,7 @@ function Pt(t, e) {
|
|
|
1327
1328
|
}
|
|
1328
1329
|
return a;
|
|
1329
1330
|
}
|
|
1330
|
-
function
|
|
1331
|
+
function Kt(t, e) {
|
|
1331
1332
|
if (t == null)
|
|
1332
1333
|
return {};
|
|
1333
1334
|
var n = {};
|
|
@@ -1339,89 +1340,89 @@ function on(t, e) {
|
|
|
1339
1340
|
}
|
|
1340
1341
|
return n;
|
|
1341
1342
|
}
|
|
1342
|
-
var
|
|
1343
|
+
var ni = typeof performance == "object" && typeof performance.now == "function", Xt = ni ? function() {
|
|
1343
1344
|
return performance.now();
|
|
1344
1345
|
} : function() {
|
|
1345
1346
|
return Date.now();
|
|
1346
1347
|
};
|
|
1347
|
-
function
|
|
1348
|
+
function Qt(t) {
|
|
1348
1349
|
cancelAnimationFrame(t.id);
|
|
1349
1350
|
}
|
|
1350
|
-
function
|
|
1351
|
-
var n =
|
|
1351
|
+
function oi(t, e) {
|
|
1352
|
+
var n = Xt();
|
|
1352
1353
|
function r() {
|
|
1353
|
-
|
|
1354
|
+
Xt() - n >= e ? t.call(null) : o.id = requestAnimationFrame(r);
|
|
1354
1355
|
}
|
|
1355
1356
|
var o = {
|
|
1356
1357
|
id: requestAnimationFrame(r)
|
|
1357
1358
|
};
|
|
1358
1359
|
return o;
|
|
1359
1360
|
}
|
|
1360
|
-
var
|
|
1361
|
-
function
|
|
1362
|
-
if (t === void 0 && (t = !1),
|
|
1361
|
+
var ft = -1;
|
|
1362
|
+
function ri(t) {
|
|
1363
|
+
if (t === void 0 && (t = !1), ft === -1 || t) {
|
|
1363
1364
|
var e = document.createElement("div"), n = e.style;
|
|
1364
|
-
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e),
|
|
1365
|
+
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), ft = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
1365
1366
|
}
|
|
1366
|
-
return
|
|
1367
|
+
return ft;
|
|
1367
1368
|
}
|
|
1368
|
-
var
|
|
1369
|
-
function
|
|
1370
|
-
if (t === void 0 && (t = !1),
|
|
1369
|
+
var ze = null;
|
|
1370
|
+
function Yt(t) {
|
|
1371
|
+
if (t === void 0 && (t = !1), ze === null || t) {
|
|
1371
1372
|
var e = document.createElement("div"), n = e.style;
|
|
1372
1373
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
1373
1374
|
var r = document.createElement("div"), o = r.style;
|
|
1374
|
-
return o.width = "100px", o.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ?
|
|
1375
|
+
return o.width = "100px", o.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? ze = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? ze = "negative" : ze = "positive-ascending"), document.body.removeChild(e), ze;
|
|
1375
1376
|
}
|
|
1376
|
-
return
|
|
1377
|
+
return ze;
|
|
1377
1378
|
}
|
|
1378
|
-
var
|
|
1379
|
+
var ii = 150, si = function(e) {
|
|
1379
1380
|
var n = e.columnIndex;
|
|
1380
1381
|
e.data;
|
|
1381
1382
|
var r = e.rowIndex;
|
|
1382
1383
|
return r + ":" + n;
|
|
1383
|
-
},
|
|
1384
|
-
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (
|
|
1385
|
-
function
|
|
1384
|
+
}, Xe = null, Qe = null, Ye = null;
|
|
1385
|
+
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Xe = /* @__PURE__ */ new WeakSet(), Qe = /* @__PURE__ */ new WeakSet(), Ye = /* @__PURE__ */ new WeakSet());
|
|
1386
|
+
function ai(t) {
|
|
1386
1387
|
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
1388
|
return e = /* @__PURE__ */ function(P) {
|
|
1388
|
-
|
|
1389
|
+
Jr(p, P);
|
|
1389
1390
|
function p(f) {
|
|
1390
1391
|
var l;
|
|
1391
|
-
return l = P.call(this, f) || this, l._instanceProps = _(l.props,
|
|
1392
|
-
instance:
|
|
1392
|
+
return l = P.call(this, f) || this, l._instanceProps = _(l.props, Zt(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
|
|
1393
|
+
instance: Zt(l),
|
|
1393
1394
|
isScrolling: !1,
|
|
1394
1395
|
horizontalScrollDirection: "forward",
|
|
1395
1396
|
scrollLeft: typeof l.props.initialScrollLeft == "number" ? l.props.initialScrollLeft : 0,
|
|
1396
1397
|
scrollTop: typeof l.props.initialScrollTop == "number" ? l.props.initialScrollTop : 0,
|
|
1397
1398
|
scrollUpdateWasRequested: !1,
|
|
1398
1399
|
verticalScrollDirection: "forward"
|
|
1399
|
-
}, l._callOnItemsRendered = void 0, l._callOnItemsRendered =
|
|
1400
|
+
}, l._callOnItemsRendered = void 0, l._callOnItemsRendered = ht(function(v, w, I, x, S, L, O, D) {
|
|
1400
1401
|
return l.props.onItemsRendered({
|
|
1401
1402
|
overscanColumnStartIndex: v,
|
|
1402
1403
|
overscanColumnStopIndex: w,
|
|
1403
1404
|
overscanRowStartIndex: I,
|
|
1404
|
-
overscanRowStopIndex:
|
|
1405
|
-
visibleColumnStartIndex:
|
|
1405
|
+
overscanRowStopIndex: x,
|
|
1406
|
+
visibleColumnStartIndex: S,
|
|
1406
1407
|
visibleColumnStopIndex: L,
|
|
1407
1408
|
visibleRowStartIndex: O,
|
|
1408
|
-
visibleRowStopIndex:
|
|
1409
|
+
visibleRowStopIndex: D
|
|
1409
1410
|
});
|
|
1410
|
-
}), l._callOnScroll = void 0, l._callOnScroll =
|
|
1411
|
+
}), l._callOnScroll = void 0, l._callOnScroll = ht(function(v, w, I, x, S) {
|
|
1411
1412
|
return l.props.onScroll({
|
|
1412
1413
|
horizontalScrollDirection: I,
|
|
1413
1414
|
scrollLeft: v,
|
|
1414
1415
|
scrollTop: w,
|
|
1415
|
-
verticalScrollDirection:
|
|
1416
|
-
scrollUpdateWasRequested:
|
|
1416
|
+
verticalScrollDirection: x,
|
|
1417
|
+
scrollUpdateWasRequested: S
|
|
1417
1418
|
});
|
|
1418
1419
|
}), l._getItemStyle = void 0, l._getItemStyle = function(v, w) {
|
|
1419
|
-
var I = l.props,
|
|
1420
|
-
if (O.hasOwnProperty(
|
|
1421
|
-
F = O[
|
|
1420
|
+
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;
|
|
1421
|
+
if (O.hasOwnProperty(D))
|
|
1422
|
+
F = O[D];
|
|
1422
1423
|
else {
|
|
1423
|
-
var E = n(l.props, w, l._instanceProps), R =
|
|
1424
|
-
O[
|
|
1424
|
+
var E = n(l.props, w, l._instanceProps), R = S === "rtl";
|
|
1425
|
+
O[D] = F = {
|
|
1425
1426
|
position: "absolute",
|
|
1426
1427
|
left: R ? void 0 : E,
|
|
1427
1428
|
right: R ? E : void 0,
|
|
@@ -1431,28 +1432,28 @@ function pi(t) {
|
|
|
1431
1432
|
};
|
|
1432
1433
|
}
|
|
1433
1434
|
return F;
|
|
1434
|
-
}, l._getItemStyleCache = void 0, l._getItemStyleCache =
|
|
1435
|
+
}, l._getItemStyleCache = void 0, l._getItemStyleCache = ht(function(v, w, I) {
|
|
1435
1436
|
return {};
|
|
1436
1437
|
}), l._onScroll = function(v) {
|
|
1437
|
-
var w = v.currentTarget, I = w.clientHeight,
|
|
1438
|
+
var w = v.currentTarget, I = w.clientHeight, x = w.clientWidth, S = w.scrollLeft, L = w.scrollTop, O = w.scrollHeight, D = w.scrollWidth;
|
|
1438
1439
|
l.setState(function(F) {
|
|
1439
|
-
if (F.scrollLeft ===
|
|
1440
|
+
if (F.scrollLeft === S && F.scrollTop === L)
|
|
1440
1441
|
return null;
|
|
1441
|
-
var E = l.props.direction, R =
|
|
1442
|
+
var E = l.props.direction, R = S;
|
|
1442
1443
|
if (E === "rtl")
|
|
1443
|
-
switch (
|
|
1444
|
+
switch (Yt()) {
|
|
1444
1445
|
case "negative":
|
|
1445
|
-
R = -
|
|
1446
|
+
R = -S;
|
|
1446
1447
|
break;
|
|
1447
1448
|
case "positive-descending":
|
|
1448
|
-
R =
|
|
1449
|
+
R = D - x - S;
|
|
1449
1450
|
break;
|
|
1450
1451
|
}
|
|
1451
|
-
R = Math.max(0, Math.min(R,
|
|
1452
|
+
R = Math.max(0, Math.min(R, D - x));
|
|
1452
1453
|
var A = Math.max(0, Math.min(L, O - I));
|
|
1453
1454
|
return {
|
|
1454
1455
|
isScrolling: !0,
|
|
1455
|
-
horizontalScrollDirection: F.scrollLeft <
|
|
1456
|
+
horizontalScrollDirection: F.scrollLeft < S ? "forward" : "backward",
|
|
1456
1457
|
scrollLeft: R,
|
|
1457
1458
|
scrollTop: A,
|
|
1458
1459
|
verticalScrollDirection: F.scrollTop < L ? "forward" : "backward",
|
|
@@ -1463,7 +1464,7 @@ function pi(t) {
|
|
|
1463
1464
|
var w = l.props.outerRef;
|
|
1464
1465
|
l._outerRef = v, typeof w == "function" ? w(v) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = v);
|
|
1465
1466
|
}, l._resetIsScrollingDebounced = function() {
|
|
1466
|
-
l._resetIsScrollingTimeoutId !== null &&
|
|
1467
|
+
l._resetIsScrollingTimeoutId !== null && Qt(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId = oi(l._resetIsScrolling, ii);
|
|
1467
1468
|
}, l._resetIsScrolling = function() {
|
|
1468
1469
|
l._resetIsScrollingTimeoutId = null, l.setState({
|
|
1469
1470
|
isScrolling: !1
|
|
@@ -1473,7 +1474,7 @@ function pi(t) {
|
|
|
1473
1474
|
}, l;
|
|
1474
1475
|
}
|
|
1475
1476
|
p.getDerivedStateFromProps = function(l, v) {
|
|
1476
|
-
return
|
|
1477
|
+
return ci(l, v), T(l), null;
|
|
1477
1478
|
};
|
|
1478
1479
|
var h = p.prototype;
|
|
1479
1480
|
return h.scrollTo = function(l) {
|
|
@@ -1488,12 +1489,12 @@ function pi(t) {
|
|
|
1488
1489
|
};
|
|
1489
1490
|
}, this._resetIsScrollingDebounced);
|
|
1490
1491
|
}, h.scrollToItem = function(l) {
|
|
1491
|
-
var v = l.align, w = v === void 0 ? "auto" : v, I = l.columnIndex,
|
|
1492
|
-
I !== void 0 && (I = Math.max(0, Math.min(I, L - 1))),
|
|
1493
|
-
var H = a(this.props, this._instanceProps),
|
|
1492
|
+
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 = ri();
|
|
1493
|
+
I !== void 0 && (I = Math.max(0, Math.min(I, L - 1))), x !== void 0 && (x = Math.max(0, Math.min(x, D - 1)));
|
|
1494
|
+
var H = a(this.props, this._instanceProps), U = d(this.props, this._instanceProps), X = U > F ? G : 0, V = H > O ? G : 0;
|
|
1494
1495
|
this.scrollTo({
|
|
1495
|
-
scrollLeft: I !== void 0 ? c(this.props, I, w, R, this._instanceProps,
|
|
1496
|
-
scrollTop:
|
|
1496
|
+
scrollLeft: I !== void 0 ? c(this.props, I, w, R, this._instanceProps, V) : R,
|
|
1497
|
+
scrollTop: x !== void 0 ? m(this.props, x, w, A, this._instanceProps, X) : A
|
|
1497
1498
|
});
|
|
1498
1499
|
}, h.componentDidMount = function() {
|
|
1499
1500
|
var l = this.props, v = l.initialScrollLeft, w = l.initialScrollTop;
|
|
@@ -1503,102 +1504,102 @@ function pi(t) {
|
|
|
1503
1504
|
}
|
|
1504
1505
|
this._callPropsCallbacks();
|
|
1505
1506
|
}, h.componentDidUpdate = function() {
|
|
1506
|
-
var l = this.props.direction, v = this.state, w = v.scrollLeft, I = v.scrollTop,
|
|
1507
|
-
if (
|
|
1508
|
-
var
|
|
1507
|
+
var l = this.props.direction, v = this.state, w = v.scrollLeft, I = v.scrollTop, x = v.scrollUpdateWasRequested;
|
|
1508
|
+
if (x && this._outerRef != null) {
|
|
1509
|
+
var S = this._outerRef;
|
|
1509
1510
|
if (l === "rtl")
|
|
1510
|
-
switch (
|
|
1511
|
+
switch (Yt()) {
|
|
1511
1512
|
case "negative":
|
|
1512
|
-
|
|
1513
|
+
S.scrollLeft = -w;
|
|
1513
1514
|
break;
|
|
1514
1515
|
case "positive-ascending":
|
|
1515
|
-
|
|
1516
|
+
S.scrollLeft = w;
|
|
1516
1517
|
break;
|
|
1517
1518
|
default:
|
|
1518
|
-
var L =
|
|
1519
|
-
|
|
1519
|
+
var L = S.clientWidth, O = S.scrollWidth;
|
|
1520
|
+
S.scrollLeft = O - L - w;
|
|
1520
1521
|
break;
|
|
1521
1522
|
}
|
|
1522
1523
|
else
|
|
1523
|
-
|
|
1524
|
-
|
|
1524
|
+
S.scrollLeft = Math.max(0, w);
|
|
1525
|
+
S.scrollTop = Math.max(0, I);
|
|
1525
1526
|
}
|
|
1526
1527
|
this._callPropsCallbacks();
|
|
1527
1528
|
}, h.componentWillUnmount = function() {
|
|
1528
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1529
|
+
this._resetIsScrollingTimeoutId !== null && Qt(this._resetIsScrollingTimeoutId);
|
|
1529
1530
|
}, h.render = function() {
|
|
1530
|
-
var l = this.props, v = l.children, w = l.className, I = l.columnCount,
|
|
1531
|
+
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 ? si : 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 = [];
|
|
1531
1532
|
if (I > 0 && H)
|
|
1532
|
-
for (var
|
|
1533
|
-
for (var
|
|
1534
|
-
|
|
1535
|
-
columnIndex:
|
|
1533
|
+
for (var we = J; we <= ee; we++)
|
|
1534
|
+
for (var pe = Z; pe <= Y; pe++)
|
|
1535
|
+
ve.push(Ke(v, {
|
|
1536
|
+
columnIndex: pe,
|
|
1536
1537
|
data: F,
|
|
1537
|
-
isScrolling: X ?
|
|
1538
|
+
isScrolling: X ? ie : void 0,
|
|
1538
1539
|
key: R({
|
|
1539
|
-
columnIndex:
|
|
1540
|
+
columnIndex: pe,
|
|
1540
1541
|
data: F,
|
|
1541
|
-
rowIndex:
|
|
1542
|
+
rowIndex: we
|
|
1542
1543
|
}),
|
|
1543
|
-
rowIndex:
|
|
1544
|
-
style: this._getItemStyle(
|
|
1544
|
+
rowIndex: we,
|
|
1545
|
+
style: this._getItemStyle(we, pe)
|
|
1545
1546
|
}));
|
|
1546
|
-
var
|
|
1547
|
-
return
|
|
1547
|
+
var at = a(this.props, this._instanceProps), He = d(this.props, this._instanceProps);
|
|
1548
|
+
return Ke(A || G || "div", {
|
|
1548
1549
|
className: w,
|
|
1549
1550
|
onScroll: this._onScroll,
|
|
1550
1551
|
ref: this._outerRefSetter,
|
|
1551
|
-
style:
|
|
1552
|
+
style: _t({
|
|
1552
1553
|
position: "relative",
|
|
1553
|
-
height:
|
|
1554
|
-
width:
|
|
1554
|
+
height: S,
|
|
1555
|
+
width: V,
|
|
1555
1556
|
overflow: "auto",
|
|
1556
1557
|
WebkitOverflowScrolling: "touch",
|
|
1557
1558
|
willChange: "transform",
|
|
1558
|
-
direction:
|
|
1559
|
-
},
|
|
1560
|
-
},
|
|
1561
|
-
children:
|
|
1559
|
+
direction: x
|
|
1560
|
+
}, U)
|
|
1561
|
+
}, Ke(O || D || "div", {
|
|
1562
|
+
children: ve,
|
|
1562
1563
|
ref: L,
|
|
1563
1564
|
style: {
|
|
1564
|
-
height:
|
|
1565
|
-
pointerEvents:
|
|
1566
|
-
width:
|
|
1565
|
+
height: at,
|
|
1566
|
+
pointerEvents: ie ? "none" : void 0,
|
|
1567
|
+
width: He
|
|
1567
1568
|
}
|
|
1568
1569
|
}));
|
|
1569
1570
|
}, h._callPropsCallbacks = function() {
|
|
1570
|
-
var l = this.props, v = l.columnCount, w = l.onItemsRendered, I = l.onScroll,
|
|
1571
|
-
if (typeof w == "function" && v > 0 &&
|
|
1572
|
-
var
|
|
1573
|
-
this._callOnItemsRendered(L, O, R, A,
|
|
1571
|
+
var l = this.props, v = l.columnCount, w = l.onItemsRendered, I = l.onScroll, x = l.rowCount;
|
|
1572
|
+
if (typeof w == "function" && v > 0 && x > 0) {
|
|
1573
|
+
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];
|
|
1574
|
+
this._callOnItemsRendered(L, O, R, A, D, F, G, H);
|
|
1574
1575
|
}
|
|
1575
1576
|
if (typeof I == "function") {
|
|
1576
|
-
var
|
|
1577
|
-
this._callOnScroll(
|
|
1577
|
+
var U = this.state, X = U.horizontalScrollDirection, V = U.scrollLeft, ie = U.scrollTop, q = U.scrollUpdateWasRequested, Z = U.verticalScrollDirection;
|
|
1578
|
+
this._callOnScroll(V, ie, X, Z, q);
|
|
1578
1579
|
}
|
|
1579
1580
|
}, h._getHorizontalRangeToRender = function() {
|
|
1580
|
-
var l = this.props, v = l.columnCount, w = l.overscanColumnCount, I = l.overscanColumnsCount,
|
|
1581
|
-
if (v === 0 ||
|
|
1581
|
+
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;
|
|
1582
|
+
if (v === 0 || S === 0)
|
|
1582
1583
|
return [0, 0, 0, 0];
|
|
1583
|
-
var R = r(this.props, F, this._instanceProps), A = o(this.props, R, F, this._instanceProps), G = !
|
|
1584
|
+
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;
|
|
1584
1585
|
return [Math.max(0, R - G), Math.max(0, Math.min(v - 1, A + H)), R, A];
|
|
1585
1586
|
}, h._getVerticalRangeToRender = function() {
|
|
1586
|
-
var l = this.props, v = l.columnCount, w = l.overscanCount, I = l.overscanRowCount,
|
|
1587
|
-
if (v === 0 ||
|
|
1587
|
+
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;
|
|
1588
|
+
if (v === 0 || S === 0)
|
|
1588
1589
|
return [0, 0, 0, 0];
|
|
1589
|
-
var R = u(this.props, F, this._instanceProps), A = y(this.props, R, F, this._instanceProps), G = !O ||
|
|
1590
|
-
return [Math.max(0, R - G), Math.max(0, Math.min(
|
|
1590
|
+
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;
|
|
1591
|
+
return [Math.max(0, R - G), Math.max(0, Math.min(S - 1, A + H)), R, A];
|
|
1591
1592
|
}, p;
|
|
1592
|
-
}(
|
|
1593
|
+
}(co), e.defaultProps = {
|
|
1593
1594
|
direction: "ltr",
|
|
1594
1595
|
itemData: void 0,
|
|
1595
1596
|
useIsScrolling: !1
|
|
1596
1597
|
}, e;
|
|
1597
1598
|
}
|
|
1598
|
-
var
|
|
1599
|
+
var ci = function(e, n) {
|
|
1599
1600
|
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;
|
|
1600
1601
|
if (process.env.NODE_ENV !== "production") {
|
|
1601
|
-
if (typeof m == "number" &&
|
|
1602
|
+
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)
|
|
1602
1603
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
1603
1604
|
switch (o) {
|
|
1604
1605
|
case "ltr":
|
|
@@ -1612,7 +1613,7 @@ var hi = function(e, n) {
|
|
|
1612
1613
|
if (typeof s != "number")
|
|
1613
1614
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (s === null ? "null" : typeof s) + '" was specified.'));
|
|
1614
1615
|
}
|
|
1615
|
-
},
|
|
1616
|
+
}, Jt = 50, Ln = function(e, n) {
|
|
1616
1617
|
var r = e.rowCount, o = n.rowMetadataMap, s = n.estimatedRowHeight, a = n.lastMeasuredRowIndex, d = 0;
|
|
1617
1618
|
if (a >= r && (a = r - 1), a >= 0) {
|
|
1618
1619
|
var c = o[a];
|
|
@@ -1620,7 +1621,7 @@ var hi = function(e, n) {
|
|
|
1620
1621
|
}
|
|
1621
1622
|
var m = r - a - 1, g = m * s;
|
|
1622
1623
|
return d + g;
|
|
1623
|
-
},
|
|
1624
|
+
}, En = function(e, n) {
|
|
1624
1625
|
var r = e.columnCount, o = n.columnMetadataMap, s = n.estimatedColumnWidth, a = n.lastMeasuredColumnIndex, d = 0;
|
|
1625
1626
|
if (a >= r && (a = r - 1), a >= 0) {
|
|
1626
1627
|
var c = o[a];
|
|
@@ -1628,7 +1629,7 @@ var hi = function(e, n) {
|
|
|
1628
1629
|
}
|
|
1629
1630
|
var m = r - a - 1, g = m * s;
|
|
1630
1631
|
return d + g;
|
|
1631
|
-
},
|
|
1632
|
+
}, be = function(e, n, r, o) {
|
|
1632
1633
|
var s, a, d;
|
|
1633
1634
|
if (e === "column" ? (s = o.columnMetadataMap, a = n.columnWidth, d = o.lastMeasuredColumnIndex) : (s = o.rowMetadataMap, a = n.rowHeight, d = o.lastMeasuredRowIndex), r > d) {
|
|
1634
1635
|
var c = 0;
|
|
@@ -1646,25 +1647,25 @@ var hi = function(e, n) {
|
|
|
1646
1647
|
e === "column" ? o.lastMeasuredColumnIndex = r : o.lastMeasuredRowIndex = r;
|
|
1647
1648
|
}
|
|
1648
1649
|
return s[r];
|
|
1649
|
-
},
|
|
1650
|
+
}, en = function(e, n, r, o) {
|
|
1650
1651
|
var s, a;
|
|
1651
1652
|
e === "column" ? (s = r.columnMetadataMap, a = r.lastMeasuredColumnIndex) : (s = r.rowMetadataMap, a = r.lastMeasuredRowIndex);
|
|
1652
1653
|
var d = a > 0 ? s[a].offset : 0;
|
|
1653
|
-
return d >= o ?
|
|
1654
|
-
},
|
|
1654
|
+
return d >= o ? Nn(e, n, r, a, 0, o) : li(e, n, r, Math.max(0, a), o);
|
|
1655
|
+
}, Nn = function(e, n, r, o, s, a) {
|
|
1655
1656
|
for (; s <= o; ) {
|
|
1656
|
-
var d = s + Math.floor((o - s) / 2), c =
|
|
1657
|
+
var d = s + Math.floor((o - s) / 2), c = be(e, n, d, r).offset;
|
|
1657
1658
|
if (c === a)
|
|
1658
1659
|
return d;
|
|
1659
1660
|
c < a ? s = d + 1 : c > a && (o = d - 1);
|
|
1660
1661
|
}
|
|
1661
1662
|
return s > 0 ? s - 1 : 0;
|
|
1662
|
-
},
|
|
1663
|
-
for (var a = e === "column" ? n.columnCount : n.rowCount, d = 1; o < a &&
|
|
1663
|
+
}, li = function(e, n, r, o, s) {
|
|
1664
|
+
for (var a = e === "column" ? n.columnCount : n.rowCount, d = 1; o < a && be(e, n, o, r).offset < s; )
|
|
1664
1665
|
o += d, d *= 2;
|
|
1665
|
-
return
|
|
1666
|
-
},
|
|
1667
|
-
var c = e === "column" ? n.width : n.height, m =
|
|
1666
|
+
return Nn(e, n, r, Math.min(o, a - 1), Math.floor(o / 2), s);
|
|
1667
|
+
}, tn = function(e, n, r, o, s, a, d) {
|
|
1668
|
+
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
1669
|
switch (o === "smart" && (s >= u - c && s <= C + c ? o = "auto" : o = "center"), o) {
|
|
1669
1670
|
case "start":
|
|
1670
1671
|
return C;
|
|
@@ -1676,48 +1677,48 @@ var hi = function(e, n) {
|
|
|
1676
1677
|
default:
|
|
1677
1678
|
return s >= u && s <= C ? s : u > C || s < u ? u : C;
|
|
1678
1679
|
}
|
|
1679
|
-
},
|
|
1680
|
+
}, di = /* @__PURE__ */ ai({
|
|
1680
1681
|
getColumnOffset: function(e, n, r) {
|
|
1681
|
-
return
|
|
1682
|
+
return be("column", e, n, r).offset;
|
|
1682
1683
|
},
|
|
1683
1684
|
getColumnStartIndexForOffset: function(e, n, r) {
|
|
1684
|
-
return
|
|
1685
|
+
return en("column", e, r, n);
|
|
1685
1686
|
},
|
|
1686
1687
|
getColumnStopIndexForStartIndex: function(e, n, r, o) {
|
|
1687
|
-
for (var s = e.columnCount, a = e.width, d =
|
|
1688
|
-
g++, m +=
|
|
1688
|
+
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; )
|
|
1689
|
+
g++, m += be("column", e, g, o).size;
|
|
1689
1690
|
return g;
|
|
1690
1691
|
},
|
|
1691
1692
|
getColumnWidth: function(e, n, r) {
|
|
1692
1693
|
return r.columnMetadataMap[n].size;
|
|
1693
1694
|
},
|
|
1694
|
-
getEstimatedTotalHeight:
|
|
1695
|
-
getEstimatedTotalWidth:
|
|
1695
|
+
getEstimatedTotalHeight: Ln,
|
|
1696
|
+
getEstimatedTotalWidth: En,
|
|
1696
1697
|
getOffsetForColumnAndAlignment: function(e, n, r, o, s, a) {
|
|
1697
|
-
return
|
|
1698
|
+
return tn("column", e, n, r, o, s, a);
|
|
1698
1699
|
},
|
|
1699
1700
|
getOffsetForRowAndAlignment: function(e, n, r, o, s, a) {
|
|
1700
|
-
return
|
|
1701
|
+
return tn("row", e, n, r, o, s, a);
|
|
1701
1702
|
},
|
|
1702
1703
|
getRowOffset: function(e, n, r) {
|
|
1703
|
-
return
|
|
1704
|
+
return be("row", e, n, r).offset;
|
|
1704
1705
|
},
|
|
1705
1706
|
getRowHeight: function(e, n, r) {
|
|
1706
1707
|
return r.rowMetadataMap[n].size;
|
|
1707
1708
|
},
|
|
1708
1709
|
getRowStartIndexForOffset: function(e, n, r) {
|
|
1709
|
-
return
|
|
1710
|
+
return en("row", e, r, n);
|
|
1710
1711
|
},
|
|
1711
1712
|
getRowStopIndexForStartIndex: function(e, n, r, o) {
|
|
1712
|
-
for (var s = e.rowCount, a = e.height, d =
|
|
1713
|
-
g++, m +=
|
|
1713
|
+
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; )
|
|
1714
|
+
g++, m += be("row", e, g, o).size;
|
|
1714
1715
|
return g;
|
|
1715
1716
|
},
|
|
1716
1717
|
initInstanceProps: function(e, n) {
|
|
1717
1718
|
var r = e, o = r.estimatedColumnWidth, s = r.estimatedRowHeight, a = {
|
|
1718
1719
|
columnMetadataMap: {},
|
|
1719
|
-
estimatedColumnWidth: o ||
|
|
1720
|
-
estimatedRowHeight: s ||
|
|
1720
|
+
estimatedColumnWidth: o || Jt,
|
|
1721
|
+
estimatedRowHeight: s || Jt,
|
|
1721
1722
|
lastMeasuredColumnIndex: -1,
|
|
1722
1723
|
lastMeasuredRowIndex: -1,
|
|
1723
1724
|
rowMetadataMap: {}
|
|
@@ -1749,7 +1750,7 @@ var hi = function(e, n) {
|
|
|
1749
1750
|
}
|
|
1750
1751
|
});
|
|
1751
1752
|
process.env.NODE_ENV;
|
|
1752
|
-
function
|
|
1753
|
+
function nn(t, e) {
|
|
1753
1754
|
for (var n in t)
|
|
1754
1755
|
if (!(n in e))
|
|
1755
1756
|
return !0;
|
|
@@ -1758,13 +1759,13 @@ function un(t, e) {
|
|
|
1758
1759
|
return !0;
|
|
1759
1760
|
return !1;
|
|
1760
1761
|
}
|
|
1761
|
-
var
|
|
1762
|
-
function
|
|
1763
|
-
var n = t.style, r =
|
|
1764
|
-
return !
|
|
1762
|
+
var ui = ["style"], pi = ["style"];
|
|
1763
|
+
function hi(t, e) {
|
|
1764
|
+
var n = t.style, r = Kt(t, ui), o = e.style, s = Kt(e, pi);
|
|
1765
|
+
return !nn(n, o) && !nn(r, s);
|
|
1765
1766
|
}
|
|
1766
|
-
const
|
|
1767
|
-
const { viewMode: t } =
|
|
1767
|
+
const fi = () => {
|
|
1768
|
+
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
1769
|
const h = p % a;
|
|
1769
1770
|
return (!T[h] || P > T[h]) && (T[h] = P), T;
|
|
1770
1771
|
}, []), [o.widths, a]), c = N(
|
|
@@ -1783,11 +1784,11 @@ const _i = () => {
|
|
|
1783
1784
|
},
|
|
1784
1785
|
[o.heights, a]
|
|
1785
1786
|
);
|
|
1786
|
-
|
|
1787
|
+
z(() => {
|
|
1787
1788
|
n(a);
|
|
1788
1789
|
}, [a, n]);
|
|
1789
1790
|
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 } =
|
|
1791
|
+
const { rowsHeight: b, columnsWidth: T } = xt(o, a);
|
|
1791
1792
|
return {
|
|
1792
1793
|
rowsHeight: b,
|
|
1793
1794
|
columnsWidth: T
|
|
@@ -1808,23 +1809,23 @@ const _i = () => {
|
|
|
1808
1809
|
totalDimension: _
|
|
1809
1810
|
};
|
|
1810
1811
|
};
|
|
1811
|
-
let
|
|
1812
|
-
typeof window < "u" ?
|
|
1813
|
-
let
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1816
|
-
return
|
|
1817
|
-
}) : (
|
|
1818
|
-
|
|
1819
|
-
},
|
|
1820
|
-
const n =
|
|
1821
|
-
|
|
1822
|
-
}), r =
|
|
1823
|
-
|
|
1824
|
-
},
|
|
1812
|
+
let le;
|
|
1813
|
+
typeof window < "u" ? le = window : typeof self < "u" ? le = self : le = global;
|
|
1814
|
+
let Tt = null, Ct = null;
|
|
1815
|
+
const on = 20, mt = le.clearTimeout, rn = le.setTimeout, gt = le.cancelAnimationFrame || le.mozCancelAnimationFrame || le.webkitCancelAnimationFrame, sn = le.requestAnimationFrame || le.mozRequestAnimationFrame || le.webkitRequestAnimationFrame;
|
|
1816
|
+
gt == null || sn == null ? (Tt = mt, Ct = function(e) {
|
|
1817
|
+
return rn(e, on);
|
|
1818
|
+
}) : (Tt = function([e, n]) {
|
|
1819
|
+
gt(e), mt(n);
|
|
1820
|
+
}, Ct = function(e) {
|
|
1821
|
+
const n = sn(function() {
|
|
1822
|
+
mt(r), e();
|
|
1823
|
+
}), r = rn(function() {
|
|
1824
|
+
gt(n), e();
|
|
1825
|
+
}, on);
|
|
1825
1826
|
return [n, r];
|
|
1826
1827
|
});
|
|
1827
|
-
function
|
|
1828
|
+
function mi(t) {
|
|
1828
1829
|
let e, n, r, o, s, a, d;
|
|
1829
1830
|
const c = typeof document < "u" && document.attachEvent;
|
|
1830
1831
|
if (!c) {
|
|
@@ -1837,7 +1838,7 @@ function bi(t) {
|
|
|
1837
1838
|
if (P.target.className && typeof P.target.className.indexOf == "function" && P.target.className.indexOf("contract-trigger") < 0 && P.target.className.indexOf("expand-trigger") < 0)
|
|
1838
1839
|
return;
|
|
1839
1840
|
const p = this;
|
|
1840
|
-
a(this), this.__resizeRAF__ &&
|
|
1841
|
+
a(this), this.__resizeRAF__ && Tt(this.__resizeRAF__), this.__resizeRAF__ = Ct(function() {
|
|
1841
1842
|
s(p) && (p.__resizeLast__.width = p.offsetWidth, p.__resizeLast__.height = p.offsetHeight, p.__resizeListeners__.forEach(function(l) {
|
|
1842
1843
|
l.call(p, P);
|
|
1843
1844
|
}));
|
|
@@ -1871,7 +1872,7 @@ function bi(t) {
|
|
|
1871
1872
|
u.attachEvent("onresize", y);
|
|
1872
1873
|
else {
|
|
1873
1874
|
if (!u.__resizeTriggers__) {
|
|
1874
|
-
const _ = u.ownerDocument, b =
|
|
1875
|
+
const _ = u.ownerDocument, b = le.getComputedStyle(u);
|
|
1875
1876
|
b && b.position === "static" && (u.style.position = "relative"), m(_), u.__resizeLast__ = {}, u.__resizeListeners__ = [], (u.__resizeTriggers__ = _.createElement("div")).className = "resize-triggers";
|
|
1876
1877
|
const T = _.createElement("div");
|
|
1877
1878
|
T.className = "expand-trigger", T.appendChild(_.createElement("div"));
|
|
@@ -1896,7 +1897,7 @@ function bi(t) {
|
|
|
1896
1897
|
}
|
|
1897
1898
|
};
|
|
1898
1899
|
}
|
|
1899
|
-
class
|
|
1900
|
+
class gi extends lo {
|
|
1900
1901
|
constructor(...e) {
|
|
1901
1902
|
super(...e), this.state = {
|
|
1902
1903
|
height: this.props.defaultHeight || 0,
|
|
@@ -1944,7 +1945,7 @@ class Ti extends go {
|
|
|
1944
1945
|
const r = n.ownerDocument.defaultView.ResizeObserver;
|
|
1945
1946
|
r != null ? (this._resizeObserver = new r(() => {
|
|
1946
1947
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1947
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1948
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = mi(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1948
1949
|
}
|
|
1949
1950
|
}
|
|
1950
1951
|
componentWillUnmount() {
|
|
@@ -1970,7 +1971,7 @@ class Ti extends go {
|
|
|
1970
1971
|
overflow: "visible"
|
|
1971
1972
|
}, b = {};
|
|
1972
1973
|
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),
|
|
1974
|
+
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, {
|
|
1974
1975
|
ref: this._setRef,
|
|
1975
1976
|
style: {
|
|
1976
1977
|
..._,
|
|
@@ -1980,8 +1981,8 @@ class Ti extends go {
|
|
|
1980
1981
|
}, !T && e(b));
|
|
1981
1982
|
}
|
|
1982
1983
|
}
|
|
1983
|
-
const
|
|
1984
|
-
const { focusedPage: n, totalPages: r } =
|
|
1984
|
+
const vi = pn(({ widths: t, heights: e }) => {
|
|
1985
|
+
const { focusedPage: n, totalPages: r } = ue(), o = k(() => {
|
|
1985
1986
|
const d = [], c = Math.ceil(n / 2) * 2 - 1;
|
|
1986
1987
|
if (d.push(c), c + 1 <= r) {
|
|
1987
1988
|
const m = c + 1;
|
|
@@ -2005,9 +2006,9 @@ const Ci = bn(({ widths: t, heights: e }) => {
|
|
|
2005
2006
|
}
|
|
2006
2007
|
];
|
|
2007
2008
|
}, [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(
|
|
2009
|
-
}),
|
|
2010
|
-
const { focusedPage: n } =
|
|
2009
|
+
return /* @__PURE__ */ i("div", { style: { width: a, position: "relative" }, children: o.map((d, c) => /* @__PURE__ */ i(Ot, { style: s[c], pageNumber: d }, d)) });
|
|
2010
|
+
}), wi = ({ widths: t, heights: e }) => {
|
|
2011
|
+
const { focusedPage: n } = ue(), r = k(() => ({
|
|
2011
2012
|
position: "absolute",
|
|
2012
2013
|
width: t(n - 1),
|
|
2013
2014
|
height: e(n - 1)
|
|
@@ -2019,14 +2020,14 @@ const Ci = bn(({ widths: t, heights: e }) => {
|
|
|
2019
2020
|
width: o,
|
|
2020
2021
|
position: "relative"
|
|
2021
2022
|
},
|
|
2022
|
-
children: /* @__PURE__ */ i(
|
|
2023
|
+
children: /* @__PURE__ */ i(Ot, { style: r, pageNumber: n }, n)
|
|
2023
2024
|
}
|
|
2024
2025
|
);
|
|
2025
|
-
},
|
|
2026
|
-
const r = M(), { contentRef: o } =
|
|
2027
|
-
const { rowsHeight: _, columnsWidth: b } =
|
|
2026
|
+
}, _i = (t, e, n) => {
|
|
2027
|
+
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(() => {
|
|
2028
|
+
const { rowsHeight: _, columnsWidth: b } = xt({ heights: s, widths: a }, t);
|
|
2028
2029
|
return s.map((T, P) => {
|
|
2029
|
-
const p = a[P], h =
|
|
2030
|
+
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;
|
|
2030
2031
|
return {
|
|
2031
2032
|
pageNumber: P + 1,
|
|
2032
2033
|
...h,
|
|
@@ -2039,7 +2040,7 @@ const Ci = bn(({ widths: t, heights: e }) => {
|
|
|
2039
2040
|
};
|
|
2040
2041
|
});
|
|
2041
2042
|
}, [s, a, t, e]);
|
|
2042
|
-
|
|
2043
|
+
z(() => {
|
|
2043
2044
|
var b;
|
|
2044
2045
|
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(() => {
|
|
2045
2046
|
g.current = void 0;
|
|
@@ -2057,10 +2058,10 @@ const Ci = bn(({ widths: t, heights: e }) => {
|
|
|
2057
2058
|
const h = p.endX >= T.startLeft && p.endY >= T.startTop, f = p.startX <= T.endLeft && p.startY <= T.endTop;
|
|
2058
2059
|
return h && f;
|
|
2059
2060
|
}).map((p) => {
|
|
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,
|
|
2061
|
+
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);
|
|
2061
2062
|
return {
|
|
2062
2063
|
pageNumber: p.pageNumber,
|
|
2063
|
-
ratio:
|
|
2064
|
+
ratio: S
|
|
2064
2065
|
};
|
|
2065
2066
|
}).sort((p, h) => h.ratio - p.ratio);
|
|
2066
2067
|
m(P);
|
|
@@ -2068,23 +2069,23 @@ const Ci = bn(({ widths: t, heights: e }) => {
|
|
|
2068
2069
|
},
|
|
2069
2070
|
[o, u]
|
|
2070
2071
|
);
|
|
2071
|
-
|
|
2072
|
+
z(() => {
|
|
2072
2073
|
if (n)
|
|
2073
2074
|
return n == null || n.addEventListener("scroll", y), () => {
|
|
2074
2075
|
n == null || n.removeEventListener("scroll", y);
|
|
2075
2076
|
};
|
|
2076
2077
|
}, [n, y]);
|
|
2077
|
-
},
|
|
2078
|
-
const { children: n, toolbarRef: r, style: o, className: s, ...a } = t, { customVariables: d, customDarkVariables: c } =
|
|
2078
|
+
}, On = rt((t, e) => {
|
|
2079
|
+
const { children: n, toolbarRef: r, style: o, className: s, ...a } = t, { customVariables: d, customDarkVariables: c } = No(), { darkMode: m } = go();
|
|
2079
2080
|
return /* @__PURE__ */ i(
|
|
2080
2081
|
"div",
|
|
2081
2082
|
{
|
|
2082
2083
|
ref: e,
|
|
2083
2084
|
...a,
|
|
2084
|
-
className:
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
m ?
|
|
2085
|
+
className: se(
|
|
2086
|
+
Pe["rp-theme-variables"],
|
|
2087
|
+
Pe["rp-container"],
|
|
2088
|
+
m ? Pe["rp-dark-mode"] : "",
|
|
2088
2089
|
s
|
|
2089
2090
|
),
|
|
2090
2091
|
style: {
|
|
@@ -2096,11 +2097,13 @@ const Ci = bn(({ widths: t, heights: e }) => {
|
|
|
2096
2097
|
children: n
|
|
2097
2098
|
}
|
|
2098
2099
|
);
|
|
2099
|
-
}),
|
|
2100
|
-
const o =
|
|
2101
|
-
return /* @__PURE__ */ i(
|
|
2102
|
-
},
|
|
2103
|
-
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } =
|
|
2100
|
+
}), bi = pn(({ columnIndex: t, rowIndex: e, data: n, style: r }) => {
|
|
2101
|
+
const o = sr(e, t, n.columnCount);
|
|
2102
|
+
return /* @__PURE__ */ i(Ot, { style: r, pageNumber: o }, o);
|
|
2103
|
+
}, hi), _c = () => {
|
|
2104
|
+
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = Pt(), { pagesRef: r, setPagesRef: o, setContentRef: s } = Te(), { scrollToPage: a } = Tn();
|
|
2105
|
+
ur(r);
|
|
2106
|
+
const {
|
|
2104
2107
|
virtualScrollRef: d,
|
|
2105
2108
|
getVirtualScrollRef: c,
|
|
2106
2109
|
getPageScrollElementRef: m,
|
|
@@ -2109,187 +2112,140 @@ const Ci = bn(({ widths: t, heights: e }) => {
|
|
|
2109
2112
|
virtualScrollableElementRef: u,
|
|
2110
2113
|
totalInnerDimensions: y,
|
|
2111
2114
|
pageScrollElementRef: _
|
|
2112
|
-
} =
|
|
2115
|
+
} = 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
2116
|
y
|
|
2114
2117
|
), O = M({
|
|
2115
2118
|
viewMode: l,
|
|
2116
2119
|
scrollMode: f
|
|
2117
|
-
}),
|
|
2120
|
+
}), D = M(!1), F = M(), { isFullScreen: E } = _o(), {
|
|
2118
2121
|
pageDimension: R,
|
|
2119
2122
|
rowCount: A,
|
|
2120
2123
|
rowHeight: G,
|
|
2121
2124
|
columnCount: H,
|
|
2122
|
-
columnWidth:
|
|
2125
|
+
columnWidth: U,
|
|
2123
2126
|
estimatedColumnWidth: X,
|
|
2124
|
-
estimatedRowHeight:
|
|
2125
|
-
totalDimension:
|
|
2126
|
-
} =
|
|
2127
|
-
|
|
2127
|
+
estimatedRowHeight: V,
|
|
2128
|
+
totalDimension: ie
|
|
2129
|
+
} = fi(), q = Rt(y, 100), { onScroll: Z } = Eo(), Y = M();
|
|
2130
|
+
_i(H, A, u);
|
|
2128
2131
|
const te = M({
|
|
2129
2132
|
scrollTop: 0,
|
|
2130
2133
|
scrollLeft: 0
|
|
2131
2134
|
});
|
|
2132
|
-
|
|
2133
|
-
const { isPressed: J } =
|
|
2135
|
+
lr(r);
|
|
2136
|
+
const { isPressed: J } = ar(), { selectionMode: ee } = wo(), { initializeGrabScroll: ve, resetGrabState: we } = cr({
|
|
2134
2137
|
isPressed: J
|
|
2135
|
-
}),
|
|
2138
|
+
}), pe = k(() => ee === ho.HAND, [ee]), at = k(() => ({
|
|
2136
2139
|
columnCount: H
|
|
2137
|
-
}), [H]),
|
|
2138
|
-
(
|
|
2139
|
-
const
|
|
2140
|
-
!E &&
|
|
2140
|
+
}), [H]), He = N(
|
|
2141
|
+
(B) => {
|
|
2142
|
+
const j = document.activeElement !== r;
|
|
2143
|
+
!E && j || (["ArrowUp", "ArrowLeft"].includes(B.key) ? (B.preventDefault(), P()) : ["ArrowDown", "ArrowRight"].includes(B.key) && (B.preventDefault(), T()));
|
|
2141
2144
|
},
|
|
2142
2145
|
[T, P, E, f]
|
|
2143
2146
|
);
|
|
2144
|
-
|
|
2145
|
-
window.removeEventListener("keydown",
|
|
2146
|
-
}), [
|
|
2147
|
+
z(() => (window.addEventListener("keydown", He), () => {
|
|
2148
|
+
window.removeEventListener("keydown", He);
|
|
2149
|
+
}), [He]), z(() => {
|
|
2147
2150
|
if (v.current && (v.current.style.position = "relative"), !!d)
|
|
2148
|
-
for (let
|
|
2149
|
-
for (let
|
|
2151
|
+
for (let B = 0; B < A; B++)
|
|
2152
|
+
for (let j = 0; j < H; j++)
|
|
2150
2153
|
d.resetAfterIndices({
|
|
2151
|
-
columnIndex:
|
|
2152
|
-
rowIndex:
|
|
2154
|
+
columnIndex: j,
|
|
2155
|
+
rowIndex: B,
|
|
2153
2156
|
shouldForceUpdate: !0
|
|
2154
2157
|
});
|
|
2155
2158
|
}, [A, H, R, d]);
|
|
2156
|
-
const
|
|
2157
|
-
(
|
|
2159
|
+
const eo = N(
|
|
2160
|
+
(B, j) => {
|
|
2158
2161
|
if (!u)
|
|
2159
2162
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
2160
|
-
const
|
|
2161
|
-
return
|
|
2163
|
+
const xe = te.current.scrollTop > j, Re = te.current.scrollLeft > B;
|
|
2164
|
+
return xe || Re ? te.current : {
|
|
2162
2165
|
scrollTop: u.scrollTop,
|
|
2163
2166
|
scrollLeft: u.scrollLeft
|
|
2164
2167
|
};
|
|
2165
2168
|
},
|
|
2166
2169
|
[u]
|
|
2167
|
-
),
|
|
2168
|
-
(
|
|
2170
|
+
), Ft = N(
|
|
2171
|
+
(B, j) => {
|
|
2169
2172
|
if (O.current.viewMode !== l || O.current.scrollMode !== f) {
|
|
2170
|
-
Y.current && clearTimeout(Y.current),
|
|
2173
|
+
Y.current && clearTimeout(Y.current), D.current = !0, a(h, "auto"), Y.current = setTimeout(() => {
|
|
2171
2174
|
requestAnimationFrame(() => {
|
|
2172
2175
|
O.current = { viewMode: l, scrollMode: f };
|
|
2173
2176
|
});
|
|
2174
2177
|
}, 100);
|
|
2175
2178
|
return;
|
|
2176
2179
|
}
|
|
2177
|
-
const
|
|
2178
|
-
if (!
|
|
2180
|
+
const Re = B.scrollTop, ct = B.scrollLeft;
|
|
2181
|
+
if (!j.height || !j.width)
|
|
2179
2182
|
return;
|
|
2180
|
-
|
|
2181
|
-
const { height:
|
|
2182
|
-
if (
|
|
2183
|
+
D.current = !0;
|
|
2184
|
+
const { height: Le, width: lt } = j, { height: kt, width: Wt } = L.current;
|
|
2185
|
+
if (kt === Le && Wt === lt)
|
|
2183
2186
|
return;
|
|
2184
|
-
const
|
|
2187
|
+
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;
|
|
2185
2188
|
F.current = setTimeout(() => {
|
|
2186
2189
|
requestAnimationFrame(() => {
|
|
2187
2190
|
u == null || u.scrollTo({
|
|
2188
|
-
top:
|
|
2189
|
-
left:
|
|
2191
|
+
top: so,
|
|
2192
|
+
left: ao,
|
|
2190
2193
|
behavior: "auto"
|
|
2191
2194
|
});
|
|
2192
2195
|
});
|
|
2193
2196
|
}, 0), L.current = {
|
|
2194
|
-
height:
|
|
2195
|
-
width:
|
|
2197
|
+
height: j.height,
|
|
2198
|
+
width: j.width
|
|
2196
2199
|
};
|
|
2197
2200
|
},
|
|
2198
2201
|
[u, l, f, a]
|
|
2199
2202
|
);
|
|
2200
|
-
|
|
2203
|
+
z(() => {
|
|
2201
2204
|
clearTimeout(F.current);
|
|
2202
|
-
const
|
|
2203
|
-
(
|
|
2205
|
+
const B = Array.from({ length: A }).reduce(
|
|
2206
|
+
(Re, ct, Le) => Re + G(Le),
|
|
2204
2207
|
0
|
|
2205
|
-
),
|
|
2206
|
-
(
|
|
2208
|
+
), j = Array.from({ length: H }).reduce(
|
|
2209
|
+
(Re, ct, Le) => Re + U(Le),
|
|
2207
2210
|
0
|
|
2208
|
-
),
|
|
2209
|
-
te.current =
|
|
2210
|
-
height:
|
|
2211
|
-
width:
|
|
2211
|
+
), xe = eo(j, B);
|
|
2212
|
+
te.current = xe, Ft(xe, { height: B, width: j }), C({
|
|
2213
|
+
height: B,
|
|
2214
|
+
width: j
|
|
2212
2215
|
});
|
|
2213
|
-
}, [R, A, H,
|
|
2214
|
-
const
|
|
2215
|
-
(
|
|
2216
|
+
}, [R, A, H, Ft]);
|
|
2217
|
+
const to = N(
|
|
2218
|
+
(B) => {
|
|
2216
2219
|
te.current = {
|
|
2217
|
-
scrollTop:
|
|
2218
|
-
scrollLeft:
|
|
2220
|
+
scrollTop: B.scrollTop,
|
|
2221
|
+
scrollLeft: B.scrollLeft
|
|
2219
2222
|
};
|
|
2220
2223
|
},
|
|
2221
2224
|
[u]
|
|
2222
2225
|
);
|
|
2223
|
-
|
|
2224
|
-
if (
|
|
2225
|
-
return _ && _.addEventListener("scroll",
|
|
2226
|
-
_ == null || _.removeEventListener("scroll",
|
|
2226
|
+
z(() => {
|
|
2227
|
+
if (Z)
|
|
2228
|
+
return _ && _.addEventListener("scroll", Z), u && u.addEventListener("scroll", Z), () => {
|
|
2229
|
+
_ == null || _.removeEventListener("scroll", Z), u == null || u.removeEventListener("scroll", Z);
|
|
2227
2230
|
};
|
|
2228
|
-
}, [u, _,
|
|
2231
|
+
}, [u, _, Z]), z(() => () => {
|
|
2229
2232
|
Y.current && clearTimeout(Y.current);
|
|
2230
2233
|
}, []);
|
|
2231
|
-
const
|
|
2232
|
-
[
|
|
2233
|
-
[
|
|
2234
|
-
}), [
|
|
2235
|
-
(
|
|
2236
|
-
if (
|
|
2237
|
-
const
|
|
2238
|
-
|
|
2234
|
+
const no = k(() => se(ae["rp-pages-container"], {
|
|
2235
|
+
[ae["rp-cursor-grab"]]: pe && !J,
|
|
2236
|
+
[ae["rp-cursor-grabbing"]]: pe && J
|
|
2237
|
+
}), [pe, J]), oo = N(
|
|
2238
|
+
(B) => {
|
|
2239
|
+
if (pe && B) {
|
|
2240
|
+
const j = se(ae["rp-pages"]), xe = document.querySelector(`.${j}`);
|
|
2241
|
+
ve(xe);
|
|
2239
2242
|
}
|
|
2240
2243
|
},
|
|
2241
|
-
[
|
|
2244
|
+
[pe, ve, ae]
|
|
2242
2245
|
);
|
|
2243
|
-
return
|
|
2244
|
-
w &&
|
|
2245
|
-
}, [w]),
|
|
2246
|
-
const U = (Z) => {
|
|
2247
|
-
var it;
|
|
2248
|
-
const ce = window.getSelection();
|
|
2249
|
-
if (!ce || ce.rangeCount === 0)
|
|
2250
|
-
return;
|
|
2251
|
-
const Pe = ce.getRangeAt(0), Ge = Array.from(document.querySelectorAll('[data-rp$="-textLayer"]'));
|
|
2252
|
-
if (!Ge.some(
|
|
2253
|
-
(le) => le.contains(Pe.commonAncestorContainer)
|
|
2254
|
-
))
|
|
2255
|
-
return;
|
|
2256
|
-
const De = [];
|
|
2257
|
-
if (Ge.forEach((le) => {
|
|
2258
|
-
Array.from(le.querySelectorAll('[data-rp="rp-text-layer-text"]')).forEach((ie) => {
|
|
2259
|
-
if (ce.containsNode(ie, !0)) {
|
|
2260
|
-
const ge = ie.getBoundingClientRect(), Se = ie.textContent || "";
|
|
2261
|
-
Se && ge.height > 0 && De.push({
|
|
2262
|
-
element: ie,
|
|
2263
|
-
text: Se,
|
|
2264
|
-
rect: ge
|
|
2265
|
-
});
|
|
2266
|
-
}
|
|
2267
|
-
});
|
|
2268
|
-
}), De.length === 0)
|
|
2269
|
-
return;
|
|
2270
|
-
De.sort((le, xe) => {
|
|
2271
|
-
const ie = le.rect.top + le.rect.height / 2, ge = xe.rect.top + xe.rect.height / 2, Se = ie - ge, st = (le.rect.height + xe.rect.height) / 2;
|
|
2272
|
-
return Math.abs(Se) < st * 0.3 ? le.rect.left - xe.rect.left : Se;
|
|
2273
|
-
});
|
|
2274
|
-
let ye = "", Ie = null, rt = 0;
|
|
2275
|
-
De.forEach((le, xe) => {
|
|
2276
|
-
const { text: ie, rect: ge } = le, Se = ge.top + ge.height / 2;
|
|
2277
|
-
if (xe === 0)
|
|
2278
|
-
ye = ie, rt = Se;
|
|
2279
|
-
else {
|
|
2280
|
-
const st = (ge.height + Ie.height) / 2, ho = Math.abs(Se - rt), fo = ge.top - (Ie.top + Ie.height);
|
|
2281
|
-
ho > st * 0.3 ? fo > st * 1.2 ? ye += `
|
|
2282
|
-
|
|
2283
|
-
` + ie : ye += `
|
|
2284
|
-
` + ie : ge.left - (Ie.left + Ie.width) > 1 ? ye += " " + ie : ye += ie, rt = Se;
|
|
2285
|
-
}
|
|
2286
|
-
Ie = ge;
|
|
2287
|
-
}), (it = Z.clipboardData) == null || it.setData("text/plain", ye), Z.preventDefault();
|
|
2288
|
-
};
|
|
2289
|
-
return document.addEventListener("copy", U), () => {
|
|
2290
|
-
document.removeEventListener("copy", U);
|
|
2291
|
-
};
|
|
2292
|
-
}, []), D(() => {
|
|
2246
|
+
return z(() => {
|
|
2247
|
+
w && we();
|
|
2248
|
+
}, [w]), z(() => {
|
|
2293
2249
|
if (!(q.height === 0 || !b.current)) {
|
|
2294
2250
|
if (e === oe.PAGE_SCROLLING) {
|
|
2295
2251
|
t !== h && _ && p(t), b.current = !1;
|
|
@@ -2303,54 +2259,54 @@ const Ci = bn(({ widths: t, heights: e }) => {
|
|
|
2303
2259
|
_,
|
|
2304
2260
|
p,
|
|
2305
2261
|
q
|
|
2306
|
-
]), /* @__PURE__ */ W(
|
|
2307
|
-
/* @__PURE__ */ i(
|
|
2308
|
-
|
|
2262
|
+
]), /* @__PURE__ */ W(he, { children: [
|
|
2263
|
+
/* @__PURE__ */ i(qo, { ref: s, children: /* @__PURE__ */ i(
|
|
2264
|
+
On,
|
|
2309
2265
|
{
|
|
2310
2266
|
id: n,
|
|
2311
2267
|
ref: o,
|
|
2312
2268
|
tabIndex: -1,
|
|
2313
|
-
className:
|
|
2314
|
-
children: /* @__PURE__ */ i(
|
|
2269
|
+
className: no,
|
|
2270
|
+
children: /* @__PURE__ */ i(gi, { 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(
|
|
2315
2271
|
"div",
|
|
2316
2272
|
{
|
|
2317
2273
|
ref: m,
|
|
2318
|
-
style: { width:
|
|
2319
|
-
className: ae
|
|
2320
|
-
children: l ===
|
|
2274
|
+
style: { width: B, height: j },
|
|
2275
|
+
className: se(ae["rp-pages"], ae["rp-page-scrolling-wrapper"]),
|
|
2276
|
+
children: l === Ne.DUAL_PAGE ? /* @__PURE__ */ i(vi, { widths: U, heights: G }) : /* @__PURE__ */ i(wi, { widths: U, heights: G })
|
|
2321
2277
|
}
|
|
2322
|
-
) :
|
|
2323
|
-
|
|
2278
|
+
) : V ? /* @__PURE__ */ i(
|
|
2279
|
+
di,
|
|
2324
2280
|
{
|
|
2325
2281
|
ref: c,
|
|
2326
|
-
itemData:
|
|
2282
|
+
itemData: at,
|
|
2327
2283
|
outerRef: g,
|
|
2328
2284
|
innerRef: v,
|
|
2329
|
-
onScroll:
|
|
2285
|
+
onScroll: to,
|
|
2330
2286
|
columnCount: H,
|
|
2331
|
-
columnWidth:
|
|
2287
|
+
columnWidth: U,
|
|
2332
2288
|
rowHeight: G,
|
|
2333
|
-
height:
|
|
2334
|
-
width:
|
|
2289
|
+
height: j,
|
|
2290
|
+
width: B,
|
|
2335
2291
|
estimatedColumnWidth: X,
|
|
2336
|
-
estimatedRowHeight:
|
|
2292
|
+
estimatedRowHeight: V,
|
|
2337
2293
|
rowCount: A,
|
|
2338
|
-
className:
|
|
2339
|
-
|
|
2340
|
-
f === oe.HORIZONTAL_SCROLLING ?
|
|
2294
|
+
className: se(
|
|
2295
|
+
ae["rp-pages"],
|
|
2296
|
+
f === oe.HORIZONTAL_SCROLLING ? ae["rp-pages-horizontal-scroll"] : ""
|
|
2341
2297
|
),
|
|
2342
2298
|
style: {
|
|
2343
|
-
"--rp-pages-height": `${
|
|
2344
|
-
"--rp-pages-width": `${
|
|
2299
|
+
"--rp-pages-height": `${ie.height}px`,
|
|
2300
|
+
"--rp-pages-width": `${ie.width}px`,
|
|
2345
2301
|
"--rp-row-count": `${A}`,
|
|
2346
2302
|
"--rp-column-count": `${H}`
|
|
2347
2303
|
},
|
|
2348
|
-
children:
|
|
2304
|
+
children: bi
|
|
2349
2305
|
}
|
|
2350
2306
|
) : !w && !I ? /* @__PURE__ */ i(
|
|
2351
2307
|
"div",
|
|
2352
2308
|
{
|
|
2353
|
-
className:
|
|
2309
|
+
className: ae["rp-loader"],
|
|
2354
2310
|
style: {
|
|
2355
2311
|
display: "flex",
|
|
2356
2312
|
justifyContent: "center",
|
|
@@ -2358,9 +2314,9 @@ const Ci = bn(({ widths: t, heights: e }) => {
|
|
|
2358
2314
|
height: "100%",
|
|
2359
2315
|
width: "100%"
|
|
2360
2316
|
},
|
|
2361
|
-
children:
|
|
2317
|
+
children: S && /* @__PURE__ */ i(S, {})
|
|
2362
2318
|
}
|
|
2363
|
-
) : I ===
|
|
2319
|
+
) : I === fo.NOT_SUPPORTED ? /* @__PURE__ */ i("div", { className: ae["rp-not-supported"], children: /* @__PURE__ */ W("div", { className: ae["rp-not-supported-content"], children: [
|
|
2364
2320
|
"React PDF is unable to render on this browser. Please use the supported browsers from the list below:",
|
|
2365
2321
|
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ W("ul", { children: [
|
|
2366
2322
|
/* @__PURE__ */ i("li", { children: "Chrome 119+" }),
|
|
@@ -2373,27 +2329,27 @@ const Ci = bn(({ widths: t, heights: e }) => {
|
|
|
2373
2329
|
] }) }) : null }) })
|
|
2374
2330
|
}
|
|
2375
2331
|
) }),
|
|
2376
|
-
|
|
2332
|
+
x && /* @__PURE__ */ i(dr, {})
|
|
2377
2333
|
] });
|
|
2378
|
-
},
|
|
2334
|
+
}, $e = {
|
|
2379
2335
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
2380
2336
|
"rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
|
|
2381
2337
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
2382
2338
|
"rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
|
|
2383
2339
|
"rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
|
|
2384
|
-
},
|
|
2340
|
+
}, vt = {
|
|
2385
2341
|
"rp-paginate": "_rp-paginate_1gck0_1",
|
|
2386
2342
|
"rp-page-input": "_rp-page-input_1gck0_6",
|
|
2387
2343
|
"rp-total-page": "_rp-total-page_1gck0_18"
|
|
2388
|
-
},
|
|
2389
|
-
const { prevIcon: t } =
|
|
2390
|
-
return t || e || /* @__PURE__ */ i(
|
|
2391
|
-
},
|
|
2392
|
-
const { nextIcon: t } =
|
|
2393
|
-
return t || e || /* @__PURE__ */ i(
|
|
2394
|
-
},
|
|
2395
|
-
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: s } =
|
|
2396
|
-
|
|
2344
|
+
}, Ti = () => {
|
|
2345
|
+
const { prevIcon: t } = ge(), { prevIcon: e } = me();
|
|
2346
|
+
return t || e || /* @__PURE__ */ i(Ue, {});
|
|
2347
|
+
}, Ci = () => {
|
|
2348
|
+
const { nextIcon: t } = ge(), { nextIcon: e } = me();
|
|
2349
|
+
return t || e || /* @__PURE__ */ i(Ue, { style: { transform: "rotate(180deg" } });
|
|
2350
|
+
}, Pi = () => {
|
|
2351
|
+
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();
|
|
2352
|
+
z(() => {
|
|
2397
2353
|
d(t.toString());
|
|
2398
2354
|
}, [t]);
|
|
2399
2355
|
const _ = N((h) => {
|
|
@@ -2409,7 +2365,7 @@ const Ci = bn(({ widths: t, heights: e }) => {
|
|
|
2409
2365
|
h.key === "Enter" && b();
|
|
2410
2366
|
},
|
|
2411
2367
|
[b]
|
|
2412
|
-
), p = k(() => C ===
|
|
2368
|
+
), p = k(() => C === Ne.DUAL_PAGE && u === oe.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, C, u]);
|
|
2413
2369
|
return !c || !m ? null : typeof c != "boolean" ? /* @__PURE__ */ i(
|
|
2414
2370
|
c,
|
|
2415
2371
|
{
|
|
@@ -2430,44 +2386,44 @@ const Ci = bn(({ widths: t, heights: e }) => {
|
|
|
2430
2386
|
goToPage: s,
|
|
2431
2387
|
changePage: n
|
|
2432
2388
|
}
|
|
2433
|
-
) : /* @__PURE__ */ W("div", { className:
|
|
2389
|
+
) : /* @__PURE__ */ W("div", { className: vt["rp-paginate"], children: [
|
|
2434
2390
|
!g && /* @__PURE__ */ i(K, { content: y == null ? void 0 : y.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2435
|
-
|
|
2391
|
+
ce,
|
|
2436
2392
|
{
|
|
2437
2393
|
onClick: o,
|
|
2438
2394
|
"aria-label": y == null ? void 0 : y.previousPageTooltip,
|
|
2439
2395
|
"aria-disabled": t === 1,
|
|
2440
|
-
children: /* @__PURE__ */ i(
|
|
2396
|
+
children: /* @__PURE__ */ i(Ti, {})
|
|
2441
2397
|
}
|
|
2442
2398
|
) }),
|
|
2443
2399
|
/* @__PURE__ */ i(K, { content: y == null ? void 0 : y.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2444
|
-
|
|
2400
|
+
hn,
|
|
2445
2401
|
{
|
|
2446
2402
|
onKeyDown: P,
|
|
2447
2403
|
onBlur: T,
|
|
2448
2404
|
onChange: _,
|
|
2449
2405
|
value: a,
|
|
2450
|
-
className:
|
|
2406
|
+
className: vt["rp-page-input"],
|
|
2451
2407
|
id: "page-input",
|
|
2452
2408
|
name: "page-input"
|
|
2453
2409
|
}
|
|
2454
2410
|
) }),
|
|
2455
|
-
/* @__PURE__ */ W("span", { className:
|
|
2411
|
+
/* @__PURE__ */ W("span", { className: vt["rp-total-page"], children: [
|
|
2456
2412
|
"/",
|
|
2457
2413
|
e
|
|
2458
2414
|
] }),
|
|
2459
2415
|
!g && /* @__PURE__ */ i(K, { content: y == null ? void 0 : y.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2460
|
-
|
|
2416
|
+
ce,
|
|
2461
2417
|
{
|
|
2462
2418
|
onClick: r,
|
|
2463
2419
|
"aria-label": y == null ? void 0 : y.nextPageTooltip,
|
|
2464
2420
|
"aria-disabled": p,
|
|
2465
|
-
children: /* @__PURE__ */ i(
|
|
2421
|
+
children: /* @__PURE__ */ i(Ci, {})
|
|
2466
2422
|
}
|
|
2467
2423
|
) })
|
|
2468
2424
|
] });
|
|
2469
2425
|
};
|
|
2470
|
-
var
|
|
2426
|
+
var st = "Dialog", [Dn, bc] = vr(st), [yi, fe] = Dn(st), zn = (t) => {
|
|
2471
2427
|
const {
|
|
2472
2428
|
__scopeDialog: e,
|
|
2473
2429
|
children: n,
|
|
@@ -2475,21 +2431,21 @@ var wt = "Dialog", [$n, yc] = Cr(wt), [Li, we] = $n(wt), Gn = (t) => {
|
|
|
2475
2431
|
defaultOpen: o,
|
|
2476
2432
|
onOpenChange: s,
|
|
2477
2433
|
modal: a = !0
|
|
2478
|
-
} = t, d = Q.useRef(null), c = Q.useRef(null), [m, g] =
|
|
2434
|
+
} = t, d = Q.useRef(null), c = Q.useRef(null), [m, g] = _r({
|
|
2479
2435
|
prop: r,
|
|
2480
2436
|
defaultProp: o ?? !1,
|
|
2481
2437
|
onChange: s,
|
|
2482
|
-
caller:
|
|
2438
|
+
caller: st
|
|
2483
2439
|
});
|
|
2484
2440
|
return /* @__PURE__ */ i(
|
|
2485
|
-
|
|
2441
|
+
yi,
|
|
2486
2442
|
{
|
|
2487
2443
|
scope: e,
|
|
2488
2444
|
triggerRef: d,
|
|
2489
2445
|
contentRef: c,
|
|
2490
|
-
contentId:
|
|
2491
|
-
titleId:
|
|
2492
|
-
descriptionId:
|
|
2446
|
+
contentId: ut(),
|
|
2447
|
+
titleId: ut(),
|
|
2448
|
+
descriptionId: ut(),
|
|
2493
2449
|
open: m,
|
|
2494
2450
|
onOpenChange: g,
|
|
2495
2451
|
onOpenToggle: Q.useCallback(() => g((C) => !C), [g]),
|
|
@@ -2498,50 +2454,50 @@ var wt = "Dialog", [$n, yc] = Cr(wt), [Li, we] = $n(wt), Gn = (t) => {
|
|
|
2498
2454
|
}
|
|
2499
2455
|
);
|
|
2500
2456
|
};
|
|
2501
|
-
|
|
2502
|
-
var
|
|
2457
|
+
zn.displayName = st;
|
|
2458
|
+
var An = "DialogTrigger", Ii = Q.forwardRef(
|
|
2503
2459
|
(t, e) => {
|
|
2504
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2460
|
+
const { __scopeDialog: n, ...r } = t, o = fe(An, n), s = Lt(e, o.triggerRef);
|
|
2505
2461
|
return /* @__PURE__ */ i(
|
|
2506
|
-
|
|
2462
|
+
je.button,
|
|
2507
2463
|
{
|
|
2508
2464
|
type: "button",
|
|
2509
2465
|
"aria-haspopup": "dialog",
|
|
2510
2466
|
"aria-expanded": o.open,
|
|
2511
2467
|
"aria-controls": o.contentId,
|
|
2512
|
-
"data-state":
|
|
2468
|
+
"data-state": At(o.open),
|
|
2513
2469
|
...r,
|
|
2514
2470
|
ref: s,
|
|
2515
|
-
onClick:
|
|
2471
|
+
onClick: qe(t.onClick, o.onOpenToggle)
|
|
2516
2472
|
}
|
|
2517
2473
|
);
|
|
2518
2474
|
}
|
|
2519
2475
|
);
|
|
2520
|
-
|
|
2521
|
-
var
|
|
2476
|
+
Ii.displayName = An;
|
|
2477
|
+
var Dt = "DialogPortal", [Si, Fn] = Dn(Dt, {
|
|
2522
2478
|
forceMount: void 0
|
|
2523
|
-
}),
|
|
2524
|
-
const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, s =
|
|
2525
|
-
return /* @__PURE__ */ i(
|
|
2479
|
+
}), kn = (t) => {
|
|
2480
|
+
const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, s = fe(Dt, e);
|
|
2481
|
+
return /* @__PURE__ */ i(Si, { scope: e, forceMount: n, children: Q.Children.map(r, (a) => /* @__PURE__ */ i(Et, { present: n || s.open, children: /* @__PURE__ */ i(Sr, { asChild: !0, container: o, children: a }) })) });
|
|
2526
2482
|
};
|
|
2527
|
-
|
|
2528
|
-
var
|
|
2483
|
+
kn.displayName = Dt;
|
|
2484
|
+
var et = "DialogOverlay", Wn = Q.forwardRef(
|
|
2529
2485
|
(t, e) => {
|
|
2530
|
-
const n =
|
|
2531
|
-
return s.modal ? /* @__PURE__ */ i(
|
|
2486
|
+
const n = Fn(et, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, s = fe(et, t.__scopeDialog);
|
|
2487
|
+
return s.modal ? /* @__PURE__ */ i(Et, { present: r || s.open, children: /* @__PURE__ */ i(Ri, { ...o, ref: e }) }) : null;
|
|
2532
2488
|
}
|
|
2533
2489
|
);
|
|
2534
|
-
|
|
2535
|
-
var
|
|
2490
|
+
Wn.displayName = et;
|
|
2491
|
+
var xi = br("DialogOverlay.RemoveScroll"), Ri = Q.forwardRef(
|
|
2536
2492
|
(t, e) => {
|
|
2537
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2493
|
+
const { __scopeDialog: n, ...r } = t, o = fe(et, n);
|
|
2538
2494
|
return (
|
|
2539
2495
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2540
2496
|
// ie. when `Overlay` and `Content` are siblings
|
|
2541
|
-
/* @__PURE__ */ i(
|
|
2542
|
-
|
|
2497
|
+
/* @__PURE__ */ i(Cr, { as: xi, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ i(
|
|
2498
|
+
je.div,
|
|
2543
2499
|
{
|
|
2544
|
-
"data-state":
|
|
2500
|
+
"data-state": At(o.open),
|
|
2545
2501
|
...r,
|
|
2546
2502
|
ref: e,
|
|
2547
2503
|
style: { pointerEvents: "auto", ...r.style }
|
|
@@ -2549,47 +2505,47 @@ var Oi = Ir("DialogOverlay.RemoveScroll"), Di = Q.forwardRef(
|
|
|
2549
2505
|
) })
|
|
2550
2506
|
);
|
|
2551
2507
|
}
|
|
2552
|
-
),
|
|
2508
|
+
), Oe = "DialogContent", Mn = Q.forwardRef(
|
|
2553
2509
|
(t, e) => {
|
|
2554
|
-
const n =
|
|
2555
|
-
return /* @__PURE__ */ i(
|
|
2510
|
+
const n = Fn(Oe, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, s = fe(Oe, t.__scopeDialog);
|
|
2511
|
+
return /* @__PURE__ */ i(Et, { present: r || s.open, children: s.modal ? /* @__PURE__ */ i(Li, { ...o, ref: e }) : /* @__PURE__ */ i(Ei, { ...o, ref: e }) });
|
|
2556
2512
|
}
|
|
2557
2513
|
);
|
|
2558
|
-
|
|
2559
|
-
var
|
|
2514
|
+
Mn.displayName = Oe;
|
|
2515
|
+
var Li = Q.forwardRef(
|
|
2560
2516
|
(t, e) => {
|
|
2561
|
-
const n =
|
|
2517
|
+
const n = fe(Oe, t.__scopeDialog), r = Q.useRef(null), o = Lt(e, n.contentRef, r);
|
|
2562
2518
|
return Q.useEffect(() => {
|
|
2563
2519
|
const s = r.current;
|
|
2564
2520
|
if (s)
|
|
2565
|
-
return
|
|
2521
|
+
return Pr(s);
|
|
2566
2522
|
}, []), /* @__PURE__ */ i(
|
|
2567
|
-
|
|
2523
|
+
Hn,
|
|
2568
2524
|
{
|
|
2569
2525
|
...t,
|
|
2570
2526
|
ref: o,
|
|
2571
2527
|
trapFocus: n.open,
|
|
2572
2528
|
disableOutsidePointerEvents: !0,
|
|
2573
|
-
onCloseAutoFocus:
|
|
2529
|
+
onCloseAutoFocus: qe(t.onCloseAutoFocus, (s) => {
|
|
2574
2530
|
var a;
|
|
2575
2531
|
s.preventDefault(), (a = n.triggerRef.current) == null || a.focus();
|
|
2576
2532
|
}),
|
|
2577
|
-
onPointerDownOutside:
|
|
2533
|
+
onPointerDownOutside: qe(t.onPointerDownOutside, (s) => {
|
|
2578
2534
|
const a = s.detail.originalEvent, d = a.button === 0 && a.ctrlKey === !0;
|
|
2579
2535
|
(a.button === 2 || d) && s.preventDefault();
|
|
2580
2536
|
}),
|
|
2581
|
-
onFocusOutside:
|
|
2537
|
+
onFocusOutside: qe(
|
|
2582
2538
|
t.onFocusOutside,
|
|
2583
2539
|
(s) => s.preventDefault()
|
|
2584
2540
|
)
|
|
2585
2541
|
}
|
|
2586
2542
|
);
|
|
2587
2543
|
}
|
|
2588
|
-
),
|
|
2544
|
+
), Ei = Q.forwardRef(
|
|
2589
2545
|
(t, e) => {
|
|
2590
|
-
const n =
|
|
2546
|
+
const n = fe(Oe, t.__scopeDialog), r = Q.useRef(!1), o = Q.useRef(!1);
|
|
2591
2547
|
return /* @__PURE__ */ i(
|
|
2592
|
-
|
|
2548
|
+
Hn,
|
|
2593
2549
|
{
|
|
2594
2550
|
...t,
|
|
2595
2551
|
ref: e,
|
|
@@ -2608,12 +2564,12 @@ var zi = Q.forwardRef(
|
|
|
2608
2564
|
}
|
|
2609
2565
|
);
|
|
2610
2566
|
}
|
|
2611
|
-
),
|
|
2567
|
+
), Hn = Q.forwardRef(
|
|
2612
2568
|
(t, e) => {
|
|
2613
|
-
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...a } = t, d =
|
|
2614
|
-
return
|
|
2569
|
+
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...a } = t, d = fe(Oe, n), c = Q.useRef(null), m = Lt(e, c);
|
|
2570
|
+
return yr(), /* @__PURE__ */ W(he, { children: [
|
|
2615
2571
|
/* @__PURE__ */ i(
|
|
2616
|
-
|
|
2572
|
+
Ir,
|
|
2617
2573
|
{
|
|
2618
2574
|
asChild: !0,
|
|
2619
2575
|
loop: !0,
|
|
@@ -2621,13 +2577,13 @@ var zi = Q.forwardRef(
|
|
|
2621
2577
|
onMountAutoFocus: o,
|
|
2622
2578
|
onUnmountAutoFocus: s,
|
|
2623
2579
|
children: /* @__PURE__ */ i(
|
|
2624
|
-
|
|
2580
|
+
Tr,
|
|
2625
2581
|
{
|
|
2626
2582
|
role: "dialog",
|
|
2627
2583
|
id: d.contentId,
|
|
2628
2584
|
"aria-describedby": d.descriptionId,
|
|
2629
2585
|
"aria-labelledby": d.titleId,
|
|
2630
|
-
"data-state":
|
|
2586
|
+
"data-state": At(d.open),
|
|
2631
2587
|
...a,
|
|
2632
2588
|
ref: m,
|
|
2633
2589
|
onDismiss: () => d.onOpenChange(!1)
|
|
@@ -2635,50 +2591,50 @@ var zi = Q.forwardRef(
|
|
|
2635
2591
|
)
|
|
2636
2592
|
}
|
|
2637
2593
|
),
|
|
2638
|
-
/* @__PURE__ */ W(
|
|
2639
|
-
/* @__PURE__ */ i(
|
|
2640
|
-
/* @__PURE__ */ i(
|
|
2594
|
+
/* @__PURE__ */ W(he, { children: [
|
|
2595
|
+
/* @__PURE__ */ i(Oi, { titleId: d.titleId }),
|
|
2596
|
+
/* @__PURE__ */ i(zi, { contentRef: c, descriptionId: d.descriptionId })
|
|
2641
2597
|
] })
|
|
2642
2598
|
] });
|
|
2643
2599
|
}
|
|
2644
|
-
),
|
|
2600
|
+
), zt = "DialogTitle", $n = Q.forwardRef(
|
|
2645
2601
|
(t, e) => {
|
|
2646
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2647
|
-
return /* @__PURE__ */ i(
|
|
2602
|
+
const { __scopeDialog: n, ...r } = t, o = fe(zt, n);
|
|
2603
|
+
return /* @__PURE__ */ i(je.h2, { id: o.titleId, ...r, ref: e });
|
|
2648
2604
|
}
|
|
2649
2605
|
);
|
|
2650
|
-
|
|
2651
|
-
var
|
|
2606
|
+
$n.displayName = zt;
|
|
2607
|
+
var Gn = "DialogDescription", Ni = Q.forwardRef(
|
|
2652
2608
|
(t, e) => {
|
|
2653
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2654
|
-
return /* @__PURE__ */ i(
|
|
2609
|
+
const { __scopeDialog: n, ...r } = t, o = fe(Gn, n);
|
|
2610
|
+
return /* @__PURE__ */ i(je.p, { id: o.descriptionId, ...r, ref: e });
|
|
2655
2611
|
}
|
|
2656
2612
|
);
|
|
2657
|
-
|
|
2658
|
-
var
|
|
2613
|
+
Ni.displayName = Gn;
|
|
2614
|
+
var qn = "DialogClose", Un = Q.forwardRef(
|
|
2659
2615
|
(t, e) => {
|
|
2660
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2616
|
+
const { __scopeDialog: n, ...r } = t, o = fe(qn, n);
|
|
2661
2617
|
return /* @__PURE__ */ i(
|
|
2662
|
-
|
|
2618
|
+
je.button,
|
|
2663
2619
|
{
|
|
2664
2620
|
type: "button",
|
|
2665
2621
|
...r,
|
|
2666
2622
|
ref: e,
|
|
2667
|
-
onClick:
|
|
2623
|
+
onClick: qe(t.onClick, () => o.onOpenChange(!1))
|
|
2668
2624
|
}
|
|
2669
2625
|
);
|
|
2670
2626
|
}
|
|
2671
2627
|
);
|
|
2672
|
-
|
|
2673
|
-
function
|
|
2628
|
+
Un.displayName = qn;
|
|
2629
|
+
function At(t) {
|
|
2674
2630
|
return t ? "open" : "closed";
|
|
2675
2631
|
}
|
|
2676
|
-
var
|
|
2677
|
-
contentName:
|
|
2678
|
-
titleName:
|
|
2632
|
+
var Vn = "DialogTitleWarning", [Tc, Bn] = wr(Vn, {
|
|
2633
|
+
contentName: Oe,
|
|
2634
|
+
titleName: zt,
|
|
2679
2635
|
docsSlug: "dialog"
|
|
2680
|
-
}),
|
|
2681
|
-
const e =
|
|
2636
|
+
}), Oi = ({ titleId: t }) => {
|
|
2637
|
+
const e = Bn(Vn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2682
2638
|
|
|
2683
2639
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2684
2640
|
|
|
@@ -2686,15 +2642,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2686
2642
|
return Q.useEffect(() => {
|
|
2687
2643
|
t && (document.getElementById(t) || console.error(n));
|
|
2688
2644
|
}, [n, t]), null;
|
|
2689
|
-
},
|
|
2690
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2645
|
+
}, Di = "DialogDescriptionWarning", zi = ({ contentRef: t, descriptionId: e }) => {
|
|
2646
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Bn(Di).contentName}}.`;
|
|
2691
2647
|
return Q.useEffect(() => {
|
|
2692
2648
|
var s;
|
|
2693
2649
|
const o = (s = t.current) == null ? void 0 : s.getAttribute("aria-describedby");
|
|
2694
2650
|
e && o && (document.getElementById(e) || console.warn(r));
|
|
2695
2651
|
}, [r, t, e]), null;
|
|
2696
|
-
},
|
|
2697
|
-
const
|
|
2652
|
+
}, Ai = zn, Fi = kn, ki = Wn, Wi = Mn, Mi = $n, Hi = Un;
|
|
2653
|
+
const Ee = {
|
|
2698
2654
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2699
2655
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
2700
2656
|
"rp-document-dialog": "_rp-document-dialog_slqo7_13",
|
|
@@ -2702,8 +2658,8 @@ const We = {
|
|
|
2702
2658
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2703
2659
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2704
2660
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2705
|
-
},
|
|
2706
|
-
const { pdfProperties: t } = re(), { container: e } =
|
|
2661
|
+
}, $i = () => {
|
|
2662
|
+
const { pdfProperties: t } = re(), { container: e } = Te(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = Lo(), { localeMessages: o } = de(), s = k(() => {
|
|
2707
2663
|
if (!t)
|
|
2708
2664
|
return [];
|
|
2709
2665
|
const {
|
|
@@ -2731,11 +2687,11 @@ const We = {
|
|
|
2731
2687
|
{ label: o == null ? void 0 : o.propertiesCreatorLabel, value: u },
|
|
2732
2688
|
{
|
|
2733
2689
|
label: o == null ? void 0 : o.propertiesCreateOnLabel,
|
|
2734
|
-
value: C ?
|
|
2690
|
+
value: C ? Gt(C) : ""
|
|
2735
2691
|
},
|
|
2736
2692
|
{
|
|
2737
2693
|
label: o == null ? void 0 : o.propertiesModifiedOnLabel,
|
|
2738
|
-
value: _ ?
|
|
2694
|
+
value: _ ? Gt(_) : ""
|
|
2739
2695
|
},
|
|
2740
2696
|
{ separate: !0 },
|
|
2741
2697
|
{ label: o == null ? void 0 : o.propertiesPDFProducerLabel, value: b },
|
|
@@ -2743,48 +2699,48 @@ const We = {
|
|
|
2743
2699
|
{ label: o == null ? void 0 : o.propertiesPageCountLabel, value: P }
|
|
2744
2700
|
];
|
|
2745
2701
|
}, [t, o]);
|
|
2746
|
-
return /* @__PURE__ */ i(
|
|
2747
|
-
/* @__PURE__ */ i(
|
|
2748
|
-
/* @__PURE__ */ W(
|
|
2749
|
-
/* @__PURE__ */ i(
|
|
2750
|
-
/* @__PURE__ */ i("div", { className:
|
|
2751
|
-
/* @__PURE__ */ i(
|
|
2702
|
+
return /* @__PURE__ */ i(Ai, { open: n, onOpenChange: r, children: /* @__PURE__ */ i(Fi, { container: e, children: /* @__PURE__ */ W("div", { className: Ee["rp-dialog-wrapper"], children: [
|
|
2703
|
+
/* @__PURE__ */ i(ki, { className: Ee["rp-dialog-overlay"] }),
|
|
2704
|
+
/* @__PURE__ */ W(Wi, { className: Ee["rp-document-dialog"], children: [
|
|
2705
|
+
/* @__PURE__ */ i(Mi, { className: Ee["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
|
|
2706
|
+
/* @__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)) }),
|
|
2707
|
+
/* @__PURE__ */ i(Hi, { asChild: !0, className: Ee["rp-dialog-close"], children: /* @__PURE__ */ i(xr, {}) })
|
|
2752
2708
|
] })
|
|
2753
2709
|
] }) }) });
|
|
2754
|
-
},
|
|
2710
|
+
}, Gi = {
|
|
2755
2711
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2756
|
-
},
|
|
2712
|
+
}, an = ".pdf", qi = (t) => URL.createObjectURL(t), Ui = async (t) => {
|
|
2757
2713
|
const n = await (await fetch(t)).blob();
|
|
2758
|
-
return
|
|
2759
|
-
},
|
|
2760
|
-
const { filename: t, pdfSrc: e } = re(), { downloadFilename: n } =
|
|
2714
|
+
return qi(n);
|
|
2715
|
+
}, Zn = () => {
|
|
2716
|
+
const { filename: t, pdfSrc: e } = re(), { downloadFilename: n } = Io(), r = (s) => {
|
|
2761
2717
|
const a = n || s;
|
|
2762
|
-
return a.endsWith(
|
|
2718
|
+
return a.endsWith(an) ? a : `${a}${an}`;
|
|
2763
2719
|
};
|
|
2764
2720
|
return { download: N(async () => {
|
|
2765
2721
|
if (!t || !e)
|
|
2766
2722
|
throw new Error("There is no PDF source to download");
|
|
2767
2723
|
const s = document.createElement("a");
|
|
2768
|
-
s.href = await
|
|
2724
|
+
s.href = await Ui(e), s.download = r(t), document.body.appendChild(s), s.click(), document.body.removeChild(s);
|
|
2769
2725
|
}, [t, e]) };
|
|
2770
|
-
},
|
|
2771
|
-
const { downloadIcon: t } =
|
|
2772
|
-
return t || e || /* @__PURE__ */ i(
|
|
2773
|
-
},
|
|
2774
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2726
|
+
}, jn = () => {
|
|
2727
|
+
const { downloadIcon: t } = ge(), { downloadIcon: e } = me();
|
|
2728
|
+
return t || e || /* @__PURE__ */ i(Or, {});
|
|
2729
|
+
}, Kn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Vi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Kn, { localeMessages: e, children: /* @__PURE__ */ i(ce, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(jn, {}) }) }), Bi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(ye, { onClick: t, children: /* @__PURE__ */ W(Kn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2730
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(jn, {}) }),
|
|
2775
2731
|
e == null ? void 0 : e.downloadFileLabel
|
|
2776
|
-
] }) }),
|
|
2777
|
-
const { download: t } =
|
|
2778
|
-
return !e || !n ? null : r ? /* @__PURE__ */ i(
|
|
2779
|
-
},
|
|
2780
|
-
const { printIcon: t } =
|
|
2781
|
-
return t || e || /* @__PURE__ */ i(
|
|
2782
|
-
},
|
|
2783
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2732
|
+
] }) }), Xn = () => {
|
|
2733
|
+
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;
|
|
2734
|
+
return !e || !n ? null : r ? /* @__PURE__ */ i(Bi, { 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(Vi, { download: t, localeMessages: o });
|
|
2735
|
+
}, Qn = () => {
|
|
2736
|
+
const { printIcon: t } = ge(), { printIcon: e } = me();
|
|
2737
|
+
return t || e || /* @__PURE__ */ i(Dr, {});
|
|
2738
|
+
}, Yn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Zi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Yn, { localeMessages: e, children: /* @__PURE__ */ i(ce, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Qn, {}) }) }), ji = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(ye, { onClick: t, children: /* @__PURE__ */ W(Yn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2739
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Qn, {}) }),
|
|
2784
2740
|
e == null ? void 0 : e.printLabel
|
|
2785
|
-
] }) }),
|
|
2786
|
-
const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: s, showDefaultProgress: a } =
|
|
2787
|
-
return !d || !c ? null : m ? /* @__PURE__ */ i(
|
|
2741
|
+
] }) }), Jn = () => {
|
|
2742
|
+
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;
|
|
2743
|
+
return !d || !c ? null : m ? /* @__PURE__ */ i(ji, { print: t, localeMessages: g }) : typeof d == "function" ? /* @__PURE__ */ i(K, { content: C, children: /* @__PURE__ */ i(
|
|
2788
2744
|
d,
|
|
2789
2745
|
{
|
|
2790
2746
|
print: t,
|
|
@@ -2806,34 +2762,34 @@ const We = {
|
|
|
2806
2762
|
progress: s,
|
|
2807
2763
|
showDefaultProgress: a
|
|
2808
2764
|
}
|
|
2809
|
-
) }) : /* @__PURE__ */ i(
|
|
2810
|
-
},
|
|
2765
|
+
) }) : /* @__PURE__ */ i(Zi, { print: t, localeMessages: g });
|
|
2766
|
+
}, Ki = {
|
|
2811
2767
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2812
|
-
},
|
|
2813
|
-
const { goToFirstPageIcon: t } =
|
|
2814
|
-
return t || e || /* @__PURE__ */ i(
|
|
2815
|
-
},
|
|
2816
|
-
const { goToLastPageIcon: t } =
|
|
2817
|
-
return t || e || /* @__PURE__ */ i(
|
|
2818
|
-
},
|
|
2819
|
-
const { goToPage: t, totalPages: e, focusedPage: n } =
|
|
2768
|
+
}, Xi = () => {
|
|
2769
|
+
const { goToFirstPageIcon: t } = ge(), { goToFirstPageIcon: e } = me();
|
|
2770
|
+
return t || e || /* @__PURE__ */ i(_n, { className: Ki["rp-go-to-Top"] });
|
|
2771
|
+
}, Qi = () => {
|
|
2772
|
+
const { goToLastPageIcon: t } = ge(), { goToLastPageIcon: e } = me();
|
|
2773
|
+
return t || e || /* @__PURE__ */ i(_n, {});
|
|
2774
|
+
}, cn = { width: "100%" }, Yi = () => {
|
|
2775
|
+
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(() => {
|
|
2820
2776
|
t(1);
|
|
2821
2777
|
}, [t]), m = N(() => {
|
|
2822
2778
|
t(e);
|
|
2823
2779
|
}, [t, e]);
|
|
2824
|
-
return !r || !o ? null : /* @__PURE__ */ W(
|
|
2825
|
-
/* @__PURE__ */ i(
|
|
2826
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2780
|
+
return !r || !o ? null : /* @__PURE__ */ W(Je, { children: [
|
|
2781
|
+
/* @__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: [
|
|
2782
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Xi, {}) }),
|
|
2827
2783
|
/* @__PURE__ */ i("span", { children: s == null ? void 0 : s.firstPageLabel })
|
|
2828
2784
|
] }) }) }),
|
|
2829
|
-
/* @__PURE__ */ i(
|
|
2830
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2785
|
+
/* @__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: [
|
|
2786
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Qi, {}) }),
|
|
2831
2787
|
/* @__PURE__ */ i("span", { children: s == null ? void 0 : s.lastPageLabel })
|
|
2832
2788
|
] }) }) }),
|
|
2833
|
-
/* @__PURE__ */ i(
|
|
2789
|
+
/* @__PURE__ */ i(St, {})
|
|
2834
2790
|
] });
|
|
2835
|
-
},
|
|
2836
|
-
const [t, e] = $(!1), { container: n, pagesRef: r } =
|
|
2791
|
+
}, Ji = () => {
|
|
2792
|
+
const [t, e] = $(!1), { container: n, pagesRef: r } = Te(), { isSmallScreen: o } = Se(), {
|
|
2837
2793
|
openFileTool: s,
|
|
2838
2794
|
downloadTool: a,
|
|
2839
2795
|
documentProperties: d,
|
|
@@ -2844,7 +2800,7 @@ const We = {
|
|
|
2844
2800
|
printTool: u,
|
|
2845
2801
|
fullscreenTool: y,
|
|
2846
2802
|
viewModeTool: _
|
|
2847
|
-
} =
|
|
2803
|
+
} = Ce(), {
|
|
2848
2804
|
openFileTool: b,
|
|
2849
2805
|
downloadTool: T,
|
|
2850
2806
|
documentProperties: P,
|
|
@@ -2855,11 +2811,11 @@ const We = {
|
|
|
2855
2811
|
printTool: v,
|
|
2856
2812
|
fullscreenTool: w,
|
|
2857
2813
|
viewModeTool: I
|
|
2858
|
-
} =
|
|
2814
|
+
} = Ie(), { localeMessages: x } = de(), [S, L] = $(0), O = M(
|
|
2859
2815
|
new ResizeObserver((E) => {
|
|
2860
2816
|
L(E[0].contentRect.height);
|
|
2861
2817
|
})
|
|
2862
|
-
),
|
|
2818
|
+
), D = k(() => C || m || g || c || d || _ || o && (s || a || u || y), [
|
|
2863
2819
|
s,
|
|
2864
2820
|
a,
|
|
2865
2821
|
u,
|
|
@@ -2882,137 +2838,137 @@ const We = {
|
|
|
2882
2838
|
l,
|
|
2883
2839
|
o
|
|
2884
2840
|
]);
|
|
2885
|
-
return
|
|
2841
|
+
return z(() => (r && O.current.observe(r), () => {
|
|
2886
2842
|
O.current.disconnect();
|
|
2887
|
-
}), [r]), !
|
|
2843
|
+
}), [r]), !D || !F ? null : /* @__PURE__ */ W(he, { children: [
|
|
2888
2844
|
/* @__PURE__ */ i(
|
|
2889
|
-
|
|
2845
|
+
It,
|
|
2890
2846
|
{
|
|
2891
2847
|
container: n,
|
|
2892
2848
|
onOpenChange: e,
|
|
2893
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content:
|
|
2849
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: x == null ? void 0 : x.moreOptionTooltip, children: /* @__PURE__ */ i(ce, { active: t, "aria-label": x == null ? void 0 : x.moreOptionTooltip, children: /* @__PURE__ */ i(gr, {}) }) }) }),
|
|
2894
2850
|
side: "bottom",
|
|
2895
2851
|
avoidCollisions: !1,
|
|
2896
2852
|
children: /* @__PURE__ */ W(
|
|
2897
2853
|
"div",
|
|
2898
2854
|
{
|
|
2899
|
-
style: { maxHeight: `${
|
|
2900
|
-
className:
|
|
2855
|
+
style: { maxHeight: `${S}px`, overflow: "auto" },
|
|
2856
|
+
className: Gi["rp-other-tool-content"],
|
|
2901
2857
|
"data-rp": "moreOptionsDropdown",
|
|
2902
2858
|
children: [
|
|
2903
|
-
o && /* @__PURE__ */ W(
|
|
2904
|
-
/* @__PURE__ */ i(
|
|
2905
|
-
/* @__PURE__ */ i(
|
|
2906
|
-
/* @__PURE__ */ i(
|
|
2907
|
-
/* @__PURE__ */ i(
|
|
2908
|
-
/* @__PURE__ */ i(
|
|
2859
|
+
o && /* @__PURE__ */ W(Je, { children: [
|
|
2860
|
+
/* @__PURE__ */ i(vn, {}),
|
|
2861
|
+
/* @__PURE__ */ i(Xn, {}),
|
|
2862
|
+
/* @__PURE__ */ i(Jn, {}),
|
|
2863
|
+
/* @__PURE__ */ i(wn, {}),
|
|
2864
|
+
/* @__PURE__ */ i(St, {})
|
|
2909
2865
|
] }),
|
|
2910
|
-
/* @__PURE__ */ i(
|
|
2866
|
+
/* @__PURE__ */ i(Yi, {}),
|
|
2867
|
+
/* @__PURE__ */ i(Lr, {}),
|
|
2911
2868
|
/* @__PURE__ */ i(zr, {}),
|
|
2912
|
-
/* @__PURE__ */ i(
|
|
2913
|
-
/* @__PURE__ */ i(
|
|
2914
|
-
/* @__PURE__ */ i(
|
|
2915
|
-
/* @__PURE__ */ i(Dr, {})
|
|
2869
|
+
/* @__PURE__ */ i(Er, {}),
|
|
2870
|
+
/* @__PURE__ */ i(Nr, {}),
|
|
2871
|
+
/* @__PURE__ */ i(Rr, {})
|
|
2916
2872
|
]
|
|
2917
2873
|
}
|
|
2918
2874
|
)
|
|
2919
2875
|
}
|
|
2920
2876
|
),
|
|
2921
|
-
/* @__PURE__ */ i(
|
|
2877
|
+
/* @__PURE__ */ i($i, {})
|
|
2922
2878
|
] });
|
|
2923
|
-
},
|
|
2924
|
-
const { isSmallScreen: t } =
|
|
2925
|
-
return /* @__PURE__ */ W(
|
|
2926
|
-
/* @__PURE__ */ i(
|
|
2927
|
-
!t && /* @__PURE__ */ W(
|
|
2928
|
-
/* @__PURE__ */ i(
|
|
2929
|
-
/* @__PURE__ */ i(
|
|
2930
|
-
/* @__PURE__ */ i(
|
|
2931
|
-
/* @__PURE__ */ i(
|
|
2879
|
+
}, es = () => {
|
|
2880
|
+
const { isSmallScreen: t } = Se();
|
|
2881
|
+
return /* @__PURE__ */ W(he, { children: [
|
|
2882
|
+
/* @__PURE__ */ i(mr, {}),
|
|
2883
|
+
!t && /* @__PURE__ */ W(he, { children: [
|
|
2884
|
+
/* @__PURE__ */ i(vn, {}),
|
|
2885
|
+
/* @__PURE__ */ i(Xn, {}),
|
|
2886
|
+
/* @__PURE__ */ i(Jn, {}),
|
|
2887
|
+
/* @__PURE__ */ i(wn, {})
|
|
2932
2888
|
] }),
|
|
2933
|
-
/* @__PURE__ */ i(
|
|
2889
|
+
/* @__PURE__ */ i(Ji, {})
|
|
2934
2890
|
] });
|
|
2935
|
-
},
|
|
2891
|
+
}, ts = "_active_1yldl_11", Ae = {
|
|
2936
2892
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_1yldl_1",
|
|
2937
2893
|
"rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_1yldl_6",
|
|
2938
|
-
active:
|
|
2894
|
+
active: ts,
|
|
2939
2895
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_1yldl_15",
|
|
2940
2896
|
"rp-zoom-level-icon": "_rp-zoom-level-icon_1yldl_20",
|
|
2941
2897
|
"rp-current-zoom-text": "_rp-current-zoom-text_1yldl_24",
|
|
2942
2898
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_1yldl_28"
|
|
2943
|
-
},
|
|
2944
|
-
const { localeMessages: n } =
|
|
2899
|
+
}, ns = ({ zoomLevel: t, className: e }) => {
|
|
2900
|
+
const { localeMessages: n } = de(), r = k(() => {
|
|
2945
2901
|
switch (t) {
|
|
2946
|
-
case
|
|
2902
|
+
case We.ACTUAL:
|
|
2947
2903
|
return n == null ? void 0 : n.zoomActualSize;
|
|
2948
|
-
case
|
|
2904
|
+
case We.PAGE_FIT:
|
|
2949
2905
|
return n == null ? void 0 : n.zoomPageFit;
|
|
2950
|
-
case
|
|
2906
|
+
case We.PAGE_WIDTH:
|
|
2951
2907
|
return n == null ? void 0 : n.zoomPageWidth;
|
|
2952
2908
|
}
|
|
2953
2909
|
return t.toString();
|
|
2954
2910
|
}, [t, n]);
|
|
2955
|
-
return /* @__PURE__ */ i(
|
|
2911
|
+
return /* @__PURE__ */ i(he, { children: typeof t == "number" ? /* @__PURE__ */ W(uo, { children: [
|
|
2956
2912
|
/* @__PURE__ */ i("span", { className: e, children: t }),
|
|
2957
2913
|
/* @__PURE__ */ i("span", { className: e, children: "%" })
|
|
2958
2914
|
] }) : /* @__PURE__ */ i("span", { className: e, children: r }) });
|
|
2959
|
-
},
|
|
2960
|
-
const { zoomInIcon: t } =
|
|
2961
|
-
return t || e || /* @__PURE__ */ i(
|
|
2962
|
-
},
|
|
2963
|
-
const { zoomOutIcon: t } =
|
|
2964
|
-
return t || e || /* @__PURE__ */ i(
|
|
2965
|
-
},
|
|
2966
|
-
const { zoomLevel: t, setZoomLevel: e, currentZoom: n } =
|
|
2915
|
+
}, os = [50, 75, 100, 125, 150, 200, 300, 400], rs = () => {
|
|
2916
|
+
const { zoomInIcon: t } = ge(), { zoomInIcon: e } = me();
|
|
2917
|
+
return t || e || /* @__PURE__ */ i(Ar, {});
|
|
2918
|
+
}, is = () => {
|
|
2919
|
+
const { zoomOutIcon: t } = ge(), { zoomOutIcon: e } = me();
|
|
2920
|
+
return t || e || /* @__PURE__ */ i(Fr, {});
|
|
2921
|
+
}, ss = () => {
|
|
2922
|
+
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(
|
|
2967
2923
|
new ResizeObserver((p) => {
|
|
2968
2924
|
g(p[0].contentRect.height);
|
|
2969
2925
|
})
|
|
2970
2926
|
), _ = N(() => {
|
|
2971
2927
|
e(() => {
|
|
2972
2928
|
const p = Math.floor(n * 100 / 25) * 25;
|
|
2973
|
-
return Math.min(p + 25,
|
|
2929
|
+
return Math.min(p + 25, qt);
|
|
2974
2930
|
});
|
|
2975
2931
|
}, [e, n]), b = N(() => {
|
|
2976
2932
|
e(() => {
|
|
2977
2933
|
const p = Math.ceil(n * 100 / 25) * 25;
|
|
2978
|
-
return Math.min(p - 25,
|
|
2934
|
+
return Math.min(p - 25, qt);
|
|
2979
2935
|
});
|
|
2980
|
-
}, [e, n]), T = k(() =>
|
|
2981
|
-
return
|
|
2936
|
+
}, [e, n]), T = k(() => kr(n), [n]), P = k(() => Wr(n), [n]);
|
|
2937
|
+
return z(() => (o && y.current.observe(o), () => {
|
|
2982
2938
|
y.current.disconnect();
|
|
2983
|
-
}), [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:
|
|
2939
|
+
}), [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: [
|
|
2984
2940
|
/* @__PURE__ */ i(K, { content: c == null ? void 0 : c.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2985
|
-
|
|
2941
|
+
ce,
|
|
2986
2942
|
{
|
|
2987
2943
|
disabled: T,
|
|
2988
2944
|
onClick: b,
|
|
2989
2945
|
"aria-label": c == null ? void 0 : c.zoomOutTooltip,
|
|
2990
|
-
children: /* @__PURE__ */ i(
|
|
2946
|
+
children: /* @__PURE__ */ i(is, {})
|
|
2991
2947
|
}
|
|
2992
2948
|
) }),
|
|
2993
2949
|
!d && /* @__PURE__ */ i(
|
|
2994
|
-
|
|
2950
|
+
It,
|
|
2995
2951
|
{
|
|
2996
2952
|
container: r,
|
|
2997
2953
|
open: C,
|
|
2998
2954
|
onOpenChange: u,
|
|
2999
2955
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.zoomSelectTooltip, children: /* @__PURE__ */ W(
|
|
3000
|
-
|
|
2956
|
+
ce,
|
|
3001
2957
|
{
|
|
3002
|
-
className:
|
|
3003
|
-
|
|
3004
|
-
C &&
|
|
2958
|
+
className: se(
|
|
2959
|
+
Ae["rp-current-zoom-wrapper"],
|
|
2960
|
+
C && Ae.active
|
|
3005
2961
|
),
|
|
3006
2962
|
"aria-label": c == null ? void 0 : c.zoomSelectTooltip,
|
|
3007
2963
|
children: [
|
|
3008
2964
|
/* @__PURE__ */ i(
|
|
3009
|
-
|
|
2965
|
+
ns,
|
|
3010
2966
|
{
|
|
3011
2967
|
zoomLevel: t,
|
|
3012
|
-
className:
|
|
2968
|
+
className: Ae["rp-current-zoom-text"]
|
|
3013
2969
|
}
|
|
3014
2970
|
),
|
|
3015
|
-
/* @__PURE__ */ i(
|
|
2971
|
+
/* @__PURE__ */ i(Ue, { className: Ae["rp-current-zoom-icon"] })
|
|
3016
2972
|
]
|
|
3017
2973
|
}
|
|
3018
2974
|
) }) }),
|
|
@@ -3024,15 +2980,15 @@ const We = {
|
|
|
3024
2980
|
"div",
|
|
3025
2981
|
{
|
|
3026
2982
|
style: { maxHeight: `${m}px`, overflow: "auto" },
|
|
3027
|
-
className:
|
|
2983
|
+
className: Ae["rp-zoom-dropdown-content"],
|
|
3028
2984
|
children: [
|
|
3029
|
-
/* @__PURE__ */ W(
|
|
3030
|
-
/* @__PURE__ */ i(
|
|
3031
|
-
/* @__PURE__ */ i(
|
|
3032
|
-
/* @__PURE__ */ i(
|
|
2985
|
+
/* @__PURE__ */ W(Je, { children: [
|
|
2986
|
+
/* @__PURE__ */ i(ye, { onClick: () => e(We.ACTUAL), children: c == null ? void 0 : c.zoomActualSize }),
|
|
2987
|
+
/* @__PURE__ */ i(ye, { onClick: () => e(We.PAGE_FIT), children: c == null ? void 0 : c.zoomPageFit }),
|
|
2988
|
+
/* @__PURE__ */ i(ye, { onClick: () => e(We.PAGE_WIDTH), children: c == null ? void 0 : c.zoomPageWidth })
|
|
3033
2989
|
] }),
|
|
3034
|
-
/* @__PURE__ */ i(
|
|
3035
|
-
/* @__PURE__ */ i(
|
|
2990
|
+
/* @__PURE__ */ i(St, {}),
|
|
2991
|
+
/* @__PURE__ */ i(Je, { children: os.map((p) => /* @__PURE__ */ W(ye, { onClick: () => e(p), children: [
|
|
3036
2992
|
p,
|
|
3037
2993
|
" %"
|
|
3038
2994
|
] }, p)) })
|
|
@@ -3042,25 +2998,25 @@ const We = {
|
|
|
3042
2998
|
}
|
|
3043
2999
|
),
|
|
3044
3000
|
/* @__PURE__ */ i(K, { content: c == null ? void 0 : c.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
3045
|
-
|
|
3001
|
+
ce,
|
|
3046
3002
|
{
|
|
3047
3003
|
disabled: P,
|
|
3048
3004
|
onClick: _,
|
|
3049
3005
|
"aria-label": c == null ? void 0 : c.zoomInTooltip,
|
|
3050
|
-
children: /* @__PURE__ */ i(
|
|
3006
|
+
children: /* @__PURE__ */ i(rs, {})
|
|
3051
3007
|
}
|
|
3052
3008
|
) })
|
|
3053
3009
|
] });
|
|
3054
|
-
},
|
|
3055
|
-
const { totalMatches: t, nextMatch: e, prevMatch: n } =
|
|
3056
|
-
return /* @__PURE__ */ W(
|
|
3010
|
+
}, ln = () => {
|
|
3011
|
+
const { totalMatches: t, nextMatch: e, prevMatch: n } = Nt(), { localeMessages: r } = de();
|
|
3012
|
+
return /* @__PURE__ */ W(he, { children: [
|
|
3057
3013
|
/* @__PURE__ */ i(
|
|
3058
3014
|
K,
|
|
3059
3015
|
{
|
|
3060
3016
|
content: r == null ? void 0 : r.searchPrevTooltip,
|
|
3061
3017
|
className: ne["rp-search-tool-result-navigator"],
|
|
3062
|
-
children: /* @__PURE__ */ i(
|
|
3063
|
-
|
|
3018
|
+
children: /* @__PURE__ */ i(ce, { tabIndex: 0, onClick: n, "aria-label": r == null ? void 0 : r.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
3019
|
+
Ue,
|
|
3064
3020
|
{
|
|
3065
3021
|
className: ne["rp-search-tool-input-icon"],
|
|
3066
3022
|
"aria-disabled": !t
|
|
@@ -3073,8 +3029,8 @@ const We = {
|
|
|
3073
3029
|
{
|
|
3074
3030
|
content: r == null ? void 0 : r.searchNextTooltip,
|
|
3075
3031
|
className: ne["rp-search-tool-result-navigator"],
|
|
3076
|
-
children: /* @__PURE__ */ i(
|
|
3077
|
-
|
|
3032
|
+
children: /* @__PURE__ */ i(ce, { tabIndex: 0, onClick: e, "aria-label": r == null ? void 0 : r.searchNextTooltip, children: /* @__PURE__ */ i(
|
|
3033
|
+
Ue,
|
|
3078
3034
|
{
|
|
3079
3035
|
style: { transform: "rotate(180deg" },
|
|
3080
3036
|
className: ne["rp-search-tool-input-icon"],
|
|
@@ -3084,11 +3040,11 @@ const We = {
|
|
|
3084
3040
|
}
|
|
3085
3041
|
)
|
|
3086
3042
|
] });
|
|
3087
|
-
},
|
|
3088
|
-
const { searchIcon: t } =
|
|
3089
|
-
return t || e || /* @__PURE__ */ i(
|
|
3090
|
-
},
|
|
3091
|
-
const { container: e } =
|
|
3043
|
+
}, as = () => {
|
|
3044
|
+
const { searchIcon: t } = ge(), { searchIcon: e } = me();
|
|
3045
|
+
return t || e || /* @__PURE__ */ i(bn, {});
|
|
3046
|
+
}, cs = ({ icon: t }) => {
|
|
3047
|
+
const { container: e } = Te(), [n, r] = $(!1), { pdf: o } = re(), [s, a] = $(null), {
|
|
3092
3048
|
searchOptions: d,
|
|
3093
3049
|
setSearchOptions: c,
|
|
3094
3050
|
loading: m,
|
|
@@ -3098,14 +3054,14 @@ const We = {
|
|
|
3098
3054
|
nextMatch: y,
|
|
3099
3055
|
prevMatch: _,
|
|
3100
3056
|
search: b
|
|
3101
|
-
} =
|
|
3057
|
+
} = 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(() => {
|
|
3102
3058
|
r(!0);
|
|
3103
3059
|
}, []), L = N(() => {
|
|
3104
3060
|
g(""), h(""), r(!1);
|
|
3105
3061
|
}, [g]), O = (q) => {
|
|
3106
|
-
const
|
|
3107
|
-
(
|
|
3108
|
-
},
|
|
3062
|
+
const Z = q.key === "Enter", Y = q.key === " ";
|
|
3063
|
+
(Z || Y) && L();
|
|
3064
|
+
}, D = N(
|
|
3109
3065
|
(q) => {
|
|
3110
3066
|
q.key === "Escape" && n && L();
|
|
3111
3067
|
},
|
|
@@ -3116,15 +3072,15 @@ const We = {
|
|
|
3116
3072
|
},
|
|
3117
3073
|
[p, _, y, g, b]
|
|
3118
3074
|
);
|
|
3119
|
-
|
|
3075
|
+
z(() => {
|
|
3120
3076
|
h(b);
|
|
3121
|
-
}, [b]),
|
|
3122
|
-
b && o &&
|
|
3123
|
-
}, [b, o]),
|
|
3077
|
+
}, [b]), z(() => {
|
|
3078
|
+
b && o && x(!0);
|
|
3079
|
+
}, [b, o]), z(() => {
|
|
3124
3080
|
b && b.trim() !== "" && (h(b), g(b));
|
|
3125
|
-
}, []),
|
|
3126
|
-
window.removeEventListener("keydown",
|
|
3127
|
-
}), [
|
|
3081
|
+
}, []), z(() => (window.addEventListener("keydown", D), () => {
|
|
3082
|
+
window.removeEventListener("keydown", D);
|
|
3083
|
+
}), [D]), z(() => {
|
|
3128
3084
|
s && setTimeout(() => {
|
|
3129
3085
|
s.focus();
|
|
3130
3086
|
}, 0);
|
|
@@ -3133,46 +3089,46 @@ const We = {
|
|
|
3133
3089
|
h(q.target.value);
|
|
3134
3090
|
}, []), R = N(() => {
|
|
3135
3091
|
h(""), g("");
|
|
3136
|
-
}, [g]), A = k(() => `${u} / ${C}`, [u, C]), { wholeWords: G, matchCase: H } = k(() => d, [d]),
|
|
3092
|
+
}, [g]), A = k(() => `${u} / ${C}`, [u, C]), { wholeWords: G, matchCase: H } = k(() => d, [d]), U = N(
|
|
3137
3093
|
(q) => {
|
|
3138
|
-
c((
|
|
3094
|
+
c((Z) => ({ ...Z, matchCase: q }));
|
|
3139
3095
|
},
|
|
3140
3096
|
[c]
|
|
3141
3097
|
), X = N(
|
|
3142
3098
|
(q) => {
|
|
3143
|
-
c((
|
|
3099
|
+
c((Z) => ({ ...Z, wholeWords: q }));
|
|
3144
3100
|
},
|
|
3145
3101
|
[c]
|
|
3146
3102
|
);
|
|
3147
|
-
|
|
3103
|
+
z(() => {
|
|
3148
3104
|
o && I && L();
|
|
3149
3105
|
}, [o, L]);
|
|
3150
|
-
const
|
|
3106
|
+
const V = k(() => (v == null ? void 0 : v.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [v]), ie = N(
|
|
3151
3107
|
(q) => {
|
|
3152
3108
|
if (q.key === "Tab") {
|
|
3153
|
-
const
|
|
3109
|
+
const Z = document.activeElement;
|
|
3154
3110
|
let Y = 0;
|
|
3155
|
-
|
|
3156
|
-
ee ===
|
|
3111
|
+
V.forEach((ee, ve) => {
|
|
3112
|
+
ee === Z && (Y = ve);
|
|
3157
3113
|
});
|
|
3158
3114
|
let te = Y + 1;
|
|
3159
3115
|
q.shiftKey && (te = Y - 1);
|
|
3160
|
-
const J =
|
|
3116
|
+
const J = V[te];
|
|
3161
3117
|
if (J)
|
|
3162
3118
|
J.focus();
|
|
3163
|
-
else if (te >
|
|
3164
|
-
const ee =
|
|
3119
|
+
else if (te > V.length - 1) {
|
|
3120
|
+
const ee = V[0];
|
|
3165
3121
|
ee && ee.focus();
|
|
3166
3122
|
} else {
|
|
3167
|
-
const ee =
|
|
3123
|
+
const ee = V[V.length - 1];
|
|
3168
3124
|
ee && ee.focus();
|
|
3169
3125
|
}
|
|
3170
3126
|
}
|
|
3171
3127
|
},
|
|
3172
|
-
[
|
|
3128
|
+
[V]
|
|
3173
3129
|
);
|
|
3174
|
-
return !T || !P ? null : /* @__PURE__ */ i(
|
|
3175
|
-
|
|
3130
|
+
return !T || !P ? null : /* @__PURE__ */ i(he, { children: /* @__PURE__ */ i(
|
|
3131
|
+
It,
|
|
3176
3132
|
{
|
|
3177
3133
|
open: n,
|
|
3178
3134
|
container: e,
|
|
@@ -3181,12 +3137,12 @@ const We = {
|
|
|
3181
3137
|
tabIndex: 0,
|
|
3182
3138
|
avoidCollisions: !1,
|
|
3183
3139
|
triggerComponent: /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(
|
|
3184
|
-
|
|
3140
|
+
ce,
|
|
3185
3141
|
{
|
|
3186
3142
|
active: n,
|
|
3187
|
-
onClick:
|
|
3143
|
+
onClick: S,
|
|
3188
3144
|
"aria-label": f == null ? void 0 : f.searchButtonTooltip,
|
|
3189
|
-
children: t || /* @__PURE__ */ i(
|
|
3145
|
+
children: t || /* @__PURE__ */ i(as, {})
|
|
3190
3146
|
}
|
|
3191
3147
|
) }),
|
|
3192
3148
|
children: /* @__PURE__ */ W(
|
|
@@ -3195,44 +3151,44 @@ const We = {
|
|
|
3195
3151
|
ref: w,
|
|
3196
3152
|
className: ne["rp-search-tool-content"],
|
|
3197
3153
|
tabIndex: 0,
|
|
3198
|
-
onKeyDown:
|
|
3154
|
+
onKeyDown: ie,
|
|
3199
3155
|
children: [
|
|
3200
3156
|
/* @__PURE__ */ W("div", { className: ne["rp-search-tool-input-wrapper"], children: [
|
|
3201
3157
|
/* @__PURE__ */ W("div", { className: ne["rp-search-tool-input"], children: [
|
|
3202
3158
|
/* @__PURE__ */ i(K, { content: f == null ? void 0 : f.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
3203
|
-
|
|
3159
|
+
hn,
|
|
3204
3160
|
{
|
|
3205
3161
|
value: p,
|
|
3206
3162
|
onKeyDown: F,
|
|
3207
3163
|
onChange: E,
|
|
3208
|
-
icon: /* @__PURE__ */ i(
|
|
3164
|
+
icon: /* @__PURE__ */ i(bn, {}),
|
|
3209
3165
|
placeholder: f == null ? void 0 : f.searchInputPlaceholder,
|
|
3210
3166
|
className: ne["rp-search-input"],
|
|
3211
3167
|
ref: a,
|
|
3212
3168
|
id: "search-input",
|
|
3213
3169
|
name: "search-input",
|
|
3214
3170
|
tabIndex: 0,
|
|
3215
|
-
children: !!p && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: R, children: /* @__PURE__ */ i(
|
|
3171
|
+
children: !!p && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: R, children: /* @__PURE__ */ i(Mr, {}) })
|
|
3216
3172
|
}
|
|
3217
3173
|
) }),
|
|
3218
|
-
m ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
3219
|
-
l && /* @__PURE__ */ i("div", { className: ne["rp-search-tool-controls"], children: /* @__PURE__ */ i(
|
|
3174
|
+
m ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(gn, { className: ne["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: A }),
|
|
3175
|
+
l && /* @__PURE__ */ i("div", { className: ne["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: O, handleClose: L }) })
|
|
3220
3176
|
] }),
|
|
3221
3177
|
/* @__PURE__ */ W("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
|
|
3222
|
-
l && /* @__PURE__ */ i(
|
|
3178
|
+
l && /* @__PURE__ */ i(ln, {}),
|
|
3223
3179
|
/* @__PURE__ */ i(
|
|
3224
|
-
|
|
3180
|
+
$t,
|
|
3225
3181
|
{
|
|
3226
3182
|
tabIndex: 0,
|
|
3227
3183
|
name: "matchCase",
|
|
3228
3184
|
value: H,
|
|
3229
|
-
onChange:
|
|
3185
|
+
onChange: U,
|
|
3230
3186
|
children: f == null ? void 0 : f.searchMatchCaseLabel
|
|
3231
3187
|
}
|
|
3232
3188
|
),
|
|
3233
|
-
!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(
|
|
3189
|
+
!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, {}) }) }),
|
|
3234
3190
|
/* @__PURE__ */ i(
|
|
3235
|
-
|
|
3191
|
+
$t,
|
|
3236
3192
|
{
|
|
3237
3193
|
tabIndex: 0,
|
|
3238
3194
|
name: "wholeWord",
|
|
@@ -3241,79 +3197,79 @@ const We = {
|
|
|
3241
3197
|
children: f == null ? void 0 : f.searchWholeWordsLabel
|
|
3242
3198
|
}
|
|
3243
3199
|
),
|
|
3244
|
-
!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(
|
|
3200
|
+
!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, {}) }) })
|
|
3245
3201
|
] })
|
|
3246
3202
|
] }),
|
|
3247
3203
|
!l && /* @__PURE__ */ W("div", { className: ne["rp-search-tool-controls"], children: [
|
|
3248
|
-
/* @__PURE__ */ i(
|
|
3249
|
-
/* @__PURE__ */ i(
|
|
3204
|
+
/* @__PURE__ */ i(ln, {}),
|
|
3205
|
+
/* @__PURE__ */ i(Ht, { onKeyPress: O, handleClose: L })
|
|
3250
3206
|
] })
|
|
3251
3207
|
]
|
|
3252
3208
|
}
|
|
3253
3209
|
)
|
|
3254
3210
|
}
|
|
3255
3211
|
) });
|
|
3256
|
-
},
|
|
3212
|
+
}, ls = "_loading_wazy2_1", Fe = {
|
|
3257
3213
|
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
|
|
3258
3214
|
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
|
|
3259
3215
|
"rp-loading-title": "_rp-loading-title_wazy2_27",
|
|
3260
3216
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
|
|
3261
3217
|
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
|
|
3262
3218
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
|
|
3263
|
-
loading:
|
|
3264
|
-
},
|
|
3265
|
-
const { cancel: e } =
|
|
3266
|
-
return t < 1 ? null : /* @__PURE__ */ i("div", { className:
|
|
3267
|
-
/* @__PURE__ */ W("div", { className:
|
|
3219
|
+
loading: ls
|
|
3220
|
+
}, ds = ({ percentage: t }) => {
|
|
3221
|
+
const { cancel: e } = it(), { localeMessages: n } = de();
|
|
3222
|
+
return t < 1 ? null : /* @__PURE__ */ i("div", { className: se(Fe["rp-loading-overlay"]), children: /* @__PURE__ */ W("div", { className: se(Fe["rp-loading-modal"]), children: [
|
|
3223
|
+
/* @__PURE__ */ W("div", { className: se(Fe["rp-loading-title"]), children: [
|
|
3268
3224
|
n == null ? void 0 : n.printLoadingMessage,
|
|
3269
3225
|
"..."
|
|
3270
3226
|
] }),
|
|
3271
|
-
/* @__PURE__ */ i("div", { className:
|
|
3227
|
+
/* @__PURE__ */ i("div", { className: se(Fe["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
|
|
3272
3228
|
"div",
|
|
3273
3229
|
{
|
|
3274
|
-
className:
|
|
3230
|
+
className: se(Fe["rp-loading-progress"]),
|
|
3275
3231
|
style: { width: `${t}%` }
|
|
3276
3232
|
}
|
|
3277
3233
|
) }),
|
|
3278
|
-
/* @__PURE__ */ i("button", { className:
|
|
3234
|
+
/* @__PURE__ */ i("button", { className: se(Fe["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
3279
3235
|
] }) });
|
|
3280
|
-
},
|
|
3281
|
-
const { showPrintProgress: n = !0 } =
|
|
3236
|
+
}, us = rt((t, e) => {
|
|
3237
|
+
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 = () => {
|
|
3282
3238
|
if (!(!(s ?? (n && r)) || !d))
|
|
3283
|
-
return /* @__PURE__ */ i(
|
|
3239
|
+
return /* @__PURE__ */ i(ds, { percentage: d });
|
|
3284
3240
|
};
|
|
3285
3241
|
return /* @__PURE__ */ W("div", { children: [
|
|
3286
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className:
|
|
3287
|
-
/* @__PURE__ */ W("div", { "data-rp": "topBarLeft", className:
|
|
3288
|
-
/* @__PURE__ */ i(
|
|
3289
|
-
/* @__PURE__ */ i(
|
|
3242
|
+
/* @__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: [
|
|
3243
|
+
/* @__PURE__ */ W("div", { "data-rp": "topBarLeft", className: $e["rp-toolbar-start"], children: [
|
|
3244
|
+
/* @__PURE__ */ i(cs, {}),
|
|
3245
|
+
/* @__PURE__ */ i(Pi, {})
|
|
3290
3246
|
] }),
|
|
3291
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className:
|
|
3292
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className:
|
|
3247
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: $e["rp-toolbar-middle"], children: /* @__PURE__ */ i(ss, {}) }),
|
|
3248
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: $e["rp-toolbar-end"], children: /* @__PURE__ */ i(es, {}) })
|
|
3293
3249
|
] }) }),
|
|
3294
3250
|
/* @__PURE__ */ i(m, {})
|
|
3295
3251
|
] });
|
|
3296
|
-
}),
|
|
3252
|
+
}), wt = {
|
|
3297
3253
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1bqgz_1",
|
|
3298
3254
|
"rp-sidebar-content": "_rp-sidebar-content_1bqgz_1",
|
|
3299
3255
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1bqgz_16"
|
|
3300
|
-
},
|
|
3256
|
+
}, Ge = {
|
|
3301
3257
|
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
|
|
3302
3258
|
"rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
|
|
3303
3259
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
3304
3260
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
3305
3261
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
3306
|
-
},
|
|
3307
|
-
const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } =
|
|
3262
|
+
}, ps = (t) => {
|
|
3263
|
+
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(() => ({
|
|
3308
3264
|
width: Math.round(r.width),
|
|
3309
3265
|
height: Math.round(r.height)
|
|
3310
3266
|
}), [r]), b = N(() => {
|
|
3311
3267
|
e && o(e);
|
|
3312
3268
|
}, [o, e]);
|
|
3313
|
-
return
|
|
3269
|
+
return z(() => {
|
|
3314
3270
|
const T = c.get(e);
|
|
3315
3271
|
u.current === T || (g(null), u.current = T);
|
|
3316
|
-
}, [c, e]),
|
|
3272
|
+
}, [c, e]), z(() => {
|
|
3317
3273
|
const T = c.get(e);
|
|
3318
3274
|
if (!a.current || !e || !T || m)
|
|
3319
3275
|
return;
|
|
@@ -3355,7 +3311,7 @@ const We = {
|
|
|
3355
3311
|
{
|
|
3356
3312
|
onClick: b,
|
|
3357
3313
|
id: `page-${e}`,
|
|
3358
|
-
className:
|
|
3314
|
+
className: Ge["rp-thumbnail-wrapper"],
|
|
3359
3315
|
ref: a,
|
|
3360
3316
|
children: [
|
|
3361
3317
|
/* @__PURE__ */ i(
|
|
@@ -3364,7 +3320,7 @@ const We = {
|
|
|
3364
3320
|
style: {
|
|
3365
3321
|
transform: `rotate(${s[e || 0]}deg)`
|
|
3366
3322
|
},
|
|
3367
|
-
className:
|
|
3323
|
+
className: se(y, Ge["rp-thumbnail"]),
|
|
3368
3324
|
children: m ? /* @__PURE__ */ i(
|
|
3369
3325
|
"img",
|
|
3370
3326
|
{
|
|
@@ -3376,39 +3332,39 @@ const We = {
|
|
|
3376
3332
|
) : /* @__PURE__ */ i(
|
|
3377
3333
|
"div",
|
|
3378
3334
|
{
|
|
3379
|
-
className:
|
|
3335
|
+
className: Ge["rp-thumbnail-loader"],
|
|
3380
3336
|
style: {
|
|
3381
3337
|
width: `${_.width}px`,
|
|
3382
3338
|
height: `${_.height}px`
|
|
3383
3339
|
},
|
|
3384
|
-
children: /* @__PURE__ */ i(
|
|
3340
|
+
children: /* @__PURE__ */ i(gn, {})
|
|
3385
3341
|
}
|
|
3386
3342
|
)
|
|
3387
3343
|
}
|
|
3388
3344
|
),
|
|
3389
|
-
/* @__PURE__ */ i("div", { className:
|
|
3345
|
+
/* @__PURE__ */ i("div", { className: Ge["rp-thumbnail-text"], children: e })
|
|
3390
3346
|
]
|
|
3391
3347
|
}
|
|
3392
3348
|
);
|
|
3393
|
-
},
|
|
3349
|
+
}, dn = {
|
|
3394
3350
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
3395
3351
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
3396
|
-
},
|
|
3352
|
+
}, hs = 16, fs = (t, e) => {
|
|
3397
3353
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3398
|
-
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
3399
|
-
},
|
|
3400
|
-
const { show: n, width: r } = t, { focusedPage: o, totalPages: s } =
|
|
3401
|
-
|
|
3354
|
+
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - hs);
|
|
3355
|
+
}, ms = rt((t, e) => {
|
|
3356
|
+
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);
|
|
3357
|
+
un(e, () => g.current);
|
|
3402
3358
|
const u = k(() => Object.values(a), [a]), y = N(() => {
|
|
3403
3359
|
const _ = c + 1;
|
|
3404
3360
|
_ <= s && d(_);
|
|
3405
3361
|
}, [d, s, c]);
|
|
3406
|
-
return
|
|
3407
|
-
o > c && s > c ? m(o) : n && C.current !== o && (
|
|
3408
|
-
}, [o, c, m, n, u]),
|
|
3362
|
+
return z(() => {
|
|
3363
|
+
o > c && s > c ? m(o) : n && C.current !== o && (fs(g.current, o), C.current = o);
|
|
3364
|
+
}, [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) => {
|
|
3409
3365
|
var T, P;
|
|
3410
3366
|
return /* @__PURE__ */ i(
|
|
3411
|
-
|
|
3367
|
+
ps,
|
|
3412
3368
|
{
|
|
3413
3369
|
isFocused: o === ((T = _.page) == null ? void 0 : T.pageNumber),
|
|
3414
3370
|
pageNumber: (P = _.page) == null ? void 0 : P.pageNumber,
|
|
@@ -3419,39 +3375,39 @@ const We = {
|
|
|
3419
3375
|
b
|
|
3420
3376
|
);
|
|
3421
3377
|
}) : null }) });
|
|
3422
|
-
}),
|
|
3423
|
-
const { thumbnailIcon: t } =
|
|
3424
|
-
return t || e || /* @__PURE__ */ i(
|
|
3425
|
-
},
|
|
3426
|
-
const { active: t, setActive: e } =
|
|
3378
|
+
}), gs = () => {
|
|
3379
|
+
const { thumbnailIcon: t } = ge(), { thumbnailIcon: e } = me();
|
|
3380
|
+
return t || e || /* @__PURE__ */ i(ko, {});
|
|
3381
|
+
}, vs = () => {
|
|
3382
|
+
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(() => {
|
|
3427
3383
|
e((C) => !C);
|
|
3428
3384
|
}, []), 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(
|
|
3429
|
-
|
|
3385
|
+
ce,
|
|
3430
3386
|
{
|
|
3431
3387
|
onClick: m,
|
|
3432
3388
|
active: t,
|
|
3433
3389
|
"aria-label": c == null ? void 0 : c.thumbnailTooltip,
|
|
3434
|
-
children: /* @__PURE__ */ i(
|
|
3390
|
+
children: /* @__PURE__ */ i(gs, {})
|
|
3435
3391
|
}
|
|
3436
3392
|
) }) : null, [a, t, m, c]);
|
|
3437
|
-
return /* @__PURE__ */ i(
|
|
3393
|
+
return /* @__PURE__ */ i(he, { children: d && /* @__PURE__ */ W(
|
|
3438
3394
|
"div",
|
|
3439
3395
|
{
|
|
3440
3396
|
style: { "--rp-thumbnail-width": `${n}px` },
|
|
3441
|
-
className:
|
|
3397
|
+
className: wt["rp-sidebar-content-wrapper"],
|
|
3442
3398
|
"data-rp": "sidebar",
|
|
3443
3399
|
children: [
|
|
3444
|
-
/* @__PURE__ */ i("div", { ref: s, className:
|
|
3400
|
+
/* @__PURE__ */ i("div", { ref: s, className: wt["rp-sidebar-content"], children: g }),
|
|
3445
3401
|
/* @__PURE__ */ W(
|
|
3446
3402
|
"div",
|
|
3447
3403
|
{
|
|
3448
3404
|
"data-rp": "thumbnailSidebar",
|
|
3449
3405
|
hidden: !t,
|
|
3450
|
-
className:
|
|
3406
|
+
className: wt["rp-thumbnails-wrapper"],
|
|
3451
3407
|
children: [
|
|
3452
|
-
/* @__PURE__ */ i(
|
|
3408
|
+
/* @__PURE__ */ i(ms, { show: t, ref: o }),
|
|
3453
3409
|
/* @__PURE__ */ i(
|
|
3454
|
-
|
|
3410
|
+
$o,
|
|
3455
3411
|
{
|
|
3456
3412
|
onWidthChange: r,
|
|
3457
3413
|
thumbnailRef: o,
|
|
@@ -3464,7 +3420,7 @@ const We = {
|
|
|
3464
3420
|
]
|
|
3465
3421
|
}
|
|
3466
3422
|
) });
|
|
3467
|
-
},
|
|
3423
|
+
}, Cc = po((t, e) => {
|
|
3468
3424
|
const {
|
|
3469
3425
|
children: n,
|
|
3470
3426
|
slots: r,
|
|
@@ -3475,30 +3431,30 @@ const We = {
|
|
|
3475
3431
|
onLoaded: c,
|
|
3476
3432
|
cleanupOnLoaded: m,
|
|
3477
3433
|
onLayoutWidthChange: g
|
|
3478
|
-
} = t, [C, u] = $(null), { setContainer: y, setContentRef: _ } =
|
|
3479
|
-
return
|
|
3434
|
+
} = t, [C, u] = $(null), { setContainer: y, setContentRef: _ } = Te(), { loading: b } = re(), { LoaderImageComponent: T } = yt();
|
|
3435
|
+
return z(() => (c && c(), () => {
|
|
3480
3436
|
m && m();
|
|
3481
3437
|
}), [c, m]), // TODO: deprecated in v2.0.0, remove later ~
|
|
3482
|
-
/* @__PURE__ */ i(
|
|
3483
|
-
/* @__PURE__ */ W(
|
|
3484
|
-
/* @__PURE__ */ W("div", { className:
|
|
3438
|
+
/* @__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: [
|
|
3439
|
+
/* @__PURE__ */ W(Go, { children: [
|
|
3440
|
+
/* @__PURE__ */ W("div", { className: Pe["rp-layout"], children: [
|
|
3485
3441
|
/* @__PURE__ */ i(
|
|
3486
|
-
|
|
3442
|
+
us,
|
|
3487
3443
|
{
|
|
3488
3444
|
ref: u
|
|
3489
3445
|
}
|
|
3490
3446
|
),
|
|
3491
|
-
/* @__PURE__ */ W("div", { className:
|
|
3492
|
-
/* @__PURE__ */ i("div", { className:
|
|
3493
|
-
/* @__PURE__ */ i("div", { ref: _, className:
|
|
3447
|
+
/* @__PURE__ */ W("div", { className: Pe["rp-content"], children: [
|
|
3448
|
+
/* @__PURE__ */ i("div", { className: Pe["rp-sidebar"], children: /* @__PURE__ */ i(vs, {}) }),
|
|
3449
|
+
/* @__PURE__ */ i("div", { ref: _, className: Pe["rp-pages"], children: n })
|
|
3494
3450
|
] })
|
|
3495
3451
|
] }),
|
|
3496
|
-
/* @__PURE__ */ i(
|
|
3452
|
+
/* @__PURE__ */ i(Uo, {})
|
|
3497
3453
|
] }),
|
|
3498
3454
|
b ? /* @__PURE__ */ i(
|
|
3499
3455
|
"div",
|
|
3500
3456
|
{
|
|
3501
|
-
className:
|
|
3457
|
+
className: Pe["rp-loader"],
|
|
3502
3458
|
style: {
|
|
3503
3459
|
position: "absolute",
|
|
3504
3460
|
top: 0,
|
|
@@ -3524,7 +3480,7 @@ const We = {
|
|
|
3524
3480
|
}
|
|
3525
3481
|
) : null
|
|
3526
3482
|
] }) }) }) }) });
|
|
3527
|
-
}),
|
|
3483
|
+
}), Pc = {
|
|
3528
3484
|
"rp-toolbar-layout": "_rp-toolbar-layout_vwobs_1",
|
|
3529
3485
|
"rp-content": "_rp-content_vwobs_7",
|
|
3530
3486
|
"rp-topbar-content": "_rp-topbar-content_vwobs_13",
|
|
@@ -3533,59 +3489,59 @@ const We = {
|
|
|
3533
3489
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_vwobs_37"
|
|
3534
3490
|
};
|
|
3535
3491
|
export {
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3492
|
+
ps as $,
|
|
3493
|
+
yn as A,
|
|
3494
|
+
qr as B,
|
|
3495
|
+
Sn as C,
|
|
3496
|
+
$i as D,
|
|
3497
|
+
xn as E,
|
|
3498
|
+
Rn as F,
|
|
3499
|
+
Ur as G,
|
|
3500
|
+
Zr as H,
|
|
3501
|
+
Xr as I,
|
|
3502
|
+
Yr as J,
|
|
3503
|
+
Ot as K,
|
|
3504
|
+
On as L,
|
|
3505
|
+
fi as M,
|
|
3506
|
+
vi as N,
|
|
3507
|
+
wi as O,
|
|
3508
|
+
fc as P,
|
|
3509
|
+
_i as Q,
|
|
3510
|
+
_c as R,
|
|
3511
|
+
cs as S,
|
|
3512
|
+
gc as T,
|
|
3513
|
+
Xn as U,
|
|
3514
|
+
Jn as V,
|
|
3515
|
+
Yi as W,
|
|
3516
|
+
Ji as X,
|
|
3517
|
+
ln as Y,
|
|
3518
|
+
ns as Z,
|
|
3519
|
+
us as _,
|
|
3520
|
+
Cc as a,
|
|
3521
|
+
vs as a0,
|
|
3522
|
+
Zn as b,
|
|
3523
|
+
it as c,
|
|
3524
|
+
Nt as d,
|
|
3525
|
+
vc as e,
|
|
3526
|
+
wc as f,
|
|
3527
|
+
mc as g,
|
|
3528
|
+
In as h,
|
|
3529
|
+
vt as i,
|
|
3530
|
+
Ae as j,
|
|
3531
|
+
$e as k,
|
|
3532
|
+
Pi as l,
|
|
3533
|
+
ss as m,
|
|
3534
|
+
es as n,
|
|
3535
|
+
Pc as o,
|
|
3536
|
+
ms as p,
|
|
3537
|
+
ds as q,
|
|
3538
|
+
Gi as r,
|
|
3539
|
+
Ki as s,
|
|
3540
|
+
Tn as t,
|
|
3541
|
+
ue as u,
|
|
3542
|
+
Hr as v,
|
|
3543
|
+
Cn as w,
|
|
3544
|
+
$r as x,
|
|
3545
|
+
Pn as y,
|
|
3546
|
+
Gr as z
|
|
3591
3547
|
};
|