!function(a){"use strict";var o=function(o,e){var t=a(o).data("id");a.ajax({type:"POST",dataType:"json",url:ultimate_store_kit_ajax_config.ajaxurl,data:{action:"ultimate_store_kit_compare_products_quick_view_content",product_id:t,security:e.find("#usk-compare-products-modal-sc").val()},success:function(o){a("#usk-grid-modal-response").html(o.data)}})},e=function(a,e){e("body").append('<div class="modal micromodal-slide" id="usk-grid-modal" aria-hidden="false"><div class="modal__overlay" tabindex="-1" data-custom-close=""><div id="usk-grid-modal-response" class="modal__container" role="dialog" aria-modal="true" aria-labelledby="modal-btn-title"></div></div></div>'),MicroModal.init({openTrigger:"data-micromodal-trigger",closeTrigger:"data-micromodal-close",disableScroll:!0,disableFocus:!1,awaitOpenAnimation:!1,awaitCloseAnimation:!1,debugMode:!0}),a.on("click",".usk-view-btn",function(e){e.preventDefault(),o(this,a)})};a(".ajax_remove_from_wishlist").on("click",function(o){o.preventDefault();var e=a(this),t=e.data("product_id");a.ajax({url:ultimate_store_kit_ajax_config.ajaxurl,data:{action:"usk_remove_wishlist",product_id:t,nonce:ultimate_store_kit_ajax_config.nonce},type:"POST",dataType:"JSON",success:function(a){"removed"==a.action&&e.closest("tr").remove()},error:function(a){console.log(a)}})}),jQuery(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/usk-compare-products.default",e)})}(jQuery,window.elementorFrontend);