1!function(o,r){"use strict";o.Cookies||console.error("WooCommerce Cookies Jar is not available.");var e=function(){function o(){null===window.localStorage.getItem(this.STORAGE_KEY)&&window.localStorage.setItem(this.STORAGE_KEY,"[]")}return Object.defineProperty(o.prototype,"STORAGE_KEY",{value:"zooProductsCompareItems",writable:!1,enumerable:!1,configurable:!1}),o.prototype.add=function(o){var e=this.list();if(o=parseInt(o,10),-1!==e.indexOf(o))return!1;e.push(o);var t=JSON.stringify(e);return window.localStorage.setItem(this.STORAGE_KEY,t),Cookies.remove(this.STORAGE_KEY),Cookies.set(this.STORAGE_KEY,t),!0},o.prototype.exists=function(o){return-1!==this.list().indexOf(o)},o.prototype.remove=function(o){var e=this.list(),t=e.indexOf(o);if(-1===t)return!1;e.splice(t,1);var n=JSON.stringify(e);return window.localStorage.setItem(this.STORAGE_KEY,n),Cookies.remove(this.STORAGE_KEY),Cookies.set(this.STORAGE_KEY,n),!0},o.prototype.list=function(){return JSON.parse(window.localStorage.getItem(this.STORAGE_KEY))},o.prototype.clear=function(){window.localStorage.setItem(this.STORAGE_KEY,"[]"),Cookies.remove(this.STORAGE_KEY)},o}(),t=function(){function o(){this.panel=r(".products-compare-panel"),this.counter=r(".products-compare-counter"),this.addBtn=".add-to-products-compare",this.removeBtn=".remove-from-products-compare",this.browseBtn=".browse-products-compare:not(.redirect-link)",this.panel.length||(this.renderPanel(),this.panel=r(".products-compare-panel"))}return o.prototype.renderPanel=function(o){o=o||"<p>"+zooProductsCompareCDATA.compareIsEmpty+"</p>",this.panel.length?this.panel.find(".products-compare-panel-inner").html(o):r("body").append('<div class="products-compare-panel zoo-popup-panel" style="display:none"><div class="popup-mask-close loading"></div><button class="products-compare-panel-close-btn popup-close-btn" type="button" name="close-button"><i class="zoo-icon-close"></i></button><div class="products-compare-panel-inner zoo-popup-inner">'+o+"</div></div>")},o.prototype.renderAddButton=function(o){if(!o instanceof jQuery)throw new TypeError("Factoring wishlist button is not an instance of jQuery.");o.hasClass("browse-products-compare")&&o.removeClass("browse-products-compare"),o.hasClass("add-to-products-compare")||o.addClass("add-to-products-compare"),o.attr("title",zooProductsCompareCDATA.addToCompare),o.html(zooProductsCompareCDATA.addToCompareIcon+zooProductsCompareCDATA.addToCompare)},o.prototype.renderBrowseButton=function(o){if(!o instanceof jQuery)throw new TypeError("Factoring wishlist button is not an instance of jQuery.");(o=r(".zoo-compare-button[data-id="+o.data("id")+"]")).removeClass("add-to-products-compare"),o.not(".browse-products-compare").addClass("browse-products-compare"),o.attr("title",zooProductsCompareCDATA.browseCompare),o.html(zooProductsCompareCDATA.browseCompareIcon+zooProductsCompareCDATA.browseCompare)},o}(),n=function(){function o(o,e){this.view=e,this.model=o,this.doingAJAX=!1;var t=this.model.list().length;this.view.counter.text(t),t<1?this.view.counter.addClass("zoo-hidden"):this.view.counter.removeClass("zoo-hidden"),this.updateAddButtonsActions(),this.listen()}return o.prototype.sync=function(o){if("zooProductsCompareItems"===o.key){var e=JSON.parse(window.localStorage.getItem("zooProductsCompareItems"));r(".products-compare-counter").text(e.length),e.length<1&&r(".products-compare-counter").addClass("zoo-hidden")}},o.prototype.updateAddButtonsActions=function(){var t=this,n=this.model.list();r(this.view.addBtn).each(function(o){if(!(!this instanceof HTMLElement)){var e=parseInt(this.dataset.id);-1!==n.indexOf(e)&&t.view.renderBrowseButton(r(this))}})},o.prototype.addAction=function(o){o.preventDefault();var e=r(o.currentTarget),t=e.data("id");if(e.hasClass("browse-products-compare"))return this.browseAction(o);if(this.model.exists(t))this.view.renderBrowseButton(e);else if(this.model.add(t)){if(this.view.renderBrowseButton(e),this.view.counter.removeClass("zoo-hidden"),this.view.counter.text(this.model.list().length),!e.hasClass("redirect-link"))return this.browseAction(o);r(document).find(".zoo-product-popup-notice")[0]?r(document).find(".zoo-product-popup-notice").addClass("active"):(r("body").append('<div class="zoo-product-popup-notice">'+e.data("label-added")+"</div>"),setTimeout(function(){r(document).find(".zoo-product-popup-notice").addClass("active")},100)),setTimeout(function(){r(document).find(".zoo-product-popup-notice").removeClass("active")},1200)}else alert(zooProductsCompareCDATA.addToCompareErr)},o.prototype.removeAction=function(o){o.preventDefault();var e=r(o.currentTarget).data("id");if(this.model.remove(e)){var t=this.model.list().length;t?this.view.panel.find(".products-compare-row-"+e).remove():this.view.renderPanel("<p>"+zooProductsCompareCDATA.compareIsEmpty+"</p>"),this.view.counter.text(t),t<1&&this.view.counter.addClass("zoo-hidden")}}
1,o.prototype.browseAction=function(o){o.preventDefault();var e=this,t=this.model.list();e.view.panel.fadeIn(),t.length&&!this.doingAJAX?(this.doingAJAX=!0,r.ajax({method:"POST",url:ajaxurl,data:{action:"zoo_get_compare_products",compareItems:JSON.stringify(t)}}).done(function(o){e.doingAJAX=!1,e.view.renderPanel(o.html),e.view.removeBtn=".remove-from-products-compare",r(document).on("click",e.view.removeBtn,function(o){e.removeAction(o)}),e.view.panel.find(".zoo-popup-inner").fadeIn()})):e.view.panel.find(".zoo-popup-inner").fadeIn(),r(document).trigger("zoo_browse_compare")},o.prototype.listen=function(){var e=this;r(document).on("click",this.view.addBtn,function(o){e.addAction(o)}),r(this.view.removeBtn).length&&r(document).on("click",this.view.removeBtn,function(o){e.removeAction(o)}),r(document).on("click",this.view.browseBtn,function(o){e.browseAction(o)}),this.view.panel.find(".products-compare-panel-close-btn").on("click",function(o){e.view.panel.fadeOut()}),this.view.panel.find(".popup-mask-close").on("click",function(o){e.view.panel.fadeOut()}),window.addEventListener("storage",this.sync)},o}();r(document).ready(function(){o.zooProductsCompare=new n(new e,new t)})}(window,jQuery);
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.