@pdf-viewer/react 1.4.0-rc.0 → 1.4.0

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.
Files changed (45) hide show
  1. package/dist/RPDefaultLayout-70dc4200.js +2914 -0
  2. package/dist/components/RPController.js +12 -13
  3. package/dist/components/RPPages.js +2 -3
  4. package/dist/components/RPProvider.js +1 -1
  5. package/dist/components/layout/RPDefaultLayout.js +1 -1
  6. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  7. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  8. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  9. package/dist/components/layout/toolbar/DocumentDialog.js +2 -3
  10. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  11. package/dist/components/layout/toolbar/MostPageTool.js +2 -3
  12. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  13. package/dist/components/layout/toolbar/Paginate.js +1 -1
  14. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  15. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  16. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  17. package/dist/components/layout/toolbar/SearchTool.js +2 -3
  18. package/dist/components/layout/toolbar/ZoomTool.js +2 -3
  19. package/dist/components/page/AnnotationLayer.js +2 -3
  20. package/dist/components/page/CanvasLayer.js +2 -3
  21. package/dist/components/page/DualPage.js +1 -1
  22. package/dist/components/page/RPPage.js +2 -3
  23. package/dist/components/page/SinglePage.js +1 -1
  24. package/dist/components/page/TextHighlightLayer.js +2 -3
  25. package/dist/components/page/TextLayer.js +2 -3
  26. package/dist/components/ui/LoadingIndicator.js +1 -1
  27. package/dist/contexts/PaginationContext.js +1 -1
  28. package/dist/contexts/PrintContext.js +1 -1
  29. package/dist/contexts/SearchContext.js +1 -1
  30. package/dist/contexts/ThumbnailsContext.js +1 -1
  31. package/dist/main.js +1 -1
  32. package/dist/types/utils/types.d.ts +2 -2
  33. package/dist/utils/hooks/useFileDownload.js +2 -3
  34. package/dist/utils/hooks/useLicense.js +1 -1
  35. package/dist/utils/hooks/usePaginate.js +2 -3
  36. package/dist/utils/hooks/usePrint.js +2 -3
  37. package/dist/utils/hooks/useScrollToPage.js +2 -3
  38. package/dist/utils/hooks/useSearch.js +2 -3
  39. package/dist/utils/hooks/useThumbnail.js +2 -3
  40. package/dist/utils/hooks/useVirtualReactWindow.js +2 -3
  41. package/dist/utils/smoothScrollTo.js +15 -3
  42. package/package.json +2 -2
  43. package/dist/RPDefaultLayout-ec67ce59.js +0 -2911
  44. package/dist/contexts/SmoothScrollContext.js +0 -13
  45. package/dist/types/contexts/SmoothScrollContext.d.ts +0 -10
