react-spring-carousel 3.0.0-beta083 → 3.0.0-beta085
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/index.cjs.js +10 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +677 -681
- package/dist/index.es.js.map +1 -1
- package/package.json +9 -9
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useSpring as
|
|
3
|
-
import { useDrag as
|
|
1
|
+
import ur, { useRef as D, useEffect as ne, createContext as cr, useCallback as br, useContext as lr, useState as Tr } from "react";
|
|
2
|
+
import { useSpring as sr, config as je, useIsomorphicLayoutEffect as Er, useTransition as Rr, a as Ir } from "@react-spring/web";
|
|
3
|
+
import { useDrag as fr } from "@use-gesture/react";
|
|
4
4
|
import _r from "resize-observer-polyfill";
|
|
5
|
-
import
|
|
5
|
+
import Ee from "screenfull";
|
|
6
6
|
var J = {}, wr = {
|
|
7
7
|
get exports() {
|
|
8
8
|
return J;
|
|
@@ -10,7 +10,7 @@ var J = {}, wr = {
|
|
|
10
10
|
set exports(i) {
|
|
11
11
|
J = i;
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, Ae = {};
|
|
14
14
|
/**
|
|
15
15
|
* @license React
|
|
16
16
|
* react-jsx-runtime.production.min.js
|
|
@@ -20,25 +20,25 @@ var J = {}, wr = {
|
|
|
20
20
|
* This source code is licensed under the MIT license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var or;
|
|
24
24
|
function Cr() {
|
|
25
|
-
if (
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
var i =
|
|
29
|
-
function
|
|
30
|
-
var M, A = {}, I = null,
|
|
31
|
-
|
|
32
|
-
for (M in
|
|
33
|
-
|
|
34
|
-
if (
|
|
35
|
-
for (M in
|
|
36
|
-
A[M] === void 0 && (A[M] =
|
|
37
|
-
return { $$typeof:
|
|
25
|
+
if (or)
|
|
26
|
+
return Ae;
|
|
27
|
+
or = 1;
|
|
28
|
+
var i = ur, m = Symbol.for("react.element"), h = Symbol.for("react.fragment"), N = Object.prototype.hasOwnProperty, Y = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
29
|
+
function w(l, s, f) {
|
|
30
|
+
var M, A = {}, I = null, u = null;
|
|
31
|
+
f !== void 0 && (I = "" + f), s.key !== void 0 && (I = "" + s.key), s.ref !== void 0 && (u = s.ref);
|
|
32
|
+
for (M in s)
|
|
33
|
+
N.call(s, M) && !g.hasOwnProperty(M) && (A[M] = s[M]);
|
|
34
|
+
if (l && l.defaultProps)
|
|
35
|
+
for (M in s = l.defaultProps, s)
|
|
36
|
+
A[M] === void 0 && (A[M] = s[M]);
|
|
37
|
+
return { $$typeof: m, type: l, key: I, ref: u, props: A, _owner: Y.current };
|
|
38
38
|
}
|
|
39
|
-
return
|
|
39
|
+
return Ae.Fragment = h, Ae.jsx = w, Ae.jsxs = w, Ae;
|
|
40
40
|
}
|
|
41
|
-
var
|
|
41
|
+
var Be = {};
|
|
42
42
|
/**
|
|
43
43
|
* @license React
|
|
44
44
|
* react-jsx-runtime.development.js
|
|
@@ -48,91 +48,91 @@ var Ue = {};
|
|
|
48
48
|
* This source code is licensed under the MIT license found in the
|
|
49
49
|
* LICENSE file in the root directory of this source tree.
|
|
50
50
|
*/
|
|
51
|
-
var
|
|
51
|
+
var ar;
|
|
52
52
|
function Pr() {
|
|
53
|
-
return
|
|
54
|
-
var i =
|
|
53
|
+
return ar || (ar = 1, process.env.NODE_ENV !== "production" && function() {
|
|
54
|
+
var i = ur, m = Symbol.for("react.element"), h = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), Y = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), w = Symbol.for("react.provider"), l = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), u = Symbol.for("react.offscreen"), B = Symbol.iterator, b = "@@iterator";
|
|
55
55
|
function ie(e) {
|
|
56
56
|
if (e === null || typeof e != "object")
|
|
57
57
|
return null;
|
|
58
58
|
var t = B && e[B] || e[b];
|
|
59
59
|
return typeof t == "function" ? t : null;
|
|
60
60
|
}
|
|
61
|
-
var
|
|
62
|
-
function
|
|
61
|
+
var F = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
62
|
+
function j(e) {
|
|
63
63
|
{
|
|
64
|
-
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0),
|
|
65
|
-
n[
|
|
66
|
-
|
|
64
|
+
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), c = 1; c < t; c++)
|
|
65
|
+
n[c - 1] = arguments[c];
|
|
66
|
+
Re("error", e, n);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Re(e, t, n) {
|
|
70
70
|
{
|
|
71
|
-
var
|
|
71
|
+
var c = F.ReactDebugCurrentFrame, x = c.getStackAddendum();
|
|
72
72
|
x !== "" && (t += "%s", n = n.concat([x]));
|
|
73
|
-
var R = n.map(function(
|
|
74
|
-
return String(
|
|
73
|
+
var R = n.map(function(v) {
|
|
74
|
+
return String(v);
|
|
75
75
|
});
|
|
76
76
|
R.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, R);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
var X = !1,
|
|
80
|
-
|
|
81
|
-
function
|
|
82
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
79
|
+
var X = !1, fe = !1, ee = !1, z = !1, de = !1, ve;
|
|
80
|
+
ve = Symbol.for("react.module.reference");
|
|
81
|
+
function U(e) {
|
|
82
|
+
return !!(typeof e == "string" || typeof e == "function" || e === N || e === g || de || e === Y || e === f || e === M || z || e === u || X || fe || ee || typeof e == "object" && e !== null && (e.$$typeof === I || e.$$typeof === A || e.$$typeof === w || e.$$typeof === l || e.$$typeof === s || // This needs to include all possible module reference object
|
|
83
83
|
// types supported by any Flight configuration anywhere since
|
|
84
84
|
// we don't know which Flight build this will end up being used
|
|
85
85
|
// with.
|
|
86
|
-
e.$$typeof ===
|
|
86
|
+
e.$$typeof === ve || e.getModuleId !== void 0));
|
|
87
87
|
}
|
|
88
88
|
function C(e, t, n) {
|
|
89
|
-
var
|
|
90
|
-
if (
|
|
91
|
-
return
|
|
89
|
+
var c = e.displayName;
|
|
90
|
+
if (c)
|
|
91
|
+
return c;
|
|
92
92
|
var x = t.displayName || t.name || "";
|
|
93
93
|
return x !== "" ? n + "(" + x + ")" : n;
|
|
94
94
|
}
|
|
95
95
|
function T(e) {
|
|
96
96
|
return e.displayName || "Context";
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function p(e) {
|
|
99
99
|
if (e == null)
|
|
100
100
|
return null;
|
|
101
|
-
if (typeof e.tag == "number" &&
|
|
101
|
+
if (typeof e.tag == "number" && j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
102
102
|
return e.displayName || e.name || null;
|
|
103
103
|
if (typeof e == "string")
|
|
104
104
|
return e;
|
|
105
105
|
switch (e) {
|
|
106
|
-
case
|
|
106
|
+
case N:
|
|
107
107
|
return "Fragment";
|
|
108
|
-
case
|
|
108
|
+
case h:
|
|
109
109
|
return "Portal";
|
|
110
|
-
case
|
|
110
|
+
case g:
|
|
111
111
|
return "Profiler";
|
|
112
|
-
case
|
|
112
|
+
case Y:
|
|
113
113
|
return "StrictMode";
|
|
114
|
-
case
|
|
114
|
+
case f:
|
|
115
115
|
return "Suspense";
|
|
116
116
|
case M:
|
|
117
117
|
return "SuspenseList";
|
|
118
118
|
}
|
|
119
119
|
if (typeof e == "object")
|
|
120
120
|
switch (e.$$typeof) {
|
|
121
|
-
case
|
|
121
|
+
case l:
|
|
122
122
|
var t = e;
|
|
123
123
|
return T(t) + ".Consumer";
|
|
124
|
-
case
|
|
124
|
+
case w:
|
|
125
125
|
var n = e;
|
|
126
126
|
return T(n._context) + ".Provider";
|
|
127
|
-
case
|
|
127
|
+
case s:
|
|
128
128
|
return C(e, e.render, "ForwardRef");
|
|
129
129
|
case A:
|
|
130
|
-
var
|
|
131
|
-
return
|
|
130
|
+
var c = e.displayName || null;
|
|
131
|
+
return c !== null ? c : p(e.type) || "Memo";
|
|
132
132
|
case I: {
|
|
133
|
-
var x = e, R = x._payload,
|
|
133
|
+
var x = e, R = x._payload, v = x._init;
|
|
134
134
|
try {
|
|
135
|
-
return
|
|
135
|
+
return p(v(R));
|
|
136
136
|
} catch {
|
|
137
137
|
return null;
|
|
138
138
|
}
|
|
@@ -140,18 +140,18 @@ function Pr() {
|
|
|
140
140
|
}
|
|
141
141
|
return null;
|
|
142
142
|
}
|
|
143
|
-
var P = Object.assign, K = 0,
|
|
144
|
-
function
|
|
143
|
+
var P = Object.assign, K = 0, me, k, y, E, O, q, oe;
|
|
144
|
+
function ae() {
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
function
|
|
146
|
+
ae.__reactDisabledLog = !0;
|
|
147
|
+
function ue() {
|
|
148
148
|
{
|
|
149
149
|
if (K === 0) {
|
|
150
|
-
|
|
150
|
+
me = console.log, k = console.info, y = console.warn, E = console.error, O = console.group, q = console.groupCollapsed, oe = console.groupEnd;
|
|
151
151
|
var e = {
|
|
152
152
|
configurable: !0,
|
|
153
153
|
enumerable: !0,
|
|
154
|
-
value:
|
|
154
|
+
value: ae,
|
|
155
155
|
writable: !0
|
|
156
156
|
};
|
|
157
157
|
Object.defineProperties(console, {
|
|
@@ -167,7 +167,7 @@ function Pr() {
|
|
|
167
167
|
K++;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function L() {
|
|
171
171
|
{
|
|
172
172
|
if (K--, K === 0) {
|
|
173
173
|
var e = {
|
|
@@ -177,241 +177,241 @@ function Pr() {
|
|
|
177
177
|
};
|
|
178
178
|
Object.defineProperties(console, {
|
|
179
179
|
log: P({}, e, {
|
|
180
|
-
value:
|
|
180
|
+
value: me
|
|
181
181
|
}),
|
|
182
182
|
info: P({}, e, {
|
|
183
|
-
value:
|
|
183
|
+
value: k
|
|
184
184
|
}),
|
|
185
185
|
warn: P({}, e, {
|
|
186
|
-
value:
|
|
186
|
+
value: y
|
|
187
187
|
}),
|
|
188
188
|
error: P({}, e, {
|
|
189
189
|
value: E
|
|
190
190
|
}),
|
|
191
191
|
group: P({}, e, {
|
|
192
|
-
value:
|
|
192
|
+
value: O
|
|
193
193
|
}),
|
|
194
194
|
groupCollapsed: P({}, e, {
|
|
195
|
-
value:
|
|
195
|
+
value: q
|
|
196
196
|
}),
|
|
197
197
|
groupEnd: P({}, e, {
|
|
198
|
-
value:
|
|
198
|
+
value: oe
|
|
199
199
|
})
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
|
-
K < 0 &&
|
|
202
|
+
K < 0 && j("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
var
|
|
206
|
-
function
|
|
205
|
+
var he = F.ReactCurrentDispatcher, pe;
|
|
206
|
+
function we(e, t, n) {
|
|
207
207
|
{
|
|
208
|
-
if (
|
|
208
|
+
if (pe === void 0)
|
|
209
209
|
try {
|
|
210
210
|
throw Error();
|
|
211
211
|
} catch (x) {
|
|
212
|
-
var
|
|
213
|
-
|
|
212
|
+
var c = x.stack.trim().match(/\n( *(at )?)/);
|
|
213
|
+
pe = c && c[1] || "";
|
|
214
214
|
}
|
|
215
215
|
return `
|
|
216
|
-
` +
|
|
216
|
+
` + pe + e;
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
var $e = !1,
|
|
219
|
+
var $e = !1, Ie;
|
|
220
220
|
{
|
|
221
|
-
var
|
|
222
|
-
|
|
221
|
+
var qe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
222
|
+
Ie = new qe();
|
|
223
223
|
}
|
|
224
224
|
function De(e, t) {
|
|
225
225
|
if (!e || $e)
|
|
226
226
|
return "";
|
|
227
227
|
{
|
|
228
|
-
var n =
|
|
228
|
+
var n = Ie.get(e);
|
|
229
229
|
if (n !== void 0)
|
|
230
230
|
return n;
|
|
231
231
|
}
|
|
232
|
-
var
|
|
232
|
+
var c;
|
|
233
233
|
$e = !0;
|
|
234
234
|
var x = Error.prepareStackTrace;
|
|
235
235
|
Error.prepareStackTrace = void 0;
|
|
236
236
|
var R;
|
|
237
|
-
R =
|
|
237
|
+
R = he.current, he.current = null, ue();
|
|
238
238
|
try {
|
|
239
239
|
if (t) {
|
|
240
|
-
var
|
|
240
|
+
var v = function() {
|
|
241
241
|
throw Error();
|
|
242
242
|
};
|
|
243
|
-
if (Object.defineProperty(
|
|
243
|
+
if (Object.defineProperty(v.prototype, "props", {
|
|
244
244
|
set: function() {
|
|
245
245
|
throw Error();
|
|
246
246
|
}
|
|
247
247
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
248
248
|
try {
|
|
249
|
-
Reflect.construct(
|
|
250
|
-
} catch (
|
|
251
|
-
|
|
249
|
+
Reflect.construct(v, []);
|
|
250
|
+
} catch (se) {
|
|
251
|
+
c = se;
|
|
252
252
|
}
|
|
253
|
-
Reflect.construct(e, [],
|
|
253
|
+
Reflect.construct(e, [], v);
|
|
254
254
|
} else {
|
|
255
255
|
try {
|
|
256
|
-
|
|
257
|
-
} catch (
|
|
258
|
-
|
|
256
|
+
v.call();
|
|
257
|
+
} catch (se) {
|
|
258
|
+
c = se;
|
|
259
259
|
}
|
|
260
|
-
e.call(
|
|
260
|
+
e.call(v.prototype);
|
|
261
261
|
}
|
|
262
262
|
} else {
|
|
263
263
|
try {
|
|
264
264
|
throw Error();
|
|
265
|
-
} catch (
|
|
266
|
-
|
|
265
|
+
} catch (se) {
|
|
266
|
+
c = se;
|
|
267
267
|
}
|
|
268
268
|
e();
|
|
269
269
|
}
|
|
270
|
-
} catch (
|
|
271
|
-
if (
|
|
272
|
-
for (var
|
|
273
|
-
`), H =
|
|
274
|
-
`),
|
|
275
|
-
|
|
276
|
-
for (;
|
|
277
|
-
if (
|
|
278
|
-
if (
|
|
270
|
+
} catch (se) {
|
|
271
|
+
if (se && c && typeof se.stack == "string") {
|
|
272
|
+
for (var d = se.stack.split(`
|
|
273
|
+
`), H = c.stack.split(`
|
|
274
|
+
`), S = d.length - 1, V = H.length - 1; S >= 1 && V >= 0 && d[S] !== H[V]; )
|
|
275
|
+
V--;
|
|
276
|
+
for (; S >= 1 && V >= 0; S--, V--)
|
|
277
|
+
if (d[S] !== H[V]) {
|
|
278
|
+
if (S !== 1 || V !== 1)
|
|
279
279
|
do
|
|
280
|
-
if (
|
|
280
|
+
if (S--, V--, V < 0 || d[S] !== H[V]) {
|
|
281
281
|
var G = `
|
|
282
|
-
` +
|
|
283
|
-
return e.displayName && G.includes("<anonymous>") && (G = G.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
282
|
+
` + d[S].replace(" at new ", " at ");
|
|
283
|
+
return e.displayName && G.includes("<anonymous>") && (G = G.replace("<anonymous>", e.displayName)), typeof e == "function" && Ie.set(e, G), G;
|
|
284
284
|
}
|
|
285
|
-
while (
|
|
285
|
+
while (S >= 1 && V >= 0);
|
|
286
286
|
break;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
} finally {
|
|
290
|
-
$e = !1,
|
|
290
|
+
$e = !1, he.current = R, L(), Error.prepareStackTrace = x;
|
|
291
291
|
}
|
|
292
|
-
var
|
|
293
|
-
return typeof e == "function" &&
|
|
292
|
+
var Oe = e ? e.displayName || e.name : "", ir = Oe ? we(Oe) : "";
|
|
293
|
+
return typeof e == "function" && Ie.set(e, ir), ir;
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function Ke(e, t, n) {
|
|
296
296
|
return De(e, !1);
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function W(e) {
|
|
299
299
|
var t = e.prototype;
|
|
300
300
|
return !!(t && t.isReactComponent);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function re(e, t, n) {
|
|
303
303
|
if (e == null)
|
|
304
304
|
return "";
|
|
305
305
|
if (typeof e == "function")
|
|
306
|
-
return De(e,
|
|
306
|
+
return De(e, W(e));
|
|
307
307
|
if (typeof e == "string")
|
|
308
|
-
return
|
|
308
|
+
return we(e);
|
|
309
309
|
switch (e) {
|
|
310
|
-
case
|
|
311
|
-
return
|
|
310
|
+
case f:
|
|
311
|
+
return we("Suspense");
|
|
312
312
|
case M:
|
|
313
|
-
return
|
|
313
|
+
return we("SuspenseList");
|
|
314
314
|
}
|
|
315
315
|
if (typeof e == "object")
|
|
316
316
|
switch (e.$$typeof) {
|
|
317
|
-
case
|
|
318
|
-
return
|
|
317
|
+
case s:
|
|
318
|
+
return Ke(e.render);
|
|
319
319
|
case A:
|
|
320
|
-
return
|
|
320
|
+
return re(e.type, t, n);
|
|
321
321
|
case I: {
|
|
322
|
-
var
|
|
322
|
+
var c = e, x = c._payload, R = c._init;
|
|
323
323
|
try {
|
|
324
|
-
return
|
|
324
|
+
return re(R(x), t, n);
|
|
325
325
|
} catch {
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
return "";
|
|
330
330
|
}
|
|
331
|
-
var
|
|
332
|
-
function
|
|
331
|
+
var $ = Object.prototype.hasOwnProperty, Le = {}, Ce = F.ReactDebugCurrentFrame;
|
|
332
|
+
function ge(e) {
|
|
333
333
|
if (e) {
|
|
334
|
-
var t = e._owner, n =
|
|
335
|
-
|
|
334
|
+
var t = e._owner, n = re(e.type, e._source, t ? t.type : null);
|
|
335
|
+
Ce.setExtraStackFrame(n);
|
|
336
336
|
} else
|
|
337
|
-
|
|
337
|
+
Ce.setExtraStackFrame(null);
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function Pe(e, t, n, c, x) {
|
|
340
340
|
{
|
|
341
|
-
var R = Function.call.bind(
|
|
342
|
-
for (var
|
|
343
|
-
if (R(e,
|
|
344
|
-
var
|
|
341
|
+
var R = Function.call.bind($);
|
|
342
|
+
for (var v in e)
|
|
343
|
+
if (R(e, v)) {
|
|
344
|
+
var d = void 0;
|
|
345
345
|
try {
|
|
346
|
-
if (typeof e[
|
|
347
|
-
var H = Error((
|
|
346
|
+
if (typeof e[v] != "function") {
|
|
347
|
+
var H = Error((c || "React class") + ": " + n + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
348
348
|
throw H.name = "Invariant Violation", H;
|
|
349
349
|
}
|
|
350
|
-
|
|
351
|
-
} catch (
|
|
352
|
-
|
|
350
|
+
d = e[v](t, v, c, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
351
|
+
} catch (S) {
|
|
352
|
+
d = S;
|
|
353
353
|
}
|
|
354
|
-
|
|
354
|
+
d && !(d instanceof Error) && (ge(x), j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", n, v, typeof d), ge(null)), d instanceof Error && !(d.message in Le) && (Le[d.message] = !0, ge(x), j("Failed %s type: %s", n, d.message), ge(null));
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
var
|
|
359
|
-
function
|
|
360
|
-
return
|
|
358
|
+
var te = Array.isArray;
|
|
359
|
+
function ce(e) {
|
|
360
|
+
return te(e);
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function ye(e) {
|
|
363
363
|
{
|
|
364
364
|
var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
365
365
|
return n;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function xe(e) {
|
|
369
369
|
try {
|
|
370
|
-
return
|
|
370
|
+
return He(e), !1;
|
|
371
371
|
} catch {
|
|
372
372
|
return !0;
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function He(e) {
|
|
376
376
|
return "" + e;
|
|
377
377
|
}
|
|
378
|
-
function
|
|
379
|
-
if (
|
|
380
|
-
return
|
|
378
|
+
function Ne(e) {
|
|
379
|
+
if (xe(e))
|
|
380
|
+
return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ye(e)), He(e);
|
|
381
381
|
}
|
|
382
|
-
var
|
|
382
|
+
var ke = F.ReactCurrentOwner, Ze = {
|
|
383
383
|
key: !0,
|
|
384
384
|
ref: !0,
|
|
385
385
|
__self: !0,
|
|
386
386
|
__source: !0
|
|
387
|
-
},
|
|
388
|
-
|
|
389
|
-
function
|
|
390
|
-
if (
|
|
387
|
+
}, Je, _e, Me;
|
|
388
|
+
Me = {};
|
|
389
|
+
function be(e) {
|
|
390
|
+
if ($.call(e, "ref")) {
|
|
391
391
|
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
392
392
|
if (t && t.isReactWarning)
|
|
393
393
|
return !1;
|
|
394
394
|
}
|
|
395
395
|
return e.ref !== void 0;
|
|
396
396
|
}
|
|
397
|
-
function
|
|
398
|
-
if (
|
|
397
|
+
function We(e) {
|
|
398
|
+
if ($.call(e, "key")) {
|
|
399
399
|
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
400
400
|
if (t && t.isReactWarning)
|
|
401
401
|
return !1;
|
|
402
402
|
}
|
|
403
403
|
return e.key !== void 0;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
if (typeof e.ref == "string" &&
|
|
407
|
-
var n =
|
|
408
|
-
|
|
405
|
+
function Se(e, t) {
|
|
406
|
+
if (typeof e.ref == "string" && ke.current && t && ke.current.stateNode !== t) {
|
|
407
|
+
var n = p(ke.current.type);
|
|
408
|
+
Me[n] || (j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', p(ke.current.type), e.ref), Me[n] = !0);
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function Ve(e, t) {
|
|
412
412
|
{
|
|
413
413
|
var n = function() {
|
|
414
|
-
|
|
414
|
+
Je || (Je = !0, j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
415
415
|
};
|
|
416
416
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
417
417
|
get: n,
|
|
@@ -419,10 +419,10 @@ function Pr() {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Ye(e, t) {
|
|
423
423
|
{
|
|
424
424
|
var n = function() {
|
|
425
|
-
|
|
425
|
+
_e || (_e = !0, j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
426
426
|
};
|
|
427
427
|
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
428
428
|
get: n,
|
|
@@ -430,70 +430,70 @@ function Pr() {
|
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
var
|
|
434
|
-
var
|
|
433
|
+
var Qe = function(e, t, n, c, x, R, v) {
|
|
434
|
+
var d = {
|
|
435
435
|
// This tag allows us to uniquely identify this as a React Element
|
|
436
|
-
$$typeof:
|
|
436
|
+
$$typeof: m,
|
|
437
437
|
// Built-in properties that belong on the element
|
|
438
438
|
type: e,
|
|
439
439
|
key: t,
|
|
440
440
|
ref: n,
|
|
441
|
-
props:
|
|
441
|
+
props: v,
|
|
442
442
|
// Record the component responsible for creating this element.
|
|
443
443
|
_owner: R
|
|
444
444
|
};
|
|
445
|
-
return
|
|
445
|
+
return d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
446
446
|
configurable: !1,
|
|
447
447
|
enumerable: !1,
|
|
448
448
|
writable: !0,
|
|
449
449
|
value: !1
|
|
450
|
-
}), Object.defineProperty(
|
|
450
|
+
}), Object.defineProperty(d, "_self", {
|
|
451
451
|
configurable: !1,
|
|
452
452
|
enumerable: !1,
|
|
453
453
|
writable: !1,
|
|
454
|
-
value:
|
|
455
|
-
}), Object.defineProperty(
|
|
454
|
+
value: c
|
|
455
|
+
}), Object.defineProperty(d, "_source", {
|
|
456
456
|
configurable: !1,
|
|
457
457
|
enumerable: !1,
|
|
458
458
|
writable: !1,
|
|
459
459
|
value: x
|
|
460
|
-
}), Object.freeze && (Object.freeze(
|
|
460
|
+
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
461
461
|
};
|
|
462
|
-
function
|
|
462
|
+
function Z(e, t, n, c, x) {
|
|
463
463
|
{
|
|
464
|
-
var R,
|
|
465
|
-
n !== void 0 && (
|
|
464
|
+
var R, v = {}, d = null, H = null;
|
|
465
|
+
n !== void 0 && (Ne(n), d = "" + n), We(t) && (Ne(t.key), d = "" + t.key), be(t) && (H = t.ref, Se(t, x));
|
|
466
466
|
for (R in t)
|
|
467
|
-
|
|
467
|
+
$.call(t, R) && !Ze.hasOwnProperty(R) && (v[R] = t[R]);
|
|
468
468
|
if (e && e.defaultProps) {
|
|
469
|
-
var
|
|
470
|
-
for (R in
|
|
471
|
-
|
|
469
|
+
var S = e.defaultProps;
|
|
470
|
+
for (R in S)
|
|
471
|
+
v[R] === void 0 && (v[R] = S[R]);
|
|
472
472
|
}
|
|
473
|
-
if (
|
|
474
|
-
var
|
|
475
|
-
|
|
473
|
+
if (d || H) {
|
|
474
|
+
var V = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
475
|
+
d && Ve(v, V), H && Ye(v, V);
|
|
476
476
|
}
|
|
477
|
-
return
|
|
477
|
+
return Qe(e, d, H, x, c, ke.current, v);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
var
|
|
481
|
-
function
|
|
480
|
+
var Ue = F.ReactCurrentOwner, ze = F.ReactDebugCurrentFrame;
|
|
481
|
+
function r(e) {
|
|
482
482
|
if (e) {
|
|
483
|
-
var t = e._owner, n =
|
|
483
|
+
var t = e._owner, n = re(e.type, e._source, t ? t.type : null);
|
|
484
484
|
ze.setExtraStackFrame(n);
|
|
485
485
|
} else
|
|
486
486
|
ze.setExtraStackFrame(null);
|
|
487
487
|
}
|
|
488
|
-
var
|
|
489
|
-
|
|
488
|
+
var a;
|
|
489
|
+
a = !1;
|
|
490
490
|
function o(e) {
|
|
491
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
491
|
+
return typeof e == "object" && e !== null && e.$$typeof === m;
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function _() {
|
|
494
494
|
{
|
|
495
|
-
if (
|
|
496
|
-
var e =
|
|
495
|
+
if (Ue.current) {
|
|
496
|
+
var e = p(Ue.current.type);
|
|
497
497
|
if (e)
|
|
498
498
|
return `
|
|
499
499
|
|
|
@@ -502,7 +502,7 @@ Check the render method of \`` + e + "`.";
|
|
|
502
502
|
return "";
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function Q(e) {
|
|
506
506
|
{
|
|
507
507
|
if (e !== void 0) {
|
|
508
508
|
var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
|
|
@@ -513,10 +513,10 @@ Check your code at ` + t + ":" + n + ".";
|
|
|
513
513
|
return "";
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
var
|
|
517
|
-
function
|
|
516
|
+
var le = {};
|
|
517
|
+
function Te(e) {
|
|
518
518
|
{
|
|
519
|
-
var t =
|
|
519
|
+
var t = _();
|
|
520
520
|
if (!t) {
|
|
521
521
|
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
522
522
|
n && (t = `
|
|
@@ -526,39 +526,39 @@ Check the top-level render call using <` + n + ">.");
|
|
|
526
526
|
return t;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function Xe(e, t) {
|
|
530
530
|
{
|
|
531
531
|
if (!e._store || e._store.validated || e.key != null)
|
|
532
532
|
return;
|
|
533
533
|
e._store.validated = !0;
|
|
534
|
-
var n =
|
|
535
|
-
if (
|
|
534
|
+
var n = Te(t);
|
|
535
|
+
if (le[n])
|
|
536
536
|
return;
|
|
537
|
-
|
|
538
|
-
var
|
|
539
|
-
e && e._owner && e._owner !==
|
|
537
|
+
le[n] = !0;
|
|
538
|
+
var c = "";
|
|
539
|
+
e && e._owner && e._owner !== Ue.current && (c = " It was passed a child from " + p(e._owner.type) + "."), r(e), j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, c), r(null);
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Ge(e, t) {
|
|
543
543
|
{
|
|
544
544
|
if (typeof e != "object")
|
|
545
545
|
return;
|
|
546
|
-
if (
|
|
546
|
+
if (ce(e))
|
|
547
547
|
for (var n = 0; n < e.length; n++) {
|
|
548
|
-
var
|
|
549
|
-
o(
|
|
548
|
+
var c = e[n];
|
|
549
|
+
o(c) && Xe(c, t);
|
|
550
550
|
}
|
|
551
551
|
else if (o(e))
|
|
552
552
|
e._store && (e._store.validated = !0);
|
|
553
553
|
else if (e) {
|
|
554
554
|
var x = ie(e);
|
|
555
555
|
if (typeof x == "function" && x !== e.entries)
|
|
556
|
-
for (var R = x.call(e),
|
|
557
|
-
o(
|
|
556
|
+
for (var R = x.call(e), v; !(v = R.next()).done; )
|
|
557
|
+
o(v.value) && Xe(v.value, t);
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function mr(e) {
|
|
562
562
|
{
|
|
563
563
|
var t = e.type;
|
|
564
564
|
if (t == null || typeof t == "string")
|
|
@@ -566,168 +566,168 @@ Check the top-level render call using <` + n + ">.");
|
|
|
566
566
|
var n;
|
|
567
567
|
if (typeof t == "function")
|
|
568
568
|
n = t.propTypes;
|
|
569
|
-
else if (typeof t == "object" && (t.$$typeof ===
|
|
569
|
+
else if (typeof t == "object" && (t.$$typeof === s || // Note: Memo only checks outer props here.
|
|
570
570
|
// Inner props are checked in the reconciler.
|
|
571
571
|
t.$$typeof === A))
|
|
572
572
|
n = t.propTypes;
|
|
573
573
|
else
|
|
574
574
|
return;
|
|
575
575
|
if (n) {
|
|
576
|
-
var
|
|
577
|
-
|
|
578
|
-
} else if (t.PropTypes !== void 0 && !
|
|
579
|
-
|
|
580
|
-
var x =
|
|
581
|
-
|
|
576
|
+
var c = p(t);
|
|
577
|
+
Pe(n, e.props, "prop", c, e);
|
|
578
|
+
} else if (t.PropTypes !== void 0 && !a) {
|
|
579
|
+
a = !0;
|
|
580
|
+
var x = p(t);
|
|
581
|
+
j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", x || "Unknown");
|
|
582
582
|
}
|
|
583
|
-
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved &&
|
|
583
|
+
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
function hr(e) {
|
|
587
587
|
{
|
|
588
588
|
for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
|
|
589
|
-
var
|
|
590
|
-
if (
|
|
591
|
-
|
|
589
|
+
var c = t[n];
|
|
590
|
+
if (c !== "children" && c !== "key") {
|
|
591
|
+
r(e), j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), r(null);
|
|
592
592
|
break;
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
e.ref !== null && (
|
|
595
|
+
e.ref !== null && (r(e), j("Invalid attribute `ref` supplied to `React.Fragment`."), r(null));
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function nr(e, t, n, c, x, R) {
|
|
599
599
|
{
|
|
600
|
-
var
|
|
601
|
-
if (!
|
|
602
|
-
var
|
|
603
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
604
|
-
var H =
|
|
605
|
-
H ?
|
|
606
|
-
var
|
|
607
|
-
e === null ?
|
|
600
|
+
var v = U(e);
|
|
601
|
+
if (!v) {
|
|
602
|
+
var d = "";
|
|
603
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
604
|
+
var H = Q(x);
|
|
605
|
+
H ? d += H : d += _();
|
|
606
|
+
var S;
|
|
607
|
+
e === null ? S = "null" : ce(e) ? S = "array" : e !== void 0 && e.$$typeof === m ? (S = "<" + (p(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : S = typeof e, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", S, d);
|
|
608
608
|
}
|
|
609
|
-
var
|
|
610
|
-
if (
|
|
611
|
-
return
|
|
612
|
-
if (
|
|
609
|
+
var V = Z(e, t, n, x, R);
|
|
610
|
+
if (V == null)
|
|
611
|
+
return V;
|
|
612
|
+
if (v) {
|
|
613
613
|
var G = t.children;
|
|
614
614
|
if (G !== void 0)
|
|
615
|
-
if (
|
|
616
|
-
if (
|
|
617
|
-
for (var
|
|
618
|
-
|
|
615
|
+
if (c)
|
|
616
|
+
if (ce(G)) {
|
|
617
|
+
for (var Oe = 0; Oe < G.length; Oe++)
|
|
618
|
+
Ge(G[Oe], e);
|
|
619
619
|
Object.freeze && Object.freeze(G);
|
|
620
620
|
} else
|
|
621
|
-
|
|
621
|
+
j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
622
622
|
else
|
|
623
|
-
|
|
623
|
+
Ge(G, e);
|
|
624
624
|
}
|
|
625
|
-
return e ===
|
|
625
|
+
return e === N ? hr(V) : mr(V), V;
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
628
|
function pr(e, t, n) {
|
|
629
|
-
return
|
|
629
|
+
return nr(e, t, n, !0);
|
|
630
630
|
}
|
|
631
631
|
function gr(e, t, n) {
|
|
632
|
-
return
|
|
632
|
+
return nr(e, t, n, !1);
|
|
633
633
|
}
|
|
634
634
|
var yr = gr, xr = pr;
|
|
635
|
-
|
|
636
|
-
}()),
|
|
635
|
+
Be.Fragment = N, Be.jsx = yr, Be.jsxs = xr;
|
|
636
|
+
}()), Be;
|
|
637
637
|
}
|
|
638
638
|
(function(i) {
|
|
639
639
|
process.env.NODE_ENV === "production" ? i.exports = Cr() : i.exports = Pr();
|
|
640
640
|
})(wr);
|
|
641
|
-
const
|
|
642
|
-
function
|
|
643
|
-
const i =
|
|
644
|
-
function
|
|
641
|
+
const er = "RSC::Event";
|
|
642
|
+
function dr() {
|
|
643
|
+
const i = D(null);
|
|
644
|
+
function m(N) {
|
|
645
645
|
ne(() => {
|
|
646
646
|
i.current || (i.current = document.createElement("div"));
|
|
647
|
-
function
|
|
648
|
-
|
|
647
|
+
function Y(g) {
|
|
648
|
+
N(g.detail);
|
|
649
649
|
}
|
|
650
650
|
if (i.current)
|
|
651
|
-
return i.current.addEventListener(
|
|
652
|
-
var
|
|
653
|
-
(
|
|
651
|
+
return i.current.addEventListener(er, Y, !1), () => {
|
|
652
|
+
var g;
|
|
653
|
+
(g = i.current) == null || g.removeEventListener(er, Y, !1);
|
|
654
654
|
};
|
|
655
|
-
}, [
|
|
655
|
+
}, [N]);
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function h(N) {
|
|
658
658
|
if (i.current) {
|
|
659
|
-
const
|
|
660
|
-
detail:
|
|
659
|
+
const Y = new CustomEvent(er, {
|
|
660
|
+
detail: N
|
|
661
661
|
});
|
|
662
|
-
i.current.dispatchEvent(
|
|
662
|
+
i.current.dispatchEvent(Y);
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
return {
|
|
666
|
-
useListenToCustomEvent:
|
|
667
|
-
emitEvent:
|
|
666
|
+
useListenToCustomEvent: m,
|
|
667
|
+
emitEvent: h
|
|
668
668
|
};
|
|
669
669
|
}
|
|
670
670
|
function kr(i) {
|
|
671
|
-
const
|
|
672
|
-
return
|
|
671
|
+
const m = i.getBoundingClientRect();
|
|
672
|
+
return m.top >= 0 && m.left >= 0 && m.bottom <= (window.innerHeight || document.documentElement.clientHeight) && m.right <= (window.innerWidth || document.documentElement.clientWidth);
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function vr({
|
|
675
675
|
thumbsSlideAxis: i = "x",
|
|
676
|
-
withThumbs:
|
|
677
|
-
prepareThumbsData:
|
|
678
|
-
items:
|
|
679
|
-
renderThumbFnProps:
|
|
676
|
+
withThumbs: m = !1,
|
|
677
|
+
prepareThumbsData: h,
|
|
678
|
+
items: N,
|
|
679
|
+
renderThumbFnProps: Y
|
|
680
680
|
}) {
|
|
681
|
-
const
|
|
681
|
+
const g = D(null), [w, l] = sr(() => ({
|
|
682
682
|
val: 0
|
|
683
683
|
}));
|
|
684
|
-
function
|
|
684
|
+
function s() {
|
|
685
685
|
var I;
|
|
686
686
|
return Math.round(
|
|
687
|
-
Number((I =
|
|
687
|
+
Number((I = g.current) == null ? void 0 : I[i === "x" ? "scrollWidth" : "scrollHeight"]) - g.current.getBoundingClientRect()[i === "x" ? "width" : "height"]
|
|
688
688
|
);
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function f(I) {
|
|
691
691
|
var b;
|
|
692
|
-
function
|
|
693
|
-
return
|
|
694
|
-
`#thumb-item-${
|
|
692
|
+
function u() {
|
|
693
|
+
return g.current ? g.current.querySelector(
|
|
694
|
+
`#thumb-item-${N[I].id}`
|
|
695
695
|
) : null;
|
|
696
696
|
}
|
|
697
|
-
const B =
|
|
698
|
-
if (B &&
|
|
699
|
-
const ie = B.offsetLeft,
|
|
700
|
-
|
|
697
|
+
const B = u();
|
|
698
|
+
if (B && g.current && !kr(B)) {
|
|
699
|
+
const ie = B.offsetLeft, F = ie > s() ? s() : ie;
|
|
700
|
+
l.start({
|
|
701
701
|
from: {
|
|
702
|
-
val: ((b =
|
|
702
|
+
val: ((b = g.current) == null ? void 0 : b[i === "x" ? "scrollLeft" : "scrollTop"]) ?? 0
|
|
703
703
|
},
|
|
704
704
|
to: {
|
|
705
|
-
val:
|
|
705
|
+
val: F
|
|
706
706
|
},
|
|
707
|
-
onChange: ({ value:
|
|
708
|
-
|
|
709
|
-
|
|
707
|
+
onChange: ({ value: j }) => {
|
|
708
|
+
g.current && (g.current[i === "x" ? "scrollLeft" : "scrollTop"] = Math.abs(
|
|
709
|
+
j.val
|
|
710
710
|
));
|
|
711
711
|
}
|
|
712
712
|
});
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
function M() {
|
|
716
|
-
function I(
|
|
717
|
-
return
|
|
716
|
+
function I(u) {
|
|
717
|
+
return u.map((B) => ({
|
|
718
718
|
id: B.id,
|
|
719
719
|
renderThumb: B.renderThumb
|
|
720
720
|
}));
|
|
721
721
|
}
|
|
722
|
-
return
|
|
722
|
+
return h ? h(I(N)) : I(N);
|
|
723
723
|
}
|
|
724
724
|
return {
|
|
725
|
-
thumbsFragment:
|
|
725
|
+
thumbsFragment: m ? /* @__PURE__ */ J.jsx(
|
|
726
726
|
"div",
|
|
727
727
|
{
|
|
728
728
|
className: "use-spring-carousel-thumbs-wrapper",
|
|
729
|
-
ref:
|
|
730
|
-
onWheel: () =>
|
|
729
|
+
ref: g,
|
|
730
|
+
onWheel: () => w.val.stop(),
|
|
731
731
|
style: {
|
|
732
732
|
display: "flex",
|
|
733
733
|
flex: "1",
|
|
@@ -740,71 +740,71 @@ function mr({
|
|
|
740
740
|
maxHeight: "100%"
|
|
741
741
|
}
|
|
742
742
|
},
|
|
743
|
-
children: M().map(({ id: I, renderThumb:
|
|
743
|
+
children: M().map(({ id: I, renderThumb: u }) => {
|
|
744
744
|
const B = `thumb-item-${I}`;
|
|
745
|
-
return /* @__PURE__ */ J.jsx("div", { id: B, className: "thumb-item", children: typeof
|
|
745
|
+
return /* @__PURE__ */ J.jsx("div", { id: B, className: "thumb-item", children: typeof u == "function" ? u(Y) : u }, B);
|
|
746
746
|
})
|
|
747
747
|
}
|
|
748
748
|
) : null,
|
|
749
|
-
handleScroll:
|
|
749
|
+
handleScroll: f
|
|
750
750
|
};
|
|
751
751
|
}
|
|
752
|
-
function
|
|
752
|
+
function Or({
|
|
753
753
|
mainCarouselWrapperRef: i,
|
|
754
|
-
onFullScreenChange:
|
|
755
|
-
handleResize:
|
|
754
|
+
onFullScreenChange: m,
|
|
755
|
+
handleResize: h
|
|
756
756
|
}) {
|
|
757
|
-
const
|
|
757
|
+
const N = D(!1);
|
|
758
758
|
ne(() => {
|
|
759
|
-
function
|
|
760
|
-
document.fullscreenElement && (
|
|
759
|
+
function s() {
|
|
760
|
+
document.fullscreenElement && (Y(!0), m(!0), h && h()), document.fullscreenElement || (Y(!1), m(!1), h && h());
|
|
761
761
|
}
|
|
762
|
-
if (
|
|
763
|
-
return
|
|
764
|
-
|
|
762
|
+
if (Ee.isEnabled)
|
|
763
|
+
return Ee.on("change", s), () => {
|
|
764
|
+
Ee.isEnabled && Ee.off("change", s);
|
|
765
765
|
};
|
|
766
766
|
}, []);
|
|
767
|
-
function
|
|
768
|
-
|
|
767
|
+
function Y(s) {
|
|
768
|
+
N.current = s;
|
|
769
769
|
}
|
|
770
|
-
function
|
|
771
|
-
return
|
|
770
|
+
function g() {
|
|
771
|
+
return N.current;
|
|
772
772
|
}
|
|
773
|
-
function
|
|
774
|
-
|
|
773
|
+
function w(s) {
|
|
774
|
+
Ee.isEnabled && Ee.request(s || i.current);
|
|
775
775
|
}
|
|
776
|
-
function
|
|
777
|
-
|
|
776
|
+
function l() {
|
|
777
|
+
Ee.isEnabled && Ee.exit();
|
|
778
778
|
}
|
|
779
779
|
return {
|
|
780
|
-
enterFullscreen:
|
|
781
|
-
exitFullscreen:
|
|
782
|
-
getIsFullscreen:
|
|
780
|
+
enterFullscreen: w,
|
|
781
|
+
exitFullscreen: l,
|
|
782
|
+
getIsFullscreen: g
|
|
783
783
|
};
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function Mr({
|
|
786
786
|
items: i,
|
|
787
|
-
init:
|
|
788
|
-
withThumbs:
|
|
789
|
-
thumbsSlideAxis:
|
|
790
|
-
itemsPerSlide:
|
|
791
|
-
slideType:
|
|
792
|
-
gutter:
|
|
793
|
-
withLoop:
|
|
794
|
-
startEndGutter:
|
|
795
|
-
carouselSlideAxis:
|
|
787
|
+
init: m = !0,
|
|
788
|
+
withThumbs: h,
|
|
789
|
+
thumbsSlideAxis: N = "x",
|
|
790
|
+
itemsPerSlide: Y = 1,
|
|
791
|
+
slideType: g = "fixed",
|
|
792
|
+
gutter: w = 0,
|
|
793
|
+
withLoop: l = !1,
|
|
794
|
+
startEndGutter: s = 0,
|
|
795
|
+
carouselSlideAxis: f = "x",
|
|
796
796
|
disableGestures: M = !1,
|
|
797
797
|
draggingSlideTreshold: A,
|
|
798
798
|
slideWhenThresholdIsReached: I = !1,
|
|
799
|
-
freeScroll:
|
|
799
|
+
freeScroll: u,
|
|
800
800
|
enableFreeScrollDrag: B,
|
|
801
801
|
initialStartingPosition: b,
|
|
802
802
|
prepareThumbsData: ie,
|
|
803
|
-
initialActiveItem:
|
|
804
|
-
animateWhenActiveItemChange:
|
|
805
|
-
getControllerRef:
|
|
803
|
+
initialActiveItem: F = 0,
|
|
804
|
+
animateWhenActiveItemChange: j = !0,
|
|
805
|
+
getControllerRef: Re
|
|
806
806
|
}) {
|
|
807
|
-
const X =
|
|
807
|
+
const X = Y > i.length ? i.length : Y, fe = D(!1), ee = D(A ?? 0), z = D("initial"), de = D("initial"), ve = D("initial"), U = D(F), C = D(F === 0), T = D(g === "fixed" && F === i.length - 1), p = D(null), P = D(null), K = D(0), me = D(0), k = D(0), y = D(l), E = D(g), O = D(u), q = D(!1), ae = br(() => l ? [
|
|
808
808
|
...i.map((r) => ({
|
|
809
809
|
...r,
|
|
810
810
|
id: `prev-repeated-item-${r.id}`
|
|
@@ -814,28 +814,28 @@ function Nr({
|
|
|
814
814
|
...r,
|
|
815
815
|
id: `next-repeated-item-${r.id}`
|
|
816
816
|
}))
|
|
817
|
-
] : [...i], [i,
|
|
817
|
+
] : [...i], [i, l])(), [ue, L] = sr(
|
|
818
818
|
() => ({
|
|
819
819
|
val: 0,
|
|
820
|
-
pause: !
|
|
820
|
+
pause: !m,
|
|
821
821
|
onChange: ({ value: r }) => {
|
|
822
|
-
|
|
822
|
+
u && p.current ? (f === "x" ? p.current.scrollLeft = Math.abs(r.val) : p.current.scrollTop = Math.abs(r.val), _e()) : P.current && (f === "x" ? P.current.style.transform = `translate3d(${r.val}px, 0px,0px)` : P.current.style.transform = `translate3d(0px,${r.val}px,0px)`);
|
|
823
823
|
}
|
|
824
824
|
}),
|
|
825
|
-
[
|
|
826
|
-
), { emitEvent: he, useListenToCustomEvent:
|
|
827
|
-
withThumbs: !!
|
|
828
|
-
thumbsSlideAxis:
|
|
825
|
+
[u]
|
|
826
|
+
), { emitEvent: he, useListenToCustomEvent: pe } = dr(), { thumbsFragment: we, handleScroll: $e } = vr({
|
|
827
|
+
withThumbs: !!h,
|
|
828
|
+
thumbsSlideAxis: N,
|
|
829
829
|
prepareThumbsData: ie,
|
|
830
830
|
items: i,
|
|
831
831
|
renderThumbFnProps: {
|
|
832
|
-
getIsActiveItem:
|
|
833
|
-
getIsPrevItem:
|
|
834
|
-
useListenToCustomEvent:
|
|
835
|
-
getIsNextItem:
|
|
832
|
+
getIsActiveItem: Ye,
|
|
833
|
+
getIsPrevItem: Ve,
|
|
834
|
+
useListenToCustomEvent: pe,
|
|
835
|
+
getIsNextItem: Se
|
|
836
836
|
}
|
|
837
|
-
}), { enterFullscreen:
|
|
838
|
-
mainCarouselWrapperRef:
|
|
837
|
+
}), { enterFullscreen: Ie, exitFullscreen: qe, getIsFullscreen: De } = Or({
|
|
838
|
+
mainCarouselWrapperRef: p,
|
|
839
839
|
handleResize: () => Pe(),
|
|
840
840
|
onFullScreenChange: (r) => {
|
|
841
841
|
he({
|
|
@@ -845,234 +845,234 @@ function Nr({
|
|
|
845
845
|
}
|
|
846
846
|
});
|
|
847
847
|
function Ke(r) {
|
|
848
|
-
return
|
|
849
|
-
marginRight: `${r ? 0 :
|
|
850
|
-
flex: `1 0 calc(100% / ${X} - ${
|
|
848
|
+
return g === "fixed" && !u ? {
|
|
849
|
+
marginRight: `${r ? 0 : w}px`,
|
|
850
|
+
flex: `1 0 calc(100% / ${X} - ${w * (X - 1) / X}px)`
|
|
851
851
|
} : {
|
|
852
|
-
marginRight: `${r ? 0 :
|
|
852
|
+
marginRight: `${r ? 0 : w}px`
|
|
853
853
|
};
|
|
854
854
|
}
|
|
855
|
-
function
|
|
856
|
-
var
|
|
857
|
-
const r = (
|
|
855
|
+
function W() {
|
|
856
|
+
var a;
|
|
857
|
+
const r = (a = p.current) == null ? void 0 : a.querySelector(".use-spring-carousel-item");
|
|
858
858
|
if (!r)
|
|
859
859
|
throw Error("No carousel items available!");
|
|
860
|
-
return r.getBoundingClientRect()[
|
|
860
|
+
return r.getBoundingClientRect()[f === "x" ? "width" : "height"] + w;
|
|
861
861
|
}
|
|
862
|
-
function re({ from: r, to:
|
|
863
|
-
|
|
862
|
+
function re({ from: r, to: a, nextActiveItem: o, immediate: _ = !1, slideMode: Q }) {
|
|
863
|
+
de.current = Q, typeof o == "number" && (u || (U.current = o), he({
|
|
864
864
|
eventName: "onSlideStartChange",
|
|
865
865
|
slideActionType: z.current,
|
|
866
|
-
slideMode:
|
|
866
|
+
slideMode: de.current,
|
|
867
867
|
nextItem: {
|
|
868
868
|
startReached: C.current,
|
|
869
869
|
endReached: T.current,
|
|
870
|
-
index:
|
|
871
|
-
id:
|
|
870
|
+
index: u ? -1 : U.current,
|
|
871
|
+
id: u ? "" : i[U.current].id
|
|
872
872
|
}
|
|
873
|
-
})),
|
|
874
|
-
immediate:
|
|
873
|
+
})), k.current = a, L.start({
|
|
874
|
+
immediate: _,
|
|
875
875
|
from: {
|
|
876
876
|
val: r
|
|
877
877
|
},
|
|
878
878
|
to: {
|
|
879
|
-
val:
|
|
879
|
+
val: a
|
|
880
880
|
},
|
|
881
881
|
config: {
|
|
882
|
-
...
|
|
883
|
-
velocity:
|
|
882
|
+
...je.default,
|
|
883
|
+
velocity: ue.val.velocity
|
|
884
884
|
},
|
|
885
|
-
onRest(
|
|
886
|
-
!
|
|
885
|
+
onRest(le) {
|
|
886
|
+
!_ && le.finished && he({
|
|
887
887
|
eventName: "onSlideChange",
|
|
888
888
|
slideActionType: z.current,
|
|
889
|
-
slideMode:
|
|
889
|
+
slideMode: de.current,
|
|
890
890
|
currentItem: {
|
|
891
891
|
startReached: C.current,
|
|
892
892
|
endReached: T.current,
|
|
893
|
-
index:
|
|
894
|
-
id:
|
|
893
|
+
index: u ? -1 : U.current,
|
|
894
|
+
id: u ? "" : i[U.current].id
|
|
895
895
|
}
|
|
896
896
|
});
|
|
897
897
|
}
|
|
898
|
-
}),
|
|
898
|
+
}), h && !_ && $e(U.current);
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function $() {
|
|
901
901
|
var r;
|
|
902
|
-
return
|
|
902
|
+
return l ? W() * i.length : Math.round(
|
|
903
903
|
Number(
|
|
904
|
-
(r = P.current) == null ? void 0 : r[
|
|
905
|
-
) - P.current.getBoundingClientRect()[
|
|
904
|
+
(r = P.current) == null ? void 0 : r[f === "x" ? "scrollWidth" : "scrollHeight"]
|
|
905
|
+
) - P.current.getBoundingClientRect()[f === "x" ? "width" : "height"] - s * 2
|
|
906
906
|
);
|
|
907
907
|
}
|
|
908
|
-
function
|
|
909
|
-
const r = `calc(100% - ${
|
|
908
|
+
function Le() {
|
|
909
|
+
const r = `calc(100% - ${s * 2}px)`;
|
|
910
910
|
return {
|
|
911
|
-
width:
|
|
912
|
-
height:
|
|
911
|
+
width: f === "x" ? r : "100%",
|
|
912
|
+
height: f === "y" ? r : "100%"
|
|
913
913
|
};
|
|
914
914
|
}
|
|
915
|
-
function
|
|
916
|
-
var
|
|
917
|
-
const r = (
|
|
915
|
+
function Ce() {
|
|
916
|
+
var a;
|
|
917
|
+
const r = (a = P.current) == null ? void 0 : a.querySelector(".use-spring-carousel-item");
|
|
918
918
|
if (!r)
|
|
919
919
|
throw Error("No carousel items available!");
|
|
920
|
-
return r.getBoundingClientRect()[
|
|
920
|
+
return r.getBoundingClientRect()[f === "x" ? "width" : "height"] + w;
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
const
|
|
924
|
-
|
|
922
|
+
function ge(r) {
|
|
923
|
+
const a = f === "x" ? "left" : "top", o = P.current;
|
|
924
|
+
o && (l ? (o.style.top = "0px", o.style.left = "0px", o.style[a] = `-${r - s}px`, C.current = !1, T.current = !1) : (o.style.left = "0px", o.style.top = "0px"));
|
|
925
925
|
}
|
|
926
926
|
function Pe(r = !1) {
|
|
927
|
-
if (P.current && r && (P.current.style.transform = "translate3d(0px, 0px,0px)", P.current.style.left = "0", P.current.style.top = "0"),
|
|
928
|
-
b === "center" ?
|
|
929
|
-
),
|
|
930
|
-
if (T.current &&
|
|
931
|
-
const
|
|
932
|
-
|
|
927
|
+
if (P.current && r && (P.current.style.transform = "translate3d(0px, 0px,0px)", P.current.style.left = "0", P.current.style.top = "0"), g === "fixed" && ge(
|
|
928
|
+
b === "center" ? Ce() * i.length - W() * Math.round((X - 1) / 2) : b === "end" ? Ce() * i.length - W() * Math.round(X - 1) : Ce() * i.length
|
|
929
|
+
), g === "fluid") {
|
|
930
|
+
if (T.current && $() !== Math.abs(k.current) && !l) {
|
|
931
|
+
const a = -$();
|
|
932
|
+
k.current = a, L.start({
|
|
933
933
|
immediate: !0,
|
|
934
|
-
val:
|
|
934
|
+
val: k.current
|
|
935
935
|
});
|
|
936
936
|
return;
|
|
937
937
|
}
|
|
938
|
-
if (Math.abs(
|
|
939
|
-
const
|
|
940
|
-
return
|
|
938
|
+
if (Math.abs(k.current) > 0 && $() !== Math.abs(k.current) && !l && !u && ve.current === "backward") {
|
|
939
|
+
const a = K.current - $(), o = k.current + a;
|
|
940
|
+
return L.start({
|
|
941
941
|
immediate: !0,
|
|
942
|
-
val:
|
|
942
|
+
val: o
|
|
943
943
|
}), () => {
|
|
944
|
-
|
|
944
|
+
k.current = o;
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
947
|
return;
|
|
948
948
|
}
|
|
949
|
-
if (!
|
|
950
|
-
const
|
|
951
|
-
if (Math.abs(
|
|
952
|
-
const
|
|
953
|
-
T.current = !0,
|
|
949
|
+
if (!u && g === "fixed") {
|
|
950
|
+
const a = -(W() * U.current);
|
|
951
|
+
if (Math.abs(a) > $() && !l) {
|
|
952
|
+
const o = -$();
|
|
953
|
+
T.current = !0, k.current = o, L.start({
|
|
954
954
|
immediate: !0,
|
|
955
|
-
val:
|
|
955
|
+
val: k.current
|
|
956
956
|
});
|
|
957
957
|
} else
|
|
958
|
-
|
|
958
|
+
k.current = a, L.start({
|
|
959
959
|
immediate: !0,
|
|
960
|
-
val:
|
|
960
|
+
val: a
|
|
961
961
|
});
|
|
962
962
|
setTimeout(() => {
|
|
963
|
-
|
|
963
|
+
fe.current = !1;
|
|
964
964
|
}, 0);
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
|
-
function
|
|
968
|
-
return
|
|
967
|
+
function te() {
|
|
968
|
+
return u && p.current ? p.current[f === "x" ? "scrollLeft" : "scrollTop"] : ue.val.get();
|
|
969
969
|
}
|
|
970
|
-
function
|
|
971
|
-
if (
|
|
972
|
-
const
|
|
973
|
-
return
|
|
970
|
+
function ce(r, a) {
|
|
971
|
+
if (u && r === "next") {
|
|
972
|
+
const o = k.current + W();
|
|
973
|
+
return o > $() ? $() : o;
|
|
974
974
|
}
|
|
975
|
-
if (
|
|
976
|
-
const
|
|
977
|
-
return
|
|
975
|
+
if (u && r === "prev") {
|
|
976
|
+
const o = k.current - W();
|
|
977
|
+
return o < 0 ? 0 : o;
|
|
978
978
|
}
|
|
979
|
-
return r === "next" ? typeof
|
|
979
|
+
return r === "next" ? typeof a == "number" ? -(a * W()) : k.current - W() : typeof a == "number" ? -(a * W()) : k.current + W();
|
|
980
980
|
}
|
|
981
|
-
function
|
|
982
|
-
if (!
|
|
981
|
+
function ye({ type: r, index: a, immediate: o }) {
|
|
982
|
+
if (!m || q.current || C.current && !l)
|
|
983
983
|
return;
|
|
984
|
-
T.current && (
|
|
985
|
-
const
|
|
986
|
-
if (
|
|
987
|
-
const Q =
|
|
984
|
+
T.current && (ve.current = "backward"), z.current = "prev", T.current = !1;
|
|
985
|
+
const _ = typeof a == "number" ? a : U.current - 1;
|
|
986
|
+
if (u && _e(), !l) {
|
|
987
|
+
const Q = u ? ce("prev", a) - W() / 3 < 0 : ce("prev", a) + W() / 3 > 0;
|
|
988
988
|
if (C.current)
|
|
989
989
|
return;
|
|
990
990
|
if (Q) {
|
|
991
991
|
C.current = !0, T.current = !1, re({
|
|
992
992
|
slideMode: r,
|
|
993
|
-
from:
|
|
993
|
+
from: te(),
|
|
994
994
|
to: 0,
|
|
995
995
|
nextActiveItem: 0,
|
|
996
|
-
immediate:
|
|
996
|
+
immediate: o
|
|
997
997
|
});
|
|
998
998
|
return;
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
|
-
if (
|
|
1001
|
+
if (l && (C.current || _ < 0)) {
|
|
1002
1002
|
C.current = !1, T.current = !0, re({
|
|
1003
1003
|
slideMode: r,
|
|
1004
|
-
from:
|
|
1005
|
-
to: -(
|
|
1004
|
+
from: te() - W() * i.length,
|
|
1005
|
+
to: -(W() * i.length) + W(),
|
|
1006
1006
|
nextActiveItem: i.length - 1,
|
|
1007
|
-
immediate:
|
|
1007
|
+
immediate: o
|
|
1008
1008
|
});
|
|
1009
1009
|
return;
|
|
1010
1010
|
}
|
|
1011
|
-
|
|
1011
|
+
_ === 0 && (C.current = !0), (_ === i.length - 1 || _ === -1) && (T.current = !0), re({
|
|
1012
1012
|
slideMode: r,
|
|
1013
|
-
from:
|
|
1014
|
-
to:
|
|
1015
|
-
nextActiveItem:
|
|
1016
|
-
immediate:
|
|
1013
|
+
from: te(),
|
|
1014
|
+
to: ce("prev", a),
|
|
1015
|
+
nextActiveItem: _,
|
|
1016
|
+
immediate: o
|
|
1017
1017
|
});
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1020
|
-
if (!
|
|
1019
|
+
function xe({ type: r, index: a, immediate: o }) {
|
|
1020
|
+
if (!m || q.current || T.current && !l)
|
|
1021
1021
|
return;
|
|
1022
|
-
C.current && (
|
|
1023
|
-
const
|
|
1024
|
-
if (
|
|
1025
|
-
const Q = Math.abs(
|
|
1022
|
+
C.current && (ve.current = "forward"), z.current = "next", C.current = !1;
|
|
1023
|
+
const _ = a || U.current + 1;
|
|
1024
|
+
if (u && _e(), !l) {
|
|
1025
|
+
const Q = Math.abs(ce("next", a)) > $() - W() / 3;
|
|
1026
1026
|
if (T.current)
|
|
1027
1027
|
return;
|
|
1028
1028
|
if (Q) {
|
|
1029
1029
|
C.current = !1, T.current = !0, re({
|
|
1030
1030
|
slideMode: r,
|
|
1031
|
-
from:
|
|
1032
|
-
to:
|
|
1033
|
-
nextActiveItem:
|
|
1034
|
-
immediate:
|
|
1031
|
+
from: te(),
|
|
1032
|
+
to: u ? $() : -$(),
|
|
1033
|
+
nextActiveItem: _,
|
|
1034
|
+
immediate: o
|
|
1035
1035
|
});
|
|
1036
1036
|
return;
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
|
-
if (
|
|
1039
|
+
if (l && (T.current || _ > i.length - 1)) {
|
|
1040
1040
|
T.current = !1, C.current = !0, re({
|
|
1041
1041
|
slideMode: r,
|
|
1042
|
-
from:
|
|
1042
|
+
from: te() + W() * i.length,
|
|
1043
1043
|
to: 0,
|
|
1044
1044
|
nextActiveItem: 0,
|
|
1045
|
-
immediate:
|
|
1045
|
+
immediate: o
|
|
1046
1046
|
});
|
|
1047
1047
|
return;
|
|
1048
1048
|
}
|
|
1049
|
-
|
|
1049
|
+
_ === 0 && (C.current = !0), _ === i.length - 1 && (T.current = !0), re({
|
|
1050
1050
|
slideMode: r,
|
|
1051
|
-
from:
|
|
1052
|
-
to:
|
|
1053
|
-
nextActiveItem:
|
|
1054
|
-
immediate:
|
|
1051
|
+
from: te(),
|
|
1052
|
+
to: ce("next", a),
|
|
1053
|
+
nextActiveItem: _,
|
|
1054
|
+
immediate: o
|
|
1055
1055
|
});
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1058
|
-
A ? ee.current = A : ee.current = Math.floor(
|
|
1057
|
+
function He() {
|
|
1058
|
+
A ? ee.current = A : ee.current = Math.floor(W() / 2 / 2);
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1061
|
-
|
|
1060
|
+
function Ne() {
|
|
1061
|
+
P.current && (K.current = $(), y.current = l, E.current = g, O.current = u, me.current = window.innerWidth, k.current = 0, We({ id: 0, immediate: !0, shouldReset: !0 }), He(), Pe());
|
|
1062
1062
|
}
|
|
1063
|
-
const
|
|
1063
|
+
const Ze = fr(
|
|
1064
1064
|
(r) => {
|
|
1065
|
-
const
|
|
1066
|
-
if (
|
|
1065
|
+
const a = r.dragging, o = r.offset[f === "x" ? 0 : 1], _ = r.movement[f === "x" ? 0 : 1], Q = r.direction[f === "x" ? 0 : 1], le = _ > ee.current, Te = _ < -ee.current, Xe = $();
|
|
1066
|
+
if (a) {
|
|
1067
1067
|
if (Q > 0 ? z.current = "prev" : z.current = "next", he({
|
|
1068
1068
|
...r,
|
|
1069
1069
|
eventName: "onDrag",
|
|
1070
1070
|
slideActionType: z.current
|
|
1071
|
-
}),
|
|
1072
|
-
if (
|
|
1073
|
-
|
|
1071
|
+
}), u) {
|
|
1072
|
+
if (o > 0) {
|
|
1073
|
+
L.start({
|
|
1074
1074
|
from: {
|
|
1075
|
-
val:
|
|
1075
|
+
val: te()
|
|
1076
1076
|
},
|
|
1077
1077
|
to: {
|
|
1078
1078
|
val: 0
|
|
@@ -1085,12 +1085,12 @@ function Nr({
|
|
|
1085
1085
|
}), r.cancel();
|
|
1086
1086
|
return;
|
|
1087
1087
|
}
|
|
1088
|
-
|
|
1088
|
+
L.start({
|
|
1089
1089
|
from: {
|
|
1090
|
-
val:
|
|
1090
|
+
val: te()
|
|
1091
1091
|
},
|
|
1092
1092
|
to: {
|
|
1093
|
-
val: -
|
|
1093
|
+
val: -o
|
|
1094
1094
|
},
|
|
1095
1095
|
config: {
|
|
1096
1096
|
velocity: r.velocity,
|
|
@@ -1100,20 +1100,20 @@ function Nr({
|
|
|
1100
1100
|
});
|
|
1101
1101
|
return;
|
|
1102
1102
|
}
|
|
1103
|
-
|
|
1104
|
-
val:
|
|
1103
|
+
L.start({
|
|
1104
|
+
val: o,
|
|
1105
1105
|
config: {
|
|
1106
1106
|
velocity: r.velocity,
|
|
1107
1107
|
friction: 50,
|
|
1108
1108
|
tension: 1e3
|
|
1109
1109
|
}
|
|
1110
|
-
}), I &&
|
|
1110
|
+
}), I && Te ? (xe({ type: "drag" }), r.cancel()) : I && le && (ye({ type: "drag" }), r.cancel()), Xe - Math.abs(o) < -(W() * 2) && r.cancel();
|
|
1111
1111
|
return;
|
|
1112
1112
|
}
|
|
1113
|
-
if (r.last &&
|
|
1114
|
-
|
|
1113
|
+
if (r.last && u && o > 0) {
|
|
1114
|
+
L.start({
|
|
1115
1115
|
from: {
|
|
1116
|
-
val:
|
|
1116
|
+
val: te()
|
|
1117
1117
|
},
|
|
1118
1118
|
to: {
|
|
1119
1119
|
val: 0
|
|
@@ -1126,166 +1126,166 @@ function Nr({
|
|
|
1126
1126
|
});
|
|
1127
1127
|
return;
|
|
1128
1128
|
}
|
|
1129
|
-
r.last && !r.canceled &&
|
|
1130
|
-
val:
|
|
1129
|
+
r.last && !r.canceled && u && (z.current === "prev" && ye({ type: "drag" }), z.current === "next" && xe({ type: "drag" })), r.last && !r.canceled && !u && (Te ? !l && T.current ? L.start({
|
|
1130
|
+
val: -$(),
|
|
1131
1131
|
config: {
|
|
1132
|
-
...
|
|
1132
|
+
...je.default,
|
|
1133
1133
|
velocity: r.velocity
|
|
1134
1134
|
}
|
|
1135
|
-
}) :
|
|
1135
|
+
}) : xe({ type: "drag" }) : le ? !l && C.current ? L.start({
|
|
1136
1136
|
val: 0,
|
|
1137
1137
|
config: {
|
|
1138
|
-
...
|
|
1138
|
+
...je.default,
|
|
1139
1139
|
velocity: r.velocity
|
|
1140
1140
|
}
|
|
1141
|
-
}) :
|
|
1142
|
-
val:
|
|
1141
|
+
}) : ye({ type: "drag" }) : L.start({
|
|
1142
|
+
val: k.current,
|
|
1143
1143
|
config: {
|
|
1144
|
-
...
|
|
1144
|
+
...je.default,
|
|
1145
1145
|
velocity: r.velocity
|
|
1146
1146
|
}
|
|
1147
|
-
})), r.last && r.canceled &&
|
|
1148
|
-
val:
|
|
1147
|
+
})), r.last && r.canceled && L.start({
|
|
1148
|
+
val: k.current,
|
|
1149
1149
|
config: {
|
|
1150
|
-
...
|
|
1150
|
+
...je.default,
|
|
1151
1151
|
velocity: r.velocity
|
|
1152
1152
|
}
|
|
1153
1153
|
});
|
|
1154
1154
|
},
|
|
1155
1155
|
{
|
|
1156
|
-
enabled:
|
|
1157
|
-
axis:
|
|
1158
|
-
from: () =>
|
|
1159
|
-
-
|
|
1160
|
-
-
|
|
1161
|
-
] :
|
|
1156
|
+
enabled: m && !M && !u || !!u && !!B,
|
|
1157
|
+
axis: f,
|
|
1158
|
+
from: () => u && p.current ? [
|
|
1159
|
+
-p.current.scrollLeft,
|
|
1160
|
+
-p.current.scrollTop
|
|
1161
|
+
] : f === "x" ? [ue.val.get(), ue.val.get()] : [ue.val.get(), ue.val.get()]
|
|
1162
1162
|
}
|
|
1163
1163
|
);
|
|
1164
1164
|
function Je() {
|
|
1165
|
-
return
|
|
1165
|
+
return u ? f === "x" ? {
|
|
1166
1166
|
overflowX: "auto"
|
|
1167
1167
|
} : {
|
|
1168
1168
|
overflowY: "auto"
|
|
1169
1169
|
} : {};
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1172
|
-
|
|
1171
|
+
function _e() {
|
|
1172
|
+
p.current && (k.current = p.current[f === "x" ? "scrollLeft" : "scrollTop"], p.current[f === "x" ? "scrollLeft" : "scrollTop"] === 0 && (C.current = !0, T.current = !1), p.current[f === "x" ? "scrollLeft" : "scrollTop"] > 0 && p.current[f === "x" ? "scrollLeft" : "scrollTop"] < $() && (C.current = !1, T.current = !1), p.current[f === "x" ? "scrollLeft" : "scrollTop"] === $() && (C.current = !1, T.current = !0));
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1175
|
-
return
|
|
1174
|
+
function Me() {
|
|
1175
|
+
return u ? {
|
|
1176
1176
|
onWheel() {
|
|
1177
|
-
|
|
1177
|
+
ue.val.stop(), _e();
|
|
1178
1178
|
}
|
|
1179
1179
|
} : {};
|
|
1180
1180
|
}
|
|
1181
|
-
function be(r,
|
|
1182
|
-
let
|
|
1183
|
-
if (typeof r == "string" ?
|
|
1184
|
-
if (
|
|
1185
|
-
throw new Error(
|
|
1186
|
-
console.error(`The item doesn't exist; check that the id provided - ${r} - is correct.`),
|
|
1187
|
-
}
|
|
1188
|
-
return
|
|
1181
|
+
function be(r, a) {
|
|
1182
|
+
let o = 0;
|
|
1183
|
+
if (typeof r == "string" ? o = i.findIndex((_) => _.id === r) : o = r, o < 0 || o >= i.length) {
|
|
1184
|
+
if (a)
|
|
1185
|
+
throw new Error(a);
|
|
1186
|
+
console.error(`The item doesn't exist; check that the id provided - ${r} - is correct.`), o = -1;
|
|
1187
|
+
}
|
|
1188
|
+
return o;
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1191
|
-
if (!
|
|
1190
|
+
function We({ id: r, immediate: a, shouldReset: o, type: _ }) {
|
|
1191
|
+
if (!m || q.current)
|
|
1192
1192
|
return;
|
|
1193
1193
|
C.current = !1, T.current = !1;
|
|
1194
1194
|
const Q = be(
|
|
1195
1195
|
r,
|
|
1196
1196
|
"The item you want to slide to doesn't exist; check the provided id."
|
|
1197
1197
|
);
|
|
1198
|
-
if (Q ===
|
|
1198
|
+
if (Q === U.current && !o)
|
|
1199
1199
|
return;
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1202
|
-
type:
|
|
1203
|
-
index:
|
|
1204
|
-
immediate:
|
|
1205
|
-
}) :
|
|
1206
|
-
type:
|
|
1207
|
-
index:
|
|
1208
|
-
immediate:
|
|
1200
|
+
const le = be(i[U.current].id), Te = be(i[Q].id);
|
|
1201
|
+
Te > le ? xe({
|
|
1202
|
+
type: _ || o ? "initial" : "click",
|
|
1203
|
+
index: Te,
|
|
1204
|
+
immediate: a
|
|
1205
|
+
}) : ye({
|
|
1206
|
+
type: _ || o ? "initial" : "click",
|
|
1207
|
+
index: Te,
|
|
1208
|
+
immediate: a
|
|
1209
1209
|
});
|
|
1210
1210
|
}
|
|
1211
|
-
function We(r) {
|
|
1212
|
-
const o = be(r, "The item doesn't exist; check the provided id."), a = Y.current;
|
|
1213
|
-
return s && a === i.length - 1 ? o === 0 : o === a + 1;
|
|
1214
|
-
}
|
|
1215
1211
|
function Se(r) {
|
|
1216
|
-
const
|
|
1217
|
-
return
|
|
1212
|
+
const a = be(r, "The item doesn't exist; check the provided id."), o = U.current;
|
|
1213
|
+
return l && o === i.length - 1 ? a === 0 : a === o + 1;
|
|
1218
1214
|
}
|
|
1219
1215
|
function Ve(r) {
|
|
1220
|
-
|
|
1216
|
+
const a = be(r, "The item doesn't exist; check the provided id."), o = U.current;
|
|
1217
|
+
return l && o === 0 ? a === i.length - 1 : a === o - 1;
|
|
1218
|
+
}
|
|
1219
|
+
function Ye(r) {
|
|
1220
|
+
return be(r, "The item you want to check doesn't exist; check the provided id.") === U.current;
|
|
1221
1221
|
}
|
|
1222
1222
|
function Qe() {
|
|
1223
|
-
return M ? "unset" :
|
|
1223
|
+
return M ? "unset" : f === "x" ? "pan-y" : "pan-x";
|
|
1224
1224
|
}
|
|
1225
|
-
const
|
|
1226
|
-
useListenToCustomEvent:
|
|
1227
|
-
enterFullscreen:
|
|
1228
|
-
exitFullscreen:
|
|
1229
|
-
getIsFullscreen:
|
|
1225
|
+
const Z = u ? {
|
|
1226
|
+
useListenToCustomEvent: pe,
|
|
1227
|
+
enterFullscreen: Ie,
|
|
1228
|
+
exitFullscreen: qe,
|
|
1229
|
+
getIsFullscreen: De,
|
|
1230
1230
|
slideToPrevItem: (r = !0) => {
|
|
1231
|
-
|
|
1231
|
+
ye({
|
|
1232
1232
|
type: "click",
|
|
1233
1233
|
immediate: !r
|
|
1234
1234
|
});
|
|
1235
1235
|
},
|
|
1236
1236
|
slideToNextItem: (r = !0) => {
|
|
1237
|
-
|
|
1237
|
+
xe({
|
|
1238
1238
|
type: "click",
|
|
1239
1239
|
immediate: !r
|
|
1240
1240
|
});
|
|
1241
1241
|
}
|
|
1242
1242
|
} : {
|
|
1243
|
-
useListenToCustomEvent:
|
|
1244
|
-
enterFullscreen:
|
|
1245
|
-
exitFullscreen:
|
|
1246
|
-
getIsFullscreen:
|
|
1243
|
+
useListenToCustomEvent: pe,
|
|
1244
|
+
enterFullscreen: Ie,
|
|
1245
|
+
exitFullscreen: qe,
|
|
1246
|
+
getIsFullscreen: De,
|
|
1247
1247
|
slideToPrevItem: (r = !0) => {
|
|
1248
|
-
|
|
1248
|
+
ye({
|
|
1249
1249
|
type: "click",
|
|
1250
1250
|
immediate: !r
|
|
1251
1251
|
});
|
|
1252
1252
|
},
|
|
1253
1253
|
slideToNextItem: (r = !0) => {
|
|
1254
|
-
|
|
1254
|
+
xe({
|
|
1255
1255
|
type: "click",
|
|
1256
1256
|
immediate: !r
|
|
1257
1257
|
});
|
|
1258
1258
|
},
|
|
1259
|
-
slideToItem: (r,
|
|
1260
|
-
|
|
1259
|
+
slideToItem: (r, a = !0) => {
|
|
1260
|
+
We({ id: r, immediate: !a });
|
|
1261
1261
|
},
|
|
1262
|
-
getIsNextItem:
|
|
1263
|
-
getIsPrevItem:
|
|
1264
|
-
getIsActiveItem:
|
|
1262
|
+
getIsNextItem: Se,
|
|
1263
|
+
getIsPrevItem: Ve,
|
|
1264
|
+
getIsActiveItem: Ye
|
|
1265
1265
|
};
|
|
1266
1266
|
Er(() => {
|
|
1267
|
-
P.current &&
|
|
1268
|
-
}, [
|
|
1269
|
-
|
|
1270
|
-
id:
|
|
1271
|
-
immediate:
|
|
1267
|
+
P.current && m && (fe.current = !0, Ne());
|
|
1268
|
+
}, [m]), ne(() => {
|
|
1269
|
+
U.current !== F && We({
|
|
1270
|
+
id: F,
|
|
1271
|
+
immediate: !j
|
|
1272
1272
|
});
|
|
1273
|
-
}, [
|
|
1274
|
-
if (
|
|
1275
|
-
if (
|
|
1273
|
+
}, [F]), ne(() => {
|
|
1274
|
+
if (m) {
|
|
1275
|
+
if (F > i.length - 1)
|
|
1276
1276
|
throw new Error(
|
|
1277
|
-
`initialActiveItem (${
|
|
1277
|
+
`initialActiveItem (${F}) is greater than the total quantity available items (${i.length}).`
|
|
1278
1278
|
);
|
|
1279
1279
|
X > i.length && console.warn(
|
|
1280
1280
|
`itemsPerSlide (${X}) is greater than the total quantity available items (${i.length}). Fallback to ${i.length})`
|
|
1281
1281
|
);
|
|
1282
1282
|
}
|
|
1283
|
-
}, [
|
|
1283
|
+
}, [F, i.length, X, m]), ne(() => {
|
|
1284
1284
|
me.current = window.innerWidth;
|
|
1285
1285
|
}, []), ne(() => {
|
|
1286
|
-
|
|
1287
|
-
}, [b, X,
|
|
1288
|
-
if (!
|
|
1286
|
+
m && (fe.current = !0, Ne());
|
|
1287
|
+
}, [b, X, s, w, m, l]), ne(() => {
|
|
1288
|
+
if (!m)
|
|
1289
1289
|
return;
|
|
1290
1290
|
function r() {
|
|
1291
1291
|
document.hidden ? q.current = !0 : q.current = !1;
|
|
@@ -1293,39 +1293,35 @@ function Nr({
|
|
|
1293
1293
|
return document.addEventListener("visibilitychange", r), () => {
|
|
1294
1294
|
document.removeEventListener("visibilitychange", r);
|
|
1295
1295
|
};
|
|
1296
|
-
}, [
|
|
1297
|
-
if (
|
|
1296
|
+
}, [m]), ne(() => {
|
|
1297
|
+
if (p.current) {
|
|
1298
1298
|
let r;
|
|
1299
|
-
const
|
|
1300
|
-
if (
|
|
1301
|
-
K.current = !1;
|
|
1302
|
-
return;
|
|
1303
|
-
}
|
|
1304
|
-
if (!q.current && !se.current) {
|
|
1299
|
+
const a = new _r(() => {
|
|
1300
|
+
if (!q.current && !fe.current) {
|
|
1305
1301
|
me.current = window.innerWidth;
|
|
1306
|
-
const
|
|
1302
|
+
const o = Pe();
|
|
1307
1303
|
window.clearTimeout(r), r = setTimeout(() => {
|
|
1308
|
-
|
|
1304
|
+
K.current = $(), typeof o == "function" && o();
|
|
1309
1305
|
}, 100);
|
|
1310
1306
|
}
|
|
1311
1307
|
});
|
|
1312
|
-
return
|
|
1313
|
-
|
|
1308
|
+
return a.observe(p.current), () => {
|
|
1309
|
+
a.disconnect();
|
|
1314
1310
|
};
|
|
1315
1311
|
}
|
|
1316
|
-
}, [Pe,
|
|
1317
|
-
|
|
1318
|
-
slideToNextItem:
|
|
1319
|
-
slideToPrevItem:
|
|
1320
|
-
slideToItem:
|
|
1312
|
+
}, [Pe, $]), ne(() => {
|
|
1313
|
+
Re && Re({
|
|
1314
|
+
slideToNextItem: Z.slideToNextItem,
|
|
1315
|
+
slideToPrevItem: Z.slideToPrevItem,
|
|
1316
|
+
slideToItem: Z == null ? void 0 : Z.slideToItem
|
|
1321
1317
|
});
|
|
1322
|
-
}, [
|
|
1323
|
-
const
|
|
1318
|
+
}, [Re, Z.slideToItem, Z.slideToNextItem, Z.slideToPrevItem]);
|
|
1319
|
+
const Ue = /* @__PURE__ */ J.jsx(rr.Provider, { value: Z, children: we }), ze = /* @__PURE__ */ J.jsx(rr.Provider, { value: Z, children: /* @__PURE__ */ J.jsx(
|
|
1324
1320
|
"div",
|
|
1325
1321
|
{
|
|
1326
1322
|
className: "use-spring-carousel-main-wrapper",
|
|
1327
|
-
ref:
|
|
1328
|
-
...
|
|
1323
|
+
ref: p,
|
|
1324
|
+
...Me(),
|
|
1329
1325
|
style: {
|
|
1330
1326
|
display: "flex",
|
|
1331
1327
|
position: "relative",
|
|
@@ -1338,25 +1334,25 @@ function Nr({
|
|
|
1338
1334
|
{
|
|
1339
1335
|
className: "use-spring-carousel-track-wrapper",
|
|
1340
1336
|
ref: P,
|
|
1341
|
-
...
|
|
1337
|
+
...Ze(),
|
|
1342
1338
|
style: {
|
|
1343
1339
|
position: "relative",
|
|
1344
1340
|
display: "flex",
|
|
1345
|
-
flexDirection:
|
|
1341
|
+
flexDirection: f === "x" ? "row" : "column",
|
|
1346
1342
|
touchAction: Qe(),
|
|
1347
|
-
...
|
|
1343
|
+
...Le()
|
|
1348
1344
|
},
|
|
1349
1345
|
children: [
|
|
1350
|
-
(
|
|
1346
|
+
(u || !l) && s ? /* @__PURE__ */ J.jsx(
|
|
1351
1347
|
"div",
|
|
1352
1348
|
{
|
|
1353
1349
|
style: {
|
|
1354
1350
|
flexShrink: 0,
|
|
1355
|
-
width:
|
|
1351
|
+
width: s
|
|
1356
1352
|
}
|
|
1357
1353
|
}
|
|
1358
1354
|
) : null,
|
|
1359
|
-
|
|
1355
|
+
ae.map((r, a) => /* @__PURE__ */ J.jsx(
|
|
1360
1356
|
"div",
|
|
1361
1357
|
{
|
|
1362
1358
|
className: "use-spring-carousel-item",
|
|
@@ -1366,26 +1362,26 @@ function Nr({
|
|
|
1366
1362
|
position: "relative",
|
|
1367
1363
|
flex: "1",
|
|
1368
1364
|
...Ke(
|
|
1369
|
-
|
|
1370
|
-
(
|
|
1365
|
+
a === ae.findIndex(
|
|
1366
|
+
(o) => o.id === ae[ae.length - 1].id
|
|
1371
1367
|
)
|
|
1372
1368
|
)
|
|
1373
1369
|
},
|
|
1374
1370
|
children: typeof r.renderItem == "function" ? r.renderItem({
|
|
1375
|
-
getIsActiveItem:
|
|
1376
|
-
getIsNextItem:
|
|
1377
|
-
getIsPrevItem:
|
|
1378
|
-
useListenToCustomEvent:
|
|
1371
|
+
getIsActiveItem: Ye,
|
|
1372
|
+
getIsNextItem: Se,
|
|
1373
|
+
getIsPrevItem: Ve,
|
|
1374
|
+
useListenToCustomEvent: pe
|
|
1379
1375
|
}) : r.renderItem
|
|
1380
1376
|
},
|
|
1381
|
-
`${r.id}-${
|
|
1377
|
+
`${r.id}-${a}`
|
|
1382
1378
|
)),
|
|
1383
|
-
(
|
|
1379
|
+
(u || !l) && s ? /* @__PURE__ */ J.jsx(
|
|
1384
1380
|
"div",
|
|
1385
1381
|
{
|
|
1386
1382
|
style: {
|
|
1387
1383
|
flexShrink: 0,
|
|
1388
|
-
width:
|
|
1384
|
+
width: s
|
|
1389
1385
|
}
|
|
1390
1386
|
}
|
|
1391
1387
|
) : null
|
|
@@ -1394,11 +1390,11 @@ function Nr({
|
|
|
1394
1390
|
)
|
|
1395
1391
|
}
|
|
1396
1392
|
) });
|
|
1397
|
-
return { ...
|
|
1393
|
+
return { ...Z, carouselFragment: ze, thumbsFragment: Ue };
|
|
1398
1394
|
}
|
|
1399
|
-
const
|
|
1395
|
+
const rr = cr(void 0);
|
|
1400
1396
|
function Wr() {
|
|
1401
|
-
const i =
|
|
1397
|
+
const i = lr(rr);
|
|
1402
1398
|
if (!i)
|
|
1403
1399
|
throw new Error("useSpringCarouselContext must be used within the carousel.");
|
|
1404
1400
|
return i;
|
|
@@ -1423,57 +1419,57 @@ const Fe = {
|
|
|
1423
1419
|
};
|
|
1424
1420
|
function Sr({
|
|
1425
1421
|
init: i = !0,
|
|
1426
|
-
disableGestures:
|
|
1427
|
-
items:
|
|
1428
|
-
springConfig:
|
|
1429
|
-
exitBeforeEnter:
|
|
1430
|
-
trail:
|
|
1431
|
-
withLoop:
|
|
1432
|
-
activeItem:
|
|
1433
|
-
toPrevItemSpringProps:
|
|
1434
|
-
toNextItemSpringProps:
|
|
1422
|
+
disableGestures: m = !1,
|
|
1423
|
+
items: h,
|
|
1424
|
+
springConfig: N = je.default,
|
|
1425
|
+
exitBeforeEnter: Y = !1,
|
|
1426
|
+
trail: g,
|
|
1427
|
+
withLoop: w = !1,
|
|
1428
|
+
activeItem: l,
|
|
1429
|
+
toPrevItemSpringProps: s = Fe,
|
|
1430
|
+
toNextItemSpringProps: f = Fe,
|
|
1435
1431
|
draggingSlideTreshold: M = 50,
|
|
1436
1432
|
thumbsSlideAxis: A = "x"
|
|
1437
1433
|
}) {
|
|
1438
|
-
const I =
|
|
1434
|
+
const I = D("next"), u = D("initial"), B = D(null), [b, ie] = Tr(l ?? 0), { emitEvent: F, useListenToCustomEvent: j } = dr(), { handleScroll: Re, thumbsFragment: X } = vr({
|
|
1439
1435
|
thumbsSlideAxis: A,
|
|
1440
|
-
items:
|
|
1436
|
+
items: h,
|
|
1441
1437
|
renderThumbFnProps: {
|
|
1442
1438
|
getIsNextItem: T,
|
|
1443
|
-
getIsPrevItem:
|
|
1444
|
-
useListenToCustomEvent:
|
|
1439
|
+
getIsPrevItem: p,
|
|
1440
|
+
useListenToCustomEvent: j,
|
|
1445
1441
|
activeItem: {
|
|
1446
1442
|
index: b,
|
|
1447
|
-
id:
|
|
1443
|
+
id: h[b].id
|
|
1448
1444
|
}
|
|
1449
1445
|
}
|
|
1450
1446
|
});
|
|
1451
|
-
function
|
|
1447
|
+
function fe() {
|
|
1452
1448
|
return I.current === "prev" ? {
|
|
1453
1449
|
initial: {
|
|
1454
|
-
...
|
|
1450
|
+
...s.initial
|
|
1455
1451
|
},
|
|
1456
1452
|
from: {
|
|
1457
|
-
...
|
|
1453
|
+
...s.from
|
|
1458
1454
|
},
|
|
1459
1455
|
enter: {
|
|
1460
|
-
...
|
|
1456
|
+
...s.enter
|
|
1461
1457
|
},
|
|
1462
1458
|
leave: {
|
|
1463
|
-
...
|
|
1459
|
+
...s.leave
|
|
1464
1460
|
}
|
|
1465
1461
|
} : I.current === "next" ? {
|
|
1466
1462
|
initial: {
|
|
1467
|
-
...
|
|
1463
|
+
...f.initial
|
|
1468
1464
|
},
|
|
1469
1465
|
from: {
|
|
1470
|
-
...
|
|
1466
|
+
...f.from
|
|
1471
1467
|
},
|
|
1472
1468
|
enter: {
|
|
1473
|
-
...
|
|
1469
|
+
...f.enter
|
|
1474
1470
|
},
|
|
1475
1471
|
leave: {
|
|
1476
|
-
...
|
|
1472
|
+
...f.leave
|
|
1477
1473
|
}
|
|
1478
1474
|
} : {
|
|
1479
1475
|
initial: {
|
|
@@ -1491,141 +1487,141 @@ function Sr({
|
|
|
1491
1487
|
};
|
|
1492
1488
|
}
|
|
1493
1489
|
ne(() => {
|
|
1494
|
-
typeof
|
|
1495
|
-
}, [
|
|
1496
|
-
function ee({ to:
|
|
1497
|
-
I.current = E,
|
|
1490
|
+
typeof l == "number" && l !== b && ie(l);
|
|
1491
|
+
}, [l]);
|
|
1492
|
+
function ee({ to: y, slideType: E, slideMode: O }) {
|
|
1493
|
+
I.current = E, u.current = O, F({
|
|
1498
1494
|
eventName: "onSlideStartChange",
|
|
1499
1495
|
slideActionType: I.current,
|
|
1500
|
-
slideMode:
|
|
1496
|
+
slideMode: u.current,
|
|
1501
1497
|
nextItem: {
|
|
1502
|
-
index:
|
|
1503
|
-
id:
|
|
1504
|
-
startReached:
|
|
1505
|
-
endReached:
|
|
1498
|
+
index: y,
|
|
1499
|
+
id: h[y].id,
|
|
1500
|
+
startReached: y === 0,
|
|
1501
|
+
endReached: y === h.length - 1
|
|
1506
1502
|
}
|
|
1507
|
-
}), ie(
|
|
1503
|
+
}), ie(y), Re(b);
|
|
1508
1504
|
}
|
|
1509
|
-
function z(
|
|
1505
|
+
function z(y) {
|
|
1510
1506
|
if (!i)
|
|
1511
1507
|
return;
|
|
1512
1508
|
const E = b === 0;
|
|
1513
|
-
!
|
|
1514
|
-
to:
|
|
1509
|
+
!w && E || ee(w && E ? {
|
|
1510
|
+
to: h.length - 1,
|
|
1515
1511
|
slideType: "prev",
|
|
1516
|
-
slideMode:
|
|
1512
|
+
slideMode: y
|
|
1517
1513
|
} : {
|
|
1518
1514
|
to: b - 1,
|
|
1519
1515
|
slideType: "prev",
|
|
1520
|
-
slideMode:
|
|
1516
|
+
slideMode: y
|
|
1521
1517
|
});
|
|
1522
1518
|
}
|
|
1523
|
-
function
|
|
1519
|
+
function de(y) {
|
|
1524
1520
|
if (!i)
|
|
1525
1521
|
return;
|
|
1526
|
-
const E = b ===
|
|
1527
|
-
!
|
|
1522
|
+
const E = b === h.length - 1;
|
|
1523
|
+
!w && E || ee(w && E ? {
|
|
1528
1524
|
to: 0,
|
|
1529
1525
|
slideType: "next",
|
|
1530
|
-
slideMode:
|
|
1526
|
+
slideMode: y
|
|
1531
1527
|
} : {
|
|
1532
1528
|
to: b + 1,
|
|
1533
1529
|
slideType: "next",
|
|
1534
|
-
slideMode:
|
|
1530
|
+
slideMode: y
|
|
1535
1531
|
});
|
|
1536
1532
|
}
|
|
1537
|
-
const
|
|
1538
|
-
config:
|
|
1533
|
+
const ve = Rr(b, {
|
|
1534
|
+
config: N,
|
|
1539
1535
|
key: null,
|
|
1540
|
-
trail:
|
|
1541
|
-
exitBeforeEnter:
|
|
1542
|
-
...
|
|
1543
|
-
onRest(
|
|
1544
|
-
|
|
1536
|
+
trail: g,
|
|
1537
|
+
exitBeforeEnter: Y,
|
|
1538
|
+
...fe(),
|
|
1539
|
+
onRest(y, E, O) {
|
|
1540
|
+
y.finished && O === b && F({
|
|
1545
1541
|
eventName: "onSlideChange",
|
|
1546
1542
|
slideActionType: I.current,
|
|
1547
|
-
slideMode:
|
|
1543
|
+
slideMode: u.current,
|
|
1548
1544
|
currentItem: {
|
|
1549
1545
|
index: b,
|
|
1550
|
-
id:
|
|
1546
|
+
id: h[b].id,
|
|
1551
1547
|
startReached: b === 0,
|
|
1552
|
-
endReached: b ===
|
|
1548
|
+
endReached: b === h.length - 1
|
|
1553
1549
|
}
|
|
1554
1550
|
});
|
|
1555
1551
|
}
|
|
1556
|
-
}),
|
|
1557
|
-
({ last:
|
|
1558
|
-
if (
|
|
1559
|
-
const
|
|
1560
|
-
if (
|
|
1561
|
-
if (!
|
|
1552
|
+
}), U = fr(
|
|
1553
|
+
({ last: y, movement: [E] }) => {
|
|
1554
|
+
if (y) {
|
|
1555
|
+
const O = E > M, q = E < -M, oe = b === 0, ae = b === h.length - 1;
|
|
1556
|
+
if (q) {
|
|
1557
|
+
if (!w && ae)
|
|
1562
1558
|
return;
|
|
1563
|
-
|
|
1559
|
+
F({
|
|
1564
1560
|
eventName: "onLeftSwipe"
|
|
1565
|
-
}),
|
|
1566
|
-
} else if (
|
|
1567
|
-
if (!
|
|
1561
|
+
}), de("swipe");
|
|
1562
|
+
} else if (O) {
|
|
1563
|
+
if (!w && oe)
|
|
1568
1564
|
return;
|
|
1569
|
-
|
|
1565
|
+
F({
|
|
1570
1566
|
eventName: "onRightSwipe"
|
|
1571
1567
|
}), z("swipe");
|
|
1572
1568
|
}
|
|
1573
1569
|
}
|
|
1574
1570
|
},
|
|
1575
1571
|
{
|
|
1576
|
-
enabled: !
|
|
1572
|
+
enabled: !m
|
|
1577
1573
|
}
|
|
1578
1574
|
);
|
|
1579
|
-
function C(
|
|
1580
|
-
let
|
|
1581
|
-
if (typeof
|
|
1575
|
+
function C(y, E) {
|
|
1576
|
+
let O = 0;
|
|
1577
|
+
if (typeof y == "string" ? O = h.findIndex((q) => q.id === y) : O = y, O < 0 || O >= h.length) {
|
|
1582
1578
|
if (E)
|
|
1583
1579
|
throw new Error(E);
|
|
1584
|
-
console.error(`The item doesn't exist; check that the id provided - ${
|
|
1580
|
+
console.error(`The item doesn't exist; check that the id provided - ${y} - is correct.`), O = -1;
|
|
1585
1581
|
}
|
|
1586
|
-
return
|
|
1582
|
+
return O;
|
|
1587
1583
|
}
|
|
1588
|
-
function T(
|
|
1589
|
-
const E = C(
|
|
1590
|
-
return
|
|
1584
|
+
function T(y) {
|
|
1585
|
+
const E = C(y, "The item doesn't exist; check the provided id."), O = b;
|
|
1586
|
+
return w && O === h.length - 1 ? E === 0 : E === O + 1;
|
|
1591
1587
|
}
|
|
1592
|
-
function
|
|
1593
|
-
const E = C(
|
|
1594
|
-
return
|
|
1588
|
+
function p(y) {
|
|
1589
|
+
const E = C(y, "The item doesn't exist; check the provided id."), O = b;
|
|
1590
|
+
return w && O === 0 ? E === h.length - 1 : E === O - 1;
|
|
1595
1591
|
}
|
|
1596
|
-
const P =
|
|
1597
|
-
const
|
|
1592
|
+
const P = ve((y, E, O, q) => {
|
|
1593
|
+
const oe = h[E].renderItem;
|
|
1598
1594
|
return /* @__PURE__ */ J.jsx(
|
|
1599
1595
|
Ir.div,
|
|
1600
1596
|
{
|
|
1601
|
-
id: `use-transition-carousel-item-${
|
|
1597
|
+
id: `use-transition-carousel-item-${q}`,
|
|
1602
1598
|
className: "use-transition-carousel-item",
|
|
1603
1599
|
style: {
|
|
1604
|
-
...
|
|
1600
|
+
...y,
|
|
1605
1601
|
flex: "1 0 100%",
|
|
1606
1602
|
width: "100%",
|
|
1607
1603
|
height: "100%"
|
|
1608
1604
|
},
|
|
1609
|
-
children: typeof
|
|
1610
|
-
useListenToCustomEvent:
|
|
1605
|
+
children: typeof oe == "function" ? oe({
|
|
1606
|
+
useListenToCustomEvent: j,
|
|
1611
1607
|
getIsNextItem: T,
|
|
1612
|
-
getIsPrevItem:
|
|
1608
|
+
getIsPrevItem: p,
|
|
1613
1609
|
activeItem: {
|
|
1614
1610
|
index: b,
|
|
1615
|
-
id:
|
|
1611
|
+
id: h[b].id
|
|
1616
1612
|
}
|
|
1617
|
-
}) :
|
|
1613
|
+
}) : oe
|
|
1618
1614
|
}
|
|
1619
1615
|
);
|
|
1620
1616
|
}), K = {
|
|
1621
|
-
useListenToCustomEvent:
|
|
1617
|
+
useListenToCustomEvent: j,
|
|
1622
1618
|
slideToPrevItem: () => z("click"),
|
|
1623
|
-
slideToNextItem: () =>
|
|
1624
|
-
},
|
|
1619
|
+
slideToNextItem: () => de("click")
|
|
1620
|
+
}, me = /* @__PURE__ */ J.jsx(tr.Provider, { value: K, children: X }), k = /* @__PURE__ */ J.jsx(tr.Provider, { value: K, children: /* @__PURE__ */ J.jsx(
|
|
1625
1621
|
"div",
|
|
1626
1622
|
{
|
|
1627
1623
|
ref: B,
|
|
1628
|
-
...
|
|
1624
|
+
...U(),
|
|
1629
1625
|
style: {
|
|
1630
1626
|
display: "flex",
|
|
1631
1627
|
position: "relative",
|
|
@@ -1638,19 +1634,19 @@ function Sr({
|
|
|
1638
1634
|
) });
|
|
1639
1635
|
return {
|
|
1640
1636
|
...K,
|
|
1641
|
-
carouselFragment:
|
|
1642
|
-
thumbsFragment:
|
|
1637
|
+
carouselFragment: k,
|
|
1638
|
+
thumbsFragment: me
|
|
1643
1639
|
};
|
|
1644
1640
|
}
|
|
1645
|
-
const
|
|
1641
|
+
const tr = cr(void 0);
|
|
1646
1642
|
function Vr() {
|
|
1647
|
-
const i =
|
|
1643
|
+
const i = lr(tr);
|
|
1648
1644
|
if (!i)
|
|
1649
1645
|
throw new Error("useTransitionCarouselContext must be used within the carousel.");
|
|
1650
1646
|
return i;
|
|
1651
1647
|
}
|
|
1652
1648
|
export {
|
|
1653
|
-
|
|
1649
|
+
Mr as useSpringCarousel,
|
|
1654
1650
|
Wr as useSpringCarouselContext,
|
|
1655
1651
|
Sr as useTransitionCarousel,
|
|
1656
1652
|
Vr as useTransitionCarouselContext
|