(($,t,e)=>{"use strict";t.on("builder_load_module_partial",((o,_)=>{if(t.is_builder_active||!0===_&&!o.classList.contains("module-cart-icon"))return;const a=t.selectWithParent("tbp_slide_cart",o),c=t.selectWithParent("[data-show]",o);for(let e=a.length-1;e>-1;--e)t.sideMenu(a[e].previousElementSibling,{close:"#"+a[e].tfClass("tbp_cart_icon_close")[0].id}).then((()=>{a[e].classList.remove("tf_hide")}));for(let o=c.length-1;o>-1;--o){let _=!1;t.body.on("added_to_cart",(()=>{if(!1===_){_=!0;let a=1e3*parseInt(c[o].dataset.show);if(c[o].classList.contains("tbp_cart_icon_style_dropdown")){const t=c[o].tfClass("tbp_cart_icon_container")[0];t.classList.add("tbp_show_cart"),setTimeout((()=>{t.classList.remove("tbp_show_cart"),_=!1}),a)}else{const s=c[o].tfClass("tbp_sidemenu")[0];if(s){const r="#"+s.id,i=e.body.classList;t.on("sidemenushow",((t,e,o)=>{r===t&&setTimeout((()=>{$(s).is(":hover")?s.tfOn("mouseleave",(()=>{o.hidePanel(),i.remove("tf_auto_cart_open")}),{once:!0,passive:!0}):(o.hidePanel(),i.remove("tf_auto_cart_open")),_=!1}),a)}),!0),i.add("tf_auto_cart_open"),setTimeout((()=>{c[o].querySelector("a").click()}),100)}}}}))}}))})(jQuery,Themify,document);