if(typeof authentication==undefined||!authentication)var authentication={};authentication.register={};authentication.register=function(){var n,r,u,s,h,t,i,f,e,o,c=function(n){return/^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i.test(n)},l=function(){n=$(".register-control-wrapper");r=$(".welcome-control-wrapper");u=$("#ShowRegisterControl");s=$("#display-message-wrapper");h=$("#display-message");t=$("#error-message-wrapper");i=$("#error-message");var l=$("form");f=$('input[name="__RequestVerificationToken"]',l).val();e=$("#Email");o=$("#ReturnUrl").val();u.val()==="True"&&(n.show(),r.hide());$("#button-get-started").on("click",function(){var s=e.val();return c(s)?$.ajax({url:"/Authentication/Authentication/ProcessRegisterEmail",data:{__RequestVerificationToken:f,emailAddress:s},type:"POST",success:function(f){f.Success?(i.text(""),t.hide(),f.LoginRedirect&&(window.location="/Authentication/"+o),f.CanRegister&&(n.show(),r.hide(),u.val("True"))):(i.text(f.DisplayMessage),t.show())},error:function(){i.text("An unexpected error occured, please contact us for support.");t.show()}}):n.hide(),!1})};return{init:l}}();$.validator.unobtrusive.adapters.addBool("mandatory","required");$(document).ready(function(){authentication.register.init()})