PageSourceSearch

https://www.papinelle.com/cdn/shop/t/464/assets/predictive-search-a11y.js?v=42902171217112865351790549930

js papinelle.com collected 2026-10-06 12:28:48 UTC 2,649 bytes, 2 lines download raw bytes

1(function(){const PLACEHOLDER_COUNT="__COUNT__";function initHeaderSearch(headerSearch){const input=headerSearch.querySelector("#predictive-search-form input[name='q']"),resultsSlot=headerSearch.querySelector("predictive-search [slot='results']"),statusEl=headerSearch.querySelector("[data-predictive-search-status]");if(!input||!resultsSlot||!statusEl)return;const strings={loading:statusEl.dataset.loading||"Loading search results.",results:statusEl.dataset.results||"",noResults:statusEl.dataset.noResults||"No results found.",cleared:statusEl.dataset.cleared||""},announce=message=>{if(!message){statusEl.textContent="";return}statusEl.textContent="",requestAnimationFrame(()=>{statusEl.textContent=message})},setExpanded=expanded=>{input.setAttribute("aria-expanded",expanded?"true":"false")},summarizeResults=()=>{if(!input.value.trim()){setExpanded(!1),strings.cleared?announce(strings.cleared):announce("");return}if(resultsSlot.querySelector(".predictive-search__no-results")){setExpanded(!0),announce(strings.noResults);return}const suggestionCount=resultsSlot.querySelectorAll(".predictive-search__suggestions a").length,productCount=resultsSlot.querySelectorAll(".predictive-search__products .product-card, .predictive-search__products .horizontal-product-card").length,linkCount=resultsSlot.querySelectorAll(".predictive-search__results a").length,total=Math.max(suggestionCount+productCount,linkCount);if(resultsSlot.children.length===0){setExpanded(!1),announce("");return}setExpanded(!0),total>0&&strings.results.includes(PLACEHOLDER_COUNT)?announce(strings.results.replace(PLACEHOLDER_COUNT,String(total))):total>0?announce(strings.results||`${total} results available below.`):announce(strings.results.replace(PLACEHOLDER_COUNT,"").trim()||"Search results are available below.")};new MutationObserver(summarizeResults).observe(resultsSlot,{childList:!0,subtree:!0}),input.addEventListener("input",()=>{input.value.trim()||(setExpanded(!1),announce(""))});let searchLoading=!1;document.documentElement.addEventListener("theme:loading:start",()=>{!headerSearch.hasAttribute("open")||!input.value.trim()||(searchLoading=!0,input.setAttribute("aria-busy","true"),announce(strings.loading))}),document.documentElement.addEventListener("theme:loading:end",()=>{searchLoading&&(searchLoading=!1,input.removeAttribute("aria-busy"),summarizeResults())})}function boot(){document.querySelectorAll("header-search").forEach(initHeaderSearch)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",boot):boot()})();
2//# sourceMappingURL=/cdn/shop/t/464/assets/predictive-search-a11y.js.map?v=42902171217112865351790549930

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.