var loadScript=function(t,e){var i=document.createElement("script");i.type="text/javascript",i.readyState?i.onreadystatechange=function(){"loaded"!=i.readyState&&"complete"!=i.readyState||(i.onreadystatechange=null,e())}:i.onload=function(){e()},i.src=t,document.getElementsByTagName("head")[0].appendChild(i)},myFrontendJavascriptQB=function(ct){function t(e){function i(t){t<e.length?ct.ajax({url:e[t],dataType:"script",cache:!1,success:function(){i(t+1)}}):n.resolve()}var n=ct.Deferred();return i(0),n}var e=["//cdnjs.cloudflare.com/ajax/libs/spin.js/2.3.2/spin.min.js"];"undefined"==typeof Currency&&e.push("//cdn.shopify.com/s/javascripts/currencies.js");var t=t(e).done(function(){function e(){if("undefined"!=typeof Weglot)return Weglot.getCurrentLang()}function n(t){return"liftket.myshopify.com"!==g()&&"xyz-edsil.myshopify.com"!==g()||(t=t.concat("?locale=").concat(e())),t}function t(t){for(var e=document.cookie.split(";"),i=0;i<e.length;i++){var n=e[i].split("=");if(t==n[0].trim())return decodeURIComponent(n[1])}return null}function _(){return t("cart")}function i(t){var e=window.qb.enabled_multi_currencies.current_shop_currency,i=window.qb.enabled_multi_currencies.currencies_count,n=t.currency;return 1<i&&e!=n}function L(t){var e=window.qb.shop.currency,i=window.qb.enabled_multi_currencies.current_shop_currency;return e==i?1*t:Currency.convert(t,e,i)}function o(t){var i=window.location.hostname;return new Promise(function(e){ct.get("https://"+i+"/cart/update?currency="+t.currency,function(t){e(t)}).fail(function(t){console.log(t)})})}function a(i,n){var o=null,t=null;if("rountine.myshopify.com"!=i.shopify_domain&&"animalshop111.myshopify.com"!=i.shopify_domain&&"animal112.myshopify.com"!=i.shopify_domain&&"animal111.myshopify.com"!=i.shopify_domain)return window.qb.convertedCurrency.converted_amount=1,new Promise(function(e){(t=r(i,n)).then(function(t){200==t.status&&(Z()?n.updateCart(function(){X(),0<(o=v()).length&&new V(n,o,i).applyDiscounts(),e([])}):e([]))}),t["catch"](function(){Z()&&n.updateCart(function(){X(),0<(o=v()).length&&new V(n,o,i).applyDiscounts(),e([])})})})}function r(t){if("rountine.myshopify.com"!=t.shopify_domain&&"animalshop111.myshopify.com"!=t.shopify_domain&&"animal112.myshopify.com"!=t.shopify_domain&&"animal111.myshopify.com"!=t.shopify_domain){var e=window.location.hostname,i="https://{{shop_hostname}}/cart.js".replace("{{shop_hostname}}",e);return fetch(i)}}function S(){return window.qb.enabled_multi_currencies.currency_format}function c(e){e.currency,window.qb.enabled_multi_currencies.current_shop_currency;return new Promise(function(t){i(e)&&e.enabled_multi_currencies,t([])})}function y(e,i){try{var n=null,t=null;(t=r(e,i)).then(function(t){200==t.status&&Z()&&i.updateCart(function(){X(),0<(n=v()).length&&new V(i,n,e).applyDiscounts();var t=new Q(i);M()&&(window.qb.datastore.shop.enabled_discount_codes?i.getAppliedDiscountCode(function(){t.updatePage(!1)}):t.updatePage(!1)),e.ajax_cart_integration_enabled&&t.updatePage(!0)})}),t["catch"](function(){Z()&&i.updateCart(function(){X(),0<(n=v()).length&&new V(i,n,e).applyDiscounts();var t=new Q(i);M()&&(window.qb.datastore.shop.enabled_discount_codes?i.getAppliedDiscountCode(function(){t.updatePage(!1)}):t.updatePage(!1)),e.ajax_cart_integration_enabled&&t.initializeAjaxCartObserver(e)})})}catch(o){console.log(o)}}function g(){for(var t=document.getElementsByTagName("script"),e="",i="",n=0;n<t.length;n++)if((e=t[n].getAttribute("src"))&&(e=e.match(/^(.*)widget\/javascript(\?\s*(.+))?\s*/))){i=e[3].match(/shop=(.+).myshopify.com/)[1];break}return".myshopify.com"===(i+=".myshopify.com")&&et(window.Shopify)&&et(window.Shopify.shop)&&(i=window.Shopify.shop),".myshopify.com"===i&&console.log("QB: unable to get shop domain"),i}function m(){return"abc-edsil.myshopify.com"===g()||"xyz-edsil.myshopify.com"===g()||"wnteststore5.myshopify.com"===g()||"crazy-apps-house.myshopify.com"===g()||"preorder-tagging.myshopify.com"===g()||"wholesale-staging-store.myshopify.com"===g()||"qb-edsil-local.myshopify.com"===g()||"crn-edsil-stag.myshopify.com"===g()?"https://wod2.ngrok.io":"qb-chris-local.myshopify.com"===g()?"https://wod.ngrok.io":"qbn-marc-local.myshopify.com"===g()?"https://wod4.ngrok.io":"qbn-test-local.myshopify.com"===g()?"https://wod4.ngrok.io":"qbn-neil-local.myshopify.com"===g()?"https://wod9.ngrok.io":"truenito-store.myshopify.com"==g()?"https://truenito.ngrok.io":"qbteststore.myshopify.com"===g()?"https://quantity-breaks-now-staging.herokuapp.com":"https://quantity-breaks-now.herokuapp.com"}function s(t){var e=location.search.match(/variant=([0-9]+)/);return null!=e?e[1]:"radio"==ct(t.form_selector).find('select[name="id"], input[name="id"]').attr("type")?ct(t.form_selector).find('input[name="id"]:checked').val():ct(t.form_selector).find('select[name="id"], input[name="id"], select[name="id[]"]').val()}function u(){return"undefined"!=typeof window.qb&&"undefined"!=typeof window.qb.datastore}function d(t){window.qb.datastore={},window.qb.datastore.shop=t.shop,window.qb.datastore.discount_groups=t.discount_groups,window.qb.datastore.net_order_tags=t.net_order_tags}function l(){ct.ajax({cache:!1,type:"GET",url:m()+"/get_settings?shopify_domain="+g(),success:function(t){d(t),at()}})}function p(){return!!(P()&&0<w().length)}function P(){return"undefined"==typeof window.qb.shop&&h(),window.qb.shop}function h(){u()&&"undefined"!=typeof window.qb.datastore.shop?"undefined"!=typeof window.qb.datastore.theme_setting?window.qb.shop=f():window.qb.shop=window.qb.datastore.shop:window.qb.shop=!1}function f(){var i=window.qb.datastore.theme_setting,n=window.qb.datastore.shop,t=[["cart_subtotal_selector","cart_subtotal_selector"],["checkout_button_selector","checkout_button_selector"],["form_selector","form_selector"],["quantity_selector","quantity_selector"],["cart_form_selector","cart_form_selector"],["quantity_button_selector","quantity_button_selector"],["variant_selector","variant_selector"],["swatch_selector","swatch_selector"],["mutation_ids","mutation_ids"],["mutation_classes","mutation_classes"],["table_placement_selector","table_placement_selector"],["shipping_rates_form_placement_selector","shipping_rates_form_placement_selector"],["regular_cart_subtotal_table_placement_selector","regular_cart_subtotal_table_placement_selector"],["discount_log_placement_selector","discount_log_placement_selector"],["discount_log_position","discount_log_position"],["product_selector_container","product_selector_container"],["net_order_success_redirect_url","net_order_success_redirect_url"],["discount_code_input_placeholder","discount_code_input_placeholder"],["discount_code_button_text","discount_code_button_text"],["currency_option_selector","currency_option_selector"]];return ct.each(t,function(t,e){n[e[0]]=b(n[e[0]],i[e[1]])}),tt(i.shipping_rates_form_position)&&!tt(n.shipping_rates_form_position)?n.shipping_rates_form_position=i.shipping_rates_form_position:tt(i.shipping_rates_form_position)||tt(n.shipping_rates_form_position)||(n.shipping_rates_form_position="after"),tt(i.shipping_rates_form_placement_selector)&&!tt(n.shipping_rates_form_placement_selector)?n.shipping_rates_form_placement_selector=i.shipping_rates_form_placement_selector:tt(i.shipping_rates_form_placement_selector)||tt(n.shipping_rates_form_placement_selector)||(n.shipping_rates_form_placement_selector="form[action^='/cart']:visible table:first, .cart-row:nth-last-child(2)"),tt(n.regular_cart_subtotal_table_placement_selector)||(n.regular_cart_subtotal_table_placement_selector=n.cart_subtotal_selector),tt(n.discount_log_placement_selector)||(n.discount_log_placement_selector=n.cart_subtotal_selector),null==n.custom_css&&(n.custom_css=""),tt(i.theme_css)&&(n.custom_css=n.custom_css+"\r\n"+i.theme_css),n}function b(t,e){return tt(t)?t:e}function w(){return u()&&"undefined"!=typeof window.qb.datastore.discount_groups?window.qb.datastore.discount_groups:[]}function v(){return"undefined"!=typeof window.qb&&"undefined"!=typeof window.qb.discount_groups?window.qb.discount_groups:[]}function R(){return"undefined"==typeof window.qb||"undefined"==typeof window.qb.customer_id?"":window.qb.customer_id}function q(){return-1!==window.location.href.indexOf("/products")}function M(){return-1!==window.location.href.indexOf("/cart")}function C(t){if("function"==typeof Spinner){var e=new Spinner({top:"-50px",left:"50%",position:"relative"}).spin().el;ct(t).first().parent().after(e)}}function T(){ct(".spinner").remove()}function O(t){ct(document).on("change",t.variant_selector,function(){D(t)}),0<ct(t.swatch_selector).length&&("hqtecno.myshopify.com"===g()?ct(t.swatch_selector).click(function(){setTimeout(function(){D(t)},1e3)}):ct(document).on("click",t.swatch_selector,function(){D(t)})),(new A).setup(function(){D(t)})}function A(){}function D(t){0!=ct(".quantity-breaks-now-wrapper").length&&ct(".quantity-breaks-now-wrapper").remove(),F(t)}function Y(i,n){var o=[];ct.each(window.qb.discount_groups,function(t,e){e.appliesToProduct(window.qb.product.id,window.qb.product_collections)&&o.push(e)}),1<o.length&&tt(i.multiple_groups_notice)&&ct("div.quantity-breaks-now-wrapper").append('<div class="multiple-groups-notice">'+i.multiple_groups_notice+"</div>"),ct.each(o,function(t,e){e.printDiscountTable(i,n)})}function k(i){var n=null;return 1==window.qb.product.variants.length?n=window.qb.product.variants[0]:ct.each(window.qb.product.variants,function(t,e){e.id==i&&(n=e)}),n}function N(t){var e=k(s(t));return null!=e?e.price:null}function F(t){var e=null;e=tt(t.table_placement_selector)?ct(t.table_placement_selector).first():ct(t.form_selector).first(),0==ct(".quantity-breaks-now-wrapper").length&&e.after('<div class="quantity-breaks-now-wrapper"></div>'),Y(t,N(t))}function E(t,e){function a(t,e){return void 0===t?e:t}function i(t,e,i,n){if(e=a(e,2),i=a(i,","),n=a(n,"."),isNaN(t)||null==t)return 0;var o=(t=(t/100).toFixed(e)).split(".");return o[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+i)+(o[1]?n+o[1]:"")}if(void 0===t||null==t)return"";if("string"==typeof t&&0==t.length)return"";var n=/\{\{\s*(\w+)\s*\}\}/;"string"==typeof t&&(t=t.replace(".",""));var o="";switch(e.match(n)[1]){case"amount":o=i(t,2);break;case"amount_no_decimals":o=i(t,0);break;case"amount_no_decimals_with_comma_separator":o=i(t,0,".",",");break;case"amount_with_comma_separator":o=i(t,2,".",",")}return e.replace(n,o)}function B(t){return Math.round(100*t)+"%"}function x(i,n){setTimeout(function(){ct(i.checkout_button_selector).off("click","**"),ct("#OffAmazonPaymentsWidgets0").unbind("click#OffAmazonPaymentsWidgets0"),ct("#OffAmazonPaymentsWidgets0").unbind("apay-OffAmazonPayments_mec_#OffAmazonPaymentsWidgets0"),ct(i.checkout_button_selector).prop("onclick",null),"lovely-fluffy-panda.myshopify.com"===g()||"luringskin.myshopify.com"===g()||"laumiere-gourmet-fruits.myshopify.com"===g()||"gotchu-philippines.myshopify.com"===g()||"maison-vantage.myshopify.com"===g()||"yogaclicks.myshopify.com"===g()||"airs-store.myshopify.com"===g()||"nouvelle-fortune-officielle.myshopify.com"===g()?ct(document).on("click",i.checkout_button_selector,function(t){var e=ct(".qb-discount-code-inputs input[type='text']").val();ct(t.target).hasClass("qb-net-order-button")||(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),ct(i.checkout_button_selector).prop("disabled",!0),C(i.checkout_button_selector),o(i).then(function(){a(i,n).then(function(){window.qb.datastore.shop.enabled_discount_codes&&void 0!==e&&e.length<1?n.getAppliedDiscountCode(function(){I(i,n)}):I(i,n)})}))}):"the-frontal-queen-la-store.myshopify.com"===g()||"rountine.myshopify.com"==g()||"animalshop111.myshopify.com"==g()||"animal112.myshopify.com"==g()||"animal111.myshopify.com"==g()||"dogcatpig123.myshopify.com"==g()||"pifito.myshopify.com"==g()?ct(i.checkout_button_selector).click(function(t){var e=ct(".qb-discount-code-inputs input[type='text']").val();ct(t.target).hasClass("qb-net-order-button")||(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),ct(i.checkout_button_selector).prop("disabled",!0),C(i.checkout_button_selector),window.qb.datastore.shop.enabled_discount_codes&&void 0!==e&&e.length<1?n.getAppliedDiscountCode(function(){I(i,n)}):I(i,n))}):ct(i.checkout_button_selector).click(function(t){var e=ct(".qb-discount-code-inputs input[type='text']").val();ct(t.target).hasClass("qb-net-order-button")||(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),ct(i.checkout_button_selector).prop("disabled",!0),C(i.checkout_button_selector),o(i).then(function(){a(i,n).then(function(){window.qb.datastore.shop.enabled_discount_codes&&void 0!==e&&e.length<1?n.getAppliedDiscountCode(function(){I(i,n)}):I(i,n)})}))})},1e3)}function I(i,t){if("undefined"==typeof window.qb.checkingOut||!window.qb.checkingOut){if(window.qb.checkingOut=!0,0<ct(i.agree_to_terms_selector).length&&ct(i.agree_to_terms_selector+":checked").length!=ct(i.agree_to_terms_selector).length)return;var e=t.createDraftOrder();ct.ajax({cache:!1,type:"POST",url:m()+"/get_checkout_url?shopify_domain="+g(),data:JSON.stringify(e),dataType:"json",contentType:"application/json; charset=utf-8",success:function(t){if(T(),ct(i.checkout_button_selector).prop("disabled",!1),t.invoice_url){var e=t.invoice_url.replace("checkout.shopify.com",i.primary_domain);e=n(e),"undefined"!=typeof window.qb.extraCheckoutParams?window.location.href=e.concat("?").concat(window.qb.extraCheckoutParams):window.location.href=e}else alert("An error occured, and we're unable to process your order at this time. Please contact customer service for assistance. ");window.qb.checkingOut=!1}})}}function U(t,e){var i=v();0<i.length&&new V(e,i,t).applyDiscounts();var n=new Q(e);M()&&(window.qb.datastore.shop.enabled_discount_codes?e.getAppliedDiscountCode(function(){n.updatePage(!1)}):n.updatePage(!1)),t.ajax_cart_integration_enabled&&n.initializeAjaxCartObserver(t)}function $(t,e){q()&&(new Q(e).setupEnv(t),O(t),F(t))}function j(t,e){this.message=t,this.amount=e}function G(t,e){this.message=t,this.amount=e}function Q(a){var i=this,n=function n(t){tt(t.custom_css)&&ct("head").append('<style type="text/css">'+t.custom_css+"</style>")},o=function o(t){if(0<a.totalDiscount||a.hasMinTierWarnings()){var e=P();t&&!e.ajax_cart_integration_enabled||(n(e),m(e),l(e,t),d(e),s(e),e.show_line_item_discount&&c(i.cart.items,e),0<a.totalDiscount&&u(e,a),0<a.totalDiscount&&(x(e,i.cart),ct("body .additional-checkout-button").css("display","none")),"chips-games.myshopify.com"===g()&&ct(e.quantity_selector).keyup(function(t){13==t.keyCode&&setTimeout(function(){e.enabled_cart_js_update?y(e,a):ct(e.cart_form_selector).submit()},500)}),""!==e.quantity_selector&&ct(document).on("change",e.quantity_selector,function(t){t.preventDefault(),t.stopImmediatePropagation(),setTimeout(function(){e.enabled_cart_js_update?y(e,a):ct(e.cart_form_selector).submit()},500)}),""!==e.quantity_button_selector&&ct(document).on("click",e.quantity_button_selector,function(t){t.preventDefault(),t.stopImmediatePropagation(),setTimeout(function(){e.enabled_cart_js_update?y(e,a):("community-wines.myshopify.com"!=e.shopify_domain&&t.stopPropagation(),ct(e.cart_form_selector).submit())},500)}))}},r=function(t){var i="",n=9999999;return ct.each(t,function(t,e){e.amount<n&&(i=e.message,n=e.amount)}),i},c=function c(t,e){var s=ct(".qb-price-item"),u=ct(".qb-total-line-item"),d=S(e.money_format);ct.each(t,function(t,i){if(0<i.appliedDiscount.total_discount_amount){var e=i.price-i.appliedDiscount.total_discount_amount/i.quantity,n=i.appliedDiscount.original_line_price-i.appliedDiscount.total_discount_amount,o=i.appliedDiscount.original_line_price,a=i.price,r='<span class="qb-line-item-original-price">'+E(o,d)+'</span><span class="qb-line-item-discounted-price">'+E(n,d)+"</span>",c='<span class="qb-line-item-original-price">'+E(a,d)+'</span><span class="qb-line-item-discounted-price">'+E(e,d)+"</span>";ct.each(s,function(t,e){ct(e).data("id")===i.key&&ct(e).html(c)}),ct.each(u,function(t,e){ct(e).data("id")===i.key&&ct(e).html(r)})}})},u=function u(t,s){t.enabled_discount_codes&&(ct(".discount-code-wrapper").remove(),p(t),ct(".apply-discount-code").prop("disabled",!0),0<window.qb.datastore.discount_codes.length&&0<window.qb.datastore.discount_codes[0].discountedAmount&&(_(window.qb.datastore.discount_codes[0],window.qb.datastore.shop),ct(document).on("click",".qb-discount-code-tag",function(t){t.stopImmediatePropagation(),t.preventDefault(),s.removeDiscountCode(function(){new Q(s).updatePage(!1)})})),0<window.qb.datastore.discount_codes.length&&window.qb.datastore.discount_codes[0].discountedAmount<=0&&s.removeDiscountCode(function(){new Q(s).updatePage(!1)}),ct(document).on("input",".discount-code-wrapper input[type='text']",function(){ct(".apply-discount-code").prop("disabled",!1)}),ct(document).on("click",".apply-discount-code",function(t){t.stopImmediatePropagation(),t.preventDefault();var e=window.qb.cart.items.flatMap(function(t){return t.collection_ids}),i=window.qb.cart.items.flatMap(function(t){return t.product_id}),n=window.qb.cart.items.flatMap(function(t){return t.variant_id}),o=window.qb.cart.original_total_price,a=window.qb.cart.item_count,r=window.qb.cart.token,c={discount_code:ct(".discount-code-wrapper input[type='text']").val(),shopify_domain:g(),options:{collections:e,products:i,variants:n,subtotal:o,quantity:a,cart_token:r}};window.qb.discountCodeData=c,s.submitDiscountCode(s,c,function(){new Q(s).updatePage(!1)})}))},s=function s(t){if(t.next_tier_offers_enabled){var e=a.getNextTierOffers(),i=r(e);tt(i)&&(0==ct(".qb-next-tier-offers").length?ct(t.cart_subtotal_selector).last().append('<span class="qb-next-tier-offers">'+i+"</span>"):ct(".qb-next-tier-offers").html(i))}},d=function d(t){if(t.minimum_tier_warnings_enabled){var e=a.getMinTierWarnings(),i=r(e);tt(i)&&(0==ct(".qb-min-cart-warnings").length?ct(t.cart_subtotal_selector).last().append('<span class="qb-min-cart-warnings">'+i+"</span>"):ct(".qb-min-cart-warnings").html(i))}},l=function l(t,e){if((!e||e&&t.show_discount_log_on_ajax_carts)&&t.enable_discount_log){var i=a.getDiscountLogEntries(),n="";ct.each(i,function(t,e){n+=e+"<br />"}),tt(n)&&(0==ct(".qb-discount-log").length?ct(t.cart_subtotal_selector).last().append('<div class="qb-discount-log">'+n+"</div>"):ct(".qb-discount-log").html(n))}},p=function p(t){var e=t.discount_code_input_placeholder||"Discount code",i=t.discount_code_button_text||"Apply",n='<div class="discount-code-wrapper"><label class="qb-discount-code-log"></label><div class="qb-discount-code-inputs"><input type="text" id=\'discount-code-field\' /><input type="submit" class="apply-discount-code" id=\'submit-discount-code\' /></div><span class="qb-discount-code-tag"></span></div>';ct(t.cart_subtotal_selector).last().append(n),ct("#discount-code-field").attr("placeholder",e),ct("#submit-discount-code").val(i)},_=function _(t,e){var i=S(e.money_format),n=e.discount_code_log;n=(n=n.replace("{{discount_code_amount}}",E(t.discountedAmount,i))).replace("{{discount_code}}",t.discountCode),ct(".qb-discount-code-log").append(n),ct(".qb-discount-code-tag").text(" "+t.discountCode),ct(".qb-discount-code-tag").css("visibility","visible"),ct(".qb-discount-code-inputs > input").prop("disabled",!0)},m=function m(t){var e=S(t.money_format);if(0<a.totalDiscount){if(0==ct(".qb-original-subtotal").length){var i='<span class="qb-original-subtotal">'+E(a.originalTotalPrice,e)+'</span><span class="qb-discounted-subtotal">'+E(a.totalPrice,e)+"</span>";ct(t.cart_subtotal_selector).last().html(i),window.qb.discountedSubtotalApplied=!0}else ct(".qb-discounted-subtotal").html(E(a.totalPrice,e)),ct(".qb-original-subtotal").html(E(a.originalTotalPrice,e));ct("#qb-net-order-original-total").css("text-decoration","line-through"),ct("#qb-net-order-original-total").text(E(a.originalTotalPrice,e)),ct("#qb-net-order-discounted-total").text(E(a.totalPrice,e))}else ct(t.cart_subtotal_selector).last().html(E(a.originalTotalPrice,e))},h=function(t,e){var i=["ajaxifyCart","cart-loading","AjaxifyCart","layer-addcart-modal"];if(tt(t.mutation_ids)){var n=t.mutation_ids.replace(/ /g,"").split(",");i=i.concat(n)}return-1!==i.indexOf(e.target.id)},f=function(t,i){var e=["drawer","cart-drawer__item-list","ajaxcart__footer--fixed","cart-item__qty","mm-opened","cart-sidebar","opened","cart-preview"];if(tt(t.mutation_classes)){var n=t.mutation_classes.replace(/ /g,"").split(",");e=e.concat(n)}var o=!1;return ct.each(e,function(t,e){"undefined"!=typeof i.target.classList&&i.target.classList.contains(e)&&(o=!0)}),o},b=function(t,e){return h(t,e)||f(t,e)},t=function(i){var e=!1,t=new MutationObserver(function(t){t.forEach(function(t){!e&&b(i,t)&&(window.qb.discountCodeApplied=!1,setTimeout(function(){a.updateCart(function(){var t=v();new V(a,t,i).applyDiscounts();var e=new Q(a);window.qb.datastore.shop.enabled_discount_codes&&!window.qb.discountCodeApplied?(window.qb.discountCodeApplied=!0,a.getAppliedDiscountCode(function(){e.updatePage(!0)})):e.updatePage(!0)})},250),e=!0)}),e=!1}),n={attributes:!0,childList:!0,characterData:!0,subtree:!0},o=document.body;t.observe(o,n)};this.cart=a,this.setupEnv=n,this.updatePage=o,this.showNextTierOffers=s,this.showMinTierWarnings=d,this.showDiscountLog=l,this.showDiscountedSubtotal=m,this.initializeAjaxCartObserver=t,this.checkMutations=b,this.checkMutationIds=h,this.checkMutationClasses=f}function V(r,t,e){var c=this,i=function(){ct.each(c.cart.items,function(t,e){var i=c.findBestDiscountGroup(e);if(i)c.applyDiscountsToItem(e,i);else{var n=c.findLowestMinTierDiscountGroup(e);n&&c.applyMinTierWarningToItem(e,n)}});var t=c.cart.hasDiscountLogEntries(),e=c.cart.hasMinTierWarnings();t&&e&&c.changeMinTierWarningsToNextTierOffers()},n=function(){ct.each(c.cart.items,function(t,e){if(""!=e.minTierWarning){var i=e.discountGroup.getMinTier();e.nextTierOffer=i.getNextTierOffer(e,c.cart),e.minTierWarning=""}})},o=function(i){var n=!1,o=0,a=0;return ct.each(c.discountGroups,function(t,e){e.appliesToProduct(i.productId,i.collectionIds)&&(o=e.getDiscountAmountForProduct(i,c.cart),a<o&&(n=e,a=o))}),n},a=function(i){var n=!1,o=0,a=9999999;return ct.each(c.discountGroups,function(t,e){e.appliesToProduct(i.productId,i.collectionIds)&&0==e.getDiscountAmountForProduct(i,r)&&(o=e.getMinTierAmountNeeded())<a&&(a=o,n=e)}),n},s=function(t,e){t.discountGroup=e,t.minTierWarning=e.getMinTierWarning(t)},u=function(t,e){t.discountGroup=e,t.appliedDiscount=e.getAppliedDiscount(t,c.cart),c.cart.totalDiscount+=t.appliedDiscount.total_discount_amount,c.cart.totalPrice-=t.appliedDiscount.total_discount_amount,t.discountLogEntry=e.getDiscountLogEntry(t,c.cart),t.nextTierOffer=e.getNextTierOffer(t,c.cart)},d=function(t,e){return 0<e.length?"apply_newest_group"==t.multiple_discount_group_behavior?[e[e.length-1]]:"apply_oldest_group"==t.multiple_discount_group_behavior?[e[0]]:e:e};this.filterDiscountGroups=d,this.discountGroups=d(e,t),this.cart=r,this.findBestDiscountGroup=o,this.findLowestMinTierDiscountGroup=a,this.applyDiscounts=i,this.applyDiscountsToItem=u,this.applyMinTierWarningToItem=s,this.changeMinTierWarningsToNextTierOffers=n}function W(t){var o=this,e=function(){return""!=o.minTierWarning},i=function(){return""!=o.discountLogEntry},n=function(){var n=[];return null!=o.properties&&ct.each(Object.keys(o.properties),function(t,e){var i={};i.name=e,i.value=o.properties[e],n.push(i)}),n},a=function(){var t={};return t.title=o.title,t.variant_id=o.variantId,t.product_id=o.productId,t.image=o.image,t.quantity=o.quantity,t.grams=o.grams,t.requires_shipping=o.requiresShipping,t.price=o.price/100,t.properties=o.getLineItemPropertiesArray(),t.applied_discount=o.appliedDiscount,"undefined"!==t.applied_discount.amount&&(t.applied_discount.amount=t.applied_discount.amount),t};this.title=t.title,this.quantity=t.quantity,this.variantId=t.variant_id,this.productId=t.product_id,this.price=t.price,this.giftCard=t.gift_card,this.productTitle=t.product_title,this.variantTitle=t.variant_title,this.variantOptions=t.variant_options,this.originalPrice=t.original_price,this.originalLinePrice=t.original_line_price,this.discountedPrice=t.discounted_price,this.linePrice=t.line_price,this.collectionIds=t.collection_ids,this.properties=t.properties,this.requiresShipping=t.requires_shipping,this.grams=t.grams,this.key=t.key,this.appliedDiscount={},this.discountGroup=null,this.minTierWarning="",this.nextTierOffer="",this.discountLogEntry="",this.image=t.image,this.handle=t.handle,this.hasMinTierWarning=e,this.hasDiscountLogEntry=i,this.getLineItemHash=a,this.getLineItemPropertiesArray=n}function K(){var o=this,t=function(){var i=[];return ct.each(o.items,function(t,e){i.push(e.getLineItemHash())}),i},e=function(){var i=[];return ct.each(o.items,function(t,e){tt(e.discountLogEntry)&&i.push(e.discountLogEntry)}),i},i=function(){var i=[];return ct.each(o.items,function(t,e){tt(e.minTierWarning)&&i.push(e.minTierWarning)}),i},n=function(){var i=[];return ct.each(o.items,function(t,e){tt(e.nextTierOffer)&&i.push(e.nextTierOffer)}),i},a=function(){var i=!1;return ct.each(o.items,function(t,e){e.hasMinTierWarning()&&(i=!0)}),i},r=function(){var i=!1;return ct.each(o.items,function(t,e){e.hasDiscountLogEntry()&&(i=!0)}),i},c=function(e){o.items=[];var n="";ct.ajax({cache:!1,type:"GET",url:"https://"+window.location.hostname+"/cart?view=quantity-breaks-now-cart",success:function(t){t=t.replace(/(\r\n|\n|\r)/gm,""),t=JSON.parse(t),n=_(),window.qb.enabled_multi_currencies={currencies_count:t.enabled_currencies_count,currencies:t.enabled_currencies,primary_domain:t.primary_domain},window.qb.shop.enabled_multi_currencies?(window.qb.enabled_multi_currencies.current_shop_currency=t.current_shop_currency,window.qb.enabled_multi_currencies.currency_format=rt[t.current_shop_currency].CURRENCY_FORMAT):(window.qb.enabled_multi_currencies.current_shop_currency=window.qb.shop.currency,window.qb.enabled_multi_currencies.currency_format=window.qb.shop.money_format),"undefined"!==window.qb.cart&&n&&(window.qb.cart.token=n),o.originalTotalPrice=t.original_total_price,o.totalDiscount=t.total_discount,o.totalPrice=t.total_price,o.totalWeight=t.total_weight,o.itemCount=t.item_count;var i=[];ct.each(t.items,function(t,e){i.push(new W(e))}),o.items=i,e()}})},s=function s(t,e){return e=(t.targetSelection,t.applyDiscountCode(e))},u=function(){var t={};return t.line_items=JSON.stringify(o.getLineItemsHash()),t.order_notes="",window.qb.datastore.shop.enabled_discount_codes&&0<window.qb.datastore.discount_codes.length&&(t=o.applyDiscountCode(window.qb.datastore.discount_codes[0],t)),0<ct("#CartSpecialInstructions:visible").length&&(t.order_notes=ct("#CartSpecialInstructions:visible").val()),0<ct("#cartSpecialInstructions:visible").length&&(t.order_notes+=ct("#cartSpecialInstructions:visible").val()),0<ct("#cartSpecialInstructionsFromPopup:visible").length&&(t.order_notes+=ct("#cartSpecialInstructionsFromPopup:visible").val()),""==t.order_notes&&0<ct("textarea[name='note']:visible:first").length&&(t.order_notes+=ct("textarea[name='note']:visible:first").val()),t},d=function d(i){var t=window.qb.cart.token;ct.ajax({cache:!1,type:"GET",url:m()+"/cart/remove_discount_code/"+t,success:function(t){if(t.deleted_discounted_cart){var e=window.qb.datastore.discount_codes[0];o.totalPrice=e.cartTotalPrice,window.qb.datastore.discount_codes=[],window.qb.discountCodeApplied=!1,ct(".discount-code-wrapper").remove(),ct(".qb-discount-code-inputs > input").prop("disabled",!1),i()}}})},l=function l(i,t,n){ct.ajax({cache:!1,type:"POST",url:m()+"/discount_codes/apply",data:JSON.stringify(t),contentType:"application/json; charset=utf-8",success:function(t){if(t.is_valid){window.qb.datastore.discount_codes=[],ct(".discount-code-wrapper input[type=text]").removeClass("qb-discount-code-error"),ct(".qb-invalid-discount-code").remove(),t.cartTotalPrice=i.totalPrice,t.cart=i;var e=new z(t);e.discountedAmount<i.totalPrice?i.totalPrice=Math.round(i.totalPrice-e.discountedAmount):i.totalPrice=0,window.qb.datastore.discount_codes.push(e),n()}else 0<ct(".qb-invalid-discount-code").length&&ct(".qb-invalid-discount-code").remove(),ct(".discount-code-wrapper input[type=text]").addClass("qb-discount-code-error"),ct(".qb-discount-code-inputs").append("<label class='qb-invalid-discount-code'>"+t.error_message+"</label>")}})},p=function p(i){var t=window.qb.cart.token;ct.ajax({cache:!1,type:"GET",url:m()+"/cart/applied_discount_code/"+t,success:function(t){if(void 0!==t&&t.is_valid){window.qb.datastore.discount_codes=[],t.cartTotalPrice=o.totalPrice,t.cart=o;var e=new z(t);e.discountedAmount<o.totalPrice?o.totalPrice=Math.round(o.totalPrice-e.discountedAmount):o.totalPrice=0,window.qb.datastore.discount_codes.push(e)}i()}})};this.items=[],this.originalTotalPrice=0,this.totalDiscount=0,this.totalPrice=0,this.totalWeight=0,this.itemCount=0,this.hasMinTierWarnings=a,this.hasDiscountLogEntries=r,this.updateCart=c,this.getDiscountLogEntries=e,this.getMinTierWarnings=i,this.getNextTierOffers=n,this.getLineItemsHash=t,this.createDraftOrder=u,this.submitDiscountCode=l,this.applyDiscountCode=s,this.getAppliedDiscountCode=p,this.removeDiscountCode=d}function H(t,e,i){var n=function(t){var e=P(),i=Math.floor(this.discountAmount),n={};return i>t.price&&(i=t.price),n.discount_amount=i,n.original_line_price=t.originalLinePrice,n.total_discount_amount=i*t.quantity,n.value_type="fixed_amount",n.description="Fixed Amount Discount",n.title=e.fixed_amount_discount_title,n.value=i/100,n.amount=i*t.quantity/100,n},o=function(t){var e=P(),i={};return i.value=Math.floor(100*this.discountPercent),i.original_line_price=t.originalLinePrice,i.discount_amount=Math.floor(Math.floor(t.price*i.value)/100),i.total_discount_amount=Math.floor(Math.floor(t.price*i.value*t.quantity)/100),i.value_type="percentage",i.description="Percentage Discount",i.title=e.percentage_discount_title,i.amount=Math.floor(Math.floor(t.price*i.value*t.quantity)/100)/100,i},a=function(t,e){return!(null==e||null==e.originalTotalPrice||e.originalTotalPrice<this.minCartValue)},r=function(){return this.minCartValue},c=function(){var t=P(),e=this.getAmount(),i=S(t.money_format);return new G(t.min_cart_value_warning.replace("{{amount}}",E(this.getAmount(),i)),e)},s=function(){var t=P(),e=this.getAmount(),i=S(t.money_format);return new j(t.next_tier_offer.replace("{{amount}}",E(this.getAmount(),i)),e)},u=function(t,e){return!(null==e||null==e.itemCount||e.itemCount<this.minCartQuantity)},d=function(){return this.minCartQuantity},l=function(){var t=P(),e=this.getAmount();return new G(t.min_cart_quantity_warning.replace("{{amount}}",e),e)},p=function(){var t=P(),e=this.getAmount();return new j(t.next_tier_cart_quantity_offer.replace("{{amount}}",e),e)},_=function(t){return!(null==t.originalLinePrice||t.originalLinePrice<this.minLineItemValue)},m=function(){return this.minLineItemValue},h=function(t){var e=P(),i=this.getAmount(),n=S(e.money_format);return new G(e.min_line_item_value_warning.replace("{{amount}}",E(i,n)).replace("{{product}}",'<span class="qb-product-name">'+t.title+"</span>"),i)},f=function(t){var e=P(),i=this.getAmount(),n=S(e.money_format);return new j(e.next_tier_line_item_value_offer.replace("{{amount}}",E(i,n)).replace("{{product}}",'<span class="qb-product-name">'+t.title+"</span>"),i)},b=function(t){return!(null==t.quantity||t.quantity<this.minLineItemQuantity)},y=function(){return this.minLineItemQuantity},g=function(t){var e=P(),i=this.getAmount();S(e.money_format);return new G(e.min_line_item_quantity_warning.replace("{{amount}}",i).replace("{{product}}",'<span class="qb-product-name">'+t.title+"</span>"),i)},w=function(t){var e=P(),i=this.getAmount();S(e.money_format);return new j(e.next_tier_line_item_quantity_offer.replace("{{amount}}",i).replace("{{product}}",'<span class="qb-product-name">'+t.title+"</span>"),i)},v=function(t,e){var i=this.discountGroup.getSelectedProductsQuantity(e);return!(null==i||i<this.getAmount())},R=function(){return this.minSelectedProductsQuantity},q=function(){var t=P(),e=this.getAmount();S(t.money_format);return new G(t.min_selected_products_quantity_warning.replace("{{amount}}",e).replace("{{discount_group_title}}",'<span class="qb-discount-group-title">'+this.discountGroup.title+"</span>"),e)},M=function(){var t=P(),e=this.getAmount();S(t.money_format);return new j(t.next_tier_selected_products_quantity_offer.replace("{{amount}}",e).replace("{{discount_group_title}}",'<span class="qb-discount-group-title-name">'+this.discountGroup.title+"</span>"),e)},C=function(t,e){var i=this.discountGroup.getSelectedProductsValue(e);return!(null==i||i<this.getAmount())},T=function(){return this.minSelectedProductsValue},O=function(){var t=P(),e=this.getAmount(),i=S(
t.money_format);return new G(t.min_selected_products_value_warning.replace("{{amount}}",E(e,i)).replace("{{discount_group_title}}",'<span class="qb-discount-group-title">'+this.discountGroup.title+"</span>"),e)},A=function(){var t=P(),e=this.getAmount(),i=S(t.money_format);return new j(t.next_tier_selected_products_value_offer.replace("{{amount}}",E(e,i)).replace("{{discount_group_title}}",'<span class="qb-discount-group-title">'+this.discountGroup.title+"</span>"),e)},D=function(t,e,i){var n="",o="",a="",r=e.discount_table_config.show_inline_maximum_qty,c=e.discount_table_config.show_maximum_qty,s=e.discount_table_config.required_amount_label,u=e.discount_table_config.discount_value_col_label,d=e.discount_table_config.discounted_price_col_label,l=S(e.money_format);switch(this.type){case"MinimumCartValueTier":n=E(n=this.minCartValue,l),r?("+"===(a=this.maximumRequirementAmount(e))?n=n.concat(a):n!==a.toString()&&(n=n+" - "+a),n=s.replace("{{min_requirement}} - {{max_requirement}}",n)):n=s.replace("{{min_requirement}}",n);break;case"MinimumCartQuantityTier":n=(n=this.minCartQuantity).toString(),r?("+"===(a=this.maximumRequirementAmount(e))?n=n.concat(a):n!==a.toString()&&(n=n+" - "+a),n=s.replace("{{min_requirement}} - {{max_requirement}}",n)):n=s.replace("{{min_requirement}}",n);break;case"MinimumLineItemValueTier":n=E(n=this.minLineItemValue,l),r?("+"===(a=this.maximumRequirementAmount(e))?n=n.concat(a):n!==a.toString()&&(n=n+" - "+a),n=s.replace("{{min_requirement}} - {{max_requirement}}",n)):n=s.replace("{{min_requirement}}",n);break;case"MinimumLineItemQuantityTier":n=(n=this.minLineItemQuantity).toString(),r?("+"===(a=this.maximumRequirementAmount(e))?n=n.concat(a):n!==a.toString()&&(n=n+" - "+a),n=s.replace("{{min_requirement}} - {{max_requirement}}",n)):n=s.replace("{{min_requirement}}",n);break;case"MinimumSelectedProductsValueTier":n=E(n=this.minSelectedProductsValue,l),r?("+"===(a=this.maximumRequirementAmount(e))?n=n.concat(a):n!==a.toString()&&(n=n+" - "+a),n=s.replace("{{min_requirement}} - {{max_requirement}}",n)):n=s.replace("{{min_requirement}}",n);break;case"MinimumSelectedProductsQuantityTier":n=(n=this.minSelectedProductsQuantity).toString(),r?("+"===(a=this.maximumRequirementAmount(e))?n=n.concat(a):n!==a.toString()&&(n=n+" - "+a),n=s.replace("{{min_requirement}} - {{max_requirement}}",n)):n=s.replace("{{min_requirement}}",n)}switch(t.discountType){case"percentage":o=B(this.discountPercent),o=u.replace("{{discount_value}}",o),p=E(p=i*(1-this.discountPercent),l),p=d.replace("{{discounted_price}}",p);break;case"fixed_amount":var p;o=E(o=this.discountAmount,l),o=u.replace("{{discount_value}}",o),(p=i-this.discountAmount)<0&&(p=0),p=E(p,l),p=d.replace("{{discounted_price}}",p)}var _=ct("#quantity-breaks-now-discount-tiers-table-row").html(),m={requirement_amount:n,maximum_requirement_amount:a,discount_value:o,discounted_price:p,show_discount_value:t.showDiscountValue,show_discounted_price:t.showDiscountedPrice,show_inline_maximum_qty:r,show_maximum_qty:c},h=Handlebars.compile(_)(m);ct("div.quantity-breaks-now-wrapper #discount-group-"+t.id+" table tbody").append(h)},Y=function(t){var e=!1,i=this.id,n=this.discountGroup.discountTiers.map(function(t){return t.id===i}),o=ct.inArray(!0,n)+1;if(o<this.discountGroup.discountTiers.length){var a=this.discountGroup.discountTiers[o];switch(this.type){case"MinimumCartValueTier":a.minCartValue>this.minCartValue&&(e=E(e=a.minCartValue-1,t.money_format));break;case"MinimumLineItemValueTier":a.minLineItemValue>this.minLineItemValue&&(e=E(e=a.minLineItemValue-1,t.money_format));break;case"MinimumSelectedProductsValueTier":a.minSelectedProductsValue>this.minSelectedProductsValue&&(e=E(e=a.minSelectedProductsValue-1,t.money_format));break;case"MinimumCartQuantityTier":a.minCartQuantity>this.minCartQuantity&&(e=a.minCartQuantity-1);break;case"MinimumLineItemQuantityTier":a.minLineItemQuantity>this.minLineItemQuantity&&(e=a.minLineItemQuantity-1);break;case"MinimumSelectedProductsQuantityTier":a.minSelectedProductsQuantity>this.minSelectedProductsQuantity&&(e=a.minSelectedProductsQuantity-1)}}else e="+";return e};this.discountAmount=L(t.discount_amount),this.discountPercent=t.discount_percent,this.discountType=t.discount_type,this.id=t.id,this.minCartValue=L(t.min_cart_value),this.minLineItemValue=L(t.min_line_item_value),this.minSelectedProductsValue=L(t.min_selected_products_value),this.minCartQuantity=t.min_cart_quantity,this.minLineItemQuantity=t.min_line_item_quantity,this.minSelectedProductsQuantity=t.min_selected_products_quantity,this.type=e,this.discountGroup=i,"MinimumCartValueTier"==this.type?(this.appliesTo=a,this.getAmount=r,this.getMinTierWarning=c,this.getNextTierOffer=s):"MinimumCartQuantityTier"==this.type?(this.appliesTo=u,this.getAmount=d,this.getMinTierWarning=l,this.getNextTierOffer=p,this.hasMaximumRequirmentAmount=!1):"MinimumSelectedProductsValueTier"==this.type?(this.appliesTo=C,this.getAmount=T,this.getMinTierWarning=O,this.getNextTierOffer=A):"MinimumSelectedProductsQuantityTier"==this.type?(this.appliesTo=v,this.getAmount=R,this.getMinTierWarning=q,this.getNextTierOffer=M,this.hasMaximumRequirmentAmount=!1):"MinimumLineItemValueTier"==this.type?(this.appliesTo=_,this.getAmount=m,this.getMinTierWarning=h,this.getNextTierOffer=f):(this.appliesTo=b,this.getAmount=y,this.getMinTierWarning=g,this.getNextTierOffer=w),"fixed_amount"==this.discountType?this.getAppliedDiscount=n:this.getAppliedDiscount=o,this.printDiscountTier=D,this.maximumRequirementAmount=Y}function z(t){var i=function i(t){var e=ct.extend(!0,{},JSON.parse(t.line_items)),n=[],o=this;return ct.each(e,function(t,i){ct.each(o.lineItemAppliedDiscounts,function(t,e){e.variantId===i.variant_id&&e.productId===i.product_id&&(i.applied_discount=e.applied_discount)}),n.push(i)}),t.line_items=JSON.stringify(n),t},n=function n(t){var e;return"all"==this.targetSelection&&(e="fixed_amount"==this.valueType?this.fixedAmountDiscountCodeHash():this.percentageDiscountCodeHash()),t.applied_discount=JSON.stringify(e),t},o=function o(t){var n=[],e=this.collectionIds,i=t.items.map(function(t){return 0<t.collectionIds.length&&ct.each(t.collectionIds,function(t,i){ct.each(e,function(t,e){e===i.toString()&&n.push(i)})}),0<(n=n.filter(function(t){return t})).length?(n=[],t):null});return i=i.filter(function(t){return t}),this.applyDiscountLineItemHash(t,i)},r=function r(t){var e=this.productIds,n=this.variantIds,o=[],a=[];return ct.each(t.items,function(t,i){i.productId&&ct.each(e,function(t,e){i.productId.toString()===e&&o.push(i)}),i.variantId&&ct.each(n,function(t,e){i.variantId.toString()===e&&a.push(i)})}),o=(o=o.concat(a)).filter(function(t){return t}),this.applyDiscountLineItemHash(t,o)},m=function m(t,e,i){var n=0,o=ct.extend(!0,{},e.getLineItemHash());if("percentage"===t){n=i/(a=e.price*e.quantity-100*o.applied_discount.amount)*100}else{var a=Math.floor(e.price-100*o.applied_discount.amount/e.quantity);n=Math.floor(a*(i/100))}return n},h=function h(t,e,i,n,o){var a={};return"undefined"==typeof t.applied_discount.amount||100===i?t.applied_discount.value=i:100<t.applied_discount.value+i?(i=100,t.applied_discount.value=i):t.applied_discount.value=t.applied_discount.value+i,t.applied_discount.discount_amount=Math.floor(Math.floor(e.price*t.applied_discount.value)/100),t.applied_discount.total_discount_amount=Math.floor(Math.floor(e.price*t.applied_discount.value*e.quantity)/100),t.applied_discount.amount=Math.floor(Math.floor(e.price*t.applied_discount.value*e.quantity)/100)/100,t.applied_discount.value_type=o,"undefined"==typeof t.applied_discount.title?t.applied_discount.title=n:t.applied_discount.title=t.applied_discount.title.concat(", ",n),a={variantId:e.variantId,productId:e.productId,applied_discount:t.applied_discount},{totalDiscountAmount:t.applied_discount.total_discount_amount,appliedDiscount:a}},f=function f(t,e,i,n,o){var a={};return"undefined"==typeof t.applied_discount.amount?(t.applied_discount.value=i/100,t.applied_discount.discount_amount=i,t.applied_discount.total_discount_amount=i*e.quantity,t.applied_discount.amount=i*e.quantity/100,t.applied_discount.value_type=o,t.applied_discount.title=n):(t.applied_discount.total_discount_amount>=e.original_line_price?(t.applied_discount.value=e.price/100,t.applied_discount.discount_amount=e.price,t.applied_discount.total_discount_amount=e.price*e.quantity,t.applied_discount.amount=e.price*e.quantity/100):(t.applied_discount.value=t.applied_discount.value+i/100,t.applied_discount.discount_amount=t.applied_discount.discount_amount+i,t.applied_discount.total_discount_amount=Math.floor(t.applied_discount.total_discount_amount+Math.floor(i*e.quantity)),t.applied_discount.amount=Math.floor(t.applied_discount.amount+i*e.quantity/100)),t.applied_discount.value_type=o,t.applied_discount.title=t.applied_discount.title.concat(", ",n)),a={variantId:e.variantId,productId:e.productId,applied_discount:t.applied_discount},{totalDiscountAmount:t.applied_discount.total_discount_amount,appliedDiscount:a}},a=function a(t,e){var u=this.discountCode,d=this.valueType,c=0,l={discountAmount:0,totalDiscountAmount:0},p={},_=this;return"fixed_amount"==this.valueType?ct.each(e,function(t,e){var i=ct.extend(!0,{},e.getLineItemHash()),n=e.price*e.quantity;if(c=100*_.amount,"undefined"!=typeof i.applied_discount.value_type&&i.applied_discount.value_type!==d){var o=m(i.applied_discount.value_type,e,c),a=o;if(o>=e.price&&(a=o=e.price*e.quantity,fullPercent=!0),"undefined"!=typeof i.applied_discount.amount)a=(r=n-100*i.applied_discount.amount)*o/(e.price*e.quantity)/100*100,a=parseFloat(a.toFixed(2)),n=r;l.discountAmount=n<=c?l.discountAmount+n/100:l.discountAmount+c/100,p=h(i,e,a,u,i.applied_discount.value_type),_.lineItemAppliedDiscounts.push(p.appliedDiscount)}else{var r;if(c>e.price&&(c=e.price),"undefined"!=typeof i.applied_discount.amount)n=r=n-100*i.applied_discount.amount;l.discountAmount=n<=c?l.discountAmount+n/100:l.discountAmount+c/100,p=f(i,e,c,u,d),_.lineItemAppliedDiscounts.push(p.appliedDiscount)}l.totalDiscountAmount=l.totalDiscountAmount+p.totalDiscountAmount}):ct.each(e,function(t,e){var i=ct.extend(!0,{},e.getLineItemHash()),n=!1,o=e.price*e.quantity,a=_.amount;if("undefined"!=typeof i.applied_discount.value_type&&i.applied_discount.value_type!==d){var r=m(i.applied_discount.value_type,e,a);if(r>=e.price&&(r=e.price*e.quantity,n=!0),"undefined"!=typeof i.applied_discount.amount)o=c=o-i.applied_discount.total_discount_amount,a=r*e.quantity;l.discountAmount=o<=a?l.discountAmount+o/100:Math.floor(l.discountAmount+Math.floor(a/100)),p=f(i,e,r,u,i.applied_discount.value_type,n),_.lineItemAppliedDiscounts.push(p.appliedDiscount)}else{var c,s=a;if("undefined"!=typeof i.applied_discount.amount)s=(c=o-100*i.applied_discount.amount)*a/(e.price*e.quantity),a=c*(a/100),o=c;l.discountAmount=o<=a?l.discountAmount+o/100:l.discountAmount+a/100,p=h(i,e,s,u,d),_.lineItemAppliedDiscounts.push(p.appliedDiscount)}l.totalDiscountAmount=l.totalDiscountAmount+p.totalDiscountAmount}),this.discountedAmount=100*l.discountAmount,this.discountedCartTotalPrice=l.totalDiscountAmount,ct.extend(!0,{},t.getLineItemsHash())},e=function e(){var t={};return t.description=this.discountCode,t.value_type=this.valueType,t.value=this.value,t.amount=this.amount,t.title=this.discountCode,t},c=function c(){var t={};return t.description=this.discountCode,t.value_type=this.valueType,t.value=this.value,t.amount=this.amount,t.title=this.discountCode,t};this.cartTotalPrice=t.cartTotalPrice,this.value=-1*t.discounted_value,this.amount=-1*t.discounted_value,this.discountedAmount=0,this.discountedCartTotalPrice=0,this.discountCode=t.discount_code,this.valueType=t.value_type,this.title=t.discount_code,this.targetSelection=t.discount_applies_to.target_selection,this.cartToken=t.cart_token,this.lineItemAppliedDiscounts=[],this.fixedAmountDiscountCodeHash=e,this.percentageDiscountCodeHash=c,this.applyDiscountToAll=n,this.discountedItemInCollection=o,this.discountedItemInProduct=r,this.applyDiscountLineItemHash=a,this.getDiscountedLineItems=i,"all"===this.targetSelection?("percentage"==t.value_type?this.amount=Math.floor(this.cartTotalPrice*this.value/100)/100:this.amount=L(this.value),this.discountedAmount=100*this.amount,this.discountedCartTotalPrice=this.cartTotalPrice-100*this.amount,this.applyDiscountCode=this.applyDiscountToAll):("collections"==this.targetSelection?(this.collectionIds=t.discount_applies_to.collections||[],this.draftOrderLineItems=this.discountedItemInCollection(t.cart)):(this.productIds=t.discount_applies_to.products||[],this.variantIds=t.discount_applies_to.variants||[],this.draftOrderLineItems=this.discountedItemInProduct(t.cart)),this.applyDiscountCode=this.getDiscountedLineItems)}function J(t){var u=this,i=function(i,n){if(null==n)return u.discountTiers;var o=null;return ct.each(u.discountTiers,function(t,e){e.appliesTo(i,n)&&(o=e)}),o},e=function(t,i){if(it(t)){var n=[];return ct.each(t,function(t,e){n.push(new H(e,i,u))}),n}return[]},n=function(t,e){var i=!1,n=u.getDiscountTier(t,e);return n&&(i=(i=n.getAppliedDiscount(t)).amount),i},o=function(i,n){var o=!1,a=!1;return ct.each(u.discountTiers,function(t,e){e.appliesTo(i,n)?o=e:o&&!1===a&&(a=e)}),a},a=function(){return 0<u.discountTiers.length&&u.discountTiers[0]},r=function(){var t=u.getMinTier();return!!t&&t.getAmount()},c=function(i){var n=!1;return ct.each(u.products,function(t,e){e.shopify_product_id==i&&(n=!0)}),n},s=function(){return!0},d=function(t,e){var n=!1;return ct.each(e,function(t,i){ct.each(u.collections,function(t,e){e.shopify_collection_id==i&&(n=!0)})}),n},l=function(i,n){var t=i.discount_table_config.show_maximum_qty,e=i.discount_table_config.discount_table_type;if(u.showDiscountTable){var o="";switch(u.discountTierType){case"MinimumCartValueTier":o=i.minimum_cart_value_label;break;case"MinimumCartQuantityTier":o=i.minimum_cart_quantity_label;break;case"MinimumLineItemQuantityTier":o=i.minimum_line_item_quantity_label;break;case"MinimumLineItemValueTier":o=i.minimum_line_item_value_label;break;case"MinimumSelectedProductsQuantityTier":o=i.minimum_selected_products_quantity_label;break;case"MinimumSelectedProductsValueTier":o=i.minimum_selected_products_value_label}var a=ct("#quantity-breaks-now-discount-tiers-table").html(),r={requirement_label:o,discount_label:i.discount_label,maximum_requirement_label:"Max Qty",show_maximum_qty:t,table_header:u.title,discount_group_id:u.id,description:u.description,discounted_price_label:i.discounted_price_label,show_discount_value:u.showDiscountValue,show_discounted_price:u.showDiscountedPrice},c=Handlebars.compile(a)(r);ct("div.quantity-breaks-now-wrapper").append(c);var s={discountType:u.discountType,id:u.id,showDiscountValue:u.showDiscountValue,showDiscountedPrice:u.showDiscountedPrice};this.defaultDiscountTableFormat(e),ct.each(u.discountTiers,function(t,e){e.printDiscountTier(s,i,n)})}},p=function(t){t.discount_table_config.discount_table_type;var e=t.discount_table_config.table_title_font_size,i=t.discount_table_config.table_description_font_size,n=t.discount_table_config.table_title_color,o=t.discount_table_config.table_description_color;ct(".quantity-breaks-now-discount-title").css("font-size",parseInt(e)),ct(".quantity-breaks-now-discount-description").css("font-size",parseInt(i)),ct(".quantity-breaks-now-discount-title").css("color",n),ct(".quantity-breaks-now-discount-description").css("color",o)},_=function(t){t.discount_table_config.discount_table_type;var e=t.discount_table_config.border_radius.toString();e=e.concat("px"),ct("table.quantity-breaks-now-discount-table").css("border-collapse","separate !important"),ct(".quantity-breaks-now-discount-table th:first-child").css({"-moz-border-radius":e.concat(" 0 0 0"),"-webkit-border-radius":e.concat(" 0 0 0"),"border-radius":e.concat(" 0 0 0")}),ct(".quantity-breaks-now-discount-table th:last-child").css({"-moz-border-radius":"0 "+e+" 0 0","-webkit-border-radius":"0 "+e+" 0 0","border-radius":"0 "+e+" 0 0"}),ct(".quantity-breaks-now-discount-table tr:last-child td:first-child").css({"-moz-border-radius":"0 0 0 ".concat(e),"-webkit-border-radius":"0 0 0 ".concat(e),"border-radius":"0 0 0 ".concat(e)}),ct(".quantity-breaks-now-discount-table tr:last-child td:last-child").css({"-moz-border-radius":"0 0 ".concat(e+" 0"),"-webkit-border-radius":"0 0 ".concat(e+" 0"),"border-radius":"0 0 ".concat(e+" 0")})},m=function(t){var e=t.discount_table_config.discount_table_type,i=t.discount_table_config.bg_table_row_color,n=t.discount_table_config.bg_header_color,o=t.discount_table_config.border_color,a=t.discount_table_config.border_width.toString(),r=t.discount_table_config.text_th_color,c=t.discount_table_config.text_td_color,s=t.discount_table_config.border_type,u=t.discount_table_config.table_font_size,d=a.concat("px ");d=(d=d.concat(s+" ")).concat(o),ct(".quantity-breaks-now-discount-table").css("font-size",parseInt(u)),ct(".quantity-breaks-now-discount-table th").css("color",r),ct(".quantity-breaks-now-discount-table th").css("background-color",n),ct(".qb-discount-table-row td").css("color",c),ct(".qb-discount-table-row td").css("background-color",i),"default-grid"===e?(ct(".quantity-breaks-now-discount-table th").css("border-bottom",d),ct(".quantity-breaks-now-discount-table th").css("border-top",d),ct(".quantity-breaks-now-discount-table th:last-child").css({"border-left":d,"border-right":d}),ct(".quantity-breaks-now-discount-table th:first-child").css({"border-left":d,"border-right":d}),ct(".qb-discount-table-row td").css("border-bottom",d),ct(".qb-discount-table-row td:first-child").css({"border-left":d,"border-right":d}),ct(".qb-discount-table-row td:last-child").css({"border-left":d,"border-right":d})):(ct(".quantity-breaks-now-discount-table th:nth-child(2)").css({"border-left":"none","border-right":"none"}),ct(".quantity-breaks-now-discount-table th").css({"border-bottom":d,"border-top":d}),ct(".quantity-breaks-now-discount-table th:first-child").css({"border-left":d,"border-right":"none"}),ct(".quantity-breaks-now-discount-table th:last-child").css({"border-left":"none","border-right":d}),ct(".quantity-breaks-now-discount-table td:nth-child(2)").css({"border-left":"none","border-right":"none"}),ct(".qb-discount-table-row td").css("border-bottom",d),ct(".qb-discount-table-row td:first-child").css({"border-left":d,"border-right":"none"}),ct(".qb-discount-table-row td:last-child").css({"border-left":"none","border-right":d}))},h=function(t){"default-grid"===t&&ct(".quantity-breaks-now-discount-table").prop("id","default-type")},f=function(t,e){return i(t,e).getAppliedDiscount(t)},b=function(t){var e=P(),i=t.appliedDiscount,n=S(e.money_format);return e.discount_log_text.replace("{{total_discount_amount}}",E(Math.floor(i.total_discount_amount),n)).replace("{{discount_amount}}",E(Math.floor(i.discount_amount),n)).replace("{{product_title}}",t.title).replace("{{discount_group_title}}",u.title).replace("{{quantity}}",t.quantity).replace("{{discount_percent}}",B(i.value/100))},y=function(t,e){var i=o(t,e);return i?i.getNextTierOffer(t,e):""},g=function(t){var e=a(t);return e?e.getMinTierWarning(t):""},w=function(t){var i=0;return ct.each(t.items,function(t,e){u.appliesToProduct(e.productId,e.collectionIds)&&(i+=e.quantity)}),i},v=function(t){var i=0;return ct.each(t.items,function(t,e){u.appliesToProduct(e.productId,e.collectionIds)&&(i+=e.quantity*e.price)}),i};this.products=t.products||[],this.collections=t.collections||[],this.cartLabel=t.cart_label||"",this.description=t.description||"",this.discountEnabled=t.discount_enabled||!1,this.discountTierType=t.discount_tier_type||"MinimumCartValueTier",this.discountType=t.discount_type||"percentage",this.showDiscountTable=t.show_discount_table||!1,this.showDiscountValue=t.show_discount_value||!1,this.showDiscountedPrice=t.show_discounted_price||!1,this.title=t.title||"",this.groupType=t.type||"all",this.createDiscountTierObjects=e,this.discountTiers=this.createDiscountTierObjects(t.discount_tiers,t.discount_tier_type),this.id=t.id,"ProductDiscount"==this.groupType?this.appliesToProduct=c:"AllDiscount"==this.groupType?this.appliesToProduct=s:"CollectionDiscount"==this.groupType&&(this.appliesToProduct=d),this.getDiscountAmountForProduct=n,this.getDiscountTier=i,this.printDiscountTable=l,this.getMinTier=a,this.getMinTierAmountNeeded=r,this.getNextTier=o,this.getAppliedDiscount=f,this.getDiscountLogEntry=b,this.getNextTierOffer=y,this.getMinTierWarning=g,this.getSelectedProductsQuantity=w,this.getSelectedProductsValue=v,this.defaultDiscountTableFormat=h,this.discountTableBorderRadius=_,this.discountTableBorderStyle=m,this.discountTableHeader=p}function Z(){return 0<w().length}function X(){return window.qb.discount_groups=[],ct.each(w(),function(t,e){e.discount_enabled&&window.qb.discount_groups.push(new J(e))}),!!it(window.qb.discount_groups)}function tt(t){return null!=t&&""!=t&&void 0!==t}function et(t){return void 0!==t}function it(t){return null!=t&&void 0!==t&&0<t.length}function nt(e){var t=["revessel.myshopify.com"];e.enabled_cart_js_update&&-1!=ct.inArray(g(),t)&&ct(document).on("click",e.quantity_button_selector,function(t){t.preventDefault(),t.stopImmediatePropagation(),setTimeout(function(){y(e,cart)},1e3)})}function ot(t,e){t.reload_cart_page&&setInterval(function(){ct(".qb-discounted-subtotal").length<1&&("shiningmood.myshopify.com"==g()?e.updateCart(function(){X(),U(t,e)}):(X(),U(t,e)))},1e3)}function at(){var t=P();if(window.qb.datastore.discount_codes=[],window.qb.discountCodeApplied=!1,window.qb.discountedSubtotalApplied=!0,window.qb.convertedCurrency={converted_amount:1,currency_format:t.money_format},t&&(""==R()||!t.disable_for_logged_in_customers)){var e=new K;Z()&&e.updateCart(function(){c(t).then(function(){X(),it(window.qb.discount_groups)&&$(t,e),U(t,e),ot(t,e),nt(e)})})}}var rt={AED:{SYMBOL:"Dhs.",CURRENCY_FORMAT:"Dhs. {{amount}}"},ANG:{SYMBOL:"\u0192;.",CURRENCY_FORMAT:"\u0192;{{amount}}"},BAM:{SYMBOL:"KM",CURRENCY_FORMAT:"KM {{ amount_with_comma_separator }}"},BNG:{SYMBOL:"\u043b\u0432",CURRENCY_FORMAT:"{{ amount }} \u043b\u0432"},BIF:{SYMBOL:"FBu.",CURRENCY_FORMAT:"FBu. {{ amount_with_comma_separator }}"},BMD:{SYMBOL:"BD$",CURRENCY_FORMAT:"BD${{ amount }}"},BND:{SYMBOL:"$",CURRENCY_FORMAT:"${{ amount }}"},BOB:{SYMBOL:"$",CURRENCY_FORMAT:"Bs{{ amount_with_comma_separator }}"},BRL:{SYMBOL:"R$",CURRENCY_FORMAT:"R$ {{ amount }}"},BWP:{SYMBOL:"P",CURRENCY_FORMAT:"P{{ amount }}"},BZD:{SYMBOL:"BZ$",CURRENCY_FORMAT:"BZ${{ amount }}"},CDF:{SYMBOL:"FC",CURRENCY_FORMAT:"FC{{ amount }}"},CHF:{SYMBOL:"SFr.",CURRENCY_FORMAT:"SFr. {{ amount }}"},CLP:{SYMBOL:"$",CURRENCY_FORMAT:"${{ amount }}"},CNY:{SYMBOL:"\xa5",CURRENCY_FORMAT:"\xa5{{ amount }}"},COP:{SYMBOL:"$",CURRENCY_FORMAT:"${{ amount_with_comma_separator }}"},CRC:{SYMBOL:"\u20a1",CURRENCY_FORMAT:"\u20a1 {{ amount_with_comma_separator }}"},CVE:{SYMBOL:"$",CURRENCY_FORMAT:"{{ amount_with_comma_separator }}$"},CZK:{SYMBOL:"K\u010d",CURRENCY_FORMAT:"{{ amount_with_comma_separator }} K\u010d"},DJF:{SYMBOL:"Fdj",CURRENCY_FORMAT:"{{ amount }} Fdj"},DKK:{SYMBOL:"kr",CURRENCY_FORMAT:"{{ amount_with_comma_separator }} kr"},DOP:{SYMBOL:"RD$",CURRENCY_FORMAT:"RD$ {{ amount_with_comma_separator }}"},EGP:{SYMBOL:"LE",CURRENCY_FORMAT:"LE {{ amount }}"},ETB:{SYMBOL:"Br",CURRENCY_FORMAT:"Br{{ amount }}"},FJD:{SYMBOL:"FJ$",CURRENCY_FORMAT:"FJ${{ amount }}"},FKP:{SYMBOL:"\xa3",CURRENCY_FORMAT:"\xa3{{ amount }}"},GBP:{SYMBOL:"\xa3",CURRENCY_FORMAT:"\xa3{{ amount }}"},GEL:{SYMBOL:"GEL",CURRENCY_FORMAT:"{{ amount }} GEL"},GIP:{SYMBOL:"\xa3",CURRENCY_FORMAT:"\xa3{{ amount }}"},GMD:{SYMBOL:"D",CURRENCY_FORMAT:"D {{ amount }}"},GNF:{SYMBOL:"FG",CURRENCY_FORMAT:"FG {{ amount_with_comma_separator }}"},GTQ:{SYMBOL:"Q",CURRENCY_FORMAT:"Q{{ amount }}"},GYD:{SYMBOL:"G$",CURRENCY_FORMAT:"G${{ amount }}"},HKD:{SYMBOL:"HK$",CURRENCY_FORMAT:"HK${{ amount }}"},HNL:{SYMBOL:"L",CURRENCY_FORMAT:"L {{ amount }}"},HRK:{SYMBOL:"kn",CURRENCY_FORMAT:"{{ amount_with_comma_separator }} kn"},HTG:{SYMBOL:"G",CURRENCY_FORMAT:"G {{ amount }}"},HUF:{SYMBOL:"Ft",CURRENCY_FORMAT:"{{ amount }} Ft"},IDR:{SYMBOL:"Rp",CURRENCY_FORMAT:"Rp {{ amount_with_comma_separator }}"},ILS:{SYMBOL:"NIS",CURRENCY_FORMAT:"{{ amount }} NIS"},INR:{SYMBOL:"Rs.",CURRENCY_FORMAT:"Rs. {{ amount }}"},ISK:{SYMBOL:"kr",CURRENCY_FORMAT:"{{ amount_no_decimals_with_comma_separator }} kr"},JMD:{SYMBOL:"$",CURRENCY_FORMAT:"${{ amount }}"},KES:{SYMBOL:"KSh",CURRENCY_FORMAT:"KSh{{ amount }}"},KGS:{SYMBOL:"\u043b\u0432",CURRENCY_FORMAT:"\u043b\u0432{{ amount }}"},KHR:{SYMBOL:"KHR",CURRENCY_FORMAT:"KHR{{ amount }}"},KMF:{SYMBOL:"CF",CURRENCY_FORMAT:"{{ amount_no_decimals_with_comma_separator }} CF"},KRW:{SYMBOL:"\u20a9",CURRENCY_FORMAT:"\u20a9{{ amount_with_comma_separator }}"},KYD:{SYMBOL:"$",CURRENCY_FORMAT:"${{ amount }}"},KZT:{SYMBOL:"KZT",CURRENCY_FORMAT:"{{ amount }} KZT"},LAK:{SYMBOL:"\u20ad",CURRENCY_FORMAT:"\u20ad{{ amount }}"},LBP:{SYMBOL:"L\xa3",CURRENCY_FORMAT:"L\xa3{{ amount }}"},LRD:{SYMBOL:"L$",CURRENCY_FORMAT:"L${{ amount }}"},LSL:{SYMBOL:"M",CURRENCY_FORMAT:"M{{ amount }}"},MAD:{SYMBOL:"Dh",CURRENCY_FORMAT:"Dh {{ amount }}"},MDL:{SYMBOL:"MDL",CURRENCY_FORMAT:"{{ amount }} MDL"},MKD:{SYMBOL:"\u0434\u0435\u043d",CURRENCY_FORMAT:"\u0434\u0435\u043d {{ amount }}"},MMK:{SYMBOL:"K",CURRENCY_FORMAT:"K{{ amount }}"},MNT:{SYMBOL:"\u20ae",CURRENCY_FORMAT:"{{ amount }} \u20ae"},MOP:{SYMBOL:"MOP$",CURRENCY_FORMAT:"MOP${{ amount }}"},MVR:{SYMBOL:"Rf",CURRENCY_FORMAT:"Rf{{ amount }}"},MWK:{SYMBOL:"Mk",CURRENCY_FORMAT:"Mk{{ amount }}"},MXN:{SYMBOL:"$",CURRENCY_FORMAT:"$ {{ amount }}"},MYR:{SYMBOL:"RM",CURRENCY_FORMAT:"RM{{ amount }}"},MZN:{SYMBOL:"Mt",CURRENCY_FORMAT:"{{ amount }} Mt"},NAD:{SYMBOL:"N$",CURRENCY_FORMAT:"N${{ amount }}"},NGN:{SYMBOL:"\u20a6",CURRENCY_FORMAT:"\u20a6{{ amount }}"},NIO:{SYMBOL:"C$",CURRENCY_FORMAT:"C${{ amount }}"},NOK:{SYMBOL:"kr",CURRENCY_FORMAT:"{{ amount_with_comma_separator }} kr"},JPY:{SYMBOL:"\xa5",CURRENCY_FORMAT:"\xa5{{amount}}"},PHP:{SYMBOL:"\u20b1",CURRENCY_FORMAT:"\u20b1{{amount}}"},CAD:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount}}"},ALL:{SYMBOL:"Lek",CURRENCY_FORMAT:"Lek {{amount}}"},AOA:{SYMBOL:"Kz",CURRENCY_FORMAT:"Kz{{amount}}"},AMD:{SYMBOL:"AMD",CURRENCY_FORMAT:"{{amount}} AMD"},ARS:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount_with_comma_separator}}"},AUD:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount}}"},AWD:{SYMBOL:"Afl",CURRENCY_FORMAT:"Afl{{amount}}"},BBD:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount}}"},BBT:{SYMBOL:"Tk",CURRENCY_FORMAT:"Tk {{amount}}"},DZD:{SYMBOL:"DA",CURRENCY_FORMAT:"DA {{amount}}"},EUR:{SYMBOL:"\u20ac",CURRENCY_FORMAT:"\u20ac{{ amount_with_comma_separator }}"},LKR:{SYMBOL:"Rs",CURRENCY_FORMAT:"Rs {{amount}}"},MUR:{SYMBOL:"Rs",CURRENCY_FORMAT:"Rs {{amount}}"},NPR:{SYMBOL:"Rs",CURRENCY_FORMAT:"Rs{{amount}}"},PKR:{SYMBOL:"Rs.",CURRENCY_FORMAT:"Rs.{{amount}}"},SCR:{SYMBOL:"Rs",CURRENCY_FORMAT:"Rs {{amount}}"},USD:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount}}"},TWD:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount}}"},SGD:{SYMBOL:"$",CURRENCY_FORMAT:"${{amount}}"}};A.prototype.track=function(e,i,n){return function o(){if(n)return i.apply(this,arguments),e.apply(this,arguments);var t=e.apply(this,arguments);return i.apply(this,arguments),t}},A.prototype.setup=function(t){history.pushState=this.track(history.pushState,t),history.replaceState=this.track(history.replaceState,t),window.addEventListener("popstate",t)},ct(document).ready(function(){et(window.qb)&&"undefined"==typeof window.qb.running&&(window.qb.running=!0,p()?at():l())})})};"undefined"==typeof jQuery||parseFloat(jQuery.fn.jquery)<1.7?loadScript("//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js",function(){var t=jQuery.noConflict(!0);myFrontendJavascriptQB(t)}):myFrontendJavascriptQB(jQuery);