1const HUMM_WIDGET_URL="https://hhq130ei45.execute-api.eu-west-1.amazonaws.com/prod/widgets/001Tl000008S447IAC",hummCache=new Map;function timeoutSignal(ms){return typeof AbortSignal<"u"&&AbortSignal.timeout?AbortSignal.timeout(ms):void 0}function getHummData(pounds){if(!hummCache.has(pounds)){const request=fetch(`${HUMM_WIDGET_URL}/${pounds}`,{signal:timeoutSignal(4e3)}).then(response=>{if(!response.ok)throw new Error(`humm ${response.status}`);return response.json()}).then(payload=>payload.data).catch(error=>{throw hummCache.delete(pounds),error});hummCache.set(pounds,request)}return hummCache.get(pounds)}const asMoney=amount=>"\xA3"+Number(amount).toFixed(2),asDesc=tier=>`${tier.offerDesc} (<strong>${tier.interestRate}% interest</strong>) with humm | kandoo. Apply at checkout.`;function fillCard(el,tiers){const amount=el.querySelector(".humm-from-amount")||el;amount.textContent=asMoney(tiers[tiers.length-1].intAmt)}function fillProductPage(container,tiers){const first=tiers[0],last=tiers[tiers.length-1],set=(selector,apply)=>{const node=container.querySelector(selector);node&&apply(node)};set(".last-monthly-payment",n=>{n.textContent=asMoney(last.intAmt)}),set(".last-monthly-payment-freq",n=>{n.innerHTML=last.frequency}),set(".last-monthly-payment-desc",n=>{n.innerHTML=asDesc(last)}),set(".first-monthly-payment",n=>{n.textContent=asMoney(first.intAmt)}),set(".first-monthly-payment-freq",n=>{n.innerHTML=first.frequency}),set(".first-monthly-payment-desc",n=>{n.innerHTML=asDesc(first)})}function hydrateHumm(root=document){[...root.querySelectorAll(".humm-from[data-humm-price]:not([data-humm-done])"),...root.querySelectorAll("[data-humm-pdp][data-humm-price]:not([data-humm-done])")].forEach(el=>{el.dataset.hummDone="";const pounds=Math.floor(Number(el.dataset.hummPrice)/100);if(!pounds)return;const isProductPage=el.hasAttribute("data-humm-pdp");getHummData(pounds).then(tiers=>{isProductPage?fillProductPage(el,tiers):fillCard(el,tiers)}).catch(()=>{isProductPage?delete el.dataset.hummDone:el.textContent="FINANCE AVAILABLE"})})}hydrateHumm(),document.addEventListener("booster:content:update",()=>hydrateHumm()); 2//# sourceMappingURL=/cdn/shop/t/58/assets/getHummCall.js.map?v=159138676918951392421782898848
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.