{"version":3,"sources":["main.js"],"names":["height","el","$","each","thisHeight","this","setTimeout","header","scrollActive","window","scrollTop","addClass","removeClass","setBackgroundElement","background","attr","css","background-image","background-size","background-position","background-repeat","mappingMenu","mapping","mobileWrapper","mobileMethod","desktopWrapper","desktopMethod","breakpoint","menuMobile","on","toggleClass","toggleLink","toggleLink2","next","slideToggle","initSlide","Swiper","spaceBetween","loop","autoplay","delay","slidesPerColumnFill","pagination","clickable","slidesPerView","navigation","nextEl","prevEl","breakpoints","576","768","1024","historyTop","thumbs","swiper","leteringColor","lettering","index","showAllContent","viewMore","viewMoreBrief","viewMoreTable","slideUp","shareSocial","jsSocials","showLabel","showCount","shareIn","shares","share","logo","changeIframe","document","data","copyHtml","capchaHtml","boxVideo","refreshImg","appendTo","capchaHtml2","console","log","clone","ready","trigger"],"mappings":"AAAA,aAAA,SAASA,OAAOC,GACf,IAAID,EAAS,EACbE,EAAED,GAAIE,KAAK,WACV,IAAIC,EAAaF,EAAEG,MAAML,SACrBI,EAAaJ,IAChBA,EAASI,GAEVE,WAAW,WACVJ,EAAED,GAAID,OAAOA,IACX,OAGL,IAAIO,OAAS,CACZC,aAAc,WACb,IAAIR,EAASE,EAAE,UAAUF,SACrBE,EAAEO,QAAQC,YAAcV,EAC3BE,EAAE,UAAUS,SAAS,UAErBT,EAAE,UAAUU,YAAY,YAK3B,SAASC,uBACRX,EAAE,mBAAmBC,KAAK,WACzB,IAAIW,EAAaZ,EAAEG,MAAMU,KAAK,iBAC9Bb,EAAEG,MAAMW,IAAI,CACXC,mBAAoB,OAASH,EAAa,IAC1CI,kBAAmB,QACnBC,sBAAuB,oBAGzBjB,EAAE,yBAAyBC,KAAK,WAC/B,IAAIW,EAAaZ,EAAEG,MAAMU,KAAK,uBAC9Bb,EAAEG,MAAMW,IAAI,CACXC,mBAAoB,OAASH,EAAa,IAC1CM,oBAAqB,aAKxB,SAASC,cACOnB,EAAE,kCAAkCoB,QAAQ,CAC1DC,cAAe,sBACfC,aAAc,WACd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js","sourcesContent":["function height(el) {\n\tvar height = 0;\n\t$(el).each(function () {\n\t\tvar thisHeight = $(this).height();\n\t\tif (thisHeight > height) {\n\t\t\theight = thisHeight;\n\t\t}\n\t\tsetTimeout(() => {\n\t\t\t$(el).height(height)\n\t\t}, 100)\n\t})\n}\nlet header = {\n\tscrollActive: function () {\n\t\tlet height = $('header').height()\n\t\tif ($(window).scrollTop() > height) {\n\t\t\t$('header').addClass('active')\n\t\t} else {\n\t\t\t$('header').removeClass('active')\n\t\t}\n\t},\n}\n\nfunction setBackgroundElement() {\n\t$('[setBackground]').each(function () {\n\t\tvar background = $(this).attr('setBackground')\n\t\t$(this).css({\n\t\t\t\"background-image\": \"url(\" + background + \")\",\n\t\t\t\"background-size\": \"cover\",\n\t\t\t\"background-position\": \"center center\"\n\t\t})\n\t})\n\t$('[setBackgroundRepeat]').each(function () {\n\t\tvar background = $(this).attr('setBackgroundRepeat')\n\t\t$(this).css({\n\t\t\t\"background-image\": \"url(\" + background + \")\",\n\t\t\t\"background-repeat\": \"repeat\"\n\t\t})\n\t})\n}\n\nfunction mappingMenu() {\n\tlet mainMenu = $('header .bottom-wrap .main-menu').mapping({\n\t\tmobileWrapper: 'header .mobile-wrap',\n\t\tmobileMethod: 'appendTo',\n\t\tdesktopWrapper: 'header .bottom-wrap .left-wrap',\n\t\tdesktopMethod: 'appendTo',\n\t\tbreakpoint: 1024\n\t});\n\tlet searchbox = $('header .bottom-wrap .searchbox').mapping({\n\t\tmobileWrapper: 'header .mobile-wrap',\n\t\tmobileMethod: 'appendTo',\n\t\tdesktopWrapper: 'header .bottom-wrap .right-wrap .main-search',\n\t\tdesktopMethod: 'appendTo',\n\t\tbreakpoint: 1024\n\t});\n\tlet language = $('header .top-wrap .main-language').mapping({\n\t\tmobileWrapper: 'header .mobile-wrap',\n\t\tmobileMethod: 'appendTo',\n\t\tdesktopWrapper: 'header .top-wrap .right-wrap',\n\t\tdesktopMethod: 'appendTo',\n\t\tbreakpoint: 1024\n\t});\n}\n\nfunction menuMobile() {\n\tlet buttonToggle = $('header .button-menu-mb')\n\tbuttonToggle.on('click', function () {\n\t\t$('header .mobile-wrap').toggleClass('active')\n\t})\n\n\t// toggle title\n\tlet toggleLink = $('header .main-menu>li .title-zone-1')\n\tlet toggleLink2 = $('header .main-menu>li .title-zone-2')\n\ttoggleLink.on('click', function () {\n\t\t$(this).next('.dropdown-list').slideToggle();\n\t})\n\ttoggleLink2.on('click', function () {\n\t\t$(this).next('.dropdown-list-2').slideToggle();\n\t})\n}\n\nfunction initSlide() {\n\tlet bannerHome = new Swiper('.sakura-home-1 .swiper-container', {\n\t\tspaceBetween: 30,\n\t\tloop: true,\n\t\tautoplay: {\n\t\t\tdelay: 4500,\n\t\t},\n\t\tslidesPerColumnFill: \"row\",\n\t\tpagination: {\n\t\t\tel: '.sakura-home-1 .swiper-pagination',\n\t\t\tclickable: true,\n\t\t},\n\t});\n\tlet catalogHome = new Swiper('.sakura-home-2 .swiper-container', {\n\t\tspaceBetween: 30,\n\t\tslidesPerView: 1,\n\t\tslidesPerColumnFill: \"row\",\n\t\tnavigation: {\n\t\t\tnextEl: '.sakura-home-2 .button-next',\n\t\t\tprevEl: '.sakura-home-2 .button-prev',\n\t\t},\n\t\tbreakpoints: {\n\t\t\t576: {\n\t\t\t\tslidesPerView: 2,\n\t\t\t},\n\t\t\t768: {\n\t\t\t\tslidesPerView: 3\n\t\t\t},\n\t\t\t1024: {\n\t\t\t\tslidesPerView: 4\n\t\t\t}\n\t\t}\n\n\t});\n\tlet historyTop = new Swiper('.sakura-about-2 .main-slide-top .swiper-container', {\n\t\tspaceBetween: 30,\n\t\tslidesPerView: 2,\n\t\tslidesPerColumnFill: \"row\",\n\n\t\tbreakpoints: {\n\t\t\t576: {\n\t\t\t\tslidesPerView: 3,\n\t\t\t},\n\t\t\t768: {\n\t\t\t\tslidesPerView: 4\n\t\t\t}\n\t\t}\n\n\t});\n\tlet historyBottom = new Swiper('.sakura-about-2 .main-slide-bottom .swiper-container', {\n\t\tspaceBetween: 30,\n\t\tslidesPerColumnFill: \"row\",\n\t\tthumbs: {\n\t\t\tswiper: historyTop\n\t\t},\n\t\tnavigation: {\n\t\t\tnextEl: '.sakura-about-2 .button-next',\n\t\t\tprevEl: '.sakura-about-2 .button-prev',\n\t\t},\n\t});\n\t// let productDetailTop = new Swiper('.sakura-categories-detail .main-slide-bottom .swiper-container', {\n\t// \tspaceBetween: 30,\n\t// \tslidesPerView: 2,\n\t// \tslidesPerColumnFill: \"row\",\n\n\t// \tbreakpoints: {\n\t// \t\t576: {\n\t// \t\tslidesPerView: 3,\n\t// \t\t},\n\t// \t\t768: {\n\t// \t\tslidesPerView: 4\n\t// \t\t}\n\t// \t}\n\t// });\n\t// let productDetailBottom = new Swiper('.sakura-categories-detail .main-slide-top .swiper-container', {\n\t// \tspaceBetween: 30,\n\t// \tslidesPerColumnFill: \"row\",\n\t// \tthumbs: {\n\t// \t\tswiper: productDetailTop\n\t// \t},\n\t// \tnavigation: {\n\t// \t\tnextEl: '.sakura-categories-detail .button-next',\n\t// \t\tprevEl: '.sakura-categories-detail .button-prev',\n\t// \t},\n\t// });\n}\n\nfunction leteringColor() {\n\t$(\".name-logo h2\").lettering();\n\t$('.name-logo h2 span').each(function (index) {\n\t\tlet $this = $(this)\n\t\t$this.attr('style', '--i:' + index)\n\t})\n}\n\nfunction showAllContent() {\n\tlet viewMore = $('.sakura-categories-detail .box-product-bottom .view-more')\n\tlet viewMoreBrief = $('.sakura-categories-detail .box-product-top .box-content .brief-content .view-more')\n\tlet viewMoreTable = $('.sakura-categories-detail .box-table .view-more')\n\tviewMore.on('click', function () {\n\t\t$(this).slideUp();\n\t\t$('.sakura-categories-detail .box-product-bottom .tabslet-content.active .full-content').toggleClass('show-full')\n\t})\n\tviewMoreTable.on('click', function () {\n\t\t// console.log(100)\n\t\t$(this).slideUp();\n\t\t$('.sakura-categories-detail .box-table .table').toggleClass('active')\n\t})\n\tviewMoreBrief.on('click', function () {\n\t\t// console.log(100)\n\t\t$(this).slideUp();\n\t\t$('.sakura-categories-detail .box-product-top .box-content .brief-content .briefcontent').toggleClass('active')\n\t})\n}\n\nfunction shareSocial() {\n\t$(\"#shareNewsDeail\").jsSocials({\n\t\tshowLabel: false,\n\t\tshowCount: false,\n\t\tshareIn: \"popup\",\n\t\tshares: [{\n\t\t\t\tshare: \"facebook\",\n\t\t\t\tlogo: \"fab fa-facebook-f\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tshare: \"twitter\",\n\t\t\t\tlogo: \"fab fa-twitter\"\n\t\t\t},\n\t\t],\n\n\t});\n\t$(\"#share-product\").jsSocials({\n\t\tshowLabel: false,\n\t\tshowCount: false,\n\t\tshareIn: \"popup\",\n\t\tshares: [{\n\t\t\tshare: \"facebook\",\n\t\t\tlogo: \"ri-facebook-fill\"\n\t\t}],\n\n\t});\n}\n\nfunction changeIframe() {\n\t$(document).on('click', '.sakura-maps ul li', function () {\n\t\tvar data = $(this).attr('data-iframe')\n\t\t$('#custom-maps iframe').attr('src', data)\n\t})\n}\n\nfunction copyHtml() {\n\tlet capchaHtml = $('.wrap-form .frm-captcha')\n\tlet boxVideo = $('.product-detail-page .box-video')\n\tlet refreshImg = $('.rcRefreshImage')\n\tboxVideo.appendTo('.product-detail-page .main-video-js')\n\t// setInterval(() => {\n\tcapchaHtml.appendTo('.main-capcha')\n\t// }, 100);\n\trefreshImg.on('click', function () {\n\t\tlet capchaHtml2 = $('.wrap-form .frm-captcha')\n\t\tconsole.log(capchaHtml2);\n\t\tsetTimeout(() => {\n\t\t\tcapchaHtml2.clone().appendTo('.main-capcha')\n\t\t}, 1000);\n\t})\n\n}\n\n$(document).on('scroll', function () {\n\theader.scrollActive()\n})\n\n$(document).ready(function () {\n\tsetBackgroundElement();\n\t// header \n\tleteringColor();\n\tmappingMenu();\n\tmenuMobile();\n\n\t// swiper\n\tinitSlide();\n\tshowAllContent();\n\n\tshareSocial();\n\tcopyHtml();\n\n\tchangeIframe();\n\tsetTimeout(() => {\n\t\t$('#l_0').trigger(\"click\")\n\t}, 500);\n})\n"]}