big-shot
Version:
A Vue-based image/video slide show widget
1,279 lines • 732 kB
JavaScript
import { ref as ne, onUpdated as rn, provide as nn, watch as at, nextTick as Ia, onMounted as fi, onBeforeUnmount as an, h as Ee, onBeforeUpdate as Ca, computed as on, defineComponent as gt, openBlock as Pe, createElementBlock as Lt, createElementVNode as De, getCurrentScope as Da, onScopeDispose as Pa, toValue as Vt, unref as Qi, onUnmounted as ln, toDisplayString as Jt, createBlock as St, withKeys as Ks, mergeProps as _a, withCtx as Ei, renderSlot as ka, createVNode as Ws, Fragment as Oa, renderList as Ma, createCommentVNode as Fa } from "vue";
function zs(r) {
return r !== null && typeof r == "object" && "constructor" in r && r.constructor === Object;
}
function ys(r, e) {
r === void 0 && (r = {}), e === void 0 && (e = {}), Object.keys(e).forEach((t) => {
typeof r[t] > "u" ? r[t] = e[t] : zs(e[t]) && zs(r[t]) && Object.keys(e[t]).length > 0 && ys(r[t], e[t]);
});
}
const dn = {
body: {},
addEventListener() {
},
removeEventListener() {
},
activeElement: {
blur() {
},
nodeName: ""
},
querySelector() {
return null;
},
querySelectorAll() {
return [];
},
getElementById() {
return null;
},
createEvent() {
return {
initEvent() {
}
};
},
createElement() {
return {
children: [],
childNodes: [],
style: {},
setAttribute() {
},
getElementsByTagName() {
return [];
}
};
},
createElementNS() {
return {};
},
importNode() {
return null;
},
location: {
hash: "",
host: "",
hostname: "",
href: "",
origin: "",
pathname: "",
protocol: "",
search: ""
}
};
function xe() {
const r = typeof document < "u" ? document : {};
return ys(r, dn), r;
}
const Na = {
document: dn,
navigator: {
userAgent: ""
},
location: {
hash: "",
host: "",
hostname: "",
href: "",
origin: "",
pathname: "",
protocol: "",
search: ""
},
history: {
replaceState() {
},
pushState() {
},
go() {
},
back() {
}
},
CustomEvent: function() {
return this;
},
addEventListener() {
},
removeEventListener() {
},
getComputedStyle() {
return {
getPropertyValue() {
return "";
}
};
},
Image() {
},
Date() {
},
screen: {},
setTimeout() {
},
clearTimeout() {
},
matchMedia() {
return {};
},
requestAnimationFrame(r) {
return typeof setTimeout > "u" ? (r(), null) : setTimeout(r, 0);
},
cancelAnimationFrame(r) {
typeof setTimeout > "u" || clearTimeout(r);
}
};
function he() {
const r = typeof window < "u" ? window : {};
return ys(r, Na), r;
}
function Ba(r) {
return r === void 0 && (r = ""), r.trim().split(" ").filter((e) => !!e.trim());
}
function Ua(r) {
const e = r;
Object.keys(e).forEach((t) => {
try {
e[t] = null;
} catch {
}
try {
delete e[t];
} catch {
}
});
}
function Ji(r, e) {
return e === void 0 && (e = 0), setTimeout(r, e);
}
function Zt() {
return Date.now();
}
function $a(r) {
const e = he();
let t;
return e.getComputedStyle && (t = e.getComputedStyle(r, null)), !t && r.currentStyle && (t = r.currentStyle), t || (t = r.style), t;
}
function Zi(r, e) {
e === void 0 && (e = "x");
const t = he();
let i, s, n;
const a = $a(r);
return t.WebKitCSSMatrix ? (s = a.transform || a.webkitTransform, s.split(",").length > 6 && (s = s.split(", ").map((o) => o.replace(",", ".")).join(", ")), n = new t.WebKitCSSMatrix(s === "none" ? "" : s)) : (n = a.MozTransform || a.OTransform || a.MsTransform || a.msTransform || a.transform || a.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,"), i = n.toString().split(",")), e === "x" && (t.WebKitCSSMatrix ? s = n.m41 : i.length === 16 ? s = parseFloat(i[12]) : s = parseFloat(i[4])), e === "y" && (t.WebKitCSSMatrix ? s = n.m42 : i.length === 16 ? s = parseFloat(i[13]) : s = parseFloat(i[5])), s || 0;
}
function Dt(r) {
return typeof r == "object" && r !== null && r.constructor && Object.prototype.toString.call(r).slice(8, -1) === "Object";
}
function Ga(r) {
return typeof window < "u" && typeof window.HTMLElement < "u" ? r instanceof HTMLElement : r && (r.nodeType === 1 || r.nodeType === 11);
}
function me() {
const r = Object(arguments.length <= 0 ? void 0 : arguments[0]), e = ["__proto__", "constructor", "prototype"];
for (let t = 1; t < arguments.length; t += 1) {
const i = t < 0 || arguments.length <= t ? void 0 : arguments[t];
if (i != null && !Ga(i)) {
const s = Object.keys(Object(i)).filter((n) => e.indexOf(n) < 0);
for (let n = 0, a = s.length; n < a; n += 1) {
const o = s[n], l = Object.getOwnPropertyDescriptor(i, o);
l !== void 0 && l.enumerable && (Dt(r[o]) && Dt(i[o]) ? i[o].__swiper__ ? r[o] = i[o] : me(r[o], i[o]) : !Dt(r[o]) && Dt(i[o]) ? (r[o] = {}, i[o].__swiper__ ? r[o] = i[o] : me(r[o], i[o])) : r[o] = i[o]);
}
}
}
return r;
}
function Tt(r, e, t) {
r.style.setProperty(e, t);
}
function cn(r) {
let {
swiper: e,
targetPosition: t,
side: i
} = r;
const s = he(), n = -e.translate;
let a = null, o;
const l = e.params.speed;
e.wrapperEl.style.scrollSnapType = "none", s.cancelAnimationFrame(e.cssModeFrameID);
const d = t > n ? "next" : "prev", c = (f, h) => d === "next" && f >= h || d === "prev" && f <= h, u = () => {
o = new Date().getTime(), a === null && (a = o);
const f = Math.max(Math.min((o - a) / l, 1), 0), h = 0.5 - Math.cos(f * Math.PI) / 2;
let p = n + h * (t - n);
if (c(p, t) && (p = t), e.wrapperEl.scrollTo({
[i]: p
}), c(p, t)) {
e.wrapperEl.style.overflow = "hidden", e.wrapperEl.style.scrollSnapType = "", setTimeout(() => {
e.wrapperEl.style.overflow = "", e.wrapperEl.scrollTo({
[i]: p
});
}), s.cancelAnimationFrame(e.cssModeFrameID);
return;
}
e.cssModeFrameID = s.requestAnimationFrame(u);
};
u();
}
function Se(r, e) {
e === void 0 && (e = "");
const t = [...r.children];
return r instanceof HTMLSlotElement && t.push(...r.assignedElements()), e ? t.filter((i) => i.matches(e)) : t;
}
function Va(r, e) {
const t = e.contains(r);
return !t && e instanceof HTMLSlotElement ? [...e.assignedElements()].includes(r) : t;
}
function ei(r) {
try {
console.warn(r);
return;
} catch {
}
}
function At(r, e) {
e === void 0 && (e = []);
const t = document.createElement(r);
return t.classList.add(...Array.isArray(e) ? e : Ba(e)), t;
}
function es(r) {
const e = he(), t = xe(), i = r.getBoundingClientRect(), s = t.body, n = r.clientTop || s.clientTop || 0, a = r.clientLeft || s.clientLeft || 0, o = r === e ? e.scrollY : r.scrollTop, l = r === e ? e.scrollX : r.scrollLeft;
return {
top: i.top + o - n,
left: i.left + l - a
};
}
function Ha(r, e) {
const t = [];
for (; r.previousElementSibling; ) {
const i = r.previousElementSibling;
e ? i.matches(e) && t.push(i) : t.push(i), r = i;
}
return t;
}
function Ka(r, e) {
const t = [];
for (; r.nextElementSibling; ) {
const i = r.nextElementSibling;
e ? i.matches(e) && t.push(i) : t.push(i), r = i;
}
return t;
}
function We(r, e) {
return he().getComputedStyle(r, null).getPropertyValue(e);
}
function Ys(r) {
let e = r, t;
if (e) {
for (t = 0; (e = e.previousSibling) !== null; )
e.nodeType === 1 && (t += 1);
return t;
}
}
function ot(r, e) {
const t = [];
let i = r.parentElement;
for (; i; )
e ? i.matches(e) && t.push(i) : t.push(i), i = i.parentElement;
return t;
}
function js(r, e, t) {
const i = he();
return t ? r[e === "width" ? "offsetWidth" : "offsetHeight"] + parseFloat(i.getComputedStyle(r, null).getPropertyValue(e === "width" ? "margin-right" : "margin-top")) + parseFloat(i.getComputedStyle(r, null).getPropertyValue(e === "width" ? "margin-left" : "margin-bottom")) : r.offsetWidth;
}
function Wa(r) {
let {
swiper: e,
extendParams: t,
on: i,
emit: s
} = r;
t({
virtual: {
enabled: !1,
slides: [],
cache: !0,
renderSlide: null,
renderExternal: null,
renderExternalUpdate: !0,
addSlidesBefore: 0,
addSlidesAfter: 0
}
});
let n;
const a = xe();
e.virtual = {
cache: {},
from: void 0,
to: void 0,
slides: [],
offset: 0,
slidesGrid: []
};
const o = a.createElement("div");
function l(p, g) {
const m = e.params.virtual;
if (m.cache && e.virtual.cache[g])
return e.virtual.cache[g];
let y;
return m.renderSlide ? (y = m.renderSlide.call(e, p, g), typeof y == "string" && (o.innerHTML = y, y = o.children[0])) : e.isElement ? y = At("swiper-slide") : y = At("div", e.params.slideClass), y.setAttribute("data-swiper-slide-index", g), m.renderSlide || (y.innerHTML = p), m.cache && (e.virtual.cache[g] = y), y;
}
function d(p, g) {
const {
slidesPerView: m,
slidesPerGroup: y,
centeredSlides: E,
loop: T,
initialSlide: L
} = e.params;
if (g && !T && L > 0)
return;
const {
addSlidesBefore: S,
addSlidesAfter: A
} = e.params.virtual, {
from: w,
to: C,
slides: R,
slidesGrid: x,
offset: D
} = e.virtual;
e.params.cssMode || e.updateActiveIndex();
const F = e.activeIndex || 0;
let _;
e.rtlTranslate ? _ = "right" : _ = e.isHorizontal() ? "left" : "top";
let U, V;
E ? (U = Math.floor(m / 2) + y + A, V = Math.floor(m / 2) + y + S) : (U = m + (y - 1) + A, V = (T ? m : y) + S);
let G = F - V, j = F + U;
T || (G = Math.max(G, 0), j = Math.min(j, R.length - 1));
let H = (e.slidesGrid[G] || 0) - (e.slidesGrid[0] || 0);
T && F >= V ? (G -= V, E || (H += e.slidesGrid[0])) : T && F < V && (G = -V, E && (H += e.slidesGrid[0])), Object.assign(e.virtual, {
from: G,
to: j,
offset: H,
slidesGrid: e.slidesGrid,
slidesBefore: V,
slidesAfter: U
});
function $() {
e.updateSlides(), e.updateProgress(), e.updateSlidesClasses(), s("virtualUpdate");
}
if (w === G && C === j && !p) {
e.slidesGrid !== x && H !== D && e.slides.forEach((K) => {
K.style[_] = `${H - Math.abs(e.cssOverflowAdjustment())}px`;
}), e.updateProgress(), s("virtualUpdate");
return;
}
if (e.params.virtual.renderExternal) {
e.params.virtual.renderExternal.call(e, {
offset: H,
from: G,
to: j,
slides: function() {
const q = [];
for (let te = G; te <= j; te += 1)
q.push(R[te]);
return q;
}()
}), e.params.virtual.renderExternalUpdate ? $() : s("virtualUpdate");
return;
}
const N = [], k = [], O = (K) => {
let q = K;
return K < 0 ? q = R.length + K : q >= R.length && (q = q - R.length), q;
};
if (p)
e.slides.filter((K) => K.matches(`.${e.params.slideClass}, swiper-slide`)).forEach((K) => {
K.remove();
});
else
for (let K = w; K <= C; K += 1)
if (K < G || K > j) {
const q = O(K);
e.slides.filter((te) => te.matches(`.${e.params.slideClass}[data-swiper-slide-index="${q}"], swiper-slide[data-swiper-slide-index="${q}"]`)).forEach((te) => {
te.remove();
});
}
const B = T ? -R.length : 0, Q = T ? R.length * 2 : R.length;
for (let K = B; K < Q; K += 1)
if (K >= G && K <= j) {
const q = O(K);
typeof C > "u" || p ? k.push(q) : (K > C && k.push(q), K < w && N.push(q));
}
if (k.forEach((K) => {
e.slidesEl.append(l(R[K], K));
}), T)
for (let K = N.length - 1; K >= 0; K -= 1) {
const q = N[K];
e.slidesEl.prepend(l(R[q], q));
}
else
N.sort((K, q) => q - K), N.forEach((K) => {
e.slidesEl.prepend(l(R[K], K));
});
Se(e.slidesEl, ".swiper-slide, swiper-slide").forEach((K) => {
K.style[_] = `${H - Math.abs(e.cssOverflowAdjustment())}px`;
}), $();
}
function c(p) {
if (typeof p == "object" && "length" in p)
for (let g = 0; g < p.length; g += 1)
p[g] && e.virtual.slides.push(p[g]);
else
e.virtual.slides.push(p);
d(!0);
}
function u(p) {
const g = e.activeIndex;
let m = g + 1, y = 1;
if (Array.isArray(p)) {
for (let E = 0; E < p.length; E += 1)
p[E] && e.virtual.slides.unshift(p[E]);
m = g + p.length, y = p.length;
} else
e.virtual.slides.unshift(p);
if (e.params.virtual.cache) {
const E = e.virtual.cache, T = {};
Object.keys(E).forEach((L) => {
const S = E[L], A = S.getAttribute("data-swiper-slide-index");
A && S.setAttribute("data-swiper-slide-index", parseInt(A, 10) + y), T[parseInt(L, 10) + y] = S;
}), e.virtual.cache = T;
}
d(!0), e.slideTo(m, 0);
}
function f(p) {
if (typeof p > "u" || p === null)
return;
let g = e.activeIndex;
if (Array.isArray(p))
for (let m = p.length - 1; m >= 0; m -= 1)
e.params.virtual.cache && (delete e.virtual.cache[p[m]], Object.keys(e.virtual.cache).forEach((y) => {
y > p && (e.virtual.cache[y - 1] = e.virtual.cache[y], e.virtual.cache[y - 1].setAttribute("data-swiper-slide-index", y - 1), delete e.virtual.cache[y]);
})), e.virtual.slides.splice(p[m], 1), p[m] < g && (g -= 1), g = Math.max(g, 0);
else
e.params.virtual.cache && (delete e.virtual.cache[p], Object.keys(e.virtual.cache).forEach((m) => {
m > p && (e.virtual.cache[m - 1] = e.virtual.cache[m], e.virtual.cache[m - 1].setAttribute("data-swiper-slide-index", m - 1), delete e.virtual.cache[m]);
})), e.virtual.slides.splice(p, 1), p < g && (g -= 1), g = Math.max(g, 0);
d(!0), e.slideTo(g, 0);
}
function h() {
e.virtual.slides = [], e.params.virtual.cache && (e.virtual.cache = {}), d(!0), e.slideTo(0, 0);
}
i("beforeInit", () => {
if (!e.params.virtual.enabled)
return;
let p;
if (typeof e.passedParams.virtual.slides > "u") {
const g = [...e.slidesEl.children].filter((m) => m.matches(`.${e.params.slideClass}, swiper-slide`));
g && g.length && (e.virtual.slides = [...g], p = !0, g.forEach((m, y) => {
m.setAttribute("data-swiper-slide-index", y), e.virtual.cache[y] = m, m.remove();
}));
}
p || (e.virtual.slides = e.params.virtual.slides), e.classNames.push(`${e.params.containerModifierClass}virtual`), e.params.watchSlidesProgress = !0, e.originalParams.watchSlidesProgress = !0, d(!1, !0);
}), i("setTranslate", () => {
e.params.virtual.enabled && (e.params.cssMode && !e._immediateVirtual ? (clearTimeout(n), n = setTimeout(() => {
d();
}, 100)) : d());
}), i("init update resize", () => {
e.params.virtual.enabled && e.params.cssMode && Tt(e.wrapperEl, "--swiper-virtual-size", `${e.virtualSize}px`);
}), Object.assign(e.virtual, {
appendSlide: c,
prependSlide: u,
removeSlide: f,
removeAllSlides: h,
update: d
});
}
function za(r) {
let {
swiper: e,
extendParams: t,
on: i,
emit: s
} = r;
const n = xe(), a = he();
e.keyboard = {
enabled: !1
}, t({
keyboard: {
enabled: !1,
onlyInViewport: !0,
pageUpDown: !0
}
});
function o(c) {
if (!e.enabled)
return;
const {
rtlTranslate: u
} = e;
let f = c;
f.originalEvent && (f = f.originalEvent);
const h = f.keyCode || f.charCode, p = e.params.keyboard.pageUpDown, g = p && h === 33, m = p && h === 34, y = h === 37, E = h === 39, T = h === 38, L = h === 40;
if (!e.allowSlideNext && (e.isHorizontal() && E || e.isVertical() && L || m) || !e.allowSlidePrev && (e.isHorizontal() && y || e.isVertical() && T || g))
return !1;
if (!(f.shiftKey || f.altKey || f.ctrlKey || f.metaKey) && !(n.activeElement && n.activeElement.nodeName && (n.activeElement.nodeName.toLowerCase() === "input" || n.activeElement.nodeName.toLowerCase() === "textarea"))) {
if (e.params.keyboard.onlyInViewport && (g || m || y || E || T || L)) {
let S = !1;
if (ot(e.el, `.${e.params.slideClass}, swiper-slide`).length > 0 && ot(e.el, `.${e.params.slideActiveClass}`).length === 0)
return;
const A = e.el, w = A.clientWidth, C = A.clientHeight, R = a.innerWidth, x = a.innerHeight, D = es(A);
u && (D.left -= A.scrollLeft);
const F = [[D.left, D.top], [D.left + w, D.top], [D.left, D.top + C], [D.left + w, D.top + C]];
for (let _ = 0; _ < F.length; _ += 1) {
const U = F[_];
if (U[0] >= 0 && U[0] <= R && U[1] >= 0 && U[1] <= x) {
if (U[0] === 0 && U[1] === 0)
continue;
S = !0;
}
}
if (!S)
return;
}
e.isHorizontal() ? ((g || m || y || E) && (f.preventDefault ? f.preventDefault() : f.returnValue = !1), ((m || E) && !u || (g || y) && u) && e.slideNext(), ((g || y) && !u || (m || E) && u) && e.slidePrev()) : ((g || m || T || L) && (f.preventDefault ? f.preventDefault() : f.returnValue = !1), (m || L) && e.slideNext(), (g || T) && e.slidePrev()), s("keyPress", h);
}
}
function l() {
e.keyboard.enabled || (n.addEventListener("keydown", o), e.keyboard.enabled = !0);
}
function d() {
e.keyboard.enabled && (n.removeEventListener("keydown", o), e.keyboard.enabled = !1);
}
i("init", () => {
e.params.keyboard.enabled && l();
}), i("destroy", () => {
e.keyboard.enabled && d();
}), Object.assign(e.keyboard, {
enable: l,
disable: d
});
}
function Ya(r) {
let {
swiper: e,
extendParams: t,
on: i,
emit: s
} = r;
const n = he();
t({
zoom: {
enabled: !1,
limitToOriginalSize: !1,
maxRatio: 3,
minRatio: 1,
toggle: !0,
containerClass: "swiper-zoom-container",
zoomedSlideClass: "swiper-slide-zoomed"
}
}), e.zoom = {
enabled: !1
};
let a = 1, o = !1, l, d;
const c = [], u = {
originX: 0,
originY: 0,
slideEl: void 0,
slideWidth: void 0,
slideHeight: void 0,
imageEl: void 0,
imageWrapEl: void 0,
maxRatio: 3
}, f = {
isTouched: void 0,
isMoved: void 0,
currentX: void 0,
currentY: void 0,
minX: void 0,
minY: void 0,
maxX: void 0,
maxY: void 0,
width: void 0,
height: void 0,
startX: void 0,
startY: void 0,
touchesStart: {},
touchesCurrent: {}
}, h = {
x: void 0,
y: void 0,
prevPositionX: void 0,
prevPositionY: void 0,
prevTime: void 0
};
let p = 1;
Object.defineProperty(e.zoom, "scale", {
get() {
return p;
},
set(k) {
if (p !== k) {
const O = u.imageEl, B = u.slideEl;
s("zoomChange", k, O, B);
}
p = k;
}
});
function g() {
if (c.length < 2)
return 1;
const k = c[0].pageX, O = c[0].pageY, B = c[1].pageX, Q = c[1].pageY;
return Math.sqrt((B - k) ** 2 + (Q - O) ** 2);
}
function m() {
const k = e.params.zoom, O = u.imageWrapEl.getAttribute("data-swiper-zoom") || k.maxRatio;
if (k.limitToOriginalSize && u.imageEl && u.imageEl.naturalWidth) {
const B = u.imageEl.naturalWidth / u.imageEl.offsetWidth;
return Math.min(B, O);
}
return O;
}
function y() {
if (c.length < 2)
return {
x: null,
y: null
};
const k = u.imageEl.getBoundingClientRect();
return [(c[0].pageX + (c[1].pageX - c[0].pageX) / 2 - k.x - n.scrollX) / a, (c[0].pageY + (c[1].pageY - c[0].pageY) / 2 - k.y - n.scrollY) / a];
}
function E() {
return e.isElement ? "swiper-slide" : `.${e.params.slideClass}`;
}
function T(k) {
const O = E();
return !!(k.target.matches(O) || e.slides.filter((B) => B.contains(k.target)).length > 0);
}
function L(k) {
const O = `.${e.params.zoom.containerClass}`;
return !!(k.target.matches(O) || [...e.hostEl.querySelectorAll(O)].filter((B) => B.contains(k.target)).length > 0);
}
function S(k) {
if (k.pointerType === "mouse" && c.splice(0, c.length), !T(k))
return;
const O = e.params.zoom;
if (l = !1, d = !1, c.push(k), !(c.length < 2)) {
if (l = !0, u.scaleStart = g(), !u.slideEl) {
u.slideEl = k.target.closest(`.${e.params.slideClass}, swiper-slide`), u.slideEl || (u.slideEl = e.slides[e.activeIndex]);
let B = u.slideEl.querySelector(`.${O.containerClass}`);
if (B && (B = B.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]), u.imageEl = B, B ? u.imageWrapEl = ot(u.imageEl, `.${O.containerClass}`)[0] : u.imageWrapEl = void 0, !u.imageWrapEl) {
u.imageEl = void 0;
return;
}
u.maxRatio = m();
}
if (u.imageEl) {
const [B, Q] = y();
u.originX = B, u.originY = Q, u.imageEl.style.transitionDuration = "0ms";
}
o = !0;
}
}
function A(k) {
if (!T(k))
return;
const O = e.params.zoom, B = e.zoom, Q = c.findIndex((K) => K.pointerId === k.pointerId);
Q >= 0 && (c[Q] = k), !(c.length < 2) && (d = !0, u.scaleMove = g(), u.imageEl && (B.scale = u.scaleMove / u.scaleStart * a, B.scale > u.maxRatio && (B.scale = u.maxRatio - 1 + (B.scale - u.maxRatio + 1) ** 0.5), B.scale < O.minRatio && (B.scale = O.minRatio + 1 - (O.minRatio - B.scale + 1) ** 0.5), u.imageEl.style.transform = `translate3d(0,0,0) scale(${B.scale})`));
}
function w(k) {
if (!T(k) || k.pointerType === "mouse" && k.type === "pointerout")
return;
const O = e.params.zoom, B = e.zoom, Q = c.findIndex((K) => K.pointerId === k.pointerId);
Q >= 0 && c.splice(Q, 1), !(!l || !d) && (l = !1, d = !1, u.imageEl && (B.scale = Math.max(Math.min(B.scale, u.maxRatio), O.minRatio), u.imageEl.style.transitionDuration = `${e.params.speed}ms`, u.imageEl.style.transform = `translate3d(0,0,0) scale(${B.scale})`, a = B.scale, o = !1, B.scale > 1 && u.slideEl ? u.slideEl.classList.add(`${O.zoomedSlideClass}`) : B.scale <= 1 && u.slideEl && u.slideEl.classList.remove(`${O.zoomedSlideClass}`), B.scale === 1 && (u.originX = 0, u.originY = 0, u.slideEl = void 0)));
}
let C;
function R() {
e.touchEventsData.preventTouchMoveFromPointerMove = !1;
}
function x() {
clearTimeout(C), e.touchEventsData.preventTouchMoveFromPointerMove = !0, C = setTimeout(() => {
e.destroyed || R();
});
}
function D(k) {
const O = e.device;
if (!u.imageEl || f.isTouched)
return;
O.android && k.cancelable && k.preventDefault(), f.isTouched = !0;
const B = c.length > 0 ? c[0] : k;
f.touchesStart.x = B.pageX, f.touchesStart.y = B.pageY;
}
function F(k) {
if (!T(k) || !L(k))
return;
const O = e.zoom;
if (!u.imageEl || !f.isTouched || !u.slideEl)
return;
f.isMoved || (f.width = u.imageEl.offsetWidth || u.imageEl.clientWidth, f.height = u.imageEl.offsetHeight || u.imageEl.clientHeight, f.startX = Zi(u.imageWrapEl, "x") || 0, f.startY = Zi(u.imageWrapEl, "y") || 0, u.slideWidth = u.slideEl.offsetWidth, u.slideHeight = u.slideEl.offsetHeight, u.imageWrapEl.style.transitionDuration = "0ms");
const B = f.width * O.scale, Q = f.height * O.scale;
if (f.minX = Math.min(u.slideWidth / 2 - B / 2, 0), f.maxX = -f.minX, f.minY = Math.min(u.slideHeight / 2 - Q / 2, 0), f.maxY = -f.minY, f.touchesCurrent.x = c.length > 0 ? c[0].pageX : k.pageX, f.touchesCurrent.y = c.length > 0 ? c[0].pageY : k.pageY, Math.max(Math.abs(f.touchesCurrent.x - f.touchesStart.x), Math.abs(f.touchesCurrent.y - f.touchesStart.y)) > 5 && (e.allowClick = !1), !f.isMoved && !o) {
if (e.isHorizontal() && (Math.floor(f.minX) === Math.floor(f.startX) && f.touchesCurrent.x < f.touchesStart.x || Math.floor(f.maxX) === Math.floor(f.startX) && f.touchesCurrent.x > f.touchesStart.x)) {
f.isTouched = !1, R();
return;
}
if (!e.isHorizontal() && (Math.floor(f.minY) === Math.floor(f.startY) && f.touchesCurrent.y < f.touchesStart.y || Math.floor(f.maxY) === Math.floor(f.startY) && f.touchesCurrent.y > f.touchesStart.y)) {
f.isTouched = !1, R();
return;
}
}
k.cancelable && k.preventDefault(), k.stopPropagation(), x(), f.isMoved = !0;
const q = (O.scale - a) / (u.maxRatio - e.params.zoom.minRatio), {
originX: te,
originY: ve
} = u;
f.currentX = f.touchesCurrent.x - f.touchesStart.x + f.startX + q * (f.width - te * 2), f.currentY = f.touchesCurrent.y - f.touchesStart.y + f.startY + q * (f.height - ve * 2), f.currentX < f.minX && (f.currentX = f.minX + 1 - (f.minX - f.currentX + 1) ** 0.8), f.currentX > f.maxX && (f.currentX = f.maxX - 1 + (f.currentX - f.maxX + 1) ** 0.8), f.currentY < f.minY && (f.currentY = f.minY + 1 - (f.minY - f.currentY + 1) ** 0.8), f.currentY > f.maxY && (f.currentY = f.maxY - 1 + (f.currentY - f.maxY + 1) ** 0.8), h.prevPositionX || (h.prevPositionX = f.touchesCurrent.x), h.prevPositionY || (h.prevPositionY = f.touchesCurrent.y), h.prevTime || (h.prevTime = Date.now()), h.x = (f.touchesCurrent.x - h.prevPositionX) / (Date.now() - h.prevTime) / 2, h.y = (f.touchesCurrent.y - h.prevPositionY) / (Date.now() - h.prevTime) / 2, Math.abs(f.touchesCurrent.x - h.prevPositionX) < 2 && (h.x = 0), Math.abs(f.touchesCurrent.y - h.prevPositionY) < 2 && (h.y = 0), h.prevPositionX = f.touchesCurrent.x, h.prevPositionY = f.touchesCurrent.y, h.prevTime = Date.now(), u.imageWrapEl.style.transform = `translate3d(${f.currentX}px, ${f.currentY}px,0)`;
}
function _() {
const k = e.zoom;
if (!u.imageEl)
return;
if (!f.isTouched || !f.isMoved) {
f.isTouched = !1, f.isMoved = !1;
return;
}
f.isTouched = !1, f.isMoved = !1;
let O = 300, B = 300;
const Q = h.x * O, K = f.currentX + Q, q = h.y * B, te = f.currentY + q;
h.x !== 0 && (O = Math.abs((K - f.currentX) / h.x)), h.y !== 0 && (B = Math.abs((te - f.currentY) / h.y));
const ve = Math.max(O, B);
f.currentX = K, f.currentY = te;
const Ve = f.width * k.scale, Fe = f.height * k.scale;
f.minX = Math.min(u.slideWidth / 2 - Ve / 2, 0), f.maxX = -f.minX, f.minY = Math.min(u.slideHeight / 2 - Fe / 2, 0), f.maxY = -f.minY, f.currentX = Math.max(Math.min(f.currentX, f.maxX), f.minX), f.currentY = Math.max(Math.min(f.currentY, f.maxY), f.minY), u.imageWrapEl.style.transitionDuration = `${ve}ms`, u.imageWrapEl.style.transform = `translate3d(${f.currentX}px, ${f.currentY}px,0)`;
}
function U() {
const k = e.zoom;
u.slideEl && e.activeIndex !== e.slides.indexOf(u.slideEl) && (u.imageEl && (u.imageEl.style.transform = "translate3d(0,0,0) scale(1)"), u.imageWrapEl && (u.imageWrapEl.style.transform = "translate3d(0,0,0)"), u.slideEl.classList.remove(`${e.params.zoom.zoomedSlideClass}`), k.scale = 1, a = 1, u.slideEl = void 0, u.imageEl = void 0, u.imageWrapEl = void 0, u.originX = 0, u.originY = 0);
}
function V(k) {
const O = e.zoom, B = e.params.zoom;
if (!u.slideEl) {
k && k.target && (u.slideEl = k.target.closest(`.${e.params.slideClass}, swiper-slide`)), u.slideEl || (e.params.virtual && e.params.virtual.enabled && e.virtual ? u.slideEl = Se(e.slidesEl, `.${e.params.slideActiveClass}`)[0] : u.slideEl = e.slides[e.activeIndex]);
let vt = u.slideEl.querySelector(`.${B.containerClass}`);
vt && (vt = vt.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]), u.imageEl = vt, vt ? u.imageWrapEl = ot(u.imageEl, `.${B.containerClass}`)[0] : u.imageWrapEl = void 0;
}
if (!u.imageEl || !u.imageWrapEl)
return;
e.params.cssMode && (e.wrapperEl.style.overflow = "hidden", e.wrapperEl.style.touchAction = "none"), u.slideEl.classList.add(`${B.zoomedSlideClass}`);
let Q, K, q, te, ve, Ve, Fe, Ye, Us, $s, Gs, Vs, It, Ct, mi, vi, yi, Ti;
typeof f.touchesStart.x > "u" && k ? (Q = k.pageX, K = k.pageY) : (Q = f.touchesStart.x, K = f.touchesStart.y);
const mt = typeof k == "number" ? k : null;
a === 1 && mt && (Q = void 0, K = void 0, f.touchesStart.x = void 0, f.touchesStart.y = void 0);
const Hs = m();
O.scale = mt || Hs, a = mt || Hs, k && !(a === 1 && mt) ? (yi = u.slideEl.offsetWidth, Ti = u.slideEl.offsetHeight, q = es(u.slideEl).left + n.scrollX, te = es(u.slideEl).top + n.scrollY, ve = q + yi / 2 - Q, Ve = te + Ti / 2 - K, Us = u.imageEl.offsetWidth || u.imageEl.clientWidth, $s = u.imageEl.offsetHeight || u.imageEl.clientHeight, Gs = Us * O.scale, Vs = $s * O.scale, It = Math.min(yi / 2 - Gs / 2, 0), Ct = Math.min(Ti / 2 - Vs / 2, 0), mi = -It, vi = -Ct, Fe = ve * O.scale, Ye = Ve * O.scale, Fe < It && (Fe = It), Fe > mi && (Fe = mi), Ye < Ct && (Ye = Ct), Ye > vi && (Ye = vi)) : (Fe = 0, Ye = 0), mt && O.scale === 1 && (u.originX = 0, u.originY = 0), u.imageWrapEl.style.transitionDuration = "300ms", u.imageWrapEl.style.transform = `translate3d(${Fe}px, ${Ye}px,0)`, u.imageEl.style.transitionDuration = "300ms", u.imageEl.style.transform = `translate3d(0,0,0) scale(${O.scale})`;
}
function G() {
const k = e.zoom, O = e.params.zoom;
if (!u.slideEl) {
e.params.virtual && e.params.virtual.enabled && e.virtual ? u.slideEl = Se(e.slidesEl, `.${e.params.slideActiveClass}`)[0] : u.slideEl = e.slides[e.activeIndex];
let B = u.slideEl.querySelector(`.${O.containerClass}`);
B && (B = B.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]), u.imageEl = B, B ? u.imageWrapEl = ot(u.imageEl, `.${O.containerClass}`)[0] : u.imageWrapEl = void 0;
}
!u.imageEl || !u.imageWrapEl || (e.params.cssMode && (e.wrapperEl.style.overflow = "", e.wrapperEl.style.touchAction = ""), k.scale = 1, a = 1, f.touchesStart.x = void 0, f.touchesStart.y = void 0, u.imageWrapEl.style.transitionDuration = "300ms", u.imageWrapEl.style.transform = "translate3d(0,0,0)", u.imageEl.style.transitionDuration = "300ms", u.imageEl.style.transform = "translate3d(0,0,0) scale(1)", u.slideEl.classList.remove(`${O.zoomedSlideClass}`), u.slideEl = void 0, u.originX = 0, u.originY = 0);
}
function j(k) {
const O = e.zoom;
O.scale && O.scale !== 1 ? G() : V(k);
}
function H() {
const k = e.params.passiveListeners ? {
passive: !0,
capture: !1
} : !1, O = e.params.passiveListeners ? {
passive: !1,
capture: !0
} : !0;
return {
passiveListener: k,
activeListenerWithCapture: O
};
}
function $() {
const k = e.zoom;
if (k.enabled)
return;
k.enabled = !0;
const {
passiveListener: O,
activeListenerWithCapture: B
} = H();
e.wrapperEl.addEventListener("pointerdown", S, O), e.wrapperEl.addEventListener("pointermove", A, B), ["pointerup", "pointercancel", "pointerout"].forEach((Q) => {
e.wrapperEl.addEventListener(Q, w, O);
}), e.wrapperEl.addEventListener("pointermove", F, B);
}
function N() {
const k = e.zoom;
if (!k.enabled)
return;
k.enabled = !1;
const {
passiveListener: O,
activeListenerWithCapture: B
} = H();
e.wrapperEl.removeEventListener("pointerdown", S, O), e.wrapperEl.removeEventListener("pointermove", A, B), ["pointerup", "pointercancel", "pointerout"].forEach((Q) => {
e.wrapperEl.removeEventListener(Q, w, O);
}), e.wrapperEl.removeEventListener("pointermove", F, B);
}
i("init", () => {
e.params.zoom.enabled && $();
}), i("destroy", () => {
N();
}), i("touchStart", (k, O) => {
e.zoom.enabled && D(O);
}), i("touchEnd", (k, O) => {
e.zoom.enabled && _();
}), i("doubleTap", (k, O) => {
!e.animating && e.params.zoom.enabled && e.zoom.enabled && e.params.zoom.toggle && j(O);
}), i("transitionEnd", () => {
e.zoom.enabled && e.params.zoom.enabled && U();
}), i("slideChange", () => {
e.zoom.enabled && e.params.zoom.enabled && e.params.cssMode && U();
}), Object.assign(e.zoom, {
enable: $,
disable: N,
in: V,
out: G,
toggle: j
});
}
function ja(r) {
let {
swiper: e,
extendParams: t,
on: i,
emit: s,
params: n
} = r;
e.autoplay = {
running: !1,
paused: !1,
timeLeft: 0
}, t({
autoplay: {
enabled: !1,
delay: 3e3,
waitForTransition: !0,
disableOnInteraction: !1,
stopOnLastSlide: !1,
reverseDirection: !1,
pauseOnMouseEnter: !1
}
});
let a, o, l = n && n.autoplay ? n.autoplay.delay : 3e3, d = n && n.autoplay ? n.autoplay.delay : 3e3, c, u = new Date().getTime(), f, h, p, g, m, y, E;
function T(H) {
!e || e.destroyed || !e.wrapperEl || H.target === e.wrapperEl && (e.wrapperEl.removeEventListener("transitionend", T), !(E || H.detail && H.detail.bySwiperTouchMove) && x());
}
const L = () => {
if (e.destroyed || !e.autoplay.running)
return;
e.autoplay.paused ? f = !0 : f && (d = c, f = !1);
const H = e.autoplay.paused ? c : u + d - new Date().getTime();
e.autoplay.timeLeft = H, s("autoplayTimeLeft", H, H / l), o = requestAnimationFrame(() => {
L();
});
}, S = () => {
let H;
return e.virtual && e.params.virtual.enabled ? H = e.slides.filter((N) => N.classList.contains("swiper-slide-active"))[0] : H = e.slides[e.activeIndex], H ? parseInt(H.getAttribute("data-swiper-autoplay"), 10) : void 0;
}, A = (H) => {
if (e.destroyed || !e.autoplay.running)
return;
cancelAnimationFrame(o), L();
let $ = typeof H > "u" ? e.params.autoplay.delay : H;
l = e.params.autoplay.delay, d = e.params.autoplay.delay;
const N = S();
!Number.isNaN(N) && N > 0 && typeof H > "u" && ($ = N, l = N, d = N), c = $;
const k = e.params.speed, O = () => {
!e || e.destroyed || (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(k, !0, !0), s("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(e.slides.length - 1, k, !0, !0), s("autoplay")) : !e.isEnd || e.params.loop || e.params.rewind ? (e.slideNext(k, !0, !0), s("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(0, k, !0, !0), s("autoplay")), e.params.cssMode && (u = new Date().getTime(), requestAnimationFrame(() => {
A();
})));
};
return $ > 0 ? (clearTimeout(a), a = setTimeout(() => {
O();
}, $)) : requestAnimationFrame(() => {
O();
}), $;
}, w = () => {
u = new Date().getTime(), e.autoplay.running = !0, A(), s("autoplayStart");
}, C = () => {
e.autoplay.running = !1, clearTimeout(a), cancelAnimationFrame(o), s("autoplayStop");
}, R = (H, $) => {
if (e.destroyed || !e.autoplay.running)
return;
clearTimeout(a), H || (y = !0);
const N = () => {
s("autoplayPause"), e.params.autoplay.waitForTransition ? e.wrapperEl.addEventListener("transitionend", T) : x();
};
if (e.autoplay.paused = !0, $) {
m && (c = e.params.autoplay.delay), m = !1, N();
return;
}
c = (c || e.params.autoplay.delay) - (new Date().getTime() - u), !(e.isEnd && c < 0 && !e.params.loop) && (c < 0 && (c = 0), N());
}, x = () => {
e.isEnd && c < 0 && !e.params.loop || e.destroyed || !e.autoplay.running || (u = new Date().getTime(), y ? (y = !1, A(c)) : A(), e.autoplay.paused = !1, s("autoplayResume"));
}, D = () => {
if (e.destroyed || !e.autoplay.running)
return;
const H = xe();
H.visibilityState === "hidden" && (y = !0, R(!0)), H.visibilityState === "visible" && x();
}, F = (H) => {
H.pointerType === "mouse" && (y = !0, E = !0, !(e.animating || e.autoplay.paused) && R(!0));
}, _ = (H) => {
H.pointerType === "mouse" && (E = !1, e.autoplay.paused && x());
}, U = () => {
e.params.autoplay.pauseOnMouseEnter && (e.el.addEventListener("pointerenter", F), e.el.addEventListener("pointerleave", _));
}, V = () => {
e.el && typeof e.el != "string" && (e.el.removeEventListener("pointerenter", F), e.el.removeEventListener("pointerleave", _));
}, G = () => {
xe().addEventListener("visibilitychange", D);
}, j = () => {
xe().removeEventListener("visibilitychange", D);
};
i("init", () => {
e.params.autoplay.enabled && (U(), G(), w());
}), i("destroy", () => {
V(), j(), e.autoplay.running && C();
}), i("_freeModeStaticRelease", () => {
(p || y) && x();
}), i("_freeModeNoMomentumRelease", () => {
e.params.autoplay.disableOnInteraction ? C() : R(!0, !0);
}), i("beforeTransitionStart", (H, $, N) => {
e.destroyed || !e.autoplay.running || (N || !e.params.autoplay.disableOnInteraction ? R(!0, !0) : C());
}), i("sliderFirstMove", () => {
if (!(e.destroyed || !e.autoplay.running)) {
if (e.params.autoplay.disableOnInteraction) {
C();
return;
}
h = !0, p = !1, y = !1, g = setTimeout(() => {
y = !0, p = !0, R(!0);
}, 200);
}
}), i("touchEnd", () => {
if (!(e.destroyed || !e.autoplay.running || !h)) {
if (clearTimeout(g), clearTimeout(a), e.params.autoplay.disableOnInteraction) {
p = !1, h = !1;
return;
}
p && e.params.cssMode && x(), p = !1, h = !1;
}
}), i("slideChange", () => {
e.destroyed || !e.autoplay.running || (m = !0);
}), Object.assign(e.autoplay, {
start: w,
stop: C,
pause: R,
resume: x
});
}
let Si;
function Xa() {
const r = he(), e = xe();
return {
smoothScroll: e.documentElement && e.documentElement.style && "scrollBehavior" in e.documentElement.style,
touch: !!("ontouchstart" in r || r.DocumentTouch && e instanceof r.DocumentTouch)
};
}
function un() {
return Si || (Si = Xa()), Si;
}
let xi;
function qa(r) {
let {
userAgent: e
} = r === void 0 ? {} : r;
const t = un(), i = he(), s = i.navigator.platform, n = e || i.navigator.userAgent, a = {
ios: !1,
android: !1
}, o = i.screen.width, l = i.screen.height, d = n.match(/(Android);?[\s\/]+([\d.]+)?/);
let c = n.match(/(iPad).*OS\s([\d_]+)/);
const u = n.match(/(iPod)(.*OS\s([\d_]+))?/), f = !c && n.match(/(iPhone\sOS|iOS)\s([\d_]+)/), h = s === "Win32";
let p = s === "MacIntel";
const g = ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"];
return !c && p && t.touch && g.indexOf(`${o}x${l}`) >= 0 && (c = n.match(/(Version)\/([\d.]+)/), c || (c = [0, 1, "13_0_0"]), p = !1), d && !h && (a.os = "android", a.android = !0), (c || f || u) && (a.os = "ios", a.ios = !0), a;
}
function fn(r) {
return r === void 0 && (r = {}), xi || (xi = qa(r)), xi;
}
let Li;
function Qa() {
const r = he(), e = fn();
let t = !1;
function i() {
const o = r.navigator.userAgent.toLowerCase();
return o.indexOf("safari") >= 0 && o.indexOf("chrome") < 0 && o.indexOf("android") < 0;
}
if (i()) {
const o = String(r.navigator.userAgent);
if (o.includes("Version/")) {
const [l, d] = o.split("Version/")[1].split(" ")[0].split(".").map((c) => Number(c));
t = l < 16 || l === 16 && d < 2;
}
}
const s = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(r.navigator.userAgent), n = i(), a = n || s && e.ios;
return {
isSafari: t || n,
needPerspectiveFix: t,
need3dFix: a,
isWebView: s
};
}
function Ja() {
return Li || (Li = Qa()), Li;
}
function Za(r) {
let {
swiper: e,
on: t,
emit: i
} = r;
const s = he();
let n = null, a = null;
const o = () => {
!e || e.destroyed || !e.initialized || (i("beforeResize"), i("resize"));
}, l = () => {
!e || e.destroyed || !e.initialized || (n = new ResizeObserver((u) => {
a = s.requestAnimationFrame(() => {
const {
width: f,
height: h
} = e;
let p = f, g = h;
u.forEach((m) => {
let {
contentBoxSize: y,
contentRect: E,
target: T
} = m;
T && T !== e.el || (p = E ? E.width : (y[0] || y).inlineSize, g = E ? E.height : (y[0] || y).blockSize);
}), (p !== f || g !== h) && o();
});
}), n.observe(e.el));
}, d = () => {
a && s.cancelAnimationFrame(a), n && n.unobserve && e.el && (n.unobserve(e.el), n = null);
}, c = () => {
!e || e.destroyed || !e.initialized || i("orientationchange");
};
t("init", () => {
if (e.params.resizeObserver && typeof s.ResizeObserver < "u") {
l();
return;
}
s.addEventListener("resize", o), s.addEventListener("orientationchange", c);
}), t("destroy", () => {
d(), s.removeEventListener("resize", o), s.removeEventListener("orientationchange", c);
});
}
function eo(r) {
let {
swiper: e,
extendParams: t,
on: i,
emit: s
} = r;
const n = [], a = he(), o = function(c, u) {
u === void 0 && (u = {});
const f = a.MutationObserver || a.WebkitMutationObserver, h = new f((p) => {
if (e.__preventObserver__)
return;
if (p.length === 1) {
s("observerUpdate", p[0]);
return;
}
const g = function() {
s("observerUpdate", p[0]);
};
a.requestAnimationFrame ? a.requestAnimationFrame(g) : a.setTimeout(g, 0);
});
h.observe(c, {
attributes: typeof u.attributes > "u" ? !0 : u.attributes,
childList: e.isElement || (typeof u.childList > "u" ? !0 : u).childList,
characterData: typeof u.characterData > "u" ? !0 : u.characterData
}), n.push(h);
}, l = () => {
if (e.params.observer) {
if (e.params.observeParents) {
const c = ot(e.hostEl);
for (let u = 0; u < c.length; u += 1)
o(c[u]);
}
o(e.hostEl, {
childList: e.params.observeSlideChildren
}), o(e.wrapperEl, {
attributes: !1
});
}
}, d = () => {
n.forEach((c) => {
c.disconnect();
}), n.splice(0, n.length);
};
t({
observer: !1,
observeParents: !1,
observeSlideChildren: !1
}), i("init", l), i("destroy", d);
}
var to = {
on(r, e, t) {
const i = this;
if (!i.eventsListeners || i.destroyed || typeof e != "function")
return i;
const s = t ? "unshift" : "push";
return r.split(" ").forEach((n) => {
i.eventsListeners[n] || (i.eventsListeners[n] = []), i.eventsListeners[n][s](e);
}), i;
},
once(r, e, t) {
const i = this;
if (!i.eventsListeners || i.destroyed || typeof e != "function")
return i;
function s() {
i.off(r, s), s.__emitterProxy && delete s.__emitterProxy;
for (var n = arguments.length, a = new Array(n), o = 0; o < n; o++)
a[o] = arguments[o];
e.apply(i, a);
}
return s.__emitterProxy = e, i.on(r, s, t);
},
onAny(r, e) {
const t = this;
if (!t.eventsListeners || t.destroyed || typeof r != "function")
return t;
const i = e ? "unshift" : "push";
return t.eventsAnyListeners.indexOf(r) < 0 && t.eventsAnyListeners[i](r), t;
},
offAny(r) {
const e = this;
if (!e.eventsListeners || e.destroyed || !e.eventsAnyListeners)
return e;
const t = e.eventsAnyListeners.indexOf(r);
return t >= 0 && e.eventsAnyListeners.splice(t, 1), e;
},
off(r, e) {
const t = this;
return !t.eventsListeners || t.destroyed || !t.eventsListeners || r.split(" ").forEach((i) => {
typeof e > "u" ? t.eventsListeners[i] = [] : t.eventsListeners[i] && t.eventsListeners[i].forEach((s, n) => {
(s === e || s.__emitterProxy && s.__emitterProxy === e) && t.eventsListeners[i].splice(n, 1);
});
}), t;
},
emit() {
const r = this;
if (!r.eventsListeners || r.destroyed || !r.eventsListeners)
return r;
let e, t, i;
for (var s = arguments.length, n = new Array(s), a = 0; a < s; a++)
n[a] = arguments[a];
return typeof n[0] == "string" || Array.isArray(n[0]) ? (e = n[0], t = n.slice(1, n.length), i = r) : (e = n[0].events, t = n[0].data, i = n[0].context || r), t.unshift(i), (Array.isArray(e) ? e : e.split(" ")).forEach((l) => {
r.eventsAnyListeners && r.eventsAnyListeners.length && r.eventsAnyListeners.forEach((d) => {
d.apply(i, [l, ...t]);
}), r.eventsListeners && r.eventsListeners[l] && r.eventsListeners[l].forEach((d) => {
d.apply(i, t);
});
}), r;
}
};
function io() {
const r = this;
let e, t;
const i = r.el;
typeof r.params.width < "u" && r.params.width !== null ? e = r.params.width : e = i.clientWidth, typeof r.params.height < "u" && r.params.height !== null ? t = r.params.height : t = i.clientHeight, !(e === 0 && r.isHorizontal() || t === 0 && r.isVertical()) && (e = e - parseInt(We(i, "padding-left") || 0, 10) - parseInt(We(i, "padding-right") || 0, 10), t = t - parseInt(We(i, "padding-top") || 0, 10) - parseInt(We(i, "padding-bottom") || 0, 10), Number.isNaN(e) && (e = 0), Number.isNaN(t) && (t = 0), Object.assign(r, {
width: e,
height: t,
size: r.isHorizontal() ? e : t
}));
}
function so() {
const r = this;
function e(x, D) {
return parseFloat(x.getPropertyValue(r.getDirectionLabel(D)) || 0);
}
const t = r.params, {
wrapperEl: i,
slidesEl: s,
size: n,
rtlTranslate: a,
wrongRTL: o
} = r, l = r.virtual && t.virtual.enabled, d = l ? r.virtual.slides.length : r.slides.length, c = Se(s, `.${r.params.slideClass}, swiper-slide`), u = l ? r.virtual.slides.length : c.length;
let f = [];
const h = [], p = [];
let g = t.slidesOffsetBefore;
typeof g == "function" && (g = t.slidesOffsetBefore.call(r));
let m = t.slidesOffsetAfter;
typeof m == "function" && (m = t.slidesOffsetAfter.call(r));
const y = r.snapGrid.length, E = r.slidesGrid.length;
let T = t.spaceBetween, L = -g, S = 0, A = 0;
if (typeof n > "u")
return;
typeof T == "string" && T.indexOf("%") >= 0 ? T = parseFloat(T.replace("%", "")) / 100 * n : typeof T == "string" && (T = parseFloat(T)), r.virtualSize = -T, c.forEach((x) => {
a ? x.style.marginLeft = "" : x.style.marginRight = "", x.style.marginBottom = "", x.style.marginTop = "";
}), t.centeredSlides && t.cssMode && (Tt(i, "--swiper-centered-offset-before", ""), Tt(i, "--swiper-centered-offset-after", ""));
const w = t.grid && t.grid.rows > 1 && r.grid;
w ? r.grid.initSlides(c) : r.grid && r.grid.unsetSlides();
let C;
const R = t.slidesPerView === "auto" && t.breakpoints && Object.keys(t.breakpoints).filter((x) => typeof t.breakpoints[x].slidesPerView < "u").length > 0;
for (let x = 0; x < u; x += 1) {
C = 0;
let D;
if (c[x] && (D = c[x]), w && r.grid.updateSlide(x, D, c), !(c[x] && We(D, "display") === "none")) {
if (t.slidesPerView === "auto") {
R && (c[x].style[r.getDirectionLabel("width")] = "");
const F = getComputedStyle(D), _ = D.style.transform, U = D.style.webkitTransform;
if (_ && (D.style.transform = "none"), U && (D.style.webkitTransform = "none"), t.roundLengths)
C = r.isHorizontal() ? js(D, "width", !0) : js(D, "height", !0);
else {
const V = e(F, "width"), G = e(F, "padding-left"), j = e(F, "padding-right"), H = e(F, "margin-left"), $ = e(F, "margin-right"), N = F.getPropertyValue("box-sizing");
if (N && N === "border-box")
C = V + H + $;
else {
const {
clientWidth: k,
offsetWidth: O
} = D;
C = V + G + j + H + $ + (O - k);
}
}
_ && (D.style.transform = _), U && (D.style.webkitTransform = U), t.roundLengths && (C = Math.floor(C));
} else
C = (n - (t.slidesPerView - 1) * T) / t.slidesPerView, t.roundLengths && (C = Math.floor(C)), c[x] && (c[x].style[r.getDirectionLabel("width")] = `${C}px`);
c[x] && (c[x].swiperSlideSize = C), p.push(C), t.centeredSlides ? (L = L + C / 2 + S / 2 + T, S === 0 && x !== 0 && (L = L - n / 2 - T), x === 0 && (L = L - n / 2 - T), Math.abs(L) < 1 / 1e3 && (L = 0), t.roundLengths && (L = Math.floor(L)), A % t.slidesPerGroup === 0 && f.push(L), h.push(L)) : (t.roundLengths && (L = Math.floor(L)), (A - Math.min(r.params.slidesPerGroupSkip, A)) % r.params.slidesPerGroup === 0 && f.push(L), h.push(L), L = L + C + T), r.virtualSize += C + T, S = C, A += 1;
}
}
if (r.virtualSize = Math.max(r.virtualSize, n) + m, a && o && (t.effect === "slide" || t.effect === "coverflow") && (i.style.width = `${r.virtualSize + T}px`), t.setWrapperSize && (i.style[r.getDirectionLabel("width")] = `${r.virtualSize + T}px`), w && r.grid.updateWrapperSize(C, f), !t.centeredSlides) {
const x = [];
for (let D = 0; D < f.length; D += 1) {
let F = f[D];
t.roundLengths && (F = Math.floor(F)), f[D] <= r.virtualSize - n && x.push(F);
}
f = x, Math.floor(r.virtualSize - n) - Math.floor(f[f.length - 1]) > 1 && f.push(r.virtualSize - n);
}
if (l && t.loop) {
const x = p[0] + T;
if (t.slidesPerGroup > 1) {
const D = Math.ceil((r.virtual.slidesBefore + r.virtual.slidesAfter) / t.slidesPerGroup), F = x * t.slidesPerGroup;
for (let _ = 0; _ < D; _ += 1)
f.push(f[f.length - 1] + F);
}
for (let D = 0; D < r.virtual.slidesBefore + r.virtual.slidesAfter; D += 1)
t.slidesPerGroup === 1 && f.push(f[f.length - 1] + x), h.push(h[h.length - 1] + x), r.virtualSize += x;
}
if (f.length === 0 && (f = [0]), T !== 0) {
const x = r.isHorizontal() && a ? "marginLeft" : r.getDirectionLabel("marginRight");
c.filter((D, F) => !t.cssMode || t.loop ? !0 : F !== c.length - 1).forEach((D) => {
D.style[x] = `${T}px`;
});
}
if (t.centeredSlides && t.centeredSlidesBounds) {
let x = 0;
p.forEach((F) => {
x += F + (T || 0);
}), x -= T;
const D = x > n ? x - n : 0;
f = f.map((F) => F <= 0 ? -g : F > D ? D + m : F);
}
if (t.centerInsufficientSlides) {
let x = 0;
p.forEach((F) => {
x += F + (T || 0);
}), x -= T;
const D = (t.slidesOffsetBefore || 0) + (t.slidesOffsetAfter || 0);
if (x + D < n) {
const F = (n - x -