let HomeAugust={init:function(){$(".Home-august-desktop-2022").length>0&&(this.bannerTopInformation(),this.tripleBanner(),this.bannerImageSlider())},bannerTopInformation:function(){$(".Home-august-desktop-2022 #bannerTopInformation").slick({lazyLoad:"ondemand",slidesToShow:1,slidesToScroll:1,autoplay:!0,arrows:!0,dots:!1,accessibility:!0,autoplaySpeed:5e3,speed:1e3,fade:!0,cssEase:"linear",infinite:!0})},tripleBanner:function(){$(".Home-august-desktop-2022 #tripleBanner").slick({lazyLoad:"ondemand",slidesToShow:1,slidesToScroll:1,autoplay:!0,autoplaySpeed:5e3,arrows:!0,dots:!1,accessibility:!0,fade:!0,cssEase:"linear",infinite:!0})},bannerImageSlider:function(){$("li.helperComplement").remove(),$(".wrapper-buy-button-asynchronous").css("display","block"),$(".Home-august-desktop-2022 .banner-slider ul").slick({lazyLoad:"ondemand",slidesToShow:3,slidesToScroll:3,dots:!1,arrows:!0,autoplay:!0,infinite:!0,autoplaySpeed:5e3})}};const validateEmail=email=>email.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),isAuthenticatedUser=async()=>{const response=await fetch("/api/vtexid/pub/authenticated/user"),user=await response.json();return await user},modalWishlist=async hidden=>{if(await isAuthenticatedUser())window.location.href=window.origin+"/lista-de-deseos";else if(!0===hidden)$(".modal-wishlist").css("display","none");else{$(".modal-wishlist").css("display","flex");let email="",required=$(".text-required");required.css("color","#181818").css("display","none"),$("#inputWishlist").on("input",function(e){email=e.target.value}),$("#submitWishlist").click(function(){validateEmail(email)?window.location.href=window.origin+"/lista-de-deseos?email="+email:required.css("color","red").css("display","block")})}},modalBag=hidden=>{!0===hidden?$(".modal-Bag").css("display","none"):$(".modal-Bag").css("display","flex")},modalLocales=hidden=>{!0===hidden?$(".modal-locales").css("display","none"):$(".modal-locales").css("display","flex")},modalTrackOrder=hidden=>{if(!0===hidden)$(".modal-track-order").css("display","none");else{$(".rastrear-pedido").val(""),$(".modal-track-order").css("display","flex");let order="";$("#rastrear-pedido").on("input",function(e){order=e.target.value}),$("#busquedaRastreo").click(function(){order.length>=4?window.location.href=window.origin+"/rastrear-mi-pedido?order="+order:$(".text-required").css("color","red")})}},modalSearch=hidden=>{!0===hidden?$(".modal-search").css("display","none"):($(".modal-search").css("display","flex"),$(".modal-search .search .input-search").val(""))};function slugify(str){str=(str=str.replace(/^\s+|\s+$/g,"")).toLowerCase();for(var from="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;",i=0,l=from.length;i{let search=$(".modal-search .search .input-search").val();window.location.href="/"+slugify(search)};let detectScroll=()=>{$(window).bind("load scroll resize",function(){$(window).scrollTop()>10?$(".Home-august-desktop-2022 header").addClass("scroll_header"):$(".Home-august-desktop-2022 header").removeClass("scroll_header")})};$(document).ready(function(){HomeAugust.init(),detectScroll(),$(".modal-search .search .input-search").on("keyup",function(e){13==(e.keyCode||e.which)&&searchResult()}),$(".City").click(function(e){e.preventDefault(),$(this).parent(".menuCity").toggleClass("active")}),$(".locales").click(function(e){e.preventDefault(),$(this).parent(".menuLocales").toggleClass("active")})});