"use strict";!function(e){gsap.registerPlugin(ScrollTrigger,DrawSVGPlugin);var t=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/),i=function(){new Swiper(".hero .swiper-container",{speed:600,autoplay:{delay:5e3,disableOnInteraction:!1},loop:!0,navigation:{nextEl:".hero .swiper-btn-next",prevEl:".hero .swiper-btn-prev"}}),new Swiper(".home-news .swiper-container",{slidesPerView:"auto",spaceBetween:20,speed:600,navigation:{nextEl:".home-news .swiper-btn-next",prevEl:".home-news .swiper-btn-prev"},breakpoints:{768:{spaceBetween:30},1024:{spaceBetween:40},1280:{spaceBetween:50}}}),new Swiper(".product-gallery .swiper-container",{speed:600,autoHeight:!0,navigation:{nextEl:".product-gallery .swiper-btn-next",prevEl:".product-gallery .swiper-btn-prev"}})},n=function(){AOS.init({duration:1e3,once:!0})},o=function(){function t(){e(window).scrollTop()>0?e(".site-header").addClass("is-active"):e(".site-header").removeClass("is-active")}t(),e(window).on("scroll",t)},a=function(){e(".site-nav__item--dropdown").on("mouseenter",function(){e(".site-header").addClass("is-menu")}),e(".site-nav__item--dropdown").on("mouseleave",function(){e(".site-header").removeClass("is-menu")})},s=function(){e(".site-header__burger").on("click",function(){e(this).toggleClass("is-active"),e("body").toggleClass("overflow-hidden"),e(".site-header").toggleClass("is-menu"),e(".site-mobile-nav").toggleClass("is-active")}),e(".site-mobile-nav__link").on("click",function(){e(this).toggleClass("is-active"),e(this).siblings().slideToggle()})},r=function(){e(".site-header__lang").on("click",function(t){t.stopPropagation(),e(".site-header__lang-menu").toggleClass("is-active")}),e(window).on("click",function(){e(".site-header__lang-menu").removeClass("is-active")})},c=function(){var t=e(".site-header").outerHeight();e(".scroll-btn").on("click",function(){e("html, body").animate({scrollTop:window.innerHeight-t},600)})},l=function(){function t(){e(".switch-tab").removeClass("text-primary"),e(".switch-tab").removeClass("border-primary"),e(".switch-tab").addClass("text-gray-500"),e(".switch-tab").addClass("border-transparent"),e(".switch-tab").eq(n).removeClass("text-gray-500"),e(".switch-tab").eq(n).removeClass("border-transparent"),e(".switch-tab").eq(n).addClass("text-primary"),e(".switch-tab").eq(n).addClass("border-primary"),e(".switch-content").hide(),e(".switch-content").eq(n).fadeIn()}function i(){e(".switch-label").removeClass("is-active"),e(".switch-label").eq(n).addClass("is-active"),e(".switch-content").hide(),e(".switch-content").eq(n).fadeIn()}var n=0;e(".switch-tab").on("click",function(){n!==e(this).index()&&(n=e(this).index(),t())}),e(".switch-label").on("click",function(){n!==e(this).index()&&(n=e(this).index(),i(),v())}),e(".switch-select").on("change",function(){n=e(this).val(),t()}),t(),i(),setTimeout(function(){v()},1e3)},d=function(){function t(){e(".switch-bg").removeClass("opacity-100"),e(".switch-bg").addClass("opacity-0"),e(".switch-bg").eq(i).removeClass("opacity-0"),e(".switch-bg").eq(i).addClass("opacity-100")}var i=0;e(".switch-bg-tab").on("mouseenter",function(){i=e(this).index(),t()}),t()},h=function(){e(".collapse-btn").on("click",function(){e(this).toggleClass("is-active"),e(this).siblings(".collapse-content").slideToggle()})},u=function(){function t(){var t=e(window).scrollTop(),i=e(window).outerHeight()/2;e(".anchor").addClass("anchor--white"),e("[data-anchor-color]").each(function(){var n=e(this).offset().top-i,o=e(this).outerHeight();n-1<=t&&n+o>t&&e(".anchor").removeClass("anchor--white")})}e("[data-anchor-color]").length&&(t(),e(window).on("scroll",t))},w=function(){var t=e(".site-header").outerHeight();e("[data-anchor]").on("click",function(){var i=e(this).data("anchor"),n=e(i).offset().top;e("html, body").animate({scrollTop:n-t},600)})},p=function(){function t(){var t=e(window).scrollTop();e("[data-anchor]").each(function(){var n=e(this).data("anchor"),o=e(n).offset().top,a=e(n).outerHeight();o-(i+1)<=t&&o+a>t?(e("[data-anchor]").removeClass("is-active"),e(this).addClass("is-active")):e(this).removeClass("is-active")})}var i=e(".site-header").outerHeight();t(),e(window).on("scroll",t)},g=function(){var e={duration:2};gsap.utils.toArray("[data-count]").forEach(function(t){gsap.to(t,{scrollTrigger:{trigger:t,onEnter:function(){var i=t.dataset.count;new countUp.CountUp(t,i,e).start()},once:!0}})})},v=function(){gsap.utils.toArray("[data-path]").forEach(function(t){var i=t.dataset.path;gsap.set(t,{drawSVG:"0% 0%",rotation:-90,transformOrigin:"50% 50%"}),"block"===e(t).closest(".switch-content").css("display")&&gsap.to(t,{drawSVG:"0% "+i+"%",duration:1})})},f=function(){var i=document.querySelector(".cursor");if(t)e(i).hide();else{var n={x:window.innerWidth/2,y:window.innerHeight/2},o={x:n.x,y:n.y},a=gsap.quickSetter(i,"x","px"),s=gsap.quickSetter(i,"y","px");window.addEventListener("mousemove",function(e){o.x=e.clientX,o.y=e.clientY}),gsap.ticker.add(function(){var e=1-Math.pow(.75,gsap.ticker.deltaRatio());n.x+=(o.x-n.x)*e,n.y+=(o.y-n.y)*e,a(n.x),s(n.y)}),e("[data-cursor]").on("mouseenter",function(){e(i).removeClass("opacity-0"),e(i).addClass("opacity-100")}),e("[data-cursor]").on("mouseleave",function(){e(i).removeClass("opacity-100"),e(i).addClass("opacity-0")})}},m=function(){e("table").each(function(){e(this).wrap('
')})};e(function(){i(),n(),s(),r(),o(),a(),c(),l(),d(),h(),u(),w(),p(),g(),v(),f(),m()}),e(window).on("load",function(){})}(jQuery);