1let variantId="40380090679330";const shippingInsuranceVariants={"0-25":40380090679330,"26-35":40380090712098,"36-45":40380090744866,"46-55":40380090777634,"56-65":40380090810402,"66-75":40380090843170,"76-85":40380090875938,"86-95":40380090908706,"96-100":40380090941474,"101-110":40380090974242,"111-120":40380091007010,"121-130":40380091039778,"131-140":40380091072546,"141-150":40380091105314,"151-160":40380091138082,"161-170":40380091170850,"171-180":40380091203618,"181-190":40380091236386,"191-200":40380091269154,"201-225":40380091301922,"226-250":40380091334690,"251-275":40380091367458,"276-300":40380091400226,"301-350":40380091432994,"351-400":40380091465762,"401-450":40380091498530,"451-500":40380091531298,"500-600":40380091564066,"600-700":40380091596834,"700-800":40380091629602,"800-900":40380091662370,"900-1000":40380091695138,"1000-2000":40380091727906,"2000-":40380091760674};function showLoadingOverlay(loadingOverlay){console.log("showLoadingOverlay"),console.log(loadingOverlay);const checkOverlayExists=setInterval(function(){loadingOverlay!==null&&(loadingOverlay.style.display="flex",clearInterval(checkOverlayExists))},100)}function removeShippingInsurance(){let updatesBody={};for(variant in shippingInsuranceVariants)updatesBody[shippingInsuranceVariants[variant]]=0;fetch("/cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:updatesBody})}).then(response=>response.json()).then(res=>{}).catch(error=>{console.error("Error:",error)})}function addShippingInsurance(isCheckBox=!1){fetch("/cart.json",{credentials:"same-origin",method:"GET",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){response.json().then(function(content){cartData=content;for(variant in shippingInsuranceVariants)minPrice=parseInt(variant.split("-")[0])*100,maxPrice=parseInt(variant.split("-")[1])*100,minPrice<=cartData.original_total_price&&maxPrice>=cartData.original_total_price&&(variantId=shippingInsuranceVariants[variant]);let formData={};const checkBox=document.getElementById("check_shipping_insurance"),loadingOverlay=document.getElementById("js:loader");checkBox.checked&&(formData={items:[{id:variantId,quantity:1}]}),fetch("/cart/add.js",{credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify(formData)}).then(response2=>response2.json()).then(res=>{isCheckBox||setTimeout(function(){window.location.href="/checkout",showLoadingOverlay(loadingOverlay)},100)}).catch(error=>{console.error("Error:",error)})})})}function handleShippingInsuranceCheck(){const checkBox=document.getElementById("check_shipping_insurance");checkBox&&(checkBox.checked?addShippingInsurance(!0):removeShippingInsurance())}function init(){document.addEventListener("click",function(e){e.target.id=="js:checkout"&&(e.preventDefault(),addShippingInsurance())},!1),removeShippingInsurance()}init(); 2//# sourceMappingURL=/cdn/shop/t/378/assets/shipping-insurance.js.map?v=1317942744092225931772730746
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.