|
@@ -4,7 +4,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
|
|
|
/*!
|
|
|
* Splide.js
|
|
|
- * Version : 4.0.19
|
|
|
+ * Version : 4.0.20
|
|
|
* License : MIT
|
|
|
* Copyright: 2022 Naotoshi Fujita
|
|
|
*/
|
|
@@ -1318,10 +1318,9 @@ function Layout(Splide2, Components2, options) {
|
|
|
var MULTIPLIER = 2;
|
|
|
|
|
|
function Clones(Splide2, Components2, options) {
|
|
|
- var _EventInterface4 = EventInterface(Splide2),
|
|
|
- on = _EventInterface4.on,
|
|
|
- emit = _EventInterface4.emit;
|
|
|
-
|
|
|
+ var event = EventInterface(Splide2);
|
|
|
+ var on = event.on,
|
|
|
+ emit = event.emit;
|
|
|
var Elements = Components2.Elements,
|
|
|
Slides = Components2.Slides;
|
|
|
var resolve = Components2.Direction.resolve;
|
|
@@ -1329,22 +1328,24 @@ function Clones(Splide2, Components2, options) {
|
|
|
var cloneCount;
|
|
|
|
|
|
function mount() {
|
|
|
- init();
|
|
|
- on(EVENT_REFRESH, destroy);
|
|
|
- on(EVENT_REFRESH, init);
|
|
|
+ on(EVENT_REFRESH, remount);
|
|
|
on([EVENT_UPDATED, EVENT_RESIZE], observe);
|
|
|
- }
|
|
|
|
|
|
- function init() {
|
|
|
if (cloneCount = computeCloneCount()) {
|
|
|
generate(cloneCount);
|
|
|
emit(EVENT_RESIZE);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ function remount() {
|
|
|
+ destroy();
|
|
|
+ mount();
|
|
|
+ }
|
|
|
+
|
|
|
function destroy() {
|
|
|
remove(clones);
|
|
|
empty(clones);
|
|
|
+ event.destroy();
|
|
|
}
|
|
|
|
|
|
function observe() {
|
|
@@ -1404,9 +1405,9 @@ function Clones(Splide2, Components2, options) {
|
|
|
}
|
|
|
|
|
|
function Move(Splide2, Components2, options) {
|
|
|
- var _EventInterface5 = EventInterface(Splide2),
|
|
|
- on = _EventInterface5.on,
|
|
|
- emit = _EventInterface5.emit;
|
|
|
+ var _EventInterface4 = EventInterface(Splide2),
|
|
|
+ on = _EventInterface4.on,
|
|
|
+ emit = _EventInterface4.emit;
|
|
|
|
|
|
var set = Splide2.state.set;
|
|
|
var _Components2$Layout = Components2.Layout,
|
|
@@ -1565,9 +1566,9 @@ function Move(Splide2, Components2, options) {
|
|
|
}
|
|
|
|
|
|
function Controller(Splide2, Components2, options) {
|
|
|
- var _EventInterface6 = EventInterface(Splide2),
|
|
|
- on = _EventInterface6.on,
|
|
|
- emit = _EventInterface6.emit;
|
|
|
+ var _EventInterface5 = EventInterface(Splide2),
|
|
|
+ on = _EventInterface5.on,
|
|
|
+ emit = _EventInterface5.emit;
|
|
|
|
|
|
var Move = Components2.Move;
|
|
|
var getPosition = Move.getPosition,
|
|
@@ -1897,10 +1898,10 @@ function Arrows(Splide2, Components2, options) {
|
|
|
var INTERVAL_DATA_ATTRIBUTE = DATA_ATTRIBUTE + "-interval";
|
|
|
|
|
|
function Autoplay(Splide2, Components2, options) {
|
|
|
- var _EventInterface7 = EventInterface(Splide2),
|
|
|
- on = _EventInterface7.on,
|
|
|
- bind = _EventInterface7.bind,
|
|
|
- emit = _EventInterface7.emit;
|
|
|
+ var _EventInterface6 = EventInterface(Splide2),
|
|
|
+ on = _EventInterface6.on,
|
|
|
+ bind = _EventInterface6.bind,
|
|
|
+ emit = _EventInterface6.emit;
|
|
|
|
|
|
var interval = RequestInterval(options.interval, Splide2.go.bind(Splide2, ">"), onAnimationFrame);
|
|
|
var isPaused = interval.isPaused;
|
|
@@ -2004,8 +2005,8 @@ function Autoplay(Splide2, Components2, options) {
|
|
|
}
|
|
|
|
|
|
function Cover(Splide2, Components2, options) {
|
|
|
- var _EventInterface8 = EventInterface(Splide2),
|
|
|
- on = _EventInterface8.on;
|
|
|
+ var _EventInterface7 = EventInterface(Splide2),
|
|
|
+ on = _EventInterface7.on;
|
|
|
|
|
|
function mount() {
|
|
|
if (options.cover) {
|
|
@@ -2042,9 +2043,9 @@ var BASE_VELOCITY = 1.5;
|
|
|
var MIN_DURATION = 800;
|
|
|
|
|
|
function Scroll(Splide2, Components2, options) {
|
|
|
- var _EventInterface9 = EventInterface(Splide2),
|
|
|
- on = _EventInterface9.on,
|
|
|
- emit = _EventInterface9.emit;
|
|
|
+ var _EventInterface8 = EventInterface(Splide2),
|
|
|
+ on = _EventInterface8.on,
|
|
|
+ emit = _EventInterface8.emit;
|
|
|
|
|
|
var set = Splide2.state.set;
|
|
|
var Move = Components2.Move;
|
|
@@ -2135,11 +2136,11 @@ var SCROLL_LISTENER_OPTIONS = {
|
|
|
};
|
|
|
|
|
|
function Drag(Splide2, Components2, options) {
|
|
|
- var _EventInterface10 = EventInterface(Splide2),
|
|
|
- on = _EventInterface10.on,
|
|
|
- emit = _EventInterface10.emit,
|
|
|
- bind = _EventInterface10.bind,
|
|
|
- unbind = _EventInterface10.unbind;
|
|
|
+ var _EventInterface9 = EventInterface(Splide2),
|
|
|
+ on = _EventInterface9.on,
|
|
|
+ emit = _EventInterface9.emit,
|
|
|
+ bind = _EventInterface9.bind,
|
|
|
+ unbind = _EventInterface9.unbind;
|
|
|
|
|
|
var state = Splide2.state;
|
|
|
var Move = Components2.Move,
|
|
@@ -2363,10 +2364,10 @@ function normalizeKey(key) {
|
|
|
var KEYBOARD_EVENT = "keydown";
|
|
|
|
|
|
function Keyboard(Splide2, Components2, options) {
|
|
|
- var _EventInterface11 = EventInterface(Splide2),
|
|
|
- on = _EventInterface11.on,
|
|
|
- bind = _EventInterface11.bind,
|
|
|
- unbind = _EventInterface11.unbind;
|
|
|
+ var _EventInterface10 = EventInterface(Splide2),
|
|
|
+ on = _EventInterface10.on,
|
|
|
+ bind = _EventInterface10.bind,
|
|
|
+ unbind = _EventInterface10.unbind;
|
|
|
|
|
|
var root = Splide2.root;
|
|
|
var resolve = Components2.Direction.resolve;
|
|
@@ -2429,11 +2430,11 @@ var SRCSET_DATA_ATTRIBUTE = SRC_DATA_ATTRIBUTE + "-srcset";
|
|
|
var IMAGE_SELECTOR = "[" + SRC_DATA_ATTRIBUTE + "], [" + SRCSET_DATA_ATTRIBUTE + "]";
|
|
|
|
|
|
function LazyLoad(Splide2, Components2, options) {
|
|
|
- var _EventInterface12 = EventInterface(Splide2),
|
|
|
- on = _EventInterface12.on,
|
|
|
- off = _EventInterface12.off,
|
|
|
- bind = _EventInterface12.bind,
|
|
|
- emit = _EventInterface12.emit;
|
|
|
+ var _EventInterface11 = EventInterface(Splide2),
|
|
|
+ on = _EventInterface11.on,
|
|
|
+ off = _EventInterface11.off,
|
|
|
+ bind = _EventInterface11.bind,
|
|
|
+ emit = _EventInterface11.emit;
|
|
|
|
|
|
var isSequential = options.lazyLoad === "sequential";
|
|
|
var events = [EVENT_MOVED, EVENT_SCROLLED];
|
|
@@ -2756,8 +2757,8 @@ function Sync(Splide2, Components2, options) {
|
|
|
}
|
|
|
|
|
|
function Wheel(Splide2, Components2, options) {
|
|
|
- var _EventInterface13 = EventInterface(Splide2),
|
|
|
- bind = _EventInterface13.bind;
|
|
|
+ var _EventInterface12 = EventInterface(Splide2),
|
|
|
+ bind = _EventInterface12.bind;
|
|
|
|
|
|
var lastTime = 0;
|
|
|
|
|
@@ -2798,8 +2799,8 @@ function Wheel(Splide2, Components2, options) {
|
|
|
var SR_REMOVAL_DELAY = 90;
|
|
|
|
|
|
function Live(Splide2, Components2, options) {
|
|
|
- var _EventInterface14 = EventInterface(Splide2),
|
|
|
- on = _EventInterface14.on;
|
|
|
+ var _EventInterface13 = EventInterface(Splide2),
|
|
|
+ on = _EventInterface13.on;
|
|
|
|
|
|
var track = Components2.Elements.track;
|
|
|
var enabled = options.live && !options.isNavigation;
|
|
@@ -3245,8 +3246,8 @@ var SplideRenderer = /*#__PURE__*/function () {
|
|
|
}
|
|
|
|
|
|
SplideRenderer.clean = function clean(splide) {
|
|
|
- var _EventInterface15 = EventInterface(splide),
|
|
|
- on = _EventInterface15.on;
|
|
|
+ var _EventInterface14 = EventInterface(splide),
|
|
|
+ on = _EventInterface14.on;
|
|
|
|
|
|
var root = splide.root;
|
|
|
var clones = queryAll(root, "." + CLASS_CLONE);
|