"use strict";jQuery((function($){$(".carousel-wrap").each((function(){const carousel=$(this),unique="sid-"+Math.random().toString(36).substr(2,9),uniqueId="#"+unique+".carousel-wrap";$(carousel).attr("id",unique);let slideByTablet=1,autoplay=!1,childCount=$(".item",carousel).length,number_items=1,number_items_tablet=1,number_items_desktop=4,timeout=1e4,data_slideby=0,slideByDesktop=1,slideByItems=1,dots=!1;carousel.attr("data-col")&&(number_items_desktop=parseInt(carousel.attr("data-col"))),12==number_items_desktop?(number_items_tablet=3,number_items=6):6==number_items_desktop?(number_items=3,number_items_tablet=3):number_items=number_items_desktop>4?4:number_items_desktop,6>number_items_desktop&&number_items_desktop>1&&(number_items_tablet=2),carousel.attr("data-tablet")&&(number_items_tablet=carousel.attr("data-tablet")),carousel.attr("data-slideby")&&(data_slideby=parseInt(carousel.attr("data-slideby"))),slideByDesktop=number_items_desktop>childCount/2?1:0!=data_slideby&&data_slideby<=number_items_desktop?data_slideby:number_items_desktop,slideByItems=number_items>childCount/2?1:0!=data_slideby&&data_slideby<=number_items?data_slideby:number_items,slideByTablet=number_items_tablet>childCount/2?1:0!=data_slideby&&data_slideby<=number_items_tablet?data_slideby:number_items_tablet,carousel.attr("data-autoplay")&&(1!=carousel.attr("data-autoplay")&&"true"!=carousel.attr("data-autoplay")||(autoplay=!0)),carousel.attr("data-dots")&&(1!=carousel.attr("data-dots")&&"true"!=carousel.attr("data-dots")||(dots=!0)),carousel.attr("data-autoplaytimeout")&&(timeout=carousel.attr("data-autoplaytimeout"));let slider=tns({mode:"carousel",animateOut:"tns-fadeOut",startIndex:0,container:uniqueId,controls:!1,items:number_items,slideBy:1,gutter:0,autoplayHoverPause:!0,autoplay:autoplay,autoplayTimeout:timeout,nav:dots,arrowKeys:!0,autoplayButtonOutput:!1,speed:600,mouseDrag:!0,loop:!0,navPosition:"bottom",responsive:{0:{items:1,nav:dots,slideBy:1},600:{items:number_items_tablet,nav:dots,slideBy:slideByTablet},992:{items:number_items,nav:dots,slideBy:slideByItems},1200:{items:number_items_desktop,nav:dots,slideBy:slideByDesktop}}}),widget=$(carousel).closest(".widget");widget.on("mouseover",(function(){slider.pause()})),widget.on("mouseout",(function(){slider.play()})),$(".owlprev",widget).on("click",(function(){slider.goTo("prev")})),$(".owlnext",widget).on("click",(function(){slider.goTo("next")})),$(".nav-tabs",widget).length&&$(".nav-tabs .owl-nav-link",widget).each((function(){$(this).on("click",(function(){var tnsindex=$(this).data("tnsindex");slider.goTo(+tnsindex),console.log($(this).data("tnsindex"))}))})),$(".carousel-navigation.nav-tabs > li > a").on("click",(function(){var advCarouselTab=$(this).parent("li");advCarouselTab.addClass("active"),advCarouselTab.siblings().removeClass("active")})),slider.events.on("indexChanged",(function(event){var urlHash=window.location.hash;if(""!=urlHash){var dataSearchQuery=urlHash.replace("#",""),navTab=$(".carousel-navigation a[data-navid="+dataSearchQuery+"]").parent("li");navTab.addClass("active"),navTab.siblings().removeClass("active"),history.replaceState(null,null," ")}}));var urlHash=window.location.hash;if(""!=urlHash){var dataSearchQuery=urlHash.replace("#","");$(".carousel-navigation a[data-navid="+dataSearchQuery+"]",widget).length&&$(".carousel-navigation a[data-navid="+dataSearchQuery+"]",widget).click()}}))}));