????JFIF??x?x????'
Server IP : 104.21.64.1 / Your IP : 216.73.216.145 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/tempvsty/buyeaa.com/wp-content/plugins/yith-woocommerce-compare/assets/js/ |
Upload File : |
(()=>{"use strict";var e={};function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){e=function(e,t){if("object"!=r(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0===o)return("string"===t?String:Number)(e);if("object"!=r(e=o.call(e,t||"default")))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==r(e)?e:e+""}function n(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function o(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var r,n,a,i,c=[],l=!0,u=!1;try{if(a=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;l=!1}else for(;!(l=(r=a.call(o)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,n=e}finally{try{if(!l&&null!=o["return"]&&(i=o["return"](),Object(i)!==i))return}finally{if(u)throw n}}return c}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=Array(t);o<t;o++)r[o]=e[o];return r}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||o(e,t)||function(e,t){var o;if(e)return"string"==typeof e?i(e,t):"Map"===(o="Object"===(o={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?i(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var l=function l(e){"undefined"!=typeof jQuery.fn.block&&e.addClass("js-blocked").block({message:null,overlayCSS:{background:"#fff url("+yith_woocompare.loader+") no-repeat center",backgroundSize:"20px 20px",opacity:.6}})},u=function u(e){"undefined"!=typeof jQuery.fn.unblock&&e.removeClass("js-blocked").unblock()},p=function p(e){var t=document.cookie.split(";").reduce(function(e,t){var t=c(t.trim().split("="),2),o=t[0],t=t[1];return e[o]=t,e},{});return null==t?void 0:t[e]},s=jQuery,f=s(document),d=s(document.body),h=s(window);function t(t,e){var o,r=Object.keys(t);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(t),e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)),r}function y(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?t(Object(n),!0).forEach(function(e){var t,o;t=r,o=n[e=e],(e=a(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var m,v=function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");d.hasClass("elementor-editor-active")||(this.refresh(),this.init())}return t=e,(o=[{key:"init",value:function(){this.initTables(),this.initEvents(),this.initWidget()}},{key:"initEvents",value:function(){var t=this;d.on("added_to_cart",this.onAddedToCart),h.on("resize orientationchange",function(){return t.initTables()}),f.on("yith_woocompare_refresh_table yith_woocompare_table_updated",function(){return t.initTables()}),f.on("yith_woocompare_table_updated",function(){return t.initSlider()}),f.on("click","a.compare:not(.added)",function(e){return e.preventDefault(),t.add(s(e.target))}),f.on("click",".compare-list .remove a, a.yith_woocompare_clear",function(e){return e.preventDefault(),t.remove(s(e.target))}),f.on("click",'a.compare.added input[type="checkbox"]',function(e){return e.preventDefault(),t.remove(s(e.target)),!1}),f.on("yith_woocompare_open_popup",function(e){return e.preventDefault(),t.openPopup()}),f.on("click","a.compare.added",function(e){return e.preventDefault(),t.openPopup()}),f.on("click",".yith-woocompare-open a, a.yith-woocompare-open",function(e){return e.preventDefault(),t.openPopup()}),f.on("click","#yith-woocompare-cat-nav li > a",function(e){return e.preventDefault(),t.filter(s(e.target))})}},{key:"getTables",value:function(){var e=0<arguments.length&&arguments[0]!==undefined&&arguments[0],t=f.find("#yith-woocompare table.compare-list");return t=e?t:t.not(".dataTable")}},{key:"initTables",value:function(){var e,t=this;"undefined"!=typeof s.fn.DataTable&&"undefined"!=typeof s.fn.imagesLoaded&&(e=this.getTables()).length&&e.get().map(function(e){return t.initTable(s(e))})}},{key:"initTable",value:function(e){e.DataTable().destroy(),e.imagesLoaded(function(){e.DataTable({info:!1,scrollX:!0,scrollCollapse:!0,paging:!1,ordering:!1,searching:!1,autoWidth:!1,destroy:!0,fixedColumns:{leftColumns:yith_woocompare.fixedcolumns},columnDefs:[{width:250,targets:0}]})})}},{key:"initSlider",value:function(){var e,t,o;"undefined"!=typeof s.fn.owlCarousel&&(e=s("#yith-woocompare-related"),t=e.find(".related-products"),o=e.find(".related-slider-nav"),e.length)&&(t.owlCarousel({autoplay:yith_woocompare.autoplay_related,autoplayHoverPause:!0,loop:!0,margin:15,responsiveClass:!0,responsive:{0:{items:2},480:{items:3},768:{items:yith_woocompare.num_related}}}),o.length)&&(o.find(".related-slider-nav-prev").click(function(){t.trigger("prev.owl.carousel")}),o.find(".related-slider-nav-next").click(function(){t.trigger("next.owl.carousel")}))}},{key:"initWidget",value:function(){var t=this;f.on("click",".yith-woocompare-widget a.compare-widget",function(e){return e.preventDefault(),t.openPopup()}).on("click",".yith-woocompare-widget li a.remove, .yith-woocompare-widget a.clear-all",function(e){return e.preventDefault(),t.remove(s(e.target))})}},{key:"add",value:function(a){var i=this,e=(a=a.closest("[data-product_id]"),yith_woocompare),c=e.added_label,l=e.auto_open,u=e.is_page,p=a.data("product_id"),d=a.closest(".yith-woocompare-related").length;return this.doAjax(a,"add",{id:p}).success(function(e){var t=e.only_one,o=e.table_url,r=e.limit_reached,n=e.added;n&&!d&&(a.addClass("added").attr("href",o).find('input[type="checkbox"]').prop("checked",!0).change().end().find(".label").html(c),!l||t||u||f.trigger("yith_woocompare_open_popup",{response:o,button:a})),r&&s(".compare:not(.added)").addClass("disabled"),i.replaceFragments(e),i.refreshCounter(),n&&f.trigger("yith_woocompare_product_added",{productId:p,$initiator:a})})}},{key:"remove",value:function(c){var l=this,u=(c=c.closest("[data-product_id]")).data("product_id");return this.doAjax(c,"remove",{id:u}).success(function(e){var t=yith_woocompare,o=t.custom_label_for_compare_button,r=t.selector_for_custom_label_compare_button,t=t.button_text,n=e.limit_reached,a=e.removed,i="all"===u?".compare.added":'.compare[data-product_id="'.concat(u,'"]'),o=o?c.closest("tbody").find("tr ".concat(r)).find("td.product_".concat(u)).text():t;a&&s(i,window.parent.document).removeClass("added").find('input[type="checkbox"]').prop("checked",!1).change().end().find(".label").html(o),n||s(".compare:not(.added)").removeClass("disabled"),l.replaceFragments(e),l.refreshCounter(),a&&f.trigger("yith_woocompare_product_removed",{productId:u,$initiator:c})})}},{key:"filter",value:function(e){var t=this,o=(e=e.closest("[data-cat_id]")).closest("#yith-woocompare-cat-nav > ul"),r=e.data("cat_id"),o=o.data("product_ids");return this.doAjax(e,"filter",{yith_compare_cat:r,yith_compare_prod:o}).success(function(e){t.replaceFragments(e),t.refreshCounter()})}},{key:"maybeShowPreviewBar",value:function(){var e=s("#yith-woocompare-preview-bar");e.hasClass("shown")&&e.show()}},{key:"hidePreviewBar",value:function(){s("#yith-woocompare-preview-bar").hide()}},{key:"openPopup",value:function(){var e=this,t=yith_woocompare,o=t.force_showing_popup,r=t.page_url;t.is_page||!o&&h.width<768?window.location=r:(t=(t=s(".yith-woocompare-popup-container")).length?t:this.buildPopupContainer(),s("html, body").css("overflow","hidden"),d.addClass("yith-woocompare-popup-open"),t.show(),this.hidePreviewBar(),this.refreshFragments().then(function(){return e.hidePreviewBar()}))}},{key:"closePopup",value:function(){var e=s(".yith-woocompare-popup-container");e.length&&(e.hide(),s("html, body").css("overflow","auto"),d.removeClass("yith-woocompare-popup-open"),this.maybeShowPreviewBar())}},{key:"buildPopupContainer",value:function(){var e=this,t=s("<a/>",{href:"#",role:"button",html:"×","class":"yith-woocompare-popup-close"}),o=s("<div/>",{"class":"yith-woocompare-popup-container"}),r=s("<div/>",{"class":"yith-woocompare-table-wrapper"}),n=s("<div/>",{"class":"yith-woocompare-table-scroll-wrapper"}),a=s("<div/>",{id:"yith-woocompare","class":"yith-woocompare-table-placeholder"});return n.prepend(t).append(a).appendTo(r),o.append(r).appendTo("body"),t.on("click",function(){return e.closePopup()}),o}},{key:"redirectToPage",value:function(){}},{key:"doAjax",value:function(e,t,o){var r,n=null==(n=yith_woocompare)||null==(n=n.actions)?void 0:n[t],t=null==(r=yith_woocompare)||null==(r=r.nonces)?void 0:r[t];return s.ajax({type:"post",url:this.getAjxUrl(n),data:y({action:n,security:t,context:"frontend",lang:e.data("lang")},o||{}),dataType:"json",cache:!1,beforeSend:function(){return l(e)},complete:function(){return u(e)},error:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return console.log(t)}})}},{key:"getAjxUrl",value:function(e){return yith_woocompare.ajaxurl.toString().replace("%%endpoint%%",e)}},{key:"refresh",value:function(){this.refreshFragments(),this.refreshCounter()}},{key:"refreshFragments",value:function(){var t=this,e=s(".yith-woocompare-widget-content").add("#yith-woocompare:not(.fixed-compare-table)").add("#yith-woocompare-preview-bar");if(e.length)return this.doAjax(e,"reload").success(function(e){return t.replaceFragments(e)})}},{key:"refreshCounter",value:function(){var e=s(".yith-woocompare-counter");if(e.length){var t,o=yith_woocompare.cookie_name,r=e.data("type"),n=e.data("text_o"),o=p(o);try{t=o?JSON.parse(o).length:0}catch(a){return}e.find(".yith-woocompare-count").html("text"===r?n.replace("{{count}}",t):t),f.trigger("yith_woocompare_counter_updated",t)}}},{key:"replaceFragments",value:function(e){var t=e.table_html,o=e.widget_html,r=e.preview_bar_html;t&&(s("#yith-woocompare:not(.fixed-compare-table)").replaceWith(t),f.trigger("yith_woocompare_table_updated")),o&&(s(".yith-woocompare-widget-content").replaceWith(o),f.trigger("yith_woocompare_widget_updated")),r&&s("#yith-woocompare-preview-bar").replaceWith(r),f.trigger("yith_woocompare_fragments_replaced",e)}},{key:"onAddedToCart",value:function(e,t,o,r){r=s(r);r.closest("table.compare-list").length&&r.hide()}}])&&n(t.prototype,o),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,o,r}(),w=(h.yithCompare=new v,window);for(m in e)w[m]=e[m];e.__esModule&&Object.defineProperty(w,"__esModule",{value:!0})})();