var __extends,Cp;(function(n){var t;(function(t){var i=function(){function t(n){this.http=n}return t.prototype.getRememberMeData=function(t){t?this.serverData=t:angular.element("#remember-me-server-data").length&&(this.serverData=n.Utils.objectToCamelCase(JSON.parse(angular.element("#remember-me-server-data").html())))},t.prototype.isUcsLogin=function(){var n=!1;return angular.element("#server-data-ucs-login").length&&(n=JSON.parse(angular.element("#server-data-ucs-login").html())),n},t.prototype.isFromServuPopup=function(){var n=!1;return angular.element("#server-data-from-serv-u").length&&(n=angular.element("#server-data-from-serv-u").html().trim().toLowerCase()==="true"),n},t.prototype.tryToLogIn=function(n,t,i,r,u,f){return this.http.post("/api/TryLogin",{username:n,password:t,selectedSwid:i,remember:r,rememberSwId:u,loginType:f}).then(function(n){return n.data})},t.prototype.register=function(t,i){return this.http.post("/api/registration/",{Email:t,SwId:i}).then(function(t){return n.Utils.getResponseObject(t)})},t.prototype.resendIndividualAccountEmailAsync=function(t){return this.http.post("/api/Account/ResendIndividualAccountEmail/",'"'+t+'"').then(function(t){return n.Utils.getResponseObject(t)})},t.prototype.requestIuaPasswordResetEmail=function(t,i){return this.http.post("/api/Account/RequestIuaPasswordResetEmail/",{customerId:t,email:i}).then(function(t){return n.Utils.getResponseObject(t)})},t.prototype.finishIuaPasswordReset=function(t,i){return this.http.post("/api/Account/FinishIuaPasswordReset/",{passwordResetToken:t,newPassword:i}).then(function(t){return n.Utils.getResponseObject(t)})},t.prototype.resendIndividualAccountEmail=function(t){return this.http.post("/api/Account/ResendIndividualAccountEmail/",'"'+t+'"').then(function(t){return n.Utils.getResponseObject(t)})},t.prototype.submitIuaRequiredInfo=function(t){return this.http.post("/api/Account/IuaRequiredInfo/",t).then(function(t){return n.Utils.getResponseObject(t)})},t}();t.LoginRepository=i})(t=n.Services||(n.Services={}))})(Cp||(Cp={}));app.service("loginRepository",["$http",function(n){return new Cp.Services.LoginRepository(n)}]);__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(t){function i(n,i,r,u,f){var e=t.call(this,n,i,f)||this,o;return e.scope=n,e.modalInstance=i,e.modal=r,e.loginRepository=u,e.content=f,o={content:f,recoverError:"",recoverErrorShowResendOption:!1,cancel:function(){return t.prototype.cancel.call(e)},loginAssistanceResolve:function(n){return e.loginAssistanceResolve(n)},loginAssistanceResendEmail:function(n){return e.loginAssistanceResendEmail(n)}},e.scope.loginAssistanceModal=o,e}return __extends(i,t),i.prototype.processResult=function(t,i){this.scope.hideLoading();switch(t.status){case n.Status.ValidationError:this.scope.loginAssistanceModal.recoverError=t.errors.join(" ");break;case n.Status.NotApproved:this.scope.loginAssistanceModal.recoverError=t.errors.join(" ");this.scope.loginAssistanceModal.recoverErrorShowResendOption=!0;break;case n.Status.Success:this.modalInstance.close({status:"loginAssistanceSuccess",email:i})}},i.prototype.loginAssistanceResolve=function(n){var i=this,t;this.scope.loginAssistanceModal.recoverError="";this.scope.loginAssistanceModal.recoverErrorShowResendOption=!1;n.submitted=!0;n.recoverIuaUsername.$valid&&(t=n.recoverIuaUsername.$modelValue,this.scope.showLoading(),this.loginRepository.requestIuaPasswordResetEmail(t,null).then(function(n){i.processResult(n,t)}))},i.prototype.loginAssistanceResendEmail=function(n){var t=n.recoverIuaUsername.$modelValue;this.modalInstance.close({status:"resendEmail",email:t})},i}(t.CommonModalInstanceController);t.LoginAssistanceModalController=i})(t=n.Controllers||(n.Controllers={}))}(Cp||(Cp={}));app.controller("loginAssistanceModalController",["$scope","$uibModalInstance","$uibModal","loginRepository","content",function(n,t,i,r,u){return new Cp.Controllers.LoginAssistanceModalController(n,t,i,r,u)}]),function(n){var t;(function(t){var i=function(){function t(n,t,i,r,u,f){var e=this;this.scope=n;this.modal=t;this.loginRepository=i;this.sortSwidService=r;this.$window=u;this.rootScope=f;n.isLoading=!1;n.tabToShow="login";n.formData={username:"",password:"",passwordResetToken:"",remember:!1,rememberSwId:!1,swid:""};n.redirect="";n.loginStatus="";n.swidOptions=[];n.selectedSwid=null;n.loginError="";n.registerError="";n.isPromptingLogin=!1;n.lastModal=null;n.cookiesDisabled=!1;n.showCookiesTooltip=!1;n.isInternalLogin=!1;n.init=function(){return e.$onInit()}}return t.prototype.$onInit=function(){var t=this,r,i,u;this.scope.switchTab=function(n){return t.switchTab(n)};this.scope.selectSwId=function(n){return t.selectSwId(n)};this.scope.loginAssistance=function(n){return t.loginAssistance(n)};this.scope.promptLogin=function(n,i){return t.promptLogin(n,i)};this.scope.toogleSwidOption=function(){return t.toogleSwidOption()};this.scope.tryToLogIn=function(n,i){return t.tryToLogIn(n,i)};this.scope.logInAsPartner=function(n,i){return t.logInAsPartner(n,i)};this.scope.showLoading=function(){return t.showLoading()};this.scope.hideLoading=function(){return t.hideLoading()};this.scope.register=function(n){return t.register(n)};this.scope.openCookieTooltip=function(){return t.openCookieTooltip()};this.scope.closeCookieTooltip=function(){return t.closeCookieTooltip()};this.scope.resetLoginPlaceholders=function(n){return n===void 0&&(n=!1),t.resetLoginPlaceholders(n)};this.scope.resetRegisterPlaceholders=function(n){return n===void 0&&(n=!1),t.resetRegisterPlaceholders(n)};this.scope.resetLoginErrorMessage=function(){return t.resetLoginErrorMessage()};this.scope.validateAccountForInternalAdmin=function(){return t.validateAccountForInternalAdmin()};this.scope.$on("ucsLogin",function(){return t.ucsTryToLogin()});this.scope.checkMailContent=function(){return t.checkMailContent()};this.scope.checkPasswordContent=function(){return t.checkPasswordContent()};this.scope.isEmptyLoginInput=!1;this.scope.isEmptyPasswordInput=!1;this.scope.isEmptyRegMailInput=!1;this.scope.isEmptyRegSwidInput=!1;this.scope.isInternalLogin=n.Utils.getUrlParameter("swid")!=null;this.scope.resetLoginPlaceholders();this.scope.resetRegisterPlaceholders();this.loginRepository.getRememberMeData();this.loginRepository.serverData&&(this.scope.redirect=this.loginRepository.serverData.redirectUrl,this.scope.loginStatus=this.loginRepository.serverData.status,this.scope.swidOptions=this.loginRepository.serverData.data);this.scope.cookiesDisabled=this.getCookieDisabled();r=n.Utils.getUrlParameter("id");i=n.Utils.getUrlParameter("userName");r!=="cp_create_account"&&(i=r||i);i&&(this.scope.formData.username=this.scope.formData.username.toUpperCase(),this.scope.loginError="You are about to create your individual account. Please enter your SolarWinds Customer ID (SWID) password and click Log in.",window.location.href.indexOf("?register")>-1&&(this.scope.formData.swid=i,this.scope.tabToShow="register",this.scope.registerError="Please provide your email address and Customer ID (SWID) and then select the Register button to continue the registration process."));window.location.href.indexOf("?loginassistance")>-1&&this.loginAssistance();this.scope.loginStatus==="ForceSelectSwId"&&(this.scope.$emit("showOverlay"),this.scope.selectedSwid=this.scope.swidOptions[0]);n.Utils.getUrlParameter("changepassword")=="1"&&(u=n.Utils.getUrlParameter("token"),u&&(this.scope.formData.passwordResetToken=u,this.finishPasswordReset()));n.Utils.getUrlParameter("confirmed")&&this.modal.open({scope:this.scope,templateUrl:"/Views/Shared/ModalTemplates/Shared/LoginAssistance/uiaConfirmationSuccess.html",windowClass:"cp-modal",controller:"commonModalInstanceController",resolve:{content:{}}});this.loginRepository.isFromServuPopup()&&this.modal.open({scope:this.scope,templateUrl:"/Views/Shared/ModalTemplates/Shared/LoginAssistance/fromServUPopup.html",windowClass:"cp-modal",controller:"fromServuModalController",resolve:{content:{}}});this.rootScope.$on("swid-chosen",function(n,i){t.callTryLogIn(t.scope.formData.username,t.scope.formData.password,i.swid.SwId,t.scope.formData.remember,i.rememberSwid)})},t.prototype.checkMailContent=function(){this.scope.formData.username.length>0&&(this.scope.isEmptyLoginInput=!1)},t.prototype.checkPasswordContent=function(){this.scope.formData.password.length>0&&(this.scope.isEmptyPasswordInput=!1)},t.prototype.showLoading=function(){this.scope.$emit("showOverlay");this.scope.$emit("showLoading");this.scope.isLoading=!0},t.prototype.hideLoading=function(){this.scope.$emit("hideOverlay");this.scope.$emit("hideLoading");this.scope.isLoading=!1},t.prototype.switchTab=function(n){this.scope.loginError=!1;this.scope.registerError=!1;this.scope.isEmptyLoginInput=!1;this.scope.isEmptyPasswordInput=!1;this.scope.isEmptyRegMailInput=!1;this.scope.isEmptyRegSwidInput=!1;this.scope.resetLoginPlaceholders();this.scope.resetRegisterPlaceholders();this.scope.tabToShow=n},t.prototype.selectSwId=function(n){this.scope.selectedSwid=n},t.prototype.toogleSwidOption=function(){this.scope.showSwidOptions=!this.scope.showSwidOptions},t.prototype.tryToLogIn=function(t,i){var r=this.scope.selectedSwid?this.scope.selectedSwid.SwId:"";if(t&&t.preventDefault(),this.scope.lastModal&&this.scope.lastModal.close(),this.scope.loginError="",this.scope.$broadcast("autoFill:update"),i&&!i.$valid||this.scope.formData.username===""||this.scope.formData.password===""||this.scope.isInternalLogin&&!this.scope.validateAccountForInternalAdmin()){this.scope.loginError=this.scope.resetLoginErrorMessage();this.scope.isEmptyLoginInput=!0;this.scope.isEmptyPasswordInput=!0;this.scope.resetLoginPlaceholders(!0);return}if(this.scope.formData.username&&this.scope.formData.username.substring(0,4).toLowerCase()==="tul\\"&&(r=n.Utils.getUrlParameter("swid"),!r)){this.scope.loginError="SWID parameter is missing";this.scope.isEmptyLoginInput=!0;this.scope.isEmptyPasswordInput=!0;return}this.scope.showLoading();this.callTryLogIn(this.scope.formData.username,this.scope.formData.password,r,this.scope.formData.remember,this.scope.formData.rememberSwId)},t.prototype.logInAsPartner=function(n,t){var i=this;if(this.scope.showLoading(),t&&!t.$valid){this.scope.hideLoading();t.submitted=!0;return}this.scope.redirect="/VirtualClassrooms/";this.loginRepository.tryToLogIn(this.scope.formData.username,null,null,this.scope.formData.remember,null,2).then(function(n){i.scope.hideLoading();switch(n.Status){case"Success":i.scope.showLoading();var t=i.scope.redirect&&i.scope.redirect.length>0?i.scope.redirect:n.Data.RedirectUrl;i.$window.location.href=t;break;case"Error":i.scope.loginError=n.Errors.join("<br />");break;case"DisplayServiceUnavailableErrorMessage":i.customerMessageModal();break;default:i.scope.loginError=n.Errors.join("<br />")}})},t.prototype.ucsTryToLogin=function(){var n=this.scope.selectedSwid?this.scope.selectedSwid.SwId:"";this.scope.showLoading();this.scope.redirect="/support/submit-a-ticket/";this.callTryLogIn(this.scope.formData.username,this.scope.formData.password,n,this.scope.formData.remember,this.scope.formData.rememberSwId)},t.prototype.callTryLogIn=function(t,i,r,u,f){var e=this;if(t.trim().match(n.Constants.regExps.singleSwidStr)){this.showRegisterSwidErrorMessage(t);return}this.loginRepository.tryToLogIn(t,i,r,u,f).then(function(n){var r,i;e.scope.hideLoading();switch(n.Status){case"Success":e.loginRepository.isUcsLogin()?(e.scope.showLoading(),location.reload()):(e.scope.showLoading(),r=e.scope.redirect&&e.scope.redirect.length>0?e.scope.redirect:n.Data.RedirectUrl,sessionStorage.setItem("just_logged_in","true"),e.$window.location.href=r);break;case"Error":e.scope.loginError=n.Errors.join("<br />");$(".errorMsg").children("no-match")&&(e.scope.isEmptyLoginInput=!0,e.scope.isEmptyPasswordInput=!0);break;case"ForceRegisterIua":e.showRegisterSwidErrorMessage(t);break;case"ForceSwIdPasswordChange":e.scope.showLoading();window.location.href=n.Data.RedirectUrl;break;case"ForceSelectSwId":i=e.sortSwidService.sortSwids(n.Data.NonBlockedSwidList,"Company","SwId");e.scope.$emit("showOverlay");e.scope.swidOptions=i;e.scope.selectedSwid=i[0];e.scope.isPromptingLogin=!0;break;case"DisplayServiceUnavailableErrorMessage":e.customerMessageModal();break;default:e.scope.loginError=n.Errors.join("<br />");$(".errorMsg").children("no-match")&&(e.scope.isEmptyLoginInput=!0,e.scope.isEmptyPasswordInput=!0)}})},t.prototype.showRegisterSwidErrorMessage=function(n){this.scope.formData.username="";this.scope.formData.swid=n;this.switchTab("register");this.scope.registerError='To sign up for a Customer Portal account, please enter your email address and the SWID in the fields below. If you experience difficulty, please contact <a href="mailto:customerservice@solarwinds.com">customerservice@solarwinds.com<\/a>';this.scope.hideLoading()},t.prototype.register=function(t){var i=this;t.preventDefault();this.scope.formData.username&&this.scope.formData.swid?(this.scope.registerError="",this.showLoading(),this.loginRepository.register(this.scope.formData.username,this.scope.formData.swid).then(function(t){if(i.hideLoading(),t.error)switch(t.status){case n.Status.DisabledSwid:i.scope.registerError=n.Constants.getDisabledSwidErrorMessage(i.scope.formData.swid);break;case n.Status.BlockedSwid:i.scope.registerError=n.Constants.getBlockedSwidErrorMessage(i.scope.formData.swid);break;default:i.scope.registerError=t.errors.join("<br />")}else i.modal.open({scope:i.scope,templateUrl:"/Views/Shared/ModalTemplates/Shared/LoginAssistance/registerConfirmation.html",windowClass:"cp-modal",controller:"commonModalInstanceController",resolve:{content:{}}})})):(this.scope.isEmptyRegMailInput=!0,this.scope.isEmptyRegSwidInput=!0,this.scope.resetRegisterPlaceholders(!0),this.scope.registerError="Please, provide your email and SWID.")},t.prototype.finishPasswordReset=function(){var n=this,t=this.modal.open({scope:this.scope,templateUrl:"/Views/Shared/ModalTemplates/Shared/LoginAssistance/forceIuaPasswordChange.html",windowClass:"cp-modal changeTempPassword",controller:"passwordChangeModalController",resolve:{content:function(){return{resetPasswordToken:n.scope.formData.passwordResetToken}}}});t.result.then(function(t){t&&n.modal.open({scope:n.scope,templateUrl:"/Views/Shared/ModalTemplates/Shared/LoginAssistance/passwordChangeSuccess.html",windowClass:"cp-modal",controller:"passwordChangeModalSuccessController",resolve:{content:{}}})})},t.prototype.loginAssistance=function(n){var t=this,i;n&&n.preventDefault();i=this.modal.open({scope:this.scope,templateUrl:"/Views/Shared/ModalTemplates/Shared/LoginAssistance/forgotPassword.html",windowClass:"cp-modal",controller:"loginAssistanceModalController",resolve:{content:function(){return{}}}});i.result.then(function(n){n&&(n.status==="resendEmail"?t.resendAccountVerificationEmail(n.email):n.status==="loginAssistanceSuccess"&&t.modal.open({scope:t.scope,templateUrl:"/Views/Shared/ModalTemplates/Shared/LoginAssistance/loginAssistanceSuccess.html",windowClass:"cp-modal",controller:"commonModalInstanceController",resolve:{content:function(){return{email:n.email}}}}))})},t.prototype.resendAccountVerificationEmail=function(n){this.modal.open({scope:this.scope,templateUrl:"/Views/Shared/ModalTemplates/Shared/LoginAssistance/resendVerificationEmail.html",windowClass:"cp-modal UiaNotConfirmed",controller:"resendVerificationEmailController",resolve:{content:function(){return{email:n}}}})},t.prototype.customerMessageModal=function(){this.modal.open({scope:this.scope,templateUrl:"/Views/Shared/ModalTemplates/Shared/LoginAssistance/customerMessage.html",windowClass:"cp-modal customerMessage",controller:"commonModalInstanceController",resolve:{content:function(){return{}}}})},t.prototype.promptLogin=function(n,t){n.preventDefault();this.scope.redirect=t;this.scope.isPromptingLogin=!0;this.scope.$emit("showOverlay");window.scrollTo(0,0)},t.prototype.getCookieDisabled=function(){var n=!!navigator.cookieEnabled;return typeof navigator.cookieEnabled!="undefined"||n||(document.cookie="testcookie",n=document.cookie.indexOf("testcookie")!==-1),!n},t.prototype.openCookieTooltip=function(){this.scope.showCookiesTooltip=!0},t.prototype.closeCookieTooltip=function(){this.scope.showCookiesTooltip=!1},t.prototype.resetLoginPlaceholders=function(n){n===void 0&&(n=!1);this.scope.isInternalLogin?n?(this.scope.inputEmailPlaceholder="TUL ACCOUNT REQUIRED",this.scope.inputPasswordPlaceholder="TUL PASSWORD REQUIRED"):(this.scope.inputEmailPlaceholder="TUL ACCOUNT (TUL\\firstname.lastname)",this.scope.inputPasswordPlaceholder="TUL PASSWORD"):n?(this.scope.inputEmailPlaceholder="EMAIL REQUIRED",this.scope.inputPasswordPlaceholder="PASSWORD REQUIRED"):(this.scope.inputEmailPlaceholder="EMAIL",this.scope.inputPasswordPlaceholder="PASSWORD")},t.prototype.resetRegisterPlaceholders=function(n){n===void 0&&(n=!1);n?(this.scope.inputRegMailPlaceholder="EMAIL REQUIRED",this.scope.inputRegSwidPlaceholder="CUSTOMER ID (SWID) REQUIRED"):(this.scope.inputRegMailPlaceholder="EMAIL",this.scope.inputRegSwidPlaceholder="CUSTOMER ID (SWID)")},t.prototype.resetLoginErrorMessage=function(){return this.scope.isInternalLogin?this.scope.formData.username===""||this.scope.formData.password===""?"Please, provide your TUL account and TUL password.":this.scope.validateAccountForInternalAdmin()?"Please, provide your TUL account and TUL password.":"Please, provide your TUL account as TUL\\firstname.lastname.":"Please, provide your email and password."},t.prototype.validateAccountForInternalAdmin=function(){return this.scope.formData.username&&this.scope.formData.username.substring(0,4).toLowerCase()==="tul\\"},t}();t.LoginController=i})(t=n.Controllers||(n.Controllers={}))}(Cp||(Cp={}));angular.module("CP").controller("loginController",["$scope","$uibModal","loginRepository","sortSwidService","$window","$rootScope",function(n,t,i,r,u,f){return new Cp.Controllers.LoginController(n,t,i,r,u,f)}]),function(n){var t;(function(t){var i=function(){function t(n,t){this.http=n;this.filter=t}return t.prototype.getTrainingOpportunities=function(){var t=this;return this.http.get("/api/Account/TrainingOpportunities").then(function(i){var r=n.Utils.getResponseObject(i),u,f;if(!r.error&&r.data.length)for(u=0,f=r.data.length;u<f;u++)r.data[u].trainingDate=t.filter("dateFilter")(Date.parse(r.data[u].trainingDate)),r.data[u].description=r.data[u].description.length>200?r.data[u].description.substring(0,200)+"....":r.data[u].description;return r})},t.prototype.getOfferInfo=function(){return this.http.get("/api/OfferInfo").then(function(t){return n.Utils.getResponseObject(t)})},t}();t.NewsRepository=i})(t=n.Services||(n.Services={}))}(Cp||(Cp={}));app.service("newsRepository",["$http","$filter",function(n,t){return new Cp.Services.NewsRepository(n,t)}]),function(n){var t;(function(n){var t=function(){function n(n,t){var i=this;n.productSpotlight=null;n.specialOffer=null;n.trainingOpportunities=[];n.init=function(){return i.init()};n.getTrainingDateString=function(n){return i.getTrainingDateString(n)};this.scope=n;this.newsRepository=t;this.init()}return n.prototype.init=function(){var n=this;this.newsRepository.getOfferInfo().then(function(t){t.error||(n.scope.productSpotlight=t.data.productSpotlight,n.scope.specialOffer=t.data.specialOffer)});this.newsRepository.getTrainingOpportunities().then(function(t){t.error||(n.scope.trainingOpportunities=t.data)})},n.prototype.getTrainingDateString=function(n){var t="";return n.trainingDate&&(t=n.trainingDate,n.startTime&&(t+=" "+n.startTime,n.endTime&&(t+="-"+n.endTime)),n.timeZone&&(t+=" ("+n.timeZone+")")),t},n}();n.NewsController=t})(t=n.Controllers||(n.Controllers={}))}(Cp||(Cp={}));app.controller("newsController",["$scope","newsRepository",function(n,t){return new Cp.Controllers.NewsController(n,t)}]);__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var i=function(t){function i(n,i,r,u,f){var e=t.call(this,n,i,u)||this,o;return e.scope=n,e.modalInstance=i,e.modal=r,e.content=u,e.loginRepository=f,o={resendEmailError:"",resendVerificationEmailEmail:u.email,isLoading:!1,cancel:function(){return t.prototype.cancel.call(e)},resendVerificationEmail:function(n){return e.resendVerificationEmail(n)}},e.scope.resendVerificationModal=o,e}return __extends(i,t),i.prototype.resendVerificationEmail=function(t){var i=this;this.scope.resendVerificationModal.resendEmailError="";t.$valid?(this.scope.resendVerificationModal.isLoading=!0,this.loginRepository.resendIndividualAccountEmail(this.scope.resendVerificationModal.resendVerificationEmailEmail).then(function(t){i.scope.resendVerificationModal.isLoading=!1;switch(t.status){case n.Status.ValidationError:i.scope.resendVerificationModal.resendEmailError=t.data.Error;break;case n.Status.Error:i.scope.resendVerificationModal.resendEmailError=t.message;default:i.modalInstance.close();i.resendAccountVerificationEmailSuccess()}})):t.submitted=!0},i.prototype.resendAccountVerificationEmailSuccess=function(){this.modal.open({templateUrl:"/Views/Shared/ModalTemplates/Shared/LoginAssistance/confirmationEmailSent.html",windowClass:"cp-modal",controller:"commonModalInstanceController",resolve:{content:{}}})},i}(t.CommonModalInstanceController);t.ResendVerificationEmailController=i})(t=n.Controllers||(n.Controllers={}))}(Cp||(Cp={}));app.controller("resendVerificationEmailController",["$scope","$uibModalInstance","$uibModal","content","loginRepository",function(n,t,i,r,u){return new Cp.Controllers.ResendVerificationEmailController(n,t,i,r,u)}]),function(n){var t;(function(n){var t=function(){function n(n,t,i,r){var u=this;this.scope={cancel:function(){return u.cancel()},resendVerificationEmail:function(){return u.resendVerificationEmail()},resendAccountVerificationEmailSuccess:function(){return n.resendAccountVerificationEmailSuccess()}};this.loginRepository=t;this.modalInstance=i;this.content=r;n.iuaNotConfirmedModal=this.scope}return n.prototype.cancel=function(){return this.modalInstance.close(),!1},n.prototype.resendVerificationEmail=function(){this.loginRepository.resendIndividualAccountEmailAsync(this.content.username);this.modalInstance.close("confirm")},n}();n.IuaNotConfirmedModalController=t})(t=n.Controllers||(n.Controllers={}))}(Cp||(Cp={}));app.controller("iuaNotConfirmedModalController",["$scope","loginRepository","$uibModalInstance","content",function(n,t,i,r){return new Cp.Controllers.IuaNotConfirmedModalController(n,t,i,r)}]);__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t=function(n){function t(t,i,r,u,f){var e=n.call(this,t,i,u)||this,o;return e.scope=t,e.modalInstance=i,e.modal=r,e.content=u,e.loginRepository=f,o={changeUiaPasswordError:"",resetPasswordToken:u.resetPasswordToken,newPasswordConfirm:"",newPassword:"",loadingVisible:!1,cancel:function(){return n.prototype.cancel.call(e)},finishIuaPasswordReset:function(n){return e.finishIuaPasswordReset(n)}},e.scope.passwordChangeModal=o,e}return __extends(t,n),t.prototype.finishIuaPasswordReset=function(n){var t=this;n.$valid?(this.scope.passwordChangeModal.loadingVisible=!0,this.loginRepository.finishIuaPasswordReset(this.scope.passwordChangeModal.resetPasswordToken,this.scope.passwordChangeModal.newPassword).then(function(n){t.scope.passwordChangeModal.loadingVisible=!1;n.error?t.scope.passwordChangeModal.changeUiaPasswordError=n.errors.join(" "):(t.scope.passwordChangeModal.changeUiaPasswordError="",t.modalInstance.close(!0))})):n.submitted=!0},t}(n.CommonModalInstanceController);n.PasswordChangeModalController=t})(t=n.Controllers||(n.Controllers={}))}(Cp||(Cp={}));app.controller("passwordChangeModalController",["$scope","$uibModalInstance","$uibModal","content","loginRepository",function(n,t,i,r,u){return new Cp.Controllers.PasswordChangeModalController(n,t,i,r,u)}]);__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t=function(n){function t(t,i,r){var u=n.call(this,t,i,r)||this,f;return u.scope=t,u.modalInstance=i,u.content=r,f={cancel:function(){return n.prototype.cancel.call(u)},passwordChanged:function(){return u.passwordChanged()}},u.scope.passwordChangeModal=f,u}return __extends(t,n),t.prototype.passwordChanged=function(){this.modalInstance.close("login")},t}(n.CommonModalInstanceController);n.PasswordChangeModalSuccessController=t})(t=n.Controllers||(n.Controllers={}))}(Cp||(Cp={}));app.controller("passwordChangeModalSuccessController",["$scope","$uibModalInstance","content",function(n,t,i){return new Cp.Controllers.PasswordChangeModalSuccessController(n,t,i)}]),function(n){var t;(function(t){var i=function(){function t(n,t,i,r){var u=this;this.scope={content:i,cancel:function(){return u.cancel()},dontShowAgain:!1};this.modalInstance=t;this.content=i;this.cookieService=r;n.modal=this.scope}return t.prototype.cancel=function(){return this.scope.dontShowAgain&&this.cookieService.set(n.Constants.FromServuDontShowAgainCookie,n.Constants.FromServuDontShowAgainCookie,365),this.modalInstance.close(),!1},t}();t.FromServuModalController=i})(t=n.Controllers||(n.Controllers={}))}(Cp||(Cp={}));app.controller("fromServuModalController",["$scope","$uibModalInstance","content","cookieService",function(n,t,i,r){return new Cp.Controllers.FromServuModalController(n,t,i,r)}])