PageSourceSearch

https://cinest.com/cdn/shop/t/21/assets/cart-free-shipping.script-global-BQX6XM9y.js

js cinest.com collected 2026-10-06 18:27:58 UTC 2,108 bytes, 1 lines download raw bytes

1var m=Object.defineProperty;var f=(r,e,t)=>e in r?m(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var s=(r,e,t)=>f(r,typeof e!="symbol"?e+"":e,t);import{X as d,f as v,c as x}from"./index-B2p9xdVi.js";var _=Object.defineProperty,b=Object.getOwnPropertyDescriptor,y=(r,e,t)=>e in r?_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,P=(r,e,t,o)=>{for(var n=o>1?void 0:o?b(e,t):e,i=r.length-1,c;i>=0;i--)(c=r[i])&&(n=c(n)||n);return n},S=(r,e,t)=>y(r,e+"",t);let a=class extends d{constructor(){super(...arguments);s(this,"mutationObserver",null);s(this,"checkingEl",this.querySelector(".xo-cart-free-shipping-checking-inner"));s(this,"getProgressLevel",e=>e>30&&e<=60?"2":e>60&&e<100?"3":e==100?"4":"1");s(this,"updateProgressTextUI",(e,t)=>{const{xoFreeShippingNotice:o,xoFreeShippingProgress:n}=this.props,i=this.querySelector(".xo-cart-free-shipping__text");i&&(t?i.innerHTML=o:i.innerHTML=n.replace(/\{\{.*?\}\}/g,e))});s(this,"updateLevelUI",e=>{const t=this.querySelector(".xo-cart-free-shipping__progress");if(!t)return;const o=this.getProgressLevel(e);t.style.setProperty("--progress",`${Math.min(100,e)}%`),t.classList.add(`xo-cart-free-shipping__progress--level-${o}`)});s(this,"handler",()=>{var p;const t=Number(this.checkingEl.getAttribute("xo-total-price")),o=Shopify.currency.rate,n=(p=window.settings)==null?void 0:p.cart_free_shipping_min_amount;if(!n)return;const i=Math.round(n*100*o),c=Math.max(0,i-t),l=t/i*100,u=document.documentElement.getAttribute("xo-money-with-currency-format")||document.documentElement.getAttribute("xo-money-format");if(!u)return;const h=t>=i,g=v(c,u);this.updateProgressTextUI(g,h),this.updateLevelUI(l)})}mount(){this.checkingEl&&(this.handler(),this.mutationObserver=new MutationObserver(this.handler),this.mutationObserver.observe(this.checkingEl,{attributeFilter:["xo-total-price"],attributes:!0}))}unmount(){var e;(e=this.mutationObserver)==null||e.disconnect()}};S(a,"propTypes",{xoFreeShippingNotice:"string",xoFreeShippingProgress:"string"});a=P([x("xo-cart-free-shipping-custom")],a);export{a as CartFreeShippingCustom};

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.