{"version":3,"file":"swiper-bundle.esm.browser.js.map","sources":["../node_modules/ssr-window/ssr-window.esm.js","../node_modules/dom7/dom7.esm.js","../src/shared/dom.js","../src/shared/utils.js","../src/shared/get-support.js","../src/shared/get-device.js","../src/shared/get-browser.js","../src/core/modules/resize/resize.js","../src/core/modules/observer/observer.js","../src/core/events-emitter.js","../src/core/update/updateSize.js","../src/core/update/updateSlides.js","../src/core/update/updateAutoHeight.js","../src/core/update/updateSlidesOffset.js","../src/core/update/updateSlidesProgress.js","../src/core/update/updateProgress.js","../src/core/update/updateSlidesClasses.js","../src/core/update/updateActiveIndex.js","../src/core/update/updateClickedSlide.js","../src/core/update/index.js","../src/core/translate/getTranslate.js","../src/core/translate/setTranslate.js","../src/core/translate/minTranslate.js","../src/core/translate/maxTranslate.js","../src/core/translate/translateTo.js","../src/core/translate/index.js","../src/core/transition/setTransition.js","../src/core/transition/transitionEmit.js","../src/core/transition/transitionStart.js","../src/core/transition/transitionEnd.js","../src/core/transition/index.js","../src/core/slide/slideTo.js","../src/core/slide/slideToLoop.js","../src/core/slide/slideNext.js","../src/core/slide/slidePrev.js","../src/core/slide/slideReset.js","../src/core/slide/slideToClosest.js","../src/core/slide/slideToClickedSlide.js","../src/core/slide/index.js","../src/core/loop/loopCreate.js","../src/core/loop/loopFix.js","../src/core/loop/loopDestroy.js","../src/core/loop/index.js","../src/core/grab-cursor/setGrabCursor.js","../src/core/grab-cursor/unsetGrabCursor.js","../src/core/grab-cursor/index.js","../src/core/events/onTouchStart.js","../src/core/events/onTouchMove.js","../src/core/events/onTouchEnd.js","../src/core/events/onResize.js","../src/core/events/onClick.js","../src/core/events/onScroll.js","../src/core/events/index.js","../src/core/breakpoints/setBreakpoint.js","../src/core/breakpoints/getBreakpoint.js","../src/core/breakpoints/index.js","../src/core/classes/addClasses.js","../src/core/classes/removeClasses.js","../src/core/classes/index.js","../src/core/images/loadImage.js","../src/core/images/preloadImages.js","../src/core/images/index.js","../src/core/check-overflow/index.js","../src/core/defaults.js","../src/core/moduleExtendParams.js","../src/core/core.js","../src/modules/virtual/virtual.js","../src/modules/keyboard/keyboard.js","../src/modules/mousewheel/mousewheel.js","../src/modules/navigation/navigation.js","../src/modules/pagination/pagination.js","../src/modules/scrollbar/scrollbar.js","../src/modules/parallax/parallax.js","../src/modules/zoom/zoom.js","../src/modules/lazy/lazy.js","../src/modules/controller/controller.js","../src/modules/a11y/a11y.js","../src/modules/history/history.js","../src/modules/hash-navigation/hash-navigation.js","../src/modules/autoplay/autoplay.js","../src/modules/effect-fade/effect-fade.js","../src/modules/effect-cube/effect-cube.js","../src/modules/effect-flip/effect-flip.js","../src/modules/effect-coverflow/effect-coverflow.js","../src/modules/thumbs/thumbs.js","../src/modules/free-mode/free-mode.js","../src/modules/grid/grid.js","../src/modules/manipulation/methods/appendSlide.js","../src/modules/manipulation/methods/prependSlide.js","../src/modules/manipulation/methods/addSlide.js","../src/modules/manipulation/methods/removeSlide.js","../src/modules/manipulation/methods/removeAllSlides.js","../src/modules/manipulation/manipulation.js","../src/swiper.js"],"sourcesContent":["/**\n * SSR Window 4.0.0-beta.3\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: August 4, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return (obj !== null &&\n typeof obj === 'object' &&\n 'constructor' in obj &&\n obj.constructor === Object);\n}\nfunction extend(target = {}, src = {}) {\n Object.keys(src).forEach((key) => {\n if (typeof target[key] === 'undefined')\n target[key] = src[key];\n else if (isObject(src[key]) &&\n isObject(target[key]) &&\n Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\n\nconst ssrDocument = {\n body: {},\n addEventListener() { },\n removeEventListener() { },\n activeElement: {\n blur() { },\n nodeName: '',\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() { },\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() { },\n getElementsByTagName() {\n return [];\n },\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\n\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: '',\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n history: {\n replaceState() { },\n pushState() { },\n go() { },\n back() { },\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() { },\n removeEventListener() { },\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n },\n };\n },\n Image() { },\n Date() { },\n screen: {},\n setTimeout() { },\n clearTimeout() { },\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n },\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { extend, getDocument, getWindow, ssrDocument, ssrWindow };\n","/**\n * Dom7 4.0.0-beta.3\n * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API\n * https://framework7.io/docs/dom7.html\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: August 4, 2021\n */\nimport { getWindow, getDocument } from 'ssr-window';\n\n/* eslint-disable no-proto */\nfunction makeReactive(obj) {\n const proto = obj.__proto__;\n Object.defineProperty(obj, '__proto__', {\n get() {\n return proto;\n },\n\n set(value) {\n proto.__proto__ = value;\n }\n\n });\n}\n\nclass Dom7 extends Array {\n constructor(items) {\n super(...(items || []));\n makeReactive(this);\n }\n\n}\n\nfunction arrayFlat(arr = []) {\n const res = [];\n arr.forEach(el => {\n if (Array.isArray(el)) {\n res.push(...arrayFlat(el));\n } else {\n res.push(el);\n }\n });\n return res;\n}\nfunction arrayFilter(arr, callback) {\n return Array.prototype.filter.call(arr, callback);\n}\nfunction arrayUnique(arr) {\n const uniqueArray = [];\n\n for (let i = 0; i < arr.length; i += 1) {\n if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]);\n }\n\n return uniqueArray;\n}\nfunction toCamelCase(string) {\n return string.toLowerCase().replace(/-(.)/g, (match, group) => group.toUpperCase());\n}\n\n// eslint-disable-next-line\n\nfunction qsa(selector, context) {\n if (typeof selector !== 'string') {\n return [selector];\n }\n\n const a = [];\n const res = context.querySelectorAll(selector);\n\n for (let i = 0; i < res.length; i += 1) {\n a.push(res[i]);\n }\n\n return a;\n}\n\nfunction $(selector, context) {\n const window = getWindow();\n const document = getDocument();\n let arr = [];\n\n if (!context && selector instanceof Dom7) {\n return selector;\n }\n\n if (!selector) {\n return new Dom7(arr);\n }\n\n if (typeof selector === 'string') {\n const html = selector.trim();\n\n if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {\n let toCreate = 'div';\n if (html.indexOf(' c.split(' ')));\n this.forEach(el => {\n el.classList.add(...classNames);\n });\n return this;\n}\n\nfunction removeClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n this.forEach(el => {\n el.classList.remove(...classNames);\n });\n return this;\n}\n\nfunction toggleClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n this.forEach(el => {\n classNames.forEach(className => {\n el.classList.toggle(className);\n });\n });\n}\n\nfunction hasClass(...classes) {\n const classNames = arrayFlat(classes.map(c => c.split(' ')));\n return arrayFilter(this, el => {\n return classNames.filter(className => el.classList.contains(className)).length > 0;\n }).length > 0;\n}\n\nfunction attr(attrs, value) {\n if (arguments.length === 1 && typeof attrs === 'string') {\n // Get attr\n if (this[0]) return this[0].getAttribute(attrs);\n return undefined;\n } // Set attrs\n\n\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i].setAttribute(attrs, value);\n } else {\n // Object\n for (const attrName in attrs) {\n this[i][attrName] = attrs[attrName];\n this[i].setAttribute(attrName, attrs[attrName]);\n }\n }\n }\n\n return this;\n}\n\nfunction removeAttr(attr) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].removeAttribute(attr);\n }\n\n return this;\n}\n\nfunction prop(props, value) {\n if (arguments.length === 1 && typeof props === 'string') {\n // Get prop\n if (this[0]) return this[0][props];\n } else {\n // Set props\n for (let i = 0; i < this.length; i += 1) {\n if (arguments.length === 2) {\n // String\n this[i][props] = value;\n } else {\n // Object\n for (const propName in props) {\n this[i][propName] = props[propName];\n }\n }\n }\n\n return this;\n }\n\n return this;\n}\n\nfunction data(key, value) {\n let el;\n\n if (typeof value === 'undefined') {\n el = this[0];\n if (!el) return undefined; // Get value\n\n if (el.dom7ElementDataStorage && key in el.dom7ElementDataStorage) {\n return el.dom7ElementDataStorage[key];\n }\n\n const dataKey = el.getAttribute(`data-${key}`);\n\n if (dataKey) {\n return dataKey;\n }\n\n return undefined;\n } // Set value\n\n\n for (let i = 0; i < this.length; i += 1) {\n el = this[i];\n if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};\n el.dom7ElementDataStorage[key] = value;\n }\n\n return this;\n}\n\nfunction removeData(key) {\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) {\n el.dom7ElementDataStorage[key] = null;\n delete el.dom7ElementDataStorage[key];\n }\n }\n}\n\nfunction dataset() {\n const el = this[0];\n if (!el) return undefined;\n const dataset = {}; // eslint-disable-line\n\n if (el.dataset) {\n for (const dataKey in el.dataset) {\n dataset[dataKey] = el.dataset[dataKey];\n }\n } else {\n for (let i = 0; i < el.attributes.length; i += 1) {\n const attr = el.attributes[i];\n\n if (attr.name.indexOf('data-') >= 0) {\n dataset[toCamelCase(attr.name.split('data-')[1])] = attr.value;\n }\n }\n }\n\n for (const key in dataset) {\n if (dataset[key] === 'false') dataset[key] = false;else if (dataset[key] === 'true') dataset[key] = true;else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1;\n }\n\n return dataset;\n}\n\nfunction val(value) {\n if (typeof value === 'undefined') {\n // get value\n const el = this[0];\n if (!el) return undefined;\n\n if (el.multiple && el.nodeName.toLowerCase() === 'select') {\n const values = [];\n\n for (let i = 0; i < el.selectedOptions.length; i += 1) {\n values.push(el.selectedOptions[i].value);\n }\n\n return values;\n }\n\n return el.value;\n } // set value\n\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') {\n for (let j = 0; j < el.options.length; j += 1) {\n el.options[j].selected = value.indexOf(el.options[j].value) >= 0;\n }\n } else {\n el.value = value;\n }\n }\n\n return this;\n}\n\nfunction value(value) {\n return this.val(value);\n}\n\nfunction transform(transform) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.transform = transform;\n }\n\n return this;\n}\n\nfunction transition(duration) {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.transitionDuration = typeof duration !== 'string' ? `${duration}ms` : duration;\n }\n\n return this;\n}\n\nfunction on(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n\n if (!capture) capture = false;\n\n function handleLiveEvent(e) {\n const target = e.target;\n if (!target) return;\n const eventData = e.target.dom7EventData || [];\n\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n\n if ($(target).is(targetSelector)) listener.apply(target, eventData);else {\n const parents = $(target).parents(); // eslint-disable-line\n\n for (let k = 0; k < parents.length; k += 1) {\n if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData);\n }\n }\n }\n\n function handleEvent(e) {\n const eventData = e && e.target ? e.target.dom7EventData || [] : [];\n\n if (eventData.indexOf(e) < 0) {\n eventData.unshift(e);\n }\n\n listener.apply(this, eventData);\n }\n\n const events = eventType.split(' ');\n let j;\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (!targetSelector) {\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7Listeners) el.dom7Listeners = {};\n if (!el.dom7Listeners[event]) el.dom7Listeners[event] = [];\n el.dom7Listeners[event].push({\n listener,\n proxyListener: handleEvent\n });\n el.addEventListener(event, handleEvent, capture);\n }\n } else {\n // Live events\n for (j = 0; j < events.length; j += 1) {\n const event = events[j];\n if (!el.dom7LiveListeners) el.dom7LiveListeners = {};\n if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = [];\n el.dom7LiveListeners[event].push({\n listener,\n proxyListener: handleLiveEvent\n });\n el.addEventListener(event, handleLiveEvent, capture);\n }\n }\n }\n\n return this;\n}\n\nfunction off(...args) {\n let [eventType, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventType, listener, capture] = args;\n targetSelector = undefined;\n }\n\n if (!capture) capture = false;\n const events = eventType.split(' ');\n\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n let handlers;\n\n if (!targetSelector && el.dom7Listeners) {\n handlers = el.dom7Listeners[event];\n } else if (targetSelector && el.dom7LiveListeners) {\n handlers = el.dom7LiveListeners[event];\n }\n\n if (handlers && handlers.length) {\n for (let k = handlers.length - 1; k >= 0; k -= 1) {\n const handler = handlers[k];\n\n if (listener && handler.listener === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n } else if (!listener) {\n el.removeEventListener(event, handler.proxyListener, capture);\n handlers.splice(k, 1);\n }\n }\n }\n }\n }\n\n return this;\n}\n\nfunction once(...args) {\n const dom = this;\n let [eventName, targetSelector, listener, capture] = args;\n\n if (typeof args[1] === 'function') {\n [eventName, listener, capture] = args;\n targetSelector = undefined;\n }\n\n function onceHandler(...eventArgs) {\n listener.apply(this, eventArgs);\n dom.off(eventName, targetSelector, onceHandler, capture);\n\n if (onceHandler.dom7proxy) {\n delete onceHandler.dom7proxy;\n }\n }\n\n onceHandler.dom7proxy = listener;\n return dom.on(eventName, targetSelector, onceHandler, capture);\n}\n\nfunction trigger(...args) {\n const window = getWindow();\n const events = args[0].split(' ');\n const eventData = args[1];\n\n for (let i = 0; i < events.length; i += 1) {\n const event = events[i];\n\n for (let j = 0; j < this.length; j += 1) {\n const el = this[j];\n\n if (window.CustomEvent) {\n const evt = new window.CustomEvent(event, {\n detail: eventData,\n bubbles: true,\n cancelable: true\n });\n el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0);\n el.dispatchEvent(evt);\n el.dom7EventData = [];\n delete el.dom7EventData;\n }\n }\n }\n\n return this;\n}\n\nfunction transitionEnd(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('transitionend', fireCallBack);\n }\n\n if (callback) {\n dom.on('transitionend', fireCallBack);\n }\n\n return this;\n}\n\nfunction animationEnd(callback) {\n const dom = this;\n\n function fireCallBack(e) {\n if (e.target !== this) return;\n callback.call(this, e);\n dom.off('animationend', fireCallBack);\n }\n\n if (callback) {\n dom.on('animationend', fireCallBack);\n }\n\n return this;\n}\n\nfunction width() {\n const window = getWindow();\n\n if (this[0] === window) {\n return window.innerWidth;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('width'));\n }\n\n return null;\n}\n\nfunction outerWidth(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n const styles = this.styles();\n return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));\n }\n\n return this[0].offsetWidth;\n }\n\n return null;\n}\n\nfunction height() {\n const window = getWindow();\n\n if (this[0] === window) {\n return window.innerHeight;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('height'));\n }\n\n return null;\n}\n\nfunction outerHeight(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n const styles = this.styles();\n return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));\n }\n\n return this[0].offsetHeight;\n }\n\n return null;\n}\n\nfunction offset() {\n if (this.length > 0) {\n const window = getWindow();\n const document = getDocument();\n const el = this[0];\n const box = el.getBoundingClientRect();\n const body = document.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === window ? window.scrollY : el.scrollTop;\n const scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: box.top + scrollTop - clientTop,\n left: box.left + scrollLeft - clientLeft\n };\n }\n\n return null;\n}\n\nfunction hide() {\n for (let i = 0; i < this.length; i += 1) {\n this[i].style.display = 'none';\n }\n\n return this;\n}\n\nfunction show() {\n const window = getWindow();\n\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.style.display === 'none') {\n el.style.display = '';\n }\n\n if (window.getComputedStyle(el, null).getPropertyValue('display') === 'none') {\n // Still not visible\n el.style.display = 'block';\n }\n }\n\n return this;\n}\n\nfunction styles() {\n const window = getWindow();\n if (this[0]) return window.getComputedStyle(this[0], null);\n return {};\n}\n\nfunction css(props, value) {\n const window = getWindow();\n let i;\n\n if (arguments.length === 1) {\n if (typeof props === 'string') {\n // .css('width')\n if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props);\n } else {\n // .css({ width: '100px' })\n for (i = 0; i < this.length; i += 1) {\n for (const prop in props) {\n this[i].style[prop] = props[prop];\n }\n }\n\n return this;\n }\n }\n\n if (arguments.length === 2 && typeof props === 'string') {\n // .css('width', '100px')\n for (i = 0; i < this.length; i += 1) {\n this[i].style[props] = value;\n }\n\n return this;\n }\n\n return this;\n}\n\nfunction each(callback) {\n if (!callback) return this;\n this.forEach((el, index) => {\n callback.apply(el, [el, index]);\n });\n return this;\n}\n\nfunction filter(callback) {\n const result = arrayFilter(this, callback);\n return $(result);\n}\n\nfunction html(html) {\n if (typeof html === 'undefined') {\n return this[0] ? this[0].innerHTML : null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].innerHTML = html;\n }\n\n return this;\n}\n\nfunction text(text) {\n if (typeof text === 'undefined') {\n return this[0] ? this[0].textContent.trim() : null;\n }\n\n for (let i = 0; i < this.length; i += 1) {\n this[i].textContent = text;\n }\n\n return this;\n}\n\nfunction is(selector) {\n const window = getWindow();\n const document = getDocument();\n const el = this[0];\n let compareWith;\n let i;\n if (!el || typeof selector === 'undefined') return false;\n\n if (typeof selector === 'string') {\n if (el.matches) return el.matches(selector);\n if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);\n if (el.msMatchesSelector) return el.msMatchesSelector(selector);\n compareWith = $(selector);\n\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n\n return false;\n }\n\n if (selector === document) {\n return el === document;\n }\n\n if (selector === window) {\n return el === window;\n }\n\n if (selector.nodeType || selector instanceof Dom7) {\n compareWith = selector.nodeType ? [selector] : selector;\n\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) return true;\n }\n\n return false;\n }\n\n return false;\n}\n\nfunction index() {\n let child = this[0];\n let i;\n\n if (child) {\n i = 0; // eslint-disable-next-line\n\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n\n return i;\n }\n\n return undefined;\n}\n\nfunction eq(index) {\n if (typeof index === 'undefined') return this;\n const length = this.length;\n\n if (index > length - 1) {\n return $([]);\n }\n\n if (index < 0) {\n const returnIndex = length + index;\n if (returnIndex < 0) return $([]);\n return $([this[returnIndex]]);\n }\n\n return $([this[index]]);\n}\n\nfunction append(...els) {\n let newChild;\n const document = getDocument();\n\n for (let k = 0; k < els.length; k += 1) {\n newChild = els[k];\n\n for (let i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n\n while (tempDiv.firstChild) {\n this[i].appendChild(tempDiv.firstChild);\n }\n } else if (newChild instanceof Dom7) {\n for (let j = 0; j < newChild.length; j += 1) {\n this[i].appendChild(newChild[j]);\n }\n } else {\n this[i].appendChild(newChild);\n }\n }\n }\n\n return this;\n}\n\nfunction appendTo(parent) {\n $(parent).append(this);\n return this;\n}\n\nfunction prepend(newChild) {\n const document = getDocument();\n let i;\n let j;\n\n for (i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n\n for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {\n this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);\n }\n } else if (newChild instanceof Dom7) {\n for (j = 0; j < newChild.length; j += 1) {\n this[i].insertBefore(newChild[j], this[i].childNodes[0]);\n }\n } else {\n this[i].insertBefore(newChild, this[i].childNodes[0]);\n }\n }\n\n return this;\n}\n\nfunction prependTo(parent) {\n $(parent).prepend(this);\n return this;\n}\n\nfunction insertBefore(selector) {\n const before = $(selector);\n\n for (let i = 0; i < this.length; i += 1) {\n if (before.length === 1) {\n before[0].parentNode.insertBefore(this[i], before[0]);\n } else if (before.length > 1) {\n for (let j = 0; j < before.length; j += 1) {\n before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);\n }\n }\n }\n}\n\nfunction insertAfter(selector) {\n const after = $(selector);\n\n for (let i = 0; i < this.length; i += 1) {\n if (after.length === 1) {\n after[0].parentNode.insertBefore(this[i], after[0].nextSibling);\n } else if (after.length > 1) {\n for (let j = 0; j < after.length; j += 1) {\n after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);\n }\n }\n }\n}\n\nfunction next(selector) {\n if (this.length > 0) {\n if (selector) {\n if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) {\n return $([this[0].nextElementSibling]);\n }\n\n return $([]);\n }\n\n if (this[0].nextElementSibling) return $([this[0].nextElementSibling]);\n return $([]);\n }\n\n return $([]);\n}\n\nfunction nextAll(selector) {\n const nextEls = [];\n let el = this[0];\n if (!el) return $([]);\n\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n\n if (selector) {\n if ($(next).is(selector)) nextEls.push(next);\n } else nextEls.push(next);\n\n el = next;\n }\n\n return $(nextEls);\n}\n\nfunction prev(selector) {\n if (this.length > 0) {\n const el = this[0];\n\n if (selector) {\n if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) {\n return $([el.previousElementSibling]);\n }\n\n return $([]);\n }\n\n if (el.previousElementSibling) return $([el.previousElementSibling]);\n return $([]);\n }\n\n return $([]);\n}\n\nfunction prevAll(selector) {\n const prevEls = [];\n let el = this[0];\n if (!el) return $([]);\n\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n\n if (selector) {\n if ($(prev).is(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n\n el = prev;\n }\n\n return $(prevEls);\n}\n\nfunction siblings(selector) {\n return this.nextAll(selector).add(this.prevAll(selector));\n}\n\nfunction parent(selector) {\n const parents = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode !== null) {\n if (selector) {\n if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode);\n } else {\n parents.push(this[i].parentNode);\n }\n }\n }\n\n return $(parents);\n}\n\nfunction parents(selector) {\n const parents = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n let parent = this[i].parentNode; // eslint-disable-line\n\n while (parent) {\n if (selector) {\n if ($(parent).is(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n\n parent = parent.parentNode;\n }\n }\n\n return $(parents);\n}\n\nfunction closest(selector) {\n let closest = this; // eslint-disable-line\n\n if (typeof selector === 'undefined') {\n return $([]);\n }\n\n if (!closest.is(selector)) {\n closest = closest.parents(selector).eq(0);\n }\n\n return closest;\n}\n\nfunction find(selector) {\n const foundElements = [];\n\n for (let i = 0; i < this.length; i += 1) {\n const found = this[i].querySelectorAll(selector);\n\n for (let j = 0; j < found.length; j += 1) {\n foundElements.push(found[j]);\n }\n }\n\n return $(foundElements);\n}\n\nfunction children(selector) {\n const children = []; // eslint-disable-line\n\n for (let i = 0; i < this.length; i += 1) {\n const childNodes = this[i].children;\n\n for (let j = 0; j < childNodes.length; j += 1) {\n if (!selector || $(childNodes[j]).is(selector)) {\n children.push(childNodes[j]);\n }\n }\n }\n\n return $(children);\n}\n\nfunction remove() {\n for (let i = 0; i < this.length; i += 1) {\n if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);\n }\n\n return this;\n}\n\nfunction detach() {\n return this.remove();\n}\n\nfunction add(...els) {\n const dom = this;\n let i;\n let j;\n\n for (i = 0; i < els.length; i += 1) {\n const toAdd = $(els[i]);\n\n for (j = 0; j < toAdd.length; j += 1) {\n dom.push(toAdd[j]);\n }\n }\n\n return dom;\n}\n\nfunction empty() {\n for (let i = 0; i < this.length; i += 1) {\n const el = this[i];\n\n if (el.nodeType === 1) {\n for (let j = 0; j < el.childNodes.length; j += 1) {\n if (el.childNodes[j].parentNode) {\n el.childNodes[j].parentNode.removeChild(el.childNodes[j]);\n }\n }\n\n el.textContent = '';\n }\n }\n\n return this;\n}\n\n// eslint-disable-next-line\n\nfunction scrollTo(...args) {\n const window = getWindow();\n let [left, top, duration, easing, callback] = args;\n\n if (args.length === 4 && typeof easing === 'function') {\n callback = easing;\n [left, top, duration, callback, easing] = args;\n }\n\n if (typeof easing === 'undefined') easing = 'swing';\n return this.each(function animate() {\n const el = this;\n let currentTop;\n let currentLeft;\n let maxTop;\n let maxLeft;\n let newTop;\n let newLeft;\n let scrollTop; // eslint-disable-line\n\n let scrollLeft; // eslint-disable-line\n\n let animateTop = top > 0 || top === 0;\n let animateLeft = left > 0 || left === 0;\n\n if (typeof easing === 'undefined') {\n easing = 'swing';\n }\n\n if (animateTop) {\n currentTop = el.scrollTop;\n\n if (!duration) {\n el.scrollTop = top;\n }\n }\n\n if (animateLeft) {\n currentLeft = el.scrollLeft;\n\n if (!duration) {\n el.scrollLeft = left;\n }\n }\n\n if (!duration) return;\n\n if (animateTop) {\n maxTop = el.scrollHeight - el.offsetHeight;\n newTop = Math.max(Math.min(top, maxTop), 0);\n }\n\n if (animateLeft) {\n maxLeft = el.scrollWidth - el.offsetWidth;\n newLeft = Math.max(Math.min(left, maxLeft), 0);\n }\n\n let startTime = null;\n if (animateTop && newTop === currentTop) animateTop = false;\n if (animateLeft && newLeft === currentLeft) animateLeft = false;\n\n function render(time = new Date().getTime()) {\n if (startTime === null) {\n startTime = time;\n }\n\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2;\n let done;\n if (animateTop) scrollTop = currentTop + easeProgress * (newTop - currentTop);\n if (animateLeft) scrollLeft = currentLeft + easeProgress * (newLeft - currentLeft);\n\n if (animateTop && newTop > currentTop && scrollTop >= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n\n if (animateTop && newTop < currentTop && scrollTop <= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n\n if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (done) {\n if (callback) callback();\n return;\n }\n\n if (animateTop) el.scrollTop = scrollTop;\n if (animateLeft) el.scrollLeft = scrollLeft;\n window.requestAnimationFrame(render);\n }\n\n window.requestAnimationFrame(render);\n });\n} // scrollTop(top, duration, easing, callback) {\n\n\nfunction scrollTop(...args) {\n let [top, duration, easing, callback] = args;\n\n if (args.length === 3 && typeof easing === 'function') {\n [top, duration, callback, easing] = args;\n }\n\n const dom = this;\n\n if (typeof top === 'undefined') {\n if (dom.length > 0) return dom[0].scrollTop;\n return null;\n }\n\n return dom.scrollTo(undefined, top, duration, easing, callback);\n}\n\nfunction scrollLeft(...args) {\n let [left, duration, easing, callback] = args;\n\n if (args.length === 3 && typeof easing === 'function') {\n [left, duration, callback, easing] = args;\n }\n\n const dom = this;\n\n if (typeof left === 'undefined') {\n if (dom.length > 0) return dom[0].scrollLeft;\n return null;\n }\n\n return dom.scrollTo(left, undefined, duration, easing, callback);\n}\n\n// eslint-disable-next-line\n\nfunction animate(initialProps, initialParams) {\n const window = getWindow();\n const els = this;\n const a = {\n props: Object.assign({}, initialProps),\n params: Object.assign({\n duration: 300,\n easing: 'swing' // or 'linear'\n\n /* Callbacks\n begin(elements)\n complete(elements)\n progress(elements, complete, remaining, start, tweenValue)\n */\n\n }, initialParams),\n elements: els,\n animating: false,\n que: [],\n\n easingProgress(easing, progress) {\n if (easing === 'swing') {\n return 0.5 - Math.cos(progress * Math.PI) / 2;\n }\n\n if (typeof easing === 'function') {\n return easing(progress);\n }\n\n return progress;\n },\n\n stop() {\n if (a.frameId) {\n window.cancelAnimationFrame(a.frameId);\n }\n\n a.animating = false;\n a.elements.each(el => {\n const element = el;\n delete element.dom7AnimateInstance;\n });\n a.que = [];\n },\n\n done(complete) {\n a.animating = false;\n a.elements.each(el => {\n const element = el;\n delete element.dom7AnimateInstance;\n });\n if (complete) complete(els);\n\n if (a.que.length > 0) {\n const que = a.que.shift();\n a.animate(que[0], que[1]);\n }\n },\n\n animate(props, params) {\n if (a.animating) {\n a.que.push([props, params]);\n return a;\n }\n\n const elements = []; // Define & Cache Initials & Units\n\n a.elements.each((el, index) => {\n let initialFullValue;\n let initialValue;\n let unit;\n let finalValue;\n let finalFullValue;\n if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a;\n elements[index] = {\n container: el\n };\n Object.keys(props).forEach(prop => {\n initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.');\n initialValue = parseFloat(initialFullValue);\n unit = initialFullValue.replace(initialValue, '');\n finalValue = parseFloat(props[prop]);\n finalFullValue = props[prop] + unit;\n elements[index][prop] = {\n initialFullValue,\n initialValue,\n unit,\n finalValue,\n finalFullValue,\n currentValue: initialValue\n };\n });\n });\n let startTime = null;\n let time;\n let elementsDone = 0;\n let propsDone = 0;\n let done;\n let began = false;\n a.animating = true;\n\n function render() {\n time = new Date().getTime();\n let progress;\n let easeProgress; // let el;\n\n if (!began) {\n began = true;\n if (params.begin) params.begin(els);\n }\n\n if (startTime === null) {\n startTime = time;\n }\n\n if (params.progress) {\n // eslint-disable-next-line\n params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), startTime + params.duration - time < 0 ? 0 : startTime + params.duration - time, startTime);\n }\n\n elements.forEach(element => {\n const el = element;\n if (done || el.done) return;\n Object.keys(props).forEach(prop => {\n if (done || el.done) return;\n progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0);\n easeProgress = a.easingProgress(params.easing, progress);\n const {\n initialValue,\n finalValue,\n unit\n } = el[prop];\n el[prop].currentValue = initialValue + easeProgress * (finalValue - initialValue);\n const currentValue = el[prop].currentValue;\n\n if (finalValue > initialValue && currentValue >= finalValue || finalValue < initialValue && currentValue <= finalValue) {\n el.container.style[prop] = finalValue + unit;\n propsDone += 1;\n\n if (propsDone === Object.keys(props).length) {\n el.done = true;\n elementsDone += 1;\n }\n\n if (elementsDone === elements.length) {\n done = true;\n }\n }\n\n if (done) {\n a.done(params.complete);\n return;\n }\n\n el.container.style[prop] = currentValue + unit;\n });\n });\n if (done) return; // Then call\n\n a.frameId = window.requestAnimationFrame(render);\n }\n\n a.frameId = window.requestAnimationFrame(render);\n return a;\n }\n\n };\n\n if (a.elements.length === 0) {\n return els;\n }\n\n let animateInstance;\n\n for (let i = 0; i < a.elements.length; i += 1) {\n if (a.elements[i].dom7AnimateInstance) {\n animateInstance = a.elements[i].dom7AnimateInstance;\n } else a.elements[i].dom7AnimateInstance = a;\n }\n\n if (!animateInstance) {\n animateInstance = a;\n }\n\n if (initialProps === 'stop') {\n animateInstance.stop();\n } else {\n animateInstance.animate(a.props, a.params);\n }\n\n return els;\n}\n\nfunction stop() {\n const els = this;\n\n for (let i = 0; i < els.length; i += 1) {\n if (els[i].dom7AnimateInstance) {\n els[i].dom7AnimateInstance.stop();\n }\n }\n}\n\nconst noTrigger = 'resize scroll'.split(' ');\n\nfunction shortcut(name) {\n function eventHandler(...args) {\n if (typeof args[0] === 'undefined') {\n for (let i = 0; i < this.length; i += 1) {\n if (noTrigger.indexOf(name) < 0) {\n if (name in this[i]) this[i][name]();else {\n $(this[i]).trigger(name);\n }\n }\n }\n\n return this;\n }\n\n return this.on(name, ...args);\n }\n\n return eventHandler;\n}\n\nconst click = shortcut('click');\nconst blur = shortcut('blur');\nconst focus = shortcut('focus');\nconst focusin = shortcut('focusin');\nconst focusout = shortcut('focusout');\nconst keyup = shortcut('keyup');\nconst keydown = shortcut('keydown');\nconst keypress = shortcut('keypress');\nconst submit = shortcut('submit');\nconst change = shortcut('change');\nconst mousedown = shortcut('mousedown');\nconst mousemove = shortcut('mousemove');\nconst mouseup = shortcut('mouseup');\nconst mouseenter = shortcut('mouseenter');\nconst mouseleave = shortcut('mouseleave');\nconst mouseout = shortcut('mouseout');\nconst mouseover = shortcut('mouseover');\nconst touchstart = shortcut('touchstart');\nconst touchend = shortcut('touchend');\nconst touchmove = shortcut('touchmove');\nconst resize = shortcut('resize');\nconst scroll = shortcut('scroll');\n\nexport default $;\nexport { $, add, addClass, animate, animationEnd, append, appendTo, attr, blur, change, children, click, closest, css, data, dataset, detach, each, empty, eq, filter, find, focus, focusin, focusout, hasClass, height, hide, html, index, insertAfter, insertBefore, is, keydown, keypress, keyup, mousedown, mouseenter, mouseleave, mousemove, mouseout, mouseover, mouseup, next, nextAll, off, offset, on, once, outerHeight, outerWidth, parent, parents, prepend, prependTo, prev, prevAll, prop, remove, removeAttr, removeClass, removeData, resize, scroll, scrollLeft, scrollTo, scrollTop, show, siblings, stop, styles, submit, text, toggleClass, touchend, touchmove, touchstart, transform, transition, transitionEnd, trigger, val, value, width };\n","import {\n $,\n addClass,\n removeClass,\n hasClass,\n toggleClass,\n attr,\n removeAttr,\n transform,\n transition,\n on,\n off,\n trigger,\n transitionEnd,\n outerWidth,\n outerHeight,\n styles,\n offset,\n css,\n each,\n html,\n text,\n is,\n index,\n eq,\n append,\n prepend,\n next,\n nextAll,\n prev,\n prevAll,\n parent,\n parents,\n closest,\n find,\n children,\n filter,\n remove,\n} from 'dom7';\n\nconst Methods = {\n addClass,\n removeClass,\n hasClass,\n toggleClass,\n attr,\n removeAttr,\n transform,\n transition,\n on,\n off,\n trigger,\n transitionEnd,\n outerWidth,\n outerHeight,\n styles,\n offset,\n css,\n each,\n html,\n text,\n is,\n index,\n eq,\n append,\n prepend,\n next,\n nextAll,\n prev,\n prevAll,\n parent,\n parents,\n closest,\n find,\n children,\n filter,\n remove,\n};\n\nObject.keys(Methods).forEach((methodName) => {\n Object.defineProperty($.fn, methodName, { value: Methods[methodName], writable: true });\n});\n\nexport default $;\n","import { getDocument, getWindow } from 'ssr-window';\n\nfunction deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach((key) => {\n try {\n object[key] = null;\n } catch (e) {\n // no getter for object\n }\n try {\n delete object[key];\n } catch (e) {\n // something got wrong\n }\n });\n}\nfunction nextTick(callback, delay = 0) {\n return setTimeout(callback, delay);\n}\nfunction now() {\n return Date.now();\n}\nfunction getComputedStyle(el) {\n const window = getWindow();\n let style;\n if (window.getComputedStyle) {\n style = window.getComputedStyle(el, null);\n }\n if (!style && el.currentStyle) {\n style = el.currentStyle;\n }\n if (!style) {\n style = el.style;\n }\n\n return style;\n}\nfunction getTranslate(el, axis = 'x') {\n const window = getWindow();\n let matrix;\n let curTransform;\n let transformMatrix;\n\n const curStyle = getComputedStyle(el, null);\n\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform\n .split(', ')\n .map((a) => a.replace(',', '.'))\n .join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix =\n curStyle.MozTransform ||\n curStyle.OTransform ||\n curStyle.MsTransform ||\n curStyle.msTransform ||\n curStyle.transform ||\n curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n return curTransform || 0;\n}\nfunction isObject(o) {\n return (\n typeof o === 'object' &&\n o !== null &&\n o.constructor &&\n Object.prototype.toString.call(o).slice(8, -1) === 'Object'\n );\n}\nfunction isNode(node) {\n // eslint-disable-next-line\n if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {\n return node instanceof HTMLElement;\n }\n return node && (node.nodeType === 1 || node.nodeType === 11);\n}\nfunction extend(...args) {\n const to = Object(args[0]);\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n for (let i = 1; i < args.length; i += 1) {\n const nextSource = args[i];\n if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {\n const keysArray = Object.keys(Object(nextSource)).filter((key) => noExtend.indexOf(key) < 0);\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n return to;\n}\n\nfunction classesToSelector(classes = '') {\n return `.${classes\n .trim()\n .replace(/([\\.:!\\/])/g, '\\\\$1') // eslint-disable-line\n .replace(/ /g, '.')}`;\n}\n\nfunction createElementIfNotDefined(swiper, originalParams, params, checkProps) {\n const document = getDocument();\n if (swiper.params.createElements) {\n Object.keys(checkProps).forEach((key) => {\n if (!params[key] && params.auto === true) {\n const element = document.createElement('div');\n element.className = checkProps[key];\n swiper.$el.append(element);\n params[key] = element;\n originalParams[key] = element;\n }\n });\n }\n return params;\n}\n\nfunction setCSSProperty(el, varName, varValue) {\n el.style.setProperty(varName, varValue);\n}\n\nfunction animateCSSModeScroll({ swiper, targetPosition, side }) {\n const window = getWindow();\n const startPosition = -swiper.translate;\n let startTime = null;\n let time;\n const duration = swiper.params.speed;\n\n swiper.wrapperEl.style.scrollSnapType = 'none';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n\n const dir = targetPosition > startPosition ? 'next' : 'prev';\n\n const isOutOfBound = (current, target) => {\n return (dir === 'next' && current >= target) || (dir === 'prev' && current <= target);\n };\n\n const animate = () => {\n time = new Date().getTime();\n if (startTime === null) {\n startTime = time;\n }\n\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;\n let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);\n\n if (isOutOfBound(currentPosition, targetPosition)) currentPosition = targetPosition;\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition,\n });\n if (isOutOfBound(currentPosition, targetPosition)) {\n swiper.wrapperEl.style.scrollSnapType = '';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n return;\n }\n swiper.cssModeFrameID = window.requestAnimationFrame(animate);\n };\n animate();\n}\n\nexport {\n animateCSSModeScroll,\n deleteProps,\n nextTick,\n now,\n getTranslate,\n isObject,\n extend,\n getComputedStyle,\n classesToSelector,\n createElementIfNotDefined,\n setCSSProperty,\n};\n","import { getWindow, getDocument } from 'ssr-window';\n\nlet support;\n\nfunction calcSupport() {\n const window = getWindow();\n const document = getDocument();\n\n return {\n smoothScroll: 'scrollBehavior' in document.documentElement.style,\n\n touch: !!(\n 'ontouchstart' in window ||\n (window.DocumentTouch && document instanceof window.DocumentTouch)\n ),\n\n passiveListener: (function checkPassiveListener() {\n let supportsPassive = false;\n try {\n const opts = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line\n get() {\n supportsPassive = true;\n },\n });\n window.addEventListener('testPassiveListener', null, opts);\n } catch (e) {\n // No support\n }\n return supportsPassive;\n })(),\n\n gestures: (function checkGestures() {\n return 'ongesturestart' in window;\n })(),\n };\n}\n\nfunction getSupport() {\n if (!support) {\n support = calcSupport();\n }\n return support;\n}\n\nexport { getSupport };\n","import { getWindow } from 'ssr-window';\nimport { getSupport } from './get-support.js';\n\nlet deviceCached;\n\nfunction calcDevice({ userAgent } = {}) {\n const support = getSupport();\n const window = getWindow();\n const platform = window.navigator.platform;\n const ua = userAgent || window.navigator.userAgent;\n\n const device = {\n ios: false,\n android: false,\n };\n\n const screenWidth = window.screen.width;\n const screenHeight = window.screen.height;\n\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n let ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const windows = platform === 'Win32';\n let macos = platform === 'MacIntel';\n\n // iPadOs 13 fix\n const iPadScreens = [\n '1024x1366',\n '1366x1024',\n '834x1194',\n '1194x834',\n '834x1112',\n '1112x834',\n '768x1024',\n '1024x768',\n '820x1180',\n '1180x820',\n '810x1080',\n '1080x810',\n ];\n if (\n !ipad &&\n macos &&\n support.touch &&\n iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0\n ) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n if (!ipad) ipad = [0, 1, '13_0_0'];\n macos = false;\n }\n\n // Android\n if (android && !windows) {\n device.os = 'android';\n device.android = true;\n }\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n }\n\n // Export object\n return device;\n}\n\nfunction getDevice(overrides = {}) {\n if (!deviceCached) {\n deviceCached = calcDevice(overrides);\n }\n return deviceCached;\n}\n\nexport { getDevice };\n","import { getWindow } from 'ssr-window';\n\nlet browser;\n\nfunction calcBrowser() {\n const window = getWindow();\n function isSafari() {\n const ua = window.navigator.userAgent.toLowerCase();\n return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n }\n return {\n isSafari: isSafari(),\n isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),\n };\n}\n\nfunction getBrowser() {\n if (!browser) {\n browser = calcBrowser();\n }\n return browser;\n}\n\nexport { getBrowser };\n","import { getWindow } from 'ssr-window';\n\nexport default function Resize({ swiper, on, emit }) {\n const window = getWindow();\n let observer = null;\n\n const resizeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('beforeResize');\n emit('resize');\n };\n\n const createObserver = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n observer = new ResizeObserver((entries) => {\n const { width, height } = swiper;\n let newWidth = width;\n let newHeight = height;\n entries.forEach(({ contentBoxSize, contentRect, target }) => {\n if (target && target !== swiper.el) return;\n newWidth = contentRect\n ? contentRect.width\n : (contentBoxSize[0] || contentBoxSize).inlineSize;\n newHeight = contentRect\n ? contentRect.height\n : (contentBoxSize[0] || contentBoxSize).blockSize;\n });\n if (newWidth !== width || newHeight !== height) {\n resizeHandler();\n }\n });\n observer.observe(swiper.el);\n };\n\n const removeObserver = () => {\n if (observer && observer.unobserve && swiper.el) {\n observer.unobserve(swiper.el);\n observer = null;\n }\n };\n\n const orientationChangeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('orientationchange');\n };\n\n on('init', () => {\n if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {\n createObserver();\n return;\n }\n window.addEventListener('resize', resizeHandler);\n window.addEventListener('orientationchange', orientationChangeHandler);\n });\n\n on('destroy', () => {\n removeObserver();\n window.removeEventListener('resize', resizeHandler);\n window.removeEventListener('orientationchange', orientationChangeHandler);\n });\n}\n","import { getWindow } from 'ssr-window';\n\nexport default function Observer({ swiper, extendParams, on, emit }) {\n const observers = [];\n const window = getWindow();\n const attach = (target, options = {}) => {\n const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n const observer = new ObserverFunc((mutations) => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (mutations.length === 1) {\n emit('observerUpdate', mutations[0]);\n return;\n }\n const observerUpdate = function observerUpdate() {\n emit('observerUpdate', mutations[0]);\n };\n\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(observerUpdate);\n } else {\n window.setTimeout(observerUpdate, 0);\n }\n });\n\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData,\n });\n\n observers.push(observer);\n };\n const init = () => {\n if (!swiper.params.observer) return;\n if (swiper.params.observeParents) {\n const containerParents = swiper.$el.parents();\n for (let i = 0; i < containerParents.length; i += 1) {\n attach(containerParents[i]);\n }\n }\n // Observe container\n attach(swiper.$el[0], {\n childList: swiper.params.observeSlideChildren,\n });\n\n // Observe wrapper\n attach(swiper.$wrapperEl[0], { attributes: false });\n };\n const destroy = () => {\n observers.forEach((observer) => {\n observer.disconnect();\n });\n observers.splice(0, observers.length);\n };\n\n extendParams({\n observer: false,\n observeParents: false,\n observeSlideChildren: false,\n });\n on('init', init);\n on('destroy', destroy);\n}\n","/* eslint-disable no-underscore-dangle */\n\nexport default {\n on(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach((event) => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n },\n\n once(events, handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n function onceHandler(...args) {\n self.off(events, onceHandler);\n if (onceHandler.__emitterProxy) {\n delete onceHandler.__emitterProxy;\n }\n handler.apply(self, args);\n }\n onceHandler.__emitterProxy = handler;\n return self.on(events, onceHandler, priority);\n },\n\n onAny(handler, priority) {\n const self = this;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n if (self.eventsAnyListeners.indexOf(handler) < 0) {\n self.eventsAnyListeners[method](handler);\n }\n return self;\n },\n\n offAny(handler) {\n const self = this;\n if (!self.eventsAnyListeners) return self;\n const index = self.eventsAnyListeners.indexOf(handler);\n if (index >= 0) {\n self.eventsAnyListeners.splice(index, 1);\n }\n return self;\n },\n\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach((event) => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (\n eventHandler === handler ||\n (eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler)\n ) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n },\n\n emit(...args) {\n const self = this;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n data.unshift(context);\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n\n eventsArray.forEach((event) => {\n if (self.eventsAnyListeners && self.eventsAnyListeners.length) {\n self.eventsAnyListeners.forEach((eventHandler) => {\n eventHandler.apply(context, [event, ...data]);\n });\n }\n if (self.eventsListeners && self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler) => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n },\n};\n","export default function updateSize() {\n const swiper = this;\n let width;\n let height;\n const $el = swiper.$el;\n if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {\n width = swiper.params.width;\n } else {\n width = $el[0].clientWidth;\n }\n if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {\n height = swiper.params.height;\n } else {\n height = $el[0].clientHeight;\n }\n if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {\n return;\n }\n\n // Subtract paddings\n width =\n width -\n parseInt($el.css('padding-left') || 0, 10) -\n parseInt($el.css('padding-right') || 0, 10);\n height =\n height -\n parseInt($el.css('padding-top') || 0, 10) -\n parseInt($el.css('padding-bottom') || 0, 10);\n\n if (Number.isNaN(width)) width = 0;\n if (Number.isNaN(height)) height = 0;\n\n Object.assign(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height,\n });\n}\n","import { setCSSProperty } from '../../shared/utils.js';\n\nexport default function updateSlides() {\n const swiper = this;\n function getDirectionLabel(property) {\n if (swiper.isHorizontal()) {\n return property;\n }\n // prettier-ignore\n return {\n 'width': 'height',\n 'margin-top': 'margin-left',\n 'margin-bottom ': 'margin-right',\n 'margin-left': 'margin-top',\n 'margin-right': 'margin-bottom',\n 'padding-left': 'padding-top',\n 'padding-right': 'padding-bottom',\n 'marginRight': 'marginBottom',\n }[property];\n }\n function getDirectionPropertyValue(node, label) {\n return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0);\n }\n\n const params = swiper.params;\n\n const { $wrapperEl, size: swiperSize, rtlTranslate: rtl, wrongRTL } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n\n let offsetBefore = params.slidesOffsetBefore;\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n\n let offsetAfter = params.slidesOffsetAfter;\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.slidesGrid.length;\n\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n if (typeof swiperSize === 'undefined') {\n return;\n }\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;\n }\n\n swiper.virtualSize = -spaceBetween;\n\n // reset margins\n if (rtl) slides.css({ marginLeft: '', marginBottom: '', marginTop: '' });\n else slides.css({ marginRight: '', marginBottom: '', marginTop: '' });\n\n // reset cssMode offsets\n if (params.centeredSlides && params.cssMode) {\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', '');\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', '');\n }\n\n const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;\n if (gridEnabled) {\n swiper.grid.initSlides(slidesLength);\n }\n\n // Calc slides\n let slideSize;\n\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n const slide = slides.eq(i);\n if (gridEnabled) {\n swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel);\n }\n if (slide.css('display') === 'none') continue; // eslint-disable-line\n\n if (params.slidesPerView === 'auto') {\n const slideStyles = getComputedStyle(slide[0]);\n const currentTransform = slide[0].style.transform;\n const currentWebKitTransform = slide[0].style.webkitTransform;\n if (currentTransform) {\n slide[0].style.transform = 'none';\n }\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = 'none';\n }\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);\n } else {\n // eslint-disable-next-line\n const width = getDirectionPropertyValue(slideStyles, 'width');\n const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');\n const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');\n const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');\n const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n const { clientWidth, offsetWidth } = slide[0];\n slideSize =\n width +\n paddingLeft +\n paddingRight +\n marginLeft +\n marginRight +\n (offsetWidth - clientWidth);\n }\n }\n if (currentTransform) {\n slide[0].style.transform = currentTransform;\n }\n if (currentWebKitTransform) {\n slide[0].style.webkitTransform = currentWebKitTransform;\n }\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n\n if (slides[i]) {\n slides[i].style[getDirectionLabel('width')] = `${slideSize}px`;\n }\n }\n if (slides[i]) {\n slides[i].swiperSlideSize = slideSize;\n }\n slidesSizesGrid.push(slideSize);\n\n if (params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if (prevSlideSize === 0 && i !== 0)\n slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (\n (index - Math.min(swiper.params.slidesPerGroupSkip, index)) %\n swiper.params.slidesPerGroup ===\n 0\n )\n snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n\n swiper.virtualSize += slideSize + spaceBetween;\n\n prevSlideSize = slideSize;\n\n index += 1;\n }\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n\n if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });\n }\n if (params.setWrapperSize) {\n $wrapperEl.css({\n [getDirectionLabel('width')]: `${swiper.virtualSize + params.spaceBetween}px`,\n });\n }\n\n if (gridEnabled) {\n swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel);\n }\n\n // Remove last grid elements depending on width\n if (!params.centeredSlides) {\n const newSlidesGrid = [];\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n newSlidesGrid.push(slidesGridItem);\n }\n }\n snapGrid = newSlidesGrid;\n\n if (\n Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) >\n 1\n ) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n if (snapGrid.length === 0) snapGrid = [0];\n\n if (params.spaceBetween !== 0) {\n const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight');\n slides\n .filter((_, slideIndex) => {\n if (!params.cssMode) return true;\n if (slideIndex === slides.length - 1) {\n return false;\n }\n return true;\n })\n .css({ [key]: `${spaceBetween}px` });\n }\n\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach((slideSizeValue) => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n const maxSnap = allSlidesSize - swiperSize;\n snapGrid = snapGrid.map((snap) => {\n if (snap < 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach((slideSizeValue) => {\n allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);\n });\n allSlidesSize -= params.spaceBetween;\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n\n Object.assign(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid,\n });\n\n if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {\n setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);\n setCSSProperty(\n swiper.wrapperEl,\n '--swiper-centered-offset-after',\n `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`,\n );\n const addToSnapGrid = -swiper.snapGrid[0];\n const addToSlidesGrid = -swiper.slidesGrid[0];\n swiper.snapGrid = swiper.snapGrid.map((v) => v + addToSnapGrid);\n swiper.slidesGrid = swiper.slidesGrid.map((v) => v + addToSlidesGrid);\n }\n\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n}\n","export default function updateAutoHeight(speed) {\n const swiper = this;\n const activeSlides = [];\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let newHeight = 0;\n let i;\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n\n const getSlideByIndex = (index) => {\n if (isVirtual) {\n return swiper.slides.filter(\n (el) => parseInt(el.getAttribute('data-swiper-slide-index'), 10) === index,\n )[0];\n }\n return swiper.slides.eq(index)[0];\n };\n // Find slides currently in view\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n swiper.visibleSlides.each((slide) => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length && !isVirtual) break;\n activeSlides.push(getSlideByIndex(index));\n }\n }\n } else {\n activeSlides.push(getSlideByIndex(swiper.activeIndex));\n }\n\n // Find new height from highest slide in view\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n }\n\n // Update Height\n if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`);\n}\n","export default function updateSlidesOffset() {\n const swiper = this;\n const slides = swiper.slides;\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = swiper.isHorizontal()\n ? slides[i].offsetLeft\n : slides[i].offsetTop;\n }\n}\n","import $ from '../../shared/dom.js';\n\nexport default function updateSlidesProgress(translate = (this && this.translate) || 0) {\n const swiper = this;\n const params = swiper.params;\n\n const { slides, rtlTranslate: rtl } = swiper;\n\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate;\n\n // Visible Slides\n slides.removeClass(params.slideVisibleClass);\n\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n const slideProgress =\n (offsetCenter +\n (params.centeredSlides ? swiper.minTranslate() : 0) -\n slide.swiperSlideOffset) /\n (slide.swiperSlideSize + params.spaceBetween);\n const slideBefore = -(offsetCenter - slide.swiperSlideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isVisible =\n (slideBefore >= 0 && slideBefore < swiper.size - 1) ||\n (slideAfter > 1 && slideAfter <= swiper.size) ||\n (slideBefore <= 0 && slideAfter >= swiper.size);\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n slides.eq(i).addClass(params.slideVisibleClass);\n }\n slide.progress = rtl ? -slideProgress : slideProgress;\n }\n swiper.visibleSlides = $(swiper.visibleSlides);\n}\n","export default function updateProgress(translate) {\n const swiper = this;\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1;\n // eslint-disable-next-line\n translate = (swiper && swiper.translate && swiper.translate * multiplier) || 0;\n }\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let { progress, isBeginning, isEnd } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / translatesDiff;\n isBeginning = progress <= 0;\n isEnd = progress >= 1;\n }\n Object.assign(swiper, {\n progress,\n isBeginning,\n isEnd,\n });\n\n if (params.watchSlidesProgress || (params.centeredSlides && params.autoHeight))\n swiper.updateSlidesProgress(translate);\n\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {\n swiper.emit('fromEdge');\n }\n\n swiper.emit('progress', progress);\n}\n","export default function updateSlidesClasses() {\n const swiper = this;\n\n const { slides, params, $wrapperEl, activeIndex, realIndex } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n\n slides.removeClass(\n `${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`,\n );\n\n let activeSlide;\n if (isVirtual) {\n activeSlide = swiper.$wrapperEl.find(\n `.${params.slideClass}[data-swiper-slide-index=\"${activeIndex}\"]`,\n );\n } else {\n activeSlide = slides.eq(activeIndex);\n }\n\n // Active classes\n activeSlide.addClass(params.slideActiveClass);\n\n if (params.loop) {\n // Duplicate to all looped slides\n if (activeSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl\n .children(\n `.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index=\"${realIndex}\"]`,\n )\n .addClass(params.slideDuplicateActiveClass);\n } else {\n $wrapperEl\n .children(\n `.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index=\"${realIndex}\"]`,\n )\n .addClass(params.slideDuplicateActiveClass);\n }\n }\n // Next Slide\n let nextSlide = activeSlide\n .nextAll(`.${params.slideClass}`)\n .eq(0)\n .addClass(params.slideNextClass);\n if (params.loop && nextSlide.length === 0) {\n nextSlide = slides.eq(0);\n nextSlide.addClass(params.slideNextClass);\n }\n // Prev Slide\n let prevSlide = activeSlide\n .prevAll(`.${params.slideClass}`)\n .eq(0)\n .addClass(params.slidePrevClass);\n if (params.loop && prevSlide.length === 0) {\n prevSlide = slides.eq(-1);\n prevSlide.addClass(params.slidePrevClass);\n }\n if (params.loop) {\n // Duplicate to all looped slides\n if (nextSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl\n .children(\n `.${params.slideClass}:not(.${\n params.slideDuplicateClass\n })[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`,\n )\n .addClass(params.slideDuplicateNextClass);\n } else {\n $wrapperEl\n .children(\n `.${params.slideClass}.${\n params.slideDuplicateClass\n }[data-swiper-slide-index=\"${nextSlide.attr('data-swiper-slide-index')}\"]`,\n )\n .addClass(params.slideDuplicateNextClass);\n }\n if (prevSlide.hasClass(params.slideDuplicateClass)) {\n $wrapperEl\n .children(\n `.${params.slideClass}:not(.${\n params.slideDuplicateClass\n })[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`,\n )\n .addClass(params.slideDuplicatePrevClass);\n } else {\n $wrapperEl\n .children(\n `.${params.slideClass}.${\n params.slideDuplicateClass\n }[data-swiper-slide-index=\"${prevSlide.attr('data-swiper-slide-index')}\"]`,\n )\n .addClass(params.slideDuplicatePrevClass);\n }\n }\n swiper.emitSlidesClasses();\n}\n","export default function updateActiveIndex(newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n slidesGrid,\n snapGrid,\n params,\n activeIndex: previousIndex,\n realIndex: previousRealIndex,\n snapIndex: previousSnapIndex,\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n if (typeof activeIndex === 'undefined') {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (\n translate >= slidesGrid[i] &&\n translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2\n ) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n }\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n }\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n if (activeIndex === previousIndex) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n return;\n }\n\n // Get real index\n const realIndex = parseInt(\n swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex,\n 10,\n );\n\n Object.assign(swiper, {\n snapIndex,\n realIndex,\n previousIndex,\n activeIndex,\n });\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n swiper.emit('slideChange');\n }\n}\n","import $ from '../../shared/dom.js';\n\nexport default function updateClickedSlide(e) {\n const swiper = this;\n const params = swiper.params;\n const slide = $(e.target).closest(`.${params.slideClass}`)[0];\n let slideFound = false;\n let slideIndex;\n\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) {\n slideFound = true;\n slideIndex = i;\n break;\n }\n }\n }\n\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = slideIndex;\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n if (\n params.slideToClickedSlide &&\n swiper.clickedIndex !== undefined &&\n swiper.clickedIndex !== swiper.activeIndex\n ) {\n swiper.slideToClickedSlide();\n }\n}\n","import updateSize from './updateSize.js';\nimport updateSlides from './updateSlides.js';\nimport updateAutoHeight from './updateAutoHeight.js';\nimport updateSlidesOffset from './updateSlidesOffset.js';\nimport updateSlidesProgress from './updateSlidesProgress.js';\nimport updateProgress from './updateProgress.js';\nimport updateSlidesClasses from './updateSlidesClasses.js';\nimport updateActiveIndex from './updateActiveIndex.js';\nimport updateClickedSlide from './updateClickedSlide.js';\n\nexport default {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide,\n};\n","import { getTranslate } from '../../shared/utils.js';\n\nexport default function getSwiperTranslate(axis = this.isHorizontal() ? 'x' : 'y') {\n const swiper = this;\n\n const { params, rtlTranslate: rtl, translate, $wrapperEl } = swiper;\n\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n if (params.cssMode) {\n return translate;\n }\n\n let currentTranslate = getTranslate($wrapperEl[0], axis);\n if (rtl) currentTranslate = -currentTranslate;\n\n return currentTranslate || 0;\n}\n","export default function setTranslate(translate, byController) {\n const swiper = this;\n const { rtlTranslate: rtl, params, $wrapperEl, wrapperEl, progress } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);\n }\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y;\n\n // Check if we need to update progress\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, byController);\n}\n","export default function minTranslate() {\n return -this.snapGrid[0];\n}\n","export default function maxTranslate() {\n return -this.snapGrid[this.snapGrid.length - 1];\n}\n","import { animateCSSModeScroll } from '../../shared/utils.js';\n\nexport default function translateTo(\n translate = 0,\n speed = this.params.speed,\n runCallbacks = true,\n translateBounds = true,\n internal,\n) {\n const swiper = this;\n\n const { params, wrapperEl } = swiper;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;\n else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;\n else newTranslate = translate;\n\n // Update progress\n swiper.updateProgress(newTranslate);\n\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({ swiper, targetPosition: -newTranslate, side: isH ? 'left' : 'top' });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth',\n });\n }\n return true;\n }\n\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener(\n 'transitionend',\n swiper.onTranslateToWrapperTransitionEnd,\n );\n swiper.$wrapperEl[0].removeEventListener(\n 'webkitTransitionEnd',\n swiper.onTranslateToWrapperTransitionEnd,\n );\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n swiper.$wrapperEl[0].addEventListener(\n 'transitionend',\n swiper.onTranslateToWrapperTransitionEnd,\n );\n swiper.$wrapperEl[0].addEventListener(\n 'webkitTransitionEnd',\n swiper.onTranslateToWrapperTransitionEnd,\n );\n }\n }\n\n return true;\n}\n","import getTranslate from './getTranslate.js';\nimport setTranslate from './setTranslate.js';\nimport minTranslate from './minTranslate.js';\nimport maxTranslate from './maxTranslate.js';\nimport translateTo from './translateTo.js';\n\nexport default {\n getTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo,\n};\n","export default function setTransition(duration, byController) {\n const swiper = this;\n\n if (!swiper.params.cssMode) {\n swiper.$wrapperEl.transition(duration);\n }\n\n swiper.emit('setTransition', duration, byController);\n}\n","export default function transitionEmit({ swiper, runCallbacks, direction, step }) {\n const { activeIndex, previousIndex } = swiper;\n let dir = direction;\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';\n else if (activeIndex < previousIndex) dir = 'prev';\n else dir = 'reset';\n }\n\n swiper.emit(`transition${step}`);\n\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit(`slideResetTransition${step}`);\n return;\n }\n swiper.emit(`slideChangeTransition${step}`);\n if (dir === 'next') {\n swiper.emit(`slideNextTransition${step}`);\n } else {\n swiper.emit(`slidePrevTransition${step}`);\n }\n }\n}\n","import transitionEmit from './transitionEmit.js';\n\nexport default function transitionStart(runCallbacks = true, direction) {\n const swiper = this;\n const { params } = swiper;\n if (params.cssMode) return;\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n\n transitionEmit({ swiper, runCallbacks, direction, step: 'Start' });\n}\n","import transitionEmit from './transitionEmit.js';\n\nexport default function transitionEnd(runCallbacks = true, direction) {\n const swiper = this;\n const { params } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n\n transitionEmit({ swiper, runCallbacks, direction, step: 'End' });\n}\n","import setTransition from './setTransition.js';\nimport transitionStart from './transitionStart.js';\nimport transitionEnd from './transitionEnd.js';\n\nexport default {\n setTransition,\n transitionStart,\n transitionEnd,\n};\n","import { animateCSSModeScroll } from '../../shared/utils.js';\n\nexport default function slideTo(\n index = 0,\n speed = this.params.speed,\n runCallbacks = true,\n internal,\n initial,\n) {\n if (typeof index !== 'number' && typeof index !== 'string') {\n throw new Error(\n `The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`,\n );\n }\n\n if (typeof index === 'string') {\n /**\n * The `index` argument converted from `string` to `number`.\n * @type {number}\n */\n const indexAsNumber = parseInt(index, 10);\n\n /**\n * Determines whether the `index` argument is a valid `number`\n * after being converted from the `string` type.\n * @type {boolean}\n */\n const isValidNumber = isFinite(indexAsNumber);\n\n if (!isValidNumber) {\n throw new Error(\n `The passed-in 'index' (string) couldn't be converted to 'number'. [${index}] given.`,\n );\n }\n\n // Knowing that the converted `index` is a valid number,\n // we can update the original argument's value.\n index = indexAsNumber;\n }\n\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n\n const {\n params,\n snapGrid,\n slidesGrid,\n previousIndex,\n activeIndex,\n rtlTranslate: rtl,\n wrapperEl,\n enabled,\n } = swiper;\n\n if (\n (swiper.animating && params.preventInteractionOnTransition) ||\n (!enabled && !internal && !initial)\n ) {\n return false;\n }\n\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n\n if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n const translate = -snapGrid[snapIndex];\n\n // Update progress\n swiper.updateProgress(translate);\n\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n const normalizedTranslate = -Math.floor(translate * 100);\n const normalizedGrid = Math.floor(slidesGrid[i] * 100);\n const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (\n normalizedTranslate >= normalizedGrid &&\n normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2\n ) {\n slideIndex = i;\n } else if (\n normalizedTranslate >= normalizedGrid &&\n normalizedTranslate < normalizedGridNext\n ) {\n slideIndex = i + 1;\n }\n } else if (normalizedTranslate >= normalizedGrid) {\n slideIndex = i;\n }\n }\n }\n // Directions locks\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (\n !swiper.allowSlideNext &&\n translate < swiper.translate &&\n translate < swiper.minTranslate()\n ) {\n return false;\n }\n if (\n !swiper.allowSlidePrev &&\n translate > swiper.translate &&\n translate > swiper.maxTranslate()\n ) {\n if ((activeIndex || 0) !== slideIndex) return false;\n }\n }\n\n let direction;\n if (slideIndex > activeIndex) direction = 'next';\n else if (slideIndex < activeIndex) direction = 'prev';\n else direction = 'reset';\n\n // Update Index\n if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {\n swiper.updateActiveIndex(slideIndex);\n // Update Height\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n swiper.updateSlidesClasses();\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n return false;\n }\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n const t = rtl ? translate : -translate;\n if (speed === 0) {\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n if (isVirtual) {\n swiper.wrapperEl.style.scrollSnapType = 'none';\n }\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n if (isVirtual) {\n requestAnimationFrame(() => {\n swiper.wrapperEl.style.scrollSnapType = '';\n });\n }\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({ swiper, targetPosition: t, side: isH ? 'left' : 'top' });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth',\n });\n }\n return true;\n }\n\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.$wrapperEl[0].removeEventListener(\n 'transitionend',\n swiper.onSlideToWrapperTransitionEnd,\n );\n swiper.$wrapperEl[0].removeEventListener(\n 'webkitTransitionEnd',\n swiper.onSlideToWrapperTransitionEnd,\n );\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.$wrapperEl[0].addEventListener(\n 'webkitTransitionEnd',\n swiper.onSlideToWrapperTransitionEnd,\n );\n }\n }\n\n return true;\n}\n","export default function slideToLoop(\n index = 0,\n speed = this.params.speed,\n runCallbacks = true,\n internal,\n) {\n const swiper = this;\n let newIndex = index;\n if (swiper.params.loop) {\n newIndex += swiper.loopedSlides;\n }\n\n return swiper.slideTo(newIndex, speed, runCallbacks, internal);\n}\n","/* eslint no-unused-vars: \"off\" */\nexport default function slideNext(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const { animating, enabled, params } = swiper;\n if (!enabled) return swiper;\n let perGroup = params.slidesPerGroup;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);\n }\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;\n if (params.loop) {\n if (animating && params.loopPreventsSlide) return false;\n swiper.loopFix();\n // eslint-disable-next-line\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}\n","/* eslint no-unused-vars: \"off\" */\nexport default function slidePrev(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n const { params, animating, snapGrid, slidesGrid, rtlTranslate, enabled } = swiper;\n if (!enabled) return swiper;\n\n if (params.loop) {\n if (animating && params.loopPreventsSlide) return false;\n swiper.loopFix();\n // eslint-disable-next-line\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n }\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map((val) => normalize(val));\n\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n if (typeof prevSnap === 'undefined' && params.cssMode) {\n let prevSnapIndex;\n snapGrid.forEach((snap, snapIndex) => {\n if (normalizedTranslate >= snap) {\n // prevSnap = snap;\n prevSnapIndex = snapIndex;\n }\n });\n if (typeof prevSnapIndex !== 'undefined') {\n prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];\n }\n }\n let prevIndex = 0;\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n if (\n params.slidesPerView === 'auto' &&\n params.slidesPerGroup === 1 &&\n params.slidesPerGroupAuto\n ) {\n prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;\n prevIndex = Math.max(prevIndex, 0);\n }\n }\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}\n","/* eslint no-unused-vars: \"off\" */\nexport default function slideReset(speed = this.params.speed, runCallbacks = true, internal) {\n const swiper = this;\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}\n","/* eslint no-unused-vars: \"off\" */\nexport default function slideToClosest(\n speed = this.params.speed,\n runCallbacks = true,\n internal,\n threshold = 0.5,\n) {\n const swiper = this;\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}\n","import $ from '../../shared/dom.js';\nimport { nextTick } from '../../shared/utils.js';\n\nexport default function slideToClickedSlide() {\n const swiper = this;\n const { params, $wrapperEl } = swiper;\n\n const slidesPerView =\n params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.clickedIndex;\n let realIndex;\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n if (params.centeredSlides) {\n if (\n slideToIndex < swiper.loopedSlides - slidesPerView / 2 ||\n slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2\n ) {\n swiper.loopFix();\n slideToIndex = $wrapperEl\n .children(\n `.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`,\n )\n .eq(0)\n .index();\n\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n swiper.loopFix();\n slideToIndex = $wrapperEl\n .children(\n `.${params.slideClass}[data-swiper-slide-index=\"${realIndex}\"]:not(.${params.slideDuplicateClass})`,\n )\n .eq(0)\n .index();\n\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}\n","import slideTo from './slideTo.js';\nimport slideToLoop from './slideToLoop.js';\nimport slideNext from './slideNext.js';\nimport slidePrev from './slidePrev.js';\nimport slideReset from './slideReset.js';\nimport slideToClosest from './slideToClosest.js';\nimport slideToClickedSlide from './slideToClickedSlide.js';\n\nexport default {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide,\n};\n","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\n\nexport default function loopCreate() {\n const swiper = this;\n const document = getDocument();\n const { params, $wrapperEl } = swiper;\n // Remove duplicated slides\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();\n\n let slides = $wrapperEl.children(`.${params.slideClass}`);\n\n if (params.loopFillGroupWithBlank) {\n const blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup);\n if (blankSlidesNum !== params.slidesPerGroup) {\n for (let i = 0; i < blankSlidesNum; i += 1) {\n const blankNode = $(document.createElement('div')).addClass(\n `${params.slideClass} ${params.slideBlankClass}`,\n );\n $wrapperEl.append(blankNode);\n }\n slides = $wrapperEl.children(`.${params.slideClass}`);\n }\n }\n\n if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;\n\n swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10));\n swiper.loopedSlides += params.loopAdditionalSlides;\n if (swiper.loopedSlides > slides.length) {\n swiper.loopedSlides = slides.length;\n }\n\n const prependSlides = [];\n const appendSlides = [];\n slides.each((el, index) => {\n const slide = $(el);\n if (index < swiper.loopedSlides) {\n appendSlides.push(el);\n }\n if (index < slides.length && index >= slides.length - swiper.loopedSlides) {\n prependSlides.push(el);\n }\n slide.attr('data-swiper-slide-index', index);\n });\n for (let i = 0; i < appendSlides.length; i += 1) {\n $wrapperEl.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n for (let i = prependSlides.length - 1; i >= 0; i -= 1) {\n $wrapperEl.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));\n }\n}\n","export default function loopFix() {\n const swiper = this;\n\n swiper.emit('beforeLoopFix');\n\n const {\n activeIndex,\n slides,\n loopedSlides,\n allowSlidePrev,\n allowSlideNext,\n snapGrid,\n rtlTranslate: rtl,\n } = swiper;\n let newIndex;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n\n const snapTranslate = -snapGrid[activeIndex];\n const diff = snapTranslate - swiper.getTranslate();\n\n // Fix For Negative Oversliding\n if (activeIndex < loopedSlides) {\n newIndex = slides.length - loopedSlides * 3 + activeIndex;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n } else if (activeIndex >= slides.length - loopedSlides) {\n // Fix For Positive Oversliding\n newIndex = -slides.length + activeIndex + loopedSlides;\n newIndex += loopedSlides;\n const slideChanged = swiper.slideTo(newIndex, 0, false, true);\n if (slideChanged && diff !== 0) {\n swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n\n swiper.emit('loopFix');\n}\n","export default function loopDestroy() {\n const swiper = this;\n const { $wrapperEl, params, slides } = swiper;\n $wrapperEl\n .children(\n `.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`,\n )\n .remove();\n slides.removeAttr('data-swiper-slide-index');\n}\n","import loopCreate from './loopCreate.js';\nimport loopFix from './loopFix.js';\nimport loopDestroy from './loopDestroy.js';\n\nexport default {\n loopCreate,\n loopFix,\n loopDestroy,\n};\n","export default function setGrabCursor(moving) {\n const swiper = this;\n if (\n swiper.support.touch ||\n !swiper.params.simulateTouch ||\n (swiper.params.watchOverflow && swiper.isLocked) ||\n swiper.params.cssMode\n )\n return;\n const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;\n el.style.cursor = 'move';\n el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';\n el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n}\n","export default function unsetGrabCursor() {\n const swiper = this;\n if (\n swiper.support.touch ||\n (swiper.params.watchOverflow && swiper.isLocked) ||\n swiper.params.cssMode\n ) {\n return;\n }\n swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';\n}\n","import setGrabCursor from './setGrabCursor.js';\nimport unsetGrabCursor from './unsetGrabCursor.js';\n\nexport default {\n setGrabCursor,\n unsetGrabCursor,\n};\n","import { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now } from '../../shared/utils.js';\n\n// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd\nfunction closestElement(selector, base = this) {\n function __closestFrom(el) {\n if (!el || el === getDocument() || el === getWindow()) return null;\n if (el.assignedSlot) el = el.assignedSlot;\n const found = el.closest(selector);\n return found || __closestFrom(el.getRootNode().host);\n }\n return __closestFrom(base);\n}\n\nexport default function onTouchStart(event) {\n const swiper = this;\n const document = getDocument();\n const window = getWindow();\n\n const data = swiper.touchEventsData;\n const { params, touches, enabled } = swiper;\n if (!enabled) return;\n\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n if (!swiper.animating && params.cssMode && params.loop) {\n swiper.loopFix();\n }\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n let $targetEl = $(e.target);\n\n if (params.touchEventsTarget === 'wrapper') {\n if (!$targetEl.closest(swiper.wrapperEl).length) return;\n }\n data.isTouchEvent = e.type === 'touchstart';\n if (!data.isTouchEvent && 'which' in e && e.which === 3) return;\n if (!data.isTouchEvent && 'button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return;\n\n // change target el for shadow root component\n const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';\n if (swipingClassHasValue && e.target && e.target.shadowRoot && event.path && event.path[0]) {\n $targetEl = $(event.path[0]);\n }\n\n const noSwipingSelector = params.noSwipingSelector\n ? params.noSwipingSelector\n : `.${params.noSwipingClass}`;\n const isTargetShadow = !!(e.target && e.target.shadowRoot);\n\n // use closestElement for shadow root element to get the actual closest for nested shadow root element\n if (\n params.noSwiping &&\n (isTargetShadow\n ? closestElement(noSwipingSelector, e.target)\n : $targetEl.closest(noSwipingSelector)[0])\n ) {\n swiper.allowClick = true;\n return;\n }\n\n if (params.swipeHandler) {\n if (!$targetEl.closest(params.swipeHandler)[0]) return;\n }\n\n touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY;\n\n // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore\n\n const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;\n if (\n edgeSwipeDetection &&\n (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)\n ) {\n if (edgeSwipeDetection === 'prevent') {\n event.preventDefault();\n } else {\n return;\n }\n }\n\n Object.assign(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined,\n });\n\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n if (e.type !== 'touchstart') {\n let preventDefault = true;\n if ($targetEl.is(data.focusableElements)) preventDefault = false;\n if (\n document.activeElement &&\n $(document.activeElement).is(data.focusableElements) &&\n document.activeElement !== $targetEl[0]\n ) {\n document.activeElement.blur();\n }\n\n const shouldPreventDefault =\n preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n if (\n (params.touchStartForcePreventDefault || shouldPreventDefault) &&\n !$targetEl[0].isContentEditable\n ) {\n e.preventDefault();\n }\n }\n swiper.emit('touchStart', e);\n}\n","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now } from '../../shared/utils.js';\n\nexport default function onTouchMove(event) {\n const document = getDocument();\n const swiper = this;\n const data = swiper.touchEventsData;\n const { params, touches, rtlTranslate: rtl, enabled } = swiper;\n if (!enabled) return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n return;\n }\n if (data.isTouchEvent && e.type !== 'touchmove') return;\n const targetTouch =\n e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]);\n const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX;\n const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY;\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n if (!swiper.allowTouchMove) {\n // isMoved = true;\n swiper.allowClick = false;\n if (data.isTouched) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY,\n });\n data.touchStartTime = now();\n }\n return;\n }\n if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (\n (pageY < touches.startY && swiper.translate <= swiper.maxTranslate()) ||\n (pageY > touches.startY && swiper.translate >= swiper.minTranslate())\n ) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (\n (pageX < touches.startX && swiper.translate <= swiper.maxTranslate()) ||\n (pageX > touches.startX && swiper.translate >= swiper.minTranslate())\n ) {\n return;\n }\n }\n if (data.isTouchEvent && document.activeElement) {\n if (e.target === document.activeElement && $(e.target).is(data.focusableElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n if (e.targetTouches && e.targetTouches.length > 1) return;\n\n touches.currentX = pageX;\n touches.currentY = pageY;\n\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold)\n return;\n\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n if (\n (swiper.isHorizontal() && touches.currentY === touches.startY) ||\n (swiper.isVertical() && touches.currentX === touches.startX)\n ) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if (diffX * diffX + diffY * diffY >= 25) {\n touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;\n data.isScrolling = swiper.isHorizontal()\n ? touchAngle > params.touchAngle\n : 90 - touchAngle > params.touchAngle;\n }\n }\n }\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n if (data.isScrolling) {\n data.isTouched = false;\n return;\n }\n if (!data.startMoving) {\n return;\n }\n swiper.allowClick = false;\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n\n if (!data.isMoved) {\n if (params.loop && !params.cssMode) {\n swiper.loopFix();\n }\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n if (swiper.animating) {\n swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');\n }\n data.allowMomentumBounce = false;\n // Grab Cursor\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n swiper.emit('sliderFirstMove', e);\n }\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n\n let diff = swiper.isHorizontal() ? diffX : diffY;\n touches.diff = diff;\n\n diff *= params.touchRatio;\n if (rtl) diff = -diff;\n\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n data.currentTranslate = diff + data.startTranslate;\n\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n if (diff > 0 && data.currentTranslate > swiper.minTranslate()) {\n disableParentSwiper = false;\n if (params.resistance)\n data.currentTranslate =\n swiper.minTranslate() -\n 1 +\n (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;\n } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance)\n data.currentTranslate =\n swiper.maxTranslate() +\n 1 -\n (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;\n }\n\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n }\n\n // Directions locks\n if (\n !swiper.allowSlideNext &&\n swiper.swipeDirection === 'next' &&\n data.currentTranslate < data.startTranslate\n ) {\n data.currentTranslate = data.startTranslate;\n }\n if (\n !swiper.allowSlidePrev &&\n swiper.swipeDirection === 'prev' &&\n data.currentTranslate > data.startTranslate\n ) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {\n data.currentTranslate = data.startTranslate;\n }\n\n // Threshold\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal()\n ? touches.currentX - touches.startX\n : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n\n if (!params.followFinger || params.cssMode) return;\n\n // Update active index in free mode\n if (\n (params.freeMode && params.freeMode.enabled && swiper.freeMode) ||\n params.watchSlidesProgress\n ) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) {\n swiper.freeMode.onTouchMove();\n }\n // Update progress\n swiper.updateProgress(data.currentTranslate);\n // Update translate\n swiper.setTranslate(data.currentTranslate);\n}\n","import { now, nextTick } from '../../shared/utils.js';\n\nexport default function onTouchEnd(event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n\n const { params, touches, rtlTranslate: rtl, slidesGrid, enabled } = swiper;\n if (!enabled) return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n data.allowTouchCallbacks = false;\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n // Return Grab Cursor\n if (\n params.grabCursor &&\n data.isMoved &&\n data.isTouched &&\n (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)\n ) {\n swiper.setGrabCursor(false);\n }\n\n // Time diff\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n // Tap, doubleTap, Click\n if (swiper.allowClick) {\n swiper.updateClickedSlide(e);\n swiper.emit('tap click', e);\n if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n\n data.lastClickTime = now();\n nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n\n if (\n !data.isTouched ||\n !data.isMoved ||\n !swiper.swipeDirection ||\n touches.diff === 0 ||\n data.currentTranslate === data.startTranslate\n ) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n\n let currentPos;\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n\n if (params.cssMode) {\n return;\n }\n\n if (swiper.params.freeMode && params.freeMode.enabled) {\n swiper.freeMode.onTouchEnd({ currentPos });\n return;\n }\n\n // Find current slide\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n for (\n let i = 0;\n i < slidesGrid.length;\n i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup\n ) {\n const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n }\n\n // Find current slide size\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);\n else swiper.slideTo(stopIndex);\n }\n if (swiper.swipeDirection === 'prev') {\n if (ratio > 1 - params.longSwipesRatio) swiper.slideTo(stopIndex + increment);\n else swiper.slideTo(stopIndex);\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n const isNavButtonTarget =\n swiper.navigation &&\n (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(stopIndex + increment);\n }\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}\n","export default function onResize() {\n const swiper = this;\n\n const { params, el } = swiper;\n\n if (el && el.offsetWidth === 0) return;\n\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Save locks\n const { allowSlideNext, allowSlidePrev, snapGrid } = swiper;\n\n // Disable locks on resize\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n\n swiper.updateSize();\n swiper.updateSlides();\n\n swiper.updateSlidesClasses();\n if (\n (params.slidesPerView === 'auto' || params.slidesPerView > 1) &&\n swiper.isEnd &&\n !swiper.isBeginning &&\n !swiper.params.centeredSlides\n ) {\n swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.run();\n }\n // Return locks after resize\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}\n","export default function onClick(e) {\n const swiper = this;\n if (!swiper.enabled) return;\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}\n","export default function onScroll() {\n const swiper = this;\n const { wrapperEl, rtlTranslate, enabled } = swiper;\n if (!enabled) return;\n swiper.previousTranslate = swiper.translate;\n if (swiper.isHorizontal()) {\n swiper.translate = -wrapperEl.scrollLeft;\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n }\n // eslint-disable-next-line\n if (swiper.translate === -0) swiper.translate = 0;\n\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n\n swiper.emit('setTranslate', swiper.translate, false);\n}\n","import { getDocument } from 'ssr-window';\n\nimport onTouchStart from './onTouchStart.js';\nimport onTouchMove from './onTouchMove.js';\nimport onTouchEnd from './onTouchEnd.js';\nimport onResize from './onResize.js';\nimport onClick from './onClick.js';\nimport onScroll from './onScroll.js';\n\nlet dummyEventAttached = false;\nfunction dummyEventListener() {}\n\nconst events = (swiper, method) => {\n const document = getDocument();\n const { params, touchEvents, el, wrapperEl, device, support } = swiper;\n const capture = !!params.nested;\n const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n const swiperMethod = method;\n\n // Touch Events\n if (!support.touch) {\n el[domMethod](touchEvents.start, swiper.onTouchStart, false);\n document[domMethod](touchEvents.move, swiper.onTouchMove, capture);\n document[domMethod](touchEvents.end, swiper.onTouchEnd, false);\n } else {\n const passiveListener =\n touchEvents.start === 'touchstart' && support.passiveListener && params.passiveListeners\n ? { passive: true, capture: false }\n : false;\n el[domMethod](touchEvents.start, swiper.onTouchStart, passiveListener);\n el[domMethod](\n touchEvents.move,\n swiper.onTouchMove,\n support.passiveListener ? { passive: false, capture } : capture,\n );\n el[domMethod](touchEvents.end, swiper.onTouchEnd, passiveListener);\n if (touchEvents.cancel) {\n el[domMethod](touchEvents.cancel, swiper.onTouchEnd, passiveListener);\n }\n }\n // Prevent Links Clicks\n if (params.preventClicks || params.preventClicksPropagation) {\n el[domMethod]('click', swiper.onClick, true);\n }\n if (params.cssMode) {\n wrapperEl[domMethod]('scroll', swiper.onScroll);\n }\n\n // Resize handler\n if (params.updateOnWindowResize) {\n swiper[swiperMethod](\n device.ios || device.android\n ? 'resize orientationchange observerUpdate'\n : 'resize observerUpdate',\n onResize,\n true,\n );\n } else {\n swiper[swiperMethod]('observerUpdate', onResize, true);\n }\n};\n\nfunction attachEvents() {\n const swiper = this;\n const document = getDocument();\n const { params, support } = swiper;\n\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n\n swiper.onClick = onClick.bind(swiper);\n\n if (support.touch && !dummyEventAttached) {\n document.addEventListener('touchstart', dummyEventListener);\n dummyEventAttached = true;\n }\n\n events(swiper, 'on');\n}\n\nfunction detachEvents() {\n const swiper = this;\n events(swiper, 'off');\n}\n\nexport default {\n attachEvents,\n detachEvents,\n};\n","import { extend } from '../../shared/utils.js';\n\nconst isGridEnabled = (swiper, params) => {\n return swiper.grid && params.grid && params.grid.rows > 1;\n};\n\nexport default function setBreakpoint() {\n const swiper = this;\n const { activeIndex, initialized, loopedSlides = 0, params, $el } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) return;\n\n // Get breakpoint for window width and update parameters\n const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);\n\n if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;\n\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = isGridEnabled(swiper, params);\n const isMultiRow = isGridEnabled(swiper, breakpointParams);\n\n const wasEnabled = params.enabled;\n\n if (wasMultiRow && !isMultiRow) {\n $el.removeClass(\n `${params.containerModifierClass}grid ${params.containerModifierClass}grid-column`,\n );\n swiper.emitContainerClasses();\n } else if (!wasMultiRow && isMultiRow) {\n $el.addClass(`${params.containerModifierClass}grid`);\n if (\n (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column') ||\n (!breakpointParams.grid.fill && params.grid.fill === 'column')\n ) {\n $el.addClass(`${params.containerModifierClass}grid-column`);\n }\n swiper.emitContainerClasses();\n }\n\n const directionChanged =\n breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop =\n params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n extend(swiper.params, breakpointParams);\n\n const isEnabled = swiper.params.enabled;\n\n Object.assign(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n });\n\n if (wasEnabled && !isEnabled) {\n swiper.disable();\n } else if (!wasEnabled && isEnabled) {\n swiper.enable();\n }\n\n swiper.currentBreakpoint = breakpoint;\n\n swiper.emit('_beforeBreakpoint', breakpointParams);\n\n if (needsReLoop && initialized) {\n swiper.loopDestroy();\n swiper.loopCreate();\n swiper.updateSlides();\n swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false);\n }\n\n swiper.emit('breakpoint', breakpointParams);\n}\n","import { getWindow } from 'ssr-window';\n\nexport default function getBreakpoint(breakpoints, base = 'window', containerEl) {\n if (!breakpoints || (base === 'container' && !containerEl)) return undefined;\n let breakpoint = false;\n\n const window = getWindow();\n const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;\n\n const points = Object.keys(breakpoints).map((point) => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = currentHeight * minRatio;\n return { value, point };\n }\n return { value: point, point };\n });\n\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n for (let i = 0; i < points.length; i += 1) {\n const { point, value } = points[i];\n if (base === 'window') {\n if (window.matchMedia(`(min-width: ${value}px)`).matches) {\n breakpoint = point;\n }\n } else if (value <= containerEl.clientWidth) {\n breakpoint = point;\n }\n }\n return breakpoint || 'max';\n}\n","import setBreakpoint from './setBreakpoint.js';\nimport getBreakpoint from './getBreakpoint.js';\n\nexport default { setBreakpoint, getBreakpoint };\n","function prepareClasses(entries, prefix) {\n const resultClasses = [];\n entries.forEach((item) => {\n if (typeof item === 'object') {\n Object.keys(item).forEach((classNames) => {\n if (item[classNames]) {\n resultClasses.push(prefix + classNames);\n }\n });\n } else if (typeof item === 'string') {\n resultClasses.push(prefix + item);\n }\n });\n return resultClasses;\n}\n\nexport default function addClasses() {\n const swiper = this;\n const { classNames, params, rtl, $el, device, support } = swiper;\n // prettier-ignore\n const suffixes = prepareClasses([\n 'initialized',\n params.direction,\n { 'pointer-events': !support.touch },\n { 'free-mode': swiper.params.freeMode && params.freeMode.enabled },\n { 'autoheight': params.autoHeight },\n { 'rtl': rtl },\n { 'grid': params.grid && params.grid.rows > 1 },\n { 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column' },\n { 'android': device.android },\n { 'ios': device.ios },\n { 'css-mode': params.cssMode },\n { 'centered': params.cssMode && params.centeredSlides },\n ], params.containerModifierClass);\n classNames.push(...suffixes);\n $el.addClass([...classNames].join(' '));\n swiper.emitContainerClasses();\n}\n","export default function removeClasses() {\n const swiper = this;\n const { $el, classNames } = swiper;\n\n $el.removeClass(classNames.join(' '));\n swiper.emitContainerClasses();\n}\n","import addClasses from './addClasses.js';\nimport removeClasses from './removeClasses.js';\n\nexport default { addClasses, removeClasses };\n","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\n\nexport default function loadImage(imageEl, src, srcset, sizes, checkForComplete, callback) {\n const window = getWindow();\n let image;\n function onReady() {\n if (callback) callback();\n }\n const isPicture = $(imageEl).parent('picture')[0];\n\n if (!isPicture && (!imageEl.complete || !checkForComplete)) {\n if (src) {\n image = new window.Image();\n image.onload = onReady;\n image.onerror = onReady;\n if (sizes) {\n image.sizes = sizes;\n }\n if (srcset) {\n image.srcset = srcset;\n }\n if (src) {\n image.src = src;\n }\n } else {\n onReady();\n }\n } else {\n // image already loaded...\n onReady();\n }\n}\n","export default function preloadImages() {\n const swiper = this;\n swiper.imagesToLoad = swiper.$el.find('img');\n function onReady() {\n if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;\n if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;\n if (swiper.imagesLoaded === swiper.imagesToLoad.length) {\n if (swiper.params.updateOnImagesReady) swiper.update();\n swiper.emit('imagesReady');\n }\n }\n for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {\n const imageEl = swiper.imagesToLoad[i];\n swiper.loadImage(\n imageEl,\n imageEl.currentSrc || imageEl.getAttribute('src'),\n imageEl.srcset || imageEl.getAttribute('srcset'),\n imageEl.sizes || imageEl.getAttribute('sizes'),\n true,\n onReady,\n );\n }\n}\n","import loadImage from './loadImage.js';\nimport preloadImages from './preloadImages.js';\n\nexport default {\n loadImage,\n preloadImages,\n};\n","function checkOverflow() {\n const swiper = this;\n const params = swiper.params;\n const wasLocked = swiper.isLocked;\n const lastSlidePosition =\n swiper.slides.length > 0 &&\n params.slidesOffsetBefore +\n params.spaceBetween * (swiper.slides.length - 1) +\n swiper.slides[0].offsetWidth * swiper.slides.length;\n\n if (params.slidesOffsetBefore && params.slidesOffsetAfter && lastSlidePosition) {\n swiper.isLocked = lastSlidePosition <= swiper.size;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n\n swiper.allowSlideNext = !swiper.isLocked;\n swiper.allowSlidePrev = !swiper.isLocked;\n\n // events\n if (wasLocked !== swiper.isLocked) swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n if (swiper.navigation) swiper.navigation.update();\n }\n}\n\nexport default { checkOverflow };\n","export default {\n init: true,\n direction: 'horizontal',\n touchEventsTarget: 'wrapper',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n resizeObserver: true,\n nested: false,\n createElements: false,\n enabled: true,\n focusableElements: 'input, select, option, textarea, button, video, label',\n\n // Overrides\n width: null,\n height: null,\n\n //\n preventInteractionOnTransition: false,\n\n // ssr\n userAgent: null,\n url: null,\n\n // To support iOS's swipe-to-go-back gesture (when being used in-app).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n\n // Autoheight\n autoHeight: false,\n\n // Set wrapper width\n setWrapperSize: false,\n\n // Virtual Translate\n virtualTranslate: false,\n\n // Effects\n effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n\n // Breakpoints\n breakpoints: undefined,\n breakpointsBase: 'window',\n\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n slidesPerGroupAuto: false,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0, // in px\n slidesOffsetAfter: 0, // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: false,\n\n // Round length\n roundLengths: false,\n\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 0,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n\n // Unique Navigation Elements\n uniqueNavElements: true,\n\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n\n // Progress\n watchSlidesProgress: false,\n\n // Cursor\n grabCursor: false,\n\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n\n // Images\n preloadImages: true,\n updateOnImagesReady: true,\n\n // loop\n loop: false,\n loopAdditionalSlides: 0,\n loopedSlides: null,\n loopFillGroupWithBlank: false,\n loopPreventsSlide: true,\n\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null, // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n\n // Passive Listeners\n passiveListeners: true,\n\n // NS\n containerModifierClass: 'swiper-container-', // NEW\n slideClass: 'swiper-slide',\n slideBlankClass: 'swiper-slide-invisible-blank',\n slideActiveClass: 'swiper-slide-active',\n slideDuplicateActiveClass: 'swiper-slide-duplicate-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideDuplicateClass: 'swiper-slide-duplicate',\n slideNextClass: 'swiper-slide-next',\n slideDuplicateNextClass: 'swiper-slide-duplicate-next',\n slidePrevClass: 'swiper-slide-prev',\n slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',\n wrapperClass: 'swiper-wrapper',\n\n // Callbacks\n runCallbacksOnInit: true,\n\n // Internals\n _emitClasses: false,\n};\n","import { extend } from '../shared/utils.js';\n\nexport default function moduleExtendParams(params, allModulesParams) {\n return function extendParams(obj = {}) {\n const moduleParamName = Object.keys(obj)[0];\n const moduleParams = obj[moduleParamName];\n if (typeof moduleParams !== 'object' || moduleParams === null) {\n extend(allModulesParams, obj);\n return;\n }\n if (\n ['navigation', 'pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 &&\n params[moduleParamName] === true\n ) {\n params[moduleParamName] = { auto: true };\n }\n if (!(moduleParamName in params && 'enabled' in moduleParams)) {\n extend(allModulesParams, obj);\n return;\n }\n if (params[moduleParamName] === true) {\n params[moduleParamName] = { enabled: true };\n }\n if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {\n params[moduleParamName].enabled = true;\n }\n if (!params[moduleParamName]) params[moduleParamName] = { enabled: false };\n extend(allModulesParams, obj);\n };\n}\n","/* eslint no-param-reassign: \"off\" */\nimport { getDocument } from 'ssr-window';\nimport $ from '../shared/dom.js';\nimport { extend, now, deleteProps } from '../shared/utils.js';\nimport { getSupport } from '../shared/get-support.js';\nimport { getDevice } from '../shared/get-device.js';\nimport { getBrowser } from '../shared/get-browser.js';\n\nimport Resize from './modules/resize/resize.js';\nimport Observer from './modules/observer/observer.js';\n\nimport eventsEmitter from './events-emitter.js';\n\nimport update from './update/index.js';\nimport translate from './translate/index.js';\nimport transition from './transition/index.js';\nimport slide from './slide/index.js';\nimport loop from './loop/index.js';\nimport grabCursor from './grab-cursor/index.js';\nimport events from './events/index.js';\nimport breakpoints from './breakpoints/index.js';\nimport classes from './classes/index.js';\nimport images from './images/index.js';\nimport checkOverflow from './check-overflow/index.js';\n\nimport defaults from './defaults.js';\nimport moduleExtendParams from './moduleExtendParams.js';\n\nconst prototypes = {\n eventsEmitter,\n update,\n translate,\n transition,\n slide,\n loop,\n grabCursor,\n events,\n breakpoints,\n checkOverflow,\n classes,\n images,\n};\n\nconst extendedDefaults = {};\n\nclass Swiper {\n constructor(...args) {\n let el;\n let params;\n if (\n args.length === 1 &&\n args[0].constructor &&\n Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object'\n ) {\n params = args[0];\n } else {\n [el, params] = args;\n }\n if (!params) params = {};\n\n params = extend({}, params);\n if (el && !params.el) params.el = el;\n\n if (params.el && $(params.el).length > 1) {\n const swipers = [];\n $(params.el).each((containerEl) => {\n const newParams = extend({}, params, { el: containerEl });\n swipers.push(new Swiper(newParams));\n });\n return swipers;\n }\n\n // Swiper Instance\n const swiper = this;\n swiper.__swiper__ = true;\n swiper.support = getSupport();\n swiper.device = getDevice({ userAgent: params.userAgent });\n swiper.browser = getBrowser();\n\n swiper.eventsListeners = {};\n swiper.eventsAnyListeners = [];\n\n if (typeof swiper.modules === 'undefined') {\n swiper.modules = [];\n }\n if (params.modules && Array.isArray(params.modules)) {\n swiper.modules.push(...params.modules);\n }\n\n const allModulesParams = {};\n\n swiper.modules.forEach((mod) => {\n mod({\n swiper,\n extendParams: moduleExtendParams(params, allModulesParams),\n on: swiper.on.bind(swiper),\n once: swiper.once.bind(swiper),\n off: swiper.off.bind(swiper),\n emit: swiper.emit.bind(swiper),\n });\n });\n\n // Extend defaults with modules params\n const swiperParams = extend({}, defaults, allModulesParams);\n\n // Extend defaults with passed params\n swiper.params = extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = extend({}, swiper.params);\n swiper.passedParams = extend({}, params);\n\n // add event listeners\n if (swiper.params && swiper.params.on) {\n Object.keys(swiper.params.on).forEach((eventName) => {\n swiper.on(eventName, swiper.params.on[eventName]);\n });\n }\n if (swiper.params && swiper.params.onAny) {\n swiper.onAny(swiper.params.onAny);\n }\n\n // Save Dom lib\n swiper.$ = $;\n\n // Extend Swiper\n Object.assign(swiper, {\n enabled: swiper.params.enabled,\n el,\n\n // Classes\n classNames: [],\n\n // Slides\n slides: $(),\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n\n //\n isBeginning: true,\n isEnd: false,\n\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n\n // Touch Events\n touchEvents: (function touchEvents() {\n const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel'];\n const desktop = ['pointerdown', 'pointermove', 'pointerup'];\n\n swiper.touchEventsTouch = {\n start: touch[0],\n move: touch[1],\n end: touch[2],\n cancel: touch[3],\n };\n swiper.touchEventsDesktop = {\n start: desktop[0],\n move: desktop[1],\n end: desktop[2],\n };\n return swiper.support.touch || !swiper.params.simulateTouch\n ? swiper.touchEventsTouch\n : swiper.touchEventsDesktop;\n })(),\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n focusableElements: swiper.params.focusableElements,\n // Last click time\n lastClickTime: now(),\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n isTouchEvent: undefined,\n startMoving: undefined,\n },\n\n // Clicks\n allowClick: true,\n\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0,\n },\n\n // Images\n imagesToLoad: [],\n imagesLoaded: 0,\n });\n\n swiper.emit('_swiper');\n\n // Init\n if (swiper.params.init) {\n swiper.init();\n }\n\n // Return app instance\n return swiper;\n }\n\n enable() {\n const swiper = this;\n if (swiper.enabled) return;\n swiper.enabled = true;\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n swiper.emit('enable');\n }\n\n disable() {\n const swiper = this;\n if (!swiper.enabled) return;\n swiper.enabled = false;\n if (swiper.params.grabCursor) {\n swiper.unsetGrabCursor();\n }\n swiper.emit('disable');\n }\n\n setProgress(progress, speed) {\n const swiper = this;\n progress = Math.min(Math.max(progress, 0), 1);\n const min = swiper.minTranslate();\n const max = swiper.maxTranslate();\n const current = (max - min) * progress + min;\n swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n\n emitContainerClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const cls = swiper.el.className.split(' ').filter((className) => {\n return (\n className.indexOf('swiper-container') === 0 ||\n className.indexOf(swiper.params.containerModifierClass) === 0\n );\n });\n swiper.emit('_containerClasses', cls.join(' '));\n }\n\n getSlideClasses(slideEl) {\n const swiper = this;\n\n return slideEl.className\n .split(' ')\n .filter((className) => {\n return (\n className.indexOf('swiper-slide') === 0 ||\n className.indexOf(swiper.params.slideClass) === 0\n );\n })\n .join(' ');\n }\n\n emitSlidesClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const updates = [];\n swiper.slides.each((slideEl) => {\n const classNames = swiper.getSlideClasses(slideEl);\n updates.push({ slideEl, classNames });\n swiper.emit('_slideClass', slideEl, classNames);\n });\n swiper.emit('_slideClasses', updates);\n }\n\n slidesPerViewDynamic(view = 'current', exact = false) {\n const swiper = this;\n const { params, slides, slidesGrid, slidesSizesGrid, size: swiperSize, activeIndex } = swiper;\n let spv = 1;\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex].swiperSlideSize;\n let breakLoop;\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n // eslint-disable-next-line\n if (view === 'current') {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n const slideInView = exact\n ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize\n : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n } else {\n // previous\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n }\n }\n return spv;\n }\n\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const { snapGrid, params } = swiper;\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(\n Math.max(translateValue, swiper.maxTranslate()),\n swiper.minTranslate(),\n );\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n let translated;\n if (swiper.params.freeMode && swiper.params.freeMode.enabled) {\n setTranslate();\n if (swiper.params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if (\n (swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) &&\n swiper.isEnd &&\n !swiper.params.centeredSlides\n ) {\n translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n if (!translated) {\n setTranslate();\n }\n }\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n swiper.emit('update');\n }\n\n changeDirection(newDirection, needUpdate = true) {\n const swiper = this;\n const currentDirection = swiper.params.direction;\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n if (\n newDirection === currentDirection ||\n (newDirection !== 'horizontal' && newDirection !== 'vertical')\n ) {\n return swiper;\n }\n\n swiper.$el\n .removeClass(`${swiper.params.containerModifierClass}${currentDirection}`)\n .addClass(`${swiper.params.containerModifierClass}${newDirection}`);\n swiper.emitContainerClasses();\n\n swiper.params.direction = newDirection;\n\n swiper.slides.each((slideEl) => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n\n return swiper;\n }\n\n mount(el) {\n const swiper = this;\n if (swiper.mounted) return true;\n\n // Find el\n const $el = $(el || swiper.params.el);\n el = $el[0];\n\n if (!el) {\n return false;\n }\n\n el.swiper = swiper;\n\n const getWrapperSelector = () => {\n return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;\n };\n\n const getWrapper = () => {\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n const res = $(el.shadowRoot.querySelector(getWrapperSelector()));\n // Children needs to return slot items\n res.children = (options) => $el.children(options);\n return res;\n }\n return $el.children(getWrapperSelector());\n };\n // Find Wrapper\n let $wrapperEl = getWrapper();\n if ($wrapperEl.length === 0 && swiper.params.createElements) {\n const document = getDocument();\n const wrapper = document.createElement('div');\n $wrapperEl = $(wrapper);\n wrapper.className = swiper.params.wrapperClass;\n $el.append(wrapper);\n $el.children(`.${swiper.params.slideClass}`).each((slideEl) => {\n $wrapperEl.append(slideEl);\n });\n }\n\n Object.assign(swiper, {\n $el,\n el,\n $wrapperEl,\n wrapperEl: $wrapperEl[0],\n mounted: true,\n\n // RTL\n rtl: el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl',\n rtlTranslate:\n swiper.params.direction === 'horizontal' &&\n (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),\n wrongRTL: $wrapperEl.css('display') === '-webkit-box',\n });\n\n return true;\n }\n\n init(el) {\n const swiper = this;\n if (swiper.initialized) return swiper;\n\n const mounted = swiper.mount(el);\n if (mounted === false) return swiper;\n\n swiper.emit('beforeInit');\n\n // Set breakpoint\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Add Classes\n swiper.addClasses();\n\n // Create loop\n if (swiper.params.loop) {\n swiper.loopCreate();\n }\n\n // Update size\n swiper.updateSize();\n\n // Update slides\n swiper.updateSlides();\n\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n }\n\n // Set Grab Cursor\n if (swiper.params.grabCursor && swiper.enabled) {\n swiper.setGrabCursor();\n }\n\n if (swiper.params.preloadImages) {\n swiper.preloadImages();\n }\n\n // Slide To Initial Slide\n if (swiper.params.loop) {\n swiper.slideTo(\n swiper.params.initialSlide + swiper.loopedSlides,\n 0,\n swiper.params.runCallbacksOnInit,\n false,\n true,\n );\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);\n }\n\n // Attach events\n swiper.attachEvents();\n\n // Init Flag\n swiper.initialized = true;\n\n // Emit\n swiper.emit('init');\n swiper.emit('afterInit');\n\n return swiper;\n }\n\n destroy(deleteInstance = true, cleanStyles = true) {\n const swiper = this;\n const { params, $el, $wrapperEl, slides } = swiper;\n\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n\n swiper.emit('beforeDestroy');\n\n // Init Flag\n swiper.initialized = false;\n\n // Detach events\n swiper.detachEvents();\n\n // Destroy loop\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n // Cleanup styles\n if (cleanStyles) {\n swiper.removeClasses();\n $el.removeAttr('style');\n $wrapperEl.removeAttr('style');\n if (slides && slides.length) {\n slides\n .removeClass(\n [\n params.slideVisibleClass,\n params.slideActiveClass,\n params.slideNextClass,\n params.slidePrevClass,\n ].join(' '),\n )\n .removeAttr('style')\n .removeAttr('data-swiper-slide-index');\n }\n }\n\n swiper.emit('destroy');\n\n // Detach emitter events\n Object.keys(swiper.eventsListeners).forEach((eventName) => {\n swiper.off(eventName);\n });\n\n if (deleteInstance !== false) {\n swiper.$el[0].swiper = null;\n deleteProps(swiper);\n }\n swiper.destroyed = true;\n\n return null;\n }\n\n static extendDefaults(newDefaults) {\n extend(extendedDefaults, newDefaults);\n }\n\n static get extendedDefaults() {\n return extendedDefaults;\n }\n\n static get defaults() {\n return defaults;\n }\n\n static installModule(mod) {\n if (!Swiper.prototype.modules) Swiper.prototype.modules = [];\n const modules = Swiper.prototype.modules;\n\n if (typeof mod === 'function' && modules.indexOf(mod) < 0) {\n modules.push(mod);\n }\n }\n\n static use(module) {\n if (Array.isArray(module)) {\n module.forEach((m) => Swiper.installModule(m));\n return Swiper;\n }\n Swiper.installModule(module);\n return Swiper;\n }\n}\n\nObject.keys(prototypes).forEach((prototypeGroup) => {\n Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n });\n});\n\nSwiper.use([Resize, Observer]);\n\nexport default Swiper;\n","import $ from '../../shared/dom.js';\nimport { setCSSProperty } from '../../shared/utils.js';\n\nexport default function Virtual({ swiper, extendParams, on }) {\n extendParams({\n virtual: {\n enabled: false,\n slides: [],\n cache: true,\n renderSlide: null,\n renderExternal: null,\n renderExternalUpdate: true,\n addSlidesBefore: 0,\n addSlidesAfter: 0,\n },\n });\n\n swiper.virtual = {\n cache: {},\n from: undefined,\n to: undefined,\n slides: [],\n offset: 0,\n slidesGrid: [],\n };\n\n function renderSlide(slide, index) {\n const params = swiper.params.virtual;\n if (params.cache && swiper.virtual.cache[index]) {\n return swiper.virtual.cache[index];\n }\n const $slideEl = params.renderSlide\n ? $(params.renderSlide.call(swiper, slide, index))\n : $(\n `
${slide}
`,\n );\n if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index);\n if (params.cache) swiper.virtual.cache[index] = $slideEl;\n return $slideEl;\n }\n\n function update(force) {\n const { slidesPerView, slidesPerGroup, centeredSlides } = swiper.params;\n const { addSlidesBefore, addSlidesAfter } = swiper.params.virtual;\n const {\n from: previousFrom,\n to: previousTo,\n slides,\n slidesGrid: previousSlidesGrid,\n offset: previousOffset,\n } = swiper.virtual;\n swiper.updateActiveIndex();\n const activeIndex = swiper.activeIndex || 0;\n\n let offsetProp;\n if (swiper.rtlTranslate) offsetProp = 'right';\n else offsetProp = swiper.isHorizontal() ? 'left' : 'top';\n\n let slidesAfter;\n let slidesBefore;\n if (centeredSlides) {\n slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;\n slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;\n } else {\n slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesAfter;\n slidesBefore = slidesPerGroup + addSlidesBefore;\n }\n const from = Math.max((activeIndex || 0) - slidesBefore, 0);\n const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);\n const offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);\n\n Object.assign(swiper.virtual, {\n from,\n to,\n offset,\n slidesGrid: swiper.slidesGrid,\n });\n\n function onRendered() {\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n if (swiper.lazy && swiper.params.lazy.enabled) {\n swiper.lazy.load();\n }\n }\n\n if (previousFrom === from && previousTo === to && !force) {\n if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {\n swiper.slides.css(offsetProp, `${offset}px`);\n }\n swiper.updateProgress();\n return;\n }\n if (swiper.params.virtual.renderExternal) {\n swiper.params.virtual.renderExternal.call(swiper, {\n offset,\n from,\n to,\n slides: (function getSlides() {\n const slidesToRender = [];\n for (let i = from; i <= to; i += 1) {\n slidesToRender.push(slides[i]);\n }\n return slidesToRender;\n })(),\n });\n if (swiper.params.virtual.renderExternalUpdate) {\n onRendered();\n }\n return;\n }\n const prependIndexes = [];\n const appendIndexes = [];\n if (force) {\n swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove();\n } else {\n for (let i = previousFrom; i <= previousTo; i += 1) {\n if (i < from || i > to) {\n swiper.$wrapperEl\n .find(`.${swiper.params.slideClass}[data-swiper-slide-index=\"${i}\"]`)\n .remove();\n }\n }\n }\n for (let i = 0; i < slides.length; i += 1) {\n if (i >= from && i <= to) {\n if (typeof previousTo === 'undefined' || force) {\n appendIndexes.push(i);\n } else {\n if (i > previousTo) appendIndexes.push(i);\n if (i < previousFrom) prependIndexes.push(i);\n }\n }\n }\n appendIndexes.forEach((index) => {\n swiper.$wrapperEl.append(renderSlide(slides[index], index));\n });\n prependIndexes\n .sort((a, b) => b - a)\n .forEach((index) => {\n swiper.$wrapperEl.prepend(renderSlide(slides[index], index));\n });\n swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset}px`);\n onRendered();\n }\n\n function appendSlide(slides) {\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) swiper.virtual.slides.push(slides[i]);\n }\n } else {\n swiper.virtual.slides.push(slides);\n }\n update(true);\n }\n function prependSlide(slides) {\n const activeIndex = swiper.activeIndex;\n let newActiveIndex = activeIndex + 1;\n let numberOfNewSlides = 1;\n\n if (Array.isArray(slides)) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) swiper.virtual.slides.unshift(slides[i]);\n }\n newActiveIndex = activeIndex + slides.length;\n numberOfNewSlides = slides.length;\n } else {\n swiper.virtual.slides.unshift(slides);\n }\n if (swiper.params.virtual.cache) {\n const cache = swiper.virtual.cache;\n const newCache = {};\n Object.keys(cache).forEach((cachedIndex) => {\n const $cachedEl = cache[cachedIndex];\n const cachedElIndex = $cachedEl.attr('data-swiper-slide-index');\n if (cachedElIndex) {\n $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + 1);\n }\n newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl;\n });\n swiper.virtual.cache = newCache;\n }\n update(true);\n swiper.slideTo(newActiveIndex, 0);\n }\n function removeSlide(slidesIndexes) {\n if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return;\n let activeIndex = swiper.activeIndex;\n if (Array.isArray(slidesIndexes)) {\n for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) {\n swiper.virtual.slides.splice(slidesIndexes[i], 1);\n if (swiper.params.virtual.cache) {\n delete swiper.virtual.cache[slidesIndexes[i]];\n }\n if (slidesIndexes[i] < activeIndex) activeIndex -= 1;\n activeIndex = Math.max(activeIndex, 0);\n }\n } else {\n swiper.virtual.slides.splice(slidesIndexes, 1);\n if (swiper.params.virtual.cache) {\n delete swiper.virtual.cache[slidesIndexes];\n }\n if (slidesIndexes < activeIndex) activeIndex -= 1;\n activeIndex = Math.max(activeIndex, 0);\n }\n update(true);\n swiper.slideTo(activeIndex, 0);\n }\n function removeAllSlides() {\n swiper.virtual.slides = [];\n if (swiper.params.virtual.cache) {\n swiper.virtual.cache = {};\n }\n update(true);\n swiper.slideTo(0, 0);\n }\n\n on('beforeInit', () => {\n if (!swiper.params.virtual.enabled) return;\n swiper.virtual.slides = swiper.params.virtual.slides;\n swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`);\n\n swiper.params.watchSlidesProgress = true;\n swiper.originalParams.watchSlidesProgress = true;\n\n if (!swiper.params.initialSlide) {\n update();\n }\n });\n on('setTranslate', () => {\n if (!swiper.params.virtual.enabled) return;\n update();\n });\n on('init update resize', () => {\n if (!swiper.params.virtual.enabled) return;\n if (swiper.params.cssMode) {\n setCSSProperty(swiper.wrapperEl, '--swiper-virtual-size', `${swiper.virtualSize}px`);\n }\n });\n\n Object.assign(swiper.virtual, {\n appendSlide,\n prependSlide,\n removeSlide,\n removeAllSlides,\n update,\n });\n}\n","/* eslint-disable consistent-return */\nimport { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\n\nexport default function Keyboard({ swiper, extendParams, on, emit }) {\n const document = getDocument();\n const window = getWindow();\n swiper.keyboard = {\n enabled: true,\n };\n extendParams({\n keyboard: {\n enabled: false,\n onlyInViewport: true,\n pageUpDown: true,\n },\n });\n\n function handle(event) {\n if (!swiper.enabled) return;\n\n const { rtlTranslate: rtl } = swiper;\n let e = event;\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n const kc = e.keyCode || e.charCode;\n const pageUpDown = swiper.params.keyboard.pageUpDown;\n const isPageUp = pageUpDown && kc === 33;\n const isPageDown = pageUpDown && kc === 34;\n const isArrowLeft = kc === 37;\n const isArrowRight = kc === 39;\n const isArrowUp = kc === 38;\n const isArrowDown = kc === 40;\n // Directions locks\n if (\n !swiper.allowSlideNext &&\n ((swiper.isHorizontal() && isArrowRight) ||\n (swiper.isVertical() && isArrowDown) ||\n isPageDown)\n ) {\n return false;\n }\n if (\n !swiper.allowSlidePrev &&\n ((swiper.isHorizontal() && isArrowLeft) || (swiper.isVertical() && isArrowUp) || isPageUp)\n ) {\n return false;\n }\n if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {\n return undefined;\n }\n if (\n document.activeElement &&\n document.activeElement.nodeName &&\n (document.activeElement.nodeName.toLowerCase() === 'input' ||\n document.activeElement.nodeName.toLowerCase() === 'textarea')\n ) {\n return undefined;\n }\n if (\n swiper.params.keyboard.onlyInViewport &&\n (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)\n ) {\n let inView = false;\n // Check that swiper should be inside of visible area of window\n if (\n swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 &&\n swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0\n ) {\n return undefined;\n }\n\n const $el = swiper.$el;\n const swiperWidth = $el[0].clientWidth;\n const swiperHeight = $el[0].clientHeight;\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const swiperOffset = swiper.$el.offset();\n if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n const swiperCoord = [\n [swiperOffset.left, swiperOffset.top],\n [swiperOffset.left + swiperWidth, swiperOffset.top],\n [swiperOffset.left, swiperOffset.top + swiperHeight],\n [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight],\n ];\n for (let i = 0; i < swiperCoord.length; i += 1) {\n const point = swiperCoord[i];\n if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) {\n if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line\n inView = true;\n }\n }\n if (!inView) return undefined;\n }\n if (swiper.isHorizontal()) {\n if (isPageUp || isPageDown || isArrowLeft || isArrowRight) {\n if (e.preventDefault) e.preventDefault();\n else e.returnValue = false;\n }\n if (((isPageDown || isArrowRight) && !rtl) || ((isPageUp || isArrowLeft) && rtl))\n swiper.slideNext();\n if (((isPageUp || isArrowLeft) && !rtl) || ((isPageDown || isArrowRight) && rtl))\n swiper.slidePrev();\n } else {\n if (isPageUp || isPageDown || isArrowUp || isArrowDown) {\n if (e.preventDefault) e.preventDefault();\n else e.returnValue = false;\n }\n if (isPageDown || isArrowDown) swiper.slideNext();\n if (isPageUp || isArrowUp) swiper.slidePrev();\n }\n emit('keyPress', kc);\n return undefined;\n }\n function enable() {\n if (swiper.keyboard.enabled) return;\n $(document).on('keydown', handle);\n swiper.keyboard.enabled = true;\n }\n function disable() {\n if (!swiper.keyboard.enabled) return;\n $(document).off('keydown', handle);\n swiper.keyboard.enabled = false;\n }\n\n on('init', () => {\n if (swiper.params.keyboard.enabled) {\n enable();\n }\n });\n on('destroy', () => {\n if (swiper.keyboard.enabled) {\n disable();\n }\n });\n\n Object.assign(swiper.keyboard, {\n enable,\n disable,\n });\n}\n","/* eslint-disable consistent-return */\nimport { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { now, nextTick } from '../../shared/utils.js';\n\nexport default function Mousewheel({ swiper, extendParams, on, emit }) {\n const window = getWindow();\n\n extendParams({\n mousewheel: {\n enabled: false,\n releaseOnEdges: false,\n invert: false,\n forceToAxis: false,\n sensitivity: 1,\n eventsTarget: 'container',\n thresholdDelta: null,\n thresholdTime: null,\n },\n });\n\n swiper.mousewheel = {\n enabled: false,\n };\n\n let timeout;\n let lastScrollTime = now();\n let lastEventBeforeSnap;\n const recentWheelEvents = [];\n\n function normalize(e) {\n // Reasonable defaults\n const PIXEL_STEP = 10;\n const LINE_HEIGHT = 40;\n const PAGE_HEIGHT = 800;\n\n let sX = 0;\n let sY = 0; // spinX, spinY\n let pX = 0;\n let pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in e) {\n sY = e.detail;\n }\n if ('wheelDelta' in e) {\n sY = -e.wheelDelta / 120;\n }\n if ('wheelDeltaY' in e) {\n sY = -e.wheelDeltaY / 120;\n }\n if ('wheelDeltaX' in e) {\n sX = -e.wheelDeltaX / 120;\n }\n\n // side scrolling on FF with DOMMouseScroll\n if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in e) {\n pY = e.deltaY;\n }\n if ('deltaX' in e) {\n pX = e.deltaX;\n }\n\n if (e.shiftKey && !pX) {\n // if user scrolls with shift he wants horizontal scroll\n pX = pY;\n pY = 0;\n }\n\n if ((pX || pY) && e.deltaMode) {\n if (e.deltaMode === 1) {\n // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else {\n // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) {\n sX = pX < 1 ? -1 : 1;\n }\n if (pY && !sY) {\n sY = pY < 1 ? -1 : 1;\n }\n\n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY,\n };\n }\n function handleMouseEnter() {\n if (!swiper.enabled) return;\n swiper.mouseEntered = true;\n }\n function handleMouseLeave() {\n if (!swiper.enabled) return;\n swiper.mouseEntered = false;\n }\n function animateSlider(newEvent) {\n if (\n swiper.params.mousewheel.thresholdDelta &&\n newEvent.delta < swiper.params.mousewheel.thresholdDelta\n ) {\n // Prevent if delta of wheel scroll delta is below configured threshold\n return false;\n }\n\n if (\n swiper.params.mousewheel.thresholdTime &&\n now() - lastScrollTime < swiper.params.mousewheel.thresholdTime\n ) {\n // Prevent if time between scrolls is below configured threshold\n return false;\n }\n\n // If the movement is NOT big enough and\n // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider):\n // Don't go any further (avoid insignificant scroll movement).\n if (newEvent.delta >= 6 && now() - lastScrollTime < 60) {\n // Return false as a default\n return true;\n }\n // If user is scrolling towards the end:\n // If the slider hasn't hit the latest slide or\n // if the slider is a loop and\n // if the slider isn't moving right now:\n // Go to next slide and\n // emit a scroll event.\n // Else (the user is scrolling towards the beginning) and\n // if the slider hasn't hit the first slide or\n // if the slider is a loop and\n // if the slider isn't moving right now:\n // Go to prev slide and\n // emit a scroll event.\n if (newEvent.direction < 0) {\n if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {\n swiper.slideNext();\n emit('scroll', newEvent.raw);\n }\n } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {\n swiper.slidePrev();\n emit('scroll', newEvent.raw);\n }\n // If you got here is because an animation has been triggered so store the current time\n lastScrollTime = new window.Date().getTime();\n // Return false as a default\n return false;\n }\n function releaseScroll(newEvent) {\n const params = swiper.params.mousewheel;\n if (newEvent.direction < 0) {\n if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) {\n // Return true to animate scroll on edges\n return true;\n }\n } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) {\n // Return true to animate scroll on edges\n return true;\n }\n return false;\n }\n function handle(event) {\n let e = event;\n let disableParentSwiper = true;\n if (!swiper.enabled) return;\n const params = swiper.params.mousewheel;\n\n if (swiper.params.cssMode) {\n e.preventDefault();\n }\n\n let target = swiper.$el;\n if (swiper.params.mousewheel.eventsTarget !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarget);\n }\n if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges)\n return true;\n\n if (e.originalEvent) e = e.originalEvent; // jquery fix\n let delta = 0;\n const rtlFactor = swiper.rtlTranslate ? -1 : 1;\n\n const data = normalize(e);\n\n if (params.forceToAxis) {\n if (swiper.isHorizontal()) {\n if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;\n else return true;\n } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;\n else return true;\n } else {\n delta =\n Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;\n }\n\n if (delta === 0) return true;\n\n if (params.invert) delta = -delta;\n\n // Get the scroll positions\n let positions = swiper.getTranslate() + delta * params.sensitivity;\n\n if (positions >= swiper.minTranslate()) positions = swiper.minTranslate();\n if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate();\n\n // When loop is true:\n // the disableParentSwiper will be true.\n // When loop is false:\n // if the scroll positions is not on edge,\n // then the disableParentSwiper will be true.\n // if the scroll on edge positions,\n // then the disableParentSwiper will be false.\n disableParentSwiper = swiper.params.loop\n ? true\n : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate());\n\n if (disableParentSwiper && swiper.params.nested) e.stopPropagation();\n\n if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) {\n // Register the new event in a variable which stores the relevant data\n const newEvent = {\n time: now(),\n delta: Math.abs(delta),\n direction: Math.sign(delta),\n raw: event,\n };\n\n // Keep the most recent events\n if (recentWheelEvents.length >= 2) {\n recentWheelEvents.shift(); // only store the last N events\n }\n const prevEvent = recentWheelEvents.length\n ? recentWheelEvents[recentWheelEvents.length - 1]\n : undefined;\n recentWheelEvents.push(newEvent);\n\n // If there is at least one previous recorded event:\n // If direction has changed or\n // if the scroll is quicker than the previous one:\n // Animate the slider.\n // Else (this is the first time the wheel is moved):\n // Animate the slider.\n if (prevEvent) {\n if (\n newEvent.direction !== prevEvent.direction ||\n newEvent.delta > prevEvent.delta ||\n newEvent.time > prevEvent.time + 150\n ) {\n animateSlider(newEvent);\n }\n } else {\n animateSlider(newEvent);\n }\n\n // If it's time to release the scroll:\n // Return now so you don't hit the preventDefault.\n if (releaseScroll(newEvent)) {\n return true;\n }\n } else {\n // Freemode or scrollContainer:\n\n // If we recently snapped after a momentum scroll, then ignore wheel events\n // to give time for the deceleration to finish. Stop ignoring after 500 msecs\n // or if it's a new scroll (larger delta or inverse sign as last event before\n // an end-of-momentum snap).\n const newEvent = {\n time: now(),\n delta: Math.abs(delta),\n direction: Math.sign(delta),\n };\n const ignoreWheelEvents =\n lastEventBeforeSnap &&\n newEvent.time < lastEventBeforeSnap.time + 500 &&\n newEvent.delta <= lastEventBeforeSnap.delta &&\n newEvent.direction === lastEventBeforeSnap.direction;\n if (!ignoreWheelEvents) {\n lastEventBeforeSnap = undefined;\n\n if (swiper.params.loop) {\n swiper.loopFix();\n }\n let position = swiper.getTranslate() + delta * params.sensitivity;\n const wasBeginning = swiper.isBeginning;\n const wasEnd = swiper.isEnd;\n\n if (position >= swiper.minTranslate()) position = swiper.minTranslate();\n if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();\n\n swiper.setTransition(0);\n swiper.setTranslate(position);\n swiper.updateProgress();\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n\n if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) {\n swiper.updateSlidesClasses();\n }\n\n if (swiper.params.freeMode.sticky) {\n // When wheel scrolling starts with sticky (aka snap) enabled, then detect\n // the end of a momentum scroll by storing recent (N=15?) wheel events.\n // 1. do all N events have decreasing or same (absolute value) delta?\n // 2. did all N events arrive in the last M (M=500?) msecs?\n // 3. does the earliest event have an (absolute value) delta that's\n // at least P (P=1?) larger than the most recent event's delta?\n // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels?\n // If 1-4 are \"yes\" then we're near the end of a momentum scroll deceleration.\n // Snap immediately and ignore remaining wheel events in this scroll.\n // See comment above for \"remaining wheel events in this scroll\" determination.\n // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event.\n clearTimeout(timeout);\n timeout = undefined;\n if (recentWheelEvents.length >= 15) {\n recentWheelEvents.shift(); // only store the last N events\n }\n const prevEvent = recentWheelEvents.length\n ? recentWheelEvents[recentWheelEvents.length - 1]\n : undefined;\n const firstEvent = recentWheelEvents[0];\n recentWheelEvents.push(newEvent);\n if (\n prevEvent &&\n (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)\n ) {\n // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log.\n recentWheelEvents.splice(0);\n } else if (\n recentWheelEvents.length >= 15 &&\n newEvent.time - firstEvent.time < 500 &&\n firstEvent.delta - newEvent.delta >= 1 &&\n newEvent.delta <= 6\n ) {\n // We're at the end of the deceleration of a momentum scroll, so there's no need\n // to wait for more events. Snap ASAP on the next tick.\n // Also, because there's some remaining momentum we'll bias the snap in the\n // direction of the ongoing scroll because it's better UX for the scroll to snap\n // in the same direction as the scroll instead of reversing to snap. Therefore,\n // if it's already scrolled more than 20% in the current direction, keep going.\n const snapToThreshold = delta > 0 ? 0.8 : 0.2;\n lastEventBeforeSnap = newEvent;\n recentWheelEvents.splice(0);\n timeout = nextTick(() => {\n swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n }, 0); // no delay; move on next tick\n }\n if (!timeout) {\n // if we get here, then we haven't detected the end of a momentum scroll, so\n // we'll consider a scroll \"complete\" when there haven't been any wheel events\n // for 500ms.\n timeout = nextTick(() => {\n const snapToThreshold = 0.5;\n lastEventBeforeSnap = newEvent;\n recentWheelEvents.splice(0);\n swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);\n }, 500);\n }\n }\n\n // Emit event\n if (!ignoreWheelEvents) emit('scroll', e);\n\n // Stop autoplay\n if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction)\n swiper.autoplay.stop();\n // Return page scroll on edge positions\n if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;\n }\n }\n\n if (e.preventDefault) e.preventDefault();\n else e.returnValue = false;\n return false;\n }\n\n function events(method) {\n let target = swiper.$el;\n if (swiper.params.mousewheel.eventsTarget !== 'container') {\n target = $(swiper.params.mousewheel.eventsTarget);\n }\n target[method]('mouseenter', handleMouseEnter);\n target[method]('mouseleave', handleMouseLeave);\n target[method]('wheel', handle);\n }\n\n function enable() {\n if (swiper.params.cssMode) {\n swiper.wrapperEl.removeEventListener('wheel', handle);\n return true;\n }\n if (swiper.mousewheel.enabled) return false;\n events('on');\n swiper.mousewheel.enabled = true;\n return true;\n }\n function disable() {\n if (swiper.params.cssMode) {\n swiper.wrapperEl.addEventListener(event, handle);\n return true;\n }\n if (!swiper.mousewheel.enabled) return false;\n events('off');\n swiper.mousewheel.enabled = false;\n return true;\n }\n\n on('init', () => {\n if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) {\n disable();\n }\n if (swiper.params.mousewheel.enabled) enable();\n });\n on('destroy', () => {\n if (swiper.params.cssMode) {\n enable();\n }\n if (swiper.mousewheel.enabled) disable();\n });\n\n Object.assign(swiper.mousewheel, {\n enable,\n disable,\n });\n}\n","import $ from '../../shared/dom.js';\nimport { createElementIfNotDefined } from '../../shared/utils.js';\n\nexport default function Navigation({ swiper, extendParams, on, emit }) {\n extendParams({\n navigation: {\n nextEl: null,\n prevEl: null,\n\n hideOnClick: false,\n disabledClass: 'swiper-button-disabled',\n hiddenClass: 'swiper-button-hidden',\n lockClass: 'swiper-button-lock',\n },\n });\n\n swiper.navigation = {\n nextEl: null,\n $nextEl: null,\n prevEl: null,\n $prevEl: null,\n };\n\n function getEl(el) {\n let $el;\n if (el) {\n $el = $(el);\n if (\n swiper.params.uniqueNavElements &&\n typeof el === 'string' &&\n $el.length > 1 &&\n swiper.$el.find(el).length === 1\n ) {\n $el = swiper.$el.find(el);\n }\n }\n return $el;\n }\n\n function toggleEl($el, disabled) {\n const params = swiper.params.navigation;\n if ($el && $el.length > 0) {\n $el[disabled ? 'addClass' : 'removeClass'](params.disabledClass);\n if ($el[0] && $el[0].tagName === 'BUTTON') $el[0].disabled = disabled;\n if (swiper.params.watchOverflow && swiper.enabled) {\n $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n }\n }\n }\n function update() {\n // Update Navigation Buttons\n if (swiper.params.loop) return;\n const { $nextEl, $prevEl } = swiper.navigation;\n\n toggleEl($prevEl, swiper.isBeginning);\n toggleEl($nextEl, swiper.isEnd);\n }\n function onPrevClick(e) {\n e.preventDefault();\n if (swiper.isBeginning && !swiper.params.loop) return;\n swiper.slidePrev();\n }\n function onNextClick(e) {\n e.preventDefault();\n if (swiper.isEnd && !swiper.params.loop) return;\n swiper.slideNext();\n }\n function init() {\n const params = swiper.params.navigation;\n\n swiper.params.navigation = createElementIfNotDefined(\n swiper,\n swiper.originalParams.navigation,\n swiper.params.navigation,\n {\n nextEl: 'swiper-button-next',\n prevEl: 'swiper-button-prev',\n },\n );\n if (!(params.nextEl || params.prevEl)) return;\n\n const $nextEl = getEl(params.nextEl);\n const $prevEl = getEl(params.prevEl);\n\n if ($nextEl && $nextEl.length > 0) {\n $nextEl.on('click', onNextClick);\n }\n if ($prevEl && $prevEl.length > 0) {\n $prevEl.on('click', onPrevClick);\n }\n\n Object.assign(swiper.navigation, {\n $nextEl,\n nextEl: $nextEl && $nextEl[0],\n $prevEl,\n prevEl: $prevEl && $prevEl[0],\n });\n\n if (!swiper.enabled) {\n if ($nextEl) $nextEl.addClass(params.lockClass);\n if ($prevEl) $prevEl.addClass(params.lockClass);\n }\n }\n function destroy() {\n const { $nextEl, $prevEl } = swiper.navigation;\n if ($nextEl && $nextEl.length) {\n $nextEl.off('click', onNextClick);\n $nextEl.removeClass(swiper.params.navigation.disabledClass);\n }\n if ($prevEl && $prevEl.length) {\n $prevEl.off('click', onPrevClick);\n $prevEl.removeClass(swiper.params.navigation.disabledClass);\n }\n }\n\n on('init', () => {\n init();\n update();\n });\n on('toEdge', () => {\n update();\n });\n on('fromEdge', () => {\n update();\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n const { $nextEl, $prevEl } = swiper.navigation;\n if ($nextEl) {\n $nextEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass);\n }\n if ($prevEl) {\n $prevEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass);\n }\n });\n on('click', (_s, e) => {\n const { $nextEl, $prevEl } = swiper.navigation;\n const targetEl = e.target;\n if (\n swiper.params.navigation.hideOnClick &&\n !$(targetEl).is($prevEl) &&\n !$(targetEl).is($nextEl)\n ) {\n if (\n swiper.pagination &&\n swiper.params.pagination &&\n swiper.params.pagination.clickable &&\n (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))\n )\n return;\n let isHidden;\n if ($nextEl) {\n isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass);\n } else if ($prevEl) {\n isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass);\n }\n if (isHidden === true) {\n emit('navigationShow');\n } else {\n emit('navigationHide');\n }\n if ($nextEl) {\n $nextEl.toggleClass(swiper.params.navigation.hiddenClass);\n }\n if ($prevEl) {\n $prevEl.toggleClass(swiper.params.navigation.hiddenClass);\n }\n }\n });\n\n Object.assign(swiper.navigation, {\n update,\n init,\n destroy,\n });\n}\n","import $ from '../../shared/dom.js';\nimport { classesToSelector, createElementIfNotDefined } from '../../shared/utils.js';\n\nexport default function Pagination({ swiper, extendParams, on, emit }) {\n const pfx = 'swiper-pagination';\n extendParams({\n pagination: {\n el: null,\n bulletElement: 'span',\n clickable: false,\n hideOnClick: false,\n renderBullet: null,\n renderProgressbar: null,\n renderFraction: null,\n renderCustom: null,\n progressbarOpposite: false,\n type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'\n dynamicBullets: false,\n dynamicMainBullets: 1,\n formatFractionCurrent: (number) => number,\n formatFractionTotal: (number) => number,\n bulletClass: `${pfx}-bullet`,\n bulletActiveClass: `${pfx}-bullet-active`,\n modifierClass: `${pfx}-`,\n currentClass: `${pfx}-current`,\n totalClass: `${pfx}-total`,\n hiddenClass: `${pfx}-hidden`,\n progressbarFillClass: `${pfx}-progressbar-fill`,\n progressbarOppositeClass: `${pfx}-progressbar-opposite`,\n clickableClass: `${pfx}-clickable`,\n lockClass: `${pfx}-lock`,\n horizontalClass: `${pfx}-horizontal`,\n verticalClass: `${pfx}-vertical`,\n },\n });\n\n swiper.pagination = {\n el: null,\n $el: null,\n bullets: [],\n };\n\n let bulletSize;\n let dynamicBulletIndex = 0;\n\n function isPaginationDisabled() {\n return (\n !swiper.params.pagination.el ||\n !swiper.pagination.el ||\n !swiper.pagination.$el ||\n swiper.pagination.$el.length === 0\n );\n }\n\n function setSideBullets($bulletEl, position) {\n const { bulletActiveClass } = swiper.params.pagination;\n $bulletEl[position]()\n .addClass(`${bulletActiveClass}-${position}`)\n [position]()\n .addClass(`${bulletActiveClass}-${position}-${position}`);\n }\n\n function update() {\n // Render || Update Pagination bullets/items\n const rtl = swiper.rtl;\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength =\n swiper.virtual && swiper.params.virtual.enabled\n ? swiper.virtual.slides.length\n : swiper.slides.length;\n const $el = swiper.pagination.$el;\n // Current/Total\n let current;\n const total = swiper.params.loop\n ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup)\n : swiper.snapGrid.length;\n if (swiper.params.loop) {\n current = Math.ceil(\n (swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup,\n );\n if (current > slidesLength - 1 - swiper.loopedSlides * 2) {\n current -= slidesLength - swiper.loopedSlides * 2;\n }\n if (current > total - 1) current -= total;\n if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;\n } else if (typeof swiper.snapIndex !== 'undefined') {\n current = swiper.snapIndex;\n } else {\n current = swiper.activeIndex || 0;\n }\n // Types\n if (\n params.type === 'bullets' &&\n swiper.pagination.bullets &&\n swiper.pagination.bullets.length > 0\n ) {\n const bullets = swiper.pagination.bullets;\n let firstIndex;\n let lastIndex;\n let midIndex;\n if (params.dynamicBullets) {\n bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);\n $el.css(\n swiper.isHorizontal() ? 'width' : 'height',\n `${bulletSize * (params.dynamicMainBullets + 4)}px`,\n );\n if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {\n dynamicBulletIndex += current - swiper.previousIndex;\n if (dynamicBulletIndex > params.dynamicMainBullets - 1) {\n dynamicBulletIndex = params.dynamicMainBullets - 1;\n } else if (dynamicBulletIndex < 0) {\n dynamicBulletIndex = 0;\n }\n }\n firstIndex = current - dynamicBulletIndex;\n lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);\n midIndex = (lastIndex + firstIndex) / 2;\n }\n bullets.removeClass(\n ['', '-next', '-next-next', '-prev', '-prev-prev', '-main']\n .map((suffix) => `${params.bulletActiveClass}${suffix}`)\n .join(' '),\n );\n if ($el.length > 1) {\n bullets.each((bullet) => {\n const $bullet = $(bullet);\n const bulletIndex = $bullet.index();\n if (bulletIndex === current) {\n $bullet.addClass(params.bulletActiveClass);\n }\n if (params.dynamicBullets) {\n if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {\n $bullet.addClass(`${params.bulletActiveClass}-main`);\n }\n if (bulletIndex === firstIndex) {\n setSideBullets($bullet, 'prev');\n }\n if (bulletIndex === lastIndex) {\n setSideBullets($bullet, 'next');\n }\n }\n });\n } else {\n const $bullet = bullets.eq(current);\n const bulletIndex = $bullet.index();\n $bullet.addClass(params.bulletActiveClass);\n if (params.dynamicBullets) {\n const $firstDisplayedBullet = bullets.eq(firstIndex);\n const $lastDisplayedBullet = bullets.eq(lastIndex);\n for (let i = firstIndex; i <= lastIndex; i += 1) {\n bullets.eq(i).addClass(`${params.bulletActiveClass}-main`);\n }\n if (swiper.params.loop) {\n if (bulletIndex >= bullets.length - params.dynamicMainBullets) {\n for (let i = params.dynamicMainBullets; i >= 0; i -= 1) {\n bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`);\n }\n bullets\n .eq(bullets.length - params.dynamicMainBullets - 1)\n .addClass(`${params.bulletActiveClass}-prev`);\n } else {\n setSideBullets($firstDisplayedBullet, 'prev');\n setSideBullets($lastDisplayedBullet, 'next');\n }\n } else {\n setSideBullets($firstDisplayedBullet, 'prev');\n setSideBullets($lastDisplayedBullet, 'next');\n }\n }\n }\n if (params.dynamicBullets) {\n const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);\n const bulletsOffset =\n (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize;\n const offsetProp = rtl ? 'right' : 'left';\n bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`);\n }\n }\n if (params.type === 'fraction') {\n $el\n .find(classesToSelector(params.currentClass))\n .text(params.formatFractionCurrent(current + 1));\n $el.find(classesToSelector(params.totalClass)).text(params.formatFractionTotal(total));\n }\n if (params.type === 'progressbar') {\n let progressbarDirection;\n if (params.progressbarOpposite) {\n progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';\n } else {\n progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';\n }\n const scale = (current + 1) / total;\n let scaleX = 1;\n let scaleY = 1;\n if (progressbarDirection === 'horizontal') {\n scaleX = scale;\n } else {\n scaleY = scale;\n }\n $el\n .find(classesToSelector(params.progressbarFillClass))\n .transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`)\n .transition(swiper.params.speed);\n }\n if (params.type === 'custom' && params.renderCustom) {\n $el.html(params.renderCustom(swiper, current + 1, total));\n emit('paginationRender', $el[0]);\n } else {\n emit('paginationUpdate', $el[0]);\n }\n if (swiper.params.watchOverflow && swiper.enabled) {\n $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);\n }\n }\n function render() {\n // Render Container\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength =\n swiper.virtual && swiper.params.virtual.enabled\n ? swiper.virtual.slides.length\n : swiper.slides.length;\n\n const $el = swiper.pagination.$el;\n let paginationHTML = '';\n if (params.type === 'bullets') {\n let numberOfBullets = swiper.params.loop\n ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup)\n : swiper.snapGrid.length;\n if (\n swiper.params.freeMode &&\n swiper.params.freeMode.enabled &&\n !swiper.params.loop &&\n numberOfBullets > slidesLength\n ) {\n numberOfBullets = slidesLength;\n }\n for (let i = 0; i < numberOfBullets; i += 1) {\n if (params.renderBullet) {\n paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);\n } else {\n paginationHTML += `<${params.bulletElement} class=\"${params.bulletClass}\">`;\n }\n }\n $el.html(paginationHTML);\n\n swiper.pagination.bullets = $el.find(classesToSelector(params.bulletClass));\n }\n if (params.type === 'fraction') {\n if (params.renderFraction) {\n paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);\n } else {\n paginationHTML =\n `` +\n ' / ' +\n ``;\n }\n $el.html(paginationHTML);\n }\n if (params.type === 'progressbar') {\n if (params.renderProgressbar) {\n paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);\n } else {\n paginationHTML = ``;\n }\n $el.html(paginationHTML);\n }\n if (params.type !== 'custom') {\n emit('paginationRender', swiper.pagination.$el[0]);\n }\n }\n function init() {\n swiper.params.pagination = createElementIfNotDefined(\n swiper,\n swiper.originalParams.pagination,\n swiper.params.pagination,\n { el: 'swiper-pagination' },\n );\n const params = swiper.params.pagination;\n if (!params.el) return;\n\n let $el = $(params.el);\n if ($el.length === 0) return;\n\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1) {\n $el = swiper.$el.find(params.el);\n }\n\n if (params.type === 'bullets' && params.clickable) {\n $el.addClass(params.clickableClass);\n }\n\n $el.addClass(params.modifierClass + params.type);\n $el.addClass(params.modifierClass + swiper.params.direction);\n\n if (params.type === 'bullets' && params.dynamicBullets) {\n $el.addClass(`${params.modifierClass}${params.type}-dynamic`);\n dynamicBulletIndex = 0;\n if (params.dynamicMainBullets < 1) {\n params.dynamicMainBullets = 1;\n }\n }\n if (params.type === 'progressbar' && params.progressbarOpposite) {\n $el.addClass(params.progressbarOppositeClass);\n }\n\n if (params.clickable) {\n $el.on('click', classesToSelector(params.bulletClass), function onClick(e) {\n e.preventDefault();\n let index = $(this).index() * swiper.params.slidesPerGroup;\n if (swiper.params.loop) index += swiper.loopedSlides;\n swiper.slideTo(index);\n });\n }\n\n Object.assign(swiper.pagination, {\n $el,\n el: $el[0],\n });\n\n if (!swiper.enabled) {\n $el.addClass(params.lockClass);\n }\n }\n function destroy() {\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const $el = swiper.pagination.$el;\n\n $el.removeClass(params.hiddenClass);\n $el.removeClass(params.modifierClass + params.type);\n $el.removeClass(params.modifierClass + swiper.params.direction);\n if (swiper.pagination.bullets) swiper.pagination.bullets.removeClass(params.bulletActiveClass);\n if (params.clickable) {\n $el.off('click', classesToSelector(params.bulletClass));\n }\n }\n\n on('init', () => {\n init();\n render();\n update();\n });\n on('activeIndexChange', () => {\n if (swiper.params.loop) {\n update();\n } else if (typeof swiper.snapIndex === 'undefined') {\n update();\n }\n });\n on('snapIndexChange', () => {\n if (!swiper.params.loop) {\n update();\n }\n });\n on('slidesLengthChange', () => {\n if (swiper.params.loop) {\n render();\n update();\n }\n });\n on('snapGridLengthChange', () => {\n if (!swiper.params.loop) {\n render();\n update();\n }\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n const { $el } = swiper.pagination;\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.pagination.lockClass);\n }\n });\n on('click', (_s, e) => {\n const targetEl = e.target;\n const { $el } = swiper.pagination;\n if (\n swiper.params.pagination.el &&\n swiper.params.pagination.hideOnClick &&\n $el.length > 0 &&\n !$(targetEl).hasClass(swiper.params.pagination.bulletClass)\n ) {\n if (\n swiper.navigation &&\n ((swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl) ||\n (swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl))\n )\n return;\n const isHidden = $el.hasClass(swiper.params.pagination.hiddenClass);\n if (isHidden === true) {\n emit('paginationShow');\n } else {\n emit('paginationHide');\n }\n $el.toggleClass(swiper.params.pagination.hiddenClass);\n }\n });\n\n Object.assign(swiper.pagination, {\n render,\n update,\n init,\n destroy,\n });\n}\n","import { getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { nextTick, createElementIfNotDefined } from '../../shared/utils.js';\n\nexport default function Scrollbar({ swiper, extendParams, on, emit }) {\n const document = getDocument();\n\n let isTouched = false;\n let timeout = null;\n let dragTimeout = null;\n let dragStartPos;\n let dragSize;\n let trackSize;\n let divider;\n\n extendParams({\n scrollbar: {\n el: null,\n dragSize: 'auto',\n hide: false,\n draggable: false,\n snapOnRelease: true,\n lockClass: 'swiper-scrollbar-lock',\n dragClass: 'swiper-scrollbar-drag',\n },\n });\n\n swiper.scrollbar = {\n el: null,\n dragEl: null,\n $el: null,\n $dragEl: null,\n };\n\n function setTranslate() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n const { scrollbar, rtlTranslate: rtl, progress } = swiper;\n const { $dragEl, $el } = scrollbar;\n const params = swiper.params.scrollbar;\n\n let newSize = dragSize;\n let newPos = (trackSize - dragSize) * progress;\n if (rtl) {\n newPos = -newPos;\n if (newPos > 0) {\n newSize = dragSize - newPos;\n newPos = 0;\n } else if (-newPos + dragSize > trackSize) {\n newSize = trackSize + newPos;\n }\n } else if (newPos < 0) {\n newSize = dragSize + newPos;\n newPos = 0;\n } else if (newPos + dragSize > trackSize) {\n newSize = trackSize - newPos;\n }\n if (swiper.isHorizontal()) {\n $dragEl.transform(`translate3d(${newPos}px, 0, 0)`);\n $dragEl[0].style.width = `${newSize}px`;\n } else {\n $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`);\n $dragEl[0].style.height = `${newSize}px`;\n }\n if (params.hide) {\n clearTimeout(timeout);\n $el[0].style.opacity = 1;\n timeout = setTimeout(() => {\n $el[0].style.opacity = 0;\n $el.transition(400);\n }, 1000);\n }\n }\n function setTransition(duration) {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n swiper.scrollbar.$dragEl.transition(duration);\n }\n function updateSize() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n\n const { scrollbar } = swiper;\n const { $dragEl, $el } = scrollbar;\n\n $dragEl[0].style.width = '';\n $dragEl[0].style.height = '';\n trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;\n\n divider = swiper.size / swiper.virtualSize;\n if (swiper.params.scrollbar.dragSize === 'auto') {\n dragSize = trackSize * divider;\n } else {\n dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);\n }\n\n if (swiper.isHorizontal()) {\n $dragEl[0].style.width = `${dragSize}px`;\n } else {\n $dragEl[0].style.height = `${dragSize}px`;\n }\n\n if (divider >= 1) {\n $el[0].style.display = 'none';\n } else {\n $el[0].style.display = '';\n }\n if (swiper.params.scrollbar.hide) {\n $el[0].style.opacity = 0;\n }\n\n if (swiper.params.watchOverflow && swiper.enabled) {\n scrollbar.$el[swiper.isLocked ? 'addClass' : 'removeClass'](\n swiper.params.scrollbar.lockClass,\n );\n }\n }\n function getPointerPosition(e) {\n if (swiper.isHorizontal()) {\n return e.type === 'touchstart' || e.type === 'touchmove'\n ? e.targetTouches[0].clientX\n : e.clientX;\n }\n return e.type === 'touchstart' || e.type === 'touchmove'\n ? e.targetTouches[0].clientY\n : e.clientY;\n }\n function setDragPosition(e) {\n const { scrollbar, rtlTranslate: rtl } = swiper;\n const { $el } = scrollbar;\n\n let positionRatio;\n positionRatio =\n (getPointerPosition(e) -\n $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] -\n (dragStartPos !== null ? dragStartPos : dragSize / 2)) /\n (trackSize - dragSize);\n positionRatio = Math.max(Math.min(positionRatio, 1), 0);\n if (rtl) {\n positionRatio = 1 - positionRatio;\n }\n\n const position =\n swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio;\n\n swiper.updateProgress(position);\n swiper.setTranslate(position);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n function onDragStart(e) {\n const params = swiper.params.scrollbar;\n const { scrollbar, $wrapperEl } = swiper;\n const { $el, $dragEl } = scrollbar;\n isTouched = true;\n dragStartPos =\n e.target === $dragEl[0] || e.target === $dragEl\n ? getPointerPosition(e) -\n e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top']\n : null;\n e.preventDefault();\n e.stopPropagation();\n\n $wrapperEl.transition(100);\n $dragEl.transition(100);\n setDragPosition(e);\n\n clearTimeout(dragTimeout);\n\n $el.transition(0);\n if (params.hide) {\n $el.css('opacity', 1);\n }\n if (swiper.params.cssMode) {\n swiper.$wrapperEl.css('scroll-snap-type', 'none');\n }\n emit('scrollbarDragStart', e);\n }\n function onDragMove(e) {\n const { scrollbar, $wrapperEl } = swiper;\n const { $el, $dragEl } = scrollbar;\n\n if (!isTouched) return;\n if (e.preventDefault) e.preventDefault();\n else e.returnValue = false;\n setDragPosition(e);\n $wrapperEl.transition(0);\n $el.transition(0);\n $dragEl.transition(0);\n emit('scrollbarDragMove', e);\n }\n function onDragEnd(e) {\n const params = swiper.params.scrollbar;\n const { scrollbar, $wrapperEl } = swiper;\n const { $el } = scrollbar;\n\n if (!isTouched) return;\n isTouched = false;\n if (swiper.params.cssMode) {\n swiper.$wrapperEl.css('scroll-snap-type', '');\n $wrapperEl.transition('');\n }\n if (params.hide) {\n clearTimeout(dragTimeout);\n dragTimeout = nextTick(() => {\n $el.css('opacity', 0);\n $el.transition(400);\n }, 1000);\n }\n emit('scrollbarDragEnd', e);\n if (params.snapOnRelease) {\n swiper.slideToClosest();\n }\n }\n\n function events(method) {\n const { scrollbar, touchEventsTouch, touchEventsDesktop, params, support } = swiper;\n const $el = scrollbar.$el;\n const target = $el[0];\n const activeListener =\n support.passiveListener && params.passiveListeners\n ? { passive: false, capture: false }\n : false;\n const passiveListener =\n support.passiveListener && params.passiveListeners\n ? { passive: true, capture: false }\n : false;\n if (!target) return;\n const eventMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n if (!support.touch) {\n target[eventMethod](touchEventsDesktop.start, onDragStart, activeListener);\n document[eventMethod](touchEventsDesktop.move, onDragMove, activeListener);\n document[eventMethod](touchEventsDesktop.end, onDragEnd, passiveListener);\n } else {\n target[eventMethod](touchEventsTouch.start, onDragStart, activeListener);\n target[eventMethod](touchEventsTouch.move, onDragMove, activeListener);\n target[eventMethod](touchEventsTouch.end, onDragEnd, passiveListener);\n }\n }\n\n function enableDraggable() {\n if (!swiper.params.scrollbar.el) return;\n events('on');\n }\n function disableDraggable() {\n if (!swiper.params.scrollbar.el) return;\n events('off');\n }\n function init() {\n const { scrollbar, $el: $swiperEl } = swiper;\n swiper.params.scrollbar = createElementIfNotDefined(\n swiper,\n swiper.originalParams.scrollbar,\n swiper.params.scrollbar,\n { el: 'swiper-scrollbar' },\n );\n const params = swiper.params.scrollbar;\n if (!params.el) return;\n\n let $el = $(params.el);\n if (\n swiper.params.uniqueNavElements &&\n typeof params.el === 'string' &&\n $el.length > 1 &&\n $swiperEl.find(params.el).length === 1\n ) {\n $el = $swiperEl.find(params.el);\n }\n\n let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`);\n if ($dragEl.length === 0) {\n $dragEl = $(`
`);\n $el.append($dragEl);\n }\n\n Object.assign(scrollbar, {\n $el,\n el: $el[0],\n $dragEl,\n dragEl: $dragEl[0],\n });\n\n if (params.draggable) {\n enableDraggable();\n }\n\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass);\n }\n }\n function destroy() {\n disableDraggable();\n }\n\n on('init', () => {\n init();\n updateSize();\n setTranslate();\n });\n on('update resize observerUpdate', () => {\n updateSize();\n });\n on('resize', () => {\n updateSize();\n });\n on('observerUpdate', () => {\n updateSize();\n });\n on('setTranslate', () => {\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n setTransition(duration);\n });\n on('enable disable', () => {\n const { $el } = swiper.scrollbar;\n if ($el) {\n $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass);\n }\n });\n on('destroy', () => {\n destroy();\n });\n\n Object.assign(swiper.scrollbar, {\n updateSize,\n setTranslate,\n init,\n destroy,\n });\n}\n","import $ from '../../shared/dom.js';\n\nexport default function Parallax({ swiper, extendParams, on }) {\n extendParams({\n parallax: {\n enabled: false,\n },\n });\n\n const setTransform = (el, progress) => {\n const { rtl } = swiper;\n\n const $el = $(el);\n const rtlFactor = rtl ? -1 : 1;\n\n const p = $el.attr('data-swiper-parallax') || '0';\n let x = $el.attr('data-swiper-parallax-x');\n let y = $el.attr('data-swiper-parallax-y');\n const scale = $el.attr('data-swiper-parallax-scale');\n const opacity = $el.attr('data-swiper-parallax-opacity');\n\n if (x || y) {\n x = x || '0';\n y = y || '0';\n } else if (swiper.isHorizontal()) {\n x = p;\n y = '0';\n } else {\n y = p;\n x = '0';\n }\n\n if (x.indexOf('%') >= 0) {\n x = `${parseInt(x, 10) * progress * rtlFactor}%`;\n } else {\n x = `${x * progress * rtlFactor}px`;\n }\n if (y.indexOf('%') >= 0) {\n y = `${parseInt(y, 10) * progress}%`;\n } else {\n y = `${y * progress}px`;\n }\n\n if (typeof opacity !== 'undefined' && opacity !== null) {\n const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress));\n $el[0].style.opacity = currentOpacity;\n }\n if (typeof scale === 'undefined' || scale === null) {\n $el.transform(`translate3d(${x}, ${y}, 0px)`);\n } else {\n const currentScale = scale - (scale - 1) * (1 - Math.abs(progress));\n $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`);\n }\n };\n\n const setTranslate = () => {\n const { $el, slides, progress, snapGrid } = swiper;\n $el\n .children(\n '[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]',\n )\n .each((el) => {\n setTransform(el, progress);\n });\n slides.each((slideEl, slideIndex) => {\n let slideProgress = slideEl.progress;\n if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {\n slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1);\n }\n slideProgress = Math.min(Math.max(slideProgress, -1), 1);\n $(slideEl)\n .find(\n '[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]',\n )\n .each((el) => {\n setTransform(el, slideProgress);\n });\n });\n };\n\n const setTransition = (duration = swiper.params.speed) => {\n const { $el } = swiper;\n $el\n .find(\n '[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]',\n )\n .each((parallaxEl) => {\n const $parallaxEl = $(parallaxEl);\n let parallaxDuration =\n parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;\n if (duration === 0) parallaxDuration = 0;\n $parallaxEl.transition(parallaxDuration);\n });\n };\n\n on('beforeInit', () => {\n if (!swiper.params.parallax.enabled) return;\n swiper.params.watchSlidesProgress = true;\n swiper.originalParams.watchSlidesProgress = true;\n });\n on('init', () => {\n if (!swiper.params.parallax.enabled) return;\n setTranslate();\n });\n on('setTranslate', () => {\n if (!swiper.params.parallax.enabled) return;\n setTranslate();\n });\n on('setTransition', (_swiper, duration) => {\n if (!swiper.params.parallax.enabled) return;\n setTransition(duration);\n });\n}\n","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\nimport { getTranslate } from '../../shared/utils.js';\n\nexport default function Zoom({ swiper, extendParams, on, emit }) {\n const window = getWindow();\n extendParams({\n zoom: {\n enabled: false,\n maxRatio: 3,\n minRatio: 1,\n toggle: true,\n containerClass: 'swiper-zoom-container',\n zoomedSlideClass: 'swiper-slide-zoomed',\n },\n });\n\n swiper.zoom = {\n enabled: false,\n };\n\n let currentScale = 1;\n let isScaling = false;\n let gesturesEnabled;\n let fakeGestureTouched;\n let fakeGestureMoved;\n const gesture = {\n $slideEl: undefined,\n slideWidth: undefined,\n slideHeight: undefined,\n $imageEl: undefined,\n $imageWrapEl: undefined,\n maxRatio: 3,\n };\n const image = {\n isTouched: undefined,\n isMoved: undefined,\n currentX: undefined,\n currentY: undefined,\n minX: undefined,\n minY: undefined,\n maxX: undefined,\n maxY: undefined,\n width: undefined,\n height: undefined,\n startX: undefined,\n startY: undefined,\n touchesStart: {},\n touchesCurrent: {},\n };\n const velocity = {\n x: undefined,\n y: undefined,\n prevPositionX: undefined,\n prevPositionY: undefined,\n prevTime: undefined,\n };\n\n let scale = 1;\n Object.defineProperty(swiper.zoom, 'scale', {\n get() {\n return scale;\n },\n set(value) {\n if (scale !== value) {\n const imageEl = gesture.$imageEl ? gesture.$imageEl[0] : undefined;\n const slideEl = gesture.$slideEl ? gesture.$slideEl[0] : undefined;\n emit('zoomChange', value, imageEl, slideEl);\n }\n scale = value;\n },\n });\n\n function getDistanceBetweenTouches(e) {\n if (e.targetTouches.length < 2) return 1;\n const x1 = e.targetTouches[0].pageX;\n const y1 = e.targetTouches[0].pageY;\n const x2 = e.targetTouches[1].pageX;\n const y2 = e.targetTouches[1].pageY;\n const distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2);\n return distance;\n }\n\n // Events\n function onGestureStart(e) {\n const support = swiper.support;\n const params = swiper.params.zoom;\n fakeGestureTouched = false;\n fakeGestureMoved = false;\n if (!support.gestures) {\n if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) {\n return;\n }\n fakeGestureTouched = true;\n gesture.scaleStart = getDistanceBetweenTouches(e);\n }\n if (!gesture.$slideEl || !gesture.$slideEl.length) {\n gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);\n if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n if (gesture.$imageWrapEl.length === 0) {\n gesture.$imageEl = undefined;\n return;\n }\n }\n if (gesture.$imageEl) {\n gesture.$imageEl.transition(0);\n }\n isScaling = true;\n }\n function onGestureChange(e) {\n const support = swiper.support;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n if (!support.gestures) {\n if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) {\n return;\n }\n fakeGestureMoved = true;\n gesture.scaleMove = getDistanceBetweenTouches(e);\n }\n\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) {\n if (e.type === 'gesturechange') onGestureStart(e);\n return;\n }\n if (support.gestures) {\n zoom.scale = e.scale * currentScale;\n } else {\n zoom.scale = (gesture.scaleMove / gesture.scaleStart) * currentScale;\n }\n if (zoom.scale > gesture.maxRatio) {\n zoom.scale = gesture.maxRatio - 1 + (zoom.scale - gesture.maxRatio + 1) ** 0.5;\n }\n if (zoom.scale < params.minRatio) {\n zoom.scale = params.minRatio + 1 - (params.minRatio - zoom.scale + 1) ** 0.5;\n }\n gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n }\n function onGestureEnd(e) {\n const device = swiper.device;\n const support = swiper.support;\n const params = swiper.params.zoom;\n const zoom = swiper.zoom;\n if (!support.gestures) {\n if (!fakeGestureTouched || !fakeGestureMoved) {\n return;\n }\n if (\n e.type !== 'touchend' ||\n (e.type === 'touchend' && e.changedTouches.length < 2 && !device.android)\n ) {\n return;\n }\n fakeGestureTouched = false;\n fakeGestureMoved = false;\n }\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);\n gesture.$imageEl\n .transition(swiper.params.speed)\n .transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n currentScale = zoom.scale;\n isScaling = false;\n if (zoom.scale === 1) gesture.$slideEl = undefined;\n }\n function onTouchStart(e) {\n const device = swiper.device;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n if (image.isTouched) return;\n if (device.android && e.cancelable) e.preventDefault();\n image.isTouched = true;\n image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n }\n function onTouchMove(e) {\n const zoom = swiper.zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n swiper.allowClick = false;\n if (!image.isTouched || !gesture.$slideEl) return;\n\n if (!image.isMoved) {\n image.width = gesture.$imageEl[0].offsetWidth;\n image.height = gesture.$imageEl[0].offsetHeight;\n image.startX = getTranslate(gesture.$imageWrapEl[0], 'x') || 0;\n image.startY = getTranslate(gesture.$imageWrapEl[0], 'y') || 0;\n gesture.slideWidth = gesture.$slideEl[0].offsetWidth;\n gesture.slideHeight = gesture.$slideEl[0].offsetHeight;\n gesture.$imageWrapEl.transition(0);\n }\n // Define if we need image drag\n const scaledWidth = image.width * zoom.scale;\n const scaledHeight = image.height * zoom.scale;\n\n if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;\n\n image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);\n image.maxX = -image.minX;\n image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);\n image.maxY = -image.minY;\n\n image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n\n if (!image.isMoved && !isScaling) {\n if (\n swiper.isHorizontal() &&\n ((Math.floor(image.minX) === Math.floor(image.startX) &&\n image.touchesCurrent.x < image.touchesStart.x) ||\n (Math.floor(image.maxX) === Math.floor(image.startX) &&\n image.touchesCurrent.x > image.touchesStart.x))\n ) {\n image.isTouched = false;\n return;\n }\n if (\n !swiper.isHorizontal() &&\n ((Math.floor(image.minY) === Math.floor(image.startY) &&\n image.touchesCurrent.y < image.touchesStart.y) ||\n (Math.floor(image.maxY) === Math.floor(image.startY) &&\n image.touchesCurrent.y > image.touchesStart.y))\n ) {\n image.isTouched = false;\n return;\n }\n }\n if (e.cancelable) {\n e.preventDefault();\n }\n e.stopPropagation();\n\n image.isMoved = true;\n image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX;\n image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY;\n\n if (image.currentX < image.minX) {\n image.currentX = image.minX + 1 - (image.minX - image.currentX + 1) ** 0.8;\n }\n if (image.currentX > image.maxX) {\n image.currentX = image.maxX - 1 + (image.currentX - image.maxX + 1) ** 0.8;\n }\n\n if (image.currentY < image.minY) {\n image.currentY = image.minY + 1 - (image.minY - image.currentY + 1) ** 0.8;\n }\n if (image.currentY > image.maxY) {\n image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8;\n }\n\n // Velocity\n if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;\n if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;\n if (!velocity.prevTime) velocity.prevTime = Date.now();\n velocity.x =\n (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;\n velocity.y =\n (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;\n if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;\n if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;\n velocity.prevPositionX = image.touchesCurrent.x;\n velocity.prevPositionY = image.touchesCurrent.y;\n velocity.prevTime = Date.now();\n\n gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);\n }\n function onTouchEnd() {\n const zoom = swiper.zoom;\n if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;\n if (!image.isTouched || !image.isMoved) {\n image.isTouched = false;\n image.isMoved = false;\n return;\n }\n image.isTouched = false;\n image.isMoved = false;\n let momentumDurationX = 300;\n let momentumDurationY = 300;\n const momentumDistanceX = velocity.x * momentumDurationX;\n const newPositionX = image.currentX + momentumDistanceX;\n const momentumDistanceY = velocity.y * momentumDurationY;\n const newPositionY = image.currentY + momentumDistanceY;\n\n // Fix duration\n if (velocity.x !== 0)\n momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);\n if (velocity.y !== 0)\n momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);\n const momentumDuration = Math.max(momentumDurationX, momentumDurationY);\n\n image.currentX = newPositionX;\n image.currentY = newPositionY;\n\n // Define if we need image drag\n const scaledWidth = image.width * zoom.scale;\n const scaledHeight = image.height * zoom.scale;\n image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);\n image.maxX = -image.minX;\n image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0);\n image.maxY = -image.minY;\n image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);\n image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);\n\n gesture.$imageWrapEl\n .transition(momentumDuration)\n .transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);\n }\n function onTransitionEnd() {\n const zoom = swiper.zoom;\n if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {\n if (gesture.$imageEl) {\n gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');\n }\n if (gesture.$imageWrapEl) {\n gesture.$imageWrapEl.transform('translate3d(0,0,0)');\n }\n\n zoom.scale = 1;\n currentScale = 1;\n\n gesture.$slideEl = undefined;\n gesture.$imageEl = undefined;\n gesture.$imageWrapEl = undefined;\n }\n }\n\n function zoomIn(e) {\n const zoom = swiper.zoom;\n const params = swiper.params.zoom;\n\n if (!gesture.$slideEl) {\n if (e && e.target) {\n gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`);\n }\n if (!gesture.$slideEl) {\n if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);\n } else {\n gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n }\n }\n\n gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n }\n if (\n !gesture.$imageEl ||\n gesture.$imageEl.length === 0 ||\n !gesture.$imageWrapEl ||\n gesture.$imageWrapEl.length === 0\n )\n return;\n if (swiper.params.cssMode) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.touchAction = 'none';\n }\n\n gesture.$slideEl.addClass(`${params.zoomedSlideClass}`);\n\n let touchX;\n let touchY;\n let offsetX;\n let offsetY;\n let diffX;\n let diffY;\n let translateX;\n let translateY;\n let imageWidth;\n let imageHeight;\n let scaledWidth;\n let scaledHeight;\n let translateMinX;\n let translateMinY;\n let translateMaxX;\n let translateMaxY;\n let slideWidth;\n let slideHeight;\n\n if (typeof image.touchesStart.x === 'undefined' && e) {\n touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;\n touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;\n } else {\n touchX = image.touchesStart.x;\n touchY = image.touchesStart.y;\n }\n\n zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;\n if (e) {\n slideWidth = gesture.$slideEl[0].offsetWidth;\n slideHeight = gesture.$slideEl[0].offsetHeight;\n offsetX = gesture.$slideEl.offset().left + window.scrollX;\n offsetY = gesture.$slideEl.offset().top + window.scrollY;\n diffX = offsetX + slideWidth / 2 - touchX;\n diffY = offsetY + slideHeight / 2 - touchY;\n\n imageWidth = gesture.$imageEl[0].offsetWidth;\n imageHeight = gesture.$imageEl[0].offsetHeight;\n scaledWidth = imageWidth * zoom.scale;\n scaledHeight = imageHeight * zoom.scale;\n\n translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0);\n translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0);\n translateMaxX = -translateMinX;\n translateMaxY = -translateMinY;\n\n translateX = diffX * zoom.scale;\n translateY = diffY * zoom.scale;\n\n if (translateX < translateMinX) {\n translateX = translateMinX;\n }\n if (translateX > translateMaxX) {\n translateX = translateMaxX;\n }\n\n if (translateY < translateMinY) {\n translateY = translateMinY;\n }\n if (translateY > translateMaxY) {\n translateY = translateMaxY;\n }\n } else {\n translateX = 0;\n translateY = 0;\n }\n gesture.$imageWrapEl\n .transition(300)\n .transform(`translate3d(${translateX}px, ${translateY}px,0)`);\n gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`);\n }\n function zoomOut() {\n const zoom = swiper.zoom;\n const params = swiper.params.zoom;\n\n if (!gesture.$slideEl) {\n if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) {\n gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`);\n } else {\n gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);\n }\n gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target');\n gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);\n }\n if (\n !gesture.$imageEl ||\n gesture.$imageEl.length === 0 ||\n !gesture.$imageWrapEl ||\n gesture.$imageWrapEl.length === 0\n )\n return;\n if (swiper.params.cssMode) {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.style.touchAction = '';\n }\n zoom.scale = 1;\n currentScale = 1;\n gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');\n gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');\n gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`);\n gesture.$slideEl = undefined;\n }\n\n // Toggle Zoom\n function zoomToggle(e) {\n const zoom = swiper.zoom;\n\n if (zoom.scale && zoom.scale !== 1) {\n // Zoom Out\n zoomOut();\n } else {\n // Zoom In\n zoomIn(e);\n }\n }\n\n function getListeners() {\n const support = swiper.support;\n const passiveListener =\n swiper.touchEvents.start === 'touchstart' &&\n support.passiveListener &&\n swiper.params.passiveListeners\n ? { passive: true, capture: false }\n : false;\n const activeListenerWithCapture = support.passiveListener\n ? { passive: false, capture: true }\n : true;\n return { passiveListener, activeListenerWithCapture };\n }\n\n function getSlideSelector() {\n return `.${swiper.params.slideClass}`;\n }\n\n function toggleGestures(method) {\n const { passiveListener } = getListeners();\n const slideSelector = getSlideSelector();\n swiper.$wrapperEl[method]('gesturestart', slideSelector, onGestureStart, passiveListener);\n swiper.$wrapperEl[method]('gesturechange', slideSelector, onGestureChange, passiveListener);\n swiper.$wrapperEl[method]('gestureend', slideSelector, onGestureEnd, passiveListener);\n }\n function enableGestures() {\n if (gesturesEnabled) return;\n gesturesEnabled = true;\n toggleGestures('on');\n }\n function disableGestures() {\n if (!gesturesEnabled) return;\n gesturesEnabled = false;\n toggleGestures('off');\n }\n\n // Attach/Detach Events\n function enable() {\n const zoom = swiper.zoom;\n if (zoom.enabled) return;\n zoom.enabled = true;\n const support = swiper.support;\n const { passiveListener, activeListenerWithCapture } = getListeners();\n const slideSelector = getSlideSelector();\n\n // Scale image\n if (support.gestures) {\n swiper.$wrapperEl.on(swiper.touchEvents.start, enableGestures, passiveListener);\n swiper.$wrapperEl.on(swiper.touchEvents.end, disableGestures, passiveListener);\n } else if (swiper.touchEvents.start === 'touchstart') {\n swiper.$wrapperEl.on(\n swiper.touchEvents.start,\n slideSelector,\n onGestureStart,\n passiveListener,\n );\n swiper.$wrapperEl.on(\n swiper.touchEvents.move,\n slideSelector,\n onGestureChange,\n activeListenerWithCapture,\n );\n swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener);\n if (swiper.touchEvents.cancel) {\n swiper.$wrapperEl.on(\n swiper.touchEvents.cancel,\n slideSelector,\n onGestureEnd,\n passiveListener,\n );\n }\n }\n\n // Move image\n swiper.$wrapperEl.on(\n swiper.touchEvents.move,\n `.${swiper.params.zoom.containerClass}`,\n onTouchMove,\n activeListenerWithCapture,\n );\n }\n function disable() {\n const zoom = swiper.zoom;\n if (!zoom.enabled) return;\n const support = swiper.support;\n zoom.enabled = false;\n\n const { passiveListener, activeListenerWithCapture } = getListeners();\n const slideSelector = getSlideSelector();\n\n // Scale image\n if (support.gestures) {\n swiper.$wrapperEl.off(swiper.touchEvents.start, enableGestures, passiveListener);\n swiper.$wrapperEl.off(swiper.touchEvents.end, disableGestures, passiveListener);\n } else if (swiper.touchEvents.start === 'touchstart') {\n swiper.$wrapperEl.off(\n swiper.touchEvents.start,\n slideSelector,\n onGestureStart,\n passiveListener,\n );\n swiper.$wrapperEl.off(\n swiper.touchEvents.move,\n slideSelector,\n onGestureChange,\n activeListenerWithCapture,\n );\n swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener);\n if (swiper.touchEvents.cancel) {\n swiper.$wrapperEl.off(\n swiper.touchEvents.cancel,\n slideSelector,\n onGestureEnd,\n passiveListener,\n );\n }\n }\n\n // Move image\n swiper.$wrapperEl.off(\n swiper.touchEvents.move,\n `.${swiper.params.zoom.containerClass}`,\n onTouchMove,\n activeListenerWithCapture,\n );\n }\n\n on('init', () => {\n if (swiper.params.zoom.enabled) {\n enable();\n }\n });\n on('destroy', () => {\n disable();\n });\n on('touchStart', (_s, e) => {\n if (!swiper.zoom.enabled) return;\n onTouchStart(e);\n });\n on('touchEnd', (_s, e) => {\n if (!swiper.zoom.enabled) return;\n onTouchEnd(e);\n });\n on('doubleTap', (_s, e) => {\n if (\n !swiper.animating &&\n swiper.params.zoom.enabled &&\n swiper.zoom.enabled &&\n swiper.params.zoom.toggle\n ) {\n zoomToggle(e);\n }\n });\n on('transitionEnd', () => {\n if (swiper.zoom.enabled && swiper.params.zoom.enabled) {\n onTransitionEnd();\n }\n });\n on('slideChange', () => {\n if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) {\n onTransitionEnd();\n }\n });\n\n Object.assign(swiper.zoom, {\n enable,\n disable,\n in: zoomIn,\n out: zoomOut,\n toggle: zoomToggle,\n });\n}\n","import { getWindow } from 'ssr-window';\nimport $ from '../../shared/dom.js';\n\nexport default function Lazy({ swiper, extendParams, on, emit }) {\n extendParams({\n lazy: {\n checkInView: false,\n enabled: false,\n loadPrevNext: false,\n loadPrevNextAmount: 1,\n loadOnTransitionStart: false,\n scrollingElement: '',\n\n elementClass: 'swiper-lazy',\n loadingClass: 'swiper-lazy-loading',\n loadedClass: 'swiper-lazy-loaded',\n preloaderClass: 'swiper-lazy-preloader',\n },\n });\n\n swiper.lazy = {};\n\n let scrollHandlerAttached = false;\n let initialImageLoaded = false;\n\n function loadInSlide(index, loadInDuplicate = true) {\n const params = swiper.params.lazy;\n if (typeof index === 'undefined') return;\n if (swiper.slides.length === 0) return;\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n\n const $slideEl = isVirtual\n ? swiper.$wrapperEl.children(\n `.${swiper.params.slideClass}[data-swiper-slide-index=\"${index}\"]`,\n )\n : swiper.slides.eq(index);\n\n const $images = $slideEl.find(\n `.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`,\n );\n if (\n $slideEl.hasClass(params.elementClass) &&\n !$slideEl.hasClass(params.loadedClass) &&\n !$slideEl.hasClass(params.loadingClass)\n ) {\n $images.push($slideEl[0]);\n }\n if ($images.length === 0) return;\n\n $images.each((imageEl) => {\n const $imageEl = $(imageEl);\n $imageEl.addClass(params.loadingClass);\n\n const background = $imageEl.attr('data-background');\n const src = $imageEl.attr('data-src');\n const srcset = $imageEl.attr('data-srcset');\n const sizes = $imageEl.attr('data-sizes');\n const $pictureEl = $imageEl.parent('picture');\n\n swiper.loadImage($imageEl[0], src || background, srcset, sizes, false, () => {\n if (\n typeof swiper === 'undefined' ||\n swiper === null ||\n !swiper ||\n (swiper && !swiper.params) ||\n swiper.destroyed\n )\n return;\n if (background) {\n $imageEl.css('background-image', `url(\"${background}\")`);\n $imageEl.removeAttr('data-background');\n } else {\n if (srcset) {\n $imageEl.attr('srcset', srcset);\n $imageEl.removeAttr('data-srcset');\n }\n if (sizes) {\n $imageEl.attr('sizes', sizes);\n $imageEl.removeAttr('data-sizes');\n }\n if ($pictureEl.length) {\n $pictureEl.children('source').each((sourceEl) => {\n const $source = $(sourceEl);\n\n if ($source.attr('data-srcset')) {\n $source.attr('srcset', $source.attr('data-srcset'));\n $source.removeAttr('data-srcset');\n }\n });\n }\n if (src) {\n $imageEl.attr('src', src);\n $imageEl.removeAttr('data-src');\n }\n }\n\n $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);\n $slideEl.find(`.${params.preloaderClass}`).remove();\n if (swiper.params.loop && loadInDuplicate) {\n const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');\n if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {\n const originalSlide = swiper.$wrapperEl.children(\n `[data-swiper-slide-index=\"${slideOriginalIndex}\"]:not(.${swiper.params.slideDuplicateClass})`,\n );\n loadInSlide(originalSlide.index(), false);\n } else {\n const duplicatedSlide = swiper.$wrapperEl.children(\n `.${swiper.params.slideDuplicateClass}[data-swiper-slide-index=\"${slideOriginalIndex}\"]`,\n );\n loadInSlide(duplicatedSlide.index(), false);\n }\n }\n emit('lazyImageReady', $slideEl[0], $imageEl[0]);\n if (swiper.params.autoHeight) {\n swiper.updateAutoHeight();\n }\n });\n\n emit('lazyImageLoad', $slideEl[0], $imageEl[0]);\n });\n }\n\n function load() {\n const { $wrapperEl, params: swiperParams, slides, activeIndex } = swiper;\n const isVirtual = swiper.virtual && swiperParams.virtual.enabled;\n const params = swiperParams.lazy;\n\n let slidesPerView = swiperParams.slidesPerView;\n if (slidesPerView === 'auto') {\n slidesPerView = 0;\n }\n\n function slideExist(index) {\n if (isVirtual) {\n if (\n $wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index=\"${index}\"]`)\n .length\n ) {\n return true;\n }\n } else if (slides[index]) return true;\n return false;\n }\n\n function slideIndex(slideEl) {\n if (isVirtual) {\n return $(slideEl).attr('data-swiper-slide-index');\n }\n return $(slideEl).index();\n }\n\n if (!initialImageLoaded) initialImageLoaded = true;\n if (swiper.params.watchSlidesProgress) {\n $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each((slideEl) => {\n const index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();\n loadInSlide(index);\n });\n } else if (slidesPerView > 1) {\n for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n }\n } else {\n loadInSlide(activeIndex);\n }\n if (params.loadPrevNext) {\n if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) {\n const amount = params.loadPrevNextAmount;\n const spv = slidesPerView;\n const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);\n const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);\n // Next Slides\n for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n }\n // Prev Slides\n for (let i = minIndex; i < activeIndex; i += 1) {\n if (slideExist(i)) loadInSlide(i);\n }\n } else {\n const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`);\n if (nextSlide.length > 0) loadInSlide(slideIndex(nextSlide));\n\n const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`);\n if (prevSlide.length > 0) loadInSlide(slideIndex(prevSlide));\n }\n }\n }\n function checkInViewOnLoad() {\n const window = getWindow();\n if (!swiper || swiper.destroyed) return;\n const $scrollElement = swiper.params.lazy.scrollingElement\n ? $(swiper.params.lazy.scrollingElement)\n : $(window);\n const isWindow = $scrollElement[0] === window;\n const scrollElementWidth = isWindow ? window.innerWidth : $scrollElement[0].offsetWidth;\n const scrollElementHeight = isWindow ? window.innerHeight : $scrollElement[0].offsetHeight;\n const swiperOffset = swiper.$el.offset();\n const { rtlTranslate: rtl } = swiper;\n\n let inView = false;\n\n if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;\n const swiperCoord = [\n [swiperOffset.left, swiperOffset.top],\n [swiperOffset.left + swiper.width, swiperOffset.top],\n [swiperOffset.left, swiperOffset.top + swiper.height],\n [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height],\n ];\n for (let i = 0; i < swiperCoord.length; i += 1) {\n const point = swiperCoord[i];\n if (\n point[0] >= 0 &&\n point[0] <= scrollElementWidth &&\n point[1] >= 0 &&\n point[1] <= scrollElementHeight\n ) {\n if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line\n inView = true;\n }\n }\n\n const passiveListener =\n swiper.touchEvents.start === 'touchstart' &&\n swiper.support.passiveListener &&\n swiper.params.passiveListeners\n ? { passive: true, capture: false }\n : false;\n\n if (inView) {\n load();\n $scrollElement.off('scroll', checkInViewOnLoad, passiveListener);\n } else if (!scrollHandlerAttached) {\n scrollHandlerAttached = true;\n $scrollElement.on('scroll', checkInViewOnLoad, passiveListener);\n }\n }\n\n on('beforeInit', () => {\n if (swiper.params.lazy.enabled && swiper.params.preloadImages) {\n swiper.params.preloadImages = false;\n }\n });\n on('init', () => {\n if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) {\n if (swiper.params.lazy.checkInView) {\n checkInViewOnLoad();\n } else {\n load();\n }\n }\n });\n on('scroll', () => {\n if (\n swiper.params.freeMode &&\n swiper.params.freeMode.enabled &&\n !swiper.params.freeMode.sticky\n ) {\n load();\n }\n });\n on('scrollbarDragMove resize _freeModeNoMomentumRelease', () => {\n if (swiper.params.lazy.enabled) {\n load();\n }\n });\n on('transitionStart', () => {\n if (swiper.params.lazy.enabled) {\n if (\n swiper.params.lazy.loadOnTransitionStart ||\n (!swiper.params.lazy.loadOnTransitionStart && !initialImageLoaded)\n ) {\n load();\n }\n }\n });\n on('transitionEnd', () => {\n if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {\n load();\n }\n });\n on('slideChange', () => {\n const { lazy, cssMode, watchSlidesProgress, touchReleaseOnEdges, resistanceRatio } =\n swiper.params;\n if (\n lazy.enabled &&\n (cssMode || (watchSlidesProgress && (touchReleaseOnEdges || resistanceRatio === 0)))\n ) {\n load();\n }\n });\n\n Object.assign(swiper.lazy, {\n load,\n loadInSlide,\n });\n}\n","/* eslint no-bitwise: [\"error\", { \"allow\": [\">>\"] }] */\nimport { nextTick } from '../../shared/utils.js';\n\nexport default function Controller({ swiper, extendParams, on }) {\n extendParams({\n controller: {\n control: undefined,\n inverse: false,\n by: 'slide', // or 'container'\n },\n });\n\n swiper.controller = {\n control: undefined,\n };\n\n function LinearSpline(x, y) {\n const binarySearch = (function search() {\n let maxIndex;\n let minIndex;\n let guess;\n return (array, val) => {\n minIndex = -1;\n maxIndex = array.length;\n while (maxIndex - minIndex > 1) {\n guess = (maxIndex + minIndex) >> 1;\n if (array[guess] <= val) {\n minIndex = guess;\n } else {\n maxIndex = guess;\n }\n }\n return maxIndex;\n };\n })();\n this.x = x;\n this.y = y;\n this.lastIndex = x.length - 1;\n // Given an x value (x2), return the expected y2 value:\n // (x1,y1) is the known point before given value,\n // (x3,y3) is the known point after given value.\n let i1;\n let i3;\n\n this.interpolate = function interpolate(x2) {\n if (!x2) return 0;\n\n // Get the indexes of x1 and x3 (the array indexes before and after given x2):\n i3 = binarySearch(this.x, x2);\n i1 = i3 - 1;\n\n // We have our indexes i1 & i3, so we can calculate already:\n // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1\n return (\n ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1]\n );\n };\n return this;\n }\n // xxx: for now i will just save one spline function to to\n function getInterpolateFunction(c) {\n if (!swiper.controller.spline) {\n swiper.controller.spline = swiper.params.loop\n ? new LinearSpline(swiper.slidesGrid, c.slidesGrid)\n : new LinearSpline(swiper.snapGrid, c.snapGrid);\n }\n }\n function setTranslate(_t, byController) {\n const controlled = swiper.controller.control;\n let multiplier;\n let controlledTranslate;\n const Swiper = swiper.constructor;\n function setControlledTranslate(c) {\n // this will create an Interpolate function based on the snapGrids\n // x is the Grid of the scrolled scroller and y will be the controlled scroller\n // it makes sense to create this only once and recall it for the interpolation\n // the function does a lot of value caching for performance\n const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;\n if (swiper.params.controller.by === 'slide') {\n getInterpolateFunction(c);\n // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid\n // but it did not work out\n controlledTranslate = -swiper.controller.spline.interpolate(-translate);\n }\n\n if (!controlledTranslate || swiper.params.controller.by === 'container') {\n multiplier =\n (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());\n controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate();\n }\n\n if (swiper.params.controller.inverse) {\n controlledTranslate = c.maxTranslate() - controlledTranslate;\n }\n c.updateProgress(controlledTranslate);\n c.setTranslate(controlledTranslate, swiper);\n c.updateActiveIndex();\n c.updateSlidesClasses();\n }\n if (Array.isArray(controlled)) {\n for (let i = 0; i < controlled.length; i += 1) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTranslate(controlled[i]);\n }\n }\n } else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTranslate(controlled);\n }\n }\n function setTransition(duration, byController) {\n const Swiper = swiper.constructor;\n const controlled = swiper.controller.control;\n let i;\n function setControlledTransition(c) {\n c.setTransition(duration, swiper);\n if (duration !== 0) {\n c.transitionStart();\n if (c.params.autoHeight) {\n nextTick(() => {\n c.updateAutoHeight();\n });\n }\n c.$wrapperEl.transitionEnd(() => {\n if (!controlled) return;\n if (c.params.loop && swiper.params.controller.by === 'slide') {\n c.loopFix();\n }\n c.transitionEnd();\n });\n }\n }\n if (Array.isArray(controlled)) {\n for (i = 0; i < controlled.length; i += 1) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTransition(controlled[i]);\n }\n }\n } else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTransition(controlled);\n }\n }\n\n function removeSpline() {\n if (!swiper.controller.control) return;\n if (swiper.controller.spline) {\n swiper.controller.spline = undefined;\n delete swiper.controller.spline;\n }\n }\n on('beforeInit', () => {\n swiper.controller.control = swiper.params.controller.control;\n });\n on('update', () => {\n removeSpline();\n });\n on('resize', () => {\n removeSpline();\n });\n on('observerUpdate', () => {\n removeSpline();\n });\n on('setTranslate', (_s, translate, byController) => {\n if (!swiper.controller.control) return;\n swiper.controller.setTranslate(translate, byController);\n });\n on('setTransition', (_s, duration, byController) => {\n if (!swiper.controller.control) return;\n swiper.controller.setTransition(duration, byController);\n });\n\n Object.assign(swiper.controller, {\n setTranslate,\n setTransition,\n });\n}\n","import $ from '../../shared/dom.js';\nimport { classesToSelector } from '../../shared/utils.js';\n\nexport default function A11y({ swiper, extendParams, on }) {\n extendParams({\n a11y: {\n enabled: true,\n notificationClass: 'swiper-notification',\n prevSlideMessage: 'Previous slide',\n nextSlideMessage: 'Next slide',\n firstSlideMessage: 'This is the first slide',\n lastSlideMessage: 'This is the last slide',\n paginationBulletMessage: 'Go to slide {{index}}',\n slideLabelMessage: '{{index}} / {{slidesLength}}',\n containerMessage: null,\n containerRoleDescriptionMessage: null,\n itemRoleDescriptionMessage: null,\n slideRole: 'group',\n },\n });\n\n let liveRegion = null;\n\n function notify(message) {\n const notification = liveRegion;\n if (notification.length === 0) return;\n notification.html('');\n notification.html(message);\n }\n\n function getRandomNumber(size = 16) {\n const randomChar = () => Math.round(16 * Math.random()).toString(16);\n return 'x'.repeat(size).replace(/x/g, randomChar);\n }\n function makeElFocusable($el) {\n $el.attr('tabIndex', '0');\n }\n function makeElNotFocusable($el) {\n $el.attr('tabIndex', '-1');\n }\n function addElRole($el, role) {\n $el.attr('role', role);\n }\n function addElRoleDescription($el, description) {\n $el.attr('aria-roledescription', description);\n }\n function addElControls($el, controls) {\n $el.attr('aria-controls', controls);\n }\n function addElLabel($el, label) {\n $el.attr('aria-label', label);\n }\n function addElId($el, id) {\n $el.attr('id', id);\n }\n function addElLive($el, live) {\n $el.attr('aria-live', live);\n }\n function disableEl($el) {\n $el.attr('aria-disabled', true);\n }\n function enableEl($el) {\n $el.attr('aria-disabled', false);\n }\n\n function onEnterOrSpaceKey(e) {\n if (e.keyCode !== 13 && e.keyCode !== 32) return;\n const params = swiper.params.a11y;\n const $targetEl = $(e.target);\n if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {\n if (!(swiper.isEnd && !swiper.params.loop)) {\n swiper.slideNext();\n }\n if (swiper.isEnd) {\n notify(params.lastSlideMessage);\n } else {\n notify(params.nextSlideMessage);\n }\n }\n if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {\n if (!(swiper.isBeginning && !swiper.params.loop)) {\n swiper.slidePrev();\n }\n if (swiper.isBeginning) {\n notify(params.firstSlideMessage);\n } else {\n notify(params.prevSlideMessage);\n }\n }\n\n if (\n swiper.pagination &&\n $targetEl.is(classesToSelector(swiper.params.pagination.bulletClass))\n ) {\n $targetEl[0].click();\n }\n }\n\n function updateNavigation() {\n if (swiper.params.loop || !swiper.navigation) return;\n const { $nextEl, $prevEl } = swiper.navigation;\n\n if ($prevEl && $prevEl.length > 0) {\n if (swiper.isBeginning) {\n disableEl($prevEl);\n makeElNotFocusable($prevEl);\n } else {\n enableEl($prevEl);\n makeElFocusable($prevEl);\n }\n }\n if ($nextEl && $nextEl.length > 0) {\n if (swiper.isEnd) {\n disableEl($nextEl);\n makeElNotFocusable($nextEl);\n } else {\n enableEl($nextEl);\n makeElFocusable($nextEl);\n }\n }\n }\n\n function hasPagination() {\n return (\n swiper.pagination &&\n swiper.params.pagination.clickable &&\n swiper.pagination.bullets &&\n swiper.pagination.bullets.length\n );\n }\n\n function updatePagination() {\n const params = swiper.params.a11y;\n if (hasPagination()) {\n swiper.pagination.bullets.each((bulletEl) => {\n const $bulletEl = $(bulletEl);\n makeElFocusable($bulletEl);\n if (!swiper.params.pagination.renderBullet) {\n addElRole($bulletEl, 'button');\n addElLabel(\n $bulletEl,\n params.paginationBulletMessage.replace(/\\{\\{index\\}\\}/, $bulletEl.index() + 1),\n );\n }\n });\n }\n }\n\n const initNavEl = ($el, wrapperId, message) => {\n makeElFocusable($el);\n if ($el[0].tagName !== 'BUTTON') {\n addElRole($el, 'button');\n $el.on('keydown', onEnterOrSpaceKey);\n }\n addElLabel($el, message);\n addElControls($el, wrapperId);\n };\n\n function init() {\n const params = swiper.params.a11y;\n\n swiper.$el.append(liveRegion);\n\n // Container\n const $containerEl = swiper.$el;\n if (params.containerRoleDescriptionMessage) {\n addElRoleDescription($containerEl, params.containerRoleDescriptionMessage);\n }\n if (params.containerMessage) {\n addElLabel($containerEl, params.containerMessage);\n }\n\n // Wrapper\n const $wrapperEl = swiper.$wrapperEl;\n const wrapperId = $wrapperEl.attr('id') || `swiper-wrapper-${getRandomNumber(16)}`;\n const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';\n addElId($wrapperEl, wrapperId);\n addElLive($wrapperEl, live);\n\n // Slide\n if (params.itemRoleDescriptionMessage) {\n addElRoleDescription($(swiper.slides), params.itemRoleDescriptionMessage);\n }\n addElRole($(swiper.slides), params.slideRole);\n\n const slidesLength = swiper.params.loop\n ? swiper.slides.filter((el) => !el.classList.contains(swiper.params.slideDuplicateClass))\n .length\n : swiper.slides.length;\n swiper.slides.each((slideEl, index) => {\n const $slideEl = $(slideEl);\n const slideIndex = swiper.params.loop\n ? parseInt($slideEl.attr('data-swiper-slide-index'), 10)\n : index;\n const ariaLabelMessage = params.slideLabelMessage\n .replace(/\\{\\{index\\}\\}/, slideIndex + 1)\n .replace(/\\{\\{slidesLength\\}\\}/, slidesLength);\n addElLabel($slideEl, ariaLabelMessage);\n });\n\n // Navigation\n let $nextEl;\n let $prevEl;\n if (swiper.navigation && swiper.navigation.$nextEl) {\n $nextEl = swiper.navigation.$nextEl;\n }\n if (swiper.navigation && swiper.navigation.$prevEl) {\n $prevEl = swiper.navigation.$prevEl;\n }\n\n if ($nextEl && $nextEl.length) {\n initNavEl($nextEl, params.nextSlideMessage);\n }\n if ($prevEl && $prevEl.length) {\n initNavEl($prevEl, params.prevSlideMessage);\n }\n\n // Pagination\n if (hasPagination()) {\n swiper.pagination.$el.on(\n 'keydown',\n classesToSelector(swiper.params.pagination.bulletClass),\n onEnterOrSpaceKey,\n );\n }\n }\n function destroy() {\n if (liveRegion && liveRegion.length > 0) liveRegion.remove();\n\n let $nextEl;\n let $prevEl;\n if (swiper.navigation && swiper.navigation.$nextEl) {\n $nextEl = swiper.navigation.$nextEl;\n }\n if (swiper.navigation && swiper.navigation.$prevEl) {\n $prevEl = swiper.navigation.$prevEl;\n }\n if ($nextEl) {\n $nextEl.off('keydown', onEnterOrSpaceKey);\n }\n if ($prevEl) {\n $prevEl.off('keydown', onEnterOrSpaceKey);\n }\n\n // Pagination\n if (hasPagination()) {\n swiper.pagination.$el.off(\n 'keydown',\n classesToSelector(swiper.params.pagination.bulletClass),\n onEnterOrSpaceKey,\n );\n }\n }\n\n on('beforeInit', () => {\n liveRegion = $(\n ``,\n );\n });\n\n on('afterInit', () => {\n if (!swiper.params.a11y.enabled) return;\n init();\n updateNavigation();\n });\n on('toEdge', () => {\n if (!swiper.params.a11y.enabled) return;\n updateNavigation();\n });\n on('fromEdge', () => {\n if (!swiper.params.a11y.enabled) return;\n updateNavigation();\n });\n on('paginationUpdate', () => {\n if (!swiper.params.a11y.enabled) return;\n updatePagination();\n });\n on('destroy', () => {\n if (!swiper.params.a11y.enabled) return;\n destroy();\n });\n}\n","import { getWindow } from 'ssr-window';\n\nexport default function History({ swiper, extendParams, on }) {\n extendParams({\n history: {\n enabled: false,\n root: '',\n replaceState: false,\n key: 'slides',\n },\n });\n\n let initialized = false;\n let paths = {};\n\n const slugify = (text) => {\n return text\n .toString()\n .replace(/\\s+/g, '-')\n .replace(/[^\\w-]+/g, '')\n .replace(/--+/g, '-')\n .replace(/^-+/, '')\n .replace(/-+$/, '');\n };\n\n const getPathValues = (urlOverride) => {\n const window = getWindow();\n let location;\n if (urlOverride) {\n location = new URL(urlOverride);\n } else {\n location = window.location;\n }\n const pathArray = location.pathname\n .slice(1)\n .split('/')\n .filter((part) => part !== '');\n const total = pathArray.length;\n const key = pathArray[total - 2];\n const value = pathArray[total - 1];\n return { key, value };\n };\n const setHistory = (key, index) => {\n const window = getWindow();\n if (!initialized || !swiper.params.history.enabled) return;\n let location;\n if (swiper.params.url) {\n location = new URL(swiper.params.url);\n } else {\n location = window.location;\n }\n const slide = swiper.slides.eq(index);\n let value = slugify(slide.attr('data-history'));\n if (swiper.params.history.root.length > 0) {\n let root = swiper.params.history.root;\n if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1);\n value = `${root}/${key}/${value}`;\n } else if (!location.pathname.includes(key)) {\n value = `${key}/${value}`;\n }\n const currentState = window.history.state;\n if (currentState && currentState.value === value) {\n return;\n }\n if (swiper.params.history.replaceState) {\n window.history.replaceState({ value }, null, value);\n } else {\n window.history.pushState({ value }, null, value);\n }\n };\n\n const scrollToSlide = (speed, value, runCallbacks) => {\n if (value) {\n for (let i = 0, length = swiper.slides.length; i < length; i += 1) {\n const slide = swiper.slides.eq(i);\n const slideHistory = slugify(slide.attr('data-history'));\n if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {\n const index = slide.index();\n swiper.slideTo(index, speed, runCallbacks);\n }\n }\n } else {\n swiper.slideTo(0, speed, runCallbacks);\n }\n };\n\n const setHistoryPopState = () => {\n paths = getPathValues(swiper.params.url);\n scrollToSlide(swiper.params.speed, swiper.paths.value, false);\n };\n\n const init = () => {\n const window = getWindow();\n if (!swiper.params.history) return;\n if (!window.history || !window.history.pushState) {\n swiper.params.history.enabled = false;\n swiper.params.hashNavigation.enabled = true;\n return;\n }\n initialized = true;\n paths = getPathValues(swiper.params.url);\n if (!paths.key && !paths.value) return;\n scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit);\n if (!swiper.params.history.replaceState) {\n window.addEventListener('popstate', setHistoryPopState);\n }\n };\n const destroy = () => {\n const window = getWindow();\n if (!swiper.params.history.replaceState) {\n window.removeEventListener('popstate', setHistoryPopState);\n }\n };\n\n on('init', () => {\n if (swiper.params.history.enabled) {\n init();\n }\n });\n on('destroy', () => {\n if (swiper.params.history.enabled) {\n destroy();\n }\n });\n on('transitionEnd _freeModeNoMomentumRelease', () => {\n if (initialized) {\n setHistory(swiper.params.history.key, swiper.activeIndex);\n }\n });\n on('slideChange', () => {\n if (initialized && swiper.params.cssMode) {\n setHistory(swiper.params.history.key, swiper.activeIndex);\n }\n });\n}\n","import { getWindow, getDocument } from 'ssr-window';\nimport $ from '../../shared/dom.js';\n\nexport default function HashNavigation({ swiper, extendParams, emit, on }) {\n let initialized = false;\n const document = getDocument();\n const window = getWindow();\n extendParams({\n hashNavigation: {\n enabled: false,\n replaceState: false,\n watchState: false,\n },\n });\n const onHashChange = () => {\n emit('hashChange');\n const newHash = document.location.hash.replace('#', '');\n const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');\n if (newHash !== activeSlideHash) {\n const newIndex = swiper.$wrapperEl\n .children(`.${swiper.params.slideClass}[data-hash=\"${newHash}\"]`)\n .index();\n if (typeof newIndex === 'undefined') return;\n swiper.slideTo(newIndex);\n }\n };\n const setHash = () => {\n if (!initialized || !swiper.params.hashNavigation.enabled) return;\n if (\n swiper.params.hashNavigation.replaceState &&\n window.history &&\n window.history.replaceState\n ) {\n window.history.replaceState(\n null,\n null,\n `#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || '',\n );\n emit('hashSet');\n } else {\n const slide = swiper.slides.eq(swiper.activeIndex);\n const hash = slide.attr('data-hash') || slide.attr('data-history');\n document.location.hash = hash || '';\n emit('hashSet');\n }\n };\n const init = () => {\n if (\n !swiper.params.hashNavigation.enabled ||\n (swiper.params.history && swiper.params.history.enabled)\n )\n return;\n initialized = true;\n const hash = document.location.hash.replace('#', '');\n if (hash) {\n const speed = 0;\n for (let i = 0, length = swiper.slides.length; i < length; i += 1) {\n const slide = swiper.slides.eq(i);\n const slideHash = slide.attr('data-hash') || slide.attr('data-history');\n if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {\n const index = slide.index();\n swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true);\n }\n }\n }\n if (swiper.params.hashNavigation.watchState) {\n $(window).on('hashchange', onHashChange);\n }\n };\n const destroy = () => {\n if (swiper.params.hashNavigation.watchState) {\n $(window).off('hashchange', onHashChange);\n }\n };\n\n on('init', () => {\n if (swiper.params.hashNavigation.enabled) {\n init();\n }\n });\n on('destroy', () => {\n if (swiper.params.hashNavigation.enabled) {\n destroy();\n }\n });\n on('transitionEnd _freeModeNoMomentumRelease', () => {\n if (initialized) {\n setHash();\n }\n });\n on('slideChange', () => {\n if (initialized && swiper.params.cssMode) {\n setHash();\n }\n });\n}\n","/* eslint no-underscore-dangle: \"off\" */\n/* eslint no-use-before-define: \"off\" */\nimport { getDocument } from 'ssr-window';\nimport { nextTick } from '../../shared/utils.js';\n\nexport default function Autoplay({ swiper, extendParams, on, emit }) {\n let timeout;\n\n swiper.autoplay = {\n running: false,\n paused: false,\n };\n\n extendParams({\n autoplay: {\n enabled: false,\n delay: 3000,\n waitForTransition: true,\n disableOnInteraction: true,\n stopOnLastSlide: false,\n reverseDirection: false,\n pauseOnMouseEnter: false,\n },\n });\n\n function run() {\n const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);\n let delay = swiper.params.autoplay.delay;\n if ($activeSlideEl.attr('data-swiper-autoplay')) {\n delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;\n }\n clearTimeout(timeout);\n timeout = nextTick(() => {\n let autoplayResult;\n if (swiper.params.autoplay.reverseDirection) {\n if (swiper.params.loop) {\n swiper.loopFix();\n autoplayResult = swiper.slidePrev(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.isBeginning) {\n autoplayResult = swiper.slidePrev(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n autoplayResult = swiper.slideTo(\n swiper.slides.length - 1,\n swiper.params.speed,\n true,\n true,\n );\n emit('autoplay');\n } else {\n stop();\n }\n } else if (swiper.params.loop) {\n swiper.loopFix();\n autoplayResult = swiper.slideNext(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.isEnd) {\n autoplayResult = swiper.slideNext(swiper.params.speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n autoplayResult = swiper.slideTo(0, swiper.params.speed, true, true);\n emit('autoplay');\n } else {\n stop();\n }\n if (swiper.params.cssMode && swiper.autoplay.running) run();\n else if (autoplayResult === false) {\n run();\n }\n }, delay);\n }\n function start() {\n if (typeof timeout !== 'undefined') return false;\n if (swiper.autoplay.running) return false;\n swiper.autoplay.running = true;\n emit('autoplayStart');\n run();\n return true;\n }\n function stop() {\n if (!swiper.autoplay.running) return false;\n if (typeof timeout === 'undefined') return false;\n\n if (timeout) {\n clearTimeout(timeout);\n timeout = undefined;\n }\n swiper.autoplay.running = false;\n emit('autoplayStop');\n return true;\n }\n function pause(speed) {\n if (!swiper.autoplay.running) return;\n if (swiper.autoplay.paused) return;\n if (timeout) clearTimeout(timeout);\n swiper.autoplay.paused = true;\n if (speed === 0 || !swiper.params.autoplay.waitForTransition) {\n swiper.autoplay.paused = false;\n run();\n } else {\n ['transitionend', 'webkitTransitionEnd'].forEach((event) => {\n swiper.$wrapperEl[0].addEventListener(event, onTransitionEnd);\n });\n }\n }\n function onVisibilityChange() {\n const document = getDocument();\n if (document.visibilityState === 'hidden' && swiper.autoplay.running) {\n pause();\n }\n if (document.visibilityState === 'visible' && swiper.autoplay.paused) {\n run();\n swiper.autoplay.paused = false;\n }\n }\n function onTransitionEnd(e) {\n if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;\n if (e.target !== swiper.$wrapperEl[0]) return;\n ['transitionend', 'webkitTransitionEnd'].forEach((event) => {\n swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd);\n });\n swiper.autoplay.paused = false;\n if (!swiper.autoplay.running) {\n stop();\n } else {\n run();\n }\n }\n function onMouseEnter() {\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n } else {\n pause();\n }\n\n ['transitionend', 'webkitTransitionEnd'].forEach((event) => {\n swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd);\n });\n }\n function onMouseLeave() {\n if (swiper.params.autoplay.disableOnInteraction) {\n return;\n }\n swiper.autoplay.paused = false;\n run();\n }\n function attachMouseEvents() {\n if (swiper.params.autoplay.pauseOnMouseEnter) {\n swiper.$el.on('mouseenter', onMouseEnter);\n swiper.$el.on('mouseleave', onMouseLeave);\n }\n }\n function detachMouseEvents() {\n swiper.$el.off('mouseenter', onMouseEnter);\n swiper.$el.off('mouseleave', onMouseLeave);\n }\n\n on('init', () => {\n if (swiper.params.autoplay.enabled) {\n start();\n const document = getDocument();\n document.addEventListener('visibilitychange', onVisibilityChange);\n attachMouseEvents();\n }\n });\n on('beforeTransitionStart', (_s, speed, internal) => {\n if (swiper.autoplay.running) {\n if (internal || !swiper.params.autoplay.disableOnInteraction) {\n swiper.autoplay.pause(speed);\n } else {\n stop();\n }\n }\n });\n on('sliderFirstMove', () => {\n if (swiper.autoplay.running) {\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n } else {\n pause();\n }\n }\n });\n on('touchEnd', () => {\n if (\n swiper.params.cssMode &&\n swiper.autoplay.paused &&\n !swiper.params.autoplay.disableOnInteraction\n ) {\n run();\n }\n });\n on('destroy', () => {\n detachMouseEvents();\n if (swiper.autoplay.running) {\n stop();\n }\n const document = getDocument();\n document.removeEventListener('visibilitychange', onVisibilityChange);\n });\n\n Object.assign(swiper.autoplay, {\n pause,\n run,\n stop,\n });\n}\n","export default function Fade({ swiper, extendParams, on }) {\n extendParams({\n fadeEffect: {\n crossFade: false,\n transformEl: null,\n },\n });\n\n const setTranslate = () => {\n const { slides } = swiper;\n const params = swiper.params.fadeEffect;\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = swiper.slides.eq(i);\n const offset = $slideEl[0].swiperSlideOffset;\n let tx = -offset;\n if (!swiper.params.virtualTranslate) tx -= swiper.translate;\n let ty = 0;\n if (!swiper.isHorizontal()) {\n ty = tx;\n tx = 0;\n }\n const slideOpacity = swiper.params.fadeEffect.crossFade\n ? Math.max(1 - Math.abs($slideEl[0].progress), 0)\n : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);\n\n const $translateTarget = params.transformEl ? $slideEl.find(params.transformEl) : $slideEl;\n $translateTarget\n .css({\n opacity: slideOpacity,\n })\n .transform(`translate3d(${tx}px, ${ty}px, 0px)`);\n }\n };\n const setTransition = (duration) => {\n const { slides, $wrapperEl } = swiper;\n const { transformEl } = swiper.params.fadeEffect;\n const $transitionElements = transformEl ? slides.find(transformEl) : slides;\n $transitionElements.transition(duration);\n if (swiper.params.virtualTranslate && duration !== 0) {\n let eventTriggered = false;\n const $transitionEndTarget = transformEl ? slides.find(transformEl) : slides;\n $transitionEndTarget.transitionEnd(() => {\n if (eventTriggered) return;\n if (!swiper || swiper.destroyed) return;\n eventTriggered = true;\n swiper.animating = false;\n const triggerEvents = ['webkitTransitionEnd', 'transitionend'];\n for (let i = 0; i < triggerEvents.length; i += 1) {\n $wrapperEl.trigger(triggerEvents[i]);\n }\n });\n }\n };\n\n on('beforeInit', () => {\n if (swiper.params.effect !== 'fade') return;\n swiper.classNames.push(`${swiper.params.containerModifierClass}fade`);\n const overwriteParams = {\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n spaceBetween: 0,\n virtualTranslate: !swiper.params.cssMode,\n };\n Object.assign(swiper.params, overwriteParams);\n Object.assign(swiper.originalParams, overwriteParams);\n });\n on('setTranslate', () => {\n if (swiper.params.effect !== 'fade') return;\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n if (swiper.params.effect !== 'fade') return;\n setTransition(duration);\n });\n}\n","import $ from '../../shared/dom.js';\n\nexport default function Cube({ swiper, extendParams, on }) {\n extendParams({\n cubeEffect: {\n slideShadows: true,\n shadow: true,\n shadowOffset: 20,\n shadowScale: 0.94,\n },\n });\n\n const setTranslate = () => {\n const {\n $el,\n $wrapperEl,\n slides,\n width: swiperWidth,\n height: swiperHeight,\n rtlTranslate: rtl,\n size: swiperSize,\n browser,\n } = swiper;\n const params = swiper.params.cubeEffect;\n const isHorizontal = swiper.isHorizontal();\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let wrapperRotate = 0;\n let $cubeShadowEl;\n if (params.shadow) {\n if (isHorizontal) {\n $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');\n if ($cubeShadowEl.length === 0) {\n $cubeShadowEl = $('
');\n $wrapperEl.append($cubeShadowEl);\n }\n $cubeShadowEl.css({ height: `${swiperWidth}px` });\n } else {\n $cubeShadowEl = $el.find('.swiper-cube-shadow');\n if ($cubeShadowEl.length === 0) {\n $cubeShadowEl = $('
');\n $el.append($cubeShadowEl);\n }\n }\n }\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n let slideIndex = i;\n if (isVirtual) {\n slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);\n }\n let slideAngle = slideIndex * 90;\n let round = Math.floor(slideAngle / 360);\n if (rtl) {\n slideAngle = -slideAngle;\n round = Math.floor(-slideAngle / 360);\n }\n const progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n let tx = 0;\n let ty = 0;\n let tz = 0;\n if (slideIndex % 4 === 0) {\n tx = -round * 4 * swiperSize;\n tz = 0;\n } else if ((slideIndex - 1) % 4 === 0) {\n tx = 0;\n tz = -round * 4 * swiperSize;\n } else if ((slideIndex - 2) % 4 === 0) {\n tx = swiperSize + round * 4 * swiperSize;\n tz = swiperSize;\n } else if ((slideIndex - 3) % 4 === 0) {\n tx = -swiperSize;\n tz = 3 * swiperSize + swiperSize * 4 * round;\n }\n if (rtl) {\n tx = -tx;\n }\n\n if (!isHorizontal) {\n ty = tx;\n tx = 0;\n }\n\n const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${\n isHorizontal ? slideAngle : 0\n }deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;\n if (progress <= 1 && progress > -1) {\n wrapperRotate = slideIndex * 90 + progress * 90;\n if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90;\n }\n $slideEl.transform(transform);\n if (params.slideShadows) {\n // Set shadows\n let shadowBefore = isHorizontal\n ? $slideEl.find('.swiper-slide-shadow-left')\n : $slideEl.find('.swiper-slide-shadow-top');\n let shadowAfter = isHorizontal\n ? $slideEl.find('.swiper-slide-shadow-right')\n : $slideEl.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = $(\n `
`,\n );\n $slideEl.append(shadowBefore);\n }\n if (shadowAfter.length === 0) {\n shadowAfter = $(\n `
`,\n );\n $slideEl.append(shadowAfter);\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n }\n $wrapperEl.css({\n '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`,\n 'transform-origin': `50% 50% -${swiperSize / 2}px`,\n });\n\n if (params.shadow) {\n if (isHorizontal) {\n $cubeShadowEl.transform(\n `translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${\n -swiperWidth / 2\n }px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`,\n );\n } else {\n const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;\n const multiplier =\n 1.5 -\n (Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2 +\n Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2);\n const scale1 = params.shadowScale;\n const scale2 = params.shadowScale / multiplier;\n const offset = params.shadowOffset;\n $cubeShadowEl.transform(\n `scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${\n -swiperHeight / 2 / scale2\n }px) rotateX(-90deg)`,\n );\n }\n }\n const zFactor = browser.isSafari || browser.isWebView ? -swiperSize / 2 : 0;\n $wrapperEl.transform(\n `translate3d(0px,0,${zFactor}px) rotateX(${\n swiper.isHorizontal() ? 0 : wrapperRotate\n }deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`,\n );\n };\n const setTransition = (duration) => {\n const { $el, slides } = swiper;\n slides\n .transition(duration)\n .find(\n '.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left',\n )\n .transition(duration);\n if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {\n $el.find('.swiper-cube-shadow').transition(duration);\n }\n };\n\n on('beforeInit', () => {\n if (swiper.params.effect !== 'cube') return;\n swiper.classNames.push(`${swiper.params.containerModifierClass}cube`);\n swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);\n const overwriteParams = {\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n resistanceRatio: 0,\n spaceBetween: 0,\n centeredSlides: false,\n virtualTranslate: true,\n };\n Object.assign(swiper.params, overwriteParams);\n Object.assign(swiper.originalParams, overwriteParams);\n });\n on('setTranslate', () => {\n if (swiper.params.effect !== 'cube') return;\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n if (swiper.params.effect !== 'cube') return;\n setTransition(duration);\n });\n}\n","import $ from '../../shared/dom.js';\n\nexport default function Flip({ swiper, extendParams, on }) {\n extendParams({\n flipEffect: {\n slideShadows: true,\n limitRotation: true,\n transformEl: null,\n },\n });\n\n const createShadow = (params, $slideEl, side) => {\n const $shadowEl = $(`
`);\n if (params.transformEl) {\n $slideEl.find(params.transformEl).append($shadowEl);\n } else {\n $slideEl.append($shadowEl);\n }\n return $shadowEl;\n };\n\n const setTranslate = () => {\n const { slides, rtlTranslate: rtl } = swiper;\n const params = swiper.params.flipEffect;\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n let progress = $slideEl[0].progress;\n if (swiper.params.flipEffect.limitRotation) {\n progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n }\n const offset = $slideEl[0].swiperSlideOffset;\n const rotate = -180 * progress;\n let rotateY = rotate;\n let rotateX = 0;\n let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset;\n let ty = 0;\n if (!swiper.isHorizontal()) {\n ty = tx;\n tx = 0;\n rotateX = -rotateY;\n rotateY = 0;\n } else if (rtl) {\n rotateY = -rotateY;\n }\n\n $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;\n\n if (params.slideShadows) {\n // Set shadows\n let shadowBefore = swiper.isHorizontal()\n ? $slideEl.find('.swiper-slide-shadow-left')\n : $slideEl.find('.swiper-slide-shadow-top');\n let shadowAfter = swiper.isHorizontal()\n ? $slideEl.find('.swiper-slide-shadow-right')\n : $slideEl.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = createShadow(params, $slideEl, swiper.isHorizontal() ? 'left' : 'top');\n }\n if (shadowAfter.length === 0) {\n shadowAfter = createShadow(params, $slideEl, swiper.isHorizontal() ? 'right' : 'bottom');\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;\n if (params.transformEl) {\n $slideEl\n .find(params.transformEl)\n .css({ 'backface-visibility': 'hidden', '-webkit-backface-visibility': 'hidden' })\n .transform(transform);\n } else {\n $slideEl.transform(transform);\n }\n }\n };\n\n const setTransition = (duration) => {\n const { slides, activeIndex, $wrapperEl } = swiper;\n const { transformEl } = swiper.params.flipEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements\n .transition(duration)\n .find(\n '.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left',\n )\n .transition(duration);\n if (swiper.params.virtualTranslate && duration !== 0) {\n let eventTriggered = false;\n const $transitionEndTarget = transformEl\n ? slides.eq(activeIndex).find(transformEl)\n : slides.eq(activeIndex);\n // eslint-disable-next-line\n $transitionEndTarget.transitionEnd(function onTransitionEnd() {\n if (eventTriggered) return;\n if (!swiper || swiper.destroyed) return;\n eventTriggered = true;\n swiper.animating = false;\n const triggerEvents = ['webkitTransitionEnd', 'transitionend'];\n for (let i = 0; i < triggerEvents.length; i += 1) {\n $wrapperEl.trigger(triggerEvents[i]);\n }\n });\n }\n };\n\n on('beforeInit', () => {\n if (swiper.params.effect !== 'flip') return;\n swiper.classNames.push(`${swiper.params.containerModifierClass}flip`);\n swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);\n const overwriteParams = {\n slidesPerView: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n spaceBetween: 0,\n virtualTranslate: !swiper.params.cssMode,\n };\n Object.assign(swiper.params, overwriteParams);\n Object.assign(swiper.originalParams, overwriteParams);\n });\n on('setTranslate', () => {\n if (swiper.params.effect !== 'flip') return;\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n if (swiper.params.effect !== 'flip') return;\n setTransition(duration);\n });\n}\n","import $ from '../../shared/dom.js';\n\nexport default function Coverflow({ swiper, extendParams, on }) {\n extendParams({\n coverflowEffect: {\n rotate: 50,\n stretch: 0,\n depth: 100,\n scale: 1,\n modifier: 1,\n slideShadows: true,\n transformEl: null,\n },\n });\n\n const createShadow = (params, $slideEl, side) => {\n const $shadowEl = $(`
`);\n if (params.transformEl) {\n $slideEl.find(params.transformEl).append($shadowEl);\n } else {\n $slideEl.append($shadowEl);\n }\n return $shadowEl;\n };\n const setTranslate = () => {\n const { width: swiperWidth, height: swiperHeight, slides, slidesSizesGrid } = swiper;\n const params = swiper.params.coverflowEffect;\n const isHorizontal = swiper.isHorizontal();\n const transform = swiper.translate;\n const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2;\n const rotate = isHorizontal ? params.rotate : -params.rotate;\n const translate = params.depth;\n // Each slide offset from center\n for (let i = 0, length = slides.length; i < length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideSize = slidesSizesGrid[i];\n const slideOffset = $slideEl[0].swiperSlideOffset;\n const offsetMultiplier =\n ((center - slideOffset - slideSize / 2) / slideSize) * params.modifier;\n\n let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;\n let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;\n // var rotateZ = 0\n let translateZ = -translate * Math.abs(offsetMultiplier);\n\n let stretch = params.stretch;\n // Allow percentage to make a relative stretch for responsive sliders\n if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) {\n stretch = (parseFloat(params.stretch) / 100) * slideSize;\n }\n let translateY = isHorizontal ? 0 : stretch * offsetMultiplier;\n let translateX = isHorizontal ? stretch * offsetMultiplier : 0;\n\n let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier);\n\n // Fix for ultra small values\n if (Math.abs(translateX) < 0.001) translateX = 0;\n if (Math.abs(translateY) < 0.001) translateY = 0;\n if (Math.abs(translateZ) < 0.001) translateZ = 0;\n if (Math.abs(rotateY) < 0.001) rotateY = 0;\n if (Math.abs(rotateX) < 0.001) rotateX = 0;\n if (Math.abs(scale) < 0.001) scale = 0;\n\n const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(${scale})`;\n\n if (params.transformEl) {\n $slideEl.find(params.transformEl).transform(slideTransform);\n } else {\n $slideEl.transform(slideTransform);\n }\n $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;\n if (params.slideShadows) {\n // Set shadows\n let $shadowBeforeEl = isHorizontal\n ? $slideEl.find('.swiper-slide-shadow-left')\n : $slideEl.find('.swiper-slide-shadow-top');\n let $shadowAfterEl = isHorizontal\n ? $slideEl.find('.swiper-slide-shadow-right')\n : $slideEl.find('.swiper-slide-shadow-bottom');\n if ($shadowBeforeEl.length === 0) {\n $shadowBeforeEl = createShadow(params, $slideEl, isHorizontal ? 'left' : 'top');\n }\n if ($shadowAfterEl.length === 0) {\n $shadowAfterEl = createShadow(params, $slideEl, isHorizontal ? 'right' : 'bottom');\n }\n if ($shadowBeforeEl.length)\n $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;\n if ($shadowAfterEl.length)\n $shadowAfterEl[0].style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0;\n }\n }\n };\n const setTransition = (duration) => {\n const { transformEl } = swiper.params.coverflowEffect;\n const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides;\n $transitionElements\n .transition(duration)\n .find(\n '.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left',\n )\n .transition(duration);\n };\n\n on('beforeInit', () => {\n if (swiper.params.effect !== 'coverflow') return;\n\n swiper.classNames.push(`${swiper.params.containerModifierClass}coverflow`);\n swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);\n\n swiper.params.watchSlidesProgress = true;\n swiper.originalParams.watchSlidesProgress = true;\n });\n on('setTranslate', () => {\n if (swiper.params.effect !== 'coverflow') return;\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n if (swiper.params.effect !== 'coverflow') return;\n setTransition(duration);\n });\n}\n","import { isObject } from '../../shared/utils.js';\nimport $ from '../../shared/dom.js';\n\nexport default function Thumb({ swiper, extendParams, on }) {\n extendParams({\n thumbs: {\n swiper: null,\n multipleActiveThumbs: true,\n autoScrollOffset: 0,\n slideThumbActiveClass: 'swiper-slide-thumb-active',\n thumbsContainerClass: 'swiper-container-thumbs',\n },\n });\n\n let initialized = false;\n let swiperCreated = false;\n\n swiper.thumbs = {\n swiper: null,\n };\n\n function onThumbClick() {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n const clickedIndex = thumbsSwiper.clickedIndex;\n const clickedSlide = thumbsSwiper.clickedSlide;\n if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass))\n return;\n if (typeof clickedIndex === 'undefined' || clickedIndex === null) return;\n let slideToIndex;\n if (thumbsSwiper.params.loop) {\n slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10);\n } else {\n slideToIndex = clickedIndex;\n }\n if (swiper.params.loop) {\n let currentIndex = swiper.activeIndex;\n if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) {\n swiper.loopFix();\n // eslint-disable-next-line\n swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;\n currentIndex = swiper.activeIndex;\n }\n const prevIndex = swiper.slides\n .eq(currentIndex)\n .prevAll(`[data-swiper-slide-index=\"${slideToIndex}\"]`)\n .eq(0)\n .index();\n const nextIndex = swiper.slides\n .eq(currentIndex)\n .nextAll(`[data-swiper-slide-index=\"${slideToIndex}\"]`)\n .eq(0)\n .index();\n if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;\n else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;\n else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;\n else slideToIndex = prevIndex;\n }\n swiper.slideTo(slideToIndex);\n }\n\n function init() {\n const { thumbs: thumbsParams } = swiper.params;\n if (initialized) return false;\n initialized = true;\n const SwiperClass = swiper.constructor;\n if (thumbsParams.swiper instanceof SwiperClass) {\n swiper.thumbs.swiper = thumbsParams.swiper;\n Object.assign(swiper.thumbs.swiper.originalParams, {\n watchSlidesProgress: true,\n slideToClickedSlide: false,\n });\n Object.assign(swiper.thumbs.swiper.params, {\n watchSlidesProgress: true,\n slideToClickedSlide: false,\n });\n } else if (isObject(thumbsParams.swiper)) {\n const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper);\n Object.assign(thumbsSwiperParams, {\n watchSlidesProgress: true,\n slideToClickedSlide: false,\n });\n swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams);\n swiperCreated = true;\n }\n swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass);\n swiper.thumbs.swiper.on('tap', onThumbClick);\n return true;\n }\n\n function update(initial) {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n\n const slidesPerView =\n thumbsSwiper.params.slidesPerView === 'auto'\n ? thumbsSwiper.slidesPerViewDynamic()\n : thumbsSwiper.params.slidesPerView;\n\n const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;\n const useOffset = autoScrollOffset && !thumbsSwiper.params.loop;\n if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) {\n let currentThumbsIndex = thumbsSwiper.activeIndex;\n let newThumbsIndex;\n let direction;\n if (thumbsSwiper.params.loop) {\n if (\n thumbsSwiper.slides\n .eq(currentThumbsIndex)\n .hasClass(thumbsSwiper.params.slideDuplicateClass)\n ) {\n thumbsSwiper.loopFix();\n // eslint-disable-next-line\n thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft;\n currentThumbsIndex = thumbsSwiper.activeIndex;\n }\n // Find actual thumbs index to slide to\n const prevThumbsIndex = thumbsSwiper.slides\n .eq(currentThumbsIndex)\n .prevAll(`[data-swiper-slide-index=\"${swiper.realIndex}\"]`)\n .eq(0)\n .index();\n const nextThumbsIndex = thumbsSwiper.slides\n .eq(currentThumbsIndex)\n .nextAll(`[data-swiper-slide-index=\"${swiper.realIndex}\"]`)\n .eq(0)\n .index();\n if (typeof prevThumbsIndex === 'undefined') {\n newThumbsIndex = nextThumbsIndex;\n } else if (typeof nextThumbsIndex === 'undefined') {\n newThumbsIndex = prevThumbsIndex;\n } else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) {\n newThumbsIndex =\n thumbsSwiper.params.slidesPerGroup > 1 ? nextThumbsIndex : currentThumbsIndex;\n } else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) {\n newThumbsIndex = nextThumbsIndex;\n } else {\n newThumbsIndex = prevThumbsIndex;\n }\n direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';\n } else {\n newThumbsIndex = swiper.realIndex;\n direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev';\n }\n if (useOffset) {\n newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset;\n }\n\n if (\n thumbsSwiper.visibleSlidesIndexes &&\n thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0\n ) {\n if (thumbsSwiper.params.centeredSlides) {\n if (newThumbsIndex > currentThumbsIndex) {\n newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;\n } else {\n newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;\n }\n } else if (\n newThumbsIndex > currentThumbsIndex &&\n thumbsSwiper.params.slidesPerGroup === 1\n ) {\n // newThumbsIndex = newThumbsIndex - slidesPerView + 1;\n }\n thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);\n }\n }\n\n // Activate thumbs\n let thumbsToActivate = 1;\n const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;\n\n if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {\n thumbsToActivate = swiper.params.slidesPerView;\n }\n\n if (!swiper.params.thumbs.multipleActiveThumbs) {\n thumbsToActivate = 1;\n }\n\n thumbsToActivate = Math.floor(thumbsToActivate);\n\n thumbsSwiper.slides.removeClass(thumbActiveClass);\n if (\n thumbsSwiper.params.loop ||\n (thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled)\n ) {\n for (let i = 0; i < thumbsToActivate; i += 1) {\n thumbsSwiper.$wrapperEl\n .children(`[data-swiper-slide-index=\"${swiper.realIndex + i}\"]`)\n .addClass(thumbActiveClass);\n }\n } else {\n for (let i = 0; i < thumbsToActivate; i += 1) {\n thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass);\n }\n }\n }\n\n on('beforeInit', () => {\n const { thumbs } = swiper.params;\n if (!thumbs || !thumbs.swiper) return;\n init();\n update(true);\n });\n on('slideChange update resize observerUpdate', () => {\n if (!swiper.thumbs.swiper) return;\n update();\n });\n on('setTransition', (_s, duration) => {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n thumbsSwiper.setTransition(duration);\n });\n on('beforeDestroy', () => {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper) return;\n if (swiperCreated && thumbsSwiper) {\n thumbsSwiper.destroy();\n }\n });\n\n Object.assign(swiper.thumbs, {\n init,\n update,\n });\n}\n","import { now } from '../../shared/utils.js';\n\nexport default function freeMode({ swiper, extendParams, emit, once }) {\n extendParams({\n freeMode: {\n enabled: false,\n momentum: true,\n momentumRatio: 1,\n momentumBounce: true,\n momentumBounceRatio: 1,\n momentumVelocityRatio: 1,\n sticky: false,\n minimumVelocity: 0.02,\n },\n });\n\n function onTouchMove() {\n const { touchEventsData: data, touches } = swiper;\n // Velocity\n if (data.velocities.length === 0) {\n data.velocities.push({\n position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],\n time: data.touchStartTime,\n });\n }\n data.velocities.push({\n position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],\n time: now(),\n });\n }\n\n function onTouchEnd({ currentPos }) {\n const { params, $wrapperEl, rtlTranslate: rtl, snapGrid, touchEventsData: data } = swiper;\n // Time diff\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n if (currentPos < -swiper.minTranslate()) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n if (currentPos > -swiper.maxTranslate()) {\n if (swiper.slides.length < snapGrid.length) {\n swiper.slideTo(snapGrid.length - 1);\n } else {\n swiper.slideTo(swiper.slides.length - 1);\n }\n return;\n }\n\n if (params.freeMode.momentum) {\n if (data.velocities.length > 1) {\n const lastMoveEvent = data.velocities.pop();\n const velocityEvent = data.velocities.pop();\n\n const distance = lastMoveEvent.position - velocityEvent.position;\n const time = lastMoveEvent.time - velocityEvent.time;\n swiper.velocity = distance / time;\n swiper.velocity /= 2;\n if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) {\n swiper.velocity = 0;\n }\n // this implies that the user stopped moving a finger then released.\n // There would be no events with distance zero, so the last event is stale.\n if (time > 150 || now() - lastMoveEvent.time > 300) {\n swiper.velocity = 0;\n }\n } else {\n swiper.velocity = 0;\n }\n swiper.velocity *= params.freeMode.momentumVelocityRatio;\n\n data.velocities.length = 0;\n let momentumDuration = 1000 * params.freeMode.momentumRatio;\n const momentumDistance = swiper.velocity * momentumDuration;\n\n let newPosition = swiper.translate + momentumDistance;\n if (rtl) newPosition = -newPosition;\n\n let doBounce = false;\n let afterBouncePosition;\n const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio;\n let needsLoopFix;\n if (newPosition < swiper.maxTranslate()) {\n if (params.freeMode.momentumBounce) {\n if (newPosition + swiper.maxTranslate() < -bounceAmount) {\n newPosition = swiper.maxTranslate() - bounceAmount;\n }\n afterBouncePosition = swiper.maxTranslate();\n doBounce = true;\n data.allowMomentumBounce = true;\n } else {\n newPosition = swiper.maxTranslate();\n }\n if (params.loop && params.centeredSlides) needsLoopFix = true;\n } else if (newPosition > swiper.minTranslate()) {\n if (params.freeMode.momentumBounce) {\n if (newPosition - swiper.minTranslate() > bounceAmount) {\n newPosition = swiper.minTranslate() + bounceAmount;\n }\n afterBouncePosition = swiper.minTranslate();\n doBounce = true;\n data.allowMomentumBounce = true;\n } else {\n newPosition = swiper.minTranslate();\n }\n if (params.loop && params.centeredSlides) needsLoopFix = true;\n } else if (params.freeMode.sticky) {\n let nextSlide;\n for (let j = 0; j < snapGrid.length; j += 1) {\n if (snapGrid[j] > -newPosition) {\n nextSlide = j;\n break;\n }\n }\n\n if (\n Math.abs(snapGrid[nextSlide] - newPosition) <\n Math.abs(snapGrid[nextSlide - 1] - newPosition) ||\n swiper.swipeDirection === 'next'\n ) {\n newPosition = snapGrid[nextSlide];\n } else {\n newPosition = snapGrid[nextSlide - 1];\n }\n newPosition = -newPosition;\n }\n if (needsLoopFix) {\n once('transitionEnd', () => {\n swiper.loopFix();\n });\n }\n // Fix duration\n if (swiper.velocity !== 0) {\n if (rtl) {\n momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);\n } else {\n momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);\n }\n if (params.freeMode.sticky) {\n // If freeMode.sticky is active and the user ends a swipe with a slow-velocity\n // event, then durations can be 20+ seconds to slide one (or zero!) slides.\n // It's easy to see this when simulating touch with mouse events. To fix this,\n // limit single-slide swipes to the default slide duration. This also has the\n // nice side effect of matching slide speed if the user stopped moving before\n // lifting finger or mouse vs. moving slowly before lifting the finger/mouse.\n // For faster swipes, also apply limits (albeit higher ones).\n const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate);\n const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex];\n if (moveDistance < currentSlideSize) {\n momentumDuration = params.speed;\n } else if (moveDistance < 2 * currentSlideSize) {\n momentumDuration = params.speed * 1.5;\n } else {\n momentumDuration = params.speed * 2.5;\n }\n }\n } else if (params.freeMode.sticky) {\n swiper.slideToClosest();\n return;\n }\n\n if (params.freeMode.momentumBounce && doBounce) {\n swiper.updateProgress(afterBouncePosition);\n swiper.setTransition(momentumDuration);\n swiper.setTranslate(newPosition);\n swiper.transitionStart(true, swiper.swipeDirection);\n swiper.animating = true;\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return;\n emit('momentumBounce');\n swiper.setTransition(params.speed);\n setTimeout(() => {\n swiper.setTranslate(afterBouncePosition);\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed) return;\n swiper.transitionEnd();\n });\n }, 0);\n });\n } else if (swiper.velocity) {\n emit('_freeModeNoMomentumRelease');\n swiper.updateProgress(newPosition);\n swiper.setTransition(momentumDuration);\n swiper.setTranslate(newPosition);\n swiper.transitionStart(true, swiper.swipeDirection);\n if (!swiper.animating) {\n swiper.animating = true;\n $wrapperEl.transitionEnd(() => {\n if (!swiper || swiper.destroyed) return;\n swiper.transitionEnd();\n });\n }\n } else {\n swiper.updateProgress(newPosition);\n }\n\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n } else if (params.freeMode.sticky) {\n swiper.slideToClosest();\n return;\n } else if (params.freeMode) {\n emit('_freeModeNoMomentumRelease');\n }\n\n if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) {\n swiper.updateProgress();\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n }\n\n Object.assign(swiper, {\n freeMode: {\n onTouchMove,\n onTouchEnd,\n },\n });\n}\n","export default function Grid({ swiper, extendParams }) {\n extendParams({\n grid: {\n rows: 1,\n fill: 'column',\n },\n });\n\n let slidesNumberEvenToRows;\n let slidesPerRow;\n let numFullColumns;\n\n const initSlides = (slidesLength) => {\n const { slidesPerView } = swiper.params;\n const { rows, fill } = swiper.params.grid;\n slidesPerRow = slidesNumberEvenToRows / rows;\n numFullColumns = Math.floor(slidesLength / rows);\n if (Math.floor(slidesLength / rows) === slidesLength / rows) {\n slidesNumberEvenToRows = slidesLength;\n } else {\n slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows;\n }\n if (slidesPerView !== 'auto' && fill === 'row') {\n slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows);\n }\n };\n\n const updateSlide = (i, slide, slidesLength, getDirectionLabel) => {\n const { slidesPerGroup, spaceBetween } = swiper.params;\n const { rows, fill } = swiper.params.grid;\n // Set slides order\n let newSlideOrderIndex;\n let column;\n let row;\n if (fill === 'row' && slidesPerGroup > 1) {\n const groupIndex = Math.floor(i / (slidesPerGroup * rows));\n const slideIndexInGroup = i - rows * slidesPerGroup * groupIndex;\n const columnsInGroup =\n groupIndex === 0\n ? slidesPerGroup\n : Math.min(\n Math.ceil((slidesLength - groupIndex * rows * slidesPerGroup) / rows),\n slidesPerGroup,\n );\n row = Math.floor(slideIndexInGroup / columnsInGroup);\n column = slideIndexInGroup - row * columnsInGroup + groupIndex * slidesPerGroup;\n\n newSlideOrderIndex = column + (row * slidesNumberEvenToRows) / rows;\n slide.css({\n '-webkit-order': newSlideOrderIndex,\n order: newSlideOrderIndex,\n });\n } else if (fill === 'column') {\n column = Math.floor(i / rows);\n row = i - column * rows;\n if (column > numFullColumns || (column === numFullColumns && row === rows - 1)) {\n row += 1;\n if (row >= rows) {\n row = 0;\n column += 1;\n }\n }\n } else {\n row = Math.floor(i / slidesPerRow);\n column = i - row * slidesPerRow;\n }\n slide.css(\n getDirectionLabel('margin-top'),\n row !== 0 ? spaceBetween && `${spaceBetween}px` : '',\n );\n };\n\n const updateWrapperSize = (slideSize, snapGrid, getDirectionLabel) => {\n const { spaceBetween, centeredSlides, roundLengths } = swiper.params;\n const { rows } = swiper.params.grid;\n swiper.virtualSize = (slideSize + spaceBetween) * slidesNumberEvenToRows;\n swiper.virtualSize = Math.ceil(swiper.virtualSize / rows) - spaceBetween;\n swiper.$wrapperEl.css({\n [getDirectionLabel('width')]: `${swiper.virtualSize + spaceBetween}px`,\n });\n if (centeredSlides) {\n snapGrid.splice(0, snapGrid.length);\n const newSlidesGrid = [];\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);\n }\n snapGrid.push(...newSlidesGrid);\n }\n };\n\n swiper.grid = {\n initSlides,\n updateSlide,\n updateWrapperSize,\n };\n}\n","export default function appendSlide(slides) {\n const swiper = this;\n const { $wrapperEl, params } = swiper;\n if (params.loop) {\n swiper.loopDestroy();\n }\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.append(slides[i]);\n }\n } else {\n $wrapperEl.append(slides);\n }\n if (params.loop) {\n swiper.loopCreate();\n }\n if (!params.observer) {\n swiper.update();\n }\n}\n","export default function prependSlide(slides) {\n const swiper = this;\n const { params, $wrapperEl, activeIndex } = swiper;\n\n if (params.loop) {\n swiper.loopDestroy();\n }\n let newActiveIndex = activeIndex + 1;\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.prepend(slides[i]);\n }\n newActiveIndex = activeIndex + slides.length;\n } else {\n $wrapperEl.prepend(slides);\n }\n if (params.loop) {\n swiper.loopCreate();\n }\n if (!params.observer) {\n swiper.update();\n }\n swiper.slideTo(newActiveIndex, 0, false);\n}\n","export default function addSlide(index, slides) {\n const swiper = this;\n const { $wrapperEl, params, activeIndex } = swiper;\n let activeIndexBuffer = activeIndex;\n if (params.loop) {\n activeIndexBuffer -= swiper.loopedSlides;\n swiper.loopDestroy();\n swiper.slides = $wrapperEl.children(`.${params.slideClass}`);\n }\n const baseLength = swiper.slides.length;\n if (index <= 0) {\n swiper.prependSlide(slides);\n return;\n }\n if (index >= baseLength) {\n swiper.appendSlide(slides);\n return;\n }\n let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;\n\n const slidesBuffer = [];\n for (let i = baseLength - 1; i >= index; i -= 1) {\n const currentSlide = swiper.slides.eq(i);\n currentSlide.remove();\n slidesBuffer.unshift(currentSlide);\n }\n\n if (typeof slides === 'object' && 'length' in slides) {\n for (let i = 0; i < slides.length; i += 1) {\n if (slides[i]) $wrapperEl.append(slides[i]);\n }\n newActiveIndex =\n activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;\n } else {\n $wrapperEl.append(slides);\n }\n\n for (let i = 0; i < slidesBuffer.length; i += 1) {\n $wrapperEl.append(slidesBuffer[i]);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n if (!params.observer) {\n swiper.update();\n }\n if (params.loop) {\n swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);\n } else {\n swiper.slideTo(newActiveIndex, 0, false);\n }\n}\n","export default function removeSlide(slidesIndexes) {\n const swiper = this;\n const { params, $wrapperEl, activeIndex } = swiper;\n\n let activeIndexBuffer = activeIndex;\n if (params.loop) {\n activeIndexBuffer -= swiper.loopedSlides;\n swiper.loopDestroy();\n swiper.slides = $wrapperEl.children(`.${params.slideClass}`);\n }\n let newActiveIndex = activeIndexBuffer;\n let indexToRemove;\n\n if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {\n for (let i = 0; i < slidesIndexes.length; i += 1) {\n indexToRemove = slidesIndexes[i];\n if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex -= 1;\n }\n newActiveIndex = Math.max(newActiveIndex, 0);\n } else {\n indexToRemove = slidesIndexes;\n if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex -= 1;\n newActiveIndex = Math.max(newActiveIndex, 0);\n }\n\n if (params.loop) {\n swiper.loopCreate();\n }\n\n if (!params.observer) {\n swiper.update();\n }\n if (params.loop) {\n swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);\n } else {\n swiper.slideTo(newActiveIndex, 0, false);\n }\n}\n","export default function removeAllSlides() {\n const swiper = this;\n\n const slidesIndexes = [];\n for (let i = 0; i < swiper.slides.length; i += 1) {\n slidesIndexes.push(i);\n }\n swiper.removeSlide(slidesIndexes);\n}\n","import appendSlide from './methods/appendSlide.js';\nimport prependSlide from './methods/prependSlide.js';\nimport addSlide from './methods/addSlide.js';\nimport removeSlide from './methods/removeSlide.js';\nimport removeAllSlides from './methods/removeAllSlides.js';\n\nexport default function Manipulation({ swiper }) {\n Object.assign(swiper, {\n appendSlide: appendSlide.bind(swiper),\n prependSlide: prependSlide.bind(swiper),\n addSlide: addSlide.bind(swiper),\n removeSlide: removeSlide.bind(swiper),\n removeAllSlides: removeAllSlides.bind(swiper),\n });\n}\n","// Swiper Class\nimport Swiper from './core/core.js';\n\n//IMPORT_MODULES\n\nconst modules = [\n //INSTALL_MODULES\n];\n\nSwiper.use(modules);\n\n//EXPORT\n"],"names":["isObject","obj","constructor","Object","extend","target","src","keys","forEach","key","length","ssrDocument","body","addEventListener","removeEventListener","activeElement","blur","nodeName","querySelector","querySelectorAll","getElementById","createEvent","initEvent","createElement","children","childNodes","style","setAttribute","getElementsByTagName","createElementNS","importNode","location","hash","host","hostname","href","origin","pathname","protocol","search","getDocument","doc","document","ssrWindow","navigator","userAgent","history","replaceState","pushState","go","back","CustomEvent","getComputedStyle","getPropertyValue","Image","Date","screen","setTimeout","clearTimeout","matchMedia","requestAnimationFrame","callback","cancelAnimationFrame","id","getWindow","win","window","makeReactive","proto","__proto__","defineProperty","get","set","value","Dom7","Array","items","arrayFlat","arr","res","el","isArray","push","arrayFilter","prototype","filter","call","arrayUnique","uniqueArray","i","indexOf","qsa","selector","context","a","$","html","trim","toCreate","tempParent","innerHTML","nodeType","fn","addClass","classes","classNames","map","c","split","classList","add","removeClass","remove","toggleClass","className","toggle","hasClass","contains","attr","attrs","arguments","getAttribute","undefined","attrName","removeAttr","removeAttribute","transform","transition","duration","transitionDuration","on","args","eventType","targetSelector","listener","capture","handleLiveEvent","e","eventData","dom7EventData","unshift","is","apply","parents","k","handleEvent","events","j","event","dom7Listeners","proxyListener","dom7LiveListeners","off","handlers","handler","splice","dom7proxy","trigger","evt","detail","bubbles","cancelable","data","dataIndex","dispatchEvent","transitionEnd","dom","fireCallBack","outerWidth","includeMargins","styles","offsetWidth","parseFloat","outerHeight","offsetHeight","offset","box","getBoundingClientRect","clientTop","clientLeft","scrollTop","scrollY","scrollLeft","scrollX","top","left","css","props","prop","each","index","result","text","textContent","compareWith","matches","webkitMatchesSelector","msMatchesSelector","child","previousSibling","eq","returnIndex","append","els","newChild","tempDiv","firstChild","appendChild","prepend","insertBefore","next","nextElementSibling","nextAll","nextEls","prev","previousElementSibling","prevAll","prevEls","parent","parentNode","closest","find","foundElements","found","removeChild","Methods","methodName","writable","deleteProps","object","nextTick","delay","now","currentStyle","getTranslate","axis","matrix","curTransform","transformMatrix","curStyle","WebKitCSSMatrix","webkitTransform","replace","join","MozTransform","OTransform","MsTransform","msTransform","toString","m41","m42","o","slice","isNode","node","HTMLElement","to","noExtend","nextSource","keysArray","nextIndex","len","nextKey","desc","getOwnPropertyDescriptor","enumerable","__swiper__","classesToSelector","createElementIfNotDefined","swiper","originalParams","params","checkProps","createElements","auto","element","$el","setCSSProperty","varName","varValue","setProperty","animateCSSModeScroll","targetPosition","side","startPosition","translate","startTime","time","speed","wrapperEl","scrollSnapType","cssModeFrameID","dir","isOutOfBound","current","animate","getTime","progress","Math","max","min","easeProgress","cos","PI","currentPosition","scrollTo","support","calcSupport","smoothScroll","documentElement","touch","DocumentTouch","passiveListener","checkPassiveListener","supportsPassive","opts","gestures","checkGestures","getSupport","deviceCached","calcDevice","platform","ua","device","ios","android","screenWidth","width","screenHeight","height","match","ipad","ipod","iphone","windows","macos","iPadScreens","os","getDevice","overrides","browser","calcBrowser","isSafari","toLowerCase","isWebView","test","getBrowser","Resize","emit","observer","resizeHandler","destroyed","initialized","createObserver","ResizeObserver","entries","newWidth","newHeight","contentBoxSize","contentRect","inlineSize","blockSize","observe","removeObserver","unobserve","orientationChangeHandler","resizeObserver","Observer","extendParams","observers","attach","options","ObserverFunc","MutationObserver","WebkitMutationObserver","mutations","observerUpdate","attributes","childList","characterData","init","observeParents","containerParents","observeSlideChildren","$wrapperEl","destroy","disconnect","priority","self","method","eventsListeners","once","onceHandler","__emitterProxy","onAny","eventsAnyListeners","offAny","eventHandler","eventsArray","updateSize","clientWidth","clientHeight","isHorizontal","isVertical","parseInt","Number","isNaN","assign","size","updateSlides","getDirectionLabel","property","getDirectionPropertyValue","label","swiperSize","rtlTranslate","rtl","wrongRTL","isVirtual","virtual","enabled","previousSlidesLength","slides","slideClass","slidesLength","snapGrid","slidesGrid","slidesSizesGrid","offsetBefore","slidesOffsetBefore","offsetAfter","slidesOffsetAfter","previousSnapGridLength","previousSlidesGridLength","spaceBetween","slidePosition","prevSlideSize","virtualSize","marginLeft","marginBottom","marginTop","marginRight","centeredSlides","cssMode","gridEnabled","grid","rows","initSlides","slideSize","slide","updateSlide","slidesPerView","slideStyles","currentTransform","currentWebKitTransform","roundLengths","paddingLeft","paddingRight","boxSizing","floor","swiperSlideSize","abs","slidesPerGroup","slidesPerGroupSkip","effect","setWrapperSize","updateWrapperSize","newSlidesGrid","slidesGridItem","_","slideIndex","centeredSlidesBounds","allSlidesSize","slideSizeValue","maxSnap","snap","centerInsufficientSlides","allSlidesOffset","snapIndex","addToSnapGrid","addToSlidesGrid","v","watchOverflow","checkOverflow","watchSlidesProgress","updateSlidesOffset","updateAutoHeight","activeSlides","setTransition","getSlideByIndex","visibleSlides","ceil","activeIndex","swiperSlideOffset","offsetLeft","offsetTop","updateSlidesProgress","offsetCenter","slideVisibleClass","visibleSlidesIndexes","slideProgress","minTranslate","slideBefore","slideAfter","isVisible","updateProgress","multiplier","translatesDiff","maxTranslate","isBeginning","isEnd","wasBeginning","wasEnd","autoHeight","updateSlidesClasses","realIndex","slideActiveClass","slideNextClass","slidePrevClass","slideDuplicateActiveClass","slideDuplicateNextClass","slideDuplicatePrevClass","activeSlide","loop","slideDuplicateClass","nextSlide","prevSlide","emitSlidesClasses","updateActiveIndex","newActiveIndex","previousIndex","previousRealIndex","previousSnapIndex","normalizeSlideIndex","skip","runCallbacksOnInit","updateClickedSlide","slideFound","clickedSlide","clickedIndex","slideToClickedSlide","getSwiperTranslate","virtualTranslate","currentTranslate","setTranslate","byController","x","y","z","previousTranslate","newProgress","translateTo","runCallbacks","translateBounds","internal","animating","preventInteractionOnTransition","newTranslate","isH","behavior","onTranslateToWrapperTransitionEnd","transitionEmit","direction","step","transitionStart","slideTo","initial","Error","indexAsNumber","isValidNumber","isFinite","initialSlide","normalizedTranslate","normalizedGrid","normalizedGridNext","allowSlideNext","allowSlidePrev","t","onSlideToWrapperTransitionEnd","slideToLoop","newIndex","loopedSlides","slideNext","perGroup","slidesPerGroupAuto","slidesPerViewDynamic","increment","loopPreventsSlide","loopFix","_clientLeft","slidePrev","normalize","val","normalizedSnapGrid","prevSnap","prevSnapIndex","prevIndex","slideReset","slideToClosest","threshold","currentSnap","nextSnap","slideToIndex","loopCreate","loopFillGroupWithBlank","blankSlidesNum","blankNode","slideBlankClass","loopAdditionalSlides","prependSlides","appendSlides","cloneNode","snapTranslate","diff","slideChanged","loopDestroy","setGrabCursor","moving","simulateTouch","isLocked","touchEventsTarget","cursor","unsetGrabCursor","closestElement","base","__closestFrom","assignedSlot","getRootNode","onTouchStart","touchEventsData","touches","originalEvent","$targetEl","isTouchEvent","type","which","button","isTouched","isMoved","swipingClassHasValue","noSwipingClass","shadowRoot","path","noSwipingSelector","isTargetShadow","noSwiping","allowClick","swipeHandler","currentX","targetTouches","pageX","currentY","pageY","startX","startY","edgeSwipeDetection","iOSEdgeSwipeDetection","edgeSwipeThreshold","iOSEdgeSwipeThreshold","innerWidth","preventDefault","allowTouchCallbacks","isScrolling","startMoving","touchStartTime","swipeDirection","allowThresholdMove","focusableElements","shouldPreventDefault","allowTouchMove","touchStartPreventDefault","touchStartForcePreventDefault","isContentEditable","onTouchMove","targetTouch","changedTouches","preventedByNestedSwiper","touchReleaseOnEdges","diffX","diffY","sqrt","touchAngle","atan2","touchMoveStopPropagation","nested","stopPropagation","startTranslate","allowMomentumBounce","grabCursor","touchRatio","disableParentSwiper","resistanceRatio","resistance","followFinger","freeMode","onTouchEnd","touchEndTime","timeDiff","lastClickTime","currentPos","stopIndex","groupSize","ratio","longSwipesMs","longSwipes","longSwipesRatio","shortSwipes","isNavButtonTarget","navigation","nextEl","prevEl","onResize","breakpoints","setBreakpoint","autoplay","running","paused","run","onClick","preventClicks","preventClicksPropagation","stopImmediatePropagation","onScroll","dummyEventAttached","dummyEventListener","touchEvents","domMethod","swiperMethod","start","move","end","passiveListeners","passive","cancel","updateOnWindowResize","attachEvents","bind","detachEvents","isGridEnabled","breakpoint","getBreakpoint","breakpointsBase","currentBreakpoint","breakpointOnlyParams","breakpointParams","wasMultiRow","isMultiRow","wasEnabled","containerModifierClass","emitContainerClasses","fill","directionChanged","needsReLoop","changeDirection","isEnabled","disable","enable","containerEl","currentHeight","innerHeight","points","point","minRatio","substr","sort","b","prepareClasses","prefix","resultClasses","item","addClasses","suffixes","removeClasses","loadImage","imageEl","srcset","sizes","checkForComplete","image","onReady","isPicture","complete","onload","onerror","preloadImages","imagesToLoad","imagesLoaded","updateOnImagesReady","update","currentSrc","wasLocked","lastSlidePosition","url","uniqueNavElements","wrapperClass","_emitClasses","moduleExtendParams","allModulesParams","moduleParamName","moduleParams","prototypes","eventsEmitter","images","extendedDefaults","Swiper","swipers","newParams","modules","mod","swiperParams","defaults","passedParams","eventName","velocity","desktop","touchEventsTouch","touchEventsDesktop","clickTimeout","velocities","setProgress","cls","getSlideClasses","slideEl","updates","view","exact","spv","breakLoop","slideInView","translateValue","translated","newDirection","needUpdate","currentDirection","mount","mounted","getWrapperSelector","getWrapper","wrapper","deleteInstance","cleanStyles","extendDefaults","newDefaults","installModule","use","module","m","prototypeGroup","protoMethod","Virtual","cache","renderSlide","renderExternal","renderExternalUpdate","addSlidesBefore","addSlidesAfter","from","$slideEl","force","previousFrom","previousTo","previousSlidesGrid","previousOffset","offsetProp","slidesAfter","slidesBefore","onRendered","lazy","load","getSlides","slidesToRender","prependIndexes","appendIndexes","appendSlide","prependSlide","numberOfNewSlides","newCache","cachedIndex","$cachedEl","cachedElIndex","removeSlide","slidesIndexes","removeAllSlides","Keyboard","keyboard","onlyInViewport","pageUpDown","handle","kc","keyCode","charCode","isPageUp","isPageDown","isArrowLeft","isArrowRight","isArrowUp","isArrowDown","shiftKey","altKey","ctrlKey","metaKey","inView","swiperWidth","swiperHeight","windowWidth","windowHeight","swiperOffset","swiperCoord","returnValue","Mousewheel","mousewheel","releaseOnEdges","invert","forceToAxis","sensitivity","eventsTarget","thresholdDelta","thresholdTime","timeout","lastScrollTime","lastEventBeforeSnap","recentWheelEvents","PIXEL_STEP","LINE_HEIGHT","PAGE_HEIGHT","sX","sY","pX","pY","wheelDelta","wheelDeltaY","wheelDeltaX","HORIZONTAL_AXIS","deltaY","deltaX","deltaMode","spinX","spinY","pixelX","pixelY","handleMouseEnter","mouseEntered","handleMouseLeave","animateSlider","newEvent","delta","raw","releaseScroll","rtlFactor","positions","sign","shift","prevEvent","ignoreWheelEvents","position","sticky","firstEvent","snapToThreshold","autoplayDisableOnInteraction","stop","Navigation","hideOnClick","disabledClass","hiddenClass","lockClass","$nextEl","$prevEl","getEl","toggleEl","disabled","tagName","onPrevClick","onNextClick","_s","targetEl","pagination","clickable","isHidden","Pagination","pfx","bulletElement","renderBullet","renderProgressbar","renderFraction","renderCustom","progressbarOpposite","dynamicBullets","dynamicMainBullets","formatFractionCurrent","number","formatFractionTotal","bulletClass","bulletActiveClass","modifierClass","currentClass","totalClass","progressbarFillClass","progressbarOppositeClass","clickableClass","horizontalClass","verticalClass","bullets","bulletSize","dynamicBulletIndex","isPaginationDisabled","setSideBullets","$bulletEl","total","paginationType","firstIndex","lastIndex","midIndex","suffix","bullet","$bullet","bulletIndex","$firstDisplayedBullet","$lastDisplayedBullet","dynamicBulletsLength","bulletsOffset","progressbarDirection","scale","scaleX","scaleY","render","paginationHTML","numberOfBullets","Scrollbar","dragTimeout","dragStartPos","dragSize","trackSize","divider","scrollbar","hide","draggable","snapOnRelease","dragClass","dragEl","$dragEl","newSize","newPos","opacity","display","getPointerPosition","clientX","clientY","setDragPosition","positionRatio","onDragStart","onDragMove","onDragEnd","activeListener","eventMethod","enableDraggable","disableDraggable","$swiperEl","Parallax","parallax","setTransform","p","currentOpacity","currentScale","parallaxEl","$parallaxEl","parallaxDuration","_swiper","Zoom","zoom","maxRatio","containerClass","zoomedSlideClass","isScaling","gesturesEnabled","fakeGestureTouched","fakeGestureMoved","gesture","slideWidth","slideHeight","$imageEl","$imageWrapEl","minX","minY","maxX","maxY","touchesStart","touchesCurrent","prevPositionX","prevPositionY","prevTime","getDistanceBetweenTouches","x1","y1","x2","y2","distance","onGestureStart","scaleStart","onGestureChange","scaleMove","onGestureEnd","scaledWidth","scaledHeight","momentumDurationX","momentumDurationY","momentumDistanceX","newPositionX","momentumDistanceY","newPositionY","momentumDuration","onTransitionEnd","zoomIn","overflow","touchAction","touchX","touchY","offsetX","offsetY","translateX","translateY","imageWidth","imageHeight","translateMinX","translateMinY","translateMaxX","translateMaxY","zoomOut","zoomToggle","getListeners","activeListenerWithCapture","getSlideSelector","toggleGestures","slideSelector","enableGestures","disableGestures","in","out","Lazy","checkInView","loadPrevNext","loadPrevNextAmount","loadOnTransitionStart","scrollingElement","elementClass","loadingClass","loadedClass","preloaderClass","scrollHandlerAttached","initialImageLoaded","loadInSlide","loadInDuplicate","$images","background","$pictureEl","sourceEl","$source","slideOriginalIndex","originalSlide","duplicatedSlide","slideExist","amount","maxIndex","minIndex","checkInViewOnLoad","$scrollElement","isWindow","scrollElementWidth","scrollElementHeight","Controller","controller","control","inverse","by","LinearSpline","binarySearch","guess","array","i1","i3","interpolate","getInterpolateFunction","spline","_t","controlled","controlledTranslate","setControlledTranslate","setControlledTransition","removeSpline","A11y","a11y","notificationClass","prevSlideMessage","nextSlideMessage","firstSlideMessage","lastSlideMessage","paginationBulletMessage","slideLabelMessage","containerMessage","containerRoleDescriptionMessage","itemRoleDescriptionMessage","slideRole","liveRegion","notify","message","notification","getRandomNumber","randomChar","round","random","repeat","makeElFocusable","makeElNotFocusable","addElRole","role","addElRoleDescription","description","addElControls","controls","addElLabel","addElId","addElLive","live","disableEl","enableEl","onEnterOrSpaceKey","click","updateNavigation","hasPagination","updatePagination","bulletEl","initNavEl","wrapperId","$containerEl","ariaLabelMessage","History","root","paths","slugify","getPathValues","urlOverride","URL","pathArray","part","setHistory","includes","currentState","state","scrollToSlide","slideHistory","setHistoryPopState","hashNavigation","HashNavigation","watchState","onHashChange","newHash","activeSlideHash","setHash","slideHash","Autoplay","waitForTransition","disableOnInteraction","stopOnLastSlide","reverseDirection","pauseOnMouseEnter","$activeSlideEl","autoplayResult","pause","onVisibilityChange","visibilityState","onMouseEnter","onMouseLeave","attachMouseEvents","detachMouseEvents","Fade","fadeEffect","crossFade","transformEl","tx","ty","slideOpacity","$translateTarget","$transitionElements","eventTriggered","$transitionEndTarget","triggerEvents","overwriteParams","Cube","cubeEffect","slideShadows","shadow","shadowOffset","shadowScale","wrapperRotate","$cubeShadowEl","slideAngle","tz","shadowBefore","shadowAfter","shadowAngle","sin","scale1","scale2","zFactor","Flip","flipEffect","limitRotation","createShadow","$shadowEl","rotate","rotateY","rotateX","zIndex","Coverflow","coverflowEffect","stretch","depth","modifier","center","slideOffset","offsetMultiplier","translateZ","slideTransform","$shadowBeforeEl","$shadowAfterEl","Thumb","thumbs","multipleActiveThumbs","autoScrollOffset","slideThumbActiveClass","thumbsContainerClass","swiperCreated","onThumbClick","thumbsSwiper","currentIndex","thumbsParams","SwiperClass","thumbsSwiperParams","useOffset","currentThumbsIndex","newThumbsIndex","prevThumbsIndex","nextThumbsIndex","thumbsToActivate","thumbActiveClass","momentum","momentumRatio","momentumBounce","momentumBounceRatio","momentumVelocityRatio","minimumVelocity","lastMoveEvent","pop","velocityEvent","momentumDistance","newPosition","doBounce","afterBouncePosition","bounceAmount","needsLoopFix","moveDistance","currentSlideSize","Grid","slidesNumberEvenToRows","slidesPerRow","numFullColumns","newSlideOrderIndex","column","row","groupIndex","slideIndexInGroup","columnsInGroup","order","addSlide","activeIndexBuffer","baseLength","slidesBuffer","currentSlide","indexToRemove","Manipulation"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA,SAASA,UAAT,CAAkBC,GAAlB,EAAuB;AACnB,SAAQA,GAAG,KAAK,IAAR,IACJ,OAAOA,GAAP,KAAe,QADX,IAEJ,iBAAiBA,GAFb,IAGJA,GAAG,CAACC,WAAJ,KAAoBC,MAHxB;AAIH;;AACD,SAASC,QAAT,CAAgBC,MAAM,GAAG,EAAzB,EAA6BC,GAAG,GAAG,EAAnC,EAAuC;AACnCH,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