PageSourceSearch

https://mackbooks.co.uk/cdn/shop/t/46/assets/component-shipping-notice.js?v=10244249591029387461763644036

js mackbooks.co.uk collected 2026-10-02 04:33:55 UTC 2,351 bytes, 2 lines download raw bytes

1if(typeof ShippingNotice!="function"){class ShippingNotice2 extends HTMLElement{constructor(){super(),this.init()}init(){const freeShippingThreshold=Math.round(Number(this.getAttribute("data-free-shipping"))*(Shopify.currency.rate?Number(Shopify.currency.rate):1)),freeShippingRemaining=Number(this.getAttribute("data-cart-total"))-freeShippingThreshold;let cartSliderWidth=0;freeShippingRemaining<0?(this.querySelector("[data-js-free-shipping-text]").innerHTML=window.KROWN.settings.locales.shipping_notice_remaining_to_free.replace("{{ remaining_amount }}",this._formatMoney(Math.abs(freeShippingRemaining),KROWN.settings.shop_money_format)),cartSliderWidth=100-Math.abs(freeShippingRemaining)*100/freeShippingThreshold):(this.querySelector("[data-js-free-shipping-text]").innerHTML=window.KROWN.settings.locales.shipping_notice_eligible_for_free,cartSliderWidth=100),this.querySelector("[data-js-free-shipping-slider]")&&(this.querySelector("[data-js-free-shipping-slider]").style.width=`${cartSliderWidth}%`)}_formatMoney(cents,format){typeof cents=="string"&&(cents=cents.replace(".",""));let value="";const placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,formatString=format||moneyFormat;function formatWithDelimiters(number,precision,thousands,decimal){if(thousands=thousands||",",decimal=decimal||".",isNaN(number)||number===null)return 0;number=(number/100).toFixed(precision);const parts=number.split("."),dollarsAmount=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),centsAmount=parts[1]?decimal+parts[1]:"";return dollarsAmount+centsAmount}switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break;case"amount_no_decimals_with_space_separator":value=formatWithDelimiters(cents,0," ");break;case"amount_with_apostrophe_separator":value=formatWithDelimiters(cents,2,"'");break}return formatString.replace(placeholderRegex,value)}}typeof customElements.get("shipping-notice")>"u"&&customElements.define("shipping-notice",ShippingNotice2)}
2//# sourceMappingURL=/cdn/shop/t/46/assets/component-shipping-notice.js.map?v=10244249591029387461763644036

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.