jQuery(function($){var recaptchaVerified=new Map;var recaptchaContainer=$('<div class="jpagebuilder_recaptcha_container">'+'<input class="jpagebuilder_recaptcha_control" type="checkbox" name="jpagebuilder_recaptcha" data-validation="recaptcha"/>'+'<label class="jpagebuilder_recaptcha_label">'+jpagebuilder_recaptcha_label+"</label>"+"</div>");$("div.js-cf-captcha-wrapper").append(recaptchaContainer);$(".jpagebuilder_recaptcha_control").on("click change pointerdown",function(event){const targetButton=
event.target;const containerContextForm=$(targetButton).parents("form.jpb-ajaxt-contact-form,form.jpb-addon-form-builder-form,form.jpb-optin-form");var clientX=event.clientX,clientY=event.clientY,pageX=event.pageX,pageY=event.pageY,isTrusted=event.originalEvent?event.originalEvent.isTrusted:false;if(clientX&&clientY&&pageX&&pageY&&isTrusted&&!$(this).is(":checked")){$(this).animate({width:0,"-moz-transform":"scale(0)","margin-left":"18px"},500,function(){$(this).after('<span class="jpagebuilder_recaptcha_success"></span>');
$(this).hide();recaptchaVerified.set(containerContextForm.get(0),true);$(".jpagebuilder_recaptcha_label",containerContextForm).removeClass("jpagebuilder_label_validate_recaptcha jpagebuilder_error");$("label.jpagebuilder_label_validation_recaptcha",containerContextForm).remove();setTimeout(function(){$(".jpagebuilder_recaptcha_success",containerContextForm).addClass("jpagebuilder_animate")},1)});return true}return false});$("form.jpb-ajaxt-contact-form:has(.jpagebuilder_recaptcha_control) div.jpb-form-button button[type=submit],form.jpb-addon-form-builder-form:has(.jpagebuilder_recaptcha_control) div.jpb-form-builder-btn button[type=submit],form.jpb-optin-form:has(.jpagebuilder_recaptcha_control) button[type=submit]").on("click",
function(jqEvent){const targetButton=jqEvent.target;const containerContextForm=$(targetButton).parents("form.jpb-ajaxt-contact-form,form.jpb-addon-form-builder-form,form.jpb-optin-form");if(recaptchaVerified.get(containerContextForm.get(0))){let timeout=2E3;if(!containerContextForm.get(0).checkValidity())timeout=500;setTimeout(function(){var $field=$(".jpagebuilder_recaptcha_control",containerContextForm);if($field.length){recaptchaVerified.set(containerContextForm.get(0),false);$(".jpagebuilder_recaptcha_control",
containerContextForm).removeAttr("style");$(".jpagebuilder_recaptcha_success",containerContextForm).remove();$(".jpagebuilder_recaptcha_label",containerContextForm).removeClass("jpagebuilder_label_validate_recaptcha");$("label.jpagebuilder_label_validation.jpagebuilder_label_validation_recaptcha",containerContextForm).remove()}},timeout);return true}else{$(".jpagebuilder_recaptcha_label",containerContextForm).addClass("jpagebuilder_label_validate_recaptcha");$("label.jpagebuilder_label_validation_recaptcha",
containerContextForm).remove();$(".jpagebuilder_recaptcha_container",containerContextForm).after('<label class="jpagebuilder_label_validation jpagebuilder_label_validation_recaptcha">* '+jpagebuilder_required_label+"</label>");return false}})});
