PageSourceSearch

https://helen-pietrulla.de/wp-content/cache/min/1/wp-content/plugi…/assets/js/frontend.js?ver=1791191345

js helen-pietrulla.de collected 2026-10-07 03:45:05 UTC 23,122 bytes, 83 lines download raw bytes

1'use strict';(function($){var woosb_timeout=null;$(function(){if($('.woosb-wrap').length){$('.woosb-wrap').each(function(){woosb_init($(this),'ready')})}});$(document).on('woosq_loaded',function(){woosb_init($('#woosq-popup .woosb-wrap'),'woosq')});$(document).on('woovr_selected',function(e,selected,variations){var $wrap=variations.closest('.woosb-wrap');var $product=variations.closest('.woosb-product');if($product.length){var _id=selected.attr('data-id');var _price=selected.attr('data-price');var _regular_price=selected.attr('data-regular-price');var _price_html=selected.attr('data-pricehtml');var _image_src=selected.attr('data-imagesrc');var _purchasable=selected.attr('data-purchasable');var _attrs=selected.attr('data-attrs');var _availability=selected.attr('data-availability');if(_purchasable==='yes'&&_id>=0){$product.attr('data-id',_id);if(woosb_vars.bundled_price_from==='regular_price'){$product.attr('data-price',_regular_price)}else{$product.attr('data-price',_price)}
2woosb_change_price($product,_price,_regular_price,_price_html);$product.attr('data-attrs',_attrs.replace(/\/$/,''));var _wpcpq=selected.attr('data-wpcpq');if(_wpcpq){try{$product.data('wpcpq',JSON.parse(_wpcpq))}catch(ex){$product.data('wpcpq',{})}}else if(_id>0){var $form=$product.find('.variations_form, .woosb_variations_form');var variations_data=$form.data('product_variations');if(variations_data&&Array.isArray(variations_data)){for(var i=0;i<variations_data.length;i++){if(parseInt(variations_data[i].variation_id)===parseInt(_id)){if(variations_data[i].woosb_wpcpq!==undefined){$product.data('wpcpq',variations_data[i].woosb_wpcpq)}
3break}}}}}else{$product.attr('data-id',0);$product.attr('data-price',$product.data('o_price'));$product.attr('data-attrs','');$product.find('.woosb-price-ori').show();$product.find('.woosb-price-new').html('').hide();$product.data('wpcpq',{})}
4if(_image_src&&_image_src!==''){$product.find('.woosb-thumb-ori').hide();$product.find('.woosb-thumb-new').html('<img src="'+_image_src+'"/>').show()}else{$product.find('.woosb-thumb-ori').show();$product.find('.woosb-thumb-new').html('').hide()}
5if(_availability&&_availability!==''){$product.find('.woosb-availability').html(_availability).show()}else{$product.find('.woosb-availability').html('').hide()}
6if(typeof wc_reset_content==='function'){$('.product_meta .sku').wc_reset_content();$('.product_weight, .woocommerce-product-attributes-item--weight .woocommerce-product-attributes-item__value').wc_reset_content();$('.product_dimensions, .woocommerce-product-attributes-item--dimensions .woocommerce-product-attributes-item__value').wc_reset_content()}}
7woosb_init($wrap,'woovr_selected')});$(document).on('found_variation',function(e,t){var $wrap=$(e.target).closest('.woosb-wrap');var $product=$(e.target).closest('.woosb-product');if($product.length){if(t.woosb_image!==undefined&&t.woosb_image!==''){$product.find('.woosb-thumb-ori').hide();$product.find('.woosb-thumb-new').html(t.woosb_image).show()}else{$product.find('.woosb-thumb-ori').show();$product.find('.woosb-thumb-new').html('').hide()}
8if(t.price_html!==undefined&&t.price_html!==''&&t.display_price!==undefined&&t.display_price!==''){woosb_change_price($product,t.display_price,t.display_regular_price,t.price_html)}
9if(t.variation_description!==undefined){$product.find('.woosb-variation-description').html(t.variation_description).show()}else{$product.find('.woosb-variation-description').html('').hide()}
10if(t.max_qty!==undefined&&t.max_qty!==''){$product.attr('data-stock',t.max_qty)}else{$product.attr('data-stock',-1)}
11if(t.is_purchasable){if(woosb_vars.bundled_price_from==='regular_price'&&t.display_regular_price!==undefined){$product.attr('data-price',t.display_regular_price)}else{$product.attr('data-price',t.display_price)}
12if(t.is_in_stock){$wrap.next('p.stock').show();$product.attr('data-id',t.variation_id)}else{$wrap.next('p.stock').hide();$product.attr('data-id',0)}
13if(t.availability_html&&t.availability_html!==''){$product.find('.woosb-availability').html(t.availability_html).show()}else{$product.find('.woosb-availability').html('').hide()}
14var attrs={};$product.find('select[name^="attribute_"]').each(function(){var attr_name=$(this).attr('name');attrs[attr_name]=$(this).val()});$product.attr('data-attrs',JSON.stringify(attrs));if(t.woosb_wpcpq!==undefined){$product.data('wpcpq',t.woosb_wpcpq)}}
15if(woosb_vars.change_image==='no'){$(e.target).closest('.variations_form').trigger('reset_image')}
16if(typeof wc_reset_content==='function'){$('.product_meta .sku').wc_reset_content();$('.product_weight, .woocommerce-product-attributes-item--weight .woocommerce-product-attributes-item__value').wc_reset_content();$('.product_dimensions, .woocommerce-product-attributes-item--dimensions .woocommerce-product-attributes-item__value').wc_reset_content()}
17$(document).trigger('woosb_found_variation',[$product,t]);woosb_init($wrap,'found_variation')}});$(document).on('reset_data',function(e){var $wrap=$(e.target).closest('.woosb-wrap');var $product=$(e.target).closest('.woosb-product');if($product.length){$product.find('.woosb-thumb-new').hide();$product.find('.woosb-thumb-ori').show();$product.find('.woosb-price-new').hide();$product.find('.woosb-price-ori').show();$product.find('.woosb-availability').html('').hide();$product.find('.woosb-variation-description').html('').hide();$product.attr('data-id',0);$product.attr('data-price',$product.data('o_price'));$product.attr('data-attrs','');$product.attr('data-stock',-1);$product.data('wpcpq',{});$(document).trigger('woosb_reset_data',[$product]);woosb_init($wrap,'reset_data')}});$(document).on('click touch','.woosb-quantity-input-plus, .woosb-quantity-input-minus',function(){var $qty=$(this).closest('.woosb-quantity').find('.woosb-qty');if(!$qty.length){$qty=$(this).closest('.woosb-quantity').find('.qty')}
18var 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}
19if(max===''||max==='NaN'){max=''}
20if(min===''||min==='NaN'){min=0}
21if(step==='any'||step===''||step===undefined||step==='NaN'){step=1}else{step=parseFloat(step)}
22if($(this).is('.woosb-quantity-input-plus')){if(max&&(val>=max)){$qty.val(max)}else{$qty.val((val+step).toFixed(woosb_decimal_places(step)))}}else{if(min&&(val<=min)){$qty.val(min)}else if(val>0){$qty.val((val-step).toFixed(woosb_decimal_places(step)))}}
23$qty.trigger('change')});$(document).on('click touch','.single_add_to_cart_button',function(e){var $this=$(this);if($this.hasClass('woosb-disabled')){e.preventDefault()}});if($('.woosb-qty').length){$(document).on('change','.woosb-qty',function(){var $this=$(this);woosb_check_qty($this)});$(document).on('keyup','.woosb-qty',function(){var $this=$(this);if(woosb_timeout!=null)clearTimeout(woosb_timeout);woosb_timeout=setTimeout(woosb_check_qty,1000,$this)})}else{$(document).on('change','.woosb-quantity .qty',function(){var $this=$(this);woosb_check_qty($this)});$(document).on('keyup','.woosb-quantity .qty',function(){var $this=$(this);if(woosb_timeout!=null)clearTimeout(woosb_timeout);woosb_timeout=setTimeout(woosb_check_qty,1000,$this)})}})(jQuery);function woosb_init($wrap,context=null){woosb_check_ready($wrap,context);woosb_check_stock($wrap,context);woosb_save_ids($wrap,context);jQuery(document).trigger('woosb_init',[$wrap,context])}
24function woosb_check_ready($wrap,context=null){var qty=0;var total=0;var total_sale=0;var is_selection=!1;var selection_name='';var is_unpurchasable=!1;var unpurchasable_name='';var is_empty=!0;var is_min=!1;var is_max=!1;var is_total_min=!1;var is_total_max=!1;var wid=$wrap.attr('data-id');var $products=$wrap.find('.woosb-products');var $alert=$wrap.find('.woosb-alert');var $ids=jQuery('.woosb-ids-'+wid);var $btn=$ids.closest('form.cart').find('.single_add_to_cart_button');var price_suffix=$products.attr('data-price-suffix');var $total=$wrap.find('.woosb-total');var $count=$wrap.find('.woosb-count');var $price=jQuery('.woosb-price-'+wid);
24var $woobt=jQuery('.woobt-wrap-'+wid);var $woobt_products=$woobt.find('.woobt-products');var woobt_total=parseFloat($woobt_products.length?$woobt.attr('data-total'):0);var discount=parseFloat($products.attr('data-discount'));var discount_amount=parseFloat($products.attr('data-discount-amount'));var fixed_price=$products.attr('data-fixed-price')==='yes';var has_optional=$products.attr('data-optional')==='yes';var has_variables=$products.attr('data-variables')==='yes';var exclude_unpurchasable=$products.attr('data-exclude-unpurchasable')==='yes';var saved='';var is_discount=discount>0&&discount<100;var is_discount_amount=discount_amount>0;var qty_min=parseFloat($products.attr('data-min'));var qty_max=parseFloat($products.attr('data-max'));var total_min=parseFloat($products.attr('data-total-min'));var total_max=parseFloat($products.attr('data-total-max'));if(!$products.length||(!has_variables&&!has_optional&&!woosb_vars.recalc_price)){return}
25if(!fixed_price){$products.find('.woosb-product').each(function(){var $this=jQuery(this);if($this.hasClass('woosb-product-unpurchasable')&&exclude_unpurchasable){return}
26if(parseFloat($this.attr('data-price'))>0){var _qty=parseFloat($this.attr('data-qty'));var _price=parseFloat($this.attr('data-price'));var _regular_price=_price;var wpcpq=$this.data('wpcpq');if(wpcpq&&(wpcpq.tiers!==undefined)&&wpcpq.tiers.length&&(_qty>0)){var wpcpq_method=wpcpq.method||'volume';var wpcpq_price=woosb_wpcpq_get_price(wpcpq_method,wpcpq.tiers,_qty,_price);if(wpcpq_price!==_price){_price=wpcpq_price;var _display_price=_price;var _item_price_suffix=$this.attr('data-price-suffix')||'';if(!is_discount_amount&&is_discount){_display_price=woosb_round(_price*(100-discount)/100)}
27if(woosb_vars.bundled_price==='subtotal'||woosb_vars.bundled_price==='subtotal_under_name'){var price_html=woosb_price_html(_regular_price*_qty,_display_price*_qty)+_item_price_suffix}else{var price_html=woosb_price_html(_regular_price,_display_price)+_item_price_suffix}
28$this.find('.woosb-price-ori').hide();$this.find('.woosb-price-new').html(price_html).show()}}
29total+=_price*_qty;if(!is_discount_amount&&is_discount&&woosb_vars.round_price){_price=woosb_round(_price*(100-discount)/100)}
30total_sale+=_price*_qty}});if(is_discount_amount&&discount_amount<total){total_sale=total-discount_amount;saved=woosb_format_price(discount_amount)}else if(is_discount){if(!woosb_vars.round_price){total_sale=woosb_round(total*(100-discount)/100)}
31saved=woosb_round(discount,2)+'%'}else{total_sale=total}
32var total_html=woosb_price_html(total,total_sale);var total_all_html=woosb_price_html(total+woobt_total,total_sale+woobt_total);if(saved!==''){total_html+=' <small class="woocommerce-price-suffix">'+woosb_vars.saved_text.replace('[d]',saved)+'</small>'}
33$total.html('<span class="woosb-total-label">'+woosb_vars.price_text+'</span> <span class="woosb-total-value">'+total_html+price_suffix+'</span>').slideDown();jQuery(document).trigger('woosb_change_total',[$total,total_html,price_suffix]);if(woosb_vars.change_price!=='no'){if(woosb_vars.change_price==='yes_custom'&&woosb_vars.price_selector!=null&&woosb_vars.price_selector!==''){$price=jQuery(woosb_vars.price_selector)}
34if($woobt_products.length){$price.html(total_all_html+price_suffix)}else{if(typeof $price.attr('data-o_price')==='undefined'){$price.attr('data-o_price',woosb_encode_entities($price.html()))}
35$price.html(total_html+price_suffix)}}
36if($woobt_products.length){$woobt_products.attr('data-product-price-html',total_html);$woobt_products.find('.woobt-product-this').attr('data-price',total_sale).attr('data-regular-price',total);woobt_init($woobt)}
37jQuery(document).trigger('woosb_calc_price',[total_sale,total,total_html,price_suffix,$wrap])}
38$products.find('.woosb-product').each(function(){var $this=jQuery(this);if(parseFloat($this.attr('data-qty'))>0){is_empty=!1;qty+=parseFloat($this.attr('data-qty'));if(parseInt($this.attr('data-id'))===0){is_selection=!0;if(selection_name===''){selection_name=$this.attr('data-name')}}
39if($this.hasClass('woosb-product-optional')&&$this.hasClass('woosb-product-unpurchasable')){is_unpurchasable=!0;if(unpurchasable_name===''){unpurchasable_name=$this.attr('data-name')}}}});if(has_optional){if(qty_min>0&&qty<qty_min){is_min=!0}
40if(qty_max>0&&qty>qty_max){is_max=!0}
41$count.html('<span class="woosb-count-label">
41'+woosb_vars.selected_text+'</span> <span class="woosb-count-value">'+qty+'</span>').slideDown();jQuery(document).trigger('woosb_change_count',[$count,qty,qty_min,qty_max])}
42if(!fixed_price){if(total_min>0&&total_sale<total_min){is_total_min=!0}
43if(total_max>0&&total_sale>total_max){is_total_max=!0}}
44if(is_selection||is_unpurchasable||is_empty||is_min||is_max||is_total_min||is_total_max){$btn.addClass('woosb-disabled');if(is_selection){$alert.html(woosb_vars.alert_selection.replace('[name]','<strong>'+selection_name+'</strong>')).slideDown()}else if(is_unpurchasable){$alert.html(woosb_vars.alert_unpurchasable.replace('[name]','<strong>'+unpurchasable_name+'</strong>')).slideDown()}else if(is_empty){$alert.html(woosb_vars.alert_empty).slideDown()}else if(is_min){$alert.html(woosb_vars.alert_min.replace('[min]',qty_min).replace('[selected]',qty)).slideDown()}else if(is_max){$alert.html(woosb_vars.alert_max.replace('[max]',qty_max).replace('[selected]',qty)).slideDown()}else if(is_total_min){$alert.html(woosb_vars.alert_total_min.replace('[min]',woosb_format_price(total_min)).replace('[total]',woosb_format_price(total_sale))).slideDown()}else if(is_total_max){$alert.html(woosb_vars.alert_total_max.replace('[max]',woosb_format_price(total_max)).replace('[total]',woosb_format_price(total_sale))).slideDown()}
45jQuery(document).trigger('woosb_check_ready',[!1,is_selection,is_unpurchasable,is_empty,is_min,is_max,is_total_min,is_total_max,$wrap])}else{$alert.html('').slideUp();$btn.removeClass('woosb-disabled');jQuery(document).trigger('woosb_check_ready',[!0,is_selection,is_unpurchasable,is_empty,is_min,is_max,is_total_min,is_total_max,$wrap])}}
46function woosb_check_stock($wrap,context=null){var wid=$wrap.attr('data-id');var $ids=jQuery('.woosb-ids-'+wid);var $products=$wrap.find('.woosb-products');var $qty=$ids.closest('form.cart').find('[name="quantity"]');var stock_arr=Array();var stock_min=0;$products.find('.woosb-product').each(function(){var $this=jQuery(this);var id=parseInt($this.attr('data-id'));var qty=parseFloat($this.attr('data-qty'));var stock=parseFloat($this.attr('data-stock'));if(id>0&&qty>0&&(stock>=0)){stock_arr.push(Math.floor(stock/qty))}});stock_min=Math.min.apply(null,stock_arr);stock_min=isNaN(stock_min)?0:stock_min;$qty.attr('max',stock_min);if($qty.val()>stock_min){$qty.val(stock_min).trigger('change')}
47jQuery(document).trigger('woosb_check_stock',[$wrap,context])}
48function woosb_save_ids($wrap,context=null){var ids=Array();var wid=$wrap.attr('data-id');var $ids=jQuery('.woosb-ids-'+wid);var $products=$wrap.find('.woosb-products');$products.find('.woosb-product').each(function(){var $this=jQuery(this);var id=parseInt($this.attr('data-id'));var key=$this.attr('data-key');var qty=parseFloat($this.attr('data-qty'));var attrs=$this.attr('data-attrs');if(id>0&&qty>0){if(attrs!==undefined){attrs=encodeURIComponent(attrs)}else{attrs=''}
49ids.push(id+'/'+key+'/'+qty+'/'+attrs)}});$ids.val(ids.join(','));jQuery(document).trigger('woosb_save_ids',[ids,$wrap])}
50function woosb_check_qty($qty){var $wrap=$qty.closest('.woosb-wrap');var qty=parseFloat($qty.val());var min=parseFloat($qty.attr('min'));var max=parseFloat($qty.attr('max'));if(qty===''||isNaN(qty)){qty=0}
51if(!isNaN(min)&&qty<min){qty=min}
52if(!isNaN(max)&&qty>max){qty=max}
53$qty.val(qty);$qty.closest('.woosb-product').attr('data-qty',qty);if(woosb_vars.bundled_price==='subtotal'||woosb_vars.bundled_price==='subtotal_under_name'){var $products=$wrap.find('.woosb-products');var $product=$qty.closest('.woosb-product');var price_suffix=$product.attr('data-price-suffix');var ori_price=parseFloat($product.attr('data-price'));var qty=parseFloat($product.attr('data-qty'));var discount=parseFloat($products.attr('data-discount'));var wpcpq=$product.data('wpcpq');if(wpcpq&&(wpcpq.tiers!==undefined)&&wpcpq.tiers.length&&(qty>0)){var wpcpq_method=wpcpq.method||'volume';var wpcpq_price=woosb_wpcpq_get_price(wpcpq_method,wpcpq.tiers,qty,ori_price);if(wpcpq_price!==ori_price){ori_price=wpcpq_price}}
54$product.find('.woosb-price-ori').hide();if(discount>0&&$products.attr('data-fixed-price')==='no'){var new_price=woosb_round(ori_price*(100-discount)/100);$product.find('.woosb-price-new').html(woosb_price_html(ori_price*qty,new_price*qty)+price_suffix
54).show()}else{$product.find('.woosb-price-new').html(woosb_price_html(ori_price*qty)+price_suffix).show()}}
55jQuery(document).trigger('woosb_check_qty',[qty,$qty]);woosb_init($wrap,'woosb_check_qty')}
56function woosb_change_price($product,price,regular_price,price_html){var $products=$product.closest('.woosb-products');var price_suffix=$product.attr('data-price-suffix');var qty=parseFloat($product.attr('data-qty'));var discount=parseFloat($products.attr('data-discount'));var new_price_html='';$product.find('.woosb-price-ori').hide();if(woosb_vars.bundled_price==='subtotal'||woosb_vars.bundled_price==='subtotal_under_name'){var ori_price=parseFloat(price);if(woosb_vars.bundled_price_from==='regular_price'&&regular_price!==undefined){ori_price=parseFloat(regular_price)}
57var new_price=ori_price;if(discount>0){new_price=woosb_round(ori_price*(100-discount)/100)}
58new_price_html=woosb_price_html(ori_price*qty,new_price*qty)+price_suffix}else{if(discount>0){var ori_price=parseFloat(price);if(woosb_vars.bundled_price_from==='regular_price'&&regular_price!==undefined){ori_price=parseFloat(regular_price)}
59var new_price=woosb_round(ori_price*(100-discount)/100);new_price_html=woosb_price_html(ori_price,new_price)+price_suffix}else{if(woosb_vars.bundled_price_from==='regular_price'&&regular_price!==undefined){new_price_html=woosb_price_html(regular_price)+price_suffix}else if(price_html!==''){new_price_html=price_html}}}
60$product.find('.woosb-price-new').html(new_price_html).show();jQuery(document).trigger('woosb_change_price',[$product,new_price_html])}
61function woosb_round(value,decimals=-1){if(decimals<0){decimals=woosb_vars.price_decimals}
62return Number(Math.round(value+'e'+decimals)+'e-'+decimals)}
63function woosb_format_money(number,places,symbol,thousand,decimal){number=number||0;places=!isNaN(places=Math.abs(places))?places:2;symbol=symbol!==undefined?symbol:'$';thousand=thousand!==undefined?thousand:',';decimal=decimal!==undefined?decimal:'.';var negative=number<0?'-':'',i=parseInt(number=Math.abs(+number||0).toFixed(places),10)+'',j=0;if(i.length>3){j=i.length%3}
64if(woosb_vars.trim_zeros==='1'){return symbol+negative+(j?i.substr(0,j)+thousand:'')+i.substr(j).replace(/(\d{3})(?=\d)/g,'$1'+thousand)+(places&&(parseFloat(number)>parseFloat(i))?decimal+Math.abs(number-i).toFixed(places).slice(2).replace(/(\d*?[1-9])0+$/g,'$1'):'')}else{return symbol+negative+(j?i.substr(0,j)+thousand:'')+i.substr(j).replace(/(\d{3})(?=\d)/g,'$1'+thousand)+(places?decimal+Math.abs(number-i).toFixed(places).slice(2):'')}}
65function woosb_format_price(price){var price_html='<span class="woocommerce-Price-amount amount">';var price_formatted=woosb_format_money(price,woosb_vars.wc_price_decimals,'',woosb_vars.wc_price_thousand_separator,woosb_vars.wc_price_decimal_separator);switch(woosb_vars.wc_price_format){case '%1$s%2$s':price_html+='<span class="woocommerce-Price-currencySymbol">'+woosb_vars.wc_currency_symbol+'</span>'+price_formatted;break;case '%1$s %2$s':price_html+='<span class="woocommerce-Price-currencySymbol">'+woosb_vars.wc_currency_symbol+'</span> '+price_formatted;break;case '%2$s%1$s':price_html+=price_formatted+'<span class="woocommerce-Price-currencySymbol">'+woosb_vars.wc_currency_symbol+'</span>';break;case '%2$s %1$s':price_html+=price_formatted+' <span class="woocommerce-Price-currencySymbol">'+woosb_vars.wc_currency_symbol+'</span>';break;default:price_html+='<span class="woocommerce-Price-currencySymbol">'+woosb_vars.wc_currency_symbol+'</span> '+price_formatted}
66price_html+='</span>';return price_html}
67function woosb_price_html(regular_price,sale_price){var price_html='';if(woosb_round(sale_price)<woosb_round(regular_price)){price_html='<del>'+woosb_format_price(regular_price)+'</del> <ins>'+woosb_format_price(sale_price)+'</ins>'}else{price_html=woosb_format_price(regular_price)}
68return price_html}
69function woosb_decimal_places(num){var match=(''+num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);if(!match){return 0}
70return Math.max(0,(match[1]?match[1].length:0)-(match[2]?+match[2]:0))}
71function woosb_encode_entities(str){return String(str).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;')}
72function woosb_decode_entities(str){var textArea=document.createElement('textarea');textArea.innerHTML=str;return textArea.value}
73function woosb_wpcpq_calculate_price(price,current_price){if(price===''||price==='100%'){return current_price}
74var price_str=String(price);if(price_str.charAt(0)==='-'){return current_price-parseFloat(price_str.replace('-',''))}
75if(price_str.charAt(0)==='+'){return current_price+parseFloat(price_str.replace('+',''))}
76if(price_str.charAt(price_str.length-1)==='%'){return current_price*parseFloat(price_str.replace('%',''))/100}
77return parseFloat(price)}
78function woosb_wpcpq_get_price(method,tiers,quantity,old_price){quantity=parseFloat(quantity);var step=1;if(!tiers||!tiers.length){return old_price}
79if(method==='tiered'){var total=0;var sorted_tiers=tiers.slice().sort(function(a,b){return parseFloat(a.quantity)-parseFloat(b.quantity)});for(var i=0;i<sorted_tiers.length;i++){var tier=sorted_tiers[i];var tier_price=(tier.price===''||tier.price===undefined)?'100%':tier.price;var tier_qty=parseFloat(tier.quantity);var prev_price=(i>0)?sorted_tiers[i-1].price:old_price;var prev_qty=(i>0)?parseFloat(sorted_tiers[i-1].quantity):1;if(prev_price===''||prev_price===undefined){prev_price='100%'}
80if(quantity>=tier_qty){total+=(tier_qty-prev_qty)*woosb_wpcpq_calculate_price(prev_price,old_price);if(i===sorted_tiers.length-1){total+=(quantity-tier_qty+step)*woosb_wpcpq_calculate_price(tier_price,old_price);break}}else{total+=(quantity-prev_qty+step)*woosb_wpcpq_calculate_price(prev_price,old_price);break}}
81return total/quantity}else if(method==='tiered_block'){var total=old_price;if(tiers[0]&&typeof tiers[0]==='object'){var tier=tiers[0];var tier_price=(tier.price===''||tier.price===undefined)?'100%':tier.price;var tier_qty=parseFloat(tier.quantity);if(quantity>=tier_qty){total+=(quantity-tier_qty+step)*woosb_wpcpq_calculate_price(tier_price,old_price)}}
82return total/quantity}else{var sorted_tiers=tiers.slice().sort(function(a,b){return parseFloat(b.quantity)-parseFloat(a.quantity)});for(var i=0;i<sorted_tiers.length;i++){var tier=sorted_tiers[i];var tier_price=(tier.price===''||tier.price===undefined)?'100%':tier.price;if(quantity>=parseFloat(tier.quantity)){return woosb_wpcpq_calculate_price(tier_price,old_price)}}}
83return old_price}

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.