PageSourceSearch

https://www.miansai.com/cdn/shop/t/140/assets/miansai-single-shipp…?v=99224302605719775391789286431

js miansai.com collected 2026-09-25 18:55:15 UTC 3,961 bytes, 2 lines download raw bytes

1(function(){"use strict";var applied=!1,updating=!1;function threshold2Disabled(){var t2=Number(window.free_shipping_threshold_2);return!t2||t2<=0||isNaN(t2)}function applySingleModeClasses(){if(!threshold2Disabled())return!1;if(applied&&document.body.classList.contains("ms-single-fs-threshold"))return!0;document.documentElement.classList.add("ms-single-fs-threshold"),document.body.classList.add("ms-single-fs-threshold");var drawer=document.getElementById("CartDrawer");return drawer&&drawer.classList.add("ms-single-threshold"),document.querySelectorAll("#CartDrawer .progress-bar-wrapper, .minicart-header .progress-bar-wrapper").forEach(function(el){el.classList.add("ms-single-threshold")}),applied=!0,!0}function money(cents){try{if(window.Shopify&&typeof Shopify.formatMoney=="function")return Shopify.formatMoney(cents,window.moneyFormat||"${{amount}}")}catch(e){}return"$"+(Number(cents)/100).toFixed(2)}function updateSingleThreshold(cartTotalCents){if(!(!threshold2Disabled()||updating)){updating=!0;try{applySingleModeClasses();var rate=1;try{window.Shopify&&Shopify.currency&&Shopify.currency.rate&&(rate=Number(Shopify.currency.rate)||1)}catch(e){}var t1=Number(window.free_shipping_threshold_1)*100*rate;if(!t1||isNaN(t1))return;var total=Number(cartTotalCents);if(isNaN(total))return;var msg=document.querySelector("#CartDrawer .free-shipping-thresholds .free-shipping-threshold-1"),msgCount=msg&&msg.querySelector(".count"),success=document.querySelector("#CartDrawer .free-shipping-thresholds .free-shipping-threshold-1-success-message"),fill=document.querySelector("#CartDrawer .progress-bar-wrapper .progress-bar-fill.free-shipping-threshold-1"),fill2=document.querySelector("#CartDrawer .progress-bar-wrapper .progress-bar-fill.free-shipping-threshold-2"),msg2=document.querySelector("#CartDrawer .free-shipping-thresholds .free-shipping-threshold-2"),success2=document.querySelector("#CartDrawer .free-shipping-thresholds .free-shipping-threshold-2-success-message");if(fill2&&(fill2.classList.add("hide"),fill2.style.width="0%"),msg2&&msg2.classList.add("hide"),success2&&success2.classList.add("hide"),!fill)return;if(total<=0){fill.style.width="0%",fill.classList.add("hide"),msg&&msg.classList.remove("hide"),success&&success.classList.add("hide"),msgCount&&(msgCount.textContent=money(t1));return}if(total<t1){var pct=Math.max(0,Math.min(100,total/t1*100));fill.classList.remove("hide"),fill.style.width=pct+"%",msg&&msg.classList.remove("hide"),success&&success.classList.add("hide"),msgCount&&(msgCount.textContent=money(t1-total));return}fill.classList.remove("hide"),fill.style.width="100%",msg&&msg.classList.add("hide"),success&&success.classList.remove("hide")}finally{updating=!1}}}function readCartTotalAndUpdate(){!threshold2Disabled()||updating||fetch("/cart.js",{credentials:"same-origin"}).then(function(r){return r.json()}).then(function(cart){updateSingleThreshold(cart.total_price)}).catch(function(){})}function onCartEvent(e){var total=e&&e.detail&&e.detail.cart_total_price;typeof total=="number"?updateSingleThreshold(total):readCartTotalAndUpdate()}function init(){threshold2Disabled()&&(applySingleModeClasses(),readCartTotalAndUpdate(),window.addEventListener("adjustCartCallback",onCartEvent),window.addEventListener("cartUpdateCallback",onCartEvent),window.jQuery&&jQuery(document.body).on("afterCartLoad.ajaxCart.miansaiSingleFs",function(){applySingleModeClasses(),readCartTotalAndUpdate()}),document.addEventListener("click",function(e){var opener=e.target&&e.target.closest&&e.target.closest('.js-drawer-open-right, .site-header__cart-toggle, [aria-controls="CartDrawer"], .block-minicart');opener&&window.setTimeout(function(){applySingleModeClasses(),readCartTotalAndUpdate()},400)},!0))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})();
2//# sourceMappingURL=/cdn/shop/t/140/assets/miansai-single-shipping-threshold.js.map?v=99224302605719775391789286431

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.