PageSourceSearch

https://kiarasky.com/cdn/shop/t/281/assets/package-protection.js?v=147984979788873320701790900967

js kiarasky.com collected 2026-10-02 04:54:20 UTC 2,361 bytes, 1 lines download raw bytes

1async function buyXgetY(){const b=await fetch(window.theme.localeRootUrl+"/cart.js").then(b=>b.json());let c=0,d=0;for(const e of b.items)"C-Curve"!==e.product_type||Object.keys(e.properties).length||(c+=e.quantity),39986663719048!==e.id||Object.keys(e.properties).length||(d+=e.quantity);const g=c-d;if(!(0>=g)){const b=await fetch(window.theme.localeRootUrl+"/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:39986663719048,quantity:g}]})});if(!b.ok)throw new Error("Failed to add free glue")}}const INSURANCE_VARIANTS=[{id:39553534853256,maxCents:14998},{id:39553534886024,maxCents:24998},{id:39553534918792,maxCents:34998},{id:39553534951560,maxCents:44998},{id:39553534984328,maxCents:60100},{id:39553535017096,maxCents:1/0}];function getCorrectInsuranceVariant(b){return 1>b?null:INSURANCE_VARIANTS.find(c=>b<=c.maxCents).id}let _insuranceCheckerPromise=null;async function insuranceChecker(){_insuranceCheckerPromise&&(await _insuranceCheckerPromise),_insuranceCheckerPromise=_executeInsuranceCheck();try{await _insuranceCheckerPromise}finally{_insuranceCheckerPromise=null}}async function _executeInsuranceCheck(){if(sessionStorage.getItem("removed_insurance"))return;const g=await fetch(window.theme.localeRootUrl+"/cart.js").then(b=>b.json()),h=[];let a=g.total_price;for(const b of g.items)"kiara-sky-package-protection"===b.handle&&(h.push({key:b.key,id:b.id,quantity:b.quantity}),a-=b.price*b.quantity);const i=getCorrectInsuranceVariant(a),c=h.findIndex(a=>a.id===i&&1===a.quantity),d={};let e=!1;if(h.forEach((f,a)=>{a===c||(d[f.key]=0,e=!0)}),i&&-1===c){e&&(await fetch(window.theme.localeRootUrl+"/cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:d})}));const f=await fetch(window.theme.localeRootUrl+"/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:i,quantity:1}]})});if(f.ok){const a=await f.json(),b=a.items?.[0]||a;window.Shopify?.analytics?.publish&&Shopify.analytics.publish("diarmuids_custom_package_protection",{value:b.price/100,currency:"USD",items:[{item_id:i+"",item_name:b.title,price:b.price/100}]})}return}e&&(await fetch(window.theme.localeRootUrl+"/cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:d})}))}

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.