react-spring-carousel 3.0.0-beta090.38 → 3.0.0-beta090.39
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.es.js
CHANGED
|
@@ -51,11 +51,11 @@ var Je = {};
|
|
|
51
51
|
var sr;
|
|
52
52
|
function kr() {
|
|
53
53
|
return sr || (sr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
54
|
-
var i = lr, m = Symbol.for("react.element"), g = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), Y = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), l = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), u = Symbol.for("react.offscreen"), U = Symbol.iterator,
|
|
54
|
+
var i = lr, m = Symbol.for("react.element"), g = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), Y = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), l = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), u = Symbol.for("react.offscreen"), U = Symbol.iterator, x = "@@iterator";
|
|
55
55
|
function ie(e) {
|
|
56
56
|
if (e === null || typeof e != "object")
|
|
57
57
|
return null;
|
|
58
|
-
var t = U && e[U] || e[
|
|
58
|
+
var t = U && e[U] || e[x];
|
|
59
59
|
return typeof t == "function" ? t : null;
|
|
60
60
|
}
|
|
61
61
|
var F = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -68,8 +68,8 @@ function kr() {
|
|
|
68
68
|
}
|
|
69
69
|
function G(e, t, n) {
|
|
70
70
|
{
|
|
71
|
-
var s = F.ReactDebugCurrentFrame,
|
|
72
|
-
|
|
71
|
+
var s = F.ReactDebugCurrentFrame, E = s.getStackAddendum();
|
|
72
|
+
E !== "" && (t += "%s", n = n.concat([E]));
|
|
73
73
|
var _ = n.map(function(p) {
|
|
74
74
|
return String(p);
|
|
75
75
|
});
|
|
@@ -89,8 +89,8 @@ function kr() {
|
|
|
89
89
|
var s = e.displayName;
|
|
90
90
|
if (s)
|
|
91
91
|
return s;
|
|
92
|
-
var
|
|
93
|
-
return
|
|
92
|
+
var E = t.displayName || t.name || "";
|
|
93
|
+
return E !== "" ? n + "(" + E + ")" : n;
|
|
94
94
|
}
|
|
95
95
|
function N(e) {
|
|
96
96
|
return e.displayName || "Context";
|
|
@@ -130,7 +130,7 @@ function kr() {
|
|
|
130
130
|
var s = e.displayName || null;
|
|
131
131
|
return s !== null ? s : y(e.type) || "Memo";
|
|
132
132
|
case C: {
|
|
133
|
-
var
|
|
133
|
+
var E = e, _ = E._payload, p = E._init;
|
|
134
134
|
try {
|
|
135
135
|
return y(p(_));
|
|
136
136
|
} catch {
|
|
@@ -140,7 +140,7 @@ function kr() {
|
|
|
140
140
|
}
|
|
141
141
|
return null;
|
|
142
142
|
}
|
|
143
|
-
var
|
|
143
|
+
var b = Object.assign, R = 0, D, me, pe, c, w, k, te;
|
|
144
144
|
function H() {
|
|
145
145
|
}
|
|
146
146
|
H.__reactDisabledLog = !0;
|
|
@@ -176,25 +176,25 @@ function kr() {
|
|
|
176
176
|
writable: !0
|
|
177
177
|
};
|
|
178
178
|
Object.defineProperties(console, {
|
|
179
|
-
log:
|
|
179
|
+
log: b({}, e, {
|
|
180
180
|
value: D
|
|
181
181
|
}),
|
|
182
|
-
info:
|
|
182
|
+
info: b({}, e, {
|
|
183
183
|
value: me
|
|
184
184
|
}),
|
|
185
|
-
warn:
|
|
185
|
+
warn: b({}, e, {
|
|
186
186
|
value: pe
|
|
187
187
|
}),
|
|
188
|
-
error:
|
|
188
|
+
error: b({}, e, {
|
|
189
189
|
value: c
|
|
190
190
|
}),
|
|
191
|
-
group:
|
|
191
|
+
group: b({}, e, {
|
|
192
192
|
value: w
|
|
193
193
|
}),
|
|
194
|
-
groupCollapsed:
|
|
194
|
+
groupCollapsed: b({}, e, {
|
|
195
195
|
value: k
|
|
196
196
|
}),
|
|
197
|
-
groupEnd:
|
|
197
|
+
groupEnd: b({}, e, {
|
|
198
198
|
value: te
|
|
199
199
|
})
|
|
200
200
|
});
|
|
@@ -208,8 +208,8 @@ function kr() {
|
|
|
208
208
|
if (B === void 0)
|
|
209
209
|
try {
|
|
210
210
|
throw Error();
|
|
211
|
-
} catch (
|
|
212
|
-
var s =
|
|
211
|
+
} catch (E) {
|
|
212
|
+
var s = E.stack.trim().match(/\n( *(at )?)/);
|
|
213
213
|
B = s && s[1] || "";
|
|
214
214
|
}
|
|
215
215
|
return `
|
|
@@ -231,7 +231,7 @@ function kr() {
|
|
|
231
231
|
}
|
|
232
232
|
var s;
|
|
233
233
|
ge = !0;
|
|
234
|
-
var
|
|
234
|
+
var E = Error.prepareStackTrace;
|
|
235
235
|
Error.prepareStackTrace = void 0;
|
|
236
236
|
var _;
|
|
237
237
|
_ = Z.current, Z.current = null, ze();
|
|
@@ -287,7 +287,7 @@ function kr() {
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
} finally {
|
|
290
|
-
ge = !1, Z.current = _, Ie(), Error.prepareStackTrace =
|
|
290
|
+
ge = !1, Z.current = _, Ie(), Error.prepareStackTrace = E;
|
|
291
291
|
}
|
|
292
292
|
var $e = e ? e.displayName || e.name : "", ur = $e ? oe($e) : "";
|
|
293
293
|
return typeof e == "function" && Pe.set(e, ur), ur;
|
|
@@ -319,9 +319,9 @@ function kr() {
|
|
|
319
319
|
case L:
|
|
320
320
|
return ke(e.type, t, n);
|
|
321
321
|
case C: {
|
|
322
|
-
var s = e,
|
|
322
|
+
var s = e, E = s._payload, _ = s._init;
|
|
323
323
|
try {
|
|
324
|
-
return ke(_(
|
|
324
|
+
return ke(_(E), t, n);
|
|
325
325
|
} catch {
|
|
326
326
|
}
|
|
327
327
|
}
|
|
@@ -336,7 +336,7 @@ function kr() {
|
|
|
336
336
|
} else
|
|
337
337
|
M.setExtraStackFrame(null);
|
|
338
338
|
}
|
|
339
|
-
function Re(e, t, n, s,
|
|
339
|
+
function Re(e, t, n, s, E) {
|
|
340
340
|
{
|
|
341
341
|
var _ = Function.call.bind(I);
|
|
342
342
|
for (var p in e)
|
|
@@ -351,7 +351,7 @@ function kr() {
|
|
|
351
351
|
} catch (V) {
|
|
352
352
|
h = V;
|
|
353
353
|
}
|
|
354
|
-
h && !(h instanceof Error) && (Fe(
|
|
354
|
+
h && !(h instanceof Error) && (Fe(E), 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).", s || "React class", n, p, typeof h), Fe(null)), h instanceof Error && !(h.message in ue) && (ue[h.message] = !0, Fe(E), j("Failed %s type: %s", n, h.message), Fe(null));
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
}
|
|
@@ -430,7 +430,7 @@ function kr() {
|
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
var Be = function(e, t, n, s,
|
|
433
|
+
var Be = function(e, t, n, s, E, _, p) {
|
|
434
434
|
var h = {
|
|
435
435
|
// This tag allows us to uniquely identify this as a React Element
|
|
436
436
|
$$typeof: m,
|
|
@@ -456,13 +456,13 @@ function kr() {
|
|
|
456
456
|
configurable: !1,
|
|
457
457
|
enumerable: !1,
|
|
458
458
|
writable: !1,
|
|
459
|
-
value:
|
|
459
|
+
value: E
|
|
460
460
|
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
461
461
|
};
|
|
462
|
-
function qe(e, t, n, s,
|
|
462
|
+
function qe(e, t, n, s, E) {
|
|
463
463
|
{
|
|
464
464
|
var _, p = {}, h = null, J = null;
|
|
465
|
-
n !== void 0 && (se(n), h = "" + n), rr(t) && (se(t.key), h = "" + t.key), je(t) && (J = t.ref, xe(t,
|
|
465
|
+
n !== void 0 && (se(n), h = "" + n), rr(t) && (se(t.key), h = "" + t.key), je(t) && (J = t.ref, xe(t, E));
|
|
466
466
|
for (_ in t)
|
|
467
467
|
I.call(t, _) && !Ze.hasOwnProperty(_) && (p[_] = t[_]);
|
|
468
468
|
if (e && e.defaultProps) {
|
|
@@ -474,7 +474,7 @@ function kr() {
|
|
|
474
474
|
var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
475
475
|
h && Ye(p, S), J && Ue(p, S);
|
|
476
476
|
}
|
|
477
|
-
return Be(e, h, J,
|
|
477
|
+
return Be(e, h, J, E, s, Ce.current, p);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
var Le = F.ReactCurrentOwner, Oe = F.ReactDebugCurrentFrame;
|
|
@@ -551,9 +551,9 @@ Check the top-level render call using <` + n + ">.");
|
|
|
551
551
|
else if (r(e))
|
|
552
552
|
e._store && (e._store.validated = !0);
|
|
553
553
|
else if (e) {
|
|
554
|
-
var
|
|
555
|
-
if (typeof
|
|
556
|
-
for (var _ =
|
|
554
|
+
var E = ie(e);
|
|
555
|
+
if (typeof E == "function" && E !== e.entries)
|
|
556
|
+
for (var _ = E.call(e), p; !(p = _.next()).done; )
|
|
557
557
|
r(p.value) && le(p.value, t);
|
|
558
558
|
}
|
|
559
559
|
}
|
|
@@ -577,8 +577,8 @@ Check the top-level render call using <` + n + ">.");
|
|
|
577
577
|
Re(n, e.props, "prop", s, e);
|
|
578
578
|
} else if (t.PropTypes !== void 0 && !Ae) {
|
|
579
579
|
Ae = !0;
|
|
580
|
-
var
|
|
581
|
-
j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
580
|
+
var E = y(t);
|
|
581
|
+
j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
|
|
582
582
|
}
|
|
583
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
|
}
|
|
@@ -595,18 +595,18 @@ Check the top-level render call using <` + n + ">.");
|
|
|
595
595
|
e.ref !== null && (be(e), j("Invalid attribute `ref` supplied to `React.Fragment`."), be(null));
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
function nr(e, t, n, s,
|
|
598
|
+
function nr(e, t, n, s, E, _) {
|
|
599
599
|
{
|
|
600
600
|
var p = Te(e);
|
|
601
601
|
if (!p) {
|
|
602
602
|
var h = "";
|
|
603
603
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (h += " 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 J = a(
|
|
604
|
+
var J = a(E);
|
|
605
605
|
J ? h += J : h += o();
|
|
606
606
|
var V;
|
|
607
607
|
e === null ? V = "null" : ye(e) ? V = "array" : e !== void 0 && e.$$typeof === m ? (V = "<" + (y(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : V = 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", V, h);
|
|
608
608
|
}
|
|
609
|
-
var S = qe(e, t, n,
|
|
609
|
+
var S = qe(e, t, n, E, _);
|
|
610
610
|
if (S == null)
|
|
611
611
|
return S;
|
|
612
612
|
if (p) {
|
|
@@ -721,7 +721,7 @@ function pr({
|
|
|
721
721
|
) : 0;
|
|
722
722
|
}
|
|
723
723
|
function d(C) {
|
|
724
|
-
var
|
|
724
|
+
var x;
|
|
725
725
|
function u() {
|
|
726
726
|
return v.current ? v.current.querySelector(
|
|
727
727
|
`#thumb-item-${$[C].id}`
|
|
@@ -732,7 +732,7 @@ function pr({
|
|
|
732
732
|
const ie = U.offsetLeft, F = ie > f() ? f() : ie;
|
|
733
733
|
l.start({
|
|
734
734
|
from: {
|
|
735
|
-
val: ((
|
|
735
|
+
val: ((x = v.current) == null ? void 0 : x[i === "x" ? "scrollLeft" : "scrollTop"]) ?? 0
|
|
736
736
|
},
|
|
737
737
|
to: {
|
|
738
738
|
val: F
|
|
@@ -798,7 +798,7 @@ function Nr({
|
|
|
798
798
|
slideWhenThresholdIsReached: C = !1,
|
|
799
799
|
freeScroll: u,
|
|
800
800
|
enableFreeScrollDrag: U,
|
|
801
|
-
initialStartingPosition:
|
|
801
|
+
initialStartingPosition: x,
|
|
802
802
|
prepareThumbsData: ie,
|
|
803
803
|
initialActiveItem: F = 0,
|
|
804
804
|
animateWhenActiveItemChange: j = !0,
|
|
@@ -806,7 +806,7 @@ function Nr({
|
|
|
806
806
|
__unstable_stretch_tems__: Ne = !0,
|
|
807
807
|
slideAmount: ee
|
|
808
808
|
}) {
|
|
809
|
-
const q = Y, re = O(!1), ae = O(L ?? 0), z = O("initial"), Te = O("initial"), he = O("initial"), N = O(F), y = O(F === 0),
|
|
809
|
+
const q = Y, re = O(!1), ae = O(L ?? 0), z = O("initial"), Te = O("initial"), he = O("initial"), N = O(F), y = O(F === 0), b = O(v === "fixed" && F === i.length - 1), R = O(null), D = O(null), me = O(0), pe = O(0), c = O(0), w = O(l), k = O(v), te = O(u), H = O(!1), Ie = De(() => l ? [
|
|
810
810
|
...i.map((r) => ({
|
|
811
811
|
...r,
|
|
812
812
|
id: `prev-repeated-item-${r.id}`
|
|
@@ -879,7 +879,7 @@ function Nr({
|
|
|
879
879
|
slideMode: Te.current,
|
|
880
880
|
nextItem: {
|
|
881
881
|
startReached: y.current,
|
|
882
|
-
endReached:
|
|
882
|
+
endReached: b.current,
|
|
883
883
|
index: u ? -1 : N.current,
|
|
884
884
|
id: u ? "" : i[N.current].id
|
|
885
885
|
}
|
|
@@ -902,7 +902,7 @@ function Nr({
|
|
|
902
902
|
slideMode: Te.current,
|
|
903
903
|
currentItem: {
|
|
904
904
|
startReached: y.current,
|
|
905
|
-
endReached:
|
|
905
|
+
endReached: b.current,
|
|
906
906
|
index: u ? -1 : N.current,
|
|
907
907
|
id: u ? "" : i[N.current].id
|
|
908
908
|
}
|
|
@@ -934,15 +934,15 @@ function Nr({
|
|
|
934
934
|
}, [d, T]), we = De(
|
|
935
935
|
(r) => {
|
|
936
936
|
const o = d === "x" ? "left" : "top", a = D.current;
|
|
937
|
-
a && (l ? (a.style.top = "0px", a.style.left = "0px", a.style[o] = `-${r - f}px`, y.current = !1,
|
|
937
|
+
a && (l ? (a.style.top = "0px", a.style.left = "0px", a.style[o] = `-${r - f}px`, y.current = !1, b.current = !1) : (a.style.left = "0px", a.style.top = "0px"));
|
|
938
938
|
},
|
|
939
939
|
[d, f, l]
|
|
940
940
|
), ye = De(
|
|
941
941
|
(r = !1) => {
|
|
942
942
|
if (D.current && r && (D.current.style.transform = "translate3d(0px, 0px,0px)", D.current.style.left = "0", D.current.style.top = "0"), v === "fixed" && we(
|
|
943
|
-
|
|
943
|
+
x === "center" ? Re() * i.length - I() * Math.round((q - 1) / 2) : x === "end" ? Re() * i.length - I() * Math.round(q - 1) : Re() * i.length
|
|
944
944
|
), v === "fluid") {
|
|
945
|
-
if (we(Re() * i.length),
|
|
945
|
+
if (we(Re() * i.length), b.current && M() !== Math.abs(c.current) && !l) {
|
|
946
946
|
const o = -M();
|
|
947
947
|
c.current = o, B.start({
|
|
948
948
|
immediate: !0,
|
|
@@ -965,7 +965,7 @@ function Nr({
|
|
|
965
965
|
const o = -(I() * N.current);
|
|
966
966
|
if (Math.abs(o) > M() && !l) {
|
|
967
967
|
const a = -M();
|
|
968
|
-
|
|
968
|
+
b.current = !0, c.current = a, B.start({
|
|
969
969
|
immediate: !0,
|
|
970
970
|
val: c.current
|
|
971
971
|
});
|
|
@@ -984,7 +984,7 @@ function Nr({
|
|
|
984
984
|
Re,
|
|
985
985
|
I,
|
|
986
986
|
M,
|
|
987
|
-
|
|
987
|
+
x,
|
|
988
988
|
i.length,
|
|
989
989
|
q,
|
|
990
990
|
we,
|
|
@@ -1010,14 +1010,14 @@ function Nr({
|
|
|
1010
1010
|
function ce({ type: r, index: o, immediate: a }) {
|
|
1011
1011
|
if (!m || H.current || y.current && !l)
|
|
1012
1012
|
return;
|
|
1013
|
-
|
|
1013
|
+
b.current && (he.current = "backward"), z.current = "prev", b.current = !1;
|
|
1014
1014
|
const P = typeof o == "number" ? o : N.current - 1;
|
|
1015
1015
|
if (u && je(), !l) {
|
|
1016
1016
|
const X = u ? _e("prev", o) - I() / 3 < 0 : _e("prev", o) + I() / 3 > 0;
|
|
1017
1017
|
if (y.current)
|
|
1018
1018
|
return;
|
|
1019
1019
|
if (X) {
|
|
1020
|
-
y.current = !0,
|
|
1020
|
+
y.current = !0, b.current = !1, ue({
|
|
1021
1021
|
slideMode: r,
|
|
1022
1022
|
from: Q(),
|
|
1023
1023
|
to: 0,
|
|
@@ -1028,7 +1028,7 @@ function Nr({
|
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
if (l && (y.current || P < 0)) {
|
|
1031
|
-
y.current = !1,
|
|
1031
|
+
y.current = !1, b.current = !0, ue({
|
|
1032
1032
|
slideMode: r,
|
|
1033
1033
|
from: Q() - I() * i.length,
|
|
1034
1034
|
to: -(I() * i.length) + I(),
|
|
@@ -1037,7 +1037,7 @@ function Nr({
|
|
|
1037
1037
|
});
|
|
1038
1038
|
return;
|
|
1039
1039
|
}
|
|
1040
|
-
P === 0 && (y.current = !0), (P === i.length - 1 || P === -1) && (
|
|
1040
|
+
P === 0 && (y.current = !0), (P === i.length - 1 || P === -1) && (b.current = !0), ue({
|
|
1041
1041
|
slideMode: r,
|
|
1042
1042
|
from: Q(),
|
|
1043
1043
|
to: _e("prev", o),
|
|
@@ -1046,16 +1046,16 @@ function Nr({
|
|
|
1046
1046
|
});
|
|
1047
1047
|
}
|
|
1048
1048
|
function se({ type: r, index: o, immediate: a }) {
|
|
1049
|
-
if (!m || H.current ||
|
|
1049
|
+
if (!m || H.current || b.current && !l)
|
|
1050
1050
|
return;
|
|
1051
1051
|
y.current && (he.current = "forward"), z.current = "next", y.current = !1;
|
|
1052
1052
|
const P = o || N.current + 1;
|
|
1053
1053
|
if (u && je(), !l) {
|
|
1054
1054
|
const X = Math.abs(_e("next", o)) > M() - I() / 3;
|
|
1055
|
-
if (
|
|
1055
|
+
if (b.current)
|
|
1056
1056
|
return;
|
|
1057
1057
|
if (X) {
|
|
1058
|
-
y.current = !1,
|
|
1058
|
+
y.current = !1, b.current = !0, ue({
|
|
1059
1059
|
slideMode: r,
|
|
1060
1060
|
from: Q(),
|
|
1061
1061
|
to: u ? M() : -M(),
|
|
@@ -1065,8 +1065,8 @@ function Nr({
|
|
|
1065
1065
|
return;
|
|
1066
1066
|
}
|
|
1067
1067
|
}
|
|
1068
|
-
if (l && (
|
|
1069
|
-
|
|
1068
|
+
if (l && (b.current || P > i.length - 1)) {
|
|
1069
|
+
b.current = !1, y.current = !0, ue({
|
|
1070
1070
|
slideMode: r,
|
|
1071
1071
|
from: Q() + I() * i.length,
|
|
1072
1072
|
to: 0,
|
|
@@ -1075,7 +1075,7 @@ function Nr({
|
|
|
1075
1075
|
});
|
|
1076
1076
|
return;
|
|
1077
1077
|
}
|
|
1078
|
-
P === 0 && (y.current = !0), P === i.length - 1 && (
|
|
1078
|
+
P === 0 && (y.current = !0), P === i.length - 1 && (b.current = !0), ue({
|
|
1079
1079
|
slideMode: r,
|
|
1080
1080
|
from: Q(),
|
|
1081
1081
|
to: _e("next", o),
|
|
@@ -1155,7 +1155,7 @@ function Nr({
|
|
|
1155
1155
|
});
|
|
1156
1156
|
return;
|
|
1157
1157
|
}
|
|
1158
|
-
r.last && !r.canceled && u && (z.current === "prev" && ce({ type: "drag" }), z.current === "next" && se({ type: "drag" })), r.last && !r.canceled && !u && (fe ? !l &&
|
|
1158
|
+
r.last && !r.canceled && u && (z.current === "prev" && ce({ type: "drag" }), z.current === "next" && se({ type: "drag" })), r.last && !r.canceled && !u && (fe ? !l && b.current ? B.start({
|
|
1159
1159
|
val: -M(),
|
|
1160
1160
|
config: {
|
|
1161
1161
|
...We.default,
|
|
@@ -1198,7 +1198,7 @@ function Nr({
|
|
|
1198
1198
|
} : {};
|
|
1199
1199
|
}
|
|
1200
1200
|
function je() {
|
|
1201
|
-
R.current && (c.current = R.current[d === "x" ? "scrollLeft" : "scrollTop"], R.current[d === "x" ? "scrollLeft" : "scrollTop"] === 0 && (y.current = !0,
|
|
1201
|
+
R.current && (c.current = R.current[d === "x" ? "scrollLeft" : "scrollTop"], R.current[d === "x" ? "scrollLeft" : "scrollTop"] === 0 && (y.current = !0, b.current = !1), R.current[d === "x" ? "scrollLeft" : "scrollTop"] > 0 && R.current[d === "x" ? "scrollLeft" : "scrollTop"] < M() && (y.current = !1, b.current = !1), R.current[d === "x" ? "scrollLeft" : "scrollTop"] === M() && (y.current = !1, b.current = !0));
|
|
1202
1202
|
}
|
|
1203
1203
|
function rr() {
|
|
1204
1204
|
return u ? {
|
|
@@ -1219,7 +1219,7 @@ function Nr({
|
|
|
1219
1219
|
function Ye({ id: r, immediate: o, shouldReset: a, type: P }) {
|
|
1220
1220
|
if (!m || H.current)
|
|
1221
1221
|
return;
|
|
1222
|
-
y.current = !1,
|
|
1222
|
+
y.current = !1, b.current = !1;
|
|
1223
1223
|
const X = xe(
|
|
1224
1224
|
r,
|
|
1225
1225
|
"The item you want to slide to doesn't exist; check the provided id."
|
|
@@ -1328,7 +1328,7 @@ function Nr({
|
|
|
1328
1328
|
re.current = !0, Ze();
|
|
1329
1329
|
}
|
|
1330
1330
|
}, [
|
|
1331
|
-
|
|
1331
|
+
x,
|
|
1332
1332
|
q,
|
|
1333
1333
|
f,
|
|
1334
1334
|
T,
|
|
@@ -1478,7 +1478,7 @@ function Sr({
|
|
|
1478
1478
|
draggingSlideTreshold: W = 50,
|
|
1479
1479
|
thumbsSlideAxis: L = "x"
|
|
1480
1480
|
}) {
|
|
1481
|
-
const C = O("next"), u = O("initial"), U = O(null), [
|
|
1481
|
+
const C = O("next"), u = O("initial"), U = O(null), [x, ie] = Tr(l ?? 0), { emitEvent: F, useListenToCustomEvent: j } = mr(), { handleScroll: G, thumbsFragment: Ne } = pr({
|
|
1482
1482
|
thumbsSlideAxis: L,
|
|
1483
1483
|
items: g,
|
|
1484
1484
|
renderThumbFnProps: {
|
|
@@ -1486,8 +1486,8 @@ function Sr({
|
|
|
1486
1486
|
getIsPrevItem: y,
|
|
1487
1487
|
useListenToCustomEvent: j,
|
|
1488
1488
|
activeItem: {
|
|
1489
|
-
index:
|
|
1490
|
-
id: g[
|
|
1489
|
+
index: x,
|
|
1490
|
+
id: g[x].id
|
|
1491
1491
|
}
|
|
1492
1492
|
}
|
|
1493
1493
|
});
|
|
@@ -1534,7 +1534,7 @@ function Sr({
|
|
|
1534
1534
|
};
|
|
1535
1535
|
}
|
|
1536
1536
|
ve(() => {
|
|
1537
|
-
typeof l == "number" && l !==
|
|
1537
|
+
typeof l == "number" && l !== x && ie(l);
|
|
1538
1538
|
}, [l]);
|
|
1539
1539
|
function q({ to: c, slideType: w, slideMode: k }) {
|
|
1540
1540
|
C.current = w, u.current = k, F({
|
|
@@ -1547,18 +1547,18 @@ function Sr({
|
|
|
1547
1547
|
startReached: c === 0,
|
|
1548
1548
|
endReached: c === g.length - 1
|
|
1549
1549
|
}
|
|
1550
|
-
}), ie(c), G(
|
|
1550
|
+
}), ie(c), G(x);
|
|
1551
1551
|
}
|
|
1552
1552
|
function re(c) {
|
|
1553
1553
|
if (!i)
|
|
1554
1554
|
return;
|
|
1555
|
-
const w =
|
|
1555
|
+
const w = x === 0;
|
|
1556
1556
|
!T && w || q(T && w ? {
|
|
1557
1557
|
to: g.length - 1,
|
|
1558
1558
|
slideType: "prev",
|
|
1559
1559
|
slideMode: c
|
|
1560
1560
|
} : {
|
|
1561
|
-
to:
|
|
1561
|
+
to: x - 1,
|
|
1562
1562
|
slideType: "prev",
|
|
1563
1563
|
slideMode: c
|
|
1564
1564
|
});
|
|
@@ -1566,40 +1566,40 @@ function Sr({
|
|
|
1566
1566
|
function ae(c) {
|
|
1567
1567
|
if (!i)
|
|
1568
1568
|
return;
|
|
1569
|
-
const w =
|
|
1569
|
+
const w = x === g.length - 1;
|
|
1570
1570
|
!T && w || q(T && w ? {
|
|
1571
1571
|
to: 0,
|
|
1572
1572
|
slideType: "next",
|
|
1573
1573
|
slideMode: c
|
|
1574
1574
|
} : {
|
|
1575
|
-
to:
|
|
1575
|
+
to: x + 1,
|
|
1576
1576
|
slideType: "next",
|
|
1577
1577
|
slideMode: c
|
|
1578
1578
|
});
|
|
1579
1579
|
}
|
|
1580
|
-
const z = wr(
|
|
1580
|
+
const z = wr(x, {
|
|
1581
1581
|
config: $,
|
|
1582
1582
|
key: null,
|
|
1583
1583
|
trail: v,
|
|
1584
1584
|
exitBeforeEnter: Y,
|
|
1585
1585
|
...ee(),
|
|
1586
1586
|
onRest(c, w, k) {
|
|
1587
|
-
c.finished && k ===
|
|
1587
|
+
c.finished && k === x && F({
|
|
1588
1588
|
eventName: "onSlideChange",
|
|
1589
1589
|
slideActionType: C.current,
|
|
1590
1590
|
slideMode: u.current,
|
|
1591
1591
|
currentItem: {
|
|
1592
|
-
index:
|
|
1593
|
-
id: g[
|
|
1594
|
-
startReached:
|
|
1595
|
-
endReached:
|
|
1592
|
+
index: x,
|
|
1593
|
+
id: g[x].id,
|
|
1594
|
+
startReached: x === 0,
|
|
1595
|
+
endReached: x === g.length - 1
|
|
1596
1596
|
}
|
|
1597
1597
|
});
|
|
1598
1598
|
}
|
|
1599
1599
|
}), Te = hr(
|
|
1600
1600
|
({ last: c, movement: [w] }) => {
|
|
1601
1601
|
if (c) {
|
|
1602
|
-
const k = w > W, te = w < -W, H =
|
|
1602
|
+
const k = w > W, te = w < -W, H = x === 0, ze = x === g.length - 1;
|
|
1603
1603
|
if (te) {
|
|
1604
1604
|
if (!T && ze)
|
|
1605
1605
|
return;
|
|
@@ -1629,14 +1629,14 @@ function Sr({
|
|
|
1629
1629
|
return k;
|
|
1630
1630
|
}
|
|
1631
1631
|
function N(c) {
|
|
1632
|
-
const w = he(c, "The item doesn't exist; check the provided id."), k =
|
|
1632
|
+
const w = he(c, "The item doesn't exist; check the provided id."), k = x;
|
|
1633
1633
|
return T && k === g.length - 1 ? w === 0 : w === k + 1;
|
|
1634
1634
|
}
|
|
1635
1635
|
function y(c) {
|
|
1636
|
-
const w = he(c, "The item doesn't exist; check the provided id."), k =
|
|
1636
|
+
const w = he(c, "The item doesn't exist; check the provided id."), k = x;
|
|
1637
1637
|
return T && k === 0 ? w === g.length - 1 : w === k - 1;
|
|
1638
1638
|
}
|
|
1639
|
-
const
|
|
1639
|
+
const b = z((c, w, k, te) => {
|
|
1640
1640
|
const H = g[w].renderItem;
|
|
1641
1641
|
return /* @__PURE__ */ A.jsx(
|
|
1642
1642
|
_r.div,
|
|
@@ -1654,8 +1654,8 @@ function Sr({
|
|
|
1654
1654
|
getIsNextItem: N,
|
|
1655
1655
|
getIsPrevItem: y,
|
|
1656
1656
|
activeItem: {
|
|
1657
|
-
index:
|
|
1658
|
-
id: g[
|
|
1657
|
+
index: x,
|
|
1658
|
+
id: g[x].id
|
|
1659
1659
|
}
|
|
1660
1660
|
}) : H
|
|
1661
1661
|
}
|
|
@@ -1667,7 +1667,8 @@ function Sr({
|
|
|
1667
1667
|
const D = {
|
|
1668
1668
|
useListenToCustomEvent: j,
|
|
1669
1669
|
slideToPrevItem: () => re("click"),
|
|
1670
|
-
slideToNextItem: () => ae("click")
|
|
1670
|
+
slideToNextItem: () => ae("click"),
|
|
1671
|
+
activeItem: x
|
|
1671
1672
|
}, me = /* @__PURE__ */ A.jsx(or.Provider, { value: D, children: Ne }), pe = /* @__PURE__ */ A.jsx(or.Provider, { value: D, children: /* @__PURE__ */ A.jsx(
|
|
1672
1673
|
"div",
|
|
1673
1674
|
{
|
|
@@ -1682,7 +1683,7 @@ function Sr({
|
|
|
1682
1683
|
overflow: "hidden",
|
|
1683
1684
|
touchAction: R()
|
|
1684
1685
|
},
|
|
1685
|
-
children:
|
|
1686
|
+
children: b
|
|
1686
1687
|
}
|
|
1687
1688
|
) });
|
|
1688
1689
|
return {
|