@kaktos/flipbook-react 1.0.1 → 1.0.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/README.md +27 -0
- package/dist/react-flipbook.cjs +1 -1
- package/dist/react-flipbook.css +1 -1
- package/dist/react-flipbook.js +514 -508
- package/dist/src/types.d.ts +3 -1
- package/package.json +1 -1
package/dist/react-flipbook.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
function
|
|
1
|
+
import { jsxs as re, jsx as nt } from "react/jsx-runtime";
|
|
2
|
+
import { useState as S, useEffect as X, useRef as l, useCallback as u, useMemo as Ve, forwardRef as En, useImperativeHandle as Cn } from "react";
|
|
3
|
+
function ve(c) {
|
|
4
4
|
if (c && c.constructor === Array) {
|
|
5
5
|
var r = c.filter(function(b) {
|
|
6
6
|
return typeof b == "number";
|
|
@@ -8,53 +8,53 @@ function be(c) {
|
|
|
8
8
|
return !isNaN(b);
|
|
9
9
|
});
|
|
10
10
|
if (c.length === 6 && r.length === 6) {
|
|
11
|
-
var o =
|
|
11
|
+
var o = Yt();
|
|
12
12
|
return o[0] = r[0], o[1] = r[1], o[4] = r[2], o[5] = r[3], o[12] = r[4], o[13] = r[5], o;
|
|
13
13
|
} else if (c.length === 16 && r.length === 16)
|
|
14
14
|
return c;
|
|
15
15
|
}
|
|
16
16
|
throw new TypeError("Expected a `number[]` with length 6 or 16.");
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Yt() {
|
|
19
19
|
for (var c = [], r = 0; r < 16; r++)
|
|
20
20
|
r % 5 == 0 ? c.push(1) : c.push(0);
|
|
21
21
|
return c;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
for (var o =
|
|
25
|
-
for (var O = [o[M], o[M + 4], o[M + 8], o[M + 12]],
|
|
26
|
-
var L =
|
|
27
|
-
|
|
23
|
+
function Zn(c, r) {
|
|
24
|
+
for (var o = ve(c), b = ve(r), R = [], M = 0; M < 4; M++)
|
|
25
|
+
for (var O = [o[M], o[M + 4], o[M + 8], o[M + 12]], T = 0; T < 4; T++) {
|
|
26
|
+
var L = T * 4, C = [b[L], b[L + 1], b[L + 2], b[L + 3]], j = O[0] * C[0] + O[1] * C[1] + O[2] * C[2] + O[3] * C[3];
|
|
27
|
+
R[M + L] = j;
|
|
28
28
|
}
|
|
29
|
-
return
|
|
29
|
+
return R;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
var r =
|
|
31
|
+
function On(c) {
|
|
32
|
+
var r = Yt();
|
|
33
33
|
return r[11] = -1 / c, r;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
var r = Math.PI / 180 * c, o =
|
|
35
|
+
function $n(c) {
|
|
36
|
+
var r = Math.PI / 180 * c, o = Yt();
|
|
37
37
|
return o[0] = o[10] = Math.cos(r), o[2] = o[8] = Math.sin(r), o[2] *= -1, o;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return "matrix3d(" +
|
|
39
|
+
function Wn(c) {
|
|
40
|
+
return "matrix3d(" + ve(c).join(", ") + ")";
|
|
41
41
|
}
|
|
42
42
|
function qe(c, r, o) {
|
|
43
|
-
var b =
|
|
43
|
+
var b = Yt();
|
|
44
44
|
return c !== void 0 && r !== void 0 && o !== void 0 && (b[12] = c, b[13] = r, b[14] = o), b;
|
|
45
45
|
}
|
|
46
|
-
class
|
|
46
|
+
class oe {
|
|
47
47
|
constructor(r) {
|
|
48
|
-
r ? r instanceof
|
|
48
|
+
r ? r instanceof oe ? this.m = [...r.m] : this.m = [...r] : this.m = Yt();
|
|
49
49
|
}
|
|
50
50
|
clone() {
|
|
51
|
-
return new
|
|
51
|
+
return new oe(this);
|
|
52
52
|
}
|
|
53
53
|
multiply(r) {
|
|
54
|
-
this.m =
|
|
54
|
+
this.m = Zn(this.m, r);
|
|
55
55
|
}
|
|
56
56
|
perspective(r) {
|
|
57
|
-
this.multiply(
|
|
57
|
+
this.multiply(On(r));
|
|
58
58
|
}
|
|
59
59
|
transformX(r) {
|
|
60
60
|
return (r * this.m[0] + this.m[12]) / (r * this.m[3] + this.m[15]);
|
|
@@ -66,101 +66,101 @@ class ie {
|
|
|
66
66
|
this.multiply(qe(r, o, b));
|
|
67
67
|
}
|
|
68
68
|
rotateY(r) {
|
|
69
|
-
this.multiply(
|
|
69
|
+
this.multiply($n(r));
|
|
70
70
|
}
|
|
71
71
|
toString() {
|
|
72
|
-
return
|
|
72
|
+
return Wn(this.m);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
const [b,
|
|
77
|
-
return
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
if (!
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
L(
|
|
75
|
+
function Nn(c, r, o) {
|
|
76
|
+
const [b, R] = S(0), [M, O] = S(0), [T, L] = S(1), [C, j] = S(0);
|
|
77
|
+
return X(() => {
|
|
78
|
+
const D = () => {
|
|
79
|
+
const U = c.current;
|
|
80
|
+
if (!U) return;
|
|
81
|
+
R(U.clientWidth), O(U.clientHeight);
|
|
82
|
+
const g = U.clientWidth > U.clientHeight && !r ? 2 : 1;
|
|
83
|
+
L(g), g === 2 && j((rt) => rt + 1);
|
|
84
84
|
};
|
|
85
|
-
return window.addEventListener("resize",
|
|
85
|
+
return window.addEventListener("resize", D, { passive: !0 }), D(), () => window.removeEventListener("resize", D);
|
|
86
86
|
}, [r, c]), {
|
|
87
87
|
viewWidth: b,
|
|
88
88
|
viewHeight: M,
|
|
89
|
-
rawDisplayedPages:
|
|
89
|
+
rawDisplayedPages: T,
|
|
90
90
|
pageAlignmentTick: C
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
function Xn(c, r, o, b,
|
|
94
|
-
const [
|
|
95
|
-
(
|
|
96
|
-
if (
|
|
97
|
-
const a = r[
|
|
93
|
+
function Xn(c, r, o, b, R, M, O) {
|
|
94
|
+
const [T, L] = S(null), [C, j] = S(null), [D, U] = S({}), g = l({}), rt = l({ count: 0, target: 0, cb: null }), at = l(/* @__PURE__ */ new Set()), st = u(
|
|
95
|
+
(f, d = !1) => {
|
|
96
|
+
if (d && R > 1 && !M) {
|
|
97
|
+
const a = r[f];
|
|
98
98
|
if (a) return a;
|
|
99
99
|
}
|
|
100
|
-
return c[
|
|
100
|
+
return c[f] ?? null;
|
|
101
101
|
},
|
|
102
|
-
[c, r,
|
|
103
|
-
), A =
|
|
104
|
-
(
|
|
105
|
-
[
|
|
102
|
+
[c, r, R, M]
|
|
103
|
+
), A = u(
|
|
104
|
+
(f) => T === null || D[f] ? f : (g.current[f] || (g.current[f] = null, at.current.add(f)), O),
|
|
105
|
+
[T, D, O]
|
|
106
106
|
);
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
if (
|
|
107
|
+
X(() => {
|
|
108
|
+
const f = at.current;
|
|
109
|
+
f.size !== 0 && (f.forEach((d) => {
|
|
110
|
+
if (g.current[d]) return;
|
|
111
111
|
const a = new Image();
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}, a.src =
|
|
115
|
-
}),
|
|
112
|
+
g.current[d] = a, a.onload = () => {
|
|
113
|
+
U((z) => ({ ...z, [d]: !0 }));
|
|
114
|
+
}, a.src = d;
|
|
115
|
+
}), f.clear());
|
|
116
116
|
});
|
|
117
|
-
const
|
|
118
|
-
(
|
|
119
|
-
const a =
|
|
120
|
-
return
|
|
117
|
+
const $ = u(
|
|
118
|
+
(f, d = !1) => {
|
|
119
|
+
const a = st(f, d);
|
|
120
|
+
return d && R > 1 && !M ? a : a ? A(a) : null;
|
|
121
121
|
},
|
|
122
|
-
[
|
|
123
|
-
),
|
|
124
|
-
(
|
|
125
|
-
for (let
|
|
126
|
-
|
|
127
|
-
if (
|
|
128
|
-
for (let
|
|
129
|
-
const a = r[
|
|
130
|
-
if (a && !
|
|
131
|
-
const
|
|
132
|
-
|
|
122
|
+
[st, A, R, M]
|
|
123
|
+
), lt = u(
|
|
124
|
+
(f = !1) => {
|
|
125
|
+
for (let d = o - 3; d <= o + 3; d++)
|
|
126
|
+
$(d);
|
|
127
|
+
if (f)
|
|
128
|
+
for (let d = o; d < o + b; d++) {
|
|
129
|
+
const a = r[d];
|
|
130
|
+
if (a && !g.current[a]) {
|
|
131
|
+
const z = new Image();
|
|
132
|
+
g.current[a] = z, z.src = a;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
|
-
[o, b, r,
|
|
137
|
-
),
|
|
138
|
-
(
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
const a =
|
|
136
|
+
[o, b, r, $]
|
|
137
|
+
), J = u(
|
|
138
|
+
(f) => {
|
|
139
|
+
const d = f.target;
|
|
140
|
+
T === null && (L(d.naturalWidth), j(d.naturalHeight));
|
|
141
|
+
const a = rt.current;
|
|
142
142
|
a.cb && (a.count++, a.count >= a.target && (a.cb(), a.cb = null));
|
|
143
143
|
},
|
|
144
|
-
[
|
|
145
|
-
),
|
|
146
|
-
(
|
|
147
|
-
|
|
144
|
+
[T]
|
|
145
|
+
), ot = u(
|
|
146
|
+
(f, d) => {
|
|
147
|
+
rt.current = { count: 0, target: f, cb: d };
|
|
148
148
|
},
|
|
149
149
|
[]
|
|
150
150
|
);
|
|
151
151
|
return {
|
|
152
|
-
imageWidth:
|
|
152
|
+
imageWidth: T,
|
|
153
153
|
imageHeight: C,
|
|
154
|
-
loadedImages:
|
|
155
|
-
pageUrl:
|
|
154
|
+
loadedImages: D,
|
|
155
|
+
pageUrl: st,
|
|
156
156
|
loadImage: A,
|
|
157
|
-
pageUrlLoading:
|
|
158
|
-
preloadImages:
|
|
159
|
-
onImageLoad:
|
|
160
|
-
setImageLoadCallback:
|
|
157
|
+
pageUrlLoading: $,
|
|
158
|
+
preloadImages: lt,
|
|
159
|
+
onImageLoad: J,
|
|
160
|
+
setImageLoadCallback: ot
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
const Hn = "data:image/svg+xml,%3c?xml%20version='1.0'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='500'%20height='500'%20viewBox='0%200%20500%20500'%20fill='transparent'%20style='background-color:%20%23fff'%3e%3ccircle%20cx='250'%20cy='250'%20r='48'%20stroke='%23333'%20stroke-width='2'%20stroke-dasharray='271%2030'%20%3e%3canimateTransform%20attributeName='transform'%20attributeType='XML'%20type='rotate'%20from='0%20250%20250'%20to='360%20250%20250'%20dur='1s'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3c/svg%3e", Bn = "
|
|
163
|
+
const Hn = "data:image/svg+xml,%3c?xml%20version='1.0'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='500'%20height='500'%20viewBox='0%200%20500%20500'%20fill='transparent'%20style='background-color:%20%23fff'%3e%3ccircle%20cx='250'%20cy='250'%20r='48'%20stroke='%23333'%20stroke-width='2'%20stroke-dasharray='271%2030'%20%3e%3canimateTransform%20attributeName='transform'%20attributeType='XML'%20type='rotate'%20from='0%20250%20250'%20to='360%20250%20250'%20dur='1s'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3c/svg%3e", Bn = "_root_jjdx8_1", Un = "_viewport_jjdx8_8", Yn = "_viewportZoom_jjdx8_16 _viewport_jjdx8_8", An = "_viewportZoomDragToScroll_jjdx8_22 _viewportZoom_jjdx8_16 _viewport_jjdx8_8", Gn = "_container_jjdx8_27", Kn = "_clickLeft_jjdx8_43 _clickToFlip_jjdx8_35", Vn = "_clickRight_jjdx8_48 _clickToFlip_jjdx8_35", qn = "_boundingBox_jjdx8_53", Qn = "_page_jjdx8_58", Jn = "_polygon_jjdx8_63", tr = "_polygonBlank_jjdx8_72 _polygon_jjdx8_63", er = "_lighting_jjdx8_77", nr = "_srOnly_jjdx8_82", F = {
|
|
164
164
|
root: Bn,
|
|
165
165
|
viewport: Un,
|
|
166
166
|
viewportZoom: Yn,
|
|
@@ -184,7 +184,7 @@ function rr(c) {
|
|
|
184
184
|
function Qe(c) {
|
|
185
185
|
return c < 0.5 ? Je(c * 2) / 2 : 0.5 + rr((c - 0.5) * 2) / 2;
|
|
186
186
|
}
|
|
187
|
-
const
|
|
187
|
+
const Ut = {
|
|
188
188
|
progress: 0,
|
|
189
189
|
direction: null,
|
|
190
190
|
frontImage: null,
|
|
@@ -195,474 +195,478 @@ function or(c, r) {
|
|
|
195
195
|
const {
|
|
196
196
|
pages: o,
|
|
197
197
|
pagesHiRes: b = [],
|
|
198
|
-
flipDuration:
|
|
198
|
+
flipDuration: R = 1e3,
|
|
199
199
|
zoomDuration: M = 500,
|
|
200
200
|
zooms: O = [1, 2, 4],
|
|
201
|
-
perspective:
|
|
201
|
+
perspective: T = 2400,
|
|
202
202
|
nPolygons: L = 10,
|
|
203
203
|
ambient: C = 0.4,
|
|
204
|
-
gloss:
|
|
205
|
-
swipeMin:
|
|
206
|
-
singlePage:
|
|
207
|
-
forwardDirection:
|
|
208
|
-
centering:
|
|
209
|
-
startPage:
|
|
210
|
-
loadingImage:
|
|
204
|
+
gloss: j = 0.6,
|
|
205
|
+
swipeMin: D = 3,
|
|
206
|
+
singlePage: U = !1,
|
|
207
|
+
forwardDirection: g = "right",
|
|
208
|
+
centering: rt = !0,
|
|
209
|
+
startPage: at = null,
|
|
210
|
+
loadingImage: st = Hn,
|
|
211
211
|
clickToZoom: A = !0,
|
|
212
|
-
dragToFlip:
|
|
213
|
-
wheel:
|
|
214
|
-
page:
|
|
215
|
-
onPageChange:
|
|
216
|
-
} = c,
|
|
212
|
+
dragToFlip: $ = !0,
|
|
213
|
+
wheel: lt = "scroll",
|
|
214
|
+
page: J,
|
|
215
|
+
onPageChange: ot
|
|
216
|
+
} = c, f = O ?? [1], d = o[0] === null, { viewWidth: a, viewHeight: z, rawDisplayedPages: It, pageAlignmentTick: ie } = Nn(
|
|
217
217
|
r,
|
|
218
|
-
|
|
219
|
-
), [
|
|
218
|
+
U
|
|
219
|
+
), [ce, ae] = S(0), St = J !== void 0, E = St ? J : ce, G = u(
|
|
220
220
|
(t) => {
|
|
221
|
-
if (
|
|
222
|
-
const n = typeof t == "function" ? t(
|
|
223
|
-
|
|
221
|
+
if (St) {
|
|
222
|
+
const n = typeof t == "function" ? t(J) : t;
|
|
223
|
+
ot?.(n);
|
|
224
224
|
} else
|
|
225
|
-
|
|
225
|
+
ae(t);
|
|
226
226
|
},
|
|
227
|
-
[
|
|
228
|
-
), [
|
|
227
|
+
[St, J, ot]
|
|
228
|
+
), [jt, ut] = S(0), [se, e] = S(1), [x, Dt] = S(f[0]), [v, le] = S(0), [zt, Pe] = S(!1), [k, Y] = S(Ut), [At, ue] = S(null), [, Ie] = S(0), h = It === 2 && (d && (E === 0 || E === 1)) ? 1 : It, tn = Xn(
|
|
229
229
|
o,
|
|
230
230
|
b,
|
|
231
231
|
E,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
), { imageWidth:
|
|
237
|
-
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
const ke =
|
|
232
|
+
h,
|
|
233
|
+
x,
|
|
234
|
+
zt,
|
|
235
|
+
st
|
|
236
|
+
), { imageWidth: xt, imageHeight: Gt, pageUrl: Et, loadImage: en, pageUrlLoading: nn, preloadImages: Kt, onImageLoad: rn, setImageLoadCallback: Vt } = tn, yt = l(null), xe = l(null), Mt = l(0), wt = l(null), K = l(!1), qt = l(!1), ft = l(1 / 0), gt = l(-1 / 0), ye = l(0), Me = l(0), Ct = l(0), Zt = l(0), Ot = l(!1), tt = l(k);
|
|
237
|
+
tt.current = k;
|
|
238
|
+
const Lt = l(E);
|
|
239
|
+
Lt.current = E;
|
|
240
|
+
const Qt = l(h);
|
|
241
|
+
Qt.current = h;
|
|
242
|
+
const kt = l(x);
|
|
243
|
+
kt.current = x;
|
|
244
|
+
const Jt = l(v);
|
|
245
|
+
Jt.current = v;
|
|
246
|
+
const we = l(c.onFlipLeftStart);
|
|
247
|
+
we.current = c.onFlipLeftStart;
|
|
248
|
+
const Le = l(c.onFlipLeftEnd);
|
|
249
|
+
Le.current = c.onFlipLeftEnd;
|
|
250
|
+
const ke = l(c.onFlipRightStart);
|
|
251
251
|
ke.current = c.onFlipRightStart;
|
|
252
|
-
const _e =
|
|
252
|
+
const _e = l(c.onFlipRightEnd);
|
|
253
253
|
_e.current = c.onFlipRightEnd;
|
|
254
|
-
const Re =
|
|
254
|
+
const Re = l(c.onZoomStart);
|
|
255
255
|
Re.current = c.onZoomStart;
|
|
256
|
-
const Te =
|
|
256
|
+
const Te = l(c.onZoomEnd);
|
|
257
257
|
Te.current = c.onZoomEnd;
|
|
258
|
-
const on =
|
|
259
|
-
on.current =
|
|
260
|
-
const Fe =
|
|
261
|
-
Fe.current =
|
|
262
|
-
const fe =
|
|
258
|
+
const on = l(ot);
|
|
259
|
+
on.current = ot;
|
|
260
|
+
const Fe = l(G);
|
|
261
|
+
Fe.current = G;
|
|
262
|
+
const fe = l(/* @__PURE__ */ new Set()), Z = u((t) => {
|
|
263
263
|
const n = requestAnimationFrame((i) => {
|
|
264
264
|
fe.current.delete(n), t(i);
|
|
265
265
|
});
|
|
266
266
|
return fe.current.add(n), n;
|
|
267
|
-
}, []), Se =
|
|
267
|
+
}, []), Se = d ? o.length - 1 : o.length, te = d ? Math.max(1, E) : E + 1, je = l({
|
|
268
268
|
canFlipLeft: !1,
|
|
269
269
|
canFlipRight: !1,
|
|
270
270
|
canZoomIn: !1,
|
|
271
271
|
canZoomOut: !1,
|
|
272
272
|
page: 0,
|
|
273
273
|
numPages: 0
|
|
274
|
-
}),
|
|
275
|
-
|
|
276
|
-
}, [
|
|
277
|
-
|
|
278
|
-
const ge =
|
|
279
|
-
if (!
|
|
280
|
-
let t =
|
|
281
|
-
return
|
|
282
|
-
}, [
|
|
283
|
-
if (
|
|
284
|
-
const t =
|
|
285
|
-
return
|
|
286
|
-
})(),
|
|
287
|
-
if (
|
|
288
|
-
const t =
|
|
289
|
-
return
|
|
290
|
-
})(),
|
|
291
|
-
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}, [
|
|
296
|
-
|
|
297
|
-
}, [
|
|
298
|
-
const Wt = Math.round(
|
|
299
|
-
const t = (
|
|
300
|
-
return t < a ? (
|
|
274
|
+
}), De = u(() => {
|
|
275
|
+
G((t) => h === 1 && t === 0 && o.length > 0 && !o[0] ? 1 : t);
|
|
276
|
+
}, [h, o, G]), ze = !k.direction && E < o.length - h, Ee = !k.direction && E >= h && !(h === 1 && !Et(jt - 1)), it = g === "left" ? ze : Ee, ct = g === "right" ? ze : Ee, dt = !zt && v < f.length - 1, ht = !zt && v > 0;
|
|
277
|
+
je.current = { canFlipLeft: it, canFlipRight: ct, canZoomIn: dt, canZoomOut: ht, page: te, numPages: Se };
|
|
278
|
+
const ge = g === "right" || h === 1 ? jt : se, de = g === "left" ? jt : se, cn = !!Et(ge), an = !!Et(de) && h === 2, Ce = xt && Gt ? Math.min(a / h / xt, z / Gt, 1) : 1, w = xt ? Math.round(xt * Ce) : 0, pt = Gt ? Math.round(Gt * Ce) : 0, V = (a - w * h) / 2, mt = (z - pt) / 2, sn = Math.ceil(w / L + 1 / x) + "px", ln = pt + "px", un = `${w}px ${pt}px`, fn = Ve(() => {
|
|
279
|
+
if (!k.direction || h !== 1) return 1;
|
|
280
|
+
let t = k.progress;
|
|
281
|
+
return k.direction !== g && (t = 1 - t), t > 0.7 ? 1 - (t - 0.7) / 0.3 : 1;
|
|
282
|
+
}, [k.direction, k.progress, h, g]), bt = (() => {
|
|
283
|
+
if (h === 1) return V;
|
|
284
|
+
const t = Et(ge) ? V : a / 2;
|
|
285
|
+
return k.direction ? t < ft.current ? t : ft.current : t;
|
|
286
|
+
})(), $t = (() => {
|
|
287
|
+
if (h === 1) return a - V;
|
|
288
|
+
const t = Et(de) ? a - V : a / 2;
|
|
289
|
+
return k.direction ? t > gt.current ? t : gt.current : t;
|
|
290
|
+
})(), vt = rt ? Math.round(a / 2 - (bt + $t) / 2) : 0, Ze = l(vt);
|
|
291
|
+
Ze.current = vt;
|
|
292
|
+
const Oe = l(h);
|
|
293
|
+
X(() => {
|
|
294
|
+
At === null && xt !== null && ue(vt);
|
|
295
|
+
}, [At, xt, vt]), X(() => {
|
|
296
|
+
Oe.current !== h && (Oe.current = h, ue(vt), Ot.current = !1);
|
|
297
|
+
}, [h, vt]);
|
|
298
|
+
const Wt = Math.round(At ?? 0), gn = wt.current ? wt.current : A && dt ? "zoom-in" : A && ht ? "zoom-out" : $ ? "grab" : "auto", dn = !K.current, hn = (zt || x > 1) && dn ? F.viewportZoomDragToScroll : zt || x > 1 ? F.viewportZoom : F.viewport, pn = (() => {
|
|
299
|
+
const t = ($t - bt) * x;
|
|
300
|
+
return t < a ? (bt + Wt) * x - (a - t) / 2 : (bt + Wt) * x;
|
|
301
301
|
})(), mn = (() => {
|
|
302
|
-
const t = (
|
|
303
|
-
return t < a ? (
|
|
304
|
-
})(), yn = (() => {
|
|
305
|
-
const t = dt * s;
|
|
306
|
-
return t < D ? ht * s - (D - t) / 2 : ht * s;
|
|
302
|
+
const t = ($t - bt) * x;
|
|
303
|
+
return t < a ? (bt + Wt) * x - (a - t) / 2 : ($t + Wt) * x - a;
|
|
307
304
|
})(), bn = (() => {
|
|
308
|
-
const t =
|
|
309
|
-
return t <
|
|
310
|
-
})(),
|
|
305
|
+
const t = pt * x;
|
|
306
|
+
return t < z ? mt * x - (z - t) / 2 : mt * x;
|
|
307
|
+
})(), vn = (() => {
|
|
308
|
+
const t = pt * x;
|
|
309
|
+
return t < z ? mt * x - (z - t) / 2 : (mt + pt) * x - z;
|
|
310
|
+
})(), $e = Math.min(mn, Math.max(pn, Ct.current)), We = Math.min(vn, Math.max(bn, Zt.current)), Ne = u(
|
|
311
311
|
(t, n) => {
|
|
312
|
-
const i = [],
|
|
312
|
+
const i = [], s = [-0.5, -0.25, 0, 0.25, 0.5];
|
|
313
313
|
if (C < 1) {
|
|
314
|
-
const
|
|
314
|
+
const p = 1 - C, m = s.map((P) => (1 - Math.cos((t - n * P) / 180 * Math.PI)) * p);
|
|
315
315
|
i.push(
|
|
316
|
-
`linear-gradient(to right,rgba(0,0,0,${
|
|
316
|
+
`linear-gradient(to right,rgba(0,0,0,${m[0]}),rgba(0,0,0,${m[1]}) 25%,rgba(0,0,0,${m[2]}) 50%,rgba(0,0,0,${m[3]}) 75%,rgba(0,0,0,${m[4]}))`
|
|
317
317
|
);
|
|
318
318
|
}
|
|
319
|
-
if (
|
|
320
|
-
const
|
|
321
|
-
(
|
|
322
|
-
Math.pow(Math.cos((t + 30 - n *
|
|
323
|
-
Math.pow(Math.cos((t - 30 - n *
|
|
319
|
+
if (j > 0) {
|
|
320
|
+
const P = s.map(
|
|
321
|
+
(I) => Math.max(
|
|
322
|
+
Math.pow(Math.cos((t + 30 - n * I) / 180 * Math.PI), 200),
|
|
323
|
+
Math.pow(Math.cos((t - 30 - n * I) / 180 * Math.PI), 200)
|
|
324
324
|
)
|
|
325
325
|
);
|
|
326
326
|
i.push(
|
|
327
|
-
`linear-gradient(to right,rgba(255,255,255,${
|
|
327
|
+
`linear-gradient(to right,rgba(255,255,255,${P[0] * j}),rgba(255,255,255,${P[1] * j}) 25%,rgba(255,255,255,${P[2] * j}) 50%,rgba(255,255,255,${P[3] * j}) 75%,rgba(255,255,255,${P[4] * j}))`
|
|
328
328
|
);
|
|
329
329
|
}
|
|
330
330
|
return i.join(",");
|
|
331
331
|
},
|
|
332
|
-
[C,
|
|
333
|
-
), he =
|
|
332
|
+
[C, j]
|
|
333
|
+
), he = u(
|
|
334
334
|
(t) => {
|
|
335
|
-
const n =
|
|
335
|
+
const n = tt.current;
|
|
336
336
|
if (!n.direction) return [];
|
|
337
337
|
if (!Number.isFinite(w) || w <= 0 || L <= 0)
|
|
338
338
|
return [];
|
|
339
|
-
let i = n.progress,
|
|
339
|
+
let i = n.progress, s = n.direction;
|
|
340
340
|
if (!Number.isFinite(i)) return [];
|
|
341
|
-
i < 0 && (i = 0), i > 1 && (i = 1),
|
|
342
|
-
const
|
|
343
|
-
let
|
|
344
|
-
|
|
345
|
-
const
|
|
346
|
-
|
|
341
|
+
i < 0 && (i = 0), i > 1 && (i = 1), h === 1 && s !== g && (i = 1 - i, s = g);
|
|
342
|
+
const p = t === "front" ? n.frontImage : n.backImage, m = w / L;
|
|
343
|
+
let P = V, I = !1;
|
|
344
|
+
h === 1 ? g === "right" ? t === "back" && (I = !0, P = V - w) : s === "left" ? t === "back" ? P = w - V : I = !0 : t === "front" ? P = w - V : I = !0 : s === "left" ? t === "back" ? P = a / 2 : I = !0 : t === "front" ? P = a / 2 : I = !0;
|
|
345
|
+
const y = new oe();
|
|
346
|
+
y.translate(a / 2), y.perspective(T), y.translate(-a / 2), y.translate(P, mt);
|
|
347
347
|
let W = 0;
|
|
348
|
-
i > 0.5 && (W = -(i - 0.5) * 2 * 180),
|
|
349
|
-
let
|
|
350
|
-
i < 0.5 ?
|
|
351
|
-
const
|
|
352
|
-
let
|
|
353
|
-
const
|
|
354
|
-
let
|
|
355
|
-
const
|
|
356
|
-
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
const
|
|
360
|
-
for (let
|
|
361
|
-
const
|
|
362
|
-
let
|
|
363
|
-
|
|
364
|
-
let
|
|
365
|
-
t === "back" && (
|
|
366
|
-
const Ge =
|
|
367
|
-
|
|
368
|
-
const
|
|
369
|
-
|
|
370
|
-
key: t +
|
|
371
|
-
bgImage:
|
|
372
|
-
lighting:
|
|
373
|
-
bgPos:
|
|
374
|
-
transform:
|
|
375
|
-
z: Math.abs(Math.round(
|
|
348
|
+
i > 0.5 && (W = -(i - 0.5) * 2 * 180), s === "left" && (W = -W), t === "back" && (W += 180), W && (I && y.translate(w), y.rotateY(W), I && y.translate(-w));
|
|
349
|
+
let _;
|
|
350
|
+
i < 0.5 ? _ = i * 2 * Math.PI : _ = (1 - (i - 0.5) * 2) * Math.PI, _ === 0 && (_ = 1e-9);
|
|
351
|
+
const Pt = w / _;
|
|
352
|
+
let H = 0;
|
|
353
|
+
const N = _ / L;
|
|
354
|
+
let B = N / 2 / Math.PI * 180;
|
|
355
|
+
const et = N / Math.PI * 180;
|
|
356
|
+
I && (B = -_ / Math.PI * 180 + et / 2), t === "back" && (B = -B);
|
|
357
|
+
const Ht = t === "back" ? -et : et;
|
|
358
|
+
ft.current = 1 / 0, gt.current = -1 / 0;
|
|
359
|
+
const Q = [];
|
|
360
|
+
for (let ee = 0; ee < L; ee++) {
|
|
361
|
+
const Dn = `${ee / (L - 1) * 100}% 0px`, Bt = y.clone(), Ae = I ? _ - H : H;
|
|
362
|
+
let be = Math.sin(Ae) * Pt;
|
|
363
|
+
I && (be = w - be);
|
|
364
|
+
let ne = (1 - Math.cos(Ae)) * Pt;
|
|
365
|
+
t === "back" && (ne = -ne), Bt.translate3d(be, 0, ne), Bt.rotateY(-B);
|
|
366
|
+
const Ge = Bt.transformX(0), Ke = Bt.transformX(m);
|
|
367
|
+
gt.current = Math.max(Math.max(Ge, Ke), gt.current), ft.current = Math.min(Math.min(Ge, Ke), ft.current);
|
|
368
|
+
const zn = Ne(W - B, Ht);
|
|
369
|
+
H += N, B += Ht, Q.push({
|
|
370
|
+
key: t + ee,
|
|
371
|
+
bgImage: p,
|
|
372
|
+
lighting: zn,
|
|
373
|
+
bgPos: Dn,
|
|
374
|
+
transform: Bt.toString(),
|
|
375
|
+
z: Math.abs(Math.round(ne))
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
|
-
return
|
|
378
|
+
return Q;
|
|
379
379
|
},
|
|
380
|
-
[
|
|
381
|
-
),
|
|
380
|
+
[h, g, w, V, mt, a, T, L, Ne]
|
|
381
|
+
), Pn = Ve(() => k.direction ? [...he("front"), ...he("back")] : [], [k.direction, k.progress, k.frontImage, k.backImage, he]), q = u(
|
|
382
382
|
(t, n) => {
|
|
383
|
-
const i =
|
|
384
|
-
let
|
|
385
|
-
t !==
|
|
383
|
+
const i = Lt.current, s = Qt.current;
|
|
384
|
+
let p = null, m = null;
|
|
385
|
+
t !== g ? s === 1 ? (p = o[i - 1] ?? null, m = null) : (p = o[g === "right" || s === 1 ? i : i + 1] ?? null, m = o[i - s + 1] ?? null) : s === 1 ? (p = o[i] ?? null, m = null) : (p = o[g === "left" ? i : i + 1] ?? null, m = o[i + s] ?? null), Y({
|
|
386
386
|
progress: 0,
|
|
387
387
|
direction: t,
|
|
388
|
-
frontImage:
|
|
389
|
-
backImage:
|
|
388
|
+
frontImage: p,
|
|
389
|
+
backImage: m,
|
|
390
390
|
auto: !1
|
|
391
391
|
}), Z(() => {
|
|
392
392
|
Z(() => {
|
|
393
|
-
t !==
|
|
393
|
+
t !== g ? s === 2 && ut(i - s) : s === 1 ? ut(i + s) : e(i + 1 + s), n && pe(t);
|
|
394
394
|
});
|
|
395
395
|
});
|
|
396
396
|
},
|
|
397
|
-
[
|
|
398
|
-
), pe =
|
|
397
|
+
[g, o, Z]
|
|
398
|
+
), pe = u(
|
|
399
399
|
(t) => {
|
|
400
|
-
const n =
|
|
401
|
-
Y((
|
|
402
|
-
const
|
|
403
|
-
t === "left" ?
|
|
404
|
-
let
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
const W =
|
|
408
|
-
let
|
|
409
|
-
|
|
410
|
-
const
|
|
411
|
-
if (Y((
|
|
412
|
-
Z(
|
|
400
|
+
const n = tt.current, i = R * (1 - n.progress), s = n.progress;
|
|
401
|
+
Y((y) => ({ ...y, auto: !0 }));
|
|
402
|
+
const p = Lt.current, m = o[0] !== null ? p + 1 : Math.max(1, p);
|
|
403
|
+
t === "left" ? we.current?.(m) : ke.current?.(m);
|
|
404
|
+
let P = null;
|
|
405
|
+
const I = (y) => {
|
|
406
|
+
P === null && (P = y);
|
|
407
|
+
const W = y - P;
|
|
408
|
+
let _ = s + W / i;
|
|
409
|
+
_ > 1 && (_ = 1);
|
|
410
|
+
const Pt = Qe(_);
|
|
411
|
+
if (Y((H) => ({ ...H, progress: Pt })), _ < 1)
|
|
412
|
+
Z(I);
|
|
413
413
|
else {
|
|
414
|
-
const
|
|
415
|
-
let
|
|
416
|
-
t !==
|
|
417
|
-
const
|
|
418
|
-
t === "left" ?
|
|
419
|
-
Y(
|
|
414
|
+
const H = Qt.current;
|
|
415
|
+
let N;
|
|
416
|
+
t !== g ? N = Lt.current - H : N = Lt.current + H, Fe.current(N);
|
|
417
|
+
const B = o[0] !== null ? N + 1 : Math.max(1, N);
|
|
418
|
+
t === "left" ? Le.current?.(B) : _e.current?.(B), H === 1 && t === g ? Y(Ut) : Vt(1, () => {
|
|
419
|
+
Y(Ut);
|
|
420
420
|
});
|
|
421
421
|
}
|
|
422
422
|
};
|
|
423
|
-
Z(
|
|
423
|
+
Z(I);
|
|
424
424
|
},
|
|
425
|
-
[
|
|
426
|
-
), Xe =
|
|
427
|
-
const t =
|
|
428
|
-
Y((
|
|
429
|
-
let
|
|
430
|
-
const
|
|
431
|
-
|
|
432
|
-
const
|
|
433
|
-
let
|
|
434
|
-
if (
|
|
435
|
-
Z(
|
|
425
|
+
[R, g, o, Vt, Z]
|
|
426
|
+
), Xe = u(() => {
|
|
427
|
+
const t = tt.current, n = R * t.progress, i = t.progress;
|
|
428
|
+
Y((m) => ({ ...m, auto: !0 }));
|
|
429
|
+
let s = null;
|
|
430
|
+
const p = (m) => {
|
|
431
|
+
s === null && (s = m);
|
|
432
|
+
const P = m - s;
|
|
433
|
+
let I = i - i * P / n;
|
|
434
|
+
if (I < 0 && (I = 0), Y((y) => ({ ...y, progress: I })), I > 0)
|
|
435
|
+
Z(p);
|
|
436
436
|
else {
|
|
437
|
-
const
|
|
438
|
-
|
|
439
|
-
const W =
|
|
440
|
-
W === 1 &&
|
|
441
|
-
Y(
|
|
437
|
+
const y = Lt.current;
|
|
438
|
+
ut(y), e(y + 1);
|
|
439
|
+
const W = Qt.current, _ = tt.current.direction;
|
|
440
|
+
W === 1 && _ !== g ? Y(Ut) : Vt(1, () => {
|
|
441
|
+
Y(Ut);
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
444
|
};
|
|
445
|
-
Z(
|
|
446
|
-
}, [
|
|
447
|
-
|
|
448
|
-
}, [
|
|
449
|
-
|
|
450
|
-
}, [
|
|
445
|
+
Z(p);
|
|
446
|
+
}, [R, g, Vt, Z]), In = u(() => {
|
|
447
|
+
it && q("left", !0);
|
|
448
|
+
}, [it, q]), xn = u(() => {
|
|
449
|
+
ct && q("right", !0);
|
|
450
|
+
}, [ct, q]), _t = u(
|
|
451
451
|
(t, n) => {
|
|
452
452
|
const i = r.current;
|
|
453
453
|
if (!i) return;
|
|
454
|
-
let
|
|
454
|
+
let s, p;
|
|
455
455
|
if (n) {
|
|
456
|
-
const
|
|
457
|
-
|
|
456
|
+
const et = i.getBoundingClientRect();
|
|
457
|
+
s = n.pageX - et.left, p = n.pageY - et.top;
|
|
458
458
|
} else
|
|
459
|
-
|
|
460
|
-
const
|
|
461
|
-
|
|
462
|
-
let
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
const
|
|
466
|
-
let
|
|
467
|
-
|
|
459
|
+
s = i.clientWidth / 2, p = i.clientHeight / 2;
|
|
460
|
+
const m = kt.current, P = t, I = i.scrollLeft, y = i.scrollTop, W = s + I, _ = p + y, Pt = W / m * P - s, H = _ / m * P - p;
|
|
461
|
+
Pe(!0), Re.current?.(t);
|
|
462
|
+
let N = null;
|
|
463
|
+
const B = (et) => {
|
|
464
|
+
N === null && (N = et);
|
|
465
|
+
const Ht = et - N;
|
|
466
|
+
let Q = Ht / M;
|
|
467
|
+
Q > 1 && (Q = 1), Q = Qe(Q), Dt(m + (P - m) * Q), Ct.current = I + (Pt - I) * Q, Zt.current = y + (H - y) * Q, Ht < M ? Z(B) : (Te.current?.(t), Pe(!1), Dt(t), Ct.current = Pt, Zt.current = H);
|
|
468
468
|
};
|
|
469
|
-
Z(
|
|
469
|
+
Z(B), P > 1 && Kt(!0);
|
|
470
470
|
},
|
|
471
|
-
[M, r,
|
|
472
|
-
),
|
|
471
|
+
[M, r, Kt, Z]
|
|
472
|
+
), Nt = u(
|
|
473
473
|
(t) => {
|
|
474
|
-
if (!
|
|
475
|
-
const n =
|
|
476
|
-
le(n),
|
|
474
|
+
if (!dt) return;
|
|
475
|
+
const n = Jt.current + 1;
|
|
476
|
+
le(n), _t(f[n], t);
|
|
477
477
|
},
|
|
478
|
-
[
|
|
479
|
-
),
|
|
478
|
+
[dt, f, _t]
|
|
479
|
+
), Xt = u(
|
|
480
480
|
(t) => {
|
|
481
|
-
if (!
|
|
482
|
-
const n =
|
|
483
|
-
le(n),
|
|
481
|
+
if (!ht) return;
|
|
482
|
+
const n = Jt.current - 1;
|
|
483
|
+
le(n), _t(f[n], t);
|
|
484
484
|
},
|
|
485
|
-
[
|
|
486
|
-
), He =
|
|
485
|
+
[ht, f, _t]
|
|
486
|
+
), He = u(
|
|
487
487
|
(t) => {
|
|
488
|
-
const n = (
|
|
489
|
-
le(n),
|
|
488
|
+
const n = (Jt.current + 1) % f.length;
|
|
489
|
+
le(n), _t(f[n], t);
|
|
490
490
|
},
|
|
491
|
-
[
|
|
492
|
-
), me =
|
|
491
|
+
[f, _t]
|
|
492
|
+
), me = u(
|
|
493
493
|
(t) => {
|
|
494
|
-
if (t === null || t ===
|
|
494
|
+
if (t === null || t === te) return;
|
|
495
495
|
let n;
|
|
496
|
-
o[0] === null ?
|
|
496
|
+
o[0] === null ? h === 2 && t === 1 ? n = 0 : n = t : n = t - 1, (h === 2 && n > 0 && o[0] === null || h === 2 && o[0] !== null) && (n = n & -2), G(n), ft.current = 1 / 0, gt.current = -1 / 0;
|
|
497
497
|
},
|
|
498
|
-
[
|
|
499
|
-
), Be =
|
|
498
|
+
[te, o, h, G]
|
|
499
|
+
), Be = l(me);
|
|
500
500
|
Be.current = me;
|
|
501
|
-
const Ue =
|
|
501
|
+
const Ue = u(
|
|
502
502
|
(t, n) => {
|
|
503
503
|
const i = r.current;
|
|
504
|
-
i && (i.scrollLeft =
|
|
504
|
+
i && (i.scrollLeft = ye.current - t, i.scrollTop = Me.current - n, Ct.current = i.scrollLeft, Zt.current = i.scrollTop);
|
|
505
505
|
},
|
|
506
506
|
[r]
|
|
507
|
-
),
|
|
507
|
+
), Rt = u(
|
|
508
508
|
(t) => {
|
|
509
|
-
if (
|
|
510
|
-
|
|
509
|
+
if (yt.current = t.pageX, xe.current = t.pageY, Mt.current = 0, kt.current <= 1)
|
|
510
|
+
$ && (wt.current = "grab");
|
|
511
511
|
else {
|
|
512
512
|
const n = r.current;
|
|
513
|
-
n && (
|
|
513
|
+
n && (ye.current = n.scrollLeft, Me.current = n.scrollTop), wt.current = "all-scroll";
|
|
514
514
|
}
|
|
515
515
|
},
|
|
516
|
-
[
|
|
517
|
-
),
|
|
516
|
+
[$, r]
|
|
517
|
+
), Tt = u(
|
|
518
518
|
(t) => {
|
|
519
|
-
if (
|
|
520
|
-
const n = t.pageX -
|
|
521
|
-
if (
|
|
522
|
-
return
|
|
523
|
-
if (
|
|
524
|
-
|
|
525
|
-
const
|
|
526
|
-
return n > 0 ? (
|
|
527
|
-
...
|
|
519
|
+
if (yt.current === null) return !1;
|
|
520
|
+
const n = t.pageX - yt.current, i = t.pageY - xe.current;
|
|
521
|
+
if (Mt.current = Math.max(Mt.current, Math.abs(n)), Mt.current = Math.max(Mt.current, Math.abs(i)), kt.current > 1)
|
|
522
|
+
return K.current || Ue(n, i), !1;
|
|
523
|
+
if (!$ || Math.abs(i) > Math.abs(n) || !Number.isFinite(w) || w <= 0) return !1;
|
|
524
|
+
wt.current = "grabbing", Ie((p) => p + 1);
|
|
525
|
+
const s = tt.current;
|
|
526
|
+
return n > 0 ? (s.direction === null && it && n >= D && q("left", !1), tt.current.direction === "left" && Y((p) => ({
|
|
527
|
+
...p,
|
|
528
528
|
progress: Math.min(n / w, 1)
|
|
529
|
-
}))) : (
|
|
530
|
-
...
|
|
529
|
+
}))) : (s.direction === null && ct && n <= -D && q("right", !1), tt.current.direction === "right" && Y((p) => ({
|
|
530
|
+
...p,
|
|
531
531
|
progress: Math.min(-n / w, 1)
|
|
532
532
|
}))), !0;
|
|
533
533
|
},
|
|
534
|
-
[
|
|
535
|
-
),
|
|
534
|
+
[$, it, ct, D, q, w, Ue]
|
|
535
|
+
), Ft = u(
|
|
536
536
|
(t) => {
|
|
537
|
-
if (
|
|
538
|
-
A &&
|
|
539
|
-
const n =
|
|
540
|
-
n.direction !== null && !n.auto && (n.progress > 1 / 4 ? pe(n.direction) : Xe()),
|
|
537
|
+
if (yt.current === null) return;
|
|
538
|
+
A && Mt.current < D && He(t);
|
|
539
|
+
const n = tt.current;
|
|
540
|
+
n.direction !== null && !n.auto && (n.progress > 1 / 4 ? pe(n.direction) : Xe()), yt.current = null, wt.current = null, Ie((i) => i + 1);
|
|
541
541
|
},
|
|
542
|
-
[A,
|
|
543
|
-
),
|
|
542
|
+
[A, D, He, pe, Xe]
|
|
543
|
+
), yn = u(
|
|
544
544
|
(t) => {
|
|
545
|
-
|
|
545
|
+
K.current = !0, Rt(t.changedTouches[0]);
|
|
546
546
|
},
|
|
547
|
-
[
|
|
548
|
-
),
|
|
547
|
+
[Rt]
|
|
548
|
+
), Mn = u(
|
|
549
549
|
(t) => {
|
|
550
|
-
|
|
550
|
+
if (Tt(t.changedTouches[0])) {
|
|
551
|
+
t.cancelable && t.preventDefault();
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
$ && kt.current <= 1 && yt.current !== null && t.cancelable && t.preventDefault();
|
|
551
555
|
},
|
|
552
|
-
[
|
|
553
|
-
),
|
|
556
|
+
[$, Tt]
|
|
557
|
+
), wn = u(
|
|
554
558
|
(t) => {
|
|
555
|
-
|
|
559
|
+
Ft(t.changedTouches[0]);
|
|
556
560
|
},
|
|
557
|
-
[
|
|
558
|
-
),
|
|
561
|
+
[Ft]
|
|
562
|
+
), Ln = u(
|
|
559
563
|
(t) => {
|
|
560
|
-
if (
|
|
561
|
-
|
|
564
|
+
if (qt.current = !0, !K.current && t.button === 0) {
|
|
565
|
+
Rt(t);
|
|
562
566
|
try {
|
|
563
567
|
t.target.setPointerCapture(t.pointerId);
|
|
564
568
|
} catch {
|
|
565
569
|
}
|
|
566
570
|
}
|
|
567
571
|
},
|
|
568
|
-
[
|
|
569
|
-
), kn =
|
|
572
|
+
[Rt]
|
|
573
|
+
), kn = u(
|
|
570
574
|
(t) => {
|
|
571
|
-
|
|
575
|
+
K.current || Tt(t);
|
|
572
576
|
},
|
|
573
|
-
[
|
|
574
|
-
), _n =
|
|
577
|
+
[Tt]
|
|
578
|
+
), _n = u(
|
|
575
579
|
(t) => {
|
|
576
|
-
if (!
|
|
577
|
-
|
|
580
|
+
if (!K.current) {
|
|
581
|
+
Ft(t);
|
|
578
582
|
try {
|
|
579
583
|
t.target.releasePointerCapture(t.pointerId);
|
|
580
584
|
} catch {
|
|
581
585
|
}
|
|
582
586
|
}
|
|
583
587
|
},
|
|
584
|
-
[
|
|
585
|
-
), Rn =
|
|
588
|
+
[Ft]
|
|
589
|
+
), Rn = u(
|
|
586
590
|
(t) => {
|
|
587
|
-
|
|
591
|
+
K.current || qt.current || t.button === 0 && Rt(t);
|
|
588
592
|
},
|
|
589
|
-
[
|
|
590
|
-
), Tn =
|
|
593
|
+
[Rt]
|
|
594
|
+
), Tn = u(
|
|
591
595
|
(t) => {
|
|
592
|
-
|
|
596
|
+
K.current || qt.current || Tt(t);
|
|
593
597
|
},
|
|
594
|
-
[
|
|
595
|
-
), Fn =
|
|
598
|
+
[Tt]
|
|
599
|
+
), Fn = u(
|
|
596
600
|
(t) => {
|
|
597
|
-
|
|
601
|
+
K.current || qt.current || Ft(t);
|
|
598
602
|
},
|
|
599
|
-
[
|
|
600
|
-
), Sn =
|
|
603
|
+
[Ft]
|
|
604
|
+
), Sn = u(
|
|
601
605
|
(t) => {
|
|
602
|
-
if (
|
|
606
|
+
if (lt === "scroll" && kt.current > 1 && !K.current) {
|
|
603
607
|
const n = r.current;
|
|
604
|
-
n && (n.scrollLeft += t.deltaX, n.scrollTop += t.deltaY,
|
|
608
|
+
n && (n.scrollLeft += t.deltaX, n.scrollTop += t.deltaY, Ct.current = n.scrollLeft, Zt.current = n.scrollTop), t.cancelable && t.preventDefault();
|
|
605
609
|
}
|
|
606
|
-
|
|
610
|
+
lt === "zoom" && (t.deltaY >= 100 ? (Xt(t), t.cancelable && t.preventDefault()) : t.deltaY <= -100 && (Nt(t), t.cancelable && t.preventDefault()));
|
|
607
611
|
},
|
|
608
|
-
[
|
|
609
|
-
),
|
|
612
|
+
[lt, r, Xt, Nt]
|
|
613
|
+
), jn = u(
|
|
610
614
|
(t) => {
|
|
611
615
|
switch (t.key) {
|
|
612
616
|
case "ArrowLeft":
|
|
613
|
-
t.preventDefault(),
|
|
617
|
+
t.preventDefault(), it && q("left", !0);
|
|
614
618
|
break;
|
|
615
619
|
case "ArrowRight":
|
|
616
|
-
t.preventDefault(),
|
|
620
|
+
t.preventDefault(), ct && q("right", !0);
|
|
617
621
|
break;
|
|
618
622
|
case "+":
|
|
619
623
|
case "=":
|
|
620
|
-
t.preventDefault(),
|
|
624
|
+
t.preventDefault(), dt && Nt();
|
|
621
625
|
break;
|
|
622
626
|
case "-":
|
|
623
|
-
t.preventDefault(),
|
|
627
|
+
t.preventDefault(), ht && Xt();
|
|
624
628
|
break;
|
|
625
629
|
}
|
|
626
630
|
},
|
|
627
|
-
[
|
|
631
|
+
[it, ct, dt, ht, q, Nt, Xt]
|
|
628
632
|
);
|
|
629
|
-
|
|
630
|
-
|
|
633
|
+
X(() => {
|
|
634
|
+
It === 2 && G((t) => {
|
|
631
635
|
const n = t & -2;
|
|
632
|
-
return n === 0 &&
|
|
633
|
-
}),
|
|
634
|
-
}, [
|
|
635
|
-
const Ye =
|
|
636
|
-
return Ye.current =
|
|
637
|
-
|
|
638
|
-
}, [E]),
|
|
639
|
-
if (
|
|
640
|
-
|
|
636
|
+
return n === 0 && d ? t : n;
|
|
637
|
+
}), ft.current = 1 / 0, gt.current = -1 / 0;
|
|
638
|
+
}, [ie, It, d, G]);
|
|
639
|
+
const Ye = l(Kt);
|
|
640
|
+
return Ye.current = Kt, X(() => {
|
|
641
|
+
ut(E), e(E + 1), Ye.current();
|
|
642
|
+
}, [E]), X(() => {
|
|
643
|
+
if (Ot.current || At === null) return;
|
|
644
|
+
Ot.current = !0;
|
|
641
645
|
const t = () => {
|
|
642
646
|
Z(() => {
|
|
643
647
|
ue((n) => {
|
|
644
|
-
const i =
|
|
648
|
+
const i = Ze.current;
|
|
645
649
|
if (n === null)
|
|
646
|
-
return
|
|
647
|
-
const
|
|
648
|
-
return Math.abs(
|
|
650
|
+
return Ot.current = !1, i;
|
|
651
|
+
const s = i - n;
|
|
652
|
+
return Math.abs(s) < 0.5 ? (Ot.current = !1, i) : (t(), n + s * 0.1);
|
|
649
653
|
});
|
|
650
654
|
});
|
|
651
655
|
};
|
|
652
656
|
t();
|
|
653
|
-
}, [
|
|
657
|
+
}, [vt, Z]), X(() => {
|
|
654
658
|
const t = r.current;
|
|
655
|
-
t && (t.scrollLeft =
|
|
656
|
-
}, [
|
|
659
|
+
t && (t.scrollLeft = $e);
|
|
660
|
+
}, [$e, r]), X(() => {
|
|
657
661
|
const t = r.current;
|
|
658
|
-
t && (t.scrollTop =
|
|
659
|
-
}, [
|
|
660
|
-
|
|
661
|
-
}, [o,
|
|
662
|
-
Be.current(
|
|
663
|
-
}, [
|
|
664
|
-
|
|
665
|
-
}, []),
|
|
662
|
+
t && (t.scrollTop = We);
|
|
663
|
+
}, [We, r]), X(() => {
|
|
664
|
+
De();
|
|
665
|
+
}, [o, De]), X(() => {
|
|
666
|
+
Be.current(at);
|
|
667
|
+
}, [at]), X(() => {
|
|
668
|
+
Dt(f[0]);
|
|
669
|
+
}, []), X(() => {
|
|
666
670
|
const t = fe.current;
|
|
667
671
|
return () => {
|
|
668
672
|
t.forEach(cancelAnimationFrame), t.clear();
|
|
@@ -670,16 +674,16 @@ function or(c, r) {
|
|
|
670
674
|
}, []), {
|
|
671
675
|
// Layout
|
|
672
676
|
viewWidth: a,
|
|
673
|
-
viewHeight:
|
|
677
|
+
viewHeight: z,
|
|
674
678
|
pageWidth: w,
|
|
675
|
-
pageHeight:
|
|
676
|
-
xMargin:
|
|
677
|
-
yMargin:
|
|
678
|
-
displayedPages:
|
|
679
|
-
zoom:
|
|
679
|
+
pageHeight: pt,
|
|
680
|
+
xMargin: V,
|
|
681
|
+
yMargin: mt,
|
|
682
|
+
displayedPages: h,
|
|
683
|
+
zoom: x,
|
|
680
684
|
centerOffsetSmoothed: Wt,
|
|
681
685
|
// Pages
|
|
682
|
-
page:
|
|
686
|
+
page: te,
|
|
683
687
|
numPages: Se,
|
|
684
688
|
leftPage: ge,
|
|
685
689
|
rightPage: de,
|
|
@@ -688,44 +692,44 @@ function or(c, r) {
|
|
|
688
692
|
pageUrlLoading: nn,
|
|
689
693
|
loadImage: en,
|
|
690
694
|
// Flip
|
|
691
|
-
flip:
|
|
695
|
+
flip: k,
|
|
692
696
|
flipOpacity: fn,
|
|
693
|
-
polygonArray:
|
|
697
|
+
polygonArray: Pn,
|
|
694
698
|
polygonWidth: sn,
|
|
695
699
|
polygonHeight: ln,
|
|
696
700
|
polygonBgSize: un,
|
|
697
701
|
// Navigation
|
|
698
|
-
canFlipLeft:
|
|
699
|
-
canFlipRight:
|
|
700
|
-
canZoomIn:
|
|
701
|
-
canZoomOut:
|
|
702
|
+
canFlipLeft: it,
|
|
703
|
+
canFlipRight: ct,
|
|
704
|
+
canZoomIn: dt,
|
|
705
|
+
canZoomOut: ht,
|
|
702
706
|
// Bounds
|
|
703
|
-
boundingLeft:
|
|
704
|
-
boundingRight:
|
|
707
|
+
boundingLeft: bt,
|
|
708
|
+
boundingRight: $t,
|
|
705
709
|
// Cursor
|
|
706
710
|
cursor: gn,
|
|
707
711
|
viewportClass: hn,
|
|
708
712
|
// Actions
|
|
709
|
-
flipLeft:
|
|
710
|
-
flipRight:
|
|
711
|
-
zoomIn:
|
|
712
|
-
zoomOut:
|
|
713
|
+
flipLeft: In,
|
|
714
|
+
flipRight: xn,
|
|
715
|
+
zoomIn: Nt,
|
|
716
|
+
zoomOut: Xt,
|
|
713
717
|
goToPage: me,
|
|
714
718
|
// Stable ref for imperative API
|
|
715
|
-
apiRef:
|
|
719
|
+
apiRef: je,
|
|
716
720
|
// Event handlers
|
|
717
721
|
handlers: {
|
|
718
|
-
onTouchStart:
|
|
719
|
-
onTouchMove:
|
|
720
|
-
onTouchEnd:
|
|
721
|
-
onPointerDown:
|
|
722
|
+
onTouchStart: yn,
|
|
723
|
+
onTouchMove: Mn,
|
|
724
|
+
onTouchEnd: wn,
|
|
725
|
+
onPointerDown: Ln,
|
|
722
726
|
onPointerMove: kn,
|
|
723
727
|
onPointerUp: _n,
|
|
724
728
|
onMouseDown: Rn,
|
|
725
729
|
onMouseMove: Tn,
|
|
726
730
|
onMouseUp: Fn,
|
|
727
731
|
onWheel: Sn,
|
|
728
|
-
onKeyDown:
|
|
732
|
+
onKeyDown: jn
|
|
729
733
|
},
|
|
730
734
|
onImageLoad: rn
|
|
731
735
|
};
|
|
@@ -735,64 +739,66 @@ const sr = En(
|
|
|
735
739
|
pages: r,
|
|
736
740
|
pagesHiRes: o,
|
|
737
741
|
pageLabels: b,
|
|
738
|
-
flipDuration:
|
|
742
|
+
flipDuration: R,
|
|
739
743
|
zoomDuration: M,
|
|
740
744
|
zooms: O,
|
|
741
|
-
perspective:
|
|
745
|
+
perspective: T,
|
|
742
746
|
nPolygons: L,
|
|
743
747
|
ambient: C,
|
|
744
|
-
gloss:
|
|
745
|
-
swipeMin:
|
|
746
|
-
singlePage:
|
|
747
|
-
forwardDirection:
|
|
748
|
-
centering:
|
|
749
|
-
startPage:
|
|
750
|
-
loadingImage:
|
|
748
|
+
gloss: j,
|
|
749
|
+
swipeMin: D,
|
|
750
|
+
singlePage: U,
|
|
751
|
+
forwardDirection: g,
|
|
752
|
+
centering: rt,
|
|
753
|
+
startPage: at,
|
|
754
|
+
loadingImage: st,
|
|
751
755
|
clickToZoom: A,
|
|
752
|
-
dragToFlip:
|
|
753
|
-
wheel:
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
756
|
+
dragToFlip: $,
|
|
757
|
+
wheel: lt,
|
|
758
|
+
bookClassName: J,
|
|
759
|
+
bookStyle: ot,
|
|
760
|
+
page: f,
|
|
761
|
+
onPageChange: d,
|
|
762
|
+
onFlipLeftStart: a,
|
|
763
|
+
onFlipLeftEnd: z,
|
|
764
|
+
onFlipRightStart: It,
|
|
765
|
+
onFlipRightEnd: ie,
|
|
766
|
+
onZoomStart: ce,
|
|
767
|
+
onZoomEnd: ae,
|
|
768
|
+
children: St,
|
|
769
|
+
className: E,
|
|
770
|
+
...G
|
|
771
|
+
}, jt) {
|
|
772
|
+
const ut = l(null), e = or({
|
|
767
773
|
pages: r,
|
|
768
774
|
pagesHiRes: o,
|
|
769
|
-
flipDuration:
|
|
775
|
+
flipDuration: R,
|
|
770
776
|
zoomDuration: M,
|
|
771
777
|
zooms: O,
|
|
772
|
-
perspective:
|
|
778
|
+
perspective: T,
|
|
773
779
|
nPolygons: L,
|
|
774
780
|
ambient: C,
|
|
775
|
-
gloss:
|
|
776
|
-
swipeMin:
|
|
777
|
-
singlePage:
|
|
778
|
-
forwardDirection:
|
|
779
|
-
centering:
|
|
780
|
-
startPage:
|
|
781
|
-
loadingImage:
|
|
781
|
+
gloss: j,
|
|
782
|
+
swipeMin: D,
|
|
783
|
+
singlePage: U,
|
|
784
|
+
forwardDirection: g,
|
|
785
|
+
centering: rt,
|
|
786
|
+
startPage: at,
|
|
787
|
+
loadingImage: st,
|
|
782
788
|
clickToZoom: A,
|
|
783
|
-
dragToFlip:
|
|
784
|
-
wheel:
|
|
785
|
-
page:
|
|
786
|
-
onPageChange:
|
|
787
|
-
onFlipLeftStart:
|
|
788
|
-
onFlipLeftEnd:
|
|
789
|
-
onFlipRightStart:
|
|
790
|
-
onFlipRightEnd:
|
|
791
|
-
onZoomStart:
|
|
792
|
-
onZoomEnd:
|
|
793
|
-
},
|
|
794
|
-
|
|
795
|
-
|
|
789
|
+
dragToFlip: $,
|
|
790
|
+
wheel: lt,
|
|
791
|
+
page: f,
|
|
792
|
+
onPageChange: d,
|
|
793
|
+
onFlipLeftStart: a,
|
|
794
|
+
onFlipLeftEnd: z,
|
|
795
|
+
onFlipRightStart: It,
|
|
796
|
+
onFlipRightEnd: ie,
|
|
797
|
+
onZoomStart: ce,
|
|
798
|
+
onZoomEnd: ae
|
|
799
|
+
}, ut);
|
|
800
|
+
Cn(
|
|
801
|
+
jt,
|
|
796
802
|
() => ({
|
|
797
803
|
get flipLeft() {
|
|
798
804
|
return e.flipLeft;
|
|
@@ -832,17 +838,17 @@ const sr = En(
|
|
|
832
838
|
// only rebuild when action functions change
|
|
833
839
|
[e.flipLeft, e.flipRight, e.zoomIn, e.zoomOut, e.goToPage, e.apiRef]
|
|
834
840
|
);
|
|
835
|
-
const
|
|
836
|
-
return /* @__PURE__ */
|
|
841
|
+
const x = (v) => b && b[v] ? b[v] : `Page ${v + 1}`, Dt = E ? `${F.root} ${E}` : F.root;
|
|
842
|
+
return /* @__PURE__ */ re(
|
|
837
843
|
"div",
|
|
838
844
|
{
|
|
839
|
-
...
|
|
840
|
-
className:
|
|
845
|
+
...G,
|
|
846
|
+
className: Dt,
|
|
841
847
|
role: "document",
|
|
842
848
|
"aria-label": `Book viewer, page ${e.page} of ${e.numPages}`,
|
|
843
849
|
"aria-roledescription": "flipbook",
|
|
844
850
|
children: [
|
|
845
|
-
|
|
851
|
+
St?.({
|
|
846
852
|
canFlipLeft: e.canFlipLeft,
|
|
847
853
|
canFlipRight: e.canFlipRight,
|
|
848
854
|
canZoomIn: e.canZoomIn,
|
|
@@ -855,10 +861,10 @@ const sr = En(
|
|
|
855
861
|
zoomOut: e.zoomOut,
|
|
856
862
|
goToPage: e.goToPage
|
|
857
863
|
}),
|
|
858
|
-
/* @__PURE__ */
|
|
864
|
+
/* @__PURE__ */ nt(
|
|
859
865
|
"div",
|
|
860
866
|
{
|
|
861
|
-
ref:
|
|
867
|
+
ref: ut,
|
|
862
868
|
className: e.viewportClass,
|
|
863
869
|
style: {
|
|
864
870
|
cursor: e.cursor === "grabbing" ? "grabbing" : "auto"
|
|
@@ -874,57 +880,57 @@ const sr = En(
|
|
|
874
880
|
onPointerCancel: e.handlers.onPointerUp,
|
|
875
881
|
onMouseUp: e.handlers.onMouseUp,
|
|
876
882
|
onWheel: e.handlers.onWheel,
|
|
877
|
-
children: /* @__PURE__ */
|
|
883
|
+
children: /* @__PURE__ */ re(
|
|
878
884
|
"div",
|
|
879
885
|
{
|
|
880
|
-
className:
|
|
881
|
-
style: { transform: `scale(${e.zoom})` },
|
|
886
|
+
className: J ? `${F.container} ${J}` : F.container,
|
|
887
|
+
style: { ...ot, transform: `scale(${e.zoom})` },
|
|
882
888
|
children: [
|
|
883
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ nt(
|
|
884
890
|
"div",
|
|
885
891
|
{
|
|
886
892
|
role: "button",
|
|
887
893
|
tabIndex: e.canFlipLeft ? 0 : -1,
|
|
888
894
|
"aria-label": "Previous page",
|
|
889
895
|
"aria-disabled": !e.canFlipLeft,
|
|
890
|
-
className:
|
|
896
|
+
className: F.clickLeft,
|
|
891
897
|
style: {
|
|
892
898
|
cursor: e.canFlipLeft ? "pointer" : "auto"
|
|
893
899
|
},
|
|
894
900
|
onClick: e.flipLeft,
|
|
895
|
-
onKeyDown: (
|
|
896
|
-
(
|
|
901
|
+
onKeyDown: (v) => {
|
|
902
|
+
(v.key === "Enter" || v.key === " ") && (v.preventDefault(), e.flipLeft());
|
|
897
903
|
}
|
|
898
904
|
}
|
|
899
905
|
),
|
|
900
|
-
/* @__PURE__ */
|
|
906
|
+
/* @__PURE__ */ nt(
|
|
901
907
|
"div",
|
|
902
908
|
{
|
|
903
909
|
role: "button",
|
|
904
910
|
tabIndex: e.canFlipRight ? 0 : -1,
|
|
905
911
|
"aria-label": "Next page",
|
|
906
912
|
"aria-disabled": !e.canFlipRight,
|
|
907
|
-
className:
|
|
913
|
+
className: F.clickRight,
|
|
908
914
|
style: {
|
|
909
915
|
cursor: e.canFlipRight ? "pointer" : "auto"
|
|
910
916
|
},
|
|
911
917
|
onClick: e.flipRight,
|
|
912
|
-
onKeyDown: (
|
|
913
|
-
(
|
|
918
|
+
onKeyDown: (v) => {
|
|
919
|
+
(v.key === "Enter" || v.key === " ") && (v.preventDefault(), e.flipRight());
|
|
914
920
|
}
|
|
915
921
|
}
|
|
916
922
|
),
|
|
917
|
-
/* @__PURE__ */
|
|
923
|
+
/* @__PURE__ */ re(
|
|
918
924
|
"div",
|
|
919
925
|
{
|
|
920
926
|
style: {
|
|
921
927
|
transform: `translateX(${e.centerOffsetSmoothed}px)`
|
|
922
928
|
},
|
|
923
929
|
children: [
|
|
924
|
-
e.showLeftPage && /* @__PURE__ */
|
|
930
|
+
e.showLeftPage && /* @__PURE__ */ nt(
|
|
925
931
|
"img",
|
|
926
932
|
{
|
|
927
|
-
className:
|
|
933
|
+
className: F.page,
|
|
928
934
|
style: {
|
|
929
935
|
width: e.pageWidth + "px",
|
|
930
936
|
height: e.pageHeight + "px",
|
|
@@ -932,14 +938,14 @@ const sr = En(
|
|
|
932
938
|
top: e.yMargin + "px"
|
|
933
939
|
},
|
|
934
940
|
src: e.pageUrlLoading(e.leftPage, !0) ?? void 0,
|
|
935
|
-
alt:
|
|
941
|
+
alt: x(e.leftPage),
|
|
936
942
|
onLoad: e.onImageLoad
|
|
937
943
|
}
|
|
938
944
|
),
|
|
939
|
-
e.showRightPage && /* @__PURE__ */
|
|
945
|
+
e.showRightPage && /* @__PURE__ */ nt(
|
|
940
946
|
"img",
|
|
941
947
|
{
|
|
942
|
-
className:
|
|
948
|
+
className: F.page,
|
|
943
949
|
style: {
|
|
944
950
|
width: e.pageWidth + "px",
|
|
945
951
|
height: e.pageHeight + "px",
|
|
@@ -947,37 +953,37 @@ const sr = En(
|
|
|
947
953
|
top: e.yMargin + "px"
|
|
948
954
|
},
|
|
949
955
|
src: e.pageUrlLoading(e.rightPage, !0) ?? void 0,
|
|
950
|
-
alt:
|
|
956
|
+
alt: x(e.rightPage),
|
|
951
957
|
onLoad: e.onImageLoad
|
|
952
958
|
}
|
|
953
959
|
),
|
|
954
|
-
/* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ nt("div", { style: { opacity: e.flipOpacity }, children: e.polygonArray.map((v) => /* @__PURE__ */ nt(
|
|
955
961
|
"div",
|
|
956
962
|
{
|
|
957
|
-
className:
|
|
963
|
+
className: v.bgImage ? F.polygon : F.polygonBlank,
|
|
958
964
|
style: {
|
|
959
|
-
backgroundImage:
|
|
965
|
+
backgroundImage: v.bgImage ? `url(${e.loadImage(v.bgImage)})` : void 0,
|
|
960
966
|
backgroundSize: e.polygonBgSize,
|
|
961
|
-
backgroundPosition:
|
|
967
|
+
backgroundPosition: v.bgPos,
|
|
962
968
|
width: e.polygonWidth,
|
|
963
969
|
height: e.polygonHeight,
|
|
964
|
-
transform:
|
|
965
|
-
zIndex:
|
|
970
|
+
transform: v.transform,
|
|
971
|
+
zIndex: v.z
|
|
966
972
|
},
|
|
967
|
-
children:
|
|
973
|
+
children: v.lighting && /* @__PURE__ */ nt(
|
|
968
974
|
"div",
|
|
969
975
|
{
|
|
970
|
-
className:
|
|
971
|
-
style: { backgroundImage:
|
|
976
|
+
className: F.lighting,
|
|
977
|
+
style: { backgroundImage: v.lighting }
|
|
972
978
|
}
|
|
973
979
|
)
|
|
974
980
|
},
|
|
975
|
-
|
|
981
|
+
v.key
|
|
976
982
|
)) }),
|
|
977
|
-
/* @__PURE__ */
|
|
983
|
+
/* @__PURE__ */ nt(
|
|
978
984
|
"div",
|
|
979
985
|
{
|
|
980
|
-
className:
|
|
986
|
+
className: F.boundingBox,
|
|
981
987
|
style: {
|
|
982
988
|
left: e.boundingLeft + "px",
|
|
983
989
|
top: e.yMargin + "px",
|
|
@@ -998,13 +1004,13 @@ const sr = En(
|
|
|
998
1004
|
)
|
|
999
1005
|
}
|
|
1000
1006
|
),
|
|
1001
|
-
/* @__PURE__ */
|
|
1007
|
+
/* @__PURE__ */ re(
|
|
1002
1008
|
"div",
|
|
1003
1009
|
{
|
|
1004
1010
|
role: "status",
|
|
1005
1011
|
"aria-live": "polite",
|
|
1006
1012
|
"aria-atomic": "true",
|
|
1007
|
-
className:
|
|
1013
|
+
className: F.srOnly,
|
|
1008
1014
|
children: [
|
|
1009
1015
|
"Page ",
|
|
1010
1016
|
e.page,
|