@pdf-viewer/react 1.17.0-beta.4 → 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-e348917a.js → ToolbarLayout.module-9e2d330e.js} +155 -144
- package/dist/assets/style.css +1 -1
- package/dist/assets/style.js +5 -5
- package/dist/components/RPController.js +2 -2
- package/dist/components/RPPages.js +2 -2
- package/dist/components/RPProvider.js +2 -2
- package/dist/components/layout/LayoutContainer.js +2 -2
- package/dist/components/layout/RPDefaultLayout.js +2 -2
- package/dist/components/layout/RPLayout.js +2 -2
- package/dist/components/layout/sidebar/RPSidebar.js +2 -2
- package/dist/components/layout/sidebar/RPSplitter.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +2 -2
- package/dist/components/layout/sidebar/Thumbnails.js +2 -2
- package/dist/components/layout/toolbar/DocumentDialog.js +2 -2
- package/dist/components/layout/toolbar/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/MostPageTool.js +2 -2
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- package/dist/components/layout/toolbar/Paginate.js +2 -2
- package/dist/components/layout/toolbar/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/RPMoreOptions.js +2 -2
- package/dist/components/layout/toolbar/RPToolbar.js +2 -2
- package/dist/components/layout/toolbar/RPToolbarEnd.js +2 -2
- package/dist/components/layout/toolbar/SearchResultNavigator.js +2 -2
- package/dist/components/layout/toolbar/SearchTool.js +2 -2
- package/dist/components/layout/toolbar/ThumbnailTool.js +2 -2
- package/dist/components/layout/toolbar/ToolbarCustom.js +10 -9
- package/dist/components/layout/toolbar/ToolbarDefault.js +13 -12
- package/dist/components/layout/toolbar/ToolbarLayout.js +2 -2
- package/dist/components/layout/toolbar/ZoomTool.js +2 -2
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +2 -2
- package/dist/components/layout/toolbar/tools/DualPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +16 -17
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/InputPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/NextPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +2 -2
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +2 -2
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +2 -2
- package/dist/components/page/AnnotationLayer.js +2 -2
- package/dist/components/page/CanvasLayer.js +2 -2
- package/dist/components/page/DualPage.js +2 -2
- package/dist/components/page/DualPageWithCover.js +2 -2
- package/dist/components/page/RPPage.js +2 -2
- package/dist/components/page/SinglePage.js +2 -2
- package/dist/components/page/TextHighlightLayer.js +2 -2
- package/dist/components/page/TextLayer.js +2 -2
- package/dist/components/ui/LoadingIndicator.js +2 -2
- package/dist/contexts/PaginationContext.js +2 -2
- package/dist/contexts/PrintContext.js +2 -2
- package/dist/contexts/RenderQueueProvider.js +2 -2
- package/dist/contexts/SearchContext.js +2 -2
- package/dist/contexts/ThumbnailsContext.js +2 -2
- package/dist/main.js +2 -2
- package/dist/utils/annotations.js +6 -6
- package/dist/utils/hooks/useFileDownload.js +2 -2
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +2 -2
- package/dist/utils/hooks/usePresentPage.js +2 -2
- package/dist/utils/hooks/usePrint.js +2 -2
- package/dist/utils/hooks/useScrollToPage.js +2 -2
- package/dist/utils/hooks/useSearch.js +2 -2
- package/dist/utils/hooks/useThumbnail.js +2 -2
- package/dist/utils/hooks/useVirtualReactWindow.js +2 -2
- package/package.json +1 -1
- package/dist/RPSplitter-b942c039.js +0 -68
|
@@ -12,7 +12,7 @@ import { useDarkModeContext as bo } from "./contexts/DarkModeContext.js";
|
|
|
12
12
|
import "./contexts/RotationContext.js";
|
|
13
13
|
import { useLayerContext as _o } from "./contexts/LayerContext.js";
|
|
14
14
|
import { useZoomContext as ot } from "./contexts/ZoomContext.js";
|
|
15
|
-
import { useViewModeContext as
|
|
15
|
+
import { useViewModeContext as $e } from "./contexts/ViewModeContext.js";
|
|
16
16
|
import { useVirtualScrollContext as rt } from "./contexts/VirtualScrollContext.js";
|
|
17
17
|
import { useVirtualGridContext as vn } from "./contexts/VirtualGridContext.js";
|
|
18
18
|
import { useSelectionModeContext as Po } from "./contexts/SelectionModeContext.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";
|
|
@@ -105,7 +105,7 @@ import { SearchIcon as Cn } from "./components/icons/SearchIcon.js";
|
|
|
105
105
|
import { ClearIcon as Gr } from "./components/icons/ClearIcon.js";
|
|
106
106
|
import { InfoIcon as Xt } from "./components/icons/InfoIcon.js";
|
|
107
107
|
const yn = () => {
|
|
108
|
-
const { viewMode: t } =
|
|
108
|
+
const { viewMode: t } = $e(), { scrollMode: e } = Ae(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = rt(), { setFocusedPage: a } = ce(), c = M(), { columnCount: d } = vn(), { widths: s, heights: f } = je(), m = M(e), C = M(t), u = M(d), { targetScrollPage: T } = wn();
|
|
109
109
|
A(() => {
|
|
110
110
|
n != null && n.scrollToItem && (c.current = n);
|
|
111
111
|
}, [n]), A(() => {
|
|
@@ -202,8 +202,8 @@ const yn = () => {
|
|
|
202
202
|
s
|
|
203
203
|
]
|
|
204
204
|
) };
|
|
205
|
-
},
|
|
206
|
-
const [e, n] = H(t), [r, o] = H(0), { scrollToPage: a } = yn(), c = M(1), { viewMode: d } =
|
|
205
|
+
}, qr = (t = 1) => {
|
|
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)
|
|
209
209
|
return { success: !1, currentPage: c.current };
|
|
@@ -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
|
{
|
|
@@ -561,7 +561,7 @@ const yn = () => {
|
|
|
561
561
|
}
|
|
562
562
|
);
|
|
563
563
|
}, Br = (t = {}, e = "") => {
|
|
564
|
-
const [n, r] = H(e), [o, a] = H(!1), { pdf: c, pages: d } = re(), { widths: s, heights: f } = je(), m = M(!n), { currentZoom: C } = ot(), [u, T] = H([]), { setFocusedPage: b } = ce(), { columnCount: P } =
|
|
564
|
+
const [n, r] = H(e), [o, a] = H(!1), { pdf: c, pages: d } = re(), { widths: s, heights: f } = je(), m = M(!n), { currentZoom: C } = ot(), [u, T] = H([]), { setFocusedPage: b } = ce(), { columnCount: P } = $e(), { pageRotate: y } = it(), [w, g] = H(0), { pageScrollElementRef: h, virtualScrollableElementRef: p } = rt(), { scrollMode: l } = Ae(), { pagesRef: v } = Te(), _ = M({}), I = M(0), S = W(() => w === 0 ? null : u[w - 1], [w, u]), x = W(() => u.length, [u]), R = N(
|
|
565
565
|
(E) => {
|
|
566
566
|
if (E === 0)
|
|
567
567
|
return;
|
|
@@ -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
|
}
|
|
@@ -1225,7 +1225,7 @@ const Jr = (t) => {
|
|
|
1225
1225
|
},
|
|
1226
1226
|
h
|
|
1227
1227
|
)) }) });
|
|
1228
|
-
},
|
|
1228
|
+
}, He = at((t, e) => {
|
|
1229
1229
|
const { pageNumber: n, style: r, ...o } = t, { pages: a } = re(), { pageRotate: c } = it(), { textLayer: d } = _o(), { currentZoom: s } = ot(), { LoaderImageComponent: f } = St(), m = M(a.get(n)), [C, u] = H(!1), T = M(null), [b, P] = H({
|
|
1230
1230
|
width: 0,
|
|
1231
1231
|
height: 0
|
|
@@ -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",
|
|
@@ -1775,7 +1775,7 @@ function gi(t, e) {
|
|
|
1775
1775
|
return !sn(n, o) && !sn(r, a);
|
|
1776
1776
|
}
|
|
1777
1777
|
const vi = () => {
|
|
1778
|
-
const { viewMode: t } =
|
|
1778
|
+
const { viewMode: t } = $e(), { scrollMode: e } = Ae(), { setColumnCount: n } = vn(), { virtualScrollableElementRef: r } = rt(), o = je(), a = W(() => o.heights.length, [o.heights]), c = W(() => e === ie.HORIZONTAL_SCROLLING ? a : t === oe.DUAL_PAGE || t === oe.DUAL_PAGE_WITH_COVER ? 2 : 1, [t, e, e, a, r]), d = W(() => {
|
|
1779
1779
|
if (t === oe.DUAL_PAGE_WITH_COVER && o.widths.length > 0) {
|
|
1780
1780
|
const w = [0, 0];
|
|
1781
1781
|
return o.widths.forEach((g, h) => {
|
|
@@ -2034,7 +2034,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
];
|
|
2036
2036
|
}, [t, e, o]), c = W(() => a.reduce((d, s) => d + Number(s.width || 0), 0), [a]);
|
|
2037
|
-
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: o.map((d, s) => /* @__PURE__ */ i(
|
|
2037
|
+
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: o.map((d, s) => /* @__PURE__ */ i(He, { style: a[s], pageNumber: d }, d)) });
|
|
2038
2038
|
}), Pi = It(({ widths: t, heights: e }) => {
|
|
2039
2039
|
const { focusedPage: n, totalPages: r } = ce(), o = W(() => {
|
|
2040
2040
|
const d = [];
|
|
@@ -2092,7 +2092,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
];
|
|
2094
2094
|
}, [t, e, o]);
|
|
2095
|
-
return /* @__PURE__ */ i("div", { style: a, children: o.map((d, s) => /* @__PURE__ */ i(
|
|
2095
|
+
return /* @__PURE__ */ i("div", { style: a, children: o.map((d, s) => /* @__PURE__ */ i(He, { style: c[s], pageNumber: d }, d)) });
|
|
2096
2096
|
}), Ti = ({ widths: t, heights: e }) => {
|
|
2097
2097
|
const { focusedPage: n } = ce(), r = W(() => ({
|
|
2098
2098
|
position: "absolute",
|
|
@@ -2106,7 +2106,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2106
2106
|
width: o,
|
|
2107
2107
|
position: "relative"
|
|
2108
2108
|
},
|
|
2109
|
-
children: /* @__PURE__ */ i(
|
|
2109
|
+
children: /* @__PURE__ */ i(He, { style: r, pageNumber: n }, n)
|
|
2110
2110
|
}
|
|
2111
2111
|
);
|
|
2112
2112
|
}, Ci = (t, e, n, r) => {
|
|
@@ -2201,12 +2201,23 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2201
2201
|
justifyContent: "center",
|
|
2202
2202
|
alignItems: "flex-start"
|
|
2203
2203
|
},
|
|
2204
|
-
children: /* @__PURE__ */ i(
|
|
2204
|
+
children: /* @__PURE__ */ i(He, { style: { position: "relative" }, pageNumber: o }, o)
|
|
2205
2205
|
}
|
|
2206
2206
|
);
|
|
2207
2207
|
}
|
|
2208
2208
|
}
|
|
2209
|
-
return /* @__PURE__ */ i(
|
|
2209
|
+
return n.columnCount === 2 ? /* @__PURE__ */ i(
|
|
2210
|
+
"div",
|
|
2211
|
+
{
|
|
2212
|
+
style: {
|
|
2213
|
+
...r,
|
|
2214
|
+
display: "flex",
|
|
2215
|
+
justifyContent: t === 0 ? "flex-end" : "flex-start",
|
|
2216
|
+
alignItems: "flex-start"
|
|
2217
|
+
},
|
|
2218
|
+
children: /* @__PURE__ */ i(He, { style: { position: "relative" }, pageNumber: o }, o)
|
|
2219
|
+
}
|
|
2220
|
+
) : /* @__PURE__ */ i(He, { style: r, pageNumber: o }, o);
|
|
2210
2221
|
}, gi), yc = () => {
|
|
2211
2222
|
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = xt(), { pagesRef: r, setPagesRef: o, setContentRef: a } = Te(), { scrollToPage: c } = yn();
|
|
2212
2223
|
fr(r);
|
|
@@ -2219,7 +2230,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2219
2230
|
virtualScrollableElementRef: u,
|
|
2220
2231
|
totalInnerDimensions: T,
|
|
2221
2232
|
pageScrollElementRef: b
|
|
2222
|
-
} = rt(), P = M(!0), { nextPage: y, prevPage: w, setFocusedPage: g, focusedPage: h, totalPages: p } = ce(), { scrollMode: l } = Ae(), { viewMode: v } =
|
|
2233
|
+
} = rt(), P = M(!0), { nextPage: y, prevPage: w, setFocusedPage: g, focusedPage: h, totalPages: p } = ce(), { scrollMode: l } = Ae(), { viewMode: v } = $e(), _ = M(null), { loading: I, error: S } = re(), { passwordRequired: x } = wo(), { LoaderImageComponent: R } = St(), O = M(
|
|
2223
2234
|
T
|
|
2224
2235
|
), D = M({
|
|
2225
2236
|
viewMode: v,
|
|
@@ -2227,14 +2238,14 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2227
2238
|
}), z = M(!1), E = M(), { isFullScreen: L } = To(), {
|
|
2228
2239
|
pageDimension: F,
|
|
2229
2240
|
rowCount: G,
|
|
2230
|
-
rowHeight:
|
|
2231
|
-
columnCount:
|
|
2241
|
+
rowHeight: q,
|
|
2242
|
+
columnCount: U,
|
|
2232
2243
|
columnWidth: B,
|
|
2233
2244
|
estimatedColumnWidth: Z,
|
|
2234
2245
|
estimatedRowHeight: ae,
|
|
2235
2246
|
totalDimension: $
|
|
2236
2247
|
} = vi(), Q = Nt(T, 100), { onScroll: J } = Do(), te = M();
|
|
2237
|
-
Ci(
|
|
2248
|
+
Ci(U, G, u, v);
|
|
2238
2249
|
const ee = M({
|
|
2239
2250
|
scrollTop: 0,
|
|
2240
2251
|
scrollLeft: 0
|
|
@@ -2243,17 +2254,17 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2243
2254
|
const { isPressed: Y } = dr(), { selectionMode: we } = Po(), { initializeGrabScroll: me, resetGrabState: Re } = ur({
|
|
2244
2255
|
isPressed: Y
|
|
2245
2256
|
}), Le = W(() => we === go.HAND, [we]), lt = W(() => {
|
|
2246
|
-
const
|
|
2257
|
+
const V = Array.from({ length: U }, (j, be) => B(be));
|
|
2247
2258
|
return {
|
|
2248
|
-
columnCount:
|
|
2259
|
+
columnCount: U,
|
|
2249
2260
|
isDualPageWithCover: v === oe.DUAL_PAGE_WITH_COVER,
|
|
2250
|
-
columnWidths:
|
|
2261
|
+
columnWidths: V,
|
|
2251
2262
|
totalPages: p
|
|
2252
2263
|
};
|
|
2253
|
-
}, [
|
|
2254
|
-
(
|
|
2264
|
+
}, [U, v, B, p]), dt = N(
|
|
2265
|
+
(V) => {
|
|
2255
2266
|
const j = document.activeElement !== r;
|
|
2256
|
-
!L && j || (["ArrowUp", "ArrowLeft"].includes(
|
|
2267
|
+
!L && j || (["ArrowUp", "ArrowLeft"].includes(V.key) ? (V.preventDefault(), w()) : ["ArrowDown", "ArrowRight"].includes(V.key) && (V.preventDefault(), y()));
|
|
2257
2268
|
},
|
|
2258
2269
|
[y, w, L, l]
|
|
2259
2270
|
);
|
|
@@ -2261,19 +2272,19 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2261
2272
|
window.removeEventListener("keydown", dt);
|
|
2262
2273
|
}), [dt]), A(() => {
|
|
2263
2274
|
if (_.current && (_.current.style.position = "relative"), !!d)
|
|
2264
|
-
for (let
|
|
2265
|
-
for (let j = 0; j <
|
|
2275
|
+
for (let V = 0; V < G; V++)
|
|
2276
|
+
for (let j = 0; j < U; j++)
|
|
2266
2277
|
d.resetAfterIndices({
|
|
2267
2278
|
columnIndex: j,
|
|
2268
|
-
rowIndex:
|
|
2279
|
+
rowIndex: V,
|
|
2269
2280
|
shouldForceUpdate: !0
|
|
2270
2281
|
});
|
|
2271
|
-
}, [G,
|
|
2282
|
+
}, [G, U, F, d]);
|
|
2272
2283
|
const oo = N(
|
|
2273
|
-
(
|
|
2284
|
+
(V, j) => {
|
|
2274
2285
|
if (!u)
|
|
2275
2286
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
2276
|
-
const be = ee.current.scrollTop > j, Ee = ee.current.scrollLeft >
|
|
2287
|
+
const be = ee.current.scrollTop > j, Ee = ee.current.scrollLeft > V;
|
|
2277
2288
|
return be || Ee ? ee.current : {
|
|
2278
2289
|
scrollTop: u.scrollTop,
|
|
2279
2290
|
scrollLeft: u.scrollLeft
|
|
@@ -2281,7 +2292,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2281
2292
|
},
|
|
2282
2293
|
[u]
|
|
2283
2294
|
), kt = N(
|
|
2284
|
-
(
|
|
2295
|
+
(V, j) => {
|
|
2285
2296
|
if (D.current.viewMode !== v || D.current.scrollMode !== l) {
|
|
2286
2297
|
te.current && clearTimeout(te.current), z.current = !0, c(h, "auto"), te.current = setTimeout(() => {
|
|
2287
2298
|
requestAnimationFrame(() => {
|
|
@@ -2290,7 +2301,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2290
2301
|
}, 100);
|
|
2291
2302
|
return;
|
|
2292
2303
|
}
|
|
2293
|
-
const Ee =
|
|
2304
|
+
const Ee = V.scrollTop, ut = V.scrollLeft;
|
|
2294
2305
|
if (!j.height || !j.width)
|
|
2295
2306
|
return;
|
|
2296
2307
|
z.current = !0;
|
|
@@ -2315,23 +2326,23 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2315
2326
|
);
|
|
2316
2327
|
A(() => {
|
|
2317
2328
|
clearTimeout(E.current);
|
|
2318
|
-
const
|
|
2319
|
-
(Ee, ut, Ne) => Ee +
|
|
2329
|
+
const V = Array.from({ length: G }).reduce(
|
|
2330
|
+
(Ee, ut, Ne) => Ee + q(Ne),
|
|
2320
2331
|
0
|
|
2321
|
-
), j = Array.from({ length:
|
|
2332
|
+
), j = Array.from({ length: U }).reduce(
|
|
2322
2333
|
(Ee, ut, Ne) => Ee + B(Ne),
|
|
2323
2334
|
0
|
|
2324
|
-
), be = oo(j,
|
|
2325
|
-
ee.current = be, kt(be, { height:
|
|
2326
|
-
height:
|
|
2335
|
+
), be = oo(j, V);
|
|
2336
|
+
ee.current = be, kt(be, { height: V, width: j }), C({
|
|
2337
|
+
height: V,
|
|
2327
2338
|
width: j
|
|
2328
2339
|
});
|
|
2329
|
-
}, [F, G,
|
|
2340
|
+
}, [F, G, U, kt]);
|
|
2330
2341
|
const ro = N(
|
|
2331
|
-
(
|
|
2342
|
+
(V) => {
|
|
2332
2343
|
ee.current = {
|
|
2333
|
-
scrollTop:
|
|
2334
|
-
scrollLeft:
|
|
2344
|
+
scrollTop: V.scrollTop,
|
|
2345
|
+
scrollLeft: V.scrollLeft
|
|
2335
2346
|
};
|
|
2336
2347
|
},
|
|
2337
2348
|
[u]
|
|
@@ -2348,8 +2359,8 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2348
2359
|
[le["rp-cursor-grab"]]: Le && !Y,
|
|
2349
2360
|
[le["rp-cursor-grabbing"]]: Le && Y
|
|
2350
2361
|
}), [Le, Y]), ao = N(
|
|
2351
|
-
(
|
|
2352
|
-
if (Le &&
|
|
2362
|
+
(V) => {
|
|
2363
|
+
if (Le && V) {
|
|
2353
2364
|
const j = se(le["rp-pages"]), be = document.querySelector(`.${j}`);
|
|
2354
2365
|
me(be);
|
|
2355
2366
|
}
|
|
@@ -2380,13 +2391,13 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2380
2391
|
ref: o,
|
|
2381
2392
|
tabIndex: -1,
|
|
2382
2393
|
className: io,
|
|
2383
|
-
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(
|
|
2384
2395
|
"div",
|
|
2385
2396
|
{
|
|
2386
2397
|
ref: f,
|
|
2387
|
-
style: { width:
|
|
2398
|
+
style: { width: V, height: j },
|
|
2388
2399
|
className: se(le["rp-pages"], le["rp-page-scrolling-wrapper"]),
|
|
2389
|
-
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 })
|
|
2390
2401
|
}
|
|
2391
2402
|
) : ae ? /* @__PURE__ */ i(
|
|
2392
2403
|
hi,
|
|
@@ -2396,11 +2407,11 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2396
2407
|
outerRef: m,
|
|
2397
2408
|
innerRef: _,
|
|
2398
2409
|
onScroll: ro,
|
|
2399
|
-
columnCount:
|
|
2410
|
+
columnCount: U,
|
|
2400
2411
|
columnWidth: B,
|
|
2401
|
-
rowHeight:
|
|
2412
|
+
rowHeight: q,
|
|
2402
2413
|
height: j,
|
|
2403
|
-
width:
|
|
2414
|
+
width: V,
|
|
2404
2415
|
estimatedColumnWidth: Z,
|
|
2405
2416
|
estimatedRowHeight: ae,
|
|
2406
2417
|
rowCount: G,
|
|
@@ -2412,7 +2423,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2412
2423
|
"--rp-pages-height": `${$.height}px`,
|
|
2413
2424
|
"--rp-pages-width": `${$.width}px`,
|
|
2414
2425
|
"--rp-row-count": `${G}`,
|
|
2415
|
-
"--rp-column-count": `${
|
|
2426
|
+
"--rp-column-count": `${U}`
|
|
2416
2427
|
},
|
|
2417
2428
|
children: yi
|
|
2418
2429
|
}
|
|
@@ -2444,7 +2455,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2444
2455
|
) }),
|
|
2445
2456
|
x && /* @__PURE__ */ i(hr, {})
|
|
2446
2457
|
] });
|
|
2447
|
-
},
|
|
2458
|
+
}, Ge = {
|
|
2448
2459
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
2449
2460
|
"rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
|
|
2450
2461
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
@@ -2461,7 +2472,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2461
2472
|
const { nextIcon: t } = ve(), { nextIcon: e } = ge();
|
|
2462
2473
|
return t || e || /* @__PURE__ */ i(Ve, { style: { transform: "rotate(180deg" } });
|
|
2463
2474
|
}, Si = () => {
|
|
2464
|
-
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: a } = ce(), [c, d] = H(t.toString()), { pageNavigationTool: s = !0 } = Ce(), { pageNavigationTool: f = !0 } = xe(), { isSmallScreen: m } = Se(), { viewMode: C } =
|
|
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();
|
|
2465
2476
|
A(() => {
|
|
2466
2477
|
d(t.toString());
|
|
2467
2478
|
}, [t]);
|
|
@@ -2640,7 +2651,7 @@ var Di = X.forwardRef(
|
|
|
2640
2651
|
if (a)
|
|
2641
2652
|
return xr(a);
|
|
2642
2653
|
}, []), /* @__PURE__ */ i(
|
|
2643
|
-
|
|
2654
|
+
qn,
|
|
2644
2655
|
{
|
|
2645
2656
|
...t,
|
|
2646
2657
|
ref: o,
|
|
@@ -2665,7 +2676,7 @@ var Di = X.forwardRef(
|
|
|
2665
2676
|
(t, e) => {
|
|
2666
2677
|
const n = fe(De, t.__scopeDialog), r = X.useRef(!1), o = X.useRef(!1);
|
|
2667
2678
|
return /* @__PURE__ */ i(
|
|
2668
|
-
|
|
2679
|
+
qn,
|
|
2669
2680
|
{
|
|
2670
2681
|
...t,
|
|
2671
2682
|
ref: e,
|
|
@@ -2684,7 +2695,7 @@ var Di = X.forwardRef(
|
|
|
2684
2695
|
}
|
|
2685
2696
|
);
|
|
2686
2697
|
}
|
|
2687
|
-
),
|
|
2698
|
+
), qn = X.forwardRef(
|
|
2688
2699
|
(t, e) => {
|
|
2689
2700
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = t, d = fe(De, n), s = X.useRef(null), f = Ot(e, s);
|
|
2690
2701
|
return Sr(), /* @__PURE__ */ k(he, { children: [
|
|
@@ -2717,20 +2728,20 @@ var Di = X.forwardRef(
|
|
|
2717
2728
|
] })
|
|
2718
2729
|
] });
|
|
2719
2730
|
}
|
|
2720
|
-
), Wt = "DialogTitle",
|
|
2731
|
+
), Wt = "DialogTitle", Un = X.forwardRef(
|
|
2721
2732
|
(t, e) => {
|
|
2722
2733
|
const { __scopeDialog: n, ...r } = t, o = fe(Wt, n);
|
|
2723
2734
|
return /* @__PURE__ */ i(Ke.h2, { id: o.titleId, ...r, ref: e });
|
|
2724
2735
|
}
|
|
2725
2736
|
);
|
|
2726
|
-
|
|
2727
|
-
var
|
|
2737
|
+
Un.displayName = Wt;
|
|
2738
|
+
var Vn = "DialogDescription", zi = X.forwardRef(
|
|
2728
2739
|
(t, e) => {
|
|
2729
|
-
const { __scopeDialog: n, ...r } = t, o = fe(
|
|
2740
|
+
const { __scopeDialog: n, ...r } = t, o = fe(Vn, n);
|
|
2730
2741
|
return /* @__PURE__ */ i(Ke.p, { id: o.descriptionId, ...r, ref: e });
|
|
2731
2742
|
}
|
|
2732
2743
|
);
|
|
2733
|
-
zi.displayName =
|
|
2744
|
+
zi.displayName = Vn;
|
|
2734
2745
|
var Bn = "DialogClose", Zn = X.forwardRef(
|
|
2735
2746
|
(t, e) => {
|
|
2736
2747
|
const { __scopeDialog: n, ...r } = t, o = fe(Bn, n);
|
|
@@ -2769,7 +2780,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2769
2780
|
const o = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2770
2781
|
e && o && (document.getElementById(e) || console.warn(r));
|
|
2771
2782
|
}, [r, t, e]), null;
|
|
2772
|
-
}, Mi = Fn, Hi = Hn, $i = $n, Gi = Gn,
|
|
2783
|
+
}, Mi = Fn, Hi = Hn, $i = $n, Gi = Gn, qi = Un, Ui = Zn;
|
|
2773
2784
|
const Oe = {
|
|
2774
2785
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2775
2786
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2778,7 +2789,7 @@ const Oe = {
|
|
|
2778
2789
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2779
2790
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2780
2791
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2781
|
-
},
|
|
2792
|
+
}, Vi = () => {
|
|
2782
2793
|
const { pdfProperties: t } = re(), { container: e } = Te(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = Oo(), { localeMessages: o } = pe(), a = W(() => {
|
|
2783
2794
|
if (!t)
|
|
2784
2795
|
return [];
|
|
@@ -2807,11 +2818,11 @@ const Oe = {
|
|
|
2807
2818
|
{ label: o == null ? void 0 : o.propertiesCreatorLabel, value: u },
|
|
2808
2819
|
{
|
|
2809
2820
|
label: o == null ? void 0 : o.propertiesCreateOnLabel,
|
|
2810
|
-
value: C ?
|
|
2821
|
+
value: C ? Vt(C) : ""
|
|
2811
2822
|
},
|
|
2812
2823
|
{
|
|
2813
2824
|
label: o == null ? void 0 : o.propertiesModifiedOnLabel,
|
|
2814
|
-
value: b ?
|
|
2825
|
+
value: b ? Vt(b) : ""
|
|
2815
2826
|
},
|
|
2816
2827
|
{ separate: !0 },
|
|
2817
2828
|
{ label: o == null ? void 0 : o.propertiesPDFProducerLabel, value: P },
|
|
@@ -2822,9 +2833,9 @@ const Oe = {
|
|
|
2822
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: [
|
|
2823
2834
|
/* @__PURE__ */ i($i, { className: Oe["rp-dialog-overlay"] }),
|
|
2824
2835
|
/* @__PURE__ */ k(Gi, { className: Oe["rp-document-dialog"], "aria-labelledby": "document-properties-title", children: [
|
|
2825
|
-
/* @__PURE__ */ i(
|
|
2836
|
+
/* @__PURE__ */ i(qi, { id: "document-properties-title", className: Oe["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
|
|
2826
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)) }),
|
|
2827
|
-
/* @__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" }) })
|
|
2828
2839
|
] })
|
|
2829
2840
|
] }) }) });
|
|
2830
2841
|
}, Bi = {
|
|
@@ -3002,7 +3013,7 @@ const Oe = {
|
|
|
3002
3013
|
)
|
|
3003
3014
|
}
|
|
3004
3015
|
),
|
|
3005
|
-
/* @__PURE__ */ i(
|
|
3016
|
+
/* @__PURE__ */ i(Vi, {})
|
|
3006
3017
|
] });
|
|
3007
3018
|
}, ra = () => {
|
|
3008
3019
|
const { isSmallScreen: t } = Se();
|
|
@@ -3237,7 +3248,7 @@ const Oe = {
|
|
|
3237
3248
|
h($.target.value);
|
|
3238
3249
|
}, []), L = N(() => {
|
|
3239
3250
|
h(""), m("");
|
|
3240
|
-
}, [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(
|
|
3241
3252
|
($) => {
|
|
3242
3253
|
s((Q) => ({ ...Q, matchCase: $ }));
|
|
3243
3254
|
},
|
|
@@ -3339,24 +3350,24 @@ const Oe = {
|
|
|
3339
3350
|
}
|
|
3340
3351
|
) }),
|
|
3341
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 }),
|
|
3342
|
-
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 }) })
|
|
3343
3354
|
] }),
|
|
3344
3355
|
/* @__PURE__ */ k("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
|
|
3345
3356
|
l && /* @__PURE__ */ i(hn, {}),
|
|
3346
3357
|
/* @__PURE__ */ i(
|
|
3347
|
-
|
|
3358
|
+
Ut,
|
|
3348
3359
|
{
|
|
3349
3360
|
tabIndex: 0,
|
|
3350
3361
|
name: "matchCase",
|
|
3351
|
-
value:
|
|
3352
|
-
onChange:
|
|
3362
|
+
value: q,
|
|
3363
|
+
onChange: U,
|
|
3353
3364
|
"aria-label": p == null ? void 0 : p.searchMatchCaseLabel,
|
|
3354
3365
|
children: p == null ? void 0 : p.searchMatchCaseLabel
|
|
3355
3366
|
}
|
|
3356
3367
|
),
|
|
3357
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, {}) }) }),
|
|
3358
3369
|
/* @__PURE__ */ i(
|
|
3359
|
-
|
|
3370
|
+
Ut,
|
|
3360
3371
|
{
|
|
3361
3372
|
tabIndex: 0,
|
|
3362
3373
|
name: "wholeWord",
|
|
@@ -3371,7 +3382,7 @@ const Oe = {
|
|
|
3371
3382
|
] }),
|
|
3372
3383
|
!l && /* @__PURE__ */ k("div", { className: ne["rp-search-tool-controls"], children: [
|
|
3373
3384
|
/* @__PURE__ */ i(hn, {}),
|
|
3374
|
-
/* @__PURE__ */ i(
|
|
3385
|
+
/* @__PURE__ */ i(qt, { onKeyPress: O, handleClose: R })
|
|
3375
3386
|
] })
|
|
3376
3387
|
]
|
|
3377
3388
|
}
|
|
@@ -3408,24 +3419,24 @@ const Oe = {
|
|
|
3408
3419
|
return /* @__PURE__ */ i(fa, { percentage: d });
|
|
3409
3420
|
};
|
|
3410
3421
|
return /* @__PURE__ */ k("div", { children: [
|
|
3411
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className:
|
|
3412
|
-
/* @__PURE__ */ k("div", { "data-rp": "topBarLeft", className:
|
|
3422
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: Ge["rp-toolbar-content"], children: /* @__PURE__ */ k("div", { className: Ge["rp-toolbar-wrapper"], style: s(), children: [
|
|
3423
|
+
/* @__PURE__ */ k("div", { "data-rp": "topBarLeft", className: Ge["rp-toolbar-start"], children: [
|
|
3413
3424
|
/* @__PURE__ */ i(pa, {}),
|
|
3414
3425
|
/* @__PURE__ */ i(Si, {})
|
|
3415
3426
|
] }),
|
|
3416
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className:
|
|
3417
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className:
|
|
3427
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ge["rp-toolbar-middle"], children: /* @__PURE__ */ i(da, {}) }),
|
|
3428
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ge["rp-toolbar-end"], children: /* @__PURE__ */ i(ra, {}) })
|
|
3418
3429
|
] }) }),
|
|
3419
3430
|
/* @__PURE__ */ i(f, {})
|
|
3420
3431
|
] });
|
|
3421
|
-
}),
|
|
3432
|
+
}), qe = {
|
|
3422
3433
|
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
|
|
3423
3434
|
"rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
|
|
3424
3435
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
3425
3436
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
3426
3437
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
3427
3438
|
}, ga = (t) => {
|
|
3428
|
-
const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = ce(), { pageRotate: a } = it(), c = M(null), d = Nn(), { pages: s } = re(), [f, m] = H(null), C = M(!1), u = M(), T = W(() => n ?
|
|
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(() => ({
|
|
3429
3440
|
width: Math.round(r.width),
|
|
3430
3441
|
height: Math.round(r.height)
|
|
3431
3442
|
}), [r]), P = N(() => {
|
|
@@ -3479,7 +3490,7 @@ const Oe = {
|
|
|
3479
3490
|
(y.key === "Enter" || y.key === " ") && (y.preventDefault(), P());
|
|
3480
3491
|
},
|
|
3481
3492
|
id: `page-${e}`,
|
|
3482
|
-
className:
|
|
3493
|
+
className: qe["rp-thumbnail-wrapper"],
|
|
3483
3494
|
ref: c,
|
|
3484
3495
|
role: "button",
|
|
3485
3496
|
tabIndex: 0,
|
|
@@ -3492,7 +3503,7 @@ const Oe = {
|
|
|
3492
3503
|
style: {
|
|
3493
3504
|
transform: `rotate(${a[e || 0]}deg)`
|
|
3494
3505
|
},
|
|
3495
|
-
className: se(T,
|
|
3506
|
+
className: se(T, qe["rp-thumbnail"]),
|
|
3496
3507
|
"aria-hidden": "true",
|
|
3497
3508
|
children: f ? /* @__PURE__ */ i(
|
|
3498
3509
|
"img",
|
|
@@ -3506,7 +3517,7 @@ const Oe = {
|
|
|
3506
3517
|
) : /* @__PURE__ */ i(
|
|
3507
3518
|
"div",
|
|
3508
3519
|
{
|
|
3509
|
-
className:
|
|
3520
|
+
className: qe["rp-thumbnail-loader"],
|
|
3510
3521
|
style: {
|
|
3511
3522
|
width: `${b.width}px`,
|
|
3512
3523
|
height: `${b.height}px`
|
|
@@ -3516,7 +3527,7 @@ const Oe = {
|
|
|
3516
3527
|
)
|
|
3517
3528
|
}
|
|
3518
3529
|
),
|
|
3519
|
-
/* @__PURE__ */ i("div", { className:
|
|
3530
|
+
/* @__PURE__ */ i("div", { className: qe["rp-thumbnail-text"], "aria-hidden": "true", children: e })
|
|
3520
3531
|
]
|
|
3521
3532
|
}
|
|
3522
3533
|
);
|
|
@@ -3608,10 +3619,10 @@ const Oe = {
|
|
|
3608
3619
|
return A(() => (s && s(), () => {
|
|
3609
3620
|
f && f();
|
|
3610
3621
|
}), [s, f]), // TODO: deprecated in v2.0.0, remove later ~
|
|
3611
|
-
/* @__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: [
|
|
3612
3623
|
/* @__PURE__ */ i(Gt, { href: "#rp-navigation", label: "Skip to navigation" }),
|
|
3613
3624
|
/* @__PURE__ */ i(Gt, { href: "#rp-main-content", label: "Skip to main content" }),
|
|
3614
|
-
/* @__PURE__ */ k(
|
|
3625
|
+
/* @__PURE__ */ k(Vo, { children: [
|
|
3615
3626
|
/* @__PURE__ */ k("div", { className: ye["rp-layout"], children: [
|
|
3616
3627
|
/* @__PURE__ */ i("nav", { id: "rp-navigation", role: "navigation", "aria-label": "PDF viewer toolbar", children: /* @__PURE__ */ i(
|
|
3617
3628
|
ma,
|
|
@@ -3674,27 +3685,27 @@ const Oe = {
|
|
|
3674
3685
|
) : null
|
|
3675
3686
|
] }) }) }) }) });
|
|
3676
3687
|
}), Rc = {
|
|
3677
|
-
"rp-toolbar-layout": "_rp-toolbar-
|
|
3678
|
-
"rp-content": "_rp-
|
|
3679
|
-
"rp-topbar-content": "_rp-topbar-
|
|
3680
|
-
"rp-sidebar-content": "_rp-sidebar-
|
|
3681
|
-
"rp-pages": "_rp-
|
|
3682
|
-
"rp-thumbnails-wrapper": "_rp-thumbnails-
|
|
3683
|
-
"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"
|
|
3684
3695
|
};
|
|
3685
3696
|
export {
|
|
3686
3697
|
ma as $,
|
|
3687
3698
|
Sn as A,
|
|
3688
3699
|
Br as B,
|
|
3689
3700
|
Ln as C,
|
|
3690
|
-
|
|
3701
|
+
Vi as D,
|
|
3691
3702
|
En as E,
|
|
3692
3703
|
Nn as F,
|
|
3693
3704
|
Zr as G,
|
|
3694
3705
|
Xr as H,
|
|
3695
3706
|
Jr as I,
|
|
3696
3707
|
ti as J,
|
|
3697
|
-
|
|
3708
|
+
He as K,
|
|
3698
3709
|
zn as L,
|
|
3699
3710
|
vi as M,
|
|
3700
3711
|
_i as N,
|
|
@@ -3720,7 +3731,7 @@ export {
|
|
|
3720
3731
|
Rn as e,
|
|
3721
3732
|
_t as f,
|
|
3722
3733
|
We as g,
|
|
3723
|
-
|
|
3734
|
+
Ge as h,
|
|
3724
3735
|
da as i,
|
|
3725
3736
|
ra as j,
|
|
3726
3737
|
bc as k,
|
|
@@ -3734,9 +3745,9 @@ export {
|
|
|
3734
3745
|
Ji as s,
|
|
3735
3746
|
yn as t,
|
|
3736
3747
|
ce as u,
|
|
3737
|
-
|
|
3748
|
+
qr as v,
|
|
3738
3749
|
In as w,
|
|
3739
|
-
|
|
3750
|
+
Ur as x,
|
|
3740
3751
|
xn as y,
|
|
3741
|
-
|
|
3752
|
+
Vr as z
|
|
3742
3753
|
};
|