@pdf-viewer/react 1.7.3-rc.1 → 1.7.3-rc.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-7af301cf.js → RPDefaultLayout-1ff68a43.js} +719 -699
- 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/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- 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/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- 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/LoadingIndicator.js +1 -1
- 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/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/usePresentPage.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 +1 -1
|
@@ -4,7 +4,7 @@ import { useRef as H, useEffect as F, useCallback as N, useState as $, useMemo a
|
|
|
4
4
|
import { ChevronUpIcon as He } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as re } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as dn } from "./components/ui/Input.js";
|
|
7
|
-
import { ViewMode as Ie, ScrollMode as J, AnnotationSubType as
|
|
7
|
+
import { ViewMode as Ie, ScrollMode as J, AnnotationSubType as Dt, SelectionMode as tr, ZoomLevel as at } from "./utils/types.js";
|
|
8
8
|
import { useScrollModeContext as Le } from "./contexts/ScrollModeContext.js";
|
|
9
9
|
import { useDocumentContext as Q } from "./contexts/RPDocumentContext.js";
|
|
10
10
|
import { useDocumentPasswordContext as nr } from "./contexts/DocumentPasswordContext.js";
|
|
@@ -47,7 +47,7 @@ import { useThemeContext as Tr } from "./contexts/ThemeContext.js";
|
|
|
47
47
|
import * as Sr from "pdfjs-dist";
|
|
48
48
|
import { PixelsPerInch as yr, AnnotationMode as xr, RenderingCancelledException as Ir, AnnotationLayer as Rr } from "pdfjs-dist";
|
|
49
49
|
import { SimpleLinkService as Lr } from "./utils/link_service.js";
|
|
50
|
-
import { annotationsEvents as Er, annotationEventsHandler as Nr, handleClick as At, handleAnnotationWidget as Or, handleAnnotationLink as
|
|
50
|
+
import { annotationsEvents as Er, annotationEventsHandler as Nr, handleClick as At, handleAnnotationWidget as Or, handleAnnotationLink as zr, bindLayerEvents as Dr, unbindLayerEvents as Ft } from "./utils/annotations.js";
|
|
51
51
|
import { normalizeSingleKeyword as Ar, sortHighlightPosition as Fr, unwrap as Wr } from "./components/page/searchHighlight.js";
|
|
52
52
|
import { _ as kr, U as Mr } from "./Popover-1faa77f6.js";
|
|
53
53
|
import { useMousePressed as Hr } from "./utils/hooks/useMousePressed.js";
|
|
@@ -94,20 +94,20 @@ import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
|
94
94
|
import { ClearIcon as Po } from "./components/icons/ClearIcon.js";
|
|
95
95
|
import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
|
|
96
96
|
import './assets/RPDefaultLayout.css';const wn = () => {
|
|
97
|
-
const { viewMode: t } = Ee(), { scrollMode: e } = Le(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: d, heights:
|
|
97
|
+
const { viewMode: t } = Ee(), { scrollMode: e } = Le(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: d, heights: p } = Ue(), m = H(e), P = H(t), u = H(c), { targetScrollPage: v } = pn();
|
|
98
98
|
F(() => {
|
|
99
99
|
n != null && n.scrollToItem && (l.current = n);
|
|
100
100
|
}, [n]), F(() => {
|
|
101
101
|
m.current = e, P.current = t;
|
|
102
102
|
}, [e, t]);
|
|
103
|
-
const
|
|
104
|
-
(
|
|
103
|
+
const _ = N(
|
|
104
|
+
(C, T) => {
|
|
105
105
|
if (!r)
|
|
106
106
|
return;
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
107
|
+
const h = Math.ceil(C / 2) * 2 - 1;
|
|
108
|
+
if (C === h + 1) {
|
|
109
109
|
const g = {
|
|
110
|
-
left: d[
|
|
110
|
+
left: d[h],
|
|
111
111
|
top: 0
|
|
112
112
|
};
|
|
113
113
|
return new Promise(
|
|
@@ -128,66 +128,66 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
128
128
|
return F(() => {
|
|
129
129
|
m.current = e, P.current = t;
|
|
130
130
|
}, [e, t]), F(() => {
|
|
131
|
-
|
|
131
|
+
u.current = c;
|
|
132
132
|
}, [c]), { scrollToPage: N(
|
|
133
|
-
(
|
|
134
|
-
a(
|
|
135
|
-
const
|
|
136
|
-
let f =
|
|
133
|
+
(C, T = "smooth") => {
|
|
134
|
+
a(C);
|
|
135
|
+
const h = C - 1;
|
|
136
|
+
let f = h, g = 0;
|
|
137
137
|
if (P.current === Ie.DUAL_PAGE && m.current === J.PAGE_SCROLLING) {
|
|
138
|
-
|
|
138
|
+
_(C, T);
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
if (m.current === J.PAGE_SCROLLING) {
|
|
142
|
-
a(
|
|
142
|
+
a(C);
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
145
|
if (!l.current || !o)
|
|
146
146
|
return;
|
|
147
147
|
const s = o;
|
|
148
|
-
if (v.current =
|
|
149
|
-
g =
|
|
150
|
-
const
|
|
148
|
+
if (v.current = C, m.current === J.HORIZONTAL_SCROLLING) {
|
|
149
|
+
g = h;
|
|
150
|
+
const S = {
|
|
151
151
|
left: Ae(d, g),
|
|
152
152
|
top: 0
|
|
153
153
|
};
|
|
154
154
|
return s.scrollTo({
|
|
155
|
-
...
|
|
155
|
+
...S,
|
|
156
156
|
behavior: T
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
if (P.current === Ie.DUAL_PAGE) {
|
|
160
|
-
g =
|
|
161
|
-
const
|
|
160
|
+
g = h % 2, f = Math.floor(h / 2);
|
|
161
|
+
const S = {
|
|
162
162
|
left: Ae(d, g),
|
|
163
|
-
top: Ae(
|
|
163
|
+
top: Ae(p, f)
|
|
164
164
|
};
|
|
165
165
|
return s.scrollTo({
|
|
166
|
-
...
|
|
166
|
+
...S,
|
|
167
167
|
behavior: T
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
|
-
const
|
|
170
|
+
const w = {
|
|
171
171
|
left: 0,
|
|
172
|
-
top: Ae(
|
|
172
|
+
top: Ae(p, f)
|
|
173
173
|
};
|
|
174
174
|
return s.scrollTo({
|
|
175
|
-
...
|
|
175
|
+
...w,
|
|
176
176
|
behavior: T
|
|
177
177
|
});
|
|
178
178
|
},
|
|
179
179
|
[
|
|
180
180
|
o,
|
|
181
181
|
c,
|
|
182
|
-
|
|
182
|
+
_,
|
|
183
183
|
a,
|
|
184
184
|
st,
|
|
185
|
-
|
|
185
|
+
p,
|
|
186
186
|
d
|
|
187
187
|
]
|
|
188
188
|
) };
|
|
189
189
|
}, To = (t = 1) => {
|
|
190
|
-
const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ee(), { scrollMode: d } = Le(), { widths:
|
|
190
|
+
const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ee(), { scrollMode: d } = Le(), { widths: p } = Ue(), { pagesRef: m } = ge(), P = Pt(e, 100), u = N(
|
|
191
191
|
(f) => {
|
|
192
192
|
if (!/^[0-9]*$/g.test(f.toString()) || !f)
|
|
193
193
|
return { success: !1, currentPage: l.current };
|
|
@@ -195,35 +195,35 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
195
195
|
return s < 0 || s > o ? { success: !1, currentPage: l.current } : (n(s), l.current = s, { success: !0, currentPage: +f });
|
|
196
196
|
},
|
|
197
197
|
[o]
|
|
198
|
-
), v = N(
|
|
198
|
+
), v = N(u, [u]), _ = N(
|
|
199
199
|
(f) => {
|
|
200
|
-
const g =
|
|
200
|
+
const g = u(f);
|
|
201
201
|
return g.success && a(g.currentPage), g;
|
|
202
202
|
},
|
|
203
|
-
[
|
|
204
|
-
),
|
|
203
|
+
[u, a]
|
|
204
|
+
), y = N((f) => {
|
|
205
205
|
const g = f % 2 === 1;
|
|
206
206
|
if (!m || g)
|
|
207
207
|
return !1;
|
|
208
|
-
const s = g ?
|
|
209
|
-
return c === Ie.DUAL_PAGE && s +
|
|
210
|
-
}, [c,
|
|
208
|
+
const s = g ? p[f] : p[f - 1], w = g ? p[f + 1] : p[f];
|
|
209
|
+
return c === Ie.DUAL_PAGE && s + w < m.clientWidth;
|
|
210
|
+
}, [c, p, m, o]), C = N(() => {
|
|
211
211
|
let f = e - 1;
|
|
212
|
-
|
|
213
|
-
}, [
|
|
212
|
+
y(f) && (f = e - 2), _(f);
|
|
213
|
+
}, [_, e, c, d, y]), T = k(() => c === Ie.DUAL_PAGE && d === J.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, d]), h = N(() => {
|
|
214
214
|
if (T)
|
|
215
215
|
return;
|
|
216
216
|
let f = e + 1;
|
|
217
|
-
|
|
218
|
-
}, [
|
|
217
|
+
y(f) && (f = e + 2), _(f);
|
|
218
|
+
}, [_, e, y, c, d, T]);
|
|
219
219
|
return {
|
|
220
220
|
focusedPage: P,
|
|
221
221
|
totalPages: o,
|
|
222
222
|
setFocusedPage: v,
|
|
223
223
|
setTotalPages: r,
|
|
224
|
-
nextPage:
|
|
225
|
-
prevPage:
|
|
226
|
-
goToPage:
|
|
224
|
+
nextPage: h,
|
|
225
|
+
prevPage: C,
|
|
226
|
+
goToPage: _
|
|
227
227
|
};
|
|
228
228
|
}, _n = Ye({
|
|
229
229
|
focusedPage: 0,
|
|
@@ -265,7 +265,7 @@ const So = () => {
|
|
|
265
265
|
loadedPages: 0,
|
|
266
266
|
totalPages: 0,
|
|
267
267
|
percentage: 0
|
|
268
|
-
}), [r, a] = $(!1), [l, c] = $(!1), [d,
|
|
268
|
+
}), [r, a] = $(!1), [l, c] = $(!1), [d, p] = $(null), m = H(!1);
|
|
269
269
|
F(() => {
|
|
270
270
|
m.current;
|
|
271
271
|
}, [m]);
|
|
@@ -273,147 +273,147 @@ const So = () => {
|
|
|
273
273
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
274
274
|
const f = document.querySelector(".rp-print-zone");
|
|
275
275
|
f && f.remove();
|
|
276
|
-
}, []),
|
|
277
|
-
m.current = !1, a(!1), c(!1),
|
|
276
|
+
}, []), u = N(() => {
|
|
277
|
+
m.current = !1, a(!1), c(!1), p(null), o({
|
|
278
278
|
loadedPages: 0,
|
|
279
279
|
totalPages: 0,
|
|
280
280
|
percentage: 0
|
|
281
281
|
});
|
|
282
282
|
}, []), v = () => {
|
|
283
283
|
m.current = !0;
|
|
284
|
-
},
|
|
284
|
+
}, _ = async ({
|
|
285
285
|
scratchCanvas: f,
|
|
286
286
|
pdfDocument: g,
|
|
287
287
|
pageNumber: s,
|
|
288
|
-
viewerPdfPage:
|
|
289
|
-
printResolution:
|
|
290
|
-
optionalContentConfigPromise:
|
|
288
|
+
viewerPdfPage: w,
|
|
289
|
+
printResolution: b,
|
|
290
|
+
optionalContentConfigPromise: S,
|
|
291
291
|
printAnnotationStoragePromise: E
|
|
292
292
|
}) => {
|
|
293
293
|
if (m.current) {
|
|
294
|
-
|
|
294
|
+
u();
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
|
-
const x =
|
|
298
|
-
f.width = Math.floor(
|
|
297
|
+
const x = b / yr.PDF;
|
|
298
|
+
f.width = Math.floor(w.width * x), f.height = Math.floor(w.height * x);
|
|
299
299
|
const R = f.getContext("2d");
|
|
300
300
|
R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, f.width, f.height), R.restore();
|
|
301
|
-
const [
|
|
301
|
+
const [z, D] = await Promise.all([
|
|
302
302
|
g.getPage(s),
|
|
303
303
|
E
|
|
304
304
|
]);
|
|
305
305
|
if (m.current) {
|
|
306
|
-
|
|
306
|
+
u();
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
309
309
|
const A = {
|
|
310
310
|
canvasContext: R,
|
|
311
311
|
transform: [x, 0, 0, x, 0, 0],
|
|
312
|
-
viewport:
|
|
312
|
+
viewport: z.getViewport({ scale: 1, rotation: w.rotation }),
|
|
313
313
|
intent: "print",
|
|
314
314
|
annotationMode: xr.ENABLE_STORAGE,
|
|
315
|
-
optionalContentConfigPromise:
|
|
316
|
-
printAnnotationStorage:
|
|
315
|
+
optionalContentConfigPromise: S,
|
|
316
|
+
printAnnotationStorage: D
|
|
317
317
|
};
|
|
318
318
|
try {
|
|
319
|
-
return
|
|
319
|
+
return z.render(A).promise;
|
|
320
320
|
} catch (L) {
|
|
321
321
|
throw L instanceof Ir || console.error(L), L;
|
|
322
322
|
}
|
|
323
|
-
},
|
|
323
|
+
}, y = N(() => {
|
|
324
324
|
const f = window.print;
|
|
325
325
|
return new Promise((g) => {
|
|
326
|
-
const s = (
|
|
326
|
+
const s = (S) => {
|
|
327
327
|
setTimeout(() => {
|
|
328
|
-
f.call(window), setTimeout(() =>
|
|
328
|
+
f.call(window), setTimeout(() => S(), 20);
|
|
329
329
|
}, 0);
|
|
330
330
|
};
|
|
331
331
|
if (document.querySelector(".rp-print-zone")) {
|
|
332
332
|
s(g);
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
|
-
const
|
|
336
|
-
document.querySelector(".rp-print-zone") && (s(g),
|
|
335
|
+
const b = new MutationObserver(() => {
|
|
336
|
+
document.querySelector(".rp-print-zone") && (s(g), b.disconnect());
|
|
337
337
|
});
|
|
338
|
-
|
|
338
|
+
b.observe(document.body, { childList: !0, subtree: !0 });
|
|
339
339
|
});
|
|
340
|
-
}, []),
|
|
340
|
+
}, []), C = async (f) => {
|
|
341
341
|
const g = document.createElement("img"), s = document.createElement("div");
|
|
342
|
-
return s.classList.add("rp-print-page"), await new Promise((
|
|
343
|
-
f.toBlob((
|
|
344
|
-
|
|
345
|
-
URL.revokeObjectURL(g.src),
|
|
346
|
-
}, g.onerror =
|
|
342
|
+
return s.classList.add("rp-print-page"), await new Promise((w, b) => {
|
|
343
|
+
f.toBlob((S) => {
|
|
344
|
+
S ? (g.src = URL.createObjectURL(S), g.onload = () => {
|
|
345
|
+
URL.revokeObjectURL(g.src), w();
|
|
346
|
+
}, g.onerror = b) : b(new Error("Failed to create blob"));
|
|
347
347
|
});
|
|
348
348
|
}).catch(() => {
|
|
349
349
|
}), s.appendChild(g), s;
|
|
350
350
|
}, T = (f, g) => {
|
|
351
351
|
const s = document.createElement("div");
|
|
352
352
|
s.classList.add("rp-print-zone");
|
|
353
|
-
const
|
|
354
|
-
if (
|
|
355
|
-
const { width:
|
|
356
|
-
|
|
353
|
+
const w = document.createElement("style"), b = g.get(1);
|
|
354
|
+
if (b) {
|
|
355
|
+
const { width: S, height: E } = b == null ? void 0 : b.page.getViewport({ scale: 1 });
|
|
356
|
+
w.innerHTML = `@page { size: ${S}px ${E}px }`;
|
|
357
357
|
}
|
|
358
|
-
return s.appendChild(
|
|
359
|
-
},
|
|
358
|
+
return s.appendChild(w), s.append(...f), s;
|
|
359
|
+
}, h = N(async () => {
|
|
360
360
|
if (!t)
|
|
361
361
|
return;
|
|
362
|
-
|
|
362
|
+
u();
|
|
363
363
|
const f = document.createElement("canvas"), g = [];
|
|
364
364
|
try {
|
|
365
365
|
t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
366
|
-
const
|
|
366
|
+
const w = t.getOptionalContentConfig({ intent: "print" }), b = Promise.resolve(
|
|
367
367
|
t.annotationStorage.print ?? void 0
|
|
368
|
-
),
|
|
368
|
+
), S = e.size;
|
|
369
369
|
for (const [x, R] of e) {
|
|
370
370
|
if (m.current) {
|
|
371
|
-
|
|
371
|
+
u();
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
|
-
const
|
|
375
|
-
if (await
|
|
374
|
+
const z = R.page.getViewport({ scale: 1 });
|
|
375
|
+
if (await _({
|
|
376
376
|
scratchCanvas: f,
|
|
377
377
|
pdfDocument: t,
|
|
378
378
|
pageNumber: x,
|
|
379
|
-
viewerPdfPage:
|
|
379
|
+
viewerPdfPage: z,
|
|
380
380
|
printResolution: 150,
|
|
381
|
-
optionalContentConfigPromise:
|
|
382
|
-
printAnnotationStoragePromise:
|
|
381
|
+
optionalContentConfigPromise: w,
|
|
382
|
+
printAnnotationStoragePromise: b
|
|
383
383
|
}), m.current) {
|
|
384
|
-
|
|
384
|
+
u();
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
387
|
-
const
|
|
388
|
-
g.push(
|
|
389
|
-
const A = parseFloat((g.length /
|
|
387
|
+
const D = await C(f);
|
|
388
|
+
g.push(D);
|
|
389
|
+
const A = parseFloat((g.length / S * 100).toFixed(2));
|
|
390
390
|
o({
|
|
391
391
|
loadedPages: x,
|
|
392
|
-
totalPages:
|
|
392
|
+
totalPages: S,
|
|
393
393
|
percentage: A
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
if (m.current) {
|
|
397
|
-
|
|
397
|
+
u();
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
400
|
const E = T(g, e);
|
|
401
|
-
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await
|
|
401
|
+
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await y();
|
|
402
402
|
} catch (s) {
|
|
403
|
-
c(!0), s instanceof Error &&
|
|
403
|
+
c(!0), s instanceof Error && p(s);
|
|
404
404
|
} finally {
|
|
405
405
|
f.height = 0, f.width = 0;
|
|
406
406
|
}
|
|
407
407
|
}, [t, e, m]);
|
|
408
408
|
return F(() => {
|
|
409
409
|
const f = () => {
|
|
410
|
-
|
|
410
|
+
u(), P();
|
|
411
411
|
};
|
|
412
412
|
return window.addEventListener("afterprint", f, !0), () => {
|
|
413
413
|
window.removeEventListener("afterprint", f, !0);
|
|
414
414
|
};
|
|
415
|
-
}, [P,
|
|
416
|
-
print:
|
|
415
|
+
}, [P, u]), {
|
|
416
|
+
print: h,
|
|
417
417
|
cancel: v,
|
|
418
418
|
progress: n,
|
|
419
419
|
isComplete: r,
|
|
@@ -438,36 +438,36 @@ const So = () => {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
}), Ms = ({ children: t }) => {
|
|
441
|
-
const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: d, isError:
|
|
442
|
-
|
|
443
|
-
}, []),
|
|
444
|
-
m &&
|
|
441
|
+
const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: d, isError: p, error: m } = So(), P = N((C) => {
|
|
442
|
+
C && typeof C == "function" && r(() => C);
|
|
443
|
+
}, []), u = (C) => {
|
|
444
|
+
m && C(m);
|
|
445
445
|
}, v = N(
|
|
446
|
-
(
|
|
447
|
-
n(() =>
|
|
446
|
+
(C) => {
|
|
447
|
+
n(() => C);
|
|
448
448
|
},
|
|
449
449
|
[c, e]
|
|
450
450
|
);
|
|
451
451
|
F(() => {
|
|
452
|
-
d && o &&
|
|
452
|
+
d && o && _();
|
|
453
453
|
}, [d, o]), F(() => {
|
|
454
|
-
|
|
455
|
-
console.error(
|
|
454
|
+
p && u((C) => {
|
|
455
|
+
console.error(C);
|
|
456
456
|
});
|
|
457
|
-
}, [
|
|
457
|
+
}, [p]), F(() => {
|
|
458
458
|
c && e && e(c);
|
|
459
459
|
}, [c, e]);
|
|
460
|
-
const
|
|
460
|
+
const _ = () => {
|
|
461
461
|
o && (o(), r(null));
|
|
462
|
-
},
|
|
462
|
+
}, y = {
|
|
463
463
|
print: a,
|
|
464
464
|
cancel: l,
|
|
465
465
|
setOnProgress: v,
|
|
466
466
|
setOnComplete: P,
|
|
467
|
-
setOnError:
|
|
467
|
+
setOnError: u,
|
|
468
468
|
progress: c
|
|
469
469
|
};
|
|
470
|
-
return /* @__PURE__ */ i(bn.Provider, { value:
|
|
470
|
+
return /* @__PURE__ */ i(bn.Provider, { value: y, children: t });
|
|
471
471
|
}, tt = () => {
|
|
472
472
|
const t = Je(bn);
|
|
473
473
|
if (!t)
|
|
@@ -478,41 +478,41 @@ const So = () => {
|
|
|
478
478
|
(c) => {
|
|
479
479
|
if (!n.size)
|
|
480
480
|
return;
|
|
481
|
-
const d = c > n.size ? n.size : c,
|
|
482
|
-
const { thumbnailViewport: v, scale:
|
|
483
|
-
|
|
484
|
-
o +
|
|
481
|
+
const d = c > n.size ? n.size : c, p = Array.from(n.values()).slice(0, d).map((u) => {
|
|
482
|
+
const { thumbnailViewport: v, scale: _ } = Wt(
|
|
483
|
+
u.page,
|
|
484
|
+
o + u.defaultRotation
|
|
485
485
|
);
|
|
486
486
|
return {
|
|
487
|
-
scale:
|
|
488
|
-
page:
|
|
487
|
+
scale: _,
|
|
488
|
+
page: u.page,
|
|
489
489
|
loading: !0,
|
|
490
490
|
viewport: v,
|
|
491
|
-
defaultRotation:
|
|
491
|
+
defaultRotation: u.defaultRotation
|
|
492
492
|
};
|
|
493
|
-
}), m =
|
|
493
|
+
}), m = p.reduce((u, v) => (u[v.page.pageNumber] = v, u), {});
|
|
494
494
|
e(m);
|
|
495
495
|
const P = [];
|
|
496
|
-
for (const
|
|
497
|
-
const v = document.createElement("canvas"),
|
|
498
|
-
scale:
|
|
499
|
-
rotate: o +
|
|
496
|
+
for (const u of p) {
|
|
497
|
+
const v = document.createElement("canvas"), _ = vt(u.page, v, {
|
|
498
|
+
scale: u.scale,
|
|
499
|
+
rotate: o + u.defaultRotation
|
|
500
500
|
}).promise.then(() => {
|
|
501
|
-
const
|
|
501
|
+
const y = v.toDataURL();
|
|
502
502
|
return {
|
|
503
|
-
...
|
|
504
|
-
thumbnailSrc:
|
|
503
|
+
...u,
|
|
504
|
+
thumbnailSrc: y,
|
|
505
505
|
loading: !1
|
|
506
506
|
};
|
|
507
507
|
});
|
|
508
|
-
P.push(
|
|
508
|
+
P.push(_);
|
|
509
509
|
}
|
|
510
|
-
Promise.all(P).then((
|
|
511
|
-
const v =
|
|
512
|
-
(
|
|
510
|
+
Promise.all(P).then((u) => {
|
|
511
|
+
const v = u.reduce(
|
|
512
|
+
(_, y) => (_[y.page.pageNumber] = y, _),
|
|
513
513
|
{}
|
|
514
514
|
);
|
|
515
|
-
e((
|
|
515
|
+
e((_) => ({ ..._, ...v }));
|
|
516
516
|
}).catch(() => {
|
|
517
517
|
});
|
|
518
518
|
},
|
|
@@ -537,11 +537,11 @@ const So = () => {
|
|
|
537
537
|
scale: d.thumbnailScale
|
|
538
538
|
}
|
|
539
539
|
}));
|
|
540
|
-
const
|
|
541
|
-
vt(d.page,
|
|
542
|
-
const m =
|
|
540
|
+
const p = document.createElement("canvas");
|
|
541
|
+
vt(d.page, p, { scale: d.thumbnailScale, rotate: o }).promise.then(() => {
|
|
542
|
+
const m = p.toDataURL(), { thumbnailViewport: P, scale: u } = Wt(d.page, o);
|
|
543
543
|
return {
|
|
544
|
-
scale:
|
|
544
|
+
scale: u,
|
|
545
545
|
thumbnailSrc: m,
|
|
546
546
|
page: d.page,
|
|
547
547
|
loading: !1,
|
|
@@ -577,34 +577,34 @@ const So = () => {
|
|
|
577
577
|
}
|
|
578
578
|
);
|
|
579
579
|
}, xo = (t = {}, e = "") => {
|
|
580
|
-
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights:
|
|
580
|
+
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: p } = Ue(), m = H(!n), { currentZoom: P } = Qe(), [u, v] = $([]), { setFocusedPage: _ } = ie(), { columnCount: y } = Ee(), { rotate: C } = Ge(), [T, h] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Le(), { pagesRef: w } = ge(), [b, S] = $(null), E = H({}), x = k(() => T === 0 ? null : u[T - 1], [T, u]), R = k(() => u.length, [u]);
|
|
581
581
|
F(() => {
|
|
582
582
|
if (!x || !c)
|
|
583
583
|
return;
|
|
584
584
|
const L = g || f;
|
|
585
|
-
if (!L || !
|
|
585
|
+
if (!L || !w)
|
|
586
586
|
return;
|
|
587
587
|
const I = c.get(x.page);
|
|
588
|
-
if (s === J.PAGE_SCROLLING &&
|
|
588
|
+
if (s === J.PAGE_SCROLLING && _(x.page), !I)
|
|
589
589
|
return;
|
|
590
590
|
let O = 0, M = 0;
|
|
591
591
|
if (s === J.VERTICAL_SCROLLING) {
|
|
592
|
-
const ae = x.page - 1, de =
|
|
593
|
-
O = Ae(
|
|
592
|
+
const ae = x.page - 1, de = y, te = ae % de, Fe = Math.floor(ae / de);
|
|
593
|
+
O = Ae(p, Fe), M = Ae(d, te);
|
|
594
594
|
}
|
|
595
595
|
s === J.HORIZONTAL_SCROLLING && (M = d.slice(0, x.page - 1).reduce((ae, de) => ae + de, 0));
|
|
596
596
|
const G = {
|
|
597
|
-
top:
|
|
598
|
-
left:
|
|
597
|
+
top: w.clientHeight / 2,
|
|
598
|
+
left: w.clientWidth / 2
|
|
599
599
|
}, Z = {
|
|
600
|
-
height:
|
|
600
|
+
height: p[x.page - 1],
|
|
601
601
|
width: d[x.page - 1]
|
|
602
602
|
}, { leftInPage: j, topInPage: q } = Br(
|
|
603
603
|
Z,
|
|
604
604
|
G,
|
|
605
605
|
x.rect,
|
|
606
606
|
P,
|
|
607
|
-
|
|
607
|
+
C
|
|
608
608
|
), ee = M + j, X = O + q, le = {
|
|
609
609
|
left: Math.max(ee, 0),
|
|
610
610
|
top: Math.max(X, 0)
|
|
@@ -614,19 +614,19 @@ const So = () => {
|
|
|
614
614
|
});
|
|
615
615
|
}, [
|
|
616
616
|
c,
|
|
617
|
-
|
|
617
|
+
_,
|
|
618
618
|
d,
|
|
619
|
-
|
|
619
|
+
p,
|
|
620
620
|
x,
|
|
621
621
|
s,
|
|
622
622
|
g,
|
|
623
623
|
f,
|
|
624
|
-
|
|
624
|
+
w
|
|
625
625
|
]);
|
|
626
|
-
const
|
|
627
|
-
|
|
628
|
-
}, [R]),
|
|
629
|
-
|
|
626
|
+
const z = N(() => {
|
|
627
|
+
h((L) => R ? L + 1 > R ? 1 : L + 1 : 0);
|
|
628
|
+
}, [R]), D = N(() => {
|
|
629
|
+
h((L) => R ? L - 1 <= 0 ? R : L - 1 : 0);
|
|
630
630
|
}, [R]), A = N(async (L) => {
|
|
631
631
|
if (!L)
|
|
632
632
|
return {};
|
|
@@ -641,10 +641,10 @@ const So = () => {
|
|
|
641
641
|
}, []);
|
|
642
642
|
return F(() => {
|
|
643
643
|
if (!n) {
|
|
644
|
-
m.current = !0, v([]),
|
|
644
|
+
m.current = !0, v([]), h(0);
|
|
645
645
|
return;
|
|
646
646
|
}
|
|
647
|
-
m.current = !1, a(!0), v([]),
|
|
647
|
+
m.current = !1, a(!0), v([]), h(0), A(l).then((L) => {
|
|
648
648
|
E.current = L;
|
|
649
649
|
const O = Object.keys(L).reduce((M, G) => {
|
|
650
650
|
const Z = cr(
|
|
@@ -655,22 +655,22 @@ const So = () => {
|
|
|
655
655
|
).map((j, q) => ({ ...j, page: Number(G), pageMatchIdx: q }));
|
|
656
656
|
return [...M, ...Z];
|
|
657
657
|
}, []);
|
|
658
|
-
v(O),
|
|
658
|
+
v(O), h(O.length ? 1 : 0);
|
|
659
659
|
}).catch(() => {
|
|
660
|
-
v([]),
|
|
660
|
+
v([]), h(0);
|
|
661
661
|
}).finally(() => a(!1));
|
|
662
662
|
}, [n, A, l, t]), {
|
|
663
663
|
search: n,
|
|
664
664
|
setSearch: o,
|
|
665
665
|
loading: r,
|
|
666
|
-
matches:
|
|
666
|
+
matches: u,
|
|
667
667
|
totalMatches: R,
|
|
668
668
|
currentMatchPosition: T,
|
|
669
669
|
currentMatch: x,
|
|
670
|
-
nextMatch:
|
|
671
|
-
prevMatch:
|
|
672
|
-
currentMatchElement:
|
|
673
|
-
setCurrentMatchElement:
|
|
670
|
+
nextMatch: z,
|
|
671
|
+
prevMatch: D,
|
|
672
|
+
currentMatchElement: b,
|
|
673
|
+
setCurrentMatchElement: S
|
|
674
674
|
};
|
|
675
675
|
}, Tn = Ye({
|
|
676
676
|
search: "",
|
|
@@ -700,12 +700,12 @@ const So = () => {
|
|
|
700
700
|
totalMatches: l,
|
|
701
701
|
currentMatchPosition: c,
|
|
702
702
|
currentMatch: d,
|
|
703
|
-
search:
|
|
703
|
+
search: p,
|
|
704
704
|
matches: m,
|
|
705
705
|
nextMatch: P,
|
|
706
|
-
prevMatch:
|
|
706
|
+
prevMatch: u,
|
|
707
707
|
currentMatchElement: v,
|
|
708
|
-
setCurrentMatchElement:
|
|
708
|
+
setCurrentMatchElement: _
|
|
709
709
|
} = xo(n, e);
|
|
710
710
|
return /* @__PURE__ */ i(
|
|
711
711
|
Tn.Provider,
|
|
@@ -719,11 +719,11 @@ const So = () => {
|
|
|
719
719
|
currentMatchPosition: c,
|
|
720
720
|
currentMatch: d,
|
|
721
721
|
nextMatch: P,
|
|
722
|
-
prevMatch:
|
|
723
|
-
search:
|
|
722
|
+
prevMatch: u,
|
|
723
|
+
search: p,
|
|
724
724
|
matches: m,
|
|
725
725
|
currentMatchElement: v,
|
|
726
|
-
setCurrentMatchElement:
|
|
726
|
+
setCurrentMatchElement: _
|
|
727
727
|
},
|
|
728
728
|
children: t
|
|
729
729
|
}
|
|
@@ -746,14 +746,14 @@ const So = () => {
|
|
|
746
746
|
return F(() => {
|
|
747
747
|
if (!a || d === 0)
|
|
748
748
|
return;
|
|
749
|
-
const
|
|
750
|
-
if (r.current &&
|
|
749
|
+
const p = a.get(e);
|
|
750
|
+
if (r.current && p) {
|
|
751
751
|
const m = r.current;
|
|
752
752
|
m.hidden = !0;
|
|
753
753
|
const P = c.current;
|
|
754
|
-
P && P.cancel(), o && o(), c.current = vt(
|
|
754
|
+
P && P.cancel(), o && o(), c.current = vt(p.page, m, {
|
|
755
755
|
scale: d,
|
|
756
|
-
rotate: l +
|
|
756
|
+
rotate: l + p.defaultRotation,
|
|
757
757
|
renderForms: !0
|
|
758
758
|
}), c.current.promise.then(() => {
|
|
759
759
|
m.hidden = !1;
|
|
@@ -774,96 +774,96 @@ const So = () => {
|
|
|
774
774
|
}, Lo = (t) => {
|
|
775
775
|
const { pageNumber: e } = t, { pages: n } = Q(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = xt(), [c, d] = $(
|
|
776
776
|
[]
|
|
777
|
-
),
|
|
777
|
+
), p = H(), m = H(), P = H([]), u = k(() => r.filter((f) => f.pageIndex === e - 1), [r, e]), v = N(
|
|
778
778
|
(f, g, s = !1) => {
|
|
779
|
-
if (s && lr(f, g), !
|
|
779
|
+
if (s && lr(f, g), !u.length) {
|
|
780
780
|
P.current = [], d([]);
|
|
781
781
|
return;
|
|
782
782
|
}
|
|
783
|
-
const
|
|
784
|
-
d(
|
|
783
|
+
const w = dr(u, f, g);
|
|
784
|
+
d(w);
|
|
785
785
|
},
|
|
786
|
-
[
|
|
787
|
-
),
|
|
786
|
+
[u]
|
|
787
|
+
), _ = H(), y = H(!1), C = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
788
788
|
F(() => ((() => {
|
|
789
|
-
if (
|
|
789
|
+
if (_.current)
|
|
790
790
|
return;
|
|
791
|
-
|
|
792
|
-
const { signal: g } =
|
|
793
|
-
|
|
794
|
-
const
|
|
795
|
-
|
|
791
|
+
_.current = new AbortController();
|
|
792
|
+
const { signal: g } = _.current, s = () => {
|
|
793
|
+
C().forEach((b) => {
|
|
794
|
+
const S = b.querySelector(".endOfContent");
|
|
795
|
+
S && (b.appendChild(S), S.style.width = "", S.style.height = "", b.classList.remove(he.selecting));
|
|
796
796
|
});
|
|
797
797
|
};
|
|
798
798
|
document.addEventListener(
|
|
799
799
|
"pointerdown",
|
|
800
800
|
() => {
|
|
801
|
-
|
|
801
|
+
y.current = !0;
|
|
802
802
|
},
|
|
803
803
|
{ signal: g }
|
|
804
804
|
), document.addEventListener(
|
|
805
805
|
"pointerup",
|
|
806
806
|
() => {
|
|
807
|
-
|
|
807
|
+
y.current = !1, s();
|
|
808
808
|
},
|
|
809
809
|
{ signal: g }
|
|
810
810
|
), window.addEventListener(
|
|
811
811
|
"blur",
|
|
812
812
|
() => {
|
|
813
|
-
|
|
813
|
+
y.current = !1, s();
|
|
814
814
|
},
|
|
815
815
|
{ signal: g }
|
|
816
816
|
), document.addEventListener(
|
|
817
817
|
"keyup",
|
|
818
818
|
() => {
|
|
819
|
-
|
|
819
|
+
y.current || s();
|
|
820
820
|
},
|
|
821
821
|
{ signal: g }
|
|
822
822
|
);
|
|
823
|
-
let
|
|
823
|
+
let w = null;
|
|
824
824
|
document.addEventListener(
|
|
825
825
|
"selectionchange",
|
|
826
826
|
() => {
|
|
827
827
|
var A, L;
|
|
828
|
-
const
|
|
829
|
-
if (!
|
|
828
|
+
const b = document.getSelection();
|
|
829
|
+
if (!b)
|
|
830
830
|
return;
|
|
831
|
-
if (
|
|
831
|
+
if (b.rangeCount === 0) {
|
|
832
832
|
s();
|
|
833
833
|
return;
|
|
834
834
|
}
|
|
835
|
-
const
|
|
836
|
-
for (let I = 0; I <
|
|
837
|
-
const O =
|
|
838
|
-
|
|
839
|
-
O.intersectsNode(M) && !
|
|
835
|
+
const S = /* @__PURE__ */ new Set();
|
|
836
|
+
for (let I = 0; I < b.rangeCount; I++) {
|
|
837
|
+
const O = b.getRangeAt(I);
|
|
838
|
+
C().forEach((M) => {
|
|
839
|
+
O.intersectsNode(M) && !S.has(M) && S.add(M);
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
|
-
|
|
843
|
-
if (
|
|
842
|
+
C().forEach((I) => {
|
|
843
|
+
if (S.has(I))
|
|
844
844
|
I.classList.add(he.selecting);
|
|
845
845
|
else {
|
|
846
846
|
const O = I.querySelector(".endOfContent");
|
|
847
847
|
O && (I.appendChild(O), O.style.width = "", O.style.height = "", I.classList.remove(he.selecting));
|
|
848
848
|
}
|
|
849
849
|
});
|
|
850
|
-
const E =
|
|
851
|
-
let R =
|
|
850
|
+
const E = b.getRangeAt(0);
|
|
851
|
+
let R = w && (E.compareBoundaryPoints(Range.END_TO_END, w) === 0 || E.compareBoundaryPoints(Range.START_TO_END, w) === 0) ? E.startContainer : E.endContainer;
|
|
852
852
|
R.nodeType === Node.TEXT_NODE && (R = R.parentNode);
|
|
853
|
-
const
|
|
853
|
+
const z = (A = R.parentElement) == null ? void 0 : A.closest(
|
|
854
854
|
he["rp-text-layer"]
|
|
855
|
-
),
|
|
856
|
-
|
|
855
|
+
), D = z == null ? void 0 : z.querySelector(".endOfContent");
|
|
856
|
+
D && z && (D.style.width = z.style.width, D.style.height = z.style.height, (L = R.parentElement) == null || L.insertBefore(D, R.nextSibling)), w = E.cloneRange();
|
|
857
857
|
},
|
|
858
858
|
{ signal: g }
|
|
859
859
|
);
|
|
860
860
|
})(), () => {
|
|
861
861
|
var g;
|
|
862
|
-
(g =
|
|
863
|
-
}), [
|
|
862
|
+
(g = _.current) == null || g.abort(), _.current = void 0;
|
|
863
|
+
}), [C]);
|
|
864
864
|
const T = N(() => {
|
|
865
865
|
o.current && o.current.classList.add(he.selecting);
|
|
866
|
-
}, []),
|
|
866
|
+
}, []), h = N(() => {
|
|
867
867
|
o.current && o.current.classList.remove(he.selecting);
|
|
868
868
|
}, []);
|
|
869
869
|
return F(() => {
|
|
@@ -871,7 +871,7 @@ const So = () => {
|
|
|
871
871
|
s.classList.remove("selected");
|
|
872
872
|
}), !c.length || !a || a.pageIndex !== e - 1)
|
|
873
873
|
return;
|
|
874
|
-
const f =
|
|
874
|
+
const f = u.findIndex(
|
|
875
875
|
(s) => JSON.stringify(s) === JSON.stringify(a)
|
|
876
876
|
);
|
|
877
877
|
if (f === -1)
|
|
@@ -880,38 +880,38 @@ const So = () => {
|
|
|
880
880
|
g.length && (P.current = g.map((s) => s.element), l(g[0].element), g.forEach((s) => {
|
|
881
881
|
s.element.classList.add("selected");
|
|
882
882
|
}));
|
|
883
|
-
}, [a, c,
|
|
883
|
+
}, [a, c, u]), F(() => {
|
|
884
884
|
const f = n.get(e);
|
|
885
885
|
if (!f || !o.current)
|
|
886
886
|
return;
|
|
887
887
|
const g = o.current;
|
|
888
|
-
return
|
|
889
|
-
const
|
|
890
|
-
return
|
|
891
|
-
viewport:
|
|
888
|
+
return p.current && p.current.cancel(), f.page.getTextContent().then((s) => {
|
|
889
|
+
const w = f.page.getViewport({ scale: 1 });
|
|
890
|
+
return p.current = new Sr.TextLayer({
|
|
891
|
+
viewport: w,
|
|
892
892
|
textContentSource: s,
|
|
893
893
|
container: g
|
|
894
|
-
}), m.current = s, g && (g.innerText = ""),
|
|
894
|
+
}), m.current = s, g && (g.innerText = ""), p.current.render();
|
|
895
895
|
}).then(() => {
|
|
896
|
-
var
|
|
896
|
+
var S, E;
|
|
897
897
|
[].slice.call(g.children).forEach((x) => {
|
|
898
898
|
x.classList.add(he["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
|
|
899
899
|
});
|
|
900
|
-
const
|
|
901
|
-
|
|
902
|
-
const
|
|
903
|
-
|
|
900
|
+
const w = (S = p.current) == null ? void 0 : S.textDivs;
|
|
901
|
+
w && m.current && v(m.current, w);
|
|
902
|
+
const b = document.createElement("div");
|
|
903
|
+
b.className = "endOfContent", (E = o.current) == null || E.appendChild(b);
|
|
904
904
|
}).catch(() => {
|
|
905
905
|
}), () => {
|
|
906
906
|
var s;
|
|
907
|
-
(s =
|
|
907
|
+
(s = p.current) == null || s.cancel();
|
|
908
908
|
};
|
|
909
909
|
}, [n, e]), F(() => {
|
|
910
910
|
var s;
|
|
911
|
-
[].slice.call(o.current.children).forEach((
|
|
912
|
-
|
|
911
|
+
[].slice.call(o.current.children).forEach((w) => {
|
|
912
|
+
w.classList.add(he["rp-text-layer-text"]);
|
|
913
913
|
});
|
|
914
|
-
const g = (s =
|
|
914
|
+
const g = (s = p.current) == null ? void 0 : s.textDivs;
|
|
915
915
|
g && m.current && v(m.current, g, !0);
|
|
916
916
|
}, [v]), /* @__PURE__ */ i(
|
|
917
917
|
"div",
|
|
@@ -920,7 +920,7 @@ const So = () => {
|
|
|
920
920
|
className: he["rp-text-layer"],
|
|
921
921
|
ref: o,
|
|
922
922
|
onMouseDown: T,
|
|
923
|
-
onMouseUp:
|
|
923
|
+
onMouseUp: h
|
|
924
924
|
}
|
|
925
925
|
);
|
|
926
926
|
}, Eo = {
|
|
@@ -928,30 +928,30 @@ const So = () => {
|
|
|
928
928
|
};
|
|
929
929
|
let No = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
930
930
|
const Oo = (t) => {
|
|
931
|
-
const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage:
|
|
931
|
+
const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage: p } = ie(), { scrollMode: m } = Le(), { print: P } = tt(), { download: u } = $n(), v = k(() => o.get(e), [o, e]), _ = k(() => v == null ? void 0 : v.page.getViewport(), [v]);
|
|
932
932
|
F(() => {
|
|
933
933
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
934
934
|
}, [r]), F(() => {
|
|
935
|
-
v && v.page.getAnnotations().then((
|
|
936
|
-
a.current = void 0, c(
|
|
935
|
+
v && v.page.getAnnotations().then((C) => {
|
|
936
|
+
a.current = void 0, c(C), n.current && (n.current.innerText = "");
|
|
937
937
|
});
|
|
938
938
|
}, [v]);
|
|
939
|
-
const
|
|
940
|
-
(
|
|
941
|
-
!l || !r || (Er(
|
|
942
|
-
var
|
|
943
|
-
((
|
|
944
|
-
}), m === J.PAGE_SCROLLING ? At(
|
|
939
|
+
const y = N(
|
|
940
|
+
(C) => {
|
|
941
|
+
!l || !r || (Er(C), Nr(C, r, l).then((T) => {
|
|
942
|
+
var h, f;
|
|
943
|
+
((h = T == null ? void 0 : T.data) == null ? void 0 : h.action) === "Print" ? P() : ((f = T == null ? void 0 : T.data) == null ? void 0 : f.action) === "SaveAs" && u();
|
|
944
|
+
}), m === J.PAGE_SCROLLING ? At(C, l, r, (T) => d(T.pageIndex + 1)) : At(C, l, r, (T) => p(T.pageIndex + 1)));
|
|
945
945
|
},
|
|
946
|
-
[r, l,
|
|
946
|
+
[r, l, p, d, m, P, u]
|
|
947
947
|
);
|
|
948
948
|
return F(() => {
|
|
949
949
|
if (!v || !l)
|
|
950
950
|
return;
|
|
951
|
-
const
|
|
951
|
+
const C = v.page.getViewport();
|
|
952
952
|
if (a.current) {
|
|
953
953
|
a.current.update({
|
|
954
|
-
viewport:
|
|
954
|
+
viewport: C.clone({ dontFlip: !0 })
|
|
955
955
|
});
|
|
956
956
|
return;
|
|
957
957
|
}
|
|
@@ -959,17 +959,17 @@ const Oo = (t) => {
|
|
|
959
959
|
for (const g of l) {
|
|
960
960
|
const { annotationType: s } = g;
|
|
961
961
|
switch (s) {
|
|
962
|
-
case
|
|
963
|
-
|
|
962
|
+
case Dt.Link:
|
|
963
|
+
zr(g);
|
|
964
964
|
break;
|
|
965
|
-
case
|
|
966
|
-
Or(g,
|
|
965
|
+
case Dt.Widget:
|
|
966
|
+
Or(g, C, T);
|
|
967
967
|
break;
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
|
-
const
|
|
970
|
+
const h = new AbortController();
|
|
971
971
|
return (async () => {
|
|
972
|
-
var
|
|
972
|
+
var w;
|
|
973
973
|
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new Rr({
|
|
974
974
|
div: n.current,
|
|
975
975
|
accessibilityManager: void 0,
|
|
@@ -977,18 +977,18 @@ const Oo = (t) => {
|
|
|
977
977
|
annotationEditorUIManager: void 0,
|
|
978
978
|
structTreeLayer: null,
|
|
979
979
|
page: v.page,
|
|
980
|
-
viewport:
|
|
981
|
-
}), n.current && Ft(n.current,
|
|
980
|
+
viewport: C.clone({ dontFlip: !0 })
|
|
981
|
+
}), n.current && Ft(n.current, y);
|
|
982
982
|
const g = await (r == null ? void 0 : r.hasJSActions()), s = await (r == null ? void 0 : r.getFieldObjects());
|
|
983
|
-
if (
|
|
983
|
+
if (h.signal.aborted)
|
|
984
984
|
throw "abort";
|
|
985
|
-
return (
|
|
985
|
+
return (w = a.current) == null ? void 0 : w.render({
|
|
986
986
|
annotations: l,
|
|
987
987
|
annotationStorage: r == null ? void 0 : r.annotationStorage,
|
|
988
988
|
hasJSActions: g,
|
|
989
989
|
fieldObjects: s,
|
|
990
990
|
div: n.current,
|
|
991
|
-
viewport:
|
|
991
|
+
viewport: C.clone({ dontFlip: !0 }),
|
|
992
992
|
page: v.page,
|
|
993
993
|
imageResourcesPath: No,
|
|
994
994
|
renderForms: !0,
|
|
@@ -997,28 +997,28 @@ const Oo = (t) => {
|
|
|
997
997
|
enableScripting: !1
|
|
998
998
|
});
|
|
999
999
|
})().then(() => {
|
|
1000
|
-
n.current &&
|
|
1000
|
+
n.current && Dr(n.current, y);
|
|
1001
1001
|
}).catch((g) => {
|
|
1002
1002
|
if (g !== "abort")
|
|
1003
1003
|
throw g;
|
|
1004
1004
|
}), () => {
|
|
1005
|
-
|
|
1005
|
+
h.abort("clear"), n.current && Ft(n.current, y);
|
|
1006
1006
|
};
|
|
1007
|
-
}, [r, l,
|
|
1007
|
+
}, [r, l, y]), /* @__PURE__ */ i(
|
|
1008
1008
|
"div",
|
|
1009
1009
|
{
|
|
1010
1010
|
"data-rp": `page-${e}-annotationLayer`,
|
|
1011
|
-
style: { width: `${
|
|
1011
|
+
style: { width: `${_ == null ? void 0 : _.width}px`, height: `${_ == null ? void 0 : _.height}px` },
|
|
1012
1012
|
className: Eo["rp-annotation-layer"],
|
|
1013
1013
|
ref: n
|
|
1014
1014
|
}
|
|
1015
1015
|
);
|
|
1016
|
-
},
|
|
1016
|
+
}, zo = {
|
|
1017
1017
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1018
|
-
},
|
|
1019
|
-
const [n, o] = $(), { pages: r } = Q(), { highlightKeywords: a } = pr(), l = !0, c = H(null), [d,
|
|
1018
|
+
}, Do = ({ pageNumber: t, viewport: e }) => {
|
|
1019
|
+
const [n, o] = $(), { pages: r } = Q(), { highlightKeywords: a } = pr(), l = !0, c = H(null), [d, p] = $(null), [m, P] = $([]);
|
|
1020
1020
|
F(() => {
|
|
1021
|
-
c.current &&
|
|
1021
|
+
c.current && p(c.current.parentElement);
|
|
1022
1022
|
}, [c]), F(() => {
|
|
1023
1023
|
(async () => {
|
|
1024
1024
|
const f = r.get(t);
|
|
@@ -1028,58 +1028,58 @@ const Oo = (t) => {
|
|
|
1028
1028
|
o(g);
|
|
1029
1029
|
})();
|
|
1030
1030
|
}, [r, t]);
|
|
1031
|
-
const
|
|
1031
|
+
const u = k(() => a ? a.map((h) => {
|
|
1032
1032
|
var f, g;
|
|
1033
1033
|
return {
|
|
1034
|
-
...Ar(
|
|
1035
|
-
color:
|
|
1034
|
+
...Ar(h.keyword, (f = h.options) == null ? void 0 : f.matchCase, (g = h.options) == null ? void 0 : g.wholeWords),
|
|
1035
|
+
color: h.highlightColor
|
|
1036
1036
|
};
|
|
1037
1037
|
}) : [], [a]);
|
|
1038
|
-
function v(
|
|
1039
|
-
if (!
|
|
1038
|
+
function v(h, f) {
|
|
1039
|
+
if (!h)
|
|
1040
1040
|
return;
|
|
1041
1041
|
const g = `[data-rp="page-${f}-textLayer"]`;
|
|
1042
1042
|
return new Promise((s) => {
|
|
1043
|
-
const
|
|
1044
|
-
if (
|
|
1045
|
-
s(
|
|
1043
|
+
const w = h.querySelector(g);
|
|
1044
|
+
if (w) {
|
|
1045
|
+
s(w);
|
|
1046
1046
|
return;
|
|
1047
1047
|
}
|
|
1048
|
-
new MutationObserver((
|
|
1049
|
-
const x =
|
|
1048
|
+
new MutationObserver((S, E) => {
|
|
1049
|
+
const x = h.querySelector(g);
|
|
1050
1050
|
x && (s(x), E.disconnect());
|
|
1051
|
-
}).observe(
|
|
1051
|
+
}).observe(h, { childList: !0, subtree: !0 });
|
|
1052
1052
|
});
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1054
|
+
function _(h) {
|
|
1055
1055
|
return new Promise((f) => {
|
|
1056
|
-
const g =
|
|
1056
|
+
const g = h.querySelectorAll(
|
|
1057
1057
|
'[data-rp="rp-text-layer-text"]'
|
|
1058
1058
|
);
|
|
1059
1059
|
if (g.length) {
|
|
1060
1060
|
f(Array.from(g));
|
|
1061
1061
|
return;
|
|
1062
1062
|
}
|
|
1063
|
-
new MutationObserver((
|
|
1064
|
-
const
|
|
1063
|
+
new MutationObserver((w, b) => {
|
|
1064
|
+
const S = h.querySelectorAll(
|
|
1065
1065
|
".rp-text-layer-text"
|
|
1066
1066
|
);
|
|
1067
|
-
|
|
1068
|
-
}).observe(
|
|
1067
|
+
S.length && (f(Array.from(S)), b.disconnect());
|
|
1068
|
+
}).observe(h, { childList: !0, subtree: !0 });
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
|
-
const
|
|
1071
|
+
const y = (h, f, g, s) => {
|
|
1072
1072
|
var Z;
|
|
1073
|
-
const
|
|
1074
|
-
if (!
|
|
1073
|
+
const w = document.createRange(), b = g.firstChild;
|
|
1074
|
+
if (!b || b.nodeType !== Node.TEXT_NODE)
|
|
1075
1075
|
return null;
|
|
1076
|
-
const
|
|
1077
|
-
if (E >
|
|
1076
|
+
const S = ((Z = b.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, x = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
|
|
1077
|
+
if (E > S || x + 1 > S)
|
|
1078
1078
|
return null;
|
|
1079
|
-
|
|
1079
|
+
w.setStart(b, E), w.setEnd(b, x + 1);
|
|
1080
1080
|
const R = document.createElement("span");
|
|
1081
|
-
R.style.width = "auto",
|
|
1082
|
-
const
|
|
1081
|
+
R.style.width = "auto", w.surroundContents(R);
|
|
1082
|
+
const z = R.getBoundingClientRect(), D = h.getBoundingClientRect(), A = D.height, L = D.width, I = 100 * (z.left - D.left) / L, O = 100 * (z.top - D.top) / A, M = 100 * z.height / A, G = 100 * z.width / L;
|
|
1083
1083
|
return Wr(R), {
|
|
1084
1084
|
keywordStr: f,
|
|
1085
1085
|
left: I,
|
|
@@ -1090,17 +1090,17 @@ const Oo = (t) => {
|
|
|
1090
1090
|
pageWidth: L
|
|
1091
1091
|
};
|
|
1092
1092
|
};
|
|
1093
|
-
async function
|
|
1094
|
-
const g = await v(d,
|
|
1093
|
+
async function C(h, f) {
|
|
1094
|
+
const g = await v(d, h);
|
|
1095
1095
|
if (!g)
|
|
1096
1096
|
return;
|
|
1097
|
-
const s = await
|
|
1097
|
+
const s = await _(g);
|
|
1098
1098
|
if (s.length) {
|
|
1099
|
-
const
|
|
1100
|
-
(
|
|
1101
|
-
E.split("").map((R,
|
|
1099
|
+
const w = s.map((S) => S.tagName === "BR" ? " " : S.textContent).reduce(
|
|
1100
|
+
(S, E, x) => S.concat(
|
|
1101
|
+
E.split("").map((R, z) => ({
|
|
1102
1102
|
char: R,
|
|
1103
|
-
charIdxInSpan:
|
|
1103
|
+
charIdxInSpan: z,
|
|
1104
1104
|
spanIdx: x
|
|
1105
1105
|
}))
|
|
1106
1106
|
),
|
|
@@ -1111,24 +1111,24 @@ const Oo = (t) => {
|
|
|
1111
1111
|
spanIdx: 0
|
|
1112
1112
|
}
|
|
1113
1113
|
]
|
|
1114
|
-
).slice(1),
|
|
1115
|
-
P(
|
|
1114
|
+
).slice(1), b = T(g, f, s, w);
|
|
1115
|
+
P(b);
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
|
-
const T = (
|
|
1119
|
-
const
|
|
1120
|
-
if (!s.length || !
|
|
1118
|
+
const T = (h, f, g, s) => {
|
|
1119
|
+
const w = f.length;
|
|
1120
|
+
if (!s.length || !w)
|
|
1121
1121
|
return [];
|
|
1122
|
-
const
|
|
1123
|
-
return
|
|
1124
|
-
const { keyword: x, regExp: R, wholeWords:
|
|
1122
|
+
const b = [], S = s.map((E) => E.char).join("");
|
|
1123
|
+
return u.forEach((E) => {
|
|
1124
|
+
const { keyword: x, regExp: R, wholeWords: z, color: D } = E, A = x;
|
|
1125
1125
|
if (!A.trim())
|
|
1126
1126
|
return;
|
|
1127
1127
|
const L = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
|
|
1128
1128
|
let I;
|
|
1129
1129
|
const O = [];
|
|
1130
|
-
for (; (I = L.exec(
|
|
1131
|
-
|
|
1130
|
+
for (; (I = L.exec(S)) !== null; )
|
|
1131
|
+
z && !ur(S, I.index, I[0].length) || O.push({
|
|
1132
1132
|
keyword: L,
|
|
1133
1133
|
startIndex: I.index,
|
|
1134
1134
|
endIndex: L.lastIndex
|
|
@@ -1136,7 +1136,7 @@ const Oo = (t) => {
|
|
|
1136
1136
|
const M = O.map((G) => ({
|
|
1137
1137
|
keyword: G.keyword,
|
|
1138
1138
|
indexes: s.slice(G.startIndex, G.endIndex),
|
|
1139
|
-
color:
|
|
1139
|
+
color: D
|
|
1140
1140
|
}));
|
|
1141
1141
|
for (const G of M) {
|
|
1142
1142
|
const Z = G.indexes.reduce(
|
|
@@ -1145,60 +1145,60 @@ const Oo = (t) => {
|
|
|
1145
1145
|
);
|
|
1146
1146
|
for (const j of Object.values(Z))
|
|
1147
1147
|
if (j.length !== 1 || j[0].char.trim() !== "") {
|
|
1148
|
-
const q = j, ee = g[q[0].spanIdx], X =
|
|
1149
|
-
|
|
1148
|
+
const q = j, ee = g[q[0].spanIdx], X = y(
|
|
1149
|
+
h,
|
|
1150
1150
|
A,
|
|
1151
1151
|
ee,
|
|
1152
1152
|
q
|
|
1153
1153
|
);
|
|
1154
1154
|
if (X) {
|
|
1155
1155
|
const { left: le, top: ae } = X;
|
|
1156
|
-
if (
|
|
1156
|
+
if (b.find((te) => te.left === le && te.top === ae))
|
|
1157
1157
|
continue;
|
|
1158
|
-
|
|
1158
|
+
b.push({ ...X, highlightColor: G.color });
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
|
-
}),
|
|
1162
|
+
}), b.sort(Fr), b;
|
|
1163
1163
|
};
|
|
1164
1164
|
return F(() => {
|
|
1165
1165
|
(async () => {
|
|
1166
1166
|
if (!(!a || a.length === 0))
|
|
1167
1167
|
try {
|
|
1168
|
-
await
|
|
1168
|
+
await C(t, a);
|
|
1169
1169
|
} catch (f) {
|
|
1170
1170
|
console.error(f);
|
|
1171
1171
|
}
|
|
1172
1172
|
})();
|
|
1173
|
-
}, [l, a, t, n, e]), /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((
|
|
1173
|
+
}, [l, a, t, n, e]), /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((h, f) => /* @__PURE__ */ i(
|
|
1174
1174
|
"div",
|
|
1175
1175
|
{
|
|
1176
|
-
className:
|
|
1176
|
+
className: zo["rp-text-highlight"],
|
|
1177
1177
|
style: {
|
|
1178
|
-
top: `${
|
|
1179
|
-
left: `${
|
|
1180
|
-
width: `${
|
|
1181
|
-
height: `${
|
|
1182
|
-
backgroundColor:
|
|
1178
|
+
top: `${h.top}%`,
|
|
1179
|
+
left: `${h.left}%`,
|
|
1180
|
+
width: `${h.width}%`,
|
|
1181
|
+
height: `${h.height}%`,
|
|
1182
|
+
backgroundColor: h.highlightColor
|
|
1183
1183
|
}
|
|
1184
1184
|
},
|
|
1185
1185
|
f
|
|
1186
1186
|
)) }) });
|
|
1187
1187
|
}, It = $e((t, e) => {
|
|
1188
|
-
const { pageNumber: n, style: o, ...r } = t, { pages: a } = Q(), { rotate: l } = Ge(), { textLayer: c } = or(), { currentZoom: d } = Qe(),
|
|
1188
|
+
const { pageNumber: n, style: o, ...r } = t, { pages: a } = Q(), { rotate: l } = Ge(), { textLayer: c } = or(), { currentZoom: d } = Qe(), p = H(a.get(n)), [m, P] = $(!1), u = H(null), [v, _] = $({
|
|
1189
1189
|
width: 0,
|
|
1190
1190
|
height: 0
|
|
1191
1191
|
});
|
|
1192
|
-
cn(e, () =>
|
|
1193
|
-
if (a && (
|
|
1194
|
-
const
|
|
1192
|
+
cn(e, () => u.current), F(() => {
|
|
1193
|
+
if (a && (p.current = a.get(n), p.current)) {
|
|
1194
|
+
const h = p.current.page.getViewport({
|
|
1195
1195
|
scale: d,
|
|
1196
|
-
rotation: l +
|
|
1196
|
+
rotation: l + p.current.defaultRotation
|
|
1197
1197
|
});
|
|
1198
|
-
|
|
1198
|
+
_(h);
|
|
1199
1199
|
}
|
|
1200
1200
|
}, [a, n, l, d]);
|
|
1201
|
-
const
|
|
1201
|
+
const y = k(() => {
|
|
1202
1202
|
switch (l) {
|
|
1203
1203
|
case 90:
|
|
1204
1204
|
return `${v.width / 2}px ${v.width / 2}px`;
|
|
@@ -1208,7 +1208,7 @@ const Oo = (t) => {
|
|
|
1208
1208
|
default:
|
|
1209
1209
|
return "center";
|
|
1210
1210
|
}
|
|
1211
|
-
}, [l, v]),
|
|
1211
|
+
}, [l, v]), C = N(() => {
|
|
1212
1212
|
P(!0);
|
|
1213
1213
|
}, []), T = N(() => {
|
|
1214
1214
|
P(!1);
|
|
@@ -1216,14 +1216,14 @@ const Oo = (t) => {
|
|
|
1216
1216
|
return /* @__PURE__ */ i(
|
|
1217
1217
|
"div",
|
|
1218
1218
|
{
|
|
1219
|
-
ref:
|
|
1219
|
+
ref: u,
|
|
1220
1220
|
id: `page-${n}`,
|
|
1221
1221
|
"data-rp": `page-${n}`,
|
|
1222
1222
|
...r,
|
|
1223
1223
|
style: {
|
|
1224
1224
|
...o,
|
|
1225
1225
|
"--rp-rotate": `${l}deg`,
|
|
1226
|
-
"--rp-page-rotate-translate": `${
|
|
1226
|
+
"--rp-page-rotate-translate": `${y}`,
|
|
1227
1227
|
"--scale-factor": d
|
|
1228
1228
|
},
|
|
1229
1229
|
className: lt["rp-page-wrapper"],
|
|
@@ -1236,10 +1236,10 @@ const Oo = (t) => {
|
|
|
1236
1236
|
},
|
|
1237
1237
|
className: lt["rp-page"],
|
|
1238
1238
|
children: [
|
|
1239
|
-
/* @__PURE__ */ i(Io, { onLoading:
|
|
1239
|
+
/* @__PURE__ */ i(Io, { onLoading: C, onLoaded: T, pageNumber: n }),
|
|
1240
1240
|
m && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
|
|
1241
1241
|
c && /* @__PURE__ */ i(Lo, { pageNumber: n }),
|
|
1242
|
-
/* @__PURE__ */ i(
|
|
1242
|
+
/* @__PURE__ */ i(Do, { pageNumber: n, viewport: v }),
|
|
1243
1243
|
/* @__PURE__ */ i(Oo, { pageNumber: n })
|
|
1244
1244
|
]
|
|
1245
1245
|
}
|
|
@@ -1340,12 +1340,12 @@ var $o = 150, Go = function(e) {
|
|
|
1340
1340
|
}, Be = null, Ze = null, je = null;
|
|
1341
1341
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet());
|
|
1342
1342
|
function Uo(t) {
|
|
1343
|
-
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment,
|
|
1343
|
+
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, p = t.getOffsetForRowAndAlignment, m = t.getRowHeight, P = t.getRowOffset, u = t.getRowStartIndexForOffset, v = t.getRowStopIndexForStartIndex, _ = t.initInstanceProps, y = t.shouldResetStyleCacheOnItemSizeChange, C = t.validateProps;
|
|
1344
1344
|
return e = /* @__PURE__ */ function(T) {
|
|
1345
|
-
Ao(
|
|
1346
|
-
function
|
|
1345
|
+
Ao(h, T);
|
|
1346
|
+
function h(g) {
|
|
1347
1347
|
var s;
|
|
1348
|
-
return s = T.call(this, g) || this, s._instanceProps =
|
|
1348
|
+
return s = T.call(this, g) || this, s._instanceProps = _(s.props, Ut(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
|
|
1349
1349
|
instance: Ut(s),
|
|
1350
1350
|
isScrolling: !1,
|
|
1351
1351
|
horizontalScrollDirection: "forward",
|
|
@@ -1353,45 +1353,45 @@ function Uo(t) {
|
|
|
1353
1353
|
scrollTop: typeof s.props.initialScrollTop == "number" ? s.props.initialScrollTop : 0,
|
|
1354
1354
|
scrollUpdateWasRequested: !1,
|
|
1355
1355
|
verticalScrollDirection: "forward"
|
|
1356
|
-
}, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(
|
|
1356
|
+
}, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(w, b, S, E, x, R, z, D) {
|
|
1357
1357
|
return s.props.onItemsRendered({
|
|
1358
|
-
overscanColumnStartIndex:
|
|
1359
|
-
overscanColumnStopIndex:
|
|
1360
|
-
overscanRowStartIndex:
|
|
1358
|
+
overscanColumnStartIndex: w,
|
|
1359
|
+
overscanColumnStopIndex: b,
|
|
1360
|
+
overscanRowStartIndex: S,
|
|
1361
1361
|
overscanRowStopIndex: E,
|
|
1362
1362
|
visibleColumnStartIndex: x,
|
|
1363
1363
|
visibleColumnStopIndex: R,
|
|
1364
|
-
visibleRowStartIndex:
|
|
1365
|
-
visibleRowStopIndex:
|
|
1364
|
+
visibleRowStartIndex: z,
|
|
1365
|
+
visibleRowStopIndex: D
|
|
1366
1366
|
});
|
|
1367
|
-
}), s._callOnScroll = void 0, s._callOnScroll = dt(function(
|
|
1367
|
+
}), s._callOnScroll = void 0, s._callOnScroll = dt(function(w, b, S, E, x) {
|
|
1368
1368
|
return s.props.onScroll({
|
|
1369
|
-
horizontalScrollDirection:
|
|
1370
|
-
scrollLeft:
|
|
1371
|
-
scrollTop:
|
|
1369
|
+
horizontalScrollDirection: S,
|
|
1370
|
+
scrollLeft: w,
|
|
1371
|
+
scrollTop: b,
|
|
1372
1372
|
verticalScrollDirection: E,
|
|
1373
1373
|
scrollUpdateWasRequested: x
|
|
1374
1374
|
});
|
|
1375
|
-
}), s._getItemStyle = void 0, s._getItemStyle = function(
|
|
1376
|
-
var
|
|
1377
|
-
if (
|
|
1378
|
-
A = D
|
|
1375
|
+
}), s._getItemStyle = void 0, s._getItemStyle = function(w, b) {
|
|
1376
|
+
var S = s.props, E = S.columnWidth, x = S.direction, R = S.rowHeight, z = s._getItemStyleCache(y && E, y && x, y && R), D = w + ":" + b, A;
|
|
1377
|
+
if (z.hasOwnProperty(D))
|
|
1378
|
+
A = z[D];
|
|
1379
1379
|
else {
|
|
1380
|
-
var L = n(s.props,
|
|
1381
|
-
D
|
|
1380
|
+
var L = n(s.props, b, s._instanceProps), I = x === "rtl";
|
|
1381
|
+
z[D] = A = {
|
|
1382
1382
|
position: "absolute",
|
|
1383
1383
|
left: I ? void 0 : L,
|
|
1384
1384
|
right: I ? L : void 0,
|
|
1385
|
-
top: P(s.props,
|
|
1386
|
-
height: m(s.props,
|
|
1387
|
-
width: a(s.props,
|
|
1385
|
+
top: P(s.props, w, s._instanceProps),
|
|
1386
|
+
height: m(s.props, w, s._instanceProps),
|
|
1387
|
+
width: a(s.props, b, s._instanceProps)
|
|
1388
1388
|
};
|
|
1389
1389
|
}
|
|
1390
1390
|
return A;
|
|
1391
|
-
}, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(
|
|
1391
|
+
}, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(w, b, S) {
|
|
1392
1392
|
return {};
|
|
1393
|
-
}), s._onScroll = function(
|
|
1394
|
-
var
|
|
1393
|
+
}), s._onScroll = function(w) {
|
|
1394
|
+
var b = w.currentTarget, S = b.clientHeight, E = b.clientWidth, x = b.scrollLeft, R = b.scrollTop, z = b.scrollHeight, D = b.scrollWidth;
|
|
1395
1395
|
s.setState(function(A) {
|
|
1396
1396
|
if (A.scrollLeft === x && A.scrollTop === R)
|
|
1397
1397
|
return null;
|
|
@@ -1402,11 +1402,11 @@ function Uo(t) {
|
|
|
1402
1402
|
I = -x;
|
|
1403
1403
|
break;
|
|
1404
1404
|
case "positive-descending":
|
|
1405
|
-
I =
|
|
1405
|
+
I = D - E - x;
|
|
1406
1406
|
break;
|
|
1407
1407
|
}
|
|
1408
|
-
I = Math.max(0, Math.min(I,
|
|
1409
|
-
var O = Math.max(0, Math.min(R,
|
|
1408
|
+
I = Math.max(0, Math.min(I, D - E));
|
|
1409
|
+
var O = Math.max(0, Math.min(R, z - S));
|
|
1410
1410
|
return {
|
|
1411
1411
|
isScrolling: !0,
|
|
1412
1412
|
horizontalScrollDirection: A.scrollLeft < x ? "forward" : "backward",
|
|
@@ -1416,9 +1416,9 @@ function Uo(t) {
|
|
|
1416
1416
|
scrollUpdateWasRequested: !1
|
|
1417
1417
|
};
|
|
1418
1418
|
}, s._resetIsScrollingDebounced);
|
|
1419
|
-
}, s._outerRefSetter = function(
|
|
1420
|
-
var
|
|
1421
|
-
s._outerRef =
|
|
1419
|
+
}, s._outerRefSetter = function(w) {
|
|
1420
|
+
var b = s.props.outerRef;
|
|
1421
|
+
s._outerRef = w, typeof b == "function" ? b(w) : b != null && typeof b == "object" && b.hasOwnProperty("current") && (b.current = w);
|
|
1422
1422
|
}, s._resetIsScrollingDebounced = function() {
|
|
1423
1423
|
s._resetIsScrollingTimeoutId !== null && Zt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = Mo(s._resetIsScrolling, $o);
|
|
1424
1424
|
}, s._resetIsScrolling = function() {
|
|
@@ -1429,66 +1429,66 @@ function Uo(t) {
|
|
|
1429
1429
|
});
|
|
1430
1430
|
}, s;
|
|
1431
1431
|
}
|
|
1432
|
-
|
|
1433
|
-
return Vo(s,
|
|
1432
|
+
h.getDerivedStateFromProps = function(s, w) {
|
|
1433
|
+
return Vo(s, w), C(s), null;
|
|
1434
1434
|
};
|
|
1435
|
-
var f =
|
|
1435
|
+
var f = h.prototype;
|
|
1436
1436
|
return f.scrollTo = function(s) {
|
|
1437
|
-
var
|
|
1438
|
-
|
|
1439
|
-
return
|
|
1440
|
-
horizontalScrollDirection:
|
|
1441
|
-
scrollLeft:
|
|
1442
|
-
scrollTop:
|
|
1437
|
+
var w = s.scrollLeft, b = s.scrollTop;
|
|
1438
|
+
w !== void 0 && (w = Math.max(0, w)), b !== void 0 && (b = Math.max(0, b)), this.setState(function(S) {
|
|
1439
|
+
return w === void 0 && (w = S.scrollLeft), b === void 0 && (b = S.scrollTop), S.scrollLeft === w && S.scrollTop === b ? null : {
|
|
1440
|
+
horizontalScrollDirection: S.scrollLeft < w ? "forward" : "backward",
|
|
1441
|
+
scrollLeft: w,
|
|
1442
|
+
scrollTop: b,
|
|
1443
1443
|
scrollUpdateWasRequested: !0,
|
|
1444
|
-
verticalScrollDirection:
|
|
1444
|
+
verticalScrollDirection: S.scrollTop < b ? "forward" : "backward"
|
|
1445
1445
|
};
|
|
1446
1446
|
}, this._resetIsScrollingDebounced);
|
|
1447
1447
|
}, f.scrollToItem = function(s) {
|
|
1448
|
-
var
|
|
1449
|
-
|
|
1450
|
-
var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > A ? M : 0, q = G >
|
|
1448
|
+
var w = s.align, b = w === void 0 ? "auto" : w, S = s.columnIndex, E = s.rowIndex, x = this.props, R = x.columnCount, z = x.height, D = x.rowCount, A = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, M = Ho();
|
|
1449
|
+
S !== void 0 && (S = Math.max(0, Math.min(S, R - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, D - 1)));
|
|
1450
|
+
var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > A ? M : 0, q = G > z ? M : 0;
|
|
1451
1451
|
this.scrollTo({
|
|
1452
|
-
scrollLeft:
|
|
1453
|
-
scrollTop: E !== void 0 ?
|
|
1452
|
+
scrollLeft: S !== void 0 ? d(this.props, S, b, I, this._instanceProps, q) : I,
|
|
1453
|
+
scrollTop: E !== void 0 ? p(this.props, E, b, O, this._instanceProps, j) : O
|
|
1454
1454
|
});
|
|
1455
1455
|
}, f.componentDidMount = function() {
|
|
1456
|
-
var s = this.props,
|
|
1456
|
+
var s = this.props, w = s.initialScrollLeft, b = s.initialScrollTop;
|
|
1457
1457
|
if (this._outerRef != null) {
|
|
1458
|
-
var
|
|
1459
|
-
typeof
|
|
1458
|
+
var S = this._outerRef;
|
|
1459
|
+
typeof w == "number" && (S.scrollLeft = w), typeof b == "number" && (S.scrollTop = b);
|
|
1460
1460
|
}
|
|
1461
1461
|
this._callPropsCallbacks();
|
|
1462
1462
|
}, f.componentDidUpdate = function() {
|
|
1463
|
-
var s = this.props.direction,
|
|
1463
|
+
var s = this.props.direction, w = this.state, b = w.scrollLeft, S = w.scrollTop, E = w.scrollUpdateWasRequested;
|
|
1464
1464
|
if (E && this._outerRef != null) {
|
|
1465
1465
|
var x = this._outerRef;
|
|
1466
1466
|
if (s === "rtl")
|
|
1467
1467
|
switch (jt()) {
|
|
1468
1468
|
case "negative":
|
|
1469
|
-
x.scrollLeft = -
|
|
1469
|
+
x.scrollLeft = -b;
|
|
1470
1470
|
break;
|
|
1471
1471
|
case "positive-ascending":
|
|
1472
|
-
x.scrollLeft =
|
|
1472
|
+
x.scrollLeft = b;
|
|
1473
1473
|
break;
|
|
1474
1474
|
default:
|
|
1475
|
-
var R = x.clientWidth,
|
|
1476
|
-
x.scrollLeft =
|
|
1475
|
+
var R = x.clientWidth, z = x.scrollWidth;
|
|
1476
|
+
x.scrollLeft = z - R - b;
|
|
1477
1477
|
break;
|
|
1478
1478
|
}
|
|
1479
1479
|
else
|
|
1480
|
-
x.scrollLeft = Math.max(0,
|
|
1481
|
-
x.scrollTop = Math.max(0,
|
|
1480
|
+
x.scrollLeft = Math.max(0, b);
|
|
1481
|
+
x.scrollTop = Math.max(0, S);
|
|
1482
1482
|
}
|
|
1483
1483
|
this._callPropsCallbacks();
|
|
1484
1484
|
}, f.componentWillUnmount = function() {
|
|
1485
1485
|
this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
|
|
1486
1486
|
}, f.render = function() {
|
|
1487
|
-
var s = this.props,
|
|
1488
|
-
if (
|
|
1487
|
+
var s = this.props, w = s.children, b = s.className, S = s.columnCount, E = s.direction, x = s.height, R = s.innerRef, z = s.innerElementType, D = s.innerTagName, A = s.itemData, L = s.itemKey, I = L === void 0 ? Go : L, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, q = s.width, ee = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Fe = de[1], Ne = [];
|
|
1488
|
+
if (S > 0 && G)
|
|
1489
1489
|
for (var Pe = te; Pe <= Fe; Pe++)
|
|
1490
1490
|
for (var we = le; we <= ae; we++)
|
|
1491
|
-
Ne.push(qe(
|
|
1491
|
+
Ne.push(qe(w, {
|
|
1492
1492
|
columnIndex: we,
|
|
1493
1493
|
data: A,
|
|
1494
1494
|
isScrolling: j ? ee : void 0,
|
|
@@ -1502,7 +1502,7 @@ function Uo(t) {
|
|
|
1502
1502
|
}));
|
|
1503
1503
|
var nt = l(this.props, this._instanceProps), rt = c(this.props, this._instanceProps);
|
|
1504
1504
|
return qe(O || M || "div", {
|
|
1505
|
-
className:
|
|
1505
|
+
className: b,
|
|
1506
1506
|
onScroll: this._onScroll,
|
|
1507
1507
|
ref: this._outerRefSetter,
|
|
1508
1508
|
style: kr({
|
|
@@ -1514,7 +1514,7 @@ function Uo(t) {
|
|
|
1514
1514
|
willChange: "transform",
|
|
1515
1515
|
direction: E
|
|
1516
1516
|
}, Z)
|
|
1517
|
-
}, qe(
|
|
1517
|
+
}, qe(z || D || "div", {
|
|
1518
1518
|
children: Ne,
|
|
1519
1519
|
ref: R,
|
|
1520
1520
|
style: {
|
|
@@ -1524,28 +1524,28 @@ function Uo(t) {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
}));
|
|
1526
1526
|
}, f._callPropsCallbacks = function() {
|
|
1527
|
-
var s = this.props,
|
|
1528
|
-
if (typeof
|
|
1529
|
-
var x = this._getHorizontalRangeToRender(), R = x[0],
|
|
1530
|
-
this._callOnItemsRendered(R,
|
|
1527
|
+
var s = this.props, w = s.columnCount, b = s.onItemsRendered, S = s.onScroll, E = s.rowCount;
|
|
1528
|
+
if (typeof b == "function" && w > 0 && E > 0) {
|
|
1529
|
+
var x = this._getHorizontalRangeToRender(), R = x[0], z = x[1], D = x[2], A = x[3], L = this._getVerticalRangeToRender(), I = L[0], O = L[1], M = L[2], G = L[3];
|
|
1530
|
+
this._callOnItemsRendered(R, z, I, O, D, A, M, G);
|
|
1531
1531
|
}
|
|
1532
|
-
if (typeof
|
|
1532
|
+
if (typeof S == "function") {
|
|
1533
1533
|
var Z = this.state, j = Z.horizontalScrollDirection, q = Z.scrollLeft, ee = Z.scrollTop, X = Z.scrollUpdateWasRequested, le = Z.verticalScrollDirection;
|
|
1534
1534
|
this._callOnScroll(q, ee, j, le, X);
|
|
1535
1535
|
}
|
|
1536
1536
|
}, f._getHorizontalRangeToRender = function() {
|
|
1537
|
-
var s = this.props,
|
|
1538
|
-
if (
|
|
1537
|
+
var s = this.props, w = s.columnCount, b = s.overscanColumnCount, S = s.overscanColumnsCount, E = s.overscanCount, x = s.rowCount, R = this.state, z = R.horizontalScrollDirection, D = R.isScrolling, A = R.scrollLeft, L = b || S || E || 1;
|
|
1538
|
+
if (w === 0 || x === 0)
|
|
1539
1539
|
return [0, 0, 0, 0];
|
|
1540
|
-
var I = o(this.props, A, this._instanceProps), O = r(this.props, I, A, this._instanceProps), M = !
|
|
1541
|
-
return [Math.max(0, I - M), Math.max(0, Math.min(
|
|
1540
|
+
var I = o(this.props, A, this._instanceProps), O = r(this.props, I, A, this._instanceProps), M = !D || z === "backward" ? Math.max(1, L) : 1, G = !D || z === "forward" ? Math.max(1, L) : 1;
|
|
1541
|
+
return [Math.max(0, I - M), Math.max(0, Math.min(w - 1, O + G)), I, O];
|
|
1542
1542
|
}, f._getVerticalRangeToRender = function() {
|
|
1543
|
-
var s = this.props,
|
|
1544
|
-
if (
|
|
1543
|
+
var s = this.props, w = s.columnCount, b = s.overscanCount, S = s.overscanRowCount, E = s.overscanRowsCount, x = s.rowCount, R = this.state, z = R.isScrolling, D = R.verticalScrollDirection, A = R.scrollTop, L = S || E || b || 1;
|
|
1544
|
+
if (w === 0 || x === 0)
|
|
1545
1545
|
return [0, 0, 0, 0];
|
|
1546
|
-
var I =
|
|
1546
|
+
var I = u(this.props, A, this._instanceProps), O = v(this.props, I, A, this._instanceProps), M = !z || D === "backward" ? Math.max(1, L) : 1, G = !z || D === "forward" ? Math.max(1, L) : 1;
|
|
1547
1547
|
return [Math.max(0, I - M), Math.max(0, Math.min(x - 1, O + G)), I, O];
|
|
1548
|
-
},
|
|
1548
|
+
}, h;
|
|
1549
1549
|
}(Qn), e.defaultProps = {
|
|
1550
1550
|
direction: "ltr",
|
|
1551
1551
|
itemData: void 0,
|
|
@@ -1553,9 +1553,9 @@ function Uo(t) {
|
|
|
1553
1553
|
}, e;
|
|
1554
1554
|
}
|
|
1555
1555
|
var Vo = function(e, n) {
|
|
1556
|
-
var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount,
|
|
1556
|
+
var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount, p = e.overscanCount, m = e.overscanRowsCount, P = e.width, u = n.instance;
|
|
1557
1557
|
if (process.env.NODE_ENV !== "production") {
|
|
1558
|
-
if (typeof
|
|
1558
|
+
if (typeof p == "number" && Be && !Be.has(u) && (Be.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof m == "number") && Ze && !Ze.has(u) && (Ze.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || c != null) && je && !je.has(u) && (je.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1559
1559
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1560
1560
|
switch (r) {
|
|
1561
1561
|
case "ltr":
|
|
@@ -1575,7 +1575,7 @@ var Vo = function(e, n) {
|
|
|
1575
1575
|
var d = r[l];
|
|
1576
1576
|
c = d.offset + d.size;
|
|
1577
1577
|
}
|
|
1578
|
-
var
|
|
1578
|
+
var p = o - l - 1, m = p * a;
|
|
1579
1579
|
return c + m;
|
|
1580
1580
|
}, yn = function(e, n) {
|
|
1581
1581
|
var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, l = n.lastMeasuredColumnIndex, c = 0;
|
|
@@ -1583,15 +1583,15 @@ var Vo = function(e, n) {
|
|
|
1583
1583
|
var d = r[l];
|
|
1584
1584
|
c = d.offset + d.size;
|
|
1585
1585
|
}
|
|
1586
|
-
var
|
|
1586
|
+
var p = o - l - 1, m = p * a;
|
|
1587
1587
|
return c + m;
|
|
1588
1588
|
}, fe = function(e, n, o, r) {
|
|
1589
1589
|
var a, l, c;
|
|
1590
1590
|
if (e === "column" ? (a = r.columnMetadataMap, l = n.columnWidth, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, l = n.rowHeight, c = r.lastMeasuredRowIndex), o > c) {
|
|
1591
1591
|
var d = 0;
|
|
1592
1592
|
if (c >= 0) {
|
|
1593
|
-
var
|
|
1594
|
-
d =
|
|
1593
|
+
var p = a[c];
|
|
1594
|
+
d = p.offset + p.size;
|
|
1595
1595
|
}
|
|
1596
1596
|
for (var m = c + 1; m <= o; m++) {
|
|
1597
1597
|
var P = l(m);
|
|
@@ -1621,17 +1621,17 @@ var Vo = function(e, n) {
|
|
|
1621
1621
|
r += c, c *= 2;
|
|
1622
1622
|
return xn(e, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
|
|
1623
1623
|
}, Yt = function(e, n, o, r, a, l, c) {
|
|
1624
|
-
var d = e === "column" ? n.width : n.height,
|
|
1625
|
-
switch (r === "smart" && (a >=
|
|
1624
|
+
var d = e === "column" ? n.width : n.height, p = fe(e, n, o, l), m = e === "column" ? yn(n, l) : Sn(n, l), P = Math.max(0, Math.min(m - d, p.offset)), u = Math.max(0, p.offset - d + c + p.size);
|
|
1625
|
+
switch (r === "smart" && (a >= u - d && a <= P + d ? r = "auto" : r = "center"), r) {
|
|
1626
1626
|
case "start":
|
|
1627
1627
|
return P;
|
|
1628
1628
|
case "end":
|
|
1629
|
-
return
|
|
1629
|
+
return u;
|
|
1630
1630
|
case "center":
|
|
1631
|
-
return Math.round(
|
|
1631
|
+
return Math.round(u + (P - u) / 2);
|
|
1632
1632
|
case "auto":
|
|
1633
1633
|
default:
|
|
1634
|
-
return a >=
|
|
1634
|
+
return a >= u && a <= P ? a : u > P || a < u ? u : P;
|
|
1635
1635
|
}
|
|
1636
1636
|
}, Bo = /* @__PURE__ */ Uo({
|
|
1637
1637
|
getColumnOffset: function(e, n, o) {
|
|
@@ -1641,8 +1641,8 @@ var Vo = function(e, n) {
|
|
|
1641
1641
|
return Xt("column", e, o, n);
|
|
1642
1642
|
},
|
|
1643
1643
|
getColumnStopIndexForStartIndex: function(e, n, o, r) {
|
|
1644
|
-
for (var a = e.columnCount, l = e.width, c = fe("column", e, n, r), d = o + l,
|
|
1645
|
-
m++,
|
|
1644
|
+
for (var a = e.columnCount, l = e.width, c = fe("column", e, n, r), d = o + l, p = c.offset + c.size, m = n; m < a - 1 && p < d; )
|
|
1645
|
+
m++, p += fe("column", e, m, r).size;
|
|
1646
1646
|
return m;
|
|
1647
1647
|
},
|
|
1648
1648
|
getColumnWidth: function(e, n, o) {
|
|
@@ -1666,8 +1666,8 @@ var Vo = function(e, n) {
|
|
|
1666
1666
|
return Xt("row", e, o, n);
|
|
1667
1667
|
},
|
|
1668
1668
|
getRowStopIndexForStartIndex: function(e, n, o, r) {
|
|
1669
|
-
for (var a = e.rowCount, l = e.height, c = fe("row", e, n, r), d = o + l,
|
|
1670
|
-
m++,
|
|
1669
|
+
for (var a = e.rowCount, l = e.height, c = fe("row", e, n, r), d = o + l, p = c.offset + c.size, m = n; m < a - 1 && p < d; )
|
|
1670
|
+
m++, p += fe("row", e, m, r).size;
|
|
1671
1671
|
return m;
|
|
1672
1672
|
},
|
|
1673
1673
|
initInstanceProps: function(e, n) {
|
|
@@ -1690,8 +1690,8 @@ var Vo = function(e, n) {
|
|
|
1690
1690
|
shouldForceUpdate: d
|
|
1691
1691
|
});
|
|
1692
1692
|
}, n.resetAfterIndices = function(c) {
|
|
1693
|
-
var d = c.columnIndex,
|
|
1694
|
-
typeof d == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, d - 1)), typeof
|
|
1693
|
+
var d = c.columnIndex, p = c.rowIndex, m = c.shouldForceUpdate, P = m === void 0 ? !0 : m;
|
|
1694
|
+
typeof d == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, d - 1)), typeof p == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, p - 1)), n._getItemStyleCache(-1), P && n.forceUpdate();
|
|
1695
1695
|
}, l;
|
|
1696
1696
|
},
|
|
1697
1697
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
@@ -1721,31 +1721,31 @@ function Ko(t, e) {
|
|
|
1721
1721
|
return !Jt(n, r) && !Jt(o, a);
|
|
1722
1722
|
}
|
|
1723
1723
|
const Xo = () => {
|
|
1724
|
-
const { viewMode: t } = Ee(), { scrollMode: e } = Le(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ue(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === J.HORIZONTAL_SCROLLING ? a : t === Ie.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((
|
|
1725
|
-
const T =
|
|
1726
|
-
return (!
|
|
1724
|
+
const { viewMode: t } = Ee(), { scrollMode: e } = Le(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ue(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === J.HORIZONTAL_SCROLLING ? a : t === Ie.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((_, y, C) => {
|
|
1725
|
+
const T = C % l;
|
|
1726
|
+
return (!_[T] || y > _[T]) && (_[T] = y), _;
|
|
1727
1727
|
}, []), [r.widths, l]), d = N(
|
|
1728
1728
|
(v) => {
|
|
1729
|
-
const
|
|
1730
|
-
return c[
|
|
1729
|
+
const _ = v % c.length;
|
|
1730
|
+
return c[_] || 0;
|
|
1731
1731
|
},
|
|
1732
1732
|
[c]
|
|
1733
|
-
),
|
|
1733
|
+
), p = N(
|
|
1734
1734
|
(v) => r.heights[v] || 0,
|
|
1735
1735
|
[r.heights]
|
|
1736
1736
|
);
|
|
1737
1737
|
F(() => {
|
|
1738
1738
|
n(l);
|
|
1739
1739
|
}, [l, n]);
|
|
1740
|
-
const m = k(() => e === J.HORIZONTAL_SCROLLING || e === J.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), P = k(() => r.heights.reduce((v,
|
|
1740
|
+
const m = k(() => e === J.HORIZONTAL_SCROLLING || e === J.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), P = k(() => r.heights.reduce((v, _) => v + _, 0) / r.heights.length || 0, [r]), u = k(() => r.widths.reduce((v, _) => v + _, 0) / r.heights.length || 0, [r]);
|
|
1741
1741
|
return {
|
|
1742
1742
|
rowCount: m,
|
|
1743
|
-
rowHeight:
|
|
1743
|
+
rowHeight: p,
|
|
1744
1744
|
columnCount: l,
|
|
1745
1745
|
columnWidth: d,
|
|
1746
1746
|
pageDimension: r,
|
|
1747
1747
|
estimatedRowHeight: P,
|
|
1748
|
-
estimatedColumnWidth:
|
|
1748
|
+
estimatedColumnWidth: u
|
|
1749
1749
|
};
|
|
1750
1750
|
};
|
|
1751
1751
|
let oe;
|
|
@@ -1769,67 +1769,67 @@ function Yo(t) {
|
|
|
1769
1769
|
const d = typeof document < "u" && document.attachEvent;
|
|
1770
1770
|
if (!d) {
|
|
1771
1771
|
l = function(T) {
|
|
1772
|
-
const
|
|
1772
|
+
const h = T.__resizeTriggers__, f = h.firstElementChild, g = h.lastElementChild, s = f.firstElementChild;
|
|
1773
1773
|
g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, s.style.width = f.offsetWidth + 1 + "px", s.style.height = f.offsetHeight + 1 + "px", f.scrollLeft = f.scrollWidth, f.scrollTop = f.scrollHeight;
|
|
1774
1774
|
}, a = function(T) {
|
|
1775
1775
|
return T.offsetWidth !== T.__resizeLast__.width || T.offsetHeight !== T.__resizeLast__.height;
|
|
1776
1776
|
}, c = function(T) {
|
|
1777
1777
|
if (T.target.className && typeof T.target.className.indexOf == "function" && T.target.className.indexOf("contract-trigger") < 0 && T.target.className.indexOf("expand-trigger") < 0)
|
|
1778
1778
|
return;
|
|
1779
|
-
const
|
|
1779
|
+
const h = this;
|
|
1780
1780
|
l(this), this.__resizeRAF__ && _t(this.__resizeRAF__), this.__resizeRAF__ = bt(function() {
|
|
1781
|
-
a(
|
|
1782
|
-
s.call(
|
|
1781
|
+
a(h) && (h.__resizeLast__.width = h.offsetWidth, h.__resizeLast__.height = h.offsetHeight, h.__resizeListeners__.forEach(function(s) {
|
|
1782
|
+
s.call(h, T);
|
|
1783
1783
|
}));
|
|
1784
1784
|
});
|
|
1785
1785
|
};
|
|
1786
|
-
let
|
|
1786
|
+
let u = !1, v = "";
|
|
1787
1787
|
o = "animationstart";
|
|
1788
|
-
const
|
|
1789
|
-
let
|
|
1788
|
+
const _ = "Webkit Moz O ms".split(" ");
|
|
1789
|
+
let y = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), C = "";
|
|
1790
1790
|
{
|
|
1791
1791
|
const T = document.createElement("fakeelement");
|
|
1792
|
-
if (T.style.animationName !== void 0 && (
|
|
1793
|
-
for (let
|
|
1794
|
-
if (T.style[
|
|
1795
|
-
|
|
1792
|
+
if (T.style.animationName !== void 0 && (u = !0), u === !1) {
|
|
1793
|
+
for (let h = 0; h < _.length; h++)
|
|
1794
|
+
if (T.style[_[h] + "AnimationName"] !== void 0) {
|
|
1795
|
+
C = _[h], v = "-" + C.toLowerCase() + "-", o = y[h], u = !0;
|
|
1796
1796
|
break;
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
1799
|
}
|
|
1800
1800
|
n = "resizeanim", e = "@" + v + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = v + "animation: 1ms " + n + "; ";
|
|
1801
1801
|
}
|
|
1802
|
-
const
|
|
1803
|
-
if (!
|
|
1804
|
-
const v = (e || "") + ".resize-triggers { " + (r || "") + '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%; }',
|
|
1805
|
-
|
|
1802
|
+
const p = function(u) {
|
|
1803
|
+
if (!u.getElementById("detectElementResize")) {
|
|
1804
|
+
const v = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', _ = u.head || u.getElementsByTagName("head")[0], y = u.createElement("style");
|
|
1805
|
+
y.id = "detectElementResize", y.type = "text/css", t != null && y.setAttribute("nonce", t), y.styleSheet ? y.styleSheet.cssText = v : y.appendChild(u.createTextNode(v)), _.appendChild(y);
|
|
1806
1806
|
}
|
|
1807
1807
|
};
|
|
1808
1808
|
return {
|
|
1809
|
-
addResizeListener: function(
|
|
1809
|
+
addResizeListener: function(u, v) {
|
|
1810
1810
|
if (d)
|
|
1811
|
-
|
|
1811
|
+
u.attachEvent("onresize", v);
|
|
1812
1812
|
else {
|
|
1813
|
-
if (!
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1816
|
-
const
|
|
1817
|
-
|
|
1818
|
-
const T =
|
|
1819
|
-
T.className = "contract-trigger",
|
|
1820
|
-
f.animationName === n && l(
|
|
1821
|
-
},
|
|
1813
|
+
if (!u.__resizeTriggers__) {
|
|
1814
|
+
const _ = u.ownerDocument, y = oe.getComputedStyle(u);
|
|
1815
|
+
y && y.position === "static" && (u.style.position = "relative"), p(_), u.__resizeLast__ = {}, u.__resizeListeners__ = [], (u.__resizeTriggers__ = _.createElement("div")).className = "resize-triggers";
|
|
1816
|
+
const C = _.createElement("div");
|
|
1817
|
+
C.className = "expand-trigger", C.appendChild(_.createElement("div"));
|
|
1818
|
+
const T = _.createElement("div");
|
|
1819
|
+
T.className = "contract-trigger", u.__resizeTriggers__.appendChild(C), u.__resizeTriggers__.appendChild(T), u.appendChild(u.__resizeTriggers__), l(u), u.addEventListener("scroll", c, !0), o && (u.__resizeTriggers__.__animationListener__ = function(f) {
|
|
1820
|
+
f.animationName === n && l(u);
|
|
1821
|
+
}, u.__resizeTriggers__.addEventListener(o, u.__resizeTriggers__.__animationListener__));
|
|
1822
1822
|
}
|
|
1823
|
-
|
|
1823
|
+
u.__resizeListeners__.push(v);
|
|
1824
1824
|
}
|
|
1825
1825
|
},
|
|
1826
|
-
removeResizeListener: function(
|
|
1826
|
+
removeResizeListener: function(u, v) {
|
|
1827
1827
|
if (d)
|
|
1828
|
-
|
|
1829
|
-
else if (
|
|
1830
|
-
|
|
1828
|
+
u.detachEvent("onresize", v);
|
|
1829
|
+
else if (u.__resizeListeners__.splice(u.__resizeListeners__.indexOf(v), 1), !u.__resizeListeners__.length) {
|
|
1830
|
+
u.removeEventListener("scroll", c, !0), u.__resizeTriggers__.__animationListener__ && (u.__resizeTriggers__.removeEventListener(o, u.__resizeTriggers__.__animationListener__), u.__resizeTriggers__.__animationListener__ = null);
|
|
1831
1831
|
try {
|
|
1832
|
-
|
|
1832
|
+
u.__resizeTriggers__ = !u.removeChild(u.__resizeTriggers__);
|
|
1833
1833
|
} catch {
|
|
1834
1834
|
}
|
|
1835
1835
|
}
|
|
@@ -1851,17 +1851,17 @@ class Jo extends er {
|
|
|
1851
1851
|
onResize: r
|
|
1852
1852
|
} = this.props;
|
|
1853
1853
|
if (this._parentNode) {
|
|
1854
|
-
const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"),
|
|
1855
|
-
(!n && (this.state.height !== v || this.state.scaledHeight !== P) || !o && (this.state.width !==
|
|
1854
|
+
const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), p = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), P = m.height - d - p, u = m.width - l - c, v = this._parentNode.offsetHeight - d - p, _ = this._parentNode.offsetWidth - l - c;
|
|
1855
|
+
(!n && (this.state.height !== v || this.state.scaledHeight !== P) || !o && (this.state.width !== _ || this.state.scaledWidth !== u)) && (this.setState({
|
|
1856
1856
|
height: v,
|
|
1857
|
-
width:
|
|
1857
|
+
width: _,
|
|
1858
1858
|
scaledHeight: P,
|
|
1859
|
-
scaledWidth:
|
|
1859
|
+
scaledWidth: u
|
|
1860
1860
|
}), typeof r == "function" && r({
|
|
1861
1861
|
height: v,
|
|
1862
1862
|
scaledHeight: P,
|
|
1863
|
-
scaledWidth:
|
|
1864
|
-
width:
|
|
1863
|
+
scaledWidth: u,
|
|
1864
|
+
width: _
|
|
1865
1865
|
}));
|
|
1866
1866
|
}
|
|
1867
1867
|
}, this._setRef = (n) => {
|
|
@@ -1893,50 +1893,50 @@ class Jo extends er {
|
|
|
1893
1893
|
doNotBailOutOnEmptyChildren: l = !1,
|
|
1894
1894
|
nonce: c,
|
|
1895
1895
|
onResize: d,
|
|
1896
|
-
style:
|
|
1896
|
+
style: p = {},
|
|
1897
1897
|
tagName: m = "div",
|
|
1898
1898
|
...P
|
|
1899
1899
|
} = this.props, {
|
|
1900
|
-
height:
|
|
1900
|
+
height: u,
|
|
1901
1901
|
scaledHeight: v,
|
|
1902
|
-
scaledWidth:
|
|
1903
|
-
width:
|
|
1904
|
-
} = this.state,
|
|
1902
|
+
scaledWidth: _,
|
|
1903
|
+
width: y
|
|
1904
|
+
} = this.state, C = {
|
|
1905
1905
|
overflow: "visible"
|
|
1906
1906
|
}, T = {};
|
|
1907
|
-
let
|
|
1908
|
-
return r || (
|
|
1907
|
+
let h = !1;
|
|
1908
|
+
return r || (u === 0 && (h = !0), C.height = 0, T.height = u, T.scaledHeight = v), a || (y === 0 && (h = !0), C.width = 0, T.width = y, T.scaledWidth = _), l && (h = !1), qe(m, {
|
|
1909
1909
|
ref: this._setRef,
|
|
1910
1910
|
style: {
|
|
1911
|
-
...
|
|
1912
|
-
...
|
|
1911
|
+
...C,
|
|
1912
|
+
...p
|
|
1913
1913
|
},
|
|
1914
1914
|
...P
|
|
1915
|
-
}, !
|
|
1915
|
+
}, !h && e(T));
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
1918
|
const Qo = ln(({ widths: t, heights: e }) => {
|
|
1919
1919
|
const { focusedPage: n, totalPages: o } = ie(), r = k(() => {
|
|
1920
1920
|
const c = [], d = Math.ceil(n / 2) * 2 - 1;
|
|
1921
1921
|
if (c.push(d), d + 1 <= o) {
|
|
1922
|
-
const
|
|
1923
|
-
c.push(
|
|
1922
|
+
const p = d + 1;
|
|
1923
|
+
c.push(p);
|
|
1924
1924
|
}
|
|
1925
1925
|
return c;
|
|
1926
1926
|
}, [n, o]), a = k(() => {
|
|
1927
|
-
const c = n % 2 === 1 ? n - 1 : n - 2, d = t(c),
|
|
1927
|
+
const c = n % 2 === 1 ? n - 1 : n - 2, d = t(c), p = e(c), m = t(c + 1), P = e(c + 1), u = p > P ? p : P, v = p < P ? p : P, _ = u / 2 - v / 2;
|
|
1928
1928
|
return [
|
|
1929
1929
|
{
|
|
1930
1930
|
position: "absolute",
|
|
1931
1931
|
left: 0,
|
|
1932
|
-
top:
|
|
1932
|
+
top: u === p ? 0 : _,
|
|
1933
1933
|
width: d,
|
|
1934
|
-
height:
|
|
1934
|
+
height: p
|
|
1935
1935
|
},
|
|
1936
1936
|
{
|
|
1937
1937
|
position: "absolute",
|
|
1938
1938
|
left: d,
|
|
1939
|
-
top:
|
|
1939
|
+
top: u === P ? 0 : _,
|
|
1940
1940
|
width: m,
|
|
1941
1941
|
height: P
|
|
1942
1942
|
}
|
|
@@ -1960,49 +1960,49 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
1960
1960
|
}
|
|
1961
1961
|
);
|
|
1962
1962
|
}, ti = (t, e, n) => {
|
|
1963
|
-
const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = Ue(), { setFocusedPage: c } = ie(), [d,
|
|
1964
|
-
const
|
|
1963
|
+
const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = Ue(), { setFocusedPage: c } = ie(), [d, p] = $([]), { targetScrollPage: m } = pn(), P = Pt(d, 0, 500), u = k(() => a.map((_, y) => {
|
|
1964
|
+
const C = l[y], T = Vr(y + 1, t), h = C * T.columnIndex, f = _ * T.rowIndex, g = h + C, s = f + _;
|
|
1965
1965
|
return {
|
|
1966
|
-
pageNumber:
|
|
1966
|
+
pageNumber: y + 1,
|
|
1967
1967
|
...T,
|
|
1968
|
-
width:
|
|
1969
|
-
height:
|
|
1970
|
-
startX:
|
|
1968
|
+
width: C,
|
|
1969
|
+
height: _,
|
|
1970
|
+
startX: h,
|
|
1971
1971
|
startY: f,
|
|
1972
1972
|
endX: g,
|
|
1973
1973
|
endY: s
|
|
1974
1974
|
};
|
|
1975
1975
|
}), [a, l, t, e]);
|
|
1976
1976
|
F(() => {
|
|
1977
|
-
var
|
|
1977
|
+
var y;
|
|
1978
1978
|
P.length > 0 && !m.current && c(P[0].pageNumber);
|
|
1979
|
-
let
|
|
1980
|
-
|
|
1979
|
+
let _ = (y = P[0]) == null ? void 0 : y.ratio;
|
|
1980
|
+
_ && P.filter((C) => Math.round(C.ratio) === Math.round(_)).some((C) => C.pageNumber === m.current) && setTimeout(() => {
|
|
1981
1981
|
m.current = void 0;
|
|
1982
1982
|
}, 500);
|
|
1983
1983
|
}, [P, c]);
|
|
1984
1984
|
const v = N(
|
|
1985
|
-
(
|
|
1985
|
+
(_) => {
|
|
1986
1986
|
o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
|
|
1987
|
-
const
|
|
1988
|
-
startTop:
|
|
1989
|
-
startLeft:
|
|
1990
|
-
endTop:
|
|
1991
|
-
endLeft:
|
|
1992
|
-
}, T =
|
|
1993
|
-
const f =
|
|
1987
|
+
const y = _.target, C = {
|
|
1988
|
+
startTop: y.scrollTop,
|
|
1989
|
+
startLeft: y.scrollLeft,
|
|
1990
|
+
endTop: y.scrollTop + y.clientHeight,
|
|
1991
|
+
endLeft: y.scrollLeft + y.clientWidth
|
|
1992
|
+
}, T = u.filter((h) => {
|
|
1993
|
+
const f = h.endX >= C.startLeft && h.endY >= C.startTop, g = h.startX <= C.endLeft && h.startY <= C.endTop;
|
|
1994
1994
|
return f && g;
|
|
1995
|
-
}).map((
|
|
1996
|
-
const f =
|
|
1995
|
+
}).map((h) => {
|
|
1996
|
+
const f = C.startLeft > h.startX ? C.startLeft : h.startX, g = C.startTop > h.startY ? C.startTop : h.startY, s = C.endLeft < h.endX ? C.endLeft : h.endX, w = C.endTop < h.endY ? C.endTop : h.endY, b = s - f, S = w - g, x = +(b * S / (h.width * h.height) * 100).toFixed(2);
|
|
1997
1997
|
return {
|
|
1998
|
-
pageNumber:
|
|
1998
|
+
pageNumber: h.pageNumber,
|
|
1999
1999
|
ratio: x
|
|
2000
2000
|
};
|
|
2001
|
-
}).sort((
|
|
2002
|
-
|
|
2001
|
+
}).sort((h, f) => f.ratio - h.ratio);
|
|
2002
|
+
p(T);
|
|
2003
2003
|
});
|
|
2004
2004
|
},
|
|
2005
|
-
[r,
|
|
2005
|
+
[r, u]
|
|
2006
2006
|
);
|
|
2007
2007
|
F(() => {
|
|
2008
2008
|
if (n)
|
|
@@ -2018,17 +2018,17 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2018
2018
|
virtualScrollRef: l,
|
|
2019
2019
|
getVirtualScrollRef: c,
|
|
2020
2020
|
getPageScrollElementRef: d,
|
|
2021
|
-
getVirtualScrollableElementRef:
|
|
2021
|
+
getVirtualScrollableElementRef: p,
|
|
2022
2022
|
setTotalInnerDimensions: m,
|
|
2023
2023
|
virtualScrollableElementRef: P,
|
|
2024
|
-
totalInnerDimensions:
|
|
2024
|
+
totalInnerDimensions: u,
|
|
2025
2025
|
pageScrollElementRef: v
|
|
2026
|
-
} = et(),
|
|
2027
|
-
|
|
2026
|
+
} = et(), _ = H(!0), { nextPage: y, prevPage: C, setFocusedPage: T, focusedPage: h } = ie(), { scrollMode: f } = Le(), { viewMode: g } = Ee(), s = H(null), { loading: w } = Q(), { passwordRequired: b } = nr(), { LoaderImageComponent: S } = hn(), E = H(
|
|
2027
|
+
u
|
|
2028
2028
|
), x = H({
|
|
2029
2029
|
viewMode: g,
|
|
2030
2030
|
scrollMode: f
|
|
2031
|
-
}), R = H(!1),
|
|
2031
|
+
}), R = H(!1), z = H(), { isFullScreen: D } = sr(), {
|
|
2032
2032
|
pageDimension: A,
|
|
2033
2033
|
rowCount: L,
|
|
2034
2034
|
rowHeight: I,
|
|
@@ -2036,7 +2036,7 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2036
2036
|
columnWidth: M,
|
|
2037
2037
|
estimatedColumnWidth: G,
|
|
2038
2038
|
estimatedRowHeight: Z
|
|
2039
|
-
} = Xo(), j = Pt(
|
|
2039
|
+
} = Xo(), j = Pt(u, 100), q = H();
|
|
2040
2040
|
ti(O, L, P);
|
|
2041
2041
|
const ee = H({
|
|
2042
2042
|
scrollTop: 0,
|
|
@@ -2050,9 +2050,9 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2050
2050
|
}), [O]), Ne = N(
|
|
2051
2051
|
(U) => {
|
|
2052
2052
|
const V = document.activeElement !== o;
|
|
2053
|
-
!
|
|
2053
|
+
!D && V || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), C()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(), y()));
|
|
2054
2054
|
},
|
|
2055
|
-
[
|
|
2055
|
+
[y, C, D, f]
|
|
2056
2056
|
);
|
|
2057
2057
|
F(() => (window.addEventListener("keydown", Ne), () => {
|
|
2058
2058
|
window.removeEventListener("keydown", Ne);
|
|
@@ -2080,7 +2080,7 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2080
2080
|
), we = N(
|
|
2081
2081
|
(U, V) => {
|
|
2082
2082
|
if (x.current.viewMode !== g || x.current.scrollMode !== f) {
|
|
2083
|
-
q.current && clearTimeout(q.current), R.current = !0, a(
|
|
2083
|
+
q.current && clearTimeout(q.current), R.current = !0, a(h, "auto"), q.current = setTimeout(() => {
|
|
2084
2084
|
requestAnimationFrame(() => {
|
|
2085
2085
|
x.current = { viewMode: g, scrollMode: f };
|
|
2086
2086
|
});
|
|
@@ -2091,11 +2091,11 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2091
2091
|
if (!V.height || !V.width)
|
|
2092
2092
|
return;
|
|
2093
2093
|
R.current = !0;
|
|
2094
|
-
const { height: ye, width: it } = V, { height: Ot, width:
|
|
2095
|
-
if (Ot === ye &&
|
|
2094
|
+
const { height: ye, width: it } = V, { height: Ot, width: zt } = E.current;
|
|
2095
|
+
if (Ot === ye && zt === it)
|
|
2096
2096
|
return;
|
|
2097
|
-
const Kn = Se / Ot * ye, Xn = ot /
|
|
2098
|
-
|
|
2097
|
+
const Kn = Se / Ot * ye, Xn = ot / zt * it, Yn = Math.round(Math.min(Kn, ye)) || 0, Jn = Math.round(Math.min(Xn, it)) || 0;
|
|
2098
|
+
z.current = setTimeout(() => {
|
|
2099
2099
|
requestAnimationFrame(() => {
|
|
2100
2100
|
l == null || l.scrollTo({
|
|
2101
2101
|
scrollTop: Yn,
|
|
@@ -2110,7 +2110,7 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2110
2110
|
[l, g, f, a]
|
|
2111
2111
|
);
|
|
2112
2112
|
F(() => {
|
|
2113
|
-
clearTimeout(
|
|
2113
|
+
clearTimeout(z.current);
|
|
2114
2114
|
const U = Array.from({ length: L }).reduce(
|
|
2115
2115
|
(Se, ot, ye) => Se + I(ye),
|
|
2116
2116
|
0
|
|
@@ -2148,14 +2148,14 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2148
2148
|
[te, ae, ue]
|
|
2149
2149
|
);
|
|
2150
2150
|
return F(() => {
|
|
2151
|
-
|
|
2152
|
-
}, [
|
|
2153
|
-
if (!(j.height === 0 || !
|
|
2151
|
+
w && de();
|
|
2152
|
+
}, [w]), F(() => {
|
|
2153
|
+
if (!(j.height === 0 || !_.current)) {
|
|
2154
2154
|
if (e === J.PAGE_SCROLLING) {
|
|
2155
|
-
t !==
|
|
2155
|
+
t !== h && v && T(t), _.current = !1;
|
|
2156
2156
|
return;
|
|
2157
2157
|
}
|
|
2158
|
-
a(t, "auto"), T(t),
|
|
2158
|
+
a(t, "auto"), T(t), _.current = !1;
|
|
2159
2159
|
}
|
|
2160
2160
|
}, [
|
|
2161
2161
|
a,
|
|
@@ -2177,7 +2177,7 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2177
2177
|
{
|
|
2178
2178
|
ref: c,
|
|
2179
2179
|
itemData: Fe,
|
|
2180
|
-
outerRef:
|
|
2180
|
+
outerRef: p,
|
|
2181
2181
|
innerRef: s,
|
|
2182
2182
|
onScroll: nt,
|
|
2183
2183
|
columnCount: O,
|
|
@@ -2194,7 +2194,7 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2194
2194
|
),
|
|
2195
2195
|
children: ni
|
|
2196
2196
|
}
|
|
2197
|
-
) :
|
|
2197
|
+
) : w ? null : /* @__PURE__ */ i(
|
|
2198
2198
|
"div",
|
|
2199
2199
|
{
|
|
2200
2200
|
className: ue["rp-loader"],
|
|
@@ -2205,10 +2205,10 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2205
2205
|
height: "100%",
|
|
2206
2206
|
width: "100%"
|
|
2207
2207
|
},
|
|
2208
|
-
children:
|
|
2208
|
+
children: S && /* @__PURE__ */ i(S, {})
|
|
2209
2209
|
}
|
|
2210
2210
|
) }) }) }),
|
|
2211
|
-
|
|
2211
|
+
b && /* @__PURE__ */ i(Ur, {})
|
|
2212
2212
|
] });
|
|
2213
2213
|
}, We = {
|
|
2214
2214
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
@@ -2227,24 +2227,24 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2227
2227
|
const { nextIcon: t } = pe();
|
|
2228
2228
|
return t || /* @__PURE__ */ i(He, { style: { transform: "rotate(180deg" } });
|
|
2229
2229
|
}, ii = () => {
|
|
2230
|
-
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen:
|
|
2230
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: p } = Ce(), { localeMessages: m } = se(), { viewMode: P } = Ee(), { scrollMode: u } = Le();
|
|
2231
2231
|
F(() => {
|
|
2232
2232
|
c(t.toString());
|
|
2233
2233
|
}, [t]);
|
|
2234
|
-
const v = N((
|
|
2235
|
-
const f =
|
|
2234
|
+
const v = N((h) => {
|
|
2235
|
+
const f = h.target.value;
|
|
2236
2236
|
c(f);
|
|
2237
|
-
}, []),
|
|
2238
|
-
const
|
|
2239
|
-
|
|
2240
|
-
}, [a, l, e]),
|
|
2237
|
+
}, []), _ = N(async () => {
|
|
2238
|
+
const h = a(l);
|
|
2239
|
+
h.success || c(h.currentPage.toString());
|
|
2240
|
+
}, [a, l, e]), y = N(() => {
|
|
2241
2241
|
c(t.toString());
|
|
2242
|
-
}, [t]),
|
|
2243
|
-
(
|
|
2244
|
-
|
|
2242
|
+
}, [t]), C = N(
|
|
2243
|
+
(h) => {
|
|
2244
|
+
h.key === "Enter" && _();
|
|
2245
2245
|
},
|
|
2246
|
-
[
|
|
2247
|
-
), T = k(() => P === Ie.DUAL_PAGE &&
|
|
2246
|
+
[_]
|
|
2247
|
+
), T = k(() => P === Ie.DUAL_PAGE && u === J.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, P, u]);
|
|
2248
2248
|
return typeof d != "boolean" ? /* @__PURE__ */ i(
|
|
2249
2249
|
d,
|
|
2250
2250
|
{
|
|
@@ -2256,7 +2256,7 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2256
2256
|
changePage: n
|
|
2257
2257
|
}
|
|
2258
2258
|
) : d ? /* @__PURE__ */ W("div", { className: ft["rp-paginate"], children: [
|
|
2259
|
-
!
|
|
2259
|
+
!p && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2260
2260
|
re,
|
|
2261
2261
|
{
|
|
2262
2262
|
onClick: r,
|
|
@@ -2268,8 +2268,8 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2268
2268
|
/* @__PURE__ */ i(K, { content: m == null ? void 0 : m.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2269
2269
|
dn,
|
|
2270
2270
|
{
|
|
2271
|
-
onKeyDown:
|
|
2272
|
-
onBlur:
|
|
2271
|
+
onKeyDown: C,
|
|
2272
|
+
onBlur: y,
|
|
2273
2273
|
onChange: v,
|
|
2274
2274
|
value: l,
|
|
2275
2275
|
className: ft["rp-page-input"]
|
|
@@ -2279,7 +2279,7 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2279
2279
|
"/",
|
|
2280
2280
|
e
|
|
2281
2281
|
] }),
|
|
2282
|
-
!
|
|
2282
|
+
!p && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2283
2283
|
re,
|
|
2284
2284
|
{
|
|
2285
2285
|
onClick: o,
|
|
@@ -2298,7 +2298,7 @@ var Rt = "Dialog", [In, Us] = Xr(Rt), [ai, ce] = In(Rt), Rn = (t) => {
|
|
|
2298
2298
|
defaultOpen: r,
|
|
2299
2299
|
onOpenChange: a,
|
|
2300
2300
|
modal: l = !0
|
|
2301
|
-
} = t, c = B.useRef(null), d = B.useRef(null), [
|
|
2301
|
+
} = t, c = B.useRef(null), d = B.useRef(null), [p = !1, m] = Qr({
|
|
2302
2302
|
prop: o,
|
|
2303
2303
|
defaultProp: r,
|
|
2304
2304
|
onChange: a
|
|
@@ -2312,7 +2312,7 @@ var Rt = "Dialog", [In, Us] = Xr(Rt), [ai, ce] = In(Rt), Rn = (t) => {
|
|
|
2312
2312
|
contentId: ct(),
|
|
2313
2313
|
titleId: ct(),
|
|
2314
2314
|
descriptionId: ct(),
|
|
2315
|
-
open:
|
|
2315
|
+
open: p,
|
|
2316
2316
|
onOpenChange: m,
|
|
2317
2317
|
onOpenToggle: B.useCallback(() => m((P) => !P), [m]),
|
|
2318
2318
|
modal: l,
|
|
@@ -2371,13 +2371,13 @@ var li = B.forwardRef(
|
|
|
2371
2371
|
) })
|
|
2372
2372
|
);
|
|
2373
2373
|
}
|
|
2374
|
-
), Re = "DialogContent",
|
|
2374
|
+
), Re = "DialogContent", zn = B.forwardRef(
|
|
2375
2375
|
(t, e) => {
|
|
2376
2376
|
const n = En(Re, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Re, t.__scopeDialog);
|
|
2377
2377
|
return /* @__PURE__ */ i(St, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(di, { ...r, ref: e }) : /* @__PURE__ */ i(ui, { ...r, ref: e }) });
|
|
2378
2378
|
}
|
|
2379
2379
|
);
|
|
2380
|
-
|
|
2380
|
+
zn.displayName = Re;
|
|
2381
2381
|
var di = B.forwardRef(
|
|
2382
2382
|
(t, e) => {
|
|
2383
2383
|
const n = ce(Re, t.__scopeDialog), o = B.useRef(null), r = Tt(e, n.contentRef, o);
|
|
@@ -2386,7 +2386,7 @@ var di = B.forwardRef(
|
|
|
2386
2386
|
if (a)
|
|
2387
2387
|
return io(a);
|
|
2388
2388
|
}, []), /* @__PURE__ */ i(
|
|
2389
|
-
|
|
2389
|
+
Dn,
|
|
2390
2390
|
{
|
|
2391
2391
|
...t,
|
|
2392
2392
|
ref: r,
|
|
@@ -2411,7 +2411,7 @@ var di = B.forwardRef(
|
|
|
2411
2411
|
(t, e) => {
|
|
2412
2412
|
const n = ce(Re, t.__scopeDialog), o = B.useRef(!1), r = B.useRef(!1);
|
|
2413
2413
|
return /* @__PURE__ */ i(
|
|
2414
|
-
|
|
2414
|
+
Dn,
|
|
2415
2415
|
{
|
|
2416
2416
|
...t,
|
|
2417
2417
|
ref: e,
|
|
@@ -2422,17 +2422,17 @@ var di = B.forwardRef(
|
|
|
2422
2422
|
(l = t.onCloseAutoFocus) == null || l.call(t, a), a.defaultPrevented || (o.current || (c = n.triggerRef.current) == null || c.focus(), a.preventDefault()), o.current = !1, r.current = !1;
|
|
2423
2423
|
},
|
|
2424
2424
|
onInteractOutside: (a) => {
|
|
2425
|
-
var d,
|
|
2425
|
+
var d, p;
|
|
2426
2426
|
(d = t.onInteractOutside) == null || d.call(t, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
2427
2427
|
const l = a.target;
|
|
2428
|
-
((
|
|
2428
|
+
((p = n.triggerRef.current) == null ? void 0 : p.contains(l)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
|
|
2429
2429
|
}
|
|
2430
2430
|
}
|
|
2431
2431
|
);
|
|
2432
2432
|
}
|
|
2433
|
-
),
|
|
2433
|
+
), Dn = B.forwardRef(
|
|
2434
2434
|
(t, e) => {
|
|
2435
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = ce(Re, n), d = B.useRef(null),
|
|
2435
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = ce(Re, n), d = B.useRef(null), p = Tt(e, d);
|
|
2436
2436
|
return no(), /* @__PURE__ */ W(me, { children: [
|
|
2437
2437
|
/* @__PURE__ */ i(
|
|
2438
2438
|
ro,
|
|
@@ -2451,7 +2451,7 @@ var di = B.forwardRef(
|
|
|
2451
2451
|
"aria-labelledby": c.titleId,
|
|
2452
2452
|
"data-state": Nt(c.open),
|
|
2453
2453
|
...l,
|
|
2454
|
-
ref:
|
|
2454
|
+
ref: p,
|
|
2455
2455
|
onDismiss: () => c.onOpenChange(!1)
|
|
2456
2456
|
}
|
|
2457
2457
|
)
|
|
@@ -2515,7 +2515,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2515
2515
|
const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2516
2516
|
e && r && (document.getElementById(e) || console.warn(o));
|
|
2517
2517
|
}, [o, t, e]), null;
|
|
2518
|
-
}, gi = Rn, vi = Nn, wi = On, _i =
|
|
2518
|
+
}, gi = Rn, vi = Nn, wi = On, _i = zn, bi = An, Ci = kn;
|
|
2519
2519
|
const xe = {
|
|
2520
2520
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2521
2521
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2532,14 +2532,14 @@ const xe = {
|
|
|
2532
2532
|
fileSize: l,
|
|
2533
2533
|
filename: c,
|
|
2534
2534
|
title: d,
|
|
2535
|
-
author:
|
|
2535
|
+
author: p,
|
|
2536
2536
|
subject: m,
|
|
2537
2537
|
createdOn: P,
|
|
2538
|
-
creator:
|
|
2538
|
+
creator: u,
|
|
2539
2539
|
keywords: v,
|
|
2540
|
-
modifiedOn:
|
|
2541
|
-
pdfProducer:
|
|
2542
|
-
pdfVersion:
|
|
2540
|
+
modifiedOn: _,
|
|
2541
|
+
pdfProducer: y,
|
|
2542
|
+
pdfVersion: C,
|
|
2543
2543
|
pageCount: T
|
|
2544
2544
|
} = t;
|
|
2545
2545
|
return [
|
|
@@ -2547,21 +2547,21 @@ const xe = {
|
|
|
2547
2547
|
{ label: r == null ? void 0 : r.propertiesFileSizeLabel, value: l },
|
|
2548
2548
|
{ separate: !0 },
|
|
2549
2549
|
{ label: r == null ? void 0 : r.propertiesTitleLabel, value: d },
|
|
2550
|
-
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value:
|
|
2550
|
+
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value: p },
|
|
2551
2551
|
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value: m },
|
|
2552
2552
|
{ label: r == null ? void 0 : r.propertiesKeywordLabel, value: v },
|
|
2553
|
-
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value:
|
|
2553
|
+
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value: u },
|
|
2554
2554
|
{
|
|
2555
2555
|
label: r == null ? void 0 : r.propertiesCreateOnLabel,
|
|
2556
2556
|
value: P ? kt(P) : ""
|
|
2557
2557
|
},
|
|
2558
2558
|
{
|
|
2559
2559
|
label: r == null ? void 0 : r.propertiesModifiedOnLabel,
|
|
2560
|
-
value:
|
|
2560
|
+
value: _ ? kt(_) : ""
|
|
2561
2561
|
},
|
|
2562
2562
|
{ separate: !0 },
|
|
2563
|
-
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value:
|
|
2564
|
-
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value:
|
|
2563
|
+
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: y },
|
|
2564
|
+
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: C },
|
|
2565
2565
|
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: T }
|
|
2566
2566
|
];
|
|
2567
2567
|
}, [t, r]);
|
|
@@ -2625,7 +2625,7 @@ const xe = {
|
|
|
2625
2625
|
}, Oi = () => {
|
|
2626
2626
|
const { goToLastPageIcon: t } = pe();
|
|
2627
2627
|
return t || /* @__PURE__ */ i(vn, {});
|
|
2628
|
-
}, rn = { width: "100%" },
|
|
2628
|
+
}, rn = { width: "100%" }, zi = () => {
|
|
2629
2629
|
const { goToPage: t, totalPages: e, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = k(() => n === 1, [n]), l = k(() => n === e, [n, e]), c = N(() => {
|
|
2630
2630
|
t(1);
|
|
2631
2631
|
}, [t]), d = N(() => {
|
|
@@ -2642,7 +2642,7 @@ const xe = {
|
|
|
2642
2642
|
] }) }) }),
|
|
2643
2643
|
/* @__PURE__ */ i(yt, {})
|
|
2644
2644
|
] }) : null;
|
|
2645
|
-
},
|
|
2645
|
+
}, Di = () => {
|
|
2646
2646
|
const { container: t, pagesRef: e } = ge(), { isSmallScreen: n } = Ce(), {
|
|
2647
2647
|
openFileTool: o,
|
|
2648
2648
|
downloadTool: r,
|
|
@@ -2650,17 +2650,17 @@ const xe = {
|
|
|
2650
2650
|
scrollModeTool: l,
|
|
2651
2651
|
rotateTool: c,
|
|
2652
2652
|
selectionModeTool: d,
|
|
2653
|
-
jumpNavigationTool:
|
|
2653
|
+
jumpNavigationTool: p,
|
|
2654
2654
|
printTool: m,
|
|
2655
2655
|
fullscreenTool: P
|
|
2656
|
-
} = ve(), { localeMessages:
|
|
2656
|
+
} = ve(), { localeMessages: u } = se(), [v, _] = $(0), y = H(
|
|
2657
2657
|
new ResizeObserver((T) => {
|
|
2658
|
-
|
|
2658
|
+
_(T[0].contentRect.height);
|
|
2659
2659
|
})
|
|
2660
|
-
),
|
|
2661
|
-
const T =
|
|
2662
|
-
let
|
|
2663
|
-
return n && (
|
|
2660
|
+
), C = k(() => {
|
|
2661
|
+
const T = p || c || d || l || a;
|
|
2662
|
+
let h = !1;
|
|
2663
|
+
return n && (h = !(!o && !r && !m && !P)), T || h;
|
|
2664
2664
|
}, [
|
|
2665
2665
|
o,
|
|
2666
2666
|
r,
|
|
@@ -2668,33 +2668,40 @@ const xe = {
|
|
|
2668
2668
|
l,
|
|
2669
2669
|
c,
|
|
2670
2670
|
d,
|
|
2671
|
-
|
|
2671
|
+
p,
|
|
2672
2672
|
n
|
|
2673
2673
|
]);
|
|
2674
|
-
return F(() => (e &&
|
|
2675
|
-
|
|
2676
|
-
}), [e]),
|
|
2674
|
+
return F(() => (e && y.current.observe(e), () => {
|
|
2675
|
+
y.current.disconnect();
|
|
2676
|
+
}), [e]), C ? /* @__PURE__ */ W(lo, { children: [
|
|
2677
2677
|
/* @__PURE__ */ i(
|
|
2678
2678
|
mn,
|
|
2679
2679
|
{
|
|
2680
2680
|
container: t,
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2681
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": u == null ? void 0 : u.moreOptionTooltip, children: /* @__PURE__ */ i(Kr, {}) }) }) }),
|
|
2682
|
+
children: /* @__PURE__ */ W(
|
|
2683
|
+
"div",
|
|
2684
|
+
{
|
|
2685
|
+
style: { maxHeight: `${v}px`, overflow: "auto" },
|
|
2686
|
+
className: Ti["rp-other-tool-content"],
|
|
2687
|
+
"data-rp": "moreOptionsDropdown",
|
|
2688
|
+
children: [
|
|
2689
|
+
n && /* @__PURE__ */ W(Ke, { children: [
|
|
2690
|
+
/* @__PURE__ */ i(fn, {}),
|
|
2691
|
+
/* @__PURE__ */ i(Vn, {}),
|
|
2692
|
+
/* @__PURE__ */ i(Zn, {}),
|
|
2693
|
+
/* @__PURE__ */ i(gn, {}),
|
|
2694
|
+
/* @__PURE__ */ i(yt, {})
|
|
2695
|
+
] }),
|
|
2696
|
+
/* @__PURE__ */ i(zi, {}),
|
|
2697
|
+
/* @__PURE__ */ i(po, {}),
|
|
2698
|
+
/* @__PURE__ */ i(vo, {}),
|
|
2699
|
+
/* @__PURE__ */ i(ho, {}),
|
|
2700
|
+
/* @__PURE__ */ i(fo, {}),
|
|
2701
|
+
/* @__PURE__ */ i(uo, {})
|
|
2702
|
+
]
|
|
2703
|
+
}
|
|
2704
|
+
)
|
|
2698
2705
|
}
|
|
2699
2706
|
),
|
|
2700
2707
|
/* @__PURE__ */ i(Pi, {})
|
|
@@ -2709,9 +2716,9 @@ const xe = {
|
|
|
2709
2716
|
/* @__PURE__ */ i(Zn, {}),
|
|
2710
2717
|
/* @__PURE__ */ i(gn, {})
|
|
2711
2718
|
] }),
|
|
2712
|
-
/* @__PURE__ */ i(
|
|
2719
|
+
/* @__PURE__ */ i(Di, {})
|
|
2713
2720
|
] });
|
|
2714
|
-
},
|
|
2721
|
+
}, ze = {
|
|
2715
2722
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
2716
2723
|
"rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_cocqs_6",
|
|
2717
2724
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
@@ -2724,45 +2731,51 @@ const xe = {
|
|
|
2724
2731
|
const { zoomOutIcon: t } = pe();
|
|
2725
2732
|
return t || /* @__PURE__ */ i(_o, {});
|
|
2726
2733
|
}, Hi = () => {
|
|
2727
|
-
const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: l } = Ge(), { pages: c } = Q(), { isSmallScreen: d } = Ce(), { localeMessages:
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2734
|
+
const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: l } = Ge(), { pages: c } = Q(), { isSmallScreen: d } = Ce(), { localeMessages: p } = se(), { viewMode: m } = Ee(), [P, u] = $(0), v = H(
|
|
2735
|
+
new ResizeObserver((s) => {
|
|
2736
|
+
u(s[0].contentRect.height);
|
|
2737
|
+
})
|
|
2738
|
+
), _ = N(() => {
|
|
2739
|
+
e((s) => {
|
|
2740
|
+
const w = Math.floor(s / 25) * 25;
|
|
2741
|
+
return Math.min(w + 25, mt);
|
|
2731
2742
|
});
|
|
2732
|
-
}, [e]),
|
|
2733
|
-
e((
|
|
2734
|
-
const
|
|
2735
|
-
return Math.min(
|
|
2743
|
+
}, [e]), y = N(() => {
|
|
2744
|
+
e((s) => {
|
|
2745
|
+
const w = Math.ceil(s / 25) * 25;
|
|
2746
|
+
return Math.min(w - 25, mt);
|
|
2736
2747
|
});
|
|
2737
|
-
}, [e]),
|
|
2738
|
-
const
|
|
2739
|
-
return
|
|
2740
|
-
}, [c, a, l]),
|
|
2741
|
-
(
|
|
2742
|
-
const
|
|
2743
|
-
u,
|
|
2748
|
+
}, [e]), C = k(() => t === Fi, [t]), T = k(() => t === mt, [t]), h = k(() => {
|
|
2749
|
+
const s = c.get(a);
|
|
2750
|
+
return s ? s.page.getViewport({ scale: 1, rotation: l + s.defaultRotation }) : null;
|
|
2751
|
+
}, [c, a, l]), f = N(
|
|
2752
|
+
(s) => {
|
|
2753
|
+
const w = ((h == null ? void 0 : h.width) || 0) + 2 * Mt, b = ((h == null ? void 0 : h.height) || 0) + 2 * Mt, S = (o == null ? void 0 : o.clientWidth) || 0, E = (o == null ? void 0 : o.clientHeight) || 0, x = bo(
|
|
2744
2754
|
s,
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2755
|
+
S,
|
|
2756
|
+
E,
|
|
2757
|
+
w,
|
|
2758
|
+
b,
|
|
2748
2759
|
m
|
|
2749
2760
|
);
|
|
2750
|
-
e(
|
|
2761
|
+
e(x);
|
|
2751
2762
|
},
|
|
2752
|
-
[e,
|
|
2753
|
-
),
|
|
2754
|
-
(
|
|
2755
|
-
typeof
|
|
2763
|
+
[e, h, o]
|
|
2764
|
+
), g = N(
|
|
2765
|
+
(s) => {
|
|
2766
|
+
typeof s == "number" ? e(s) : f(s);
|
|
2756
2767
|
},
|
|
2757
|
-
[e,
|
|
2768
|
+
[e, f]
|
|
2758
2769
|
);
|
|
2759
|
-
return
|
|
2760
|
-
|
|
2770
|
+
return F(() => (o && v.current.observe(o), () => {
|
|
2771
|
+
v.current.disconnect();
|
|
2772
|
+
}), [o]), typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ W("div", { className: ze["rp-zoom-wrapper"], children: [
|
|
2773
|
+
/* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2761
2774
|
re,
|
|
2762
2775
|
{
|
|
2763
|
-
disabled:
|
|
2764
|
-
onClick:
|
|
2765
|
-
"aria-label":
|
|
2776
|
+
disabled: C,
|
|
2777
|
+
onClick: y,
|
|
2778
|
+
"aria-label": p == null ? void 0 : p.zoomOutTooltip,
|
|
2766
2779
|
children: /* @__PURE__ */ i(Mi, {})
|
|
2767
2780
|
}
|
|
2768
2781
|
) }),
|
|
@@ -2770,40 +2783,47 @@ const xe = {
|
|
|
2770
2783
|
mn,
|
|
2771
2784
|
{
|
|
2772
2785
|
container: n,
|
|
2773
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content:
|
|
2786
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomSelectTooltip, children: /* @__PURE__ */ W(
|
|
2774
2787
|
re,
|
|
2775
2788
|
{
|
|
2776
|
-
className:
|
|
2777
|
-
"aria-label":
|
|
2789
|
+
className: ze["rp-current-zoom-wrapper"],
|
|
2790
|
+
"aria-label": p == null ? void 0 : p.zoomSelectTooltip,
|
|
2778
2791
|
children: [
|
|
2779
|
-
/* @__PURE__ */ i("span", { className:
|
|
2780
|
-
/* @__PURE__ */ i("span", { className:
|
|
2781
|
-
/* @__PURE__ */ i(He, { className:
|
|
2792
|
+
/* @__PURE__ */ i("span", { className: ze["rp-current-zoom-text"], children: t }),
|
|
2793
|
+
/* @__PURE__ */ i("span", { className: ze["rp-current-zoom-text"], children: "%" }),
|
|
2794
|
+
/* @__PURE__ */ i(He, { className: ze["rp-current-zoom-icon"] })
|
|
2782
2795
|
]
|
|
2783
2796
|
}
|
|
2784
2797
|
) }) }),
|
|
2785
2798
|
style: { minWidth: "200px" },
|
|
2786
2799
|
align: "center",
|
|
2787
|
-
children: /* @__PURE__ */ W(
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2800
|
+
children: /* @__PURE__ */ W(
|
|
2801
|
+
"div",
|
|
2802
|
+
{
|
|
2803
|
+
style: { maxHeight: `${P}px`, overflow: "auto" },
|
|
2804
|
+
className: ze["rp-zoom-dropdown-content"],
|
|
2805
|
+
children: [
|
|
2806
|
+
/* @__PURE__ */ W(Ke, { children: [
|
|
2807
|
+
/* @__PURE__ */ i(be, { onClick: () => g(at.ACTUAL), children: p == null ? void 0 : p.zoomActualSize }),
|
|
2808
|
+
/* @__PURE__ */ i(be, { onClick: () => g(at.PAGE_FIT), children: p == null ? void 0 : p.zoomPageFit }),
|
|
2809
|
+
/* @__PURE__ */ i(be, { onClick: () => g(at.PAGE_WIDTH), children: p == null ? void 0 : p.zoomPageWidth })
|
|
2810
|
+
] }),
|
|
2811
|
+
/* @__PURE__ */ i(yt, {}),
|
|
2812
|
+
/* @__PURE__ */ i(Ke, { children: Wi.map((s) => /* @__PURE__ */ W(be, { onClick: () => g(s), children: [
|
|
2813
|
+
s,
|
|
2814
|
+
" %"
|
|
2815
|
+
] }, s)) })
|
|
2816
|
+
]
|
|
2817
|
+
}
|
|
2818
|
+
)
|
|
2799
2819
|
}
|
|
2800
2820
|
),
|
|
2801
|
-
/* @__PURE__ */ i(K, { content:
|
|
2821
|
+
/* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2802
2822
|
re,
|
|
2803
2823
|
{
|
|
2804
|
-
disabled:
|
|
2805
|
-
onClick:
|
|
2806
|
-
"aria-label":
|
|
2824
|
+
disabled: T,
|
|
2825
|
+
onClick: _,
|
|
2826
|
+
"aria-label": p == null ? void 0 : p.zoomInTooltip,
|
|
2807
2827
|
children: /* @__PURE__ */ i(ki, {})
|
|
2808
2828
|
}
|
|
2809
2829
|
) })
|
|
@@ -2839,40 +2859,40 @@ const xe = {
|
|
|
2839
2859
|
searchOptions: l,
|
|
2840
2860
|
setSearchOptions: c,
|
|
2841
2861
|
loading: d,
|
|
2842
|
-
setSearch:
|
|
2862
|
+
setSearch: p,
|
|
2843
2863
|
totalMatches: m,
|
|
2844
2864
|
currentMatchPosition: P,
|
|
2845
|
-
nextMatch:
|
|
2865
|
+
nextMatch: u,
|
|
2846
2866
|
prevMatch: v,
|
|
2847
|
-
search:
|
|
2848
|
-
} = xt(), { searchTool:
|
|
2867
|
+
search: _
|
|
2868
|
+
} = xt(), { searchTool: y = !0 } = ve(), [C, T] = $(_), { localeMessages: h } = se(), { isSmallScreen: f } = Ce(), g = N(() => {
|
|
2849
2869
|
n(!0);
|
|
2850
2870
|
}, []), s = N(() => {
|
|
2851
|
-
|
|
2852
|
-
}, [
|
|
2871
|
+
p(""), T(""), n(!1);
|
|
2872
|
+
}, [p]), w = (I) => {
|
|
2853
2873
|
const O = I.key === "Enter", M = I.key === " ";
|
|
2854
2874
|
(O || M) && s();
|
|
2855
|
-
},
|
|
2875
|
+
}, b = N(
|
|
2856
2876
|
(I) => {
|
|
2857
2877
|
I.key === "Escape" && e && s();
|
|
2858
2878
|
},
|
|
2859
2879
|
[e]
|
|
2860
|
-
),
|
|
2880
|
+
), S = N(
|
|
2861
2881
|
(I) => {
|
|
2862
|
-
I.shiftKey && I.key === "Enter" ? v() : I.key === "Enter" &&
|
|
2882
|
+
I.shiftKey && I.key === "Enter" ? v() : I.key === "Enter" && _ !== C ? p(C) : I.key === "Enter" && u();
|
|
2863
2883
|
},
|
|
2864
|
-
[
|
|
2884
|
+
[C, v, u, p, _]
|
|
2865
2885
|
);
|
|
2866
|
-
F(() => (window.addEventListener("keydown",
|
|
2867
|
-
window.removeEventListener("keydown",
|
|
2868
|
-
}), [
|
|
2886
|
+
F(() => (window.addEventListener("keydown", b), () => {
|
|
2887
|
+
window.removeEventListener("keydown", b);
|
|
2888
|
+
}), [b]), F(() => {
|
|
2869
2889
|
r && r.focus();
|
|
2870
2890
|
}, [r]);
|
|
2871
2891
|
const E = N((I) => {
|
|
2872
2892
|
T(I.target.value);
|
|
2873
2893
|
}, []), x = N(() => {
|
|
2874
|
-
T(""),
|
|
2875
|
-
}, [
|
|
2894
|
+
T(""), p("");
|
|
2895
|
+
}, [p]), R = k(() => `${P} / ${m}`, [P, m]), { wholeWords: z, matchCase: D } = k(() => l, [l]), A = N(
|
|
2876
2896
|
(I) => {
|
|
2877
2897
|
c((O) => ({ ...O, matchCase: I }));
|
|
2878
2898
|
},
|
|
@@ -2885,47 +2905,47 @@ const xe = {
|
|
|
2885
2905
|
);
|
|
2886
2906
|
return F(() => {
|
|
2887
2907
|
s();
|
|
2888
|
-
}, [o, s]),
|
|
2908
|
+
}, [o, s]), y ? /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i(
|
|
2889
2909
|
Mr,
|
|
2890
2910
|
{
|
|
2891
2911
|
open: e,
|
|
2892
2912
|
container: t,
|
|
2893
|
-
triggerComponent: /* @__PURE__ */ i(K, { content:
|
|
2913
|
+
triggerComponent: /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchButtonTooltip, children: /* @__PURE__ */ i(re, { onClick: g, "aria-label": h == null ? void 0 : h.searchButtonTooltip, children: /* @__PURE__ */ i(an, {}) }) }),
|
|
2894
2914
|
children: /* @__PURE__ */ W("div", { className: Y["rp-search-tool-content"], children: [
|
|
2895
2915
|
/* @__PURE__ */ W("div", { className: Y["rp-search-tool-input-wrapper"], children: [
|
|
2896
2916
|
/* @__PURE__ */ W("div", { className: Y["rp-search-tool-input"], children: [
|
|
2897
|
-
/* @__PURE__ */ i(K, { content:
|
|
2917
|
+
/* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2898
2918
|
dn,
|
|
2899
2919
|
{
|
|
2900
|
-
value:
|
|
2901
|
-
onKeyDown:
|
|
2920
|
+
value: C,
|
|
2921
|
+
onKeyDown: S,
|
|
2902
2922
|
onChange: E,
|
|
2903
2923
|
icon: /* @__PURE__ */ i(an, {}),
|
|
2904
|
-
placeholder:
|
|
2924
|
+
placeholder: h == null ? void 0 : h.searchInputPlaceholder,
|
|
2905
2925
|
className: Y["rp-search-input"],
|
|
2906
2926
|
ref: a,
|
|
2907
|
-
children: !!
|
|
2927
|
+
children: !!C && /* @__PURE__ */ i("span", { className: Y["rp-search-tool-input-clear"], onClick: x, children: /* @__PURE__ */ i(Po, {}) })
|
|
2908
2928
|
}
|
|
2909
2929
|
) }),
|
|
2910
2930
|
d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: Y["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: R }),
|
|
2911
|
-
f && /* @__PURE__ */ i("div", { className: Y["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress:
|
|
2931
|
+
f && /* @__PURE__ */ i("div", { className: Y["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: w, handleClose: s }) })
|
|
2912
2932
|
] }),
|
|
2913
2933
|
/* @__PURE__ */ W("div", { className: Y["rp-search-tool-input-checkboxes"], children: [
|
|
2914
2934
|
f && /* @__PURE__ */ i(on, {}),
|
|
2915
|
-
/* @__PURE__ */ i($t, { name: "matchCase", value:
|
|
2916
|
-
!f && /* @__PURE__ */ i(K, { content:
|
|
2917
|
-
/* @__PURE__ */ i($t, { name: "wholeWord", value:
|
|
2918
|
-
!f && /* @__PURE__ */ i(K, { content:
|
|
2935
|
+
/* @__PURE__ */ i($t, { name: "matchCase", value: D, onChange: A, children: h == null ? void 0 : h.searchMatchCaseLabel }),
|
|
2936
|
+
!f && /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
|
|
2937
|
+
/* @__PURE__ */ i($t, { name: "wholeWord", value: z, onChange: L, children: h == null ? void 0 : h.searchWholeWordsLabel }),
|
|
2938
|
+
!f && /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
|
|
2919
2939
|
] })
|
|
2920
2940
|
] }),
|
|
2921
2941
|
!f && /* @__PURE__ */ W("div", { className: Y["rp-search-tool-controls"], children: [
|
|
2922
2942
|
/* @__PURE__ */ i(on, {}),
|
|
2923
|
-
/* @__PURE__ */ i(Ht, { onKeyPress:
|
|
2943
|
+
/* @__PURE__ */ i(Ht, { onKeyPress: w, handleClose: s })
|
|
2924
2944
|
] })
|
|
2925
2945
|
] })
|
|
2926
2946
|
}
|
|
2927
2947
|
) }) : null;
|
|
2928
|
-
}, Gi = "_loading_wazy2_1",
|
|
2948
|
+
}, Gi = "_loading_wazy2_1", De = {
|
|
2929
2949
|
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
|
|
2930
2950
|
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
|
|
2931
2951
|
"rp-loading-title": "_rp-loading-title_wazy2_27",
|
|
@@ -2935,19 +2955,19 @@ const xe = {
|
|
|
2935
2955
|
loading: Gi
|
|
2936
2956
|
}, Ui = ({ percentage: t }) => {
|
|
2937
2957
|
const { cancel: e } = tt(), { localeMessages: n } = se();
|
|
2938
|
-
return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(
|
|
2939
|
-
/* @__PURE__ */ W("div", { className: ne(
|
|
2958
|
+
return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(De["rp-loading-overlay"]), children: /* @__PURE__ */ W("div", { className: ne(De["rp-loading-modal"]), children: [
|
|
2959
|
+
/* @__PURE__ */ W("div", { className: ne(De["rp-loading-title"]), children: [
|
|
2940
2960
|
n == null ? void 0 : n.printLoadingMessage,
|
|
2941
2961
|
"..."
|
|
2942
2962
|
] }),
|
|
2943
|
-
/* @__PURE__ */ i("div", { className: ne(
|
|
2963
|
+
/* @__PURE__ */ i("div", { className: ne(De["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
|
|
2944
2964
|
"div",
|
|
2945
2965
|
{
|
|
2946
|
-
className: ne(
|
|
2966
|
+
className: ne(De["rp-loading-progress"]),
|
|
2947
2967
|
style: { width: `${t}%` }
|
|
2948
2968
|
}
|
|
2949
2969
|
) }),
|
|
2950
|
-
/* @__PURE__ */ i("button", { className: ne(
|
|
2970
|
+
/* @__PURE__ */ i("button", { className: ne(De["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
2951
2971
|
] }) });
|
|
2952
2972
|
}, Vi = $e((t, e) => {
|
|
2953
2973
|
const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {}, l = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
@@ -3017,26 +3037,26 @@ const xe = {
|
|
|
3017
3037
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3018
3038
|
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Bi);
|
|
3019
3039
|
}, ji = $e((t, e) => {
|
|
3020
|
-
const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: d } = Pn(),
|
|
3021
|
-
cn(e, () =>
|
|
3022
|
-
const P = k(() => Object.values(a), [a]),
|
|
3040
|
+
const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: d } = Pn(), p = H(null), m = H(1);
|
|
3041
|
+
cn(e, () => p.current);
|
|
3042
|
+
const P = k(() => Object.values(a), [a]), u = N(() => {
|
|
3023
3043
|
const v = c + 1;
|
|
3024
3044
|
v <= r && l(v);
|
|
3025
3045
|
}, [l, r, c]);
|
|
3026
3046
|
return F(() => {
|
|
3027
|
-
o > c ? d(o) : n && m.current !== o && (Zi(
|
|
3028
|
-
}, [o, c, d, n, P]), mr(
|
|
3029
|
-
var
|
|
3047
|
+
o > c ? d(o) : n && m.current !== o && (Zi(p.current, o), m.current = o);
|
|
3048
|
+
}, [o, c, d, n, P]), mr(p.current, u), /* @__PURE__ */ i("div", { ref: p, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? P.map((v, _) => {
|
|
3049
|
+
var y, C;
|
|
3030
3050
|
return /* @__PURE__ */ i(
|
|
3031
3051
|
qi,
|
|
3032
3052
|
{
|
|
3033
|
-
isFocused: o === ((
|
|
3034
|
-
pageNumber: (
|
|
3053
|
+
isFocused: o === ((y = v.page) == null ? void 0 : y.pageNumber),
|
|
3054
|
+
pageNumber: (C = v.page) == null ? void 0 : C.pageNumber,
|
|
3035
3055
|
thumbnailSrc: v.thumbnailSrc,
|
|
3036
3056
|
loading: v.loading,
|
|
3037
3057
|
viewport: v.viewport
|
|
3038
3058
|
},
|
|
3039
|
-
|
|
3059
|
+
_
|
|
3040
3060
|
);
|
|
3041
3061
|
}) : null }) });
|
|
3042
3062
|
}), Ki = () => {
|
|
@@ -3045,7 +3065,7 @@ const xe = {
|
|
|
3045
3065
|
}, Xi = () => {
|
|
3046
3066
|
const { active: t, setActive: e } = Pn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ve(), { localeMessages: c } = se(), d = N(() => {
|
|
3047
3067
|
e((m) => !m);
|
|
3048
|
-
}, []),
|
|
3068
|
+
}, []), p = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
3049
3069
|
re,
|
|
3050
3070
|
{
|
|
3051
3071
|
onClick: d,
|
|
@@ -3061,7 +3081,7 @@ const xe = {
|
|
|
3061
3081
|
className: gt["rp-sidebar-content-wrapper"],
|
|
3062
3082
|
"data-rp": "sidebar",
|
|
3063
3083
|
children: [
|
|
3064
|
-
/* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children:
|
|
3084
|
+
/* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children: p }),
|
|
3065
3085
|
/* @__PURE__ */ W(
|
|
3066
3086
|
"div",
|
|
3067
3087
|
{
|
|
@@ -3117,23 +3137,23 @@ const xe = {
|
|
|
3117
3137
|
className: l,
|
|
3118
3138
|
mobileWidth: c,
|
|
3119
3139
|
onLoaded: d,
|
|
3120
|
-
cleanupOnLoaded:
|
|
3140
|
+
cleanupOnLoaded: p,
|
|
3121
3141
|
onLayoutWidthChange: m
|
|
3122
|
-
} = t, [P,
|
|
3142
|
+
} = t, [P, u] = $(null), { setContainer: v, setContentRef: _ } = ge(), { loading: y } = Q(), { LoaderImageComponent: C } = hn();
|
|
3123
3143
|
return F(() => (d && d(), () => {
|
|
3124
|
-
|
|
3125
|
-
}), [d,
|
|
3144
|
+
p && p();
|
|
3145
|
+
}), [d, p]), /* @__PURE__ */ i(Yi, { toolbarRef: P, ref: e, children: /* @__PURE__ */ i(Pr, { mobileWidth: c, onLayoutWidthChange: m, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ W(_r, { getContainerRef: v, style: a, className: l, children: [
|
|
3126
3146
|
/* @__PURE__ */ W(br, { children: [
|
|
3127
3147
|
/* @__PURE__ */ W("div", { className: _e["rp-layout"], children: [
|
|
3128
|
-
/* @__PURE__ */ i(Vi, { ref:
|
|
3148
|
+
/* @__PURE__ */ i(Vi, { ref: u }),
|
|
3129
3149
|
/* @__PURE__ */ W("div", { className: _e["rp-content"], children: [
|
|
3130
3150
|
/* @__PURE__ */ i("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ i(Xi, {}) }),
|
|
3131
|
-
/* @__PURE__ */ i("div", { ref:
|
|
3151
|
+
/* @__PURE__ */ i("div", { ref: _, className: _e["rp-pages"], children: n })
|
|
3132
3152
|
] })
|
|
3133
3153
|
] }),
|
|
3134
3154
|
/* @__PURE__ */ i(Cr, {})
|
|
3135
3155
|
] }),
|
|
3136
|
-
|
|
3156
|
+
y ? /* @__PURE__ */ i(
|
|
3137
3157
|
"div",
|
|
3138
3158
|
{
|
|
3139
3159
|
className: _e["rp-loader"],
|
|
@@ -3156,7 +3176,7 @@ const xe = {
|
|
|
3156
3176
|
height: "100%",
|
|
3157
3177
|
width: "100%"
|
|
3158
3178
|
},
|
|
3159
|
-
children:
|
|
3179
|
+
children: C && /* @__PURE__ */ i(C, {})
|
|
3160
3180
|
}
|
|
3161
3181
|
)
|
|
3162
3182
|
}
|
|
@@ -3176,8 +3196,8 @@ export {
|
|
|
3176
3196
|
Xi as J,
|
|
3177
3197
|
Yi as K,
|
|
3178
3198
|
Ui as L,
|
|
3179
|
-
|
|
3180
|
-
|
|
3199
|
+
zi as M,
|
|
3200
|
+
Di as O,
|
|
3181
3201
|
ks as P,
|
|
3182
3202
|
Gs as R,
|
|
3183
3203
|
$s as S,
|
|
@@ -3199,7 +3219,7 @@ export {
|
|
|
3199
3219
|
xo as n,
|
|
3200
3220
|
Tn as o,
|
|
3201
3221
|
Lo as p,
|
|
3202
|
-
|
|
3222
|
+
Do as q,
|
|
3203
3223
|
It as r,
|
|
3204
3224
|
Xo as s,
|
|
3205
3225
|
ei as t,
|