1!function(E,q){var O="wapf-",P="."+O;E.wapfTT=function(){var r=10,a=E(".wttw"),n=a.find(".wapf-ttp"),c=n[0],t=null,o=null,e="mouseleave";function i(){t=setTimeout(function(){a.is(":hover")||(a.attr({style:"","aria-hidden":!0})[0].className="wttw",o=null)},75)}E(".wapf").on("mouseenter focus",P+"tt-wrap",function(e){clearTimeout(t);e=E(e.currentTarget);e.is(o)||function(e,i){var t;e&&(n.html(e),a[0].className="wttw",i&&a.addClass("tt-img"),t=o[0].getBoundingClientRect(),e=i?"t":function(e,t){var a={t:"s",b:"e",l:"s",r:"e"},n={t:"b",b:"t",l:"r",r:"l",v:"h",h:"v"},i=-1<["t","b"].indexOf(e)?"v":"h",i=t[i];return i[a[e]]?e:i[a[n[e]]]?n[e]:"t"}(o.data("dir")||"r",{v:{s:t.top-r>c.offsetHeight,e:innerHeight-(t.bottom+r)>c.offsetHeight},h:{s:t.left-r>c.offsetWidth,e:innerWidth-(t.right+r)>c.offsetWidth}}),t=function(e,t){var a=c.getBoundingClientRect(),n={x:scrollX,y:scrollY},n={x:n.x,y:n.y};"t"!=t&&"b"!=t||(n.x+=e.left+(e.width/2-a.width/2));"t"==t&&(n.y+=e.top-a.height-r);"b"==t&&(n.y+=i?e.top+20:e.bottom+r);"l"!=t&&"r"!=t||(n.y+=e.top+(e.height/2-a.height/2));"l"==t&&(n.x+=e.left-r-a.width);"r"==t&&(n.x+=e.right+r);return n}(t,e),a.css({left:t.x,top:t.y}),a.addClass("tt-v tt-"+e).attr("aria-hidden",!1))}((o=e).data("tip")||o.find(P+"tt-content").html()||"",!1)}).on(e+" blur",P+"tt-wrap",i),a.on(e,i)};var d={f:[],add:function(e,t){d.f[e]||(d.f[e]=[]),d.f[e].push(t)},apply:function(e,t,a){return d.f[e]&&d.f[e].forEach(function(e){t=e(t,a)}),t}},V={first:function(e,t,a){for(var n=0;n<e.length;n++)if(e[n][t]===a)return e[n];return null},formulas:Object.assign({len:function(e){return(""+e[0]).replace("true"==e[1]?/\s/g:"","").length},min:function(e,t){return Math.min.apply(null,e.map(function(e){return V.parseFx(e,t)}))},max:function(e,t){return Math.max.apply(null,e.map(function(e){return V.parseFx(e,t)}))}},window.customFormulas||{}),replaceFx:function(e,t,a,n,i,r){return void 0===r&&(r=0),e=(e=(e=(""+e).replace(/\[qty]/g,t).replace(/\[price]/g,a).replace(/\[x]/g,n).replace(/\[options_total]/g,r)).replace(/\[field\.(.+?)]/g,function(e,t){return V.getFieldValue(i.find(".input-"+t).first())})).replace(/\[price\.(.+?)]/g,function(e,t){t=i.find(".input-"+t).first();return 1===t.length?V.getFieldPrice(t):0}),d.apply("fx/replace",e,{qty:t,base:a,value:n,$parent:i})},parseFx:function(c,o,e,l){void 0===o&&(o=null),void 0===e&&(e=!0),void 0===l&&(l=null),c=c.replace(/>/g,">").replace(/</g,"<");return d.apply("wapf/fx/functions",Object.keys(V.formulas)).forEach(function(e){for(var t,a=e+"(";-1<(t=(""+c).indexOf(a));){var n=t+a.length,i=function(e,t){for(var a=1,n=0,i=t;i<e.length;i++)if("("==e[i]&&a++,")"==e[i]&&a===++n)return i;return t}(c,n),r=function(e){for(var t=0,a="",n=[],i=0;i<e.length;i++)";"!=e[i]||t?("("==e[i]&&t++,")"==e[i]&&t--,a+=e[i]):(n.push(a.trim()),a="");return!a.length&&n.length||n.push(a.trim()),n}(c.substring(n,i)),n=V.formulas[e]?V.formulas[e](r,o,l):"";c=d.apply("wapf/fx/solve",c.substr(0,t)+n+c.substr(i+1),{func:e,args:r,$parent:o})}}),e?V.evalFx(c):c},evalFx:function(e,f){if(void 0===f&&(f=!0),!e)return 0;function s(e){return parseFloat(e.replace(",","."))}function u(e,t){return-1<e.indexOf(t)}var p=function(e){var t=!1,a=!1,n=0;if(f&&(e=(""+e).replace(/[^\d.+\-*\/()]/gi,"")),u(e,"(")&&u(e,")")){var i=/\(([\d.+\-*\/]+)\)/;if(1<(o=e.match(i)||[]).length)return p(e.replace(i,p(o[1])))}if(e=e.replace("(","").replace(")",""),u(e,"/")||u(e,"*"))for(var t=!0,r=["/","*"];r.length;)for(var c=r.pop();c&&u(e,c);){var o,i=new RegExp("([\\d.]+)\\"+c+"(\\-?[\\d.]+)");if(!(2<(o=e.match(i)||[]).length))return 0;"+"==c&&(n=s(o[1])+s(o[2])),"-"==c&&(n=s(o[1])-s(o[2])),"*"==c&&(n=s(o[1])*s(o[2])),"/"==c&&(n=s(o[1])/s(o[2])),e=(e=e.replace(i,n)).replace("++","+").replace("--","+").replace("-+","-").replace("+-","-")}if(u(e,"+")||u(e,"-")){var a=!0,l=(e=e.replace("--","+")).match(/([\d.]+|[+\-])/g)||[];if(0<l.length)for(var n=0,c="+",d=0;d<l.length;d++)"+"==l[d]||"-"==l[d]?c=l[d]:n="+"==c?n+s(l[d]):n-s(l[d])}return n=!t&&!a?s(e):n};return p(e)},cloneField:function(e,t,a){if(!a)return e;t=t.find(".field-"+e).first();return t.length&&(t.hasClass("has-repeat")||t.hasClass("has-parent-repeat"))?e+"_clone_"+a:e},cloneFx:function(e,n,i){return i?e.replace(/\[(field\.)(.+?)]/g,function(e,t,a){return"["+t+V.cloneField(a,n,i)+"]"}).replace(/\[(price\.)(.+?)]/g,function(e,t,a){return"["+t+V.cloneField(a,n,i)+"]"}).replace(/(files|checked|lookuptable)\((.+?)\)/g,function(e,t,a){return t+"("+a.split(";").map(function(e){return V.cloneField(e,n,i)}).join(";")+")"}):e},evalVars:function(l,e,d,f,s,u,p,t){return e.replace(/\[var_.+?]/g,function(e){var t=p.data("uid");if(l[t]){var a=V.first(l[t],"name",e.replace(/\[var_|]/g,""));if(a){for(var n=a.default,i=u.data("clone")||0,r=0;r<a.rules.length;r++){var c=a.rules[r],o=V.cloneField(c.field,p,i);if(V.isValidRule(p,o,c.condition,c.value||"")){n=c.variable;break}}return V.parseFx(V.replaceFx(V.cloneFx(n,p,i),f,s,d,p),p,!0,u)}}return"0"})},fxPriceHint:function(e){e=d.apply("wapf/fx/hint",e);var t=V.formatMoney(e,wapf_config.display_options),e=0<e?"+":"";return d.apply("wapf/html/fxhint",wapf_config.hint.replace("{x}",t).replace("+",e))},getFieldType:function(t){if(t.is("input"))return t.data("df")?"date":t.data("isFile")?"file":t.data("isCalc")?"calc":t.attr("type");for(var e=["select","textarea","option"],a=0;a<e.length;a++)if(t.is(e[a]))return e[a];return["select","textarea","option"].find(function(e){return t.is(e)})||""},setFieldValue:function(t,e){e=Array.isArray(e)?e:[e];function a(a){var e=t.closest(P+"field-input"),n=e.find(P+"swatch").removeClass(O+"checked").length,i=e.find(P+"input").prop("checked",!1);a.forEach(function(e,t){e=i.filter('[value="'+e+'"]');n&&e.closest(P+"swatch").addClass(O+"checked"),e.prop("checked",!0),t==a.length-1&&e.trigger("change")})}switch(V.getFieldType(t)){case"radio":a(e);break;case"checkbox":"[]"==t.attr("name").slice(-2)?a(e):t.prop("checked",e[0]===""+t.data("true-label"));break;case"file":t.val(e),E("#wapf-dz-"+t.data("fieldId"))[0].dropzone.addFromUrl(e[0]);break;default:t.val(e[0])}},getFieldPrice:function(e){switch(V.getFieldType(e)){case"select":return e.find("option:selected").data("price")||0;case"radio":return e.closest(P+"field-input").find("input:checked").data("price")||0;case"checkbox":if("[]"!=e.attr("name").slice(-2))return e.is(":checked")&&e.data("price")||0;var t=0;return e.closest(P+"field-input").find("input:checked").each(function(){t+=parseFloat(E(this).data("price"))||0}),t;default:return e.data("price")||0}},getFieldValue:function(e,a){switch(void 0===a&&(a=!1),V.getFieldType(e)){case"select":return(a?e.val():e.f
1ind("option:selected").data("wapfLabel"))||"";case"radio":var t=e.closest(P+"field-input").find("input:checked");return(a?t.val():t.data("wapfLabel"))||"";case"checkbox":return"[]"==e.attr("name").slice(-2)?e.closest(P+"field-input").find("input:checked").map(function(e,t){return a?t.value:t.dataset.wapfLabel}).get():e.is(":checked");case"file":return e.is(":file")?Array.from(e[0].files).map(function(e){return e.name}).join(","):e.val();case"calc":return a?e.data("raw"):e.val();default:return e.val()}},selectedVar:null,getQty:function(e){return parseInt(e.data("$qty").val())||1},currentProductType:function(e){return e.data("productType")},currentProductPrice:function(e){var t,a,n=0;return n="variable"==e.data("productType")?(a=V.getVariation(e))&&null!==(t=null!==(t=a.apf_base)&&void 0!==t?t:a.display_price)&&void 0!==t?t:0:e.data("$totals").data("productPrice"),d.apply("wapf/pricing/base",n,{parent:e})},getVariationId:function(e){e=e.find(".variation_id").val();return e?parseInt(e):0},varsViaAjax:function(e){return 0==e.find(".variations_form").data("product_variations")},getVariation:function(e){var t=e.find(".variations_form").data("product_variations");if(!t)return V.selectedVar;e=V.getVariationId(e);return e?V.first(t,"variation_id",e):null},formatNumber:function(e,t,a,n,i){void 0===i&&(i=!1);var r,c,o=null!==t?Math.abs(e).toFixed(t).split(".")[1]||"":(""+Math.abs(e)).split(".")[1]||"",o=i?(""+o).replace(new RegExp("^0+$","g"),""):o,i=null!==t?(r=Math.abs(e),c=t,Number(Math.round(r+"e"+c)+"e-"+c).toFixed(c)):""+e,t=e<0?"-":"",e=parseInt(i,10)+"",i=3<e.length?e.length%3:0;return t+(i?e.substr(0,i)+a:"")+e.substr(i).replace(/(\d{3})(?=\d)/g,"$1"+a)+(o?n+o:"")},formatMoney:function(e,t){return e<0&&t.format.replace("%2$s","-%2$s"),t.format.replace("%1$s",t.symbol).replace("%2$s",V.formatNumber(e,t.decimals||0,t.thousand,t.decimal,t.trim_zeroes))},isValidRule:function(e,t,a,n){var i=null;if("qty"==t)i=V.getQty(e);else{if(-1<a.indexOf("product_var")||-1<a.indexOf("patts")){var r=e.data("productType");if(-1===r.indexOf("variable")&&-1===r.indexOf("variation"))return!0;var c=V.getVariation(e);if(null==c)return!1;function o(){for(var e=0;e<l.length;e++){var t=l[e].split("|");if(c.attributes&&c.attributes["attribute_pa_"+t[0]]&&("*"==t[1]||c.attributes["attribute_pa_"+t[0]]===t[1]))return!0}return!1}var l=n.split(","),d=""+c.variation_id;switch(a){case"product_var":return-1<l.indexOf(d);case"!product_var":return-1==l.indexOf(d);case"patts":return!0===o();case"!patts":return!1===o()}}t=e.find(".input-"+t).first();if(!t.length)return!1;if(t.closest(P+"field-container").hasClass(O+"hide"))return!1;i=V.getFieldValue(t,!0),"date"===V.getFieldType(t)&&n&&(i=t.data("selected"),t=n.split("-"),n=new Date(parseInt(t[2]),parseInt(t[0])-1,parseInt(t[1])))}switch("number"==typeof i&&(i=i.toString()),a){case"check":return 1==i;case"!check":return 0==i;case"==":return Array.isArray(i)?-1<i.indexOf(n):i instanceof Date?i&&i.getTime()===n.getTime():i==n;case"!=":return Array.isArray(i)?-1==i.indexOf(n):i instanceof Date?i&&i.getTime()!=n.getTime():i!=n;case"empty":return Array.isArray(i)&&0===i.length||""==i;case"!empty":return!(Array.isArray(i)&&0===i.length)&&""!=i;case"==contains":return-1<i.indexOf(n);case"!=contains":return-1===i.indexOf(n);case"lt":return parseFloat(i)<parseFloat(n);case"gt":return parseFloat(i)>parseFloat(n);case"gtd":return i&&i.getTime()>n.getTime();case"ltd":return i&&i.getTime()<n.getTime()}return!1},doDependencies:function(n){function i(e){var t=e.data("wapfD");if(!Array.isArray(t))return!0;for(var a=0;a<t.length;a++)if(function(e){for(var t=0;t<e.length;t++)if(!V.isValidRule(n,e[t].field,e[t].condition,e[t].value||""))return!1;return!0}(t[a].rules))return!0;return!1}var e=n.find(".has-conditions");e.length&&(e.each(function(e,t){var a=E(t),n=i(a);n?a.removeClass(O+"hide"):a.addClass(O+"hide"),a.hasClass(O+"field-true-false")&&a.find(P+"tf-h").prop("disabled",!n),a.find(P+"input").each(function(e,t){t=E(t);t.prop("required",!!n&&a.hasClass("wapf-required")),parseInt(t.data("disabled"))||t.prop("disabled",!n)})}),q.dispatchEvent(new CustomEvent("wapf/dependencies")))},repeat:function(l,a){var e,t=a.data("dupe")||[],n=t.length+2,d=a.hasClass(O+"section"),i=(a.data("cloneTxt")||"").replace("{n}",n),r=function(e,r,t,a){e.find(P+"cloner").remove();function n(e){var t=e.data("wapfD");
1t&&((t=JSON.parse(JSON.stringify(t))).forEach(function(e){e.rules.forEach(function(e){var t=l.find(".field-"+e.field).first();(t.hasClass("has-repeat")||t.closest(".has-repeat").length)&&(e.field=e.field+"_clone_"+r)})}),e.attr("data-wapf-d",JSON.stringify(t)).data("wapfD",t))}var i=e.find(P+"input,.wapf-tf-h").data("clone",r),c=e.find(".has-conditions");n(e),c.each(function(e,t){n(E(t))});function o(t,e){var a=t.hasClass(O+"tf-h"),n=t.data(a?"fid":"fieldId"),i=n+"_clone_"+r;["name","id","data-field-id","data-fid"].forEach(function(e){t.attr(e)&&t.attr(e,t.attr(e).replace(n,i))}),t.data("fieldId",i),e||a||t.removeClass("input-"+n).addClass("input-"+i)}a&&o(e,!0),i.each(function(e,t){t=E(t);o(t,!1);function a(e){var t;"fx"==e.data("wapfPricetype")&&(t=V.cloneFx(e.data("wapfPrice"),l,r),e.attr("data-wapf-price",t).data("wapfPrice",t))}a(t),t.find("option").data("clone",r).each(function(e,t){a(E(t))})}),e.removeAttr("data-qty-based data-clone-txt");i=e.find(P+"field-label");return!a&&t?i.find("label > span:first-child").html(t):d||i.remove(),e}(a.clone(!0),n,i,d);return r.insertAfter(t.length?t[t.length-1]:a),d&&i&&(e=E('<div class="wapf-clone-title">'+i+"</div>
1").prependTo(r),r.find(".has-conditions").length&&(i=function(){e[(r.find(".wapf-field-container:not(.wapf-hide)").length?"remove":"add")+"Class"](O+"hide")},E(q).on("wapf/dependencies",i),i())),r.find("select").each(function(e,t){t=E(t);V.setFieldValue(t,V.getFieldValue(a.find(".input-"+t.data("fieldId").split("_")[0]),!0))}),E(q).trigger("wapf/cloned",[a.attr("for"),n,r,l]),t.push(r),a.data("dupe",t),r},unrepeat:function(e,t,a){var n=t.data("dupe")||[];n.splice(-1*a,a).forEach(function(e){e.remove()}),t.data("dupe",n),E(q).trigger("wapf/uncloned")},doQtyLogic:function(r,e){var c=V.getQty(r);e.each(function(e,t){var a=E(t),t=a.nextAll(".has-repeat.field-"+a.attr("for")).length,n=c-(t+1);if(0!=n)if(0<n)for(var i=0;i<n;i++)V.repeat(r,a);else V.unrepeat(r,a,-1*n)}),I.calculateAll(r)}},I={variables:[],calculateOptionTotal:function(s){function u(e,t,a,n,i){return e=V.replaceFx(e,g,h,n,s,i),e=V.evalVars(I.variables,e,n,g,h,a,s,i),e=V.parseFx(e,s,t,a)}var p=0,h=V.currentProductPrice(s),g=V.getQty(s);return s.find(P+"field-input [data-wapf-price]").each(function(e,t){var a=E(t).data("price",0),n=a.data(),i=V.getFieldType(a),r=n.wapfPricetype||"",c=""+(n.wapfPrice||"0"),o=n.wapfLabel||a.val(),l="calc"===i&&"cost"!==(n.calcType||"")?"info":"cost",d=null,f=p/g;"fx"===r&&"calc"!==i&&(d=u(c,!0,a,o,f),t=V.fxPriceHint(I.addTax(d,s)),a.is("option")&&n.fxHint?a.html(n.wapfLabel+" "+t):a.closest(".has-pricing").find(P+"pricing-hint").html(t)),!0!==a.prop("disabled")&&(-1<["checkbox","radio"].indexOf(i)&&!a.is(":checked")||("option"!=i||a.is(":selected")&&!0!==a.closest("select").prop("disabled"))&&(!(i=a.val())||n.noZero&&0==i||(null===d&&(d="fx"===r?u(c,"cost"==l,a,o,f):function(e,t,a){switch(e){case"percent":return h*(t/100)*g;case"p":return h*(t/100);case"qt":return g*t;case"nr":return a*t;case"nrq":return a*t*g;case"char":return(""+a).length*t;case"charq":return(""+a).length*t*g;default:return t}}(r,parseFloat(c||"0"),o)),a.data("price",d||0),"cost"==l&&(p+=d||0))))}),p},calculateAll:function(a){var n=wapf_config.display_options,e=V.currentProductPrice(a)*V.getQty(a),t=I.calculateOptionTotal(a),i=Math.max(0,e+t),r=a.data("$totals"),c=V.formatMoney,o=a.data("tax")||1;a.data("optionsTotal",t);function l(e){var t=c(e*o,n);return t=n.tax_enabled&&n.tax_suffix&&n.tax_suffix.length?t+" "+n.tax_suffix.replace("{price_including_tax}",c(e*a.data("taxFactor"),n)).replace("{price_excluding_tax}",e):t}r.find(P+"product-total").html(l(e)),r.find(P+"options-total").html(l(t)),r.find(P+"grand-total").html(l(i)),E(q).trigger("wapf/pricing",[e*o,t*o,i*o,a])},addTax:function(e,t){return e*(t.data("tax")||1)}};WAPF={Pricing:I,Util:V,Filter:d,Frontend:function(d){var e,t,a,n,i,r,c,o,l,f,s,u,p,h,g,v,w,m,x,b,y,_,k,F=d.find(".wapf").attr("id");function T(e){v=e.image_id,q.dispatchEvent(new CustomEvent("wapf/image_changed",{detail:{image:e}})),setTimeout(function(){E(window).trigger("resize"),d.find(".images").trigger("woocommerce_gallery_init_zoom")},15)}function C(i){i&&v!=i&&setTimeout(function(){var e=f[parseInt(i)],t=d.find("[data-wapf-att-id="+i+"]");if(t.length&&wapf_config.slider_support){var a=d.find(".images").data("flexslider");if(a){var n=a.vars?a.vars.animationSpeed:250;x&&(a.vars.animationSpeed=0);t=d.find(".flex-control-nav li").eq(E("[data-wapf-att-id]").index(t)).find("img");return t.hasClass("flex-active")||t.trigger("click"),a.vars.animationSpeed=n,x=!1,T(e)}}!function(t){b=d.find(".images .wp-post-image").eq(0),w.forEach(function(e){t[e]&&b.attr(e,t[e])}),t.srcset||b.attr("srcset",""),Object.keys(m).forEach(function(e){b.attr(e,t[m[e]])});var e=d.find(".flex-control-nav li").eq(0).find("img");e.removeAttr("srcset").attr("src",t.thumb_src),b.closest("a").attr("href",t.full_src),b.closest("div").attr("data-wapf-att-id",t.image_id),e.hasClass("flex-active")||e.trigger("click"),T(t)}(e)},5)}function A(e,t,a){(t=function(e,t,a){for(var n=0;n<a.length;n++){for(var i=a[n],r=!0,c=0;c<i.values.length;c++){var o=i.values[c];if("*"!=o.value){var l=d.find(".input-"+o.field);if(l.closest(".wapf-field-container").hasClass(O+"hide")){r=!1;break}l=V.getFieldValue(l,!0);if(!(Array.isArray(l)?-1<l.indexOf(o.value):o.value==l)||"last"===e&&o.field!=t.data("fieldId")){r=!1;break}}}if(r)return i}return null}(e=void 0===e?"rules":e,a=void 0===a?null:a,t=void 0===t?[]:t))?C(t.image):(t=V.getVariation(d),C(t?t.image_id:_))}F&&(k=(e=d.find(P+"product-totals")).data("productType"),t=d.find("[data-qty-based]"),a=d.find("form :input.qty"),n=d.find(".has-pricing"),i=d.find(P+"field-group"),d.data({uid:F,productType:k,$qty:a,$totals:e,tax:e.data("tax")||1,taxFactor:e.data("taxFactor")||1}),E(q).trigger("wapf/before_init",[d]),q.dispatchEvent(new CustomEvent("wapf:before_init",{detail:{wrapper:d[
10]}})),r=d.data("uid"),I.variables[r]=[],i.each(function(e,t){t.dataset.variables&&(I.variables[r]=I.variables[r].concat(E(t).data("variables")))}),(c=null!==d[0].querySelector(".has-conditions"))&&(d.on("keyup change",P+'input, input[name="variation_id"]',V.doDependencies.bind(this,d)),V.doDependencies(d)),F=!(o=0<n.length)&&0<d.find(P+"field-calc").length,(o||F)&&(d.on("keyup change","".concat(P,'input,input[name="variation_id"]'),I.calculateAll.bind(this,d)),t.length||a.on("keyup change",I.calculateAll.bind(this,d)),I.calculateAll(d)),t.length&&(a.on("change",V.doQtyLogic.bind(this,d,t)),V.doQtyLogic(d,t)),f=l={},s=c,w=["src","height","width","title","srcset","alt","sizes"],m={"data-src":"full_src","data-caption":"caption","data-large_image":"full_src","data-large_image_width":"full_src_w","data-large_image_height":"full_src_h"},x=!(v=null),b=d.find(".images .wp-post-image"),y=i.filter("[data-wapf-gi]"),_=null,b.length&&y.length&&(q.dispatchEvent(new CustomEvent("wapf/delete_var")),_=b.closest("div").data("wapfAttId"),d.find("[data-wapf-att-id]").each(function(e,t){var a,n,i,r=E(t),t=r.data("wapfAttId");f[t]||(f[t]=(a={image_id:(r=r).attr("data-wapf-att-id")},n=r.find("img"),i=n.data("o_src")?"data-o_":"",w.forEach(function(e){a[e]=n.attr(i+e)}),a.thumb_src=r.data("thumb"),Object.keys(m).forEach(function(e){a[m[e]]=n.attr(i+e)}),wapf_config.slider_support||(a.srcset=" "),a))}),!(u=d.find('input[name="variation_id"]')).length||(p=d.find("form.cart").data("product_variations"))&&p.forEach(function(e){e.image.image_id=e.image_id,f[e.image_id]=e.image}),h=[],g=[],y.each(function(e,t){var a=E(t),n=a.data("wapfGi"),i=a.data("group"),t=n.rules.reverse();h[i]=t,g=g.concat(t),n.images.forEach(function(e){f[e.image_id]=e});var r=a.data("wapfSt"),c=null,c=a.find(P+"input").on("change",function(e){c=E(e.currentTarget),s||A(r,h[i],c)}).filter(":visible").eq(0);A(r,h[i],c),s&&q.addEventListener("wapf/dependencies",function(){A(r,h[i],c)})}),u.on("change",function(){A("rules",g,u)})),E(q).on("found_variation",function(e,t){d.data({tax:t.tax||1,taxFactor:t.taxFactor||1}),V.varsViaAjax(d)&&(V.selectedVar=t,V.doDependencies(d),l[t.variation_id]=t),n.length&&I.calculateAll(d)}),-1<k.indexOf("varia")&&E(q).on("wapf/pricing",function(){e[0<d.find(".wapf-wrapper").height()?"show":"hide"]()}),d.on("change",P+"swatch input",function(){var e,t=E(this);t.is(":disabled")||(e=t.closest(P+"swatch"),t.is(":radio")&&e.closest(P+"field-container").find(P+"swatch").removeClass(O+"checked"),e[t.is(":checked")?"addClass":"removeClass"](O+"checked"))}),d.on("click",".wapf-single-select ",function(e){var t=E(this),a=O+"checked",n=t.find("input");!n.prop("required")&&n.is(":checked")&&t.hasClass(a)&&(n.prop("checked",!1).trigger("change"),t.removeClass(a),e.stopPropagation(),e.preventDefault())}),d.on("change",'.wapf-checkbox input[type="checkbox"], .wapf-radio input[type="radio"]',function(){var e=E(this);e.is(":radio")&&e.closest(P+"radios").find(P+"radio").removeClass(O+"checked"),e.closest(P+"radio, .wapf-checkbox").toggleClass(O+"checked",e.is(":checked"))}),d.on("click",".wapf-card:not(.is-qty-select)",function(e){"A"!==e.target.tagName&&((e=this.querySelector("input")).disabled||(this.classList.toggle(O+"checked"),e.checked=!e.checked,e.dispatchEvent(new Event("change",{bubbles:!0}))))}),(k=function(){d.find(".wapf-required").each(function(e,t){var a,t=E(t);!(t.find(P+"checkboxes").length||t.find(P+"swatch-wrapper").length||t.find(P+"card-wrap").length)||(a=t.find('input[type="checkbox"]')).length&&(t=function(){a.filter(":checked").length?a.not(":checked").prop("required",!1):a.first().prop("required",!0)},a.off("change",t).on("change",t),t(),E(q).off("wapf/dependencies",t).on("wapf/dependencies",t))})})(),E(q).on("wapf/cloned",k),(k=function(){d.find(".has-minmax").each(function(e,t){var a=E(t),n=a.find('input[type="checkbox"]'),i=a.data("maxc"),r=a.data("minc");1!==r||1!==i?(t=function(){var e,t;a.hasClass(O+"hide")||(e=n.filter("input:checked").length,t=n.not(":checked").not("[data-disabled=1]"),i&&t.prop("disabled",i<=e),r&&t.prop("required",!(!a.hasClass("wapf-required")&&!e)&&e<r))},n.off("change",t).on("change",t),t(),E(q).off("wapf/dependencies",t).on("wapf/dependencies",t)):n.on("change",function(e){this.checked&&n.filter("input:checked").length&&((e=n.not(E(e.currentTarget))).prop("checked",!1).prop("required",!1),e.closest(P+"checked").removeClass(O+"checked"))})})})(),E(q).on("wapf/cloned",k),E("body").on("adding_to_cart",function(e,t,a){if("object"!=typeof a)return a;
1if(-1<Object.keys(a).indexOf("wapf_field_groups"))return a;t=(t=E(t)).closest("form.cart").find(P+"wrapper :input").serializeArray();if(!t)return a;t.forEach(function(e){var t;-1<e.name.indexOf("[]")?(t=e.name.replace("[]",""),a[t]||(a[t]=[]),a[t].push(e.value)):a[e.name]=e.value})}),/^iPad|iPhone$/.test(navigator.platform||navigator.userAgent)&&d[0].querySelectorAll('.wapf input[type="radio"], .wapf input[type="checkbox"]').forEach(function(e){e.addEventListener("invalid",function(e){e.target.scrollIntoView({block:"center",behavior:"smooth"})})}),d.on("click",".apf-minus, .apf-plus",function(e){var t,a,n,i,r=jQuery(e.currentTarget).siblings("input");r.is(":disabled")||(t=jQuery(e.currentTarget).hasClass("apf-minus"),a=parseFloat(r.attr("min"))||0,i=parseFloat(r.attr("max"))||9999999,n=parseFloat(r.attr("step"))||1,(e=parseFloat(""+r.val()||"0"))!==(i=t?Math.max(e-n,a):Math.min(e+n,i))&&r.val(i).trigger("change"))}),E.wapfTT(),E(q).trigger("wapf/init",[d]),q.dispatchEvent(new CustomEvent("wapf:init",{detail:{wrapper:d[0]}})))}}}(jQuery,document),jQuery(function(a){"product"==wapf_config.page_type?new WAPF.Frontend(a("body")):a("[data-product-page-preselected-id], .wp-block-woocommerce-single-product").each(function(e,t){new WAPF.Frontend(a(t))})});
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.