1var d=(n,t,e)=>new Promise((r,o)=>{var u=i=>{try{s(e.next(i))}catch(c){o(c)}},l=i=>{try{s(e.throw(i))}catch(c){o(c)}},s=i=>i.done?r(i.value):Promise.resolve(i.value).then(u,l);s((e=e.apply(n,t)).next())});import a from"./custom-html-element-Cddc4xm8.js";import"./logger-pamvzmAu.js";import"./exports-NHIMKJG4.js";import"./event-zU-Y6ZHH.js";class p extends a{connectedCallback(){return d(this,null,function*(){if(this.searchQueryString==="")return;const t=yield fetch(`${window.themeVariables.routes.searchUrl}?type=product&q=${this.searchQueryString}§ion_id=${this.sectionId}`),e=document.createElement("div");e.innerHTML=yield t.text();const r=e.querySelector("recently-viewed-products");r.hasChildNodes()&&(this.innerHTML=r.innerHTML)})}get searchQueryString(){const t=JSON.parse(localStorage.getItem("theme:recently-viewed-products")||"[]");return this.hasAttribute("exclude-product-id")&&t.includes(parseInt(this.getAttribute("exclude-product-id")))&&t.splice(t.indexOf(parseInt(this.getAttribute("exclude-product-id"))),1),t.map(e=>"id:"+e).slice(0,this.productsCount).join(" OR ")}get sectionId(){return this.getAttribute("section-id")}get productsCount(){return this.getAttribute("products-count")||4}}window.customElements.get("recently-viewed-products")||window.customElements.define("recently-viewed-products",p);
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.