PageSourceSearch

https://foveo.run/cdn/shop/t/23/assets/search-template.build.min.js?v=76132768365795471481781878708

js foveo.run collected 2026-10-03 21:33:06 UTC 3,004 bytes, 1 lines download raw bytes

1const f=()=>{const s={...window.themeCore.utils.cssClasses,animated:"animated"},h={searchType:"data-search-type",gridCol:"data-grid-cols",type:"data-type"},r={section:".js-search",tabButton:`[${h.searchType}]`,resultCounter:".js-search-result-counter",reset:".js-search-reset",input:".js-search-input",searchTypeInput:".js-search-types",gridViewButton:".js-grid-view-btn",gridViewButtons:".js-grid-view-buttons",grid:".js-grid-wrapper",searchBody:".js-search-body",typesWrapper:".js-search-types-wrapper"};async function p(){const o=await window.themeCore.utils.getExternalUtil("ProductFilters"),e=document.querySelector(r.section);o(e).init();const n=e.querySelector(r.input);await w(e),window.themeCore.EventBus.listen("compare-products:init",()=>{w(e)}),e.addEventListener("click",t=>{!t.target.closest(r.reset)||!n||(t.preventDefault(),n.value="")});const l=[...e.querySelectorAll(r.gridViewButton)];l.length>0&&g(l),e.classList.add(s.animated)}async function w(o){let e=new URL(window.location.href);e.searchParams.set("view","count");const n=o.querySelectorAll(r.tabButton),l=[...n].find(a=>a.classList.contains(s.active));if(l){const a=l.closest(r.typesWrapper),d=l.offsetLeft;a.scrollTo({left:d,behavior:"smooth"})}let t=0;for(const a of n){const d=a.getAttribute(h.searchType);if(d!=="product"){const i=e.searchParams.get("q");e=new URL(e.origin+e.pathname),e.searchParams.set("view","count"),e.searchParams.set("q",i)}e.searchParams.set("type",d);try{const u=await(await fetch(e.toString())).text();a.innerText=window.themeCore.translations.get(`sections.search_template.${d}s`,{count:u}),t+=+u}catch(i){console.log(i)}finally{const i=document.querySelector(r.searchTypeInput).value;if(d==="product"&&(i==null?void 0:i.split(",").length)!==1){a.click(),a.classList.add(s.active);const u=o.querySelector(r.searchBody);u==null||u.classList.remove(s.hidden)}}}const c=o.querySelector(r.resultCounter);c&&(c.innerText=window.themeCore.translations.get(`general.search.results_with_count.${t===1?"one":"other"}`,{count:t,terms:e.searchParams.get("q")}))}function g(o){const e=document.querySelector(r.grid),n=localStorage.getItem("search-grid-cols"),l=o.find(t=>+t.dataset.gridCols==4);if(n){const t=o.find(c=>c.dataset.gridCols===n);e.setAttribute(h.gridCol,n),l.classList.remove(s.active),t.classList.add(s.active)}o.forEach(function(t){t.addEventListener("click",function(){const c=t.getAttribute(h.gridCol);if(t.classList.contains(s.active))return;const a=[...o].find(i=>i.classList.contains(s.active)),d=t;a.classList.remove(s.active),d.classList.add(s.active),e.setAttribute(h.gridCol,c),c==="3"||c==="2"?localStorage.setItem("search-grid-cols",c):localStorage.removeItem("search-grid-cols")})})}return Object.freeze({init:p})},m=()=>{window.themeCore.SearchTemplate=window.themeCore.SearchTemplate||f(),window.themeCore.utils.register(window.themeCore.SearchTemplate,"search-template")};window.themeCore&&window.themeCore.loaded?m():document.addEventListener("theme:all:loaded",m,{once:!0});

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.