@pdf-viewer/react 1.4.3-rc.0 → 1.4.3
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/{RPDefaultLayout-b9f5eccb.js → RPDefaultLayout-f9017f0e.js} +559 -554
- package/dist/components/RPConfig.js +270 -259
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- 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 +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/RotateTool.js +1 -1
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +2 -2
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/Checkbox.js +109 -93
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/RPTooltip.js +363 -721
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/index-0f08882b.js +1561 -0
- package/dist/index-10ac1200.js +150 -0
- package/dist/index-271658fe.js +331 -0
- package/dist/main.js +1 -1
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +2 -2
- package/dist/index-2e540713.js +0 -23
- package/dist/index-353ec0a6.js +0 -172
- package/dist/index-5ff5dbd0.js +0 -1675
- package/dist/index-71898eb9.js +0 -139
|
@@ -7,7 +7,7 @@ import { UIInput as ar } from "./components/ui/Input.js";
|
|
|
7
7
|
import { useScrollModeContext as Oe } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as X } from "./contexts/RPDocumentContext.js";
|
|
9
9
|
import { useDarkModeContext as on } from "./contexts/DarkModeContext.js";
|
|
10
|
-
import { ViewMode as qe, ScrollMode as K, AnnotationSubType as zt, SelectionMode as an, ZoomLevel as
|
|
10
|
+
import { ViewMode as qe, ScrollMode as K, AnnotationSubType as zt, SelectionMode as an, ZoomLevel as it } from "./utils/types.js";
|
|
11
11
|
import { useRotationContext as Ke } from "./contexts/RotationContext.js";
|
|
12
12
|
import { useLayerContext as sn } from "./contexts/LayerContext.js";
|
|
13
13
|
import { useZoomContext as Xe } from "./contexts/ZoomContext.js";
|
|
@@ -20,12 +20,12 @@ import { useInitialStateContext as ln } from "./contexts/InitialStateContext.js"
|
|
|
20
20
|
import { useFullScreenContext as dn } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
|
-
import { renderPage as
|
|
23
|
+
import { renderPage as vt } from "./utils/renderPage.js";
|
|
24
24
|
import { highlightMatches as cr, findMatches as un, resetDivs as lr, highlightMultipleColorMatches as pn } from "./utils/highlight.js";
|
|
25
|
-
import * as
|
|
25
|
+
import * as Tt from "pdfjs-dist";
|
|
26
26
|
import { PixelsPerInch as hn, AnnotationMode as mn, RenderingCancelledException as fn, AnnotationLayer as gn } from "pdfjs-dist";
|
|
27
27
|
import { useLayoutContainer as Ie } from "./contexts/LayoutContainerContext.js";
|
|
28
|
-
import { useDimensionPagesContext as
|
|
28
|
+
import { useDimensionPagesContext as Pt } from "./contexts/DimensionPagesContext.js";
|
|
29
29
|
import { useLocalizationContext as me } from "./contexts/LocalizationContext.js";
|
|
30
30
|
import { useHighlightContext as vn } from "./contexts/HighlightContext.js";
|
|
31
31
|
import { useLoaderContext as dr } from "./contexts/LoaderContext.js";
|
|
@@ -33,7 +33,7 @@ import "./contexts/LicenseContext.js";
|
|
|
33
33
|
import "./components/RPConfig.js";
|
|
34
34
|
import { ThumbnailIcon as _n } from "./components/icons/Thumbnail.js";
|
|
35
35
|
import { c as oe } from "./clsx-0c6e471a.js";
|
|
36
|
-
import { LoaderIcon as
|
|
36
|
+
import { LoaderIcon as St } from "./components/icons/LoaderIcon.js";
|
|
37
37
|
import { useInfiniteScroll as wn } from "./utils/hooks/useInfiniteScroll.js";
|
|
38
38
|
import { RPSplitter as bn } from "./components/layout/sidebar/RPSplitter.js";
|
|
39
39
|
import { useToolbarComponentContext as _e, ToolbarComponentProvider as Cn } from "./contexts/ToolbarComponentContext.js";
|
|
@@ -50,7 +50,7 @@ import { _ as zn, U as An } from "./Popover-b7402893.js";
|
|
|
50
50
|
import { useMousePressed as Fn } from "./utils/hooks/useMousePressed.js";
|
|
51
51
|
import { useGrabScroll as kn } from "./utils/hooks/useGrabScroll.js";
|
|
52
52
|
import { usePinch as Mn } from "./utils/hooks/usePinch.js";
|
|
53
|
-
import { useDebounce as
|
|
53
|
+
import { useDebounce as _t } from "./utils/hooks/useDebounce.js";
|
|
54
54
|
import { getThumbnailViewport as kt } from "./utils/getThumbnailViewport.js";
|
|
55
55
|
import { smoothScrollTo as Mt } from "./utils/smoothScrollTo.js";
|
|
56
56
|
import { appConsole as Wn } from "./utils/appConsole.js";
|
|
@@ -58,10 +58,9 @@ import { FileUploadTool as ur } from "./components/layout/toolbar/FileUploadTool
|
|
|
58
58
|
import { DarkModeTool as Hn } from "./components/layout/toolbar/DarkModeTool.js";
|
|
59
59
|
import { ThreeDotIcon as $n } from "./components/icons/ThreeDotIcon.js";
|
|
60
60
|
import { UIDropDown as pr } from "./components/ui/DropDown.js";
|
|
61
|
-
import { u as
|
|
62
|
-
import {
|
|
63
|
-
import { a as
|
|
64
|
-
import { a as Zn, u as Bn, F as jn, D as Kn, b as Xn, G as Ue } from "./index-5ff5dbd0.js";
|
|
61
|
+
import { c as Vn, u as xt, P as We, b as Fe, d as yt, k as Gn, a as qn, i as Un } from "./index-271658fe.js";
|
|
62
|
+
import { D as Zn, a as at } from "./index-10ac1200.js";
|
|
63
|
+
import { a as Bn, u as jn, F as Kn, b as Xn, G as Ue } from "./index-0f08882b.js";
|
|
65
64
|
import { h as Jn } from "./component-1da194e8.js";
|
|
66
65
|
import { CloseIcon as hr } from "./components/icons/CloseIcon.js";
|
|
67
66
|
import { dateFormatter as Wt } from "./utils/dateFormatter.js";
|
|
@@ -70,7 +69,7 @@ import { useOtherToolContext as Qn, OtherToolProvider as eo } from "./contexts/O
|
|
|
70
69
|
import { DocumentProperties as to } from "./components/layout/toolbar/DocumentProperties.js";
|
|
71
70
|
import { RotateTool as ro } from "./components/layout/toolbar/RotateTool.js";
|
|
72
71
|
import { ScrollModeTool as no } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
73
|
-
import { MenuSeparator as
|
|
72
|
+
import { MenuSeparator as It } from "./components/layout/toolbar/MenuSeparator.js";
|
|
74
73
|
import { FileDownloadDefaultIcon as oo } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
75
74
|
import { MenuItem as be } from "./components/layout/toolbar/MenuItem.js";
|
|
76
75
|
import { PrintDefaultTool as io } from "./components/icons/PrintDefaultIcon.js";
|
|
@@ -86,40 +85,40 @@ import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
|
86
85
|
import { ClearIcon as po } from "./components/icons/ClearIcon.js";
|
|
87
86
|
import { InfoIcon as Vt } from "./components/icons/InfoIcon.js";
|
|
88
87
|
import './assets/RPDefaultLayout.css';const gr = () => {
|
|
89
|
-
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { virtualScrollRef: r, virtualScrollableElementRef: o, pageScrollElementRef: n } = Ye(), { setFocusedPage: a } = ce(), c = M(), { columnCount: s } = sr(), { widths: l, heights: d } =
|
|
88
|
+
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { virtualScrollRef: r, virtualScrollableElementRef: o, pageScrollElementRef: n } = Ye(), { setFocusedPage: a } = ce(), c = M(), { columnCount: s } = sr(), { widths: l, heights: d } = Pt(), u = M(e), m = M(t), p = M(s);
|
|
90
89
|
O(() => {
|
|
91
90
|
r != null && r.scrollToItem && (c.current = r);
|
|
92
91
|
}, [r]), O(() => {
|
|
93
|
-
u.current = e,
|
|
92
|
+
u.current = e, m.current = t;
|
|
94
93
|
}, [e, t]);
|
|
95
94
|
const g = I(
|
|
96
95
|
(b) => {
|
|
97
96
|
if (!n)
|
|
98
97
|
return;
|
|
99
98
|
const v = Math.ceil(b / 2) * 2 - 1;
|
|
100
|
-
return b === v + 1 ? new Promise((
|
|
99
|
+
return b === v + 1 ? new Promise((w) => {
|
|
101
100
|
n.scrollTo({
|
|
102
101
|
left: l[v],
|
|
103
102
|
top: 0
|
|
104
|
-
}),
|
|
105
|
-
}) : new Promise((
|
|
103
|
+
}), w();
|
|
104
|
+
}) : new Promise((w) => {
|
|
106
105
|
n.scrollTo({
|
|
107
106
|
left: 0,
|
|
108
107
|
top: 0
|
|
109
|
-
}),
|
|
108
|
+
}), w();
|
|
110
109
|
});
|
|
111
110
|
},
|
|
112
111
|
[n, l, Mt]
|
|
113
112
|
);
|
|
114
113
|
return O(() => {
|
|
115
|
-
u.current = e,
|
|
114
|
+
u.current = e, m.current = t;
|
|
116
115
|
}, [e, t]), O(() => {
|
|
117
|
-
|
|
116
|
+
p.current = s;
|
|
118
117
|
}, [s]), { scrollToPage: I(
|
|
119
118
|
(b) => {
|
|
120
119
|
const v = b - 1;
|
|
121
|
-
let
|
|
122
|
-
if (
|
|
120
|
+
let w = v, f = 0;
|
|
121
|
+
if (m.current === qe.DUAL_PAGE && u.current === K.PAGE_SCROLLING)
|
|
123
122
|
return g(b), Promise.resolve();
|
|
124
123
|
if (u.current === K.PAGE_SCROLLING)
|
|
125
124
|
return a(b), Promise.resolve();
|
|
@@ -127,18 +126,18 @@ import './assets/RPDefaultLayout.css';const gr = () => {
|
|
|
127
126
|
return Promise.resolve();
|
|
128
127
|
const T = o;
|
|
129
128
|
if (u.current === K.HORIZONTAL_SCROLLING) {
|
|
130
|
-
|
|
131
|
-
const
|
|
129
|
+
f = v;
|
|
130
|
+
const h = v * (l[v] ?? 0);
|
|
132
131
|
return new Promise((P) => {
|
|
133
132
|
T.scrollTo({
|
|
134
|
-
left:
|
|
133
|
+
left: h,
|
|
135
134
|
top: 0
|
|
136
135
|
}), P();
|
|
137
136
|
});
|
|
138
137
|
}
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
-
const P =
|
|
138
|
+
if (m.current === qe.DUAL_PAGE) {
|
|
139
|
+
f = v % 2, w = Math.floor(v / 2);
|
|
140
|
+
const P = w * (d[w] ?? 0), C = f * (l[f] ?? 0);
|
|
142
141
|
return new Promise((S) => {
|
|
143
142
|
T.scrollTo({
|
|
144
143
|
left: C,
|
|
@@ -146,13 +145,13 @@ import './assets/RPDefaultLayout.css';const gr = () => {
|
|
|
146
145
|
}), S();
|
|
147
146
|
});
|
|
148
147
|
}
|
|
149
|
-
const x =
|
|
148
|
+
const x = w * (d[w] ?? 0);
|
|
150
149
|
return new Promise(
|
|
151
|
-
(
|
|
150
|
+
(h) => {
|
|
152
151
|
T.scrollTo({
|
|
153
152
|
top: x,
|
|
154
153
|
left: 0
|
|
155
|
-
}),
|
|
154
|
+
}), h();
|
|
156
155
|
}
|
|
157
156
|
// smoothScrollTo(scrollElement, { left: 0, top: targetTop }, resolve)
|
|
158
157
|
);
|
|
@@ -168,23 +167,23 @@ import './assets/RPDefaultLayout.css';const gr = () => {
|
|
|
168
167
|
]
|
|
169
168
|
) };
|
|
170
169
|
}, ho = (t = 1) => {
|
|
171
|
-
const [e, r] = $(t), [o, n] = $(0), { scrollToPage: a } = gr(), c = M(1), { isScrolling: s } = Qe(), { viewMode: l } = Je(), { scrollMode: d } = Oe(), u =
|
|
170
|
+
const [e, r] = $(t), [o, n] = $(0), { scrollToPage: a } = gr(), c = M(1), { isScrolling: s } = Qe(), { viewMode: l } = Je(), { scrollMode: d } = Oe(), u = _t(e, 100), m = I(
|
|
172
171
|
(v) => {
|
|
173
172
|
if (!/^[0-9]*$/g.test(v.toString()) || !v)
|
|
174
173
|
return { success: !1, currentPage: c.current };
|
|
175
|
-
const
|
|
176
|
-
return
|
|
174
|
+
const f = +v;
|
|
175
|
+
return f < 0 || f > o ? { success: !1, currentPage: c.current } : (r(f), c.current = f, { success: !0, currentPage: +v });
|
|
177
176
|
},
|
|
178
177
|
[o]
|
|
179
|
-
),
|
|
178
|
+
), p = I(m, [m]), g = I(
|
|
180
179
|
async (v) => {
|
|
181
180
|
if (s.current)
|
|
182
181
|
return { success: !1, currentPage: c.current };
|
|
183
|
-
const
|
|
184
|
-
return
|
|
182
|
+
const w = m(v);
|
|
183
|
+
return w.success && (s.current = !0, await a(w.currentPage), s.current = !1), w;
|
|
185
184
|
},
|
|
186
|
-
[
|
|
187
|
-
),
|
|
185
|
+
[m, a]
|
|
186
|
+
), _ = I(() => {
|
|
188
187
|
let v = e - 1;
|
|
189
188
|
g(v);
|
|
190
189
|
}, [g, e, l, d]), b = I(() => {
|
|
@@ -194,10 +193,10 @@ import './assets/RPDefaultLayout.css';const gr = () => {
|
|
|
194
193
|
return {
|
|
195
194
|
focusedPage: u,
|
|
196
195
|
totalPages: o,
|
|
197
|
-
setFocusedPage:
|
|
196
|
+
setFocusedPage: p,
|
|
198
197
|
setTotalPages: n,
|
|
199
198
|
nextPage: b,
|
|
200
|
-
prevPage:
|
|
199
|
+
prevPage: _,
|
|
201
200
|
goToPage: g
|
|
202
201
|
};
|
|
203
202
|
}, vr = Be({
|
|
@@ -244,11 +243,11 @@ const mo = () => {
|
|
|
244
243
|
O(() => {
|
|
245
244
|
u.current;
|
|
246
245
|
}, [u]);
|
|
247
|
-
const
|
|
246
|
+
const m = I(() => {
|
|
248
247
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
249
248
|
const T = document.querySelector(".rp-print-zone");
|
|
250
249
|
T && T.remove();
|
|
251
|
-
}, []),
|
|
250
|
+
}, []), p = I(() => {
|
|
252
251
|
u.current = !1, a(!1), s(!1), d(null), o({
|
|
253
252
|
loadedPages: 0,
|
|
254
253
|
totalPages: 0,
|
|
@@ -256,17 +255,17 @@ const mo = () => {
|
|
|
256
255
|
});
|
|
257
256
|
}, []), g = () => {
|
|
258
257
|
u.current = !0;
|
|
259
|
-
},
|
|
258
|
+
}, _ = async ({
|
|
260
259
|
scratchCanvas: T,
|
|
261
260
|
pdfDocument: x,
|
|
262
|
-
pageNumber:
|
|
261
|
+
pageNumber: h,
|
|
263
262
|
viewerPdfPage: P,
|
|
264
263
|
printResolution: C,
|
|
265
264
|
optionalContentConfigPromise: S,
|
|
266
265
|
printAnnotationStoragePromise: A
|
|
267
266
|
}) => {
|
|
268
267
|
if (u.current) {
|
|
269
|
-
|
|
268
|
+
p();
|
|
270
269
|
return;
|
|
271
270
|
}
|
|
272
271
|
const R = C / hn.PDF;
|
|
@@ -274,11 +273,11 @@ const mo = () => {
|
|
|
274
273
|
const D = T.getContext("2d");
|
|
275
274
|
D.save(), D.fillStyle = "rgb(255, 255, 255)", D.fillRect(0, 0, T.width, T.height), D.restore();
|
|
276
275
|
const [L, F] = await Promise.all([
|
|
277
|
-
x.getPage(
|
|
276
|
+
x.getPage(h),
|
|
278
277
|
A
|
|
279
278
|
]);
|
|
280
279
|
if (u.current) {
|
|
281
|
-
|
|
280
|
+
p();
|
|
282
281
|
return;
|
|
283
282
|
}
|
|
284
283
|
const E = {
|
|
@@ -298,43 +297,43 @@ const mo = () => {
|
|
|
298
297
|
}, b = I(() => {
|
|
299
298
|
const T = window.print;
|
|
300
299
|
return new Promise((x) => {
|
|
301
|
-
const
|
|
300
|
+
const h = (S) => {
|
|
302
301
|
setTimeout(() => {
|
|
303
302
|
T.call(window), setTimeout(() => S(), 20);
|
|
304
303
|
}, 0);
|
|
305
304
|
};
|
|
306
305
|
if (document.querySelector(".rp-print-zone")) {
|
|
307
|
-
|
|
306
|
+
h(x);
|
|
308
307
|
return;
|
|
309
308
|
}
|
|
310
309
|
const C = new MutationObserver(() => {
|
|
311
|
-
document.querySelector(".rp-print-zone") && (
|
|
310
|
+
document.querySelector(".rp-print-zone") && (h(x), C.disconnect());
|
|
312
311
|
});
|
|
313
312
|
C.observe(document.body, { childList: !0, subtree: !0 });
|
|
314
313
|
});
|
|
315
314
|
}, []), v = async (T) => {
|
|
316
|
-
const x = document.createElement("img"),
|
|
317
|
-
return
|
|
315
|
+
const x = document.createElement("img"), h = document.createElement("div");
|
|
316
|
+
return h.classList.add("rp-print-page"), await new Promise((P, C) => {
|
|
318
317
|
T.toBlob((S) => {
|
|
319
318
|
S ? (x.src = URL.createObjectURL(S), x.onload = () => {
|
|
320
319
|
URL.revokeObjectURL(x.src), P();
|
|
321
320
|
}, x.onerror = C) : C(new Error("Failed to create blob"));
|
|
322
321
|
});
|
|
323
322
|
}).catch(() => {
|
|
324
|
-
}),
|
|
325
|
-
},
|
|
326
|
-
const
|
|
327
|
-
|
|
323
|
+
}), h.appendChild(x), h;
|
|
324
|
+
}, w = (T, x) => {
|
|
325
|
+
const h = document.createElement("div");
|
|
326
|
+
h.classList.add("rp-print-zone");
|
|
328
327
|
const P = document.createElement("style"), C = x.get(1);
|
|
329
328
|
if (C) {
|
|
330
329
|
const { width: S, height: A } = C == null ? void 0 : C.page.getViewport({ scale: 1 });
|
|
331
330
|
P.innerHTML = `@page { size: ${S}px ${A}px }`;
|
|
332
331
|
}
|
|
333
|
-
return
|
|
334
|
-
},
|
|
332
|
+
return h.appendChild(P), h.append(...T), h;
|
|
333
|
+
}, f = I(async () => {
|
|
335
334
|
if (!t)
|
|
336
335
|
return;
|
|
337
|
-
|
|
336
|
+
p();
|
|
338
337
|
const T = document.createElement("canvas"), x = [];
|
|
339
338
|
try {
|
|
340
339
|
t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
@@ -343,11 +342,11 @@ const mo = () => {
|
|
|
343
342
|
), S = e.size;
|
|
344
343
|
for (const [R, D] of e) {
|
|
345
344
|
if (u.current) {
|
|
346
|
-
|
|
345
|
+
p();
|
|
347
346
|
return;
|
|
348
347
|
}
|
|
349
348
|
const L = D.page.getViewport({ scale: 1 });
|
|
350
|
-
if (await
|
|
349
|
+
if (await _({
|
|
351
350
|
scratchCanvas: T,
|
|
352
351
|
pdfDocument: t,
|
|
353
352
|
pageNumber: R,
|
|
@@ -356,7 +355,7 @@ const mo = () => {
|
|
|
356
355
|
optionalContentConfigPromise: P,
|
|
357
356
|
printAnnotationStoragePromise: C
|
|
358
357
|
}), u.current) {
|
|
359
|
-
|
|
358
|
+
p();
|
|
360
359
|
return;
|
|
361
360
|
}
|
|
362
361
|
const F = await v(T);
|
|
@@ -369,26 +368,26 @@ const mo = () => {
|
|
|
369
368
|
});
|
|
370
369
|
}
|
|
371
370
|
if (u.current) {
|
|
372
|
-
|
|
371
|
+
p();
|
|
373
372
|
return;
|
|
374
373
|
}
|
|
375
|
-
const A =
|
|
374
|
+
const A = w(x, e);
|
|
376
375
|
document.body.appendChild(A), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await b();
|
|
377
|
-
} catch (
|
|
378
|
-
s(!0),
|
|
376
|
+
} catch (h) {
|
|
377
|
+
s(!0), h instanceof Error && d(h);
|
|
379
378
|
} finally {
|
|
380
379
|
T.height = 0, T.width = 0;
|
|
381
380
|
}
|
|
382
381
|
}, [t, e, u]);
|
|
383
382
|
return O(() => {
|
|
384
383
|
const T = () => {
|
|
385
|
-
|
|
384
|
+
p(), m();
|
|
386
385
|
};
|
|
387
386
|
return window.addEventListener("afterprint", T, !0), () => {
|
|
388
387
|
window.removeEventListener("afterprint", T, !0);
|
|
389
388
|
};
|
|
390
|
-
}, [
|
|
391
|
-
print:
|
|
389
|
+
}, [m, p]), {
|
|
390
|
+
print: f,
|
|
392
391
|
cancel: g,
|
|
393
392
|
progress: r,
|
|
394
393
|
isComplete: n,
|
|
@@ -413,9 +412,9 @@ const mo = () => {
|
|
|
413
412
|
}
|
|
414
413
|
}
|
|
415
414
|
}), ws = ({ children: t }) => {
|
|
416
|
-
const [e, r] = $(null), [o, n] = $(null), { print: a, cancel: c, progress: s, isComplete: l, isError: d, error: u } = mo(),
|
|
415
|
+
const [e, r] = $(null), [o, n] = $(null), { print: a, cancel: c, progress: s, isComplete: l, isError: d, error: u } = mo(), m = I((v) => {
|
|
417
416
|
v && typeof v == "function" && n(() => v);
|
|
418
|
-
}, []),
|
|
417
|
+
}, []), p = (v) => {
|
|
419
418
|
u && v(u);
|
|
420
419
|
}, g = I(
|
|
421
420
|
(v) => {
|
|
@@ -424,22 +423,22 @@ const mo = () => {
|
|
|
424
423
|
[s, e]
|
|
425
424
|
);
|
|
426
425
|
O(() => {
|
|
427
|
-
l && o &&
|
|
426
|
+
l && o && _();
|
|
428
427
|
}, [l, o]), O(() => {
|
|
429
|
-
d &&
|
|
428
|
+
d && p((v) => {
|
|
430
429
|
console.error(v);
|
|
431
430
|
});
|
|
432
431
|
}, [d]), O(() => {
|
|
433
432
|
s && e && e(s);
|
|
434
433
|
}, [s, e]);
|
|
435
|
-
const
|
|
434
|
+
const _ = () => {
|
|
436
435
|
o && (o(), n(null));
|
|
437
436
|
}, b = {
|
|
438
437
|
print: a,
|
|
439
438
|
cancel: c,
|
|
440
439
|
setOnProgress: g,
|
|
441
|
-
setOnComplete:
|
|
442
|
-
setOnError:
|
|
440
|
+
setOnComplete: m,
|
|
441
|
+
setOnError: p,
|
|
443
442
|
progress: s
|
|
444
443
|
};
|
|
445
444
|
return /* @__PURE__ */ i(_r.Provider, { value: b, children: t });
|
|
@@ -453,37 +452,37 @@ const mo = () => {
|
|
|
453
452
|
(s) => {
|
|
454
453
|
if (!r.size)
|
|
455
454
|
return;
|
|
456
|
-
const l = Array.from(r.values()).slice(0, s).map((
|
|
457
|
-
const { thumbnailViewport:
|
|
455
|
+
const l = Array.from(r.values()).slice(0, s).map((m) => {
|
|
456
|
+
const { thumbnailViewport: p, scale: g } = kt(m.page, o);
|
|
458
457
|
return {
|
|
459
458
|
scale: g,
|
|
460
|
-
page:
|
|
459
|
+
page: m.page,
|
|
461
460
|
loading: !0,
|
|
462
|
-
viewport:
|
|
461
|
+
viewport: p
|
|
463
462
|
};
|
|
464
|
-
}), d = l.reduce((
|
|
463
|
+
}), d = l.reduce((m, p) => (m[p.page.pageNumber] = p, m), {});
|
|
465
464
|
e(d);
|
|
466
465
|
const u = [];
|
|
467
|
-
for (const
|
|
468
|
-
const
|
|
469
|
-
scale:
|
|
466
|
+
for (const m of l) {
|
|
467
|
+
const p = document.createElement("canvas"), g = vt(m.page, p, {
|
|
468
|
+
scale: m.scale,
|
|
470
469
|
rotate: o
|
|
471
470
|
}).promise.then(() => {
|
|
472
|
-
const
|
|
471
|
+
const _ = p.toDataURL();
|
|
473
472
|
return {
|
|
474
|
-
...
|
|
475
|
-
thumbnailSrc:
|
|
473
|
+
...m,
|
|
474
|
+
thumbnailSrc: _,
|
|
476
475
|
loading: !1
|
|
477
476
|
};
|
|
478
477
|
});
|
|
479
478
|
u.push(g);
|
|
480
479
|
}
|
|
481
|
-
Promise.all(u).then((
|
|
482
|
-
const
|
|
483
|
-
(g,
|
|
480
|
+
Promise.all(u).then((m) => {
|
|
481
|
+
const p = m.reduce(
|
|
482
|
+
(g, _) => (g[_.page.pageNumber] = _, g),
|
|
484
483
|
{}
|
|
485
484
|
);
|
|
486
|
-
e((g) => ({ ...g, ...
|
|
485
|
+
e((g) => ({ ...g, ...p }));
|
|
487
486
|
}).catch(() => {
|
|
488
487
|
});
|
|
489
488
|
},
|
|
@@ -509,17 +508,17 @@ const mo = () => {
|
|
|
509
508
|
}
|
|
510
509
|
}));
|
|
511
510
|
const d = document.createElement("canvas");
|
|
512
|
-
|
|
513
|
-
const u = d.toDataURL(), { thumbnailViewport:
|
|
511
|
+
vt(l.page, d, { scale: l.thumbnailScale, rotate: o }).promise.then(() => {
|
|
512
|
+
const u = d.toDataURL(), { thumbnailViewport: m, scale: p } = kt(l.page, o);
|
|
514
513
|
return {
|
|
515
|
-
scale:
|
|
514
|
+
scale: p,
|
|
516
515
|
thumbnailSrc: u,
|
|
517
516
|
page: l.page,
|
|
518
517
|
loading: !1,
|
|
519
|
-
viewport:
|
|
518
|
+
viewport: m
|
|
520
519
|
};
|
|
521
520
|
}).then((u) => {
|
|
522
|
-
e((
|
|
521
|
+
e((m) => ({ ...m, [s]: u }));
|
|
523
522
|
});
|
|
524
523
|
},
|
|
525
524
|
[r, o]
|
|
@@ -548,21 +547,21 @@ const mo = () => {
|
|
|
548
547
|
}
|
|
549
548
|
);
|
|
550
549
|
}, go = (t = {}, e = "") => {
|
|
551
|
-
const [r, o] = $(e), [n, a] = $(!1), { pdf: c, pages: s } = X(), l =
|
|
550
|
+
const [r, o] = $(e), [n, a] = $(!1), { pdf: c, pages: s } = X(), l = Pt(), d = M(!r), { currentZoom: u } = Xe(), [m, p] = $([]), { setFocusedPage: g } = ce(), [_, b] = $(0), { pageScrollElementRef: v, virtualScrollableElementRef: w } = Ye(), { scrollMode: f } = Oe(), { pagesRef: T } = Ie(), [x, h] = $(null), P = M({}), C = k(() => _ === 0 ? null : m[_ - 1], [_, m]), S = k(() => m.length, [m]);
|
|
552
551
|
O(() => {
|
|
553
552
|
if (!C || !s)
|
|
554
553
|
return;
|
|
555
|
-
const L =
|
|
554
|
+
const L = w || v;
|
|
556
555
|
if (!L || !T)
|
|
557
556
|
return;
|
|
558
557
|
const F = s.get(C.page), E = T.clientHeight / 2, y = T.clientWidth / 2;
|
|
559
558
|
let N = 0, V = 0;
|
|
560
|
-
|
|
559
|
+
f === K.PAGE_SCROLLING && g(C.page), f === K.VERTICAL_SCROLLING && (N = l.heights.slice(0, C.page - 1).reduce((B, J) => B + J, 0)), f === K.HORIZONTAL_SCROLLING && (V = l.widths.slice(0, C.page - 1).reduce((B, J) => B + J, 0));
|
|
561
560
|
let q;
|
|
562
561
|
if (!F)
|
|
563
562
|
return;
|
|
564
563
|
const Z = P.current[C.page], ee = F.page.getViewport({ scale: 1 });
|
|
565
|
-
q = new
|
|
564
|
+
q = new Tt.TextLayer({
|
|
566
565
|
viewport: ee,
|
|
567
566
|
textContentSource: Z,
|
|
568
567
|
container: document.createElement("div")
|
|
@@ -582,8 +581,8 @@ const mo = () => {
|
|
|
582
581
|
g,
|
|
583
582
|
l,
|
|
584
583
|
C,
|
|
585
|
-
|
|
586
|
-
|
|
584
|
+
f,
|
|
585
|
+
w,
|
|
587
586
|
v,
|
|
588
587
|
T
|
|
589
588
|
]);
|
|
@@ -605,10 +604,10 @@ const mo = () => {
|
|
|
605
604
|
}, []);
|
|
606
605
|
return O(() => {
|
|
607
606
|
if (!r) {
|
|
608
|
-
d.current = !0,
|
|
607
|
+
d.current = !0, p([]), b(0);
|
|
609
608
|
return;
|
|
610
609
|
}
|
|
611
|
-
d.current = !1, a(!0),
|
|
610
|
+
d.current = !1, a(!0), p([]), b(0), D(c).then((L) => {
|
|
612
611
|
P.current = L;
|
|
613
612
|
const E = Object.keys(L).reduce((y, N) => {
|
|
614
613
|
const V = un(
|
|
@@ -619,22 +618,22 @@ const mo = () => {
|
|
|
619
618
|
).map((q, Z) => ({ ...q, page: Number(N), pageMatchIdx: Z }));
|
|
620
619
|
return [...y, ...V];
|
|
621
620
|
}, []);
|
|
622
|
-
|
|
621
|
+
p(E), b(E.length ? 1 : 0);
|
|
623
622
|
}).catch(() => {
|
|
624
|
-
|
|
623
|
+
p([]), b(0);
|
|
625
624
|
}).finally(() => a(!1));
|
|
626
625
|
}, [r, D, c, t]), {
|
|
627
626
|
search: r,
|
|
628
627
|
setSearch: o,
|
|
629
628
|
loading: n,
|
|
630
|
-
matches:
|
|
629
|
+
matches: m,
|
|
631
630
|
totalMatches: S,
|
|
632
|
-
currentMatchPosition:
|
|
631
|
+
currentMatchPosition: _,
|
|
633
632
|
currentMatch: C,
|
|
634
633
|
nextMatch: A,
|
|
635
634
|
prevMatch: R,
|
|
636
635
|
currentMatchElement: x,
|
|
637
|
-
setCurrentMatchElement:
|
|
636
|
+
setCurrentMatchElement: h
|
|
638
637
|
};
|
|
639
638
|
}, Cr = Be({
|
|
640
639
|
search: "",
|
|
@@ -666,10 +665,10 @@ const mo = () => {
|
|
|
666
665
|
currentMatch: l,
|
|
667
666
|
search: d,
|
|
668
667
|
matches: u,
|
|
669
|
-
nextMatch:
|
|
670
|
-
prevMatch:
|
|
668
|
+
nextMatch: m,
|
|
669
|
+
prevMatch: p,
|
|
671
670
|
currentMatchElement: g,
|
|
672
|
-
setCurrentMatchElement:
|
|
671
|
+
setCurrentMatchElement: _
|
|
673
672
|
} = go(r, e);
|
|
674
673
|
return /* @__PURE__ */ i(
|
|
675
674
|
Cr.Provider,
|
|
@@ -682,12 +681,12 @@ const mo = () => {
|
|
|
682
681
|
totalMatches: c,
|
|
683
682
|
currentMatchPosition: s,
|
|
684
683
|
currentMatch: l,
|
|
685
|
-
nextMatch:
|
|
686
|
-
prevMatch:
|
|
684
|
+
nextMatch: m,
|
|
685
|
+
prevMatch: p,
|
|
687
686
|
search: d,
|
|
688
687
|
matches: u,
|
|
689
688
|
currentMatchElement: g,
|
|
690
|
-
setCurrentMatchElement:
|
|
689
|
+
setCurrentMatchElement: _
|
|
691
690
|
},
|
|
692
691
|
children: t
|
|
693
692
|
}
|
|
@@ -701,7 +700,7 @@ const mo = () => {
|
|
|
701
700
|
"rp-cursor-grab": "_rp-cursor-grab_1776r_27",
|
|
702
701
|
"rp-cursor-grabbing": "_rp-cursor-grabbing_1776r_35",
|
|
703
702
|
"rp-loader": "_rp-loader_1776r_43"
|
|
704
|
-
},
|
|
703
|
+
}, st = {
|
|
705
704
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
706
705
|
"rp-page": "_rp-page_h7a2q_1",
|
|
707
706
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
@@ -714,8 +713,8 @@ const mo = () => {
|
|
|
714
713
|
if (n.current && d) {
|
|
715
714
|
const u = n.current;
|
|
716
715
|
u.hidden = !0;
|
|
717
|
-
const
|
|
718
|
-
|
|
716
|
+
const m = s.current;
|
|
717
|
+
m && m.cancel(), o && o(), s.current = vt(d.page, u, {
|
|
719
718
|
scale: l,
|
|
720
719
|
rotate: c,
|
|
721
720
|
renderForms: !0
|
|
@@ -731,53 +730,53 @@ const mo = () => {
|
|
|
731
730
|
(u = s.current) == null || u.cancel();
|
|
732
731
|
};
|
|
733
732
|
}, [a, e, c, l, o, r]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: n });
|
|
734
|
-
},
|
|
733
|
+
}, ct = {
|
|
735
734
|
"rp-text-layer": "_rp-text-layer_kwwfn_1",
|
|
736
735
|
"rp-text-layer-text": "_rp-text-layer-text_kwwfn_9"
|
|
737
736
|
}, _o = (t) => {
|
|
738
737
|
const { pageNumber: e } = t, { pages: r } = X(), o = M(null), { matches: n, currentMatch: a, setCurrentMatchElement: c } = Tr(), [s, l] = $(
|
|
739
738
|
[]
|
|
740
|
-
), d = M(), u = M(),
|
|
741
|
-
(
|
|
742
|
-
if (v && lr(
|
|
743
|
-
|
|
739
|
+
), d = M(), u = M(), m = M(), p = k(() => n.filter((_) => _.pageIndex === e - 1), [n, e]), g = I(
|
|
740
|
+
(_, b, v = !1) => {
|
|
741
|
+
if (v && lr(_, b), !p.length) {
|
|
742
|
+
m.current = void 0, l([]);
|
|
744
743
|
return;
|
|
745
744
|
}
|
|
746
|
-
const
|
|
747
|
-
l(
|
|
745
|
+
const w = cr(p, _, b);
|
|
746
|
+
l(w);
|
|
748
747
|
},
|
|
749
|
-
[
|
|
748
|
+
[p]
|
|
750
749
|
);
|
|
751
750
|
return O(() => {
|
|
752
751
|
var v;
|
|
753
|
-
if ((v =
|
|
752
|
+
if ((v = m.current) == null || v.classList.remove("selected"), !s.length || !a || a.pageIndex !== e - 1)
|
|
754
753
|
return;
|
|
755
|
-
const
|
|
756
|
-
(
|
|
754
|
+
const _ = p.findIndex(
|
|
755
|
+
(w) => JSON.stringify(w) === JSON.stringify(a)
|
|
757
756
|
);
|
|
758
|
-
if (
|
|
757
|
+
if (_ === -1)
|
|
759
758
|
return;
|
|
760
|
-
const b = s.find((
|
|
761
|
-
b && (
|
|
762
|
-
}, [a, s,
|
|
763
|
-
const
|
|
764
|
-
if (!
|
|
759
|
+
const b = s.find((w) => w.index === _);
|
|
760
|
+
b && (m.current = b.element, c(b.element), b.element.classList.add("selected"));
|
|
761
|
+
}, [a, s, p]), O(() => {
|
|
762
|
+
const _ = r.get(e);
|
|
763
|
+
if (!_ || !o.current)
|
|
765
764
|
return;
|
|
766
765
|
const b = o.current;
|
|
767
|
-
return d.current && d.current.cancel(),
|
|
768
|
-
const
|
|
769
|
-
return d.current = new
|
|
770
|
-
viewport:
|
|
766
|
+
return d.current && d.current.cancel(), _.page.getTextContent().then((v) => {
|
|
767
|
+
const w = _.page.getViewport({ scale: 1 });
|
|
768
|
+
return d.current = new Tt.TextLayer({
|
|
769
|
+
viewport: w,
|
|
771
770
|
textContentSource: v,
|
|
772
771
|
container: b
|
|
773
772
|
}), u.current = v, b && (b.innerText = ""), d.current.render();
|
|
774
773
|
}).then(() => {
|
|
775
|
-
var
|
|
774
|
+
var f;
|
|
776
775
|
[].slice.call(b.children).forEach((T) => {
|
|
777
|
-
T.classList.add(
|
|
776
|
+
T.classList.add(ct["rp-text-layer-text"]);
|
|
778
777
|
});
|
|
779
|
-
const
|
|
780
|
-
|
|
778
|
+
const w = (f = d.current) == null ? void 0 : f.textDivs;
|
|
779
|
+
w && u.current && g(u.current, w);
|
|
781
780
|
}).catch(() => {
|
|
782
781
|
}), () => {
|
|
783
782
|
var v;
|
|
@@ -785,8 +784,8 @@ const mo = () => {
|
|
|
785
784
|
};
|
|
786
785
|
}, [r, e]), O(() => {
|
|
787
786
|
var v;
|
|
788
|
-
[].slice.call(o.current.children).forEach((
|
|
789
|
-
|
|
787
|
+
[].slice.call(o.current.children).forEach((w) => {
|
|
788
|
+
w.classList.add(ct["rp-text-layer-text"]);
|
|
790
789
|
});
|
|
791
790
|
const b = (v = d.current) == null ? void 0 : v.textDivs;
|
|
792
791
|
b && u.current && g(u.current, b, !0);
|
|
@@ -794,7 +793,7 @@ const mo = () => {
|
|
|
794
793
|
"div",
|
|
795
794
|
{
|
|
796
795
|
"data-rp": `page-${e}-textLayer`,
|
|
797
|
-
className:
|
|
796
|
+
className: ct["rp-text-layer"],
|
|
798
797
|
ref: o
|
|
799
798
|
}
|
|
800
799
|
);
|
|
@@ -803,7 +802,7 @@ const mo = () => {
|
|
|
803
802
|
};
|
|
804
803
|
let bo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
805
804
|
const Co = (t) => {
|
|
806
|
-
const { pageNumber: e } = t, r = M(null), { pages: o, pdf: n } = X(), a = M(), [c, s] = $(), { setFocusedPage: l, goToPage: d } = ce(), { scrollMode: u } = Oe(), { print:
|
|
805
|
+
const { pageNumber: e } = t, r = M(null), { pages: o, pdf: n } = X(), a = M(), [c, s] = $(), { setFocusedPage: l, goToPage: d } = ce(), { scrollMode: u } = Oe(), { print: m } = et(), { download: p } = Hr(), g = k(() => o.get(e), [o, e]), _ = k(() => g == null ? void 0 : g.page.getViewport(), [g]);
|
|
807
806
|
O(() => {
|
|
808
807
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
809
808
|
}, [n]), O(() => {
|
|
@@ -813,12 +812,12 @@ const Co = (t) => {
|
|
|
813
812
|
}, [g]);
|
|
814
813
|
const b = I(
|
|
815
814
|
(v) => {
|
|
816
|
-
!c || !n || (Ln(v), Nn(v, n, c).then((
|
|
817
|
-
var
|
|
818
|
-
((
|
|
819
|
-
}), u === K.PAGE_SCROLLING ? At(v, c, n, (
|
|
815
|
+
!c || !n || (Ln(v), Nn(v, n, c).then((w) => {
|
|
816
|
+
var f, T;
|
|
817
|
+
((f = w == null ? void 0 : w.data) == null ? void 0 : f.action) === "Print" ? m() : ((T = w == null ? void 0 : w.data) == null ? void 0 : T.action) === "SaveAs" && p();
|
|
818
|
+
}), u === K.PAGE_SCROLLING ? At(v, c, n, (w) => l(w.pageIndex + 1)) : At(v, c, n, (w) => d(w.pageIndex + 1)));
|
|
820
819
|
},
|
|
821
|
-
[n, c, d, l, u,
|
|
820
|
+
[n, c, d, l, u, m, p]
|
|
822
821
|
);
|
|
823
822
|
return O(() => {
|
|
824
823
|
if (!g || !c)
|
|
@@ -830,19 +829,19 @@ const Co = (t) => {
|
|
|
830
829
|
});
|
|
831
830
|
return;
|
|
832
831
|
}
|
|
833
|
-
const
|
|
832
|
+
const w = /* @__PURE__ */ new Map([]);
|
|
834
833
|
for (const x of c) {
|
|
835
|
-
const { annotationType:
|
|
836
|
-
switch (
|
|
834
|
+
const { annotationType: h } = x;
|
|
835
|
+
switch (h) {
|
|
837
836
|
case zt.Link:
|
|
838
837
|
On(x);
|
|
839
838
|
break;
|
|
840
839
|
case zt.Widget:
|
|
841
|
-
En(x, v,
|
|
840
|
+
En(x, v, w);
|
|
842
841
|
break;
|
|
843
842
|
}
|
|
844
843
|
}
|
|
845
|
-
const
|
|
844
|
+
const f = new AbortController();
|
|
846
845
|
return (async () => {
|
|
847
846
|
a.current && (a.current.div.replaceChildren(), a.current = void 0), r.current && (r.current.innerText = ""), a.current = new gn({
|
|
848
847
|
div: r.current,
|
|
@@ -853,14 +852,14 @@ const Co = (t) => {
|
|
|
853
852
|
page: g.page,
|
|
854
853
|
viewport: v.clone({ dontFlip: !0 })
|
|
855
854
|
}), r.current && Ft(r.current, b);
|
|
856
|
-
const x = await (n == null ? void 0 : n.hasJSActions()),
|
|
857
|
-
if (
|
|
855
|
+
const x = await (n == null ? void 0 : n.hasJSActions()), h = await (n == null ? void 0 : n.getFieldObjects());
|
|
856
|
+
if (f.signal.aborted)
|
|
858
857
|
throw "abort";
|
|
859
858
|
return a.current.render({
|
|
860
859
|
annotations: c,
|
|
861
860
|
annotationStorage: n == null ? void 0 : n.annotationStorage,
|
|
862
861
|
hasJSActions: x,
|
|
863
|
-
fieldObjects:
|
|
862
|
+
fieldObjects: h,
|
|
864
863
|
div: r.current,
|
|
865
864
|
viewport: v.clone({ dontFlip: !0 }),
|
|
866
865
|
page: g.page,
|
|
@@ -876,18 +875,18 @@ const Co = (t) => {
|
|
|
876
875
|
if (x !== "abort")
|
|
877
876
|
throw x;
|
|
878
877
|
}), () => {
|
|
879
|
-
|
|
878
|
+
f.abort("clear"), r.current && Ft(r.current, b);
|
|
880
879
|
};
|
|
881
880
|
}, [n, c, b]), /* @__PURE__ */ i(
|
|
882
881
|
"div",
|
|
883
882
|
{
|
|
884
883
|
"data-rp": `page-${e}-annotationLayer`,
|
|
885
|
-
style: { width: `${
|
|
884
|
+
style: { width: `${_ == null ? void 0 : _.width}px`, height: `${_ == null ? void 0 : _.height}px` },
|
|
886
885
|
className: wo["rp-annotation-layer"],
|
|
887
886
|
ref: r
|
|
888
887
|
}
|
|
889
888
|
);
|
|
890
|
-
},
|
|
889
|
+
}, lt = {
|
|
891
890
|
"rp-text-highlight-layer": "_rp-text-highlight-layer_1470i_1",
|
|
892
891
|
"rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1470i_9"
|
|
893
892
|
}, To = ({ pageNumber: t }) => {
|
|
@@ -903,19 +902,19 @@ const Co = (t) => {
|
|
|
903
902
|
return;
|
|
904
903
|
const d = e.current;
|
|
905
904
|
return r.current && r.current.cancel(), l.page.getTextContent().then((u) => {
|
|
906
|
-
const
|
|
907
|
-
return r.current = new
|
|
908
|
-
viewport:
|
|
905
|
+
const m = l.page.getViewport({ scale: 1 });
|
|
906
|
+
return r.current = new Tt.TextLayer({
|
|
907
|
+
viewport: m,
|
|
909
908
|
textContentSource: u,
|
|
910
909
|
container: d
|
|
911
910
|
}), o.current = u, d && (d.innerText = ""), r.current.render();
|
|
912
911
|
}).then(() => {
|
|
913
|
-
var
|
|
912
|
+
var p;
|
|
914
913
|
[].slice.call(d.children).forEach((g) => {
|
|
915
|
-
g.classList.add(
|
|
914
|
+
g.classList.add(lt["rp-text-highlight-layer-text"]);
|
|
916
915
|
});
|
|
917
|
-
const
|
|
918
|
-
|
|
916
|
+
const m = (p = r.current) == null ? void 0 : p.textDivs;
|
|
917
|
+
m && o.current && s(o.current, m);
|
|
919
918
|
}).catch(() => {
|
|
920
919
|
}), () => {
|
|
921
920
|
var u;
|
|
@@ -923,8 +922,8 @@ const Co = (t) => {
|
|
|
923
922
|
};
|
|
924
923
|
}, [n, t]), O(() => {
|
|
925
924
|
var u;
|
|
926
|
-
[].slice.call(e.current.children).forEach((
|
|
927
|
-
|
|
925
|
+
[].slice.call(e.current.children).forEach((m) => {
|
|
926
|
+
m.classList.add(lt["rp-text-highlight-layer-text"]);
|
|
928
927
|
});
|
|
929
928
|
const d = (u = r.current) == null ? void 0 : u.textDivs;
|
|
930
929
|
d && o.current && s(o.current, d, !0);
|
|
@@ -932,12 +931,12 @@ const Co = (t) => {
|
|
|
932
931
|
"div",
|
|
933
932
|
{
|
|
934
933
|
"data-rp": `page-${t}-textHighlightLayer`,
|
|
935
|
-
className:
|
|
934
|
+
className: lt["rp-text-highlight-layer"],
|
|
936
935
|
ref: e
|
|
937
936
|
}
|
|
938
937
|
) });
|
|
939
|
-
}, Po = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))),
|
|
940
|
-
const { pageNumber: r, style: o, onIntersectRatioChange: n, ...a } = t, { pages: c } = X(), { rotate: s } = Ke(), { textLayer: l } = sn(), { currentZoom: d } = Xe(), u = M(c.get(r)), [
|
|
938
|
+
}, Po = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))), Rt = Me((t, e) => {
|
|
939
|
+
const { pageNumber: r, style: o, onIntersectRatioChange: n, ...a } = t, { pages: c } = X(), { rotate: s } = Ke(), { textLayer: l } = sn(), { currentZoom: d } = Xe(), u = M(c.get(r)), [m, p] = $(!1), g = M(null), [_, b] = $({
|
|
941
940
|
width: 0,
|
|
942
941
|
height: 0
|
|
943
942
|
});
|
|
@@ -950,17 +949,17 @@ const Co = (t) => {
|
|
|
950
949
|
const v = k(() => {
|
|
951
950
|
switch (s) {
|
|
952
951
|
case 90:
|
|
953
|
-
return `${
|
|
952
|
+
return `${_.width / 2}px ${_.width / 2}px`;
|
|
954
953
|
case -90:
|
|
955
954
|
case 270:
|
|
956
|
-
return `${
|
|
955
|
+
return `${_.height / 2}px ${_.height / 2}px`;
|
|
957
956
|
default:
|
|
958
957
|
return "center";
|
|
959
958
|
}
|
|
960
|
-
}, [s,
|
|
961
|
-
|
|
962
|
-
}, []),
|
|
963
|
-
|
|
959
|
+
}, [s, _]), w = I(() => {
|
|
960
|
+
p(!0);
|
|
961
|
+
}, []), f = I(() => {
|
|
962
|
+
p(!1);
|
|
964
963
|
}, []);
|
|
965
964
|
return O(() => {
|
|
966
965
|
const T = new IntersectionObserver(
|
|
@@ -972,7 +971,7 @@ const Co = (t) => {
|
|
|
972
971
|
return g.current && T.observe(g.current), () => {
|
|
973
972
|
T.disconnect(), n(r, -1);
|
|
974
973
|
};
|
|
975
|
-
}, [n, r, s,
|
|
974
|
+
}, [n, r, s, _]), /* @__PURE__ */ i(
|
|
976
975
|
"div",
|
|
977
976
|
{
|
|
978
977
|
ref: g,
|
|
@@ -985,18 +984,18 @@ const Co = (t) => {
|
|
|
985
984
|
"--rp-page-rotate-translate": `${v}`,
|
|
986
985
|
"--scale-factor": d
|
|
987
986
|
},
|
|
988
|
-
className:
|
|
987
|
+
className: st["rp-page-wrapper"],
|
|
989
988
|
children: /* @__PURE__ */ z(
|
|
990
989
|
"div",
|
|
991
990
|
{
|
|
992
991
|
style: {
|
|
993
|
-
width: `${
|
|
994
|
-
height: `${
|
|
992
|
+
width: `${_.width}px`,
|
|
993
|
+
height: `${_.height}px`
|
|
995
994
|
},
|
|
996
|
-
className:
|
|
995
|
+
className: st["rp-page"],
|
|
997
996
|
children: [
|
|
998
|
-
/* @__PURE__ */ i(vo, { onLoading:
|
|
999
|
-
|
|
997
|
+
/* @__PURE__ */ i(vo, { onLoading: w, onLoaded: f, pageNumber: r }),
|
|
998
|
+
m && /* @__PURE__ */ i("div", { className: st["rp-loader-wrapper"], children: /* @__PURE__ */ i(St, {}) }),
|
|
1000
999
|
l && /* @__PURE__ */ i(_o, { pageNumber: r }),
|
|
1001
1000
|
/* @__PURE__ */ i(To, { pageNumber: r }),
|
|
1002
1001
|
/* @__PURE__ */ i(Co, { pageNumber: r })
|
|
@@ -1011,13 +1010,13 @@ function Gt(t) {
|
|
|
1011
1010
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1012
1011
|
return t;
|
|
1013
1012
|
}
|
|
1014
|
-
function
|
|
1015
|
-
return
|
|
1013
|
+
function wt(t, e) {
|
|
1014
|
+
return wt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1016
1015
|
return r.__proto__ = o, r;
|
|
1017
|
-
},
|
|
1016
|
+
}, wt(t, e);
|
|
1018
1017
|
}
|
|
1019
1018
|
function So(t, e) {
|
|
1020
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t,
|
|
1019
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, wt(t, e);
|
|
1021
1020
|
}
|
|
1022
1021
|
var qt = Number.isNaN || function(e) {
|
|
1023
1022
|
return typeof e == "number" && e !== e;
|
|
@@ -1033,7 +1032,7 @@ function yo(t, e) {
|
|
|
1033
1032
|
return !1;
|
|
1034
1033
|
return !0;
|
|
1035
1034
|
}
|
|
1036
|
-
function
|
|
1035
|
+
function dt(t, e) {
|
|
1037
1036
|
e === void 0 && (e = yo);
|
|
1038
1037
|
var r, o = [], n, a = !1;
|
|
1039
1038
|
function c() {
|
|
@@ -1073,13 +1072,13 @@ function Ro(t, e) {
|
|
|
1073
1072
|
};
|
|
1074
1073
|
return n;
|
|
1075
1074
|
}
|
|
1076
|
-
var
|
|
1075
|
+
var ut = -1;
|
|
1077
1076
|
function Lo(t) {
|
|
1078
|
-
if (t === void 0 && (t = !1),
|
|
1077
|
+
if (t === void 0 && (t = !1), ut === -1 || t) {
|
|
1079
1078
|
var e = document.createElement("div"), r = e.style;
|
|
1080
|
-
r.width = "50px", r.height = "50px", r.overflow = "scroll", document.body.appendChild(e),
|
|
1079
|
+
r.width = "50px", r.height = "50px", r.overflow = "scroll", document.body.appendChild(e), ut = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
1081
1080
|
}
|
|
1082
|
-
return
|
|
1081
|
+
return ut;
|
|
1083
1082
|
}
|
|
1084
1083
|
var Le = null;
|
|
1085
1084
|
function jt(t) {
|
|
@@ -1099,21 +1098,21 @@ var No = 150, Eo = function(e) {
|
|
|
1099
1098
|
}, $e = null, Ve = null, Ge = null;
|
|
1100
1099
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && ($e = /* @__PURE__ */ new WeakSet(), Ve = /* @__PURE__ */ new WeakSet(), Ge = /* @__PURE__ */ new WeakSet());
|
|
1101
1100
|
function Oo(t) {
|
|
1102
|
-
var e, r = t.getColumnOffset, o = t.getColumnStartIndexForOffset, n = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, c = t.getEstimatedTotalHeight, s = t.getEstimatedTotalWidth, l = t.getOffsetForColumnAndAlignment, d = t.getOffsetForRowAndAlignment, u = t.getRowHeight,
|
|
1103
|
-
return e = /* @__PURE__ */ function(
|
|
1104
|
-
So(
|
|
1105
|
-
function
|
|
1106
|
-
var
|
|
1107
|
-
return
|
|
1108
|
-
instance: Gt(
|
|
1101
|
+
var e, r = t.getColumnOffset, o = t.getColumnStartIndexForOffset, n = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, c = t.getEstimatedTotalHeight, s = t.getEstimatedTotalWidth, l = t.getOffsetForColumnAndAlignment, d = t.getOffsetForRowAndAlignment, u = t.getRowHeight, m = t.getRowOffset, p = t.getRowStartIndexForOffset, g = t.getRowStopIndexForStartIndex, _ = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, v = t.validateProps;
|
|
1102
|
+
return e = /* @__PURE__ */ function(w) {
|
|
1103
|
+
So(f, w);
|
|
1104
|
+
function f(x) {
|
|
1105
|
+
var h;
|
|
1106
|
+
return h = w.call(this, x) || this, h._instanceProps = _(h.props, Gt(h)), h._resetIsScrollingTimeoutId = null, h._outerRef = void 0, h.state = {
|
|
1107
|
+
instance: Gt(h),
|
|
1109
1108
|
isScrolling: !1,
|
|
1110
1109
|
horizontalScrollDirection: "forward",
|
|
1111
|
-
scrollLeft: typeof
|
|
1112
|
-
scrollTop: typeof
|
|
1110
|
+
scrollLeft: typeof h.props.initialScrollLeft == "number" ? h.props.initialScrollLeft : 0,
|
|
1111
|
+
scrollTop: typeof h.props.initialScrollTop == "number" ? h.props.initialScrollTop : 0,
|
|
1113
1112
|
scrollUpdateWasRequested: !1,
|
|
1114
1113
|
verticalScrollDirection: "forward"
|
|
1115
|
-
},
|
|
1116
|
-
return
|
|
1114
|
+
}, h._callOnItemsRendered = void 0, h._callOnItemsRendered = dt(function(P, C, S, A, R, D, L, F) {
|
|
1115
|
+
return h.props.onItemsRendered({
|
|
1117
1116
|
overscanColumnStartIndex: P,
|
|
1118
1117
|
overscanColumnStopIndex: C,
|
|
1119
1118
|
overscanRowStartIndex: S,
|
|
@@ -1123,38 +1122,38 @@ function Oo(t) {
|
|
|
1123
1122
|
visibleRowStartIndex: L,
|
|
1124
1123
|
visibleRowStopIndex: F
|
|
1125
1124
|
});
|
|
1126
|
-
}),
|
|
1127
|
-
return
|
|
1125
|
+
}), h._callOnScroll = void 0, h._callOnScroll = dt(function(P, C, S, A, R) {
|
|
1126
|
+
return h.props.onScroll({
|
|
1128
1127
|
horizontalScrollDirection: S,
|
|
1129
1128
|
scrollLeft: P,
|
|
1130
1129
|
scrollTop: C,
|
|
1131
1130
|
verticalScrollDirection: A,
|
|
1132
1131
|
scrollUpdateWasRequested: R
|
|
1133
1132
|
});
|
|
1134
|
-
}),
|
|
1135
|
-
var S =
|
|
1133
|
+
}), h._getItemStyle = void 0, h._getItemStyle = function(P, C) {
|
|
1134
|
+
var S = h.props, A = S.columnWidth, R = S.direction, D = S.rowHeight, L = h._getItemStyleCache(b && A, b && R, b && D), F = P + ":" + C, E;
|
|
1136
1135
|
if (L.hasOwnProperty(F))
|
|
1137
1136
|
E = L[F];
|
|
1138
1137
|
else {
|
|
1139
|
-
var y = r(
|
|
1138
|
+
var y = r(h.props, C, h._instanceProps), N = R === "rtl";
|
|
1140
1139
|
L[F] = E = {
|
|
1141
1140
|
position: "absolute",
|
|
1142
1141
|
left: N ? void 0 : y,
|
|
1143
1142
|
right: N ? y : void 0,
|
|
1144
|
-
top:
|
|
1145
|
-
height: u(
|
|
1146
|
-
width: a(
|
|
1143
|
+
top: m(h.props, P, h._instanceProps),
|
|
1144
|
+
height: u(h.props, P, h._instanceProps),
|
|
1145
|
+
width: a(h.props, C, h._instanceProps)
|
|
1147
1146
|
};
|
|
1148
1147
|
}
|
|
1149
1148
|
return E;
|
|
1150
|
-
},
|
|
1149
|
+
}, h._getItemStyleCache = void 0, h._getItemStyleCache = dt(function(P, C, S) {
|
|
1151
1150
|
return {};
|
|
1152
|
-
}),
|
|
1151
|
+
}), h._onScroll = function(P) {
|
|
1153
1152
|
var C = P.currentTarget, S = C.clientHeight, A = C.clientWidth, R = C.scrollLeft, D = C.scrollTop, L = C.scrollHeight, F = C.scrollWidth;
|
|
1154
|
-
|
|
1153
|
+
h.setState(function(E) {
|
|
1155
1154
|
if (E.scrollLeft === R && E.scrollTop === D)
|
|
1156
1155
|
return null;
|
|
1157
|
-
var y =
|
|
1156
|
+
var y = h.props.direction, N = R;
|
|
1158
1157
|
if (y === "rtl")
|
|
1159
1158
|
switch (jt()) {
|
|
1160
1159
|
case "negative":
|
|
@@ -1174,26 +1173,26 @@ function Oo(t) {
|
|
|
1174
1173
|
verticalScrollDirection: E.scrollTop < D ? "forward" : "backward",
|
|
1175
1174
|
scrollUpdateWasRequested: !1
|
|
1176
1175
|
};
|
|
1177
|
-
},
|
|
1178
|
-
},
|
|
1179
|
-
var C =
|
|
1180
|
-
|
|
1181
|
-
},
|
|
1182
|
-
|
|
1183
|
-
},
|
|
1184
|
-
|
|
1176
|
+
}, h._resetIsScrollingDebounced);
|
|
1177
|
+
}, h._outerRefSetter = function(P) {
|
|
1178
|
+
var C = h.props.outerRef;
|
|
1179
|
+
h._outerRef = P, typeof C == "function" ? C(P) : C != null && typeof C == "object" && C.hasOwnProperty("current") && (C.current = P);
|
|
1180
|
+
}, h._resetIsScrollingDebounced = function() {
|
|
1181
|
+
h._resetIsScrollingTimeoutId !== null && Bt(h._resetIsScrollingTimeoutId), h._resetIsScrollingTimeoutId = Ro(h._resetIsScrolling, No);
|
|
1182
|
+
}, h._resetIsScrolling = function() {
|
|
1183
|
+
h._resetIsScrollingTimeoutId = null, h.setState({
|
|
1185
1184
|
isScrolling: !1
|
|
1186
1185
|
}, function() {
|
|
1187
|
-
|
|
1186
|
+
h._getItemStyleCache(-1);
|
|
1188
1187
|
});
|
|
1189
|
-
},
|
|
1188
|
+
}, h;
|
|
1190
1189
|
}
|
|
1191
|
-
|
|
1192
|
-
return Do(
|
|
1190
|
+
f.getDerivedStateFromProps = function(h, P) {
|
|
1191
|
+
return Do(h, P), v(h), null;
|
|
1193
1192
|
};
|
|
1194
|
-
var T =
|
|
1195
|
-
return T.scrollTo = function(
|
|
1196
|
-
var P =
|
|
1193
|
+
var T = f.prototype;
|
|
1194
|
+
return T.scrollTo = function(h) {
|
|
1195
|
+
var P = h.scrollLeft, C = h.scrollTop;
|
|
1197
1196
|
P !== void 0 && (P = Math.max(0, P)), C !== void 0 && (C = Math.max(0, C)), this.setState(function(S) {
|
|
1198
1197
|
return P === void 0 && (P = S.scrollLeft), C === void 0 && (C = S.scrollTop), S.scrollLeft === P && S.scrollTop === C ? null : {
|
|
1199
1198
|
horizontalScrollDirection: S.scrollLeft < P ? "forward" : "backward",
|
|
@@ -1203,8 +1202,8 @@ function Oo(t) {
|
|
|
1203
1202
|
verticalScrollDirection: S.scrollTop < C ? "forward" : "backward"
|
|
1204
1203
|
};
|
|
1205
1204
|
}, this._resetIsScrollingDebounced);
|
|
1206
|
-
}, T.scrollToItem = function(
|
|
1207
|
-
var P =
|
|
1205
|
+
}, T.scrollToItem = function(h) {
|
|
1206
|
+
var P = h.align, C = P === void 0 ? "auto" : P, S = h.columnIndex, A = h.rowIndex, R = this.props, D = R.columnCount, L = R.height, F = R.rowCount, E = R.width, y = this.state, N = y.scrollLeft, V = y.scrollTop, q = Lo();
|
|
1208
1207
|
S !== void 0 && (S = Math.max(0, Math.min(S, D - 1))), A !== void 0 && (A = Math.max(0, Math.min(A, F - 1)));
|
|
1209
1208
|
var Z = c(this.props, this._instanceProps), ee = s(this.props, this._instanceProps), B = ee > E ? q : 0, J = Z > L ? q : 0;
|
|
1210
1209
|
this.scrollTo({
|
|
@@ -1212,17 +1211,17 @@ function Oo(t) {
|
|
|
1212
1211
|
scrollTop: A !== void 0 ? d(this.props, A, C, V, this._instanceProps, B) : V
|
|
1213
1212
|
});
|
|
1214
1213
|
}, T.componentDidMount = function() {
|
|
1215
|
-
var
|
|
1214
|
+
var h = this.props, P = h.initialScrollLeft, C = h.initialScrollTop;
|
|
1216
1215
|
if (this._outerRef != null) {
|
|
1217
1216
|
var S = this._outerRef;
|
|
1218
1217
|
typeof P == "number" && (S.scrollLeft = P), typeof C == "number" && (S.scrollTop = C);
|
|
1219
1218
|
}
|
|
1220
1219
|
this._callPropsCallbacks();
|
|
1221
1220
|
}, T.componentDidUpdate = function() {
|
|
1222
|
-
var
|
|
1221
|
+
var h = this.props.direction, P = this.state, C = P.scrollLeft, S = P.scrollTop, A = P.scrollUpdateWasRequested;
|
|
1223
1222
|
if (A && this._outerRef != null) {
|
|
1224
1223
|
var R = this._outerRef;
|
|
1225
|
-
if (
|
|
1224
|
+
if (h === "rtl")
|
|
1226
1225
|
switch (jt()) {
|
|
1227
1226
|
case "negative":
|
|
1228
1227
|
R.scrollLeft = -C;
|
|
@@ -1243,7 +1242,7 @@ function Oo(t) {
|
|
|
1243
1242
|
}, T.componentWillUnmount = function() {
|
|
1244
1243
|
this._resetIsScrollingTimeoutId !== null && Bt(this._resetIsScrollingTimeoutId);
|
|
1245
1244
|
}, T.render = function() {
|
|
1246
|
-
var
|
|
1245
|
+
var h = this.props, P = h.children, C = h.className, S = h.columnCount, A = h.direction, R = h.height, D = h.innerRef, L = h.innerElementType, F = h.innerTagName, E = h.itemData, y = h.itemKey, N = y === void 0 ? Eo : y, V = h.outerElementType, q = h.outerTagName, Z = h.rowCount, ee = h.style, B = h.useIsScrolling, J = h.width, ae = this.state.isScrolling, re = this._getHorizontalRangeToRender(), j = re[0], Y = re[1], de = this._getVerticalRangeToRender(), Ce = de[0], De = de[1], ue = [];
|
|
1247
1246
|
if (S > 0 && Z)
|
|
1248
1247
|
for (var pe = Ce; pe <= De; pe++)
|
|
1249
1248
|
for (var ge = j; ge <= Y; ge++)
|
|
@@ -1259,7 +1258,7 @@ function Oo(t) {
|
|
|
1259
1258
|
rowIndex: pe,
|
|
1260
1259
|
style: this._getItemStyle(pe, ge)
|
|
1261
1260
|
}));
|
|
1262
|
-
var Te = c(this.props, this._instanceProps),
|
|
1261
|
+
var Te = c(this.props, this._instanceProps), rt = s(this.props, this._instanceProps);
|
|
1263
1262
|
return He(V || q || "div", {
|
|
1264
1263
|
className: C,
|
|
1265
1264
|
onScroll: this._onScroll,
|
|
@@ -1279,11 +1278,11 @@ function Oo(t) {
|
|
|
1279
1278
|
style: {
|
|
1280
1279
|
height: Te,
|
|
1281
1280
|
pointerEvents: ae ? "none" : void 0,
|
|
1282
|
-
width:
|
|
1281
|
+
width: rt
|
|
1283
1282
|
}
|
|
1284
1283
|
}));
|
|
1285
1284
|
}, T._callPropsCallbacks = function() {
|
|
1286
|
-
var
|
|
1285
|
+
var h = this.props, P = h.columnCount, C = h.onItemsRendered, S = h.onScroll, A = h.rowCount;
|
|
1287
1286
|
if (typeof C == "function" && P > 0 && A > 0) {
|
|
1288
1287
|
var R = this._getHorizontalRangeToRender(), D = R[0], L = R[1], F = R[2], E = R[3], y = this._getVerticalRangeToRender(), N = y[0], V = y[1], q = y[2], Z = y[3];
|
|
1289
1288
|
this._callOnItemsRendered(D, L, N, V, F, E, q, Z);
|
|
@@ -1293,18 +1292,18 @@ function Oo(t) {
|
|
|
1293
1292
|
this._callOnScroll(J, ae, B, j, re);
|
|
1294
1293
|
}
|
|
1295
1294
|
}, T._getHorizontalRangeToRender = function() {
|
|
1296
|
-
var
|
|
1295
|
+
var h = this.props, P = h.columnCount, C = h.overscanColumnCount, S = h.overscanColumnsCount, A = h.overscanCount, R = h.rowCount, D = this.state, L = D.horizontalScrollDirection, F = D.isScrolling, E = D.scrollLeft, y = C || S || A || 1;
|
|
1297
1296
|
if (P === 0 || R === 0)
|
|
1298
1297
|
return [0, 0, 0, 0];
|
|
1299
1298
|
var N = o(this.props, E, this._instanceProps), V = n(this.props, N, E, this._instanceProps), q = !F || L === "backward" ? Math.max(1, y) : 1, Z = !F || L === "forward" ? Math.max(1, y) : 1;
|
|
1300
1299
|
return [Math.max(0, N - q), Math.max(0, Math.min(P - 1, V + Z)), N, V];
|
|
1301
1300
|
}, T._getVerticalRangeToRender = function() {
|
|
1302
|
-
var
|
|
1301
|
+
var h = this.props, P = h.columnCount, C = h.overscanCount, S = h.overscanRowCount, A = h.overscanRowsCount, R = h.rowCount, D = this.state, L = D.isScrolling, F = D.verticalScrollDirection, E = D.scrollTop, y = S || A || C || 1;
|
|
1303
1302
|
if (P === 0 || R === 0)
|
|
1304
1303
|
return [0, 0, 0, 0];
|
|
1305
|
-
var N =
|
|
1304
|
+
var N = p(this.props, E, this._instanceProps), V = g(this.props, N, E, this._instanceProps), q = !L || F === "backward" ? Math.max(1, y) : 1, Z = !L || F === "forward" ? Math.max(1, y) : 1;
|
|
1306
1305
|
return [Math.max(0, N - q), Math.max(0, Math.min(R - 1, V + Z)), N, V];
|
|
1307
|
-
},
|
|
1306
|
+
}, f;
|
|
1308
1307
|
}(tn), e.defaultProps = {
|
|
1309
1308
|
direction: "ltr",
|
|
1310
1309
|
itemData: void 0,
|
|
@@ -1312,9 +1311,9 @@ function Oo(t) {
|
|
|
1312
1311
|
}, e;
|
|
1313
1312
|
}
|
|
1314
1313
|
var Do = function(e, r) {
|
|
1315
|
-
var o = e.children, n = e.direction, a = e.height, c = e.innerTagName, s = e.outerTagName, l = e.overscanColumnsCount, d = e.overscanCount, u = e.overscanRowsCount,
|
|
1314
|
+
var o = e.children, n = e.direction, a = e.height, c = e.innerTagName, s = e.outerTagName, l = e.overscanColumnsCount, d = e.overscanCount, u = e.overscanRowsCount, m = e.width, p = r.instance;
|
|
1316
1315
|
if (process.env.NODE_ENV !== "production") {
|
|
1317
|
-
if (typeof d == "number" && $e && !$e.has(
|
|
1316
|
+
if (typeof d == "number" && $e && !$e.has(p) && ($e.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof l == "number" || typeof u == "number") && Ve && !Ve.has(p) && (Ve.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && Ge && !Ge.has(p) && (Ge.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1318
1317
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1319
1318
|
switch (n) {
|
|
1320
1319
|
case "ltr":
|
|
@@ -1323,8 +1322,8 @@ var Do = function(e, r) {
|
|
|
1323
1322
|
default:
|
|
1324
1323
|
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + n + '" was specified.'));
|
|
1325
1324
|
}
|
|
1326
|
-
if (typeof
|
|
1327
|
-
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (
|
|
1325
|
+
if (typeof m != "number")
|
|
1326
|
+
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (m === null ? "null" : typeof m) + '" was specified.'));
|
|
1328
1327
|
if (typeof a != "number")
|
|
1329
1328
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1330
1329
|
}
|
|
@@ -1353,11 +1352,11 @@ var Do = function(e, r) {
|
|
|
1353
1352
|
l = d.offset + d.size;
|
|
1354
1353
|
}
|
|
1355
1354
|
for (var u = s + 1; u <= o; u++) {
|
|
1356
|
-
var
|
|
1355
|
+
var m = c(u);
|
|
1357
1356
|
a[u] = {
|
|
1358
1357
|
offset: l,
|
|
1359
|
-
size:
|
|
1360
|
-
}, l +=
|
|
1358
|
+
size: m
|
|
1359
|
+
}, l += m;
|
|
1361
1360
|
}
|
|
1362
1361
|
e === "column" ? n.lastMeasuredColumnIndex = o : n.lastMeasuredRowIndex = o;
|
|
1363
1362
|
}
|
|
@@ -1380,17 +1379,17 @@ var Do = function(e, r) {
|
|
|
1380
1379
|
n += s, s *= 2;
|
|
1381
1380
|
return xr(e, r, o, Math.min(n, c - 1), Math.floor(n / 2), a);
|
|
1382
1381
|
}, Jt = function(e, r, o, n, a, c, s) {
|
|
1383
|
-
var l = e === "column" ? r.width : r.height, d = ve(e, r, o, c), u = e === "column" ? Sr(r, c) : Pr(r, c),
|
|
1384
|
-
switch (n === "smart" && (a >=
|
|
1382
|
+
var l = e === "column" ? r.width : r.height, d = ve(e, r, o, c), u = e === "column" ? Sr(r, c) : Pr(r, c), m = Math.max(0, Math.min(u - l, d.offset)), p = Math.max(0, d.offset - l + s + d.size);
|
|
1383
|
+
switch (n === "smart" && (a >= p - l && a <= m + l ? n = "auto" : n = "center"), n) {
|
|
1385
1384
|
case "start":
|
|
1386
|
-
return
|
|
1385
|
+
return m;
|
|
1387
1386
|
case "end":
|
|
1388
|
-
return
|
|
1387
|
+
return p;
|
|
1389
1388
|
case "center":
|
|
1390
|
-
return Math.round(
|
|
1389
|
+
return Math.round(p + (m - p) / 2);
|
|
1391
1390
|
case "auto":
|
|
1392
1391
|
default:
|
|
1393
|
-
return a >=
|
|
1392
|
+
return a >= p && a <= m ? a : p > m || a < p ? p : m;
|
|
1394
1393
|
}
|
|
1395
1394
|
}, Ao = /* @__PURE__ */ Oo({
|
|
1396
1395
|
getColumnOffset: function(e, r, o) {
|
|
@@ -1449,8 +1448,8 @@ var Do = function(e, r) {
|
|
|
1449
1448
|
shouldForceUpdate: l
|
|
1450
1449
|
});
|
|
1451
1450
|
}, r.resetAfterIndices = function(s) {
|
|
1452
|
-
var l = s.columnIndex, d = s.rowIndex, u = s.shouldForceUpdate,
|
|
1453
|
-
typeof l == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, l - 1)), typeof d == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, d - 1)), r._getItemStyleCache(-1),
|
|
1451
|
+
var l = s.columnIndex, d = s.rowIndex, u = s.shouldForceUpdate, m = u === void 0 ? !0 : u;
|
|
1452
|
+
typeof l == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, l - 1)), typeof d == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, d - 1)), r._getItemStyleCache(-1), m && r.forceUpdate();
|
|
1454
1453
|
}, c;
|
|
1455
1454
|
},
|
|
1456
1455
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
@@ -1480,7 +1479,7 @@ function Mo(t, e) {
|
|
|
1480
1479
|
return !Yt(r, n) && !Yt(o, a);
|
|
1481
1480
|
}
|
|
1482
1481
|
const Wo = () => {
|
|
1483
|
-
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { setColumnCount: r } = sr(), { virtualScrollableElementRef: o } = Ye(), n =
|
|
1482
|
+
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { setColumnCount: r } = sr(), { virtualScrollableElementRef: o } = Ye(), n = Pt(), a = I(
|
|
1484
1483
|
(g) => n.widths[g] || 0,
|
|
1485
1484
|
[n.widths]
|
|
1486
1485
|
), c = I(
|
|
@@ -1490,30 +1489,30 @@ const Wo = () => {
|
|
|
1490
1489
|
O(() => {
|
|
1491
1490
|
r(d);
|
|
1492
1491
|
}, [d, r]);
|
|
1493
|
-
const u = k(() => e === K.HORIZONTAL_SCROLLING || e === K.PAGE_SCROLLING ? 1 : Math.round(s / d), [d, s, e]),
|
|
1492
|
+
const u = k(() => e === K.HORIZONTAL_SCROLLING || e === K.PAGE_SCROLLING ? 1 : Math.round(s / d), [d, s, e]), m = k(() => n.heights.reduce((g, _) => g + _, 0) / n.heights.length || 0, [n]), p = k(() => n.widths.reduce((g, _) => g + _, 0) / n.heights.length || 0, [n]);
|
|
1494
1493
|
return {
|
|
1495
1494
|
rowCount: u,
|
|
1496
1495
|
rowHeight: c,
|
|
1497
1496
|
columnCount: d,
|
|
1498
1497
|
columnWidth: a,
|
|
1499
1498
|
pageDimension: n,
|
|
1500
|
-
estimatedRowHeight:
|
|
1501
|
-
estimatedColumnWidth:
|
|
1499
|
+
estimatedRowHeight: m,
|
|
1500
|
+
estimatedColumnWidth: p
|
|
1502
1501
|
};
|
|
1503
1502
|
};
|
|
1504
1503
|
let ie;
|
|
1505
1504
|
typeof window < "u" ? ie = window : typeof self < "u" ? ie = self : ie = global;
|
|
1506
|
-
let
|
|
1507
|
-
const Qt = 20,
|
|
1508
|
-
|
|
1505
|
+
let bt = null, Ct = null;
|
|
1506
|
+
const Qt = 20, pt = ie.clearTimeout, er = ie.setTimeout, ht = ie.cancelAnimationFrame || ie.mozCancelAnimationFrame || ie.webkitCancelAnimationFrame, tr = ie.requestAnimationFrame || ie.mozRequestAnimationFrame || ie.webkitRequestAnimationFrame;
|
|
1507
|
+
ht == null || tr == null ? (bt = pt, Ct = function(e) {
|
|
1509
1508
|
return er(e, Qt);
|
|
1510
|
-
}) : (
|
|
1511
|
-
|
|
1512
|
-
},
|
|
1509
|
+
}) : (bt = function([e, r]) {
|
|
1510
|
+
ht(e), pt(r);
|
|
1511
|
+
}, Ct = function(e) {
|
|
1513
1512
|
const r = tr(function() {
|
|
1514
|
-
|
|
1513
|
+
pt(o), e();
|
|
1515
1514
|
}), o = er(function() {
|
|
1516
|
-
|
|
1515
|
+
ht(r), e();
|
|
1517
1516
|
}, Qt);
|
|
1518
1517
|
return [r, o];
|
|
1519
1518
|
});
|
|
@@ -1521,68 +1520,68 @@ function Ho(t) {
|
|
|
1521
1520
|
let e, r, o, n, a, c, s;
|
|
1522
1521
|
const l = typeof document < "u" && document.attachEvent;
|
|
1523
1522
|
if (!l) {
|
|
1524
|
-
c = function(
|
|
1525
|
-
const
|
|
1526
|
-
x.scrollLeft = x.scrollWidth, x.scrollTop = x.scrollHeight,
|
|
1527
|
-
}, a = function(
|
|
1528
|
-
return
|
|
1529
|
-
}, s = function(
|
|
1530
|
-
if (
|
|
1523
|
+
c = function(w) {
|
|
1524
|
+
const f = w.__resizeTriggers__, T = f.firstElementChild, x = f.lastElementChild, h = T.firstElementChild;
|
|
1525
|
+
x.scrollLeft = x.scrollWidth, x.scrollTop = x.scrollHeight, h.style.width = T.offsetWidth + 1 + "px", h.style.height = T.offsetHeight + 1 + "px", T.scrollLeft = T.scrollWidth, T.scrollTop = T.scrollHeight;
|
|
1526
|
+
}, a = function(w) {
|
|
1527
|
+
return w.offsetWidth !== w.__resizeLast__.width || w.offsetHeight !== w.__resizeLast__.height;
|
|
1528
|
+
}, s = function(w) {
|
|
1529
|
+
if (w.target.className && typeof w.target.className.indexOf == "function" && w.target.className.indexOf("contract-trigger") < 0 && w.target.className.indexOf("expand-trigger") < 0)
|
|
1531
1530
|
return;
|
|
1532
|
-
const
|
|
1533
|
-
c(this), this.__resizeRAF__ &&
|
|
1534
|
-
a(
|
|
1535
|
-
|
|
1531
|
+
const f = this;
|
|
1532
|
+
c(this), this.__resizeRAF__ && bt(this.__resizeRAF__), this.__resizeRAF__ = Ct(function() {
|
|
1533
|
+
a(f) && (f.__resizeLast__.width = f.offsetWidth, f.__resizeLast__.height = f.offsetHeight, f.__resizeListeners__.forEach(function(h) {
|
|
1534
|
+
h.call(f, w);
|
|
1536
1535
|
}));
|
|
1537
1536
|
});
|
|
1538
1537
|
};
|
|
1539
|
-
let
|
|
1538
|
+
let p = !1, g = "";
|
|
1540
1539
|
o = "animationstart";
|
|
1541
|
-
const
|
|
1540
|
+
const _ = "Webkit Moz O ms".split(" ");
|
|
1542
1541
|
let b = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
|
|
1543
1542
|
{
|
|
1544
|
-
const
|
|
1545
|
-
if (
|
|
1546
|
-
for (let
|
|
1547
|
-
if (
|
|
1548
|
-
v =
|
|
1543
|
+
const w = document.createElement("fakeelement");
|
|
1544
|
+
if (w.style.animationName !== void 0 && (p = !0), p === !1) {
|
|
1545
|
+
for (let f = 0; f < _.length; f++)
|
|
1546
|
+
if (w.style[_[f] + "AnimationName"] !== void 0) {
|
|
1547
|
+
v = _[f], g = "-" + v.toLowerCase() + "-", o = b[f], p = !0;
|
|
1549
1548
|
break;
|
|
1550
1549
|
}
|
|
1551
1550
|
}
|
|
1552
1551
|
}
|
|
1553
1552
|
r = "resizeanim", e = "@" + g + "keyframes " + r + " { from { opacity: 0; } to { opacity: 0; } } ", n = g + "animation: 1ms " + r + "; ";
|
|
1554
1553
|
}
|
|
1555
|
-
const d = function(
|
|
1556
|
-
if (!
|
|
1557
|
-
const g = (e || "") + ".resize-triggers { " + (n || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
|
|
1558
|
-
b.id = "detectElementResize", b.type = "text/css", t != null && b.setAttribute("nonce", t), b.styleSheet ? b.styleSheet.cssText = g : b.appendChild(
|
|
1554
|
+
const d = function(p) {
|
|
1555
|
+
if (!p.getElementById("detectElementResize")) {
|
|
1556
|
+
const g = (e || "") + ".resize-triggers { " + (n || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', _ = p.head || p.getElementsByTagName("head")[0], b = p.createElement("style");
|
|
1557
|
+
b.id = "detectElementResize", b.type = "text/css", t != null && b.setAttribute("nonce", t), b.styleSheet ? b.styleSheet.cssText = g : b.appendChild(p.createTextNode(g)), _.appendChild(b);
|
|
1559
1558
|
}
|
|
1560
1559
|
};
|
|
1561
1560
|
return {
|
|
1562
|
-
addResizeListener: function(
|
|
1561
|
+
addResizeListener: function(p, g) {
|
|
1563
1562
|
if (l)
|
|
1564
|
-
|
|
1563
|
+
p.attachEvent("onresize", g);
|
|
1565
1564
|
else {
|
|
1566
|
-
if (!
|
|
1567
|
-
const
|
|
1568
|
-
b && b.position === "static" && (
|
|
1569
|
-
const v =
|
|
1570
|
-
v.className = "expand-trigger", v.appendChild(
|
|
1571
|
-
const
|
|
1572
|
-
|
|
1573
|
-
T.animationName === r && c(
|
|
1574
|
-
},
|
|
1565
|
+
if (!p.__resizeTriggers__) {
|
|
1566
|
+
const _ = p.ownerDocument, b = ie.getComputedStyle(p);
|
|
1567
|
+
b && b.position === "static" && (p.style.position = "relative"), d(_), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = _.createElement("div")).className = "resize-triggers";
|
|
1568
|
+
const v = _.createElement("div");
|
|
1569
|
+
v.className = "expand-trigger", v.appendChild(_.createElement("div"));
|
|
1570
|
+
const w = _.createElement("div");
|
|
1571
|
+
w.className = "contract-trigger", p.__resizeTriggers__.appendChild(v), p.__resizeTriggers__.appendChild(w), p.appendChild(p.__resizeTriggers__), c(p), p.addEventListener("scroll", s, !0), o && (p.__resizeTriggers__.__animationListener__ = function(T) {
|
|
1572
|
+
T.animationName === r && c(p);
|
|
1573
|
+
}, p.__resizeTriggers__.addEventListener(o, p.__resizeTriggers__.__animationListener__));
|
|
1575
1574
|
}
|
|
1576
|
-
|
|
1575
|
+
p.__resizeListeners__.push(g);
|
|
1577
1576
|
}
|
|
1578
1577
|
},
|
|
1579
|
-
removeResizeListener: function(
|
|
1578
|
+
removeResizeListener: function(p, g) {
|
|
1580
1579
|
if (l)
|
|
1581
|
-
|
|
1582
|
-
else if (
|
|
1583
|
-
|
|
1580
|
+
p.detachEvent("onresize", g);
|
|
1581
|
+
else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(g), 1), !p.__resizeListeners__.length) {
|
|
1582
|
+
p.removeEventListener("scroll", s, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(o, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
|
|
1584
1583
|
try {
|
|
1585
|
-
|
|
1584
|
+
p.__resizeTriggers__ = !p.removeChild(p.__resizeTriggers__);
|
|
1586
1585
|
} catch {
|
|
1587
1586
|
}
|
|
1588
1587
|
}
|
|
@@ -1593,10 +1592,8 @@ class $o extends rn {
|
|
|
1593
1592
|
constructor(...e) {
|
|
1594
1593
|
super(...e), this.state = {
|
|
1595
1594
|
height: this.props.defaultHeight || 0,
|
|
1596
|
-
scaledHeight: this.props.defaultHeight || 0,
|
|
1597
|
-
scaledWidth: this.props.defaultWidth || 0,
|
|
1598
1595
|
width: this.props.defaultWidth || 0
|
|
1599
|
-
}, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
|
|
1596
|
+
}, this._autoSizer = null, this._detectElementResize = null, this._didLogDeprecationWarning = !1, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
|
|
1600
1597
|
this._timeoutId = null;
|
|
1601
1598
|
const {
|
|
1602
1599
|
disableHeight: r,
|
|
@@ -1604,18 +1601,27 @@ class $o extends rn {
|
|
|
1604
1601
|
onResize: n
|
|
1605
1602
|
} = this.props;
|
|
1606
1603
|
if (this._parentNode) {
|
|
1607
|
-
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), l = parseFloat(a.paddingTop || "0"), d = parseFloat(a.paddingBottom || "0"), u = this._parentNode.getBoundingClientRect(),
|
|
1608
|
-
(!r &&
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1604
|
+
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), l = parseFloat(a.paddingTop || "0"), d = parseFloat(a.paddingBottom || "0"), u = this._parentNode.getBoundingClientRect(), m = u.height - l - d, p = u.width - c - s;
|
|
1605
|
+
if (!r && this.state.height !== m || !o && this.state.width !== p) {
|
|
1606
|
+
this.setState({
|
|
1607
|
+
height: m,
|
|
1608
|
+
width: p
|
|
1609
|
+
});
|
|
1610
|
+
const g = () => {
|
|
1611
|
+
this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
|
|
1612
|
+
};
|
|
1613
|
+
typeof n == "function" && n({
|
|
1614
|
+
height: m,
|
|
1615
|
+
width: p,
|
|
1616
|
+
// TODO Remove these params in the next major release
|
|
1617
|
+
get scaledHeight() {
|
|
1618
|
+
return g(), m;
|
|
1619
|
+
},
|
|
1620
|
+
get scaledWidth() {
|
|
1621
|
+
return g(), p;
|
|
1622
|
+
}
|
|
1623
|
+
});
|
|
1624
|
+
}
|
|
1619
1625
|
}
|
|
1620
1626
|
}, this._setRef = (r) => {
|
|
1621
1627
|
this._autoSizer = r;
|
|
@@ -1648,24 +1654,22 @@ class $o extends rn {
|
|
|
1648
1654
|
onResize: l,
|
|
1649
1655
|
style: d = {},
|
|
1650
1656
|
tagName: u = "div",
|
|
1651
|
-
...
|
|
1657
|
+
...m
|
|
1652
1658
|
} = this.props, {
|
|
1653
|
-
height:
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
width: b
|
|
1657
|
-
} = this.state, v = {
|
|
1659
|
+
height: p,
|
|
1660
|
+
width: g
|
|
1661
|
+
} = this.state, _ = {
|
|
1658
1662
|
overflow: "visible"
|
|
1659
|
-
},
|
|
1660
|
-
let
|
|
1661
|
-
return n || (
|
|
1663
|
+
}, b = {};
|
|
1664
|
+
let v = !1;
|
|
1665
|
+
return n || (p === 0 && (v = !0), _.height = 0, b.height = p, b.scaledHeight = p), a || (g === 0 && (v = !0), _.width = 0, b.width = g, b.scaledWidth = g), c && (v = !1), He(u, {
|
|
1662
1666
|
ref: this._setRef,
|
|
1663
1667
|
style: {
|
|
1664
|
-
...
|
|
1668
|
+
..._,
|
|
1665
1669
|
...d
|
|
1666
1670
|
},
|
|
1667
|
-
...
|
|
1668
|
-
}, !
|
|
1671
|
+
...m
|
|
1672
|
+
}, !v && e(b));
|
|
1669
1673
|
}
|
|
1670
1674
|
}
|
|
1671
1675
|
const Vo = ({ widths: t, heights: e }) => {
|
|
@@ -1695,7 +1699,7 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1695
1699
|
n.current = !1;
|
|
1696
1700
|
}, [r]);
|
|
1697
1701
|
const s = k(() => c.reduce((l, d) => l + Number(d.width || 0), 0), [c]);
|
|
1698
|
-
return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: a.map((l, d) => /* @__PURE__ */ i(
|
|
1702
|
+
return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: a.map((l, d) => /* @__PURE__ */ i(Rt, { onIntersectRatioChange: () => {
|
|
1699
1703
|
}, style: c[d], pageNumber: l }, l)) });
|
|
1700
1704
|
}, Go = ({ widths: t, heights: e }) => {
|
|
1701
1705
|
const { focusedPage: r } = ce(), { isScrolling: o } = Qe(), n = k(() => ({
|
|
@@ -1715,7 +1719,7 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1715
1719
|
position: "relative"
|
|
1716
1720
|
},
|
|
1717
1721
|
children: /* @__PURE__ */ i(
|
|
1718
|
-
|
|
1722
|
+
Rt,
|
|
1719
1723
|
{
|
|
1720
1724
|
style: n,
|
|
1721
1725
|
onIntersectRatioChange: () => {
|
|
@@ -1729,7 +1733,7 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1729
1733
|
}, qo = nn(({ columnIndex: t, rowIndex: e, data: r, style: o }) => {
|
|
1730
1734
|
const n = t + 1 + e * r.columnCount;
|
|
1731
1735
|
return /* @__PURE__ */ i(
|
|
1732
|
-
|
|
1736
|
+
Rt,
|
|
1733
1737
|
{
|
|
1734
1738
|
style: o,
|
|
1735
1739
|
onIntersectRatioChange: r.handleIntersectRatioChange,
|
|
@@ -1745,13 +1749,13 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1745
1749
|
getVirtualScrollableElementRef: l,
|
|
1746
1750
|
setTotalInnerDimensions: d,
|
|
1747
1751
|
virtualScrollableElementRef: u,
|
|
1748
|
-
totalInnerDimensions:
|
|
1749
|
-
pageScrollElementRef:
|
|
1750
|
-
} = Ye(), g = M(!0), { nextPage:
|
|
1751
|
-
|
|
1752
|
+
totalInnerDimensions: m,
|
|
1753
|
+
pageScrollElementRef: p
|
|
1754
|
+
} = Ye(), g = M(!0), { nextPage: _, prevPage: b, setFocusedPage: v, focusedPage: w } = ce(), { scrollMode: f } = Oe(), { viewMode: T } = Je(), x = M(null), { loading: h } = X(), { LoaderImageComponent: P } = dr(), C = M(
|
|
1755
|
+
m
|
|
1752
1756
|
), S = M({
|
|
1753
1757
|
viewMode: T,
|
|
1754
|
-
scrollMode:
|
|
1758
|
+
scrollMode: f
|
|
1755
1759
|
}), A = M(!1), R = M(), { isFullScreen: D } = dn(), {
|
|
1756
1760
|
pageDimension: L,
|
|
1757
1761
|
rowCount: F,
|
|
@@ -1760,7 +1764,7 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1760
1764
|
columnWidth: N,
|
|
1761
1765
|
estimatedColumnWidth: V,
|
|
1762
1766
|
estimatedRowHeight: q
|
|
1763
|
-
} = Wo(), Z =
|
|
1767
|
+
} = Wo(), Z = _t(m, 100), [ee, B] = $({}), J = _t(ee, 100), { isScrolling: ae } = Qe(), re = M(), j = M({
|
|
1764
1768
|
scrollTop: 0,
|
|
1765
1769
|
scrollLeft: 0
|
|
1766
1770
|
});
|
|
@@ -1775,9 +1779,9 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1775
1779
|
}), [y, pe]), Te = I(
|
|
1776
1780
|
(W) => {
|
|
1777
1781
|
const H = document.activeElement !== r;
|
|
1778
|
-
!D && H || (["ArrowUp", "ArrowLeft"].includes(W.key) ? (W.preventDefault(), b()) : ["ArrowDown", "ArrowRight"].includes(W.key) && (W.preventDefault(),
|
|
1782
|
+
!D && H || (["ArrowUp", "ArrowLeft"].includes(W.key) ? (W.preventDefault(), b()) : ["ArrowDown", "ArrowRight"].includes(W.key) && (W.preventDefault(), _()));
|
|
1779
1783
|
},
|
|
1780
|
-
[
|
|
1784
|
+
[_, b, D, f]
|
|
1781
1785
|
);
|
|
1782
1786
|
O(() => (window.addEventListener("keydown", Te), () => {
|
|
1783
1787
|
window.removeEventListener("keydown", Te);
|
|
@@ -1791,7 +1795,7 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1791
1795
|
shouldForceUpdate: !0
|
|
1792
1796
|
});
|
|
1793
1797
|
}, [F, y, L, a]);
|
|
1794
|
-
const
|
|
1798
|
+
const rt = I(
|
|
1795
1799
|
(W, H) => {
|
|
1796
1800
|
if (!u)
|
|
1797
1801
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
@@ -1806,24 +1810,24 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1806
1810
|
(W, H) => {
|
|
1807
1811
|
if (ae.current)
|
|
1808
1812
|
return;
|
|
1809
|
-
if (S.current.viewMode !== T || S.current.scrollMode !==
|
|
1810
|
-
re.current && clearTimeout(re.current), B({}), A.current = !0, n(
|
|
1813
|
+
if (S.current.viewMode !== T || S.current.scrollMode !== f) {
|
|
1814
|
+
re.current && clearTimeout(re.current), B({}), A.current = !0, n(w), f === K.HORIZONTAL_SCROLLING && (a == null || a.scrollTo({
|
|
1811
1815
|
scrollTop: 0
|
|
1812
1816
|
})), re.current = setTimeout(() => {
|
|
1813
1817
|
requestAnimationFrame(() => {
|
|
1814
|
-
S.current = { viewMode: T, scrollMode:
|
|
1818
|
+
S.current = { viewMode: T, scrollMode: f };
|
|
1815
1819
|
});
|
|
1816
1820
|
}, 100);
|
|
1817
1821
|
return;
|
|
1818
1822
|
}
|
|
1819
|
-
const se = W.scrollTop,
|
|
1823
|
+
const se = W.scrollTop, nt = W.scrollLeft;
|
|
1820
1824
|
if (!H.height || !H.width)
|
|
1821
1825
|
return;
|
|
1822
1826
|
A.current = !0;
|
|
1823
|
-
const { height: Pe, width:
|
|
1824
|
-
if (Ot === Pe && Dt ===
|
|
1827
|
+
const { height: Pe, width: ot } = H, { height: Ot, width: Dt } = C.current;
|
|
1828
|
+
if (Ot === Pe && Dt === ot)
|
|
1825
1829
|
return;
|
|
1826
|
-
const Jr = se / Ot * Pe, Yr =
|
|
1830
|
+
const Jr = se / Ot * Pe, Yr = nt / Dt * ot, Qr = Math.round(Math.min(Jr, Pe)) || 0, en = Math.round(Math.min(Yr, ot)) || 0;
|
|
1827
1831
|
R.current = setTimeout(() => {
|
|
1828
1832
|
requestAnimationFrame(() => {
|
|
1829
1833
|
a == null || a.scrollTo({
|
|
@@ -1836,17 +1840,17 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1836
1840
|
width: H.width
|
|
1837
1841
|
};
|
|
1838
1842
|
},
|
|
1839
|
-
[a, T,
|
|
1843
|
+
[a, T, f]
|
|
1840
1844
|
);
|
|
1841
1845
|
O(() => {
|
|
1842
1846
|
clearTimeout(R.current);
|
|
1843
1847
|
const W = Array.from({ length: F }).reduce(
|
|
1844
|
-
(se,
|
|
1848
|
+
(se, nt, Pe) => se + E(Pe),
|
|
1845
1849
|
0
|
|
1846
1850
|
), H = Array.from({ length: y }).reduce(
|
|
1847
|
-
(se,
|
|
1851
|
+
(se, nt, Pe) => se + N(Pe),
|
|
1848
1852
|
0
|
|
1849
|
-
), Q =
|
|
1853
|
+
), Q = rt(H, W);
|
|
1850
1854
|
j.current = Q, Br(Q, { height: W, width: H }), d({
|
|
1851
1855
|
height: W,
|
|
1852
1856
|
width: H
|
|
@@ -1882,11 +1886,11 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1882
1886
|
[ue, Ce, he]
|
|
1883
1887
|
);
|
|
1884
1888
|
return O(() => {
|
|
1885
|
-
|
|
1886
|
-
}, [
|
|
1889
|
+
h && De();
|
|
1890
|
+
}, [h]), O(() => {
|
|
1887
1891
|
if (!(Z.height === 0 || !g.current)) {
|
|
1888
1892
|
if (e === K.PAGE_SCROLLING) {
|
|
1889
|
-
t !==
|
|
1893
|
+
t !== w && p && v(t), g.current = !1;
|
|
1890
1894
|
return;
|
|
1891
1895
|
}
|
|
1892
1896
|
if (a != null && a.scrollToItem) {
|
|
@@ -1912,10 +1916,10 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1912
1916
|
}, [
|
|
1913
1917
|
a,
|
|
1914
1918
|
e,
|
|
1915
|
-
|
|
1919
|
+
p,
|
|
1916
1920
|
v,
|
|
1917
1921
|
Z
|
|
1918
|
-
]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: Kr, children: /* @__PURE__ */ i($o, { style: { minHeight: "50px" }, children: ({ width: W, height: H }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Xr, style: { width: W, height: H }, children:
|
|
1922
|
+
]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: Kr, children: /* @__PURE__ */ i($o, { style: { minHeight: "50px" }, children: ({ width: W, height: H }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Xr, style: { width: W, height: H }, children: f === K.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
1919
1923
|
"div",
|
|
1920
1924
|
{
|
|
1921
1925
|
ref: s,
|
|
@@ -1941,11 +1945,11 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1941
1945
|
rowCount: F,
|
|
1942
1946
|
className: oe(
|
|
1943
1947
|
he["rp-pages"],
|
|
1944
|
-
|
|
1948
|
+
f === K.HORIZONTAL_SCROLLING ? he["rp-pages-horizontal-scroll"] : ""
|
|
1945
1949
|
),
|
|
1946
1950
|
children: qo
|
|
1947
1951
|
}
|
|
1948
|
-
) :
|
|
1952
|
+
) : h ? null : /* @__PURE__ */ i(
|
|
1949
1953
|
"div",
|
|
1950
1954
|
{
|
|
1951
1955
|
className: he["rp-loader"],
|
|
@@ -1965,7 +1969,7 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1965
1969
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
1966
1970
|
"rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
|
|
1967
1971
|
"rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
|
|
1968
|
-
},
|
|
1972
|
+
}, mt = {
|
|
1969
1973
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
1970
1974
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
1971
1975
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
@@ -1980,19 +1984,19 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
1980
1984
|
O(() => {
|
|
1981
1985
|
s(t.toString());
|
|
1982
1986
|
}, [t]);
|
|
1983
|
-
const
|
|
1987
|
+
const m = I((b) => {
|
|
1984
1988
|
const v = b.target.value;
|
|
1985
1989
|
s(v);
|
|
1986
|
-
}, []),
|
|
1990
|
+
}, []), p = I(async () => {
|
|
1987
1991
|
const b = await a(c);
|
|
1988
1992
|
b.success || s(b.currentPage.toString());
|
|
1989
1993
|
}, [a, c, e]), g = I(() => {
|
|
1990
1994
|
s(t.toString());
|
|
1991
|
-
}, [t]),
|
|
1995
|
+
}, [t]), _ = I(
|
|
1992
1996
|
(b) => {
|
|
1993
|
-
b.key === "Enter" &&
|
|
1997
|
+
b.key === "Enter" && p();
|
|
1994
1998
|
},
|
|
1995
|
-
[
|
|
1999
|
+
[p]
|
|
1996
2000
|
);
|
|
1997
2001
|
return typeof l != "boolean" ? /* @__PURE__ */ i(
|
|
1998
2002
|
l,
|
|
@@ -2004,7 +2008,7 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
2004
2008
|
goToPage: a,
|
|
2005
2009
|
changePage: r
|
|
2006
2010
|
}
|
|
2007
|
-
) : l ? /* @__PURE__ */ z("div", { className:
|
|
2011
|
+
) : l ? /* @__PURE__ */ z("div", { className: mt["rp-paginate"], children: [
|
|
2008
2012
|
!d && /* @__PURE__ */ i(U, { content: u == null ? void 0 : u.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2009
2013
|
te,
|
|
2010
2014
|
{
|
|
@@ -2017,14 +2021,14 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
2017
2021
|
/* @__PURE__ */ i(U, { content: u == null ? void 0 : u.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2018
2022
|
ar,
|
|
2019
2023
|
{
|
|
2020
|
-
onKeyDown:
|
|
2024
|
+
onKeyDown: _,
|
|
2021
2025
|
onBlur: g,
|
|
2022
|
-
onChange:
|
|
2026
|
+
onChange: m,
|
|
2023
2027
|
value: c,
|
|
2024
|
-
className:
|
|
2028
|
+
className: mt["rp-page-input"]
|
|
2025
2029
|
}
|
|
2026
2030
|
) }),
|
|
2027
|
-
/* @__PURE__ */ z("span", { className:
|
|
2031
|
+
/* @__PURE__ */ z("span", { className: mt["rp-total-page"], children: [
|
|
2028
2032
|
"/",
|
|
2029
2033
|
e
|
|
2030
2034
|
] }),
|
|
@@ -2039,7 +2043,7 @@ const Vo = ({ widths: t, heights: e }) => {
|
|
|
2039
2043
|
) })
|
|
2040
2044
|
] }) : null;
|
|
2041
2045
|
};
|
|
2042
|
-
var
|
|
2046
|
+
var tt = "Dialog", [yr, Ps] = Vn(tt), [jo, le] = yr(tt), Ir = (t) => {
|
|
2043
2047
|
const {
|
|
2044
2048
|
__scopeDialog: e,
|
|
2045
2049
|
children: r,
|
|
@@ -2047,10 +2051,11 @@ var Rt = "Dialog", [yr, Ps] = Gn(Rt), [jo, le] = yr(Rt), Ir = (t) => {
|
|
|
2047
2051
|
defaultOpen: n,
|
|
2048
2052
|
onOpenChange: a,
|
|
2049
2053
|
modal: c = !0
|
|
2050
|
-
} = t, s = G.useRef(null), l = G.useRef(null), [d
|
|
2054
|
+
} = t, s = G.useRef(null), l = G.useRef(null), [d, u] = qn({
|
|
2051
2055
|
prop: o,
|
|
2052
|
-
defaultProp: n,
|
|
2053
|
-
onChange: a
|
|
2056
|
+
defaultProp: n ?? !1,
|
|
2057
|
+
onChange: a,
|
|
2058
|
+
caller: tt
|
|
2054
2059
|
});
|
|
2055
2060
|
return /* @__PURE__ */ i(
|
|
2056
2061
|
jo,
|
|
@@ -2058,21 +2063,21 @@ var Rt = "Dialog", [yr, Ps] = Gn(Rt), [jo, le] = yr(Rt), Ir = (t) => {
|
|
|
2058
2063
|
scope: e,
|
|
2059
2064
|
triggerRef: s,
|
|
2060
2065
|
contentRef: l,
|
|
2061
|
-
contentId:
|
|
2062
|
-
titleId:
|
|
2063
|
-
descriptionId:
|
|
2066
|
+
contentId: at(),
|
|
2067
|
+
titleId: at(),
|
|
2068
|
+
descriptionId: at(),
|
|
2064
2069
|
open: d,
|
|
2065
2070
|
onOpenChange: u,
|
|
2066
|
-
onOpenToggle: G.useCallback(() => u((
|
|
2071
|
+
onOpenToggle: G.useCallback(() => u((m) => !m), [u]),
|
|
2067
2072
|
modal: c,
|
|
2068
2073
|
children: r
|
|
2069
2074
|
}
|
|
2070
2075
|
);
|
|
2071
2076
|
};
|
|
2072
|
-
Ir.displayName =
|
|
2077
|
+
Ir.displayName = tt;
|
|
2073
2078
|
var Rr = "DialogTrigger", Ko = G.forwardRef(
|
|
2074
2079
|
(t, e) => {
|
|
2075
|
-
const { __scopeDialog: r, ...o } = t, n = le(Rr, r), a =
|
|
2080
|
+
const { __scopeDialog: r, ...o } = t, n = le(Rr, r), a = xt(e, n.triggerRef);
|
|
2076
2081
|
return /* @__PURE__ */ i(
|
|
2077
2082
|
We.button,
|
|
2078
2083
|
{
|
|
@@ -2093,23 +2098,23 @@ var Lt = "DialogPortal", [Xo, Lr] = yr(Lt, {
|
|
|
2093
2098
|
forceMount: void 0
|
|
2094
2099
|
}), Nr = (t) => {
|
|
2095
2100
|
const { __scopeDialog: e, forceMount: r, children: o, container: n } = t, a = le(Lt, e);
|
|
2096
|
-
return /* @__PURE__ */ i(Xo, { scope: e, forceMount: r, children: G.Children.map(o, (c) => /* @__PURE__ */ i(
|
|
2101
|
+
return /* @__PURE__ */ i(Xo, { scope: e, forceMount: r, children: G.Children.map(o, (c) => /* @__PURE__ */ i(yt, { present: r || a.open, children: /* @__PURE__ */ i(Xn, { asChild: !0, container: n, children: c }) })) });
|
|
2097
2102
|
};
|
|
2098
2103
|
Nr.displayName = Lt;
|
|
2099
2104
|
var Ze = "DialogOverlay", Er = G.forwardRef(
|
|
2100
2105
|
(t, e) => {
|
|
2101
2106
|
const r = Lr(Ze, t.__scopeDialog), { forceMount: o = r.forceMount, ...n } = t, a = le(Ze, t.__scopeDialog);
|
|
2102
|
-
return a.modal ? /* @__PURE__ */ i(
|
|
2107
|
+
return a.modal ? /* @__PURE__ */ i(yt, { present: o || a.open, children: /* @__PURE__ */ i(Yo, { ...n, ref: e }) }) : null;
|
|
2103
2108
|
}
|
|
2104
2109
|
);
|
|
2105
2110
|
Er.displayName = Ze;
|
|
2106
|
-
var Jo = G.forwardRef(
|
|
2111
|
+
var Jo = Un("DialogOverlay.RemoveScroll"), Yo = G.forwardRef(
|
|
2107
2112
|
(t, e) => {
|
|
2108
2113
|
const { __scopeDialog: r, ...o } = t, n = le(Ze, r);
|
|
2109
2114
|
return (
|
|
2110
2115
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2111
2116
|
// ie. when `Overlay` and `Content` are siblings
|
|
2112
|
-
/* @__PURE__ */ i(
|
|
2117
|
+
/* @__PURE__ */ i(Bn, { as: Jo, allowPinchZoom: !0, shards: [n.contentRef], children: /* @__PURE__ */ i(
|
|
2113
2118
|
We.div,
|
|
2114
2119
|
{
|
|
2115
2120
|
"data-state": Et(n.open),
|
|
@@ -2123,13 +2128,13 @@ var Jo = G.forwardRef(
|
|
|
2123
2128
|
), ye = "DialogContent", Or = G.forwardRef(
|
|
2124
2129
|
(t, e) => {
|
|
2125
2130
|
const r = Lr(ye, t.__scopeDialog), { forceMount: o = r.forceMount, ...n } = t, a = le(ye, t.__scopeDialog);
|
|
2126
|
-
return /* @__PURE__ */ i(
|
|
2131
|
+
return /* @__PURE__ */ i(yt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(Qo, { ...n, ref: e }) : /* @__PURE__ */ i(ei, { ...n, ref: e }) });
|
|
2127
2132
|
}
|
|
2128
2133
|
);
|
|
2129
2134
|
Or.displayName = ye;
|
|
2130
|
-
var
|
|
2135
|
+
var Qo = G.forwardRef(
|
|
2131
2136
|
(t, e) => {
|
|
2132
|
-
const r = le(ye, t.__scopeDialog), o = G.useRef(null), n =
|
|
2137
|
+
const r = le(ye, t.__scopeDialog), o = G.useRef(null), n = xt(e, r.contentRef, o);
|
|
2133
2138
|
return G.useEffect(() => {
|
|
2134
2139
|
const a = o.current;
|
|
2135
2140
|
if (a)
|
|
@@ -2156,7 +2161,7 @@ var Yo = G.forwardRef(
|
|
|
2156
2161
|
}
|
|
2157
2162
|
);
|
|
2158
2163
|
}
|
|
2159
|
-
),
|
|
2164
|
+
), ei = G.forwardRef(
|
|
2160
2165
|
(t, e) => {
|
|
2161
2166
|
const r = le(ye, t.__scopeDialog), o = G.useRef(!1), n = G.useRef(!1);
|
|
2162
2167
|
return /* @__PURE__ */ i(
|
|
@@ -2181,10 +2186,10 @@ var Yo = G.forwardRef(
|
|
|
2181
2186
|
}
|
|
2182
2187
|
), Dr = G.forwardRef(
|
|
2183
2188
|
(t, e) => {
|
|
2184
|
-
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: n, onCloseAutoFocus: a, ...c } = t, s = le(ye, r), l = G.useRef(null), d =
|
|
2185
|
-
return
|
|
2189
|
+
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: n, onCloseAutoFocus: a, ...c } = t, s = le(ye, r), l = G.useRef(null), d = xt(e, l);
|
|
2190
|
+
return jn(), /* @__PURE__ */ z(xe, { children: [
|
|
2186
2191
|
/* @__PURE__ */ i(
|
|
2187
|
-
|
|
2192
|
+
Kn,
|
|
2188
2193
|
{
|
|
2189
2194
|
asChild: !0,
|
|
2190
2195
|
loop: !0,
|
|
@@ -2192,7 +2197,7 @@ var Yo = G.forwardRef(
|
|
|
2192
2197
|
onMountAutoFocus: n,
|
|
2193
2198
|
onUnmountAutoFocus: a,
|
|
2194
2199
|
children: /* @__PURE__ */ i(
|
|
2195
|
-
|
|
2200
|
+
Zn,
|
|
2196
2201
|
{
|
|
2197
2202
|
role: "dialog",
|
|
2198
2203
|
id: s.contentId,
|
|
@@ -2207,8 +2212,8 @@ var Yo = G.forwardRef(
|
|
|
2207
2212
|
}
|
|
2208
2213
|
),
|
|
2209
2214
|
/* @__PURE__ */ z(xe, { children: [
|
|
2210
|
-
/* @__PURE__ */ i(
|
|
2211
|
-
/* @__PURE__ */ i(
|
|
2215
|
+
/* @__PURE__ */ i(ri, { titleId: s.titleId }),
|
|
2216
|
+
/* @__PURE__ */ i(oi, { contentRef: l, descriptionId: s.descriptionId })
|
|
2212
2217
|
] })
|
|
2213
2218
|
] });
|
|
2214
2219
|
}
|
|
@@ -2219,13 +2224,13 @@ var Yo = G.forwardRef(
|
|
|
2219
2224
|
}
|
|
2220
2225
|
);
|
|
2221
2226
|
zr.displayName = Nt;
|
|
2222
|
-
var Ar = "DialogDescription",
|
|
2227
|
+
var Ar = "DialogDescription", ti = G.forwardRef(
|
|
2223
2228
|
(t, e) => {
|
|
2224
2229
|
const { __scopeDialog: r, ...o } = t, n = le(Ar, r);
|
|
2225
2230
|
return /* @__PURE__ */ i(We.p, { id: n.descriptionId, ...o, ref: e });
|
|
2226
2231
|
}
|
|
2227
2232
|
);
|
|
2228
|
-
|
|
2233
|
+
ti.displayName = Ar;
|
|
2229
2234
|
var Fr = "DialogClose", kr = G.forwardRef(
|
|
2230
2235
|
(t, e) => {
|
|
2231
2236
|
const { __scopeDialog: r, ...o } = t, n = le(Fr, r);
|
|
@@ -2244,11 +2249,11 @@ kr.displayName = Fr;
|
|
|
2244
2249
|
function Et(t) {
|
|
2245
2250
|
return t ? "open" : "closed";
|
|
2246
2251
|
}
|
|
2247
|
-
var Mr = "DialogTitleWarning", [Ss, Wr] =
|
|
2252
|
+
var Mr = "DialogTitleWarning", [Ss, Wr] = Gn(Mr, {
|
|
2248
2253
|
contentName: ye,
|
|
2249
2254
|
titleName: Nt,
|
|
2250
2255
|
docsSlug: "dialog"
|
|
2251
|
-
}),
|
|
2256
|
+
}), ri = ({ titleId: t }) => {
|
|
2252
2257
|
const e = Wr(Mr), r = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2253
2258
|
|
|
2254
2259
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -2257,14 +2262,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2257
2262
|
return G.useEffect(() => {
|
|
2258
2263
|
t && (document.getElementById(t) || console.error(r));
|
|
2259
2264
|
}, [r, t]), null;
|
|
2260
|
-
},
|
|
2261
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Wr(
|
|
2265
|
+
}, ni = "DialogDescriptionWarning", oi = ({ contentRef: t, descriptionId: e }) => {
|
|
2266
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Wr(ni).contentName}}.`;
|
|
2262
2267
|
return G.useEffect(() => {
|
|
2263
2268
|
var a;
|
|
2264
2269
|
const n = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2265
2270
|
e && n && (document.getElementById(e) || console.warn(o));
|
|
2266
2271
|
}, [o, t, e]), null;
|
|
2267
|
-
},
|
|
2272
|
+
}, ii = Ir, ai = Nr, si = Er, ci = Or, li = zr, di = kr;
|
|
2268
2273
|
const Se = {
|
|
2269
2274
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2270
2275
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2273,7 +2278,7 @@ const Se = {
|
|
|
2273
2278
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2274
2279
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2275
2280
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2276
|
-
},
|
|
2281
|
+
}, ui = () => {
|
|
2277
2282
|
const { pdfProperties: t } = X(), { container: e } = Ie(), { activeDocumentProperties: r, setActiveDocumentProperties: o } = Qn(), { localeMessages: n } = me(), a = k(() => {
|
|
2278
2283
|
if (!t)
|
|
2279
2284
|
return [];
|
|
@@ -2283,13 +2288,13 @@ const Se = {
|
|
|
2283
2288
|
title: l,
|
|
2284
2289
|
author: d,
|
|
2285
2290
|
subject: u,
|
|
2286
|
-
createdOn:
|
|
2287
|
-
creator:
|
|
2291
|
+
createdOn: m,
|
|
2292
|
+
creator: p,
|
|
2288
2293
|
keywords: g,
|
|
2289
|
-
modifiedOn:
|
|
2294
|
+
modifiedOn: _,
|
|
2290
2295
|
pdfProducer: b,
|
|
2291
2296
|
pdfVersion: v,
|
|
2292
|
-
pageCount:
|
|
2297
|
+
pageCount: w
|
|
2293
2298
|
} = t;
|
|
2294
2299
|
return [
|
|
2295
2300
|
{ label: n == null ? void 0 : n.propertiesFilenameLabel, value: s },
|
|
@@ -2299,60 +2304,60 @@ const Se = {
|
|
|
2299
2304
|
{ label: n == null ? void 0 : n.propertiesAuthorLabel, value: d },
|
|
2300
2305
|
{ label: n == null ? void 0 : n.propertiesSubjectLabel, value: u },
|
|
2301
2306
|
{ label: n == null ? void 0 : n.propertiesKeywordLabel, value: g },
|
|
2302
|
-
{ label: n == null ? void 0 : n.propertiesCreatorLabel, value:
|
|
2307
|
+
{ label: n == null ? void 0 : n.propertiesCreatorLabel, value: p },
|
|
2303
2308
|
{
|
|
2304
2309
|
label: n == null ? void 0 : n.propertiesCreateOnLabel,
|
|
2305
|
-
value:
|
|
2310
|
+
value: m ? Wt(m) : ""
|
|
2306
2311
|
},
|
|
2307
2312
|
{
|
|
2308
2313
|
label: n == null ? void 0 : n.propertiesModifiedOnLabel,
|
|
2309
|
-
value:
|
|
2314
|
+
value: _ ? Wt(_) : ""
|
|
2310
2315
|
},
|
|
2311
2316
|
{ separate: !0 },
|
|
2312
2317
|
{ label: n == null ? void 0 : n.propertiesPDFProducerLabel, value: b },
|
|
2313
2318
|
{ label: n == null ? void 0 : n.propertiesPDFVersionLabel, value: v },
|
|
2314
|
-
{ label: n == null ? void 0 : n.propertiesPageCountLabel, value:
|
|
2319
|
+
{ label: n == null ? void 0 : n.propertiesPageCountLabel, value: w }
|
|
2315
2320
|
];
|
|
2316
2321
|
}, [t, n]);
|
|
2317
|
-
return /* @__PURE__ */ i(
|
|
2318
|
-
/* @__PURE__ */ i(
|
|
2319
|
-
/* @__PURE__ */ z(
|
|
2320
|
-
/* @__PURE__ */ i(
|
|
2322
|
+
return /* @__PURE__ */ i(ii, { open: r, onOpenChange: o, children: /* @__PURE__ */ i(ai, { container: e, children: /* @__PURE__ */ z("div", { className: Se["rp-dialog-wrapper"], children: [
|
|
2323
|
+
/* @__PURE__ */ i(si, { className: Se["rp-dialog-overlay"] }),
|
|
2324
|
+
/* @__PURE__ */ z(ci, { className: Se["rp-document-dialog"], children: [
|
|
2325
|
+
/* @__PURE__ */ i(li, { className: Se["rp-dialog-title"], children: n == null ? void 0 : n.documentPropertiesLabel }),
|
|
2321
2326
|
/* @__PURE__ */ i("div", { className: Se["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Se["rp-properties-divider"] }) : /* @__PURE__ */ i(Yn, { label: c.label, value: c.value }) }, s)) }),
|
|
2322
|
-
/* @__PURE__ */ i(
|
|
2327
|
+
/* @__PURE__ */ i(di, { asChild: !0, className: Se["rp-dialog-close"], children: /* @__PURE__ */ i(hr, {}) })
|
|
2323
2328
|
] })
|
|
2324
2329
|
] }) }) });
|
|
2325
|
-
},
|
|
2330
|
+
}, pi = {
|
|
2326
2331
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2327
|
-
},
|
|
2332
|
+
}, hi = (t) => URL.createObjectURL(t), mi = async (t) => {
|
|
2328
2333
|
const r = await (await fetch(t)).blob();
|
|
2329
|
-
return
|
|
2334
|
+
return hi(r);
|
|
2330
2335
|
}, Hr = () => {
|
|
2331
2336
|
const { filename: t, pdfSrc: e } = X();
|
|
2332
2337
|
return { download: I(async () => {
|
|
2333
2338
|
if (!t || !e)
|
|
2334
2339
|
throw new Error("There is no PDF source to download");
|
|
2335
2340
|
const o = document.createElement("a");
|
|
2336
|
-
o.href = await
|
|
2341
|
+
o.href = await mi(e), o.download = t, document.body.appendChild(o), o.click(), document.body.removeChild(o);
|
|
2337
2342
|
}, [t, e]) };
|
|
2338
2343
|
}, $r = () => {
|
|
2339
2344
|
const { downloadIcon: t } = fe();
|
|
2340
2345
|
return t || /* @__PURE__ */ i(oo, {});
|
|
2341
|
-
}, Vr = ({ children: t, className: e, localeMessages: r }) => /* @__PURE__ */ i(U, { className: e, content: r == null ? void 0 : r.downloadFileTooltip, children: t }),
|
|
2346
|
+
}, Vr = ({ children: t, className: e, localeMessages: r }) => /* @__PURE__ */ i(U, { className: e, content: r == null ? void 0 : r.downloadFileTooltip, children: t }), fi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Vr, { localeMessages: e, children: /* @__PURE__ */ i(te, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i($r, {}) }) }), gi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ z(Vr, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2342
2347
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i($r, {}) }),
|
|
2343
2348
|
e == null ? void 0 : e.downloadFileLabel
|
|
2344
2349
|
] }) }), Gr = () => {
|
|
2345
2350
|
const { download: t } = Hr(), { downloadTool: e = !0 } = _e(), { isSmallScreen: r } = Re(), { localeMessages: o } = me();
|
|
2346
|
-
return e ? r ? /* @__PURE__ */ i(
|
|
2351
|
+
return e ? r ? /* @__PURE__ */ i(gi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(fi, { download: t, localeMessages: o }) : null : null;
|
|
2347
2352
|
}, qr = () => {
|
|
2348
2353
|
const { printIcon: t } = fe();
|
|
2349
2354
|
return t || /* @__PURE__ */ i(io, {});
|
|
2350
|
-
}, Ur = ({ children: t, className: e, localeMessages: r }) => /* @__PURE__ */ i(U, { className: e, content: r == null ? void 0 : r.printTooltip, children: t }),
|
|
2355
|
+
}, Ur = ({ children: t, className: e, localeMessages: r }) => /* @__PURE__ */ i(U, { className: e, content: r == null ? void 0 : r.printTooltip, children: t }), vi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Ur, { localeMessages: e, children: /* @__PURE__ */ i(te, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(qr, {}) }) }), _i = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ z(Ur, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2351
2356
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(qr, {}) }),
|
|
2352
2357
|
e == null ? void 0 : e.printLabel
|
|
2353
2358
|
] }) }), Zr = () => {
|
|
2354
2359
|
const { print: t, cancel: e, setOnProgress: r, setOnComplete: o, setOnError: n, progress: a } = et(), { printTool: c = !0 } = _e(), { isSmallScreen: s } = Re(), { localeMessages: l } = me();
|
|
2355
|
-
return c ? s ? /* @__PURE__ */ i(
|
|
2360
|
+
return c ? s ? /* @__PURE__ */ i(_i, { print: t, localeMessages: l }) : typeof c == "function" ? /* @__PURE__ */ i(
|
|
2356
2361
|
c,
|
|
2357
2362
|
{
|
|
2358
2363
|
print: t,
|
|
@@ -2362,16 +2367,16 @@ const Se = {
|
|
|
2362
2367
|
setOnComplete: o,
|
|
2363
2368
|
progress: a
|
|
2364
2369
|
}
|
|
2365
|
-
) : c ? /* @__PURE__ */ i(
|
|
2366
|
-
},
|
|
2370
|
+
) : c ? /* @__PURE__ */ i(vi, { print: t, localeMessages: l }) : null : null;
|
|
2371
|
+
}, wi = {
|
|
2367
2372
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2368
|
-
}, wi = () => {
|
|
2369
|
-
const { goToFirstPageIcon: t } = fe();
|
|
2370
|
-
return t || /* @__PURE__ */ i(fr, { className: _i["rp-go-to-Top"] });
|
|
2371
2373
|
}, bi = () => {
|
|
2374
|
+
const { goToFirstPageIcon: t } = fe();
|
|
2375
|
+
return t || /* @__PURE__ */ i(fr, { className: wi["rp-go-to-Top"] });
|
|
2376
|
+
}, Ci = () => {
|
|
2372
2377
|
const { goToLastPageIcon: t } = fe();
|
|
2373
2378
|
return t || /* @__PURE__ */ i(fr, {});
|
|
2374
|
-
}, rr = { width: "100%" },
|
|
2379
|
+
}, rr = { width: "100%" }, Ti = () => {
|
|
2375
2380
|
const { goToPage: t, totalPages: e, focusedPage: r } = ce(), { jumpNavigationTool: o = !0 } = _e(), { localeMessages: n } = me(), a = k(() => r === 1, [r]), c = k(() => r === e, [r, e]), s = I(() => {
|
|
2376
2381
|
t(1);
|
|
2377
2382
|
}, [t]), l = I(() => {
|
|
@@ -2379,16 +2384,16 @@ const Se = {
|
|
|
2379
2384
|
}, [t, e]);
|
|
2380
2385
|
return o ? /* @__PURE__ */ z(Ue, { children: [
|
|
2381
2386
|
/* @__PURE__ */ i(be, { onClick: s, children: /* @__PURE__ */ i(U, { content: n == null ? void 0 : n.firstPageTooltip, style: rr, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2382
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2387
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(bi, {}) }),
|
|
2383
2388
|
/* @__PURE__ */ i("span", { children: n == null ? void 0 : n.firstPageLabel })
|
|
2384
2389
|
] }) }) }),
|
|
2385
2390
|
/* @__PURE__ */ i(be, { onClick: l, children: /* @__PURE__ */ i(U, { content: n == null ? void 0 : n.lastPageTooltip, style: rr, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2386
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2391
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ci, {}) }),
|
|
2387
2392
|
/* @__PURE__ */ i("span", { children: n == null ? void 0 : n.lastPageLabel })
|
|
2388
2393
|
] }) }) }),
|
|
2389
|
-
/* @__PURE__ */ i(
|
|
2394
|
+
/* @__PURE__ */ i(It, {})
|
|
2390
2395
|
] }) : null;
|
|
2391
|
-
},
|
|
2396
|
+
}, Pi = () => {
|
|
2392
2397
|
const { container: t } = Ie(), { isSmallScreen: e } = Re(), {
|
|
2393
2398
|
openFileTool: r,
|
|
2394
2399
|
downloadTool: o,
|
|
@@ -2399,11 +2404,11 @@ const Se = {
|
|
|
2399
2404
|
jumpNavigationTool: l,
|
|
2400
2405
|
printTool: d,
|
|
2401
2406
|
fullscreenTool: u
|
|
2402
|
-
} = _e(), { localeMessages:
|
|
2407
|
+
} = _e(), { localeMessages: m } = me();
|
|
2403
2408
|
return k(() => {
|
|
2404
2409
|
const g = l || c || s || a || n;
|
|
2405
|
-
let
|
|
2406
|
-
return e && (
|
|
2410
|
+
let _ = !1;
|
|
2411
|
+
return e && (_ = !(!r && !o && !d && !u)), g || _;
|
|
2407
2412
|
}, [
|
|
2408
2413
|
r,
|
|
2409
2414
|
o,
|
|
@@ -2418,16 +2423,16 @@ const Se = {
|
|
|
2418
2423
|
pr,
|
|
2419
2424
|
{
|
|
2420
2425
|
container: t,
|
|
2421
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(U, { content:
|
|
2422
|
-
children: /* @__PURE__ */ z("div", { className:
|
|
2426
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(U, { content: m == null ? void 0 : m.moreOptionTooltip, children: /* @__PURE__ */ i(te, { "aria-label": m == null ? void 0 : m.moreOptionTooltip, children: /* @__PURE__ */ i($n, {}) }) }) }),
|
|
2427
|
+
children: /* @__PURE__ */ z("div", { className: pi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2423
2428
|
e && /* @__PURE__ */ z(Ue, { children: [
|
|
2424
2429
|
/* @__PURE__ */ i(ur, {}),
|
|
2425
2430
|
/* @__PURE__ */ i(Gr, {}),
|
|
2426
2431
|
/* @__PURE__ */ i(Zr, {}),
|
|
2427
2432
|
/* @__PURE__ */ i(mr, {}),
|
|
2428
|
-
/* @__PURE__ */ i(
|
|
2433
|
+
/* @__PURE__ */ i(It, {})
|
|
2429
2434
|
] }),
|
|
2430
|
-
/* @__PURE__ */ i(
|
|
2435
|
+
/* @__PURE__ */ i(Ti, {}),
|
|
2431
2436
|
/* @__PURE__ */ i(ro, {}),
|
|
2432
2437
|
/* @__PURE__ */ i(ao, {}),
|
|
2433
2438
|
/* @__PURE__ */ i(no, {}),
|
|
@@ -2435,9 +2440,9 @@ const Se = {
|
|
|
2435
2440
|
] })
|
|
2436
2441
|
}
|
|
2437
2442
|
),
|
|
2438
|
-
/* @__PURE__ */ i(
|
|
2443
|
+
/* @__PURE__ */ i(ui, {})
|
|
2439
2444
|
] }) : null;
|
|
2440
|
-
},
|
|
2445
|
+
}, Si = () => {
|
|
2441
2446
|
const { isSmallScreen: t } = Re();
|
|
2442
2447
|
return /* @__PURE__ */ z(xe, { children: [
|
|
2443
2448
|
/* @__PURE__ */ i(Hn, {}),
|
|
@@ -2447,7 +2452,7 @@ const Se = {
|
|
|
2447
2452
|
/* @__PURE__ */ i(Zr, {}),
|
|
2448
2453
|
/* @__PURE__ */ i(mr, {})
|
|
2449
2454
|
] }),
|
|
2450
|
-
/* @__PURE__ */ i(
|
|
2455
|
+
/* @__PURE__ */ i(Pi, {})
|
|
2451
2456
|
] });
|
|
2452
2457
|
}, Ne = {
|
|
2453
2458
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
@@ -2455,35 +2460,35 @@ const Se = {
|
|
|
2455
2460
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2456
2461
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2457
2462
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2458
|
-
},
|
|
2463
|
+
}, xi = 25, ft = 1e3, yi = [50, 75, 100, 125, 150, 200, 300, 400], Ii = () => {
|
|
2459
2464
|
const { zoomInIcon: t } = fe();
|
|
2460
2465
|
return t || /* @__PURE__ */ i(so, {});
|
|
2461
|
-
},
|
|
2466
|
+
}, Ri = () => {
|
|
2462
2467
|
const { zoomOutIcon: t } = fe();
|
|
2463
2468
|
return t || /* @__PURE__ */ i(co, {});
|
|
2464
|
-
},
|
|
2469
|
+
}, Li = () => {
|
|
2465
2470
|
const { zoomLevel: t, setZoomLevel: e } = Xe(), { container: r, contentRef: o } = Ie(), { zoomTool: n = !0 } = _e(), { focusedPage: a } = ce(), { rotate: c } = Ke(), { pages: s } = X(), { isSmallScreen: l } = Re(), { localeMessages: d } = me(), u = I(() => {
|
|
2466
|
-
e((
|
|
2467
|
-
const
|
|
2468
|
-
return Math.min(
|
|
2471
|
+
e((w) => {
|
|
2472
|
+
const f = Math.floor(w / 25) * 25;
|
|
2473
|
+
return Math.min(f + 25, ft);
|
|
2469
2474
|
});
|
|
2470
|
-
}, [e]),
|
|
2471
|
-
e((
|
|
2472
|
-
const
|
|
2473
|
-
return Math.min(
|
|
2475
|
+
}, [e]), m = I(() => {
|
|
2476
|
+
e((w) => {
|
|
2477
|
+
const f = Math.ceil(w / 25) * 25;
|
|
2478
|
+
return Math.min(f - 25, ft);
|
|
2474
2479
|
});
|
|
2475
|
-
}, [e]),
|
|
2476
|
-
var
|
|
2477
|
-
return (
|
|
2480
|
+
}, [e]), p = k(() => t === xi, [t]), g = k(() => t === ft, [t]), _ = k(() => {
|
|
2481
|
+
var w;
|
|
2482
|
+
return (w = s.get(a)) == null ? void 0 : w.page.getViewport({ scale: 1, rotation: c });
|
|
2478
2483
|
}, [s, a, c]), b = I(
|
|
2479
|
-
(
|
|
2480
|
-
const
|
|
2484
|
+
(w) => {
|
|
2485
|
+
const f = ((_ == null ? void 0 : _.width) || 0) + 2 * Ht, T = ((_ == null ? void 0 : _.height) || 0) + 2 * Ht, x = (o == null ? void 0 : o.clientWidth) || 0, h = (o == null ? void 0 : o.clientHeight) || 0, P = lo(w, x, h, f, T);
|
|
2481
2486
|
e(P);
|
|
2482
2487
|
},
|
|
2483
|
-
[e,
|
|
2488
|
+
[e, _]
|
|
2484
2489
|
), v = I(
|
|
2485
|
-
(
|
|
2486
|
-
typeof
|
|
2490
|
+
(w) => {
|
|
2491
|
+
typeof w == "number" ? e(w) : b(w);
|
|
2487
2492
|
},
|
|
2488
2493
|
[e, b]
|
|
2489
2494
|
);
|
|
@@ -2491,10 +2496,10 @@ const Se = {
|
|
|
2491
2496
|
/* @__PURE__ */ i(U, { content: d == null ? void 0 : d.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2492
2497
|
te,
|
|
2493
2498
|
{
|
|
2494
|
-
disabled:
|
|
2495
|
-
onClick:
|
|
2499
|
+
disabled: p,
|
|
2500
|
+
onClick: m,
|
|
2496
2501
|
"aria-label": d == null ? void 0 : d.zoomOutTooltip,
|
|
2497
|
-
children: /* @__PURE__ */ i(
|
|
2502
|
+
children: /* @__PURE__ */ i(Ri, {})
|
|
2498
2503
|
}
|
|
2499
2504
|
) }),
|
|
2500
2505
|
!l && /* @__PURE__ */ i(
|
|
@@ -2517,15 +2522,15 @@ const Se = {
|
|
|
2517
2522
|
align: "center",
|
|
2518
2523
|
children: /* @__PURE__ */ z("div", { className: Ne["rp-zoom-dropdown-content"], children: [
|
|
2519
2524
|
/* @__PURE__ */ z(Ue, { children: [
|
|
2520
|
-
/* @__PURE__ */ i(be, { onClick: () => v(
|
|
2521
|
-
/* @__PURE__ */ i(be, { onClick: () => v(
|
|
2522
|
-
/* @__PURE__ */ i(be, { onClick: () => v(
|
|
2525
|
+
/* @__PURE__ */ i(be, { onClick: () => v(it.ACTUAL), children: d == null ? void 0 : d.zoomActualSize }),
|
|
2526
|
+
/* @__PURE__ */ i(be, { onClick: () => v(it.PAGE_FIT), children: d == null ? void 0 : d.zoomPageFit }),
|
|
2527
|
+
/* @__PURE__ */ i(be, { onClick: () => v(it.PAGE_WIDTH), children: d == null ? void 0 : d.zoomPageWidth })
|
|
2523
2528
|
] }),
|
|
2524
|
-
/* @__PURE__ */ i(
|
|
2525
|
-
/* @__PURE__ */ i(Ue, { children:
|
|
2526
|
-
|
|
2529
|
+
/* @__PURE__ */ i(It, {}),
|
|
2530
|
+
/* @__PURE__ */ i(Ue, { children: yi.map((w) => /* @__PURE__ */ z(be, { onClick: () => v(w), children: [
|
|
2531
|
+
w,
|
|
2527
2532
|
" %"
|
|
2528
|
-
] },
|
|
2533
|
+
] }, w)) })
|
|
2529
2534
|
] })
|
|
2530
2535
|
}
|
|
2531
2536
|
),
|
|
@@ -2535,7 +2540,7 @@ const Se = {
|
|
|
2535
2540
|
disabled: g,
|
|
2536
2541
|
onClick: u,
|
|
2537
2542
|
"aria-label": d == null ? void 0 : d.zoomInTooltip,
|
|
2538
|
-
children: /* @__PURE__ */ i(
|
|
2543
|
+
children: /* @__PURE__ */ i(Ii, {})
|
|
2539
2544
|
}
|
|
2540
2545
|
) })
|
|
2541
2546
|
] }) : null;
|
|
@@ -2552,22 +2557,22 @@ const Se = {
|
|
|
2552
2557
|
}, nr = () => {
|
|
2553
2558
|
const { searchIcon: t } = fe();
|
|
2554
2559
|
return t || /* @__PURE__ */ i(uo, {});
|
|
2555
|
-
},
|
|
2560
|
+
}, Ni = () => {
|
|
2556
2561
|
const { container: t } = Ie(), [e, r] = $(!1), { pdf: o } = X(), [n, a] = $(null), {
|
|
2557
2562
|
searchOptions: c,
|
|
2558
2563
|
setSearchOptions: s,
|
|
2559
2564
|
loading: l,
|
|
2560
2565
|
setSearch: d,
|
|
2561
2566
|
totalMatches: u,
|
|
2562
|
-
currentMatchPosition:
|
|
2563
|
-
nextMatch:
|
|
2567
|
+
currentMatchPosition: m,
|
|
2568
|
+
nextMatch: p,
|
|
2564
2569
|
prevMatch: g,
|
|
2565
|
-
search:
|
|
2566
|
-
} = Tr(), { searchTool: b = !0 } = _e(), [v,
|
|
2570
|
+
search: _
|
|
2571
|
+
} = Tr(), { searchTool: b = !0 } = _e(), [v, w] = $(_), { localeMessages: f } = me(), T = I(() => {
|
|
2567
2572
|
r(!0);
|
|
2568
2573
|
}, []), x = I(() => {
|
|
2569
|
-
d(""),
|
|
2570
|
-
}, [d]),
|
|
2574
|
+
d(""), w(""), r(!1);
|
|
2575
|
+
}, [d]), h = (y) => {
|
|
2571
2576
|
const N = y.key === "Enter", V = y.key === " ";
|
|
2572
2577
|
(N || V) && x();
|
|
2573
2578
|
}, P = I(
|
|
@@ -2577,9 +2582,9 @@ const Se = {
|
|
|
2577
2582
|
[e]
|
|
2578
2583
|
), C = I(
|
|
2579
2584
|
(y) => {
|
|
2580
|
-
y.shiftKey && y.key === "Enter" ? g() : y.key === "Enter" &&
|
|
2585
|
+
y.shiftKey && y.key === "Enter" ? g() : y.key === "Enter" && _ !== v ? d(v) : y.key === "Enter" && p();
|
|
2581
2586
|
},
|
|
2582
|
-
[v, g,
|
|
2587
|
+
[v, g, p, d, _]
|
|
2583
2588
|
);
|
|
2584
2589
|
O(() => (window.addEventListener("keydown", P), () => {
|
|
2585
2590
|
window.removeEventListener("keydown", P);
|
|
@@ -2587,10 +2592,10 @@ const Se = {
|
|
|
2587
2592
|
n && n.focus();
|
|
2588
2593
|
}, [n]);
|
|
2589
2594
|
const S = I((y) => {
|
|
2590
|
-
|
|
2595
|
+
w(y.target.value);
|
|
2591
2596
|
}, []), A = I(() => {
|
|
2592
|
-
|
|
2593
|
-
}, [d]), R = k(() => `${
|
|
2597
|
+
w(""), d("");
|
|
2598
|
+
}, [d]), R = k(() => `${m} / ${u}`, [m, u]), { wholeWords: D, matchCase: L } = k(() => c, [c]), F = I(
|
|
2594
2599
|
(y) => {
|
|
2595
2600
|
s((N) => ({ ...N, matchCase: y }));
|
|
2596
2601
|
},
|
|
@@ -2608,41 +2613,41 @@ const Se = {
|
|
|
2608
2613
|
{
|
|
2609
2614
|
open: e,
|
|
2610
2615
|
container: t,
|
|
2611
|
-
triggerComponent: /* @__PURE__ */ i(U, { content:
|
|
2616
|
+
triggerComponent: /* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(te, { onClick: T, "aria-label": f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(nr, {}) }) }),
|
|
2612
2617
|
children: /* @__PURE__ */ z("div", { className: ne["rp-search-tool-content"], children: [
|
|
2613
2618
|
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-input-wrapper"], children: [
|
|
2614
2619
|
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-input"], children: [
|
|
2615
|
-
/* @__PURE__ */ i(U, { content:
|
|
2620
|
+
/* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2616
2621
|
ar,
|
|
2617
2622
|
{
|
|
2618
2623
|
value: v,
|
|
2619
2624
|
onKeyDown: C,
|
|
2620
2625
|
onChange: S,
|
|
2621
2626
|
icon: /* @__PURE__ */ i(nr, {}),
|
|
2622
|
-
placeholder:
|
|
2627
|
+
placeholder: f == null ? void 0 : f.searchInputPlaceholder,
|
|
2623
2628
|
className: ne["rp-search-input"],
|
|
2624
2629
|
ref: a,
|
|
2625
2630
|
children: !!v && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: A, children: /* @__PURE__ */ i(po, {}) })
|
|
2626
2631
|
}
|
|
2627
2632
|
) }),
|
|
2628
|
-
l ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
2633
|
+
l ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(St, {}) }) : /* @__PURE__ */ i("span", { children: R })
|
|
2629
2634
|
] }),
|
|
2630
2635
|
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
|
|
2631
|
-
/* @__PURE__ */ i($t, { name: "matchCase", value: L, onChange: F, children:
|
|
2632
|
-
/* @__PURE__ */ i(U, { content:
|
|
2633
|
-
/* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: E, children:
|
|
2634
|
-
/* @__PURE__ */ i(U, { content:
|
|
2636
|
+
/* @__PURE__ */ i($t, { name: "matchCase", value: L, onChange: F, children: f == null ? void 0 : f.searchMatchCaseLabel }),
|
|
2637
|
+
/* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) }),
|
|
2638
|
+
/* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: E, children: f == null ? void 0 : f.searchWholeWordsLabel }),
|
|
2639
|
+
/* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) })
|
|
2635
2640
|
] })
|
|
2636
2641
|
] }),
|
|
2637
2642
|
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-controls"], children: [
|
|
2638
|
-
/* @__PURE__ */ i(U, { content:
|
|
2643
|
+
/* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchPrevTooltip, children: /* @__PURE__ */ i(te, { onClick: g, "aria-label": f == null ? void 0 : f.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
2639
2644
|
ke,
|
|
2640
2645
|
{
|
|
2641
2646
|
className: ne["rp-search-tool-input-icon"],
|
|
2642
2647
|
"aria-disabled": !u
|
|
2643
2648
|
}
|
|
2644
2649
|
) }) }),
|
|
2645
|
-
/* @__PURE__ */ i(U, { content:
|
|
2650
|
+
/* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchNextTooltip, children: /* @__PURE__ */ i(te, { onClick: p, "aria-label": f == null ? void 0 : f.searchNextTooltip, children: /* @__PURE__ */ i(
|
|
2646
2651
|
ke,
|
|
2647
2652
|
{
|
|
2648
2653
|
style: { transform: "rotate(180deg" },
|
|
@@ -2650,11 +2655,11 @@ const Se = {
|
|
|
2650
2655
|
"aria-disabled": !u
|
|
2651
2656
|
}
|
|
2652
2657
|
) }) }),
|
|
2653
|
-
/* @__PURE__ */ i(U, { content:
|
|
2658
|
+
/* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchCloseButtonTooltip, children: /* @__PURE__ */ i(
|
|
2654
2659
|
te,
|
|
2655
2660
|
{
|
|
2656
|
-
onKeyDown:
|
|
2657
|
-
"aria-label":
|
|
2661
|
+
onKeyDown: h,
|
|
2662
|
+
"aria-label": f == null ? void 0 : f.searchCloseButtonTooltip,
|
|
2658
2663
|
children: /* @__PURE__ */ i(hr, { onClick: x, className: ne["rp-search-tool-input-icon"] })
|
|
2659
2664
|
}
|
|
2660
2665
|
) })
|
|
@@ -2662,15 +2667,15 @@ const Se = {
|
|
|
2662
2667
|
] })
|
|
2663
2668
|
}
|
|
2664
2669
|
) }) : null;
|
|
2665
|
-
},
|
|
2670
|
+
}, Ei = "_loading_1iq0a_1", Ee = {
|
|
2666
2671
|
"rp-loading-overlay": "_rp-loading-overlay_1iq0a_1",
|
|
2667
2672
|
"rp-loading-modal": "_rp-loading-modal_1iq0a_14",
|
|
2668
2673
|
"rp-loading-title": "_rp-loading-title_1iq0a_27",
|
|
2669
2674
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_1iq0a_35",
|
|
2670
2675
|
"rp-loading-progress": "_rp-loading-progress_1iq0a_35",
|
|
2671
2676
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_1iq0a_57",
|
|
2672
|
-
loading:
|
|
2673
|
-
},
|
|
2677
|
+
loading: Ei
|
|
2678
|
+
}, Oi = ({ percentage: t }) => {
|
|
2674
2679
|
const { cancel: e } = et(), { localeMessages: r } = me();
|
|
2675
2680
|
return t < 1 ? null : /* @__PURE__ */ i("div", { className: oe(Ee["rp-loading-overlay"]), children: /* @__PURE__ */ z("div", { className: oe(Ee["rp-loading-modal"]), children: [
|
|
2676
2681
|
/* @__PURE__ */ z("div", { className: oe(Ee["rp-loading-title"]), children: [
|
|
@@ -2686,20 +2691,20 @@ const Se = {
|
|
|
2686
2691
|
) }),
|
|
2687
2692
|
/* @__PURE__ */ i("button", { className: oe(Ee["rp-loading-cancel-button"]), onClick: e, children: r == null ? void 0 : r.printCancelLabel })
|
|
2688
2693
|
] }) });
|
|
2689
|
-
},
|
|
2694
|
+
}, Di = Me((t, e) => {
|
|
2690
2695
|
const { showPrintProgress: r } = _e(), { progress: o } = et(), { isSmallScreen: n } = Re(), { percentage: a } = o || {}, c = () => n ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2691
2696
|
return /* @__PURE__ */ z("div", { children: [
|
|
2692
2697
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: ze["rp-toolbar-content"], children: /* @__PURE__ */ z("div", { className: ze["rp-toolbar-wrapper"], style: c(), children: [
|
|
2693
2698
|
/* @__PURE__ */ z("div", { "data-rp": "topBarLeft", className: ze["rp-toolbar-start"], children: [
|
|
2694
|
-
/* @__PURE__ */ i(
|
|
2699
|
+
/* @__PURE__ */ i(Ni, {}),
|
|
2695
2700
|
/* @__PURE__ */ i(Bo, {})
|
|
2696
2701
|
] }),
|
|
2697
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: ze["rp-toolbar-middle"], children: /* @__PURE__ */ i(
|
|
2698
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: ze["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
2702
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: ze["rp-toolbar-middle"], children: /* @__PURE__ */ i(Li, {}) }),
|
|
2703
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: ze["rp-toolbar-end"], children: /* @__PURE__ */ i(Si, {}) })
|
|
2699
2704
|
] }) }),
|
|
2700
|
-
r && a ? /* @__PURE__ */ i(
|
|
2705
|
+
r && a ? /* @__PURE__ */ i(Oi, { percentage: a }) : null
|
|
2701
2706
|
] });
|
|
2702
|
-
}),
|
|
2707
|
+
}), gt = {
|
|
2703
2708
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
2704
2709
|
"rp-sidebar-content": "_rp-sidebar-content_1sdl6_1",
|
|
2705
2710
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1sdl6_16",
|
|
@@ -2710,7 +2715,7 @@ const Se = {
|
|
|
2710
2715
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2711
2716
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2712
2717
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2713
|
-
},
|
|
2718
|
+
}, zi = (t) => {
|
|
2714
2719
|
const { thumbnailSrc: e, pageNumber: r, isFocused: o, viewport: n } = t, { goToPage: a } = ce(), c = k(() => o ? Ae["rp-thumbnail-active"] : "", [o]), s = k(() => ({
|
|
2715
2720
|
width: Math.round(n.width),
|
|
2716
2721
|
height: Math.round(n.height)
|
|
@@ -2740,7 +2745,7 @@ const Se = {
|
|
|
2740
2745
|
width: `${s.width}px`,
|
|
2741
2746
|
height: `${s.height}px`
|
|
2742
2747
|
},
|
|
2743
|
-
children: /* @__PURE__ */ i(
|
|
2748
|
+
children: /* @__PURE__ */ i(St, {})
|
|
2744
2749
|
}
|
|
2745
2750
|
) }),
|
|
2746
2751
|
/* @__PURE__ */ i("div", { className: Ae["rp-thumbnail-text"], children: r })
|
|
@@ -2750,22 +2755,22 @@ const Se = {
|
|
|
2750
2755
|
}, or = {
|
|
2751
2756
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2752
2757
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2753
|
-
},
|
|
2758
|
+
}, Ai = 16, Fi = (t, e) => {
|
|
2754
2759
|
const r = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
2755
|
-
t && (r != null && r.offsetTop) && (t.scrollTop = (r == null ? void 0 : r.offsetTop) -
|
|
2756
|
-
},
|
|
2760
|
+
t && (r != null && r.offsetTop) && (t.scrollTop = (r == null ? void 0 : r.offsetTop) - Ai);
|
|
2761
|
+
}, ki = Me((t, e) => {
|
|
2757
2762
|
const { show: r } = t, { focusedPage: o, totalPages: n } = ce(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: l } = br(), d = M(null), u = M(1);
|
|
2758
2763
|
ir(e, () => d.current);
|
|
2759
|
-
const
|
|
2764
|
+
const m = k(() => Object.values(a), [a]), p = I(() => {
|
|
2760
2765
|
const g = s + 1;
|
|
2761
2766
|
g <= n && c(g);
|
|
2762
2767
|
}, [c, n, s]);
|
|
2763
2768
|
return O(() => {
|
|
2764
|
-
o > s ? l(o) : r && u.current !== o && (
|
|
2765
|
-
}, [o, s, l, r,
|
|
2769
|
+
o > s ? l(o) : r && u.current !== o && (Fi(d.current, o), u.current = o);
|
|
2770
|
+
}, [o, s, l, r, m]), wn(d.current, p), /* @__PURE__ */ i("div", { ref: d, className: or["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: or["rp-thumbnails"], children: r ? m.map((g, _) => {
|
|
2766
2771
|
var b, v;
|
|
2767
2772
|
return /* @__PURE__ */ i(
|
|
2768
|
-
|
|
2773
|
+
zi,
|
|
2769
2774
|
{
|
|
2770
2775
|
isFocused: o === ((b = g.page) == null ? void 0 : b.pageNumber),
|
|
2771
2776
|
pageNumber: (v = g.page) == null ? void 0 : v.pageNumber,
|
|
@@ -2773,13 +2778,13 @@ const Se = {
|
|
|
2773
2778
|
loading: g.loading,
|
|
2774
2779
|
viewport: g.viewport
|
|
2775
2780
|
},
|
|
2776
|
-
|
|
2781
|
+
_
|
|
2777
2782
|
);
|
|
2778
2783
|
}) : null }) });
|
|
2779
|
-
}),
|
|
2784
|
+
}), Mi = () => {
|
|
2780
2785
|
const { thumbnailIcon: t } = fe();
|
|
2781
2786
|
return t || /* @__PURE__ */ i(_n, {});
|
|
2782
|
-
},
|
|
2787
|
+
}, Wi = () => {
|
|
2783
2788
|
const { active: t, setActive: e } = br(), [r, o] = $(200), n = M(null), { thumbnailTool: a, sidebarEnable: c } = _e(), { localeMessages: s } = me(), l = I(() => {
|
|
2784
2789
|
e((u) => !u);
|
|
2785
2790
|
}, []), d = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: l, active: t }) : a ? /* @__PURE__ */ i(U, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
@@ -2788,25 +2793,25 @@ const Se = {
|
|
|
2788
2793
|
onClick: l,
|
|
2789
2794
|
active: t,
|
|
2790
2795
|
"aria-label": s == null ? void 0 : s.thumbnailTooltip,
|
|
2791
|
-
children: /* @__PURE__ */ i(
|
|
2796
|
+
children: /* @__PURE__ */ i(Mi, {})
|
|
2792
2797
|
}
|
|
2793
2798
|
) }) : null, [a, t, l, s]);
|
|
2794
2799
|
return /* @__PURE__ */ i(xe, { children: c && /* @__PURE__ */ z(
|
|
2795
2800
|
"div",
|
|
2796
2801
|
{
|
|
2797
2802
|
style: { "--rp-thumbnail-width": `${r}px` },
|
|
2798
|
-
className:
|
|
2803
|
+
className: gt["rp-sidebar-content-wrapper"],
|
|
2799
2804
|
"data-rp": "sidebar",
|
|
2800
2805
|
children: [
|
|
2801
|
-
/* @__PURE__ */ i("div", { className:
|
|
2806
|
+
/* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children: d }),
|
|
2802
2807
|
/* @__PURE__ */ z(
|
|
2803
2808
|
"div",
|
|
2804
2809
|
{
|
|
2805
2810
|
"data-rp": "thumbnailSidebar",
|
|
2806
2811
|
hidden: !t,
|
|
2807
|
-
className:
|
|
2812
|
+
className: gt["rp-thumbnails-wrapper"],
|
|
2808
2813
|
children: [
|
|
2809
|
-
/* @__PURE__ */ i(
|
|
2814
|
+
/* @__PURE__ */ i(ki, { show: t, ref: n }),
|
|
2810
2815
|
/* @__PURE__ */ i(bn, { onWidthChange: o, thumbnailRef: n })
|
|
2811
2816
|
]
|
|
2812
2817
|
}
|
|
@@ -2822,7 +2827,7 @@ const Se = {
|
|
|
2822
2827
|
"rp-loader": "_rp-loader_we0st_54",
|
|
2823
2828
|
"rp-theme-variables": "_rp-theme-variables_we0st_58",
|
|
2824
2829
|
"rp-dark-mode": "_rp-dark-mode_we0st_149"
|
|
2825
|
-
},
|
|
2830
|
+
}, Hi = Me(
|
|
2826
2831
|
(t, e) => {
|
|
2827
2832
|
const { children: r, toolbarRef: o, style: n, className: a } = t, { customVariables: c, customDarkVariables: s } = In(), { darkMode: l } = on();
|
|
2828
2833
|
return /* @__PURE__ */ i(
|
|
@@ -2846,21 +2851,21 @@ const Se = {
|
|
|
2846
2851
|
);
|
|
2847
2852
|
}
|
|
2848
2853
|
), xs = Me((t, e) => {
|
|
2849
|
-
const { children: r, slots: o, icons: n, style: a, className: c, mobileWidth: s, onLoaded: l, cleanupOnLoaded: d } = t, [u,
|
|
2854
|
+
const { children: r, slots: o, icons: n, style: a, className: c, mobileWidth: s, onLoaded: l, cleanupOnLoaded: d } = t, [u, m] = $(null), { setContainer: p, setContentRef: g } = Ie(), { loading: _ } = X(), { LoaderImageComponent: b } = dr();
|
|
2850
2855
|
return O(() => (l && l(), () => {
|
|
2851
2856
|
d && d();
|
|
2852
|
-
}), [l, d]), /* @__PURE__ */ i(
|
|
2857
|
+
}), [l, d]), /* @__PURE__ */ i(Hi, { toolbarRef: u, ref: e, children: /* @__PURE__ */ i(yn, { mobileWidth: s, children: /* @__PURE__ */ i(Cn, { slots: o, children: /* @__PURE__ */ i(Tn, { icons: n, children: /* @__PURE__ */ z(Pn, { getContainerRef: p, style: a, className: c, children: [
|
|
2853
2858
|
/* @__PURE__ */ z(Sn, { children: [
|
|
2854
2859
|
/* @__PURE__ */ z("div", { className: we["rp-layout"], children: [
|
|
2855
|
-
/* @__PURE__ */ i(
|
|
2860
|
+
/* @__PURE__ */ i(Di, { ref: m }),
|
|
2856
2861
|
/* @__PURE__ */ z("div", { className: we["rp-content"], children: [
|
|
2857
|
-
/* @__PURE__ */ i("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ i(
|
|
2862
|
+
/* @__PURE__ */ i("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ i(Wi, {}) }),
|
|
2858
2863
|
/* @__PURE__ */ i("div", { ref: g, className: we["rp-pages"], children: r })
|
|
2859
2864
|
] })
|
|
2860
2865
|
] }),
|
|
2861
2866
|
/* @__PURE__ */ i(xn, {})
|
|
2862
2867
|
] }),
|
|
2863
|
-
|
|
2868
|
+
_ ? /* @__PURE__ */ i(
|
|
2864
2869
|
"div",
|
|
2865
2870
|
{
|
|
2866
2871
|
className: we["rp-loader"],
|
|
@@ -2892,22 +2897,22 @@ const Se = {
|
|
|
2892
2897
|
});
|
|
2893
2898
|
export {
|
|
2894
2899
|
Co as A,
|
|
2895
|
-
|
|
2900
|
+
Di as B,
|
|
2896
2901
|
vo as C,
|
|
2897
2902
|
Vo as D,
|
|
2898
|
-
|
|
2903
|
+
zi as E,
|
|
2899
2904
|
Gr as F,
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2905
|
+
ki as G,
|
|
2906
|
+
Wi as H,
|
|
2907
|
+
Hi as I,
|
|
2908
|
+
Oi as L,
|
|
2909
|
+
Ti as M,
|
|
2910
|
+
Pi as O,
|
|
2906
2911
|
_s as P,
|
|
2907
2912
|
Ts as R,
|
|
2908
2913
|
Cs as S,
|
|
2909
2914
|
bs as T,
|
|
2910
|
-
|
|
2915
|
+
Li as Z,
|
|
2911
2916
|
ws as a,
|
|
2912
2917
|
xs as b,
|
|
2913
2918
|
Hr as c,
|
|
@@ -2925,13 +2930,13 @@ export {
|
|
|
2925
2930
|
Cr as o,
|
|
2926
2931
|
_o as p,
|
|
2927
2932
|
To as q,
|
|
2928
|
-
|
|
2933
|
+
Rt as r,
|
|
2929
2934
|
Wo as s,
|
|
2930
2935
|
Go as t,
|
|
2931
2936
|
ce as u,
|
|
2932
2937
|
Bo as v,
|
|
2933
|
-
|
|
2938
|
+
ui as w,
|
|
2934
2939
|
Zr as x,
|
|
2935
|
-
|
|
2936
|
-
|
|
2940
|
+
Si as y,
|
|
2941
|
+
Ni as z
|
|
2937
2942
|
};
|