PageSourceSearch

https://modainpelle.com/cdn/shop/t/40/assets/store-locator.js?v=11114005475821672641790459250

js modainpelle.com collected 2026-10-02 17:28:47 UTC 3,315 bytes, 2 lines download raw bytes

1(function(){"use strict";function normalizeSearchValue(value){return String(value||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/&/g," and ").replace(/[^a-z0-9]+/g," ").replace(/\s+/g," ").trim()}function debounce(callback,delay){var timer;return function(){var context=this,args=arguments;window.clearTimeout(timer),timer=window.setTimeout(function(){callback.apply(context,args)},delay)}}function initializeStoreLocator(root){if(!root||root.dataset.storeLocatorReady==="true")return;root.dataset.storeLocatorReady="true";var input=root.querySelector("[data-store-locator-input]"),clearButton=root.querySelector("[data-store-locator-clear]"),countElement=root.querySelector("[data-store-locator-count]"),emptyElement=root.querySelector("[data-store-locator-empty]"),stores=Array.prototype.slice.call(root.querySelectorAll("[data-store]"));if(!stores.length){countElement&&(countElement.textContent="No stores are currently available."),emptyElement&&(emptyElement.hidden=!1);return}stores.forEach(function(store){store.querySelector(".store-card__hours")||store.classList.add("store-card--no-hours");var suppliedSearchValue=store.getAttribute("data-store-search")||"";store.dataset.normalizedSearch=normalizeSearchValue(suppliedSearchValue+" "+store.textContent)});function updateStoreCount(visibleCount,query){if(countElement){var storeWord=visibleCount===1?"store":"stores";query?countElement.textContent=visibleCount+" "+storeWord+' found for "'+query+'"':countElement.textContent=visibleCount+" "+storeWord+" available"}}function filterStores(){var rawQuery=input?input.value.trim():"",normalizedQuery=normalizeSearchValue(rawQuery),queryParts=normalizedQuery?normalizedQuery.split(" "):[],visibleCount=0;stores.forEach(function(store){var searchableValue=store.dataset.normalizedSearch||"",matches=queryParts.every(function(queryPart){return searchableValue.indexOf(queryPart)!==-1});store.hidden=!matches,matches&&(visibleCount+=1)}),clearButton&&(clearButton.hidden=rawQuery.length===0),emptyElement&&(emptyElement.hidden=visibleCount!==0),updateStoreCount(visibleCount,rawQuery)}var debouncedFilter=debounce(filterStores,120);input&&(input.addEventListener("input",debouncedFilter),input.addEventListener("search",function(){filterStores()}),input.addEventListener("keydown",function(event){event.key==="Escape"&&input.value&&(input.value="",filterStores(),input.focus())})),clearButton&&input&&clearButton.addEventListener("click",function(){input.value="",filterStores(),input.focus()}),filterStores()}function initializeAllStoreLocators(scope){var searchScope=scope||document;searchScope.nodeType===1&&searchScope.matches&&searchScope.matches("[data-store-locator]")&&initializeStoreLocator(searchScope);var roots=searchScope.querySelectorAll?searchScope.querySelectorAll("[data-store-locator]"):[];Array.prototype.forEach.call(roots,function(root){initializeStoreLocator(root)})}function startStoreLocators(){initializeAllStoreLocators(document)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",startStoreLocators):startStoreLocators(),document.addEventListener("shopify:section:load",function(event){initializeAllStoreLocators(event.target)})})();
2//# sourceMappingURL=/cdn/shop/t/40/assets/store-locator.js.map?v=11114005475821672641790459250

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.