/*! frontier-id 29-10-2020 */ "use strict";function _typeof(a){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}angular.module("fidService.constants",[]),angular.module("fidService.utils",[]),angular.module("fidService.config",[]),angular.module("fidService.route",[]),angular.module("fidService.models",[]),angular.module("fidService.services",[]),angular.module("fidService.directives",[]),angular.module("fidService.controllers",[]),angular.module("fidService",["fidService.constants","fidService.utils","fidService.config","fidService.models","fidService.services","fidService.route","fidService.directives","fidService.controllers"]).config(["$compileProvider",function(a){a.aHrefSanitizationWhitelist(/^\s*(https?|sms|tel|mailto):/)}]),angular.module("fidService.directives").directive("fidAccountNotifications",["$q","$timeout","fidLog","fidConfig","fidModalManager",function(a,b,c,d,e){return{restrict:"ACE",templateUrl:d.getTemplateUrl("accountsummary/accountnotifications.html"),scope:!0,controller:["$scope","$element","fidJsonApi","fidLog","fidAlerts","fidStateService","fidEventConstant",function(a,b,c,d,f,g,h){var i="Notifications directive";a.fidRouter=a.$parent.fidRouter,a.model={profile:null,issues:{},issueCount:0,email:"",phone:""},a.alerts={displayedAlerts:[]};var j=null;a.fromForgotPassword=!1,null!==a.fidRouter.getCurrentRoute().getState&&(a.state=a.fidRouter.getCurrentRoute().getState()),d.debug(i,"state: "+JSON.stringify(a.state)),a.state&&a.state.linkAccount&&(a.state.linkAccount.accountLinked||a.state.linkAccount.canceled)&&a.state.linkAccount.fromRegister&&(e.showModal({email:a.state.register.email,accountId:a.state.linkAccount.linkedAccount},"modals/idcreated.html",{scope:a,controller:"fidIdCreatedController",backdrop:"static"}),g.sharedState.linkAccount.accountLinked=!1,g.sharedState.linkAccount.linkedAccount="",g.sharedState.linkAccount.canceled=!1,a.eventTriggered({event:{type:h.STATE_UPDATED,data:g.sharedState}})),c.profileGet().then(function(b){a.model.profile=b.response,a.model.profile.emails.unverified.length&&(a.model.issues.unverifiedEmail=!0,a.model.email=a.model.profile.emails.unverified[0]),c.profileContactPhoneGet().then(function(b){a.model.issues.unverifiedMobileNumber=b.response.phoneNumber&&b.response.isVerified.verified===!1,j=b.response,a.model.phone=b.response.phoneNumber,a.model.issues.unverifiedMobileNumber||delete a.model.issues.unverifiedMobileNumber,a.model.issueCount=Object.keys(a.model.issues).length,a.cssHeight="height: auto;"})}),a.onResendVerificationEmail=function(){c.profileUpdate("resendVerificationEmail",a.model.profile).then(function(){delete a.model.issues.unverifiedEmail,a.model.issueCount=Object.keys(a.model.issues).length,f.showSuccess([{i18n:"fid.myprofile-verifyemail-sent",i18nArgs:{email:a.model.profile.emails.unverified[0]}}],{alerts:a.alerts,id:"change-email"})})["catch"](function(b){f.showWarning([{i18n:"fid.myprofile-email-resend-failed",i18nArgs:{email:a.model.profile.emails.unverified[0]}}],{alerts:a.alerts,id:"change-email"}),d.debug("resend email failure: "+JSON.stringify(b))})},a.onVerifyMobileNumber=function(){e.showModal({phoneNumber:j.phoneNumber},"modals/mpverifymobile.html",{scope:a,controller:"fidMpVerifyMobileController"}).then(function(b){"verified"===b.action?(delete a.model.issues.unverifiedMobileNumber,a.model.issueCount=Object.keys(a.model.issues).length,f.showSuccess([{i18n:"fid.myprofile-verifymobile-verified-message",i18nArgs:{phone:j.phoneNumber}}],{alerts:a.alerts,id:"change-mobile"})):"failed"===b.action})}}],link:function(a,b,d){c.debug("attrs: "+d),b.on("$destroy",function(){a.$destroy()})}}}]),angular.module("fidService.directives").directive("fidAccountSummaryAlerts",["$q","$timeout","fidLog","fidConfig",function(a,b,c,d){return{restrict:"ACE",templateUrl:d.getTemplateUrl("accountsummary/accountsummaryalerts.html"),scope:!0,controller:["$scope","$element","fidJsonApi","fidLog","fidAlerts","fidStateService","fidEventConstant",function(a,b,c,d,e,f,g){var h="Account summary alerts directive";a.fidRouter=a.$parent.fidRouter,a.alerts={displayedAlerts:[]},null!==a.fidRouter.getCurrentRoute().getState&&(a.state=a.fidRouter.getCurrentRoute().getState()),d.debug(h,"state: "+JSON.stringify(a.state)),a.state&&(a.state.forgotPassword&&a.state.forgotPassword.newPasswordSet&&(e.showSuccess([{i18n:"fid.forgot-password-reset-password-success"}],{alerts:a.alerts,id:"reset-password"}),f.sharedState.forgotPassword.newPasswordSet=!1,a.eventTriggered({event:{type:g.STATE_UPDATED,data:f.sharedState}})),a.state.linkAccount&&(a.state.linkAccount.alreadyExists?(e.showWarning([{i18n:"fid.link-account-existing-account-error"}],{alerts:a.alerts,id:"link-account"}),f.sharedState.linkAccount.alreadyExists=!1,a.eventTriggered({event:{type:g.STATE_UPDATED,data:f.sharedState}})):a.state.linkAccount.accountLinked&&(e.showSuccess([{i18n:"fid.link-account-success"}],{alerts:a.alerts,id:"link-account"}),f.sharedState.linkAccount.accountLinked=!1,a.eventTriggered({event:{type:g.STATE_UPDATED,data:f.sharedState}}))))}],link:function(a,b,d){c.debug("attrs: "+d),b.on("$destroy",function(){a.$destroy()})}}}]),angular.module("fidService.directives").directive("fidAsNoLinkedAccounts",["$q","$timeout","fidLog","fidConfig",function(a,b,c,d){return{restrict:"ACE",templateUrl:d.getTemplateUrl("accountsummary/asnolinkedaccounts.html"),scope:!0,controller:["$scope","$element","fidEventConstant",function(a,b,d){a.onLinkAccount=function(){c.debug("onLinkAccount"),a.eventTriggered({event:{type:d.GOTO_LINK_ACCOUNT}})}}],link:function(a,b,d){c.debug("attrs: "+d),b.on("$destroy",function(){a.$destroy()})}}}]),angular.module("fidService").service("fidAlerts",["$timeout","$filter","fidConfig","fidLog",function(a,b,c,d){this.ALERT_TYPE={INFO:"info",WARNING:"warning",DANGER:"danger",SUCCESS:"success"},this.displayedAlerts=[],this.show=function(e,f,g){g=g||{};var h=g.alerts&&g.alerts.displayedAlerts?g.alerts.displayedAlerts:this.displayedAlerts;if(!angular.isArray(f))return void d.debug("fidAlerts","Invalid content!");if("mobile"===c.getPlatform())return void angular.forEach(f,function(a){a.string?c.getAppApiHandle().showMessageString&&c.getAppApiHandle().showMessageString(a.string):a.i18n&&c.getAppApiHandle().showMessage&&c.getAppApiHandle().showMessage(a.i18n,a.i18nArgs)});var i=[];angular.forEach(f,function(a){var c={href:a.href||"",onClick:a.onClick};c.text=void 0!==a.i18n?b("i18n")(a.i18n,a.i18nArgs):a.string||"",c.isAnchor=void 0!==a.href||void 0!==a.onClick,i.push(c)});var j="fidAlert_"+(g.id||Math.floor(1e5*Math.random())+(new Date).getTime());g.id&&angular.forEach(h,function(a){a.id===j&&(a.id="fidAlert_closing",a.close())});var k={id:j,type:e,content:i,closing:!1,close:function(){k.closing=!0,a(function(){angular.forEach(h,function(a,b){a.id===k.id&&h.splice(b,1)})},200)}};h.push(k),g.dismissMilliseconds&&"number"==typeof g.dismissMilliseconds&&a(function(){k.close()},g.dismissMilliseconds)},this.showInfo=function(a,b){return this.show(this.ALERT_TYPE.INFO,a,b)},this.showWarning=function(a,b){return this.show(this.ALERT_TYPE.WARNING,a,b)},this.showDanger=function(a,b){return this.show(this.ALERT_TYPE.DANGER,a,b)},this.showSuccess=function(a,b){return this.show(this.ALERT_TYPE.SUCCESS,a,b)}}]),angular.module("fidService.directives").directive("fidAlertsDisplay",["fidConfig","fidAlerts",function(a,b){return{restrict:"AE",templateUrl:a.getTemplateUrl("alerts/alertsdisplay.html"),scope:{alerts:"="},link:function(a){a.alertsParent=a.alerts||b}}}]),angular.module("fidService.config").service("fidConfig",["$q","fidLog","fidPlatformConstant","fidRouteConstant","fidValidator",function(a,b,c,d,e){var f="Config Service",g="localhost",h=c.WEB,i=d.HOME,j=null,k="https:"===window.location.protocol,l={captchaIgnored:!1,recaptchaKey:"6Lf5sv4SAAAAAILuWISdKH5avhi0tOsytJ2h5zyc",gigyaUrl:"//cdn"+(k?"s":"")+".gigya.com/JS/socialize.js?apikey=3_IVyRclYYkhVkoGh3mXZROuRi_aMqPxcFXAbcnb5C3nxkSLq9D6PF_MHWVMUI98Bo",uvUrl:"https://uv.frontier.com/auth?RelayState=",useTestApi:!1};this.getTemplateUrl=function(a){return"fid/templates/"+a},this.setPlatform=function(a){e.contains(c,a)?h=a:b.error("Config Service","Invalid platform: "+a)},this.getPlatform=function(){return h},this.setServer=function(a){g=a},this.getServer=function(){return g},this.setStartPage=function(a){e.contains(d,a)?i=a:b.warn(f,"Invalid start route: "+a+", start default home page")},this.getStartPage=function(){return i},this.setAppApiHandle=function(a){j=a?a:{}},this.getAppApiHandle=function(){return j||{handleRestError:function(){},checkSignedIn:function(){},showMessage:function(){}}},this.setEnvironment=function(a){angular.extend(l,a)},this.getEnvironment=function(a){return l[a]},this.setEnvironment({uvUrl:"https://uv.frontier.com/auth?RelayState="})}]),angular.module("fidService.constants").constant("fidScreenSizeConstant",{XXS:0,XS:480,SM:768,MD:992,LG:1200}).constant("fidPlatformConstant",{WEB:"web",MOBILE:"mobile"}).constant("fidRouteConstant",{HOME:"home",LOGIN:"login",ACCOUNT_VALIDATION:"accountValidation",LOGIN_INLINE:"loginInline",LOGIN_INLINE_EN:"loginInlineEnglish",LOGIN_BANNER:"loginBanner",LOGIN_MODAL:"loginModal",FORGOT_PASSWORD:"forgotPassword",FORGOT_ID:"forgotId",LOGOUT:"logout",LINK_ACCOUNT:"linkAccount",LINK_AUTH:"linkAuth",LINK_TNAC:"linkTnac",MP_CREATEID:"mpCreateId",MP_VERIFYMOBILE:"mpVerifyMobile",REGISTER:"register",TOS:"tos",MP_MYACCOUNT:"mpMyAccount",ECP_MYPROFILE:"ecpMyProfile",ECP_MANAGEACCOUNT:"ecpManageAccount",ECP_MANAGEID:"ecpManageId",MP_SOCIALID:"mpSocialId",ECP_CREATEID:"ecpCreateId",MP_ACCOUNTS:"mpAccounts",MP_VERIFYEMAIL:"mpVerifyEmail",MP_MYPROFILE:"mpMyProfile",ACCOUNT_NOTIFICATIONS:"accountNotifications",ACCOUNT_SUMMARY_ALERTS:"accountSummaryAlerts",AS_NOLINKEDACCOUNTS:"asNoLinkedAccounts",MY_SERVICES:"myServices",ADD_MY_SERVICES_USER:"myServicesAddUser",MY_SERVICES_USER:"myServiceUser"}).constant("fidModalConstant",{CONFIRM:"confirm-modal",LINK_ACCOUNT_CANCEL:{title:{i18n:"fid.link-account-modal-cancel-title"},body:{i18n:"fid.link-account-modal-cancel-text"},buttons:[{i18n:"fid.no",id:"no"},{i18n:"fid.yes-cancel",id:"yes"}]},ADD_MEMBER_SHARE_DETAILS:{title:{i18n:"fid.myprofile-share-code-title"},body:{i18n:""},buttons:[{i18n:"fid.ok",id:"ok"}]}}).constant("fidEventConstant",{ROUTE_CHANGED:"route-change",BACK_BUTTON_CLICKED:"go-back",LOGIN_SUCCESS:"login-success",LOGIN_FAILURE:"login-failure",LOGOUT_SUCCESS:"logout-success",LOGOUT_FAILURE:"logout-failure",POST_AUTH_SUCCESS:"post-auth-success",LINK_ACCOUNT_SUCCESS:"link-account-success",LINK_ACCOUNT_CANCEL:"link-account-cancel",LINK_ACCOUNT_FAILURE:"link-account-failure",UNLINK_ACCOUNT_SUCCESS:"unlink-account-success",REMOVE_USER_SUCCESS:"remove-user-success",REGISTER_SUCCESS:"register-success",REGISTER_FAILURE:"register-failure",REGISTER_CANCEL:"register-cancel",GOTO_FORGOT_PASSWORD:"goto-forgot-password",GOTO_FORGOT_ID:"goto-forgot-id",GOTO_REGISTER:"goto-register",GOTO_LINK_ACCOUNT:"goto-link-account",GOTO_POST_AUTH:"goto-post-auth",GOTO_HOME:"goto-home",GOTO_HELP:"goto-help",GOTO_CONTACT_US:"goto-contact-us",GOTO_LOGIN:"goto-login",GOTO_ACCOUNT_SUMMARY:"goto-account-summary",GOTO_MY_PROFILE:"goto-my-profile",GOTO_MY_SERVICES_USER:"goto-my-services-user",GOTO_ADD_MY_SERVICES_USER:"goto-add-my-services-user",LOGOUT_GOTO_HOME:"logout-goto-home",CREATEID_USER_INVITED:"createid-user-invited",CREATEID_PARENT_EXISTS:"createid-parent-exists",CREATEID_USER_PROMOTED:"createid-user-promoted",CREATEID_USER_ATTACHED:"createid-user-attached",CREATEID_CANCEL:"createid-cancel",STANDARD_ID_CREATED:"standard-id-created",STATE_UPDATED:"state-updated",PAPERLESS_UPDATED:"paperless-updated"}).constant("fidActionConstant",{}).constant("fidPaginationConstant",{MAX_PER_PAGE:5}).constant("fidLoginUITypeConstant",{MODAL:"modal",BANNER:"banner",INLINE:"inline",INLINE_EN:"inline-english",FULLPAGE:"fullpage"}),angular.module("fidService.controllers").controller("forgotErrorController",["$scope","$rootScope","$filter","fidLog","fidRouteConstant","fidEventConstant","fidJsonApi","fidAlerts","modalConfig",function(a,b,c,d,e,f,g,h,i){var j="Forgot Create Id";a.modalConfig=i,a.title=a.modalConfig.title,a.body=a.modalConfig.body,a.buttons=a.modalConfig.buttons,a.onCreateId=function(){d.debug(j,"On create id"),a.$close({action:"cancel"}),a.$parent.goTo(e.REGISTER)},a.onForgotId=function(){d.debug(j,"On forgot id"),a.$close({action:"cancel"}),a.$parent.goTo(e.FORGOT_ID)}}]),angular.module("fidService.directives").directive("fidForgotId",["$q","$timeout","$filter","fidLog","fidConfig","fidRoute","fidRouteConstant","fidEventConstant","fidStateService","fidAlerts","vcRecaptchaService","fidModalManager",function(a,b,c,d,e,f,g,h,i,j,k,l){return{restrict:"ACE",templateUrl:e.getTemplateUrl("forgot/forgotid.html"),scope:!0,controller:["$scope","fidJsonApi",function(a,f){var m="Forgot id page";a.loading=!1,a.authenticated=!1,a.captchaModelBan={key:e.getEnvironment("recaptchaKey"),response:"",widgetId:null,invalid:!1,disabled:e.getEnvironment("captchaIgnored")},a.captchaModelEmail={key:e.getEnvironment("recaptchaKey"),response:"",widgetId:null,invalid:!1,disabled:e.getEnvironment("captchaIgnored")},a.forgotId={frontierId:"",ban:"",pin:"",newPassword1:"",newPassword2:"",idFocus:!1,banFocus:!1,pinFocus:!1,idInvalid:!1,banInvalid:!1,pinInvalid:!1,idForm:null,banForm:null},a.accordion={id:!1,ban:!1,idExpanded:!1,banExpanded:!1},a.alerts={displayedAlerts:[]};var n={title:{i18n:"fid.forgot-id-not-found-title"},body:[{i18n:"fid.forgot-id-no-fid-found"},{i18n:"fid.forgot-id-try-again"},{i18n:"fid.forgot-id-create-fid",link:"createId"}],buttons:{i18n:"fid.ok",id:"default-button"}};a.forgotIdEmailDomFunctions={},a.forgotIdSendBanPinDomFunctions={};var o="";"mobile"===e.getPlatform()&&e.getAppApiHandle().fixScroll&&(a.fixScroll=e.getAppApiHandle().fixScroll),e.getAppApiHandle()&&e.getAppApiHandle().getAnalyticsService&&(o=e.getAppApiHandle().getAnalyticsService()),o&&o.enterPageSpecial("forgotid",{eVar2:o.c.formNameFortgotId,eVar68:"ftr:forgotid",events:o.c.formView+","+o.c.formStep}),a.onToggle=function(b){"id"===b?(a.accordion.id=!0,a.accordion.idExpanded=!a.accordion.idExpanded,a.accordion.banExpanded=!1,a.accordion.ban=!1):"ban"===b&&(a.accordion.ban=!0,a.accordion.banExpanded=!a.accordion.banExpanded,a.accordion.idExpanded=!1,a.accordion.id=!1)},a.setEmailWidgetId=function(b){a.captchaModelEmail.widgetId=b},a.setBanWidgetId=function(b){a.captchaModelBan.widgetId=b},a.setEmailResponse=function(b){d.debug("Captcha Email response",b),a.captchaModelEmail.response=b},a.setBanResponse=function(b){d.debug("Captcha Ban response",b),a.captchaModelBan.response=b},a.cbExpiration=function(){a.captchaModelEmail.response="",a.captchaModelBan.response=""},a.onSubmitFrontierId=function(){d.debug("forgot id...","submit id"),a.inputType="id",a.loading=!0,a.ban="",a.pin="",f.forgotIdPost(1,a.captchaModelEmail.response,a.forgotId.frontierId,a.ban,a.pin).then(function(c){d.debug(m,"Forgot Id Email Success"+JSON.stringify(c)),a.loading=!1,o&&(o.extraEvents.push(o.c.formSubmit),o.extraEvents.push(o.c.formStep),o.extraVars={eVar68:o.c.formNameFortgotId+":complete"}),k.reload(a.captchaModelEmail.widgetId),b(function(){i.login.prefilledIds=[],i.login.prefilledId=c.response,a.$parent.goTo(g.LOGIN)},300)})["catch"](function(b){d.debug(m,"Forgot Id Email Error"+JSON.stringify(b)),k.reload(a.captchaModelEmail.widgetId),a.formReset(),b.response&&400===b.status&&b.response.error?"REQUIRES_CAPTCHA"===b.response.error?("mobile"===e.getPlatform()?l.showModal({body:[{i18n:"fid.register-captcha-error"}],buttons:{i18n:"fid.ok",id:"default-button"}},"modals/forgot.html",{scope:a,controller:"forgotErrorController"}):j.showDanger([{i18n:"fid.register-captcha-error"}],{id:"id-alert",alerts:a.alerts}),o&&o.formError(c("i18n")("fid.register-captcha-error"))):(j.showDanger([{i18n:"fid.forgot-id-no-fid-bad-info"}],{id:"id-alert",alerts:a.alerts}),o&&o.formError("bad information looking for frontierID")):("mobile"===e.getPlatform()?l.showModal(n,"modals/forgot.html",{scope:a,controller:"forgotErrorController"}):j.showDanger([{i18n:"fid.forgot-id-no-fid-found"},{i18n:"fid.forgot-id-try-again"},{i18n:"fid.forgot-id-create-fid",onClick:function(){a.$parent.goTo(g.REGISTER)}}],{id:"id-alert",alerts:a.alerts}),o&&o.formError("no matching frontier id found")),a.loading=!1})},a.onSubmitBanPin=function(){d.debug("forgot password...","submit account number and pin"),a.inputType="ban",a.loading=!0,a.id="",a.forgotId.ban=a.forgotId.ban.replace(/[^0-9]/g,""),f.forgotIdPost(2,a.captchaModelBan.response,a.id,a.forgotId.ban,a.forgotId.pin).then(function(c){d.debug(m,"Forgot Id Ban Success"+JSON.stringify(c)),i.login.prefilledId="",i.login.prefilledIds=c.response.ids,a.loading=!1,o&&(o.extraEvents.push(o.c.formSubmit),o.extraEvents.push(o.c.formStep),o.extraVars={eVar68:o.c.formNameFortgotId+":complete"}),k.reload(a.captchaModelBan.widgetId),b(function(){a.$parent.goTo(g.LOGIN)},300)})["catch"](function(b){d.debug(m,"Forgot Id Ban Error"+JSON.stringify(b)),k.reload(a.captchaModelBan.widgetId),a.formReset(),b.response&&400===b.status&&b.response.error?"REQUIRES_CAPTCHA"===b.response.error?("mobile"===e.getPlatform()?l.showModal({body:[{i18n:"fid.register-captcha-error"}],buttons:{i18n:"fid.ok",id:"default-button"}},"modals/forgot.html",{scope:a,controller:"forgotErrorController"}):j.showDanger([{i18n:"fid.register-captcha-error"}],{id:"id-alert",alerts:a.alerts}),o&&o.formError(c("i18n")("fid.register-captcha-error"))):(j.showDanger([{i18n:"fid.forgot-id-no-fid-bad-info"}],{id:"id-alert",alerts:a.alerts}),o&&o.formError("bad information looking for frontierID")):b.response&&403==b.status&&b.response.error?j.showDanger([{i18n:"fid.forgot-id-no-fid-locked-out"},{i18n:"fid.forgot-id-no-fid-locked-out-link",href:"https://frontier.com/contactus/contact-us#/residential"}],{id:"id-alert",alerts:a.alerts}):("mobile"===e.getPlatform()?l.showModal(n,"modals/forgot.html",{scope:a,controller:"forgotErrorController"}):j.showDanger([{i18n:"fid.forgot-id-no-fid-sign-in-with-email"},{i18n:"fid.forgot-id-create-fid",onClick:function(){a.$parent.goTo(g.REGISTER)}}],{id:"id-alert",alerts:a.alerts}),o&&o.formError("account has no frontier id")),a.loading=!1})},a.onCancel=function(){k.reload(a.captchaModelBan.widgetId),b(function(){a.eventTriggered({event:{type:h.GOTO_HOME}})},300)},a.sendIdButtonDisabled=function(b){var c;return c=a.captchaModelEmail.disabled===!0?b.$error.required!==!1||b.$error.email!==!1:b.$invalid||""===a.captchaModelEmail.response,c===!1&&(d.debug("Forgot ID: Setting FOCUS on SEND ID/EMAIL - CONTINUE button..."),a.forgotIdEmailDomFunctions.focus()),c},a.sendBanPinButtonDisabled=function(b){var c;return c=a.captchaModelBan.disabled===!0?b.$error.required!==!1||b.$error.pattern!==!1:b.$invalid||""===a.captchaModelBan.response,c===!1&&(d.debug("Forgot ID: Setting FOCUS on SEND BAN PIN - CONTINUE button..."),a.forgotIdSendBanPinDomFunctions.focus()),c},a.sendButtonDisabledMobile=function(b,c){var d;return d=a.captchaModelBan.disabled===!0?b.$error.required||b.$error.pattern:b.$invalid||"id"===c&&""===a.captchaModelEmail.response||"ban"===c&&""===a.captchaModelBan.response},a.onIdFocus=function(){a.forgotId.idFocus=!0,a.forgotId.banFocus=!1,a.forgotId.pinFocus=!1},a.onBanFocus=function(){a.forgotId.banFocus=!0,a.forgotId.idFocus=!1,a.forgotId.pinFocus=!1},a.onPinFocus=function(){a.forgotId.pinFocus=!0,a.forgotId.idFocus=!1,a.forgotId.banFocus=!1},a.showBanError=function(b){return b.ban.$dirty&&b.ban.$invalid&&a.forgotId.banFocus===!1},a.showPinError=function(b){return b.pin.$dirty&&b.pin.$invalid&&a.forgotId.pinFocus===!1},a.formReset=function(){a.captchaModelEmail.response="",a.captchaModelEmail.invalid=!1,a.captchaModelBan.response="",a.captchaModelBan.invalid=!1}}],link:function(a,b){b.on("$destroy",function(){a.$destroy()})}}}]),angular.module("fidService.directives").directive("fidForgotPassword",["$q","$filter","fidLog","fidConfig","fidRoute","fidRouteConstant","fidEventConstant","fidAlerts","vcRecaptchaService","fidStateService","fidModalManager",function(a,b,c,d,e,f,g,h,i,j,k){return{restrict:"ACE",templateUrl:d.getTemplateUrl("forgot/forgotpassword.html"),scope:!0,controller:["$scope","$location","fidJsonApi","TrackDataService",function(a,e,l,m){var n="Forgot Password page";a.loading=!1,a.authenticated=!1,a.tnacSent=!1,a.tnacSuccess=!1,a.newPasswordError=!1,a.disableResetPassword=!0,a.captchaModel={key:d.getEnvironment("recaptchaKey"),response:"",widgetId:null,invalid:!1,disabled:d.getEnvironment("captchaIgnored")},a.forgotPassword={frontierId:"",ban:"",pin:"",token:"",authenticationOptions:[],selectedAuthenticationOption:{},tnacOptions:[],password1:"",password2:"",foundId:!0,idFocus:!1,tnacFocus:!1,password1Focus:!1,password2Focus:!1,idInvalid:!1,tnacInvalid:!1,passwordInvalid:!1},a.alerts1={displayedAlerts:[]},a.alerts2={displayedAlerts:[]},a.alerts3={displayedAlerts:[]};var o={title:{i18n:"fid.forgot-id-not-found-title"},body:[{i18n:"fid.forgot-password-not-found"},{i18n:"fid.forgot-password-not-found-need-help",link:"forgotId"}],buttons:{i18n:"fid.ok",id:"default-button"}},p={body:[{i18n:"fid.forgot-password-no-verified-email-mobile-number"}],buttons:{i18n:"fid.ok",id:"default-button"}},q={body:[{i18n:"fid.forgot-password-account-locked"}],buttons:{i18n:"fid.ok",id:"default-button"}};a.resetPasswordDomFunctions={};var r="";"mobile"===d.getPlatform()&&d.getAppApiHandle().fixScroll&&(a.fixScroll=d.getAppApiHandle().fixScroll),d.getAppApiHandle()&&d.getAppApiHandle().getAnalyticsService&&(r=d.getAppApiHandle().getAnalyticsService()),r&&r.enterPageSpecial("forgotpassword",{eVar2:r.c.formNameFortgotPw,eVar68:"ftr:forgotpassword",events:r.c.formView+","+r.c.formStep}),a.onForgotId=function(){"mobile"===d.getPlatform()?a.$parent.goTo(f.FORGOT_ID):a.eventTriggered({event:{type:g.GOTO_FORGOT_ID,data:{}}})},a.setWidgetId=function(b){a.captchaModel.widgetId=b},a.setResponse=function(b){c.debug("Captcha response",b),a.captchaModel.response=b,a.captchaModel.invalid=!1},a.cbExpiration=function(){a.captchaModel.response="",a.captchaModel.invalid=!1},a.onSubmitFrontierId=function(){c.debug("forgot password...","submit id"),a.inputType="id",a.loading=!0,a.token="",a.id="",a.value="",a.password="",l.forgotPasswordPost(1,a.captchaModel.response,a.forgotPassword.frontierId,a.token,a.id,a.value,a.password).then(function(e){if(c.debug(n,"Forgot Password. Get TNAC data debug: "+JSON.stringify(e)),a.forgotPassword.token=e.response.token,e.response.authenticationOptions.length>0){a.forgotPassword.authenticationOptions=e.response.authenticationOptions,a.authenticated=!0,r&&r.enterPageSpecial("forgotpassword:tnac",{eVar68:"ftr:forgotpassword:tnac",events:r.c.formStep});var f={id:"select-one",type:"select-one",label:"",displayLabel:""};f.displayLabel=b("i18n")("fid.select-one"),a.forgotPassword.tnacOptions.push(f),a.forgotPassword.selectedAuthenticationOption=a.forgotPassword.tnacOptions[0];for(var g=0;g18},expand:!1,inlineError:!1,description:!0}],fromRegister:!0};a.identifier=o;var p="";"mobile"===e.getPlatform()&&e.getAppApiHandle().fixScroll&&(a.fixScroll=e.getAppApiHandle().fixScroll),e.getAppApiHandle()&&e.getAppApiHandle().getAnalyticsService&&(p=e.getAppApiHandle().getAnalyticsService()),null!==a.fidRouter.getCurrentRoute().getParams&&"undefined"!=typeof a.fidRouter.getCurrentRoute().getParams().fromRegister&&(a.identifier.fromRegister=a.fidRouter.getCurrentRoute().getParams().fromRegister,h.linkAccount.fromRegister=a.identifier.fromRegister),d.debug(n,"fromRegister: "+a.identifier.fromRegister),h.sharedState.linkAccount.fromRegister=a.identifier.fromRegister,p&&(a.identifier.fromRegister?p.enterPageSpecial("linkaccount",{eVar68:"ftr:register:linkaccount",events:p.c.formStep}):p.enterPageSpecial("linkaccount",{eVar2:p.c.formNameLinkAccount,eVar68:"ftr:linkaccount",events:p.c.formView+","+p.c.formStep})),a.identifier.headerSteps=a.identifier.fromRegister?[{i18n:"fid.steps-signup-label",stepClass:"done"},{i18n:"fid.steps-identify-label",active:!0,stepClass:"active"},{i18n:"fid.steps-authenticate-label",stepClass:""}]:[{i18n:"fid.steps-identify-label",active:!0,stepClass:"active"},{i18n:"fid.steps-authenticate-label",stepClass:""}],a.showMessage={displayedAlerts:[]},a.onIdentifier=function(b){d.debug("i: "+JSON.stringify(b)),a.identifier.currentIdentifier=b;for(var c in a.identifier.identifiers)a.identifier.identifiers[c].expand=b.type===a.identifier.identifiers[c].type?!a.identifier.identifiers[c].expand:!1},a.disableContinue=function(){d.debug(n,"disableContinue currentIdentifier: "+JSON.stringify(a.identifier.currentIdentifier));var b=!a.identifier.currentIdentifier||!a.identifier.currentIdentifier.type||a.identifier.currentIdentifier.invalid&&a.identifier.currentIdentifier.invalid()||a.identifier.currentIdentifier.inlineError;return b},a.onFocus=function(){d.debug(n,"onFocus currentIdentifier: "+JSON.stringify(a.identifier.currentIdentifier)),a.identifier.currentIdentifier.inlineError=!1},a.onBlur=function(){d.debug(n,"onBlur: "+JSON.stringify(a.identifier.currentIdentifier)),a.identifier.currentIdentifier.inlineError=a.identifier.currentIdentifier.value&&a.identifier.currentIdentifier.invalid&&a.identifier.currentIdentifier.invalid()},a.onCancel=function(){d.debug(n,"onCancel"),p&&p.trackInteraction("FID: cancel linking"),j.showModal(k.LINK_ACCOUNT_CANCEL).then(function(b){"yes"===b&&(p&&p.trackInteraction("FID: cancel linking confirm"),h.sharedState.linkAccount.canceled=!0,a.eventTriggered({event:{type:i.STATE_UPDATED,data:h.sharedState}}),a.eventTriggered({event:{type:i.LINK_ACCOUNT_CANCEL}}))})},a.isSelected=function(b){return a.identifier.currentIdentifier.type===b},a.onContinue=function(){if(d.debug(n,"onContinue currentIdentifier: "+JSON.stringify(a.identifier.currentIdentifier)),!a.disableContinue()){var b="",e="",i="";switch(a.identifier.currentIdentifier.type){case"username":b=a.identifier.currentIdentifier.value;break;case"phone":e=a.identifier.currentIdentifier.value.replace(/[^0-9]/g,"");break;case"accountno":i=a.identifier.currentIdentifier.value.replace(/[^0-9]/g,"")}a.loading=!0,p&&p.trackInteraction("FID: identify account click"),f.accountsDiscoverPost(1,b,e,i).then(function(b){if(d.debug(n,"accounts discover success: "+JSON.stringify(b)),h.linkAccount.discoveredAccount=b.response,b.response.authenticationOptions||d.debug("No auth options from the backend!"),p){var c={username:"Email Address or Username",phone:"Billing Telephone Number or Mobile Number",accountno:"Billing Account Number"};p.extraEvents.push(p.c.accountIdentified),p.addExtraVar(p.c.accountLinkStep,"Identify: "+c[a.identifier.currentIdentifier.type])}a.$parent.goTo(g.LINK_AUTH,a.fidRouter.getCurrentRoute().getParams()),a.loading=!1})["catch"](function(b){if(d.debug(n,"accounts discover failure: "+JSON.stringify(b)),b&&400===b.status&&b.response&&("NO_MATCHES"===b.response.error||"COMMERCIAL"==b.response.error)){var e="";if("NO_MATCHES"===b.response.error){switch(a.identifier.currentIdentifier.type){case"username":e="fid.link-account-username-server-error";break;case"phone":e="fid.link-account-phone-server-error";break;case"accountno":e="fid.link-account-accountno-server-error"}m.showDanger([{i18n:e}],{alerts:a.showMessage,id:"server-error"})}else e="fid.link-account-accountcommercial-error",m.showWarning([{i18n:e,href:"https://frontier.com/small-business/helpcenter/categories/account/manage-my-account/enterprise-portal/get-started/how-to-use-enterprise-portal"}],{alerts:a.showMessage,id:"server-error"});p&&p.formError(c("i18n")(e))}else b&&403===b.status&&b.response&&"LOCKED_OUT"===b.response.error?(p&&p.formError("locked out"),l.linkAccountLockedOut(a)):p&&p.formError(c("i18n")("fid.error-message"));a.loading=!1})}},a.onAccountTooltip=function(){a.onAccountTooltipTracking(),j.showModal({mm:j},"modals/accountnumbertooltip.html",{additionalWinClass:"fid-accountnumber-tooltip-modal"})},a.onAccountTooltipTracking=function(){p&&p.trackInteraction("FID: account number tooltip")}}],link:function(a,c,e){d.debug("attrs: "+e),c.on("$destroy",function(){a.$destroy()}),b(function(){c.find('a[data-toggle="tooltip"]').tooltip({html:!0})})}}}]),angular.module("fidService.directives").directive("fidLinkAuth",["$q","$timeout","fidLog","fidConfig","fidRoute","fidRouteConstant",function(a,b,c,d,e,f){return{restrict:"ACE",templateUrl:d.getTemplateUrl("linkaccount/linkauth.html"),scope:!0,controller:["$scope","$element","$filter","fidJsonApi","fidEventConstant","fidStateService","fidModalManager","fidModalConstant","fidAlerts","fidHandleResponse",function(a,b,e,g,h,i,j,k,l,m){var n="Link account authentication page";a.fidRouter=a.$parent.fidRouter;var o={headerSteps:[],saving:!1,currentIdentifier:{},selectedTnacOption:{},identifiers:[],tnacOptions:[],mayClaimAutoPay:!1,fromRegister:!0,inlineError:!1,sortKey:0};a.identifier=o;var p={},q={id:"select-one",type:"select-one",label:"",displayLabel:""},r="";"mobile"===d.getPlatform()&&d.getAppApiHandle().fixScroll&&(a.fixScroll=d.getAppApiHandle().fixScroll),d.getAppApiHandle()&&d.getAppApiHandle().getAnalyticsService&&(r=d.getAppApiHandle().getAnalyticsService()),q.displayLabel=e("i18n")("fid.select-one"),a.identifier.tnacOptions.push(q),a.identifier.selectedTnacOption=a.identifier.tnacOptions[0],c.debug("auth options: "+JSON.stringify(i.linkAccount.discoveredAccount.authenticationOptions));for(var s=0;s1&&(p={inlineError:!1,value:"",expand:!1},p.isText=!1,p.isDropdown=!0,p.type="tnac",p.sortKey=2,o.identifiers.push(p)),a.identifier=o,a.identifier.identifiers.sort(function(a,b){return a.sortKey-b.sortKey});for(var w=0;w0?(a.login.loginId=g.login.prefilledIds[0].email,a.prefilledIds=g.login.prefilledIds):""!==g.login.prefilledId&&(a.prefilledIds.push(g.login.prefilledId),a.login.loginId=g.login.prefilledId.email),null!==a.fidRouter.getCurrentRoute().getParams&&"undefined"!=typeof a.fidRouter.getCurrentRoute().getParams().hideRegisterLink&&(a.login.hideRegisterLink=a.fidRouter.getCurrentRoute().getParams().hideRegisterLink),a.onCancel=function(){a.$parent.eventTriggered({event:{type:h.GOTO_HOME,data:{}}})}}}}]),angular.module("fidService.directives").directive("fidLoginBanner",["fidConfig","fidLoginUITypeConstant",function(a,b){return{restrict:"ACE",templateUrl:a.getTemplateUrl("login/banner.html"),scope:!0,controller:"fidLoginController",link:function(a){a.loginUIType=b.BANNER}}}]),angular.module("fidService.controllers").controller("fidLoginController",["$scope","$timeout","fidCookie","fidJsonApi","fidLog","fidConfig","fidRoute","fidStateService","fidRouteConstant","fidEventConstant","fidLoginUITypeConstant","fidHealth","fidGoto",function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n="Login page",o=null;"mobile"===f.getPlatform()&&f.getAppApiHandle().fixScroll&&(a.fixScroll=f.getAppApiHandle().fixScroll),f.getAppApiHandle()&&f.getAppApiHandle().getAnalyticsService&&(o=f.getAppApiHandle().getAnalyticsService()),a.fidHealth=l,l.check(),a.login={loginId:"",password:"",rememberId:!1,keepMeLoggedIn:!1,loginFocus:!1,passwordFocus:!1,loginInvalid:!1,passwordInvalid:!1,loginError:!1,loginToken:null,hideRegisterLink:!1},a.elementFunctions={username:{},password:{}};var p=c.get("loginId");p&&(a.login.rememberId=!0,a.login.loginId=p);var q=!1;q&&(a.login.keepMeLoggedIn=!0,a.login.loginToken=q,b(function(){a.onLogin(!0)})),o&&b(function(){a.loginUIType!==k.BANNER&&a.loginUIType!==k.INLINE&&a.loginUIType!==k.INLINE_EN&&h.aasData.firstLoginPage&&(o.enterPageSpecial("login"),h.aasData.firstLoginPage=!1)},1),a.onLogin=function(b,f){if(f||b||a.login.loginId&&a.login.password){if(f&&(!a.login.loginId||!a.login.password))return void(a.login.loginInvalid=a.login.passwordInvalid=!0);a.elementFunctions.username.blur&&a.elementFunctions.username.blur(),a.elementFunctions.password.blur&&a.elementFunctions.password.blur(),e.debug("fid login..."),a.loading=!0,a.login.loginError=a.login.loginInvalid=a.login.passwordInvalid=!1,e.debug("loginId: "+a.login.loginId),e.debug("rememberId: "+a.login.rememberId),a.login.rememberId||c["delete"]("loginId"),a.login.keepMeLoggedIn?o&&o.keepMeSignedInChecked():c["delete"]("keepMeLoggedIn");var g=function(b){e.debug(n,"Logged in successfully: "+a.login.loginId),a.login.rememberId&&c.set("loginId",a.login.loginId,2592e3),a.login.keepMeLoggedIn&&b.response&&b.response.loginToken&&c.set("keepMeLoggedIn",b.response.loginToken,7776e3),"undefined"!=typeof h.login.prefilledIds&&h.login.prefilledIds.length>0?h.login.prefilledIds="":""!==h.login.prefilledId&&(h.login.prefilledId=""),m["goto"](a,null,j.POST_AUTH_SUCCESS)},k=function(d){e.debug(n,"Log in failure: "+JSON.stringify(d)),c["delete"]("keepMeLoggedIn"),a.login.loginToken=null,b||(d&&403===d.status?d.response&&"ACCOUNT_VALIDATION"===d.response.accountStatus?(e.debug(n,"Error - ACCOUNT_VALIDATION"),m["goto"](a,i.ACCOUNT_VALIDATION,j.GOTO_POST_AUTH)):d.response&&d.response.redirectTo?window.location.href=d.response.redirectTo:(o&&o.errorEvent("Invalid credentials"),a.login.loginInvalid=a.login.passwordInvalid=!0):(a.login.loginError=!0,o&&o.errorEvent("Invalid credentials"))),a.loading=!1};o&&(o.firstTimeAfterLogin=!0),b?d.loginTokenPost(a.login.loginToken).then(g)["catch"](k):d.loginPost(a.login.loginId,a.login.password,a.login.keepMeLoggedIn).then(g)["catch"](k)}},a.onForgotId=function(){m["goto"](a,i.FORGOT_ID,j.GOTO_FORGOT_ID)},a.onForgotPassword=function(){m["goto"](a,i.FORGOT_PASSWORD,j.GOTO_FORGOT_PASSWORD)},a.onCreate=function(){m["goto"](a,i.REGISTER,j.GOTO_REGISTER)},a.onHelp=function(){m["goto"](a,null,j.GOTO_HELP)},a.onContact=function(){m["goto"](a,null,j.GOTO_CONTACT_US)},a.onLoginFocus=function(){a.login.loginFocus=!0,a.login.passwordFocus=!1},a.onPasswordFocus=function(){a.login.passwordFocus=!0,a.login.loginFocus=!1},a.onUserPassChanged=function(){a.login.loginInvalid=!1,a.login.passwordInvalid=!1,a.login.loginError=!1}}]),angular.module("fidService.directives").directive("fidLoginInline",["fidConfig","fidLoginUITypeConstant",function(a,b){return{restrict:"ACE",templateUrl:a.getTemplateUrl("login/inline.html"),scope:!0,controller:"fidLoginController",link:function(a){a.loginUIType=b.INLINE}}}]),angular.module("fidService.directives").directive("fidLoginInlineEnglish",["fidConfig","fidLoginUITypeConstant",function(a,b){return{restrict:"ACE",templateUrl:a.getTemplateUrl("login/inline-english.html"),scope:!0,controller:"fidLoginController",link:function(a){a.loginUIType=b.INLINE_EN}}}]),angular.module("fidService.directives").directive("fidLoginModal",["fidConfig","fidLoginUITypeConstant",function(a,b){return{restrict:"ACE",templateUrl:a.getTemplateUrl("login/modal.html"),scope:!0,controller:"fidLoginController",link:function(a){a.loginUIType=b.INLINE}}}]),angular.module("fidService.directives").directive("fidLogout",["fidLog","fidConfig","fidEventConstant","fidCookie",function(a,b,c,d){return{restrict:"ACE",templateUrl:b.getTemplateUrl("login/logout.html"),scope:!0,controller:["$scope","fidJsonApi",function(b,e){b.loading=!0,d["delete"]("keepMeLoggedIn"),e.logoutPost().then(function(){a.debug("logout successful..."),b.loading=!1,b.eventTriggered({event:{type:c.LOGOUT_SUCCESS}})})["catch"](function(){b.loading=!1,b.eventTriggered({event:{type:c.LOGOUT_SUCCESS}})})}],link:function(b,c,d){a.debug("attrs: "+d),c.on("$destroy",function(){b.$destroy()})}}}]),angular.module("fidService.directives").directive("fidMain",["$compile","fidConfig","fidRoute","fidLog","fidRouteConstant","fidEventConstant",function(a,b,c,d,e,f){return{restrict:"AE",templateUrl:b.getTemplateUrl("main/main.html"),scope:{platform:"@",startPage:"@",startPageParams:"=",idSuffix:"@?",fidData:"=",fidState:"=",eventTriggered:"&",directiveApi:"="},controller:["$rootScope","$scope","$element",function(a,g,h){angular.isUndefined(g.idSuffix)&&(g.idSuffix=""),d.debug("fidMain","fid Service is loaded, Platform="+g.platform+", Start Page="+g.startPage+", Start Page Params="+g.startPageParams+", fid Data="+g.fidData+", fid State="+g.fidState),h.addClass("frontier-id"),b.setPlatform(g.platform),b.setStartPage(g.startPage),g.fidRouter=new c.FidRouter,g.fidRouter.reset(),g.fidRouter.goTo(b.getStartPage(),g.startPageParams,g.fidData,g.fidState),g.currentRoute=g.fidRouter.getCurrentRoute(),g.directiveApi&&"object"===_typeof(g.directiveApi)&&(g.directiveApi.triggerEvent=function(a){switch(d.debug("fidMain","Received event = "+a.name),a.name){case f.BACK_BUTTON_CLICKED:return g.fidRouter.goBack();default:return!1}}),g.isHome=function(){return g.currentRoute.path===e.HOME},g.goToHome=function(){g.fidRouter.goTo(e.HOME)},g.goTo=function(a,b,c,d){g.fidRouter.goTo(a,b,c,d)},g.goBack=function(){g.fidRouter.goBack()},g.$on("fid_sendAppEvent",function(a,b){g.eventTriggered(b)})}],link:function(b,c,e){d.debug("attrs: "+e),b.$watch(function(){return b.fidRouter.getCurrentRoute()},function(e,g){d.debug("oldValue: "+g),d.debug("newValue: "+e),angular.isDefined(e)&&(b.currentRoute=e,c.find(".fid-view").empty().append(a('
')(b)),b.eventTriggered({event:{type:f.ROUTE_CHANGED,data:{route:b.currentRoute,root:b.fidRouter.getRootRoute(),routeStackLength:b.fidRouter.getRouteStackLength()}}}))}),c.on("$destroy",function(){b.$destroy()})}}}]),angular.module("fidService.models").factory("FidRouteModel",function(){function a(a){this.params={},this.data={},this.state={},this.path="",this.title="",a&&this.setModelData(a)}return a.prototype={path:"",params:"",title:"",data:"",state:"",setModelData:function(a){angular.extend(this,a)},setData:function(a){this.data=a},getData:function(){return this.data},setState:function(a){this.state=a},getState:function(){return this.state},setParams:function(a){this.params=a},getParams:function(){return this.params}},a}),angular.module("fidService.models").factory("FidRestStatusModel",function(){function a(a){a&&this.setData(a)}return a.prototype={type:"",setData:function(a){angular.extend(this,a)},isSuccess:function(){return"success"===this.type?!0:!1}},a}),angular.module("fidService.directives").directive("fidEcpCreateId",["$q","$timeout","fidLog","fidConfig",function(a,b,c,d){return{restrict:"ACE",templateUrl:d.getTemplateUrl("myprofile/ecpcreateid.html"), scope:!0,controller:["$scope","$element","fidModalManager",function(a,b,d){var e="ECP - Create ID";a.onCreateId=function(){c.debug(e,"onCreateId"),d.showModal({},"modals/ecpcreateid.html").then(function(){})}}],link:function(a,b,d){c.debug("attrs: "+d),b.on("$destroy",function(){a.$destroy()})}}}]),angular.module("fidService.controllers").controller("fidEcpCreateIdController",["$scope","fidLog","fidJsonApi","fidAlerts","modalConfig",function(a,b,c,d,e){function f(e,f){"undefined"==typeof e&&(e=!1),"undefined"==typeof f&&(f=!1),a.loading=!0,c.profileCommercialPost(a.createId,e).then(function(b){208!==b.status?f===!1?(a.createId.uid=b.response.uid,a.createId.password=b.response.password,a.createId.stepTwo=!1,a.createId.stepThree=!0,a.modalAlerts.displayedAlerts=[]):a.$close({action:"linked",uid:a.createId.uid,email:a.createId.email}):a.$close({action:"id-exists-and-linked-to-this-account"})})["catch"](function(c){403===c.status?a.$close({action:"no-permissions"}):409===c.status?"NOT_ADMIN"===c.response.error?a.$close({action:"no-admin"}):"NOT_PREMIUM_ACCOUNT"===c.response.error?a.$close({action:"no-premium-account"}):"TOO_MANY_USERS"===c.response.error?a.$close({action:"too-many-users"}):"CONFLICT_HAS_EXISTING_COMMERCIAL"===c.response.error?a.$close({action:"id-exists-and-linked-to-another-account"}):"CONFLICT_WITHOUT_EXISTING_COMMERCIAL"===c.response.error?(a.createId.stepOne=!1,a.createId.stepTwo=!1,a.createId.stepFour=!0):b.debug("Unknown error: "+JSON.stringify(c)):(b.debug("Error in creating an ID: "+JSON.stringify(c)),d.showDanger([{i18n:"fid.error-message"}],{alerts:a.modalAlerts,id:"create-error"}))})["finally"](function(){a.loading=!1})}a.loading=!1,a.modalAlerts={displayedAlerts:[]};var g="ECP - Create ID controller";b.debug(g,"modalConfig: "+JSON.stringify(e));var h={stepOne:!0,stepTwo:!1,stepThree:!1,stepFour:!1,saving:!1,email:"",role:"analyst",permissions:{},firstName:"",lastName:"",phone:"",password:"",account:e.account,ganAndSmaAccounts:e.ganAndSmaAccounts,btnAccounts:e.btnAccounts,accessLevel:e.ganAndSmaAccounts.length>0?e.ganAndSmaAccounts[0]:e.btnAccounts.length>0?e.btnAccounts[0]:null,uid:null,error:!1};a.validationErrors={email:!1,mobileNumber:!1},"premium"===h.account.details.accountLevel?angular.forEach(a.userPermissions,function(a,b){h.permissions[b]=!1}):h.error="cannot-create",a.createId=h,a.onCancel=function(){a.$close({action:"cancel"})},a.onContinue=function(){a.createId.stepOne?(a.createId.stepOne=!1,a.createId.stepTwo=!0):a.createId.stepTwo?f(!1):a.createId.stepFour&&(a.createId.stepTwo=!1,a.createId.stepThree=!0,a.createId.password="randomly generated password")},a.onLink=function(){f(!0,!0)},a.onClose=function(){a.createId.stepFour===!0&&a.$close({action:"created",user:{firstName:a.createId.firstName,lastName:a.createId.lastName,email:a.createId.email,details:{role:a.createId.role.type,permissions:a.createId.permissions}}})},a.onFinish=function(){a.createId.stepThree&&(b.debug(g,"firstName: "+JSON.stringify(a.createId.firstName)),b.debug(g,"lastName: "+JSON.stringify(a.createId.lastName)),b.debug(g,"email: "+JSON.stringify(a.createId.email)),b.debug(g,"phone: "+JSON.stringify(a.createId.phone)),b.debug(g,"password: "+JSON.stringify(a.createId.password))),a.$close({action:"created",email:a.createId.email,uid:a.createId.uid,password:a.createId.password})},a.getKeys=function(a){return Object.keys(a)},a.validateEmail=function(b){"undefined"==typeof b&&(b=!0);var c=!1;return a.createId.email&&(c=!/^[a-z0-9\{\}\~\-!\$\+=\._]+@[a-z0-9][a-z0-9\-\.]+[a-z]{2,5}$/i.test(a.createId.email)),b===!0&&(a.validationErrors.email=c),!c},a.validateMobileNumber=function(b){"undefined"==typeof b&&(b=!0);var c=!1;if(a.createId.phone){var d=/[^0-9]/.test(a.createId.phone),e=/[0-9]{3}-[0-9]{3}-[0-9]{4}/.test(a.createId.phone);d?e||(c=!0):10!==a.createId.phone.length&&(c=!0)}return b===!0&&(a.validationErrors.mobileNumber=c),!c},a.continueStepOneDisabled=function(){return!a.createId.firstName||!a.createId.lastName||!a.createId.email||!a.validateEmail(!1)||a.createId.phone&&!a.validateMobileNumber(!1)},a.createFrontierIdDisabled=function(){var b=!0;return angular.forEach(a.createId.permissions,function(a){b===!0&&a===!0&&(b=!1)}),b}}]),angular.module("fidService.directives").directive("fidEcpMyProfile",["$q","$timeout","$filter","fidLog","fidConfig","fidJsonApi","fidModalManager","fidAlerts",function(a,b,c,d,e,f,g,h){return{restrict:"ACE",templateUrl:e.getTemplateUrl("myprofile/ecpmyprofile.html"),scope:!0,controller:["$scope","$element","fidModalManager","fidServicesJson",function(a,b,c,e){function g(){angular.forEach(a.getAllAccounts(),function(b){a.myProfile.account.ref===b.accountNumber&&(a.myProfile.account.organization=b)})}function i(b,c){switch(b.users=a.myProfile.account.users.filter(function(a){return a.service.details.accountType===b.type&&a.service.ref===b.accountNumber}),b.type){case"GAN":c.gan=b;break;case"SMA":c.sma.push(b);break;case"BTN":c.btn.push(b)}angular.forEach(b.children,function(a){i(a,c)})}function j(){a.myProfile.account.hierarchy.gan&&(a.myProfile.account.hierarchy.gan.users=a.getUsersByAccount("GAN",a.myProfile.account.hierarchy.gan.accountNumber)),angular.forEach(a.myProfile.account.hierarchy.sma,function(b){b.users=a.getUsersByAccount("SAN",b.accountNumber)}),angular.forEach(a.myProfile.account.hierarchy.btn,function(b){b.users=a.getUsersByAccount("BTN",b.accountNumber)})}a.loading=!1,a.myProfile={profile:null,account:null,accounts:[],phoneConsentChecked:null,accessLevel:null,ganAndSmaAccounts:null,btnAccounts:null},a.editId={newEmail:"",newEmailConfirm:""},a.external={account:null},a.sectionsOpened={manageId:!0,manageAccounts:!1,editId:!1,changePassword:!1,editPhone:!1,editAccessLevel:!1,editPermissions:!1},a.ecpMyProfileAlers={displayedAlerts:[]},a.userPermissions={MP:!1,EP:!1,DI:!1,MD:!1,HX:!1,H5:!1},a.validationErrors={newEmail:!1,newEmail2:!1,newPassword:!1,newPassword2:!1,newMobileNumber:!1};var k="ECP - My Profile";a.loading=!0,f.profileGet().then(function(b){a.myProfile.profile=b.response,a.myProfile.oldPassword=null,f.profileContactPhoneGet().then(function(b){a.myProfile.profile.contactPhone=b.response,a.external.contactPhone=a.myProfile.profile.contactPhone,a.myProfile.profile.emails.unverified.length&&(void 0===a.myProfile.profile.contactPhone.phoneNumber||""===a.myProfile.profile.contactPhone.phoneNumber?h.showWarning([{i18n:"fid.myprofile-password-recovery-missing-phone"}],{alerts:a.alerts,id:"password-recovery"}):a.myProfile.profile.contactPhone.isVerified.verified===!1&&h.showWarning([{i18n:"fid.myprofile-password-recovery"}],{alerts:a.alerts,id:"password-recovery"})),a.getCommercialAccount()})["catch"](function(a){d.debug(k,"get contact phone failure: "+JSON.stringify(a))})})["catch"](function(a){d.debug(k,"profile get failure: "+JSON.stringify(a))})["finally"](function(){a.loading=!1}),a.onSaveEmail=function(b){a.myProfile.profile.newEmail=b,f.profileUpdate("changeEmail",a.myProfile.profile).then(function(c){"undefined"==typeof c.response.error?(a.myProfile.profile.email=b,a.myProfile.profile.emails.unverified=[b],a.myProfile.profile.emails.verified=[],a.myProfile.account.hierarchy.gan&&angular.forEach(a.myProfile.account.hierarchy.gan.users,function(c){c.uid===a.myProfile.profile.uid&&(c.email=b)}),angular.forEach(a.myProfile.account.hierarchy.sma,function(c){angular.forEach(c.users,function(c){c.uid===a.myProfile.profile.uid&&(c.email=b)})}),void 0===a.myProfile.profile.contactPhone.phoneNumber||""===a.myProfile.profile.contactPhone.phoneNumber?h.showWarning([{i18n:"fid.myprofile-password-recovery-missing-phone"}],{alerts:a.alerts,id:"password-recovery"}):a.myProfile.profile.contactPhone.isVerified.verified===!1&&h.showWarning([{i18n:"fid.myprofile-password-recovery"}],{alerts:a.alerts,id:"password-recovery"}),a.onCancelEmail(),h.showSuccess([{i18n:"fid.myprofile-verifyemail-sent",i18nArgs:{email:b}}],{alerts:a.alerts,id:"change-email"})):h.showWarning([{i18n:"fid.myprofile-email-address-change-failed"}],{alerts:a.alerts,id:"change-email"})})["catch"](function(c){409===c.status&&c.response.errors&&c.response.errors.length&&"email"===c.response.errors[0].field&&"CONFLICT"===c.response.errors[0].status?h.showWarning([{i18n:"fid.myprofile-email-address-change-failed-email-conflict",i18nArgs:{email:b}}],{alerts:a.alerts,id:"change-email"}):h.showWarning([{i18n:"fid.myprofile-email-address-change-failed",i18nArgs:{email:b}}],{alerts:a.alerts,id:"change-email"}),d.debug(k,"save email failure: "+JSON.stringify(c))})},a.onCancelEmail=function(){a.sectionsOpened.editId=!1,a.editId={newEmail:"",newEmailConfirm:""}},a.onTogglePassword=function(){a.myProfile.profile.oldPassword="",a.myProfile.profile.newPassword="",a.myProfile.profile.newPasswordConfirm="",a.validationErrors.newPassword=!1,a.validationErrors.newPassword=!1,a.validationErrors.newPassword2=!1,a.sectionsOpened.changePassword=!a.sectionsOpened.changePassword},a.savePasswordDisabled=function(){return null!==a.myProfile.profile?!(a.myProfile.profile.oldPassword&&a.myProfile.profile.newPassword&&a.myProfile.profile.newPassword2&&a.validateNewPassword(!1)&&a.validateNewPassword2(!1)):!0},a.onSavePassword=function(){f.profileUpdate("changePassword",a.myProfile.profile).then(function(){a.onTogglePassword(),h.showSuccess([{i18n:"fid.myprofile-password-changed-successfully"}],{alerts:a.ecpMyProfileAlerts})})["catch"](function(b){d.debug(k,"save email failure: "+JSON.stringify(b)),h.showWarning([{i18n:"fid.myprofile-password-change-failed"}],{alerts:a.ecpMyProfileAlerts})})},a.onToggleMobileNumber=function(){a.myProfile.profile.newContactPhone="",a.validationErrors.newMobileNumber=!1,a.sectionsOpened.editPhone=!a.sectionsOpened.editPhone,a.myProfile.phoneConsentChecked=null};var l=function(){a.myProfile.profile.newContactPhone="",f.profileContactPhonePost(null,a.myProfile.profile.newContactPhone,null,null,null).then(function(){d.debug(k,"Delete Mobile Number requested!"),a.myProfile.profile.contactPhone.phoneNumber=a.myProfile.profile.newContactPhone,a.myProfile.profile.contactPhone.isVerified.verified=!1,a.myProfile.profile.contactPhone.isVerified.date=null,a.validationErrors.newMobileNumber=!1,a.myProfile.phoneConsentChecked=null,h.showSuccess([{i18n:"fid.myprofile-deletemobile-toast-message-deleted"}],{alerts:a.alerts,id:"change-mobile"}),a.myProfile.profile.emails.unverified.length&&h.showWarning([{i18n:"fid.myprofile-password-recovery-missing-phone"}],{alerts:a.alerts,id:"password-recovery"}),h.showSuccess([{i18n:"fid.myprofile-deletemobile-toast-message-deleted"}],{alerts:a.alerts,id:"change-mobile"})})["catch"](function(b){h.showWarning([{i18n:"fid.myprofile-editmobilenumber-fail"}],{alerts:a.alerts,id:"change-mobile"}),d.debug(k,"Delete Mobile Number FAILURE: "+JSON.stringify(b))})};a.onDeleteMobileNumber=function(){a.myProfile.profile.contactPhone.isVerified.verified===!1?l():a.myProfile.profile.contactPhone.isVerified.verified===!0&&c.showModal({title:{i18n:"fid.myprofile-modalconfig-deletemobile-title"},body:{i18n:"fid.myprofile-modalconfig-deletemobile-text"},buttons:[{i18n:"fid.myprofile-modalconfig-deletemobile-non-default-button",id:"non-default-button"},{i18n:"fid.myprofile-modalconfig-deletemobile-default-button",id:"default-button"}]},null,{backdrop:"static"}).then(function(a){"default-button"===a&&l()})},a.onSaveMobileNumber=function(){f.profileContactPhonePost(null,a.myProfile.profile.newContactPhone,null,null,null).then(function(){a.myProfile.profile.contactPhone.phoneNumber=a.myProfile.profile.newContactPhone,a.myProfile.profile.contactPhone.isVerified.verified=!1,a.myProfile.profile.contactPhone.isVerified.date=null,a.myProfile.profile.emails.unverified.length&&!a.myProfile.profile.contactPhone.isVerified.verified&&h.showWarning([{i18n:"fid.myprofile-password-recovery"}],{alerts:a.alerts,id:"password-recovery"}),a.onToggleMobileNumber(),h.showSuccess([{i18n:"fid.myprofile-editmobilenumber-success"}],{alerts:a.alerts,id:"change-mobile"})})["catch"](function(b){h.showWarning([{i18n:"fid.myprofile-editmobilenumber-fail"}],{alerts:a.alerts,id:"change-mobile"}),d.debug(k,"change mobile failure: "+JSON.stringify(b))})},a.unlinkAccountEnabled=function(b){return"undefined"==typeof a.myProfile.services?0:a.myProfile.services.filter(function(a){return a.type===b}).length>1},a.onUnlinkAccount=function(b){var g={title:{i18n:"fid.myprofile-account-unlink-title"},body:{i18n:"fid.myprofile-account-unlink-text"},buttons:[{i18n:"fid.cancel",id:"cancel"},{i18n:"fid.myprofile-account-unlink-button",id:"unlink"}]};c.showModal(g).then(function(c){if("unlink"===c){var g=e.getServiceId(b.ref,"COMMERCIAL");f.unlinkAccountDelete(g).then(function(){a.myProfile.account=null})["catch"](function(b){h.showWarning([{i18n:"fid.myprofile-unlink-error"}],{alerts:a.alerts,id:"unlink"}),d.debug(k,"unlink failure: "+JSON.stringify(b))})}})},a.onUserPermissions=function(b){"undefined"==typeof b&&(b=a.getUser(a.myProfile.profile.uid)),c.showModal({user:b,role:a.myProfile.account.options.role},"modals/ecpuserpermissions.html",{scope:a,controller:"fidEcpUserPermissionsController"}).then(function(b){"saved"===b.action?h.showSuccess([{i18n:"fid.myprofile-verifymobile-verified-message",i18nArgs:{phone:a.myProfile.profile.contactPhone.phoneNumber}}],{alerts:a.alerts,id:"change-mobile"}):"failed"===b.action})},a.getCommercialAccount=function(){a.loading=!0,a.myProfile.account=null,f.servicesWithDetailsGet().then(function(b){angular.forEach(b.response,function(b){"COMMERCIAL"===b.type&&null===a.myProfile.account&&(a.myProfile.account=b)}),a.myProfile.account?f.serviceUsersGet(a.myProfile.account.id).then(function(b){a.myProfile.account.users=b.response,f.serviceHierarchyGet(a.myProfile.account.id).then(function(b){d.debug(k,"service hierarchy success: "+JSON.stringify(b));var c={gan:null,sma:[],btn:[]};i(b.response,c),a.myProfile.account.hierarchy=c,g(),a.myProfile.ganAndSmaAccounts=a.getGanAndSmaAccounts(),a.myProfile.btnAccounts=a.getBtnAccounts(),a.loading=!1})["catch"](function(b){d.debug(k,"service hierarchy failure: "+JSON.stringify(b)),a.loading=!1})})["catch"](function(b){d.debug(k,"service users failure: "+JSON.stringify(b)),a.loading=!1}):a.loading=!1})["catch"](function(b){d.debug(k,"commercial account failure: "+JSON.stringify(b)),a.loading=!1})},a.getGanAndSmaAccounts=function(){var b=[];return null!==a.myProfile.account&&"undefined"!=typeof a.myProfile.account.hierarchy&&(a.myProfile.account.hierarchy.gan&&b.push(a.myProfile.account.hierarchy.gan),angular.forEach(a.myProfile.account.hierarchy.sma,function(a){b.push(a)})),b},a.getBtnAccounts=function(){var b=[];return null!==a.myProfile.account&&"undefined"!=typeof a.myProfile.account.hierarchy&&angular.forEach(a.myProfile.account.hierarchy.btn,function(a){b.push(a)}),b},a.getAccountTypeNumber=function(a){return a.type+": "+a.accountNumber},a.onToggleRole=function(){if("admin"===a.myProfile.account.options.role){var b={title:{i18n:"fid.myprofile-commercial-user-demote-title"},body:{i18n:"fid.myprofile-commercial-user-demote-description"},buttons:[{i18n:"fid.cancel",id:"cancel"},{i18n:"fid.myprofile-commercial-user-demote-button",id:"demote"}]};c.showModal(b).then(function(b){if("demote"===b){var c={service:{options:{role:"analyst"}}};f.serviceUserPost(a.myProfile.account.id,a.myProfile.profile.uid,c).then(function(){a.myProfile.account.options.role="analyst",h.showSuccess([{i18n:"fid.myprofile-commercial-user-demote-success"}],{alerts:a.ecpMyProfileAlerts})})}})}},a.onUnlinkUser=function(b){var e={title:{i18n:"fid.myprofile-user-unlink-title"},body:{i18n:"fid.myprofile-user-unlink-text"},buttons:[{i18n:"fid.cancel",id:"cancel"},{i18n:"fid.myprofile-user-unlink-button",id:"unlink"}]};c.showModal(e).then(function(c){"unlink"===c&&f.serviceUserDelete(a.myProfile.account.id,b.uid).then(function(){a.myProfile.account.hierarchy.gan&&(a.myProfile.account.hierarchy.gan.users=a.myProfile.account.hierarchy.gan.users.filter(function(a){return a.uid!==b.uid})),angular.forEach(a.myProfile.account.hierarchy.sma,function(a){a.users=a.users.filter(function(a){return a.uid!==b.uid})}),h.showSuccess([{i18n:"fid.myprofile-user-unlink-success",i18nArgs:{user:b.firstName+" "+b.lastName}}],{alerts:a.alerts,id:"unlink"})})["catch"](function(b){h.showDanger([{i18n:"fid.myprofile-unlink-error"}],{alerts:a.alerts,id:"unlink"}),d.debug(k,"unlink failure: "+JSON.stringify(b))})})},a.onRemoveService=function(a,b){var e={title:{i18n:"fid.myprofile-remove-service-title"},body:{i18n:"fid.myprofile-remove-service-text"},buttons:[{i18n:"fid.cancel",id:"cancel"},{i18n:"fid.myprofile-remove-button",id:"remove"}]};c.showModal(e).then(function(c){"remove"===c&&f.serviceUserDelete(b.id,a.uid).then(function(){b.users=b.users.filter(function(b){return b.uid!==a.uid})})["catch"](function(a){d.debug(k,"service user delete failure: "+JSON.stringify(a))})})},a.onCreateId=function(){c.showModal({account:a.myProfile.account,ganAndSmaAccounts:a.myProfile.ganAndSmaAccounts,btnAccounts:a.myProfile.btnAccounts},"modals/ecpcreateid.html",{scope:a,controller:"fidEcpCreateIdController"}).then(function(b){d.debug("modalResult = "+JSON.stringify(b)),null!==b&&("created"===b.action?f.serviceUsersGet(a.myProfile.account.id).then(function(c){a.myProfile.account.users=c.response,j(),h.showSuccess([{i18n:"fid.myprofile-commercial-createid-success-notification",i18nArgs:{frontierId:b.email,password:b.password}}],{alerts:a.ecpMyProfileAlerts,id:"create-id"})}):"linked"===b.action?f.serviceUsersGet(a.myProfile.account.id).then(function(c){a.myProfile.account.users=c.response,j(),h.showSuccess([{i18n:"fid.myprofile-commercial-createid-linked-notification",i18nArgs:{frontierId:b.email}}],{alerts:a.ecpMyProfileAlerts,id:"create-id"})}):"no-admin"===b.action?h.showDanger([{i18n:"fid.myprofile-commercial-createid-no-admin-notification"}],{alerts:a.ecpMyProfileAlerts,id:"create-id"}):"no-premium-account"===b.action?h.showDanger([{i18n:"fid.myprofile-commercial-createid-no-premium-account-notification"}],{alerts:a.ecpMyProfileAlerts,id:"create-id"}):"too-many-users"===b.action?h.showDanger([{i18n:"fid.myprofile-commercial-createid-too-many-users-notification"}],{alerts:a.ecpMyProfileAlerts,id:"create-id"}):"no-admin"===b.action?h.showDanger([{i18n:"fid.myprofile-commercial-createid-no-admin-notification"}],{alerts:a.ecpMyProfileAlerts,id:"create-id"}):"id-exists-and-linked-to-this-account"===b.action?h.showWarning([{i18n:"fid.myprofile-commercial-createid-id-exists-and-linked-to-this-account-notification"}],{alerts:a.ecpMyProfileAlerts,id:"create-id"}):"id-exists-and-linked-to-another-account"===b.action&&h.showDanger([{i18n:"fid.myprofile-commercial-createid-id-exists-and-linked-to-another-account-notification"}],{alerts:a.ecpMyProfileAlerts,id:"create-id"}))})},a.getUsersByAccount=function(b,c){var d=a.myProfile.account.users.filter(function(a){return a.service.details.accountType===b&&null===c||a.service.details.accountType===b&&a.service.ref===c});return d},a.getUser=function(b){var c=null;return angular.forEach(a.myProfile.account.users,function(a){a.uid===b&&(c=a)}),c},a.getAllAccounts=function(){var b=[];return null!==a.myProfile.account&&"undefined"!=typeof a.myProfile.account.hierarchy&&(a.myProfile.account.hierarchy.gan&&b.push(a.myProfile.account.hierarchy.gan),angular.forEach(a.myProfile.account.hierarchy.sma,function(a){b.push(a)}),angular.forEach(a.myProfile.account.hierarchy.btn,function(a){b.push(a)})),b},a.onChangeAccount=function(){var b={service:{details:{accountType:a.myProfile.account.organization.type},id:"COMMERCIAL_"+a.myProfile.account.organization.accountNumber,ref:a.myProfile.account.organization.accountNumber}};f.serviceUserPost(a.myProfile.account.id,a.myProfile.profile.uid,b)},a.validateFrontierIdInputs=function(){d.debug(a.editId),a.validationErrors.newEmail=a.editId.newEmail?!/^[a-z0-9\{\}\~\-!\$\+=\._]+@[a-z0-9][a-z0-9\-\.]+[a-z]{2,5}$/i.test(a.editId.newEmail):!1,a.validationErrors.newEmail2=a.editId.newEmailConfirm?!/^[a-z0-9\{\}\~\-!\$\+=\._]+@[a-z0-9][a-z0-9\-\.]+[a-z]{2,5}$/i.test(a.editId.newEmail2):!1,d.debug(a.validationErrors)},a.validateNewId=function(b){"undefined"==typeof b&&(b=!0);var c=!1;return a.editId.newEmail&&(c=!/^[a-z0-9\{\}\~\-!\$\+=\._]+@[a-z0-9][a-z0-9\-\.]+[a-z]{2,5}$/i.test(a.editId.newEmail)),b===!0&&(a.validationErrors.newEmail=c),!c},a.validateNewId2=function(b){"undefined"==typeof b&&(b=!0);var c=!1;return a.editId.newEmailConfirm&&a.editId.newEmail&&a.editId.newEmail!==a.editId.newEmailConfirm&&(c=!0),b===!0&&(a.validationErrors.newEmail2=c),!c},a.onToggleEditId=function(){d.debug("ontoggleeditid"),a.editId.newEmail="",a.editId.newEmailConfirm="",a.validationErrors.newEmail=!1,a.validationErrors.newEmail2=!1,a.sectionsOpened.editId=!a.sectionsOpened.editId},a.saveEmailDisabled=function(){return!(a.editId.newEmail&&a.editId.newEmailConfirm&&a.validateNewId(!1)&&a.validateNewId2(!1))},a.validateMobileNumber=function(b){"undefined"==typeof b&&(b=!0),d.debug("new number: "+a.myProfile.profile.newContactPhone);var c=!1,e=/[^0-9]/.test(a.myProfile.profile.newContactPhone),f=/[0-9]{3}-[0-9]{3}-[0-9]{4}/.test(a.myProfile.profile.newContactPhone);return d.debug(e),d.debug(f),e?f||(c=!0):10!==a.myProfile.profile.newContactPhone.length&&(c=!0),b===!0&&(d.debug("setting to "+c),a.validationErrors.newMobileNumber=c),!c},a.saveMobileNumberDisabled=function(){return null!==a.myProfile.profile?!(a.myProfile.profile.newContactPhone&&a.validateMobileNumber(!1)&&a.myProfile.phoneConsentChecked):!0},a.validateNewPassword=function(b){"undefined"==typeof b&&(b=!0);var c=!1;if(a.myProfile.profile.newPassword){var e=/[A-Z]/.test(a.myProfile.profile.newPassword),f=/[a-z]/.test(a.myProfile.profile.newPassword),g=/\d/.test(a.myProfile.profile.newPassword),h=/\W/.test(a.myProfile.profile.newPassword),i=e+f+g+h;d.debug("dsadas: "+a.myProfile.profile.newPassword.length),d.debug("adsdas: "+i),(a.myProfile.profile.newPassword.length<8||3>i)&&(c=!0)}return b===!0&&(a.validationErrors.newPassword=c),!c},a.validateNewPassword2=function(b){"undefined"==typeof b&&(b=!0);var c=!1;return a.myProfile.profile.newPassword2&&a.myProfile.profile.newPassword&&a.myProfile.profile.newPassword!==a.myProfile.profile.newPassword2&&(c=!0),b===!0&&(a.validationErrors.newPassword2=c),!c},a.onVerifyMobileNumber=function(){c.showModal({phoneNumber:a.myProfile.profile.contactPhone.phoneNumber},"modals/mpverifymobile.html",{scope:a,controller:"fidMpVerifyMobileController"}).then(function(b){"verified"===b.action?(a.myProfile.profile.contactPhone.isVerified.verified=!0,h.showSuccess([{i18n:"fid.myprofile-verifymobile-verified-message",i18nArgs:{phone:a.myProfile.profile.contactPhone.phoneNumber}}],{alerts:a.alerts,id:"change-mobile"})):"failed"===b.action})},e.getServices().then()}],link:function(a,b,c){d.debug("attrs: "+c),b.on("$destroy",function(){a.$destroy()})}}}]).filter("mpAccountSelectorLabel",function(){return function(a){return a&&a.accountNumber+" "+a.firstName}}).filter("mpUsersByAccountType",function(){return function(a){return"GAN"===a.service.details.accountType?a:!1}}).directive("complexPassword",function(){return{require:"ngModel",link:function(a,b,c,d){d.$parsers.unshift(function(a){var b=/[A-Z]/.test(a),c=/[a-z]/.test(a),e=/\d/.test(a),f=/\W/.test(a),g=b+c+e+f;return a.length>=8&&g>=3?(d.$setValidity("complexity",!0),a):void d.$setValidity("complexity",!1)})}}}).directive("confirms",function(){return{require:["ngModel","^form"],link:function(a,b,c,d){var e=d[0],f=d[1];e.$parsers.unshift(function(a){var b=f[c.confirms],d=a===b.$modelValue;return e.$setValidity("confirms",d),b.$setValidity("confirms",d),a})}}}),angular.module("fidService.controllers").controller("fidEcpUserPermissionsController",["$scope","fidLog","fidJsonApi","fidAlerts","modalConfig",function(a,b,c,d,e){a.alerts={displayedAlerts:[]},a.model={user:null,role:null},a.model.user=e.user,a.model.role=e.role,a.onCancel=function(){a.$close({action:"cancel"})},a.onSave=function(){var b={options:{permissions:a.model.user.service.options.permissions}};c.serviceUserPost(a.model.user.service.id,a.model.user.uid,b).then(function(){a.$close({action:"saved"})})},a.getKeys=function(a){return Object.keys(a)}}]),angular.module("fidService.directives").directive("fidMpCreateId",["$q","$timeout","fidLog","fidConfig",function(a,b,c,d){return{restrict:"ACE",templateUrl:d.getTemplateUrl("myprofile/mpcreateid.html"),scope:!0,controller:["$scope","$element","$filter","fidModalManager","fidServicesJson","fidModalConstant","fidEventConstant",function(a,b,d,e,f,g,h){var i="My profile create ID";a.fidRouter=a.$parent.fidRouter,a.member={fidData:{},billpay:!1},null!==a.fidRouter.getCurrentRoute().getParams&&"undefined"!=typeof a.fidRouter.getCurrentRoute().getParams().billpay&&(a.member.billpay=a.fidRouter.getCurrentRoute().getParams().billpay),c.debug(i,"billpay: "+a.member.billpay),a.member.fidData=a.fidRouter.getCurrentRoute().getData(),c.debug(i,"fidData: "+JSON.stringify(a.member.fidData)),a.loading=!0,f.getServices().then(function(b){c.debug(i,"servicesGet result: "+JSON.stringify(b)),a.loading=!1})["catch"](function(b){c.debug(i,"servicesGet error: "+JSON.stringify(b)),a.loading=!1}),a.onCreateId=function(){c.debug(i,"onCreateId"),e.showModal({accountNumber:a.member.fidData.account.ref,billpay:a.member.billpay,billpayUsers:a.member.fidData.account.billpay.users},"modals/mpcreateid.html",{scope:a,controller:"fidMpCreateIdController"}).then(function(b){if(c.debug("modal was closed: "+JSON.stringify(b)),"emailed"===b.action){var f=g.ADD_MEMBER_SHARE_DETAILS;f.body.i18n=d("i18n")("fid.myprofile-share-code-text",{email:b.email,code:b.code}),e.showModal(f).then(function(){a.eventTriggered({event:{type:h.CREATEID_USER_INVITED,data:{email:b.email,code:b.code}}})})}else"parent-exists"===b.action?a.eventTriggered({event:{type:h.CREATEID_PARENT_EXISTS,data:{email:b.email}}}):"promoted"===b.action?a.eventTriggered({event:{type:h.CREATEID_USER_PROMOTED,data:{email:b.email}}}):"attached"===b.action&&a.eventTriggered({event:{type:h.CREATEID_USER_ATTACHED,data:{email:b.email}}})})}}],link:function(a,b,d){c.debug("attrs: "+d),b.on("$destroy",function(){a.$destroy()})}}}]),angular.module("fidService.controllers").controller("fidMpCreateIdController",["$scope","$rootScope","$filter","fidLog","fidStateService","fidServicesJson","fidJsonApi","modalConfig",function(a,b,c,d,e,f,g,h){var i="My profile create ID controller";if(a.createId={saving:!1,email:"",billpay:!1,videoChosen:!0,videoOnly:!1},a.services={roles:[],uverseOptions:[],fiosVz3Options:[],parentalOptions:!1},a.serviceUser={uverseMaxRating:"",fiosVz3MaxRating:""},a.copy={},a.modalConfig=h,d.debug(i,"modalConfig: "+JSON.stringify(a.modalConfig)),!a.modalConfig.billpay){a.modalConfig.videoService&&(d.debug(i,"serviceUser: "+JSON.stringify(a.modalConfig.videoService)),a.serviceUser=JSON.parse(JSON.stringify(a.modalConfig.videoService)),a.createId.videoOnly=!0);var j=f.parseVideoAndVoipServices(e.services.result,a.modalConfig.accountNumber);d.debug(i,"services: "+JSON.stringify(j)),a.services=JSON.parse(JSON.stringify(j)),a.services.roles.sort(function(a,b){return a.sortKey-b.sortKey}),a.services.uverseOptions.length&&!a.serviceUser.uverseMaxRating&&(a.serviceUser.uverseMaxRating="NR"),a.services.fiosVz3Options.length&&!a.serviceUser.fiosVz3MaxRating&&(a.serviceUser.fiosVz3MaxRating="all_ages")}a.copy.uverseMaxRating=a.serviceUser.uverseMaxRating,a.copy.fiosVz3MaxRating=a.serviceUser.fiosVz3MaxRating,a.getLabelString=function(a){return c("i18n")("fid.myprofile-createid-parental-"+a)},a.onChange=function(b){d.debug(i,"onChange: "+JSON.stringify(b)),!b.isAllowed||"uverse"!==b.type&&"fiosvz3"!==b.type?b.isAllowed||"uverse"!==b.type&&"fiosvz3"!==b.type||(a.createId.videoChosen=!1):a.createId.videoChosen=!0},a.onCancel=function(){a.$close({action:"cancel"})},a.noRolesChosen=function(){for(var b=!0,c=0;c0)return e.myProfile.profile.emails.unverified[0];if(e.myProfile.profile.emails.verified.length>0)return e.myProfile.profile.emails.verified[0]}return e.myProfile.email},e.onCancelEmail=function(){e.sectionsOpened.editId=!1,e.editId={newEmail:"",newEmailConfirm:""},e.frmId.$setPristine()},e.onResendVerificationEmail=function(){j.profileUpdate("resendVerificationEmail",e.myProfile.profile).then(function(){l.showSuccess([{i18n:"fid.myprofile-verifyemail-sent",i18nArgs:{email:e.myProfile.profile.emails.unverified[0]}}],{alerts:e.alerts,id:"change-email"})})["catch"](function(a){l.showWarning([{i18n:"fid.myprofile-email-resend-failed",i18nArgs:{email:e.myProfile.profile.emails.unverified[0]}}],{alerts:e.alerts,id:"change-email"}),h.debug(u,"resend email failure: "+JSON.stringify(a))})},e.onSavePassword=function(){j.profileUpdate("changePassword",e.myProfile.profile).then(function(a){"undefined"==typeof a.response.error?(s.trackData({events:"event14",eVar14:"my profile:change password: success"}),e.onCancelPassword(),l.showSuccess([{i18n:"fid.myprofile-password-changed-successfully"}],{alerts:e.alerts,id:"change-password"})):(s.trackData({events:"event14",eVar14:"my profile:change password: failure"}),l.showWarning([{i18n:"fid.myprofile-password-change-failed"}],{alerts:e.alerts,id:"change-password"}),h.debug(u,"save password failure: "+JSON.stringify(a)))})["catch"](function(a){s.trackData({events:"event14",eVar14:"my profile:change password: failure"}),a&&a.response&&a.response.frontierError&&409==a.response.status?l.showWarning([{i18n:"fid.myprofile-password-change-invalid"}],{alerts:e.alerts,id:"change-password"}):l.showWarning([{i18n:"fid.myprofile-password-change-failed"}],{alerts:e.alerts,id:"change-password"}),h.debug(u,"save password failure: "+JSON.stringify(a))})},e.onCancelPassword=function(){h.debug("oncancel"),e.sectionsOpened.changePassword=!1,e.myProfile.profile.oldPassword="",e.myProfile.profile.newPassword="",e.myProfile.profile.newPassword2="",e.passwordForm.$setPristine()},e.onSaveMobileNumber=function(){j.profileContactPhonePost(null,e.myProfile.profile.newContactPhone,null,null,null).then(function(){e.myProfile.profile.contactPhone.phoneNumber=e.myProfile.profile.newContactPhone,e.myProfile.profile.contactPhone.isVerified.verified=!1,e.myProfile.profile.contactPhone.isVerified.date=null,e.myProfile.profile.emails.unverified.length&&!e.myProfile.profile.contactPhone.isVerified.verified&&l.showWarning([{i18n:"fid.myprofile-password-recovery"}],{alerts:e.alerts,id:"password-recovery"}),e.onCancelMobileNumber(),s.trackData({events:"event14",eVar14:"my profile: add mobile: success"}),l.showSuccess([{i18n:"fid.myprofile-editmobilenumber-success"}],{alerts:e.alerts,id:"change-mobile"})})["catch"](function(a){s.trackData({events:"event14",eVar14:"my profile: add mobile: failure"}),l.showWarning([{i18n:"fid.myprofile-editmobilenumber-fail"}],{alerts:e.alerts,id:"change-mobile"}),h.debug(u,"change mobile failure: "+JSON.stringify(a))})},e.onCancelMobileNumber=function(){e.sectionsOpened.editPhone=!e.sectionsOpened.editPhone,e.myProfile.profile.newContactPhone="",e.validationErrors.newMobileNumber=!1,e.myProfile.phoneConsentChecked=null,e.phoneForm.$setPristine()};var v=function(){e.myProfile.profile.newContactPhone="",j.profileContactPhonePost(null,e.myProfile.profile.newContactPhone,null,null,null).then(function(){h.debug(u,"Delete Mobile Number requested!"),e.myProfile.profile.contactPhone.phoneNumber=e.myProfile.profile.newContactPhone,e.myProfile.profile.contactPhone.isVerified.verified=!1,e.myProfile.profile.contactPhone.isVerified.date=null,e.validationErrors.newMobileNumber=!1,e.myProfile.phoneConsentChecked=null,e.myProfile.profile.emails.unverified.length&&l.showWarning([{i18n:"fid.myprofile-password-recovery-missing-phone"}],{alerts:e.alerts,id:"password-recovery"}),l.showSuccess([{i18n:"fid.myprofile-deletemobile-toast-message-deleted"}],{alerts:e.alerts,id:"change-mobile"})})["catch"](function(a){l.showWarning([{i18n:"fid.myprofile-editmobilenumber-fail"}],{alerts:e.alerts,id:"change-mobile"}),h.debug(u,"Delete Mobile Number FAILURE: "+JSON.stringify(a))})};e.onDeleteMobileNumber=function(){e.myProfile.profile.contactPhone.isVerified.verified===!1?v():e.myProfile.profile.contactPhone.isVerified.verified===!0&&o.showModal({title:{i18n:"fid.myprofile-modalconfig-deletemobile-title"},body:{i18n:"fid.myprofile-modalconfig-deletemobile-text"},buttons:[{i18n:"fid.myprofile-modalconfig-deletemobile-non-default-button",id:"non-default-button"},{i18n:"fid.myprofile-modalconfig-deletemobile-default-button",id:"default-button"}]},null,{backdrop:"static"}).then(function(a){"default-button"===a&&v()})},e.onVerifyMobileNumber=function(){o.showModal({phoneNumber:e.myProfile.profile.contactPhone.phoneNumber},"modals/mpverifymobile.html",{scope:e,controller:"fidMpVerifyMobileController"}).then(function(a){"verified"===a.action?(e.myProfile.profile.contactPhone.isVerified.verified=!0,l.showSuccess([{i18n:"fid.myprofile-verifymobile-verified-message",i18nArgs:{phone:e.myProfile.profile.contactPhone.phoneNumber}}],{alerts:e.alerts,id:"change-mobile"})):"failed"===a.action})},e.onEditBillingAddress=function(){o.showModal({account:e.myProfile.account},"modals/mpeditbillingaddress.html",{scope:e,controller:"fidMpEditBillingAddressController"}).then(function(a){a&&"finish"===a.action&&(e.myProfile.account.billpay.details.billingAddress=a.newBillingAddress,l.showSuccess([{i18n:"fid.myprofile-edit-address-success"}],{alerts:e.alerts,id:"change-address"}))})},e.unlinkAccountEnabled=function(a){return e.myProfile.services.filter(function(b){return b.type===a}).length>1},e.onUnlinkAccount=function(a){var b={title:{i18n:"fid.myprofile-account-unlink-title"},body:{i18n:"fid.myprofile-account-unlink-text"},buttons:[{i18n:"fid.cancel",id:"cancel"},{i18n:"fid.myprofile-account-unlink-button",id:"unlink"}]};o.showModal(b).then(function(b){if("unlink"===b){h.debug("Unlinking an account: "+a.ref);var c=e.getSubaccount(a);h.debug("Unlinking an account, service id: "+c.id),j.unlinkAccountDelete(c.id).then(function(){if(e.myProfile.services=e.myProfile.services.filter(function(b){return b.ref!==a.ref}),e.myProfile.accounts=e.myProfile.accounts.filter(function(b){return b.ref!==a.ref}),e.myProfile.account.ref===a.ref){var b=e.getResidentialAccounts();e.myProfile.account=b[0]}e.eventTriggered({event:{type:q.UNLINK_ACCOUNT_SUCCESS}}),l.showSuccess([{i18n:"fid.myprofile-unlink-success"}],{alerts:e.alerts,id:"unlink"})})["catch"](function(a){l.showWarning([{i18n:"fid.myprofile-unlink-error"}],{alerts:e.alerts,id:"unlink"}),h.debug(u,"unlink failure: "+JSON.stringify(a))})}})},e.getServices=function(){j.servicesWithDetailsGet().then(function(a){e.myProfile.services=a.response;var b=[];angular.forEach(e.myProfile.services,function(a){switch("undefined"==typeof b[a.ref]&&(b[a.ref]={ref:a.ref,billpay:!1,video:!1,voip:!1,commercial:!1}),a.users=null,a.type){case"BILLING":b[a.ref].billpay=a;break;case"VIDEO":b[a.ref].video=a;break;case"VOIP":b[a.ref].voip=a;break;case"COMMERCIAL":b[a.ref].commercial=a}}),e.myProfile.accounts=[],angular.forEach(Object.keys(b),function(a){e.myProfile.accounts.push(b[a])}),e.getUsersForFirstService()})["catch"](function(a){h.debug(u,"services failure: "+JSON.stringify(a))})},e.routedScroll=function(){o.getProfileRouted&&o.getProfileRouted()===!0&&b(function(){d.hash("accounts"),f(d.hash()),o.setProfileRouted(!1)},2e3)},e.getResidentialAccounts=function(a){return a="undefined"==typeof a?!1:a,e.routedScroll(),e.myProfile.accounts.filter(function(b){return a===!1?b.commercial===!1:b.billpay!==!1})},e.getSubaccount=function(a){return a.billpay!==!1?a.billpay:a.video!==!1?a.video:a.voip!==!1?a.voip:void 0},e.getAccountsForDropdown=function(){var a=e.getResidentialAccounts(),b=[];return angular.forEach(a,function(a){b.push(e.getSubaccount(a))}),b},e.getUsersForFirstService=function(){if(e.myProfile.accounts.length>0){for(var a=null,b=0;bi)&&(b=!0)}return a===!0&&(e.validationErrors.newPassword=b),!b},e.validateNewPassword2=function(a){"undefined"==typeof a&&(a=!0);var b=!1;return e.myProfile.profile.newPassword2&&e.myProfile.profile.newPassword&&e.myProfile.profile.newPassword!==e.myProfile.profile.newPassword2&&(b=!0),a===!0&&(e.validationErrors.newPassword2=b),!b},e.savePasswordDisabled=function(){return null!==e.myProfile.profile?!(e.myProfile.profile.oldPassword&&e.myProfile.profile.newPassword&&e.myProfile.profile.newPassword2&&e.validateNewPassword(!1)&&e.validateNewPassword2(!1)):!0},e.onUvLink=function(a){h.debug("onUvLink account: "+JSON.stringify(a));var b={usi:"",transId:""};if(a.video.details&&a.video.details.usi){b.usi=a.video.details.usi,b.transId=Math.floor(1e11*Math.random())+(new Date).getTime(),h.debug("onUvLink relayState: "+JSON.stringify(b));var c=r.urlencode(JSON.stringify(b));h.debug("onUvLink base64 relayState: "+c);var d=i.getEnvironment("uvUrl");h.debug("onUvLink uvUrl: "+d);var f=m.trustAsResourceUrl(d+c);o.showModal({iFrameSrc:f},"modals/uviframe.html",{scope:e,controller:"fidUvController",backdrop:"static",additionalWinClass:"uvmodal"}).then(function(a){h.debug("modal was closed: "+JSON.stringify(a)),"uvloginsuccess"===a.action&&(e.myProfile.account.video.details.uvLinked=!0)})}else h.error("onUvLink error - account.video.details is missing USI. account: "+JSON.stringify(a))},e.onFIDEvent=function(a){if(h.debug("TestController - event: "+JSON.stringify(a)),a.type===q.CREATEID_USER_INVITED)l.showSuccess([{i18n:"fid.myprofile-createid-user-invited",i18nArgs:{email:a.data.email,code:a.data.code}}],{alerts:e.alerts,id:"user-invited"});else if(a.type===q.CREATEID_PARENT_EXISTS)l.showWarning([{i18n:"fid.myprofile-createid-parent-exists",i18nArgs:{email:a.data.email}}],{alerts:e.alerts,id:"parent-exists"});else if(a.type===q.CREATEID_USER_PROMOTED||a.type===q.CREATEID_USER_ATTACHED){h.debug("current account="+JSON.stringify(e.myProfile.account));var b=null;angular.forEach(["video","voip"],function(c){h.debug(c+" account="+JSON.stringify(e.myProfile.account[c])),"undefined"!=typeof e.myProfile.account[c]&&angular.forEach(e.myProfile.account[c].users,function(d,f){d.email===a.data.email&&(b=d,e.myProfile.account[c].users.splice(f,1))})}),b&&e.myProfile.account.billpay.users.push(b),a.type===q.CREATEID_USER_PROMOTED?l.showSuccess([{i18n:"fid.myprofile-createid-user-promoted",i18nArgs:{email:a.data.email}}],{alerts:e.alerts,id:"user-promoted"}):a.type===q.CREATEID_USER_ATTACHED&&l.showSuccess([{i18n:"fid.myprofile-createid-user-attached",i18nArgs:{email:a.data.email}}],{alerts:e.alerts,id:"user-attached"})}else e.eventTriggered({event:a})},e.getIspEmails=function(a){e.isValidBillingAccount(e.account)&&j.getIspEmails(a).then(function(a){e.ispEmails.showMasterCreate=!1,e.ispEmails.showManage=!1;var b=a.response;e.ispEmails.emails=b,e.ispEmails.existingEmails=[],e.ispEmails.emailDomain="@frontier.com",b&&b.length>0&&angular.forEach(b,function(a){console.log("evaluating email",a),a.internal&&!a.parent&&(e.ispEmails.showMasterCreate=!0,e.ispEmails.emptyMaster=a.master),(!a.internal||a.internal&&a.parent&&a.master!==a.parent)&&(e.ispEmails.showManage=!0)}),console.log("ispEmails",e.ispEmails.existingEmails)})},e.disableCreateEmail=function(){return!e.ispEmails.newEmailAddress||!/^[a-z0-9\._]{3,32}$/.test(e.ispEmails.newEmailAddress)||!e.ispEmails.newPassword||e.ispEmails.newPassword!==e.ispEmails.newPasswordConfirm},e.createEmailSub=function(a){var b=p.getServiceId(e.myProfile.account.accountNumber,"BILLING");console.log("createEmailSub",a),o.showModal({serviceId:b,parent:a.master},"modals/mpcreateispemail.html",{scope:e,controller:"fidMpCreateIspEmailController"}).then(function(a){console.log("modalResult = ",a),"created"==a.status&&e.getIspEmails(b)})},e.createEmail=function(){h.debug(u,"create ISP email");var a=p.getServiceId(e.myProfile.account.accountNumber,"BILLING");j.createIspEmail(a,{parentAddress:e.ispEmails.emptyMaster,emailAddress:e.ispEmails.newEmailAddress+e.ispEmails.emailDomain,password:e.ispEmails.newPassword}).then(function(b){console.log("create ISP email success",b),h.debug(u,"create ISP email success: "+JSON.stringify(b)),e.getIspEmails(a),o.showModal({},"modals/mpcreateispemailsuccess.html",{scope:e,controller:["$scope",function(a){a.onDismiss=function(){a.$close()},a.onGoToEmail=function(){a.$close({action:"go-to-email"}),n.location="https://security.frontier.com/acctedit/"}}]})})["catch"](function(a){console.log("create ISP email failure",a),h.debug(u,"create ISP email failure: "+JSON.stringify(a))})},e.launchManageEmail=function(){n.location="https://security.frontier.com/acctedit/"},e.resetEmailPassword=function(){p.getServiceId(e.myProfile.account.accountNumber,"BILLING")},e.deleteEmail=function(a){var b=p.getServiceId(e.myProfile.account.accountNumber,"BILLING");j.deleteIspEmail(b,a).then(function(){})},p.getServices().then(function(){e.getServices()}),e.getProfile(),e.myProfile.anchor=null,d.hash()&&(e.myProfile.anchor=d.hash(),b(function(){f(d.hash())})),e.onSaveEmail=function(a){e.myProfile.profile.newEmail=a,j.profileUpdate("changeEmail",e.myProfile.profile).then(function(b){"undefined"==typeof b.response.error?(e.myProfile.profile.emails.unverified=[a],e.myProfile.profile.emails.verified=[],angular.forEach(e.myProfile.accounts,function(b){angular.forEach(["commercial","billpay","video","voip"],function(c){b[c]!==!1&&b[c].users&&angular.forEach(b[c].users,function(b){b.uid===e.myProfile.profile.uid&&(b.email=a)})})}),void 0===e.myProfile.profile.contactPhone.phoneNumber||""===e.myProfile.profile.contactPhone.phoneNumber?l.showWarning([{i18n:"fid.myprofile-password-recovery-missing-phone"}],{alerts:e.alerts,id:"password-recovery"}):e.myProfile.profile.contactPhone.isVerified.verified===!1&&l.showWarning([{i18n:"fid.myprofile-password-recovery"}],{alerts:e.alerts,id:"password-recovery"}),e.onCancelEmail(),s.trackData({events:"event14",eVar14:"my profile: change frontier ID: success"}),l.showSuccess([{i18n:"fid.myprofile-verifyemail-sent",i18nArgs:{email:a}}],{alerts:e.alerts,id:"change-email"})):"CONFLICT"==b.response.error?(s.trackData({events:"event14",eVar14:"my profile: change frontier ID: failure"}),l.showWarning([{i18n:"fid.myprofile-email-address-change-failed-email-conflict"}],{alerts:e.alerts,id:"change-email"})):(s.trackData({events:"event14",eVar14:"my profile: change frontier ID: failure"}),l.showWarning([{i18n:"fid.myprofile-email-address-change-failed"}],{alerts:e.alerts,id:"change-email"}))})["catch"](function(b){409===b.status&&b.response.errors&&b.response.errors.length&&"email"===b.response.errors[0].field&&"CONFLICT"===b.response.errors[0].status?l.showWarning([{i18n:"fid.myprofile-email-address-change-failed-email-conflict",i18nArgs:{email:a}}],{alerts:e.alerts,id:"change-email"}):(s.trackData({events:"event14",eVar14:"my profile: change frontier ID: failure"}),l.showWarning([{i18n:"fid.myprofile-email-address-change-failed",i18nArgs:{email:a}}],{alerts:e.alerts,id:"change-email"})),h.debug(u,"save email failure: "+JSON.stringify(b))})},e.pinApi=c("/api/accounts/:accountId/pin",{},{get:{method:"GET",url:"/api/accounts/:accountId/pin"},post:{method:"POST",url:"/api/accounts/:accountId/pin"},put:{method:"PUT",url:"/api/accounts/:accountId/pin"},"delete":{method:"DELETE",url:"/api/accounts/:accountId/pin"}}),e.showExistingPin=!1,e.showNewPin=!1,e.showConfirmPin=!1,e.showCreatePinForm=!1,e.showChangePinForm=!1,e.pinCreated=!1,e.pinChanged=!1,e.confirmPinDisabled=!0,e.createPinDisabled=!0,setTimeout(function(){e.createPinPlaceholder=g("i18n")("fid.myprofile-account-pin-create-placeholder"),e.createPinPlaceholderConfirm=g("i18n")("fid.myprofile-account-pin-create-placeholder-confirm"),e.accountPinPopoverMessage=g("i18n")("fid.myprofile-account-pin-tooltip-text"),e.$apply()}),e.activateAccountPinPopover=function(){$(".accountPinPopover").popover()},e.createPinData={newPin:"",confirmPin:""},e.onShowCreatePinForm=function(){e.showCreatePinForm=!e.showCreatePinForm},e.onShowChangePinForm=function(){e.showChangePinForm=!e.showChangePinForm},e.toggleShowExistingPin=function(){e.showExistingPin=!e.showExistingPin},e.toggleShowNewPin=function(){e.showNewPin=!e.showNewPin},e.toggleShowConfirmPin=function(){e.showConfirmPin=!e.showConfirmPin},e.togglePinDisplay=function(a){var b=$(a).prev().attr("type");"password"==b?$(a).prev().attr("type","text"):$(a).prev().attr("type","password")},$("#showExistingPin").click(function(){e.$apply(),e.toggleShowExistingPin(),s.trackData(e.showExistingPin?{events:"event14",eVar14:"my profile:show passcode"}:{events:"event14",eVar14:"my profile:hide passcode"}),e.$apply(),e.togglePinDisplay(this)}),$("#showNewPin").click(function(){e.toggleShowNewPin(),e.$apply(),e.togglePinDisplay(this)}),$("#showConfirmPin").click(function(){e.toggleShowConfirmPin(),e.$apply(),e.togglePinDisplay(this)}),e.validatePasscode=function(){var a=!1;return e.createPinData.newPin&&(a=!/^[0-9]{5,5}$/i.test(e.createPinData.newPin)),a},e.comparePasscode=function(){var a=!1;return e.createPinData.newPin&&e.createPinData.confirmPin&&e.createPinData.newPin!==e.createPinData.confirmPin&&(a=!0),a},e.validateNewAccountPin=function(a){"undefined"==typeof a&&(a=!0);var b=!1;return e.createPinData.newPin&&(b=!/^[0-9]{5,5}$/i.test(e.createPinData.newPin)),a===!0&&(e.validationErrors.invalidAccountPin=b),!b},e.validateMismatchPin=function(a){"undefined"==typeof a&&(a=!0);var b=!1;return e.createPinData.newPin&&e.createPinData.confirmPin&&e.createPinData.newPin!==e.createPinData.confirmPin&&(b=!0),a===!0&&(e.validationErrors.mismatchedAccountPin=b),!b},e.$watch("createPinData.newPin",function(a){e.createPinDisabled=!a||!e.createPinData.confirmPin||e.validatePasscode()||e.comparePasscode(),e.confirmPinDisabled=!a||e.validatePasscode()}),e.$watch("createPinData.confirmPin",function(a){e.createPinDisabled=!a||!e.createPinData.newPin||e.validatePasscode()||e.comparePasscode()}),e.resetPinForm=function(){e.createPinData.newPin="",e.createPinData.confirmPin="",e.showNewPin=!1,e.showConfirmPin=!1,e.validationErrors.invalidAccountPin=!1,e.validationErrors.mismatchedAccountPin=!1,$("#showNewPin").prev().attr("type","password"),$("#showConfirmPin").prev().attr("type","password")},e.reportedAccountPinInfo=!1,e.pinHover=!1,e.onHoverAccountPinInfo=function(){e.pinHover=!0,e.reportedAccountPinInfo||(s.trackData({events:"event14",eVar14:"my profile:passcode information:hover"}),e.reportedAccountPinInfo=!0)},e.onLeaveAccountPinInfo=function(){e.pinHover=!1},e.onCreatePin=function(){if(!e.createPinDisabled){var a={accountId:e.myProfile.account.ref},b={accountPin:e.createPinData.newPin};e.showCreatePinForm?e.pinApi.post(a,b).$promise.then(function(){e.accountPin=e.createPinData.newPin,e.showCreatePinForm=!1,e.pinCreated=!0,s.trackData({ events:"event14",eVar14:"my profile:add passcode: success"}),e.resetPinForm()})["catch"](function(){s.trackData({events:"event14",eVar14:"my profile:add passcode: failure"})}):e.pinApi.put(a,b).$promise.then(function(){e.accountPin=e.createPinData.newPin,e.showChangePinForm=!1,e.pinChanged=!0,s.trackData({events:"event14",eVar14:"my profile:change passcode: success"}),e.resetPinForm()})["catch"](function(){s.trackData({events:"event14",eVar14:"my profile:change passcode: failure"})})}},e.onCancelCreatePin=function(){e.showCreatePinForm?e.onShowCreatePinForm():e.onShowChangePinForm(),e.resetPinForm()},e.isACaliforniaResident=function(){var a=e.myProfile.account&&e.myProfile.account.billpay&&e.myProfile.account.billpay.details&&"CA"==e.myProfile.account.billpay.details.environment,b=e.myProfile.account&&e.myProfile.account.billpay&&e.myProfile.account.billpay.details&&e.myProfile.account.billpay.details.billingAddress&&"CA"==e.myProfile.account.billpay.details.billingAddress.state;return a||b},e.hasCompletedCCPAReviews=function(){return e.myProfile.account&&e.myProfile.account.details&&e.myProfile.account.details.CCPARequests&&e.myProfile.account.details.CCPARequests.length>0},e.getCCPAFilesizeDisplay=function(a){function b(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===a)return"0 KB";var c=1024,d=0>b?0:b,e=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],f=Math.floor(Math.log(a)/Math.log(c));return parseFloat((a/Math.pow(c,f)).toFixed(d))+" "+e[f]}return" (".concat(b(a),")")},e.CCPADownloadReview=function(){s.trackData({events:"event16",eVar16:"CCPA Report",prop16:"D=v16"})}}],link:function(a,b,c){h.debug("attrs: "+c),b.on("$destroy",function(){a.$destroy()})}}}]).filter("mpAccountSelectorLabel",function(){return function(a){return a&&a.accountNumber+" "+a.firstName}}).directive("fidComplexPassword",function(){return{require:"ngModel",link:function(a,b,c,d){d.$parsers.unshift(function(a){var b=/[A-Z]/.test(a),c=/[a-z]/.test(a),e=/\d/.test(a),f=/\W/.test(a),g=b+c+e+f;return"undefined"==typeof a?void d.$setValidity("complexity",!1):a&&a.length>=8&&g>=3?(d.$setValidity("complexity",!0),a):void d.$setValidity("complexity",!1)})}}}).directive("fidConfirms",function(){return{require:["ngModel","^form"],link:function(a,b,c,d){var e=d[0],f=d[1];e.$parsers.unshift(function(a){var b=f[c.fidConfirms],d=a===b.$modelValue;return e.$setValidity("confirms",d),b.$setValidity("confirms",d),a})}}}),angular.module("fidService.controllers").controller("fidMpShareAccountController",["$scope","$rootScope","$filter","fidLog","fidConfig","fidServicesJson","fidJsonApi","fidAlerts","fidEventConstant","modalConfig",function(a,b,c,d,e,f,g,h,i,j){var k="My profile share account controller";a.createId={email:"",secretCode:"",step:"one"},a.modalConfig=j,d.debug(k,"modalConfig: "+JSON.stringify(a.modalConfig)),a.onCancel=function(){a.$close({action:"cancel"})},a.onOk=function(){a.$close({action:"ok"}),h.showSuccess([{i18n:"fid.myprofile-createid-user-invited",i18nArgs:{email:a.createId.email,code:a.createId.secretCode}}])},a.disableAdd=function(){return!a.createId.email||!/^[a-z0-9\{\}\~\-!\$\+=\._]+@[a-z0-9][a-z0-9\-\.]+[a-z]{2,5}$/i.test(a.createId.email)},a.onAdd=function(){if(!a.disableAdd()){if(d.debug(k,"email: "+JSON.stringify(a.createId.email)),a.modalConfig.billpayUsers)for(var b=0;b":/>/g,"<":/</g,'"':/"/g,"'":/'/g},d="";return a&&(d=a),b&&(d+=(a?" ":"")+b),angular.forEach(c,function(a,b){d=d.replace(a,b)}),d},k=g.getServiceId(e.accountId,"VIDEO");k?f.serviceUsersGet(k).then(function(c){a.pageData.videoUsers=[],angular.forEach(c.response,function(b){a.pageData.videoUsers.push({user:b,clickable:!0,text:j(b.firstName,b.lastName)})}),b=!0,i()})["catch"](function(){d.debug(c,"Error fetching video users: "+JSON.stringify(arguments)),b=!0,i()}):(b=!0,i());var l=g.getServiceId(e.accountId,"VOIP");l?f.serviceUsersGet(l).then(function(b){a.pageData.voipUsers=[],angular.forEach(b.response,function(b){a.pageData.voipUsers.push({user:b,clickable:!0,text:j(b.firstName,b.lastName)})}),h=!0,i()})["catch"](function(){d.debug(c,"Error fetching voip users: "+JSON.stringify(arguments)),h=!0,i()}):(h=!0,i())})["catch"](function(){d.debug(c,"Error fetching services: "+JSON.stringify(arguments)),a.loading=!1})),a.onUser=function(c){a.eventTriggered({event:{type:b.GOTO_MY_SERVICES_USER,data:{user:c}}})},a.onAddUser=function(){a.eventTriggered({event:{type:b.GOTO_ADD_MY_SERVICES_USER,data:{}}})}}],link:function(a,b){b.on("$destroy",function(){a.$destroy()})}}}]),angular.module("fidService.directives").directive("fidMyServicesAddUser",["$q","$timeout","$filter","fidLog","fidConfig","fidAlerts","fidJsonApi",function(a,b,c,d,e,f,g){return{restrict:"ACE",templateUrl:e.getTemplateUrl("myprofile/myservicesadduser.html"),scope:!0,controller:["$scope","fidServicesJson","fidEventConstant","fidModalConstant","fidModalManager",function(a,b,h,i,j){var k="MyServicesAddUser";a.createId={saving:!1,email:"",billpay:!1,videoChosen:!0,fidData:{}},a.services={roles:[],uverseOptions:[],fiosVz3Options:[],parentalOptions:!1},a.serviceUser={uverseMaxRating:"",fiosVz3MaxRating:""},"mobile"===e.getPlatform()&&e.getAppApiHandle().fixScroll&&(a.fixScroll=e.getAppApiHandle().fixScroll),a.createId.fidData=a.fidRouter.getCurrentRoute().getData(),d.debug(k,"fidData: "+JSON.stringify(a.createId.fidData));var l=b.parseVideoAndVoipServices(a.createId.fidData.services,a.createId.fidData.accountNumber);d.debug(k,"services: "+JSON.stringify(l)),a.services=JSON.parse(JSON.stringify(l)),a.services.roles.sort(function(a,b){return a.sortKey-b.sortKey}),a.services.uverseOptions.length&&!a.serviceUser.uverseMaxRating&&(a.serviceUser.uverseMaxRating="NR"),a.services.fiosVz3Options.length&&!a.serviceUser.fiosVz3MaxRating&&(a.serviceUser.fiosVz3MaxRating="all_ages"),a.getLabelString=function(a){return c("i18n")("fid.myprofile-createid-parental-"+a)},a.onChange=function(b,c){d.debug(k,"onChange: "+JSON.stringify(b)),b.isAllowed=c,!b.isAllowed||"uverse"!==b.type&&"fiosvz3"!==b.type?b.isAllowed||"uverse"!==b.type&&"fiosvz3"!==b.type||(a.createId.videoChosen=!1):a.createId.videoChosen=!0},a.onCancel=function(){a.eventTriggered({event:{type:h.CREATEID_CANCEL}})},a.noRolesChosen=function(){for(var b=!0,c=0;c5)&&e.cancel(s)},500);a.registerConfig={emailValidator:/[^\s@]+[^\s]+\.[^\s@]+$/,passwordStrengthValidator:"(?=.*d)(?=.*[a-z])(?=.*[A-Z]).{8,}"},a.register={headerSteps:[{i18n:"fid.steps-signup-label",active:!0,stepClass:"active"},{i18n:"fid.steps-identify-label",stepClass:""},{i18n:"fid.steps-authenticate-label",stepClass:""}],firstName:"",lastName:"",email:"",receivePromotionEmails:!1,password:"",confirmPassword:"",phone:"",tosVersion:"",tosContentUrl:"",acceptedTos:!1,firstNameFocus:!1,lastNameFocus:!1,emailFocus:!1,passwordFocus:!1,confirmPasswordFocus:!1,phoneFocus:!1,firstNameInvalid:!1,firstNameFormatInvalid:!1,lastNameInvalid:!1,lastNameFormatInvalid:!1,emailInvalid:!1,emailFormatInvalid:!1,emailExistsInvalid:!1,passwordInvalid:!1,passwordFormatInvalid:!1,confirmPasswordInvalid:!1,confirmPasswordFormatInvalid:!1,phoneInvalid:!1,phoneFormatInvalid:!1,tosVersionInvalid:!1,tosVersionExpiredInvalid:!1,registerObpMigration:!1,skipLinkAccount:!1,phoneConsentChecked:null,noCaptcha:!1},a.register.captchaModel={key:g.getEnvironment("recaptchaKey"),response:"",widgetId:null,invalid:!1,disabled:g.getEnvironment("captchaIgnored")},a.registerDomFunctions={},a.registerButtonDomFunctions={};var t=function(b){a.register.noCaptcha===!1&&$(".fid-register iframe").attr("src","about:blank"),d(function(){a.register.noCaptcha===!1&&l.reload(a.register.captchaModel.widgetId),d(b,400)},200)};"web"===g.getPlatform()&&null!==a.fidRouter.getCurrentRoute().getParams&&("undefined"!=typeof a.fidRouter.getCurrentRoute().getParams().skipLinkAccount&&(a.register.skipLinkAccount=a.fidRouter.getCurrentRoute().getParams().skipLinkAccount),"undefined"!=typeof a.fidRouter.getCurrentRoute().getParams().nc&&(a.register.noCaptcha=a.fidRouter.getCurrentRoute().getParams().nc,a.register.noCaptcha===!0&&(a.register.captchaModel.disabled=!0))),f.debug(p,"skipLinkAccount: "+a.register.skipLinkAccount),f.debug(p,"noCaptcha: "+a.register.noCaptcha);var u={title:{i18n:"fid.register-modalconfig-missing-phone-title"},body:{i18n:"fid.register-modalconfig-missing-phone-text"},buttons:[{i18n:"fid.register-modalconfig-missing-phone-non-default-button",id:"non-default-button"},{i18n:"fid.register-modalconfig-missing-phone-default-button",id:"default-button"}]},v={title:{i18n:"fid.modal-system-error-title"},body:{i18n:"fid.modal-system-error-text"},buttons:[{i18n:"fid.modal-system-error-default-button",id:"default-button"}]},w={title:{i18n:"fid.register-modalconfig-not-registered-title"},body:{i18n:"fid.register-modalconfig-not-registered-text"},buttons:[{i18n:"fid.register-modalconfig-not-registered-default-button",id:"default-button"}]};a.setWidgetId=function(b){f.debug(p,"reCaptcha Widget ID set to: "+JSON.stringify(b)),a.register.captchaModel.widgetId=b},a.setResponse=function(b){f.debug(p,"reCaptcha challenge resolved! Response: "+JSON.stringify(b)),a.register.captchaModel.response=b,a.register.captchaModel.invalid=!1},a.cbExpiration=function(){f.debug(p,"reCaptcha challenge session expired!"),a.register.captchaModel.response="",a.register.captchaModel.invalid=!1},a.reloadReCaptcha=function(){f.debug(p,"RELOAD reCaptcha and reset relevant reCaptcha values"),l.reload(a.register.captchaModel.widgetId),a.register.captchaModel.response="",a.register.captchaModel.invalid=!1},a.onFirstNameFocus=function(){a.register.firstNameFocus=!0,a.register.lastNameFocus=!1,a.register.emailFocus=!1,a.register.passwordFocus=!1,a.register.confirmPasswordFocus=!1,a.register.phoneFocus=!1},a.onLastNameFocus=function(){a.register.firstNameFocus=!1,a.register.lastNameFocus=!0,a.register.emailFocus=!1,a.register.passwordFocus=!1,a.register.confirmPasswordFocus=!1,a.register.phoneFocus=!1},a.onEmailFocus=function(){a.register.firstNameFocus=!1,a.register.lastNameFocus=!1,a.register.emailFocus=!0,a.register.passwordFocus=!1,a.register.confirmPasswordFocus=!1,a.register.phoneFocus=!1,a.register.emailInvalid=!1,a.register.emailFormatInvalid=!1,a.register.emailExistsInvalid=!1},a.onPasswordFocus=function(){a.register.firstNameFocus=!1,a.register.lastNameFocus=!1,a.register.emailFocus=!1,a.register.passwordFocus=!0,a.register.confirmPasswordFocus=!1,a.register.phoneFocus=!1},a.onConfirmPasswordFocus=function(){a.register.firstNameFocus=!1,a.register.lastNameFocus=!1,a.register.emailFocus=!1,a.register.passwordFocus=!1,a.register.confirmPasswordFocus=!0,a.register.phoneFocus=!1},a.onPhoneFocus=function(){a.register.firstNameFocus=!1,a.register.lastNameFocus=!1,a.register.emailFocus=!1,a.register.passwordFocus=!1,a.register.confirmPasswordFocus=!1,a.register.phoneFocus=!0},a.formReset=function(){a.register.firstName="",a.register.lastName="",a.register.email="",a.register.receivePromotionEmails=!1,a.register.password="",a.register.confirmPassword="",a.register.phone="",a.register.tosVersion="",a.register.tosContentUrl="",a.register.acceptedTos=!1,a.register.firstNameFocus=!1,a.register.lastNameFocus=!1,a.register.emailFocus=!1,a.register.passwordFocus=!1,a.register.confirmPasswordFocus=!1,a.register.phoneFocus=!1,a.register.firstNameInvalid=!1,a.register.firstNameFormatInvalid=!1,a.register.lastNameInvalid=!1,a.register.lastNameFormatInvalid=!1,a.register.emailInvalid=!1,a.register.emailFormatInvalid=!1,a.register.emailExistsInvalid=!1,a.register.passwordInvalid=!1,a.register.passwordFormatInvalid=!1,a.register.confirmPasswordInvalid=!1,a.register.confirmPasswordFormatInvalid=!1,a.register.phoneInvalid=!1,a.register.phoneFormatInvalid=!1,a.register.tosVersionInvalid=!1,a.register.tosVersionExpiredInvalid=!1,a.register.captchaModel.response="",a.register.captchaModel.widgetId=null,a.register.captchaModel.invalid=!1,a.register.phoneConsentChecked=null,a.register.noCaptcha=!1},a.showFirstNameError=function(){return a.register.firstNameInvalid||a.register.firstNameFormatInvalid},a.showLastNameError=function(){return a.register.lastNameInvalid||a.register.lastNameFormatInvalid},a.showEmailError=function(b){return a.register.emailInvalid||a.register.emailFormatInvalid||a.register.emailExistsInvalid||b.email.$dirty&&b.email.$invalid&&a.register.emailFocus===!1},a.emailErrorString=function(b){var c;return c=b.email.$dirty&&b.email.$invalid&&a.register.emailFocus===!1?"fid.register-email-invalid-format-error":a.register.emailFormatInvalid?"fid.register-email-invalid-format-error":a.register.emailInvalid?"fid.register-email-missing-error":a.register.emailExistsInvalid?"fid.register-existing-email-error":"fid.register-invalid-email-error"},a.showPasswordStrengthError=function(b){return a.register.passwordInvalid===!1&&b.password.$dirty&&b.password.$invalid&&a.register.passwordFocus===!1},a.showPasswordError=function(b){return a.register.passwordInvalid||a.register.passwordFormatInvalid||a.showPasswordStrengthError(b)||a.showPasswordMismatchError(b)},a.showConfirmPasswordStrengthError=function(b){return a.register.passwordInvalid===!1&&a.register.passwordFormatInvalid===!1&&b.confirmPassword.$dirty&&b.confirmPassword.$invalid&&a.register.confirmPasswordFocus===!1},a.showConfirmPasswordError=function(b){return a.register.confirmPasswordInvalid||a.showConfirmPasswordStrengthError(b)||a.showPasswordMismatchError(b)},a.showPasswordMismatchError=function(b){return b.password.$dirty&&b.password.$valid&&b.confirmPassword.$dirty&&b.confirmPassword.$valid&&a.register.password!==a.register.confirmPassword},a.showServerPasswordError=function(){return a.register.passwordInvalid||a.register.passwordFormatInvalid},a.passwordErrorString=function(b){var c;return c=a.showPasswordStrengthError(b)||a.showConfirmPasswordStrengthError(b)?"fid.register-password-strength-error":a.showPasswordMismatchError(b)?"fid.register-passwords-mismatch-error":(a.showPasswordError(b),"fid.register-invalid-password-error")},a.showPhoneError=function(b){return a.register.phoneInvalid||a.register.phoneFormatInvalid||b.phone.$dirty&&b.phone.$invalid&&a.register.phoneFocus===!1; },a.showCaptchaError=function(){return a.register.captchaModel.disabled===!1&&a.register.captchaModel.invalid},a.showTosVersionError=function(){return a.register.tosVersionInvalid||a.register.tosVersionExpiredInvalid},a.onTosClick=function(){a.register.tosVersionInvalid=!1,a.register.tosVersionExpiredInvalid=!1},a.anyValidationError=function(){return a.register.firstNameInvalid||a.register.firstNameFormatInvalid||a.register.lastNameInvalid||a.register.lastNameFormatInvalid||a.register.emailInvalid||a.register.emailFormatInvalid||a.register.emailExistsInvalid||a.register.passwordInvalid||a.register.passwordFormatInvalid||a.register.phoneInvalid||a.register.phoneFormatInvalid||a.register.tosVersionInvalid||a.register.tosVersionExpiredInvalid||a.register.captchaModel.disabled===!1&&a.register.captchaModel.invalid},a.createIdButtonDisabled=function(b){a.register.noCaptcha&&(a.register.response="nc");var c=a.showEmailError(b)||a.showPhoneError(b)||a.register.password!==a.register.confirmPassword||a.register.acceptedTos===!1||a.register.captchaModel.disabled===!1&&""===a.register.captchaModel.response||a.anyValidationError();return c},a.createIdButtonDisabledMobile=function(b){return b.$error.required||b.$error.pattern||a.register.password!==a.register.confirmPassword||a.register.acceptedTos===!1||a.register.captchaModel.disabled===!1&&""===a.register.captchaModel.response||a.anyValidationError()||a.register.phone&&!a.register.phoneConsentChecked},a.loading=!0,k.logoutPost().then(function(b){f.debug(p,"Forced Logout successful! Debug response: "+JSON.stringify(b)),a.loading=!1})["catch"](function(b){f.debug(p,"Forced Logout FAILED! Error response: "+JSON.stringify(b)),a.loading=!1,m.showModal(v)}),a.loading=!0,k.tosGet().then(function(b){a.loading=!1,f.debug(p,"Successfully obtained Terms of Service version and content URL from Frontier Server. Debug response: "+JSON.stringify(b)),a.register.tosVersion=b.response.tosVersion,a.register.tosContentUrl=b.response.tosContentUrl})["catch"](function(b){a.loading=!1,f.debug(p,"Unable to obtain Terms of Service version and content URL from Frontier Server. Error response: "+JSON.stringify(b)),m.showModal(v)}),a.onRegisterButton=function(){if(f.debug("Clicked on Create ID button, now check if phone number is specified..."),""===a.register.phone){f.debug(p,"Warn user about missing phone number");var b=u;q&&q.trackEvent(q.c.continueWithoutPhone),m.showModal(b,null,{backdrop:"static"}).then(function(b){return"non-default-button"===b?(f.debug(p,"Setting FOCUS on PHONE NUMBER input field..."),void d(function(){a.registerDomFunctions.focus(),a.register.phoneFocus=!0})):void a.Register()})}else a.Register()},a.Register=function(){f.debug("FID Register..."),q&&q.trackInteraction("FID: create ID click"),a.loading=!0;var b=a.register.phone.replace(/([\D]*)/g,"");f.debug("gRecaptchaResponse: "+a.register.captchaModel.response),f.debug("email: "+a.register.email),f.debug("receivePromotionEmails: "+a.register.receivePromotionEmails),f.debug("password: "+a.register.password),f.debug("firstName: "+a.register.firstName),f.debug("lastName: "+a.register.lastName),f.debug("tos: "+a.register.tosVersion),f.debug("phone: "+b);var c=a.register.skipLinkAccount?"frontier.com#invite claim":"frontier.com#registration";k.profilePost(a.register.captchaModel.response,a.register.email,a.register.password,a.register.firstName,a.register.lastName,a.register.tosVersion,b,c).then(function(b){b.response&&b.response.error?(f.error(p,"Register successful but with ERROR response: "+JSON.stringify(b)),m.showModal(w)):(f.debug(p,"Create ID was SUCCESSFUL: "+a.register.captchaModel.response,a.register.email,a.register.password,a.register.firstName+a.register.lastName,a.register.phone),q&&(q.extraEvents.push(q.c.createId),a.register.receivePromotionEmails&&q.extraEvents.push(q.c.newsletterSignUp)),t(function(){n.register.email=a.register.email,n.sharedState.register.idCreated=!0,n.sharedState.register.email=n.register.email,a.eventTriggered({event:{type:j.STATE_UPDATED,data:n.sharedState}}),a.eventTriggered({event:{type:j.REGISTER_SUCCESS}}),a.register.skipLinkAccount?(q&&(q.extraEvents.push(q.c.formSubmit),q.extraEvents.push(q.c.formStep),q.extraVars={eVar68:"ftr:register:complete"}),f.debug(p,"Skip account linking flow"),n.sharedState.linkAccount.accountLinked=!0,n.sharedState.linkAccount.fromRegister=!0,a.eventTriggered({event:{type:j.STATE_UPDATED,data:n.sharedState}}),a.eventTriggered({event:{type:j.GOTO_ACCOUNT_SUMMARY}})):(f.debug(p,"Continue with account linking flow"),a.$parent.goTo(i.LINK_ACCOUNT))}))})["catch"](function(b){f.debug(p,"Register FAILED! Error response: "+JSON.stringify(b)),a.loading=!1,a.reloadReCaptcha();var c=!0;if(b.response&&400===b.status&&b.response.error)"REQUIRES_CAPTCHA"===b.response.error&&(l.reload(a.register.captchaModel.widgetId),a.register.captchaModel.invalid=!0,c=!1,q&&q.formError("missing captcha"));else if(b.response&&409===b.status&&b.response.errors)b.response.errors[0]&&b.response.errors[0].field&&b.response.errors[0].status&&"email"===b.response.errors[0].field&&"CONFLICT"===b.response.errors[0].status&&(a.register.emailExistsInvalid=!0,c=!1,q&&q.formError("conflict email"));else if(b.response&&400===b.status&&b.response.errors&&b.response.errors.length){c=!1;for(var d=0;d1){if(!i.closeAll()){var b=this;a(function(){var a=b.routeStack.pop();b.routeStack[b.routeStack.length-1].params={},h.debug(j,"Current route: "+a.path+" - Going back to previous route: "+b.routeStack[b.routeStack.length-1].path)})}return!0}return h.debug(j,"No more route to go back"),!1},this.FidRouter.prototype.goTo=function(a,b,f,g,i){if(h.debug(j,"path: "+a),h.debug(j,"params: "+JSON.stringify(b)),h.debug(j,"data: "+JSON.stringify(f)),h.debug(j,"state: "+JSON.stringify(g)),h.debug(j,"title: "+i),e.contains(d,a)){i=k(a),b=angular.isDefined(b)?b:{},f=angular.isDefined(f)?f:{},g=angular.isDefined(g)?g:{};var l=new c({path:a,title:i,params:b,data:f,state:g});return h.debug(j,"Changing route to "+JSON.stringify(l)),h.debug(j,"Route Stack: "+JSON.stringify(this.routeStack)),this.routeStack.push(l),$(window).scrollTop(0),!0}return h.error(j,"Invalid route: "+a),!1},this.FidRouter.prototype.getCurrentRoute=function(){return this.routeStack.length>0?this.routeStack[this.routeStack.length-1]:void 0},this.FidRouter.prototype.getRouteStackLength=function(){return this.routeStack.length},this.FidRouter.prototype.getRootRoute=function(){return this.routeStack.length>0?this.routeStack[0]:void 0},this.FidRouter.prototype.reset=function(){this.routeStack=[]}}]),angular.module("fidService.services").service("fidHTTPClient",["$http","$q","$log",function(a,b,c){this._req=function(d,e,f,g){c.info("request="+e);var h=b.defer(),i=function(a,b,c,d){h.resolve({response:a,status:b,headers:c,config:d})},j=function(a,b,c,d){h.reject({response:a,status:b,headers:c,config:d})},k={};switch(void 0!==g&&(k={timeout:g.promise}),d){case"GET":a.get(e,k).success(i).error(j);break;case"PUT":a.put(e,f,k).success(i).error(j);break;case"POST":a.post(e,f,k).success(i).error(j);break;case"DELETE":a["delete"](e,k).success(i).error(j);break;default:h.reject({response:null,status:400,headers:null,config:null})}return h.promise},this.get=function(a,b){return this._req("GET",a,null,b)},this.put=function(a,b){return this._req("PUT",a,b)},this.post=function(a,b){return this._req("POST",a,b)},this["delete"]=function(a){return this._req("DELETE",a,null)}}]),angular.module("fidService.services").service("fidHandleResponse",["fidLog","fidAlerts","fidModalManager","fidStateService","fidEventConstant",function(a,b,c,d,e){var f="Handle response";this.linkAccountSuccess=function(c,g){a.debug(f,"linkAccountSuccess: "+JSON.stringify(g)),g.errors&&Object.keys(g.errors).length&&g.linkedAccounts&&!g.linkedAccounts.length?b.showDanger([{i18n:"fid.link-account-error"}],{alerts:c.showMessage,id:"server-error"}):(g.linkedAccounts&&g.linkedAccounts.length?(d.sharedState.linkAccount.accountLinked=!0,1===g.linkedAccounts.length&&(d.sharedState.linkAccount.linkedAccount=g.linkedAccounts[0])):g.linkedAccounts&&g.existingLinkedAccounts&&!g.linkedAccounts.length&&g.existingLinkedAccounts.length&&(d.sharedState.linkAccount.alreadyExists=!0),c.eventTriggered({event:{type:e.STATE_UPDATED,data:d.sharedState}}),c.eventTriggered({event:{type:e.LINK_ACCOUNT_SUCCESS,data:g}}))},this.linkAccountLockedOut=function(a){var b={title:{i18n:"fid.link-account-locked-out-title"},body:{i18n:"fid.link-account-locked-out-message"},buttons:[{i18n:"fid.ok",id:"ok"}]};c.showModal(b).then(function(b){"ok"===b&&a.eventTriggered({event:{type:e.LINK_ACCOUNT_CANCEL}})})}}]),angular.module("fidService.services").factory("fidHealth",["fidJsonApi",function(a){var b=[],c=60,d=function(){if(!e.isChecking){var d=null,f=function g(f){f&&f.loginAllowed?(e.isOk=!0,e.isChecking=!1,d&&clearInterval(d)):e.isOk=!1;for(var h=b.pop();h;)h(e.isOk),h=b.pop();d||e.isOk||(d=setInterval(function(){a.healthGet().then(function(a){g(a.response)})["catch"](function(){g()})},1e3*c))};e.isChecking=!0,a.healthGet().then(function(a){f(a.response)})["catch"](function(){f()})}},e={isOk:!1,isChecking:!1,check:function(a){"function"==typeof a&&b.push(a),d()}};return e}]),angular.module("fidService.services").service("fidIdCreatedMobile",["$q","fidLog","fidModalManager",function(a,b,c){var d="Mobile ID Created dialog";this.showIdCreatedModal=function(e,f){b.debug(d,"email: "+e);var g=a.defer();return c.showModal({email:e,accountId:f},"modals/idcreated.html",{controller:"fidIdCreatedController"}).then(function(a){b.debug("modal was closed: "+JSON.stringify(a)),g.resolve(a.action)}),g.promise}}]),angular.module("fidService.services").service("fidJsonApi",["$injector","$q","fidHTTPClient","fidConfig","fidModalManager","fidLog",function(a,b,c,d,e,f){var g="/api",h="testapi",i={profile:{url:"/profile"},profileCommercial:{url:"/profile/commercial"},accounts:{url:"/profile/accounts"},accountUsers:{url:"/accounts/::0::/users"},accountUser:{url:"/accounts/::0::/users/::1::"},account:{url:"/accounts/::0::"},services:{url:"/services"},service:{url:"/services/::0::"},servicesWithDetails:{url:"/services?includeDetails=true"},serviceUsers:{url:"/services/::0::/users"},serviceUser:{url:"/services/::0::/users/::1::"},serviceHierarchy:{url:"/services/::0::/hierarchy"},profileInvite:{url:"/profile/invite"},profileContactPhone:{url:"/profile/contactPhone"},accountsDiscover:{url:"/accounts/discover"},login:{url:"/login"},logout:{url:"/logout"},tos:{url:"/tos"},profileValidation:{url:"/profile/validation"},forgotId:{url:"/profile/forgotid"},forgotPassword:{url:"/profile/forgotpassword"},health:{url:"/health"},ispEmails:{url:"/services/::0::/isp/emailAccounts"},ispEmail:{url:"/services/::0::/isp/emailAccounts/::1::"},ispEmailResetPassword:{url:"/services/::0::/isp/emailAccounts/::1::/resetPassword"},ccpaReviews:{url:"/accounts/::0::/ccpa/reviews"},ccpaReview:{url:"/accounts/::0::/ccpa/reviews/::1::"}},j=function(a,b){b=b||[];for(var c=d.getEnvironment("useTestApi")?h:g,e=c+i[a].url,f=0;fl?0:l)},5)};this.showModal=function(b,e,f){this.closeAll();var l={};angular.extend(l,j),"object"===_typeof(f)&&angular.extend(l,f),e?(g.debug(i+"Template URL is provided and will be used: "+JSON.stringify(e)),l.templateUrl=h.getTemplateUrl(e)):l.templateUrl=h.getTemplateUrl("modals/modal-generic.html"),l.controller?l.resolve={modalConfig:function(){return b}}:(l.controller=function(a){a.modalConfig=b},l.controller.$inject=["$scope"]);var m="fid-modal-"+Math.floor(1e4*Math.random()).toString();l.windowClass="frontier-id fid-modal "+m,l.additionalWinClass&&(l.windowClass+=" "+l.additionalWinClass);var o=d.defer(),p=c.open(l),q=null,r=null;"mobile"===h.getPlatform()&&p.opened.then(function(){q=a.$on("windowResized",function(){(!/iPad|iPhone|iPod/.test(navigator.userAgent)||window.MSStream)&&n(m)}),r=a.$on("orientationChanged",function(){/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&n(m)}),n(m)});var s=function(){"mobile"===h.getPlatform()&&(q&&(q(),q=null),r&&(r(),r=null))};return p.result.then(function(a){k[m]=void 0,s(),o.resolve(a)})["catch"](function(){k[m]=void 0,s(),o.resolve(null)}),k[m]=p,o.promise}}]),angular.module("fidService.services").service("fidMpVerifyEmail",["$q","$filter","fidLog","fidJsonApi","fidModalManager",function(a,b,c,d,e){var f="My profile email verification";this.verifyEmail=function(b){c.debug(f,"verifyEmail email: "+b);var g=a.defer();return d.resendVerificationEmail(b).then(function(){e.showModal({email:b},"modals/mpverifyemail.html").then(function(a){c.debug("modal was closed: "+JSON.stringify(a)),g.resolve(!0)})})["catch"](function(a){g.resolve(!1),c.debug("resend email failure: "+JSON.stringify(a))}),g.promise}}]),angular.module("fidService.services").service("fidMpVerifyMobile",["$q","fidLog","fidModalManager",function(a,b,c){var d="My profile mobile verification";this.verifyMobile=function(e){b.debug(d,"verifyMobile phone: "+e);var f=a.defer();return c.showModal({phoneNumber:e},"modals/mpverifymobile.html",{controller:"fidMpVerifyMobileController"}).then(function(a){b.debug("modal was closed: "+JSON.stringify(a)),f.resolve("verified"===a.action?!0:!1)}),f.promise}}]),angular.module("fidService").service("fidPostAuthService",["$q","fidStateService","fidJsonApi","fidConfig","fidLog",function(a,b,c,d,e){var f="FID Post auth service";this.validateProfile=function(){e.debug("...validateProfile");var d=a.defer();return c.profileValidationGet().then(function(a){if(e.debug(f,"data: "+JSON.stringify(a)),b.profileValidation.result=a.response,e.debug(f,"profileValidation result: "+b.profileValidation.result),a.response&&a.response.errors&&a.response.errors.length)for(var c=0;c=86400&&(f.expires=Math.floor(e/86400)):e=0;var g=new Date;g.setTime(g.getTime()+1e3*e),b(c,d,f)},this["delete"]=function(c){return a.getAppApiHandle().setCookie?a.getAppApiHandle().deleteCookie(c):void b.remove(c)},this.get=function(c){return a.getAppApiHandle().getCookie?a.getAppApiHandle().getCookie(c):b(c)}}]),angular.module("fidService.utils").service("fidGigya",function(){var a=[],b={},c=!1,d=0;this.registerLoginCallback=function(a){var c="cbId"+d.toString();return d++,b[c]=a,c},this.unregisterLoginCallback=function(a){b[a]=void 0},this.showLoginUI=function(b){c?gigya.socialize.showLoginUI(b):a.push(function(){gigya.socialize.showLoginUI(b)})}}),angular.module("fidService.utils").service("fidGoto",["fidConfig",function(a){this["goto"]=function(b,c,d,e){if(c&&"mobile"===a.getPlatform())b.$parent.goTo(c);else if(d){var f={event:{type:d,data:e||{}}};b.eventTriggered(f)}}}]),angular.module("fidService.utils").service("fidLog",["$log",function(){this._msg=function(){},this.debug=function(a,b){this._msg("debug",a,b)},this.warn=function(a,b){this._msg("warn",a,b)},this.info=function(a,b){this._msg("info",a,b)},this.error=function(a,b){this._msg("error",a,b)}}]),angular.module("fidService.directives").directive("fidRunOnLoad",["$parse","$timeout",function(a,b){return{restrict:"A",link:function(c,d,e){var f=a(e.fidRunOnLoad);d.on("load",function(){b(function(){f(c)})})}}}]),angular.module("fidService.utils").service("fidScriptLoader",function(){this.load=function(a,b,c){var d=document.getElementsByTagName("head")[0],e=document.createElement("script");e.type="text/javascript",e.src=a,c&&(e.innerHTML=c),e.onreadystatechange=b,e.onload=b,d.appendChild(e)}}),angular.module("fidService.directives").directive("fidStopEvent",function(){return{restrict:"A",link:function(a,b,c){b.on(c.fidStopEvent,function(a){a.stopPropagation()})}}}),angular.module("fidService.utils").service("fidValidator",function(){this.contains=function(a,b){var c=!1;return angular.forEach(a,function(a){b===a&&(c=!0)}),c}}),angular.module("fidService.directives").directive("fidValidPhoneNumber",function(){return{require:"ngModel",link:function(a,b,c,d){d.$parsers.unshift(function(a){var b=/-/.test(a),c=/[^0-9\-]/.test(a),e=!0;return"undefined"==typeof a?(d.$setValidity("phonenumber",!0),a):(c&&(e=!1),b&&/\d{3}\-\d{3}\-\d{4}/.test(a)===!1&&(e=!1),b&&12!==a.length&&(e=!1),b===!1&&10!==a.length&&(e=!1),d.$setValidity("phonenumber",e),e?a:void 0)})}}}),angular.module("fidService.directives").directive("fidDomFunctions",function(){return{restrict:"A",link:function(a,b,c){var d=null;c.fidDomFunctions&&(d=a.$eval(c.fidDomFunctions),"object"!==_typeof(d))||d&&(d.blur=function(){b.blur()},d.focus=function(){b.focus()})}}}),angular.module("fidService.directives").directive("fidHeaderArrows",["fidConfig","fidLog","$window",function(a,b,c){return{restrict:"AE",templateUrl:a.getTemplateUrl("widgets/headerarrows.html"),scope:{steps:"="},link:function(a,d){b.debug("fidHeaderArrows steps: ",JSON.stringify(a.steps)),a.bodyWidth=function(){if(!a.steps||!a.steps.length)return 0;var b=d.parent().width(),c=22*(a.steps.length-1);return{width:parseInt((b-c)/a.steps.length)+"px"}},angular.element(c).bind("resize",function(){a.$apply()})}}}]),angular.module("fidService.directives").directive("fidHeaderBubbles",["fidConfig",function(a){return{restrict:"AE",templateUrl:a.getTemplateUrl("widgets/headerbubbles.html"),scope:{steps:"="}}}]),angular.module("fidService.directives").directive("fidHelpLinks",["fidConfig",function(a){return{restrict:"AE",templateUrl:a.getTemplateUrl("widgets/helplinks.html"),scope:{},controller:["$scope","$window","$timeout",function(a,b,c){a.onLiveChat=function(a){"function"==typeof b.launchChat&&c(function(){a.preventDefault(),a.stopPropagation(),b.launchChat()},0)}}]}}]),angular.module("fidService.directives").directive("fidOnEnter",function(){return{restrict:"A",scope:{fidOnEnter:"&"},link:function(a,b){b.bind("keydown",function(b){13===b.which&&a.fidOnEnter()}),b.on("$destroy",function(){a.$destroy()})}}}),angular.module("fidService.directives").directive("fidPreventRightClick",function(){return{restrict:"A",link:function(a,b){b.bind("contextmenu",function(a){a.preventDefault()})}}}),angular.module("fidService").run(["$templateCache",function(a){a.put("fid/templates/accountsummary/accountnotifications.html",' '),a.put("fid/templates/accountsummary/accountsummaryalerts.html",''),a.put("fid/templates/accountsummary/asnolinkedaccounts.html",''),a.put("fid/templates/alerts/alertsdisplay.html",'
{{c.text}} {{c.text}}
'),a.put("fid/templates/forgot/forgotid.html",'



'),a.put("fid/templates/forgot/forgotpassword.html",'





'),a.put("fid/templates/linkaccount/linkaccount.html",'



'),a.put("fid/templates/linkaccount/linkauth.html",'



'),a.put("fid/templates/linkaccount/linkobp.html",''), a.put("fid/templates/linkaccount/linktnac.html",'





'),a.put("fid/templates/login/accountvalidation.html",'

 ( )













'),a.put("fid/templates/login/banner.html",''),a.put("fid/templates/login/inline-english.html",''),a.put("fid/templates/login/inline.html",''),a.put("fid/templates/login/login.html",''),a.put("fid/templates/login/logout.html",'
'),a.put("fid/templates/login/modal.html",''),a.put("fid/templates/main/main.html",'
'),a.put("fid/templates/modals/accountnumbertooltip.html",'
'),a.put("fid/templates/modals/ecpcreateid.html",'
'),a.put("fid/templates/modals/ecpuserpermissions.html",'
'),a.put("fid/templates/modals/idcreated.html",'
'),a.put("fid/templates/modals/modal-generic.html",'
'),a.put("fid/templates/modals/mpcreateid.html",'
'), a.put("fid/templates/modals/mpcreateispemail.html",'
'),a.put("fid/templates/modals/mpcreateispemailsuccess.html",'
'),a.put("fid/templates/modals/mpeditbillingaddress.html",'
'),a.put("fid/templates/modals/mpverifymobile.html",'
'),a.put("fid/templates/modals/pintooltip.html",'
'),a.put("fid/templates/modals/tos.html",'
'),a.put("fid/templates/modals/uviframe.html",''),a.put("fid/templates/myprofile/ecpcreateid.html",'
'),a.put("fid/templates/myprofile/ecpmanageaccount.html",'

 Manage Accounts

NO ACCOUNT LOADED

Billing Address | Edit

{{street}}

{{account.billingAddress.city}}, {{account.billingAddress.state}} {{account.billingAddress.zip}}



Preferred Language

Your bills and messages will be presented in the selected language.





Customers who have access to this Billing Account via their Frontier ID

To unlink a Customer from this account, click “Unlink” below. To link a Customer to this account, share your Account Number and PIN with the person you’d like to add and they can link their Frontier ID to this account in their My Profile tab.


First Name Last Name Email Mobile Number Role Permissions
{{user.firstName}} {{user.lastName}} {{user.email}} mobile # role permissions UnlinkUnlink
'),a.put("fid/templates/myprofile/ecpmanageid-formatted.html",'

Frontier ID:
eric.delsesto+shared@gmail.com    Edit

Enter a valid email address.
Your email addresses do not match.
Cancel

Pending Change:
   Resend Confirmation Email

Password:
Change my password

Cancel

Mobile Phone Number:
   Edit

Cancel

Linked Accounts:

Account Number Street Address City, State and ZIP
203-229-0154-062815-5 ILE 27107 CHRIS SMITH GLOVERSVILLE, NY 120780000 Unlink
Link Another Account

To link another Frontier account to your Frontier ID, please provide the following information.

Need help finding this? Click here.
Enter your account number.
Cancel
'),a.put("fid/templates/myprofile/ecpmanageid.html",'

 Frontier ID, Password & Email Notifications

A verification email has been set!

Frontier ID:{{profile.firstName}}
{{profile.email}}    Edit

Enter a valid email address.
Your email addresses do not match.
Cancel

Pending Change:
   Resend Confirmation Email

Password:
Change my password

Cancel

Mobile Phone Number:
   Edit

Cancel

Linked Accounts:

Account Number Street Address City, State and ZIP
{{account.accountNumber}}

{{street}}

{{account.billingAddress.city}}, {{account.billingAddress.state}} {{account.billingAddress.zip}} Unlink
'),a.put("fid/templates/myprofile/ecpmyprofile.html",'

:
{{myProfile.profile.firstName}}

:
{{myProfile.profile.lastName}}

:
{{myProfile.profile.email}}   


:

:
{{myProfile.profile.contactPhone.phoneNumber}}


 ( )

{{myProfile.account.details.accountType}}: {{myProfile.account.ref}} {{myProfile.account.organization.type}}: {{myProfile.account.organization.accountNumber}} {{myProfile.account.organization.type}}: {{myProfile.account.organization.accountNumber}}
GAN: {{myProfile.account.hierarchy.gan.accountNumber}}
{{user.firstName}} {{user.lastName}} {{user.email}} {{user.contactPhone}}  
SMA: {{sma.accountNumber}}
{{user.firstName}} {{user.lastName}} {{user.email}} {{user.contactPhone}}  
BTN: {{btn.accountNumber}}
{{user.firstName}} {{user.lastName}} {{user.email}} {{user.contactPhone}}  
'), a.put("fid/templates/myprofile/local-mpmyprofile.html",'

:
{{myProfile.profile.email}}    Edit


Enter a valid email address.

:

:
{{myProfile.profile.contactPhone}}

{{a.ref}}

{{street}}

{{a.details.billingAddress.city}}, {{a.details.billingAddress.state}} {{a.details.billingAddress.zip}}

{{a.ref}}

{{street}}

{{a.details.billingAddress.city}}, {{a.details.billingAddress.state}} {{a.details.billingAddress.zip}}

  Edit

{{street}}

{{myProfile.account.billpay.details.billingAddress.city}}, {{myProfile.account.billpay.details.billingAddress.state}} {{myProfile.account.billpay.details.billingAddress.zip}}

  
 
 .
 








{{user.firstName}} {{user.lastName}} {{user.email}}

{{user.firstName}} {{user.lastName}} {{user.email}}
{{user.firstName}} {{user.lastName}} {{user.email}}

{{user.firstName}} {{user.lastName}} {{user.email}}
{{user.firstName}} {{user.lastName}} {{user.email}}
'),a.put("fid/templates/myprofile/mpaccounts.html",'

Residential Accounts

Account Number Street Address City, State and ZIP
{{account.ref}}

{{street}}

{{account.billingAddress.city}}, {{account.billingAddress.state}} {{account.billingAddress.zip}} Unlink

Commericial Accounts

Account Number Street Address City, State and ZIP
{{account.ref}}

{{street}}

{{account.billingAddress.city}}, {{account.billingAddress.state}} {{account.billingAddress.zip}} Unlink
'),a.put("fid/templates/myprofile/mpcreateid.html",'
'),a.put("fid/templates/myprofile/mpcreateispemailsuccess.html",'
'),a.put("fid/templates/myprofile/mpmyaccount.html",'

NO ACCOUNT LOADED

Billing Address | Edit

{{street}}

{{account.billingAddress.city}}, {{account.billingAddress.state}} {{account.billingAddress.zip}}

Bill Preference | Manage
 Receiving Bill By Mail.
  Yes, I want paperless billing
 Enrolled in Paperless Billing.
  Please mail my bills to my billing address.


Preferred Language

Your bills and messages will be presented in the selected language.





Customers who have access to this account via their Frontier ID

To unlink a Customer from this account, click “Unlink” below. To link a Customer to this account, share your Account Number and PIN with the person you’d like to add and they can link their Frontier ID to this account in their My Profile tab.


First Name Last Name Email Max Rating for Video
{{user.firstName}} {{user.lastName}} {{user.email}} TV-MA  change UnlinkUnlink
'),a.put("fid/templates/myprofile/mpmyprofile.html",'

:

:
{{getEmail()}}


:

:
{{myProfile.profile.contactPhone.phoneNumber}}


:  




{{getSubaccount(a).ref}}

{{street}}

{{a.billpay.details.billingAddress.city}}, {{a.billpay.details.billingAddress.state}} {{a.billpay.details.billingAddress.zip}} {{getServiceList(a)}}

{{a.details.accountType}}: {{a.ref}}

{{e.parent}}

{{ch.emailAddress}}

{{street}}

{{myProfile.account.billpay.details.billingAddress.city}}, {{myProfile.account.billpay.details.billingAddress.state}} {{myProfile.account.billpay.details.billingAddress.zip}}

.








{{user.firstName}} {{user.lastName}} {{user.email}}

{{user.firstName}} {{user.lastName}} {{user.email}}
{{user.firstName}} {{user.lastName}} {{user.email}}
{{myProfile.profile.firstName}} {{myProfile.profile.lastName}} {{myProfile.profile.email}}

{{user.firstName}} {{user.lastName}} {{user.email}}
{{user.firstName}} {{user.lastName}} {{user.email}}
{{myProfile.profile.firstName}} {{myProfile.profile.lastName}} {{myProfile.profile.email}}

{{myProfile.profile.firstName}} {{myProfile.profile.lastName}} {{myProfile.profile.email}} {{myProfile.videoParentalControlRating}}

{{myProfile.profile.firstName}} {{myProfile.profile.lastName}} {{myProfile.profile.email}}















'), a.put("fid/templates/myprofile/mpsocialid.html",'
{{confirmation}}
Social ID
{{socialId}}
Create Standard ID
Password must contain at least 8 characters, including a lowercase letter, an uppercase letter and at least one number.
Your passwords do not match.
Cancel
Social ID:
'),a.put("fid/templates/myprofile/mpverifyemail.html",'

'),a.put("fid/templates/register/register.html",'


( )

'),a.put("fid/templates/register/tos.html",''),a.put("fid/templates/widgets/headerarrows.html",'
'),a.put("fid/templates/widgets/helplinks.html",'')}]);