@pdf-viewer/react 1.17.0-beta.5 → 1.17.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RPSplitter-5e40cc27.js +71 -0
- package/dist/{ToolbarLayout.module-da284871.js → ToolbarLayout.module-9e2d330e.js} +138 -138
- package/dist/assets/style.css +1 -1
- package/dist/assets/style.js +5 -5
- package/dist/components/RPController.js +5 -5
- package/dist/components/RPPages.js +5 -5
- package/dist/components/RPProvider.js +5 -5
- package/dist/components/layout/LayoutContainer.js +5 -5
- package/dist/components/layout/RPDefaultLayout.js +5 -5
- package/dist/components/layout/RPLayout.js +5 -5
- package/dist/components/layout/sidebar/RPSidebar.js +5 -5
- package/dist/components/layout/sidebar/RPSplitter.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +5 -5
- package/dist/components/layout/sidebar/Thumbnails.js +5 -5
- package/dist/components/layout/toolbar/DarkModeTool.js +2 -2
- package/dist/components/layout/toolbar/DocumentDialog.js +5 -5
- package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/FileDownloadTool.js +5 -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 +5 -5
- package/dist/components/layout/toolbar/OtherTool.js +5 -5
- package/dist/components/layout/toolbar/Paginate.js +5 -5
- package/dist/components/layout/toolbar/PrintTool.js +5 -5
- package/dist/components/layout/toolbar/RPMenuItem.js +3 -3
- package/dist/components/layout/toolbar/RPMoreOptions.js +5 -5
- package/dist/components/layout/toolbar/RPToolbar.js +5 -5
- package/dist/components/layout/toolbar/RPToolbarEnd.js +5 -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 +5 -5
- package/dist/components/layout/toolbar/SearchTool.js +5 -5
- package/dist/components/layout/toolbar/SelectionModeTool.js +3 -3
- package/dist/components/layout/toolbar/ThumbnailTool.js +5 -5
- package/dist/components/layout/toolbar/ToolbarCustom.js +13 -12
- package/dist/components/layout/toolbar/ToolbarDefault.js +16 -15
- package/dist/components/layout/toolbar/ToolbarLayout.js +5 -5
- package/dist/components/layout/toolbar/ViewModeTool.js +3 -3
- package/dist/components/layout/toolbar/ZoomTool.js +5 -5
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +5 -5
- package/dist/components/layout/toolbar/tools/DualPageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +5 -5
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +5 -5
- 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/HorizontalScrollingTool.js +2 -2
- package/dist/components/layout/toolbar/tools/InputPageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/NextPageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/PrintTool.js +5 -5
- 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/SinglePageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +5 -5
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +5 -5
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +5 -5
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +2 -2
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +5 -5
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +5 -5
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +5 -5
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +5 -5
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +5 -5
- 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 +5 -5
- package/dist/components/page/CanvasLayer.js +5 -5
- package/dist/components/page/DualPage.js +5 -5
- package/dist/components/page/DualPageWithCover.js +5 -5
- package/dist/components/page/RPPage.js +5 -5
- package/dist/components/page/SinglePage.js +5 -5
- package/dist/components/page/TextHighlightLayer.js +5 -5
- package/dist/components/page/TextLayer.js +5 -5
- package/dist/components/ui/Checkbox.js +1 -1
- package/dist/components/ui/DropDown.js +3 -3
- package/dist/components/ui/LoadingIndicator.js +5 -5
- package/dist/components/ui/RPTooltip.js +102 -118
- package/dist/contexts/PaginationContext.js +5 -5
- package/dist/contexts/PrintContext.js +5 -5
- package/dist/contexts/RenderQueueProvider.js +5 -5
- package/dist/contexts/SearchContext.js +5 -5
- package/dist/contexts/ThumbnailsContext.js +5 -5
- package/dist/{floating-ui.react-dom-d22a10b4.js → floating-ui.react-dom-6b2fe0df.js} +3 -3
- package/dist/{index-c9a2990a.js → index-35c7f4a2.js} +3 -3
- package/dist/{index-3bf64864.js → index-f563c6f0.js} +100 -97
- package/dist/main.js +5 -5
- package/dist/utils/annotations.js +6 -6
- package/dist/utils/hooks/useFileDownload.js +5 -5
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +5 -5
- package/dist/utils/hooks/usePresentPage.js +5 -5
- package/dist/utils/hooks/usePrint.js +5 -5
- package/dist/utils/hooks/useScrollToPage.js +5 -5
- package/dist/utils/hooks/useSearch.js +5 -5
- package/dist/utils/hooks/useThumbnail.js +5 -5
- package/dist/utils/hooks/useVirtualReactWindow.js +5 -5
- package/package.json +1 -1
- package/dist/RPSplitter-b942c039.js +0 -68
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i, Fragment as he, jsxs as k } from "react/jsx-runtime";
|
|
2
2
|
import * as X from "react";
|
|
3
3
|
import { useRef as M, useEffect as A, useCallback as N, useState as H, useMemo as W, createContext as Be, useContext as Ze, useImperativeHandle as mn, createElement as Qe, PureComponent as po, Component as ho, memo as It, Fragment as fo, forwardRef as mo } from "react";
|
|
4
|
-
import { ChevronUpIcon as
|
|
4
|
+
import { ChevronUpIcon as Ve } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as de } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as gn } from "./components/ui/Input.js";
|
|
7
7
|
import { ViewMode as oe, ScrollMode as ie, AnnotationSubType as $t, SelectionMode as go, ErrorType as vo, ZoomLevel as Me } from "./utils/types.js";
|
|
@@ -43,24 +43,24 @@ import "./contexts/ConfigContext.js";
|
|
|
43
43
|
import * as zo from "pdfjs-dist";
|
|
44
44
|
import { PixelsPerInch as Wo, AnnotationMode as Fo, RenderingCancelledException as ko, AnnotationLayer as Mo } from "pdfjs-dist";
|
|
45
45
|
import { ThumbnailIcon as Ho } from "./components/icons/Thumbnail.js";
|
|
46
|
-
import { c as Xe, R as $o } from "./RPSplitter-
|
|
46
|
+
import { c as Xe, R as $o } from "./RPSplitter-5e40cc27.js";
|
|
47
47
|
import { c as se } from "./clsx-0c6e471a.js";
|
|
48
48
|
import { LoaderIcon as bn } from "./components/icons/LoaderIcon.js";
|
|
49
49
|
import { Container as Go } from "./components/layout/Container.js";
|
|
50
|
-
import { useViewportContext as Se, ViewportProvider as
|
|
51
|
-
import { useToolbarComponentContext as Ce, ToolbarComponentProvider as
|
|
52
|
-
import { WrapperLayout as
|
|
50
|
+
import { useViewportContext as Se, ViewportProvider as qo } from "./contexts/ViewportContext.js";
|
|
51
|
+
import { useToolbarComponentContext as Ce, ToolbarComponentProvider as Uo } from "./contexts/ToolbarComponentContext.js";
|
|
52
|
+
import { WrapperLayout as Vo } from "./components/layout/WrapperLayout.js";
|
|
53
53
|
import { RPDropFileZone as Bo } from "./components/RPDropFileZone.js";
|
|
54
54
|
import { c as ye, L as Zo } from "./LayoutWrapper-3f4d0a19.js";
|
|
55
55
|
import { SkipLink as Gt } from "./components/layout/SkipLink.js";
|
|
56
|
-
import { c as ne, S as
|
|
57
|
-
import { UICheckbox as
|
|
56
|
+
import { c as ne, S as qt } from "./SearchCloseButton-08d57275.js";
|
|
57
|
+
import { UICheckbox as Ut } from "./components/ui/Checkbox.js";
|
|
58
58
|
import { useIconContext as ve, IconProvider as jo } from "./contexts/IconContext.js";
|
|
59
59
|
import K from "./components/ui/RPTooltip.js";
|
|
60
60
|
import { UIDropDown as Rt } from "./components/ui/DropDown.js";
|
|
61
61
|
import { MenuItem as Ie } from "./components/layout/toolbar/MenuItem.js";
|
|
62
62
|
import { MenuSeparator as Lt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
63
|
-
import { dateFormatter as
|
|
63
|
+
import { dateFormatter as Vt } from "./utils/dateFormatter.js";
|
|
64
64
|
import { PropertyItem as Ko } from "./components/layout/toolbar/PropertyItem.js";
|
|
65
65
|
import "./RotateTool.module-67946714.js";
|
|
66
66
|
import { withRef as at } from "./utils/withRef.js";
|
|
@@ -85,9 +85,9 @@ import { appConsole as vr } from "./utils/appConsole.js";
|
|
|
85
85
|
import { FileUploadTool as _n } from "./components/layout/toolbar/FileUploadTool.js";
|
|
86
86
|
import { DarkModeTool as wr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
87
87
|
import { ThreeDotIcon as br } from "./components/icons/ThreeDotIcon.js";
|
|
88
|
-
import { c as _r, u as Ot, P as Ke, a as
|
|
89
|
-
import { D as yr,
|
|
90
|
-
import { a as Ir, h as xr, u as Sr, F as Rr, b as Lr, G as tt } from "./index-
|
|
88
|
+
import { c as _r, u as Ot, P as Ke, a as Ue, b as Dt, k as Pr, e as Tr, i as Cr } from "./index-35c7f4a2.js";
|
|
89
|
+
import { D as yr, e as ft } from "./floating-ui.react-dom-6b2fe0df.js";
|
|
90
|
+
import { a as Ir, h as xr, u as Sr, F as Rr, b as Lr, G as tt } from "./index-f563c6f0.js";
|
|
91
91
|
import { CloseIcon as Er } from "./components/icons/CloseIcon.js";
|
|
92
92
|
import { DocumentProperties as Nr } from "./components/layout/toolbar/DocumentProperties.js";
|
|
93
93
|
import { RotateTool as Or } from "./components/layout/toolbar/RotateTool.js";
|
|
@@ -202,7 +202,7 @@ const yn = () => {
|
|
|
202
202
|
s
|
|
203
203
|
]
|
|
204
204
|
) };
|
|
205
|
-
},
|
|
205
|
+
}, qr = (t = 1) => {
|
|
206
206
|
const [e, n] = H(t), [r, o] = H(0), { scrollToPage: a } = yn(), c = M(1), { viewMode: d } = $e(), { scrollMode: s } = Ae(), { widths: f } = je(), { pagesRef: m } = Te(), C = Nt(e, 100), u = N(
|
|
207
207
|
(h) => {
|
|
208
208
|
if (!/^[0-9]*$/g.test(h.toString()) || !h)
|
|
@@ -257,7 +257,7 @@ const yn = () => {
|
|
|
257
257
|
const t = Ze(In);
|
|
258
258
|
return typeof (t == null ? void 0 : t.focusedPage) > "u" && vr.error("Please use this hooks inside children component of RPProvider"), t;
|
|
259
259
|
}, bc = ({ children: t }) => {
|
|
260
|
-
const { pdf: e } = re(), { setCurrentPage: n } = No(), { focusedPage: r, totalPages: o, setFocusedPage: a, setTotalPages: c, goToPage: d, nextPage: s, prevPage: f } =
|
|
260
|
+
const { pdf: e } = re(), { setCurrentPage: n } = No(), { focusedPage: r, totalPages: o, setFocusedPage: a, setTotalPages: c, goToPage: d, nextPage: s, prevPage: f } = qr();
|
|
261
261
|
return A(() => {
|
|
262
262
|
e != null && e.numPages && (c(e.numPages), a(1));
|
|
263
263
|
}, [e, c, a]), A(() => {
|
|
@@ -277,7 +277,7 @@ const yn = () => {
|
|
|
277
277
|
children: t
|
|
278
278
|
}
|
|
279
279
|
);
|
|
280
|
-
},
|
|
280
|
+
}, Ur = () => {
|
|
281
281
|
const { pdf: t, pages: e } = re(), [n, r] = H({
|
|
282
282
|
loadedPages: 0,
|
|
283
283
|
totalPages: 0,
|
|
@@ -461,7 +461,7 @@ const yn = () => {
|
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
}), _c = ({ children: t }) => {
|
|
464
|
-
const [e, n] = H(null), [r, o] = H(null), { print: a, cancel: c, progress: d, isComplete: s, isError: f, error: m, showDefaultProgress: C } =
|
|
464
|
+
const [e, n] = H(null), [r, o] = H(null), { print: a, cancel: c, progress: d, isComplete: s, isError: f, error: m, showDefaultProgress: C } = Ur(), u = N((w) => {
|
|
465
465
|
w && typeof w == "function" && o(() => w);
|
|
466
466
|
}, []), T = (w) => {
|
|
467
467
|
m && w(m);
|
|
@@ -497,7 +497,7 @@ const yn = () => {
|
|
|
497
497
|
if (!t)
|
|
498
498
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
499
499
|
return t;
|
|
500
|
-
},
|
|
500
|
+
}, Vr = () => {
|
|
501
501
|
const [t, e] = H({}), { pages: n } = re(), r = W(() => Object.keys(t).length, [t]), o = N(
|
|
502
502
|
(c) => {
|
|
503
503
|
if (!n.size)
|
|
@@ -552,7 +552,7 @@ const yn = () => {
|
|
|
552
552
|
children: t,
|
|
553
553
|
initialThumbnailsVisible: e
|
|
554
554
|
}) => {
|
|
555
|
-
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } =
|
|
555
|
+
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } = Vr(), [c, d] = H(e);
|
|
556
556
|
return /* @__PURE__ */ i(
|
|
557
557
|
Sn.Provider,
|
|
558
558
|
{
|
|
@@ -574,12 +574,12 @@ const yn = () => {
|
|
|
574
574
|
const G = d.get(L.page);
|
|
575
575
|
if (l === ie.PAGE_SCROLLING && b(L.page), !G)
|
|
576
576
|
return;
|
|
577
|
-
let
|
|
577
|
+
let q = 0, U = 0;
|
|
578
578
|
if (l === ie.VERTICAL_SCROLLING) {
|
|
579
579
|
const ee = L.page - 1, Y = P, we = ee % Y, me = Math.floor(ee / Y);
|
|
580
|
-
|
|
580
|
+
q = ke(f, me), U = ke(s, we);
|
|
581
581
|
}
|
|
582
|
-
l === ie.HORIZONTAL_SCROLLING && (
|
|
582
|
+
l === ie.HORIZONTAL_SCROLLING && (U = s.slice(0, L.page - 1).reduce((ee, Y) => ee + Y, 0));
|
|
583
583
|
const B = {
|
|
584
584
|
height: f[L.page - 1],
|
|
585
585
|
width: s[L.page - 1]
|
|
@@ -589,7 +589,7 @@ const yn = () => {
|
|
|
589
589
|
L.rect,
|
|
590
590
|
C,
|
|
591
591
|
Z
|
|
592
|
-
), Q =
|
|
592
|
+
), Q = U + ae, J = q + $, te = {
|
|
593
593
|
left: Math.max(Q, 0),
|
|
594
594
|
top: Math.max(J, 0)
|
|
595
595
|
};
|
|
@@ -630,8 +630,8 @@ const yn = () => {
|
|
|
630
630
|
for (let G = 1; G <= L; G++) {
|
|
631
631
|
if (m.current)
|
|
632
632
|
throw "close pop over";
|
|
633
|
-
const
|
|
634
|
-
F[G.toString()] = await
|
|
633
|
+
const q = await E.getPage(G);
|
|
634
|
+
F[G.toString()] = await q.getTextContent();
|
|
635
635
|
}
|
|
636
636
|
return F;
|
|
637
637
|
}, []);
|
|
@@ -642,14 +642,14 @@ const yn = () => {
|
|
|
642
642
|
}
|
|
643
643
|
m.current = !1, a(!0), T([]), g(0), z(c).then((E) => {
|
|
644
644
|
_.current = E;
|
|
645
|
-
const F = Object.keys(E).reduce((G,
|
|
646
|
-
const
|
|
645
|
+
const F = Object.keys(E).reduce((G, q) => {
|
|
646
|
+
const U = Co(
|
|
647
647
|
[n],
|
|
648
|
-
E[
|
|
649
|
-
Number(
|
|
648
|
+
E[q],
|
|
649
|
+
Number(q) - 1,
|
|
650
650
|
t
|
|
651
|
-
).map((B, Z) => ({ ...B, page: Number(
|
|
652
|
-
return [...G, ...
|
|
651
|
+
).map((B, Z) => ({ ...B, page: Number(q), pageMatchIdx: Z }));
|
|
652
|
+
return [...G, ...U];
|
|
653
653
|
}, []);
|
|
654
654
|
T(F), g(F.length ? 1 : 0);
|
|
655
655
|
}).catch(() => {
|
|
@@ -1107,23 +1107,23 @@ const Jr = (t) => {
|
|
|
1107
1107
|
});
|
|
1108
1108
|
}
|
|
1109
1109
|
const P = (g, h, p, l) => {
|
|
1110
|
-
var
|
|
1110
|
+
var U;
|
|
1111
1111
|
const v = document.createRange(), _ = p.firstChild;
|
|
1112
1112
|
if (!_ || _.nodeType !== Node.TEXT_NODE)
|
|
1113
1113
|
return null;
|
|
1114
|
-
const I = ((
|
|
1114
|
+
const I = ((U = _.textContent) == null ? void 0 : U.length) ?? 0, S = l[0].charIdxInSpan, x = l.length === 1 ? S : l[l.length - 1].charIdxInSpan;
|
|
1115
1115
|
if (S > I || x + 1 > I)
|
|
1116
1116
|
return null;
|
|
1117
1117
|
v.setStart(_, S), v.setEnd(_, x + 1);
|
|
1118
1118
|
const R = document.createElement("span");
|
|
1119
1119
|
R.style.width = "auto", v.surroundContents(R);
|
|
1120
|
-
const O = R.getBoundingClientRect(), D = g.getBoundingClientRect(), z = D.height, E = D.width, L = 100 * (O.left - D.left) / E, F = 100 * (O.top - D.top) / z, G = 100 * O.height / z,
|
|
1120
|
+
const O = R.getBoundingClientRect(), D = g.getBoundingClientRect(), z = D.height, E = D.width, L = 100 * (O.left - D.left) / E, F = 100 * (O.top - D.top) / z, G = 100 * O.height / z, q = 100 * O.width / E;
|
|
1121
1121
|
return ar(R), {
|
|
1122
1122
|
keywordStr: h,
|
|
1123
1123
|
left: L,
|
|
1124
1124
|
top: F,
|
|
1125
1125
|
height: G,
|
|
1126
|
-
width:
|
|
1126
|
+
width: q,
|
|
1127
1127
|
pageHeight: z,
|
|
1128
1128
|
pageWidth: E
|
|
1129
1129
|
};
|
|
@@ -1171,17 +1171,17 @@ const Jr = (t) => {
|
|
|
1171
1171
|
startIndex: L.index,
|
|
1172
1172
|
endIndex: E.lastIndex
|
|
1173
1173
|
});
|
|
1174
|
-
const G = F.map((
|
|
1175
|
-
keyword:
|
|
1176
|
-
indexes: l.slice(
|
|
1174
|
+
const G = F.map((q) => ({
|
|
1175
|
+
keyword: q.keyword,
|
|
1176
|
+
indexes: l.slice(q.startIndex, q.endIndex),
|
|
1177
1177
|
color: D
|
|
1178
1178
|
}));
|
|
1179
|
-
for (const
|
|
1180
|
-
const
|
|
1179
|
+
for (const q of G) {
|
|
1180
|
+
const U = q.indexes.reduce(
|
|
1181
1181
|
(B, Z) => (B[Z.spanIdx] = (B[Z.spanIdx] || []).concat([Z]), B),
|
|
1182
1182
|
{}
|
|
1183
1183
|
);
|
|
1184
|
-
for (const B of Object.values(
|
|
1184
|
+
for (const B of Object.values(U))
|
|
1185
1185
|
if (B.length !== 1 || B[0].char.trim() !== "") {
|
|
1186
1186
|
const Z = B, ae = p[Z[0].spanIdx], $ = P(
|
|
1187
1187
|
g,
|
|
@@ -1193,7 +1193,7 @@ const Jr = (t) => {
|
|
|
1193
1193
|
const { left: Q, top: J } = $;
|
|
1194
1194
|
if (_.find((ee) => ee.left === Q && ee.top === J))
|
|
1195
1195
|
continue;
|
|
1196
|
-
_.push({ ...$, highlightColor:
|
|
1196
|
+
_.push({ ...$, highlightColor: q.color });
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
@@ -1501,7 +1501,7 @@ function di(t) {
|
|
|
1501
1501
|
}, h.scrollToItem = function(l) {
|
|
1502
1502
|
var v = l.align, _ = v === void 0 ? "auto" : v, I = l.columnIndex, S = l.rowIndex, x = this.props, R = x.columnCount, O = x.height, D = x.rowCount, z = x.width, E = this.state, L = E.scrollLeft, F = E.scrollTop, G = si();
|
|
1503
1503
|
I !== void 0 && (I = Math.max(0, Math.min(I, R - 1))), S !== void 0 && (S = Math.max(0, Math.min(S, D - 1)));
|
|
1504
|
-
var
|
|
1504
|
+
var q = c(this.props, this._instanceProps), U = d(this.props, this._instanceProps), B = U > z ? G : 0, Z = q > O ? G : 0;
|
|
1505
1505
|
this.scrollTo({
|
|
1506
1506
|
scrollLeft: I !== void 0 ? s(this.props, I, _, L, this._instanceProps, Z) : L,
|
|
1507
1507
|
scrollTop: S !== void 0 ? f(this.props, S, _, F, this._instanceProps, B) : F
|
|
@@ -1538,8 +1538,8 @@ function di(t) {
|
|
|
1538
1538
|
}, h.componentWillUnmount = function() {
|
|
1539
1539
|
this._resetIsScrollingTimeoutId !== null && tn(this._resetIsScrollingTimeoutId);
|
|
1540
1540
|
}, h.render = function() {
|
|
1541
|
-
var l = this.props, v = l.children, _ = l.className, I = l.columnCount, S = l.direction, x = l.height, R = l.innerRef, O = l.innerElementType, D = l.innerTagName, z = l.itemData, E = l.itemKey, L = E === void 0 ? li : E, F = l.outerElementType, G = l.outerTagName,
|
|
1542
|
-
if (I > 0 &&
|
|
1541
|
+
var l = this.props, v = l.children, _ = l.className, I = l.columnCount, S = l.direction, x = l.height, R = l.innerRef, O = l.innerElementType, D = l.innerTagName, z = l.itemData, E = l.itemKey, L = E === void 0 ? li : E, F = l.outerElementType, G = l.outerTagName, q = l.rowCount, U = l.style, B = l.useIsScrolling, Z = l.width, ae = this.state.isScrolling, $ = this._getHorizontalRangeToRender(), Q = $[0], J = $[1], te = this._getVerticalRangeToRender(), ee = te[0], Y = te[1], we = [];
|
|
1542
|
+
if (I > 0 && q)
|
|
1543
1543
|
for (var me = ee; me <= Y; me++)
|
|
1544
1544
|
for (var Re = Q; Re <= J; Re++)
|
|
1545
1545
|
we.push(Qe(v, {
|
|
@@ -1567,7 +1567,7 @@ function di(t) {
|
|
|
1567
1567
|
WebkitOverflowScrolling: "touch",
|
|
1568
1568
|
willChange: "transform",
|
|
1569
1569
|
direction: S
|
|
1570
|
-
},
|
|
1570
|
+
}, U)
|
|
1571
1571
|
}, Qe(O || D || "div", {
|
|
1572
1572
|
children: we,
|
|
1573
1573
|
ref: R,
|
|
@@ -1580,25 +1580,25 @@ function di(t) {
|
|
|
1580
1580
|
}, h._callPropsCallbacks = function() {
|
|
1581
1581
|
var l = this.props, v = l.columnCount, _ = l.onItemsRendered, I = l.onScroll, S = l.rowCount;
|
|
1582
1582
|
if (typeof _ == "function" && v > 0 && S > 0) {
|
|
1583
|
-
var x = this._getHorizontalRangeToRender(), R = x[0], O = x[1], D = x[2], z = x[3], E = this._getVerticalRangeToRender(), L = E[0], F = E[1], G = E[2],
|
|
1584
|
-
this._callOnItemsRendered(R, O, L, F, D, z, G,
|
|
1583
|
+
var x = this._getHorizontalRangeToRender(), R = x[0], O = x[1], D = x[2], z = x[3], E = this._getVerticalRangeToRender(), L = E[0], F = E[1], G = E[2], q = E[3];
|
|
1584
|
+
this._callOnItemsRendered(R, O, L, F, D, z, G, q);
|
|
1585
1585
|
}
|
|
1586
1586
|
if (typeof I == "function") {
|
|
1587
|
-
var
|
|
1587
|
+
var U = this.state, B = U.horizontalScrollDirection, Z = U.scrollLeft, ae = U.scrollTop, $ = U.scrollUpdateWasRequested, Q = U.verticalScrollDirection;
|
|
1588
1588
|
this._callOnScroll(Z, ae, B, Q, $);
|
|
1589
1589
|
}
|
|
1590
1590
|
}, h._getHorizontalRangeToRender = function() {
|
|
1591
1591
|
var l = this.props, v = l.columnCount, _ = l.overscanColumnCount, I = l.overscanColumnsCount, S = l.overscanCount, x = l.rowCount, R = this.state, O = R.horizontalScrollDirection, D = R.isScrolling, z = R.scrollLeft, E = _ || I || S || 1;
|
|
1592
1592
|
if (v === 0 || x === 0)
|
|
1593
1593
|
return [0, 0, 0, 0];
|
|
1594
|
-
var L = r(this.props, z, this._instanceProps), F = o(this.props, L, z, this._instanceProps), G = !D || O === "backward" ? Math.max(1, E) : 1,
|
|
1595
|
-
return [Math.max(0, L - G), Math.max(0, Math.min(v - 1, F +
|
|
1594
|
+
var L = r(this.props, z, this._instanceProps), F = o(this.props, L, z, this._instanceProps), G = !D || O === "backward" ? Math.max(1, E) : 1, q = !D || O === "forward" ? Math.max(1, E) : 1;
|
|
1595
|
+
return [Math.max(0, L - G), Math.max(0, Math.min(v - 1, F + q)), L, F];
|
|
1596
1596
|
}, h._getVerticalRangeToRender = function() {
|
|
1597
1597
|
var l = this.props, v = l.columnCount, _ = l.overscanCount, I = l.overscanRowCount, S = l.overscanRowsCount, x = l.rowCount, R = this.state, O = R.isScrolling, D = R.verticalScrollDirection, z = R.scrollTop, E = I || S || _ || 1;
|
|
1598
1598
|
if (v === 0 || x === 0)
|
|
1599
1599
|
return [0, 0, 0, 0];
|
|
1600
|
-
var L = u(this.props, z, this._instanceProps), F = T(this.props, L, z, this._instanceProps), G = !O || D === "backward" ? Math.max(1, E) : 1,
|
|
1601
|
-
return [Math.max(0, L - G), Math.max(0, Math.min(x - 1, F +
|
|
1600
|
+
var L = u(this.props, z, this._instanceProps), F = T(this.props, L, z, this._instanceProps), G = !O || D === "backward" ? Math.max(1, E) : 1, q = !O || D === "forward" ? Math.max(1, E) : 1;
|
|
1601
|
+
return [Math.max(0, L - G), Math.max(0, Math.min(x - 1, F + q)), L, F];
|
|
1602
1602
|
}, g;
|
|
1603
1603
|
}(po), e.defaultProps = {
|
|
1604
1604
|
direction: "ltr",
|
|
@@ -2238,14 +2238,14 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2238
2238
|
}), z = M(!1), E = M(), { isFullScreen: L } = To(), {
|
|
2239
2239
|
pageDimension: F,
|
|
2240
2240
|
rowCount: G,
|
|
2241
|
-
rowHeight:
|
|
2242
|
-
columnCount:
|
|
2241
|
+
rowHeight: q,
|
|
2242
|
+
columnCount: U,
|
|
2243
2243
|
columnWidth: B,
|
|
2244
2244
|
estimatedColumnWidth: Z,
|
|
2245
2245
|
estimatedRowHeight: ae,
|
|
2246
2246
|
totalDimension: $
|
|
2247
2247
|
} = vi(), Q = Nt(T, 100), { onScroll: J } = Do(), te = M();
|
|
2248
|
-
Ci(
|
|
2248
|
+
Ci(U, G, u, v);
|
|
2249
2249
|
const ee = M({
|
|
2250
2250
|
scrollTop: 0,
|
|
2251
2251
|
scrollLeft: 0
|
|
@@ -2254,17 +2254,17 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2254
2254
|
const { isPressed: Y } = dr(), { selectionMode: we } = Po(), { initializeGrabScroll: me, resetGrabState: Re } = ur({
|
|
2255
2255
|
isPressed: Y
|
|
2256
2256
|
}), Le = W(() => we === go.HAND, [we]), lt = W(() => {
|
|
2257
|
-
const
|
|
2257
|
+
const V = Array.from({ length: U }, (j, be) => B(be));
|
|
2258
2258
|
return {
|
|
2259
|
-
columnCount:
|
|
2259
|
+
columnCount: U,
|
|
2260
2260
|
isDualPageWithCover: v === oe.DUAL_PAGE_WITH_COVER,
|
|
2261
|
-
columnWidths:
|
|
2261
|
+
columnWidths: V,
|
|
2262
2262
|
totalPages: p
|
|
2263
2263
|
};
|
|
2264
|
-
}, [
|
|
2265
|
-
(
|
|
2264
|
+
}, [U, v, B, p]), dt = N(
|
|
2265
|
+
(V) => {
|
|
2266
2266
|
const j = document.activeElement !== r;
|
|
2267
|
-
!L && j || (["ArrowUp", "ArrowLeft"].includes(
|
|
2267
|
+
!L && j || (["ArrowUp", "ArrowLeft"].includes(V.key) ? (V.preventDefault(), w()) : ["ArrowDown", "ArrowRight"].includes(V.key) && (V.preventDefault(), y()));
|
|
2268
2268
|
},
|
|
2269
2269
|
[y, w, L, l]
|
|
2270
2270
|
);
|
|
@@ -2272,19 +2272,19 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2272
2272
|
window.removeEventListener("keydown", dt);
|
|
2273
2273
|
}), [dt]), A(() => {
|
|
2274
2274
|
if (_.current && (_.current.style.position = "relative"), !!d)
|
|
2275
|
-
for (let
|
|
2276
|
-
for (let j = 0; j <
|
|
2275
|
+
for (let V = 0; V < G; V++)
|
|
2276
|
+
for (let j = 0; j < U; j++)
|
|
2277
2277
|
d.resetAfterIndices({
|
|
2278
2278
|
columnIndex: j,
|
|
2279
|
-
rowIndex:
|
|
2279
|
+
rowIndex: V,
|
|
2280
2280
|
shouldForceUpdate: !0
|
|
2281
2281
|
});
|
|
2282
|
-
}, [G,
|
|
2282
|
+
}, [G, U, F, d]);
|
|
2283
2283
|
const oo = N(
|
|
2284
|
-
(
|
|
2284
|
+
(V, j) => {
|
|
2285
2285
|
if (!u)
|
|
2286
2286
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
2287
|
-
const be = ee.current.scrollTop > j, Ee = ee.current.scrollLeft >
|
|
2287
|
+
const be = ee.current.scrollTop > j, Ee = ee.current.scrollLeft > V;
|
|
2288
2288
|
return be || Ee ? ee.current : {
|
|
2289
2289
|
scrollTop: u.scrollTop,
|
|
2290
2290
|
scrollLeft: u.scrollLeft
|
|
@@ -2292,7 +2292,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2292
2292
|
},
|
|
2293
2293
|
[u]
|
|
2294
2294
|
), kt = N(
|
|
2295
|
-
(
|
|
2295
|
+
(V, j) => {
|
|
2296
2296
|
if (D.current.viewMode !== v || D.current.scrollMode !== l) {
|
|
2297
2297
|
te.current && clearTimeout(te.current), z.current = !0, c(h, "auto"), te.current = setTimeout(() => {
|
|
2298
2298
|
requestAnimationFrame(() => {
|
|
@@ -2301,7 +2301,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2301
2301
|
}, 100);
|
|
2302
2302
|
return;
|
|
2303
2303
|
}
|
|
2304
|
-
const Ee =
|
|
2304
|
+
const Ee = V.scrollTop, ut = V.scrollLeft;
|
|
2305
2305
|
if (!j.height || !j.width)
|
|
2306
2306
|
return;
|
|
2307
2307
|
z.current = !0;
|
|
@@ -2326,23 +2326,23 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2326
2326
|
);
|
|
2327
2327
|
A(() => {
|
|
2328
2328
|
clearTimeout(E.current);
|
|
2329
|
-
const
|
|
2330
|
-
(Ee, ut, Ne) => Ee +
|
|
2329
|
+
const V = Array.from({ length: G }).reduce(
|
|
2330
|
+
(Ee, ut, Ne) => Ee + q(Ne),
|
|
2331
2331
|
0
|
|
2332
|
-
), j = Array.from({ length:
|
|
2332
|
+
), j = Array.from({ length: U }).reduce(
|
|
2333
2333
|
(Ee, ut, Ne) => Ee + B(Ne),
|
|
2334
2334
|
0
|
|
2335
|
-
), be = oo(j,
|
|
2336
|
-
ee.current = be, kt(be, { height:
|
|
2337
|
-
height:
|
|
2335
|
+
), be = oo(j, V);
|
|
2336
|
+
ee.current = be, kt(be, { height: V, width: j }), C({
|
|
2337
|
+
height: V,
|
|
2338
2338
|
width: j
|
|
2339
2339
|
});
|
|
2340
|
-
}, [F, G,
|
|
2340
|
+
}, [F, G, U, kt]);
|
|
2341
2341
|
const ro = N(
|
|
2342
|
-
(
|
|
2342
|
+
(V) => {
|
|
2343
2343
|
ee.current = {
|
|
2344
|
-
scrollTop:
|
|
2345
|
-
scrollLeft:
|
|
2344
|
+
scrollTop: V.scrollTop,
|
|
2345
|
+
scrollLeft: V.scrollLeft
|
|
2346
2346
|
};
|
|
2347
2347
|
},
|
|
2348
2348
|
[u]
|
|
@@ -2359,8 +2359,8 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2359
2359
|
[le["rp-cursor-grab"]]: Le && !Y,
|
|
2360
2360
|
[le["rp-cursor-grabbing"]]: Le && Y
|
|
2361
2361
|
}), [Le, Y]), ao = N(
|
|
2362
|
-
(
|
|
2363
|
-
if (Le &&
|
|
2362
|
+
(V) => {
|
|
2363
|
+
if (Le && V) {
|
|
2364
2364
|
const j = se(le["rp-pages"]), be = document.querySelector(`.${j}`);
|
|
2365
2365
|
me(be);
|
|
2366
2366
|
}
|
|
@@ -2391,13 +2391,13 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2391
2391
|
ref: o,
|
|
2392
2392
|
tabIndex: -1,
|
|
2393
2393
|
className: io,
|
|
2394
|
-
children: /* @__PURE__ */ i(bi, { style: { minHeight: "50px" }, children: ({ width:
|
|
2394
|
+
children: /* @__PURE__ */ i(bi, { style: { minHeight: "50px" }, children: ({ width: V, height: j }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: ao, style: { width: V, height: j }, children: l === ie.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2395
2395
|
"div",
|
|
2396
2396
|
{
|
|
2397
2397
|
ref: f,
|
|
2398
|
-
style: { width:
|
|
2398
|
+
style: { width: V, height: j },
|
|
2399
2399
|
className: se(le["rp-pages"], le["rp-page-scrolling-wrapper"]),
|
|
2400
|
-
children: v === oe.DUAL_PAGE ? /* @__PURE__ */ i(_i, { widths: B, heights:
|
|
2400
|
+
children: v === oe.DUAL_PAGE ? /* @__PURE__ */ i(_i, { widths: B, heights: q }) : v === oe.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ i(Pi, { widths: B, heights: q }) : /* @__PURE__ */ i(Ti, { widths: B, heights: q })
|
|
2401
2401
|
}
|
|
2402
2402
|
) : ae ? /* @__PURE__ */ i(
|
|
2403
2403
|
hi,
|
|
@@ -2407,11 +2407,11 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2407
2407
|
outerRef: m,
|
|
2408
2408
|
innerRef: _,
|
|
2409
2409
|
onScroll: ro,
|
|
2410
|
-
columnCount:
|
|
2410
|
+
columnCount: U,
|
|
2411
2411
|
columnWidth: B,
|
|
2412
|
-
rowHeight:
|
|
2412
|
+
rowHeight: q,
|
|
2413
2413
|
height: j,
|
|
2414
|
-
width:
|
|
2414
|
+
width: V,
|
|
2415
2415
|
estimatedColumnWidth: Z,
|
|
2416
2416
|
estimatedRowHeight: ae,
|
|
2417
2417
|
rowCount: G,
|
|
@@ -2423,7 +2423,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2423
2423
|
"--rp-pages-height": `${$.height}px`,
|
|
2424
2424
|
"--rp-pages-width": `${$.width}px`,
|
|
2425
2425
|
"--rp-row-count": `${G}`,
|
|
2426
|
-
"--rp-column-count": `${
|
|
2426
|
+
"--rp-column-count": `${U}`
|
|
2427
2427
|
},
|
|
2428
2428
|
children: yi
|
|
2429
2429
|
}
|
|
@@ -2467,10 +2467,10 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2467
2467
|
"rp-total-page": "_rp-total-page_1yinm_29"
|
|
2468
2468
|
}, Ii = () => {
|
|
2469
2469
|
const { prevIcon: t } = ve(), { prevIcon: e } = ge();
|
|
2470
|
-
return t || e || /* @__PURE__ */ i(
|
|
2470
|
+
return t || e || /* @__PURE__ */ i(Ve, {});
|
|
2471
2471
|
}, xi = () => {
|
|
2472
2472
|
const { nextIcon: t } = ve(), { nextIcon: e } = ge();
|
|
2473
|
-
return t || e || /* @__PURE__ */ i(
|
|
2473
|
+
return t || e || /* @__PURE__ */ i(Ve, { style: { transform: "rotate(180deg" } });
|
|
2474
2474
|
}, Si = () => {
|
|
2475
2475
|
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: a } = ce(), [c, d] = H(t.toString()), { pageNavigationTool: s = !0 } = Ce(), { pageNavigationTool: f = !0 } = xe(), { isSmallScreen: m } = Se(), { viewMode: C } = $e(), { scrollMode: u } = Ae(), { localeMessages: T } = pe();
|
|
2476
2476
|
A(() => {
|
|
@@ -2599,7 +2599,7 @@ var kn = "DialogTrigger", Li = X.forwardRef(
|
|
|
2599
2599
|
"data-state": Ft(o.open),
|
|
2600
2600
|
...r,
|
|
2601
2601
|
ref: a,
|
|
2602
|
-
onClick:
|
|
2602
|
+
onClick: Ue(t.onClick, o.onOpenToggle)
|
|
2603
2603
|
}
|
|
2604
2604
|
);
|
|
2605
2605
|
}
|
|
@@ -2651,21 +2651,21 @@ var Di = X.forwardRef(
|
|
|
2651
2651
|
if (a)
|
|
2652
2652
|
return xr(a);
|
|
2653
2653
|
}, []), /* @__PURE__ */ i(
|
|
2654
|
-
|
|
2654
|
+
qn,
|
|
2655
2655
|
{
|
|
2656
2656
|
...t,
|
|
2657
2657
|
ref: o,
|
|
2658
2658
|
trapFocus: n.open,
|
|
2659
2659
|
disableOutsidePointerEvents: !0,
|
|
2660
|
-
onCloseAutoFocus:
|
|
2660
|
+
onCloseAutoFocus: Ue(t.onCloseAutoFocus, (a) => {
|
|
2661
2661
|
var c;
|
|
2662
2662
|
a.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
|
|
2663
2663
|
}),
|
|
2664
|
-
onPointerDownOutside:
|
|
2664
|
+
onPointerDownOutside: Ue(t.onPointerDownOutside, (a) => {
|
|
2665
2665
|
const c = a.detail.originalEvent, d = c.button === 0 && c.ctrlKey === !0;
|
|
2666
2666
|
(c.button === 2 || d) && a.preventDefault();
|
|
2667
2667
|
}),
|
|
2668
|
-
onFocusOutside:
|
|
2668
|
+
onFocusOutside: Ue(
|
|
2669
2669
|
t.onFocusOutside,
|
|
2670
2670
|
(a) => a.preventDefault()
|
|
2671
2671
|
)
|
|
@@ -2676,7 +2676,7 @@ var Di = X.forwardRef(
|
|
|
2676
2676
|
(t, e) => {
|
|
2677
2677
|
const n = fe(De, t.__scopeDialog), r = X.useRef(!1), o = X.useRef(!1);
|
|
2678
2678
|
return /* @__PURE__ */ i(
|
|
2679
|
-
|
|
2679
|
+
qn,
|
|
2680
2680
|
{
|
|
2681
2681
|
...t,
|
|
2682
2682
|
ref: e,
|
|
@@ -2695,7 +2695,7 @@ var Di = X.forwardRef(
|
|
|
2695
2695
|
}
|
|
2696
2696
|
);
|
|
2697
2697
|
}
|
|
2698
|
-
),
|
|
2698
|
+
), qn = X.forwardRef(
|
|
2699
2699
|
(t, e) => {
|
|
2700
2700
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = t, d = fe(De, n), s = X.useRef(null), f = Ot(e, s);
|
|
2701
2701
|
return Sr(), /* @__PURE__ */ k(he, { children: [
|
|
@@ -2728,20 +2728,20 @@ var Di = X.forwardRef(
|
|
|
2728
2728
|
] })
|
|
2729
2729
|
] });
|
|
2730
2730
|
}
|
|
2731
|
-
), Wt = "DialogTitle",
|
|
2731
|
+
), Wt = "DialogTitle", Un = X.forwardRef(
|
|
2732
2732
|
(t, e) => {
|
|
2733
2733
|
const { __scopeDialog: n, ...r } = t, o = fe(Wt, n);
|
|
2734
2734
|
return /* @__PURE__ */ i(Ke.h2, { id: o.titleId, ...r, ref: e });
|
|
2735
2735
|
}
|
|
2736
2736
|
);
|
|
2737
|
-
|
|
2738
|
-
var
|
|
2737
|
+
Un.displayName = Wt;
|
|
2738
|
+
var Vn = "DialogDescription", zi = X.forwardRef(
|
|
2739
2739
|
(t, e) => {
|
|
2740
|
-
const { __scopeDialog: n, ...r } = t, o = fe(
|
|
2740
|
+
const { __scopeDialog: n, ...r } = t, o = fe(Vn, n);
|
|
2741
2741
|
return /* @__PURE__ */ i(Ke.p, { id: o.descriptionId, ...r, ref: e });
|
|
2742
2742
|
}
|
|
2743
2743
|
);
|
|
2744
|
-
zi.displayName =
|
|
2744
|
+
zi.displayName = Vn;
|
|
2745
2745
|
var Bn = "DialogClose", Zn = X.forwardRef(
|
|
2746
2746
|
(t, e) => {
|
|
2747
2747
|
const { __scopeDialog: n, ...r } = t, o = fe(Bn, n);
|
|
@@ -2751,7 +2751,7 @@ var Bn = "DialogClose", Zn = X.forwardRef(
|
|
|
2751
2751
|
type: "button",
|
|
2752
2752
|
...r,
|
|
2753
2753
|
ref: e,
|
|
2754
|
-
onClick:
|
|
2754
|
+
onClick: Ue(t.onClick, () => o.onOpenChange(!1))
|
|
2755
2755
|
}
|
|
2756
2756
|
);
|
|
2757
2757
|
}
|
|
@@ -2780,7 +2780,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2780
2780
|
const o = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2781
2781
|
e && o && (document.getElementById(e) || console.warn(r));
|
|
2782
2782
|
}, [r, t, e]), null;
|
|
2783
|
-
}, Mi = Fn, Hi = Hn, $i = $n, Gi = Gn,
|
|
2783
|
+
}, Mi = Fn, Hi = Hn, $i = $n, Gi = Gn, qi = Un, Ui = Zn;
|
|
2784
2784
|
const Oe = {
|
|
2785
2785
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2786
2786
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2789,7 +2789,7 @@ const Oe = {
|
|
|
2789
2789
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2790
2790
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2791
2791
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2792
|
-
},
|
|
2792
|
+
}, Vi = () => {
|
|
2793
2793
|
const { pdfProperties: t } = re(), { container: e } = Te(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = Oo(), { localeMessages: o } = pe(), a = W(() => {
|
|
2794
2794
|
if (!t)
|
|
2795
2795
|
return [];
|
|
@@ -2818,11 +2818,11 @@ const Oe = {
|
|
|
2818
2818
|
{ label: o == null ? void 0 : o.propertiesCreatorLabel, value: u },
|
|
2819
2819
|
{
|
|
2820
2820
|
label: o == null ? void 0 : o.propertiesCreateOnLabel,
|
|
2821
|
-
value: C ?
|
|
2821
|
+
value: C ? Vt(C) : ""
|
|
2822
2822
|
},
|
|
2823
2823
|
{
|
|
2824
2824
|
label: o == null ? void 0 : o.propertiesModifiedOnLabel,
|
|
2825
|
-
value: b ?
|
|
2825
|
+
value: b ? Vt(b) : ""
|
|
2826
2826
|
},
|
|
2827
2827
|
{ separate: !0 },
|
|
2828
2828
|
{ label: o == null ? void 0 : o.propertiesPDFProducerLabel, value: P },
|
|
@@ -2833,9 +2833,9 @@ const Oe = {
|
|
|
2833
2833
|
return /* @__PURE__ */ i(Mi, { open: n, onOpenChange: r, children: /* @__PURE__ */ i(Hi, { container: e, children: /* @__PURE__ */ k("div", { className: Oe["rp-dialog-wrapper"], children: [
|
|
2834
2834
|
/* @__PURE__ */ i($i, { className: Oe["rp-dialog-overlay"] }),
|
|
2835
2835
|
/* @__PURE__ */ k(Gi, { className: Oe["rp-document-dialog"], "aria-labelledby": "document-properties-title", children: [
|
|
2836
|
-
/* @__PURE__ */ i(
|
|
2836
|
+
/* @__PURE__ */ i(qi, { id: "document-properties-title", className: Oe["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
|
|
2837
2837
|
/* @__PURE__ */ i("div", { className: Oe["rp-document-properties"], role: "region", "aria-labelledby": "document-properties-title", children: a.map((c, d) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Oe["rp-properties-divider"], role: "separator", "aria-orientation": "horizontal" }) : /* @__PURE__ */ i(Ko, { label: c.label, value: c.value }) }, d)) }),
|
|
2838
|
-
/* @__PURE__ */ i(
|
|
2838
|
+
/* @__PURE__ */ i(Ui, { asChild: !0, className: Oe["rp-dialog-close"], "aria-label": (o == null ? void 0 : o.searchCloseButtonTooltip) || "Close dialog", children: /* @__PURE__ */ i(Er, { "aria-hidden": "true" }) })
|
|
2839
2839
|
] })
|
|
2840
2840
|
] }) }) });
|
|
2841
2841
|
}, Bi = {
|
|
@@ -3013,7 +3013,7 @@ const Oe = {
|
|
|
3013
3013
|
)
|
|
3014
3014
|
}
|
|
3015
3015
|
),
|
|
3016
|
-
/* @__PURE__ */ i(
|
|
3016
|
+
/* @__PURE__ */ i(Vi, {})
|
|
3017
3017
|
] });
|
|
3018
3018
|
}, ra = () => {
|
|
3019
3019
|
const { isSmallScreen: t } = Se();
|
|
@@ -3107,7 +3107,7 @@ const Oe = {
|
|
|
3107
3107
|
className: We["rp-current-zoom-text"]
|
|
3108
3108
|
}
|
|
3109
3109
|
),
|
|
3110
|
-
/* @__PURE__ */ i(
|
|
3110
|
+
/* @__PURE__ */ i(Ve, { className: We["rp-current-zoom-icon"] })
|
|
3111
3111
|
]
|
|
3112
3112
|
}
|
|
3113
3113
|
) }) }),
|
|
@@ -3163,7 +3163,7 @@ const Oe = {
|
|
|
3163
3163
|
disabled: o,
|
|
3164
3164
|
"aria-disabled": o,
|
|
3165
3165
|
children: /* @__PURE__ */ i(
|
|
3166
|
-
|
|
3166
|
+
Ve,
|
|
3167
3167
|
{
|
|
3168
3168
|
className: ne["rp-search-tool-input-icon"],
|
|
3169
3169
|
"aria-hidden": "true"
|
|
@@ -3187,7 +3187,7 @@ const Oe = {
|
|
|
3187
3187
|
disabled: o,
|
|
3188
3188
|
"aria-disabled": o,
|
|
3189
3189
|
children: /* @__PURE__ */ i(
|
|
3190
|
-
|
|
3190
|
+
Ve,
|
|
3191
3191
|
{
|
|
3192
3192
|
style: { transform: "rotate(180deg" },
|
|
3193
3193
|
className: ne["rp-search-tool-input-icon"],
|
|
@@ -3248,7 +3248,7 @@ const Oe = {
|
|
|
3248
3248
|
h($.target.value);
|
|
3249
3249
|
}, []), L = N(() => {
|
|
3250
3250
|
h(""), m("");
|
|
3251
|
-
}, [m]), F = W(() => `${u} / ${C}`, [u, C]), { wholeWords: G, matchCase:
|
|
3251
|
+
}, [m]), F = W(() => `${u} / ${C}`, [u, C]), { wholeWords: G, matchCase: q } = W(() => d, [d]), U = N(
|
|
3252
3252
|
($) => {
|
|
3253
3253
|
s((Q) => ({ ...Q, matchCase: $ }));
|
|
3254
3254
|
},
|
|
@@ -3350,24 +3350,24 @@ const Oe = {
|
|
|
3350
3350
|
}
|
|
3351
3351
|
) }),
|
|
3352
3352
|
f ? /* @__PURE__ */ i("span", { "aria-live": "polite", "aria-label": "Searching", children: /* @__PURE__ */ i(bn, { className: ne["rp-search-loader-icon"], "aria-hidden": "true" }) }) : /* @__PURE__ */ i("span", { id: "search-results-count", "aria-live": "polite", children: F }),
|
|
3353
|
-
l && /* @__PURE__ */ i("div", { className: ne["rp-search-tool-controls"], children: /* @__PURE__ */ i(
|
|
3353
|
+
l && /* @__PURE__ */ i("div", { className: ne["rp-search-tool-controls"], children: /* @__PURE__ */ i(qt, { onKeyPress: O, handleClose: R }) })
|
|
3354
3354
|
] }),
|
|
3355
3355
|
/* @__PURE__ */ k("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
|
|
3356
3356
|
l && /* @__PURE__ */ i(hn, {}),
|
|
3357
3357
|
/* @__PURE__ */ i(
|
|
3358
|
-
|
|
3358
|
+
Ut,
|
|
3359
3359
|
{
|
|
3360
3360
|
tabIndex: 0,
|
|
3361
3361
|
name: "matchCase",
|
|
3362
|
-
value:
|
|
3363
|
-
onChange:
|
|
3362
|
+
value: q,
|
|
3363
|
+
onChange: U,
|
|
3364
3364
|
"aria-label": p == null ? void 0 : p.searchMatchCaseLabel,
|
|
3365
3365
|
children: p == null ? void 0 : p.searchMatchCaseLabel
|
|
3366
3366
|
}
|
|
3367
3367
|
),
|
|
3368
3368
|
!l && /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Xt, {}) }) }),
|
|
3369
3369
|
/* @__PURE__ */ i(
|
|
3370
|
-
|
|
3370
|
+
Ut,
|
|
3371
3371
|
{
|
|
3372
3372
|
tabIndex: 0,
|
|
3373
3373
|
name: "wholeWord",
|
|
@@ -3382,7 +3382,7 @@ const Oe = {
|
|
|
3382
3382
|
] }),
|
|
3383
3383
|
!l && /* @__PURE__ */ k("div", { className: ne["rp-search-tool-controls"], children: [
|
|
3384
3384
|
/* @__PURE__ */ i(hn, {}),
|
|
3385
|
-
/* @__PURE__ */ i(
|
|
3385
|
+
/* @__PURE__ */ i(qt, { onKeyPress: O, handleClose: R })
|
|
3386
3386
|
] })
|
|
3387
3387
|
]
|
|
3388
3388
|
}
|
|
@@ -3429,14 +3429,14 @@ const Oe = {
|
|
|
3429
3429
|
] }) }),
|
|
3430
3430
|
/* @__PURE__ */ i(f, {})
|
|
3431
3431
|
] });
|
|
3432
|
-
}),
|
|
3432
|
+
}), qe = {
|
|
3433
3433
|
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
|
|
3434
3434
|
"rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
|
|
3435
3435
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
3436
3436
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
3437
3437
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
3438
3438
|
}, ga = (t) => {
|
|
3439
|
-
const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = ce(), { pageRotate: a } = it(), c = M(null), d = Nn(), { pages: s } = re(), [f, m] = H(null), C = M(!1), u = M(), T = W(() => n ?
|
|
3439
|
+
const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = ce(), { pageRotate: a } = it(), c = M(null), d = Nn(), { pages: s } = re(), [f, m] = H(null), C = M(!1), u = M(), T = W(() => n ? qe["rp-thumbnail-active"] : "", [n]), b = W(() => ({
|
|
3440
3440
|
width: Math.round(r.width),
|
|
3441
3441
|
height: Math.round(r.height)
|
|
3442
3442
|
}), [r]), P = N(() => {
|
|
@@ -3490,7 +3490,7 @@ const Oe = {
|
|
|
3490
3490
|
(y.key === "Enter" || y.key === " ") && (y.preventDefault(), P());
|
|
3491
3491
|
},
|
|
3492
3492
|
id: `page-${e}`,
|
|
3493
|
-
className:
|
|
3493
|
+
className: qe["rp-thumbnail-wrapper"],
|
|
3494
3494
|
ref: c,
|
|
3495
3495
|
role: "button",
|
|
3496
3496
|
tabIndex: 0,
|
|
@@ -3503,7 +3503,7 @@ const Oe = {
|
|
|
3503
3503
|
style: {
|
|
3504
3504
|
transform: `rotate(${a[e || 0]}deg)`
|
|
3505
3505
|
},
|
|
3506
|
-
className: se(T,
|
|
3506
|
+
className: se(T, qe["rp-thumbnail"]),
|
|
3507
3507
|
"aria-hidden": "true",
|
|
3508
3508
|
children: f ? /* @__PURE__ */ i(
|
|
3509
3509
|
"img",
|
|
@@ -3517,7 +3517,7 @@ const Oe = {
|
|
|
3517
3517
|
) : /* @__PURE__ */ i(
|
|
3518
3518
|
"div",
|
|
3519
3519
|
{
|
|
3520
|
-
className:
|
|
3520
|
+
className: qe["rp-thumbnail-loader"],
|
|
3521
3521
|
style: {
|
|
3522
3522
|
width: `${b.width}px`,
|
|
3523
3523
|
height: `${b.height}px`
|
|
@@ -3527,7 +3527,7 @@ const Oe = {
|
|
|
3527
3527
|
)
|
|
3528
3528
|
}
|
|
3529
3529
|
),
|
|
3530
|
-
/* @__PURE__ */ i("div", { className:
|
|
3530
|
+
/* @__PURE__ */ i("div", { className: qe["rp-thumbnail-text"], "aria-hidden": "true", children: e })
|
|
3531
3531
|
]
|
|
3532
3532
|
}
|
|
3533
3533
|
);
|
|
@@ -3619,10 +3619,10 @@ const Oe = {
|
|
|
3619
3619
|
return A(() => (s && s(), () => {
|
|
3620
3620
|
f && f();
|
|
3621
3621
|
}), [s, f]), // TODO: deprecated in v2.0.0, remove later ~
|
|
3622
|
-
/* @__PURE__ */ i(zn, { toolbarRef: C, ref: e, children: /* @__PURE__ */ i(
|
|
3622
|
+
/* @__PURE__ */ i(zn, { toolbarRef: C, ref: e, children: /* @__PURE__ */ i(qo, { mobileWidth: d, onLayoutWidthChange: m, children: /* @__PURE__ */ i(Uo, { slots: r, children: /* @__PURE__ */ i(jo, { icons: o, children: /* @__PURE__ */ k(Go, { getContainerRef: T, style: a, className: c, children: [
|
|
3623
3623
|
/* @__PURE__ */ i(Gt, { href: "#rp-navigation", label: "Skip to navigation" }),
|
|
3624
3624
|
/* @__PURE__ */ i(Gt, { href: "#rp-main-content", label: "Skip to main content" }),
|
|
3625
|
-
/* @__PURE__ */ k(
|
|
3625
|
+
/* @__PURE__ */ k(Vo, { children: [
|
|
3626
3626
|
/* @__PURE__ */ k("div", { className: ye["rp-layout"], children: [
|
|
3627
3627
|
/* @__PURE__ */ i("nav", { id: "rp-navigation", role: "navigation", "aria-label": "PDF viewer toolbar", children: /* @__PURE__ */ i(
|
|
3628
3628
|
ma,
|
|
@@ -3685,20 +3685,20 @@ const Oe = {
|
|
|
3685
3685
|
) : null
|
|
3686
3686
|
] }) }) }) }) });
|
|
3687
3687
|
}), Rc = {
|
|
3688
|
-
"rp-toolbar-layout": "_rp-toolbar-
|
|
3689
|
-
"rp-content": "_rp-
|
|
3690
|
-
"rp-topbar-content": "_rp-topbar-
|
|
3691
|
-
"rp-sidebar-content": "_rp-sidebar-
|
|
3692
|
-
"rp-pages": "_rp-
|
|
3693
|
-
"rp-thumbnails-wrapper": "_rp-thumbnails-
|
|
3694
|
-
"rp-thumbnails-wrapper-hidden": "_rp-thumbnails-wrapper-
|
|
3688
|
+
"rp-toolbar-layout": "_rp-toolbar-layout_qsonu_1",
|
|
3689
|
+
"rp-content": "_rp-content_qsonu_7",
|
|
3690
|
+
"rp-topbar-content": "_rp-topbar-content_qsonu_13",
|
|
3691
|
+
"rp-sidebar-content": "_rp-sidebar-content_qsonu_22",
|
|
3692
|
+
"rp-pages": "_rp-pages_qsonu_32",
|
|
3693
|
+
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_qsonu_37",
|
|
3694
|
+
"rp-thumbnails-wrapper-hidden": "_rp-thumbnails-wrapper-hidden_qsonu_44"
|
|
3695
3695
|
};
|
|
3696
3696
|
export {
|
|
3697
3697
|
ma as $,
|
|
3698
3698
|
Sn as A,
|
|
3699
3699
|
Br as B,
|
|
3700
3700
|
Ln as C,
|
|
3701
|
-
|
|
3701
|
+
Vi as D,
|
|
3702
3702
|
En as E,
|
|
3703
3703
|
Nn as F,
|
|
3704
3704
|
Zr as G,
|
|
@@ -3745,9 +3745,9 @@ export {
|
|
|
3745
3745
|
Ji as s,
|
|
3746
3746
|
yn as t,
|
|
3747
3747
|
ce as u,
|
|
3748
|
-
|
|
3748
|
+
qr as v,
|
|
3749
3749
|
In as w,
|
|
3750
|
-
|
|
3750
|
+
Ur as x,
|
|
3751
3751
|
xn as y,
|
|
3752
|
-
|
|
3752
|
+
Vr as z
|
|
3753
3753
|
};
|