"use strict";(()=>{(self.webpackChunkFalcon_theme=self.webpackChunkFalcon_theme||[]).push([[806],{4806:(_,y,f)=>{f.r(y),f.d(y,{default:()=>E});var c=f(9482);function E({swiper:e,extendParams:S,emit:r,once:x}){S({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}});function B(){const l=e.getTranslate();e.setTranslate(l),e.setTransition(0),e.touchEventsData.velocities.length=0,e.freeMode.onTouchEnd({currentPos:e.rtl?e.translate:-e.translate})}function b(){const{touchEventsData:l,touches:t}=e;l.velocities.length===0&&l.velocities.push({position:t[e.isHorizontal()?"startX":"startY"],time:l.touchStartTime}),l.velocities.push({position:t[e.isHorizontal()?"currentX":"currentY"],time:(0,c.zO)()})}function D({currentPos:l}){const{params:t,wrapperEl:M,rtlTranslate:T,snapGrid:i,touchEventsData:m}=e,k=(0,c.zO)()-m.touchStartTime;if(l<-e.minTranslate()){e.slideTo(e.activeIndex);return}if(l>-e.maxTranslate()){e.slides.length<i.length?e.slideTo(i.length-1):e.slideTo(e.slides.length-1);return}if(t.freeMode.momentum){if(m.velocities.length>1){const n=m.velocities.pop(),a=m.velocities.pop(),P=n.position-a.position,g=n.time-a.time;e.velocity=P/g,e.velocity/=2,Math.abs(e.velocity)<t.freeMode.minimumVelocity&&(e.velocity=0),(g>150||(0,c.zO)()-n.time>300)&&(e.velocity=0)}else e.velocity=0;e.velocity*=t.freeMode.momentumVelocityRatio,m.velocities.length=0;let u=1e3*t.freeMode.momentumRatio;const R=e.velocity*u;let o=e.translate+R;T&&(o=-o);let h=!1,s;const d=Math.abs(e.velocity)*20*t.freeMode.momentumBounceRatio;let v;if(o<e.maxTranslate())t.freeMode.momentumBounce?(o+e.maxTranslate()<-d&&(o=e.maxTranslate()-d),s=e.maxTranslate(),h=!0,m.allowMomentumBounce=!0):o=e.maxTranslate(),t.loop&&t.centeredSlides&&(v=!0);else if(o>e.minTranslate())t.freeMode.momentumBounce?(o-e.minTranslate()>d&&(o=e.minTranslate()+d),s=e.minTranslate(),h=!0,m.allowMomentumBounce=!0):o=e.minTranslate(),t.loop&&t.centeredSlides&&(v=!0);else if(t.freeMode.sticky){let n;for(let a=0;a<i.length;a+=1)if(i[a]>-o){n=a;break}Math.abs(i[n]-o)<Math.abs(i[n-1]-o)||e.swipeDirection==="next"?o=i[n]:o=i[n-1],o=-o}if(v&&x("transitionEnd",()=>{e.loopFix()}),e.velocity!==0){if(T?u=Math.abs((-o-e.translate)/e.velocity):u=Math.abs((o-e.translate)/e.velocity),t.freeMode.sticky){const n=Math.abs((T?-o:o)-e.translate),a=e.slidesSizesGrid[e.activeIndex];n<a?u=t.speed:n<2*a?u=t.speed*1.5:u=t.speed*2.5}}else if(t.freeMode.sticky){e.slideToClosest();return}t.freeMode.momentumBounce&&h?(e.updateProgress(s),e.setTransition(u),e.setTranslate(o),e.transitionStart(!0,e.swipeDirection),e.animating=!0,(0,c.yV)(M,()=>{!e||e.destroyed||!m.allowMomentumBounce||(r("momentumBounce"),e.setTransition(t.speed),setTimeout(()=>{e.setTranslate(s),(0,c.yV)(M,()=>{!e||e.destroyed||e.transitionEnd()})},0))})):e.velocity?(r("_freeModeNoMomentumRelease"),e.updateProgress(o),e.setTransition(u),e.setTranslate(o),e.transitionStart(!0,e.swipeDirection),e.animating||(e.animating=!0,(0,c.yV)(M,()=>{!e||e.destroyed||e.transitionEnd()}))):e.updateProgress(o),e.updateActiveIndex(),e.updateSlidesClasses()}else if(t.freeMode.sticky){e.slideToClosest();return}else t.freeMode&&r("_freeModeNoMomentumRelease");(!t.freeMode.momentum||k>=t.longSwipesMs)&&(e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses())}Object.assign(e,{freeMode:{onTouchStart:B,onTouchMove:b,onTouchEnd:D}})}}}]);})();
