PageSourceSearch

https://mint-bikes.com/cdn/shop/t/72/compiled_assets/snippet-scripts.js?v=64196437230002180611786114793

js mint-bikes.com collected 2026-09-25 21:52:03 UTC 6,312 bytes, 2 lines download raw bytes

1(function(){var __snippets__={};(function(){for(var element=document.getElementById("snippets-script"),attribute=element?element.getAttribute("data-snippets"):"",snippets=attribute.split(",").filter(Boolean),i=0;i<snippets.length;i++)__snippets__[snippets[i]]=!0})(),(function(){if(!(!__snippets__["product-delivery-block"]&&!Shopify.designMode))try{(function(){var root=document.querySelector(".product-delivery");if(!root)return;var storesEl=root.querySelector("[data-delivery-stores]"),stores=[];try{var parsed=JSON.parse(storesEl.textContent);typeof parsed=="string"&&(parsed=JSON.parse(parsed)),stores=Array.isArray(parsed)?parsed:[]}catch(e){stores=[]}var resultsWrap=root.querySelector("[data-delivery-results]"),resultsLabel=root.querySelector("[data-delivery-results-label]"),resultsList=root.querySelector("[data-delivery-results-list]"),postalInput=root.querySelector("[data-delivery-postal]"),L={dept:root.getAttribute("data-l-dept")||"",near:root.getAttribute("data-l-near")||"",metaIn:root.getAttribute("data-l-meta-in")||"",metaNeighbor:root.getAttribute("data-l-meta-neighbor")||"",metaFar:root.getAttribute("data-l-meta-far")||""},recordChoice=root.getAttribute("data-record-choice")==="true",selectedStore=null,customer={zip:""};function dep(zip){var digits=String(zip==null?"":zip).replace(/\D/g,"");return digits.length<4?NaN:parseInt(digits.padStart(5,"0").slice(0,2),10)}function pushCartAttributes(){if(recordChoice){var mode=root.querySelector("[data-delivery-mode]:checked"),attrs={"Mode de livraison":mode?mode.getAttribute("data-mode-label"):""};if(mode&&mode.value==="home"){var speed=root.querySelector("[data-delivery-speed]:checked");attrs["Option de livraison"]=speed?speed.getAttribute("data-speed-label"):"",attrs["Boutique de retrait"]=""}else mode&&mode.value==="shop"?(attrs["Option de livraison"]="",attrs["Boutique de retrait"]=selectedStore?selectedStore.title:""):(attrs["Option de livraison"]="",attrs["Boutique de retrait"]="");attrs["Code postal client"]=customer.zip||"",fetch("/cart/update.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({attributes:attrs})}).catch(function(){})}}
1function renderStores(){selectedStore=null;var zip=customer.zip;if(!/^\d{5}$/.test(zip)||!stores.length){resultsWrap.hidden=!0,resultsList.innerHTML="";return}var d=dep(zip),ranked=stores.map(function(b){return{b:b,d:dep(b.zip)}}).filter(function(x){return isFinite(x.d)&&(x.b.name||x.b.city)}).map(function(x){return{b:x.b,d:Math.abs(x.d-d)}}).sort(function(a,z){return a.d-z.d}).slice(0,3);if(!ranked.length){resultsWrap.hidden=!0;return}resultsLabel.textContent=ranked[0].d===0?L.dept.replace("[dept]",zip.slice(0,2)):L.near,resultsList.innerHTML="",ranked.forEach(function(item){var b=item.b,title=(b.city?b.city+" \u2014 ":"")+(b.name||""),meta=item.d===0?L.metaIn:item.d<=1?L.metaNeighbor:L.metaFar,btn=document.createElement("button");btn.type="button",btn.className="product-delivery__store",btn.setAttribute("role","radio"),btn.setAttribute("aria-checked","false"),btn.setAttribute("data-cta-name","Boutique \xB7 "+title),btn.setAttribute("data-delivery-cta",""),btn.innerHTML='<span class="product-delivery__store-radio" aria-hidden="true"><span class="product-delivery__store-dot"></span></span><span class="product-delivery__store-body"><span class="product-delivery__store-title"></span><span class="product-delivery__store-meta"></span></span>',btn.querySelector(".product-delivery__store-title").textContent=title,btn.querySelector(".product-delivery__store-meta").textContent=meta,btn.addEventListener("click",function(){selectedStore={title:title,zip:b.zip,city:b.city},resultsList.querySelectorAll(".product-delivery__store").forEach(function(el){el.setAttribute("aria-checked","false")}),btn.setAttribute("aria-checked","true"),pushCartAttributes()}),resultsList.appendChild(btn)}),resultsWrap.hidden=!1}function emitDeliveryChange(){var mode=root.querySelector("[data-delivery-mode]:checked");if(mode){var key=mode.value;if(key==="home"){var speed=root.querySelector("[data-delivery-speed]:checked");key=speed?speed.value:"standard"}document.dispatchEvent(new CustomEvent("delivery:change",{detail:{mode:key}}))}}root.querySelectorAll("[data-delivery-mode]").forEach(function(input){input.addEventListener("change",function(){input.value!=="shop"&&(selectedStore=null),pushCartAttributes(),emitDeliveryChange()})}),root.querySelectorAll("[data-delivery-speed]").forEach(function(input){input.addEventListener("change",function(){pushCartAttributes(),emitDeliveryChange()})}),postalInput&&(postalInput.addEventListener("input",function(){customer.zip=postalInput.value.replace(/\D/g,"").slice(0,5),renderStores()}),postalInput.addEventListener("change",function(){/^\d{5}$/.test(customer.zip)&&pushCartAttributes()}))})()}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["trustpilot-carousel-fallback"]&&!Shopify.designMode))try{document.addEventListener("click",function(event){var target=event.target;if(!(!target||typeof target.closest!="function")){var link=target.closest("[data-tp-carousel-fallback]");if(link){var payload={link_url:link.href,link_location:"product_reviews_carousel"};if(typeof window.trackEvent=="function"){window.trackEvent("trustpilot_fallback_click",payload);return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"trustpilot_fallback_click",link_url:payload.link_url,link_location:payload.link_location})}}})}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["trustpilot-fallback"]&&!Shopify.designMode))try{document.addEventListener("click",function(event){var target=event.target;if(!(!target||typeof target.closest!="function")){var link=target.closest("[data-tp-fallback]");if(link){var payload={link_url:link.href,link_location:link.closest(".product-conseil-mint__trustpilot")?"product_conseil":"product_breadcrumb"};if(typeof window.trackEvent=="function"){window.trackEvent("trustpilot_fallback_click",payload);return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"trustpilot_fallback_click",link_url:payload.link_url,link_location:payload.link_location})}}})}catch(e){console.error(e)}})()})();
2//# sourceMappingURL=/cdn/shop/t/72/compiled_assets/snippet-scripts.js.map?v=64196437230002180611786114793

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.