1jQuery(function($) 2{cart_improvement_functions();cart_dropdown_improvement();track_ajax_add_to_cart();if($.fn.avia_sc_slider) 3{$(".shop_slider_yes ul").avia_sc_slider({appendControlls:false,group:true,slide:'.product',arrowControll:true,autorotationInterval:'parent'});} 4$('body.single-product').on('click','.single-product-main-image .avia-wc-30-product-gallery-lightbox',function(e) 5{e.preventDefault();var clicked=$(this),container=clicked.parents('.single-product-main-image'),img=container.find('.flex-active-slide a.lightbox-added').eq(0);if(img.length==0) 6{img=container.find('a.lightbox-added').eq(0);} 7if(clicked.hasClass('av-remove-size-attr')) 8{let img_tag=img.find('img').eq(0);if(img_tag.length) 9{img_tag.removeAttr('sizes');}} 10img.trigger('click');});product_add_to_cart_click();function avia_apply_quant_btn() 11{$(".quantity input[type=number]").each(function() 12{var number=$(this),current_val=number.val(),cloned=number.clone(true);if(('undefined'==typeof(current_val))||(''==(current_val+'').trim())) 13{var placeholder=cloned.attr('placeholder');placeholder=(('undefined'==typeof(placeholder))||(''==(placeholder+'').trim()))?1:placeholder;cloned.attr('value',placeholder);} 14var max=parseFloat(number.attr('max')),min=parseFloat(number.attr('min')),step=parseInt(number.attr('step'),10),newNum=cloned.insertAfter(number);newNum.addClass('no-spin-num');number.remove();setTimeout(function() 15{var minus=null,plus=null;if(newNum.next('.plus').length===0) 16{minus=$('<input type="button" value="-" class="minus">').insertBefore(newNum),plus=$('<input type="button" value="+" class="plus">').insertAfter(newNum);} 17else 18{minus=newNum.prev('.minus');plus=newNum.next('.plus');} 19minus.on('click',function() 20{var the_val=parseInt(newNum.val(),10);if(isNaN(the_val)) 21{the_val=0;} 22let new_step=parseInt(newNum.attr('step'),10);if(isNaN(new_step)) 23{new_step=step;} 24the_val-=new_step;the_val=the_val<0?0:the_val;the_val=the_val<min?min:the_val;newNum.val(the_val).trigger("change");});plus.on('click',function() 25{var the_val=parseInt(newNum.val(),10);if(isNaN(the_val)) 26{the_val=0;} 27let new_step=parseInt(newNum.attr('step'),10);if(isNaN(new_step)) 28{new_step=step;} 29the_val+=new_step;the_val=the_val>max?max:the_val;newNum.val(the_val).trigger("change");});},10);});} 30avia_apply_quant_btn();$(document).on('updated_cart_totals',avia_apply_quant_btn);setTimeout(first_load_amount,10);$('body').on('added_to_cart',update_cart_dropdown);$('body').on('wc_fragments_refreshed',avia_cart_dropdown_changed);$('.avia_mobile .sort-param').on('touchstart',function(){});function routeSorting() 31{let links=$('.avia-product-sorting .avia-product-sorting-link');links.on('click',function() 32{let el=$(this),href=el.attr('data-href'),li=el.closest('li');if(li.hasClass('current-param')) 33{return;} 34if('undefined'!=typeof href&&''!=href) 35{window.location.href=href;}});} 36routeSorting();});function avia_cart_dropdown_changed() 37{var the_html=jQuery('html'),cart=jQuery('body').is('.woocommerce-cart'),cart_counter=jQuery('.cart_dropdown .av-cart-counter'),menu_cart=jQuery('.cart_dropdown'),counter=0,wc30=jQuery('body').hasClass('avia-woocommerce-30');if(!cart) 38{return;} 39if(!wc30) 40{menu_cart.find('.cart_list li .quantity').each(function() 41{counter+=parseInt(jQuery(this).text(),10);});} 42else 43{counter=parseInt(cart_counter.text(),10);} 44if(counter==0) 45{cart_counter.removeClass('av-active-counter').text(counter);setTimeout(function(){the_html.removeClass('html_visible_cart');},200);} 46else if((cart_counter.length>0)&&(counter>0)) 47{setTimeout(function() 48{cart_counter.addClass('av-active-counter').text(counter);the_html.addClass('html_visible_cart');},10);} 49return;} 50function update_cart_dropdown(event) 51{var the_html=jQuery('html'),menu_cart=jQuery('.cart_dropdown'),cart_counter=jQuery('.cart_dropdown .av-cart-counter'),empty=menu_cart.find('.empty'),msg_success=menu_cart.data('success'),product=jQuery.extend({name:"Product",price:"",image:""},avia_clicked_product),counter=0,wc30=jQuery('body').hasClass('avia-woocommerce-30');if(cart_counter.length==0) 52{return;} 53if((empty.length>0)&&('undefined'!=typeof event))
54{the_html.addClass('html_visible_cart');} 55if(typeof event!=='undefined') 56{var header=jQuery('.html_header_sticky #header_main .cart_dropdown_first, .html_header_sidebar #header_main .cart_dropdown_first'),oldTemplates=jQuery('.added_to_cart_notification').trigger('avia_hide'),template=jQuery("<div class='added_to_cart_notification'><span class='avia-arrow'></span><div class='added-product-text'><strong>\""+product.name+"\"</strong> "+msg_success+"</div> "+product.image+"</div>").css('opacity',0);if(!header.length) 57{header='body';} 58template.on('mouseenter avia_hide',function() 59{template.animate({opacity:0,top:parseInt(template.css('top'),10)+15},function() 60{template.remove();});}).appendTo(header).animate({opacity:1},500);setTimeout(function() 61{template.trigger('avia_hide');},2500);} 62if('object'==typeof event&&'added_to_cart'==event.type&&wc30) 63{return;} 64setTimeout(function() 65{if(!wc30) 66{menu_cart.find('.cart_list li .quantity').each(function() 67{counter+=parseInt(jQuery(this).text(),10);});} 68else 69{counter=cart_counter.text();} 70if((cart_counter.length>0)&&(counter>0)) 71{setTimeout(function() 72{cart_counter.addClass('av-active-counter').text(counter);},10);}},300);} 73var avia_clicked_product={};function track_ajax_add_to_cart() 74{jQuery('body').on('click','.add_to_cart_button',function(e) 75{var productContainer=jQuery(this).parents('.product').eq(0),product={};product.name=productContainer.find('.woocommerce-loop-product__title').text();product.image=productContainer.find('.thumbnail_container img');product.price=productContainer.find('.price .amount').last().text();if(product.name==="") 76{product.name=productContainer.find('.inner_product_header h3').text();} 77if(productContainer.length===0) 78{productContainer=jQuery(this);product.name=productContainer.find('.av-cart-update-title').text();product.image=productContainer.find('.av-cart-update-image');product.price=productContainer.find('.av-cart-update-price').text();} 79if(product.image.length) 80{product.image="<img class='added-product-image' src='"+product.image.get(0).src+"' title='' alt='' />";} 81else 82{product.image="";} 83avia_clicked_product=product;});} 84function first_load_amount() 85{var counter=0,limit=15,ms=500,check=function() 86{var new_total=jQuery('.cart_dropdown .dropdown_widget_cart').eq(0).find('.total .amount');if(new_total.length) 87{update_cart_dropdown();} 88else 89{counter++;if(counter<limit) 90{setTimeout(check,ms);}}};check();if(jQuery('.av-display-cart-on-load').length&&jQuery('.woocommerce-message').length===0) 91{var dropdown=jQuery('.cart_dropdown');setTimeout(function() 92{dropdown.trigger('mouseenter');},500);setTimeout(function() 93{dropdown.trigger('mouseleave');},2500);}} 94function product_add_to_cart_click() 95{var jbody=jQuery('body'),catalogue=jQuery('.av-catalogue-item'),loader=false;if(catalogue.length) 96{loader=jQuery.avia_utilities.loading();} 97jbody.on('click','.add_to_cart_button',function(e) 98{var button=jQuery(this);button.parents('.product').eq(0).addClass('adding-to-cart-loading').removeClass('added-to-cart-check');if(button.is('.av-catalogue-item')) 99{loader.show();} 100var $html=jQuery('html');if(!$html.hasClass('html_visible_cart')) 101{$html.addClass('html_visible_cart');}});jbody.on('added_to_cart',function() 102{jQuery('.adding-to-cart-loading').removeClass('adding-to-cart-loading').addClass('added-to-cart-check');if(loader!==false) 103{loader.hide();}});} 104function cart_improvement_functions() 105{jQuery('.product_type_downloadable, .product_type_virtual').addClass('product_type_simple');jQuery('.woocommerce-tabs .tabs a').addClass('no-scroll');jQuery('.single-product-main-image>.images a').attr('rel','product_images[grouped]');} 106function cart_dropdown_improvement() 107{var dropdown=jQuery('.cart_dropdown'),icon=dropdown.find('.cart_dropdown_link'),subelement=dropdown.find('.dropdown_widget').css({display:'none',opacity:0});icon.on('focus',function() 108{dropdown.trigger('mouseenter');}).on('blur',function() 109{dropdown.trigger('mouseleave');});dropdown.on('mouseenter',function() 110{const content=dropdown.find('.widget_shopping_cart_content');if(jQuery.trim(content.html()).length) 111{subelement.css({display:'block'}).stop().animate({opacity:1});}}).on('mouseleave',function() 112{subelement.stop().animate({opacity:0}
112,function(){subelement.css({display:'none'});});});}
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.