@pdf-viewer/react 1.6.0-beta.2 → 1.6.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{RPDefaultLayout-db184803.js → RPDefaultLayout-f579f051.js} +754 -745
- package/dist/assets/Container.css +1 -1
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/components/RPController.js +52 -51
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/Container.js +7 -6
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +3 -2
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +7 -26
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/contexts/ZoomContext.js +17 -16
- package/dist/main.js +1 -1
- package/dist/types/utils/constants.d.ts +1 -0
- package/dist/types/utils/getZoomLevel.d.ts +2 -2
- package/dist/types/utils/types.d.ts +5 -2
- package/dist/utils/constants.js +3 -2
- package/dist/utils/getZoomLevel.js +13 -9
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePinch.js +68 -17
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/dist/utils/types.js +9 -9
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as i, Fragment as _e, jsxs as A } from "react/jsx-runtime";
|
|
2
2
|
import * as U from "react";
|
|
3
|
-
import { useRef as W, useEffect as F, useCallback as L, useState as H, createContext as
|
|
3
|
+
import { useRef as W, useEffect as F, useCallback as L, useState as H, createContext as Xe, useContext as Ye, useMemo as M, forwardRef as We, useImperativeHandle as dn, createElement as Ve, PureComponent as tr, Component as nr, memo as rr } from "react";
|
|
4
4
|
import { ChevronUpIcon as Me } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as ne } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as un } from "./components/ui/Input.js";
|
|
7
7
|
import { useScrollModeContext as Oe } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as X } from "./contexts/RPDocumentContext.js";
|
|
9
9
|
import { useDarkModeContext as or } from "./contexts/DarkModeContext.js";
|
|
10
|
-
import { ViewMode as
|
|
11
|
-
import { useRotationContext as
|
|
10
|
+
import { ViewMode as Be, ScrollMode as ee, AnnotationSubType as Ft, SelectionMode as ir, ZoomLevel as at } from "./utils/types.js";
|
|
11
|
+
import { useRotationContext as Je } from "./contexts/RotationContext.js";
|
|
12
12
|
import { useLayerContext as ar } from "./contexts/LayerContext.js";
|
|
13
|
-
import { useZoomContext as
|
|
14
|
-
import { useViewModeContext as
|
|
13
|
+
import { useZoomContext as Qe } from "./contexts/ZoomContext.js";
|
|
14
|
+
import { useViewModeContext as He } from "./contexts/ViewModeContext.js";
|
|
15
15
|
import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
|
|
16
16
|
import { useVirtualGridContext as pn } from "./contexts/VirtualGridContext.js";
|
|
17
17
|
import { useSelectionModeContext as sr } from "./contexts/SelectionModeContext.js";
|
|
@@ -60,9 +60,9 @@ import { FileUploadTool as vn } from "./components/layout/toolbar/FileUploadTool
|
|
|
60
60
|
import { DarkModeTool as Gr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
61
61
|
import { ThreeDotIcon as Vr } from "./components/icons/ThreeDotIcon.js";
|
|
62
62
|
import { UIDropDown as _n } from "./components/ui/DropDown.js";
|
|
63
|
-
import { e as Ur, a as yt, P as
|
|
63
|
+
import { e as Ur, a as yt, P as $e, c as ke, g as xt, i as qr, k as Zr, f as Br } from "./index-1cb41342.js";
|
|
64
64
|
import { D as jr, u as ct } from "./index-aa2d3884.js";
|
|
65
|
-
import { a as Kr, u as Xr, F as Yr, b as Jr, G as
|
|
65
|
+
import { a as Kr, u as Xr, F as Yr, b as Jr, G as je } from "./index-7279fb4e.js";
|
|
66
66
|
import { h as Qr } from "./component-1da194e8.js";
|
|
67
67
|
import { CloseIcon as eo } from "./components/icons/CloseIcon.js";
|
|
68
68
|
import { dateFormatter as Ht } from "./utils/dateFormatter.js";
|
|
@@ -70,42 +70,43 @@ import { PropertyItem as to } from "./components/layout/toolbar/PropertyItem.js"
|
|
|
70
70
|
import { useOtherToolContext as no, OtherToolProvider as ro } from "./contexts/OtherToolContext.js";
|
|
71
71
|
import { DocumentProperties as oo } from "./components/layout/toolbar/DocumentProperties.js";
|
|
72
72
|
import { RotateTool as io } from "./components/layout/toolbar/RotateTool.js";
|
|
73
|
-
import {
|
|
73
|
+
import { ViewModeTool as ao } from "./components/layout/toolbar/ViewModeTool.js";
|
|
74
|
+
import { ScrollModeTool as so } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
74
75
|
import { MenuSeparator as It } from "./components/layout/toolbar/MenuSeparator.js";
|
|
75
|
-
import { FileDownloadDefaultIcon as
|
|
76
|
+
import { FileDownloadDefaultIcon as co } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
76
77
|
import { MenuItem as ve } from "./components/layout/toolbar/MenuItem.js";
|
|
77
|
-
import { PrintDefaultTool as
|
|
78
|
+
import { PrintDefaultTool as lo } from "./components/icons/PrintDefaultIcon.js";
|
|
78
79
|
import { FullScreenTool as wn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
79
80
|
import { GoToDownIcon as bn } from "./components/icons/GoToDownIcon.js";
|
|
80
|
-
import { SelectionModeTool as
|
|
81
|
-
import { ZoomInIcon as
|
|
82
|
-
import { ZoomOutIcon as
|
|
81
|
+
import { SelectionModeTool as uo } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
82
|
+
import { ZoomInIcon as po } from "./components/icons/ZoomInIcon.js";
|
|
83
|
+
import { ZoomOutIcon as ho } from "./components/icons/ZoomOutIcon.js";
|
|
83
84
|
import { PAGE_PADDING as $t } from "./utils/constants.js";
|
|
84
|
-
import { getZoomLevel as
|
|
85
|
-
import { SearchIcon as
|
|
85
|
+
import { getZoomLevel as mo } from "./utils/getZoomLevel.js";
|
|
86
|
+
import { SearchIcon as fo } from "./components/icons/SearchIcon.js";
|
|
86
87
|
import { c as K, S as Gt } from "./SearchCloseButton-959cc1ed.js";
|
|
87
88
|
import { UICheckbox as Vt } from "./components/ui/Checkbox.js";
|
|
88
|
-
import { ClearIcon as
|
|
89
|
+
import { ClearIcon as go } from "./components/icons/ClearIcon.js";
|
|
89
90
|
import { InfoIcon as Ut } from "./components/icons/InfoIcon.js";
|
|
90
|
-
import './assets/RPDefaultLayout.css';const
|
|
91
|
-
const { viewMode: e } =
|
|
91
|
+
import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) => r < t ? n + o : n, 0), Cn = () => {
|
|
92
|
+
const { viewMode: e } = He(), { scrollMode: t } = Oe(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = oe(), c = W(), { columnCount: s } = pn(), { widths: d, heights: u } = tt(), p = W(t), f = W(e), h = W(s), { targetScrollPage: g } = fn();
|
|
92
93
|
F(() => {
|
|
93
94
|
n != null && n.scrollToItem && (c.current = n);
|
|
94
95
|
}, [n]), F(() => {
|
|
95
|
-
p.current = t,
|
|
96
|
+
p.current = t, f.current = e;
|
|
96
97
|
}, [t, e]);
|
|
97
|
-
const
|
|
98
|
-
(
|
|
98
|
+
const P = L(
|
|
99
|
+
(v, S) => {
|
|
99
100
|
if (!r)
|
|
100
101
|
return;
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
103
|
-
const
|
|
104
|
-
left: d[
|
|
102
|
+
const m = Math.ceil(v / 2) * 2 - 1;
|
|
103
|
+
if (v === m + 1) {
|
|
104
|
+
const C = {
|
|
105
|
+
left: d[m],
|
|
105
106
|
top: 0
|
|
106
107
|
};
|
|
107
108
|
return new Promise(
|
|
108
|
-
(l) => st(r,
|
|
109
|
+
(l) => st(r, C, l)
|
|
109
110
|
);
|
|
110
111
|
}
|
|
111
112
|
const w = {
|
|
@@ -114,104 +115,104 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
|
|
|
114
115
|
};
|
|
115
116
|
return r == null ? void 0 : r.scrollTo({
|
|
116
117
|
...w,
|
|
117
|
-
behavior:
|
|
118
|
+
behavior: S
|
|
118
119
|
});
|
|
119
120
|
},
|
|
120
121
|
[r, d, st]
|
|
121
122
|
);
|
|
122
123
|
return F(() => {
|
|
123
|
-
p.current = t,
|
|
124
|
+
p.current = t, f.current = e;
|
|
124
125
|
}, [t, e]), F(() => {
|
|
125
126
|
h.current = s;
|
|
126
127
|
}, [s]), { scrollToPage: L(
|
|
127
|
-
(
|
|
128
|
-
a(
|
|
129
|
-
const
|
|
130
|
-
let w =
|
|
131
|
-
if (
|
|
132
|
-
|
|
128
|
+
(v, S = "smooth") => {
|
|
129
|
+
a(v);
|
|
130
|
+
const m = v - 1;
|
|
131
|
+
let w = m, C = 0;
|
|
132
|
+
if (f.current === Be.DUAL_PAGE && p.current === ee.PAGE_SCROLLING) {
|
|
133
|
+
P(v, S);
|
|
133
134
|
return;
|
|
134
135
|
}
|
|
135
136
|
if (p.current === ee.PAGE_SCROLLING) {
|
|
136
|
-
a(
|
|
137
|
+
a(v);
|
|
137
138
|
return;
|
|
138
139
|
}
|
|
139
140
|
if (!c.current || !o)
|
|
140
141
|
return;
|
|
141
142
|
const l = o;
|
|
142
|
-
if (
|
|
143
|
-
|
|
143
|
+
if (g.current = v, p.current === ee.HORIZONTAL_SCROLLING) {
|
|
144
|
+
C = m;
|
|
144
145
|
const y = {
|
|
145
|
-
left:
|
|
146
|
+
left: Ge(d, C),
|
|
146
147
|
top: 0
|
|
147
148
|
};
|
|
148
149
|
return l.scrollTo({
|
|
149
150
|
...y,
|
|
150
|
-
behavior:
|
|
151
|
+
behavior: S
|
|
151
152
|
});
|
|
152
153
|
}
|
|
153
|
-
if (
|
|
154
|
-
|
|
154
|
+
if (f.current === Be.DUAL_PAGE) {
|
|
155
|
+
C = m % 2, w = Math.floor(m / 2);
|
|
155
156
|
const y = {
|
|
156
|
-
left:
|
|
157
|
-
top:
|
|
157
|
+
left: Ge(d, C),
|
|
158
|
+
top: Ge(u, w)
|
|
158
159
|
};
|
|
159
160
|
return l.scrollTo({
|
|
160
161
|
...y,
|
|
161
|
-
behavior:
|
|
162
|
+
behavior: S
|
|
162
163
|
});
|
|
163
164
|
}
|
|
164
|
-
const
|
|
165
|
+
const T = {
|
|
165
166
|
left: 0,
|
|
166
|
-
top:
|
|
167
|
+
top: Ge(u, w)
|
|
167
168
|
};
|
|
168
169
|
return l.scrollTo({
|
|
169
|
-
...
|
|
170
|
-
behavior:
|
|
170
|
+
...T,
|
|
171
|
+
behavior: S
|
|
171
172
|
});
|
|
172
173
|
},
|
|
173
174
|
[
|
|
174
175
|
o,
|
|
175
176
|
s,
|
|
176
|
-
|
|
177
|
+
P,
|
|
177
178
|
a,
|
|
178
179
|
st,
|
|
179
180
|
u,
|
|
180
181
|
d
|
|
181
182
|
]
|
|
182
183
|
) };
|
|
183
|
-
},
|
|
184
|
-
const [t, n] = H(e), [o, r] = H(0), { scrollToPage: a } = Cn(), c = W(1), { viewMode: s } =
|
|
185
|
-
(
|
|
186
|
-
if (!/^[0-9]*$/g.test(
|
|
184
|
+
}, vo = (e = 1) => {
|
|
185
|
+
const [t, n] = H(e), [o, r] = H(0), { scrollToPage: a } = Cn(), c = W(1), { viewMode: s } = He(), { scrollMode: d } = Oe(), u = St(t, 100), p = L(
|
|
186
|
+
(b) => {
|
|
187
|
+
if (!/^[0-9]*$/g.test(b.toString()) || !b)
|
|
187
188
|
return { success: !1, currentPage: c.current };
|
|
188
|
-
const
|
|
189
|
-
return
|
|
189
|
+
const S = +b;
|
|
190
|
+
return S < 0 || S > o ? { success: !1, currentPage: c.current } : (n(S), c.current = S, { success: !0, currentPage: +b });
|
|
190
191
|
},
|
|
191
192
|
[o]
|
|
192
|
-
),
|
|
193
|
-
(
|
|
194
|
-
const
|
|
195
|
-
return
|
|
193
|
+
), f = L(p, [p]), h = L(
|
|
194
|
+
(b) => {
|
|
195
|
+
const v = p(b);
|
|
196
|
+
return v.success && a(v.currentPage), v;
|
|
196
197
|
},
|
|
197
198
|
[p, a]
|
|
198
|
-
),
|
|
199
|
-
let
|
|
200
|
-
h(
|
|
201
|
-
}, [h, t, s, d]),
|
|
202
|
-
let
|
|
203
|
-
h(
|
|
199
|
+
), g = L(() => {
|
|
200
|
+
let b = t - 1;
|
|
201
|
+
h(b);
|
|
202
|
+
}, [h, t, s, d]), P = L(() => {
|
|
203
|
+
let b = t + 1;
|
|
204
|
+
h(b);
|
|
204
205
|
}, [h, t, s, d]);
|
|
205
206
|
return {
|
|
206
207
|
focusedPage: u,
|
|
207
208
|
totalPages: o,
|
|
208
|
-
setFocusedPage:
|
|
209
|
+
setFocusedPage: f,
|
|
209
210
|
setTotalPages: r,
|
|
210
|
-
nextPage:
|
|
211
|
-
prevPage:
|
|
211
|
+
nextPage: P,
|
|
212
|
+
prevPage: g,
|
|
212
213
|
goToPage: h
|
|
213
214
|
};
|
|
214
|
-
}, Tn =
|
|
215
|
+
}, Tn = Xe({
|
|
215
216
|
focusedPage: 0,
|
|
216
217
|
setFocusedPage: (e) => {
|
|
217
218
|
},
|
|
@@ -224,10 +225,10 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
|
|
|
224
225
|
nextPage: () => {
|
|
225
226
|
}
|
|
226
227
|
}), oe = () => {
|
|
227
|
-
const e =
|
|
228
|
+
const e = Ye(Tn);
|
|
228
229
|
return typeof (e == null ? void 0 : e.focusedPage) > "u" && $r.error("Please use this hooks inside children component of RPProvider"), e;
|
|
229
|
-
},
|
|
230
|
-
const { pdf: t } = X(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: d } =
|
|
230
|
+
}, Is = ({ children: e }) => {
|
|
231
|
+
const { pdf: t } = X(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: d } = vo();
|
|
231
232
|
return F(() => {
|
|
232
233
|
t != null && t.numPages && (a(t.numPages), r(1));
|
|
233
234
|
}, [t, a, r]), /* @__PURE__ */ i(
|
|
@@ -246,7 +247,7 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
|
|
|
246
247
|
}
|
|
247
248
|
);
|
|
248
249
|
};
|
|
249
|
-
const
|
|
250
|
+
const _o = () => {
|
|
250
251
|
const { pdf: e, pages: t } = X(), [n, o] = H({
|
|
251
252
|
loadedPages: 0,
|
|
252
253
|
totalPages: 0,
|
|
@@ -255,7 +256,7 @@ const vo = () => {
|
|
|
255
256
|
F(() => {
|
|
256
257
|
p.current;
|
|
257
258
|
}, [p]);
|
|
258
|
-
const
|
|
259
|
+
const f = L(() => {
|
|
259
260
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
260
261
|
const w = document.querySelector(".rp-print-zone");
|
|
261
262
|
w && w.remove();
|
|
@@ -265,13 +266,13 @@ const vo = () => {
|
|
|
265
266
|
totalPages: 0,
|
|
266
267
|
percentage: 0
|
|
267
268
|
});
|
|
268
|
-
}, []),
|
|
269
|
+
}, []), g = () => {
|
|
269
270
|
p.current = !0;
|
|
270
|
-
},
|
|
271
|
+
}, P = async ({
|
|
271
272
|
scratchCanvas: w,
|
|
272
|
-
pdfDocument:
|
|
273
|
+
pdfDocument: C,
|
|
273
274
|
pageNumber: l,
|
|
274
|
-
viewerPdfPage:
|
|
275
|
+
viewerPdfPage: T,
|
|
275
276
|
printResolution: _,
|
|
276
277
|
optionalContentConfigPromise: y,
|
|
277
278
|
printAnnotationStoragePromise: E
|
|
@@ -281,11 +282,11 @@ const vo = () => {
|
|
|
281
282
|
return;
|
|
282
283
|
}
|
|
283
284
|
const I = _ / pr.PDF;
|
|
284
|
-
w.width = Math.floor(
|
|
285
|
+
w.width = Math.floor(T.width * I), w.height = Math.floor(T.height * I);
|
|
285
286
|
const N = w.getContext("2d");
|
|
286
287
|
N.save(), N.fillStyle = "rgb(255, 255, 255)", N.fillRect(0, 0, w.width, w.height), N.restore();
|
|
287
288
|
const [R, z] = await Promise.all([
|
|
288
|
-
|
|
289
|
+
C.getPage(l),
|
|
289
290
|
E
|
|
290
291
|
]);
|
|
291
292
|
if (p.current) {
|
|
@@ -295,7 +296,7 @@ const vo = () => {
|
|
|
295
296
|
const O = {
|
|
296
297
|
canvasContext: N,
|
|
297
298
|
transform: [I, 0, 0, I, 0, 0],
|
|
298
|
-
viewport: R.getViewport({ scale: 1, rotation:
|
|
299
|
+
viewport: R.getViewport({ scale: 1, rotation: T.rotation }),
|
|
299
300
|
intent: "print",
|
|
300
301
|
annotationMode: hr.ENABLE_STORAGE,
|
|
301
302
|
optionalContentConfigPromise: y,
|
|
@@ -306,50 +307,50 @@ const vo = () => {
|
|
|
306
307
|
} catch (D) {
|
|
307
308
|
throw D instanceof mr || console.error(D), D;
|
|
308
309
|
}
|
|
309
|
-
},
|
|
310
|
+
}, b = L(() => {
|
|
310
311
|
const w = window.print;
|
|
311
|
-
return new Promise((
|
|
312
|
+
return new Promise((C) => {
|
|
312
313
|
const l = (y) => {
|
|
313
314
|
setTimeout(() => {
|
|
314
315
|
w.call(window), setTimeout(() => y(), 20);
|
|
315
316
|
}, 0);
|
|
316
317
|
};
|
|
317
318
|
if (document.querySelector(".rp-print-zone")) {
|
|
318
|
-
l(
|
|
319
|
+
l(C);
|
|
319
320
|
return;
|
|
320
321
|
}
|
|
321
322
|
const _ = new MutationObserver(() => {
|
|
322
|
-
document.querySelector(".rp-print-zone") && (l(
|
|
323
|
+
document.querySelector(".rp-print-zone") && (l(C), _.disconnect());
|
|
323
324
|
});
|
|
324
325
|
_.observe(document.body, { childList: !0, subtree: !0 });
|
|
325
326
|
});
|
|
326
|
-
}, []),
|
|
327
|
-
const
|
|
328
|
-
return l.classList.add("rp-print-page"), await new Promise((
|
|
327
|
+
}, []), v = async (w) => {
|
|
328
|
+
const C = document.createElement("img"), l = document.createElement("div");
|
|
329
|
+
return l.classList.add("rp-print-page"), await new Promise((T, _) => {
|
|
329
330
|
w.toBlob((y) => {
|
|
330
|
-
y ? (
|
|
331
|
-
URL.revokeObjectURL(
|
|
332
|
-
},
|
|
331
|
+
y ? (C.src = URL.createObjectURL(y), C.onload = () => {
|
|
332
|
+
URL.revokeObjectURL(C.src), T();
|
|
333
|
+
}, C.onerror = _) : _(new Error("Failed to create blob"));
|
|
333
334
|
});
|
|
334
335
|
}).catch(() => {
|
|
335
|
-
}), l.appendChild(
|
|
336
|
-
},
|
|
336
|
+
}), l.appendChild(C), l;
|
|
337
|
+
}, S = (w, C) => {
|
|
337
338
|
const l = document.createElement("div");
|
|
338
339
|
l.classList.add("rp-print-zone");
|
|
339
|
-
const
|
|
340
|
+
const T = document.createElement("style"), _ = C.get(1);
|
|
340
341
|
if (_) {
|
|
341
342
|
const { width: y, height: E } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
|
|
342
|
-
|
|
343
|
+
T.innerHTML = `@page { size: ${y}px ${E}px }`;
|
|
343
344
|
}
|
|
344
|
-
return l.appendChild(
|
|
345
|
-
},
|
|
345
|
+
return l.appendChild(T), l.append(...w), l;
|
|
346
|
+
}, m = L(async () => {
|
|
346
347
|
if (!e)
|
|
347
348
|
return;
|
|
348
349
|
h();
|
|
349
|
-
const w = document.createElement("canvas"),
|
|
350
|
+
const w = document.createElement("canvas"), C = [];
|
|
350
351
|
try {
|
|
351
352
|
e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
352
|
-
const
|
|
353
|
+
const T = e.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
|
|
353
354
|
e.annotationStorage.print ?? void 0
|
|
354
355
|
), y = t.size;
|
|
355
356
|
for (const [I, N] of t) {
|
|
@@ -358,21 +359,21 @@ const vo = () => {
|
|
|
358
359
|
return;
|
|
359
360
|
}
|
|
360
361
|
const R = N.page.getViewport({ scale: 1 });
|
|
361
|
-
if (await
|
|
362
|
+
if (await P({
|
|
362
363
|
scratchCanvas: w,
|
|
363
364
|
pdfDocument: e,
|
|
364
365
|
pageNumber: I,
|
|
365
366
|
viewerPdfPage: R,
|
|
366
367
|
printResolution: 150,
|
|
367
|
-
optionalContentConfigPromise:
|
|
368
|
+
optionalContentConfigPromise: T,
|
|
368
369
|
printAnnotationStoragePromise: _
|
|
369
370
|
}), p.current) {
|
|
370
371
|
h();
|
|
371
372
|
return;
|
|
372
373
|
}
|
|
373
|
-
const z = await
|
|
374
|
-
|
|
375
|
-
const O = parseFloat((
|
|
374
|
+
const z = await v(w);
|
|
375
|
+
C.push(z);
|
|
376
|
+
const O = parseFloat((C.length / y * 100).toFixed(2));
|
|
376
377
|
o({
|
|
377
378
|
loadedPages: I,
|
|
378
379
|
totalPages: y,
|
|
@@ -383,8 +384,8 @@ const vo = () => {
|
|
|
383
384
|
h();
|
|
384
385
|
return;
|
|
385
386
|
}
|
|
386
|
-
const E = C
|
|
387
|
-
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await
|
|
387
|
+
const E = S(C, t);
|
|
388
|
+
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await b();
|
|
388
389
|
} catch (l) {
|
|
389
390
|
s(!0), l instanceof Error && u(l);
|
|
390
391
|
} finally {
|
|
@@ -393,20 +394,20 @@ const vo = () => {
|
|
|
393
394
|
}, [e, t, p]);
|
|
394
395
|
return F(() => {
|
|
395
396
|
const w = () => {
|
|
396
|
-
h(),
|
|
397
|
+
h(), f();
|
|
397
398
|
};
|
|
398
399
|
return window.addEventListener("afterprint", w, !0), () => {
|
|
399
400
|
window.removeEventListener("afterprint", w, !0);
|
|
400
401
|
};
|
|
401
|
-
}, [
|
|
402
|
-
print:
|
|
403
|
-
cancel:
|
|
402
|
+
}, [f, h]), {
|
|
403
|
+
print: m,
|
|
404
|
+
cancel: g,
|
|
404
405
|
progress: n,
|
|
405
406
|
isComplete: r,
|
|
406
407
|
isError: c,
|
|
407
408
|
error: d
|
|
408
409
|
};
|
|
409
|
-
}, Pn =
|
|
410
|
+
}, Pn = Xe({
|
|
410
411
|
print: () => {
|
|
411
412
|
},
|
|
412
413
|
cancel: () => {
|
|
@@ -423,78 +424,78 @@ const vo = () => {
|
|
|
423
424
|
console.error("Error in setOnError callback:", t);
|
|
424
425
|
}
|
|
425
426
|
}
|
|
426
|
-
}),
|
|
427
|
-
const [t, n] = H(null), [o, r] = H(null), { print: a, cancel: c, progress: s, isComplete: d, isError: u, error: p } =
|
|
428
|
-
|
|
429
|
-
}, []), h = (
|
|
430
|
-
p &&
|
|
431
|
-
},
|
|
432
|
-
(
|
|
433
|
-
n(() =>
|
|
427
|
+
}), Ls = ({ children: e }) => {
|
|
428
|
+
const [t, n] = H(null), [o, r] = H(null), { print: a, cancel: c, progress: s, isComplete: d, isError: u, error: p } = _o(), f = L((v) => {
|
|
429
|
+
v && typeof v == "function" && r(() => v);
|
|
430
|
+
}, []), h = (v) => {
|
|
431
|
+
p && v(p);
|
|
432
|
+
}, g = L(
|
|
433
|
+
(v) => {
|
|
434
|
+
n(() => v);
|
|
434
435
|
},
|
|
435
436
|
[s, t]
|
|
436
437
|
);
|
|
437
438
|
F(() => {
|
|
438
|
-
d && o &&
|
|
439
|
+
d && o && P();
|
|
439
440
|
}, [d, o]), F(() => {
|
|
440
|
-
u && h((
|
|
441
|
-
console.error(
|
|
441
|
+
u && h((v) => {
|
|
442
|
+
console.error(v);
|
|
442
443
|
});
|
|
443
444
|
}, [u]), F(() => {
|
|
444
445
|
s && t && t(s);
|
|
445
446
|
}, [s, t]);
|
|
446
|
-
const
|
|
447
|
+
const P = () => {
|
|
447
448
|
o && (o(), r(null));
|
|
448
|
-
},
|
|
449
|
+
}, b = {
|
|
449
450
|
print: a,
|
|
450
451
|
cancel: c,
|
|
451
|
-
setOnProgress:
|
|
452
|
-
setOnComplete:
|
|
452
|
+
setOnProgress: g,
|
|
453
|
+
setOnComplete: f,
|
|
453
454
|
setOnError: h,
|
|
454
455
|
progress: s
|
|
455
456
|
};
|
|
456
|
-
return /* @__PURE__ */ i(Pn.Provider, { value:
|
|
457
|
+
return /* @__PURE__ */ i(Pn.Provider, { value: b, children: e });
|
|
457
458
|
}, nt = () => {
|
|
458
|
-
const e =
|
|
459
|
+
const e = Ye(Pn);
|
|
459
460
|
if (!e)
|
|
460
461
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
461
462
|
return e;
|
|
462
|
-
},
|
|
463
|
-
const [e, t] = H({}), { pages: n } = X(), { rotate: o } =
|
|
463
|
+
}, wo = () => {
|
|
464
|
+
const [e, t] = H({}), { pages: n } = X(), { rotate: o } = Je(), r = M(() => Object.keys(e).length, [e]), a = L(
|
|
464
465
|
(s) => {
|
|
465
466
|
if (!n.size || s > n.size)
|
|
466
467
|
return;
|
|
467
|
-
const d = Array.from(n.values()).slice(0, s).map((
|
|
468
|
-
const { thumbnailViewport: h, scale:
|
|
468
|
+
const d = Array.from(n.values()).slice(0, s).map((f) => {
|
|
469
|
+
const { thumbnailViewport: h, scale: g } = Wt(f.page, o);
|
|
469
470
|
return {
|
|
470
|
-
scale:
|
|
471
|
-
page:
|
|
471
|
+
scale: g,
|
|
472
|
+
page: f.page,
|
|
472
473
|
loading: !0,
|
|
473
474
|
viewport: h
|
|
474
475
|
};
|
|
475
|
-
}), u = d.reduce((
|
|
476
|
+
}), u = d.reduce((f, h) => (f[h.page.pageNumber] = h, f), {});
|
|
476
477
|
t(u);
|
|
477
478
|
const p = [];
|
|
478
|
-
for (const
|
|
479
|
-
const h = document.createElement("canvas"),
|
|
480
|
-
scale:
|
|
479
|
+
for (const f of d) {
|
|
480
|
+
const h = document.createElement("canvas"), g = _t(f.page, h, {
|
|
481
|
+
scale: f.scale,
|
|
481
482
|
rotate: o
|
|
482
483
|
}).promise.then(() => {
|
|
483
|
-
const
|
|
484
|
+
const P = h.toDataURL();
|
|
484
485
|
return {
|
|
485
|
-
...
|
|
486
|
-
thumbnailSrc:
|
|
486
|
+
...f,
|
|
487
|
+
thumbnailSrc: P,
|
|
487
488
|
loading: !1
|
|
488
489
|
};
|
|
489
490
|
});
|
|
490
|
-
p.push(
|
|
491
|
+
p.push(g);
|
|
491
492
|
}
|
|
492
|
-
Promise.all(p).then((
|
|
493
|
-
const h =
|
|
494
|
-
(
|
|
493
|
+
Promise.all(p).then((f) => {
|
|
494
|
+
const h = f.reduce(
|
|
495
|
+
(g, P) => (g[P.page.pageNumber] = P, g),
|
|
495
496
|
{}
|
|
496
497
|
);
|
|
497
|
-
t((
|
|
498
|
+
t((g) => ({ ...g, ...h }));
|
|
498
499
|
}).catch(() => {
|
|
499
500
|
});
|
|
500
501
|
},
|
|
@@ -521,22 +522,22 @@ const vo = () => {
|
|
|
521
522
|
}));
|
|
522
523
|
const u = document.createElement("canvas");
|
|
523
524
|
_t(d.page, u, { scale: d.thumbnailScale, rotate: o }).promise.then(() => {
|
|
524
|
-
const p = u.toDataURL(), { thumbnailViewport:
|
|
525
|
+
const p = u.toDataURL(), { thumbnailViewport: f, scale: h } = Wt(d.page, o);
|
|
525
526
|
return {
|
|
526
527
|
scale: h,
|
|
527
528
|
thumbnailSrc: p,
|
|
528
529
|
page: d.page,
|
|
529
530
|
loading: !1,
|
|
530
|
-
viewport:
|
|
531
|
+
viewport: f
|
|
531
532
|
};
|
|
532
533
|
}).then((p) => {
|
|
533
|
-
t((
|
|
534
|
+
t((f) => ({ ...f, [s]: p }));
|
|
534
535
|
});
|
|
535
536
|
},
|
|
536
537
|
[n, o]
|
|
537
538
|
);
|
|
538
539
|
return { thumbnailPages: e, addPage: c, addToPage: a, thumbnailLength: r };
|
|
539
|
-
}, Sn =
|
|
540
|
+
}, Sn = Xe({
|
|
540
541
|
thumbnailPages: {},
|
|
541
542
|
addPage: (e) => {
|
|
542
543
|
},
|
|
@@ -546,11 +547,11 @@ const vo = () => {
|
|
|
546
547
|
setActive: (e) => {
|
|
547
548
|
},
|
|
548
549
|
active: !1
|
|
549
|
-
}), yn = () =>
|
|
550
|
+
}), yn = () => Ye(Sn), Rs = ({
|
|
550
551
|
children: e,
|
|
551
552
|
initialThumbnailsVisible: t
|
|
552
553
|
}) => {
|
|
553
|
-
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } =
|
|
554
|
+
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = wo(), [c, s] = H(t);
|
|
554
555
|
return /* @__PURE__ */ i(
|
|
555
556
|
Sn.Provider,
|
|
556
557
|
{
|
|
@@ -558,21 +559,21 @@ const vo = () => {
|
|
|
558
559
|
children: e
|
|
559
560
|
}
|
|
560
561
|
);
|
|
561
|
-
},
|
|
562
|
-
const [n, o] = H(t), [r, a] = H(!1), { pdf: c, pages: s } = X(), d = tt(), u = W(!n), { currentZoom: p } =
|
|
562
|
+
}, bo = (e = {}, t = "") => {
|
|
563
|
+
const [n, o] = H(t), [r, a] = H(!1), { pdf: c, pages: s } = X(), d = tt(), u = W(!n), { currentZoom: p } = Qe(), [f, h] = H([]), { setFocusedPage: g } = oe(), [P, b] = H(0), { pageScrollElementRef: v, virtualScrollableElementRef: S } = et(), { scrollMode: m } = Oe(), { pagesRef: w } = we(), [C, l] = H(null), T = W({}), _ = M(() => P === 0 ? null : f[P - 1], [P, f]), y = M(() => f.length, [f]);
|
|
563
564
|
F(() => {
|
|
564
565
|
if (!_ || !s)
|
|
565
566
|
return;
|
|
566
|
-
const R =
|
|
567
|
+
const R = S || v;
|
|
567
568
|
if (!R || !w)
|
|
568
569
|
return;
|
|
569
570
|
const z = s.get(_.page), O = w.clientHeight / 2, D = w.clientWidth / 2;
|
|
570
571
|
let x = 0, k = 0;
|
|
571
|
-
|
|
572
|
+
m === ee.PAGE_SCROLLING && g(_.page), m === ee.VERTICAL_SCROLLING && (x = d.heights.slice(0, _.page - 1).reduce((q, B) => q + B, 0)), m === ee.HORIZONTAL_SCROLLING && (k = d.widths.slice(0, _.page - 1).reduce((q, B) => q + B, 0));
|
|
572
573
|
let $;
|
|
573
574
|
if (!z)
|
|
574
575
|
return;
|
|
575
|
-
const j =
|
|
576
|
+
const j = T.current[_.page], Y = z.page.getViewport({ scale: 1 });
|
|
576
577
|
$ = new Tt.TextLayer({
|
|
577
578
|
viewport: Y,
|
|
578
579
|
textContentSource: j,
|
|
@@ -590,18 +591,18 @@ const vo = () => {
|
|
|
590
591
|
});
|
|
591
592
|
}, [
|
|
592
593
|
s,
|
|
593
|
-
|
|
594
|
+
g,
|
|
594
595
|
d,
|
|
595
596
|
_,
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
597
|
+
m,
|
|
598
|
+
S,
|
|
599
|
+
v,
|
|
599
600
|
w
|
|
600
601
|
]);
|
|
601
602
|
const E = L(() => {
|
|
602
|
-
|
|
603
|
+
b((R) => y ? R + 1 > y ? 1 : R + 1 : 0);
|
|
603
604
|
}, [y]), I = L(() => {
|
|
604
|
-
|
|
605
|
+
b((R) => y ? R - 1 <= 0 ? y : R - 1 : 0);
|
|
605
606
|
}, [y]), N = L(async (R) => {
|
|
606
607
|
if (!R)
|
|
607
608
|
return {};
|
|
@@ -616,11 +617,11 @@ const vo = () => {
|
|
|
616
617
|
}, []);
|
|
617
618
|
return F(() => {
|
|
618
619
|
if (!n) {
|
|
619
|
-
u.current = !0, h([]),
|
|
620
|
+
u.current = !0, h([]), b(0);
|
|
620
621
|
return;
|
|
621
622
|
}
|
|
622
|
-
u.current = !1, a(!0), h([]),
|
|
623
|
-
|
|
623
|
+
u.current = !1, a(!0), h([]), b(0), N(c).then((R) => {
|
|
624
|
+
T.current = R;
|
|
624
625
|
const O = Object.keys(R).reduce((D, x) => {
|
|
625
626
|
const k = dr(
|
|
626
627
|
[n],
|
|
@@ -630,24 +631,24 @@ const vo = () => {
|
|
|
630
631
|
).map(($, j) => ({ ...$, page: Number(x), pageMatchIdx: j }));
|
|
631
632
|
return [...D, ...k];
|
|
632
633
|
}, []);
|
|
633
|
-
h(O),
|
|
634
|
+
h(O), b(O.length ? 1 : 0);
|
|
634
635
|
}).catch(() => {
|
|
635
|
-
h([]),
|
|
636
|
+
h([]), b(0);
|
|
636
637
|
}).finally(() => a(!1));
|
|
637
638
|
}, [n, N, c, e]), {
|
|
638
639
|
search: n,
|
|
639
640
|
setSearch: o,
|
|
640
641
|
loading: r,
|
|
641
|
-
matches:
|
|
642
|
+
matches: f,
|
|
642
643
|
totalMatches: y,
|
|
643
|
-
currentMatchPosition:
|
|
644
|
+
currentMatchPosition: P,
|
|
644
645
|
currentMatch: _,
|
|
645
646
|
nextMatch: E,
|
|
646
647
|
prevMatch: I,
|
|
647
|
-
currentMatchElement:
|
|
648
|
+
currentMatchElement: C,
|
|
648
649
|
setCurrentMatchElement: l
|
|
649
650
|
};
|
|
650
|
-
}, xn =
|
|
651
|
+
}, xn = Xe({
|
|
651
652
|
search: "",
|
|
652
653
|
setSearch: (e) => {
|
|
653
654
|
},
|
|
@@ -665,7 +666,7 @@ const vo = () => {
|
|
|
665
666
|
currentMatchElement: null,
|
|
666
667
|
setCurrentMatchElement: (e) => {
|
|
667
668
|
}
|
|
668
|
-
}),
|
|
669
|
+
}), Es = ({
|
|
669
670
|
children: e,
|
|
670
671
|
initialSearch: t
|
|
671
672
|
}) => {
|
|
@@ -677,11 +678,11 @@ const vo = () => {
|
|
|
677
678
|
currentMatch: d,
|
|
678
679
|
search: u,
|
|
679
680
|
matches: p,
|
|
680
|
-
nextMatch:
|
|
681
|
+
nextMatch: f,
|
|
681
682
|
prevMatch: h,
|
|
682
|
-
currentMatchElement:
|
|
683
|
-
setCurrentMatchElement:
|
|
684
|
-
} =
|
|
683
|
+
currentMatchElement: g,
|
|
684
|
+
setCurrentMatchElement: P
|
|
685
|
+
} = bo(n, t);
|
|
685
686
|
return /* @__PURE__ */ i(
|
|
686
687
|
xn.Provider,
|
|
687
688
|
{
|
|
@@ -693,17 +694,17 @@ const vo = () => {
|
|
|
693
694
|
totalMatches: c,
|
|
694
695
|
currentMatchPosition: s,
|
|
695
696
|
currentMatch: d,
|
|
696
|
-
nextMatch:
|
|
697
|
+
nextMatch: f,
|
|
697
698
|
prevMatch: h,
|
|
698
699
|
search: u,
|
|
699
700
|
matches: p,
|
|
700
|
-
currentMatchElement:
|
|
701
|
-
setCurrentMatchElement:
|
|
701
|
+
currentMatchElement: g,
|
|
702
|
+
setCurrentMatchElement: P
|
|
702
703
|
},
|
|
703
704
|
children: e
|
|
704
705
|
}
|
|
705
706
|
);
|
|
706
|
-
}, Lt = () =>
|
|
707
|
+
}, Lt = () => Ye(xn), de = {
|
|
707
708
|
"rp-pages": "_rp-pages_1776r_1",
|
|
708
709
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
|
|
709
710
|
"rp-pages-container": "_rp-pages-container_1776r_11",
|
|
@@ -716,8 +717,8 @@ const vo = () => {
|
|
|
716
717
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
717
718
|
"rp-page": "_rp-page_h7a2q_1",
|
|
718
719
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
719
|
-
},
|
|
720
|
-
const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = W(null), { pages: a } = X(), { rotate: c } =
|
|
720
|
+
}, Co = (e) => {
|
|
721
|
+
const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = W(null), { pages: a } = X(), { rotate: c } = Je(), s = W(), { currentZoom: d } = Qe();
|
|
721
722
|
return F(() => {
|
|
722
723
|
if (!a || d === 0)
|
|
723
724
|
return;
|
|
@@ -725,8 +726,8 @@ const vo = () => {
|
|
|
725
726
|
if (r.current && u) {
|
|
726
727
|
const p = r.current;
|
|
727
728
|
p.hidden = !0;
|
|
728
|
-
const
|
|
729
|
-
|
|
729
|
+
const f = s.current;
|
|
730
|
+
f && f.cancel(), o && o(), s.current = _t(u.page, p, {
|
|
730
731
|
scale: d,
|
|
731
732
|
rotate: c,
|
|
732
733
|
renderForms: !0
|
|
@@ -742,31 +743,31 @@ const vo = () => {
|
|
|
742
743
|
(p = s.current) == null || p.cancel();
|
|
743
744
|
};
|
|
744
745
|
}, [a, t, c, d, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${t}-canvas`, ref: r });
|
|
745
|
-
},
|
|
746
|
+
}, To = "_selecting_1x8te_9", Po = "_endOfContent_1x8te_24", ze = {
|
|
746
747
|
"rp-text-layer": "_rp-text-layer_1x8te_1",
|
|
747
|
-
selecting:
|
|
748
|
-
endOfContent:
|
|
748
|
+
selecting: To,
|
|
749
|
+
endOfContent: Po,
|
|
749
750
|
"rp-text-layer-text": "_rp-text-layer-text_1x8te_38"
|
|
750
|
-
},
|
|
751
|
+
}, So = (e) => {
|
|
751
752
|
const { pageNumber: t } = e, { pages: n } = X(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = Lt(), [s, d] = H(
|
|
752
753
|
[]
|
|
753
|
-
), u = W(), p = W(),
|
|
754
|
-
(w,
|
|
755
|
-
if (l && mn(w,
|
|
756
|
-
|
|
754
|
+
), u = W(), p = W(), f = W(), h = M(() => r.filter((w) => w.pageIndex === t - 1), [r, t]), g = L(
|
|
755
|
+
(w, C, l = !1) => {
|
|
756
|
+
if (l && mn(w, C), !h.length) {
|
|
757
|
+
f.current = void 0, d([]);
|
|
757
758
|
return;
|
|
758
759
|
}
|
|
759
|
-
const
|
|
760
|
-
d(
|
|
760
|
+
const T = hn(h, w, C);
|
|
761
|
+
d(T);
|
|
761
762
|
},
|
|
762
763
|
[h]
|
|
763
|
-
),
|
|
764
|
+
), P = W(), b = W(!1), v = L(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
764
765
|
F(() => ((() => {
|
|
765
|
-
if (
|
|
766
|
+
if (P.current)
|
|
766
767
|
return;
|
|
767
|
-
|
|
768
|
-
const { signal:
|
|
769
|
-
|
|
768
|
+
P.current = new AbortController();
|
|
769
|
+
const { signal: C } = P.current, l = () => {
|
|
770
|
+
v().forEach((_) => {
|
|
770
771
|
const y = _.querySelector(".endOfContent");
|
|
771
772
|
y && (_.appendChild(y), y.style.width = "", y.style.height = "", _.classList.remove(ze.selecting));
|
|
772
773
|
});
|
|
@@ -774,29 +775,29 @@ const vo = () => {
|
|
|
774
775
|
document.addEventListener(
|
|
775
776
|
"pointerdown",
|
|
776
777
|
() => {
|
|
777
|
-
|
|
778
|
+
b.current = !0;
|
|
778
779
|
},
|
|
779
|
-
{ signal:
|
|
780
|
+
{ signal: C }
|
|
780
781
|
), document.addEventListener(
|
|
781
782
|
"pointerup",
|
|
782
783
|
() => {
|
|
783
|
-
|
|
784
|
+
b.current = !1, l();
|
|
784
785
|
},
|
|
785
|
-
{ signal:
|
|
786
|
+
{ signal: C }
|
|
786
787
|
), window.addEventListener(
|
|
787
788
|
"blur",
|
|
788
789
|
() => {
|
|
789
|
-
|
|
790
|
+
b.current = !1, l();
|
|
790
791
|
},
|
|
791
|
-
{ signal:
|
|
792
|
+
{ signal: C }
|
|
792
793
|
), document.addEventListener(
|
|
793
794
|
"keyup",
|
|
794
795
|
() => {
|
|
795
|
-
|
|
796
|
+
b.current || l();
|
|
796
797
|
},
|
|
797
|
-
{ signal:
|
|
798
|
+
{ signal: C }
|
|
798
799
|
);
|
|
799
|
-
let
|
|
800
|
+
let T = null;
|
|
800
801
|
document.addEventListener(
|
|
801
802
|
"selectionchange",
|
|
802
803
|
() => {
|
|
@@ -811,11 +812,11 @@ const vo = () => {
|
|
|
811
812
|
const y = /* @__PURE__ */ new Set();
|
|
812
813
|
for (let x = 0; x < _.rangeCount; x++) {
|
|
813
814
|
const k = _.getRangeAt(x);
|
|
814
|
-
|
|
815
|
+
v().forEach(($) => {
|
|
815
816
|
k.intersectsNode($) && !y.has($) && y.add($);
|
|
816
817
|
});
|
|
817
818
|
}
|
|
818
|
-
|
|
819
|
+
v().forEach((x) => {
|
|
819
820
|
if (y.has(x))
|
|
820
821
|
x.classList.add("selecting");
|
|
821
822
|
else {
|
|
@@ -824,54 +825,54 @@ const vo = () => {
|
|
|
824
825
|
}
|
|
825
826
|
});
|
|
826
827
|
const E = _.getRangeAt(0);
|
|
827
|
-
let N =
|
|
828
|
+
let N = T && (E.compareBoundaryPoints(Range.END_TO_END, T) === 0 || E.compareBoundaryPoints(Range.START_TO_END, T) === 0) ? E.startContainer : E.endContainer;
|
|
828
829
|
N.nodeType === Node.TEXT_NODE && (N = N.parentNode);
|
|
829
830
|
const R = (O = N.parentElement) == null ? void 0 : O.closest(
|
|
830
831
|
ze["rp-text-layer"]
|
|
831
832
|
), z = R == null ? void 0 : R.querySelector(".endOfContent");
|
|
832
|
-
z && R && (z.style.width = R.style.width, z.style.height = R.style.height, (D = N.parentElement) == null || D.insertBefore(z, N.nextSibling)),
|
|
833
|
+
z && R && (z.style.width = R.style.width, z.style.height = R.style.height, (D = N.parentElement) == null || D.insertBefore(z, N.nextSibling)), T = E.cloneRange();
|
|
833
834
|
},
|
|
834
|
-
{ signal:
|
|
835
|
+
{ signal: C }
|
|
835
836
|
);
|
|
836
837
|
})(), () => {
|
|
837
|
-
var
|
|
838
|
-
(
|
|
839
|
-
}), [
|
|
840
|
-
const
|
|
838
|
+
var C;
|
|
839
|
+
(C = P.current) == null || C.abort(), P.current = void 0;
|
|
840
|
+
}), [v]);
|
|
841
|
+
const S = L(() => {
|
|
841
842
|
o.current && o.current.classList.add("selecting");
|
|
842
|
-
}, []),
|
|
843
|
+
}, []), m = L(() => {
|
|
843
844
|
o.current && o.current.classList.remove("selecting");
|
|
844
845
|
}, []);
|
|
845
846
|
return F(() => {
|
|
846
847
|
var l;
|
|
847
|
-
if ((l =
|
|
848
|
+
if ((l = f.current) == null || l.classList.remove("selected"), !s.length || !a || a.pageIndex !== t - 1)
|
|
848
849
|
return;
|
|
849
850
|
const w = h.findIndex(
|
|
850
|
-
(
|
|
851
|
+
(T) => JSON.stringify(T) === JSON.stringify(a)
|
|
851
852
|
);
|
|
852
853
|
if (w === -1)
|
|
853
854
|
return;
|
|
854
|
-
const
|
|
855
|
-
|
|
855
|
+
const C = s.find((T) => T.index === w);
|
|
856
|
+
C && (f.current = C.element, c(C.element), C.element.classList.add("selected"));
|
|
856
857
|
}, [a, s, h]), F(() => {
|
|
857
858
|
const w = n.get(t);
|
|
858
859
|
if (!w || !o.current)
|
|
859
860
|
return;
|
|
860
|
-
const
|
|
861
|
+
const C = o.current;
|
|
861
862
|
return u.current && u.current.cancel(), w.page.getTextContent().then((l) => {
|
|
862
|
-
const
|
|
863
|
+
const T = w.page.getViewport({ scale: 1 });
|
|
863
864
|
return u.current = new Tt.TextLayer({
|
|
864
|
-
viewport:
|
|
865
|
+
viewport: T,
|
|
865
866
|
textContentSource: l,
|
|
866
|
-
container:
|
|
867
|
-
}), p.current = l,
|
|
867
|
+
container: C
|
|
868
|
+
}), p.current = l, C && (C.innerText = ""), u.current.render();
|
|
868
869
|
}).then(() => {
|
|
869
870
|
var y, E;
|
|
870
|
-
[].slice.call(
|
|
871
|
+
[].slice.call(C.children).forEach((I) => {
|
|
871
872
|
I.classList.add(ze["rp-text-layer-text"]);
|
|
872
873
|
});
|
|
873
|
-
const
|
|
874
|
-
|
|
874
|
+
const T = (y = u.current) == null ? void 0 : y.textDivs;
|
|
875
|
+
T && p.current && g(p.current, T);
|
|
875
876
|
const _ = document.createElement("div");
|
|
876
877
|
_.className = "endOfContent", (E = o.current) == null || E.appendChild(_);
|
|
877
878
|
}).catch(() => {
|
|
@@ -881,115 +882,115 @@ const vo = () => {
|
|
|
881
882
|
};
|
|
882
883
|
}, [n, t]), F(() => {
|
|
883
884
|
var l;
|
|
884
|
-
[].slice.call(o.current.children).forEach((
|
|
885
|
-
|
|
885
|
+
[].slice.call(o.current.children).forEach((T) => {
|
|
886
|
+
T.classList.add(ze["rp-text-layer-text"]);
|
|
886
887
|
});
|
|
887
|
-
const
|
|
888
|
-
|
|
889
|
-
}, [
|
|
888
|
+
const C = (l = u.current) == null ? void 0 : l.textDivs;
|
|
889
|
+
C && p.current && g(p.current, C, !0);
|
|
890
|
+
}, [g]), /* @__PURE__ */ i(
|
|
890
891
|
"div",
|
|
891
892
|
{
|
|
892
893
|
"data-rp": `page-${t}-textLayer`,
|
|
893
894
|
className: ze["rp-text-layer"],
|
|
894
895
|
ref: o,
|
|
895
|
-
onMouseDown:
|
|
896
|
-
onMouseUp:
|
|
896
|
+
onMouseDown: S,
|
|
897
|
+
onMouseUp: m
|
|
897
898
|
}
|
|
898
899
|
);
|
|
899
|
-
},
|
|
900
|
+
}, yo = {
|
|
900
901
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
901
902
|
};
|
|
902
|
-
let
|
|
903
|
-
const
|
|
904
|
-
const { pageNumber: t } = e, n = W(null), { pages: o, pdf: r } = X(), a = W(), [c, s] = H(), { setFocusedPage: d, goToPage: u } = oe(), { scrollMode: p } = Oe(), { print:
|
|
903
|
+
let xo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
904
|
+
const Io = (e) => {
|
|
905
|
+
const { pageNumber: t } = e, n = W(null), { pages: o, pdf: r } = X(), a = W(), [c, s] = H(), { setFocusedPage: d, goToPage: u } = oe(), { scrollMode: p } = Oe(), { print: f } = nt(), { download: h } = Un(), g = M(() => o.get(t), [o, t]), P = M(() => g == null ? void 0 : g.page.getViewport(), [g]);
|
|
905
906
|
F(() => {
|
|
906
907
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
907
908
|
}, [r]), F(() => {
|
|
908
|
-
|
|
909
|
-
a.current = void 0, s(
|
|
909
|
+
g && g.page.getAnnotations().then((v) => {
|
|
910
|
+
a.current = void 0, s(v), n.current && (n.current.innerText = "");
|
|
910
911
|
});
|
|
911
|
-
}, [
|
|
912
|
-
const
|
|
913
|
-
(
|
|
914
|
-
!c || !r || (Rr(
|
|
915
|
-
var
|
|
916
|
-
((
|
|
917
|
-
}), p === ee.PAGE_SCROLLING ? kt(
|
|
912
|
+
}, [g]);
|
|
913
|
+
const b = L(
|
|
914
|
+
(v) => {
|
|
915
|
+
!c || !r || (Rr(v), Er(v, r, c).then((S) => {
|
|
916
|
+
var m, w;
|
|
917
|
+
((m = S == null ? void 0 : S.data) == null ? void 0 : m.action) === "Print" ? f() : ((w = S == null ? void 0 : S.data) == null ? void 0 : w.action) === "SaveAs" && h();
|
|
918
|
+
}), p === ee.PAGE_SCROLLING ? kt(v, c, r, (S) => d(S.pageIndex + 1)) : kt(v, c, r, (S) => u(S.pageIndex + 1)));
|
|
918
919
|
},
|
|
919
|
-
[r, c, u, d, p,
|
|
920
|
+
[r, c, u, d, p, f, h]
|
|
920
921
|
);
|
|
921
922
|
return F(() => {
|
|
922
|
-
if (!
|
|
923
|
+
if (!g || !c)
|
|
923
924
|
return;
|
|
924
|
-
const
|
|
925
|
+
const v = g.page.getViewport();
|
|
925
926
|
if (a.current) {
|
|
926
927
|
a.current.update({
|
|
927
|
-
viewport:
|
|
928
|
+
viewport: v.clone({ dontFlip: !0 })
|
|
928
929
|
});
|
|
929
930
|
return;
|
|
930
931
|
}
|
|
931
|
-
const
|
|
932
|
-
for (const
|
|
933
|
-
const { annotationType: l } =
|
|
932
|
+
const S = /* @__PURE__ */ new Map([]);
|
|
933
|
+
for (const C of c) {
|
|
934
|
+
const { annotationType: l } = C;
|
|
934
935
|
switch (l) {
|
|
935
936
|
case Ft.Link:
|
|
936
|
-
Or(
|
|
937
|
+
Or(C);
|
|
937
938
|
break;
|
|
938
939
|
case Ft.Widget:
|
|
939
|
-
Nr(
|
|
940
|
+
Nr(C, v, S);
|
|
940
941
|
break;
|
|
941
942
|
}
|
|
942
943
|
}
|
|
943
|
-
const
|
|
944
|
+
const m = new AbortController();
|
|
944
945
|
return (async () => {
|
|
945
|
-
var
|
|
946
|
+
var T;
|
|
946
947
|
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new fr({
|
|
947
948
|
div: n.current,
|
|
948
949
|
accessibilityManager: void 0,
|
|
949
950
|
annotationCanvasMap: void 0,
|
|
950
951
|
annotationEditorUIManager: void 0,
|
|
951
952
|
structTreeLayer: null,
|
|
952
|
-
page:
|
|
953
|
-
viewport:
|
|
954
|
-
}), n.current && Mt(n.current,
|
|
955
|
-
const
|
|
956
|
-
if (
|
|
953
|
+
page: g.page,
|
|
954
|
+
viewport: v.clone({ dontFlip: !0 })
|
|
955
|
+
}), n.current && Mt(n.current, b);
|
|
956
|
+
const C = await (r == null ? void 0 : r.hasJSActions()), l = await (r == null ? void 0 : r.getFieldObjects());
|
|
957
|
+
if (m.signal.aborted)
|
|
957
958
|
throw "abort";
|
|
958
|
-
return (
|
|
959
|
+
return (T = a.current) == null ? void 0 : T.render({
|
|
959
960
|
annotations: c,
|
|
960
961
|
annotationStorage: r == null ? void 0 : r.annotationStorage,
|
|
961
|
-
hasJSActions:
|
|
962
|
+
hasJSActions: C,
|
|
962
963
|
fieldObjects: l,
|
|
963
964
|
div: n.current,
|
|
964
|
-
viewport:
|
|
965
|
-
page:
|
|
966
|
-
imageResourcesPath:
|
|
965
|
+
viewport: v.clone({ dontFlip: !0 }),
|
|
966
|
+
page: g.page,
|
|
967
|
+
imageResourcesPath: xo,
|
|
967
968
|
renderForms: !0,
|
|
968
969
|
linkService: new Lr(),
|
|
969
970
|
downloadManager: null,
|
|
970
971
|
enableScripting: !1
|
|
971
972
|
});
|
|
972
973
|
})().then(() => {
|
|
973
|
-
n.current && Dr(n.current,
|
|
974
|
-
}).catch((
|
|
975
|
-
if (
|
|
976
|
-
throw
|
|
974
|
+
n.current && Dr(n.current, b);
|
|
975
|
+
}).catch((C) => {
|
|
976
|
+
if (C !== "abort")
|
|
977
|
+
throw C;
|
|
977
978
|
}), () => {
|
|
978
|
-
|
|
979
|
+
m.abort("clear"), n.current && Mt(n.current, b);
|
|
979
980
|
};
|
|
980
|
-
}, [r, c,
|
|
981
|
+
}, [r, c, b]), /* @__PURE__ */ i(
|
|
981
982
|
"div",
|
|
982
983
|
{
|
|
983
984
|
"data-rp": `page-${t}-annotationLayer`,
|
|
984
|
-
style: { width: `${
|
|
985
|
-
className:
|
|
985
|
+
style: { width: `${P == null ? void 0 : P.width}px`, height: `${P == null ? void 0 : P.height}px` },
|
|
986
|
+
className: yo["rp-annotation-layer"],
|
|
986
987
|
ref: n
|
|
987
988
|
}
|
|
988
989
|
);
|
|
989
990
|
}, dt = {
|
|
990
991
|
"rp-text-highlight-layer": "_rp-text-highlight-layer_1fxd3_1",
|
|
991
992
|
"rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1fxd3_14"
|
|
992
|
-
},
|
|
993
|
+
}, Lo = ({ pageNumber: e }) => {
|
|
993
994
|
const t = W(null), n = W(), o = W(), { pages: r } = X(), { highlightMatches: a } = gr(), c = M(() => a.filter((u) => u.pageIndex === e - 1), [a]), s = L(
|
|
994
995
|
(d, u, p = !1) => {
|
|
995
996
|
p && mn(d, u), ur(c, d, u);
|
|
@@ -1002,19 +1003,19 @@ const xo = (e) => {
|
|
|
1002
1003
|
return;
|
|
1003
1004
|
const u = t.current;
|
|
1004
1005
|
return n.current && n.current.cancel(), d.page.getTextContent().then((p) => {
|
|
1005
|
-
const
|
|
1006
|
+
const f = d.page.getViewport({ scale: 1 });
|
|
1006
1007
|
return n.current = new Tt.TextLayer({
|
|
1007
|
-
viewport:
|
|
1008
|
+
viewport: f,
|
|
1008
1009
|
textContentSource: p,
|
|
1009
1010
|
container: u
|
|
1010
1011
|
}), o.current = p, u && (u.innerText = ""), n.current.render();
|
|
1011
1012
|
}).then(() => {
|
|
1012
1013
|
var h;
|
|
1013
|
-
[].slice.call(u.children).forEach((
|
|
1014
|
-
|
|
1014
|
+
[].slice.call(u.children).forEach((g) => {
|
|
1015
|
+
g.classList.add(dt["rp-text-highlight-layer-text"]);
|
|
1015
1016
|
});
|
|
1016
|
-
const
|
|
1017
|
-
|
|
1017
|
+
const f = (h = n.current) == null ? void 0 : h.textDivs;
|
|
1018
|
+
f && o.current && s(o.current, f);
|
|
1018
1019
|
}).catch(() => {
|
|
1019
1020
|
}), () => {
|
|
1020
1021
|
var p;
|
|
@@ -1022,8 +1023,8 @@ const xo = (e) => {
|
|
|
1022
1023
|
};
|
|
1023
1024
|
}, [r, e]), F(() => {
|
|
1024
1025
|
var p;
|
|
1025
|
-
[].slice.call(t.current.children).forEach((
|
|
1026
|
-
|
|
1026
|
+
[].slice.call(t.current.children).forEach((f) => {
|
|
1027
|
+
f.classList.add(dt["rp-text-highlight-layer-text"]);
|
|
1027
1028
|
});
|
|
1028
1029
|
const u = (p = n.current) == null ? void 0 : p.textDivs;
|
|
1029
1030
|
u && o.current && s(o.current, u, !0);
|
|
@@ -1036,30 +1037,30 @@ const xo = (e) => {
|
|
|
1036
1037
|
}
|
|
1037
1038
|
) });
|
|
1038
1039
|
}, Rt = We((e, t) => {
|
|
1039
|
-
const { pageNumber: n, style: o, ...r } = e, { pages: a } = X(), { rotate: c } =
|
|
1040
|
+
const { pageNumber: n, style: o, ...r } = e, { pages: a } = X(), { rotate: c } = Je(), { textLayer: s } = ar(), { currentZoom: d } = Qe(), u = W(a.get(n)), [p, f] = H(!1), h = W(null), [g, P] = H({
|
|
1040
1041
|
width: 0,
|
|
1041
1042
|
height: 0
|
|
1042
1043
|
});
|
|
1043
1044
|
dn(t, () => h.current), F(() => {
|
|
1044
1045
|
if (a && (u.current = a.get(n), u.current)) {
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1046
|
+
const m = u.current.page.getViewport({ scale: d, rotation: c });
|
|
1047
|
+
P(m);
|
|
1047
1048
|
}
|
|
1048
1049
|
}, [a, n, c, d]);
|
|
1049
|
-
const
|
|
1050
|
+
const b = M(() => {
|
|
1050
1051
|
switch (c) {
|
|
1051
1052
|
case 90:
|
|
1052
|
-
return `${
|
|
1053
|
+
return `${g.width / 2}px ${g.width / 2}px`;
|
|
1053
1054
|
case -90:
|
|
1054
1055
|
case 270:
|
|
1055
|
-
return `${
|
|
1056
|
+
return `${g.height / 2}px ${g.height / 2}px`;
|
|
1056
1057
|
default:
|
|
1057
1058
|
return "center";
|
|
1058
1059
|
}
|
|
1059
|
-
}, [c,
|
|
1060
|
-
|
|
1061
|
-
}, []),
|
|
1062
|
-
|
|
1060
|
+
}, [c, g]), v = L(() => {
|
|
1061
|
+
f(!0);
|
|
1062
|
+
}, []), S = L(() => {
|
|
1063
|
+
f(!1);
|
|
1063
1064
|
}, []);
|
|
1064
1065
|
return /* @__PURE__ */ i(
|
|
1065
1066
|
"div",
|
|
@@ -1071,7 +1072,7 @@ const xo = (e) => {
|
|
|
1071
1072
|
style: {
|
|
1072
1073
|
...o,
|
|
1073
1074
|
"--rp-rotate": `${c}deg`,
|
|
1074
|
-
"--rp-page-rotate-translate": `${
|
|
1075
|
+
"--rp-page-rotate-translate": `${b}`,
|
|
1075
1076
|
"--scale-factor": d
|
|
1076
1077
|
},
|
|
1077
1078
|
className: lt["rp-page-wrapper"],
|
|
@@ -1079,16 +1080,16 @@ const xo = (e) => {
|
|
|
1079
1080
|
"div",
|
|
1080
1081
|
{
|
|
1081
1082
|
style: {
|
|
1082
|
-
width: `${
|
|
1083
|
-
height: `${
|
|
1083
|
+
width: `${g.width}px`,
|
|
1084
|
+
height: `${g.height}px`
|
|
1084
1085
|
},
|
|
1085
1086
|
className: lt["rp-page"],
|
|
1086
1087
|
children: [
|
|
1087
|
-
/* @__PURE__ */ i(
|
|
1088
|
+
/* @__PURE__ */ i(Co, { onLoading: v, onLoaded: S, pageNumber: n }),
|
|
1088
1089
|
p && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Pt, {}) }),
|
|
1089
|
-
s && /* @__PURE__ */ i(
|
|
1090
|
-
/* @__PURE__ */ i(
|
|
1091
|
-
/* @__PURE__ */ i(
|
|
1090
|
+
s && /* @__PURE__ */ i(So, { pageNumber: n }),
|
|
1091
|
+
/* @__PURE__ */ i(Lo, { pageNumber: n }),
|
|
1092
|
+
/* @__PURE__ */ i(Io, { pageNumber: n })
|
|
1092
1093
|
]
|
|
1093
1094
|
}
|
|
1094
1095
|
)
|
|
@@ -1105,25 +1106,25 @@ function wt(e, t) {
|
|
|
1105
1106
|
return n.__proto__ = o, n;
|
|
1106
1107
|
}, wt(e, t);
|
|
1107
1108
|
}
|
|
1108
|
-
function
|
|
1109
|
+
function Ro(e, t) {
|
|
1109
1110
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, wt(e, t);
|
|
1110
1111
|
}
|
|
1111
1112
|
var Zt = Number.isNaN || function(t) {
|
|
1112
1113
|
return typeof t == "number" && t !== t;
|
|
1113
1114
|
};
|
|
1114
|
-
function
|
|
1115
|
+
function Eo(e, t) {
|
|
1115
1116
|
return !!(e === t || Zt(e) && Zt(t));
|
|
1116
1117
|
}
|
|
1117
|
-
function
|
|
1118
|
+
function No(e, t) {
|
|
1118
1119
|
if (e.length !== t.length)
|
|
1119
1120
|
return !1;
|
|
1120
1121
|
for (var n = 0; n < e.length; n++)
|
|
1121
|
-
if (!
|
|
1122
|
+
if (!Eo(e[n], t[n]))
|
|
1122
1123
|
return !1;
|
|
1123
1124
|
return !0;
|
|
1124
1125
|
}
|
|
1125
1126
|
function ut(e, t) {
|
|
1126
|
-
t === void 0 && (t =
|
|
1127
|
+
t === void 0 && (t = No);
|
|
1127
1128
|
var n, o = [], r, a = !1;
|
|
1128
1129
|
function c() {
|
|
1129
1130
|
for (var s = [], d = 0; d < arguments.length; d++)
|
|
@@ -1144,7 +1145,7 @@ function Bt(e, t) {
|
|
|
1144
1145
|
}
|
|
1145
1146
|
return n;
|
|
1146
1147
|
}
|
|
1147
|
-
var
|
|
1148
|
+
var Oo = typeof performance == "object" && typeof performance.now == "function", jt = Oo ? function() {
|
|
1148
1149
|
return performance.now();
|
|
1149
1150
|
} : function() {
|
|
1150
1151
|
return Date.now();
|
|
@@ -1152,7 +1153,7 @@ var No = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1152
1153
|
function Kt(e) {
|
|
1153
1154
|
cancelAnimationFrame(e.id);
|
|
1154
1155
|
}
|
|
1155
|
-
function
|
|
1156
|
+
function Do(e, t) {
|
|
1156
1157
|
var n = jt();
|
|
1157
1158
|
function o() {
|
|
1158
1159
|
jt() - n >= t ? e.call(null) : r.id = requestAnimationFrame(o);
|
|
@@ -1163,7 +1164,7 @@ function Oo(e, t) {
|
|
|
1163
1164
|
return r;
|
|
1164
1165
|
}
|
|
1165
1166
|
var pt = -1;
|
|
1166
|
-
function
|
|
1167
|
+
function zo(e) {
|
|
1167
1168
|
if (e === void 0 && (e = !1), pt === -1 || e) {
|
|
1168
1169
|
var t = document.createElement("div"), n = t.style;
|
|
1169
1170
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), pt = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
@@ -1180,20 +1181,20 @@ function Xt(e) {
|
|
|
1180
1181
|
}
|
|
1181
1182
|
return Re;
|
|
1182
1183
|
}
|
|
1183
|
-
var
|
|
1184
|
+
var Ao = 150, Fo = function(t) {
|
|
1184
1185
|
var n = t.columnIndex;
|
|
1185
1186
|
t.data;
|
|
1186
1187
|
var o = t.rowIndex;
|
|
1187
1188
|
return o + ":" + n;
|
|
1188
|
-
},
|
|
1189
|
-
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (
|
|
1190
|
-
function
|
|
1191
|
-
var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, d = e.getOffsetForColumnAndAlignment, u = e.getOffsetForRowAndAlignment, p = e.getRowHeight,
|
|
1192
|
-
return t = /* @__PURE__ */ function(
|
|
1193
|
-
|
|
1194
|
-
function
|
|
1189
|
+
}, Ue = null, qe = null, Ze = null;
|
|
1190
|
+
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ue = /* @__PURE__ */ new WeakSet(), qe = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet());
|
|
1191
|
+
function ko(e) {
|
|
1192
|
+
var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, d = e.getOffsetForColumnAndAlignment, u = e.getOffsetForRowAndAlignment, p = e.getRowHeight, f = e.getRowOffset, h = e.getRowStartIndexForOffset, g = e.getRowStopIndexForStartIndex, P = e.initInstanceProps, b = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
|
|
1193
|
+
return t = /* @__PURE__ */ function(S) {
|
|
1194
|
+
Ro(m, S);
|
|
1195
|
+
function m(C) {
|
|
1195
1196
|
var l;
|
|
1196
|
-
return l =
|
|
1197
|
+
return l = S.call(this, C) || this, l._instanceProps = P(l.props, qt(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
|
|
1197
1198
|
instance: qt(l),
|
|
1198
1199
|
isScrolling: !1,
|
|
1199
1200
|
horizontalScrollDirection: "forward",
|
|
@@ -1201,9 +1202,9 @@ function Fo(e) {
|
|
|
1201
1202
|
scrollTop: typeof l.props.initialScrollTop == "number" ? l.props.initialScrollTop : 0,
|
|
1202
1203
|
scrollUpdateWasRequested: !1,
|
|
1203
1204
|
verticalScrollDirection: "forward"
|
|
1204
|
-
}, l._callOnItemsRendered = void 0, l._callOnItemsRendered = ut(function(
|
|
1205
|
+
}, l._callOnItemsRendered = void 0, l._callOnItemsRendered = ut(function(T, _, y, E, I, N, R, z) {
|
|
1205
1206
|
return l.props.onItemsRendered({
|
|
1206
|
-
overscanColumnStartIndex:
|
|
1207
|
+
overscanColumnStartIndex: T,
|
|
1207
1208
|
overscanColumnStopIndex: _,
|
|
1208
1209
|
overscanRowStartIndex: y,
|
|
1209
1210
|
overscanRowStopIndex: E,
|
|
@@ -1212,16 +1213,16 @@ function Fo(e) {
|
|
|
1212
1213
|
visibleRowStartIndex: R,
|
|
1213
1214
|
visibleRowStopIndex: z
|
|
1214
1215
|
});
|
|
1215
|
-
}), l._callOnScroll = void 0, l._callOnScroll = ut(function(
|
|
1216
|
+
}), l._callOnScroll = void 0, l._callOnScroll = ut(function(T, _, y, E, I) {
|
|
1216
1217
|
return l.props.onScroll({
|
|
1217
1218
|
horizontalScrollDirection: y,
|
|
1218
|
-
scrollLeft:
|
|
1219
|
+
scrollLeft: T,
|
|
1219
1220
|
scrollTop: _,
|
|
1220
1221
|
verticalScrollDirection: E,
|
|
1221
1222
|
scrollUpdateWasRequested: I
|
|
1222
1223
|
});
|
|
1223
|
-
}), l._getItemStyle = void 0, l._getItemStyle = function(
|
|
1224
|
-
var y = l.props, E = y.columnWidth, I = y.direction, N = y.rowHeight, R = l._getItemStyleCache(
|
|
1224
|
+
}), l._getItemStyle = void 0, l._getItemStyle = function(T, _) {
|
|
1225
|
+
var y = l.props, E = y.columnWidth, I = y.direction, N = y.rowHeight, R = l._getItemStyleCache(b && E, b && I, b && N), z = T + ":" + _, O;
|
|
1225
1226
|
if (R.hasOwnProperty(z))
|
|
1226
1227
|
O = R[z];
|
|
1227
1228
|
else {
|
|
@@ -1230,16 +1231,16 @@ function Fo(e) {
|
|
|
1230
1231
|
position: "absolute",
|
|
1231
1232
|
left: x ? void 0 : D,
|
|
1232
1233
|
right: x ? D : void 0,
|
|
1233
|
-
top:
|
|
1234
|
-
height: p(l.props,
|
|
1234
|
+
top: f(l.props, T, l._instanceProps),
|
|
1235
|
+
height: p(l.props, T, l._instanceProps),
|
|
1235
1236
|
width: a(l.props, _, l._instanceProps)
|
|
1236
1237
|
};
|
|
1237
1238
|
}
|
|
1238
1239
|
return O;
|
|
1239
|
-
}, l._getItemStyleCache = void 0, l._getItemStyleCache = ut(function(
|
|
1240
|
+
}, l._getItemStyleCache = void 0, l._getItemStyleCache = ut(function(T, _, y) {
|
|
1240
1241
|
return {};
|
|
1241
|
-
}), l._onScroll = function(
|
|
1242
|
-
var _ =
|
|
1242
|
+
}), l._onScroll = function(T) {
|
|
1243
|
+
var _ = T.currentTarget, y = _.clientHeight, E = _.clientWidth, I = _.scrollLeft, N = _.scrollTop, R = _.scrollHeight, z = _.scrollWidth;
|
|
1243
1244
|
l.setState(function(O) {
|
|
1244
1245
|
if (O.scrollLeft === I && O.scrollTop === N)
|
|
1245
1246
|
return null;
|
|
@@ -1264,11 +1265,11 @@ function Fo(e) {
|
|
|
1264
1265
|
scrollUpdateWasRequested: !1
|
|
1265
1266
|
};
|
|
1266
1267
|
}, l._resetIsScrollingDebounced);
|
|
1267
|
-
}, l._outerRefSetter = function(
|
|
1268
|
+
}, l._outerRefSetter = function(T) {
|
|
1268
1269
|
var _ = l.props.outerRef;
|
|
1269
|
-
l._outerRef =
|
|
1270
|
+
l._outerRef = T, typeof _ == "function" ? _(T) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = T);
|
|
1270
1271
|
}, l._resetIsScrollingDebounced = function() {
|
|
1271
|
-
l._resetIsScrollingTimeoutId !== null && Kt(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId =
|
|
1272
|
+
l._resetIsScrollingTimeoutId !== null && Kt(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId = Do(l._resetIsScrolling, Ao);
|
|
1272
1273
|
}, l._resetIsScrolling = function() {
|
|
1273
1274
|
l._resetIsScrollingTimeoutId = null, l.setState({
|
|
1274
1275
|
isScrolling: !1
|
|
@@ -1277,23 +1278,23 @@ function Fo(e) {
|
|
|
1277
1278
|
});
|
|
1278
1279
|
}, l;
|
|
1279
1280
|
}
|
|
1280
|
-
|
|
1281
|
-
return
|
|
1281
|
+
m.getDerivedStateFromProps = function(l, T) {
|
|
1282
|
+
return Mo(l, T), v(l), null;
|
|
1282
1283
|
};
|
|
1283
|
-
var w =
|
|
1284
|
+
var w = m.prototype;
|
|
1284
1285
|
return w.scrollTo = function(l) {
|
|
1285
|
-
var
|
|
1286
|
-
|
|
1287
|
-
return
|
|
1288
|
-
horizontalScrollDirection: y.scrollLeft <
|
|
1289
|
-
scrollLeft:
|
|
1286
|
+
var T = l.scrollLeft, _ = l.scrollTop;
|
|
1287
|
+
T !== void 0 && (T = Math.max(0, T)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(y) {
|
|
1288
|
+
return T === void 0 && (T = y.scrollLeft), _ === void 0 && (_ = y.scrollTop), y.scrollLeft === T && y.scrollTop === _ ? null : {
|
|
1289
|
+
horizontalScrollDirection: y.scrollLeft < T ? "forward" : "backward",
|
|
1290
|
+
scrollLeft: T,
|
|
1290
1291
|
scrollTop: _,
|
|
1291
1292
|
scrollUpdateWasRequested: !0,
|
|
1292
1293
|
verticalScrollDirection: y.scrollTop < _ ? "forward" : "backward"
|
|
1293
1294
|
};
|
|
1294
1295
|
}, this._resetIsScrollingDebounced);
|
|
1295
1296
|
}, w.scrollToItem = function(l) {
|
|
1296
|
-
var
|
|
1297
|
+
var T = l.align, _ = T === void 0 ? "auto" : T, y = l.columnIndex, E = l.rowIndex, I = this.props, N = I.columnCount, R = I.height, z = I.rowCount, O = I.width, D = this.state, x = D.scrollLeft, k = D.scrollTop, $ = zo();
|
|
1297
1298
|
y !== void 0 && (y = Math.max(0, Math.min(y, N - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, z - 1)));
|
|
1298
1299
|
var j = c(this.props, this._instanceProps), Y = s(this.props, this._instanceProps), q = Y > O ? $ : 0, B = j > R ? $ : 0;
|
|
1299
1300
|
this.scrollTo({
|
|
@@ -1301,14 +1302,14 @@ function Fo(e) {
|
|
|
1301
1302
|
scrollTop: E !== void 0 ? u(this.props, E, _, k, this._instanceProps, q) : k
|
|
1302
1303
|
});
|
|
1303
1304
|
}, w.componentDidMount = function() {
|
|
1304
|
-
var l = this.props,
|
|
1305
|
+
var l = this.props, T = l.initialScrollLeft, _ = l.initialScrollTop;
|
|
1305
1306
|
if (this._outerRef != null) {
|
|
1306
1307
|
var y = this._outerRef;
|
|
1307
|
-
typeof
|
|
1308
|
+
typeof T == "number" && (y.scrollLeft = T), typeof _ == "number" && (y.scrollTop = _);
|
|
1308
1309
|
}
|
|
1309
1310
|
this._callPropsCallbacks();
|
|
1310
1311
|
}, w.componentDidUpdate = function() {
|
|
1311
|
-
var l = this.props.direction,
|
|
1312
|
+
var l = this.props.direction, T = this.state, _ = T.scrollLeft, y = T.scrollTop, E = T.scrollUpdateWasRequested;
|
|
1312
1313
|
if (E && this._outerRef != null) {
|
|
1313
1314
|
var I = this._outerRef;
|
|
1314
1315
|
if (l === "rtl")
|
|
@@ -1332,11 +1333,11 @@ function Fo(e) {
|
|
|
1332
1333
|
}, w.componentWillUnmount = function() {
|
|
1333
1334
|
this._resetIsScrollingTimeoutId !== null && Kt(this._resetIsScrollingTimeoutId);
|
|
1334
1335
|
}, w.render = function() {
|
|
1335
|
-
var l = this.props,
|
|
1336
|
+
var l = this.props, T = l.children, _ = l.className, y = l.columnCount, E = l.direction, I = l.height, N = l.innerRef, R = l.innerElementType, z = l.innerTagName, O = l.itemData, D = l.itemKey, x = D === void 0 ? Fo : D, k = l.outerElementType, $ = l.outerTagName, j = l.rowCount, Y = l.style, q = l.useIsScrolling, B = l.width, ie = this.state.isScrolling, pe = this._getHorizontalRangeToRender(), J = pe[0], ae = pe[1], Q = this._getVerticalRangeToRender(), Ie = Q[0], Ce = Q[1], Le = [];
|
|
1336
1337
|
if (y > 0 && j)
|
|
1337
1338
|
for (var le = Ie; le <= Ce; le++)
|
|
1338
1339
|
for (var he = J; he <= ae; he++)
|
|
1339
|
-
Le.push(
|
|
1340
|
+
Le.push(Ve(T, {
|
|
1340
1341
|
columnIndex: he,
|
|
1341
1342
|
data: O,
|
|
1342
1343
|
isScrolling: q ? ie : void 0,
|
|
@@ -1349,7 +1350,7 @@ function Fo(e) {
|
|
|
1349
1350
|
style: this._getItemStyle(le, he)
|
|
1350
1351
|
}));
|
|
1351
1352
|
var De = c(this.props, this._instanceProps), rt = s(this.props, this._instanceProps);
|
|
1352
|
-
return
|
|
1353
|
+
return Ve(k || $ || "div", {
|
|
1353
1354
|
className: _,
|
|
1354
1355
|
onScroll: this._onScroll,
|
|
1355
1356
|
ref: this._outerRefSetter,
|
|
@@ -1362,7 +1363,7 @@ function Fo(e) {
|
|
|
1362
1363
|
willChange: "transform",
|
|
1363
1364
|
direction: E
|
|
1364
1365
|
}, Y)
|
|
1365
|
-
},
|
|
1366
|
+
}, Ve(R || z || "div", {
|
|
1366
1367
|
children: Le,
|
|
1367
1368
|
ref: N,
|
|
1368
1369
|
style: {
|
|
@@ -1372,8 +1373,8 @@ function Fo(e) {
|
|
|
1372
1373
|
}
|
|
1373
1374
|
}));
|
|
1374
1375
|
}, w._callPropsCallbacks = function() {
|
|
1375
|
-
var l = this.props,
|
|
1376
|
-
if (typeof _ == "function" &&
|
|
1376
|
+
var l = this.props, T = l.columnCount, _ = l.onItemsRendered, y = l.onScroll, E = l.rowCount;
|
|
1377
|
+
if (typeof _ == "function" && T > 0 && E > 0) {
|
|
1377
1378
|
var I = this._getHorizontalRangeToRender(), N = I[0], R = I[1], z = I[2], O = I[3], D = this._getVerticalRangeToRender(), x = D[0], k = D[1], $ = D[2], j = D[3];
|
|
1378
1379
|
this._callOnItemsRendered(N, R, x, k, z, O, $, j);
|
|
1379
1380
|
}
|
|
@@ -1382,28 +1383,28 @@ function Fo(e) {
|
|
|
1382
1383
|
this._callOnScroll(B, ie, q, J, pe);
|
|
1383
1384
|
}
|
|
1384
1385
|
}, w._getHorizontalRangeToRender = function() {
|
|
1385
|
-
var l = this.props,
|
|
1386
|
-
if (
|
|
1386
|
+
var l = this.props, T = l.columnCount, _ = l.overscanColumnCount, y = l.overscanColumnsCount, E = l.overscanCount, I = l.rowCount, N = this.state, R = N.horizontalScrollDirection, z = N.isScrolling, O = N.scrollLeft, D = _ || y || E || 1;
|
|
1387
|
+
if (T === 0 || I === 0)
|
|
1387
1388
|
return [0, 0, 0, 0];
|
|
1388
1389
|
var x = o(this.props, O, this._instanceProps), k = r(this.props, x, O, this._instanceProps), $ = !z || R === "backward" ? Math.max(1, D) : 1, j = !z || R === "forward" ? Math.max(1, D) : 1;
|
|
1389
|
-
return [Math.max(0, x - $), Math.max(0, Math.min(
|
|
1390
|
+
return [Math.max(0, x - $), Math.max(0, Math.min(T - 1, k + j)), x, k];
|
|
1390
1391
|
}, w._getVerticalRangeToRender = function() {
|
|
1391
|
-
var l = this.props,
|
|
1392
|
-
if (
|
|
1392
|
+
var l = this.props, T = l.columnCount, _ = l.overscanCount, y = l.overscanRowCount, E = l.overscanRowsCount, I = l.rowCount, N = this.state, R = N.isScrolling, z = N.verticalScrollDirection, O = N.scrollTop, D = y || E || _ || 1;
|
|
1393
|
+
if (T === 0 || I === 0)
|
|
1393
1394
|
return [0, 0, 0, 0];
|
|
1394
|
-
var x = h(this.props, O, this._instanceProps), k =
|
|
1395
|
+
var x = h(this.props, O, this._instanceProps), k = g(this.props, x, O, this._instanceProps), $ = !R || z === "backward" ? Math.max(1, D) : 1, j = !R || z === "forward" ? Math.max(1, D) : 1;
|
|
1395
1396
|
return [Math.max(0, x - $), Math.max(0, Math.min(I - 1, k + j)), x, k];
|
|
1396
|
-
},
|
|
1397
|
+
}, m;
|
|
1397
1398
|
}(tr), t.defaultProps = {
|
|
1398
1399
|
direction: "ltr",
|
|
1399
1400
|
itemData: void 0,
|
|
1400
1401
|
useIsScrolling: !1
|
|
1401
1402
|
}, t;
|
|
1402
1403
|
}
|
|
1403
|
-
var
|
|
1404
|
-
var o = t.children, r = t.direction, a = t.height, c = t.innerTagName, s = t.outerTagName, d = t.overscanColumnsCount, u = t.overscanCount, p = t.overscanRowsCount,
|
|
1404
|
+
var Mo = function(t, n) {
|
|
1405
|
+
var o = t.children, r = t.direction, a = t.height, c = t.innerTagName, s = t.outerTagName, d = t.overscanColumnsCount, u = t.overscanCount, p = t.overscanRowsCount, f = t.width, h = n.instance;
|
|
1405
1406
|
if (process.env.NODE_ENV !== "production") {
|
|
1406
|
-
if (typeof u == "number" &&
|
|
1407
|
+
if (typeof u == "number" && Ue && !Ue.has(h) && (Ue.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof p == "number") && qe && !qe.has(h) && (qe.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && Ze && !Ze.has(h) && (Ze.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1407
1408
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1408
1409
|
switch (r) {
|
|
1409
1410
|
case "ltr":
|
|
@@ -1412,8 +1413,8 @@ var ko = function(t, n) {
|
|
|
1412
1413
|
default:
|
|
1413
1414
|
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + r + '" was specified.'));
|
|
1414
1415
|
}
|
|
1415
|
-
if (typeof
|
|
1416
|
-
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (
|
|
1416
|
+
if (typeof f != "number")
|
|
1417
|
+
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (f === null ? "null" : typeof f) + '" was specified.'));
|
|
1417
1418
|
if (typeof a != "number")
|
|
1418
1419
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1419
1420
|
}
|
|
@@ -1442,11 +1443,11 @@ var ko = function(t, n) {
|
|
|
1442
1443
|
d = u.offset + u.size;
|
|
1443
1444
|
}
|
|
1444
1445
|
for (var p = s + 1; p <= o; p++) {
|
|
1445
|
-
var
|
|
1446
|
+
var f = c(p);
|
|
1446
1447
|
a[p] = {
|
|
1447
1448
|
offset: d,
|
|
1448
|
-
size:
|
|
1449
|
-
}, d +=
|
|
1449
|
+
size: f
|
|
1450
|
+
}, d += f;
|
|
1450
1451
|
}
|
|
1451
1452
|
t === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
|
|
1452
1453
|
}
|
|
@@ -1455,7 +1456,7 @@ var ko = function(t, n) {
|
|
|
1455
1456
|
var a, c;
|
|
1456
1457
|
t === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
|
|
1457
1458
|
var s = c > 0 ? a[c].offset : 0;
|
|
1458
|
-
return s >= r ? Rn(t, n, o, c, 0, r) :
|
|
1459
|
+
return s >= r ? Rn(t, n, o, c, 0, r) : Wo(t, n, o, Math.max(0, c), r);
|
|
1459
1460
|
}, Rn = function(t, n, o, r, a, c) {
|
|
1460
1461
|
for (; a <= r; ) {
|
|
1461
1462
|
var s = a + Math.floor((r - a) / 2), d = me(t, n, s, o).offset;
|
|
@@ -1464,24 +1465,24 @@ var ko = function(t, n) {
|
|
|
1464
1465
|
d < c ? a = s + 1 : d > c && (r = s - 1);
|
|
1465
1466
|
}
|
|
1466
1467
|
return a > 0 ? a - 1 : 0;
|
|
1467
|
-
},
|
|
1468
|
+
}, Wo = function(t, n, o, r, a) {
|
|
1468
1469
|
for (var c = t === "column" ? n.columnCount : n.rowCount, s = 1; r < c && me(t, n, r, o).offset < a; )
|
|
1469
1470
|
r += s, s *= 2;
|
|
1470
1471
|
return Rn(t, n, o, Math.min(r, c - 1), Math.floor(r / 2), a);
|
|
1471
1472
|
}, Qt = function(t, n, o, r, a, c, s) {
|
|
1472
|
-
var d = t === "column" ? n.width : n.height, u = me(t, n, o, c), p = t === "column" ? Ln(n, c) : In(n, c),
|
|
1473
|
-
switch (r === "smart" && (a >= h - d && a <=
|
|
1473
|
+
var d = t === "column" ? n.width : n.height, u = me(t, n, o, c), p = t === "column" ? Ln(n, c) : In(n, c), f = Math.max(0, Math.min(p - d, u.offset)), h = Math.max(0, u.offset - d + s + u.size);
|
|
1474
|
+
switch (r === "smart" && (a >= h - d && a <= f + d ? r = "auto" : r = "center"), r) {
|
|
1474
1475
|
case "start":
|
|
1475
|
-
return
|
|
1476
|
+
return f;
|
|
1476
1477
|
case "end":
|
|
1477
1478
|
return h;
|
|
1478
1479
|
case "center":
|
|
1479
|
-
return Math.round(h + (
|
|
1480
|
+
return Math.round(h + (f - h) / 2);
|
|
1480
1481
|
case "auto":
|
|
1481
1482
|
default:
|
|
1482
|
-
return a >= h && a <=
|
|
1483
|
+
return a >= h && a <= f ? a : h > f || a < h ? h : f;
|
|
1483
1484
|
}
|
|
1484
|
-
},
|
|
1485
|
+
}, Ho = /* @__PURE__ */ ko({
|
|
1485
1486
|
getColumnOffset: function(t, n, o) {
|
|
1486
1487
|
return me("column", t, n, o).offset;
|
|
1487
1488
|
},
|
|
@@ -1538,8 +1539,8 @@ var ko = function(t, n) {
|
|
|
1538
1539
|
shouldForceUpdate: d
|
|
1539
1540
|
});
|
|
1540
1541
|
}, n.resetAfterIndices = function(s) {
|
|
1541
|
-
var d = s.columnIndex, u = s.rowIndex, p = s.shouldForceUpdate,
|
|
1542
|
-
typeof d == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, d - 1)), typeof u == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, u - 1)), n._getItemStyleCache(-1),
|
|
1542
|
+
var d = s.columnIndex, u = s.rowIndex, p = s.shouldForceUpdate, f = p === void 0 ? !0 : p;
|
|
1543
|
+
typeof d == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, d - 1)), typeof u == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, u - 1)), n._getItemStyleCache(-1), f && n.forceUpdate();
|
|
1543
1544
|
}, c;
|
|
1544
1545
|
},
|
|
1545
1546
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
@@ -1563,30 +1564,30 @@ function en(e, t) {
|
|
|
1563
1564
|
return !0;
|
|
1564
1565
|
return !1;
|
|
1565
1566
|
}
|
|
1566
|
-
var
|
|
1567
|
-
function
|
|
1568
|
-
var n = e.style, o = Bt(e,
|
|
1567
|
+
var $o = ["style"], Go = ["style"];
|
|
1568
|
+
function Vo(e, t) {
|
|
1569
|
+
var n = e.style, o = Bt(e, $o), r = t.style, a = Bt(t, Go);
|
|
1569
1570
|
return !en(n, r) && !en(o, a);
|
|
1570
1571
|
}
|
|
1571
|
-
const
|
|
1572
|
-
const { viewMode: e } =
|
|
1573
|
-
(
|
|
1572
|
+
const Uo = () => {
|
|
1573
|
+
const { viewMode: e } = He(), { scrollMode: t } = Oe(), { setColumnCount: n } = pn(), { virtualScrollableElementRef: o } = et(), r = tt(), a = L(
|
|
1574
|
+
(g) => r.widths[g] || 0,
|
|
1574
1575
|
[r.widths]
|
|
1575
1576
|
), c = L(
|
|
1576
|
-
(
|
|
1577
|
+
(g) => r.heights[g] || 0,
|
|
1577
1578
|
[r.heights]
|
|
1578
|
-
), s = M(() => r.heights.length, [r.heights]), d = M(() => Math.max(...r.widths), [r.widths]), u = M(() => t === ee.HORIZONTAL_SCROLLING ? s : e ===
|
|
1579
|
+
), s = M(() => r.heights.length, [r.heights]), d = M(() => Math.max(...r.widths), [r.widths]), u = M(() => t === ee.HORIZONTAL_SCROLLING ? s : e === Be.DUAL_PAGE ? 2 : 1, [e, t, t, s, o, d]);
|
|
1579
1580
|
F(() => {
|
|
1580
1581
|
n(u);
|
|
1581
1582
|
}, [u, n]);
|
|
1582
|
-
const p = M(() => t === ee.HORIZONTAL_SCROLLING || t === ee.PAGE_SCROLLING ? 1 : Math.round(s / u), [u, s, t]),
|
|
1583
|
+
const p = M(() => t === ee.HORIZONTAL_SCROLLING || t === ee.PAGE_SCROLLING ? 1 : Math.round(s / u), [u, s, t]), f = M(() => r.heights.reduce((g, P) => g + P, 0) / r.heights.length || 0, [r]), h = M(() => r.widths.reduce((g, P) => g + P, 0) / r.heights.length || 0, [r]);
|
|
1583
1584
|
return {
|
|
1584
1585
|
rowCount: p,
|
|
1585
1586
|
rowHeight: c,
|
|
1586
1587
|
columnCount: u,
|
|
1587
1588
|
columnWidth: a,
|
|
1588
1589
|
pageDimension: r,
|
|
1589
|
-
estimatedRowHeight:
|
|
1590
|
+
estimatedRowHeight: f,
|
|
1590
1591
|
estimatedColumnWidth: h
|
|
1591
1592
|
};
|
|
1592
1593
|
};
|
|
@@ -1606,69 +1607,69 @@ mt == null || rn == null ? (bt = ht, Ct = function(t) {
|
|
|
1606
1607
|
}, tn);
|
|
1607
1608
|
return [n, o];
|
|
1608
1609
|
});
|
|
1609
|
-
function
|
|
1610
|
+
function qo(e) {
|
|
1610
1611
|
let t, n, o, r, a, c, s;
|
|
1611
1612
|
const d = typeof document < "u" && document.attachEvent;
|
|
1612
1613
|
if (!d) {
|
|
1613
|
-
c = function(
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1616
|
-
}, a = function(
|
|
1617
|
-
return
|
|
1618
|
-
}, s = function(
|
|
1619
|
-
if (
|
|
1614
|
+
c = function(S) {
|
|
1615
|
+
const m = S.__resizeTriggers__, w = m.firstElementChild, C = m.lastElementChild, l = w.firstElementChild;
|
|
1616
|
+
C.scrollLeft = C.scrollWidth, C.scrollTop = C.scrollHeight, l.style.width = w.offsetWidth + 1 + "px", l.style.height = w.offsetHeight + 1 + "px", w.scrollLeft = w.scrollWidth, w.scrollTop = w.scrollHeight;
|
|
1617
|
+
}, a = function(S) {
|
|
1618
|
+
return S.offsetWidth !== S.__resizeLast__.width || S.offsetHeight !== S.__resizeLast__.height;
|
|
1619
|
+
}, s = function(S) {
|
|
1620
|
+
if (S.target.className && typeof S.target.className.indexOf == "function" && S.target.className.indexOf("contract-trigger") < 0 && S.target.className.indexOf("expand-trigger") < 0)
|
|
1620
1621
|
return;
|
|
1621
|
-
const
|
|
1622
|
+
const m = this;
|
|
1622
1623
|
c(this), this.__resizeRAF__ && bt(this.__resizeRAF__), this.__resizeRAF__ = Ct(function() {
|
|
1623
|
-
a(
|
|
1624
|
-
l.call(
|
|
1624
|
+
a(m) && (m.__resizeLast__.width = m.offsetWidth, m.__resizeLast__.height = m.offsetHeight, m.__resizeListeners__.forEach(function(l) {
|
|
1625
|
+
l.call(m, S);
|
|
1625
1626
|
}));
|
|
1626
1627
|
});
|
|
1627
1628
|
};
|
|
1628
|
-
let h = !1,
|
|
1629
|
+
let h = !1, g = "";
|
|
1629
1630
|
o = "animationstart";
|
|
1630
|
-
const
|
|
1631
|
-
let
|
|
1631
|
+
const P = "Webkit Moz O ms".split(" ");
|
|
1632
|
+
let b = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
|
|
1632
1633
|
{
|
|
1633
|
-
const
|
|
1634
|
-
if (
|
|
1635
|
-
for (let
|
|
1636
|
-
if (
|
|
1637
|
-
|
|
1634
|
+
const S = document.createElement("fakeelement");
|
|
1635
|
+
if (S.style.animationName !== void 0 && (h = !0), h === !1) {
|
|
1636
|
+
for (let m = 0; m < P.length; m++)
|
|
1637
|
+
if (S.style[P[m] + "AnimationName"] !== void 0) {
|
|
1638
|
+
v = P[m], g = "-" + v.toLowerCase() + "-", o = b[m], h = !0;
|
|
1638
1639
|
break;
|
|
1639
1640
|
}
|
|
1640
1641
|
}
|
|
1641
1642
|
}
|
|
1642
|
-
n = "resizeanim", t = "@" +
|
|
1643
|
+
n = "resizeanim", t = "@" + g + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = g + "animation: 1ms " + n + "; ";
|
|
1643
1644
|
}
|
|
1644
1645
|
const u = function(h) {
|
|
1645
1646
|
if (!h.getElementById("detectElementResize")) {
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1647
|
+
const g = (t || "") + ".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%; }', P = h.head || h.getElementsByTagName("head")[0], b = h.createElement("style");
|
|
1648
|
+
b.id = "detectElementResize", b.type = "text/css", e != null && b.setAttribute("nonce", e), b.styleSheet ? b.styleSheet.cssText = g : b.appendChild(h.createTextNode(g)), P.appendChild(b);
|
|
1648
1649
|
}
|
|
1649
1650
|
};
|
|
1650
1651
|
return {
|
|
1651
|
-
addResizeListener: function(h,
|
|
1652
|
+
addResizeListener: function(h, g) {
|
|
1652
1653
|
if (d)
|
|
1653
|
-
h.attachEvent("onresize",
|
|
1654
|
+
h.attachEvent("onresize", g);
|
|
1654
1655
|
else {
|
|
1655
1656
|
if (!h.__resizeTriggers__) {
|
|
1656
|
-
const
|
|
1657
|
-
|
|
1658
|
-
const
|
|
1659
|
-
|
|
1660
|
-
const
|
|
1661
|
-
|
|
1657
|
+
const P = h.ownerDocument, b = re.getComputedStyle(h);
|
|
1658
|
+
b && b.position === "static" && (h.style.position = "relative"), u(P), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = P.createElement("div")).className = "resize-triggers";
|
|
1659
|
+
const v = P.createElement("div");
|
|
1660
|
+
v.className = "expand-trigger", v.appendChild(P.createElement("div"));
|
|
1661
|
+
const S = P.createElement("div");
|
|
1662
|
+
S.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(S), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(w) {
|
|
1662
1663
|
w.animationName === n && c(h);
|
|
1663
1664
|
}, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
|
|
1664
1665
|
}
|
|
1665
|
-
h.__resizeListeners__.push(
|
|
1666
|
+
h.__resizeListeners__.push(g);
|
|
1666
1667
|
}
|
|
1667
1668
|
},
|
|
1668
|
-
removeResizeListener: function(h,
|
|
1669
|
+
removeResizeListener: function(h, g) {
|
|
1669
1670
|
if (d)
|
|
1670
|
-
h.detachEvent("onresize",
|
|
1671
|
-
else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(
|
|
1671
|
+
h.detachEvent("onresize", g);
|
|
1672
|
+
else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(g), 1), !h.__resizeListeners__.length) {
|
|
1672
1673
|
h.removeEventListener("scroll", s, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(o, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
|
|
1673
1674
|
try {
|
|
1674
1675
|
h.__resizeTriggers__ = !h.removeChild(h.__resizeTriggers__);
|
|
@@ -1678,7 +1679,7 @@ function Uo(e) {
|
|
|
1678
1679
|
}
|
|
1679
1680
|
};
|
|
1680
1681
|
}
|
|
1681
|
-
class
|
|
1682
|
+
class Zo extends nr {
|
|
1682
1683
|
constructor(...t) {
|
|
1683
1684
|
super(...t), this.state = {
|
|
1684
1685
|
height: this.props.defaultHeight || 0,
|
|
@@ -1693,17 +1694,17 @@ class qo extends nr {
|
|
|
1693
1694
|
onResize: r
|
|
1694
1695
|
} = this.props;
|
|
1695
1696
|
if (this._parentNode) {
|
|
1696
|
-
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), u = parseFloat(a.paddingBottom || "0"), p = this._parentNode.getBoundingClientRect(),
|
|
1697
|
-
(!n && (this.state.height !==
|
|
1698
|
-
height:
|
|
1699
|
-
width:
|
|
1700
|
-
scaledHeight:
|
|
1697
|
+
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), u = parseFloat(a.paddingBottom || "0"), p = this._parentNode.getBoundingClientRect(), f = p.height - d - u, h = p.width - c - s, g = this._parentNode.offsetHeight - d - u, P = this._parentNode.offsetWidth - c - s;
|
|
1698
|
+
(!n && (this.state.height !== g || this.state.scaledHeight !== f) || !o && (this.state.width !== P || this.state.scaledWidth !== h)) && (this.setState({
|
|
1699
|
+
height: g,
|
|
1700
|
+
width: P,
|
|
1701
|
+
scaledHeight: f,
|
|
1701
1702
|
scaledWidth: h
|
|
1702
1703
|
}), typeof r == "function" && r({
|
|
1703
|
-
height:
|
|
1704
|
-
scaledHeight:
|
|
1704
|
+
height: g,
|
|
1705
|
+
scaledHeight: f,
|
|
1705
1706
|
scaledWidth: h,
|
|
1706
|
-
width:
|
|
1707
|
+
width: P
|
|
1707
1708
|
}));
|
|
1708
1709
|
}
|
|
1709
1710
|
}, this._setRef = (n) => {
|
|
@@ -1719,7 +1720,7 @@ class qo extends nr {
|
|
|
1719
1720
|
const o = n.ownerDocument.defaultView.ResizeObserver;
|
|
1720
1721
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1721
1722
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1722
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1723
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = qo(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1723
1724
|
}
|
|
1724
1725
|
}
|
|
1725
1726
|
componentWillUnmount() {
|
|
@@ -1737,27 +1738,27 @@ class qo extends nr {
|
|
|
1737
1738
|
onResize: d,
|
|
1738
1739
|
style: u = {},
|
|
1739
1740
|
tagName: p = "div",
|
|
1740
|
-
...
|
|
1741
|
+
...f
|
|
1741
1742
|
} = this.props, {
|
|
1742
1743
|
height: h,
|
|
1743
|
-
scaledHeight:
|
|
1744
|
-
scaledWidth:
|
|
1745
|
-
width:
|
|
1746
|
-
} = this.state,
|
|
1744
|
+
scaledHeight: g,
|
|
1745
|
+
scaledWidth: P,
|
|
1746
|
+
width: b
|
|
1747
|
+
} = this.state, v = {
|
|
1747
1748
|
overflow: "visible"
|
|
1748
|
-
},
|
|
1749
|
-
let
|
|
1750
|
-
return r || (h === 0 && (
|
|
1749
|
+
}, S = {};
|
|
1750
|
+
let m = !1;
|
|
1751
|
+
return r || (h === 0 && (m = !0), v.height = 0, S.height = h, S.scaledHeight = g), a || (b === 0 && (m = !0), v.width = 0, S.width = b, S.scaledWidth = P), c && (m = !1), Ve(p, {
|
|
1751
1752
|
ref: this._setRef,
|
|
1752
1753
|
style: {
|
|
1753
|
-
...
|
|
1754
|
+
...v,
|
|
1754
1755
|
...u
|
|
1755
1756
|
},
|
|
1756
|
-
...
|
|
1757
|
-
}, !
|
|
1757
|
+
...f
|
|
1758
|
+
}, !m && t(S));
|
|
1758
1759
|
}
|
|
1759
1760
|
}
|
|
1760
|
-
const
|
|
1761
|
+
const Bo = ({ widths: e, heights: t }) => {
|
|
1761
1762
|
const { focusedPage: n, totalPages: o } = oe(), r = M(() => {
|
|
1762
1763
|
const s = [], d = Math.ceil(n / 2) * 2 - 1;
|
|
1763
1764
|
if (s.push(d), d + 1 < o) {
|
|
@@ -1781,7 +1782,7 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1781
1782
|
}
|
|
1782
1783
|
], [e, t, r]), c = M(() => a.reduce((s, d) => s + Number(d.width || 0), 0), [a]);
|
|
1783
1784
|
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: r.map((s, d) => /* @__PURE__ */ i(Rt, { style: a[d], pageNumber: s }, s)) });
|
|
1784
|
-
},
|
|
1785
|
+
}, jo = ({ widths: e, heights: t }) => {
|
|
1785
1786
|
const { focusedPage: n } = oe(), o = M(() => ({
|
|
1786
1787
|
position: "absolute",
|
|
1787
1788
|
width: e(n - 1),
|
|
@@ -1797,72 +1798,72 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1797
1798
|
children: /* @__PURE__ */ i(Rt, { style: o, pageNumber: n }, n)
|
|
1798
1799
|
}
|
|
1799
1800
|
);
|
|
1800
|
-
},
|
|
1801
|
-
const o = W(), { contentRef: r } = we(), { heights: a, widths: c } = tt(), { setFocusedPage: s } = oe(), [d, u] = H([]), { targetScrollPage: p } = fn(),
|
|
1802
|
-
const
|
|
1801
|
+
}, Ko = (e, t, n) => {
|
|
1802
|
+
const o = W(), { contentRef: r } = we(), { heights: a, widths: c } = tt(), { setFocusedPage: s } = oe(), [d, u] = H([]), { targetScrollPage: p } = fn(), f = St(d, 0, 500), h = M(() => a.map((P, b) => {
|
|
1803
|
+
const v = c[b], S = Wr(b + 1, e), m = v * S.columnIndex, w = P * S.rowIndex, C = m + v, l = w + P;
|
|
1803
1804
|
return {
|
|
1804
|
-
pageNumber:
|
|
1805
|
-
...
|
|
1806
|
-
width:
|
|
1807
|
-
height:
|
|
1808
|
-
startX:
|
|
1805
|
+
pageNumber: b + 1,
|
|
1806
|
+
...S,
|
|
1807
|
+
width: v,
|
|
1808
|
+
height: P,
|
|
1809
|
+
startX: m,
|
|
1809
1810
|
startY: w,
|
|
1810
|
-
endX:
|
|
1811
|
+
endX: C,
|
|
1811
1812
|
endY: l
|
|
1812
1813
|
};
|
|
1813
1814
|
}), [a, c, e, t]);
|
|
1814
1815
|
F(() => {
|
|
1815
|
-
var
|
|
1816
|
-
|
|
1817
|
-
let
|
|
1818
|
-
|
|
1819
|
-
}, [
|
|
1820
|
-
const
|
|
1821
|
-
(
|
|
1816
|
+
var b;
|
|
1817
|
+
f.length > 0 && !p.current && s(f[0].pageNumber);
|
|
1818
|
+
let P = (b = f[0]) == null ? void 0 : b.ratio;
|
|
1819
|
+
P && f.filter((v) => Math.round(v.ratio) === Math.round(P)).some((v) => v.pageNumber === p.current) && (p.current = void 0);
|
|
1820
|
+
}, [f, s]);
|
|
1821
|
+
const g = L(
|
|
1822
|
+
(P) => {
|
|
1822
1823
|
o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
|
|
1823
|
-
const
|
|
1824
|
-
startTop:
|
|
1825
|
-
startLeft:
|
|
1826
|
-
endTop:
|
|
1827
|
-
endLeft:
|
|
1828
|
-
},
|
|
1829
|
-
const w =
|
|
1830
|
-
return w &&
|
|
1831
|
-
}).map((
|
|
1832
|
-
const w =
|
|
1824
|
+
const b = P.target, v = {
|
|
1825
|
+
startTop: b.scrollTop,
|
|
1826
|
+
startLeft: b.scrollLeft,
|
|
1827
|
+
endTop: b.scrollTop + b.clientHeight,
|
|
1828
|
+
endLeft: b.scrollLeft + b.clientWidth
|
|
1829
|
+
}, S = h.filter((m) => {
|
|
1830
|
+
const w = m.endX >= v.startLeft && m.endY >= v.startTop, C = m.startX <= v.endLeft && m.startY <= v.endTop;
|
|
1831
|
+
return w && C;
|
|
1832
|
+
}).map((m) => {
|
|
1833
|
+
const w = v.startLeft > m.startX ? v.startLeft : m.startX, C = v.startTop > m.startY ? v.startTop : m.startY, l = v.endLeft < m.endX ? v.endLeft : m.endX, T = v.endTop < m.endY ? v.endTop : m.endY, _ = l - w, y = T - C, I = +(_ * y / (m.width * m.height) * 100).toFixed(2);
|
|
1833
1834
|
return {
|
|
1834
|
-
pageNumber:
|
|
1835
|
+
pageNumber: m.pageNumber,
|
|
1835
1836
|
ratio: I
|
|
1836
1837
|
};
|
|
1837
|
-
}).sort((
|
|
1838
|
-
u(
|
|
1838
|
+
}).sort((m, w) => w.ratio - m.ratio);
|
|
1839
|
+
u(S);
|
|
1839
1840
|
});
|
|
1840
1841
|
},
|
|
1841
1842
|
[r, h]
|
|
1842
1843
|
);
|
|
1843
1844
|
F(() => {
|
|
1844
1845
|
if (n)
|
|
1845
|
-
return n == null || n.addEventListener("scroll",
|
|
1846
|
-
n == null || n.removeEventListener("scroll",
|
|
1846
|
+
return n == null || n.addEventListener("scroll", g), () => {
|
|
1847
|
+
n == null || n.removeEventListener("scroll", g);
|
|
1847
1848
|
};
|
|
1848
|
-
}, [n,
|
|
1849
|
-
},
|
|
1849
|
+
}, [n, g]);
|
|
1850
|
+
}, Xo = rr(({ columnIndex: e, rowIndex: t, data: n, style: o }) => {
|
|
1850
1851
|
const r = Hr(t, e, n.columnCount);
|
|
1851
1852
|
return /* @__PURE__ */ i(Rt, { style: o, pageNumber: r }, r);
|
|
1852
|
-
},
|
|
1853
|
+
}, Vo), Ns = () => {
|
|
1853
1854
|
const { initialPage: e = 1, initialScrollMode: t, instanceId: n } = cr(), { pagesRef: o, setPagesRef: r } = we(), { scrollToPage: a } = Cn(), {
|
|
1854
1855
|
virtualScrollRef: c,
|
|
1855
1856
|
getVirtualScrollRef: s,
|
|
1856
1857
|
getPageScrollElementRef: d,
|
|
1857
1858
|
getVirtualScrollableElementRef: u,
|
|
1858
1859
|
setTotalInnerDimensions: p,
|
|
1859
|
-
virtualScrollableElementRef:
|
|
1860
|
+
virtualScrollableElementRef: f,
|
|
1860
1861
|
totalInnerDimensions: h,
|
|
1861
|
-
pageScrollElementRef:
|
|
1862
|
-
} = et(),
|
|
1862
|
+
pageScrollElementRef: g
|
|
1863
|
+
} = et(), P = W(!0), { nextPage: b, prevPage: v, setFocusedPage: S, focusedPage: m } = oe(), { scrollMode: w } = Oe(), { viewMode: C } = He(), l = W(null), { loading: T } = X(), { LoaderImageComponent: _ } = gn(), y = W(
|
|
1863
1864
|
h
|
|
1864
1865
|
), E = W({
|
|
1865
|
-
viewMode:
|
|
1866
|
+
viewMode: C,
|
|
1866
1867
|
scrollMode: w
|
|
1867
1868
|
}), I = W(!1), N = W(), { isFullScreen: R } = lr(), {
|
|
1868
1869
|
pageDimension: z,
|
|
@@ -1872,8 +1873,8 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1872
1873
|
columnWidth: k,
|
|
1873
1874
|
estimatedColumnWidth: $,
|
|
1874
1875
|
estimatedRowHeight: j
|
|
1875
|
-
} =
|
|
1876
|
-
|
|
1876
|
+
} = Uo(), Y = St(h, 100), q = W();
|
|
1877
|
+
Ko(x, O, f);
|
|
1877
1878
|
const B = W({
|
|
1878
1879
|
scrollTop: 0,
|
|
1879
1880
|
scrollLeft: 0
|
|
@@ -1886,9 +1887,9 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1886
1887
|
}), [x]), Ce = L(
|
|
1887
1888
|
(G) => {
|
|
1888
1889
|
const V = document.activeElement !== o;
|
|
1889
|
-
!R && V || (["ArrowUp", "ArrowLeft"].includes(G.key) ? (G.preventDefault(),
|
|
1890
|
+
!R && V || (["ArrowUp", "ArrowLeft"].includes(G.key) ? (G.preventDefault(), v()) : ["ArrowDown", "ArrowRight"].includes(G.key) && (G.preventDefault(), b()));
|
|
1890
1891
|
},
|
|
1891
|
-
[
|
|
1892
|
+
[b, v, R, w]
|
|
1892
1893
|
);
|
|
1893
1894
|
F(() => (window.addEventListener("keydown", Ce), () => {
|
|
1894
1895
|
window.removeEventListener("keydown", Ce);
|
|
@@ -1904,21 +1905,21 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1904
1905
|
}, [O, x, z, c]);
|
|
1905
1906
|
const Le = L(
|
|
1906
1907
|
(G, V) => {
|
|
1907
|
-
if (!
|
|
1908
|
+
if (!f)
|
|
1908
1909
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
1909
1910
|
const Te = B.current.scrollTop > V, Pe = B.current.scrollLeft > G;
|
|
1910
1911
|
return Te || Pe ? B.current : {
|
|
1911
|
-
scrollTop:
|
|
1912
|
-
scrollLeft:
|
|
1912
|
+
scrollTop: f.scrollTop,
|
|
1913
|
+
scrollLeft: f.scrollLeft
|
|
1913
1914
|
};
|
|
1914
1915
|
},
|
|
1915
|
-
[
|
|
1916
|
+
[f]
|
|
1916
1917
|
), le = L(
|
|
1917
1918
|
(G, V) => {
|
|
1918
|
-
if (E.current.viewMode !==
|
|
1919
|
-
q.current && clearTimeout(q.current), I.current = !0, a(
|
|
1919
|
+
if (E.current.viewMode !== C || E.current.scrollMode !== w) {
|
|
1920
|
+
q.current && clearTimeout(q.current), I.current = !0, a(m, "auto"), q.current = setTimeout(() => {
|
|
1920
1921
|
requestAnimationFrame(() => {
|
|
1921
|
-
E.current = { viewMode:
|
|
1922
|
+
E.current = { viewMode: C, scrollMode: w };
|
|
1922
1923
|
});
|
|
1923
1924
|
}, 100);
|
|
1924
1925
|
return;
|
|
@@ -1943,7 +1944,7 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1943
1944
|
width: V.width
|
|
1944
1945
|
};
|
|
1945
1946
|
},
|
|
1946
|
-
[c,
|
|
1947
|
+
[c, C, w, a]
|
|
1947
1948
|
);
|
|
1948
1949
|
F(() => {
|
|
1949
1950
|
clearTimeout(N.current);
|
|
@@ -1966,7 +1967,7 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1966
1967
|
scrollLeft: G.scrollLeft
|
|
1967
1968
|
};
|
|
1968
1969
|
},
|
|
1969
|
-
[
|
|
1970
|
+
[f]
|
|
1970
1971
|
);
|
|
1971
1972
|
F(() => () => {
|
|
1972
1973
|
q.current && clearTimeout(q.current);
|
|
@@ -1984,31 +1985,31 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1984
1985
|
[Q, J, de]
|
|
1985
1986
|
);
|
|
1986
1987
|
return F(() => {
|
|
1987
|
-
|
|
1988
|
-
}, [
|
|
1989
|
-
if (!(Y.height === 0 || !
|
|
1988
|
+
T && ae();
|
|
1989
|
+
}, [T]), F(() => {
|
|
1990
|
+
if (!(Y.height === 0 || !P.current)) {
|
|
1990
1991
|
if (t === ee.PAGE_SCROLLING) {
|
|
1991
|
-
e !==
|
|
1992
|
+
e !== m && g && S(e), P.current = !1;
|
|
1992
1993
|
return;
|
|
1993
1994
|
}
|
|
1994
|
-
a(e, "auto"),
|
|
1995
|
+
a(e, "auto"), S(e), P.current = !1;
|
|
1995
1996
|
}
|
|
1996
1997
|
}, [
|
|
1997
1998
|
a,
|
|
1998
1999
|
t,
|
|
1999
|
-
|
|
2000
|
-
|
|
2000
|
+
g,
|
|
2001
|
+
S,
|
|
2001
2002
|
Y
|
|
2002
|
-
]), /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: De, children: /* @__PURE__ */ i(
|
|
2003
|
+
]), /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: De, children: /* @__PURE__ */ i(Zo, { style: { minHeight: "50px" }, children: ({ width: G, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: rt, style: { width: G, height: V }, children: w === ee.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2003
2004
|
"div",
|
|
2004
2005
|
{
|
|
2005
2006
|
ref: d,
|
|
2006
2007
|
style: { width: G, height: V },
|
|
2007
2008
|
className: te(de["rp-pages"], de["rp-page-scrolling-wrapper"]),
|
|
2008
|
-
children:
|
|
2009
|
+
children: C === Be.DUAL_PAGE ? /* @__PURE__ */ i(Bo, { widths: k, heights: D }) : /* @__PURE__ */ i(jo, { widths: k, heights: D })
|
|
2009
2010
|
}
|
|
2010
2011
|
) : $ ? /* @__PURE__ */ i(
|
|
2011
|
-
|
|
2012
|
+
Ho,
|
|
2012
2013
|
{
|
|
2013
2014
|
ref: s,
|
|
2014
2015
|
itemData: Ie,
|
|
@@ -2027,9 +2028,9 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
2027
2028
|
de["rp-pages"],
|
|
2028
2029
|
w === ee.HORIZONTAL_SCROLLING ? de["rp-pages-horizontal-scroll"] : ""
|
|
2029
2030
|
),
|
|
2030
|
-
children:
|
|
2031
|
+
children: Xo
|
|
2031
2032
|
}
|
|
2032
|
-
) :
|
|
2033
|
+
) : T ? null : /* @__PURE__ */ i(
|
|
2033
2034
|
"div",
|
|
2034
2035
|
{
|
|
2035
2036
|
className: de["rp-loader"],
|
|
@@ -2053,28 +2054,28 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
2053
2054
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
2054
2055
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
2055
2056
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
2056
|
-
},
|
|
2057
|
+
}, Yo = () => {
|
|
2057
2058
|
const { prevIcon: e } = ue();
|
|
2058
2059
|
return e || /* @__PURE__ */ i(Me, {});
|
|
2059
|
-
},
|
|
2060
|
+
}, Jo = () => {
|
|
2060
2061
|
const { nextIcon: e } = ue();
|
|
2061
2062
|
return e || /* @__PURE__ */ i(Me, { style: { transform: "rotate(180deg" } });
|
|
2062
|
-
},
|
|
2063
|
+
}, Qo = () => {
|
|
2063
2064
|
const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = oe(), [c, s] = H(e.toString()), { pageNavigationTool: d = !0 } = fe(), { isSmallScreen: u } = be(), { localeMessages: p } = se();
|
|
2064
2065
|
F(() => {
|
|
2065
2066
|
s(e.toString());
|
|
2066
2067
|
}, [e]);
|
|
2067
|
-
const
|
|
2068
|
-
const
|
|
2069
|
-
s(
|
|
2068
|
+
const f = L((b) => {
|
|
2069
|
+
const v = b.target.value;
|
|
2070
|
+
s(v);
|
|
2070
2071
|
}, []), h = L(async () => {
|
|
2071
|
-
const
|
|
2072
|
-
|
|
2073
|
-
}, [a, c, t]),
|
|
2072
|
+
const b = a(c);
|
|
2073
|
+
b.success || s(b.currentPage.toString());
|
|
2074
|
+
}, [a, c, t]), g = L(() => {
|
|
2074
2075
|
s(e.toString());
|
|
2075
|
-
}, [e]),
|
|
2076
|
-
(
|
|
2077
|
-
|
|
2076
|
+
}, [e]), P = L(
|
|
2077
|
+
(b) => {
|
|
2078
|
+
b.key === "Enter" && h();
|
|
2078
2079
|
},
|
|
2079
2080
|
[h]
|
|
2080
2081
|
);
|
|
@@ -2095,15 +2096,15 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
2095
2096
|
onClick: r,
|
|
2096
2097
|
"aria-label": p == null ? void 0 : p.previousPageTooltip,
|
|
2097
2098
|
"aria-disabled": e === 1,
|
|
2098
|
-
children: /* @__PURE__ */ i(
|
|
2099
|
+
children: /* @__PURE__ */ i(Yo, {})
|
|
2099
2100
|
}
|
|
2100
2101
|
) }),
|
|
2101
2102
|
/* @__PURE__ */ i(Z, { content: p == null ? void 0 : p.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2102
2103
|
un,
|
|
2103
2104
|
{
|
|
2104
|
-
onKeyDown:
|
|
2105
|
-
onBlur:
|
|
2106
|
-
onChange:
|
|
2105
|
+
onKeyDown: P,
|
|
2106
|
+
onBlur: g,
|
|
2107
|
+
onChange: f,
|
|
2107
2108
|
value: c,
|
|
2108
2109
|
className: ft["rp-page-input"]
|
|
2109
2110
|
}
|
|
@@ -2118,12 +2119,12 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
2118
2119
|
onClick: o,
|
|
2119
2120
|
"aria-label": p == null ? void 0 : p.nextPageTooltip,
|
|
2120
2121
|
"aria-disabled": e === t,
|
|
2121
|
-
children: /* @__PURE__ */ i(
|
|
2122
|
+
children: /* @__PURE__ */ i(Jo, {})
|
|
2122
2123
|
}
|
|
2123
2124
|
) })
|
|
2124
2125
|
] }) : null;
|
|
2125
2126
|
};
|
|
2126
|
-
var Et = "Dialog", [En,
|
|
2127
|
+
var Et = "Dialog", [En, Os] = Ur(Et), [ei, ce] = En(Et), Nn = (e) => {
|
|
2127
2128
|
const {
|
|
2128
2129
|
__scopeDialog: t,
|
|
2129
2130
|
children: n,
|
|
@@ -2137,7 +2138,7 @@ var Et = "Dialog", [En, Es] = Ur(Et), [Qo, ce] = En(Et), Nn = (e) => {
|
|
|
2137
2138
|
onChange: a
|
|
2138
2139
|
});
|
|
2139
2140
|
return /* @__PURE__ */ i(
|
|
2140
|
-
|
|
2141
|
+
ei,
|
|
2141
2142
|
{
|
|
2142
2143
|
scope: t,
|
|
2143
2144
|
triggerRef: s,
|
|
@@ -2147,18 +2148,18 @@ var Et = "Dialog", [En, Es] = Ur(Et), [Qo, ce] = En(Et), Nn = (e) => {
|
|
|
2147
2148
|
descriptionId: ct(),
|
|
2148
2149
|
open: u,
|
|
2149
2150
|
onOpenChange: p,
|
|
2150
|
-
onOpenToggle: U.useCallback(() => p((
|
|
2151
|
+
onOpenToggle: U.useCallback(() => p((f) => !f), [p]),
|
|
2151
2152
|
modal: c,
|
|
2152
2153
|
children: n
|
|
2153
2154
|
}
|
|
2154
2155
|
);
|
|
2155
2156
|
};
|
|
2156
2157
|
Nn.displayName = Et;
|
|
2157
|
-
var On = "DialogTrigger",
|
|
2158
|
+
var On = "DialogTrigger", ti = U.forwardRef(
|
|
2158
2159
|
(e, t) => {
|
|
2159
2160
|
const { __scopeDialog: n, ...o } = e, r = ce(On, n), a = yt(t, r.triggerRef);
|
|
2160
2161
|
return /* @__PURE__ */ i(
|
|
2161
|
-
|
|
2162
|
+
$e.button,
|
|
2162
2163
|
{
|
|
2163
2164
|
type: "button",
|
|
2164
2165
|
"aria-haspopup": "dialog",
|
|
@@ -2172,29 +2173,29 @@ var On = "DialogTrigger", ei = U.forwardRef(
|
|
|
2172
2173
|
);
|
|
2173
2174
|
}
|
|
2174
2175
|
);
|
|
2175
|
-
|
|
2176
|
-
var Nt = "DialogPortal", [
|
|
2176
|
+
ti.displayName = On;
|
|
2177
|
+
var Nt = "DialogPortal", [ni, Dn] = En(Nt, {
|
|
2177
2178
|
forceMount: void 0
|
|
2178
2179
|
}), zn = (e) => {
|
|
2179
2180
|
const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = ce(Nt, t);
|
|
2180
|
-
return /* @__PURE__ */ i(
|
|
2181
|
+
return /* @__PURE__ */ i(ni, { scope: t, forceMount: n, children: U.Children.map(o, (c) => /* @__PURE__ */ i(xt, { present: n || a.open, children: /* @__PURE__ */ i(Jr, { asChild: !0, container: r, children: c }) })) });
|
|
2181
2182
|
};
|
|
2182
2183
|
zn.displayName = Nt;
|
|
2183
|
-
var
|
|
2184
|
+
var Ke = "DialogOverlay", An = U.forwardRef(
|
|
2184
2185
|
(e, t) => {
|
|
2185
|
-
const n = Dn(
|
|
2186
|
-
return a.modal ? /* @__PURE__ */ i(xt, { present: o || a.open, children: /* @__PURE__ */ i(
|
|
2186
|
+
const n = Dn(Ke, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(Ke, e.__scopeDialog);
|
|
2187
|
+
return a.modal ? /* @__PURE__ */ i(xt, { present: o || a.open, children: /* @__PURE__ */ i(ri, { ...r, ref: t }) }) : null;
|
|
2187
2188
|
}
|
|
2188
2189
|
);
|
|
2189
|
-
An.displayName =
|
|
2190
|
-
var
|
|
2190
|
+
An.displayName = Ke;
|
|
2191
|
+
var ri = U.forwardRef(
|
|
2191
2192
|
(e, t) => {
|
|
2192
|
-
const { __scopeDialog: n, ...o } = e, r = ce(
|
|
2193
|
+
const { __scopeDialog: n, ...o } = e, r = ce(Ke, n);
|
|
2193
2194
|
return (
|
|
2194
2195
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2195
2196
|
// ie. when `Overlay` and `Content` are siblings
|
|
2196
2197
|
/* @__PURE__ */ i(Kr, { as: qr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
2197
|
-
|
|
2198
|
+
$e.div,
|
|
2198
2199
|
{
|
|
2199
2200
|
"data-state": Dt(r.open),
|
|
2200
2201
|
...o,
|
|
@@ -2207,11 +2208,11 @@ var ni = U.forwardRef(
|
|
|
2207
2208
|
), xe = "DialogContent", Fn = U.forwardRef(
|
|
2208
2209
|
(e, t) => {
|
|
2209
2210
|
const n = Dn(xe, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(xe, e.__scopeDialog);
|
|
2210
|
-
return /* @__PURE__ */ i(xt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(
|
|
2211
|
+
return /* @__PURE__ */ i(xt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(oi, { ...r, ref: t }) : /* @__PURE__ */ i(ii, { ...r, ref: t }) });
|
|
2211
2212
|
}
|
|
2212
2213
|
);
|
|
2213
2214
|
Fn.displayName = xe;
|
|
2214
|
-
var
|
|
2215
|
+
var oi = U.forwardRef(
|
|
2215
2216
|
(e, t) => {
|
|
2216
2217
|
const n = ce(xe, e.__scopeDialog), o = U.useRef(null), r = yt(t, n.contentRef, o);
|
|
2217
2218
|
return U.useEffect(() => {
|
|
@@ -2240,7 +2241,7 @@ var ri = U.forwardRef(
|
|
|
2240
2241
|
}
|
|
2241
2242
|
);
|
|
2242
2243
|
}
|
|
2243
|
-
),
|
|
2244
|
+
), ii = U.forwardRef(
|
|
2244
2245
|
(e, t) => {
|
|
2245
2246
|
const n = ce(xe, e.__scopeDialog), o = U.useRef(!1), r = U.useRef(!1);
|
|
2246
2247
|
return /* @__PURE__ */ i(
|
|
@@ -2291,30 +2292,30 @@ var ri = U.forwardRef(
|
|
|
2291
2292
|
}
|
|
2292
2293
|
),
|
|
2293
2294
|
/* @__PURE__ */ A(_e, { children: [
|
|
2294
|
-
/* @__PURE__ */ i(
|
|
2295
|
-
/* @__PURE__ */ i(
|
|
2295
|
+
/* @__PURE__ */ i(si, { titleId: s.titleId }),
|
|
2296
|
+
/* @__PURE__ */ i(li, { contentRef: d, descriptionId: s.descriptionId })
|
|
2296
2297
|
] })
|
|
2297
2298
|
] });
|
|
2298
2299
|
}
|
|
2299
2300
|
), Ot = "DialogTitle", Mn = U.forwardRef(
|
|
2300
2301
|
(e, t) => {
|
|
2301
2302
|
const { __scopeDialog: n, ...o } = e, r = ce(Ot, n);
|
|
2302
|
-
return /* @__PURE__ */ i(
|
|
2303
|
+
return /* @__PURE__ */ i($e.h2, { id: r.titleId, ...o, ref: t });
|
|
2303
2304
|
}
|
|
2304
2305
|
);
|
|
2305
2306
|
Mn.displayName = Ot;
|
|
2306
|
-
var Wn = "DialogDescription",
|
|
2307
|
+
var Wn = "DialogDescription", ai = U.forwardRef(
|
|
2307
2308
|
(e, t) => {
|
|
2308
2309
|
const { __scopeDialog: n, ...o } = e, r = ce(Wn, n);
|
|
2309
|
-
return /* @__PURE__ */ i(
|
|
2310
|
+
return /* @__PURE__ */ i($e.p, { id: r.descriptionId, ...o, ref: t });
|
|
2310
2311
|
}
|
|
2311
2312
|
);
|
|
2312
|
-
|
|
2313
|
+
ai.displayName = Wn;
|
|
2313
2314
|
var Hn = "DialogClose", $n = U.forwardRef(
|
|
2314
2315
|
(e, t) => {
|
|
2315
2316
|
const { __scopeDialog: n, ...o } = e, r = ce(Hn, n);
|
|
2316
2317
|
return /* @__PURE__ */ i(
|
|
2317
|
-
|
|
2318
|
+
$e.button,
|
|
2318
2319
|
{
|
|
2319
2320
|
type: "button",
|
|
2320
2321
|
...o,
|
|
@@ -2328,11 +2329,11 @@ $n.displayName = Hn;
|
|
|
2328
2329
|
function Dt(e) {
|
|
2329
2330
|
return e ? "open" : "closed";
|
|
2330
2331
|
}
|
|
2331
|
-
var Gn = "DialogTitleWarning", [
|
|
2332
|
+
var Gn = "DialogTitleWarning", [Ds, Vn] = Zr(Gn, {
|
|
2332
2333
|
contentName: xe,
|
|
2333
2334
|
titleName: Ot,
|
|
2334
2335
|
docsSlug: "dialog"
|
|
2335
|
-
}),
|
|
2336
|
+
}), si = ({ titleId: e }) => {
|
|
2336
2337
|
const t = Vn(Gn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2337
2338
|
|
|
2338
2339
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -2341,14 +2342,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2341
2342
|
return U.useEffect(() => {
|
|
2342
2343
|
e && (document.getElementById(e) || console.error(n));
|
|
2343
2344
|
}, [n, e]), null;
|
|
2344
|
-
},
|
|
2345
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(
|
|
2345
|
+
}, ci = "DialogDescriptionWarning", li = ({ contentRef: e, descriptionId: t }) => {
|
|
2346
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(ci).contentName}}.`;
|
|
2346
2347
|
return U.useEffect(() => {
|
|
2347
2348
|
var a;
|
|
2348
2349
|
const r = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2349
2350
|
t && r && (document.getElementById(t) || console.warn(o));
|
|
2350
2351
|
}, [o, e, t]), null;
|
|
2351
|
-
},
|
|
2352
|
+
}, di = Nn, ui = zn, pi = An, hi = Fn, mi = Mn, fi = $n;
|
|
2352
2353
|
const ye = {
|
|
2353
2354
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2354
2355
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2357,7 +2358,7 @@ const ye = {
|
|
|
2357
2358
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2358
2359
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2359
2360
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2360
|
-
},
|
|
2361
|
+
}, gi = () => {
|
|
2361
2362
|
const { pdfProperties: e } = X(), { container: t } = we(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = no(), { localeMessages: r } = se(), a = M(() => {
|
|
2362
2363
|
if (!e)
|
|
2363
2364
|
return [];
|
|
@@ -2367,13 +2368,13 @@ const ye = {
|
|
|
2367
2368
|
title: d,
|
|
2368
2369
|
author: u,
|
|
2369
2370
|
subject: p,
|
|
2370
|
-
createdOn:
|
|
2371
|
+
createdOn: f,
|
|
2371
2372
|
creator: h,
|
|
2372
|
-
keywords:
|
|
2373
|
-
modifiedOn:
|
|
2374
|
-
pdfProducer:
|
|
2375
|
-
pdfVersion:
|
|
2376
|
-
pageCount:
|
|
2373
|
+
keywords: g,
|
|
2374
|
+
modifiedOn: P,
|
|
2375
|
+
pdfProducer: b,
|
|
2376
|
+
pdfVersion: v,
|
|
2377
|
+
pageCount: S
|
|
2377
2378
|
} = e;
|
|
2378
2379
|
return [
|
|
2379
2380
|
{ label: r == null ? void 0 : r.propertiesFilenameLabel, value: s },
|
|
@@ -2382,35 +2383,35 @@ const ye = {
|
|
|
2382
2383
|
{ label: r == null ? void 0 : r.propertiesTitleLabel, value: d },
|
|
2383
2384
|
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value: u },
|
|
2384
2385
|
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value: p },
|
|
2385
|
-
{ label: r == null ? void 0 : r.propertiesKeywordLabel, value:
|
|
2386
|
+
{ label: r == null ? void 0 : r.propertiesKeywordLabel, value: g },
|
|
2386
2387
|
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
|
|
2387
2388
|
{
|
|
2388
2389
|
label: r == null ? void 0 : r.propertiesCreateOnLabel,
|
|
2389
|
-
value:
|
|
2390
|
+
value: f ? Ht(f) : ""
|
|
2390
2391
|
},
|
|
2391
2392
|
{
|
|
2392
2393
|
label: r == null ? void 0 : r.propertiesModifiedOnLabel,
|
|
2393
|
-
value:
|
|
2394
|
+
value: P ? Ht(P) : ""
|
|
2394
2395
|
},
|
|
2395
2396
|
{ separate: !0 },
|
|
2396
|
-
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value:
|
|
2397
|
-
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value:
|
|
2398
|
-
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value:
|
|
2397
|
+
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: b },
|
|
2398
|
+
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: v },
|
|
2399
|
+
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: S }
|
|
2399
2400
|
];
|
|
2400
2401
|
}, [e, r]);
|
|
2401
|
-
return /* @__PURE__ */ i(
|
|
2402
|
-
/* @__PURE__ */ i(
|
|
2403
|
-
/* @__PURE__ */ A(
|
|
2404
|
-
/* @__PURE__ */ i(
|
|
2402
|
+
return /* @__PURE__ */ i(di, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(ui, { container: t, children: /* @__PURE__ */ A("div", { className: ye["rp-dialog-wrapper"], children: [
|
|
2403
|
+
/* @__PURE__ */ i(pi, { className: ye["rp-dialog-overlay"] }),
|
|
2404
|
+
/* @__PURE__ */ A(hi, { className: ye["rp-document-dialog"], children: [
|
|
2405
|
+
/* @__PURE__ */ i(mi, { className: ye["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2405
2406
|
/* @__PURE__ */ i("div", { className: ye["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: ye["rp-properties-divider"] }) : /* @__PURE__ */ i(to, { label: c.label, value: c.value }) }, s)) }),
|
|
2406
|
-
/* @__PURE__ */ i(
|
|
2407
|
+
/* @__PURE__ */ i(fi, { asChild: !0, className: ye["rp-dialog-close"], children: /* @__PURE__ */ i(eo, {}) })
|
|
2407
2408
|
] })
|
|
2408
2409
|
] }) }) });
|
|
2409
|
-
},
|
|
2410
|
+
}, vi = {
|
|
2410
2411
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2411
|
-
}, on = ".pdf",
|
|
2412
|
+
}, on = ".pdf", _i = (e) => URL.createObjectURL(e), wi = async (e) => {
|
|
2412
2413
|
const n = await (await fetch(e)).blob();
|
|
2413
|
-
return
|
|
2414
|
+
return _i(n);
|
|
2414
2415
|
}, Un = () => {
|
|
2415
2416
|
const { filename: e, pdfSrc: t } = X(), { downloadFilename: n } = vr(), o = (a) => {
|
|
2416
2417
|
const c = n || a;
|
|
@@ -2420,26 +2421,26 @@ const ye = {
|
|
|
2420
2421
|
if (!e || !t)
|
|
2421
2422
|
throw new Error("There is no PDF source to download");
|
|
2422
2423
|
const a = document.createElement("a");
|
|
2423
|
-
a.href = await
|
|
2424
|
+
a.href = await wi(t), a.download = o(e), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2424
2425
|
}, [e, t]) };
|
|
2425
2426
|
}, qn = () => {
|
|
2426
2427
|
const { downloadIcon: e } = ue();
|
|
2427
|
-
return e || /* @__PURE__ */ i(
|
|
2428
|
-
}, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }),
|
|
2428
|
+
return e || /* @__PURE__ */ i(co, {});
|
|
2429
|
+
}, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }), bi = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(Zn, { localeMessages: t, children: /* @__PURE__ */ i(ne, { onClick: e, "aria-label": t == null ? void 0 : t.downloadFileTooltip, children: /* @__PURE__ */ i(qn, {}) }) }), Ci = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(ve, { onClick: e, children: /* @__PURE__ */ A(Zn, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2429
2430
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(qn, {}) }),
|
|
2430
2431
|
t == null ? void 0 : t.downloadFileLabel
|
|
2431
2432
|
] }) }), Bn = () => {
|
|
2432
2433
|
const { download: e } = Un(), { downloadTool: t = !0 } = fe(), { isSmallScreen: n } = be(), { localeMessages: o } = se();
|
|
2433
|
-
return t ? n ? /* @__PURE__ */ i(
|
|
2434
|
+
return t ? n ? /* @__PURE__ */ i(Ci, { download: e, localeMessages: o }) : typeof t == "function" ? /* @__PURE__ */ i(t, { download: e }) : t ? /* @__PURE__ */ i(bi, { download: e, localeMessages: o }) : null : null;
|
|
2434
2435
|
}, jn = () => {
|
|
2435
2436
|
const { printIcon: e } = ue();
|
|
2436
|
-
return e || /* @__PURE__ */ i(
|
|
2437
|
-
}, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }),
|
|
2437
|
+
return e || /* @__PURE__ */ i(lo, {});
|
|
2438
|
+
}, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }), Ti = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(Kn, { localeMessages: t, children: /* @__PURE__ */ i(ne, { onClick: e, "aria-label": t == null ? void 0 : t.printTooltip, children: /* @__PURE__ */ i(jn, {}) }) }), Pi = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(ve, { onClick: e, children: /* @__PURE__ */ A(Kn, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2438
2439
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(jn, {}) }),
|
|
2439
2440
|
t == null ? void 0 : t.printLabel
|
|
2440
2441
|
] }) }), Xn = () => {
|
|
2441
2442
|
const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = nt(), { printTool: c = !0 } = fe(), { isSmallScreen: s } = be(), { localeMessages: d } = se();
|
|
2442
|
-
return c ? s ? /* @__PURE__ */ i(
|
|
2443
|
+
return c ? s ? /* @__PURE__ */ i(Pi, { print: e, localeMessages: d }) : typeof c == "function" ? /* @__PURE__ */ i(
|
|
2443
2444
|
c,
|
|
2444
2445
|
{
|
|
2445
2446
|
print: e,
|
|
@@ -2449,33 +2450,33 @@ const ye = {
|
|
|
2449
2450
|
setOnComplete: o,
|
|
2450
2451
|
progress: a
|
|
2451
2452
|
}
|
|
2452
|
-
) : c ? /* @__PURE__ */ i(
|
|
2453
|
-
},
|
|
2453
|
+
) : c ? /* @__PURE__ */ i(Ti, { print: e, localeMessages: d }) : null : null;
|
|
2454
|
+
}, Si = {
|
|
2454
2455
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2455
|
-
}, Si = () => {
|
|
2456
|
-
const { goToFirstPageIcon: e } = ue();
|
|
2457
|
-
return e || /* @__PURE__ */ i(bn, { className: Pi["rp-go-to-Top"] });
|
|
2458
2456
|
}, yi = () => {
|
|
2457
|
+
const { goToFirstPageIcon: e } = ue();
|
|
2458
|
+
return e || /* @__PURE__ */ i(bn, { className: Si["rp-go-to-Top"] });
|
|
2459
|
+
}, xi = () => {
|
|
2459
2460
|
const { goToLastPageIcon: e } = ue();
|
|
2460
2461
|
return e || /* @__PURE__ */ i(bn, {});
|
|
2461
|
-
}, an = { width: "100%" },
|
|
2462
|
+
}, an = { width: "100%" }, Ii = () => {
|
|
2462
2463
|
const { goToPage: e, totalPages: t, focusedPage: n } = oe(), { jumpNavigationTool: o = !0 } = fe(), { localeMessages: r } = se(), a = M(() => n === 1, [n]), c = M(() => n === t, [n, t]), s = L(() => {
|
|
2463
2464
|
e(1);
|
|
2464
2465
|
}, [e]), d = L(() => {
|
|
2465
2466
|
e(t);
|
|
2466
2467
|
}, [e, t]);
|
|
2467
|
-
return o ? /* @__PURE__ */ A(
|
|
2468
|
+
return o ? /* @__PURE__ */ A(je, { children: [
|
|
2468
2469
|
/* @__PURE__ */ i(ve, { onClick: s, children: /* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.firstPageTooltip, style: an, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2469
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2470
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(yi, {}) }),
|
|
2470
2471
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2471
2472
|
] }) }) }),
|
|
2472
2473
|
/* @__PURE__ */ i(ve, { onClick: d, children: /* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.lastPageTooltip, style: an, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2473
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2474
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(xi, {}) }),
|
|
2474
2475
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2475
2476
|
] }) }) }),
|
|
2476
2477
|
/* @__PURE__ */ i(It, {})
|
|
2477
2478
|
] }) : null;
|
|
2478
|
-
},
|
|
2479
|
+
}, Li = () => {
|
|
2479
2480
|
const { container: e } = we(), { isSmallScreen: t } = be(), {
|
|
2480
2481
|
openFileTool: n,
|
|
2481
2482
|
downloadTool: o,
|
|
@@ -2486,11 +2487,11 @@ const ye = {
|
|
|
2486
2487
|
jumpNavigationTool: d,
|
|
2487
2488
|
printTool: u,
|
|
2488
2489
|
fullscreenTool: p
|
|
2489
|
-
} = fe(), { localeMessages:
|
|
2490
|
+
} = fe(), { localeMessages: f } = se();
|
|
2490
2491
|
return M(() => {
|
|
2491
|
-
const
|
|
2492
|
-
let
|
|
2493
|
-
return t && (
|
|
2492
|
+
const g = d || c || s || a || r;
|
|
2493
|
+
let P = !1;
|
|
2494
|
+
return t && (P = !(!n && !o && !u && !p)), g || P;
|
|
2494
2495
|
}, [
|
|
2495
2496
|
n,
|
|
2496
2497
|
o,
|
|
@@ -2505,26 +2506,27 @@ const ye = {
|
|
|
2505
2506
|
_n,
|
|
2506
2507
|
{
|
|
2507
2508
|
container: e,
|
|
2508
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content:
|
|
2509
|
-
children: /* @__PURE__ */ A("div", { className:
|
|
2510
|
-
t && /* @__PURE__ */ A(
|
|
2509
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(ne, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Vr, {}) }) }) }),
|
|
2510
|
+
children: /* @__PURE__ */ A("div", { className: vi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2511
|
+
t && /* @__PURE__ */ A(je, { children: [
|
|
2511
2512
|
/* @__PURE__ */ i(vn, {}),
|
|
2512
2513
|
/* @__PURE__ */ i(Bn, {}),
|
|
2513
2514
|
/* @__PURE__ */ i(Xn, {}),
|
|
2514
2515
|
/* @__PURE__ */ i(wn, {}),
|
|
2515
2516
|
/* @__PURE__ */ i(It, {})
|
|
2516
2517
|
] }),
|
|
2517
|
-
/* @__PURE__ */ i(
|
|
2518
|
+
/* @__PURE__ */ i(Ii, {}),
|
|
2518
2519
|
/* @__PURE__ */ i(io, {}),
|
|
2519
|
-
/* @__PURE__ */ i(
|
|
2520
|
+
/* @__PURE__ */ i(uo, {}),
|
|
2520
2521
|
/* @__PURE__ */ i(ao, {}),
|
|
2522
|
+
/* @__PURE__ */ i(so, {}),
|
|
2521
2523
|
/* @__PURE__ */ i(oo, {})
|
|
2522
2524
|
] })
|
|
2523
2525
|
}
|
|
2524
2526
|
),
|
|
2525
|
-
/* @__PURE__ */ i(
|
|
2527
|
+
/* @__PURE__ */ i(gi, {})
|
|
2526
2528
|
] }) : null;
|
|
2527
|
-
},
|
|
2529
|
+
}, Ri = () => {
|
|
2528
2530
|
const { isSmallScreen: e } = be();
|
|
2529
2531
|
return /* @__PURE__ */ A(_e, { children: [
|
|
2530
2532
|
/* @__PURE__ */ i(Gr, {}),
|
|
@@ -2534,7 +2536,7 @@ const ye = {
|
|
|
2534
2536
|
/* @__PURE__ */ i(Xn, {}),
|
|
2535
2537
|
/* @__PURE__ */ i(wn, {})
|
|
2536
2538
|
] }),
|
|
2537
|
-
/* @__PURE__ */ i(
|
|
2539
|
+
/* @__PURE__ */ i(Li, {})
|
|
2538
2540
|
] });
|
|
2539
2541
|
}, Ee = {
|
|
2540
2542
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
@@ -2542,46 +2544,53 @@ const ye = {
|
|
|
2542
2544
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2543
2545
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2544
2546
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2545
|
-
},
|
|
2547
|
+
}, Ei = 25, gt = 1e3, Ni = [50, 75, 100, 125, 150, 200, 300, 400], Oi = () => {
|
|
2546
2548
|
const { zoomInIcon: e } = ue();
|
|
2547
|
-
return e || /* @__PURE__ */ i(uo, {});
|
|
2548
|
-
}, Oi = () => {
|
|
2549
|
-
const { zoomOutIcon: e } = ue();
|
|
2550
2549
|
return e || /* @__PURE__ */ i(po, {});
|
|
2551
2550
|
}, Di = () => {
|
|
2552
|
-
const {
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2551
|
+
const { zoomOutIcon: e } = ue();
|
|
2552
|
+
return e || /* @__PURE__ */ i(ho, {});
|
|
2553
|
+
}, zi = () => {
|
|
2554
|
+
const { zoomLevel: e, setZoomLevel: t } = Qe(), { container: n, contentRef: o } = we(), { zoomTool: r = !0 } = fe(), { focusedPage: a } = oe(), { rotate: c } = Je(), { pages: s } = X(), { isSmallScreen: d } = be(), { localeMessages: u } = se(), { viewMode: p } = He(), f = L(() => {
|
|
2555
|
+
t((m) => {
|
|
2556
|
+
const w = Math.floor(m / 25) * 25;
|
|
2557
|
+
return Math.min(w + 25, gt);
|
|
2556
2558
|
});
|
|
2557
|
-
}, [t]),
|
|
2558
|
-
t((
|
|
2559
|
-
const
|
|
2560
|
-
return Math.min(
|
|
2559
|
+
}, [t]), h = L(() => {
|
|
2560
|
+
t((m) => {
|
|
2561
|
+
const w = Math.ceil(m / 25) * 25;
|
|
2562
|
+
return Math.min(w - 25, gt);
|
|
2561
2563
|
});
|
|
2562
|
-
}, [t]),
|
|
2563
|
-
var
|
|
2564
|
-
return (
|
|
2565
|
-
}, [s, a, c]),
|
|
2566
|
-
(
|
|
2567
|
-
const
|
|
2568
|
-
|
|
2564
|
+
}, [t]), g = M(() => e === Ei, [e]), P = M(() => e === gt, [e]), b = M(() => {
|
|
2565
|
+
var m;
|
|
2566
|
+
return (m = s.get(a)) == null ? void 0 : m.page.getViewport({ scale: 1, rotation: c });
|
|
2567
|
+
}, [s, a, c]), v = L(
|
|
2568
|
+
(m) => {
|
|
2569
|
+
const w = ((b == null ? void 0 : b.width) || 0) + 2 * $t, C = ((b == null ? void 0 : b.height) || 0) + 2 * $t, l = (o == null ? void 0 : o.clientWidth) || 0, T = (o == null ? void 0 : o.clientHeight) || 0, _ = mo(
|
|
2570
|
+
m,
|
|
2571
|
+
l,
|
|
2572
|
+
T,
|
|
2573
|
+
w,
|
|
2574
|
+
C,
|
|
2575
|
+
p
|
|
2576
|
+
);
|
|
2577
|
+
t(_);
|
|
2569
2578
|
},
|
|
2570
2579
|
[t, b]
|
|
2571
|
-
),
|
|
2572
|
-
(
|
|
2573
|
-
typeof
|
|
2580
|
+
), S = L(
|
|
2581
|
+
(m) => {
|
|
2582
|
+
typeof m == "number" ? t(m) : v(m);
|
|
2574
2583
|
},
|
|
2575
|
-
[t,
|
|
2584
|
+
[t, v]
|
|
2576
2585
|
);
|
|
2577
2586
|
return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: e, setZoomLevel: t }) : r ? /* @__PURE__ */ A("div", { className: Ee["rp-zoom-wrapper"], children: [
|
|
2578
2587
|
/* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2579
2588
|
ne,
|
|
2580
2589
|
{
|
|
2581
|
-
disabled:
|
|
2582
|
-
onClick:
|
|
2590
|
+
disabled: g,
|
|
2591
|
+
onClick: h,
|
|
2583
2592
|
"aria-label": u == null ? void 0 : u.zoomOutTooltip,
|
|
2584
|
-
children: /* @__PURE__ */ i(
|
|
2593
|
+
children: /* @__PURE__ */ i(Di, {})
|
|
2585
2594
|
}
|
|
2586
2595
|
) }),
|
|
2587
2596
|
!d && /* @__PURE__ */ i(
|
|
@@ -2603,26 +2612,26 @@ const ye = {
|
|
|
2603
2612
|
style: { minWidth: "200px" },
|
|
2604
2613
|
align: "center",
|
|
2605
2614
|
children: /* @__PURE__ */ A("div", { className: Ee["rp-zoom-dropdown-content"], children: [
|
|
2606
|
-
/* @__PURE__ */ A(
|
|
2607
|
-
/* @__PURE__ */ i(ve, { onClick: () =>
|
|
2608
|
-
/* @__PURE__ */ i(ve, { onClick: () =>
|
|
2609
|
-
/* @__PURE__ */ i(ve, { onClick: () =>
|
|
2615
|
+
/* @__PURE__ */ A(je, { children: [
|
|
2616
|
+
/* @__PURE__ */ i(ve, { onClick: () => S(at.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
|
|
2617
|
+
/* @__PURE__ */ i(ve, { onClick: () => S(at.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
|
|
2618
|
+
/* @__PURE__ */ i(ve, { onClick: () => S(at.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
|
|
2610
2619
|
] }),
|
|
2611
2620
|
/* @__PURE__ */ i(It, {}),
|
|
2612
|
-
/* @__PURE__ */ i(
|
|
2613
|
-
|
|
2621
|
+
/* @__PURE__ */ i(je, { children: Ni.map((m) => /* @__PURE__ */ A(ve, { onClick: () => S(m), children: [
|
|
2622
|
+
m,
|
|
2614
2623
|
" %"
|
|
2615
|
-
] },
|
|
2624
|
+
] }, m)) })
|
|
2616
2625
|
] })
|
|
2617
2626
|
}
|
|
2618
2627
|
),
|
|
2619
2628
|
/* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2620
2629
|
ne,
|
|
2621
2630
|
{
|
|
2622
|
-
disabled:
|
|
2623
|
-
onClick:
|
|
2631
|
+
disabled: P,
|
|
2632
|
+
onClick: f,
|
|
2624
2633
|
"aria-label": u == null ? void 0 : u.zoomInTooltip,
|
|
2625
|
-
children: /* @__PURE__ */ i(
|
|
2634
|
+
children: /* @__PURE__ */ i(Oi, {})
|
|
2626
2635
|
}
|
|
2627
2636
|
) })
|
|
2628
2637
|
] }) : null;
|
|
@@ -2651,23 +2660,23 @@ const ye = {
|
|
|
2651
2660
|
] });
|
|
2652
2661
|
}, cn = () => {
|
|
2653
2662
|
const { searchIcon: e } = ue();
|
|
2654
|
-
return e || /* @__PURE__ */ i(
|
|
2655
|
-
},
|
|
2663
|
+
return e || /* @__PURE__ */ i(fo, {});
|
|
2664
|
+
}, Ai = () => {
|
|
2656
2665
|
const { container: e } = we(), [t, n] = H(!1), { pdf: o } = X(), [r, a] = H(null), {
|
|
2657
2666
|
searchOptions: c,
|
|
2658
2667
|
setSearchOptions: s,
|
|
2659
2668
|
loading: d,
|
|
2660
2669
|
setSearch: u,
|
|
2661
2670
|
totalMatches: p,
|
|
2662
|
-
currentMatchPosition:
|
|
2671
|
+
currentMatchPosition: f,
|
|
2663
2672
|
nextMatch: h,
|
|
2664
|
-
prevMatch:
|
|
2665
|
-
search:
|
|
2666
|
-
} = Lt(), { searchTool:
|
|
2673
|
+
prevMatch: g,
|
|
2674
|
+
search: P
|
|
2675
|
+
} = Lt(), { searchTool: b = !0 } = fe(), [v, S] = H(P), { localeMessages: m } = se(), { isSmallScreen: w } = be(), C = L(() => {
|
|
2667
2676
|
n(!0);
|
|
2668
2677
|
}, []), l = L(() => {
|
|
2669
|
-
u(""),
|
|
2670
|
-
}, [u]),
|
|
2678
|
+
u(""), S(""), n(!1);
|
|
2679
|
+
}, [u]), T = (x) => {
|
|
2671
2680
|
const k = x.key === "Enter", $ = x.key === " ";
|
|
2672
2681
|
(k || $) && l();
|
|
2673
2682
|
}, _ = L(
|
|
@@ -2677,9 +2686,9 @@ const ye = {
|
|
|
2677
2686
|
[t]
|
|
2678
2687
|
), y = L(
|
|
2679
2688
|
(x) => {
|
|
2680
|
-
x.shiftKey && x.key === "Enter" ?
|
|
2689
|
+
x.shiftKey && x.key === "Enter" ? g() : x.key === "Enter" && P !== v ? u(v) : x.key === "Enter" && h();
|
|
2681
2690
|
},
|
|
2682
|
-
[
|
|
2691
|
+
[v, g, h, u, P]
|
|
2683
2692
|
);
|
|
2684
2693
|
F(() => (window.addEventListener("keydown", _), () => {
|
|
2685
2694
|
window.removeEventListener("keydown", _);
|
|
@@ -2687,10 +2696,10 @@ const ye = {
|
|
|
2687
2696
|
r && r.focus();
|
|
2688
2697
|
}, [r]);
|
|
2689
2698
|
const E = L((x) => {
|
|
2690
|
-
|
|
2699
|
+
S(x.target.value);
|
|
2691
2700
|
}, []), I = L(() => {
|
|
2692
|
-
|
|
2693
|
-
}, [u]), N = M(() => `${
|
|
2701
|
+
S(""), u("");
|
|
2702
|
+
}, [u]), N = M(() => `${f} / ${p}`, [f, p]), { wholeWords: R, matchCase: z } = M(() => c, [c]), O = L(
|
|
2694
2703
|
(x) => {
|
|
2695
2704
|
s((k) => ({ ...k, matchCase: x }));
|
|
2696
2705
|
},
|
|
@@ -2703,55 +2712,55 @@ const ye = {
|
|
|
2703
2712
|
);
|
|
2704
2713
|
return F(() => {
|
|
2705
2714
|
l();
|
|
2706
|
-
}, [o, l]),
|
|
2715
|
+
}, [o, l]), b ? /* @__PURE__ */ i(_e, { children: /* @__PURE__ */ i(
|
|
2707
2716
|
Ar,
|
|
2708
2717
|
{
|
|
2709
2718
|
open: t,
|
|
2710
2719
|
container: e,
|
|
2711
|
-
triggerComponent: /* @__PURE__ */ i(Z, { content:
|
|
2720
|
+
triggerComponent: /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(ne, { onClick: C, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(cn, {}) }) }),
|
|
2712
2721
|
children: /* @__PURE__ */ A("div", { className: K["rp-search-tool-content"], children: [
|
|
2713
2722
|
/* @__PURE__ */ A("div", { className: K["rp-search-tool-input-wrapper"], children: [
|
|
2714
2723
|
/* @__PURE__ */ A("div", { className: K["rp-search-tool-input"], children: [
|
|
2715
|
-
/* @__PURE__ */ i(Z, { content:
|
|
2724
|
+
/* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2716
2725
|
un,
|
|
2717
2726
|
{
|
|
2718
|
-
value:
|
|
2727
|
+
value: v,
|
|
2719
2728
|
onKeyDown: y,
|
|
2720
2729
|
onChange: E,
|
|
2721
2730
|
icon: /* @__PURE__ */ i(cn, {}),
|
|
2722
|
-
placeholder:
|
|
2731
|
+
placeholder: m == null ? void 0 : m.searchInputPlaceholder,
|
|
2723
2732
|
className: K["rp-search-input"],
|
|
2724
2733
|
ref: a,
|
|
2725
|
-
children: !!
|
|
2734
|
+
children: !!v && /* @__PURE__ */ i("span", { className: K["rp-search-tool-input-clear"], onClick: I, children: /* @__PURE__ */ i(go, {}) })
|
|
2726
2735
|
}
|
|
2727
2736
|
) }),
|
|
2728
2737
|
d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Pt, { className: K["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: N }),
|
|
2729
|
-
w && /* @__PURE__ */ i("div", { className: K["rp-search-tool-controls"], children: /* @__PURE__ */ i(Gt, { onKeyPress:
|
|
2738
|
+
w && /* @__PURE__ */ i("div", { className: K["rp-search-tool-controls"], children: /* @__PURE__ */ i(Gt, { onKeyPress: T, handleClose: l }) })
|
|
2730
2739
|
] }),
|
|
2731
2740
|
/* @__PURE__ */ A("div", { className: K["rp-search-tool-input-checkboxes"], children: [
|
|
2732
2741
|
w && /* @__PURE__ */ i(sn, {}),
|
|
2733
|
-
/* @__PURE__ */ i(Vt, { name: "matchCase", value: z, onChange: O, children:
|
|
2734
|
-
!w && /* @__PURE__ */ i(Z, { content:
|
|
2735
|
-
/* @__PURE__ */ i(Vt, { name: "wholeWord", value: R, onChange: D, children:
|
|
2736
|
-
!w && /* @__PURE__ */ i(Z, { content:
|
|
2742
|
+
/* @__PURE__ */ i(Vt, { name: "matchCase", value: z, onChange: O, children: m == null ? void 0 : m.searchMatchCaseLabel }),
|
|
2743
|
+
!w && /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Ut, {}) }) }),
|
|
2744
|
+
/* @__PURE__ */ i(Vt, { name: "wholeWord", value: R, onChange: D, children: m == null ? void 0 : m.searchWholeWordsLabel }),
|
|
2745
|
+
!w && /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Ut, {}) }) })
|
|
2737
2746
|
] })
|
|
2738
2747
|
] }),
|
|
2739
2748
|
!w && /* @__PURE__ */ A("div", { className: K["rp-search-tool-controls"], children: [
|
|
2740
2749
|
/* @__PURE__ */ i(sn, {}),
|
|
2741
|
-
/* @__PURE__ */ i(Gt, { onKeyPress:
|
|
2750
|
+
/* @__PURE__ */ i(Gt, { onKeyPress: T, handleClose: l })
|
|
2742
2751
|
] })
|
|
2743
2752
|
] })
|
|
2744
2753
|
}
|
|
2745
2754
|
) }) : null;
|
|
2746
|
-
},
|
|
2755
|
+
}, Fi = "_loading_vpexk_1", Ne = {
|
|
2747
2756
|
"rp-loading-overlay": "_rp-loading-overlay_vpexk_1",
|
|
2748
2757
|
"rp-loading-modal": "_rp-loading-modal_vpexk_14",
|
|
2749
2758
|
"rp-loading-title": "_rp-loading-title_vpexk_27",
|
|
2750
2759
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_vpexk_35",
|
|
2751
2760
|
"rp-loading-progress": "_rp-loading-progress_vpexk_35",
|
|
2752
2761
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_vpexk_55",
|
|
2753
|
-
loading:
|
|
2754
|
-
},
|
|
2762
|
+
loading: Fi
|
|
2763
|
+
}, ki = ({ percentage: e }) => {
|
|
2755
2764
|
const { cancel: t } = nt(), { localeMessages: n } = se();
|
|
2756
2765
|
return e < 1 ? null : /* @__PURE__ */ i("div", { className: te(Ne["rp-loading-overlay"]), children: /* @__PURE__ */ A("div", { className: te(Ne["rp-loading-modal"]), children: [
|
|
2757
2766
|
/* @__PURE__ */ A("div", { className: te(Ne["rp-loading-title"]), children: [
|
|
@@ -2767,18 +2776,18 @@ const ye = {
|
|
|
2767
2776
|
) }),
|
|
2768
2777
|
/* @__PURE__ */ i("button", { className: te(Ne["rp-loading-cancel-button"]), onClick: t, children: n == null ? void 0 : n.printCancelLabel })
|
|
2769
2778
|
] }) });
|
|
2770
|
-
},
|
|
2779
|
+
}, Mi = We((e, t) => {
|
|
2771
2780
|
const { showPrintProgress: n } = fe(), { progress: o } = nt(), { isSmallScreen: r } = be(), { percentage: a } = o || {}, c = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2772
2781
|
return /* @__PURE__ */ A("div", { children: [
|
|
2773
2782
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: t, className: Ae["rp-toolbar-content"], children: /* @__PURE__ */ A("div", { className: Ae["rp-toolbar-wrapper"], style: c(), children: [
|
|
2774
2783
|
/* @__PURE__ */ A("div", { "data-rp": "topBarLeft", className: Ae["rp-toolbar-start"], children: [
|
|
2775
|
-
/* @__PURE__ */ i(
|
|
2776
|
-
/* @__PURE__ */ i(
|
|
2784
|
+
/* @__PURE__ */ i(Ai, {}),
|
|
2785
|
+
/* @__PURE__ */ i(Qo, {})
|
|
2777
2786
|
] }),
|
|
2778
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(
|
|
2779
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
2787
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(zi, {}) }),
|
|
2788
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(Ri, {}) })
|
|
2780
2789
|
] }) }),
|
|
2781
|
-
n && a ? /* @__PURE__ */ i(
|
|
2790
|
+
n && a ? /* @__PURE__ */ i(ki, { percentage: a }) : null
|
|
2782
2791
|
] });
|
|
2783
2792
|
}), vt = {
|
|
2784
2793
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
@@ -2791,7 +2800,7 @@ const ye = {
|
|
|
2791
2800
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2792
2801
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2793
2802
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2794
|
-
},
|
|
2803
|
+
}, Wi = (e) => {
|
|
2795
2804
|
const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } = oe(), c = M(() => o ? Fe["rp-thumbnail-active"] : "", [o]), s = M(() => ({
|
|
2796
2805
|
width: Math.round(r.width),
|
|
2797
2806
|
height: Math.round(r.height)
|
|
@@ -2831,36 +2840,36 @@ const ye = {
|
|
|
2831
2840
|
}, ln = {
|
|
2832
2841
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2833
2842
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2834
|
-
},
|
|
2843
|
+
}, Hi = 16, $i = (e, t) => {
|
|
2835
2844
|
const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
|
|
2836
|
-
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
2837
|
-
},
|
|
2845
|
+
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Hi);
|
|
2846
|
+
}, Gi = We((e, t) => {
|
|
2838
2847
|
const { show: n } = e, { focusedPage: o, totalPages: r } = oe(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: d } = yn(), u = W(null), p = W(1);
|
|
2839
2848
|
dn(t, () => u.current);
|
|
2840
|
-
const
|
|
2841
|
-
const
|
|
2842
|
-
|
|
2849
|
+
const f = M(() => Object.values(a), [a]), h = L(() => {
|
|
2850
|
+
const g = s + 1;
|
|
2851
|
+
g <= r && c(g);
|
|
2843
2852
|
}, [c, r, s]);
|
|
2844
2853
|
return F(() => {
|
|
2845
|
-
o > s ? d(o) : n && p.current !== o && (
|
|
2846
|
-
}, [o, s, d, n,
|
|
2847
|
-
var
|
|
2854
|
+
o > s ? d(o) : n && p.current !== o && ($i(u.current, o), p.current = o);
|
|
2855
|
+
}, [o, s, d, n, f]), wr(u.current, h), /* @__PURE__ */ i("div", { ref: u, className: ln["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: ln["rp-thumbnails"], children: n ? f.map((g, P) => {
|
|
2856
|
+
var b, v;
|
|
2848
2857
|
return /* @__PURE__ */ i(
|
|
2849
|
-
|
|
2858
|
+
Wi,
|
|
2850
2859
|
{
|
|
2851
|
-
isFocused: o === ((
|
|
2852
|
-
pageNumber: (
|
|
2853
|
-
thumbnailSrc:
|
|
2854
|
-
loading:
|
|
2855
|
-
viewport:
|
|
2860
|
+
isFocused: o === ((b = g.page) == null ? void 0 : b.pageNumber),
|
|
2861
|
+
pageNumber: (v = g.page) == null ? void 0 : v.pageNumber,
|
|
2862
|
+
thumbnailSrc: g.thumbnailSrc,
|
|
2863
|
+
loading: g.loading,
|
|
2864
|
+
viewport: g.viewport
|
|
2856
2865
|
},
|
|
2857
|
-
|
|
2866
|
+
P
|
|
2858
2867
|
);
|
|
2859
2868
|
}) : null }) });
|
|
2860
|
-
}),
|
|
2869
|
+
}), Vi = () => {
|
|
2861
2870
|
const { thumbnailIcon: e } = ue();
|
|
2862
2871
|
return e || /* @__PURE__ */ i(_r, {});
|
|
2863
|
-
},
|
|
2872
|
+
}, Ui = () => {
|
|
2864
2873
|
const { active: e, setActive: t } = yn(), [n, o] = H(200), r = W(null), { thumbnailTool: a, sidebarEnable: c } = fe(), { localeMessages: s } = se(), d = L(() => {
|
|
2865
2874
|
t((p) => !p);
|
|
2866
2875
|
}, []), u = M(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: e }) : a ? /* @__PURE__ */ i(Z, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
@@ -2869,7 +2878,7 @@ const ye = {
|
|
|
2869
2878
|
onClick: d,
|
|
2870
2879
|
active: e,
|
|
2871
2880
|
"aria-label": s == null ? void 0 : s.thumbnailTooltip,
|
|
2872
|
-
children: /* @__PURE__ */ i(
|
|
2881
|
+
children: /* @__PURE__ */ i(Vi, {})
|
|
2873
2882
|
}
|
|
2874
2883
|
) }) : null, [a, e, d, s]);
|
|
2875
2884
|
return /* @__PURE__ */ i(_e, { children: c && /* @__PURE__ */ A(
|
|
@@ -2887,7 +2896,7 @@ const ye = {
|
|
|
2887
2896
|
hidden: !e,
|
|
2888
2897
|
className: vt["rp-thumbnails-wrapper"],
|
|
2889
2898
|
children: [
|
|
2890
|
-
/* @__PURE__ */ i(
|
|
2899
|
+
/* @__PURE__ */ i(Gi, { show: e, ref: r }),
|
|
2891
2900
|
/* @__PURE__ */ i(br, { onWidthChange: o, thumbnailRef: r })
|
|
2892
2901
|
]
|
|
2893
2902
|
}
|
|
@@ -2896,14 +2905,14 @@ const ye = {
|
|
|
2896
2905
|
}
|
|
2897
2906
|
) });
|
|
2898
2907
|
}, ge = {
|
|
2899
|
-
"rp-layout": "_rp-
|
|
2900
|
-
"rp-content": "_rp-
|
|
2901
|
-
"rp-pages": "_rp-
|
|
2902
|
-
"rp-container": "_rp-
|
|
2903
|
-
"rp-loader": "_rp-
|
|
2904
|
-
"rp-theme-variables": "_rp-theme-
|
|
2905
|
-
"rp-dark-mode": "_rp-dark-
|
|
2906
|
-
},
|
|
2908
|
+
"rp-layout": "_rp-layout_vutcr_1",
|
|
2909
|
+
"rp-content": "_rp-content_vutcr_5",
|
|
2910
|
+
"rp-pages": "_rp-pages_vutcr_11",
|
|
2911
|
+
"rp-container": "_rp-container_vutcr_16",
|
|
2912
|
+
"rp-loader": "_rp-loader_vutcr_52",
|
|
2913
|
+
"rp-theme-variables": "_rp-theme-variables_vutcr_56",
|
|
2914
|
+
"rp-dark-mode": "_rp-dark-mode_vutcr_151"
|
|
2915
|
+
}, qi = We(
|
|
2907
2916
|
(e, t) => {
|
|
2908
2917
|
const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: c, customDarkVariables: s } = Ir(), { darkMode: d } = or();
|
|
2909
2918
|
return /* @__PURE__ */ i(
|
|
@@ -2926,7 +2935,7 @@ const ye = {
|
|
|
2926
2935
|
}
|
|
2927
2936
|
);
|
|
2928
2937
|
}
|
|
2929
|
-
),
|
|
2938
|
+
), zs = We((e, t) => {
|
|
2930
2939
|
const {
|
|
2931
2940
|
children: n,
|
|
2932
2941
|
slots: o,
|
|
@@ -2937,21 +2946,21 @@ const ye = {
|
|
|
2937
2946
|
onLoaded: d,
|
|
2938
2947
|
cleanupOnLoaded: u,
|
|
2939
2948
|
onLayoutWidthChange: p
|
|
2940
|
-
} = e, [
|
|
2949
|
+
} = e, [f, h] = H(null), { setContainer: g, setContentRef: P } = we(), { loading: b } = X(), { LoaderImageComponent: v } = gn();
|
|
2941
2950
|
return F(() => (d && d(), () => {
|
|
2942
2951
|
u && u();
|
|
2943
|
-
}), [d, u]), /* @__PURE__ */ i(
|
|
2952
|
+
}), [d, u]), /* @__PURE__ */ i(qi, { toolbarRef: f, ref: t, children: /* @__PURE__ */ i(xr, { mobileWidth: s, onLayoutWidthChange: p, children: /* @__PURE__ */ i(Cr, { slots: o, children: /* @__PURE__ */ i(Tr, { icons: r, children: /* @__PURE__ */ A(Pr, { getContainerRef: g, style: a, className: c, children: [
|
|
2944
2953
|
/* @__PURE__ */ A(Sr, { children: [
|
|
2945
2954
|
/* @__PURE__ */ A("div", { className: ge["rp-layout"], children: [
|
|
2946
|
-
/* @__PURE__ */ i(
|
|
2955
|
+
/* @__PURE__ */ i(Mi, { ref: h }),
|
|
2947
2956
|
/* @__PURE__ */ A("div", { className: ge["rp-content"], children: [
|
|
2948
|
-
/* @__PURE__ */ i("div", { className: ge["rp-sidebar"], children: /* @__PURE__ */ i(
|
|
2949
|
-
/* @__PURE__ */ i("div", { ref:
|
|
2957
|
+
/* @__PURE__ */ i("div", { className: ge["rp-sidebar"], children: /* @__PURE__ */ i(Ui, {}) }),
|
|
2958
|
+
/* @__PURE__ */ i("div", { ref: P, className: ge["rp-pages"], children: n })
|
|
2950
2959
|
] })
|
|
2951
2960
|
] }),
|
|
2952
2961
|
/* @__PURE__ */ i(yr, {})
|
|
2953
2962
|
] }),
|
|
2954
|
-
|
|
2963
|
+
b ? /* @__PURE__ */ i(
|
|
2955
2964
|
"div",
|
|
2956
2965
|
{
|
|
2957
2966
|
className: ge["rp-loader"],
|
|
@@ -2974,7 +2983,7 @@ const ye = {
|
|
|
2974
2983
|
height: "100%",
|
|
2975
2984
|
width: "100%"
|
|
2976
2985
|
},
|
|
2977
|
-
children:
|
|
2986
|
+
children: v && /* @__PURE__ */ i(v, {})
|
|
2978
2987
|
}
|
|
2979
2988
|
)
|
|
2980
2989
|
}
|
|
@@ -2982,49 +2991,49 @@ const ye = {
|
|
|
2982
2991
|
] }) }) }) }) });
|
|
2983
2992
|
});
|
|
2984
2993
|
export {
|
|
2985
|
-
|
|
2994
|
+
Io as A,
|
|
2986
2995
|
sn as B,
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2996
|
+
Co as C,
|
|
2997
|
+
Bo as D,
|
|
2998
|
+
Ai as E,
|
|
2990
2999
|
Bn as F,
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3000
|
+
Mi as G,
|
|
3001
|
+
Wi as H,
|
|
3002
|
+
Gi as I,
|
|
3003
|
+
Ui as J,
|
|
3004
|
+
qi as K,
|
|
3005
|
+
ki as L,
|
|
3006
|
+
Ii as M,
|
|
3007
|
+
Li as O,
|
|
3008
|
+
Is as P,
|
|
3009
|
+
Ns as R,
|
|
3010
|
+
Es as S,
|
|
3011
|
+
Rs as T,
|
|
3012
|
+
zi as Z,
|
|
3013
|
+
Ls as a,
|
|
3014
|
+
zs as b,
|
|
3006
3015
|
Un as c,
|
|
3007
3016
|
nt as d,
|
|
3008
3017
|
Lt as e,
|
|
3009
3018
|
Cn as f,
|
|
3010
|
-
|
|
3019
|
+
vo as g,
|
|
3011
3020
|
Tn as h,
|
|
3012
|
-
|
|
3021
|
+
_o as i,
|
|
3013
3022
|
Pn as j,
|
|
3014
|
-
|
|
3023
|
+
wo as k,
|
|
3015
3024
|
Sn as l,
|
|
3016
3025
|
yn as m,
|
|
3017
|
-
|
|
3026
|
+
bo as n,
|
|
3018
3027
|
xn as o,
|
|
3019
|
-
|
|
3020
|
-
|
|
3028
|
+
So as p,
|
|
3029
|
+
Lo as q,
|
|
3021
3030
|
Rt as r,
|
|
3022
|
-
|
|
3023
|
-
|
|
3031
|
+
Uo as s,
|
|
3032
|
+
jo as t,
|
|
3024
3033
|
oe as u,
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3034
|
+
Ko as v,
|
|
3035
|
+
Qo as w,
|
|
3036
|
+
gi as x,
|
|
3028
3037
|
Xn as y,
|
|
3029
|
-
|
|
3038
|
+
Ri as z
|
|
3030
3039
|
};
|