1!function(t){function r(){return"undefined"!=typeof GPECF&&!!GPECF.hasProductsModule}function n(){return r()&&rgars(window,"gform/products/getTotal")?window.gform.products:null}String.prototype.gformFormat||(String.prototype.gformFormat=function(){var t=arguments;return this.replace(/{(\d+)}/g,function(r,n){return void 0!==t[n]?t[n]:r})}),gform.addFilter("gform_is_hidden",function(r,n){var o=t(n);if(!o.is(".ginput_tax_input, .ginput_subtotal_input, .ginput_discount_input"))return r;var i=o.closest(".gfield"),e=i.closest(".gform_page"),a="hidden"===i.attr("data-conditional-logic"),u="hidden"===e.attr("data-conditional-logic");return!r&&(!!a||!!u)||r});var o,i,e,a,u,c=window.GetDiscount;if(window.GetDiscount=function(){for(var t=arguments.callee.caller;"PopulateDiscountInfo"!==t.name&&"function"==typeof t.caller;)t=t.caller;"PopulateDiscountInfo"===t.name&&(u=t.arguments[1]);var r=c.apply(this,arguments);return u=void 0,r},!r()){let t=window.gformGetPrice;window.gformGetPrice=function(r){return"string"!=typeof r?0:t(r)}}function d(t,r,n,o){var i=null==o||"number"==typeof o||"boolean"==typeof o?o:n(o),e=r.get(i);return void 0===e&&(e=t.call(this,o),r.set(i,e)),e}function l(t,r,n){var o=Array.prototype.slice.call(arguments,3),i=n(o),e=r.get(i);return void 0===e&&(e=t.apply(this,o),r.set(i,e)),e}function f(){this.cache=Object.create(null)}f.prototype.has=function(t){return t in this.cache},f.prototype.get=function(t){return this.cache[t]},f.prototype.set=function(t,r){this.cache[t]=r};t(document).on("gform_pre_conditional_logic",function(t,r){P(r)}),gform.addFilter("gform_calculation_formula",function(r,n,o,i){if(!x(r))return r;var e=t("#field_{0}_{1}".gformFormat(o,n.field_id)).hasClass("gfield_price");if(e&&!_(o).length)return r=(r=(r=r.replace(/{coupons}/gi,0)).replace(/{discounts}/gi,0)).replace(/{subtotal}/gi,0);var a=""!=(gformIsHidden(t("#gf_coupon_code_"+o))?"":t("#gf_coupon_codes_"+o).val())||""!=t("#gf_coupons_"+o).val(),u=t("#gf_total_no_discount_"+o).val(),c=0,d=-1*F(o,b(o));return void 0!==u&&a&&window.PopulateDiscountInfo&&(c=PopulateDiscountInfo(u,o)),r=(r=(r=r.replace(/{coupons}/gi,parseFloat(c))).replace(/{discounts}/gi,parseFloat(d+c))).replace(/{subtotal}/gi,parseFloat(b(o,e?[n.field_id]:null)))}),gform.addFilter("gform_coupons_discount_amount",function(t,r,n,o,i){if(!u)return t;var o=Math.max(0,o-I(u));return"percentage"==r?t=o*Number(n/100):"flat"==r&&(t=Number(n))>o&&0!=o&&(t=o),t}),gform.addFilter("gform_product_total",function(r,n){return t("#gform_wrapper_"+n+" .ginput_subtotal_input").each(function(){var o=t(this).val();if(gformIsHidden(t(this)))return 0!==o&&"0"!==o&&t(this).val(0).trigger("change"),!0;var i=g({intent:"Calculating subtotal for Subtotal field {0}".gformFormat(t(this).attr("id")),total:r,formId:n,amount:null,amountType:null,productsType:t(this).data("productstype"),products:t(this).data("products"),includeShipping:!1,fieldId:gf_get_input_id_by_html_id(t(this).attr("id"))});String(o)!=String(i)&&t(this).val(i).trigger("change")}),r},48),gform.addFilter("gform_product_total",function(t,r){var n=F(r,t);return Math.max(0,t+=n)},49),"true"===window.GPECF.ppcpRequiresDiscountFilter&&gform.addFilter("gform_ppcp_discount_total",function(t,r){return t+-1*F(r,b(r))}),gform.addFilter("gform_product_total",function(r,n){var o,i=t("#gform_wrapper_"+n+" .ginput_tax_input"),e=0;return i.each(function(){var o,i=t(this).val();if(gformIsHidden(t(this)))return 0!==i&&"0"!==i&&t(this).val(0).trigger("change"),!0;o=gformRoundPrice(o=0==r&&"exclude"===t(this).data("productstype")?0:g({intent:"Calculating tax for Tax field {0}".gformFormat(t(this).attr("id")),total:r,formId:n,amount:t(this).data("amount"),amountType:t(this).data("amounttype"),products:t(this).data("products"),productsType:t(this).data("productstype"),includeDiscounts:!0,fieldId:gf_get_input_id_by_html_id(t(this).attr("id")),includeShipping:window.GPECF.includeShippingInTax})),String(i)!==String(o)&&t(this).val(o).trigger("change"),e+=o}),Number(Math.round((r+=e)+"e"+(o=window.gf_global?.gf_currency_config?.decimals??2))+"e-"+o)},51),gform.addFilter("gform_product_total",function(r,n){var o=t("#gf_coupon_codes_{0}".gformFormat(n));return o.data("gpecfChanged")&&(o.data("gpecfChanged",!1),t(document).trigger("gform_post_conditional_logic")),r});var s=!1;function g(t){t=function(t,r){for(key in r)r.hasOwnProperty(key)&&void 0===t[key]&&(t[key]=r[key]);return t}(t,{intent:"",total:0,formId:null,amount:null,amountType:null,products:null,productsType:null,includeShipping:!0,includeDiscounts:!1,calculateByProduct:!1,fieldId:null});var r=0,n=Array.isArray(t.products)&&t.products.length>0?y(t.formId,t.products,t.includeDiscounts):0;switch(!t.amount&&(t.amount=0),!t.includeShipping&&(t.total-=I(t.formId)),t.productsType){case"include":t.total=n;break;case"exclude":t.total-=n}switch(t.amountType){case null:r=t.total;break;case"percent":r=t.total*(t.amount/100);break;default:var o=t.amount;if(t.calculateByProduct){var i=b(t.formId);o*=100*t.total/i/100}r=o}return r=Math.max(0,parseFloat(r)),gform.applyFilters("gpecf_field_total",r,t)}function p(r){rgars(window,"gform/products/getTotal")&&!t(".ginput_total_"+r).length&&gform.products.getTotal(r)}function _(n){if(!r()&&window._gformPriceFields&&window._gformPriceFields[n])return window._gformPriceFields[n];var o=[],i=RegExp("gfield_product_"+n+"_(\\d+)");return t("#gform_wrapper_"+n).find('[class*="gfield_product_'+n+'_"]').each(function(){var r=i.exec(this.className);r&&-1===t.inArray(r[1],o)&&o.push(r[1])}),o}function m(t){let r=n();return r&&r.updateProducts?Promise.resolve(r.updateProducts(t)).catch(r=>{console.debug("Unable to refresh the products state for form ID "+t,r)}):Promise.resolve()}t(document).on("gform_post_render",function(o,i){if(function(){if(window.gform){var t=window.gform.hooks.filter.gform_product_total;for(var r in t)t.hasOwnProperty(r)&&-1!==t[r].callable.toString().indexOf("update_dynamic_price_ajax")&&(t[r].priority=52)}}(),t("#gf_coupon_codes_{0}".gformFormat(i)).off("change.gpecf").on("change.gpecf",function(){t(this).data("gpecfChanged",!0)}),!s){var e;t(document).on("gform_price_change.gpecf",function(t,r,n){P(r.formId)}),window.gform&&window.gform.utils&&window.gform.utils.addFilter&&window.gform.utils.addFilter("gform/products/product_changed",function(t){return P(t.formId),t},10,"gpecf_product_changed"),document.addEventListener("gform/products/product_field_changed",function(t){var r=t.detail&&t.detail.formId;r&&m(r).then(()=>{p(r),P(r)})}),gform.addAction("gpcp_after_update_pricing",function(t,r){P(r._formId)},10,"gpecf_gpcp_after_update_pricing"),gform.addAction("gform_input_change",function(r,n,o){if(window!==r){var i=t(r),a=i.attr("id")&&0===i.attr("id").indexOf("ginput_base_price"),u=i.parents(".gfield").hasClass("gfield_calculation");!t(r).data("gpecfIsCalculating")&&a&&u&&(t(r).data("gpecfIsCalculating",!0),e&&(clearTimeout(e),e=void 0),e=setTimeout(function(){P(n),t(r).data("gpecfIsCalculating",!1)},5))}},10,"gpecf_input_change"),s=!0}var a=0,u=setInterval(function(){_(i).length&&(!(!r()||n()&&v(i))&&++a<100||(clearInterval(u),m(i).then(function(){p(i),P(i)})))},50);t("#gform_wrapper_"+i).find(".ginput_subtotal_input, .ginput_discount_input, .ginput_tax_input").trigger("change")});var h={};function v(t){return rgars(window,"gform/state/data/"+t+"/products")}var y=function(t,n,o){var i,e;return _(t).length?w(parseInt(t),n,o,(e=jQuery("form#gform_"+(i=t)).serializeArray(),r()?[e,rgars(window,"gform/state/get")?gform.state.get(i,"products"):null]:e)):0},w=(o=function(t,o,i,e){if(void 0===o?o=_(t):Array.isArray(o)||(o=[o]),!o)return 0;for(var a=0,u=0;u<o.length;u++)try{let e=function(t,o){if(!o)return 0;if(r()){let r=n();return r?r.getTotal(t,o):0}return gformCalculateProductPrice(t,o)}(t,o[u]);if(a+=e,i){var c=Math.abs(F(t,e,o[u])),d=jQuery("#gf_coupons_"+t).val()?function(t,r){var n,o,i,e=window["gf_coupons"+t],a=0;for(n in e)e.hasOwnProperty(n)&&(i=GetDiscount((o=e[n]).type,o.amount,r,a),a+=i);return a}(t,e):0;d=Math.min(d,e),a-=c+d}}catch(t){console.debug("Unable to re-calculate price for product ID "+o[u]);continue}return a},e={create:function(){return new f}},a=i&&i.serializer?i.serializer:function(){return JSON.stringify(arguments)},(i&&i.strategy?i.strategy:function(t,r){var n,o,i=1===t.length?d:l;return n=r.cache.create(),o=r.serializer,i.bind(this,t,n,o)})(o,{cache:e,serializer:a}));function b(t,r){return y(t)-(void 0!==r&&r?y(t,r):0)}function I(t){if(r()){let r=rgars(window,"gform/state/get")?gform.state.get(t,"products"):null;return r&&r.shipping?r.shipping.price:0}return gformGetShippingPrice(t)}function F(r,n,o){var i=t("#gform_wrapper_"+r+" .ginput_discount_input"),e=0;return i.each(function(){var i=t(this).val(),a=t(this).data("products"),u=t(this).data("productstype");if(gformIsHidden(t(this)))return 0!==i&&"0"!==i&&t(this).val(0).trigger("change"),!0;if(o&&a){if("include"==u&&(-1===t.inArray(o,a)||0===parseInt(n)))return!0;else if("exclude"==u&&(-1!==t.inArray(o,a)||0===parseInt(n)))return!0}var c=o&&o>0,d=g({intent:"Calculating discount for Discount field {0}".gformFormat(t(this).attr("id")),total:n,formId:r,amount:t(this).data("amount"),amountType:t(this).data("amounttype"),products:a,productsType:u,includeShipping:!1,calculateByProduct:c,fieldId:gf_get_input_id_by_html_id(t(this).attr("id"))});"include"===u&&a.length>0&&(d=Math.min(y(r,a,!1),d)),d=-1*gformRoundPrice(d),d=gform.applyFilters("gpecf_discount_total",d,t(this)),c||String(i)===String(d)||t(this).val(d).trigger("change"),e+=d}),e}var P=function(t){var r=rgars(window,"gf_global/gfcalc/{0}".gformFormat(t));if(r){for(var n=[],o=0;o<r.formulaFields.length;o++){var i=r.formulaFields[o];x(i.formula)&&n.push(i)}n.length&&r.runCalcs(t,n)}};function x(t){var r=-1!=t.search("{coupons}"),n=-1!=t.search("{discounts}"),o=-1!=t.search("{subtotal}");return r||n||o}function T(r,o){var i,e,a=(i=t("#gform_wrapper_"+r).find(".ginput_tax_input, .ginput_subtotal_input, .ginput_discount_input").map(function(){return t(this).attr("id")+":"+(gformIsHidden(t(this))?"hidden":"visible")}).get().sort().join(","),e=void 0!==h[r]&&i!==h[r],h[r]=i,e);(o||a?function(t){let r=v(t);return m(t).then(()=>{r===v(t)&&function(t){let r=rgars(window,"gform/state/get"),o=rgars(window,"gform/state/callbacks");n()&&r&&Array.isArray(o?.[t])&&o[t].forEach(function(n){if(!n||!Array.isArray(n.keys)||-1===n.keys.indexOf("products"))return;let o={};n.keys.forEach(function(n){let i=r(t,n);o[n]={prev:"products"===n?r(t,n):i,value:i}});try{n.callback(t,"products",o)}catch(r){console.debug("Unable to notify a products state subscriber for form ID "+t,r)}})}(t)})}(r):m(r)).then(()=>{p(r),P(r)})}jQuery(document).on("gform_post_conditional_logic",function(t,n,o,i){if(r())return void T(n,i);gformCalculateTotalPrice(n)}),gform.addAction("gform_post_conditional_logic_field_action",function(n,o,i,e,a){r()&&!a&&function(r,n){var o=t(n).find(".ginput_tax_input, .ginput_subtotal_input, .ginput_discount_input");if(!o.length)return!1;
1var i=(h[r]||"").split(",").filter(Boolean);return o.toArray().some(function(r){return -1===i.indexOf(t(r).attr("id")+":"+(gformIsHidden(t(r))?"hidden":"visible"))})}(n,i)&&Promise.resolve().then(()=>T(n,!1))})}(jQuery);
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.