PageSourceSearch

https://rolandstoretokyo.com/cdn/shop/t/3/assets/cart-free-shipping.script-global-l9_7wsc_.js

js rolandstoretokyo.com collected 2026-10-04 19:47:27 UTC 2,894 bytes, 1 lines download raw bytes

1var d=Object.defineProperty;var _=(r,e,t)=>e in r?d(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var c=(r,e,t)=>_(r,typeof e!="symbol"?e+"":e,t);import"./index-DoREuB43.js";import{X as x,c as b}from"./customElements-Djt0C__S.js";import"./index-7HJOtP4p.js";import"./index-CmLoO4PE.js";import"./each-DvLt4fgf.js";import"./index-up99TGJ_.js";import"./index-DJO3VgdV.js";function v(r,e){typeof r=="string"&&(r=r.replace(".",""));let t="";const n=/\{\{\s*(\w+)\s*\}\}/,i=e||"{{amount}}";function o(a,l,p=",",m="."){if(isNaN(a)||a==null)return"0";a=Number((a/100).toFixed(l));const u=a.toString().split("."),g=u[0].replace(/\B(?=(\d{3})+(?!\d))/g,p),f=u[1]?m+u[1]:"";return g+f}const s=i.match(n);if(!s)return i;switch(s[1]){case"amount":t=o(Number(r),2);break;case"amount_no_decimals":t=o(Number(r),0);break;case"amount_with_comma_separator":t=o(Number(r),2,".",",");break;case"amount_no_decimals_with_comma_separator":t=o(Number(r),0,".",",");break;default:return i}return i.replace(n,t)}var y=Object.defineProperty,S=Object.getOwnPropertyDescriptor,w=(r,e,t)=>e in r?y(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,N=(r,e,t,n)=>{for(var i=n>1?void 0:n?S(e,t):e,o=r.length-1,s;o>=0;o--)(s=r[o])&&(i=s(i)||i);return i},P=(r,e,t)=>w(r,e+"",t);let h=class extends x{constructor(){super(...arguments);c(this,"mutationObserver",null);c(this,"checkingEl",this.querySelector(".xo-cart-free-shipping-checking-inner"));c(this,"getProgressLevel",e=>e>30&&e<=60?"2":e>60&&e<100?"3":e==100?"4":"1");c(this,"updateProgressTextUI",(e,t)=>{const{xoFreeShippingNotice:n,xoFreeShippingProgress:i}=this.props,o=this.querySelector(".xo-cart-free-shipping__text");o&&(t?o.innerHTML=n:o.innerHTML=i.replace(/\{\{.*?\}\}/g,e))});c(this,"updateLevelUI",e=>{const t=this.querySelector(".xo-cart-free-shipping__progress");if(!t)return;const n=this.getProgressLevel(e);t.style.setProperty("--progress",`${Math.min(100,e)}%`),t.classList.add(`xo-cart-free-shipping__progress--level-${n}`)});c(this,"handler",()=>{var u;const t=Number(this.checkingEl.getAttribute("xo-total-price")),n=Shopify.currency.rate,i=(u=window.settings)==null?void 0:u.cart_free_shipping_min_amount;if(!i)return;const o=Math.round(i*100*n),s=Math.max(0,o-t),a=t/o*100,l=document.documentElement.getAttribute("xo-money-with-currency-format")||document.documentElement.getAttribute("xo-money-format");if(!l)return;const p=t>=o,m=v(s,l);this.updateProgressTextUI(m,p),this.updateLevelUI(a)})}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()}};P(h,"propTypes",{xoFreeShippingNotice:"string",xoFreeShippingProgress:"string"});h=N([b("xo-cart-free-shipping-custom")],h);export{h 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.