"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,e):void 0}}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i1&&void 0!==arguments[1]?arguments[1]:{},i=new s(e);const n="rtl"===window.getComputedStyle(t).direction;var r=document.createElement("div");r.className="slider-track",r.style.cssText="\n display: flex;\n gap: ".concat(i.gap,"px;\n will-change: transform;\n align-items: stretch;\n transition: none;\n ");var o=Array.from(t.children);t.innerHTML="",t.style.overflow="hidden",t.appendChild(r);for(var a=Math.max(2*i._getResponsiveSlideCount(t.offsetWidth)+2,6),l=[].concat(o);l.length0;)l=[].concat(_toConsumableArray(l),_toConsumableArray(o.map(function(t){return t.cloneNode(!0)})));var u=l.length;l.forEach(function(t){t.className=(t.className||"")+" grp-slider-slide",t.style.setProperty("transition","none","important"),n&&t.style.setProperty("direction","rtl"),r.appendChild(t)}),i.init(u,t.offsetWidth);var c=function(){var t=i.slideWidth;Array.from(r.children).forEach(function(e){e.style.flex="0 0 ".concat(t,"px"),e.style.minWidth="0"})};c(),i.on("scroll",function(t){var e=t.scrollX,i=t.offsets;r.style.transform="translateX(".concat(-e,"px)"),Array.from(r.children).forEach(function(t,e){t.style.transform="translateX(".concat(i[e]||0,"px)")})}),i.on("resize",function(){c()});var d=function(t){var e=void 0!==t.pageX?t.pageX:t.touches&&t.touches[0]?t.touches[0].pageX:0;i.startDrag(e),r.style.cursor="grabbing"},h=function(t){if(i._isPointerDown){var e=void 0!==t.pageX?t.pageX:t.touches&&t.touches[0]?t.touches[0].pageX:0;i.moveDrag(e)}},f=function(){i.endDrag(),r.style.cursor="grab"};r.addEventListener("mousedown",d),r.addEventListener("touchstart",d,{passive:!0}),window.addEventListener("mousemove",h),window.addEventListener("touchmove",h,{passive:!0}),window.addEventListener("mouseup",f),window.addEventListener("touchend",f),t.addEventListener("mouseenter",function(){return i.pause()}),t.addEventListener("mouseleave",function(){return i.resume()});var p=new ResizeObserver(function(){i.resize(t.offsetWidth)});return p.observe(t),i.start(),{core:i,pause:function(){return i.pause()},resume:function(){return i.resume()},setSpeed:function(t){return i.setSpeed(t)},destroy:function(){i.destroy(),p.disconnect(),window.removeEventListener("mousemove",h),window.removeEventListener("touchmove",h),window.removeEventListener("mouseup",f),window.removeEventListener("touchend",f)}}}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=new r(e);const n="rtl"===window.getComputedStyle(t).direction;var s=document.createElement("div");s.className="slider-wrapper";var o=document.createElement("div");o.className="slider-track",o.style.cssText=`\n direction: ltr;\n display: flex;\n gap: ${i.gap}px;\n align-items: ${e.fixedCardHeight?"stretch":"start"};\n will-change: transform;\n `,o.style.transitionProperty="transform",o.style.transitionDuration="0.4s",o.style.transitionTimingFunction="ease",t.style.transitionProperty="height",t.style.transitionDuration="0.4s",t.style.transitionTimingFunction="ease";var a=Array.from(t.children);t.innerHTML="",t.style.overflow="hidden",s.appendChild(o),t.appendChild(s),a.forEach(function(t){t.className=(t.className||"")+" grp-slider-slide",t.style.setProperty("transition","none","important"),n&&t.style.setProperty("direction","rtl"),o.appendChild(t)}),i.init(a.length,t.offsetWidth);var l=function(){var t=i.slideWidth;Array.from(o.children).forEach(function(e){e.style.flex="0 0 ".concat(t,"px"),e.style.minWidth="0"})};l();var u=function(){var e=a.length;if(o&&i&&0!==e){for(var n=i._getRealIndex(i.currentIndex),r=i.visibleSlides,s=0,l=o.children,u=0;u0&&(t.style.height="".concat(s,"px"))}};u(),i.on("slideChange",function(e){var i=e.translate,n=e.offsets,r=e.instant,s=r?"0s":"0.4s";o.style.transitionDuration=s,t.style.transitionDuration=s,o.style.transform="translateX(".concat(i,"px)"),a.forEach(function(t,e){t.style.transform="translateX(".concat(n[e]||0,"px)")}),S(),b(),u()}),i.on("resize",function(){l(),b(),u()});var c=i.getTranslate(),d=!1,h=!1,f=function(t){var e=t.target;if(!e.closest("button, a, [data-clickable], .read-more-btn, .read-less-btn, .review-image, [onclick]")){var n=t.touches?t.touches[0].clientX:t.clientX;i.startDrag(n),d=!1,h=!1}},p=function(e){if(i._isPointerDown){var n=e.touches?e.touches[0].clientX:e.clientX,r=i.moveDrag(n);if(null!==r){h||(h=!0,o.style.transitionDuration="0s",t.style.transitionDuration="0s"),c=r,o.style.transform="translateX(".concat(c,"px)"),u();var s=i.getSlideOffsets(c);a.forEach(function(t,e){t.style.transform="translateX(".concat(s[e]||0,"px)")}),e.cancelable&&e.preventDefault()}}},v=function(){i._isPointerDown&&(i.isDragging?(d=!0,i.endDrag(c)):i._isPointerDown=!1,h=!1)},y=function(t){d&&(t.stopPropagation(),t.preventDefault(),d=!1)};o.addEventListener("mousedown",f),o.addEventListener("touchstart",f,{passive:!0}),window.addEventListener("mousemove",p),window.addEventListener("touchmove",p,{passive:!1}),window.addEventListener("mouseup",v),window.addEventListener("touchend",v),o.addEventListener("click",y,!0),s.addEventListener("mouseenter",function(){return i.pause()}),s.addEventListener("mouseleave",function(){return i.resume()});var g=new ResizeObserver(function(){i.resize(t.offsetWidth)});g.observe(t);var _=new ResizeObserver(function(){u()});a.forEach(function(t){_.observe(t)});var m=function(t){var e=i.totalSlides,n=(i.currentIndex%e+e)%e,r=t-n;r>e/2&&(r-=e),r<-e/2&&(r+=e),i.goToIndex(i.currentIndex+r)},S=function(){var t=i.getPagination(),n=[];e.paginationClass&&n.push.apply(n,_toConsumableArray(Array.from(document.querySelectorAll(".".concat(e.paginationClass))))),n.forEach(function(e){var i=e.querySelector(".grp-slider-pagination-wrapper");for(i||(i=document.createElement("div"),i.className="grp-slider-pagination-wrapper slider-pagination",i.style.cssText="\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 10px;\n height: 24px;\n ",e.appendChild(i)),t.dots.forEach(function(t,e){var n=i.children[e];n||(n=document.createElement("button"),n.ariaLabel="Go to slide "+(t.index+1),n.style.cssText="\n border-radius: 50%;\n border: none;\n transition: all 0.3s ease;\n cursor: pointer;\n padding: 0;\n opacity: 0.8;\n ",n.onmouseenter=function(){n.style.opacity="1"},n.onmouseleave=function(){n.style.opacity="0.8"},n.onclick=function(e){e.preventDefault(),m(t.index)},i.appendChild(n));var r=0,s="#ccc",o="none",a=t.distance;t.active?(r=7,s="#444",o="inline-block"):1===a?(r=5,s="#bbb",o="inline-block"):2===a&&(r=3,s="#bbb",o="inline-block"),n.style.width="".concat(r,"px"),n.style.height="".concat(r,"px"),n.style.background=s,n.style.display=o});i.children.length>t.dots.length;)i.removeChild(i.lastChild)})},b=function(){var t=i.canNavigate(),n=t?"":"none";e.prevClass&&document.querySelectorAll(".".concat(e.prevClass)).forEach(function(t){t.style.display=n}),e.nextClass&&document.querySelectorAll(".".concat(e.nextClass)).forEach(function(t){t.style.display=n})},w=function(){return i.prev()},x=function(){return i.next()},P=function(t){var i=t.target.closest(".".concat(e.prevClass)),n=t.target.closest(".".concat(e.nextClass));i?(t.preventDefault(),w()):n&&(t.preventDefault(),x())};return(e.prevClass||e.nextClass)&&document.addEventListener("click",P),e.autoplay&&i.startAutoplay(),o.style.transform="translateX(".concat(i.getTranslate(),"px)"),S(),b(),{core:i,next:x,prev:w,goToIndex:function(t){return i.goToIndex(t)},getPagination:function(){return i.getPagination()},destroy:function(){i.destroy(),g.disconnect(),_.disconnect(),(e.prevClass||e.nextClass)&&document.removeEventListener("click",P)}}}var n=function(){function t(){_classCallCheck(this,t),this._events={}}return _createClass(t,[{key:"on",value:function(t,e){var i=this;return this._events[t]||(this._events[t]=[]),this._events[t].push(e),function(){return i.off(t,e)}}},{key:"off",value:function(t,e){this._events[t]&&(this._events[t]=this._events[t].filter(function(t){return t!==e}))}},{key:"emit",value:function(t,e){this._events[t]&&this._events[t].forEach(function(t){return t(e)})}},{key:"once",value:function(t,e){var i=this,n=function(r){e(r),i.off(t,n)};this.on(t,n)}},{key:"destroy",value:function(){this._events={}}}])}(),r=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,e),t=_callSuper(this,e),t.gap=i.gap||16,t.slidesPerView=i.slidesPerView||null,t.loop=!1!==i.loop,t.autoplay=i.autoplay||!1,t.autoplayDelay=i.autoplayDelay||3e3,t.fixedCardHeight=i.fixedCardHeight||!1,t.direction=i.direction||"right_to_left",t.dragThreshold=i.dragThreshold||5,t.totalSlides=0,t.visibleSlides=1,t.containerWidth=0,t.currentIndex=0,t.slideWidth=0,t.isTransitioning=!1,t.isDragging=!1,t.isPaused=!1,t.isDestroyed=!1,t._dragStartX=0,t._dragPrevTranslate=0,t._isPointerDown=!1,t._autoplayRAF=null,t._lastSlideTime=0,t}return _inherits(e,t),_createClass(e,[{key:"init",value:function(t,e){this.totalSlides=t,this.containerWidth=e,this.loop=this.loop&&t>1,this.visibleSlides=this._getResponsiveSlideCount(e),this.slideWidth=this._calculateSlideWidth(e),this.currentIndex=this.currentIndex||0,this.emit("slideChange",this._getSlideChangeData())}},{key:"goToIndex",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.isTransitioning&&!i||this.canNavigate()&&(this.loop||(t=Math.max(0,Math.min(t,this.totalSlides-this.visibleSlides))),this.isTransitioning=!i,this.currentIndex=t,this.emit("transitionStart",{instant:i}),this.emit("slideChange",this._getSlideChangeData(i)),i||setTimeout(function(){return e._handleTransitionEnd()},400))}},{key:"_handleTransitionEnd",value:function(){if(this.isTransitioning=!1,this.loop){var t=(this.currentIndex%this.totalSlides+this.totalSlides)%this.totalSlides;t!==this.currentIndex&&(this.currentIndex=t,this.emit("slideChange",this._getSlideChangeData(!0)))}this.emit("transitionEnd")}},{key:"next",value:function(){var t="left_to_right"===this.direction?-1:1;this.goToIndex(this.currentIndex+t)}},{key:"prev",value:function(){var t="left_to_right"===this.direction?1:-1;this.goToIndex(this.currentIndex+t)}},{key:"startAutoplay",value:function(){var t=this;if(this.autoplay&&!this.isDestroyed){this.stopAutoplay(),this._lastSlideTime=performance.now();var e=function(i){!t.isDestroyed&&t.autoplay&&(t.isPaused||i-t._lastSlideTime>=t.autoplayDelay&&(t._lastSlideTime=i,t.next()),t._autoplayRAF=requestAnimationFrame(e))};this._autoplayRAF=requestAnimationFrame(e)}}},{key:"stopAutoplay",value:function(){this._autoplayRAF&&(cancelAnimationFrame(this._autoplayRAF),this._autoplayRAF=null)}},{key:"pause",value:function(){this.isPaused=!0}},{key:"resume",value:function(){this.isPaused=!1}},{key:"startDrag",value:function(t){this._isPointerDown=!0,this.isDragging=!1,this.isTransitioning=!1,this._dragStartX=t,this._dragPrevTranslate=-this.currentIndex*(this.slideWidth+this.gap)}},{key:"moveDrag",value:function(t){if(!this._isPointerDown)return null;var e=t-this._dragStartX;if(!this.isDragging){if(!(Math.abs(e)>this.dragThreshold))return null;this.isDragging=!0,this.emit("dragStart")}return this._dragPrevTranslate+e}},{key:"endDrag",value:function(t){if(this._isPointerDown=!1,!this.isDragging)return;if(this.isDragging=!1,!this.canNavigate())return this.currentIndex=0,void this.emit("slideChange",this._getSlideChangeData(!1));const e=this.slideWidth+this.gap,i=t-this._dragPrevTranslate,n=.2*e;let r=this.currentIndex;i<-n?r=this.currentIndex+1:i>n&&(r=this.currentIndex-1),this.goToIndex(r)}},{key:"resize",value:function(t){if(this.containerWidth=t,this.visibleSlides=this._getResponsiveSlideCount(t),this.slideWidth=this._calculateSlideWidth(t),!this.loop){var e=Math.max(0,this.totalSlides-this.visibleSlides);this.currentIndex>e&&(this.currentIndex=e)}this.canNavigate()||(this.currentIndex=0),this.emit("resize",{visibleSlides:this.visibleSlides,slideWidth:this.slideWidth}),this.emit("slideChange",this._getSlideChangeData(!0))}},{key:"canNavigate",value:function(){return this.totalSlides>this.visibleSlides}},{key:"getTranslate",value:function(){return-this.currentIndex*(this.slideWidth+this.gap)}},{key:"getSlideOffsets",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!this.totalSlides)return[];if(!this.canNavigate())return new Array(this.totalSlides).fill(0);for(var e=[],i=this.slideWidth+this.gap,n=this.totalSlides*i,r=null!==t?-t:this.currentIndex*i,s=r+this.containerWidth/2,o=0;o0&&void 0!==arguments[0]&&arguments[0];return{index:this.currentIndex,realIndex:this._getRealIndex(this.currentIndex),translate:this.getTranslate(),offsets:this.getSlideOffsets(),instant:t}}},{key:"_getResponsiveSlideCount",value:function(t){return 1===this.slidesPerView?1:2===this.slidesPerView?t<500?1:2:t<550?1:t<850?2:t<1060?3:4}},{key:"_calculateSlideWidth",value:function(t){return(t-this.gap*(this.visibleSlides-1))/this.visibleSlides}}])}(n),s=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,e),t=_callSuper(this,e),t.speed=i.speed||1,t.direction=i.direction||"right_to_left",t.gap=i.gap||16,t.slidesPerView=i.slidesPerView||null,t.scrollX=0,t.totalSlides=0,t.visibleSlides=1,t.slideWidth=0,t.isPaused=!1,t.isDragging=!1,t.isDestroyed=!1,t.dragThreshold=i.dragThreshold||5,t._isPointerDown=!1,t._dragStartX=0,t._dragStartScroll=0,t._rafId=null,t}return _inherits(e,t),_createClass(e,[{key:"init",value:function(t,e){this.totalSlides=t;var i=this._getResponsiveSlideCount(e);this.visibleSlides=Math.min(i,t),this.slideWidth=this._calculateSlideWidth(e),this.scrollX=this.scrollX||0}},{key:"start",value:function(){var t=this;if(!this.isDestroyed){var e=function(){t.isDestroyed||(t.isPaused||t.isDragging||("left_to_right"===t.direction?t.scrollX-=t.speed:t.scrollX+=t.speed,t._wrapScroll(),t.emit("scroll",t._getScrollData())),t._rafId=requestAnimationFrame(e))};this._rafId=requestAnimationFrame(e)}}},{key:"_wrapScroll",value:function(){if(this.totalSlides){var t=this.totalSlides*(this.slideWidth+this.gap);this.scrollX<0&&(this.scrollX+=t),this.scrollX>=t&&(this.scrollX-=t)}}},{key:"pause",value:function(){this.isPaused=!0,this.emit("pause")}},{key:"resume",value:function(){this.isPaused=!1,this.emit("resume")}},{key:"startDrag",value:function(t){this._isPointerDown=!0,this.isDragging=!1,this._dragStartX=t,this._dragStartScroll=this.scrollX}},{key:"moveDrag",value:function(t){if(this._isPointerDown){var e=t-this._dragStartX;if(!this.isDragging){if(!(Math.abs(e)>this.dragThreshold))return;this.isDragging=!0,this.emit("dragStart")}this.scrollX=this._dragStartScroll-e,this.emit("scroll",this._getScrollData())}}},{key:"endDrag",value:function(){this._isPointerDown=!1,this.isDragging=!1,this.emit("scroll",this._getScrollData())}},{key:"resize",value:function(t){var e=this.slideWidth,i=this._getResponsiveSlideCount(t);if(this.visibleSlides=Math.min(i,this.totalSlides),this.slideWidth=this._calculateSlideWidth(t),e>0){var n=this.scrollX/(e+this.gap);this.scrollX=n*(this.slideWidth+this.gap)}this.emit("resize",{visibleSlides:this.visibleSlides,slideWidth:this.slideWidth}),this.emit("scroll",this._getScrollData())}},{key:"getSlideOffsets",value:function(){if(!this.totalSlides)return[];for(var t=[],e=this.slideWidth+this.gap,i=this.totalSlides*e,n=this.scrollX,r=2,s=0;s