1'use strict';(function($){var woofc_timeout=null;$(function(){if(woofc_vars.reload==='yes'){woofc_cart_reload()} 2if((woofc_vars.auto_show_normal==='yes')&&(woofc_vars.show_cart==='yes')){setTimeout(function(){if(woofc_vars.instant_checkout==='yes'&&woofc_vars.instant_checkout_open==='yes'){woofc_show_cart('checkout')}else{woofc_show_cart()} 3if(woofc_vars.confetti){woofc_confetti()}},woofc_vars.delay)} 4if((woofc_vars.auto_show_normal==='yes')&&(woofc_vars.show_cart!=='yes')&&(woofc_vars.show_checkout==='yes')&&(woofc_vars.instant_checkout==='yes')){setTimeout(function(){woofc_show_cart('checkout')},woofc_vars.delay)}});$(document).on('click touch','#woofc-area .woosq-link, #woofc-area .woosq-btn',function(e){woofc_hide_cart();e.preventDefault()});$(document.body).on('added_to_cart',function(e,fragments,cart_hash,$button){if($('.woofc-checkout-form').length&&!$('.woofc-checkout-form .woocommerce-checkout').length){var data={action:'woofc_get_checkout_form',nonce:woofc_nonce(),};$.post(woofc_vars.wc_ajax_url.toString().replace('%%endpoint%%','woofc_get_checkout_form'),data,function(response){$('.woofc-checkout-form').html(response);if(woofc_vars.wc_checkout_js!==''){$.getScript(woofc_vars.wc_checkout_js)}})} 5if($('.woofc-checkout-area').length&&(woofc_vars.instant_checkout==='yes')){$(document.body).trigger('update_checkout',{update_shipping_method:!1})} 6if(woofc_vars.auto_show==='yes'){setTimeout(function(){if(woofc_vars.instant_checkout==='yes'&&woofc_vars.instant_checkout_open==='yes'){woofc_show_cart('checkout')}else{woofc_show_cart()} 7if(woofc_vars.confetti){woofc_confetti()}},woofc_vars.delay)} 8if($button&&$button.closest('.woofc-save-for-later').length){$(document.body).trigger('wc_fragment_refresh')}});$(document.body).on('wc_fragments_loaded',function(){woofc_cart_loaded()});$(document.body).on('wc_fragments_refreshed',function(){woofc_cart_loaded()});$(document.body).on('woofc_cart_reload',function(){if(woofc_vars.is_cart&&$('form.woocommerce-cart-form').length){$(document.body).trigger('wc_update_cart')} 9if(woofc_vars.is_checkout&&$('form.woocommerce-checkout').length){$(document.body).trigger('update_checkout',{update_shipping_method:!1})}});if(woofc_vars.manual_show!==''){$(document).on('click touch',woofc_vars.manual_show,function(e){woofc_toggle_cart();e.preventDefault()})} 10$(document).on('click touch','.woofc-item-qty-plus, .woofc-item-qty-minus',function(){var $qty=$(this).closest('.woofc-item-qty').find('.qty'),val=parseFloat($qty.val()),max=parseFloat($qty.attr('max')),min=parseFloat($qty.attr('min')),step=$qty.attr('step');if(!val||val===''||val==='NaN'){val=0} 11if(max===''||max==='NaN'){max=''} 12if(min===''||min==='NaN'){min=0} 13if(step==='any'||step===''||step===undefined||parseFloat(step)==='NaN'){step=1}else{step=parseFloat(step)} 14if($(this).is('.woofc-item-qty-plus')){if(max&&(max===val||val>max)){$qty.val(max)}else{$qty.val((val+step).toFixed(woofc_decimal_places(step)))}}else{if(val-step<=0){if((woofc_vars.confirm_remove==='yes')){if(confirm(woofc_vars.confirm_remove_text)){woofc_remove_item($qty.closest('.woofc-item'))}}else{woofc_remove_item($qty.closest('.woofc-item'))} 15return!1} 16if(min&&(min===val||val<min)){$qty.val(min)}else if(val>0){$qty.val((val-step).toFixed(woofc_decimal_places(step)))}} 17$qty.trigger('change')});$(document).on('change','.woofc-area .qty',function(){var item_key=$(this).closest('.woofc-item').attr('data-key');var item_qty=$(this).val();woofc_update_qty(item_key,item_qty)});$(document).on('keyup','.woofc-area .qty',function(){var $this=$(this);if($this.closest('.woopq-quantity-input').length){return} 18if(woofc_timeout!=null)clearTimeout(woofc_timeout);woofc_timeout=setTimeout(woofc_check_qty,1000,$this)});$(document).on('click touch','.woofc-area .woofc-item-remove',function(){if(woofc_vars.confirm_remove==='yes'){if(confirm(woofc_vars.confirm_remove_text)){woofc_remove_item($(this).closest('.woofc-item'))}}else{woofc_remove_item($(this).closest('.woofc-item'))}});$(document).on('click touch','.woofc-overlay',function(){woofc_hide_cart()});$(document).on('click touch','.woofc-close',function(){woofc_hide_cart()});$(document).on('click touch','.woofc-continue-url',function(){var url=$(this).attr('data-url');woofc_hide_cart();if(url!==''){window.location.href=url}});$(document).on('click touch','.woofc-empty-cart',function(){var data={action:'woofc_empty_cart',nonce:woofc_nonce(),};if(woofc_vars.confirm_empty==='yes'){if(confirm(woofc_vars.confirm_empty_text)){woofc_cart_loading();$.post(woofc_vars.wc_ajax_url.toString().replace('%%endpoint%%','woofc_empty_cart'),data,function(response){woofc_cart_reload();$(document.body).trigger('woofc_cart_emptied')})}}else{woofc_cart_loading();$.post(woofc_vars.wc_ajax_url.toString().replace('%%endpoint%%','woofc_empty_cart'),data,function(response){woofc_cart_reload();$(document.body).trigger('woofc_cart_emptied')})}});$(document).on('click touch','.woofc-count',function(e){woofc_toggle_cart();e.preventDefault()});$(document).on('click touch','.woofc-menu-item a',function(e){if(woofc_vars.cart_url!=''){window.location.href=woofc_vars.cart_url}else{woofc_toggle_cart()} 19e.preventDefault()});$(document).on('click touch','.woofc-cart, .woofc-btn',function(e){woofc_toggle_cart();e.preventDefault()});$(document).on('click touch','.woofc-cart-link a',function(e){if(woofc_vars.cart_url!=''){window.location.href=woofc_vars.cart_url}else{woofc_toggle_cart()} 20e.preventDefault()});$(document).on('updated_checkout',function(e){if($('body').hasClass('woofc-show-checkout')){$('.woofc-cart-area').addClass('woofc-hide');$('.woofc-checkout-area').removeClass('woofc-hide')} 21woofc_slick();woofc_perfect_scrollbar()});$(document).on('click touch','.woofc-undo a',function(e){e.preventDefault();woofc_cart_loading();var undo_key=$('body').attr('woofc-undo-key');
21var data={action:'woofc_undo_remove',item_key:undo_key,nonce:woofc_nonce(),};$.post(woofc_vars.wc_ajax_url.toString().replace('%%endpoint%%','woofc_undo_remove'),data,function(response){woofc_cart_reload()});$('body').attr('woofc-undo-key','');$('body').attr('woofc-undo-name','')});$(document).on('click touch','.woofc-back',function(e){e.preventDefault();$('.woofc-checkout-area').addClass('woofc-hide');$('body').removeClass('woofc-show-checkout');$('.woofc-cart-area').removeClass('woofc-hide');woofc_slick()});$(document).on('click touch','.woofc-action-checkout',function(e){if((woofc_vars.instant_checkout==='yes')&&$('.woofc-checkout-area').length){e.preventDefault();$(document.body).trigger('update_checkout',{update_shipping_method:!1});woofc_show_checkout()}});$(document).on('click touch','.woofc-area #place_order',function(e){setTimeout(function(){$('.woofc-area-mid').scrollTop($('.woofc-area-mid').scrollTop()+$('.woofc-checkout-form').position().top)},1000)})})(jQuery);function woofc_decimal_places(num){var match=(''+num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);if(!match){return 0} 22return Math.max(0,(match[1]?match[1].length:0)-(match[2]?+match[2]:0))} 23function woofc_update_qty(cart_item_key,cart_item_qty){woofc_cart_loading();var data={action:'woofc_update_qty',cart_item_key:cart_item_key,cart_item_qty:cart_item_qty,nonce:woofc_nonce(),};jQuery.post(woofc_vars.wc_ajax_url.toString().replace('%%endpoint%%','woofc_update_qty'),data,function(response){woofc_cart_reload();jQuery(document.body).trigger('woofc_update_qty',[cart_item_key,cart_item_qty])})} 24function woofc_remove_item($item){var cart_item_key=$item.attr('data-key');var cart_item_name=$item.attr('data-name');var $btn=$item.find('.woofc-item-remove');woofc_cart_loading();var data={action:'woofc_remove_item',cart_item_key:cart_item_key,nonce:woofc_nonce(),};jQuery.post(woofc_vars.wc_ajax_url.toString().replace('%%endpoint%%','woofc_remove_item'),data,function(response){if(!response||!response.fragments){return} 25jQuery(document.body).trigger('removed_from_cart',[response.fragments,response.cart_hash,$btn]);jQuery('body').attr('woofc-undo-key',cart_item_key);jQuery('body').attr('woofc-undo-name',cart_item_name);woofc_cart_reload();jQuery(document.body).trigger('woofc_remove_item',[cart_item_key,cart_item_name,response])})} 26function woofc_cart_loading(){jQuery('.woofc-inner').addClass('woofc-inner-loading');jQuery('.woofc-count').addClass('woofc-count-loading').removeClass('woofc-count-shake');jQuery(document.body).trigger('woofc_cart_loading')} 27function woofc_cart_reload(){jQuery(document.body).trigger('wc_fragment_refresh');jQuery(document.body).trigger('woofc_cart_reload')} 28function woofc_cart_loaded(){jQuery('.woofc-inner').removeClass('woofc-inner-loading');jQuery('.woofc-count').removeClass('woofc-count-loading').addClass('woofc-count-shake');if((woofc_vars.undo_remove==='yes')&&(jQuery('body').attr('woofc-undo-key')!==undefined)&&(jQuery('body').attr('woofc-undo-key')!=='')){var undo_name='Item';if((jQuery('body').attr('woofc-undo-name')!==undefined)&&(jQuery('body').attr('woofc-undo-name')!=='')){undo_name='"'+jQuery('body').attr('woofc-undo-name')+'"'} 29jQuery('.woofc-cart-area .woofc-area-mid').find('.woofc-undo').remove();jQuery('.woofc-cart-area .woofc-area-mid').prepend('<div class="woofc-undo"><div class="woofc-undo-inner">'+woofc_vars.removed_text.replace('%s',undo_name)+' <a href="#">'+woofc_vars.undo_remove_text+'</a></div></div>')} 30woofc_slick();woofc_perfect_scrollbar();jQuery(document.body).trigger('woofc_cart_loaded')} 31function woofc_perfect_scrollbar(){if(woofc_vars.scrollbar==='yes'){jQuery('.woofc-area .woofc-area-mid').perfectScrollbar({suppressScrollX:!0,theme:'wpc'})}} 32function woofc_slick(){if(woofc_vars.suggested_carousel){if(jQuery('.woofc-suggested-product').length>1){if(jQuery('.woofc-suggested-products').hasClass('slick-initialized')){jQuery('.woofc-suggested-products').slick('unslick')} 33jQuery('.woofc-suggested-products').slick(JSON.parse(woofc_vars.slick_params))}} 34if(woofc_vars.save_for_later_carousel){if(jQuery('.woofc-save-for-later .woosl-product').length>1){if(jQuery('.woofc-save-for-later .woosl-products').hasClass('slick-initialized')){jQuery('.woofc-save-for-later .woosl-products').slick('unslick')} 35jQuery('.woofc-save-for-later .woosl-products').slick(JSON.parse(woofc_vars.slick_params))}} 36if(woofc_vars.upsell_funnel_carousel){if(jQuery('.woofc-upsell-funnel .wpcuf-uf-product').length>1){if(jQuery('.woofc-upsell-funnel .wpcuf-uf-products').hasClass('slick-initialized')){jQuery('.woofc-upsell-funnel .wpcuf-uf-products').slick('unslick')} 37jQuery('.woofc-upsell-funnel .wpcuf-uf-products').slick(JSON.parse(woofc_vars.slick_params))}} 38if(jQuery('.woofc-upsell-funnel .wpcuf_variations_form').length){jQuery('.woofc-upsell-funnel .wpcuf_variations_form').each(function(){jQuery(this).wc_variation_form()})}} 39function woofc_show_cart(view='cart'){jQuery('body').addClass('woofc-show');if(view==='checkout'){woofc_show_checkout()} 40jQuery(document.body).trigger('woofc_show_cart')} 41function woofc_hide_cart(){jQuery('body').removeClass('woofc-show woofc-show-checkout');jQuery(document.body).trigger('woofc_hide_cart')} 42function woofc_toggle_cart(){if(jQuery('body').hasClass('woofc-show')){woofc_hide_cart()}else{woofc_show_cart()} 43jQuery(document.body).trigger('woofc_toggle_cart')} 44function woofc_show_checkout(){jQuery('.woofc-cart-area').addClass('woofc-hide');jQuery('body').addClass('woofc-show-checkout');jQuery('.woofc-checkout-area').removeClass('woofc-hide');jQuery(document.body).trigger('woofc_show_checkout')} 45function woofc_check_qty($qty){var is_remove=!1;var val=parseFloat($qty.val());var min=parseFloat($qty.attr('min'));var max=parseFloat($qty.attr('max'));var step=parseFloat($qty.attr('step'));var fix=Math.pow(10,Number(woofc_decimal_places(step))+1);if((val==='')||isNaN(val)){val=0} 46if((min==='')||isNaN(min)){min=0} 47if((step==='')||isNaN(step)){step=1} 48var remainder=woofc_float_remainder(val,step);if(remainder>=0){val=Math.round((val-remainder)*fix)/fix} 49if(val<min||val<=0){is_remove=!0;val=min} 50if(!isNaN(max)&&(val>max)){val=max} 51$qty.val(val);if(is_remove){if((woofc_vars.confirm_remove==='yes')){if(confirm(woofc_vars.confirm_remove_text)){woofc_remove_item($qty.closest('.woofc-item'))}}else{woofc_remove_item($qty.closest('.woofc-item'))}}} 52function woofc_nonce(){let nonce=jQuery('.woofc-cart-area').attr('data-nonce');if(typeof nonce==='undefined'||nonce===!1||nonce===''){nonce=woofc_vars.nonce} 53return nonce} 54function woofc_float_remainder(val,step){var valDecCount=(val.toString().split('.')[1]||'').length;var stepDecCount=(step.toString().split('.')[1]||'').length;var decCount=valDecCount>stepDecCount?valDecCount:stepDecCount;var valInt=parseInt(val.toFixed(decCount).replace('.',''));var stepInt=parseInt(step.toFixed(decCount).replace('.',''));return(valInt%stepInt)/Math.pow(10,decCount)} 55function woofc_confetti(id='woofc-canvas'){var canvas=document.getElementById(id);canvas.confetti=canvas.confetti||confetti.create(canvas,{resize:!0});if(woofc_vars.confetti_params!==undefined){canvas.confetti(woofc_vars.confetti_params)}else{canvas.confetti()}}
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.