@@ -1,2911 +0,0 @@
1
- import { jsx as i, Fragment as Ie, jsxs as z } from "react/jsx-runtime";
2
- import * as U from "react";
3
- import { useRef as W, useEffect as D, useCallback as R, useState as G, createContext as je, useContext as Be, useMemo as k, forwardRef as Ke, useImperativeHandle as sn, createElement as He, PureComponent as ir, Component as ar, memo as sr } from "react";
4
- import { ChevronUpIcon as Me } from "./components/icons/ChevronUpIcon.js";
5
- import { UIButton as re } from "./components/ui/Button.js";
6
- import { UIInput as cn } from "./components/ui/Input.js";
7
- import { useScrollModeContext as ze } from "./contexts/ScrollModeContext.js";
8
- import { useDocumentContext as J } from "./contexts/RPDocumentContext.js";
9
- import "./contexts/DarkModeContext.js";
10
- import { ViewMode as Ue, ScrollMode as X, AnnotationSubType as Ft, SelectionMode as cr, ZoomLevel as at } from "./utils/types.js";
11
- import { useRotationContext as Xe } from "./contexts/RotationContext.js";
12
- import { useLayerContext as lr } from "./contexts/LayerContext.js";
13
- import { useZoomContext as Je } from "./contexts/ZoomContext.js";
14
- import { useViewModeContext as Ye } from "./contexts/ViewModeContext.js";
15
- import { useVirtualScrollContext as Qe } from "./contexts/VirtualScrollContext.js";
16
- import { useVirtualGridContext as ln } from "./contexts/VirtualGridContext.js";
17
- import { useScrollStateContext as et } from "./contexts/ScrollStateContext.js";
18
- import { useSelectionModeContext as ur } from "./contexts/SelectionModeContext.js";
19
- import { useInitialStateContext as dr } from "./contexts/InitialStateContext.js";
20
- import { useFullScreenContext as pr } from "./contexts/FullScreenContext.js";
21
- import "./contexts/FileInputContext.js";
22
- import "./contexts/DropFileZoneContext.js";
23
- import { renderPage as _t } from "./utils/renderPage.js";
24
- import { highlightMatches as un, findMatches as hr, resetDivs as dn, highlightMultipleColorMatches as mr } from "./utils/highlight.js";
25
- import * as Pt from "pdfjs-dist";
26
- import { PixelsPerInch as fr, AnnotationMode as gr, RenderingCancelledException as vr, AnnotationLayer as _r } from "pdfjs-dist";
27
- import { useLayoutContainer as ye } from "./contexts/LayoutContainerContext.js";
28
- import { useDimensionPagesContext as St } from "./contexts/DimensionPagesContext.js";
29
- import { useLocalizationContext as de } from "./contexts/LocalizationContext.js";
30
- import { useHighlightContext as wr } from "./contexts/HighlightContext.js";
31
- import { useSmoothScrollContext as pn } from "./contexts/SmoothScrollContext.js";
32
- import { useLoaderContext as hn } from "./contexts/LoaderContext.js";
33
- import "./components/RPConfig.js";
34
- import { ThumbnailIcon as br } from "./components/icons/Thumbnail.js";
35
- import { c as ie } from "./clsx-0c6e471a.js";
36
- import { LoaderIcon as It } from "./components/icons/LoaderIcon.js";
37
- import { useInfiniteScroll as Cr } from "./utils/hooks/useInfiniteScroll.js";
38
- import { RPSplitter as Tr } from "./components/layout/sidebar/RPSplitter.js";
39
- import { useToolbarComponentContext as _e, ToolbarComponentProvider as Pr } from "./contexts/ToolbarComponentContext.js";
40
- import { useIconContext as pe, IconProvider as Sr } from "./contexts/IconContext.js";
41
- import q from "./components/ui/RPTooltip.js";
42
- import { c as Te, C as Ir } from "./Container-8fea0875.js";
43
- import { WrapperLayout as xr } from "./components/layout/WrapperLayout.js";
44
- import { RPDropFileZone as yr } from "./components/RPDropFileZone.js";
45
- import { useViewportContext as Re, ViewportProvider as Rr } from "./contexts/ViewportContext.js";
46
- import "./contexts/ThemeContext.js";
47
- import { SimpleLinkService as Lr } from "./utils/link_service.js";
48
- import { annotationsEvents as Nr, annotationEventsHandler as Er, handleClick as kt, handleAnnotationWidget as Or, handleAnnotationLink as Dr, bindLayerEvents as zr, unbindLayerEvents as Mt } from "./utils/annotations.js";
49
- import { useWatermark as Ar } from "./utils/hooks/useWatermark.js";
50
- import { _ as Fr, U as kr } from "./Popover-5281103c.js";
51
- import { useMousePressed as Mr } from "./utils/hooks/useMousePressed.js";
52
- import { useGrabScroll as Wr } from "./utils/hooks/useGrabScroll.js";
53
- import { usePinch as Hr } from "./utils/hooks/usePinch.js";
54
- import { useDebounce as wt } from "./utils/hooks/useDebounce.js";
55
- import { getThumbnailViewport as Wt } from "./utils/getThumbnailViewport.js";
56
- import { smoothScrollTo as Pe } from "./utils/smoothScrollTo.js";
57
- import { appConsole as $r } from "./utils/appConsole.js";
58
- import { FileUploadTool as mn } from "./components/layout/toolbar/FileUploadTool.js";
59
- import { DarkModeTool as Gr } from "./components/layout/toolbar/DarkModeTool.js";
60
- import { ThreeDotIcon as Vr } from "./components/icons/ThreeDotIcon.js";
61
- import { UIDropDown as fn } from "./components/ui/DropDown.js";
62
- import { c as Ur, u as xt, P as We, b as ke, d as yt, i as qr, k as Zr, a as jr } from "./index-48ca3f30.js";
63
- import { D as Br, d as st } from "./floating-ui.react-dom-88a86594.js";
64
- import { a as Kr, h as Xr, u as Jr, F as Yr, b as Qr, G as qe } from "./index-4ba3ab9a.js";
65
- import { CloseIcon as gn } from "./components/icons/CloseIcon.js";
66
- import { dateFormatter as Ht } from "./utils/dateFormatter.js";
67
- import { PropertyItem as eo } from "./components/layout/toolbar/PropertyItem.js";
68
- import { useOtherToolContext as to, OtherToolProvider as no } from "./contexts/OtherToolContext.js";
69
- import { DocumentProperties as ro } from "./components/layout/toolbar/DocumentProperties.js";
70
- import { RotateTool as oo } from "./components/layout/toolbar/RotateTool.js";
71
- import { ScrollModeTool as io } from "./components/layout/toolbar/ScrollModeTool.js";
72
- import { MenuSeparator as Rt } from "./components/layout/toolbar/MenuSeparator.js";
73
- import { FileDownloadDefaultIcon as ao } from "./components/icons/FileDownloadDefaultIcon.js";
74
- import { MenuItem as we } from "./components/layout/toolbar/MenuItem.js";
75
- import { PrintDefaultTool as so } from "./components/icons/PrintDefaultIcon.js";
76
- import { FullScreenTool as vn } from "./components/layout/toolbar/FullScreenTool.js";
77
- import { GoToDownIcon as _n } from "./components/icons/GoToDownIcon.js";
78
- import { SelectionModeTool as co } from "./components/layout/toolbar/SelectionModeTool.js";
79
- import { ZoomInIcon as lo } from "./components/icons/ZoomInIcon.js";
80
- import { ZoomOutIcon as uo } from "./components/icons/ZoomOutIcon.js";
81
- import { PAGE_PADDING as $t } from "./utils/constants.js";
82
- import { getZoomLevel as po } from "./utils/getZoomLevel.js";
83
- import { SearchIcon as ho } from "./components/icons/SearchIcon.js";
84
- import { UICheckbox as Gt } from "./components/ui/Checkbox.js";
85
- import { ClearIcon as mo } from "./components/icons/ClearIcon.js";
86
- import { InfoIcon as Vt } from "./components/icons/InfoIcon.js";
87
- import './assets/RPDefaultLayout.css';const wn = () => {
88
- const { viewMode: t } = Ye(), { scrollMode: e } = ze(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = Qe(), { setFocusedPage: a } = ce(), c = W(), { columnCount: s } = ln(), { widths: u, heights: l } = St(), d = W(e), f = W(t), h = W(s), { targetScrollPosition: g, smoothScrolling: v } = pn();
89
- D(() => {
90
- n != null && n.scrollToItem && (c.current = n);
91
- }, [n]), D(() => {
92
- d.current = e, f.current = t;
93
- }, [e, t]);
94
- const C = R(
95
- (_) => {
96
- if (!r)
97
- return;
98
- const m = Math.ceil(_ / 2) * 2 - 1;
99
- if (_ === m + 1) {
100
- const S = {
101
- left: u[m],
102
- top: 0
103
- };
104
- return g.current = S, new Promise(
105
- (p) => Pe(r, S, p)
106
- );
107
- }
108
- const T = {
109
- left: 0,
110
- top: 0
111
- };
112
- return g.current = T, new Promise(
113
- (S) => Pe(r, T, S)
114
- );
115
- },
116
- [r, u, Pe]
117
- );
118
- return D(() => {
119
- d.current = e, f.current = t;
120
- }, [e, t]), D(() => {
121
- h.current = s;
122
- }, [s]), { scrollToPage: R(
123
- (_) => {
124
- const m = _ - 1;
125
- let T = m, S = 0;
126
- if (f.current === Ue.DUAL_PAGE && d.current === X.PAGE_SCROLLING)
127
- return C(_), Promise.resolve();
128
- if (d.current === X.PAGE_SCROLLING)
129
- return a(_), Promise.resolve();
130
- if (!c.current || !o)
131
- return Promise.resolve();
132
- const p = o;
133
- if (v.current = !0, d.current === X.HORIZONTAL_SCROLLING) {
134
- S = m;
135
- const O = {
136
- left: m * (u[m] ?? 0),
137
- top: 0
138
- };
139
- return g.current = O, new Promise(
140
- (y) => Pe(p, O, y)
141
- );
142
- }
143
- if (f.current === Ue.DUAL_PAGE) {
144
- S = m % 2, T = Math.floor(m / 2);
145
- const O = T * (l[T] ?? 0), E = {
146
- left: S * (u[S] ?? 0),
147
- top: O
148
- };
149
- return g.current = E, new Promise((L) => Pe(p, E, L));
150
- }
151
- const b = {
152
- left: 0,
153
- top: T * (l[T] ?? 0)
154
- };
155
- return g.current = b, new Promise((I) => Pe(p, b, I));
156
- },
157
- [
158
- o,
159
- s,
160
- C,
161
- a,
162
- Pe,
163
- l,
164
- u
165
- ]
166
- ) };
167
- }, fo = (t = 1) => {
168
- const [e, n] = G(t), [o, r] = G(0), { scrollToPage: a } = wn(), c = W(1), { isScrolling: s } = et(), { viewMode: u } = Ye(), { scrollMode: l } = ze(), d = wt(e, 100), f = R(
169
- (w) => {
170
- if (!/^[0-9]*$/g.test(w.toString()) || !w)
171
- return { success: !1, currentPage: c.current };
172
- const m = +w;
173
- return m < 0 || m > o ? { success: !1, currentPage: c.current } : (n(m), c.current = m, { success: !0, currentPage: +w });
174
- },
175
- [o]
176
- ), h = R(f, [f]), g = R(
177
- (w) => {
178
- const _ = f(w);
179
- return _.success && (s.current = !0, a(_.currentPage)), _;
180
- },
181
- [f, a]
182
- ), v = R(() => {
183
- let w = e - 1;
184
- g(w);
185
- }, [g, e, u, l]), C = R(() => {
186
- let w = e + 1;
187
- g(w);
188
- }, [g, e, u, l]);
189
- return {
190
- focusedPage: d,
191
- totalPages: o,
192
- setFocusedPage: h,
193
- setTotalPages: r,
194
- nextPage: C,
195
- prevPage: v,
196
- goToPage: g
197
- };
198
- }, bn = je({
199
- focusedPage: 0,
200
- setFocusedPage: (t) => {
201
- },
202
- goToPage: (t) => ({ success: !!t, currentPage: +t }),
203
- totalPages: 0,
204
- setTotalPages: (t) => {
205
- },
206
- prevPage: () => {
207
- },
208
- nextPage: () => {
209
- }
210
- }), ce = () => {
211
- const t = Be(bn);
212
- return typeof (t == null ? void 0 : t.focusedPage) > "u" && $r.error("Please use this hooks inside children component of RPProvider"), t;
213
- }, _s = ({ children: t }) => {
214
- const { pdf: e } = J(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: u } = fo();
215
- return D(() => {
216
- e != null && e.numPages && (a(e.numPages), r(1));
217
- }, [e, a, r]), /* @__PURE__ */ i(
218
- bn.Provider,
219
- {
220
- value: {
221
- focusedPage: n,
222
- totalPages: o,
223
- setFocusedPage: r,
224
- setTotalPages: a,
225
- nextPage: s,
226
- prevPage: u,
227
- goToPage: c
228
- },
229
- children: t
230
- }
231
- );
232
- };
233
- const go = () => {
234
- const { pdf: t, pages: e } = J(), [n, o] = G({
235
- loadedPages: 0,
236
- totalPages: 0,
237
- percentage: 0
238
- }), [r, a] = G(!1), [c, s] = G(!1), [u, l] = G(null), d = W(!1);
239
- D(() => {
240
- d.current;
241
- }, [d]);
242
- const f = R(() => {
243
- document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
244
- const T = document.querySelector(".rp-print-zone");
245
- T && T.remove();
246
- }, []), h = R(() => {
247
- d.current = !1, a(!1), s(!1), l(null), o({
248
- loadedPages: 0,
249
- totalPages: 0,
250
- percentage: 0
251
- });
252
- }, []), g = () => {
253
- d.current = !0;
254
- }, v = async ({
255
- scratchCanvas: T,
256
- pdfDocument: S,
257
- pageNumber: p,
258
- viewerPdfPage: P,
259
- printResolution: b,
260
- optionalContentConfigPromise: I,
261
- printAnnotationStoragePromise: O
262
- }) => {
263
- if (d.current) {
264
- h();
265
- return;
266
- }
267
- const y = b / fr.PDF;
268
- T.width = Math.floor(P.width * y), T.height = Math.floor(P.height * y);
269
- const E = T.getContext("2d");
270
- E.save(), E.fillStyle = "rgb(255, 255, 255)", E.fillRect(0, 0, T.width, T.height), E.restore();
271
- const [L, F] = await Promise.all([
272
- S.getPage(p),
273
- O
274
- ]);
275
- if (d.current) {
276
- h();
277
- return;
278
- }
279
- const A = {
280
- canvasContext: E,
281
- transform: [y, 0, 0, y, 0, 0],
282
- viewport: L.getViewport({ scale: 1, rotation: P.rotation }),
283
- intent: "print",
284
- annotationMode: gr.ENABLE_STORAGE,
285
- optionalContentConfigPromise: I,
286
- printAnnotationStorage: F
287
- };
288
- try {
289
- return L.render(A).promise;
290
- } catch (x) {
291
- throw x instanceof vr || console.error(x), x;
292
- }
293
- }, C = R(() => {
294
- const T = window.print;
295
- return new Promise((S) => {
296
- const p = (I) => {
297
- setTimeout(() => {
298
- T.call(window), setTimeout(() => I(), 20);
299
- }, 0);
300
- };
301
- if (document.querySelector(".rp-print-zone")) {
302
- p(S);
303
- return;
304
- }
305
- const b = new MutationObserver(() => {
306
- document.querySelector(".rp-print-zone") && (p(S), b.disconnect());
307
- });
308
- b.observe(document.body, { childList: !0, subtree: !0 });
309
- });
310
- }, []), w = async (T) => {
311
- const S = document.createElement("img"), p = document.createElement("div");
312
- return p.classList.add("rp-print-page"), await new Promise((P, b) => {
313
- T.toBlob((I) => {
314
- I ? (S.src = URL.createObjectURL(I), S.onload = () => {
315
- URL.revokeObjectURL(S.src), P();
316
- }, S.onerror = b) : b(new Error("Failed to create blob"));
317
- });
318
- }).catch(() => {
319
- }), p.appendChild(S), p;
320
- }, _ = (T, S) => {
321
- const p = document.createElement("div");
322
- p.classList.add("rp-print-zone");
323
- const P = document.createElement("style"), b = S.get(1);
324
- if (b) {
325
- const { width: I, height: O } = b == null ? void 0 : b.page.getViewport({ scale: 1 });
326
- P.innerHTML = `@page { size: ${I}px ${O}px }`;
327
- }
328
- return p.appendChild(P), p.append(...T), p;
329
- }, m = R(async () => {
330
- if (!t)
331
- return;
332
- h();
333
- const T = document.createElement("canvas"), S = [];
334
- try {
335
- t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
336
- const P = t.getOptionalContentConfig({ intent: "print" }), b = Promise.resolve(
337
- t.annotationStorage.print ?? void 0
338
- ), I = e.size;
339
- for (const [y, E] of e) {
340
- if (d.current) {
341
- h();
342
- return;
343
- }
344
- const L = E.page.getViewport({ scale: 1 });
345
- if (await v({
346
- scratchCanvas: T,
347
- pdfDocument: t,
348
- pageNumber: y,
349
- viewerPdfPage: L,
350
- printResolution: 150,
351
- optionalContentConfigPromise: P,
352
- printAnnotationStoragePromise: b
353
- }), d.current) {
354
- h();
355
- return;
356
- }
357
- const F = await w(T);
358
- S.push(F);
359
- const A = parseFloat((S.length / I * 100).toFixed(2));
360
- o({
361
- loadedPages: y,
362
- totalPages: I,
363
- percentage: A
364
- });
365
- }
366
- if (d.current) {
367
- h();
368
- return;
369
- }
370
- const O = _(S, e);
371
- document.body.appendChild(O), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await C();
372
- } catch (p) {
373
- s(!0), p instanceof Error && l(p);
374
- } finally {
375
- T.height = 0, T.width = 0;
376
- }
377
- }, [t, e, d]);
378
- return D(() => {
379
- const T = () => {
380
- h(), f();
381
- };
382
- return window.addEventListener("afterprint", T, !0), () => {
383
- window.removeEventListener("afterprint", T, !0);
384
- };
385
- }, [f, h]), {
386
- print: m,
387
- cancel: g,
388
- progress: n,
389
- isComplete: r,
390
- isError: c,
391
- error: u
392
- };
393
- }, Cn = je({
394
- print: () => {
395
- },
396
- cancel: () => {
397
- },
398
- setOnProgress: (t) => {
399
- },
400
- progress: {},
401
- setOnComplete: (t) => t(),
402
- setOnError: (t) => {
403
- try {
404
- const e = new Error("Print error occurred");
405
- t(e);
406
- } catch (e) {
407
- console.error("Error in setOnError callback:", e);
408
- }
409
- }
410
- }), ws = ({ children: t }) => {
411
- const [e, n] = G(null), [o, r] = G(null), { print: a, cancel: c, progress: s, isComplete: u, isError: l, error: d } = go(), f = R((w) => {
412
- w && typeof w == "function" && r(() => w);
413
- }, []), h = (w) => {
414
- d && w(d);
415
- }, g = R(
416
- (w) => {
417
- n(() => w);
418
- },
419
- [s, e]
420
- );
421
- D(() => {
422
- u && o && v();
423
- }, [u, o]), D(() => {
424
- l && h((w) => {
425
- console.error(w);
426
- });
427
- }, [l]), D(() => {
428
- s && e && e(s);
429
- }, [s, e]);
430
- const v = () => {
431
- o && (o(), r(null));
432
- }, C = {
433
- print: a,
434
- cancel: c,
435
- setOnProgress: g,
436
- setOnComplete: f,
437
- setOnError: h,
438
- progress: s
439
- };
440
- return /* @__PURE__ */ i(Cn.Provider, { value: C, children: t });
441
- }, tt = () => {
442
- const t = Be(Cn);
443
- if (!t)
444
- throw new Error("usePrintContext must be used within a PrintProvider");
445
- return t;
446
- }, vo = () => {
447
- const [t, e] = G({}), { pages: n } = J(), { rotate: o } = Xe(), r = k(() => Object.keys(t).length, [t]), a = R(
448
- (s) => {
449
- if (!n.size)
450
- return;
451
- const u = Array.from(n.values()).slice(0, s).map((f) => {
452
- const { thumbnailViewport: h, scale: g } = Wt(f.page, o);
453
- return {
454
- scale: g,
455
- page: f.page,
456
- loading: !0,
457
- viewport: h
458
- };
459
- }), l = u.reduce((f, h) => (f[h.page.pageNumber] = h, f), {});
460
- e(l);
461
- const d = [];
462
- for (const f of u) {
463
- const h = document.createElement("canvas"), g = _t(f.page, h, {
464
- scale: f.scale,
465
- rotate: o
466
- }).promise.then(() => {
467
- const v = h.toDataURL();
468
- return {
469
- ...f,
470
- thumbnailSrc: v,
471
- loading: !1
472
- };
473
- });
474
- d.push(g);
475
- }
476
- Promise.all(d).then((f) => {
477
- const h = f.reduce(
478
- (g, v) => (g[v.page.pageNumber] = v, g),
479
- {}
480
- );
481
- e((g) => ({ ...g, ...h }));
482
- }).catch(() => {
483
- });
484
- },
485
- [n, o]
486
- );
487
- D(() => {
488
- a(10);
489
- }, [a]);
490
- const c = R(
491
- (s) => {
492
- if (!n)
493
- return;
494
- const u = n.get(s);
495
- if (!u)
496
- return;
497
- e((d) => ({
498
- ...d,
499
- [s]: {
500
- loading: !0,
501
- page: u.page,
502
- viewport: u.thumbnailViewport,
503
- scale: u.thumbnailScale
504
- }
505
- }));
506
- const l = document.createElement("canvas");
507
- _t(u.page, l, { scale: u.thumbnailScale, rotate: o }).promise.then(() => {
508
- const d = l.toDataURL(), { thumbnailViewport: f, scale: h } = Wt(u.page, o);
509
- return {
510
- scale: h,
511
- thumbnailSrc: d,
512
- page: u.page,
513
- loading: !1,
514
- viewport: f
515
- };
516
- }).then((d) => {
517
- e((f) => ({ ...f, [s]: d }));
518
- });
519
- },
520
- [n, o]
521
- );
522
- return { thumbnailPages: t, addPage: c, addToPage: a, thumbnailLength: r };
523
- }, Tn = je({
524
- thumbnailPages: {},
525
- addPage: (t) => {
526
- },
527
- addToPage: (t) => {
528
- },
529
- thumbnailLength: 0,
530
- setActive: (t) => {
531
- },
532
- active: !1
533
- }), Pn = () => Be(Tn), bs = ({
534
- children: t,
535
- initialThumbnailsVisible: e
536
- }) => {
537
- const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = vo(), [c, s] = G(e);
538
- return /* @__PURE__ */ i(
539
- Tn.Provider,
540
- {
541
- value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: c, setActive: s },
542
- children: t
543
- }
544
- );
545
- }, _o = (t = {}, e = "") => {
546
- const [n, o] = G(e), [r, a] = G(!1), { pdf: c, pages: s } = J(), u = St(), l = W(!n), { currentZoom: d } = Je(), [f, h] = G([]), { setFocusedPage: g } = ce(), [v, C] = G(0), { pageScrollElementRef: w, virtualScrollableElementRef: _ } = Qe(), { scrollMode: m } = ze(), { pagesRef: T } = ye(), [S, p] = G(null), P = W({}), b = k(() => v === 0 ? null : f[v - 1], [v, f]), I = k(() => f.length, [f]);
547
- D(() => {
548
- if (!b || !s)
549
- return;
550
- const L = _ || w;
551
- if (!L || !T)
552
- return;
553
- const F = s.get(b.page), A = T.clientHeight / 2, x = T.clientWidth / 2;
554
- let N = 0, $ = 0;
555
- m === X.PAGE_SCROLLING && g(b.page), m === X.VERTICAL_SCROLLING && (N = u.heights.slice(0, b.page - 1).reduce((j, ee) => j + ee, 0)), m === X.HORIZONTAL_SCROLLING && ($ = u.widths.slice(0, b.page - 1).reduce((j, ee) => j + ee, 0));
556
- let V;
557
- if (!F)
558
- return;
559
- const Z = P.current[b.page], Q = F.page.getViewport({ scale: 1 });
560
- V = new Pt.TextLayer({
561
- viewport: Q,
562
- textContentSource: Z,
563
- container: document.createElement("div")
564
- }), V.render().then(() => {
565
- const j = V.textDivs[b.start.idx], [ee] = un([b], Z, V.textDivs), he = u.widths[b.page - 1], me = u.heights[b.page - 1], B = document.createElement("div"), K = document.createElement("div");
566
- j.style.position = "absolute", j.style.color = "transparent", K.style.position = "absolute", K.style.top = "0", K.style.setProperty("--scale-factor", `${d}`), B.style.position = "relative", B.style.width = `${he}px`, B.style.height = `${me}px`, B.style.zIndex = "-1", B.appendChild(j), K.appendChild(B), T.prepend(K);
567
- const te = ee.element.getBoundingClientRect(), fe = K.getBoundingClientRect(), Le = te.top - fe.top, be = te.left - fe.left, ge = N + Le - A + te.height / 2, ne = $ + be - x + te.width / 2, Ne = {
568
- left: Math.max(ne, 0),
569
- top: Math.max(ge, 0)
570
- };
571
- T.removeChild(K), L.scrollTo({
572
- ...Ne
573
- });
574
- });
575
- }, [
576
- s,
577
- g,
578
- u,
579
- b,
580
- m,
581
- _,
582
- w,
583
- T
584
- ]);
585
- const O = R(() => {
586
- C((L) => I ? L + 1 > I ? 1 : L + 1 : 0);
587
- }, [I]), y = R(() => {
588
- C((L) => I ? L - 1 <= 0 ? I : L - 1 : 0);
589
- }, [I]), E = R(async (L) => {
590
- if (!L)
591
- return {};
592
- const F = L.numPages, A = {};
593
- for (let x = 1; x <= F; x++) {
594
- if (l.current)
595
- throw "close pop over";
596
- const N = await L.getPage(x);
597
- A[x.toString()] = await N.getTextContent();
598
- }
599
- return A;
600
- }, []);
601
- return D(() => {
602
- if (!n) {
603
- l.current = !0, h([]), C(0);
604
- return;
605
- }
606
- l.current = !1, a(!0), h([]), C(0), E(c).then((L) => {
607
- P.current = L;
608
- const A = Object.keys(L).reduce((x, N) => {
609
- const $ = hr(
610
- [n],
611
- L[N],
612
- Number(N) - 1,
613
- t
614
- ).map((V, Z) => ({ ...V, page: Number(N), pageMatchIdx: Z }));
615
- return [...x, ...$];
616
- }, []);
617
- h(A), C(A.length ? 1 : 0);
618
- }).catch(() => {
619
- h([]), C(0);
620
- }).finally(() => a(!1));
621
- }, [n, E, c, t]), {
622
- search: n,
623
- setSearch: o,
624
- loading: r,
625
- matches: f,
626
- totalMatches: I,
627
- currentMatchPosition: v,
628
- currentMatch: b,
629
- nextMatch: O,
630
- prevMatch: y,
631
- currentMatchElement: S,
632
- setCurrentMatchElement: p
633
- };
634
- }, Sn = je({
635
- search: "",
636
- setSearch: (t) => {
637
- },
638
- loading: !1,
639
- matches: [],
640
- totalMatches: 0,
641
- currentMatchPosition: 0,
642
- currentMatch: null,
643
- nextMatch: () => {
644
- },
645
- prevMatch: () => {
646
- },
647
- searchOptions: {},
648
- setSearchOptions: (t) => t,
649
- currentMatchElement: null,
650
- setCurrentMatchElement: (t) => {
651
- }
652
- }), Cs = ({
653
- children: t,
654
- initialSearch: e
655
- }) => {
656
- const [n, o] = G({}), {
657
- loading: r,
658
- setSearch: a,
659
- totalMatches: c,
660
- currentMatchPosition: s,
661
- currentMatch: u,
662
- search: l,
663
- matches: d,
664
- nextMatch: f,
665
- prevMatch: h,
666
- currentMatchElement: g,
667
- setCurrentMatchElement: v
668
- } = _o(n, e);
669
- return /* @__PURE__ */ i(
670
- Sn.Provider,
671
- {
672
- value: {
673
- searchOptions: n,
674
- setSearchOptions: o,
675
- loading: r,
676
- setSearch: a,
677
- totalMatches: c,
678
- currentMatchPosition: s,
679
- currentMatch: u,
680
- nextMatch: f,
681
- prevMatch: h,
682
- search: l,
683
- matches: d,
684
- currentMatchElement: g,
685
- setCurrentMatchElement: v
686
- },
687
- children: t
688
- }
689
- );
690
- }, In = () => Be(Sn), ue = {
691
- "rp-pages": "_rp-pages_1776r_1",
692
- "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
693
- "rp-pages-container": "_rp-pages-container_1776r_11",
694
- "rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_1776r_17",
695
- "rp-viewer": "_rp-viewer_1776r_22",
696
- "rp-cursor-grab": "_rp-cursor-grab_1776r_27",
697
- "rp-cursor-grabbing": "_rp-cursor-grabbing_1776r_35",
698
- "rp-loader": "_rp-loader_1776r_43"
699
- }, ct = {
700
- "rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
701
- "rp-page": "_rp-page_h7a2q_1",
702
- "rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
703
- }, wo = (t) => {
704
- const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = W(null), { pages: a } = J(), { rotate: c } = Xe(), s = W(), { currentZoom: u } = Je();
705
- return D(() => {
706
- if (!a || u === 0)
707
- return;
708
- const l = a.get(e);
709
- if (r.current && l) {
710
- const d = r.current;
711
- d.hidden = !0;
712
- const f = s.current;
713
- f && f.cancel(), o && o(), s.current = _t(l.page, d, {
714
- scale: u,
715
- rotate: c,
716
- renderForms: !0
717
- }), s.current.promise.then(() => {
718
- d.hidden = !1;
719
- }).catch(() => {
720
- }).finally(() => {
721
- n && n();
722
- });
723
- }
724
- return () => {
725
- var d;
726
- (d = s.current) == null || d.cancel();
727
- };
728
- }, [a, e, c, u, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
729
- }, lt = {
730
- "rp-text-layer": "_rp-text-layer_kwwfn_1",
731
- "rp-text-layer-text": "_rp-text-layer-text_kwwfn_9"
732
- }, bo = (t) => {
733
- const { pageNumber: e } = t, { pages: n } = J(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = In(), [s, u] = G(
734
- []
735
- ), l = W(), d = W(), f = W(), h = k(() => r.filter((v) => v.pageIndex === e - 1), [r, e]), g = R(
736
- (v, C, w = !1) => {
737
- if (w && dn(v, C), !h.length) {
738
- f.current = void 0, u([]);
739
- return;
740
- }
741
- const _ = un(h, v, C);
742
- u(_);
743
- },
744
- [h]
745
- );
746
- return D(() => {
747
- var w;
748
- if ((w = f.current) == null || w.classList.remove("selected"), !s.length || !a || a.pageIndex !== e - 1)
749
- return;
750
- const v = h.findIndex(
751
- (_) => JSON.stringify(_) === JSON.stringify(a)
752
- );
753
- if (v === -1)
754
- return;
755
- const C = s.find((_) => _.index === v);
756
- C && (f.current = C.element, c(C.element), C.element.classList.add("selected"));
757
- }, [a, s, h]), D(() => {
758
- const v = n.get(e);
759
- if (!v || !o.current)
760
- return;
761
- const C = o.current;
762
- return l.current && l.current.cancel(), v.page.getTextContent().then((w) => {
763
- const _ = v.page.getViewport({ scale: 1 });
764
- return l.current = new Pt.TextLayer({
765
- viewport: _,
766
- textContentSource: w,
767
- container: C
768
- }), d.current = w, C && (C.innerText = ""), l.current.render();
769
- }).then(() => {
770
- var m;
771
- [].slice.call(C.children).forEach((T) => {
772
- T.classList.add(lt["rp-text-layer-text"]);
773
- });
774
- const _ = (m = l.current) == null ? void 0 : m.textDivs;
775
- _ && d.current && g(d.current, _);
776
- }).catch(() => {
777
- }), () => {
778
- var w;
779
- (w = l.current) == null || w.cancel();
780
- };
781
- }, [n, e]), D(() => {
782
- var w;
783
- [].slice.call(o.current.children).forEach((_) => {
784
- _.classList.add(lt["rp-text-layer-text"]);
785
- });
786
- const C = (w = l.current) == null ? void 0 : w.textDivs;
787
- C && d.current && g(d.current, C, !0);
788
- }, [g]), /* @__PURE__ */ i(
789
- "div",
790
- {
791
- "data-rp": `page-${e}-textLayer`,
792
- className: lt["rp-text-layer"],
793
- ref: o
794
- }
795
- );
796
- }, Co = {
797
- "rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
798
- };
799
- let To = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
800
- const Po = (t) => {
801
- const { pageNumber: e } = t, n = W(null), { pages: o, pdf: r } = J(), a = W(), [c, s] = G(), { setFocusedPage: u, goToPage: l } = ce(), { scrollMode: d } = ze(), { print: f } = tt(), { download: h } = Vn(), g = k(() => o.get(e), [o, e]), v = k(() => g == null ? void 0 : g.page.getViewport(), [g]);
802
- D(() => {
803
- a.current && (a.current.div.replaceChildren(), a.current = void 0);
804
- }, [r]), D(() => {
805
- g && g.page.getAnnotations().then((w) => {
806
- a.current = void 0, s(w), n.current && (n.current.innerText = "");
807
- });
808
- }, [g]);
809
- const C = R(
810
- (w) => {
811
- !c || !r || (Nr(w), Er(w, r, c).then((_) => {
812
- var m, T;
813
- ((m = _ == null ? void 0 : _.data) == null ? void 0 : m.action) === "Print" ? f() : ((T = _ == null ? void 0 : _.data) == null ? void 0 : T.action) === "SaveAs" && h();
814
- }), d === X.PAGE_SCROLLING ? kt(w, c, r, (_) => u(_.pageIndex + 1)) : kt(w, c, r, (_) => l(_.pageIndex + 1)));
815
- },
816
- [r, c, l, u, d, f, h]
817
- );
818
- return D(() => {
819
- if (!g || !c)
820
- return;
821
- const w = g.page.getViewport();
822
- if (a.current) {
823
- a.current.update({
824
- viewport: w.clone({ dontFlip: !0 })
825
- });
826
- return;
827
- }
828
- const _ = /* @__PURE__ */ new Map([]);
829
- for (const S of c) {
830
- const { annotationType: p } = S;
831
- switch (p) {
832
- case Ft.Link:
833
- Dr(S);
834
- break;
835
- case Ft.Widget:
836
- Or(S, w, _);
837
- break;
838
- }
839
- }
840
- const m = new AbortController();
841
- return (async () => {
842
- a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new _r({
843
- div: n.current,
844
- accessibilityManager: void 0,
845
- annotationCanvasMap: void 0,
846
- annotationEditorUIManager: void 0,
847
- structTreeLayer: null,
848
- page: g.page,
849
- viewport: w.clone({ dontFlip: !0 })
850
- }), n.current && Mt(n.current, C);
851
- const S = await (r == null ? void 0 : r.hasJSActions()), p = await (r == null ? void 0 : r.getFieldObjects());
852
- if (m.signal.aborted)
853
- throw "abort";
854
- return a.current.render({
855
- annotations: c,
856
- annotationStorage: r == null ? void 0 : r.annotationStorage,
857
- hasJSActions: S,
858
- fieldObjects: p,
859
- div: n.current,
860
- viewport: w.clone({ dontFlip: !0 }),
861
- page: g.page,
862
- imageResourcesPath: To,
863
- renderForms: !0,
864
- linkService: new Lr(),
865
- downloadManager: null,
866
- enableScripting: !1
867
- });
868
- })().then(() => {
869
- n.current && zr(n.current, C);
870
- }).catch((S) => {
871
- if (S !== "abort")
872
- throw S;
873
- }), () => {
874
- m.abort("clear"), n.current && Mt(n.current, C);
875
- };
876
- }, [r, c, C]), /* @__PURE__ */ i(
877
- "div",
878
- {
879
- "data-rp": `page-${e}-annotationLayer`,
880
- style: { width: `${v == null ? void 0 : v.width}px`, height: `${v == null ? void 0 : v.height}px` },
881
- className: Co["rp-annotation-layer"],
882
- ref: n
883
- }
884
- );
885
- }, ut = {
886
- "rp-text-highlight-layer": "_rp-text-highlight-layer_1470i_1",
887
- "rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1470i_9"
888
- }, So = ({ pageNumber: t }) => {
889
- const e = W(null), n = W(), o = W(), { pages: r } = J(), { highlightMatches: a } = wr(), c = k(() => a.filter((l) => l.pageIndex === t - 1), [a]), s = R(
890
- (u, l, d = !1) => {
891
- d && dn(u, l), mr(c, u, l);
892
- },
893
- [c, r, t]
894
- );
895
- return D(() => {
896
- const u = r.get(t);
897
- if (!u || !e.current)
898
- return;
899
- const l = e.current;
900
- return n.current && n.current.cancel(), u.page.getTextContent().then((d) => {
901
- const f = u.page.getViewport({ scale: 1 });
902
- return n.current = new Pt.TextLayer({
903
- viewport: f,
904
- textContentSource: d,
905
- container: l
906
- }), o.current = d, l && (l.innerText = ""), n.current.render();
907
- }).then(() => {
908
- var h;
909
- [].slice.call(l.children).forEach((g) => {
910
- g.classList.add(ut["rp-text-highlight-layer-text"]);
911
- });
912
- const f = (h = n.current) == null ? void 0 : h.textDivs;
913
- f && o.current && s(o.current, f);
914
- }).catch(() => {
915
- }), () => {
916
- var d;
917
- (d = n.current) == null || d.cancel();
918
- };
919
- }, [r, t]), D(() => {
920
- var d;
921
- [].slice.call(e.current.children).forEach((f) => {
922
- f.classList.add(ut["rp-text-highlight-layer-text"]);
923
- });
924
- const l = (d = n.current) == null ? void 0 : d.textDivs;
925
- l && o.current && s(o.current, l, !0);
926
- }, [s]), /* @__PURE__ */ i(Ie, { children: /* @__PURE__ */ i(
927
- "div",
928
- {
929
- "data-rp": `page-${t}-textHighlightLayer`,
930
- className: ut["rp-text-highlight-layer"],
931
- ref: e
932
- }
933
- ) });
934
- }, Io = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))), Lt = Ke((t, e) => {
935
- const { pageNumber: n, style: o, onIntersectRatioChange: r, ...a } = t, { pages: c } = J(), { rotate: s } = Xe(), { textLayer: u } = lr(), { currentZoom: l } = Je(), d = W(c.get(n)), [f, h] = G(!1), g = W(null), [v, C] = G({
936
- width: 0,
937
- height: 0
938
- });
939
- sn(e, () => g.current), D(() => {
940
- if (c && (d.current = c.get(n), d.current)) {
941
- const T = d.current.page.getViewport({ scale: l, rotation: s });
942
- C(T);
943
- }
944
- }, [c, n, s, l]);
945
- const w = k(() => {
946
- switch (s) {
947
- case 90:
948
- return `${v.width / 2}px ${v.width / 2}px`;
949
- case -90:
950
- case 270:
951
- return `${v.height / 2}px ${v.height / 2}px`;
952
- default:
953
- return "center";
954
- }
955
- }, [s, v]), _ = R(() => {
956
- h(!0);
957
- }, []), m = R(() => {
958
- h(!1);
959
- }, []);
960
- return D(() => {
961
- const T = new IntersectionObserver(
962
- (S) => {
963
- r(n, S[0].intersectionRatio);
964
- },
965
- { threshold: Io }
966
- );
967
- return g.current && T.observe(g.current), () => {
968
- T.disconnect(), r(n, -1);
969
- };
970
- }, [r, n, s, v]), /* @__PURE__ */ i(
971
- "div",
972
- {
973
- ref: g,
974
- id: `page-${n}`,
975
- "data-rp": `page-${n}`,
976
- ...a,
977
- style: {
978
- ...o,
979
- "--rp-rotate": `${s}deg`,
980
- "--rp-page-rotate-translate": `${w}`,
981
- "--scale-factor": l
982
- },
983
- className: ct["rp-page-wrapper"],
984
- children: /* @__PURE__ */ z(
985
- "div",
986
- {
987
- style: {
988
- width: `${v.width}px`,
989
- height: `${v.height}px`
990
- },
991
- className: ct["rp-page"],
992
- children: [
993
- /* @__PURE__ */ i(wo, { onLoading: _, onLoaded: m, pageNumber: n }),
994
- f && /* @__PURE__ */ i("div", { className: ct["rp-loader-wrapper"], children: /* @__PURE__ */ i(It, {}) }),
995
- u && /* @__PURE__ */ i(bo, { pageNumber: n }),
996
- /* @__PURE__ */ i(So, { pageNumber: n }),
997
- /* @__PURE__ */ i(Po, { pageNumber: n })
998
- ]
999
- }
1000
- )
1001
- }
1002
- );
1003
- });
1004
- function Ut(t) {
1005
- if (t === void 0)
1006
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1007
- return t;
1008
- }
1009
- function bt(t, e) {
1010
- return bt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
1011
- return n.__proto__ = o, n;
1012
- }, bt(t, e);
1013
- }
1014
- function xo(t, e) {
1015
- t.prototype = Object.create(e.prototype), t.prototype.constructor = t, bt(t, e);
1016
- }
1017
- var qt = Number.isNaN || function(e) {
1018
- return typeof e == "number" && e !== e;
1019
- };
1020
- function yo(t, e) {
1021
- return !!(t === e || qt(t) && qt(e));
1022
- }
1023
- function Ro(t, e) {
1024
- if (t.length !== e.length)
1025
- return !1;
1026
- for (var n = 0; n < t.length; n++)
1027
- if (!yo(t[n], e[n]))
1028
- return !1;
1029
- return !0;
1030
- }
1031
- function dt(t, e) {
1032
- e === void 0 && (e = Ro);
1033
- var n, o = [], r, a = !1;
1034
- function c() {
1035
- for (var s = [], u = 0; u < arguments.length; u++)
1036
- s[u] = arguments[u];
1037
- return a && n === this && e(s, o) || (r = t.apply(this, s), a = !0, n = this, o = s), r;
1038
- }
1039
- return c;
1040
- }
1041
- function Zt(t, e) {
1042
- if (t == null)
1043
- return {};
1044
- var n = {};
1045
- for (var o in t)
1046
- if ({}.hasOwnProperty.call(t, o)) {
1047
- if (e.indexOf(o) !== -1)
1048
- continue;
1049
- n[o] = t[o];
1050
- }
1051
- return n;
1052
- }
1053
- var Lo = typeof performance == "object" && typeof performance.now == "function", jt = Lo ? function() {
1054
- return performance.now();
1055
- } : function() {
1056
- return Date.now();
1057
- };
1058
- function Bt(t) {
1059
- cancelAnimationFrame(t.id);
1060
- }
1061
- function No(t, e) {
1062
- var n = jt();
1063
- function o() {
1064
- jt() - n >= e ? t.call(null) : r.id = requestAnimationFrame(o);
1065
- }
1066
- var r = {
1067
- id: requestAnimationFrame(o)
1068
- };
1069
- return r;
1070
- }
1071
- var pt = -1;
1072
- function Eo(t) {
1073
- if (t === void 0 && (t = !1), pt === -1 || t) {
1074
- var e = document.createElement("div"), n = e.style;
1075
- n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), pt = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
1076
- }
1077
- return pt;
1078
- }
1079
- var Ee = null;
1080
- function Kt(t) {
1081
- if (t === void 0 && (t = !1), Ee === null || t) {
1082
- var e = document.createElement("div"), n = e.style;
1083
- n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
1084
- var o = document.createElement("div"), r = o.style;
1085
- return r.width = "100px", r.height = "100px", e.appendChild(o), document.body.appendChild(e), e.scrollLeft > 0 ? Ee = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? Ee = "negative" : Ee = "positive-ascending"), document.body.removeChild(e), Ee;
1086
- }
1087
- return Ee;
1088
- }
1089
- var Oo = 150, Do = function(e) {
1090
- var n = e.columnIndex;
1091
- e.data;
1092
- var o = e.rowIndex;
1093
- return o + ":" + n;
1094
- }, $e = null, Ge = null, Ve = null;
1095
- process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && ($e = /* @__PURE__ */ new WeakSet(), Ge = /* @__PURE__ */ new WeakSet(), Ve = /* @__PURE__ */ new WeakSet());
1096
- function zo(t) {
1097
- var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, c = t.getEstimatedTotalHeight, s = t.getEstimatedTotalWidth, u = t.getOffsetForColumnAndAlignment, l = t.getOffsetForRowAndAlignment, d = t.getRowHeight, f = t.getRowOffset, h = t.getRowStartIndexForOffset, g = t.getRowStopIndexForStartIndex, v = t.initInstanceProps, C = t.shouldResetStyleCacheOnItemSizeChange, w = t.validateProps;
1098
- return e = /* @__PURE__ */ function(_) {
1099
- xo(m, _);
1100
- function m(S) {
1101
- var p;
1102
- return p = _.call(this, S) || this, p._instanceProps = v(p.props, Ut(p)), p._resetIsScrollingTimeoutId = null, p._outerRef = void 0, p.state = {
1103
- instance: Ut(p),
1104
- isScrolling: !1,
1105
- horizontalScrollDirection: "forward",
1106
- scrollLeft: typeof p.props.initialScrollLeft == "number" ? p.props.initialScrollLeft : 0,
1107
- scrollTop: typeof p.props.initialScrollTop == "number" ? p.props.initialScrollTop : 0,
1108
- scrollUpdateWasRequested: !1,
1109
- verticalScrollDirection: "forward"
1110
- }, p._callOnItemsRendered = void 0, p._callOnItemsRendered = dt(function(P, b, I, O, y, E, L, F) {
1111
- return p.props.onItemsRendered({
1112
- overscanColumnStartIndex: P,
1113
- overscanColumnStopIndex: b,
1114
- overscanRowStartIndex: I,
1115
- overscanRowStopIndex: O,
1116
- visibleColumnStartIndex: y,
1117
- visibleColumnStopIndex: E,
1118
- visibleRowStartIndex: L,
1119
- visibleRowStopIndex: F
1120
- });
1121
- }), p._callOnScroll = void 0, p._callOnScroll = dt(function(P, b, I, O, y) {
1122
- return p.props.onScroll({
1123
- horizontalScrollDirection: I,
1124
- scrollLeft: P,
1125
- scrollTop: b,
1126
- verticalScrollDirection: O,
1127
- scrollUpdateWasRequested: y
1128
- });
1129
- }), p._getItemStyle = void 0, p._getItemStyle = function(P, b) {
1130
- var I = p.props, O = I.columnWidth, y = I.direction, E = I.rowHeight, L = p._getItemStyleCache(C && O, C && y, C && E), F = P + ":" + b, A;
1131
- if (L.hasOwnProperty(F))
1132
- A = L[F];
1133
- else {
1134
- var x = n(p.props, b, p._instanceProps), N = y === "rtl";
1135
- L[F] = A = {
1136
- position: "absolute",
1137
- left: N ? void 0 : x,
1138
- right: N ? x : void 0,
1139
- top: f(p.props, P, p._instanceProps),
1140
- height: d(p.props, P, p._instanceProps),
1141
- width: a(p.props, b, p._instanceProps)
1142
- };
1143
- }
1144
- return A;
1145
- }, p._getItemStyleCache = void 0, p._getItemStyleCache = dt(function(P, b, I) {
1146
- return {};
1147
- }), p._onScroll = function(P) {
1148
- var b = P.currentTarget, I = b.clientHeight, O = b.clientWidth, y = b.scrollLeft, E = b.scrollTop, L = b.scrollHeight, F = b.scrollWidth;
1149
- p.setState(function(A) {
1150
- if (A.scrollLeft === y && A.scrollTop === E)
1151
- return null;
1152
- var x = p.props.direction, N = y;
1153
- if (x === "rtl")
1154
- switch (Kt()) {
1155
- case "negative":
1156
- N = -y;
1157
- break;
1158
- case "positive-descending":
1159
- N = F - O - y;
1160
- break;
1161
- }
1162
- N = Math.max(0, Math.min(N, F - O));
1163
- var $ = Math.max(0, Math.min(E, L - I));
1164
- return {
1165
- isScrolling: !0,
1166
- horizontalScrollDirection: A.scrollLeft < y ? "forward" : "backward",
1167
- scrollLeft: N,
1168
- scrollTop: $,
1169
- verticalScrollDirection: A.scrollTop < E ? "forward" : "backward",
1170
- scrollUpdateWasRequested: !1
1171
- };
1172
- }, p._resetIsScrollingDebounced);
1173
- }, p._outerRefSetter = function(P) {
1174
- var b = p.props.outerRef;
1175
- p._outerRef = P, typeof b == "function" ? b(P) : b != null && typeof b == "object" && b.hasOwnProperty("current") && (b.current = P);
1176
- }, p._resetIsScrollingDebounced = function() {
1177
- p._resetIsScrollingTimeoutId !== null && Bt(p._resetIsScrollingTimeoutId), p._resetIsScrollingTimeoutId = No(p._resetIsScrolling, Oo);
1178
- }, p._resetIsScrolling = function() {
1179
- p._resetIsScrollingTimeoutId = null, p.setState({
1180
- isScrolling: !1
1181
- }, function() {
1182
- p._getItemStyleCache(-1);
1183
- });
1184
- }, p;
1185
- }
1186
- m.getDerivedStateFromProps = function(p, P) {
1187
- return Ao(p, P), w(p), null;
1188
- };
1189
- var T = m.prototype;
1190
- return T.scrollTo = function(p) {
1191
- var P = p.scrollLeft, b = p.scrollTop;
1192
- P !== void 0 && (P = Math.max(0, P)), b !== void 0 && (b = Math.max(0, b)), this.setState(function(I) {
1193
- return P === void 0 && (P = I.scrollLeft), b === void 0 && (b = I.scrollTop), I.scrollLeft === P && I.scrollTop === b ? null : {
1194
- horizontalScrollDirection: I.scrollLeft < P ? "forward" : "backward",
1195
- scrollLeft: P,
1196
- scrollTop: b,
1197
- scrollUpdateWasRequested: !0,
1198
- verticalScrollDirection: I.scrollTop < b ? "forward" : "backward"
1199
- };
1200
- }, this._resetIsScrollingDebounced);
1201
- }, T.scrollToItem = function(p) {
1202
- var P = p.align, b = P === void 0 ? "auto" : P, I = p.columnIndex, O = p.rowIndex, y = this.props, E = y.columnCount, L = y.height, F = y.rowCount, A = y.width, x = this.state, N = x.scrollLeft, $ = x.scrollTop, V = Eo();
1203
- I !== void 0 && (I = Math.max(0, Math.min(I, E - 1))), O !== void 0 && (O = Math.max(0, Math.min(O, F - 1)));
1204
- var Z = c(this.props, this._instanceProps), Q = s(this.props, this._instanceProps), j = Q > A ? V : 0, ee = Z > L ? V : 0;
1205
- this.scrollTo({
1206
- scrollLeft: I !== void 0 ? u(this.props, I, b, N, this._instanceProps, ee) : N,
1207
- scrollTop: O !== void 0 ? l(this.props, O, b, $, this._instanceProps, j) : $
1208
- });
1209
- }, T.componentDidMount = function() {
1210
- var p = this.props, P = p.initialScrollLeft, b = p.initialScrollTop;
1211
- if (this._outerRef != null) {
1212
- var I = this._outerRef;
1213
- typeof P == "number" && (I.scrollLeft = P), typeof b == "number" && (I.scrollTop = b);
1214
- }
1215
- this._callPropsCallbacks();
1216
- }, T.componentDidUpdate = function() {
1217
- var p = this.props.direction, P = this.state, b = P.scrollLeft, I = P.scrollTop, O = P.scrollUpdateWasRequested;
1218
- if (O && this._outerRef != null) {
1219
- var y = this._outerRef;
1220
- if (p === "rtl")
1221
- switch (Kt()) {
1222
- case "negative":
1223
- y.scrollLeft = -b;
1224
- break;
1225
- case "positive-ascending":
1226
- y.scrollLeft = b;
1227
- break;
1228
- default:
1229
- var E = y.clientWidth, L = y.scrollWidth;
1230
- y.scrollLeft = L - E - b;
1231
- break;
1232
- }
1233
- else
1234
- y.scrollLeft = Math.max(0, b);
1235
- y.scrollTop = Math.max(0, I);
1236
- }
1237
- this._callPropsCallbacks();
1238
- }, T.componentWillUnmount = function() {
1239
- this._resetIsScrollingTimeoutId !== null && Bt(this._resetIsScrollingTimeoutId);
1240
- }, T.render = function() {
1241
- var p = this.props, P = p.children, b = p.className, I = p.columnCount, O = p.direction, y = p.height, E = p.innerRef, L = p.innerElementType, F = p.innerTagName, A = p.itemData, x = p.itemKey, N = x === void 0 ? Do : x, $ = p.outerElementType, V = p.outerTagName, Z = p.rowCount, Q = p.style, j = p.useIsScrolling, ee = p.width, he = this.state.isScrolling, me = this._getHorizontalRangeToRender(), B = me[0], K = me[1], te = this._getVerticalRangeToRender(), fe = te[0], Le = te[1], be = [];
1242
- if (I > 0 && Z)
1243
- for (var ge = fe; ge <= Le; ge++)
1244
- for (var ne = B; ne <= K; ne++)
1245
- be.push(He(P, {
1246
- columnIndex: ne,
1247
- data: A,
1248
- isScrolling: j ? he : void 0,
1249
- key: N({
1250
- columnIndex: ne,
1251
- data: A,
1252
- rowIndex: ge
1253
- }),
1254
- rowIndex: ge,
1255
- style: this._getItemStyle(ge, ne)
1256
- }));
1257
- var Ne = c(this.props, this._instanceProps), nt = s(this.props, this._instanceProps);
1258
- return He($ || V || "div", {
1259
- className: b,
1260
- onScroll: this._onScroll,
1261
- ref: this._outerRefSetter,
1262
- style: Fr({
1263
- position: "relative",
1264
- height: y,
1265
- width: ee,
1266
- overflow: "auto",
1267
- WebkitOverflowScrolling: "touch",
1268
- willChange: "transform",
1269
- direction: O
1270
- }, Q)
1271
- }, He(L || F || "div", {
1272
- children: be,
1273
- ref: E,
1274
- style: {
1275
- height: Ne,
1276
- pointerEvents: he ? "none" : void 0,
1277
- width: nt
1278
- }
1279
- }));
1280
- }, T._callPropsCallbacks = function() {
1281
- var p = this.props, P = p.columnCount, b = p.onItemsRendered, I = p.onScroll, O = p.rowCount;
1282
- if (typeof b == "function" && P > 0 && O > 0) {
1283
- var y = this._getHorizontalRangeToRender(), E = y[0], L = y[1], F = y[2], A = y[3], x = this._getVerticalRangeToRender(), N = x[0], $ = x[1], V = x[2], Z = x[3];
1284
- this._callOnItemsRendered(E, L, N, $, F, A, V, Z);
1285
- }
1286
- if (typeof I == "function") {
1287
- var Q = this.state, j = Q.horizontalScrollDirection, ee = Q.scrollLeft, he = Q.scrollTop, me = Q.scrollUpdateWasRequested, B = Q.verticalScrollDirection;
1288
- this._callOnScroll(ee, he, j, B, me);
1289
- }
1290
- }, T._getHorizontalRangeToRender = function() {
1291
- var p = this.props, P = p.columnCount, b = p.overscanColumnCount, I = p.overscanColumnsCount, O = p.overscanCount, y = p.rowCount, E = this.state, L = E.horizontalScrollDirection, F = E.isScrolling, A = E.scrollLeft, x = b || I || O || 1;
1292
- if (P === 0 || y === 0)
1293
- return [0, 0, 0, 0];
1294
- var N = o(this.props, A, this._instanceProps), $ = r(this.props, N, A, this._instanceProps), V = !F || L === "backward" ? Math.max(1, x) : 1, Z = !F || L === "forward" ? Math.max(1, x) : 1;
1295
- return [Math.max(0, N - V), Math.max(0, Math.min(P - 1, $ + Z)), N, $];
1296
- }, T._getVerticalRangeToRender = function() {
1297
- var p = this.props, P = p.columnCount, b = p.overscanCount, I = p.overscanRowCount, O = p.overscanRowsCount, y = p.rowCount, E = this.state, L = E.isScrolling, F = E.verticalScrollDirection, A = E.scrollTop, x = I || O || b || 1;
1298
- if (P === 0 || y === 0)
1299
- return [0, 0, 0, 0];
1300
- var N = h(this.props, A, this._instanceProps), $ = g(this.props, N, A, this._instanceProps), V = !L || F === "backward" ? Math.max(1, x) : 1, Z = !L || F === "forward" ? Math.max(1, x) : 1;
1301
- return [Math.max(0, N - V), Math.max(0, Math.min(y - 1, $ + Z)), N, $];
1302
- }, m;
1303
- }(ir), e.defaultProps = {
1304
- direction: "ltr",
1305
- itemData: void 0,
1306
- useIsScrolling: !1
1307
- }, e;
1308
- }
1309
- var Ao = function(e, n) {
1310
- var o = e.children, r = e.direction, a = e.height, c = e.innerTagName, s = e.outerTagName, u = e.overscanColumnsCount, l = e.overscanCount, d = e.overscanRowsCount, f = e.width, h = n.instance;
1311
- if (process.env.NODE_ENV !== "production") {
1312
- if (typeof l == "number" && $e && !$e.has(h) && ($e.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof d == "number") && Ge && !Ge.has(h) && (Ge.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && Ve && !Ve.has(h) && (Ve.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1313
- throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1314
- switch (r) {
1315
- case "ltr":
1316
- case "rtl":
1317
- break;
1318
- default:
1319
- throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + r + '" was specified.'));
1320
- }
1321
- if (typeof f != "number")
1322
- throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (f === null ? "null" : typeof f) + '" was specified.'));
1323
- if (typeof a != "number")
1324
- throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
1325
- }
1326
- }, Xt = 50, xn = function(e, n) {
1327
- var o = e.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, c = n.lastMeasuredRowIndex, s = 0;
1328
- if (c >= o && (c = o - 1), c >= 0) {
1329
- var u = r[c];
1330
- s = u.offset + u.size;
1331
- }
1332
- var l = o - c - 1, d = l * a;
1333
- return s + d;
1334
- }, yn = function(e, n) {
1335
- var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, c = n.lastMeasuredColumnIndex, s = 0;
1336
- if (c >= o && (c = o - 1), c >= 0) {
1337
- var u = r[c];
1338
- s = u.offset + u.size;
1339
- }
1340
- var l = o - c - 1, d = l * a;
1341
- return s + d;
1342
- }, ve = function(e, n, o, r) {
1343
- var a, c, s;
1344
- if (e === "column" ? (a = r.columnMetadataMap, c = n.columnWidth, s = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, c = n.rowHeight, s = r.lastMeasuredRowIndex), o > s) {
1345
- var u = 0;
1346
- if (s >= 0) {
1347
- var l = a[s];
1348
- u = l.offset + l.size;
1349
- }
1350
- for (var d = s + 1; d <= o; d++) {
1351
- var f = c(d);
1352
- a[d] = {
1353
- offset: u,
1354
- size: f
1355
- }, u += f;
1356
- }
1357
- e === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
1358
- }
1359
- return a[o];
1360
- }, Jt = function(e, n, o, r) {
1361
- var a, c;
1362
- e === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
1363
- var s = c > 0 ? a[c].offset : 0;
1364
- return s >= r ? Rn(e, n, o, c, 0, r) : Fo(e, n, o, Math.max(0, c), r);
1365
- }, Rn = function(e, n, o, r, a, c) {
1366
- for (; a <= r; ) {
1367
- var s = a + Math.floor((r - a) / 2), u = ve(e, n, s, o).offset;
1368
- if (u === c)
1369
- return s;
1370
- u < c ? a = s + 1 : u > c && (r = s - 1);
1371
- }
1372
- return a > 0 ? a - 1 : 0;
1373
- }, Fo = function(e, n, o, r, a) {
1374
- for (var c = e === "column" ? n.columnCount : n.rowCount, s = 1; r < c && ve(e, n, r, o).offset < a; )
1375
- r += s, s *= 2;
1376
- return Rn(e, n, o, Math.min(r, c - 1), Math.floor(r / 2), a);
1377
- }, Yt = function(e, n, o, r, a, c, s) {
1378
- var u = e === "column" ? n.width : n.height, l = ve(e, n, o, c), d = e === "column" ? yn(n, c) : xn(n, c), f = Math.max(0, Math.min(d - u, l.offset)), h = Math.max(0, l.offset - u + s + l.size);
1379
- switch (r === "smart" && (a >= h - u && a <= f + u ? r = "auto" : r = "center"), r) {
1380
- case "start":
1381
- return f;
1382
- case "end":
1383
- return h;
1384
- case "center":
1385
- return Math.round(h + (f - h) / 2);
1386
- case "auto":
1387
- default:
1388
- return a >= h && a <= f ? a : h > f || a < h ? h : f;
1389
- }
1390
- }, ko = /* @__PURE__ */ zo({
1391
- getColumnOffset: function(e, n, o) {
1392
- return ve("column", e, n, o).offset;
1393
- },
1394
- getColumnStartIndexForOffset: function(e, n, o) {
1395
- return Jt("column", e, o, n);
1396
- },
1397
- getColumnStopIndexForStartIndex: function(e, n, o, r) {
1398
- for (var a = e.columnCount, c = e.width, s = ve("column", e, n, r), u = o + c, l = s.offset + s.size, d = n; d < a - 1 && l < u; )
1399
- d++, l += ve("column", e, d, r).size;
1400
- return d;
1401
- },
1402
- getColumnWidth: function(e, n, o) {
1403
- return o.columnMetadataMap[n].size;
1404
- },
1405
- getEstimatedTotalHeight: xn,
1406
- getEstimatedTotalWidth: yn,
1407
- getOffsetForColumnAndAlignment: function(e, n, o, r, a, c) {
1408
- return Yt("column", e, n, o, r, a, c);
1409
- },
1410
- getOffsetForRowAndAlignment: function(e, n, o, r, a, c) {
1411
- return Yt("row", e, n, o, r, a, c);
1412
- },
1413
- getRowOffset: function(e, n, o) {
1414
- return ve("row", e, n, o).offset;
1415
- },
1416
- getRowHeight: function(e, n, o) {
1417
- return o.rowMetadataMap[n].size;
1418
- },
1419
- getRowStartIndexForOffset: function(e, n, o) {
1420
- return Jt("row", e, o, n);
1421
- },
1422
- getRowStopIndexForStartIndex: function(e, n, o, r) {
1423
- for (var a = e.rowCount, c = e.height, s = ve("row", e, n, r), u = o + c, l = s.offset + s.size, d = n; d < a - 1 && l < u; )
1424
- d++, l += ve("row", e, d, r).size;
1425
- return d;
1426
- },
1427
- initInstanceProps: function(e, n) {
1428
- var o = e, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, c = {
1429
- columnMetadataMap: {},
1430
- estimatedColumnWidth: r || Xt,
1431
- estimatedRowHeight: a || Xt,
1432
- lastMeasuredColumnIndex: -1,
1433
- lastMeasuredRowIndex: -1,
1434
- rowMetadataMap: {}
1435
- };
1436
- return n.resetAfterColumnIndex = function(s, u) {
1437
- u === void 0 && (u = !0), n.resetAfterIndices({
1438
- columnIndex: s,
1439
- shouldForceUpdate: u
1440
- });
1441
- }, n.resetAfterRowIndex = function(s, u) {
1442
- u === void 0 && (u = !0), n.resetAfterIndices({
1443
- rowIndex: s,
1444
- shouldForceUpdate: u
1445
- });
1446
- }, n.resetAfterIndices = function(s) {
1447
- var u = s.columnIndex, l = s.rowIndex, d = s.shouldForceUpdate, f = d === void 0 ? !0 : d;
1448
- typeof u == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, u - 1)), typeof l == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, l - 1)), n._getItemStyleCache(-1), f && n.forceUpdate();
1449
- }, c;
1450
- },
1451
- shouldResetStyleCacheOnItemSizeChange: !1,
1452
- validateProps: function(e) {
1453
- var n = e.columnWidth, o = e.rowHeight;
1454
- if (process.env.NODE_ENV !== "production") {
1455
- if (typeof n != "function")
1456
- throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (n === null ? "null" : typeof n) + '" was specified.'));
1457
- if (typeof o != "function")
1458
- throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1459
- }
1460
- }
1461
- });
1462
- process.env.NODE_ENV;
1463
- function Qt(t, e) {
1464
- for (var n in t)
1465
- if (!(n in e))
1466
- return !0;
1467
- for (var o in e)
1468
- if (t[o] !== e[o])
1469
- return !0;
1470
- return !1;
1471
- }
1472
- var Mo = ["style"], Wo = ["style"];
1473
- function Ho(t, e) {
1474
- var n = t.style, o = Zt(t, Mo), r = e.style, a = Zt(e, Wo);
1475
- return !Qt(n, r) && !Qt(o, a);
1476
- }
1477
- const $o = () => {
1478
- const { viewMode: t } = Ye(), { scrollMode: e } = ze(), { setColumnCount: n } = ln(), { virtualScrollableElementRef: o } = Qe(), r = St(), a = R(
1479
- (g) => r.widths[g] || 0,
1480
- [r.widths]
1481
- ), c = R(
1482
- (g) => r.heights[g] || 0,
1483
- [r.heights]
1484
- ), s = k(() => r.heights.length, [r.heights]), u = k(() => Math.max(...r.widths), [r.widths]), l = k(() => e === X.HORIZONTAL_SCROLLING ? s : t === Ue.DUAL_PAGE ? 2 : 1, [t, e, e, s, o, u]);
1485
- D(() => {
1486
- n(l);
1487
- }, [l, n]);
1488
- const d = k(() => e === X.HORIZONTAL_SCROLLING || e === X.PAGE_SCROLLING ? 1 : Math.round(s / l), [l, s, e]), f = k(() => r.heights.reduce((g, v) => g + v, 0) / r.heights.length || 0, [r]), h = k(() => r.widths.reduce((g, v) => g + v, 0) / r.heights.length || 0, [r]);
1489
- return {
1490
- rowCount: d,
1491
- rowHeight: c,
1492
- columnCount: l,
1493
- columnWidth: a,
1494
- pageDimension: r,
1495
- estimatedRowHeight: f,
1496
- estimatedColumnWidth: h
1497
- };
1498
- };
1499
- let ae;
1500
- typeof window < "u" ? ae = window : typeof self < "u" ? ae = self : ae = global;
1501
- let Ct = null, Tt = null;
1502
- const en = 20, ht = ae.clearTimeout, tn = ae.setTimeout, mt = ae.cancelAnimationFrame || ae.mozCancelAnimationFrame || ae.webkitCancelAnimationFrame, nn = ae.requestAnimationFrame || ae.mozRequestAnimationFrame || ae.webkitRequestAnimationFrame;
1503
- mt == null || nn == null ? (Ct = ht, Tt = function(e) {
1504
- return tn(e, en);
1505
- }) : (Ct = function([e, n]) {
1506
- mt(e), ht(n);
1507
- }, Tt = function(e) {
1508
- const n = nn(function() {
1509
- ht(o), e();
1510
- }), o = tn(function() {
1511
- mt(n), e();
1512
- }, en);
1513
- return [n, o];
1514
- });
1515
- function Go(t) {
1516
- let e, n, o, r, a, c, s;
1517
- const u = typeof document < "u" && document.attachEvent;
1518
- if (!u) {
1519
- c = function(_) {
1520
- const m = _.__resizeTriggers__, T = m.firstElementChild, S = m.lastElementChild, p = T.firstElementChild;
1521
- S.scrollLeft = S.scrollWidth, S.scrollTop = S.scrollHeight, p.style.width = T.offsetWidth + 1 + "px", p.style.height = T.offsetHeight + 1 + "px", T.scrollLeft = T.scrollWidth, T.scrollTop = T.scrollHeight;
1522
- }, a = function(_) {
1523
- return _.offsetWidth !== _.__resizeLast__.width || _.offsetHeight !== _.__resizeLast__.height;
1524
- }, s = function(_) {
1525
- if (_.target.className && typeof _.target.className.indexOf == "function" && _.target.className.indexOf("contract-trigger") < 0 && _.target.className.indexOf("expand-trigger") < 0)
1526
- return;
1527
- const m = this;
1528
- c(this), this.__resizeRAF__ && Ct(this.__resizeRAF__), this.__resizeRAF__ = Tt(function() {
1529
- a(m) && (m.__resizeLast__.width = m.offsetWidth, m.__resizeLast__.height = m.offsetHeight, m.__resizeListeners__.forEach(function(p) {
1530
- p.call(m, _);
1531
- }));
1532
- });
1533
- };
1534
- let h = !1, g = "";
1535
- o = "animationstart";
1536
- const v = "Webkit Moz O ms".split(" ");
1537
- let C = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), w = "";
1538
- {
1539
- const _ = document.createElement("fakeelement");
1540
- if (_.style.animationName !== void 0 && (h = !0), h === !1) {
1541
- for (let m = 0; m < v.length; m++)
1542
- if (_.style[v[m] + "AnimationName"] !== void 0) {
1543
- w = v[m], g = "-" + w.toLowerCase() + "-", o = C[m], h = !0;
1544
- break;
1545
- }
1546
- }
1547
- }
1548
- n = "resizeanim", e = "@" + g + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = g + "animation: 1ms " + n + "; ";
1549
- }
1550
- const l = function(h) {
1551
- if (!h.getElementById("detectElementResize")) {
1552
- const g = (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%; }', v = h.head || h.getElementsByTagName("head")[0], C = h.createElement("style");
1553
- C.id = "detectElementResize", C.type = "text/css", t != null && C.setAttribute("nonce", t), C.styleSheet ? C.styleSheet.cssText = g : C.appendChild(h.createTextNode(g)), v.appendChild(C);
1554
- }
1555
- };
1556
- return {
1557
- addResizeListener: function(h, g) {
1558
- if (u)
1559
- h.attachEvent("onresize", g);
1560
- else {
1561
- if (!h.__resizeTriggers__) {
1562
- const v = h.ownerDocument, C = ae.getComputedStyle(h);
1563
- C && C.position === "static" && (h.style.position = "relative"), l(v), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = v.createElement("div")).className = "resize-triggers";
1564
- const w = v.createElement("div");
1565
- w.className = "expand-trigger", w.appendChild(v.createElement("div"));
1566
- const _ = v.createElement("div");
1567
- _.className = "contract-trigger", h.__resizeTriggers__.appendChild(w), h.__resizeTriggers__.appendChild(_), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(T) {
1568
- T.animationName === n && c(h);
1569
- }, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
1570
- }
1571
- h.__resizeListeners__.push(g);
1572
- }
1573
- },
1574
- removeResizeListener: function(h, g) {
1575
- if (u)
1576
- h.detachEvent("onresize", g);
1577
- else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(g), 1), !h.__resizeListeners__.length) {
1578
- h.removeEventListener("scroll", s, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(o, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
1579
- try {
1580
- h.__resizeTriggers__ = !h.removeChild(h.__resizeTriggers__);
1581
- } catch {
1582
- }
1583
- }
1584
- }
1585
- };
1586
- }
1587
- class Vo extends ar {
1588
- constructor(...e) {
1589
- super(...e), this.state = {
1590
- height: this.props.defaultHeight || 0,
1591
- scaledHeight: this.props.defaultHeight || 0,
1592
- scaledWidth: this.props.defaultWidth || 0,
1593
- width: this.props.defaultWidth || 0
1594
- }, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
1595
- this._timeoutId = null;
1596
- const {
1597
- disableHeight: n,
1598
- disableWidth: o,
1599
- onResize: r
1600
- } = this.props;
1601
- if (this._parentNode) {
1602
- const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), l = parseFloat(a.paddingBottom || "0"), d = this._parentNode.getBoundingClientRect(), f = d.height - u - l, h = d.width - c - s, g = this._parentNode.offsetHeight - u - l, v = this._parentNode.offsetWidth - c - s;
1603
- (!n && (this.state.height !== g || this.state.scaledHeight !== f) || !o && (this.state.width !== v || this.state.scaledWidth !== h)) && (this.setState({
1604
- height: g,
1605
- width: v,
1606
- scaledHeight: f,
1607
- scaledWidth: h
1608
- }), typeof r == "function" && r({
1609
- height: g,
1610
- scaledHeight: f,
1611
- scaledWidth: h,
1612
- width: v
1613
- }));
1614
- }
1615
- }, this._setRef = (n) => {
1616
- this._autoSizer = n;
1617
- };
1618
- }
1619
- componentDidMount() {
1620
- const {
1621
- nonce: e
1622
- } = this.props, n = this._autoSizer ? this._autoSizer.parentNode : null;
1623
- if (n != null && n.ownerDocument && n.ownerDocument.defaultView && n instanceof n.ownerDocument.defaultView.HTMLElement) {
1624
- this._parentNode = n;
1625
- const o = n.ownerDocument.defaultView.ResizeObserver;
1626
- o != null ? (this._resizeObserver = new o(() => {
1627
- this._timeoutId = setTimeout(this._onResize, 0);
1628
- }), this._resizeObserver.observe(n)) : (this._detectElementResize = Go(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
1629
- }
1630
- }
1631
- componentWillUnmount() {
1632
- this._parentNode && (this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize), this._timeoutId !== null && clearTimeout(this._timeoutId), this._resizeObserver && this._resizeObserver.disconnect());
1633
- }
1634
- render() {
1635
- const {
1636
- children: e,
1637
- defaultHeight: n,
1638
- defaultWidth: o,
1639
- disableHeight: r = !1,
1640
- disableWidth: a = !1,
1641
- doNotBailOutOnEmptyChildren: c = !1,
1642
- nonce: s,
1643
- onResize: u,
1644
- style: l = {},
1645
- tagName: d = "div",
1646
- ...f
1647
- } = this.props, {
1648
- height: h,
1649
- scaledHeight: g,
1650
- scaledWidth: v,
1651
- width: C
1652
- } = this.state, w = {
1653
- overflow: "visible"
1654
- }, _ = {};
1655
- let m = !1;
1656
- return r || (h === 0 && (m = !0), w.height = 0, _.height = h, _.scaledHeight = g), a || (C === 0 && (m = !0), w.width = 0, _.width = C, _.scaledWidth = v), c && (m = !1), He(d, {
1657
- ref: this._setRef,
1658
- style: {
1659
- ...w,
1660
- ...l
1661
- },
1662
- ...f
1663
- }, !m && e(_));
1664
- }
1665
- }
1666
- const Uo = ({ widths: t, heights: e }) => {
1667
- const { focusedPage: n, totalPages: o } = ce(), { isScrolling: r } = et(), a = k(() => {
1668
- const u = [], l = Math.ceil(n / 2) * 2 - 1;
1669
- if (u.push(l), l + 1 < o) {
1670
- const d = l + 1;
1671
- u.push(d);
1672
- }
1673
- return u;
1674
- }, [n, o]), c = k(() => [
1675
- {
1676
- position: "absolute",
1677
- left: 0,
1678
- width: t(n - 1),
1679
- height: e(n - 1)
1680
- },
1681
- {
1682
- position: "absolute",
1683
- left: t(n),
1684
- top: 0,
1685
- width: t(n),
1686
- height: e(n)
1687
- }
1688
- ], [t, e, a]);
1689
- D(() => {
1690
- r.current = !1;
1691
- }, [n]);
1692
- const s = k(() => c.reduce((u, l) => u + Number(l.width || 0), 0), [c]);
1693
- return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: a.map((u, l) => /* @__PURE__ */ i(Lt, { onIntersectRatioChange: () => {
1694
- }, style: c[l], pageNumber: u }, u)) });
1695
- }, qo = ({ widths: t, heights: e }) => {
1696
- const { focusedPage: n } = ce(), { isScrolling: o } = et(), r = k(() => ({
1697
- position: "absolute",
1698
- width: t(n - 1),
1699
- height: e(n - 1)
1700
- }), [t, e, n]);
1701
- D(() => {
1702
- o.current = !1;
1703
- }, [n]);
1704
- const a = k(() => t(n - 1), [t]);
1705
- return /* @__PURE__ */ i(
1706
- "div",
1707
- {
1708
- style: {
1709
- width: a,
1710
- position: "relative"
1711
- },
1712
- children: /* @__PURE__ */ i(
1713
- Lt,
1714
- {
1715
- style: r,
1716
- onIntersectRatioChange: () => {
1717
- },
1718
- pageNumber: n
1719
- },
1720
- n
1721
- )
1722
- }
1723
- );
1724
- }, Zo = sr(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
1725
- const r = t + 1 + e * n.columnCount;
1726
- return /* @__PURE__ */ i(
1727
- Lt,
1728
- {
1729
- style: o,
1730
- onIntersectRatioChange: n.handleIntersectRatioChange,
1731
- pageNumber: r
1732
- },
1733
- r
1734
- );
1735
- }, Ho), Ts = () => {
1736
- const { initialPage: t = 1, initialScrollMode: e } = dr(), { pagesRef: n, setPagesRef: o } = ye();
1737
- Ar(n);
1738
- const { scrollToPage: r } = wn(), {
1739
- virtualScrollRef: a,
1740
- getVirtualScrollRef: c,
1741
- getPageScrollElementRef: s,
1742
- getVirtualScrollableElementRef: u,
1743
- setTotalInnerDimensions: l,
1744
- virtualScrollableElementRef: d,
1745
- totalInnerDimensions: f,
1746
- pageScrollElementRef: h
1747
- } = Qe(), g = W(!0), { nextPage: v, prevPage: C, setFocusedPage: w, focusedPage: _ } = ce(), { scrollMode: m } = ze(), { viewMode: T } = Ye(), S = W(null), { loading: p } = J(), { LoaderImageComponent: P } = hn(), { smoothScrolling: b, targetScrollPosition: I } = pn(), O = W(
1748
- f
1749
- ), y = W({
1750
- viewMode: T,
1751
- scrollMode: m
1752
- }), E = W(!1), L = W(), { isFullScreen: F } = pr(), {
1753
- pageDimension: A,
1754
- rowCount: x,
1755
- rowHeight: N,
1756
- columnCount: $,
1757
- columnWidth: V,
1758
- estimatedColumnWidth: Z,
1759
- estimatedRowHeight: Q
1760
- } = $o(), j = wt(f, 100), [ee, he] = G({}), me = wt(ee, 100), { isScrolling: B } = et(), K = W(), te = W({
1761
- scrollTop: 0,
1762
- scrollLeft: 0
1763
- });
1764
- Hr(n);
1765
- const { isPressed: fe } = Mr(), { selectionMode: Le } = ur(), { initializeGrabScroll: be, resetGrabState: ge } = Wr({
1766
- isPressed: fe
1767
- }), ne = k(() => Le === cr.HAND, [Le]), Ne = R((M, H) => {
1768
- he((Y) => H > -1 ? { ...Y, [M]: Math.round(H * 100) } : (delete Y[M], Y));
1769
- }, []), nt = k(() => ({
1770
- columnCount: $,
1771
- handleIntersectRatioChange: Ne
1772
- }), [$, Ne]), rt = R(
1773
- (M) => {
1774
- const H = document.activeElement !== n;
1775
- !F && H || (["ArrowUp", "ArrowLeft"].includes(M.key) ? (M.preventDefault(), C()) : ["ArrowDown", "ArrowRight"].includes(M.key) && (M.preventDefault(), v()));
1776
- },
1777
- [v, C, F, m]
1778
- );
1779
- D(() => (window.addEventListener("keydown", rt), () => {
1780
- window.removeEventListener("keydown", rt);
1781
- }), [rt]), D(() => {
1782
- if (S.current && (S.current.style.position = "relative"), !!a)
1783
- for (let M = 0; M < x; M++)
1784
- for (let H = 0; H < $; H++)
1785
- a.resetAfterIndices({
1786
- columnIndex: H,
1787
- rowIndex: M,
1788
- shouldForceUpdate: !0
1789
- });
1790
- }, [x, $, A, a]);
1791
- const Xn = R(
1792
- (M, H) => {
1793
- if (!d)
1794
- return { scrollTop: 0, scrollLeft: 0 };
1795
- const Y = te.current.scrollTop > H, se = te.current.scrollLeft > M;
1796
- return Y || se ? te.current : {
1797
- scrollTop: d.scrollTop,
1798
- scrollLeft: d.scrollLeft
1799
- };
1800
- },
1801
- [d]
1802
- ), Jn = R(
1803
- (M, H) => {
1804
- if (B.current)
1805
- return;
1806
- if (y.current.viewMode !== T || y.current.scrollMode !== m) {
1807
- K.current && clearTimeout(K.current), he({}), E.current = !0, r(_), m === X.HORIZONTAL_SCROLLING && (a == null || a.scrollTo({
1808
- scrollTop: 0
1809
- })), K.current = setTimeout(() => {
1810
- requestAnimationFrame(() => {
1811
- y.current = { viewMode: T, scrollMode: m };
1812
- });
1813
- }, 100);
1814
- return;
1815
- }
1816
- const se = M.scrollTop, ot = M.scrollLeft;
1817
- if (!H.height || !H.width)
1818
- return;
1819
- E.current = !0;
1820
- const { height: Ce, width: it } = H, { height: zt, width: At } = O.current;
1821
- if (zt === Ce && At === it)
1822
- return;
1823
- const tr = se / zt * Ce, nr = ot / At * it, rr = Math.round(Math.min(tr, Ce)) || 0, or = Math.round(Math.min(nr, it)) || 0;
1824
- L.current = setTimeout(() => {
1825
- requestAnimationFrame(() => {
1826
- a == null || a.scrollTo({
1827
- scrollTop: rr,
1828
- scrollLeft: or
1829
- });
1830
- });
1831
- }, 0), O.current = {
1832
- height: H.height,
1833
- width: H.width
1834
- };
1835
- },
1836
- [a, T, m]
1837
- );
1838
- D(() => {
1839
- clearTimeout(L.current);
1840
- const M = Array.from({ length: x }).reduce(
1841
- (se, ot, Ce) => se + N(Ce),
1842
- 0
1843
- ), H = Array.from({ length: $ }).reduce(
1844
- (se, ot, Ce) => se + V(Ce),
1845
- 0
1846
- ), Y = Xn(H, M);
1847
- te.current = Y, Jn(Y, { height: M, width: H }), l({
1848
- height: M,
1849
- width: H
1850
- });
1851
- }, [A, x, $]);
1852
- const Yn = R((M) => {
1853
- te.current = {
1854
- scrollTop: M.scrollTop,
1855
- scrollLeft: M.scrollLeft
1856
- }, Math.round(I.current.left) === Math.round(M.scrollLeft) && Math.round(I.current.top) === Math.round(M.scrollTop) && (b.current = !1);
1857
- }, []);
1858
- D(() => {
1859
- if ((B.current || E.current) && (B.current = !1), B.current || b.current)
1860
- return;
1861
- const M = Object.entries(me);
1862
- let H = 0, Y = -1;
1863
- M.forEach((se) => {
1864
- Y < se[1] && (H = Number(se[0]), Y = se[1]);
1865
- }), H && w(H);
1866
- }, [me, w]), D(() => () => {
1867
- K.current && clearTimeout(K.current);
1868
- }, []);
1869
- const Qn = k(() => ie(ue["rp-pages-container"], {
1870
- [ue["rp-cursor-grab"]]: ne && !fe,
1871
- [ue["rp-cursor-grabbing"]]: ne && fe
1872
- }), [ne, fe]), er = R(
1873
- (M) => {
1874
- if (ne && M) {
1875
- const H = ie(ue["rp-pages"]), Y = document.querySelector(`.${H}`);
1876
- be(Y);
1877
- }
1878
- },
1879
- [ne, be, ue]
1880
- );
1881
- return D(() => {
1882
- p && ge();
1883
- }, [p]), D(() => {
1884
- if (!(j.height === 0 || !g.current)) {
1885
- if (e === X.PAGE_SCROLLING) {
1886
- t !== _ && h && w(t), g.current = !1;
1887
- return;
1888
- }
1889
- if (a != null && a.scrollToItem) {
1890
- switch (e) {
1891
- case X.HORIZONTAL_SCROLLING:
1892
- a.scrollToItem({
1893
- columnIndex: t - 1,
1894
- rowIndex: 0,
1895
- align: "start"
1896
- });
1897
- break;
1898
- default:
1899
- a.scrollToItem({
1900
- columnIndex: 0,
1901
- rowIndex: t - 1,
1902
- align: "start"
1903
- });
1904
- break;
1905
- }
1906
- g.current = !1;
1907
- }
1908
- }
1909
- }, [
1910
- a,
1911
- e,
1912
- h,
1913
- w,
1914
- j
1915
- ]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: Qn, children: /* @__PURE__ */ i(Vo, { style: { minHeight: "50px" }, children: ({ width: M, height: H }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: er, style: { width: M, height: H }, children: m === X.PAGE_SCROLLING ? /* @__PURE__ */ i(
1916
- "div",
1917
- {
1918
- ref: s,
1919
- style: { width: M, height: H },
1920
- className: ie(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
1921
- children: T === Ue.DUAL_PAGE ? /* @__PURE__ */ i(Uo, { widths: V, heights: N }) : /* @__PURE__ */ i(qo, { widths: V, heights: N })
1922
- }
1923
- ) : Z ? /* @__PURE__ */ i(
1924
- ko,
1925
- {
1926
- ref: c,
1927
- itemData: nt,
1928
- outerRef: u,
1929
- innerRef: S,
1930
- onScroll: Yn,
1931
- columnCount: $,
1932
- columnWidth: V,
1933
- rowHeight: N,
1934
- height: H,
1935
- width: M,
1936
- estimatedColumnWidth: Z,
1937
- estimatedRowHeight: Q,
1938
- rowCount: x,
1939
- className: ie(
1940
- ue["rp-pages"],
1941
- m === X.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
1942
- ),
1943
- children: Zo
1944
- }
1945
- ) : p ? null : /* @__PURE__ */ i(
1946
- "div",
1947
- {
1948
- className: ue["rp-loader"],
1949
- style: {
1950
- display: "flex",
1951
- justifyContent: "center",
1952
- alignItems: "center",
1953
- height: "100%",
1954
- width: "100%"
1955
- },
1956
- children: P && /* @__PURE__ */ i(P, {})
1957
- }
1958
- ) }) }) });
1959
- }, Ae = {
1960
- "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
1961
- "rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
1962
- "rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
1963
- "rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
1964
- "rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
1965
- }, ft = {
1966
- "rp-paginate": "_rp-paginate_1vu6o_1",
1967
- "rp-page-input": "_rp-page-input_1vu6o_6",
1968
- "rp-total-page": "_rp-total-page_1vu6o_12"
1969
- }, jo = () => {
1970
- const { prevIcon: t } = pe();
1971
- return t || /* @__PURE__ */ i(Me, {});
1972
- }, Bo = () => {
1973
- const { nextIcon: t } = pe();
1974
- return t || /* @__PURE__ */ i(Me, { style: { transform: "rotate(180deg" } });
1975
- }, Ko = () => {
1976
- const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ce(), [c, s] = G(t.toString()), { pageNavigationTool: u = !0 } = _e(), { isSmallScreen: l } = Re(), { localeMessages: d } = de();
1977
- D(() => {
1978
- s(t.toString());
1979
- }, [t]);
1980
- const f = R((C) => {
1981
- const w = C.target.value;
1982
- s(w);
1983
- }, []), h = R(async () => {
1984
- const C = a(c);
1985
- C.success || s(C.currentPage.toString());
1986
- }, [a, c, e]), g = R(() => {
1987
- s(t.toString());
1988
- }, [t]), v = R(
1989
- (C) => {
1990
- C.key === "Enter" && h();
1991
- },
1992
- [h]
1993
- );
1994
- return typeof u != "boolean" ? /* @__PURE__ */ i(
1995
- u,
1996
- {
1997
- total: e,
1998
- current: t,
1999
- nextPage: o,
2000
- prevPage: r,
2001
- goToPage: a,
2002
- changePage: n
2003
- }
2004
- ) : u ? /* @__PURE__ */ z("div", { className: ft["rp-paginate"], children: [
2005
- !l && /* @__PURE__ */ i(q, { content: d == null ? void 0 : d.previousPageTooltip, children: /* @__PURE__ */ i(
2006
- re,
2007
- {
2008
- onClick: r,
2009
- "aria-label": d == null ? void 0 : d.previousPageTooltip,
2010
- "aria-disabled": t === 1,
2011
- children: /* @__PURE__ */ i(jo, {})
2012
- }
2013
- ) }),
2014
- /* @__PURE__ */ i(q, { content: d == null ? void 0 : d.currentPageTooltip, children: /* @__PURE__ */ i(
2015
- cn,
2016
- {
2017
- onKeyDown: v,
2018
- onBlur: g,
2019
- onChange: f,
2020
- value: c,
2021
- className: ft["rp-page-input"]
2022
- }
2023
- ) }),
2024
- /* @__PURE__ */ z("span", { className: ft["rp-total-page"], children: [
2025
- "/",
2026
- e
2027
- ] }),
2028
- !l && /* @__PURE__ */ i(q, { content: d == null ? void 0 : d.nextPageTooltip, children: /* @__PURE__ */ i(
2029
- re,
2030
- {
2031
- onClick: o,
2032
- "aria-label": d == null ? void 0 : d.nextPageTooltip,
2033
- "aria-disabled": t === e,
2034
- children: /* @__PURE__ */ i(Bo, {})
2035
- }
2036
- ) })
2037
- ] }) : null;
2038
- };
2039
- var Nt = "Dialog", [Ln, Ps] = Ur(Nt), [Xo, le] = Ln(Nt), Nn = (t) => {
2040
- const {
2041
- __scopeDialog: e,
2042
- children: n,
2043
- open: o,
2044
- defaultOpen: r,
2045
- onOpenChange: a,
2046
- modal: c = !0
2047
- } = t, s = U.useRef(null), u = U.useRef(null), [l = !1, d] = jr({
2048
- prop: o,
2049
- defaultProp: r,
2050
- onChange: a
2051
- });
2052
- return /* @__PURE__ */ i(
2053
- Xo,
2054
- {
2055
- scope: e,
2056
- triggerRef: s,
2057
- contentRef: u,
2058
- contentId: st(),
2059
- titleId: st(),
2060
- descriptionId: st(),
2061
- open: l,
2062
- onOpenChange: d,
2063
- onOpenToggle: U.useCallback(() => d((f) => !f), [d]),
2064
- modal: c,
2065
- children: n
2066
- }
2067
- );
2068
- };
2069
- Nn.displayName = Nt;
2070
- var En = "DialogTrigger", Jo = U.forwardRef(
2071
- (t, e) => {
2072
- const { __scopeDialog: n, ...o } = t, r = le(En, n), a = xt(e, r.triggerRef);
2073
- return /* @__PURE__ */ i(
2074
- We.button,
2075
- {
2076
- type: "button",
2077
- "aria-haspopup": "dialog",
2078
- "aria-expanded": r.open,
2079
- "aria-controls": r.contentId,
2080
- "data-state": Dt(r.open),
2081
- ...o,
2082
- ref: a,
2083
- onClick: ke(t.onClick, r.onOpenToggle)
2084
- }
2085
- );
2086
- }
2087
- );
2088
- Jo.displayName = En;
2089
- var Et = "DialogPortal", [Yo, On] = Ln(Et, {
2090
- forceMount: void 0
2091
- }), Dn = (t) => {
2092
- const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = le(Et, e);
2093
- return /* @__PURE__ */ i(Yo, { scope: e, forceMount: n, children: U.Children.map(o, (c) => /* @__PURE__ */ i(yt, { present: n || a.open, children: /* @__PURE__ */ i(Qr, { asChild: !0, container: r, children: c }) })) });
2094
- };
2095
- Dn.displayName = Et;
2096
- var Ze = "DialogOverlay", zn = U.forwardRef(
2097
- (t, e) => {
2098
- const n = On(Ze, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = le(Ze, t.__scopeDialog);
2099
- return a.modal ? /* @__PURE__ */ i(yt, { present: o || a.open, children: /* @__PURE__ */ i(Qo, { ...r, ref: e }) }) : null;
2100
- }
2101
- );
2102
- zn.displayName = Ze;
2103
- var Qo = U.forwardRef(
2104
- (t, e) => {
2105
- const { __scopeDialog: n, ...o } = t, r = le(Ze, n);
2106
- return (
2107
- // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2108
- // ie. when `Overlay` and `Content` are siblings
2109
- /* @__PURE__ */ i(Kr, { as: qr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
2110
- We.div,
2111
- {
2112
- "data-state": Dt(r.open),
2113
- ...o,
2114
- ref: e,
2115
- style: { pointerEvents: "auto", ...o.style }
2116
- }
2117
- ) })
2118
- );
2119
- }
2120
- ), xe = "DialogContent", An = U.forwardRef(
2121
- (t, e) => {
2122
- const n = On(xe, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = le(xe, t.__scopeDialog);
2123
- return /* @__PURE__ */ i(yt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(ei, { ...r, ref: e }) : /* @__PURE__ */ i(ti, { ...r, ref: e }) });
2124
- }
2125
- );
2126
- An.displayName = xe;
2127
- var ei = U.forwardRef(
2128
- (t, e) => {
2129
- const n = le(xe, t.__scopeDialog), o = U.useRef(null), r = xt(e, n.contentRef, o);
2130
- return U.useEffect(() => {
2131
- const a = o.current;
2132
- if (a)
2133
- return Xr(a);
2134
- }, []), /* @__PURE__ */ i(
2135
- Fn,
2136
- {
2137
- ...t,
2138
- ref: r,
2139
- trapFocus: n.open,
2140
- disableOutsidePointerEvents: !0,
2141
- onCloseAutoFocus: ke(t.onCloseAutoFocus, (a) => {
2142
- var c;
2143
- a.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
2144
- }),
2145
- onPointerDownOutside: ke(t.onPointerDownOutside, (a) => {
2146
- const c = a.detail.originalEvent, s = c.button === 0 && c.ctrlKey === !0;
2147
- (c.button === 2 || s) && a.preventDefault();
2148
- }),
2149
- onFocusOutside: ke(
2150
- t.onFocusOutside,
2151
- (a) => a.preventDefault()
2152
- )
2153
- }
2154
- );
2155
- }
2156
- ), ti = U.forwardRef(
2157
- (t, e) => {
2158
- const n = le(xe, t.__scopeDialog), o = U.useRef(!1), r = U.useRef(!1);
2159
- return /* @__PURE__ */ i(
2160
- Fn,
2161
- {
2162
- ...t,
2163
- ref: e,
2164
- trapFocus: !1,
2165
- disableOutsidePointerEvents: !1,
2166
- onCloseAutoFocus: (a) => {
2167
- var c, s;
2168
- (c = t.onCloseAutoFocus) == null || c.call(t, a), a.defaultPrevented || (o.current || (s = n.triggerRef.current) == null || s.focus(), a.preventDefault()), o.current = !1, r.current = !1;
2169
- },
2170
- onInteractOutside: (a) => {
2171
- var u, l;
2172
- (u = t.onInteractOutside) == null || u.call(t, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
2173
- const c = a.target;
2174
- ((l = n.triggerRef.current) == null ? void 0 : l.contains(c)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
2175
- }
2176
- }
2177
- );
2178
- }
2179
- ), Fn = U.forwardRef(
2180
- (t, e) => {
2181
- const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = t, s = le(xe, n), u = U.useRef(null), l = xt(e, u);
2182
- return Jr(), /* @__PURE__ */ z(Ie, { children: [
2183
- /* @__PURE__ */ i(
2184
- Yr,
2185
- {
2186
- asChild: !0,
2187
- loop: !0,
2188
- trapped: o,
2189
- onMountAutoFocus: r,
2190
- onUnmountAutoFocus: a,
2191
- children: /* @__PURE__ */ i(
2192
- Br,
2193
- {
2194
- role: "dialog",
2195
- id: s.contentId,
2196
- "aria-describedby": s.descriptionId,
2197
- "aria-labelledby": s.titleId,
2198
- "data-state": Dt(s.open),
2199
- ...c,
2200
- ref: l,
2201
- onDismiss: () => s.onOpenChange(!1)
2202
- }
2203
- )
2204
- }
2205
- ),
2206
- /* @__PURE__ */ z(Ie, { children: [
2207
- /* @__PURE__ */ i(ri, { titleId: s.titleId }),
2208
- /* @__PURE__ */ i(ii, { contentRef: u, descriptionId: s.descriptionId })
2209
- ] })
2210
- ] });
2211
- }
2212
- ), Ot = "DialogTitle", kn = U.forwardRef(
2213
- (t, e) => {
2214
- const { __scopeDialog: n, ...o } = t, r = le(Ot, n);
2215
- return /* @__PURE__ */ i(We.h2, { id: r.titleId, ...o, ref: e });
2216
- }
2217
- );
2218
- kn.displayName = Ot;
2219
- var Mn = "DialogDescription", ni = U.forwardRef(
2220
- (t, e) => {
2221
- const { __scopeDialog: n, ...o } = t, r = le(Mn, n);
2222
- return /* @__PURE__ */ i(We.p, { id: r.descriptionId, ...o, ref: e });
2223
- }
2224
- );
2225
- ni.displayName = Mn;
2226
- var Wn = "DialogClose", Hn = U.forwardRef(
2227
- (t, e) => {
2228
- const { __scopeDialog: n, ...o } = t, r = le(Wn, n);
2229
- return /* @__PURE__ */ i(
2230
- We.button,
2231
- {
2232
- type: "button",
2233
- ...o,
2234
- ref: e,
2235
- onClick: ke(t.onClick, () => r.onOpenChange(!1))
2236
- }
2237
- );
2238
- }
2239
- );
2240
- Hn.displayName = Wn;
2241
- function Dt(t) {
2242
- return t ? "open" : "closed";
2243
- }
2244
- var $n = "DialogTitleWarning", [Ss, Gn] = Zr($n, {
2245
- contentName: xe,
2246
- titleName: Ot,
2247
- docsSlug: "dialog"
2248
- }), ri = ({ titleId: t }) => {
2249
- const e = Gn($n), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
2250
-
2251
- If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
2252
-
2253
- For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;
2254
- return U.useEffect(() => {
2255
- t && (document.getElementById(t) || console.error(n));
2256
- }, [n, t]), null;
2257
- }, oi = "DialogDescriptionWarning", ii = ({ contentRef: t, descriptionId: e }) => {
2258
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Gn(oi).contentName}}.`;
2259
- return U.useEffect(() => {
2260
- var a;
2261
- const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
2262
- e && r && (document.getElementById(e) || console.warn(o));
2263
- }, [o, t, e]), null;
2264
- }, ai = Nn, si = Dn, ci = zn, li = An, ui = kn, di = Hn;
2265
- const Se = {
2266
- "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2267
- "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
2268
- "rp-document-dialog": "_rp-document-dialog_slqo7_13",
2269
- "rp-document-properties": "_rp-document-properties_slqo7_35",
2270
- "rp-dialog-title": "_rp-dialog-title_slqo7_39",
2271
- "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2272
- "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2273
- }, pi = () => {
2274
- const { pdfProperties: t } = J(), { container: e } = ye(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = to(), { localeMessages: r } = de(), a = k(() => {
2275
- if (!t)
2276
- return [];
2277
- const {
2278
- fileSize: c,
2279
- filename: s,
2280
- title: u,
2281
- author: l,
2282
- subject: d,
2283
- createdOn: f,
2284
- creator: h,
2285
- keywords: g,
2286
- modifiedOn: v,
2287
- pdfProducer: C,
2288
- pdfVersion: w,
2289
- pageCount: _
2290
- } = t;
2291
- return [
2292
- { label: r == null ? void 0 : r.propertiesFilenameLabel, value: s },
2293
- { label: r == null ? void 0 : r.propertiesFileSizeLabel, value: c },
2294
- { separate: !0 },
2295
- { label: r == null ? void 0 : r.propertiesTitleLabel, value: u },
2296
- { label: r == null ? void 0 : r.propertiesAuthorLabel, value: l },
2297
- { label: r == null ? void 0 : r.propertiesSubjectLabel, value: d },
2298
- { label: r == null ? void 0 : r.propertiesKeywordLabel, value: g },
2299
- { label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
2300
- {
2301
- label: r == null ? void 0 : r.propertiesCreateOnLabel,
2302
- value: f ? Ht(f) : ""
2303
- },
2304
- {
2305
- label: r == null ? void 0 : r.propertiesModifiedOnLabel,
2306
- value: v ? Ht(v) : ""
2307
- },
2308
- { separate: !0 },
2309
- { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: C },
2310
- { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: w },
2311
- { label: r == null ? void 0 : r.propertiesPageCountLabel, value: _ }
2312
- ];
2313
- }, [t, r]);
2314
- return /* @__PURE__ */ i(ai, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(si, { container: e, children: /* @__PURE__ */ z("div", { className: Se["rp-dialog-wrapper"], children: [
2315
- /* @__PURE__ */ i(ci, { className: Se["rp-dialog-overlay"] }),
2316
- /* @__PURE__ */ z(li, { className: Se["rp-document-dialog"], children: [
2317
- /* @__PURE__ */ i(ui, { className: Se["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2318
- /* @__PURE__ */ i("div", { className: Se["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Se["rp-properties-divider"] }) : /* @__PURE__ */ i(eo, { label: c.label, value: c.value }) }, s)) }),
2319
- /* @__PURE__ */ i(di, { asChild: !0, className: Se["rp-dialog-close"], children: /* @__PURE__ */ i(gn, {}) })
2320
- ] })
2321
- ] }) }) });
2322
- }, hi = {
2323
- "rp-other-tool-content": "_rp-other-tool-content_su718_1"
2324
- }, mi = (t) => URL.createObjectURL(t), fi = async (t) => {
2325
- const n = await (await fetch(t)).blob();
2326
- return mi(n);
2327
- }, Vn = () => {
2328
- const { filename: t, pdfSrc: e } = J();
2329
- return { download: R(async () => {
2330
- if (!t || !e)
2331
- throw new Error("There is no PDF source to download");
2332
- const o = document.createElement("a");
2333
- o.href = await fi(e), o.download = t, document.body.appendChild(o), o.click(), document.body.removeChild(o);
2334
- }, [t, e]) };
2335
- }, Un = () => {
2336
- const { downloadIcon: t } = pe();
2337
- return t || /* @__PURE__ */ i(ao, {});
2338
- }, qn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(q, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), gi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(qn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Un, {}) }) }), vi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ z(qn, { className: "rp-menu-item", localeMessages: e, children: [
2339
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Un, {}) }),
2340
- e == null ? void 0 : e.downloadFileLabel
2341
- ] }) }), Zn = () => {
2342
- const { download: t } = Vn(), { downloadTool: e = !0 } = _e(), { isSmallScreen: n } = Re(), { localeMessages: o } = de();
2343
- return e ? n ? /* @__PURE__ */ i(vi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(gi, { download: t, localeMessages: o }) : null : null;
2344
- }, jn = () => {
2345
- const { printIcon: t } = pe();
2346
- return t || /* @__PURE__ */ i(so, {});
2347
- }, Bn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(q, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), _i = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Bn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(jn, {}) }) }), wi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ z(Bn, { className: "rp-menu-item", localeMessages: e, children: [
2348
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(jn, {}) }),
2349
- e == null ? void 0 : e.printLabel
2350
- ] }) }), Kn = () => {
2351
- const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: c = !0 } = _e(), { isSmallScreen: s } = Re(), { localeMessages: u } = de();
2352
- return c ? s ? /* @__PURE__ */ i(wi, { print: t, localeMessages: u }) : typeof c == "function" ? /* @__PURE__ */ i(
2353
- c,
2354
- {
2355
- print: t,
2356
- cancel: e,
2357
- setOnProgress: n,
2358
- setOnError: r,
2359
- setOnComplete: o,
2360
- progress: a
2361
- }
2362
- ) : c ? /* @__PURE__ */ i(_i, { print: t, localeMessages: u }) : null : null;
2363
- }, bi = {
2364
- "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2365
- }, Ci = () => {
2366
- const { goToFirstPageIcon: t } = pe();
2367
- return t || /* @__PURE__ */ i(_n, { className: bi["rp-go-to-Top"] });
2368
- }, Ti = () => {
2369
- const { goToLastPageIcon: t } = pe();
2370
- return t || /* @__PURE__ */ i(_n, {});
2371
- }, rn = { width: "100%" }, Pi = () => {
2372
- const { goToPage: t, totalPages: e, focusedPage: n } = ce(), { jumpNavigationTool: o = !0 } = _e(), { localeMessages: r } = de(), a = k(() => n === 1, [n]), c = k(() => n === e, [n, e]), s = R(() => {
2373
- t(1);
2374
- }, [t]), u = R(() => {
2375
- t(e);
2376
- }, [t, e]);
2377
- return o ? /* @__PURE__ */ z(qe, { children: [
2378
- /* @__PURE__ */ i(we, { onClick: s, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2379
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ci, {}) }),
2380
- /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
2381
- ] }) }) }),
2382
- /* @__PURE__ */ i(we, { onClick: u, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2383
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ti, {}) }),
2384
- /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
2385
- ] }) }) }),
2386
- /* @__PURE__ */ i(Rt, {})
2387
- ] }) : null;
2388
- }, Si = () => {
2389
- const { container: t } = ye(), { isSmallScreen: e } = Re(), {
2390
- openFileTool: n,
2391
- downloadTool: o,
2392
- documentProperties: r,
2393
- scrollModeTool: a,
2394
- rotateTool: c,
2395
- selectionModeTool: s,
2396
- jumpNavigationTool: u,
2397
- printTool: l,
2398
- fullscreenTool: d
2399
- } = _e(), { localeMessages: f } = de();
2400
- return k(() => {
2401
- const g = u || c || s || a || r;
2402
- let v = !1;
2403
- return e && (v = !(!n && !o && !l && !d)), g || v;
2404
- }, [
2405
- n,
2406
- o,
2407
- r,
2408
- a,
2409
- c,
2410
- s,
2411
- u,
2412
- e
2413
- ]) ? /* @__PURE__ */ z(no, { children: [
2414
- /* @__PURE__ */ i(
2415
- fn,
2416
- {
2417
- container: t,
2418
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Vr, {}) }) }) }),
2419
- children: /* @__PURE__ */ z("div", { className: hi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
2420
- e && /* @__PURE__ */ z(qe, { children: [
2421
- /* @__PURE__ */ i(mn, {}),
2422
- /* @__PURE__ */ i(Zn, {}),
2423
- /* @__PURE__ */ i(Kn, {}),
2424
- /* @__PURE__ */ i(vn, {}),
2425
- /* @__PURE__ */ i(Rt, {})
2426
- ] }),
2427
- /* @__PURE__ */ i(Pi, {}),
2428
- /* @__PURE__ */ i(oo, {}),
2429
- /* @__PURE__ */ i(co, {}),
2430
- /* @__PURE__ */ i(io, {}),
2431
- /* @__PURE__ */ i(ro, {})
2432
- ] })
2433
- }
2434
- ),
2435
- /* @__PURE__ */ i(pi, {})
2436
- ] }) : null;
2437
- }, Ii = () => {
2438
- const { isSmallScreen: t } = Re();
2439
- return /* @__PURE__ */ z(Ie, { children: [
2440
- /* @__PURE__ */ i(Gr, {}),
2441
- !t && /* @__PURE__ */ z(Ie, { children: [
2442
- /* @__PURE__ */ i(mn, {}),
2443
- /* @__PURE__ */ i(Zn, {}),
2444
- /* @__PURE__ */ i(Kn, {}),
2445
- /* @__PURE__ */ i(vn, {})
2446
- ] }),
2447
- /* @__PURE__ */ i(Si, {})
2448
- ] });
2449
- }, Oe = {
2450
- "rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
2451
- "rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_cocqs_6",
2452
- "rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
2453
- "rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
2454
- "rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
2455
- }, xi = 25, gt = 1e3, yi = [50, 75, 100, 125, 150, 200, 300, 400], Ri = () => {
2456
- const { zoomInIcon: t } = pe();
2457
- return t || /* @__PURE__ */ i(lo, {});
2458
- }, Li = () => {
2459
- const { zoomOutIcon: t } = pe();
2460
- return t || /* @__PURE__ */ i(uo, {});
2461
- }, Ni = () => {
2462
- const { zoomLevel: t, setZoomLevel: e } = Je(), { container: n, contentRef: o } = ye(), { zoomTool: r = !0 } = _e(), { focusedPage: a } = ce(), { rotate: c } = Xe(), { pages: s } = J(), { isSmallScreen: u } = Re(), { localeMessages: l } = de(), d = R(() => {
2463
- e((_) => {
2464
- const m = Math.floor(_ / 25) * 25;
2465
- return Math.min(m + 25, gt);
2466
- });
2467
- }, [e]), f = R(() => {
2468
- e((_) => {
2469
- const m = Math.ceil(_ / 25) * 25;
2470
- return Math.min(m - 25, gt);
2471
- });
2472
- }, [e]), h = k(() => t === xi, [t]), g = k(() => t === gt, [t]), v = k(() => {
2473
- var _;
2474
- return (_ = s.get(a)) == null ? void 0 : _.page.getViewport({ scale: 1, rotation: c });
2475
- }, [s, a, c]), C = R(
2476
- (_) => {
2477
- const m = ((v == null ? void 0 : v.width) || 0) + 2 * $t, T = ((v == null ? void 0 : v.height) || 0) + 2 * $t, S = (o == null ? void 0 : o.clientWidth) || 0, p = (o == null ? void 0 : o.clientHeight) || 0, P = po(_, S, p, m, T);
2478
- e(P);
2479
- },
2480
- [e, v]
2481
- ), w = R(
2482
- (_) => {
2483
- typeof _ == "number" ? e(_) : C(_);
2484
- },
2485
- [e, C]
2486
- );
2487
- return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ z("div", { className: Oe["rp-zoom-wrapper"], children: [
2488
- /* @__PURE__ */ i(q, { content: l == null ? void 0 : l.zoomOutTooltip, children: /* @__PURE__ */ i(
2489
- re,
2490
- {
2491
- disabled: h,
2492
- onClick: f,
2493
- "aria-label": l == null ? void 0 : l.zoomOutTooltip,
2494
- children: /* @__PURE__ */ i(Li, {})
2495
- }
2496
- ) }),
2497
- !u && /* @__PURE__ */ i(
2498
- fn,
2499
- {
2500
- container: n,
2501
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: l == null ? void 0 : l.zoomSelectTooltip, children: /* @__PURE__ */ z(
2502
- re,
2503
- {
2504
- className: Oe["rp-current-zoom-wrapper"],
2505
- "aria-label": l == null ? void 0 : l.zoomSelectTooltip,
2506
- children: [
2507
- /* @__PURE__ */ i("span", { className: Oe["rp-current-zoom-text"], children: t }),
2508
- /* @__PURE__ */ i("span", { className: Oe["rp-current-zoom-text"], children: "%" }),
2509
- /* @__PURE__ */ i(Me, { className: Oe["rp-current-zoom-icon"] })
2510
- ]
2511
- }
2512
- ) }) }),
2513
- style: { minWidth: "200px" },
2514
- align: "center",
2515
- children: /* @__PURE__ */ z("div", { className: Oe["rp-zoom-dropdown-content"], children: [
2516
- /* @__PURE__ */ z(qe, { children: [
2517
- /* @__PURE__ */ i(we, { onClick: () => w(at.ACTUAL), children: l == null ? void 0 : l.zoomActualSize }),
2518
- /* @__PURE__ */ i(we, { onClick: () => w(at.PAGE_FIT), children: l == null ? void 0 : l.zoomPageFit }),
2519
- /* @__PURE__ */ i(we, { onClick: () => w(at.PAGE_WIDTH), children: l == null ? void 0 : l.zoomPageWidth })
2520
- ] }),
2521
- /* @__PURE__ */ i(Rt, {}),
2522
- /* @__PURE__ */ i(qe, { children: yi.map((_) => /* @__PURE__ */ z(we, { onClick: () => w(_), children: [
2523
- _,
2524
- " %"
2525
- ] }, _)) })
2526
- ] })
2527
- }
2528
- ),
2529
- /* @__PURE__ */ i(q, { content: l == null ? void 0 : l.zoomInTooltip, children: /* @__PURE__ */ i(
2530
- re,
2531
- {
2532
- disabled: g,
2533
- onClick: d,
2534
- "aria-label": l == null ? void 0 : l.zoomInTooltip,
2535
- children: /* @__PURE__ */ i(Ri, {})
2536
- }
2537
- ) })
2538
- ] }) : null;
2539
- }, oe = {
2540
- "rp-search-tool-content": "_rp-search-tool-content_jvchu_1",
2541
- "rp-search-tool-input": "_rp-search-tool-input_jvchu_8",
2542
- "rp-search-tool-input-icon": "_rp-search-tool-input-icon_jvchu_14",
2543
- "rp-search-tool-controls": "_rp-search-tool-controls_jvchu_24",
2544
- "rp-search-tool-input-wrapper": "_rp-search-tool-input-wrapper_jvchu_32",
2545
- "rp-search-tool-input-checkboxes": "_rp-search-tool-input-checkboxes_jvchu_38",
2546
- "rp-search-tool-input-clear": "_rp-search-tool-input-clear_jvchu_43",
2547
- "rp-search-input": "_rp-search-input_jvchu_57",
2548
- "rp-search-icon-info": "_rp-search-icon-info_jvchu_62"
2549
- }, on = () => {
2550
- const { searchIcon: t } = pe();
2551
- return t || /* @__PURE__ */ i(ho, {});
2552
- }, Ei = () => {
2553
- const { container: t } = ye(), [e, n] = G(!1), { pdf: o } = J(), [r, a] = G(null), {
2554
- searchOptions: c,
2555
- setSearchOptions: s,
2556
- loading: u,
2557
- setSearch: l,
2558
- totalMatches: d,
2559
- currentMatchPosition: f,
2560
- nextMatch: h,
2561
- prevMatch: g,
2562
- search: v
2563
- } = In(), { searchTool: C = !0 } = _e(), [w, _] = G(v), { localeMessages: m } = de(), T = R(() => {
2564
- n(!0);
2565
- }, []), S = R(() => {
2566
- l(""), _(""), n(!1);
2567
- }, [l]), p = (x) => {
2568
- const N = x.key === "Enter", $ = x.key === " ";
2569
- (N || $) && S();
2570
- }, P = R(
2571
- (x) => {
2572
- x.key === "Escape" && e && S();
2573
- },
2574
- [e]
2575
- ), b = R(
2576
- (x) => {
2577
- x.shiftKey && x.key === "Enter" ? g() : x.key === "Enter" && v !== w ? l(w) : x.key === "Enter" && h();
2578
- },
2579
- [w, g, h, l, v]
2580
- );
2581
- D(() => (window.addEventListener("keydown", P), () => {
2582
- window.removeEventListener("keydown", P);
2583
- }), [P]), D(() => {
2584
- r && r.focus();
2585
- }, [r]);
2586
- const I = R((x) => {
2587
- _(x.target.value);
2588
- }, []), O = R(() => {
2589
- _(""), l("");
2590
- }, [l]), y = k(() => `${f} / ${d}`, [f, d]), { wholeWords: E, matchCase: L } = k(() => c, [c]), F = R(
2591
- (x) => {
2592
- s((N) => ({ ...N, matchCase: x }));
2593
- },
2594
- [s]
2595
- ), A = R(
2596
- (x) => {
2597
- s((N) => ({ ...N, wholeWords: x }));
2598
- },
2599
- [s]
2600
- );
2601
- return D(() => {
2602
- S();
2603
- }, [o, S]), C ? /* @__PURE__ */ i(Ie, { children: /* @__PURE__ */ i(
2604
- kr,
2605
- {
2606
- open: e,
2607
- container: t,
2608
- triggerComponent: /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(re, { onClick: T, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(on, {}) }) }),
2609
- children: /* @__PURE__ */ z("div", { className: oe["rp-search-tool-content"], children: [
2610
- /* @__PURE__ */ z("div", { className: oe["rp-search-tool-input-wrapper"], children: [
2611
- /* @__PURE__ */ z("div", { className: oe["rp-search-tool-input"], children: [
2612
- /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
2613
- cn,
2614
- {
2615
- value: w,
2616
- onKeyDown: b,
2617
- onChange: I,
2618
- icon: /* @__PURE__ */ i(on, {}),
2619
- placeholder: m == null ? void 0 : m.searchInputPlaceholder,
2620
- className: oe["rp-search-input"],
2621
- ref: a,
2622
- children: !!w && /* @__PURE__ */ i("span", { className: oe["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ i(mo, {}) })
2623
- }
2624
- ) }),
2625
- u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(It, {}) }) : /* @__PURE__ */ i("span", { children: y })
2626
- ] }),
2627
- /* @__PURE__ */ z("div", { className: oe["rp-search-tool-input-checkboxes"], children: [
2628
- /* @__PURE__ */ i(Gt, { name: "matchCase", value: L, onChange: F, children: m == null ? void 0 : m.searchMatchCaseLabel }),
2629
- /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: oe["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) }),
2630
- /* @__PURE__ */ i(Gt, { name: "wholeWord", value: E, onChange: A, children: m == null ? void 0 : m.searchWholeWordsLabel }),
2631
- /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: oe["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) })
2632
- ] })
2633
- ] }),
2634
- /* @__PURE__ */ z("div", { className: oe["rp-search-tool-controls"], children: [
2635
- /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchPrevTooltip, children: /* @__PURE__ */ i(re, { onClick: g, "aria-label": m == null ? void 0 : m.searchPrevTooltip, children: /* @__PURE__ */ i(
2636
- Me,
2637
- {
2638
- className: oe["rp-search-tool-input-icon"],
2639
- "aria-disabled": !d
2640
- }
2641
- ) }) }),
2642
- /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchNextTooltip, children: /* @__PURE__ */ i(re, { onClick: h, "aria-label": m == null ? void 0 : m.searchNextTooltip, children: /* @__PURE__ */ i(
2643
- Me,
2644
- {
2645
- style: { transform: "rotate(180deg" },
2646
- className: oe["rp-search-tool-input-icon"],
2647
- "aria-disabled": !d
2648
- }
2649
- ) }) }),
2650
- /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchCloseButtonTooltip, children: /* @__PURE__ */ i(
2651
- re,
2652
- {
2653
- onKeyDown: p,
2654
- "aria-label": m == null ? void 0 : m.searchCloseButtonTooltip,
2655
- children: /* @__PURE__ */ i(gn, { onClick: S, className: oe["rp-search-tool-input-icon"] })
2656
- }
2657
- ) })
2658
- ] })
2659
- ] })
2660
- }
2661
- ) }) : null;
2662
- }, Oi = "_loading_1ln1d_1", De = {
2663
- "rp-loading-overlay": "_rp-loading-overlay_1ln1d_1",
2664
- "rp-loading-modal": "_rp-loading-modal_1ln1d_14",
2665
- "rp-loading-title": "_rp-loading-title_1ln1d_27",
2666
- "rp-loading-progress-bar": "_rp-loading-progress-bar_1ln1d_35",
2667
- "rp-loading-progress": "_rp-loading-progress_1ln1d_35",
2668
- "rp-loading-cancel-button": "_rp-loading-cancel-button_1ln1d_52",
2669
- loading: Oi
2670
- }, Di = ({ percentage: t }) => {
2671
- const { cancel: e } = tt(), { localeMessages: n } = de();
2672
- return t < 1 ? null : /* @__PURE__ */ i("div", { className: ie(De["rp-loading-overlay"]), children: /* @__PURE__ */ z("div", { className: ie(De["rp-loading-modal"]), children: [
2673
- /* @__PURE__ */ z("div", { className: ie(De["rp-loading-title"]), children: [
2674
- n == null ? void 0 : n.printLoadingMessage,
2675
- "..."
2676
- ] }),
2677
- /* @__PURE__ */ i("div", { className: ie(De["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
2678
- "div",
2679
- {
2680
- className: ie(De["rp-loading-progress"]),
2681
- style: { width: `${t}%` }
2682
- }
2683
- ) }),
2684
- /* @__PURE__ */ i("button", { className: ie(De["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
2685
- ] }) });
2686
- }, zi = Ke((t, e) => {
2687
- const { showPrintProgress: n } = _e(), { progress: o } = tt(), { isSmallScreen: r } = Re(), { percentage: a } = o || {}, c = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2688
- return /* @__PURE__ */ z("div", { children: [
2689
- /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: Ae["rp-toolbar-content"], children: /* @__PURE__ */ z("div", { className: Ae["rp-toolbar-wrapper"], style: c(), children: [
2690
- /* @__PURE__ */ z("div", { "data-rp": "topBarLeft", className: Ae["rp-toolbar-start"], children: [
2691
- /* @__PURE__ */ i(Ei, {}),
2692
- /* @__PURE__ */ i(Ko, {})
2693
- ] }),
2694
- /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(Ni, {}) }),
2695
- /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(Ii, {}) })
2696
- ] }) }),
2697
- n && a ? /* @__PURE__ */ i(Di, { percentage: a }) : null
2698
- ] });
2699
- }), vt = {
2700
- "rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_4wlw3_1",
2701
- "rp-sidebar-content": "_rp-sidebar-content_4wlw3_1",
2702
- "rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_4wlw3_16",
2703
- "rp-thumbnail-dragging": "_rp-thumbnail-dragging_4wlw3_21"
2704
- }, Fe = {
2705
- "rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
2706
- "rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
2707
- "rp-thumbnail": "_rp-thumbnail_3fenb_1",
2708
- "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
2709
- "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
2710
- }, Ai = (t) => {
2711
- const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ce(), c = k(() => o ? Fe["rp-thumbnail-active"] : "", [o]), s = k(() => ({
2712
- width: Math.round(r.width),
2713
- height: Math.round(r.height)
2714
- }), [r]), u = R(() => {
2715
- n && a(n);
2716
- }, [a, n]);
2717
- return /* @__PURE__ */ z(
2718
- "div",
2719
- {
2720
- onClick: u,
2721
- id: `page-${n}`,
2722
- className: Fe["rp-thumbnail-wrapper"],
2723
- children: [
2724
- /* @__PURE__ */ i("div", { className: ie(c, Fe["rp-thumbnail"]), children: e ? /* @__PURE__ */ i(
2725
- "img",
2726
- {
2727
- src: e,
2728
- width: s.width,
2729
- height: s.height,
2730
- alt: "thumbnail"
2731
- }
2732
- ) : /* @__PURE__ */ i(
2733
- "div",
2734
- {
2735
- className: Fe["rp-thumbnail-loader"],
2736
- style: {
2737
- width: `${s.width}px`,
2738
- height: `${s.height}px`
2739
- },
2740
- children: /* @__PURE__ */ i(It, {})
2741
- }
2742
- ) }),
2743
- /* @__PURE__ */ i("div", { className: Fe["rp-thumbnail-text"], children: n })
2744
- ]
2745
- }
2746
- );
2747
- }, an = {
2748
- "rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
2749
- "rp-thumbnails": "_rp-thumbnails_16vqr_1"
2750
- }, Fi = 16, ki = (t, e) => {
2751
- const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
2752
- t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Fi);
2753
- }, Mi = Ke((t, e) => {
2754
- const { show: n } = t, { focusedPage: o, totalPages: r } = ce(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: u } = Pn(), l = W(null), d = W(1);
2755
- sn(e, () => l.current);
2756
- const f = k(() => Object.values(a), [a]), h = R(() => {
2757
- const g = s + 1;
2758
- g <= r && c(g);
2759
- }, [c, r, s]);
2760
- return D(() => {
2761
- o > s ? u(o) : n && d.current !== o && (ki(l.current, o), d.current = o);
2762
- }, [o, s, u, n, f]), Cr(l.current, h), /* @__PURE__ */ i("div", { ref: l, className: an["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: an["rp-thumbnails"], children: n ? f.map((g, v) => {
2763
- var C, w;
2764
- return /* @__PURE__ */ i(
2765
- Ai,
2766
- {
2767
- isFocused: o === ((C = g.page) == null ? void 0 : C.pageNumber),
2768
- pageNumber: (w = g.page) == null ? void 0 : w.pageNumber,
2769
- thumbnailSrc: g.thumbnailSrc,
2770
- loading: g.loading,
2771
- viewport: g.viewport
2772
- },
2773
- v
2774
- );
2775
- }) : null }) });
2776
- }), Wi = () => {
2777
- const { thumbnailIcon: t } = pe();
2778
- return t || /* @__PURE__ */ i(br, {});
2779
- }, Hi = () => {
2780
- const { active: t, setActive: e } = Pn(), [n, o] = G(200), r = W(null), { thumbnailTool: a, sidebarEnable: c } = _e(), { localeMessages: s } = de(), u = R(() => {
2781
- e((d) => !d);
2782
- }, []), l = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: t }) : a ? /* @__PURE__ */ i(q, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
2783
- re,
2784
- {
2785
- onClick: u,
2786
- active: t,
2787
- "aria-label": s == null ? void 0 : s.thumbnailTooltip,
2788
- children: /* @__PURE__ */ i(Wi, {})
2789
- }
2790
- ) }) : null, [a, t, u, s]);
2791
- return /* @__PURE__ */ i(Ie, { children: c && /* @__PURE__ */ z(
2792
- "div",
2793
- {
2794
- style: { "--rp-thumbnail-width": `${n}px` },
2795
- className: vt["rp-sidebar-content-wrapper"],
2796
- "data-rp": "sidebar",
2797
- children: [
2798
- /* @__PURE__ */ i("div", { className: vt["rp-sidebar-content"], children: l }),
2799
- /* @__PURE__ */ z(
2800
- "div",
2801
- {
2802
- "data-rp": "thumbnailSidebar",
2803
- hidden: !t,
2804
- className: vt["rp-thumbnails-wrapper"],
2805
- children: [
2806
- /* @__PURE__ */ i(Mi, { show: t, ref: r }),
2807
- /* @__PURE__ */ i(Tr, { onWidthChange: o, thumbnailRef: r })
2808
- ]
2809
- }
2810
- )
2811
- ]
2812
- }
2813
- ) });
2814
- }, Is = Ke((t, e) => {
2815
- const { children: n, slots: o, icons: r, style: a, className: c, mobileWidth: s, onLoaded: u, cleanupOnLoaded: l } = t, [d, f] = G(null), { setContainer: h, setContentRef: g } = ye(), { loading: v } = J(), { LoaderImageComponent: C } = hn();
2816
- return D(() => (u && u(), () => {
2817
- l && l();
2818
- }), [u, l]), /* @__PURE__ */ i("div", { ref: e, className: ie(Te["rp-theme-variables"], Te["rp-container"]), children: /* @__PURE__ */ i(Rr, { mobileWidth: s, children: /* @__PURE__ */ i(Pr, { slots: o, children: /* @__PURE__ */ i(Sr, { icons: r, children: /* @__PURE__ */ z(
2819
- Ir,
2820
- {
2821
- getContainerRef: h,
2822
- toolbarRef: d,
2823
- style: a,
2824
- className: c,
2825
- children: [
2826
- /* @__PURE__ */ z(xr, { children: [
2827
- /* @__PURE__ */ z("div", { className: Te["rp-layout"], children: [
2828
- /* @__PURE__ */ i(zi, { ref: f }),
2829
- /* @__PURE__ */ z("div", { className: Te["rp-content"], children: [
2830
- /* @__PURE__ */ i("div", { className: Te["rp-sidebar"], children: /* @__PURE__ */ i(Hi, {}) }),
2831
- /* @__PURE__ */ i("div", { ref: g, className: Te["rp-pages"], children: n })
2832
- ] })
2833
- ] }),
2834
- /* @__PURE__ */ i(yr, {})
2835
- ] }),
2836
- v ? /* @__PURE__ */ i(
2837
- "div",
2838
- {
2839
- className: Te["rp-loader"],
2840
- style: {
2841
- position: "absolute",
2842
- top: 0,
2843
- left: 0,
2844
- right: 0,
2845
- bottom: 0,
2846
- width: "100%",
2847
- height: "100%"
2848
- },
2849
- children: /* @__PURE__ */ i(
2850
- "div",
2851
- {
2852
- style: {
2853
- display: "flex",
2854
- justifyContent: "center",
2855
- alignItems: "center",
2856
- height: "100%",
2857
- width: "100%"
2858
- },
2859
- children: C && /* @__PURE__ */ i(C, {})
2860
- }
2861
- )
2862
- }
2863
- ) : null
2864
- ]
2865
- }
2866
- ) }) }) }) });
2867
- });
2868
- export {
2869
- Po as A,
2870
- zi as B,
2871
- wo as C,
2872
- Uo as D,
2873
- Ai as E,
2874
- Zn as F,
2875
- Mi as G,
2876
- Hi as H,
2877
- Di as L,
2878
- Pi as M,
2879
- Si as O,
2880
- _s as P,
2881
- Ts as R,
2882
- Cs as S,
2883
- bs as T,
2884
- Ni as Z,
2885
- ws as a,
2886
- Is as b,
2887
- Vn as c,
2888
- tt as d,
2889
- In as e,
2890
- wn as f,
2891
- fo as g,
2892
- bn as h,
2893
- go as i,
2894
- Cn as j,
2895
- vo as k,
2896
- Tn as l,
2897
- Pn as m,
2898
- _o as n,
2899
- Sn as o,
2900
- bo as p,
2901
- So as q,
2902
- Lt as r,
2903
- $o as s,
2904
- qo as t,
2905
- ce as u,
2906
- Ko as v,
2907
- pi as w,
2908
- Kn as x,
2909
- Ii as y,
2910
- Ei as z
2911
- };