1var botiga=botiga||{};botiga.quickView={init:function(){this.build(),this.events()},build:function(){var e=document.querySelectorAll(".botiga-quick-view"),o=document.querySelector(".botiga-quick-view-popup"),t=document.querySelector(".botiga-quick-view-popup-close-button"),a=document.querySelector(".botiga-quick-view-popup-content-ajax");if(null===o)return!1;t.addEventListener("click",function(e){e.preventDefault()}),o.addEventListener("click",function(e){null===e.target.closest(".botiga-quick-view-popup-content-ajax")&&o.classList.remove("opened")});for(var i=0;i<e.length;i++)e[i].addEventListener("click",function(e){e.preventDefault();var t=e.target.getAttribute("data-product-id"),e=e.target.getAttribute("data-nonce"),i=(o.classList.add("opened"),o.classList.add("loading"),new XMLHttpRequest);i.open("POST",botiga.ajaxurl,!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onload=function(){var e,t;200<=this.status&&this.status<400&&(a.innerHTML=this.response,e=jQuery(a),botiga.quickView&&botiga.quickView.add_to_cart_ajax&&botiga.quickView.add_to_cart_ajax.init(e),(t=e.find(".woocommerce-product-gallery")).length&&(t.trigger("wc-product-gallery-before-init",[t.get(0),wc_single_product_params]),t.wc_product_gallery(wc_single_product_params),t.trigger("wc-product-gallery-after-init",[t.get(0),wc_single_product_params])),botiga.variationGallery&&botiga.variationGallery.init(e),botiga.sizeChart&&botiga.sizeChart.init(e),botiga.productSwatch&&botiga.productSwatch.variationMouseOver&&botiga.productSwatch.variationMouseOver(),t=document.querySelector(".botiga-quick-view-summary .variations_form"),"undefined"!=typeof wc_add_to_cart_variation_params&&jQuery(t).wc_variation_form(),botiga.qtyButton.init("quick-view"),void 0!==botiga.wishList&&botiga.wishList.init(),e.find(".variations_form").each(function(){if(!0===jQuery(this).data("misc-variations"))return!1;botiga.misc.moveResetVariationButton(jQuery(this)),botiga.misc.checkIfHasVariationSelected(jQuery(this)),jQuery(this).on("woocommerce_variation_select_change",function(){botiga.misc.checkIfHasVariationSelected(jQuery(this))}),jQuery(this).data("misc-variations",!0)}),window.dispatchEvent(new Event("botiga.quickview.ajax.loaded")),o.classList.remove("loading"))},i.send("action=botiga_quick_view_content&product_id="+t+"&nonce="+e)})},events:function(){var e=this;window.addEventListener("botiga.carousel.initialized",function(){e.build()})}},botiga.quickView.add_to_cart_ajax={isBound:!1,isProcessing:!1,init:function(){this.isBound||(this.bindEvents(),this.isBound=!0)},bindEvents:function(){var r=this;jQuery(document).on("click",".botiga-quick-view-summary form.cart .single_add_to_cart_button",function(e){var o,a=jQuery(e.currentTarget),t=a.closest("form.cart");a.hasClass("disabled")||a.prop("disabled")||(e.preventDefault(),e.stopPropagation(),r.isProcessing)||t.length&&t.attr("action")&&(r.isProcessing=!0,e=a.val()||t.find('input[name="add-to-cart"]').val()||t.find('input[name="product_id"]').val(),e=r.buildRequestData(t,e),o=r.getNoticeTarget(),a.data("botigaQuickViewLastResult","error"),jQuery(document.body).trigger("adding_to_cart",[a,e]),jQuery.ajax({type:"POST",url:t.attr("action"),data:e,beforeSend:function(){a.prop("disabled",!0),a.removeClass("added").addClass("loading"),r.clearNotices(o)},complete:function(){a.prop("disabled",!1),a.addClass("added").removeClass("loading"),r.isProcessing=!1},success:function(e){r.refreshFragments();var e=jQuery(e),t=Boolean(e.find(".woocommerce-error").length),i=Boolean(e.find(".woocommerce-message").length);t?(r.renderNotice("error",e,o),a.data("botigaQuickViewLastResult","error")):i&&(r.renderNotice("message",e,o),a.data("botigaQuickViewLastResult","success"),jQuery(document.body).trigger("added_to_cart",[null,null,a]),setTimeout(function(){},300))},error:function(){r.isProcessing=!1,jQuery(document.body).trigger("wc_ajax_error",[a])}}))})},buildRequestData:function(e,t){e=e.serialize();return t?"add-to-cart=".concat(encodeURIComponent(t),"&").concat(e):e},getNoticeTarget:function(){var e,t=jQuery(".botiga-quick-view-popup-content-ajax");return t.length?((e=t.find(".woocommerce-notices-wrapper")).length||(e=jQuery('<div class="woocommerce-notices-wrapper"></div>'),t.prepend(e)),e):jQuery(".botiga-quick-view-popup-content-ajax")},clearNotices:function(e){e&&e.length&&e.find(".woocommerce-error, .woocommerce-message, .woocommerce-info").remove()},renderNotice:function(e,t,i){i&&i.length&&(e=".woocommerce-".concat(e),(t=t.find(e).first()).length)&&i.append(t.clone(!0,!0))},refreshFragments:function(){var e=window.woocommerce_params&&window.woocommerce_params.ajax_url?window.woocommerce_params.ajax_url:window.botiga&&window.botiga.ajaxurl?window.botiga.ajaxurl:"";e&&jQuery.ajax({type:"POST",url:e,data:{action:"woocommerce_get_refreshed_fragments"},success:function(e){e&&e.fragments&&(jQuery.each(e.fragments,function(e,t){jQuery(e).replaceWith(t)}),jQuery("body").trigger("wc_fragments_refreshed"))}})}},jQuery(document).ready(function(){botiga.quickView.init()});
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.