PageSourceSearch

https://www.tozostore.com/cdn/shop/t/257/assets/z__jsAjaxCart.js?v=103299436748016758421789106309

js tozostore.com collected 2026-09-24 10:28:48 UTC 6,902 bytes, 2 lines download raw bytes

1(()=>{var __webpack_exports__={};window.PXUTheme.jsAjaxCart={init:function($section){window.PXUTheme.jsAjaxCart=$.extend(this,window.PXUTheme.getSectionData($section)),isScreenSizeLarge()||this.cart_action=="drawer"?this.initializeAjaxCart():this.initializeAjaxCartOnMobile(),this.cart_action=="drawer"?(this.ajaxCartDrawer=$("[data-ajax-cart-drawer]"),$(document).on("click","[data-ajax-cart-trigger]",function(e){return e.preventDefault(),window.PXUTheme.jsAjaxCart.showDrawer(),!1})):this.cart_action=="mini_cart"&&this.showMiniCartOnHover(),$(document).on("click",".ajax-submit",function(e){e.preventDefault();const $addToCartForm2=$(this).closest("form");return window.PXUTheme.jsAjaxCart.addToCart($addToCartForm2),!1}),$(document).on("click","[data-ajax-cart-delete]",function(e){e.preventDefault();const lineID2=$(this).parents("[data-line-item]").data("line-item");return window.PXUTheme.jsAjaxCart.removeFromCart(lineID2),window.PXUTheme.jsCart&&window.PXUTheme.jsCart.removeFromCart(lineID2),!1}),$(document).on("click","[data-ajax-cart-close]",function(e){return e.preventDefault(),window.PXUTheme.jsAjaxCart.hideDrawer(),window.PXUTheme.jsAjaxCart.hideMiniCart(),!1})},showMiniCartOnHover:function(){const $el=$("[data-ajax-cart-trigger]");$el.hover(function(){window.PXUTheme.theme_settings.header_layout=="centered"&&$(".header-sticky-wrapper").hasClass("is-sticky")?$(".header-sticky-wrapper [data-ajax-cart-trigger]").addClass("show-mini-cart"):$el.addClass("show-mini-cart")},function(){$el.removeClass("show-mini-cart")})},hideMiniCart:function(){if(this.cart_action!="mini_cart")return!1;$("[data-ajax-cart-close]").parents("[data-ajax-cart-trigger]").removeClass("show-mini-cart")},toggleMiniCart:function(){const $el=$(".mobile-header [data-ajax-cart-trigger]");$el.attr("href","#"),$el.off("touchstart").on("touchstart",function(e){e.target.closest("[data-ajax-cart-mini_cart]")||(window.PXUTheme.jsAjaxCart.initializeAjaxCartOnMobile(),$el.toggleClass("show-mini-cart"))})},showDrawer:function(){if(this.cart_action!="drawer")return!1;let huanxin_customer_service=document.getElementById("huanxin_customer_service");huanxin_customer_service&&(huanxin_customer_service.style.bottom="270px"),this.ajaxCartDrawer.addClass("is-visible"),$(".ajax-cart__overlay").addClass("is-visible")},hideDrawer:function(){if(this.cart_action!="drawer")return!1;let huanxin_customer_service=document.getElementById("huanxin_customer_service");huanxin_customer_service&&(huanxin_customer_service.style.bottom="80px"),this.ajaxCartDrawer.removeClass("is-visible"),$(".ajax-cart__overlay").removeClass("is-visible")},removeFromCart:function(lineID,callback){$.ajax({type:"POST",url:"/cart/change.js",data:"quantity=0&line="+lineID,dataType:"json",success:function(cart){window.PXUTheme.jsAjaxCart.updateView()},error:function(XMLHttpRequest,textStatus){var response=eval("("+XMLHttpRequest.responseText+")");response=response.description}})},initializeAjaxCart:function(){window.PXUTheme.asyncView.load(window.PXUTheme.routes.cart_url,"ajax").done(({html,options})=>{$("[data-ajax-cart-content]").html(html.content),window.PXUTheme.currencyConverter&&window.PXUTheme.currencyConverter.convertCurrencies()}).fail(()=>{})},initializeAjaxCartOnMobile:function(){this.toggleMiniCart(),window.PXUTheme.asyncView.load(window.PXUTheme.routes.cart_url,"ajax").done(({html,options})=>{$(".mobile-header [data-ajax-cart-content]").html(html.content)}).fail(()=>{})},addToCart:function($addToCartForm){const $addToCartBtn=$addToCartForm.find(".button--add-to-cart");if($addToCartForm.removeClass("shopify-product-form--unselected-error"),console.log($addToCartBtn),$addToCartBtn[0].hasAttribute("data-options-unselected")){const cartWarning2=`<p class="cart-warning__message animated bounceIn">${window.PXUTheme.translation.select_variant}</p>`;$(".warning").remove(),$addToCartForm.addClass("shopify-product-form--unselected-error").find(".cart-warning").html(cartWarning2),$addToCartBtn.find(".icon").removeClass("zoomOut").addClass("zoomIn"),$addToCartBtn.find("span:not(.icon)").text($addToCartBtn.data("label")).removeClass("zoomOut").addClass("zoomIn")}else console.log($addToCartForm.serialize()),$.ajax({url:"/cart/add.js",dataType:"json",cache:!1,type:"post",data:$addToCartForm.serialize(),beforeSend:function(){$addToCartBtn.find("span").removeClass("fadeInDown").addClass("animated zoomOut")},success:function(product){let $el=$("[data-ajax-cart-trigger]");$addToCartBtn.find(".checkmark").addClass("checkmark-active");function addedToCart(){isScreenSizeLarge()?$el=$("[data-ajax-cart-trigger]"):($el=$(".mobile-header [data-ajax-cart-trigger]"),window.PXUTheme.scrollToTop($el)),$el.addClass("show-mini-cart"),$addToCartBtn.find("span").removeClass("fadeInDown")}window.setTimeout(function(){$addToCartBtn.find(".checkmark").removeClass("checkmark-active"),$addToCartBtn.find(".text, .icon").removeClass("zoomOut").addClass("fadeInDown"),$addToCartBtn.on("webkitAnimationEnd oanimationend msAnimationEnd animationend",addedToCart)},1e3),window.PXUTheme.jsAjaxCart.showDrawer(),window.PXUTheme.jsAjaxCart.updateView(),window.PXUTheme.jsCart&&$.ajax({dataType:"json",async:!1,cache:!1,dataType:"html",url:"/cart",success:function(html){const cartForm=$(html).find(".cart__form");$(".cart__form").replaceWith(cartForm)}})},error:function(XMLHttpRequest){let response=eval("("+XMLHttpRequest.responseText+")");response=response.description;const cartWarning=`<p class="cart-warning__message animated bounceIn">${response.replace("All 1 ","All ")}</p>`;$(".warning").remove(),$addToCartForm.find(".cart-warning").html(cartWarning),$addToCartBtn.find(".icon").removeClass("zoomOut").addClass("zoomIn"),$addToCartBtn.find("span:not(.icon)").text($addToCartBtn.data("label")).removeClass("zoomOut").addClass("zoomIn")}})},updateView:function(){window.PXUTheme.asyncView.load(window.PXUTheme.routes.cart_url,"ajax").done(({html,options})=>{if(options.item_count>0){const itemList=$(html.content).find(".ajax-cart__list"),cartDetails=$(html.content).find(".ajax-cart__details-wrapper");$(".ajax-cart__list").replaceWith(itemList),$(".ajax-cart__details-wrapper").replaceWith(cartDetails),$(".ajax-cart__empty-cart-message").addClass("is-hidden"),$(".ajax-cart__form").removeClass("is-hidden"),$("[data-ajax-cart-trigger]").addClass("has-cart-count"),$('[data-bind="itemCount"]').text(options.item_count)}
1else $(".ajax-cart__empty-cart-message").removeClass("is-hidden"),$(".ajax-cart__form").addClass("is-hidden"),$("[data-ajax-cart-trigger]").removeClass("has-cart-count"),$('[data-bind="itemCount"]').text("0");window.PXUTheme.currencyConverter&&window.PXUTheme.currencyConverter.convertCurrencies()}).fail(()=>{})},unload:function($section){$(".ajax-submit").off(),$("[data-ajax-cart-delete]").off()}}})();
2//# sourceMappingURL=/cdn/shop/t/257/assets/z__jsAjaxCart.js.map?v=103299436748016758421789106309

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.