1function asyncGeneratorStep(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function _async_to_generator(i){return function(){var e=this,c=arguments;return new Promise(function(t,n){var r=i.apply(e,c);function o(e){asyncGeneratorStep(r,t,n,o,a,"next",e)}function a(e){asyncGeneratorStep(r,t,n,o,a,"throw",e)}o(void 0)})}}function _ts_generator(r,o){var a,c,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),e=Object.defineProperty;return e(u,"next",{value:t(0)}),e(u,"throw",{value:t(1)}),e(u,"return",{value:t(2)}),"function"==typeof Symbol&&e(u,Symbol.iterator,{value:function(){return this}}),u;function t(n){return function(e){var t=[n,e];if(a)throw new TypeError("Generator is already executing.");for(;l=u&&t[u=0]?0:l;)try{if(a=1,c&&(i=2&t[0]?c.return:t[0]?c.throw||((i=c.return)&&i.call(c),0):c.next)&&!(i=i.call(c,t[1])).done)return i;switch(c=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,c=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=o.call(r,l)}catch(e){t=[6,e],c=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}(()=>{function r(t){var e=c(),n=e.some(function(e){return e.id===t.id});if(a=!0,n)i(t.id);else{if(3<e.length)return;e.push(t),localStorage.setItem("ltxCompareProducts",JSON.stringify(e))}l()}function o(r){return _async_to_generator(function(){var t,n;return _ts_generator(this,function(e){switch(e.label){case 0:return r.preventDefault(),t=c(),t=t.map(function(e){return parseInt(e.id)}),n=new FormData,document.body.classList.add("loading-comparison-modal"),n.append("action","ltx_comparison_table"),t.forEach(function(e){return n.append("product_ids[]",e)}),n.append("security",window.rmgProductsBlock.security),[4,fetch(window.rmgProductsBlock.ajaxurl,{method:"POST",body:n}).then(function(e){return e.text()}).then(function(e){window.rmgOpenModal(JSON.parse(e).data.output),document.body.classList.remove("loading-comparison-modal")}).catch(function(e){return console.log(e)})];case 1:return e.sent(),[2]}})})()}function e(){var r,e=c(),o=document.getElementById("productComparisonBanner");o.querySelector(".compare-items").innerHTML="",a&&o.classList.add("expanded"),e.length<1?o.querySelector(".compare-items").innerHTML="":(r=document.getElementById("tmplComparisonItem"),o.querySelector(".compare-count").innerText=e.length,e.forEach(function(t){var e=r.content.cloneNode(!0),n=e.querySelector(".comparison-item");e.querySelector(".image-link").innerHTML=t.image,e.querySelector(".product-title").textContent=t.title,n.dataset.prodid=t.id,e.querySelectorAll(".product-link").forEach(function(e){e.href=t.permalink}),e.querySelector(".remove-item").addEventListener("click",function(e){e.preventDefault(),i(t.id)}),o.querySelector(".compare-items").append(e)}))}var a=!1,t=!0,c=function(){return JSON.parse(localStorage.getItem("ltxCompareProducts"))||[]},i=function(t){var e=c().filter(function(e){return e.id!==t});localStorage.setItem("ltxCompareProducts",JSON.stringify(e)),a=!0,l()},l=function(){var t=c().map(function(e){return parseInt(e.id)});document.querySelectorAll(".toggle-compare").forEach(function(e){if(e.classList.toggle("selected",-1!==t.indexOf(parseInt(e.dataset.prodid))),e.compareInit)return!0;e.compareInit=!0,e.addEventListener("click",function(e){e.preventDefault();var t=e.target.closest(".product"),n=t.querySelector(".product-title"),t=(t=t.querySelector(".product-image a"))&&t.innerHTML,e=e.target.dataset.prodid;r({id:e,title:n.textContent,image:t,permalink:n.href})})}),e()};document.addEventListener("rmgBlockLoaded/products",function(e){var t=e.detail.elem,e=e.detail.elem.querySelectorAll('button[data-action="setviewmode"]'),e=(e.length&&(t.dataset.viewmode=localStorage.getItem("ltxProdViewMode")||"grid",e.forEach(function(e){e.addEventListener("click",function(e){e.preventDefault(),t.dataset.viewmode=e.currentTarget.dataset.viewmode,localStorage.setItem("ltxProdViewMode",e.currentTarget.dataset.viewmode)})})),document.querySelector(".clear-comparison")),e=(e&&e.addEventListener("click",function(e){e.preventDefault(),localStorage.removeItem("ltxCompareProducts"),a=!0,l()}),document.querySelector(".toggle-banner")),e=(e&&e.addEventListener("click",function(e){e.preventDefault(),document.getElementById("productC
1omparisonBanner").classList.toggle("expanded")}),document.querySelector(".open-compare-modal")),n=(e&&e.addEventListener("click",o),document.querySelector(".compare-tooltip"));document.querySelectorAll(".toggle-compare").forEach(function(t){t.addEventListener("mouseenter",function(e){3<c().length&&!t.classList.contains("selected")&&n.classList.add("visible")}),t.addEventListener("mousemove",function(e){n.style.top=e.pageY+30+"px",n.style.left=e.pageX+30+"px"}),t.addEventListener("mouseleave",function(){n.classList.remove("visible")})})}),document.addEventListener("facetwp-loaded",l),document.addEventListener("facetwp-refresh",function(){t?t=!1:document.querySelector(".wp-block-rmg-products").scrollIntoView({block:"start",behavior:"smooth"})})})();
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.