jQuery.cookie=function(b,j,m){if(typeof j<"u"){m=m||{},j===null&&(j="",m.expires=-1);var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;typeof m.expires=="number"?(f=new Date,f.setTime(f.getTime()+m.expires*24*60*60*1e3)):f=m.expires,e="; expires="+f.toUTCString()}var l=m.path?"; path="+m.path:"",g=m.domain?"; domain="+m.domain:"",a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!="")for(var k=document.cookie.split(";"),h=0;h0&&productGrid.not(".slick-initialized")&&productGrid.slick({mobileFirst:!0,adaptiveHeight:!0,vertical:!1,infinite:!0,slidesToShow:1,slidesToScroll:1,arrows:itemArrowsMb,dots:itemDotsMb,nextArrow:window.arrows.icon_next,prevArrow:window.arrows.icon_prev,rtl:window.rtl_slick,responsive:[{breakpoint:1599,settings:{arrows:itemArrows,dots:itemDots,get slidesToShow(){return itemToShow!=null&&itemToShow!==""?this.slidesToShow=itemToShow:this.slidesToShow=1},get slidesToScroll(){return itemToShow!=null&&itemToShow!==""?this.slidesToScroll=itemToShow:this.slidesToScroll=1}}},{breakpoint:1024,settings:{arrows:itemArrows,dots:itemDots,get slidesToShow(){return itemToShow!=null&&itemToShow!==""?itemToShow==5?this.slidesToShow=itemToShow-1:this.slidesToShow=itemToShow:this.slidesToShow=1},get slidesToScroll(){return itemToShow!=null&&itemToShow!==""?itemToShow==5?this.slidesToScroll=itemToShow-1:this.slidesToScroll=itemToShow:this.slidesToScroll=1}}},{breakpoint:991,settings:{arrows:itemArrowsMb,dots:itemDotsMb,slidesToShow:4,slidesToScroll:4}},{breakpoint:767,settings:{arrows:itemArrowsMb,dots:itemDotsMb,slidesToShow:3,slidesToScroll:3}},{breakpoint:320,settings:{arrows:itemArrowsMb,dots:itemDotsMb,slidesToShow:2,slidesToScroll:2}}]}),$("body").hasClass("cursor-fixed__show")&&(window.sharedFunctionsAnimation.onEnterButton(),window.sharedFunctionsAnimation.onLeaveButton())}$("body").hasClass("product-card-layout-08")&&window.sharedFunctions?.productCountdownCard(),window.sharedFunctions?.swapHoverVideoProductCard()}};return{resizeImage:function(src,size){if(size==null)return src;if(size=="master")return src.replace(/http(s)?:/,"");var match=src.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?/i);if(match!=null){var prefix=src.split(match[0]),suffix=match[0];return(prefix[0]+"_"+size+suffix).replace(/http(s)?:/,"")}else return null},showRecentlyViewed:function(params){var params=params||{};jQuery.extend(config,params),productHandleQueue=cookie.read(),template=config.templateId,wrapper=jQuery("#"+config.wrapperId),config.howManyToShow=Math.min(productHandleQueue.length,config.howManyToShow),config.howManyToShow&&wrapper.length&&(template=="recently-viewed-product-popup"?moveAlong(wrapper):doAlong(wrapper))},getConfig:function(){return config},clearList:function(){cookie.destroy()},recordRecentlyViewed:function(params){var params=params||{};jQuery.extend(config,params);var recentlyViewed=cookie.read();if(window.location.pathname.indexOf("/products/")!==-1){var splitted=window.location.pathname.match(/\/products\/([a-z0-9\-_]+)/);if(splitted==null)var productHandle=decodeURIComponent(window.location.pathname.split("/products/")[1]);else var productHandle=window.location.pathname.match(/\/products\/([a-z0-9\-_]+)/)[1];var position=jQuery.inArray(productHandle,recentlyViewed);position===-1?(recentlyViewed.unshift(productHandle),recentlyViewed=recentlyViewed.splice(0,config.howManyToStoreInMemory)):(recentlyViewed.splice(position,1),recentlyViewed.unshift(productHandle)),cookie.write(recentlyViewed)}}}}(); //# sourceMappingURL=/cdn/shop/t/12/assets/recently-viewed-product.js.map?v=114404735448850763981749590883