PageSourceSearch

https://www.my-cartouches.com/cdn/shop/t/13/assets/z__cart.js?v=148737358527881842151707130558

js my-cartouches.com collected 2026-10-04 12:18:47 UTC 7,750 bytes, 1 lines download raw bytes

1class CartTimer extends HTMLElement{constructor(){super();var n=this,e=parseInt(this.dataset.time);let t,a,o=!1;localStorage.getItem("cartTimerEnd")?(t=localStorage.getItem("cartTimerActual"),a=localStorage.getItem("cartTimerEnd")):(t=(new Date).getTime(),a=new Date(t+6e4*e).getTime(),localStorage.setItem("cartTimerActual",t),localStorage.setItem("cartTimerEnd",a));e=()=>{t=(new Date).getTime(),localStorage.setItem("cartTimerActual",t);var r=a-t;if(r<0)n.innerHTML="<span>"+Shopify.translation.timer_ended+"</span>",r<-864e5&&(localStorage.removeItem("cartTimerInitial"),localStorage.removeItem("cartTimerEnd")),o&&clearInterval(i);else{let e=Math.floor(r%36e5/6e4),t=Math.floor(r%6e4/1e3);e<=9?e=`0${e}`:e,t<=9?t=`0${t}`:t,r=0<e?Shopify.translation.date.m:Shopify.translation.date.minute,n.querySelector(".dynamic").textContent=e+":"+t+" "+r}};e(),o=!0;const i=setInterval(e,1e3)}}customElements.define("cart-timer",CartTimer),theme.Cart=function(){function e(e){this.container=e;var t=this;this.cartFooter=this.container.querySelector("[data-sticky-mobile]"),this.container.classList.contains("cart")&&this.cartFooter&&"true"==this.cartFooter.getAttribute("data-sticky-mobile")?(document.documentElement.clientWidth<779?t.setPosition():t.unsetPosition(),window.on("resize",theme.utils.debounce(300,function(){document.documentElement.clientWidth<779?t.setPosition():t.unsetPosition()}))):t.unsetPosition(),"true"==this.container.getAttribute("data-keep-on-page")&&this.keepOnPage(),this.initListeners(),document.addEventListener("updateCart",function(e){0==window.AddCount?(window.AddCount=1,t.getCart()):e.preventDefault()})}return e.prototype=Object.assign({},e.prototype,{initListeners(){var t=this;window.AddCount=0,this.container.querySelectorAll(".quantity__button").forEach(e=>{e.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.updateItem(this.href)})}),this.container.querySelectorAll("input.quantity__input").forEach(e=>{e.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.updateInputItem(this)})}),this.container.querySelectorAll("select.cart__selector-variant").forEach(e=>{e.addEventListener("change",function(e){e.preventDefault(),t.updateVariant(this.value,this.dataset.actual,this.dataset.quantity)})})},removeListeners(){document.removeEventListener("updateCart",function(){self.getCart()}),this.container.querySelectorAll(".quantity__button").forEach(e=>{e.removeEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),self.updateItem(this.href)})}),this.container.querySelectorAll("input.quantity__input").forEach(e=>{e.removeEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),self.updateInputItem(this)})}),this.container.querySelectorAll("select.cart__selector-variant").forEach(e=>{e.removeEventListener("change",function(e){e.preventDefault(),self.updateVariant(this.value,this.dataset.actual,this.dataset.quantity)})})},updateItem(e){this.container.innerHTML+=Shopify.theme_settings.loader,this.container.classList.add("loading"),window.ajaxURL(e).then(function(){document.dispatchEvent(new CustomEvent("updateCart"))})},updateInputItem(e){this.container.innerHTML+=Shopify.theme_settings.loader,this.container.classList.add("loading"),document.querySelectorAll(".cart-bubble")&&document.querySelectorAll(".cart-bubble").forEach(e=>{e.innerHTML=Shopify.theme_settings.loader}),window.ajaxURL(theme.routes.cart_change_url+"?quantity="+e.value+"&id="+e.dataset.lineId).then(function(){document.dispatchEvent(new CustomEvent("updateCart"))})},updateVariant(e,t,r){this.container.innerHTML+=Shopify.theme_settings.loader,this.container.classList.add("loading"),document.querySelectorAll(".cart-bubble")&&document.querySelectorAll(".cart-bubble").forEach(e=>{e.innerHTML=Shopify.theme_settings.loader}),window.ajaxURL(theme.routes.cart_change_url+"?quantity="+r+"&id="+t).then(function(){window.ajaxURL(theme.routes.cart_add_url+"?quantity=1&id="+e).then(function(){document.dispatchEvent(new CustomEvent("updateCart"))}).catch(e=>{console.error("Error:",e)})}).catch(e=>{console.error("Error:",e)})},getCart(){var t=this;window.ajaxURL("/cart").then(function(e){t.renderCart(e)})},renderCart(e){var t=this;let r=(new DOMParser).parseFromString(e,"text/html"),n,a,o,i;a=t.container.classList.contains("minicart-container")&&!t.container.closest(".cart-section")?(n=".minicart-container",!0):!(n=".cart-section"),document.querySelectorAll(".cart-bubble")&&document.querySelectorAll(".cart-bubble").forEach(e
1=>{0<r.querySelector(".cart-bubble").innerHTML?(e.classList.remove("hide"),e.innerHTML=r.querySelector(".cart-bubble").innerHTML):e.classList.add("hide")}),r.querySelector(n+" .cart__empty")&&!t.container.querySelector(".cart__empty")?(t.container.querySelectorAll(':not(.cart__heading):not(.cart__cross-sell):not(.cart__content)[id^="block').forEach(e=>{e.classList.add("hide")}),localStorage.getItem("cartTimerInitial")&&(localStorage.removeItem("cartTimerInitial"),localStorage.removeItem("cartTimerEnd")),a&&(t.container.querySelector(n+" .cart").innerHTML=r.querySelector(n+" .cart").innerHTML)):(a?t.container.querySelector(n+" .cart").innerHTML=r.querySelector(n+" .cart").innerHTML:(o=r.querySelector(n+" .cart__content"),i=t.container.querySelector(" .cart__content"),o&&i&&(i.innerHTML=o.innerHTML),o=r.querySelector(n+" .cart__footer:not(.added)"),i=t.container.querySelector(" .cart__footer:not(.added)"),o&&i&&(i.innerHTML=o.innerHTML)),t.container.querySelectorAll(':not(.cart__heading):not(.cart__cross-sell):not(.cart__content)[id^="block').forEach(e=>{e.classList.remove("hide")})),a?this.container.closest("mini-cart")&&(this.container.closest("mini-cart").bindEvents(),0<document.querySelectorAll("mini-cart").length&&("once"==Shopify.theme_settings.atc_action||"always"==Shopify.theme_settings.atc_action)&&-1==window.location.href.indexOf("cart")&&(e=document.querySelector(".menu-icons mini-cart"),document.body.classList.remove("scroll_up"),document.body.classList.remove("scroll_down"),e.open())):t.container.querySelector("product-form")&&t.container.querySelectorAll("product-form").forEach(e=>{const t=e.querySelector("form");t&&t.addEventListener("submit",e.onSubmitHandler.bind(e))}),t.initListeners(),t.container.querySelectorAll(".loader").forEach(e=>e.remove()),t.container.classList.remove("loading")},setPosition(){var e;this.cartFooter&&(document.querySelector("footer").style.marginBottom=this.cartFooter.offsetHeight+"px",e=this.cartFooter.cloneNode(!0),this.cartFooter.classList.add("hide")),e.classList.add("added"),document.querySelector(".page-element").appendChild(e)},unsetPosition(){document.querySelector("footer").style.marginBottom="",this.cartFooter&&this.cartFooter.classList.remove("hide"),document.querySelector(".page-element").querySelector(".added[data-sticky-mobile]")&&document.querySelector(".page-element").querySelector(".added[data-sticky-mobile]").remove()},checkStatusProductForm(e,t,r){const n=e.querySelector("form"),a=e.querySelector('[name="quantity"]');r&&(t?("false"==e.dataset.added&&"false"==e.dataset.already&&(e.querySelector('button[type="submit"]').click(),e.dataset.added="true",e.dataset.already="true"),n.setAttribute("action",n.getAttribute("action").replace("add","change")),a.value=0):("true"!=e.dataset.added&&"true"!=e.dataset.already||(e.querySelector('button[type="submit"]').click(),e.dataset.added="false",e.dataset.already="false"),n.setAttribute("action",n.getAttribute("action").replace("change","add")),a.value=1))},keepOnPage(){var t=document.title,r=Shopify.translation.keep_on_page;document.addEventListener("visibilitychange",function(e){!document.hidden?document.title=t:setTimeout(function(){document.title=r},300)})}}),e}();

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.