UNPKG

swiper

Version:

Most modern mobile touch slider and framework with hardware accelerated transitions

13 lines (12 loc) 152 kB
/** * Swiper 14.0.0 * Most modern mobile touch slider and framework with hardware accelerated transitions * https://swiperjs.com * * Copyright 2014-2026 Vladimir Kharlampidi * * Released under the MIT License * * Released on: June 26, 2026 */ var Swiper=function(){"use strict";function e(e=""){return e.trim().split(" ").filter(e=>!!e.trim())}function t(e,t=0){return setTimeout(e,t)}function s(){return Date.now()}function i(e,t="x"){const s=function(e){return window.getComputedStyle(e,null)}(e),i=s.transform||s.webkitTransform;if(!i||"none"===i)return 0;const r=new DOMMatrixReadOnly(i);return"x"===t?r.m41:r.m42}function r(e){return"object"==typeof e&&null!==e&&e.constructor===Object&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function a(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement||!!e&&"object"==typeof e&&(1===e.nodeType||11===e.nodeType)}function n(e,...t){const s=Object(e);for(let e=0;e<t.length;e+=1){const i=t[e];if(null==i||a(i))continue;const l=i,o=Object.keys(Object(l)).filter(e=>"__proto__"!==e&&"constructor"!==e&&"prototype"!==e);for(const e of o){const t=Object.getOwnPropertyDescriptor(l,e);if(!t||!t.enumerable)continue;const i=l[e];r(s[e])&&r(i)?i.__swiper__?s[e]=i:n(s[e],i):!r(s[e])&&r(i)?(s[e]={},i.__swiper__?s[e]=i:n(s[e],i)):s[e]=i}}return s}function l(e,t,s){e.style.setProperty(t,s)}function o(e){const t=e.querySelector(".swiper-slide-transform");if(t)return t;if(e.shadowRoot){const t=e.shadowRoot.querySelector(".swiper-slide-transform");if(t)return t}return e}function d(e,t=""){const s=[...e.children];return e instanceof HTMLSlotElement&&s.push(...e.assignedElements()),t?s.filter(e=>e.matches(t)):s}function c(e){try{console.warn(e)}catch{}}function p(t,s=[]){const i=document.createElement(t);return i.classList.add(...Array.isArray(s)?s:e(s)),i}function u(e){const t=e.getBoundingClientRect();return{top:t.top+window.scrollY-(e.clientTop||0),left:t.left+window.scrollX-(e.clientLeft||0)}}function m(e,t){return window.getComputedStyle(e,null).getPropertyValue(t)}function h(e){if(e&&e.parentNode)return[...e.parentNode.children].indexOf(e)}function f(e,t){const s=[];let i=e.parentElement;for(;i;)t&&!i.matches(t)||s.push(i),i=i.parentElement;return s}function g(e,t){t&&e.addEventListener("transitionend",function(s){s.target===e&&t.call(e,s)},{once:!0})}function v(e,t,s){{const s=window.getComputedStyle(e,null);return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(s.getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(s.getPropertyValue("width"===t?"margin-left":"margin-bottom"))}}function w(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}function b(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}function y(e,t=""){const s=globalThis.trustedTypes;e.innerHTML=void 0!==s?s.createPolicy("html",{createHTML:e=>e}).createHTML(t):t}let E,S,x;function T(){return E||(E="undefined"==typeof window?{touch:!1}:{touch:"ontouchstart"in window||navigator.maxTouchPoints>0}),E}function M(e={}){return S||(S=function({userAgent:e}={}){if("undefined"==typeof window)return{ios:!1,android:!1};const t=T(),s=navigator.platform,i=e||navigator.userAgent,r={ios:!1,android:!1},a=/(Android);?[\s/]+([\d.]+)?/.test(i),n=/(iPhone\sOS|iOS|iPod)/.test(i),l=/iPad/.test(i),o="MacIntel"===s&&t.touch&&navigator.maxTouchPoints>1,d=l||o;return a&&!("Win32"===s)&&(r.os="android",r.android=!0),(d||n)&&(r.os="ios",r.ios=!0),r}(e)),S}function C(){return x||(x=function(){if("undefined"==typeof window)return{isSafari:!1,isWebView:!1,need3dFix:!1};const e=M(),t=navigator.userAgent,s=t.toLowerCase(),i=s.includes("safari")&&!s.includes("chrome")&&!s.includes("android"),r=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t);return{isSafari:i,isWebView:r,need3dFix:i||r&&e.ios}}()),x}const P=(e,t)=>{if(!e||e.destroyed||!e.params)return;const s=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(s){let t=s.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(s.shadowRoot?t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{if(s.shadowRoot){const t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`);t&&!t.lazyPreloaderManaged&&t.remove()}})),t&&!t.lazyPreloaderManaged&&t.remove()}},L=(e,t)=>{if(!e.slides[t])return;const s=e.slides[t].querySelector('[loading="lazy"]');s&&s.removeAttribute("loading")},A=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const s=e.slides.length;if(!s||!t||t<0)return;t=Math.min(t,s);const i="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),r=e.activeIndex;if(e.params.grid&&(e.params.grid.rows??1)>1){const s=r,a=[s-t];return a.push(...Array.from({length:t}).map((e,t)=>s+i+t)),void e.slides.forEach((t,s)=>{void 0!==t.column&&a.includes(t.column)&&L(e,s)})}const a=r+i-1;if(e.params.rewind||e.params.loop)for(let i=r-t;i<=a+t;i+=1){const t=(i%s+s)%s;(t<r||t>a)&&L(e,t)}else for(let i=Math.max(r-t,0);i<=Math.min(a+t,s-1);i+=1)i!==r&&(i>a||i<r)&&L(e,i)};const I=(e,t)=>!!(e.grid&&t.grid&&t.grid.rows>1);var z={setBreakpoint:function(){const e=this,{realIndex:t,initialized:s,params:i,el:r}=e,a=i.breakpoints;if(!a||a&&0===Object.keys(a).length)return;const l="window"!==i.breakpointsBase&&i.breakpointsBase?"container":i.breakpointsBase,o=["window","container"].includes(i.breakpointsBase)||!i.breakpointsBase?e.el:document.querySelector(i.breakpointsBase),d=e.getBreakpoint(a,l,o);if(!d||e.currentBreakpoint===d)return;const c=(d in a?a[d]:void 0)||e.originalParams,p=I(e,i),u=I(e,c),m=e.params.grabCursor,h=c.grabCursor,f=i.enabled;p&&!u?(r.classList.remove(`${i.containerModifierClass}grid`,`${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!p&&u&&(r.classList.add(`${i.containerModifierClass}grid`),(c.grid.fill&&"column"===c.grid.fill||!c.grid.fill&&"column"===i.grid.fill)&&r.classList.add(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),m&&!h?e.unsetGrabCursor():!m&&h&&e.setGrabCursor();const g=(e,t)=>e[t];["navigation","pagination","scrollbar"].forEach(t=>{const s=g(c,t);if(void 0===s)return;const r=g(i,t),a="object"==typeof r&&null!==r&&r.enabled,n="object"==typeof s&&null!==s&&s.enabled,l=e[t];a&&!n&&l?.disable?.(),!a&&n&&l?.enable?.()});const v=c.direction&&c.direction!==i.direction,w=i.loop&&(c.slidesPerView!==i.slidesPerView||v),b=i.loop;v&&s&&e.changeDirection(),n(e.params,c);const y=e.params.enabled,E=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),f&&!y?e.disable():!f&&y&&e.enable(),e.currentBreakpoint=d,e.emit("_beforeBreakpoint",c),s&&(w?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!b&&E?(e.loopCreate(t),e.updateSlides()):b&&!E&&e.loopDestroy()),e.emit("breakpoint",c)},getBreakpoint:function(e,t="window",s){if(!e||"container"===t&&!s)return;let i=!1;const r="window"===t?window.innerHeight:s.clientHeight,a=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}});a.sort((e,t)=>parseInt(String(e.value),10)-parseInt(String(t.value),10));for(let e=0;e<a.length;e+=1){const{point:r,value:n}=a[e];"window"===t?window.matchMedia(`(min-width: ${n}px)`).matches&&(i=r):n<=s.clientWidth&&(i=r)}return i||"max"}};var $={checkOverflow:function(){const e=this,{isLocked:t,params:s}=e,{slidesOffsetBefore:i}=s;if(i){const t=e.slides.length-1,s=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*i;e.isLocked=e.size>s}else e.isLocked=1===e.snapGrid.length;!0===s.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===s.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}};var k={addClasses:function(){const e=this,{classNames:t,params:s,rtl:i,el:r,device:a}=e,n=function(e,t){const s=[];return e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(i=>{e[i]&&s.push(t+i)}):"string"==typeof e&&s.push(t+e)}),s}(["initialized",s.direction,{"free-mode":e.params.freeMode&&s.freeMode.enabled},{autoheight:s.autoHeight},{rtl:i},{grid:s.grid&&s.grid.rows>1},{"grid-column":s.grid&&s.grid.rows>1&&"column"===s.grid.fill},{android:a.android},{ios:a.ios},{"css-mode":s.cssMode},{centered:s.cssMode&&s.centeredSlides},{"watch-progress":s.watchSlidesProgress}],s.containerModifierClass);t.push(...n),r.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}};const O={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};var D={on(e,t,s){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;const r=s?"unshift":"push";return e.split(" ").forEach(e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][r](t)}),i},once(e,t,s){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;const r=function(...s){i.off(e,r),r.__emitterProxy&&delete r.__emitterProxy,t.apply(i,s)};return r.__emitterProxy=t,i.on(e,r,s)},onAny(e,t){const s=this;if(!s.eventsListeners||s.destroyed)return s;if("function"!=typeof e)return s;const i=t?"unshift":"push";return s.eventsAnyListeners.indexOf(e)<0&&s.eventsAnyListeners[i](e),s},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const s=t.eventsAnyListeners.indexOf(e);return s>=0&&t.eventsAnyListeners.splice(s,1),t},off(e,t){const s=this;return!s.eventsListeners||s.destroyed?s:s.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].forEach((i,r)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&s.eventsListeners[e].splice(r,1)})}),s):s},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsListeners)return t;let s,i,r;if("string"==typeof e[0]||Array.isArray(e[0]))s=e[0],i=e.slice(1,e.length),r=t;else{const a=e[0];s=a.events,i=a.data??[],r=a.context||t}i.unshift(r);return(Array.isArray(s)?s:s.split(" ")).forEach(e=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(t=>{t.apply(r,[e,...i])}),t.eventsListeners&&t.eventsListeners[e]&&t.eventsListeners[e].forEach(e=>{e.apply(r,i)})}),t}};function G(e){const t=this;t.destroyed||t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function X(){const e=this;e.destroyed||e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}function B(e){const t=this;t.destroyed||(P(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update())}function H(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:i,allowSlidePrev:r,snapGrid:a}=e,n=e.virtual&&e.params.virtual?.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const l=n&&t.loop;if(!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||l)e.params.loop&&!n?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);else{const t=n?e.virtual.slides.length:e.slides.length;e.slideTo(t-1,0,!1,!0)}if(e.autoplay&&e.autoplay.running&&e.autoplay.paused){const t=e.autoplay;clearTimeout(t.resizeTimeout),t.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)}e.allowSlidePrev=r,e.allowSlideNext=i,e.params.watchOverflow&&a!==e.snapGrid&&e.checkOverflow()}function Y(){const e=this;if(e.destroyed)return;const{wrapperEl:t,rtlTranslate:s,enabled:i}=e;if(!i)return;let r;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const a=e.maxTranslate()-e.minTranslate();r=0===a?0:(e.translate-e.minTranslate())/a,r!==e.progress&&e.updateProgress(s?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function R(e){const i=this;if(i.destroyed)return;const r=i.touchEventsData;let a=e.originalEvent??e;if("touchend"===a.type||"touchcancel"===a.type){const e=[...a.changedTouches].find(e=>e.identifier===r.touchId);if(!e||e.identifier!==r.touchId)return}else{if(null!==r.touchId)return;if(a.pointerId!==r.pointerId)return}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(a.type)){if(!(["pointercancel","contextmenu"].includes(a.type)&&(i.browser.isSafari||i.browser.isWebView)))return}r.pointerId=null,r.touchId=null;const{params:n,touches:l,rtlTranslate:o,slidesGrid:d,enabled:c}=i;if(!c)return;if(!n.simulateTouch&&"mouse"===a.pointerType)return;if(r.allowTouchCallbacks&&i.emit("touchEnd",a),r.allowTouchCallbacks=!1,!r.isTouched)return r.isMoved&&n.grabCursor&&i.setGrabCursor(!1),r.isMoved=!1,void(r.startMoving=!1);n.grabCursor&&r.isMoved&&r.isTouched&&(!0===i.allowSlideNext||!0===i.allowSlidePrev)&&i.setGrabCursor(!1);const p=s(),u=p-r.touchStartTime;if(i.allowClick){const e=a.path??(a.composedPath&&a.composedPath());i.updateClickedSlide(e&&e[0],e),i.emit("tap click",a),u<300&&p-r.lastClickTime<300&&i.emit("doubleTap doubleClick",a)}if(r.lastClickTime=s(),t(()=>{i.destroyed||(i.allowClick=!0)}),!r.isTouched||!r.isMoved||!i.swipeDirection||0===l.diff&&!r.loopSwapReset||r.currentTranslate===r.startTranslate&&!r.loopSwapReset)return r.isTouched=!1,r.isMoved=!1,void(r.startMoving=!1);let m;if(r.isTouched=!1,r.isMoved=!1,r.startMoving=!1,m=n.followFinger?o?i.translate:-i.translate:-(r.currentTranslate??0),n.cssMode)return;if(n.freeMode&&n.freeMode.enabled)return void i.freeMode.onTouchEnd({currentPos:m});const h=m>=-i.maxTranslate()&&!i.params.loop;let f=0,g=i.slidesSizesGrid[0];for(let e=0;e<d.length;e+=e<n.slidesPerGroupSkip?1:n.slidesPerGroup){const t=e<n.slidesPerGroupSkip-1?1:n.slidesPerGroup;void 0!==d[e+t]?(h||m>=d[e]&&m<d[e+t])&&(f=e,g=d[e+t]-d[e]):(h||m>=d[e])&&(f=e,g=d[d.length-1]-d[d.length-2])}let v=null,w=null;n.rewind&&(i.isBeginning?w=n.virtual?.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1:i.isEnd&&(v=0));const b=(m-d[f])/g,y=f<n.slidesPerGroupSkip-1?1:n.slidesPerGroup;if(u>n.longSwipesMs){if(!n.longSwipes)return void i.slideTo(i.activeIndex);"next"===i.swipeDirection&&(b>=n.longSwipesRatio?i.slideTo(n.rewind&&i.isEnd?v:f+y):i.slideTo(f)),"prev"===i.swipeDirection&&(b>1-n.longSwipesRatio?i.slideTo(f+y):null!==w&&b<0&&Math.abs(b)>n.longSwipesRatio?i.slideTo(w):i.slideTo(f))}else{if(!n.shortSwipes)return void i.slideTo(i.activeIndex);i.navigation&&(a.target===i.navigation.nextEl||a.target===i.navigation.prevEl)?a.target===i.navigation.nextEl?i.slideTo(f+y):i.slideTo(f):("next"===i.swipeDirection&&i.slideTo(null!==v?v:f+y),"prev"===i.swipeDirection&&i.slideTo(null!==w?w:f))}}function N(e){const t=this;if(t.destroyed)return;const i=t.touchEventsData,{params:r,touches:a,rtlTranslate:n,enabled:l}=t;if(!l)return;if(!r.simulateTouch&&"mouse"===e.pointerType)return;const o=e,d=o.originalEvent??o;if("pointermove"===d.type){if(null!==i.touchId)return;if(d.pointerId!==i.pointerId)return}let c;if("touchmove"===d.type){const e=[...d.changedTouches].find(e=>e.identifier===i.touchId);if(!e||e.identifier!==i.touchId)return;c=e}else c=d;if(!i.isTouched)return void(i.startMoving&&i.isScrolling&&t.emit("touchMoveOpposite",d));const p=c.pageX,u=c.pageY;if(d.preventedByNestedSwiper)return a.startX=p,void(a.startY=u);if(!t.allowTouchMove)return d.target.matches(i.focusableElements)||(t.allowClick=!1),void(i.isTouched&&(Object.assign(a,{startX:p,startY:u,currentX:p,currentY:u}),i.touchStartTime=s()));if(r.touchReleaseOnEdges&&!r.loop)if(t.isVertical()){if(u<a.startY&&t.translate<=t.maxTranslate()||u>a.startY&&t.translate>=t.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else{if(n&&(p>a.startX&&-t.translate<=t.maxTranslate()||p<a.startX&&-t.translate>=t.minTranslate()))return;if(!n&&(p<a.startX&&t.translate<=t.maxTranslate()||p>a.startX&&t.translate>=t.minTranslate()))return}if(document.activeElement&&document.activeElement.matches(i.focusableElements)&&document.activeElement!==d.target&&"mouse"!==d.pointerType&&document.activeElement.blur(),document.activeElement&&d.target===document.activeElement&&d.target.matches(i.focusableElements))return i.isMoved=!0,void(t.allowClick=!1);i.allowTouchCallbacks&&t.emit("touchMove",d),a.previousX=a.currentX,a.previousY=a.currentY,a.currentX=p,a.currentY=u;const m=a.currentX-a.startX,h=a.currentY-a.startY;if(t.params.threshold&&Math.sqrt(m**2+h**2)<t.params.threshold)return;if(void 0===i.isScrolling){let e;t.isHorizontal()&&a.currentY===a.startY||t.isVertical()&&a.currentX===a.startX?i.isScrolling=!1:m*m+h*h>=25&&(e=180*Math.atan2(Math.abs(h),Math.abs(m))/Math.PI,i.isScrolling=t.isHorizontal()?e>r.touchAngle:90-e>r.touchAngle)}if(i.isScrolling&&t.emit("touchMoveOpposite",d),void 0===i.startMoving&&(a.currentX===a.startX&&a.currentY===a.startY||(i.startMoving=!0)),i.isScrolling||"touchmove"===d.type&&i.preventTouchMoveFromPointerMove)return void(i.isTouched=!1);if(!i.startMoving)return;t.allowClick=!1,!r.cssMode&&d.cancelable&&d.preventDefault(),r.touchMoveStopPropagation&&!r.nested&&d.stopPropagation();let f=t.isHorizontal()?m:h,g=t.isHorizontal()?a.currentX-a.previousX:a.currentY-a.previousY;r.oneWayMovement&&(f=Math.abs(f)*(n?1:-1),g=Math.abs(g)*(n?1:-1)),a.diff=f,f*=r.touchRatio,n&&(f=-f,g=-g);const v=t.touchesDirection;t.swipeDirection=f>0?"prev":"next",t.touchesDirection=g>0?"prev":"next";const w=t.params.loop&&!r.cssMode,b="next"===t.touchesDirection&&t.allowSlideNext||"prev"===t.touchesDirection&&t.allowSlidePrev;if(!i.isMoved){if(w&&b&&t.loopFix({direction:t.swipeDirection}),i.startTranslate=t.getTranslate(),t.setTransition(0),t.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});t.wrapperEl.dispatchEvent(e)}i.allowMomentumBounce=!1,!r.grabCursor||!0!==t.allowSlideNext&&!0!==t.allowSlidePrev||t.setGrabCursor(!0),t.emit("sliderFirstMove",d)}if((new Date).getTime(),!1!==r._loopSwapReset&&i.isMoved&&i.allowThresholdMove&&v!==t.touchesDirection&&w&&b&&Math.abs(f)>=1)return Object.assign(a,{startX:p,startY:u,currentX:p,currentY:u,startTranslate:i.currentTranslate}),i.loopSwapReset=!0,void(i.startTranslate=i.currentTranslate);t.emit("sliderMove",d),i.isMoved=!0;const y=i.startTranslate??0;i.currentTranslate=f+y;let E=!0,S=r.resistanceRatio;if(r.touchReleaseOnEdges&&(S=0),f>0?(w&&b&&i.allowThresholdMove&&i.currentTranslate>(r.centeredSlides?t.minTranslate()-t.slidesSizesGrid[t.activeIndex+1]-("auto"!==r.slidesPerView&&t.slides.length-r.slidesPerView>=2?t.slidesSizesGrid[t.activeIndex+1]+t.params.spaceBetween:0)-t.params.spaceBetween:t.minTranslate())&&t.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>t.minTranslate()&&(E=!1,r.resistance&&(i.currentTranslate=t.minTranslate()-1+(-t.minTranslate()+y+f)**S))):f<0&&(w&&b&&i.allowThresholdMove&&i.currentTranslate<(r.centeredSlides?t.maxTranslate()+t.slidesSizesGrid[t.slidesSizesGrid.length-1]+t.params.spaceBetween+("auto"!==r.slidesPerView&&t.slides.length-r.slidesPerView>=2?t.slidesSizesGrid[t.slidesSizesGrid.length-1]+t.params.spaceBetween:0):t.maxTranslate())&&t.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:t.slides.length-("auto"===r.slidesPerView?t.slidesPerViewDynamic():Math.ceil(parseFloat(String(r.slidesPerView))))}),i.currentTranslate<t.maxTranslate()&&(E=!1,r.resistance&&(i.currentTranslate=t.maxTranslate()+1-(t.maxTranslate()-y-f)**S))),E&&(d.preventedByNestedSwiper=!0),!t.allowSlideNext&&"next"===t.swipeDirection&&(i.currentTranslate??0)<y&&(i.currentTranslate=y),!t.allowSlidePrev&&"prev"===t.swipeDirection&&(i.currentTranslate??0)>y&&(i.currentTranslate=y),t.allowSlidePrev||t.allowSlideNext||(i.currentTranslate=y),r.threshold>0){if(!(Math.abs(f)>r.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,i.currentTranslate=i.startTranslate,void(a.diff=t.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY)}r.followFinger&&!r.cssMode&&((r.freeMode&&r.freeMode.enabled&&t.freeMode||r.watchSlidesProgress)&&(t.updateActiveIndex(),t.updateSlidesClasses()),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.freeMode.onTouchMove(),t.updateProgress(i.currentTranslate),t.setTranslate(i.currentTranslate??0))}function V(e,t,s){const{params:i}=e,r=i.edgeSwipeDetection,a=i.edgeSwipeThreshold;return!r||!(s<=a||s>=window.innerWidth-a)||"prevent"===r&&(t.preventDefault(),!0)}function q(e){const t=this;if(t.destroyed)return;const i=e.originalEvent??e,r=t.touchEventsData;if("pointerdown"===i.type){const e=i;if(null!==r.pointerId&&r.pointerId!==e.pointerId)return;r.pointerId=e.pointerId}else"touchstart"===i.type&&1===i.targetTouches.length&&(r.touchId=i.targetTouches[0].identifier);if("touchstart"===i.type)return void V(t,i,i.targetTouches[0].pageX);const{params:a,touches:n,enabled:l}=t;if(!l)return;if(!a.simulateTouch&&"mouse"===i.pointerType)return;if(t.animating&&a.preventInteractionOnTransition)return;!t.animating&&a.cssMode&&a.loop&&t.loopFix();let o=i.target;if("wrapper"===a.touchEventsTarget&&!function(e,t){let s=t.contains(e);!s&&t instanceof HTMLSlotElement&&(s=[...t.assignedElements()].includes(e),s||(s=function(e,t){const s=[t];for(;s.length>0;){const t=s.shift();if(e===t)return!0;s.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}return!1}(e,t)));return s}(o,t.wrapperEl))return;const d=i;if("number"==typeof d.which&&3===d.which)return;if("number"==typeof d.button&&d.button>0)return;if(r.isTouched&&r.isMoved)return;const c=!!a.noSwipingClass&&""!==a.noSwipingClass,p=i.composedPath?i.composedPath():i.path;c&&i.target&&i.target.shadowRoot&&p&&(o=p[0]);const u=a.noSwipingSelector?a.noSwipingSelector:`.${a.noSwipingClass}`,m=!(!i.target||!i.target.shadowRoot);if(a.noSwiping&&(m?(h=u,function e(t){if(!t||t===document||t===window)return null;let s=t;s.assignedSlot&&(s=s.assignedSlot);const i=s.closest(h);if(!i&&!s.getRootNode)return null;const r=s.getRootNode();return i||e(r.host)}(o)):o.closest(u)))return void(t.allowClick=!0);var h;if(a.swipeHandler&&"string"==typeof a.swipeHandler&&!o.closest(a.swipeHandler))return;const f=i;n.currentX=f.pageX,n.currentY=f.pageY;const g=n.currentX,v=n.currentY;if(!V(t,i,g))return;Object.assign(r,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),n.startX=g,n.startY=v,r.touchStartTime=s(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,a.threshold>0&&(r.allowThresholdMove=!1);let w=!0;o.matches(r.focusableElements)&&(w=!1,"SELECT"===o.nodeName&&(r.isTouched=!1)),document.activeElement&&document.activeElement.matches(r.focusableElements)&&document.activeElement!==o&&("mouse"===f.pointerType||"mouse"!==f.pointerType&&!o.matches(r.focusableElements))&&document.activeElement.blur();const b=w&&t.allowTouchMove&&a.touchStartPreventDefault;!a.touchStartForcePreventDefault&&!b||o.isContentEditable||i.preventDefault(),a.freeMode&&a.freeMode.enabled&&t.freeMode&&t.animating&&!a.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",i)}const _=(e,t)=>{const{params:s,el:i,wrapperEl:r,device:a}=e,n=!!s.nested,l="on"===t?"addEventListener":"removeEventListener",o=t;if(!i||"string"==typeof i)return;document[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:n}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),document[l]("touchmove",e.onTouchMove,{passive:!1,capture:n}),document[l]("pointermove",e.onTouchMove,{passive:!1,capture:n}),document[l]("touchend",e.onTouchEnd,{passive:!0}),document[l]("pointerup",e.onTouchEnd,{passive:!0}),document[l]("pointercancel",e.onTouchEnd,{passive:!0}),document[l]("touchcancel",e.onTouchEnd,{passive:!0}),document[l]("pointerout",e.onTouchEnd,{passive:!0}),document[l]("pointerleave",e.onTouchEnd,{passive:!0}),document[l]("contextmenu",e.onTouchEnd,{passive:!0}),(s.preventClicks||s.preventClicksPropagation)&&i[l]("click",e.onClick,!0),s.cssMode&&r[l]("scroll",e.onScroll);const d=t=>{e[o](t,H,!0)};s.updateOnWindowResize?d(a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate"):d("observerUpdate"),i[l]("load",e.onLoad,{capture:!0})};var W={loopCreate:function(e,t){const s=this,{params:i,slidesEl:r}=s;if(!i.loop||s.virtual&&s.params.virtual?.enabled)return;const a=()=>{d(r,`.${i.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",String(t))})},n=s.grid&&i.grid&&i.grid.rows>1;i.loopAddBlankSlides&&(i.slidesPerGroup>1||n)&&(()=>{const e=d(r,`.${i.slideBlankClass}`);e.forEach(e=>{e.remove()}),e.length>0&&(s.recalcSlides(),s.updateSlides())})();const l=i.slidesPerGroup*(n?i.grid.rows:1),o=s.slides.length%l!==0,u=n&&s.slides.length%i.grid.rows!==0,m=e=>{for(let t=0;t<e;t+=1){const e=s.isElement?p("swiper-slide",[i.slideBlankClass]):p("div",[i.slideClass,i.slideBlankClass]);s.slidesEl.append(e)}};if(o){if(i.loopAddBlankSlides){m(l-s.slides.length%l),s.recalcSlides(),s.updateSlides()}else c("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");a()}else if(u){if(i.loopAddBlankSlides){m(i.grid.rows-s.slides.length%i.grid.rows),s.recalcSlides(),s.updateSlides()}else c("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");a()}else a();const h=i.centeredSlides||!!i.slidesOffsetBefore||!!i.slidesOffsetAfter;s.loopFix({slideRealIndex:e,direction:h?void 0:"next",initial:t})},loopFix:function(e={}){const{slideRealIndex:t,slideTo:s=!0,direction:i,setTranslate:r,activeSlideIndex:a,initial:n,byController:l,byMousewheel:o}=e;let d=a;const p=this;if(!p.params.loop)return;p.emit("beforeLoopFix");const{slides:u,allowSlidePrev:m,allowSlideNext:h,slidesEl:f,params:g}=p,{centeredSlides:v,slidesOffsetBefore:w,slidesOffsetAfter:b,initialSlide:y}=g,E=v||!!w||!!b;if(p.allowSlidePrev=!0,p.allowSlideNext=!0,p.virtual&&g.virtual?.enabled){if(s){const e=p.virtual.slides.length,t=p.virtual.slidesBefore??0;E||0!==p.snapIndex?E&&p.snapIndex<g.slidesPerView?p.slideTo(e+p.snapIndex,0,!1,!0):p.snapIndex===p.snapGrid.length-1&&p.slideTo(t,0,!1,!0):p.slideTo(e,0,!1,!0)}return p.allowSlidePrev=m,p.allowSlideNext=h,void p.emit("loopFix")}let S=g.slidesPerView;"auto"===S?S=p.slidesPerViewDynamic():(S=Math.ceil(parseFloat(String(g.slidesPerView))),E&&S%2==0&&(S+=1));const x=g.slidesPerGroupAuto?S:g.slidesPerGroup;let T=E?Math.max(x,Math.ceil(S/2)):x;T%x!==0&&(T+=x-T%x),T+=g.loopAdditionalSlides,p.loopedSlides=T;const M=p.grid&&g.grid&&g.grid.rows>1;u.length<S+T||"cards"===p.params.effect&&u.length<S+2*T?c("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):M&&"row"===g.grid.fill&&c("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const C=[],P=[],L=M?Math.ceil(u.length/g.grid.rows):u.length,A=n&&L-y<S&&!E;let I=A?y:p.activeIndex;void 0===d?d=p.getSlideIndex(u.find(e=>e.classList.contains(g.slideActiveClass))):I=d;const z="next"===i||!i,$="prev"===i||!i;let k=0,O=0;const D=(M?u[d].column??0:d)+(E&&void 0===r?-S/2+.5:0);if(D<T){k=Math.max(T-D,x);for(let e=0;e<T-D;e+=1){const t=e-Math.floor(e/L)*L;if(M){const e=L-t-1;for(let t=u.length-1;t>=0;t-=1)u[t].column===e&&C.push(t)}else C.push(L-t-1)}}else if(D+S>L-T){O=Math.max(D-(L-2*T),x),A&&(O=Math.max(O,S-L+y+1));for(let e=0;e<O;e+=1){const t=e-Math.floor(e/L)*L;M?u.forEach((e,s)=>{e.column===t&&P.push(s)}):P.push(t)}}if(p.__preventObserver__=!0,requestAnimationFrame(()=>{p.__preventObserver__=!1}),"cards"===p.params.effect&&u.length<S+2*T&&(P.includes(d)&&P.splice(P.indexOf(d),1),C.includes(d)&&C.splice(C.indexOf(d),1)),$&&C.forEach(e=>{const t=u[e];t.swiperLoopMoveDOM=!0,f.prepend(t),t.swiperLoopMoveDOM=!1}),z&&P.forEach(e=>{const t=u[e];t.swiperLoopMoveDOM=!0,f.append(t),t.swiperLoopMoveDOM=!1}),p.recalcSlides(),"auto"===g.slidesPerView?p.updateSlides():M&&(C.length>0&&$||P.length>0&&z)&&p.slides.forEach((e,t)=>{p.grid.updateSlide(t,e,p.slides)}),g.watchSlidesProgress&&p.updateSlidesOffset(),s)if(C.length>0&&$){if(void 0===t){const e=p.slidesGrid[I],t=p.slidesGrid[I+k]-e;o?p.setTranslate(p.translate-t):(p.slideTo(I+Math.ceil(k),0,!1,!0),r&&(p.touchEventsData.startTranslate=p.touchEventsData.startTranslate-t,p.touchEventsData.currentTranslate=p.touchEventsData.currentTranslate-t))}else if(r){const e=M?C.length/g.grid.rows:C.length;p.slideTo(p.activeIndex+e,0,!1,!0),p.touchEventsData.currentTranslate=p.translate}}else if(P.length>0&&z)if(void 0===t){const e=p.slidesGrid[I],t=p.slidesGrid[I-O]-e;o?p.setTranslate(p.translate-t):(p.slideTo(I-O,0,!1,!0),r&&(p.touchEventsData.startTranslate=p.touchEventsData.startTranslate-t,p.touchEventsData.currentTranslate=p.touchEventsData.currentTranslate-t))}else{const e=M?P.length/g.grid.rows:P.length;p.slideTo(p.activeIndex-e,0,!1,!0)}p.allowSlidePrev=m,p.allowSlideNext=h;const G=p.controller?.control;if(G&&!l){const e={slideRealIndex:t,direction:i,setTranslate:r,activeSlideIndex:d,byController:!0};Array.isArray(G)?G.forEach(t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===g.slidesPerView&&s})}):G instanceof p.constructor&&G.params.loop&&G.loopFix({...e,slideTo:G.params.slidesPerView===g.slidesPerView&&s})}p.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:s}=e;if(!t.loop||!s||e.virtual&&e.params.virtual?.enabled)return;e.recalcSlides();const i=[];e.slides.forEach(e=>{const t=e,s=void 0===t.swiperSlideIndex?Number(e.getAttribute("data-swiper-slide-index")):t.swiperSlideIndex;i[s]=e}),e.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),i.forEach(e=>{s.append(e)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function F(e,t){return function(s={}){const i=Object.keys(s)[0],r=s[i];"object"==typeof r&&null!==r?(!0===e[i]&&(e[i]={enabled:!0}),"navigation"===i&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),i in e&&"enabled"in r?("object"!=typeof e[i]||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),n(t,s)):n(t,s)):n(t,s)}}var j={slideTo:function(e=0,t,s=!0,i,r){"string"==typeof e&&(e=parseInt(e,10));const a=this;let n=e;n<0&&(n=0);const{params:l,snapGrid:o,slidesGrid:d,previousIndex:c,activeIndex:p,rtlTranslate:u,wrapperEl:m,enabled:h}=a;if(!h&&!i&&!r||a.destroyed||a.animating&&l.preventInteractionOnTransition)return!1;void 0===t&&(t=a.params.speed);const f=Math.min(a.params.slidesPerGroupSkip,n);let g=f+Math.floor((n-f)/a.params.slidesPerGroup);g>=o.length&&(g=o.length-1);const v=-o[g];if(l.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*v),s=Math.floor(100*d[e]),i=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=s&&t<i-(i-s)/2?n=e:t>=s&&t<i&&(n=e+1):t>=s&&(n=e)}if(a.initialized&&n!==p){if(!a.allowSlideNext&&(u?v>a.translate&&v>a.minTranslate():v<a.translate&&v<a.minTranslate()))return!1;if(!a.allowSlidePrev&&v>a.translate&&v>a.maxTranslate()&&(p||0)!==n)return!1}let w;n!==(c||0)&&s&&a.emit("beforeSlideChangeStart"),a.updateProgress(v),w=n>p?"next":n<p?"prev":"reset";const b=a.virtual&&a.params.virtual?.enabled;if(!(b&&r)&&(u&&-v===a.translate||!u&&v===a.translate))return a.updateActiveIndex(n),l.autoHeight&&a.updateAutoHeight(),a.updateSlidesClasses(),"slide"!==l.effect&&a.setTranslate(v),"reset"!==w&&(a.transitionStart(s,w),a.transitionEnd(s,w)),!1;if(l.cssMode){const e=a.isHorizontal(),s=u?v:-v;return 0===t?(b&&(a.wrapperEl.style.scrollSnapType="none",a._immediateVirtual=!0),b&&!a._cssModeVirtualInitialSet&&(a.params.initialSlide??0)>0?(a._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{m[e?"scrollLeft":"scrollTop"]=s})):m[e?"scrollLeft":"scrollTop"]=s,b&&requestAnimationFrame(()=>{a.wrapperEl.style.scrollSnapType="",a._immediateVirtual=!1})):m.scrollTo({[e?"left":"top"]:s,behavior:"smooth"}),!0}const y=C().isSafari;return b&&!r&&y&&a.isElement&&a.virtual.update(!1,!1,n),a.setTransition(t),a.setTranslate(v),a.updateActiveIndex(n),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,i),a.transitionStart(s,w),0===t?a.transitionEnd(s,w):a.animating||(a.animating=!0,a.onSlideToWrapperTransitionEnd||(a.onSlideToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.wrapperEl.removeEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.onSlideToWrapperTransitionEnd=null,delete a.onSlideToWrapperTransitionEnd,a.transitionEnd(s,w))}),a.wrapperEl.addEventListener("transitionend",a.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e=0,t,s=!0,i){if("string"==typeof e){e=parseInt(e,10)}const r=this;if(r.destroyed)return;void 0===t&&(t=r.params.speed);const a=r.grid&&r.params.grid&&r.params.grid.rows>1;let n=e;if(r.params.loop)if(r.virtual&&r.params.virtual?.enabled)n+=r.virtual.slidesBefore??0;else{let e;if(a){const t=n*r.params.grid.rows,s=r.slides.find(e=>Number(e.getAttribute("data-swiper-slide-index"))===t);e=s?.column??0}else e=r.getSlideIndexByData(n);const t=a?Math.ceil(r.slides.length/r.params.grid.rows):r.slides.length,{centeredSlides:s,slidesOffsetBefore:l,slidesOffsetAfter:o}=r.params,d=s||!!l||!!o;let c;"auto"===r.params.slidesPerView?c=r.slidesPerViewDynamic():(c=Math.ceil(parseFloat(String(r.params.slidesPerView))),d&&c%2==0&&(c+=1));let p=t-e<c;if(d&&(p=p||e<Math.ceil(c/2)),i&&d&&"auto"!==r.params.slidesPerView&&!a&&(p=!1),p){const s=d?e<r.activeIndex?"prev":"next":e-r.activeIndex-1<r.params.slidesPerView?"next":"prev";r.loopFix({direction:s,slideTo:!0,activeSlideIndex:"next"===s?e+1:e-t+1,slideRealIndex:"next"===s?r.realIndex:void 0})}if(a){const e=n*r.params.grid.rows,t=r.slides.find(t=>Number(t.getAttribute("data-swiper-slide-index"))===e);n=t?.column??0}else n=r.getSlideIndexByData(n)}return requestAnimationFrame(()=>{r.slideTo(n,t,s,i)}),r},slideNext:function(e,t=!0,s){const i=this,{enabled:r,params:a,animating:n}=i;if(!r||i.destroyed)return i;void 0===e&&(e=i.params.speed);let l=a.slidesPerGroup;"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(l=Math.max(i.slidesPerViewDynamic("current",!0),1));const o=i.activeIndex<a.slidesPerGroupSkip?1:l,d=i.virtual&&a.virtual?.enabled;if(a.loop){if(n&&!d&&a.loopPreventsSliding)return!1;if(i.loopFix({direction:"next"}),i._clientLeft=i.wrapperEl.clientLeft,i.activeIndex===i.slides.length-1&&a.cssMode)return requestAnimationFrame(()=>{i.slideTo(i.activeIndex+o,e,t,s)}),!0}return a.rewind&&i.isEnd?i.slideTo(0,e,t,s):i.slideTo(i.activeIndex+o,e,t,s)},slidePrev:function(e,t=!0,s){const i=this,{params:r,snapGrid:a,slidesGrid:n,rtlTranslate:l,enabled:o,animating:d}=i;if(!o||i.destroyed)return i;void 0===e&&(e=i.params.speed);const c=i.virtual&&r.virtual?.enabled;if(r.loop){if(d&&!c&&r.loopPreventsSliding)return!1;i.loopFix({direction:"prev"}),i._clientLeft=i.wrapperEl.clientLeft}function p(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const u=p(l?i.translate:-i.translate),m=a.map(e=>p(e)),h=r.freeMode&&r.freeMode.enabled;let f=a[m.indexOf(u)-1];if(void 0===f&&(r.cssMode||h)){let e;a.forEach((t,s)=>{u>=t&&(e=s)}),void 0!==e&&(f=h?a[e]:a[e>0?e-1:e])}let g=0;if(void 0!==f&&(g=n.indexOf(f),g<0&&(g=i.activeIndex-1),"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(g=g-i.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),r.rewind&&i.isBeginning){const r=i.params.virtual?.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1;return i.slideTo(r,e,t,s)}return r.loop&&0===i.activeIndex&&r.cssMode?(requestAnimationFrame(()=>{i.slideTo(g,e,t,s)}),!0):i.slideTo(g,e,t,s)},slideReset:function(e,t=!0,s){const i=this;if(!i.destroyed)return void 0===e&&(e=i.params.speed),i.slideTo(i.activeIndex,e,t,s)},slideToClosest:function(e,t=!0,s,i=.5){const r=this;if(r.destroyed)return;void 0===e&&(e=r.params.speed);let a=r.activeIndex;const n=Math.min(r.params.slidesPerGroupSkip,a),l=n+Math.floor((a-n)/r.params.slidesPerGroup),o=r.rtlTranslate?r.translate:-r.translate;if(o>=r.snapGrid[l]){const e=r.snapGrid[l];o-e>(r.snapGrid[l+1]-e)*i&&(a+=r.params.slidesPerGroup)}else{const e=r.snapGrid[l-1];o-e<=(r.snapGrid[l]-e)*i&&(a-=r.params.slidesPerGroup)}return a=Math.max(a,0),a=Math.min(a,r.slidesGrid.length-1),r.slideTo(a,e,t,s)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:s,slidesEl:i,clickedSlide:r,clickedIndex:a}=e;if(void 0===r||void 0===a)return;const n="auto"===s.slidesPerView?e.slidesPerViewDynamic():s.slidesPerView;let l,o=e.getSlideIndexWhenGrid(a);const c=e.isElement?"swiper-slide":`.${s.slideClass}`,p=e.grid&&e.params.grid&&e.params.grid.rows>1;if(s.loop){if(e.animating)return;l=parseInt(r.getAttribute("data-swiper-slide-index"),10),s.centeredSlides?e.slideToLoop(l):o>(p?(e.slides.length-n)/2-(e.params.grid.rows-1):e.slides.length-n)?(e.loopFix(),o=e.getSlideIndex(d(i,`${c}[data-swiper-slide-index="${l}"]`)[0]),t(()=>{e.slideTo(o)})):e.slideTo(o)}else e.slideTo(o)}};function U({swiper:e,runCallbacks:t,direction:s,step:i}){const{activeIndex:r,previousIndex:a}=e;let n=s;n||(n=r>a?"next":r<a?"prev":"reset"),e.emit(`transition${i}`),t&&"reset"===n?e.emit(`slideResetTransition${i}`):t&&r!==a&&(e.emit(`slideChangeTransition${i}`),"next"===n?e.emit(`slideNextTransition${i}`):e.emit(`slidePrevTransition${i}`))}var K={getTranslate:function(e=(this.isHorizontal()?"x":"y")){const{params:t,rtlTranslate:s,translate:r,wrapperEl:a}=this;if(t.virtualTranslate)return s?-r:r;if(t.cssMode)return r;let n=i(a,e);return n+=this.cssOverflowAdjustment(),s&&(n=-n),n||0},setTranslate:function(e,t){const s=this,{rtlTranslate:i,params:r,wrapperEl:a,progress:n}=s;let l,o=0,d=0;s.isHorizontal()?o=i?-e:e:d=e,r.roundLengths&&(o=Math.floor(o),d=Math.floor(d)),s.previousTranslate=s.translate,s.translate=s.isHorizontal()?o:d,r.cssMode?a[s.isHorizontal()?"scrollLeft":"scrollTop"]=s.isHorizontal()?-o:-d:r.virtualTranslate||(s.isHorizontal()?o-=s.cssOverflowAdjustment():d-=s.cssOverflowAdjustment(),a.style.transform=`translate3d(${o}px, ${d}px, 0px)`);const c=s.maxTranslate()-s.minTranslate();l=0===c?0:(e-s.minTranslate())/c,l!==n&&s.updateProgress(e),s.emit("setTranslate",s.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,s=!0,i=!0,r){const a=this,{params:n,wrapperEl:l}=a;if(a.animating&&n.preventInteractionOnTransition)return!1;const o=a.minTranslate(),d=a.maxTranslate();let c;if(c=i&&e>o?o:i&&e<d?d:e,a.updateProgress(c),n.cssMode){const e=a.isHorizontal();return 0===t?l[e?"scrollLeft":"scrollTop"]=-c:l.scrollTo({[e?"left":"top"]:-c,behavior:"smooth"}),!0}return 0===t?(a.setTransition(0),a.setTranslate(c),s&&(a.emit("beforeTransitionStart",t,r),a.emit("transitionEnd"))):(a.setTransition(t),a.setTranslate(c),s&&(a.emit("beforeTransitionStart",t,r),a.emit("transitionStart")),a.animating||(a.animating=!0,a.onTranslateToWrapperTransitionEnd||(a.onTranslateToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.wrapperEl.removeEventListener("transitionend",a.onTranslateToWrapperTransitionEnd),a.onTranslateToWrapperTransitionEnd=null,delete a.onTranslateToWrapperTransitionEnd,a.animating=!1,s&&a.emit("transitionEnd"))}),a.wrapperEl.addEventListener("transitionend",a.onTranslateToWrapperTransitionEnd))),!0}};const Z=(e,t,s)=>{t&&!e.classList.contains(s)?e.classList.add(s):!t&&e.classList.contains(s)&&e.classList.remove(s)};const Q=(e,t,s)=>{t&&!e.classList.contains(s)?e.classList.add(s):!t&&e.classList.contains(s)&&e.classList.remove(s)};var J={updateSize:function(){const e=this;let t,s;const i=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:i.clientWidth,s=void 0!==e.params.height&&null!==e.params.height?e.params.height:i.clientHeight,0===t&&e.isHorizontal()||0===s&&e.isVertical()||(t=t-parseInt(m(i,"padding-left")||"0",10)-parseInt(m(i,"padding-right")||"0",10),s=s-parseInt(m(i,"padding-top")||"0",10)-parseInt(m(i,"padding-bottom")||"0",10),Number.isNaN(t)&&(t=0),Number.isNaN(s)&&(s=0),Object.assign(e,{width:t,height:s,size:e.isHorizontal()?t:s}))},updateSlides:function(){const e=this;function t(t,s){return parseFloat(t.getPropertyValue(e.getDirectionLabel(s))||"0")}const s=e.params,{wrapperEl:i,slidesEl:r,rtlTranslate:a,wrongRTL:n}=e,o=!(!e.virtual||!s.virtual?.enabled),c=o?e.virtual.slides.length:e.slides.length,p=d(r,`.${e.params.slideClass}, swiper-slide`),u=o?e.virtual.slides.length:p.length;let h=[];const f=[],g=[],w=t=>"function"==typeof t?t.call(e):t,b=w(s.slidesOffsetBefore),y=w(s.slidesOffsetAfter),E=e.snapGrid.length,S=e.slidesGrid.length,x=e.size-b-y;let T=s.spaceBetween,M=-b,C=0,P=0;if(void 0===x)return;"string"==typeof T&&T.indexOf("%")>=0?T=parseFloat(T.replace("%",""))/100*x:"string"==typeof T&&(T=parseFloat(T)),e.virtualSize=-T-b-y,p.forEach(e=>{a?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),s.centeredSlides&&s.cssMode&&(l(i,"--swiper-centered-offset-before",""),l(i,"--swiper-centered-offset-after","")),s.cssMode&&(l(i,"--swiper-slides-offset-before",`${b}px`),l(i,"--swiper-slides-offset-after",`${y}px`));const L=s.grid&&s.grid.rows>1&&e.grid;L?e.grid.initSlides(p):e.grid&&e.grid.unsetSlides();let A=0;const I="auto"===s.slidesPerView&&s.breakpoints&&Object.keys(s.breakpoints).filter(e=>{const t=s.breakpoints[e];return void 0!==t?.slidesPerView}).length>0;for(let i=0;i<u;i+=1){A=0;const r=p[i];if(!r||(L&&e.grid.updateSlide(i,r,p),"none"!==m(r,"display"))){if(o&&"auto"===s.slidesPerView)s.virtual?.slidesPerViewAutoSlideSize&&(A=s.virtual.slidesPerViewAutoSlideSize),A&&r&&(s.roundLengths&&(A=Math.floor(A)),r.style[e.getDirectionLabel("width")]=`${A}px`);else if("auto"===s.slidesPerView){I&&(r.style[e.getDirectionLabel("width")]="");const i=getComputedStyle(r),a=r.style.transform,n=r.style.webkitTransform;if(a&&(r.style.transform="none"),n&&(r.style.webkitTransform="none"),s.roundLengths)A=e.isHorizontal()?v(r,"width"):v(r,"height");else{const e=t(i,"width"),s=t(i,"padding-left"),a=t(i,"padding-right"),n=t(i,"margin-left"),l=t(i,"margin-right"),o=i.getPropertyValue("box-sizing");if(o&&"border-box"===o)A=e+n+l;else{const{clientWidth:t,offsetWidth:i}=r;A=e+s+a+n+l+(i-t)}}a&&(r.style.transform=a),n&&(r.style.webkitTransform=n),s.roundLengths&&(A=Math.floor(A))}else A=(x-(s.slidesPerView-1)*T)/s.slidesPerView,s.roundLengths&&(A=Math.floor(A)),r&&(r.style[e.getDirectionLabel("width")]=`${A}px`);r&&(r.swiperSlideSize=A),g.push(A),s.centeredSlides?(M=M+A/2+C/2+T,0===C&&0!==i&&(M=M-x/2-T),0===i&&(M=M-x/2-T),Math.abs(M)<.001&&(M=0),s.roundLengths&&(M=Math.floor(M)),P%s.slidesPerGroup===0&&h.push(M),f.push(M)):(s.roundLengths&&(M=Math.floor(M)),(P-Math.min(e.params.slidesPerGroupSkip,P))%e.params.slidesPerGroup===0&&h.push(M),f.push(M),M=M+A+T),e.virtualSize+=A+T,C=A,P+=1}}if(e.virtualSize=Math.max(e.virtualSize,x)+y,a&&n&&("slide"===s.effect||"coverflow"===s.effect)&&(i.style.width=`${e.virtualSize+T}px`),s.setWrapperSize&&(i.style[e.getDirectionLabel("width")]=`${e.virtualSize+T}px`),L&&e.grid.updateWrapperSize(A,h),!s.centeredSlides){const t="auto"!==s.slidesPerView&&s.slidesPerView%1!=0,i=s.snapToSlideEdge&&!s.loop&&("auto"===s.slidesPerView||t);let r=h.length;if(i){let e;if("auto"===s.slidesPerView){e=1;let t=0;for(let s=g.length-1;s>=0&&(t+=g[s]+(s<g.length-1?T:0),t<=x);s-=1)e=g.length-s}else e=Math.floor(s.slidesPerView);r=Math.max(u-e,0)}const a=[];for(let t=0;t<h.length;t+=1){let n=h[t];s.roundLengths&&(n=Math.floor(n)),i?t<=r&&a.push(n):h[t]<=e.virtualSize-x&&a.push(n)}h=a,Math.floor(e.virtualSize-x)-Math.floor(h[h.length-1])>1&&(i||h.push(e.virtualSize-x))}if(o&&s.loop){const t=g[0]+T,i=(e.virtual.slidesBefore??0)+(e.virtual.slidesAfter??0);if(s.slidesPerGroup>1){const e=Math.ceil(i/s.slidesPerGroup),r=t*s.slidesPerGroup;for(let t=0;t<e;t+=1)h.push(h[h.length-1]+r)}for(let r=0;r<i;r+=1)1===s.slidesPerGroup&&h.push(h[h.length-1]+t),f.push(f[f.length-1]+t),e.virtualSize+=t}if(0===h.length&&(h=[0]),0!==T){const t=e.isHorizontal()&&a?"marginLeft":e.getDirectionLabel("marginRight");p.filter((e,t)=>!(s.cssMode&&!s.loop)||t!==p.length-1).forEach(e=>{e.style[t]=`${T}px`})}if(s.centeredSlides&&s.centeredSlidesBounds){let e=0;g.forEach(t=>{e+=t+(T||0)}),e-=T;const t=e>x?e-x:0;h=h.map(e=>e<=0?-b:e>t?t+y:e)}if(s.centerInsufficientSlides){let e=0;if(g.forEach(t=>{e+=t+(T||0)}),e-=T,e<x){const t=(x-e)/2;h.forEach((e,s)=>{h[s]=e-t}),f.forEach((e,s)=>{f[s]=e+t})}}if(Object.assign(e,{slides:p,snapGrid:h,slidesGrid:f,slidesSizesGrid:g}),s.centeredSlides&&s.cssMode&&!s.centeredSlidesBounds){l(i,"--swiper-centered-offset-before",-h[0]+"px"),l(i,"--swiper-centered-offset-after",e.size/2-g[g.length-1]/2+"px");const t=-e.snapGrid[0],s=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+t),e.slidesGrid=e.slidesGrid.map(e=>e+s)}if(u!==c&&e.emit("slidesLengthChange"),h.length!==E&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),f.length!==S&&e.emit("slidesGridLengthChange"),s.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(o||s.cssMode||"slide"!==s.effect&&"fade"!==s.effect)){const t=`${s.containerModifierClass}backface-hidden`,i=e.el.classList.contains(t);u<=s.maxBackfaceHiddenSlides?i||e.el.classList.add(t):i&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,s=[],i=t.virtual&&t.params.virtual?.enabled;let r,a=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const n=e=>i?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(e=>{s.push(e)});else for(r=0;r<Math.ceil(t.params.slidesPerView);r+=1){const e=t.activeIndex+r;if(e>t.slides.length&&!i)break;const a=n(e);a&&s.push(a)}else{const e=n(t.activeIndex);e&&s.push(e)}for(r=0;r<s.length;r+=1)if(void 0!==s[r]){const e=s[r].offsetHeight;a=e>a?e:a}(a||0===a)&&(t.wrapperEl.style.height=`${a}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,s=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let i=0;i<t.length;i+=1)t[i].swiperSlideOffset=(e.isHorizontal()?t[i].offsetLeft:t[i].offsetTop)-s-e.cssOverflowAdjustment()},updateSlidesProgress:function(e=this&&this.translate||0){const t=this,s=t.params,{slides:i,rtlTranslate:r,snapGrid:a}=t;if(0===i.length)return;void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();let n=-e;r&&(n=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let l=s.spaceBetween;"string"==typeof l&&l.indexOf("%")>=0?l=parseFloat(l.replace("%",""))/100*t.size:"string"==typeof l&&(l=parseFloat(l));for(let e=0;e<i.length;e+=1){const o=i[e];let d=o.swiperSlideOffset??0;s.cssMode&&s.centeredSlides&&(d-=i[0].swiperSlideOffset??0);const c=o.swiperSlideSize??0,p=(n+(s.centeredSlides?t.minTranslate():0)-d)/(c+l),u=(n-a[0]+(s.centeredSlides?t.minTranslate():0)-d)/(c+l),m=-(n-d),h=m+t.slidesSizesGrid[e],f=m>=0&&m<=t.size-t.slidesSizesGrid[e],g=m>=0&&m<t.size-1||h>1&&h<=t.size||m<=0&&h>=t.size;g&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(e)),Q(o,g,s.slideVisibleClass),Q(o,f,s.slideFullyVisibleClass),o.progress=r?-p:p,o.originalProgress=r?-u:u}},updateProgress:function(e){const t=this;if(void 0===e){const s=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*s||0}const s=t.params,i=t.maxTranslate()-t.minTranslate();let{progress:r,isBeginning:a,isEnd:n}=t,l=t.progressLoop;const o=a,d=n;if(0===i)r=0,a=!0,n=!0;else{r=(e-t.minTranslate())/i;const s=Math.abs(e-t.minTranslate())<1,