var gform=window.gform||{};function announceAJAXValidationErrors(){var e;jQuery(".gform_validation_errors").length&&((e=document.querySelector('[data-js="gform-focus-validation-error"]'))&&(e.setAttribute("tabindex","-1"),e.focus()),setTimeout(function(){wp.a11y.speak(jQuery(".gform_validation_errors > h2").text())},1e3))}function gformBindFormatPricingFields(){jQuery(".ginput_amount, .ginput_donation_amount").off("change.gform").on("change.gform",function(){gformFormatPricingField(this)}),jQuery(".ginput_amount, .ginput_donation_amount").each(function(){gformFormatPricingField(this)})}function Currency(e){this.currency=e,this.toNumber=function(e){return this.isNumeric(e)?parseFloat(e):gformCleanNumber(e,this.currency.symbol_right,this.currency.symbol_left,this.currency.decimal_separator)},this.toMoney=function(e,t){if(!1===(e=(t=t||!1)?e:gformCleanNumber(e,this.currency.symbol_right,this.currency.symbol_left,this.currency.decimal_separator)))return"";"-"==(e+=negative="")[0]&&(e=parseFloat(e.substr(1)),negative="-"),"0.00"==(money=this.numberFormat(e,this.currency.decimals,this.currency.decimal_separator,this.currency.thousand_separator))&&(negative="");t=this.currency.symbol_left?this.currency.symbol_left+this.currency.symbol_padding:"",e=this.currency.symbol_right?this.currency.symbol_padding+this.currency.symbol_right:"";return money=negative+this.htmlDecode(t)+money+this.htmlDecode(e)},this.numberFormat=function(e,t,r,i,n){n=void 0===n||n,e=(e+"").replace(",","").replace(" ","");var e=isFinite(+e)?+e:0,o=isFinite(+t)?Math.abs(t):0,i=void 0===i?",":i,r=void 0===r?".":r,a="";return 3<(a=("0"==t?(e+=1e-10,""+Math.round(e)):-1==t?""+e:function(e,t){t=Math.pow(10,t);return""+Math.round(e*t)/t}(e+=1e-10,o)).split("."))[0].length&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),n&&(a[1]||"").length/i,"").replace(o,""),a=0==gformToNumber(a=gformGetPriceDifference(r,t))?"":" "+a,e=(e.attr("price",a),"option"==e[0].tagName.toLowerCase()?a:""+a+""),a=o+e;return a=window.gform_format_option_label?gform_format_option_label(a,o,e,r,t,i,n):a}function gformGetProductIds(e,t){for(var r=(jQuery(t).hasClass(e)?jQuery(t):jQuery(t).parents("."+e)).attr("class").split(" "),i=0;it?(r.text(e.name+" - "+gform_gravityforms.strings.file_exceeds_limit),wp.a11y.speak(e.name+" - "+gform_gravityforms.strings.file_exceeds_limit)):r.remove())}function gformInitSpinner(t,r,i=!0){gform.applyFilters("gform_spinner_url",r,t)!=r&&(i=!0),jQuery("#gform_"+t).on("submit",function(){var e;i?gformAddSpinner(t,r):(e=gform.applyFilters("gform_spinner_target_elem",jQuery("#gform_submit_button_"+t+", #gform_wrapper_"+t+" .gform_next_button, #gform_send_resume_link_button_"+t),t),gformInitializeSpinner(t,e))})}function gformInitializeSpinner(e,t,r="gform-ajax-spinner"){0==jQuery("#gform_ajax_spinner_"+e).length&&(r='',(t instanceof jQuery?t:jQuery(t)).after(r))}function gformRemoveSpinner(e="gform-ajax-spinner"){e=document.querySelector('[data-js-spinner-id="'+e+'"]');e&&e.remove()}function gformAddSpinner(e,t){void 0!==t&&t||(t=gform.applyFilters("gform_spinner_url",gf_global.spinnerUrl,e)),0==jQuery("#gform_ajax_spinner_"+e).length&&gform.applyFilters("gform_spinner_target_elem",jQuery("#gform_submit_button_"+e+", #gform_wrapper_"+e+" .gform_next_button, #gform_send_resume_link_button_"+e),e).after('')}function gformReInitTinymceInstance(e,t){var r,i,n;e&&t?(r=window.tinymce)?(i=r.get("input_"+e+"_"+t))?(n=jQuery.extend({},i.settings),i.remove(),r.init(n),gform.console.log("gformReInitTinymceInstance reinitialized TinyMCE on input_"+e+"_"+t+".")):gform.console.error("gformReInitTinymceInstance did not find an instance for input_"+e+"_"+t+"."):gform.console.error("gformReInitTinymceInstance requires tinymce to be available."):gform.console.error("gformReInitTinymceInstance requires a form and field id.")}function gf_raw_input_change(e,t){clearTimeout(__gf_keyup_timeout);var r=jQuery(t),i=r.attr("id"),n=gf_get_input_id_by_html_id(i),o=gf_get_form_id_by_html_id(i),i=gform.applyFilters("gform_field_meta_raw_input_change",{fieldId:n,formId:o},r,e),n=i.fieldId,o=i.formId;n&&(r=!(i=r.is(":checkbox")||r.is(":radio")||r.is("select"))||r.is("textarea"),"keyup"==e.type&&!r||"change"==e.type&&!i&&!r||("keyup"==e.type?__gf_keyup_timeout=setTimeout(function(){gf_input_change(t,o,n)},300):gf_input_change(t,o,n)))}function gf_get_input_id_by_html_id(e){var e=gf_get_ids_by_html_id(e),t=e[e.length-1];return 3==e.length&&(e.shift(),t=e.join(".")),t}function gf_get_form_id_by_html_id(e){return gf_get_ids_by_html_id(e)[0]}function gf_get_ids_by_html_id(e){for(var t=e?e.split("_"):[],r=t.length-1;0<=r;r--)gformIsNumber(t[r])||t.splice(r,1);return t}function gf_input_change(e,t,r){gform.doAction("gform_input_change",e,t,r)}function gformExtractFieldId(e){var t=parseInt(e.toString().split(".")[0],10);return t||e}function gformExtractInputIndex(e){e=parseInt(e.toString().split(".")[1],10);return e||!1}gform.recaptcha={renderRecaptcha:function(){jQuery(".ginput_recaptcha:not(.gform-initialized)").each(function(){var t=jQuery(this),e={sitekey:t.data("sitekey"),theme:t.data("theme"),tabindex:t.data("tabindex")},r=(t.data("stoken")&&(e.stoken=t.data("stoken")),!1);"invisible"==t.data("size")&&(r=function(e){e&&t.closest("form").submit()}),(r=gform.applyFilters("gform_recaptcha_callback",r,t))&&(e.callback=r),t.data("widget-id",grecaptcha.render(this.id,e)),e.tabindex&&t.find("iframe").attr("tabindex",e.tabindex),t.addClass("gform-initialized"),gform.doAction("gform_post_recaptcha_render",t)})},gformIsRecaptchaPending:function(e){var e=e.find(".ginput_recaptcha");return!(!e.length||"invisible"!==e.data("size")||(e=e.find(".g-recaptcha-response")).length&&e.val())},needsRender:function(){return document.querySelectorAll(".ginput_recaptcha:not(.gform-initialized)")[0]},renderOnRecaptchaLoaded:function(){var e;gform.recaptcha.needsRender()&&(e=setInterval(function(){window.grecaptcha&&window.grecaptcha.render&&(this.renderRecaptcha(),clearInterval(e))},100))}},gform.initializeOnLoaded(gform.recaptcha.renderOnRecaptchaLoaded),jQuery(document).on("gform_post_render",gform.recaptcha.renderOnRecaptchaLoaded),window.renderRecaptcha=gform.recaptcha.renderRecaptcha,window.gformIsRecaptchaPending=gform.recaptcha.gformIsRecaptchaPending,!function(g,m){g.uploaders={};var _="undefined"!=typeof gform_gravityforms?gform_gravityforms.strings:{},p="undefined"!=typeof gform_gravityforms?gform_gravityforms.vars.images_url:"";function i(o){var f,r,e=m(o).data("settings"),t=new plupload.Uploader(e);function d(e,t){m("#"+e).prepend("
  • "+h(t)+"
  • "),setTimeout(function(){wp.a11y.speak(m("#"+e).text())},1e3)}function l(e){var t=parseInt(e.gf_vars.max_files,10);0{1}{2}{5}',t,r,_,i,o).gformFormat(t.id,h(t.name),r,_.cancel_upload,i,_.cancel),m("#"+o.settings.filelist).prepend(n),s++)}),o.refresh(),0==(t=m("form#gform_"+f+" "+(e="input:hidden[name='gform_unique_id']"))).length&&(t=m(e)),""===(r=t.val())&&(r="xxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}),t.val(r)),0'+plupload.formatSize(t.size)+"",a+=''+t.percent+"%",n=e.settings.multipart_params.form_id,i=e.settings.multipart_params.field_id,a="undefined"!=typeof gf_legacy&&gf_legacy.is_legacy?""+_.delete_file+" "+a:a+"",a=gform.applyFilters("gform_file_upload_markup",a,t,e,_,p,r),m("#"+t.id).html(a),m("#"+t.id+" span.gfield_fileupload_progressbar_progress").css("width",t.percent+"%"),100==t.percent&&(r.status&&"ok"==r.status?(n=i,o=r.data,(a=c(n)).unshift(o),i=n,r=a,o=s(),n=m("#gform_uploaded_files_"+f),i=u(i),o[i]=r,n.val(m.toJSON(o))):d(e.settings.gf_vars.message_id,_.unknown_error+": "+t.name))))}),t.bind("FilesRemoved",function(e,t){l(e.settings)}),m("#"+e.drop_element).on({dragenter:n,dragover:n})}function h(e){return m("
    ").text(e).html()}m(document).on("gform_post_render",function(e,t){m("form#gform_"+t+" .gform_fileupload_multifile").each(function(){i(this)});var r=m("form#gform_"+t);0 li",function(){jQuery(this).find(".gform-form-toolbar__submenu").toggleClass("open"),jQuery(this).find(".has_submenu").toggleClass("submenu-open")}),jQuery("#gform-form-toolbar__menu").on("mouseleave","> li",function(){jQuery(".gform-form-toolbar__submenu.open").removeClass("open"),jQuery(".has_submenu.submenu-open").removeClass("submenu-open")}),jQuery("#gform-form-toolbar__menu .has_submenu").on("click",function(e){e.preventDefault()})}),jQuery(document).ready(function(){jQuery(".gform-settings-field").each(function(){1 .gform-settings-input__container").length&&jQuery(this).addClass("gform-settings-field--multiple-inputs")})}),jQuery(function(){gform.tools.trigger("gform_main_scripts_loaded")});