/*! For license information please see main.01945ea4.chunk.js.LICENSE.txt */ (this["webpackJsonpenterprise-auth-prototype"]=this["webpackJsonpenterprise-auth-prototype"]||[]).push([[0],{154:function(e,t,n){},162:function(e,t,n){},163:function(e,t,n){"use strict";n.r(t);var o=n(1),r=n.n(o),i=n(29),s=n.n(i),a=(n(83),n(84),n(4)),c=n(8),u=n(19),l=n(3),d=n(0),p=function(e){var t=e.children,n=e.handleSubmit;return Object(d.jsx)("form",{className:"form",onSubmit:function(e){e.preventDefault(),n(e)},noValidate:!0,children:Object(d.jsx)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:t})})},h=p;p.defaultProps={children:void 0};var f=function(e){var t=e.children;return Object(d.jsx)(l.Stack,{verticalSpacing:"60",isCentered:!0,classes:"form__ctas",children:t})},m=f;f.defaultProps={children:void 0};var g=n(12),y=n(2),b={UserName:"usernameStep",RetrieveUserName:"retrieveUserName",Password:"passwordStep",MustChangePassword:"mustChangePasswordStep",OTCContactMethod:"otcContactMethodStep",OTC:"otcStep",ChallengeQuestion:"challengeQuestionStep",SetupSecurityQuestions:"setupSecurityQuestionsStep",SetupSecQuestionsSuccessOption:"setupSecQuestionsSuccessOptionStep",Lockout:"lockoutStep",IALockout:"ialockoutStep",GenericError:"genericError",ForgotPassword:"forgotpassword",UserLastDobZip:"UserLastDobZip",UserAccountNumber:"UserAccountNumber",UserSSNNumber:"UserSSNNumber",UsernameLastDobZip:"usernameLastDobZip",ChangePassword:"ChangePassword",ForgotPasswordSuccess:"ForgotPasswordSuccess",Information:"informationStep",FPLockout:"FPLockout",IsUsernameRetrieved:"IsUsernameRetrieved",SelfServiceError:"SelfServiceError",FPWrongUsername:"FPWrongUsername",MustChangePasswordSuccess:"mustChangePasswordSuccessStep",RetreiveUsernameSucces:"RetreiveUsernameSuccesStep"},v="SetUserInput",_="SetTransmitEvents",w="SetLockoutType",A="SetFailedAttemtsCounter",S="SetErrorType",k="SetOTCActons",C="SetPolicyId",I="SetCurrentFlow",E="SetSelfServiceError",R="SetEmpty",P="SetSessionData",O="Username",x="RememberUsername",T="EmailId",D="MobileNumber",L="SSN",F="LastName",j="DOB",M="Zip",q="Error",B="primary",N={AuthStep:b.UserName,RecoverUserStep:"PhoneEmailSSN",RecoverUserStepError:"",CurrentFlow:{isForgotPassword:!1,isForgotUsername:!1,isFormPassword:!1},OTCConfig:{},UserInput:{Username:"",RememberUsername:!1,SelectedContact:{},ResendCounters:[],HasMoreRetryOptions:!1,RemainingContactsCount:-1,RecoveryUsername:!1,EmailId:"",MobileNumber:"",SSN:"",LastName:"",DOB:"",Zip:"",AcctType:"",AcctNum:""},TransmitEvents:{resolve:void 0,reject:void 0,currentSession:void 0,policyId:void 0},IsError:!1,ChallengeQuestion:{},SecurityQuestions:{},LockoutType:{IsPasswordLockout:!1,IsIALockout:!1,IsOTPLockout:!1,IsFPLockout:!1,isAccountInactive:!1,IsPasswordExpired:!1},SessionTimeout:{UsernameFlow:!1,PasswordFlow:!1,UsernameUpdated:!1},ErrorType:{IsFIDisabled:!1,IsPasswordLockout:!1,IsInvalidUsernameOrPassword:!1,IsSystemUnavailable:!1,IsMaintenanceEnabled:!1,IsDownTimeMode:!1,IsTMXReject:!1,IsStepupInsufficient:!1,IsRCIFDown:!1,IsGenericIError:!1,IsGenericUError:!1,IsGenericTError:!1,IsDefaultError:!1,IsRecoverUserStepError:!1,IsRetrievePasswordStepError:!1,IsFPLockout:!1},FailedAttemptsCount:{PasswordFailedAttemptsCount:0,IAFailedAttemptsCount:0,OTPFailedAttemptsCount:0},PageLevelError:"",IsUsernameRetrieved:!1,TransmitError:"",UsernameFromTransmit:""},U="searchEngineTags",H=b,W=Object(o.createContext)(),K=function(){return Object(o.useContext)(W)},z=function(e,t){var n=[];if(void 0!==e){var o=e.phoneTargets;void 0!==(o=void 0!==o?o.concat(e.emailTargets):e.emailTargets)&&o.forEach((function(e){var o=t.map((function(e){return e.description})).indexOf(e._description);-1===o?n.push({description:e._description,retryValue:0,isMaxRetried:!1}):n.push(t[o])}))}return n},V=function(e){var t=e.children,n=Object(o.useReducer)((function(e,t){switch(t.type){case H.Information:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.Information});case H.UserName:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.UserName});case H.Password:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.Password});case H.MustChangePassword:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.MustChangePassword,MustChangePassword:t.payload});case H.MustChangePasswordSuccess:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.MustChangePasswordSuccess});case H.ForgotPassword:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.ForgotPassword});case H.OTCContactMethod:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.OTCContactMethod,OTCConfig:t.payload,UserInput:Object(y.a)(Object(y.a)({},e.UserInput),{},{ResendCounters:z(t.payload,e.UserInput.ResendCounters)})});case H.OTC:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.OTC,SelectedContact:t.SelectedContact});case H.ChallengeQuestion:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.ChallengeQuestion,ChallengeQuestion:t.payload,isChallengeQuestion:t.payload.isChallenge});case H.SetupSecurityQuestions:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.SetupSecurityQuestions,SecurityQuestions:t.payload});case H.SetupSecQuestionsSuccessOption:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.SetupSecQuestionsSuccessOption,SecurityQuestionsSucess:t.payload});case H.RetreiveUsernameSucces:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.RetreiveUsernameSucces});case H.Lockout:return Object(y.a)(Object(y.a)({},e),{},{LockoutType:Object(y.a)(Object(y.a)({},e.LockoutType),{},{IsPasswordLockout:t.isPasswordLockout,IsIALockout:t.isIALockout,IsOTPLockout:t.isOTPLockout,IsFIDisabled:t.isFIDisabled,IsFPLockout:t.isFPLockout,isAccountInactive:t.isAccountInactive,IsPasswordExpired:t.IsPasswordExpired}),AuthStep:H.Lockout});case H.IALockout:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.IALockout});case H.RetrieveUserName:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.RetrieveUserName});case H.UserLastDobZip:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.UserLastDobZip});case H.UserSSNNumber:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.UserSSNNumber});case H.UserAccountNumber:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.UserAccountNumber,AccountTypeInfo:t.payload});case H.UsernameLastDobZip:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.UsernameLastDobZip});case H.ChangePassword:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.ChangePassword});case H.ForgotPasswordSuccess:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.ForgotPasswordSuccess});case H.SelfServiceError:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.SelfServiceError});case H.FPLockout:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.FPLockout});case H.IsUsernameRetrieved:return Object(y.a)(Object(y.a)({},e),{},{IsUsernameRetrieved:!0});case H.GenericError:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.GenericError});case H.FPWrongUsername:return Object(y.a)(Object(y.a)({},e),{},{AuthStep:H.FPWrongUsername,UsernameFromTransmit:t.payload.foundId,WrongUsername:t.payload.userProvidedId,RelyingParty:t.payload.relyingParty});case q:return Object(y.a)(Object(y.a)({},e),{},{RecoverUserStepError:t.message,ErrorType:Object(y.a)(Object(y.a)({},e.ErrorType),{},{IsRecoverUserStepError:!0})});case I:return Object(y.a)(Object(y.a)({},e),{},{CurrentFlow:{isForgotPassword:t.isForgotPassword,isForgotUsername:t.isForgotUsername,isFormPassword:t.isFormPassword},IsUsernameRetrieved:!1});case v:return Object(y.a)(Object(y.a)({},e),{},{UserInput:Object(y.a)(Object(y.a)({},e.UserInput),{},Object(g.a)({},t.key,t.value))});case P:return Object(y.a)(Object(y.a)({},e),{},{SessionTimeout:Object(y.a)(Object(y.a)({},e.SessionTimeout),{},Object(g.a)({},t.key,t.value))});case R:return Object(y.a)(Object(y.a)({},e),{},{UserInput:Object(y.a)(Object(y.a)({},e.UserInput),{},{EmailId:"",MobileNumber:"",SSN:"",LastName:"",DOB:"",Zip:""})});case k:return Object(y.a)(Object(y.a)({},e),{},{UserInput:Object(y.a)(Object(y.a)({},e.UserInput),{},{SelectedContact:t.selectedContact,RemainingContactsCount:t.remainingContactsCount,ResendCounters:t.payload})});case _:return Object(y.a)(Object(y.a)({},e),{},{TransmitEvents:Object(y.a)(Object(y.a)({},e.TransmitEvents),{},{resolve:t.resolve,reject:t.reject,currentSession:t.currentSession})});case C:return Object(y.a)(Object(y.a)({},e),{},{TransmitEvents:Object(y.a)(Object(y.a)({},e.TransmitEvents),{},{policyId:t.policyId})});case w:return Object(y.a)(Object(y.a)({},e),{},{LockoutType:Object(y.a)(Object(y.a)({},e.LockoutType),{},{IsPasswordLockout:t.isPasswordLockout,IsIALockout:t.isIALockout,IsOTPLockout:t.isOTPLockout,isAccountInactive:t.isAccountInactive,IsPasswordExpired:t.IsPasswordExpired})});case S:return Object(y.a)(Object(y.a)({},e),{},{ErrorType:Object(y.a)(Object(y.a)({},e.ErrorType),{},{IsFIDisabled:t.isFIDisabled,IsPasswordLockout:t.isPasswordLockout,IsInvalidUsernameOrPassword:t.isInvalidUsernameOrPassword,IsSystemUnavailable:t.isSystemUnavailable,IsMaintenanceEnabled:t.isMaintenanceEnabled,IsDownTimeMode:t.IsDownTimeMode,IsTMXReject:t.isTMXReject,IsStepupInsufficient:t.isStepupInsufficient,IsRCIFDown:t.isRCIFDown,IsGenericIError:t.isGenericIError,IsGenericUError:t.isGenericUError,IsGenericTError:t.isGenericTError,IsDefaultError:t.isDefaultError,IsRecoverUserStepError:t.IsRecoverUserStepError,IsRetrievePasswordStepError:t.isRetrievePasswordStepError,IsFPLockout:t.isFPLockout}),IsUsernameRetrieved:!1});case A:return Object(y.a)(Object(y.a)({},e),{},{FailedAttemptsCount:Object(y.a)(Object(y.a)({},e.FailedAttemptsCount),{},{PasswordFailedAttemptsCount:t.passwordFailedAttemptsCount,IAFailedAttemptsCount:t.iAFailedAttemptsCount,OTPFailedAttemptsCount:t.oTPFailedAttemptsCount})});case E:return Object(y.a)(Object(y.a)({},e),{},{TransmitError:t.errorMessage});default:return e}}),N),r=Object(a.a)(n,2),i=r[0],s=r[1];return Object(d.jsx)(W.Provider,{value:{authState:i,authDispatch:s},children:t})};V.defaultProps={children:void 0};var Q=V,G=n(68),J=n.n(G),Y={AllowedChannelProducts:{olb:["accountoverview","exclusiveproduct","dlo"],mbank:["login"],sscp:["login"],rdo:["digitalloan","visaplatn","cashvisasigr","cashvisaplatn","visasigr","psconcreditcard","visaexplore","resumeCreditCards","lifegreenchk","lgstudents","nowcard","lifegreeneaccess","lifegreenchkplus","lifegreensavings","savings","nowsavings","premiummoneymarket","prefplus","rasochk","moneymarket","nowchecking","resumeDeposits","fundnow","visawealth","visabusn","visabusenr","visaprstgplatn"],blnd:["heloc"],clsp:["mortgage"],rmda:["heloc","mortgage","inquire","prequal","heloan","ploc","deposit","savings","auto"],rdom:["login"]},JoinTheBankProducts:["lifegreenchk","lgstudents","nowcard","lifegreeneaccess","lifegreenchkplus","lifegreensavings","savings","nowsavings","premiummoneymarket","prefplus","rasochk","moneymarket","nowchecking","fundnow","resumeDeposits"],ApplyNowProducts:["visaplatn","cashvisasigr","cashvisaplatn","visasigr","psconcreditcard","visaexplore","visawealth","visabusn","visabusenr","visaprstgplatn","resumeCreditCards"],DloProducts:["digitalloan"],AllowedOlbEnvironments:["d1","d2","d3","d4","d5","d6","d7","d8","d9","d10","q1","q2","q3","q4","q5","q6","q7","q8","q9","q10"],ChannelQueryKey:"channel",ProductQueryKey:"product",AppIdQueryKey:"appid",OlbEnvironments:"olbenv",RetrieveUserNameUrlKey:"forgot-username",ForgotPasswordUrlKey:"password-reset",DefaultRoute:"/signin?channel=olb&product=accountoverview",ExclusiveProductRoute:"/signin?channel=olb&product=exclusiveproduct",PersonalBankingDloProductRoute:"/signin?channel=olb&product=dlo",SessionWarningTime:780,SessionWarningRemainTime:120,MaxOTPLockOutCount:5,IsMaintenanceEnabled:!1,isNRASelfServiceEnabled:!1,Transmit:{Endpoint:"https://tsauthdev.rgbk.com:443",AppId:"authportal-web",Env:"d4",IsLocalHost:!0,PolicyId:"login",RecoverUserIdPolicyId:"forgottenid_lookup",ForgotPasswordPolicyId:"forgottenpw_login",LogLevel:"2"},Urls:{About:"https://www.regionstest.com/about-regions",AccessibleBanking:"https://www.regionstest.com/about-regions/accessible-banking",EconomicReports:"https://www.regionstest.com/about-regions/economic-update",PrivacyAndSecurity:"https://www.regionstest.com/about-regions/privacy-security",WebsiteTermsOfUse:"https://www.regionstest.com/about-regions/privacy-security/terms-conditions",InvestorRelations:"https://ir.regionstest.com",OnlineTrackingAdvertising:"https://www.regionstest.com/about-regions/privacy-security/online-privacy-notice#ads",LeaveFeedback:"https://survey.barclays.com/jfe/form/SV_0Jm6o1kcV7mAmA5?source=eap",AgreementAndDisclosure:"https://www.regionstest.com/digital-banking/digital-services/electronic-banking-service-agreement",VisitOurHelpPage:"https://www.regionstest.com/help/online-banking-help/login-and-security/one-time-codes",ContactUs:"https://www.regionstest.com/help",PrivacyPledge:"https://www.regionstest.com/about-regions/privacy-security/privacy-pledge",NoticeAtCollection:" https://www.regionstest.com/about-regions/privacy-security/ccpa-disclosure#collection"},Logging:{Endpoint:"https://ciam-dev.api.regionstest.com/v1/logger/log",ClientId:"c62734506fff4f038734f79f8bb4aaea",ClientSecret:"Cd52E33F89D744f3adE1385D64b1AD7a",AlertDebugLogs:!1,EnabledLevels:[1,2,3,4,5],Level:{Debug:1,Info:2,Warn:3,Error:4,Fatal:5}}},Z={Olb:{Name:"olb",ForgotPassword:"https://localhost:44300/customerservice/forgottenpassword",AccountOverview:"https://localhost:44300/accounts/overview",EnrollNow:"https://localhost:44300/enrollment/home"},Rdc:{Name:"rdc",DefaultUrl:"https://www.regionstest.com"},Clsp:{Name:"clsp",DefaultUrl:"https://localhost:3000/signin?channel=clsp&product=mortgage"},rdom:{Name:"rdom",DefaultUrl:"https://localhost:3000/signin?channel=rdom&product=login"},Sscp:{Name:"sscp",DefaultUrl:"https://localhost:3000/signin?channel=sscp&product=login"}};var £=function(){var e=J.a.parse(window.location.search);return""!==e.olbenv&&"undefined"!==typeof e.olbenv?e.olbenv:"local"}();!function(e){var t=e.toLowerCase();switch(e){case"CI":Y.Transmit=Object(y.a)(Object(y.a)({},Y.Transmit),{},{Endpoint:"https://tsciauth.rgbk.com",Env:"",IsLocalHost:!1}),Y.Logging=Object(y.a)(Object(y.a)({},Y.Logging),{},{Endpoint:"https://ciam-ci.api.regionstest.com/v1/logger/log",EnabledLevels:[4,5]}),Z.Olb=Object(y.a)(Object(y.a)({},Z.Olb),{},{ForgotPassword:"https://onlinebankingregionsci.rgbk.com/customerservice/forgottenpassword",AccountOverview:"https://onlinebankingregionsci.rgbk.com/accounts/overview",EnrollNow:"https://onlinebankingregionsci.rgbk.com/enrollment/home"}),Z.Clsp=Object(y.a)(Object(y.a)({},Z.Clsp),{},{DefaultUrl:"https://login-ci.rgbk.com/signin?channel=clsp&product=mortgage"}),Z.rdom=Object(y.a)(Object(y.a)({},Z.rdom),{},{DefaultUrl:"https://login-ci.rgbk.com/signin?channel=rdom&product=login"}),Z.Sscp=Object(y.a)(Object(y.a)({},Z.Sscp),{},{DefaultUrl:"https://login-ci.rgbk.com/signin?channel=sscp&product=login"});break;case"DEV":Y.Transmit=Object(y.a)(Object(y.a)({},Y.Transmit),{},{IsLocalHost:!1}),Z.Olb=Object(y.a)(Object(y.a)({},Z.Olb),{},{ForgotPassword:"https://onlinebanking-d4.rgbk.com/customerservice/forgottenpassword",AccountOverview:"https://onlinebanking-d4.rgbk.com/accounts/overview",EnrollNow:"https://onlinebanking-d4.rgbk.com/enrollment/home"}),Z.Clsp=Object(y.a)(Object(y.a)({},Z.Clsp),{},{DefaultUrl:"https://login-dev.rgbk.com/signin?channel=clsp&product=mortgage"}),Z.rdom=Object(y.a)(Object(y.a)({},Z.rdom),{},{DefaultUrl:"https://login-dev.rgbk.com/signin?channel=rdom&product=login"}),Z.Sscp=Object(y.a)(Object(y.a)({},Z.Sscp),{},{DefaultUrl:"https://login-dev.rgbk.com/signin?channel=sscp&product=login"});break;case"D1":case"D2":case"D3":case"D4":case"D5":case"D6":case"D7":case"D8":case"D9":case"D10":Y.Transmit=Object(y.a)(Object(y.a)({},Y.Transmit),{},{Env:t,IsLocalHost:!1}),Z.Olb=Object(y.a)(Object(y.a)({},Z.Olb),{},{ForgotPassword:"https://onlinebanking-".concat(t,".rgbk.com/customerservice/forgottenpassword"),AccountOverview:"https://onlinebanking-".concat(t,".rgbk.com/accounts/overview"),EnrollNow:"https://onlinebanking-".concat(t,".rgbk.com/enrollment/home")}),Z.Clsp=Object(y.a)(Object(y.a)({},Z.Clsp),{},{DefaultUrl:"https://login-dev.rgbk.com/signin?channel=clsp&olbenv=".concat(t,"&product=mortgage")}),Z.rdom=Object(y.a)(Object(y.a)({},Z.rdom),{},{DefaultUrl:"https://login-dev.rgbk.com/signin?channel=rdom&olbenv=".concat(t,"&product=login")}),Z.Sscp=Object(y.a)(Object(y.a)({},Z.Sscp),{},{DefaultUrl:"https://login-dev.rgbk.com/signin?channel=sscp&olbenv=".concat(t,"&product=login")});break;case"PROD":Y.Transmit=Object(y.a)(Object(y.a)({},Y.Transmit),{},{Endpoint:"https://olbauth.barclays.com",Env:"",IsLocalHost:!1}),Y.Urls=Object(y.a)(Object(y.a)({},Y.Urls),{},{About:"https://www.barclays.com/about-regions",AccessibleBanking:"https://www.barclays.com/about-regions/accessible-banking",EconomicReports:"https://www.barclays.com/about-regions/economic-update",PrivacyAndSecurity:"https://www.barclays.com/about-regions/privacy-security",WebsiteTermsOfUse:"https://www.barclays.com/about-regions/privacy-security/terms-conditions",InvestorRelations:"https://ir.barclays.com",OnlineTrackingAdvertising:"https://www.barclays.com/about-regions/privacy-security/online-privacy-notice#ads",AgreementAndDisclosure:"https://www.barclays.com/digital-banking/electronic-banking-service-agreement",VisitOurHelpPage:"https://www.barclays.com/help/online-banking-help/login-and-security/one-time-codes",ContactUs:"https://www.barclays.com/help",PrivacyPledge:"https://www.barclays.com/about-regions/privacy-security/privacy-pledge",NoticeAtCollection:" https://www.barclays.com/about-regions/privacy-security/ccpa-disclosure#collection"}),Y.Logging=Object(y.a)(Object(y.a)({},Y.Logging),{},{Endpoint:"https://ciam.api.barclays.com/v1/logger/log",ClientId:"71625d9f40bd41e0a27143013302a646",ClientSecret:"a55dc1e8A0a946Ef814bb80628A0E4b2",EnabledLevels:[4,5]}),Z.Olb=Object(y.a)(Object(y.a)({},Z.Olb),{},{ForgotPassword:"https://onlinebanking.barclays.com/customerservice/forgottenpassword",AccountOverview:"https://onlinebanking.barclays.com/accounts/overview",EnrollNow:"https://onlinebanking.barclays.com/enrollment/home",DefaultUrl:"https://login.barclays.com/signin?channel=olb&product=accountoverview"}),Z.Rdc=Object(y.a)(Object(y.a)({},Z.Rdc),{},{DefaultUrl:"https://www.barclays.com"}),Z.Clsp=Object(y.a)(Object(y.a)({},Z.Clsp),{},{DefaultUrl:"https://login.barclays.com/signin?channel=clsp&product=mortgage"}),Z.rdom=Object(y.a)(Object(y.a)({},Z.rdom),{},{DefaultUrl:"https://login.barclays.com/signin?channel=rdom&product=login"}),Z.Sscp=Object(y.a)(Object(y.a)({},Z.Sscp),{},{DefaultUrl:"https://login.barclays.com/signin?channel=sscp&product=login"});break;case"TEST":Y.Transmit=Object(y.a)(Object(y.a)({},Y.Transmit),{},{Endpoint:"https://olbauth.regionstest.com",Env:"",IsLocalHost:!1}),Y.Logging=Object(y.a)(Object(y.a)({},Y.Logging),{},{Endpoint:"https://ciam-test.api.regionstest.com/v1/logger/log",EnabledLevels:[4,5]}),Z.Olb=Object(y.a)(Object(y.a)({},Z.Olb),{},{ForgotPassword:"https://onlinebanking.regionstest.com/customerservice/forgottenpassword",AccountOverview:"https://onlinebanking.regionstest.com/accounts/overview",EnrollNow:"https://onlinebanking.regionstest.com/enrollment/home"}),Z.Clsp=Object(y.a)(Object(y.a)({},Z.Clsp),{},{DefaultUrl:"https://login.regionstest.com/signin?channel=clsp&product=mortgage"}),Z.rdom=Object(y.a)(Object(y.a)({},Z.rdom),{},{DefaultUrl:"https://login.regionstest.com/signin?channel=rdom&product=login"}),Z.Sscp=Object(y.a)(Object(y.a)({},Z.Sscp),{},{DefaultUrl:"https://login.regionstest.com/signin?channel=sscp&product=login"});break;case"Q1":case"Q2":case"Q3":case"Q5":case"Q6":case"Q7":case"Q8":case"Q9":case"Q10":Y.Transmit=Object(y.a)(Object(y.a)({},Y.Transmit),{},{Endpoint:"https://tsqaauth.rgbk.com",Env:t,IsLocalHost:!1}),Y.Logging=Object(y.a)(Object(y.a)({},Y.Logging),{},{Endpoint:"https://ciam-qa.api.regionstest.com/v1/logger/log",EnabledLevels:[2,3,4,5]}),Z.Olb=Object(y.a)(Object(y.a)({},Z.Olb),{},{ForgotPassword:"https://onlinebankingregions".concat(t,".rgbk.com/customerservice/forgottenpassword"),AccountOverview:"https://onlinebankingregions".concat(t,".rgbk.com/accounts/overview"),EnrollNow:"https://onlinebankingregions".concat(t,".rgbk.com/enrollment/home")}),Z.Clsp=Object(y.a)(Object(y.a)({},Z.Clsp),{},{DefaultUrl:"https://login-qa.rgbk.com/signin?channel=clsp&olbenv=".concat(t,"&product=mortgage")}),Z.rdom=Object(y.a)(Object(y.a)({},Z.rdom),{},{DefaultUrl:"https://login-qa.rgbk.com/signin?channel=rdom&olbenv=".concat(t,"&product=login")}),Z.Sscp=Object(y.a)(Object(y.a)({},Z.Sscp),{},{DefaultUrl:"https://login-qa.rgbk.com/signin?channel=sscp&olbenv=".concat(t,"&product=login")});break;case"Q4":case"QA":Y.Transmit=Object(y.a)(Object(y.a)({},Y.Transmit),{},{Endpoint:"https://tsqaauth.rgbk.com",Env:"q4",IsLocalHost:!1}),Y.Logging=Object(y.a)(Object(y.a)({},Y.Logging),{},{Endpoint:"https://ciam-qa.api.regionstest.com/v1/logger/log",EnabledLevels:[4,5]}),Z.Olb=Object(y.a)(Object(y.a)({},Z.Olb),{},{ForgotPassword:"https://onlinebankingregionsq4.rgbk.com/customerservice/forgottenpassword",AccountOverview:"https://onlinebankingregionsq4.rgbk.com/accounts/overview",EnrollNow:"https://onlinebankingregionsq4.rgbk.com/enrollment/home"}),Z.Clsp=Object(y.a)(Object(y.a)({},Z.Clsp),{},{DefaultUrl:"https://login-qa.rgbk.com/signin?channel=clsp&olbenv=q4&product=mortgage"}),Z.Sscp=Object(y.a)(Object(y.a)({},Z.Sscp),{},{DefaultUrl:"https://login-qa.rgbk.com/signin?channel=sscp&olbenv=q4&product=login"}),Z.rdom=Object(y.a)(Object(y.a)({},Z.rdom),{},{DefaultUrl:"https://login-qa.rgbk.com/signin?channel=rdom&olbenv=q4&product=login"}),Z.Sscp=Object(y.a)(Object(y.a)({},Z.Sscp),{},{DefaultUrl:"https://login-qa.rgbk.com/signin?channel=sscp&olbenv=q4&product=login"})}}(function(){var e="LOCAL";switch(window.location.hostname){case"login-dev.rgbk.com":switch(£){case"d1":e="D1";break;case"d2":e="D2";break;case"d3":e="D3";break;case"d4":e="D4";break;case"d5":e="D5";break;case"d6":e="D6";break;case"d7":e="D7";break;case"d8":e="D8";break;case"d9":e="D9";break;case"d10":e="D10";break;default:e="DEV"}break;case"login-qa.rgbk.com":switch(£){case"q1":e="Q1";break;case"q2":e="Q2";break;case"q3":e="Q3";break;case"q4":e="Q4";break;case"q5":e="Q5";break;case"q6":e="Q6";break;case"q7":e="Q7";break;case"q8":e="Q8";break;case"q9":e="Q9";break;case"q10":e="Q10";break;default:e="QA"}break;case"login-ci.rgbk.com":e="CI";break;case"login-test.regionstest.com":case"login-beta.regionstest.com":case"login.regionstest.com":e="TEST";break;case"login.barclays.com":case"login-beta.barclays.com":e="PROD";break;default:e="LOCAL"}return e}());var X=Y,ee=Z,te=function(e,t){var n="REGIONS.tracking.ciam",o="eap",r="".concat(o,"|").concat(e,"|").concat(t),i=new URLSearchParams(document.location.search).get(X.ChannelQueryKey),s=new CustomEvent(n,{detail:{event:n,Subdomain:o,Channel:i,Page:r}});document.body.dispatchEvent(s),window.trackingCiam={event:n,subdomain:o,channel:i,page:r}},ne=function(){var e=Object(o.useRef)(null),t=Object(o.useState)(!1),n=Object(a.a)(t,2),r=n[0],i=n[1],s=K(),c=s.authDispatch,u=s.authState.UserInput.Username;return Object(o.useEffect)((function(){var t;te("retrieveusername","RetreiveUsernameSucces"),null===(t=e.current)||void 0===t||t.focus()}),[]),Object(d.jsxs)(h,{handleSubmit:function(){var e;i(!0);var t=null===(e=document.getElementById("hdnRelyingParty"))||void 0===e?void 0:e.value;void 0!==t&&""!==t?(document.getElementById("hdnRelyingParty").value="",window.location.href=t):c({type:H.UserName})},children:[Object(d.jsx)("div",{className:"centered",children:Object(d.jsxs)("h2",{className:"tile-header",ref:e,tabIndex:-1,children:["Your username is ",Object(d.jsx)("strong",{children:u}),".",Object(d.jsx)("div",{children:"Please make note of this username before continuing to log in."})]})}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",children:[Object(d.jsx)("div",{className:"centered",children:Object(d.jsxs)("p",{children:["Ready to log in as ",Object(d.jsx)("strong",{children:u}),"?"]})}),Object(d.jsx)(m,{children:Object(d.jsx)(l.Button,{variant:"primary","data-testid":"continue_button",text:"Continue",size:"large",type:"submit",ariaLabel:"Log in as ".concat(u,"."),isLoading:r,loadingText:"Loading",isDisabled:r,isFullWidth:!0})})]})})]})},oe=function(e){var t=e.heading,n=e.description,o=e.subHeading,r=e.error;return Object(d.jsxs)(l.Stack,{verticalSpacing:"80",isCentered:!0,classes:"auth-heading",children:[t&&Object(d.jsx)("h1",{className:"centered text-style-heading-2",children:t}),n&&Object(d.jsx)("h2",{className:"auth-heading__description tile-header.emphasis",tabIndex:-1,dangerouslySetInnerHTML:{__html:n}}),o&&Object(d.jsx)("p",{dangerouslySetInnerHTML:{__html:o}}),r&&Object(d.jsxs)("h2",{className:"auth-heading__error tile-header-page",id:"auth-heading-error",tabIndex:-1,children:[Object(d.jsx)("span",{className:"form-control__error-icon","aria-hidden":"true",children:Object(d.jsx)(l.IconAlertCircle,{})}),Object(d.jsx)("span",{dangerouslySetInnerHTML:{__html:r}})]})]})};oe.defaultProps={heading:"",description:"",subHeading:"",error:""};var re=oe,ie=n(69),se=n(70),ae=n(71),ce=n(72),ue=n(73),le=n(74),de=n(75),pe=n(76),he=function(){var e="";switch(new URLSearchParams(document.location.search).get(X.ChannelQueryKey)){case"mbank":e=se;break;case"sscp":e=ae;break;case"blnd":e=ce;break;case"rdo":e=pe;break;case"clsp":e=ue;break;case"rmda":e=le;break;case"rdom":e=de;break;default:e=ie}return e},fe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=he(),r=new URLSearchParams(document.location.search),i=r.get(X.ProductQueryKey);if(o=o[i]?o[i]:o.default,n)return o[n];if([H.Lockout,H.IALockout,H.GenericError,H.FPWrongUsername,H.FPLockout].includes(e))return o.errorContent;if(e===H.UserName)return o.login;if(e===H.RetrieveUserName)return o.retrieveUsername;if(e===H.ForgotPassword)return o.forgotPassword;switch(t){case X.Transmit.ForgotPasswordPolicyId:return o.forgotPassword;case X.Transmit.RecoverUserIdPolicyId:return o.retrieveUsername;case X.Transmit.policyId:default:return o.login}},me=function(){var e=he(),t=e.docTitle,n=new URLSearchParams(document.location.search).get(X.ProductQueryKey),o=(e=e[n]?e[n]:e.default).docTitle;return Object(y.a)(Object(y.a)({},t),o)},ge=function(e){var t=e.AuthStep,n=e.IsUsernameRetrieved,o=e.ErrorType,r=e.TransmitError,i=e.LockoutType,s=e.isChallengeQuestion,a=me();switch(t){case H.UserName:return n?a.usernameRetrievedSuccess:"true"===sessionStorage.getItem("STO")?a.sessionExpired:a[t];case H.Password:return o.IsInvalidUsernameOrPassword?a.invalidUsernameOrPasswordStep:a[t];case H.SelfServiceError:switch(r){case"noTargetsInRCIF":return a.noTargetsInRCIF;case"lockedFromSelfService":return a.lockedFromSelfService;default:return a[t]}case H.GenericError:switch(!0){case o.IsMaintenanceEnabled:return a.maintenanceEnabled;case o.IsTMXReject:return a.tmxReject;case o.IsStepupInsufficient:return a.stepupInsufficient;default:return a[t]}case H.Lockout:switch(!0){case i.IsPasswordExpired:return a.passwordExpired;case i.isAccountInactive:return a.SelfServiceError;default:return a.accountLocked}case H.ChallengeQuestion:return s?a.challengeSecurityQuestion:a[t];default:return a[t]}},ye=function(e,t,n,o){var r=fe(e,n.policyId);switch(e){case H.GenericError:case H.SelfServiceError:case H.FPWrongUsername:return"";case H.Lockout:switch(!0){case t.IsPasswordLockout:return r.lockoutStep.badCreds[o];case t.IsPasswordExpired:return r.lockoutStep.passwordExpired[o];case t.IsFIDisabled:return r.lockoutStep.fiDisabled[o];case t.IsFPLockout:return r.lockoutStep.badFPData[o];case t.isAccountInactive:return r.lockoutStep.accountNotActive[o];case t.IsOTPLockout:default:return r.lockoutStep.badOTC[o]}case H.IALockout:return r.lockoutStep.badSecurityQuestion[o];default:return r[e]?r[e][o]:""}},be=function(){var e=K().authState;return Object(d.jsx)(u.a,{children:Object(d.jsx)("title",{children:ge(e)})})},ve=function(){return Object(d.jsx)("header",{className:"header",role:"banner",children:Object(d.jsx)("a",{href:ee.Rdc.DefaultUrl,rel:"noreferrer",children:Object(d.jsx)(l.Logo,{})})})},_e=[{linkText:"Contact Us",hrefPath:X.Urls.ContactUs,dataTestId:"contact-us-link",target:"_blank"},{linkText:"Terms and Conditions",hrefPath:X.Urls.AgreementAndDisclosure,dataTestId:"terms-link",target:"_blank"},{linkText:"Privacy Pledge",hrefPath:X.Urls.PrivacyPledge,dataTestId:"privacy-pledge-link",target:"_blank"},{linkText:"Security",hrefPath:X.Urls.PrivacyAndSecurity,dataTestId:"security-link",target:"_blank"},{linkText:"Notice at Collection",hrefPath:X.Urls.NoticeAtCollection,dataTestId:"notice-link",target:"_blank"},{linkText:"Online Tracking & Advertising",hrefPath:X.Urls.OnlineTrackingAdvertising,dataTestId:"tracking-link",target:"_blank"},{linkText:"Accessible Banking",hrefPath:X.Urls.AccessibleBanking,dataTestId:"accessible-banking-link",target:"_blank"},{linkText:"Leave Feedback",hrefPath:X.Urls.LeaveFeedback,dataTestId:"feedback-link",target:"_blank"}],we=function(e){var t=e.children,n=fe(null,null,"footerDisclosure")||"";return Object(d.jsx)(o.Fragment,{children:Object(d.jsxs)("div",{className:"auth-layout",children:[Object(d.jsx)("a",{className:"skip-link",href:"#main",children:"skip to main content"}),Object(d.jsx)(ve,{}),Object(d.jsx)("main",{className:"main",id:"main",role:"main",children:t}),Object(d.jsxs)(l.Footer,{children:[n&&Object(d.jsx)(l.FooterDisclosures,{disclosures:n}),Object(d.jsx)(l.FooterServiceLinks,{footerLinks:_e}),Object(d.jsxs)("p",{className:"text-style-body-4",children:["Call ",Object(d.jsx)("a",{href:"tel:+18007344667",children:"1-800-Barclays (1-657-760-1476)"})," ","or visit"," ",Object(d.jsx)("a",{href:X.Urls.ContactUs,rel:"noreferrer",target:"_blank",children:"London Investment Help & Support"}),"."]}),Object(d.jsx)(l.FooterLegal,{})]})]})})},Ae=n(7),Se=function(e){var t=e.children,n=K(),r=n.authState,i=r.UserInput.RememberUsername,s=r.SessionTimeout.UsernameUpdated,c=r.AuthStep,u=r.LockoutType,p=r.TransmitEvents,h=r.ErrorType,f=r.RecoverUserStepError,m=n.authDispatch,g=new URLSearchParams(document.location.search).get(X.ChannelQueryKey),y=Object(o.useState)(ye(c,u,p,"heading")),b=Object(a.a)(y,2),_=b[0],w=b[1],A=Object(o.useState)(ye(c,u,p,"description")),S=Object(a.a)(A,2),k=S[0],C=S[1];Object(o.useEffect)((function(){w(ye(c,u,p,"heading")),C(ye(c,u,p,"description")),c===H.UserName&&"false"!==sessionStorage.getItem("TER")||sessionStorage.setItem("STO",!1),sessionStorage.setItem("TER",!1),c===H.UserName&&(m({type:P,key:"UsernameFlow",value:!1}),m({type:P,key:"PasswordFlow",value:!1})),m({type:P,key:"UsernameUpdated",value:!1})}),[c]);var I=null===localStorage.getItem("username")?"":localStorage.getItem("username").trim();I&&"undefined"!==I&&!0!==i&&m({type:v,key:x,value:!0});var E="";switch(!0){case h.IsInvalidUsernameOrPassword:E=Ae.pageLevelErrors.invalidUsernameOrPassword,null!=document.getElementById("auth-heading-error")&&document.getElementById("auth-heading-error").focus();break;case"true"===sessionStorage.getItem("STO")&&i&&s&&c===H.UserName:case"true"===sessionStorage.getItem("STO")&&!i&&s&&c===H.UserName:E=Ae.pageLevelErrors.sessionTimedout;break;case"true"===sessionStorage.getItem("STO")&&c===H.UserName:E=Ae.pageLevelErrors.sessionTimedout,null!=document.getElementById("auth-heading-error")&&document.getElementById("auth-heading-error").focus();break;case h.IsRecoverUserStepError:E=f;break;default:E=void 0}return Object(d.jsxs)(o.Fragment,{children:[Object(d.jsx)(be,{}),Object(d.jsx)(we,{authSite:g,children:Object(d.jsx)(l.Container,{verticalSpacing:"30",children:Object(d.jsx)("div",{className:"content-wrapper",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsx)(re,{heading:_,description:k,error:E}),Object(d.jsx)("div",{style:{position:"relative",width:"100%"},children:t})]})})})})]})};Se.defaultProps={children:void 0};var ke=Se,Ce=function(e){var t=e.children;return Object(d.jsx)(l.Stack,{isCentered:!0,verticalSpacing:"40",children:t})},Ie=Ce;Ce.defaultProps={children:void 0};var Ee=n(23),Re=n(13),Pe=n(14),Oe=n(18),xe=n(17);function Te(e){return(Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function De(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"";return De(this,t),(e=Ue(this,qe(t).call(this))).setText(n),e}return Me(t,it),Fe(t,[{key:"buildElement",value:function(){return ot("")}},{key:"setText",value:function(e){this.element.text(null==e?"":e)}}]),t}(),at=function(e){function t(){var e;return De(this,t),(e=Ue(this,qe(t).apply(this,arguments))).children=[],e}return Me(t,it),Fe(t,[{key:"prependChild",value:function(e){e.prependInto(this.element),this.children.push(e)}},{key:"prependChildren",value:function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o")}}]),t}(),ut="xmui-info-panel",lt=function(e){function t(){var e;De(this,t),(e=Ue(this,qe(t).call(this))).className=ut,e.titleComponent=new st,e.titleComponent.className="".concat(ut,"_title"),e.titleComponent.automationId="xmui-info-panel-title",e.instructionsComponent=new st,e.instructionsComponent.className="".concat(ut,"_instructions"),e.instructionsComponent.automationId="xmui-info-panel-instructions",e.instructionsComponent.show=!1;var n=new ct;return n.className="".concat(ut,"_container"),n.appendChildren(e.titleComponent,e.instructionsComponent),e.appendChild(n),e}return Me(t,ct),Fe(t,[{key:"setTitle",value:function(e){this.titleComponent.setText(e)}},{key:"setInstructions",value:function(e){var t=e?e.trim():"";this.instructionsComponent.setText(t),this.instructionsComponent.show=!!t}}]),t}(),dt="xmui-header-panel",pt=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return De(this,t),(e=Ue(this,qe(t).call(this))).className=dt,e.addClass("".concat(dt,n?"--short":"--normal")),e.iconComp=new ct,e.iconComp.className="".concat(dt,"_icon"),e.iconComp.show=!1,e.textComp=new st,e.textComp.className="".concat(dt,"_text"),e.appendChildren(e.iconComp,e.textComp),e}return Me(t,ct),Fe(t,[{key:"setText",value:function(e){this.textComp.setText(e)}},{key:"setIcon",value:function(e){this.iconComp.className="".concat(dt,"_icon ").concat(e),this.iconComp.show=!0}}]),t}(),ht="xmui-action-panel",ft=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return De(this,t),(e=Ue(this,qe(t).call(this))).className=ht,e.addClass("".concat(ht,n?"--short":"--normal")),e.leftButtonsContainer=new ct,e.leftButtonsContainer.className="".concat(ht,"_left"),e.rightButtonsContainer=new ct,e.rightButtonsContainer.className="".concat(ht,"_right"),e.appendChildren(e.leftButtonsContainer,e.rightButtonsContainer),e}return Me(t,ct),Fe(t,[{key:"addLeftButton",value:function(e){this.leftButtonsContainer.appendChild(e)}},{key:"addRightButton",value:function(e){this.rightButtonsContainer.appendChildren(e)}}]),t}(),mt="xmui-busy-indicator",gt=function(e){function t(){var e;De(this,t),(e=Ue(this,qe(t).call(this))).className=mt;var n=new ct;return n.className="".concat(mt,"_animation"),e.appendChild(n),e}return Me(t,ct),t}();!function(e){e.User="xmui-icon-user",e.Remove="xmui-icon-remove",e.Rename="xmui-icon-rename",e.More="xmui-icon-more",e.CircledMore="xmui-icon-circled-more",e.PasswordVisible="xmui-icon-password-input-visible",e.PasswordHidden="xmui-icon-password-input-hidden",e.Device="xmui-icon-device",e.Registered="xmui-icon-registered",e.WebBrowser="xmui-icon-web-browser",e.Expand="xmui-icon-expand",e.LockedState="xmui-icon-locked-state",e.MobileApproveWaiting="xmui-icon-mobile-approve-waiting",e.WaitForTicket="xmui-icon-wait-for-ticket",e.Checked="xmui-icon-checked",e.Unchecked="xmui-icon-unchecked",e.Checkmark="xmui-icon-checkmark",e.Cancellation="xmui-icon-cancellation",e.Expiration="xmui-icon-expired",e.Information="xmui-icon-information",e.Confirmation="xmui-icon-confirmation",e.Rejection="xmui-icon-rejection",e.AuthLocked="xmui-icon-locked",e.Error="xmui-icon-error",e.Unregister="xmui-icon-unregister",e.Fallback="xmui-icon-fallback",e.Promotion="xmui-icon-promotion",e.PasswordAuth="xmui-icon-password-auth",e.PincodeAuth="xmui-icon-pincode-auth",e.PatternAuth="xmui-icon-pattern-auth",e.OtpAuth="xmui-icon-otp-auth",e.VoiceAuth="xmui-icon-voice-auth",e.QuestionsAuth="xmui-icon-questions-auth",e.TotpAuth="xmui-icon-totp-auth",e.MobileApproveAuth="xmui-icon-mobile-approve-auth",e.GenericAuth="xmui-icon-generic-auth",e.SmsChannel="xmui-icon-sms-channel",e.EmailChannel="xmui-icon-email-channel",e.PushChannel="xmui-icon-push-channel",e.VoiceChannel="xmui-icon-voice-channel"}(rt||(rt={}));var yt="xmui-page",bt=function(e){function t(e,n){var o,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return De(this,t),(o=Ue(this,qe(t).call(this))).forceShowHeader=r,o.className=yt,o.role="dialog",o.headerPanel=new pt,o.headerPanel.show=o.forceShowHeader||!1,o.infoPanel=new lt,o.infoPanel.show=!1,o.contentContainer=new ct,o.contentContainer.className="".concat(yt,"_content"),o.busyIndicator=new gt,o.contentContainer.appendChild(o.busyIndicator),o.busy=!1,o.actionPanel=new ft,o.appendChildren(o.headerPanel,o.infoPanel,o.contentContainer,o.actionPanel),o.automationId=e,o.addClass(n),o}return Me(t,ct),Fe(t,[{key:"setInstructions",value:function(e){this.infoPanel.setInstructions(e),this.infoPanel.show=!0}},{key:"setUserName",value:function(e){e?(this.headerPanel.setText(e),this.headerPanel.setIcon(rt.User),this.headerPanel.show=!0):this.headerPanel.show=this.forceShowHeader||!1}},{key:"blockInteraction",value:function(){this.element.blockInteraction()}},{key:"unblockInteraction",value:function(){this.element.unblockInteraction()}},{key:"setContent",value:function(e){this.contentContainer.appendChild(e)}},{key:"setTitle",value:function(e){this.infoPanel.setTitle(e),this.infoPanel.show=!0}},{key:"addLeftButton",value:function(e){this.actionPanel.addLeftButton(e)}},{key:"addRightButton",value:function(e){this.actionPanel.addRightButton(e)}},{key:"busy",set:function(e){this.busyIndicator.show=e}},{key:"error",set:function(e){this.infoPanel.error=e}}]),t}(),vt=function e(){De(this,e)};vt.button_cancel="xmui-button-cancel",vt.button_back="xmui-button-back",vt.button_abort="xmui-button-abort",vt.button_retry="xmui-button-retry",vt.button_continue="xmui-button-continue",vt.button_reset="xmui-button-reset",vt.button_change_method="xmui-button-change-method",vt.button_select_method="xmui-button-select-method",vt.button_send_to_all="xmui-button-send-to-all",vt.button_actions_list="xmui-button-actions-list",vt.button_skip="xmui-button-skip",vt.button_rename="xmui-button-rename",vt.button_identify="xmui-button-identify",vt.button_remove="xmui-button-remove",vt.button_escape="xmui-button-escape",vt.button_recovery="xmui-button-recovery",vt.button_dynamic="xmui-button-dynamic",vt.button_add_question="xmui-button-add-question",vt.list_actions="xmui-list-actions",vt.list_item_text_state="xmui-list-item-text-state",vt.list_item_icon_state="xmui-list-item-icon-state",vt.dialog_recovery="xmui-dialog-recovery",vt.dialog_cancellation="xmui-dialog-cancellation",vt.dialog_confirm="xmui-dialog-confirm",vt.dialog_information="xmui-dialog-information",vt.dialog_title="xmui-dialog-title",vt.dialog_message="xmui-dialog-message",vt.dialog_fallback="xmui-dialog-fallback",vt.dialog_registration_promotion_intro="xmui-dialog-registration-promotion-intro",vt.popup_dialog_confirm="xmui-popup-dialog-confirm",vt.popup_dialog_input="xmui-popup-dialog-input",vt.input_password="xmui-input-password",vt.input_repeat_password="xmui-input-repeat-password",vt.input_fido2="xmui-input-fido2",vt.input_repeat_fido2="xmui-input-repeat-fido2",vt.input_pin_code="xmui-input-pin-code",vt.input_pattern_lock="xmui-input-pattern-lock",vt.input_otp_code="xmui-input-otp-code",vt.input_totp_code="xmui-input-totp-code",vt.input_text="xmui-input-text",vt.input_email="xmui-input-email",vt.input_security_question="xmui-input-security-question",vt.input_mobile_phone_number="xmui-input-mobile-phone-number",vt.input_mobile_phone_coutry_code="xmui-input-mobile-phone-country-code",vt.page_password_auth="xmui-page-password-auth",vt.page_password_reg="xmui-page-password-reg",vt.page_fido2_auth="xmui-page-fido2-auth",vt.page_fido2_reg="xmui-page-fido2-reg",vt.page_pin_auth="xmui-page-pin-auth",vt.page_pin_reg="xmui-page-pin-reg",vt.page_pattern_auth="xmui-page-pattern-auth",vt.page_pattern_reg="xmui-page-pattern-reg",vt.page_otp_auth="xmui-page-otp-auth",vt.page_totp_auth="xmui-page-totp-auth",vt.page_ticket_wait="xmui-page-ticket-wait",vt.page_mobile_approve="xmui-page-mobile-approve",vt.page_select_device="xmui-page-select-device",vt.page_otp_select_channel="xmui-page_otp_select_channel",vt.page_configure_authenticators="xmui-page-configure-authenticators",vt.page_manage_devices="xmui-page-manage-devices",vt.page_select_device_to_manage="xmui-page-select-managed-device",vt.page_select_authenticator="xmui-page-select-authenticator",vt.page_manage_user_details="xmui-page-manage-user-details",vt.page_dynamic_form="xmui-page-dynamic-form",vt.page_security_questions_auth="xmui-page-security-questions-auth",vt.page_security_questions_reg="xmui-page-security-questions-reg";var _t,wt="xmui-dialog-content",At=function(e){function t(){var e;return De(this,t),(e=Ue(this,qe(t).call(this))).className=wt,e.ariaRole="dialog",e.ariaLabeledBy="".concat(wt,"_title"),e.ariaDescribedBy="".concat(wt,"_message"),e.createContent(),e}return Me(t,ct),Fe(t,[{key:"setDialogTitle",value:function(e){this.titleComp.setText(e)}},{key:"setDialogMessage",value:function(e){this.messageComp.setText(e)}},{key:"setDialogIconClass",value:function(e){this.iconComp.className="".concat(wt,"_icon ").concat(e)}},{key:"createContent",value:function(){this.iconComp=new ct,this.iconComp.className="".concat(wt,"_icon"),this.titleComp=new st,this.titleComp.className="".concat(wt,"_title"),this.titleComp.automationId=vt.dialog_title,this.messageComp=new st,this.messageComp.className="".concat(wt,"_message"),this.messageComp.automationId=vt.dialog_message,this.appendChildren(this.iconComp,this.titleComp,this.messageComp)}}]),t}(),St=function(e){function t(e,n){var o;return De(this,t),(o=Ue(this,qe(t).call(this,e,n))).handleClick=o.handleClick.bind(Ne(o)),o.dialogContent=new At,o.setContent(o.dialogContent),o}return Me(t,bt),Fe(t,[{key:"addLeftButton",value:function(e){e.onClick(this.handleClick),We(qe(t.prototype),"addLeftButton",this).call(this,e)}},{key:"addRightButton",value:function(e){e.onClick(this.handleClick),We(qe(t.prototype),"addRightButton",this).call(this,e)}},{key:"setDialogTitle",value:function(e){this.dialogContent.setDialogTitle(e)}},{key:"setDialogMessage",value:function(e){this.dialogContent.setDialogMessage(e)}},{key:"setDialogIconClass",value:function(e){this.dialogContent.setDialogIconClass(e)}},{key:"onSelect",value:function(e){this.onSelectCB=e}},{key:"handleClick",value:function(e){this.onSelectCB(e.value)}}]),t}(),kt="ts_gen_back",Ct="ts_gen_continue",It="ts_gen_cancel",Et="ts_gen_close",Rt="ts_gen_default",Pt="ts_gen_restart",Ot="ts_authenticator_mobile_approve",xt="ts_authenticator_password_title_auth",Tt="ts_authenticator_password_title_reg",Dt="ts_authenticator_password_intro_auth",Lt="ts_authenticator_password_intro_reg",Ft="ts_authenticator_password_field_hint",jt="ts_authenticator_password_reg_field_hint",Mt="ts_authenticator_password_cta_positive",qt="ts_authenticator_password_error_reg_no_match",Bt="ts_authenticator_password_error_reg_strength_validation_failed",Nt="ts_authenticator_pin_title_auth",Ut="ts_authenticator_pin_title_reg",Ht="ts_authenticator_pin_intro_auth",Wt="ts_authenticator_pin_intro_reg",Kt="ts_authenticator_pin_intro_repeat",zt="ts_authenticator_pin_error_reg_no_match",Vt="ts_authenticator_otp_title_auth",Qt="ts_authenticator_otp_targets_intro",Gt="ts_authenticator_otp_sms_title",Jt="ts_authenticator_otp_email_title",Yt="ts_authenticator_otp_voice_title",Zt="ts_authenticator_otp_push_title",£t="ts_authenticator_otp_sms_sent",Xt="ts_authenticator_otp_email_sent",en="ts_authenticator_otp_push_sent",tn="ts_authenticator_otp_voice_sent",nn="ts_authenticator_otp_external_numeric_sent",on="ts_authenticator_otp_resend",rn="ts_authenticator_otp_resend_message",sn="ts_authenticator_otp_error_code_expired",an="ts_authenticator_pattern_title_auth",cn="ts_authenticator_pattern_title_reg",un="ts_authenticator_pattern_intro_auth",ln="ts_authenticator_pattern_intro_reg",dn="ts_authenticator_pattern_mismatch",pn="ts_authenticator_pattern_error_min_points",hn="ts_authenticator_pattern_intro_repeat",fn="ts_authenticator_pattern_cta_reset",mn="ts_authenticator_questions_title_auth",gn="ts_authenticator_questions_title_reg",yn="ts_authenticator_questions_intro_auth",bn="ts_authenticator_questions_intro_reg",vn="ts_authenticator_questions_error_answer_range",_n="ts_authenticator_questions_left",wn="ts_authenticator_questions_error_answer_empty",An="ts_authenticator_questions_add_question_cta",Sn="ts_authenticator_totp_title",kn="ts_authenticator_totp_targets_intro",Cn="ts_authenticator_totp_input_intro",In="ts_authenticator_totp_input_with_challenge_intro",En="ts_authenticator_totp_input_with_qr_challenge_intro",Rn="ts_authenticator_totp_qrcode_challenge_step1_message",Pn="ts_authenticator_totp_qrcode_challenge_step2_message",On="ts_authenticator_totp_code_challenge_step1_message",xn="ts_authenticator_totp_code_challenge_step2_message",Tn="ts_authenticator_totp_input_hint",Dn="ts_authenticator_mobile_approve_send_to_all",Ln="ts_authenticator_mobile_approve_targets_intro",Fn="ts_authenticator_mobile_approve_targets_recently_used",jn="ts_session_config_title",Mn="ts_session_config_intro",qn="ts_session_config_item_action_register",Bn="ts_session_config_item_action_unregister",Nn="ts_session_config_item_action_reregister",Un="ts_session_config_item_action_set_as_default",Hn="ts_session_config_item_register_result",Wn="ts_session_config_item_reregister_result",Kn="ts_session_config_item_unregister_result",zn="ts_session_config_item_default_result",Vn="ts_session_config_item_register_failed",Qn="ts_session_config_item_reregister_failed",Gn="ts_session_config_item_unregister_failed",Jn="ts_session_config_item_default_failed",Yn="ts_session_config_item_unregister_dialog_title",Zn="ts_session_config_item_unregister_dialog_message",£n="ts_session_config_item_unregister_dialog_cta",Xn="ts_session_config_error_dialog_title",eo="ts_session_dm_title",to="ts_session_dm_section_current",no="ts_session_dm_last_used_date",oo="ts_session_dm_details_title",ro="ts_session_dm_details_subtitle",io="ts_session_dm_details_current_device",so="ts_session_dm_details_rename_action",ao="ts_session_dm_details_remove_subtitle",co="ts_session_dm_details_remove_action",uo="ts_session_dm_item_action_dialog_remove_title",lo="ts_session_dm_item_action_dialog_remove_message",po="ts_session_dm_item_action_dialog_remove_cta",ho="ts_session_dm_item_action_dialog_rename_title",fo="ts_session_dm_item_action_dialog_rename_cta",mo="ts_session_dm_details_rename_input_hint",go="ts_session_dm_item_action_rename_result_positive",yo="ts_session_dm_item_action_rename_result_negative",bo="ts_session_dm_item_action_remove_result_positive",vo="ts_session_dm_item_action_remove_result_negative",_o="ts_session_dm_error_dialog_title",wo="ts_session_promotion_title",Ao="ts_session_promotion_intro",So="ts_session_promotion_skip",ko="ts_session_promotion_abort",Co="ts_promise_sa_title",Io="ts_promise_sa_content",Eo="ts_promise_fallback_title",Ro="ts_promise_fallback_content",Po="ts_promise_co_content",Oo="ts_promise_co_abort",xo="ts_promise_co_select",To="ts_promise_co_change",Do="ts_promise_co_retry",Lo="ts_promise_error_default_title_auth",Fo="ts_promise_error_default_title_reg",jo="ts_promise_error_default_content_auth",Mo="ts_promise_error_default_content_reg",qo="ts_promise_error_lock_title",Bo="ts_promise_error_lock_content",No="ts_promise_rejection_policy_title",Uo="ts_promise_rejection_policy_content",Ho="ts_promise_rejection_policy_cta",Wo="ts_promise_rejection_locked_user_title",Ko="ts_promise_rejection_locked_user_content",zo="ts_promise_rejection_locked_user_cta",Vo="ts_promise_rejection_locked_device_title",Qo="ts_promise_rejection_locked_device_content",Go="ts_promise_rejection_locked_device_cta",Jo="ts_promise_rejection_locked_application_title",Yo="ts_promise_rejection_locked_application_content",Zo="ts_promise_rejection_locked_application_cta",£o="ts_promise_rejection_approval_expired_title",Xo="ts_promise_rejection_approval_expired_content",er="ts_promise_rejection_approval_expired_cta",tr="ts_session_authenticator_expired_title",nr="ts_session_authenticator_expired_content",or="ts_promise_rejection_feature_not_supported_title",rr="ts_promise_rejection_feature_not_supported_content",ir="ts_promise_rejection_feature_not_supported_cta",sr="ts_promise_rejection_cannot_consume_ticket_title",ar="ts_promise_rejection_cannot_consume_ticket_content",cr="ts_promise_rejection_cannot_consume_ticket_cta",ur="ts_promise_rejection_username_already_exists_title",lr="ts_promise_rejection_username_already_exists_content",dr="ts_promise_rejection_username_already_exists_cta",pr="ts_accessibility_password_enter_password",hr="ts_accessibility_password_enter_password_again",fr="ts_gen_recovery",mr=0,gr=function(){return"".concat("xmui-id-").concat((new Date).getTime().toString(),"-").concat(++mr)},yr="xmui-list-item",br=function(e){function t(e,n){var o,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];De(this,t),(o=Ue(this,qe(t).call(this))).key=e,o.id=gr(),o.className=yr,r&&o.addClass("".concat(yr,"--section-start"));var i=new ct;return i.className="".concat(yr,"_hover-indicator"),o.contentContainer=new ct,o.contentContainer.className="".concat(yr,"_content-container"),o.appendChildren(i,o.contentContainer),n&&o.addCheckbox(),o.role="option",o}return Me(t,ct),Fe(t,[{key:"setContent",value:function(e){this.contentContainer.setContent(e)}},{key:"addCheckbox",value:function(){var e=new ct;e.className="".concat(yr,"_checkbox"),this.appendChild(e)}}]),t}();!function(e){e[e.Backspace=8]="Backspace",e[e.Tab=9]="Tab",e[e.Enter=13]="Enter",e[e.Shift=16]="Shift",e[e.Ctrl=17]="Ctrl",e[e.Alt=18]="Alt",e[e.Escape=27]="Escape",e[e.Space=32]="Space",e[e.PageUp=33]="PageUp",e[e.PageDown=34]="PageDown",e[e.End=35]="End",e[e.Home=36]="Home",e[e.LeftArrow=37]="LeftArrow",e[e.UpArrow=38]="UpArrow",e[e.RightArrow=39]="RightArrow",e[e.DownArrow=40]="DownArrow",e[e.Zero=48]="Zero",e[e.One=49]="One",e[e.Two=50]="Two",e[e.Three=51]="Three",e[e.Four=52]="Four",e[e.Five=53]="Five",e[e.Six=54]="Six",e[e.Seven=55]="Seven",e[e.Eight=56]="Eight",e[e.Nine=57]="Nine"}(_t||(_t={}));var vr,_r=function(){function e(t){De(this,e),this.container=t,this.container.ariaActiveDescendant="",this.container.onKeydown(this.handleNavigation.bind(this))}return Fe(e,[{key:"onSelect",value:function(e){this.selectCB=e}},{key:"activateItem",value:function(e){e&&e!==this.activeItem&&(this.deactivateItem(),this.activeItem=e,e.active=!0,this.container.ariaActiveDescendant=e.id,this.scrollToItem(e))}},{key:"deactivateItem",value:function(e){var t=null==e||e===this.activeItem?this.activeItem:null;t&&(this.activeItem=null,t.active=!1,this.container.ariaActiveDescendant="")}},{key:"handleNavigation",value:function(e,t){switch(t.keyCode){case _t.DownArrow:this.handleDownArrow(),t.preventDefault(),t.stopPropagation();break;case _t.UpArrow:this.handleUpArrow(),t.preventDefault(),t.stopPropagation();break;case _t.Enter:case _t.Space:this.handleEnter(),t.stopPropagation()}}},{key:"handleDownArrow",value:function(){var e=this.container.getNextChild(this.activeItem);this.activateItem(e)}},{key:"handleUpArrow",value:function(){var e=this.container.getPrevChild(this.activeItem);this.activateItem(e)}},{key:"handleEnter",value:function(){this.activeItem&&this.selectCB&&this.selectCB(this.activeItem)}},{key:"scrollToItem",value:function(e){var t=this.container.htmlElement,n=e.htmlElement;if(t.scrollHeight>t.clientHeight){var o=t.clientHeight+t.scrollTop,r=n.offsetTop+n.offsetHeight;r>o?t.scrollTop=r-t.clientHeight:n.offsetTop0&&void 0!==arguments[0]?arguments[0]:vr.Single,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return De(this,t),(e=Ue(this,qe(t).call(this))).listSelectionMode=n,e.activateOnHover=o,e.selectionChangedCB=[],e.itemClickedCB=[],e.selectedItems=[],e.ariaMultiselectable=n===vr.Multiple,e.handleItemClicked=e.handleItemClicked.bind(Ne(e)),e.handleMouseEvents=e.handleMouseEvents.bind(Ne(e)),e.handleItemMouseenter=e.handleItemMouseenter.bind(Ne(e)),e.handleItemMouseleave=e.handleItemMouseleave.bind(Ne(e)),e.keyboardNav=new _r(Ne(e)),e.keyboardNav.onSelect((function(t){t&&!t.disabled&&e.handleSelectionChanged(t)})),e.onMouseup(e.handleMouseEvents),e.onMousedown(e.handleMouseEvents),e.onClick(e.handleMouseEvents),e}return Me(t,ct),Fe(t,[{key:"onSelectionChanged",value:function(e){this.selectionChangedCB.push(e)}},{key:"onItemClicked",value:function(e){this.itemClickedCB.push(e)}},{key:"clearSelection",value:function(){this.selectedItems.forEach((function(e){e.selected=!1})),this.selectedItems=[]}},{key:"clearActive",value:function(){this.deactivateItem()}},{key:"activateItem",value:function(e){this.keyboardNav.activateItem(e)}},{key:"deactivateItem",value:function(e){this.keyboardNav.deactivateItem(e)}},{key:"addItem",value:function(e){this.selectionMode===vr.SingleMouseup?e.onMouseup(this.handleItemClicked):e.onClick(this.handleItemClicked),this.activateOnHover&&this.activateItemOnHover(e),this.appendChild(e)}},{key:"activateItemOnHover",value:function(e){e.onMouseenter(this.handleItemMouseenter),e.onMouseleave(this.handleItemMouseenter)}},{key:"handleItemMouseenter",value:function(e){this.activateItem(e)}},{key:"handleItemMouseleave",value:function(e){this.deactivateItem(e)}},{key:"addToSelection",value:function(e){e.selected=!0,-1===this.selectedItems.indexOf(e)&&(this.selectedItems.push(e),this.notifySelectionChanged())}},{key:"removeFromSelection",value:function(e){e.selected=!1;var t=this.selectedItems.indexOf(e);t>-1&&(this.selectedItems.splice(t,1),this.notifySelectionChanged())}},{key:"handleMouseEvents",value:function(){event.stopPropagation()}},{key:"handleItemClicked",value:function(e){!e.disabled&&this.handleSelectionChanged(e),this.activateItem(e)}},{key:"handleSelectionChanged",value:function(e){switch(this.listSelectionMode){case vr.Multiple:this.handleMultipleSelectionChanged(e);break;case vr.Single:case vr.SingleMouseup:this.handleSingleSelectionChanged(e);break;case vr.None:this.itemClickedCB.forEach((function(t){t(e.key)}))}}},{key:"handleMultipleSelectionChanged",value:function(e){e.selected?this.removeFromSelection(e):this.addToSelection(e)}},{key:"handleSingleSelectionChanged",value:function(e){e.selected=!e.selected,this.clearSelection(),this.addToSelection(e)}},{key:"notifySelectionChanged",value:function(){var e=this.selectedItems.map((function(e){return e.key}));this.selectionChangedCB.forEach((function(t){t(e)}))}},{key:"selectionMode",get:function(){return this.listSelectionMode}}]),t}(),Ir="xmui-list",Er=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vr.Single;return De(this,t),(e=Ue(this,qe(t).call(this,n))).shouldStartSection=!1,e.className=Ir,e.role="listbox",e.tabindex=0,e}return Me(t,Cr),Fe(t,[{key:"addListItem",value:function(e,t,n){var o=new br(e,this.selectionMode===vr.Multiple,this.shouldStartSection);o.setContent(n),o.disabled=t,o.selected=!1,this.shouldStartSection=!1,this.addItem(o)}},{key:"startSection",value:function(){this.shouldStartSection=!0}}]),t}(),Rr="xmui-list-item-content",Pr=function(e){function t(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;if(De(this,t),(n=Ue(this,qe(t).call(this))).className=Rr,r){var c=new ct;c.className="".concat(Rr,"_icon ").concat(r),n.appendChild(c)}var u=new ct;if(u.className="".concat(Rr,"_text-container"),e){var l=new st;l.setText(e),l.className="".concat(Rr,"_title");var d=new ct;d.className="".concat(Rr,"_title-container"),d.appendChild(l),a&&a.forEach((function(e){var t=new ct;t.className="".concat(Rr,"_icon-state ").concat(e),t.automationId=vt.list_item_icon_state,d.appendChild(t)})),s&&s.forEach((function(e){d.appendChild(e)})),u.appendChild(d)}if(o){var p=new st;p.setText(o),p.className="".concat(Rr,"_info"),u.appendChild(p)}if(n.appendChild(u),i){var h=new ct;h.className="".concat(Rr,"_space"),n.appendChild(h),n.appendChild(i)}return n}return Me(t,ct),t}(),Or=function(){function e(){De(this,e)}return Fe(e,null,[{key:"getAuthenticatorIcon",value:function(e){if(!wr){var t,n=com.ts.mobile.sdk.AuthenticatorType;je(t={},n.Password,rt.PasswordAuth),je(t,n.Pincode,rt.PincodeAuth),je(t,n.Pattern,rt.PatternAuth),je(t,n.Otp,rt.OtpAuth),je(t,n.Voice,rt.VoiceAuth),je(t,n.Questions,rt.QuestionsAuth),je(t,n.Totp,rt.TotpAuth),je(t,n.MobileApprove,rt.MobileApproveAuth),je(t,n.Generic,rt.GenericAuth),wr=t}return wr[e]}},{key:"getChannelIcon",value:function(e){if(!Ar){var t,n=com.ts.mobile.sdk.OtpChannel;je(t={},n.Sms,rt.SmsChannel),je(t,n.Email,rt.EmailChannel),je(t,n.PushNotification,rt.PushChannel),je(t,n.VoiceCall,rt.VoiceChannel),Ar=t}return Ar[e]}}]),e}();!function(e){e.Button="button",e.Submit="submit"}(Sr||(Sr={})),function(e){e.Normal="normal",e.Alert="alert",e.Recovery="recovery"}(kr||(kr={}));var xr,Tr="".concat("xmui-button","--"),Dr=function(e){function t(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kr.Normal;De(this,t),(n=Ue(this,qe(t).call(this))).buttonMode=o,n.automationId=e;var r=Tr+o;return n.addClass(r),n}return Me(t,it),Fe(t,[{key:"buildElement",value:function(){return ot(''))}},{key:"label",set:function(e){this.element.text(e)},get:function(){return this.htmlElement.innerText}},{key:"form",set:function(e){this.attr={form:e}}},{key:"type",set:function(e){this.attr={type:e}}},{key:"disabled",set:function(e){ze(qe(t.prototype),"disabled",e,this,!0),this.htmlElement.disabled=e}}]),t}(),Lr=function(e){function t(e,n,o){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return De(this,t),(r=Ue(this,qe(t).call(this,e,n))).actionContext=o,r.uiContext=o.getUiContext(),i&&(r._cancelButton=new Dr(vt.button_cancel),r._cancelButton.label=r.uiContext.getString(It),r._cancelButton.onClick((function(){return r.handleCancelButtonClicked()})),r.addLeftButton(r.cancelButton)),r.addEscapeOptionButtons(o.getEscapeOptions()),r}return Me(t,bt),Fe(t,[{key:"addEscapeOptionButtons",value:function(e){var t=this;e.filter((function(e){return e.getPresentation()===com.ts.mobile.sdk.ActionEscapeOptionPresentation.Action})).forEach((function(e){var n=new Dr(vt.button_escape);n.label=e.getDisplayName(),n.onClick((function(){return t.handleEscapeButtonClicked(e)})),t.addLeftButton(n)}))}},{key:"handleEscapeButtonClicked",value:function(e){this.onEscapeCB&&this.onEscapeCB(e)}},{key:"onCancel",value:function(e){this.onCancelCB=e}},{key:"onEscape",value:function(e){this.onEscapeCB=e}},{key:"handleCancelButtonClicked",value:function(){var e=this.actionContext.getEscapeOptions().filter((function(e){return e.getPresentation()===com.ts.mobile.sdk.ActionEscapeOptionPresentation.Cancel}));e.length?this.onEscapeCB&&this.onEscapeCB(e[0]):this.onCancelCB&&this.onCancelCB()}},{key:"cancelButton",get:function(){return this._cancelButton}}]),t}(),Fr=function(e){function t(e){var n;De(this,t);var o=(n=Ue(this,qe(t).call(this,vt.page_select_authenticator,"xmui-select-authenticator",e))).createContent();return n.setContent(o),n}return Me(t,Lr),Fe(t,[{key:"createContent",value:function(){var e=this;return this.authList=new Er,this.authList.onSelectionChanged((function(t){t.length&&e.onSubmitCB&&e.onSubmitCB(t[0])})),this.authList.focus(),this.authList}},{key:"addAuthenticator",value:function(e,t,n,o){var r=Or.getAuthenticatorIcon(n)||Or.getAuthenticatorIcon(com.ts.mobile.sdk.AuthenticatorType.Generic),i=new Pr(t,null,r,null,null,o?[rt.LockedState]:null);this.authList.addListItem(e,o,i)}},{key:"onSubmit",value:function(e){this.onSubmitCB=e}}]),t}();!function(e){e[e.Resume=-1]="Resume",e[e.Continue=0]="Continue",e[e.Cancel=1]="Cancel"}(xr||(xr={}));var jr,Mr,qr,Br,Nr=function(){function e(){De(this,e)}return Fe(e,null,[{key:"createContinueConfirmationInput",value:function(){return com.ts.mobile.sdk.ConfirmationInput.create(0)}},{key:"createCancelConfirmationInput",value:function(){return com.ts.mobile.sdk.ConfirmationInput.create(1)}},{key:"createResumeConfirmationInput",value:function(){return com.ts.mobile.sdk.ConfirmationInput.create(-1)}},{key:"createCancelAuthenticatorRequest",value:function(){var e=com.ts.mobile.sdk.ControlRequest.create(com.ts.mobile.sdk.ControlRequestType.CancelAuthenticator);return com.ts.mobile.sdk.InputOrControlResponse.createControlResponse(e)}},{key:"isContinueConfirmationInput",value:function(e){return 0===e}},{key:"isResumeConfirmationInput",value:function(e){return-1===e}},{key:"createTargetsSelectionResponse",value:function(e){var t=com.ts.mobile.sdk.TargetBasedAuthenticatorInput.createTargetsSelectionRequest(e);return com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(t)}},{key:"createAbortControlResponse",value:function(){var e=com.ts.mobile.sdk.ControlRequest.create(com.ts.mobile.sdk.ControlRequestType.AbortAuthentication);return com.ts.mobile.sdk.InputOrControlResponse.createControlResponse(e)}},{key:"getDeviceNameFromDeviceDetails",value:function(t){var n=t.getAlias();return e.getDeviceName(n,t)}},{key:"getLastAccessedFromDeviceDetails",value:function(e,t){var n=new Date(t.getLastAccessed()).toLocaleString();return e.formatString(Fn,[n])}},{key:"getDeviceName",value:function(e,t){var n=t.getModel(),o=t.getOsType(),r=t.getOsVersion();return e||"".concat(n," ").concat(o," ").concat(r)}}]),e}(),Ur=function(e){function t(e,n){var o;De(this,t),(o=Ue(this,qe(t).call(this,vt.dialog_information,"xmui-information-dialog-page"))).automationId=vt.dialog_information;var r=new Dr(vt.button_continue);return r.label=n||e.getString(Mt),r.value=!0,o.addRightButton(r),r.focus(),o}return Me(t,St),t}(),Hr=function(){function e(){De(this,e)}return Fe(e,null,[{key:"getAuthenticatorNameKey",value:function(e){return"".concat("ts_authenticator_").concat(e)}},{key:"getAuthenticatorDescriptionKey",value:function(e){return"question"==e&&(e="questions"),"".concat("ts_authenticator_").concat(e,"_description")}}]),e}(),Wr=new(function(){function e(){De(this,e),this._isLogEnabled=!0}return Fe(e,[{key:"init",value:function(){this.lastPage=null,this.isBusy=!1,this.isLogEnabled=!0}},{key:"lastPage",set:function(e){this._lastPage=e},get:function(){return this._lastPage}},{key:"isBusy",set:function(e){this._isBusy=e},get:function(){return this._isBusy}},{key:"isLogEnabled",set:function(e){this._isLogEnabled=e},get:function(){return this._isLogEnabled}}]),e}()),Kr=function(e){function t(){var e;De(this,t),(e=Ue(this,qe(t).call(this))).className="xmui-busy-overlay";var n=new ct;return n.className="xmui-busy-overlay_icon",e.appendChild(n),e}return Me(t,ct),t}(),zr=function(){function e(){De(this,e)}return Fe(e,null,[{key:"getContainer",value:function(e){var t;e&&e.uiContainer&&(t=ot(e.uiContainer)),null!=t&&0!==t.length||0===(t=ot("#transmitContainer")).length&&(t=ot('
'),ot(document.documentElement).append(t));var n=t.find("#xmui-main-container");return 0===n.length&&(n=ot('
'),t.content(n)),n}},{key:"clearContainer",value:function(t){Wr.lastPage=null,e.getContainer(t).empty()}},{key:"getUsernameFromClientContext",value:function(e){return e&&e.username}},{key:"activityStarted",value:function(t){if(Wr.lastPage)Wr.lastPage.busy=!0;else{e.clearContainer(t);var n=e.getContainer(t);(new Kr).appendInto(n)}}},{key:"activityEnded",value:function(t){Wr.lastPage?Wr.lastPage.busy=!1:e.clearContainer(t)}},{key:"setLogEnabled",value:function(e){Wr.isLogEnabled=e}},{key:"log",value:function(e){Wr.isLogEnabled&&console.log(e)}},{key:"renderPage",value:function(t,n){this.clearContainer(n),t.appendInto(e.getContainer(n)),Wr.lastPage=t}},{key:"presentUI",value:function(t,n){this.clearContainer(n),e.getContainer(n).append(t),Wr.lastPage=null}},{key:"renderModal",value:function(t,n){t.appendInto(e.getContainer(n))}},{key:"getControlActionButtonsInfo",value:function(){var e;return jr||(je(e={},com.ts.mobile.sdk.ControlRequestType.ChangeMethod,{automationId:vt.button_change_method,label:To,positionLeft:!1}),je(e,com.ts.mobile.sdk.ControlRequestType.AbortAuthentication,{automationId:vt.button_abort,label:Oo,positionLeft:!0,isDefault:!0}),je(e,com.ts.mobile.sdk.ControlRequestType.RetryAuthenticator,{automationId:vt.button_retry,label:Do,positionLeft:!1}),je(e,com.ts.mobile.sdk.ControlRequestType.SelectMethod,{automationId:vt.button_select_method,label:xo,positionLeft:!1}),je(e,com.ts.mobile.sdk.ControlRequestType.CancelAuthenticator,{automationId:vt.button_cancel,label:It,positionLeft:!1,isDefault:!0}),jr=e),jr}},{key:"getRecoveryActionButtonsInfo",value:function(){var e;return Mr||(je(e={},com.ts.mobile.sdk.AuthenticationErrorRecovery.ChangeAuthenticator,{automationId:vt.button_change_method,label:To,positionLeft:!1}),je(e,com.ts.mobile.sdk.AuthenticationErrorRecovery.Fail,{automationId:vt.button_abort,label:Oo,positionLeft:!0,isDefault:!0}),je(e,com.ts.mobile.sdk.AuthenticationErrorRecovery.RetryAuthenticator,{automationId:vt.button_retry,label:Do,positionLeft:!1}),je(e,com.ts.mobile.sdk.AuthenticationErrorRecovery.SelectAuthenticator,{automationId:vt.button_select_method,label:xo,positionLeft:!1}),Mr=e),Mr}},{key:"getFallbackActionButtonsInfo",value:function(){var e;return qr||(je(e={},com.ts.mobile.sdk.AuthenticatorFallbackAction.Fallback,{automationId:vt.button_change_method,label:To,positionLeft:!1}),je(e,com.ts.mobile.sdk.AuthenticatorFallbackAction.Cancel,{automationId:vt.button_abort,label:Oo,positionLeft:!0,isDefault:!0}),je(e,com.ts.mobile.sdk.AuthenticatorFallbackAction.Retry,{automationId:vt.button_retry,label:Do,positionLeft:!1}),je(e,com.ts.mobile.sdk.AuthenticatorFallbackAction.AuthMenu,{automationId:vt.button_select_method,label:xo,positionLeft:!1}),qr=e),qr}},{key:"buildDialogButtons",value:function(e,t,n,o){n.forEach((function(n){var r=o[n];if(r){var i=new Dr(r.automationId);i.value=n.toString(),i.label=t.getString(r.label),r.positionLeft?e.addLeftButton(i):e.addRightButton(i)}}))}},{key:"failureDataToPolicyRejectionDialogParams",value:function(e,t){var n,o=null,r=t.getUiContext();if(e&&e.reason){var i=e.reason;switch(i.type){case"policy":o={title:No,text:Uo,buttonText:Ho};break;case"approval_expired":o={title:£o,text:Xo,buttonText:er};break;case"feature_not_supported":o={title:or,text:rr,buttonText:ir};break;case"cannot_consume_ticket":o={title:sr,text:ar,buttonText:cr};break;case"username_already_exists":n=[i.data&&i.data.username],o={title:ur,text:lr,buttonText:dr};break;case"locked":switch(i.data&&i.data.lock_type){case"user":o={title:Wo,text:Ko,buttonText:zo};break;case"device":o={title:Vo,text:Qo,buttonText:Go};break;case"application":o={title:Jo,text:Yo,buttonText:Zo}}}}return o&&(o.title=r.getString(o.title),o.text=n?r.formatString(o.text,n):r.getString(o.text),o.buttonText=r.getString(o.buttonText)),o}}]),e}(),Vr=function(e){function t(e,n,o,r,i,s,a){var c;return De(this,t),(c=Ue(this,qe(t).call(this,e,n,o,r))).dialogContent=new At,c.dialogContent.setDialogTitle(i),c.dialogContent.setDialogMessage(s),c.dialogContent.setDialogIconClass(a),c.setContent(c.dialogContent),c}return Me(t,Lr),t}(),Qr=function(e){function t(e,n,o,r,i,s){var a;return De(this,t),(a=Ue(this,qe(t).call(this,vt.dialog_confirm,"xmui-confirmation-action-dialog-page",e,null!=s,n,o,r))).continueButton=new Dr(vt.button_continue),a.continueButton.label=i,a.continueButton.onClick((function(){return a.onContinueCB&&a.onContinueCB()})),a.addRightButton(a.continueButton),s&&(a.cancelButton.label=s),a}return Me(t,Vr),Fe(t,[{key:"onContinue",value:function(e){this.onContinueCB=e}}]),t}(),Gr=function(){function e(){De(this,e)}return Fe(e,null,[{key:"promiseCancelAction",value:function(e,t,n,o,r){var i,s=function(e){return e.indexOf(com.ts.mobile.sdk.ControlRequestType.SelectMethod)>-1?com.ts.mobile.sdk.ControlRequestType.SelectMethod:e.indexOf(com.ts.mobile.sdk.ControlRequestType.ChangeMethod)>-1?com.ts.mobile.sdk.ControlRequestType.ChangeMethod:com.ts.mobile.sdk.ControlRequestType.AbortAuthentication};return i=1==n.overrideAuthenticatorCancelBehavior||o==com.ts.mobile.sdk.AuthenticatorSessionMode.Authentication?s(e):com.ts.mobile.sdk.ControlRequestType.AbortAuthentication,new Promise((function(e,t){e(com.ts.mobile.sdk.ControlRequest.create(i))}))}},{key:"promiseCancelActionForNonBaseAuthenticatorSession",value:function(e){var t=com.ts.mobile.sdk.ControlRequestType.AbortAuthentication;return Promise.resolve(com.ts.mobile.sdk.ControlRequest.create(t))}},{key:"promiseRecoveryForError",value:function(e,t,n,o,r,i,s){var a=!1,c=e.getData();c&&c.additional_data&&c.additional_data.locked&&(a=!0);var u,l,d=t;return t.indexOf(com.ts.mobile.sdk.AuthenticationErrorRecovery.ChangeAuthenticator)>=0&&t.indexOf(com.ts.mobile.sdk.AuthenticationErrorRecovery.SelectAuthenticator)>=0&&(d=t.filter((function(e){return e!=com.ts.mobile.sdk.AuthenticationErrorRecovery.ChangeAuthenticator}))),a?(u=qo,l=o.getString(Bo)):i===com.ts.mobile.sdk.AuthenticatorSessionMode.Authentication?(u=Lo,l=o.formatString(jo,[e.getMessage()])):(u=Fo,l=o.formatString(Mo,[e.getMessage()])),this.createRecoveryFromErrorDialog(s,o.getString(u),l,a?rt.AuthLocked:rt.Error,o,r,d)}},{key:"createRecoveryFromErrorDialog",value:function(e,t,n,o,r,i,s){return new Promise((function(n,a){var c=new St(vt.dialog_recovery,"xmui-error-recovery-dialog-page");c.setUserName(e),c.setDialogTitle(t),c.setDialogMessage(r.getString(Po)),c.setDialogIconClass(o),c.onSelect((function(e){c.blockInteraction(),n(parseInt(e))}));var u=zr.getRecoveryActionButtonsInfo();zr.buildDialogButtons(c,r,s,u),zr.renderPage(c,i)}))}},{key:"promiseAuthenticator",value:function(e,t,n){var o=t.getUiContext();return new Promise((function(r,i){var s={},a=new Fr(t),c=zr.getUsernameFromClientContext(n);c&&a.setUserName(c),a.setTitle(o.getString(Co)),a.setInstructions(o.getString(Io)),e.forEach((function(e){var t=e.getAuthenticator();if(t.getEnabled()&&!t.getLocked()&&t.getRegistered()){var n=t.getAuthenticatorId(),r=t.getType();s[n]=t;var i=o.getString(Hr.getAuthenticatorNameKey(n));a.addAuthenticator(n,i,r,!1)}})),a.onSubmit((function(e){a.blockInteraction(),r(com.ts.mobile.sdk.AuthenticatorSelectionResult.createSelectionRequest(s[e]))})),a.onCancel((function(){a.blockInteraction(),r(com.ts.mobile.sdk.AuthenticatorSelectionResult.createAbortRequest())})),a.onEscape((function(e){a.blockInteraction(),r(com.ts.mobile.sdk.AuthenticatorSelectionResult.createEscapeRequest(e,{}))})),zr.renderPage(a,n)}))}},{key:"promiseInformationInput",value:function(e,t,n,o,r,i,s){return new Promise((function(a,c){var u=new Ur(i,r);e&&U.KetUserName(e),U.KetDialogTitle(n),U.KetDialogMessage(o),U.KetDialogIconClass(t),u.onSelect((function(){u.blockInteraction(),a()})),zr.renderPage(u,s)}))}},{key:"internalPromiseConfirmationOrInformationActionInput",value:function(e,t,n,o,r,i,s,a,c){return new Promise((function(u,l){var d=new Qr(a,n,o,t,r,s);e&&d.setUserName(e),d.onContinue((function(){u(com.ts.mobile.sdk.ConfirmationInput.create(i))})),d.onCancel((function(){u(Nr.createCancelConfirmationInput())})),d.onEscape((function(e){u(com.ts.mobile.sdk.ConfirmationInput.createEscapeRequest(e,{}))})),zr.renderPage(d,c)}))}},{key:"promiseInformationActionInput",value:function(e,t,n,o,r,i,s){return this.internalPromiseConfirmationOrInformationActionInput(e,t,n,o,r,-1,null,i,s)}},{key:"promiseConfirmationActionInput",value:function(e,t,n,o,r,i,s,a){return this.internalPromiseConfirmationOrInformationActionInput(e,t,n,o,r,0,i,s,a)}},{key:"promiseAuthenticatorFallbackAction",value:function(e,t,n,o,r,i){return new Promise((function(n,s){var a=r.getUiContext(),c=o.description.getAuthenticatorId(),u=a.getString(Hr.getAuthenticatorNameKey(c)),l=new St(vt.dialog_fallback,"xmui-auth-fallback-dialog-page");e&&l.setUserName(e),l.setDialogTitle(a.formatString(Eo,[u])),l.setDialogMessage(a.getString(Ro)),l.setDialogIconClass(rt.Fallback),l.onSelect((function(e){l.blockInteraction(),n(parseInt(e))}));var d=zr.getFallbackActionButtonsInfo();zr.buildDialogButtons(l,a,t,d),zr.renderPage(l,i)}))}},{key:"promisePolicyRejectionInput",value:function(t,n,o,r,i,s){var a={title:t,text:n,buttonText:o};if(!(t&&n&&o||(a=zr.failureDataToPolicyRejectionDialogParams(r,i))))return Promise.resolve(Nr.createResumeConfirmationInput());var c=r,u=c&&c.reason&&c.reason.data&&c.reason.data.username||zr.getUsernameFromClientContext(s);return e.promiseInformationInput(u,rt.Rejection,a.title,a.text,a.buttonText,i.getUiContext(),s).then((function(){return Nr.createResumeConfirmationInput()}))}}]),e}(),Jr="xmui-confirmation-dialog-page",Yr=function(e){function t(e,n,o){var r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];De(this,t),(r=Ue(this,qe(t).call(this,vt.dialog_confirm,Jr))).automationId=vt.dialog_confirm;var s=new Dr(vt.button_cancel);s.label=o||e.getString(It),s.value=!1,r.addLeftButton(s);var a=new Dr(vt.button_continue);return a.label=n||e.getString(Mt),a.value=!0,r.addRightButton(a),i?a.focus():s.focus(),r}return Me(t,St),t}(),Zr=function(){function e(t,n){De(this,e),this.showExpirationDialog=!1,this.supportsInlineError=!1,this.title=t,this.username=n,this.authId=t}return Fe(e,[{key:"startSession",value:function(e,t,n,o){this.description=e,this.mode=t,this.actionContext=n,this.clientContext=o,this.uiContext=n.getUiContext(),this.username=zr.getUsernameFromClientContext(o)||this.username,zr.log("Starting session; session mode: [".concat(this.mode,"], authenticator: [").concat(this.title,"]"))}},{key:"changeSessionModeToRegistrationAfterExpiration",value:function(){zr.log("Changing session mode to registration after expiration; authenticator: [".concat(this.title,"]")),this.mode=com.ts.mobile.sdk.AuthenticatorSessionMode.Registration,this.clearError(),this.showExpirationDialog=!0}},{key:"promiseRecoveryForError",value:function(e,t,n){return zr.log("Starting error recovery; session mode: [".concat(this.mode,"], authenticator: [").concat(this.title,"], error: [").concat(e,"]")),this.supportsInlineError&&n===com.ts.mobile.sdk.AuthenticationErrorRecovery.RetryAuthenticator?(this.setError(e),Promise.resolve(n)):n===com.ts.mobile.sdk.AuthenticationErrorRecovery.Fail?Promise.resolve(n):Gr.promiseRecoveryForError(e,t,n,this.uiContext,this.clientContext,this.mode,this.username)}},{key:"endSession",value:function(){zr.log("Ending session; session mode: [".concat(this.mode,"], authenticator: [").concat(this.title,"]"))}},{key:"promiseInput",value:function(){var e=this;return new Promise((function(t,n){switch(e.setInputResolver(t),e.mode){case com.ts.mobile.sdk.AuthenticatorSessionMode.Authentication:zr.log("Fetching authentication input; authenticator: [".concat(e.title,"]")),e.showAuthUi();break;case com.ts.mobile.sdk.AuthenticatorSessionMode.Registration:zr.log("Fetching registration input; authenticator: [".concat(e.title,"]")),e.showExpirationDialog?(e.showExpirationDialog=!1,e.showRegUiAfterExpiration()):e.showRegUi()}})).then((function(t){return e.clearError(),t}))}},{key:"promiseCancelAction",value:function(e){return Gr.promiseCancelAction(e,this.actionContext,this.clientContext,this.mode,this.username)}},{key:"showRegUiAfterExpiration",value:function(){var e=this,t=this.uiContext,n=t.getString(Hr.getAuthenticatorNameKey(this.title)),o=new Yr(this.uiContext);o.setUserName(this.username),o.setDialogTitle(t.formatString(tr,[n])),o.setDialogIconClass(rt.Expiration),o.setDialogMessage(t.getString(nr)),o.onSelect((function(t){o.blockInteraction(),t?e.showRegUi():e.onCancel()})),zr.renderPage(o,this.clientContext)}},{key:"setInputResolver",value:function(e){this.currentInputResolveFn=e}},{key:"onCancel",value:function(){this.resolveInputPromise(Nr.createCancelAuthenticatorRequest())}},{key:"onEscape",value:function(e){var t=com.ts.mobile.sdk.InputOrControlResponse.createEscapeResponse(e,{});this.resolveInputPromise(t)}},{key:"resolveInputPromise",value:function(e){if(this.currentInputResolveFn){var t=this.currentInputResolveFn;this.currentInputResolveFn=null,t(e)}}},{key:"showAuthenticatorPage",value:function(e){var t=this;e.setUserName(this.username),e.onCancel((function(){e.blockInteraction(),t.onCancel()})),e.onEscape((function(n){e.blockInteraction(),t.onEscape(n)})),zr.renderPage(e,this.clientContext)}},{key:"setError",value:function(e){if(e){this.authError=e;var t=e.getMessage();this.authErrorMessage=this.mode===com.ts.mobile.sdk.AuthenticatorSessionMode.Authentication?this.uiContext.formatString(jo,[t]):this.uiContext.formatString(Mo,[t])}else this.clearError()}},{key:"clearError",value:function(){this.authError=null,this.authErrorMessage=""}}]),e}(),£r=function(e){function t(e,n){var o;return De(this,t),(o=Ue(this,qe(t).call(this))).stateOnIcon=e,o.stateOffIcon=n,o.isOn=!1,o.setIconsClass(),o.onClick((function(){o.isOn=!o.isOn,o.setIconsClass(),o.onChangeCB&&o.onChangeCB(o.isOn)})),o}return Me(t,ct),Fe(t,[{key:"onChange",value:function(e){this.onChangeCB=e}},{key:"setIsOn",value:function(e){this.isOn=e,this.setIconsClass()}},{key:"setIconsClass",value:function(){var e;e=this.isOn?this.stateOnIcon:this.stateOffIcon,this.element.setClass("".concat("xmui-toggle-icon"," ").concat(e))}}]),t}();function Xr(e,t,n){var o;return function(){var r=this,i=arguments,s=function(){o=null,n||e.apply(r,i)},a=n&&!o;clearTimeout(o),o=setTimeout(s,t),a&&e.apply(r,i)}}!function(e){e.Numeric="numeric"}(Br||(Br={}));var ei,ti=function(e){function t(e){var n;return De(this,t),(n=Ue(this,qe(t).call(this))).automationId=e,n.inputHtmlElement=n.htmlElement,n}return Me(t,it),Fe(t,[{key:"buildElement",value:function(){return ot("")}},{key:"onChange",value:function(e){this.element.on("input",this.createCB(e))}},{key:"createCB",value:function(e){return Xr(e,100,!1)}},{key:"name",set:function(e){this.inputHtmlElement.name=e},get:function(){return this.inputHtmlElement.name}},{key:"type",set:function(e){this.attr={type:e},this.inputHtmlElement.type}},{key:"inputmode",set:function(e){this.attr={inputmode:e,"x-inputmode":e}}},{key:"placeholder",set:function(e){this.inputHtmlElement.placeholder=e}},{key:"minlength",set:function(e){this.attr={minlength:e.toString()}}},{key:"maxlength",set:function(e){this.attr={maxlength:e.toString()}}},{key:"autocomplete",set:function(e){this.attr={autocomplete:e}}},{key:"autocorrect",set:function(e){this.attr={autocorrect:e?"on":"off"}}},{key:"autocapitalize",set:function(e){this.attr={autocapitalize:e?"on":"off"}}},{key:"value",set:function(e){this.inputHtmlElement.value=e},get:function(){return this.inputHtmlElement.value}},{key:"disabled",set:function(e){ze(qe(t.prototype),"disabled",e,this,!0),this.inputHtmlElement.disabled=e}},{key:"required",set:function(e){this.inputHtmlElement.required=e},get:function(){return this.inputHtmlElement.required}}]),t}(),ni="xmui-form-field-message",oi="".concat(ni,"--center"),ri="".concat(ni,"--error"),ii=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return De(this,t),(e=Ue(this,qe(t).call(this))).id=gr(),e.className=ni,n&&e.addClass(ri),o&&e.addClass(oi),e}return Me(t,st),t}(),si=/^[a-zA-Z0-9.!#£%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*£/,ai=function(){function e(){De(this,e)}return Fe(e,null,[{key:"email",value:function(e){return si.test(e)?void 0:"Invalid Email"}},{key:"required",value:function(e){return e?void 0:"Required"}},{key:"mobileNumber",value:function(e){var t=e.match(/^([0-9]{1,3})-([1-9][0-9]+)£/);return t?t[1].length+t[2].length>15?"Mobile Number exceeded 15 digits":void 0:"Invalid Mobile Number"}}]),e}(),ci=function(){function e(){De(this,e)}return Fe(e,null,[{key:"positiveInteger",value:function(e){var t=e.keyCode;(t!==_t.Enter&&t<_t.Zero||t>_t.Nine)&&e.preventDefault()}}]),e}(),ui=function(e){function t(){return De(this,t),Ue(this,qe(t).apply(this,arguments))}return Me(t,ct),t}(),li="xmui-input-field",di=/^[0-9]+£/,pi="".concat(li,"--has-value"),hi="".concat(li,"--has-focus");!function(e){e[e.Password=0]="Password",e[e.Text=1]="Text",e[e.Email=2]="Email",e[e.PositiveInteger=3]="PositiveInteger"}(ei||(ei={}));var fi,mi=function(e){function t(e,n){var o;De(this,t),(o=Ue(this,qe(t).call(this))).inputType=e,o.hasValue=!1,o.validators=[],o.icons=new Map,o.className=li,o.inputComponent=new ti(n),o.inputComponent.value="",o.inputComponent.autocapitalize=!1,o.inputComponent.autocorrect=!1,o.inputComponent.spellcheck=!1,o.inputComponent.onPaste(o.handlePaste.bind(Ne(o))),o.inputComponent.onChange(o.handleChange.bind(Ne(o)));var r=new ct;r.className="".concat(li,"_row");var i=new ct;i.className="".concat(li,"_container");var s=new ct;s.className="".concat(li,"_input-and-label");var a=new ct;a.className="".concat(li,"_label-container");var c=new st;switch(c.className="".concat(li,"_label"),o.inputLabel=c,a.appendChild(o.inputLabel),s.appendChildren(o.inputComponent,a),i.appendChild(s),r.appendChildren(i),r.onFocusIn((function(){o.addClass(hi)})),r.onFocusOut((function(){o.removeClass(hi)})),e){case ei.Password:o.setupPasswordInput(i);break;case ei.Text:o.inputComponent.type="text";break;case ei.Email:o.setupEmailInput();break;case ei.PositiveInteger:o.setupPositiveIntegerInput()}return o.messageComp=new ii(!1),o.messageComp.show=!1,o.errorMessageComp=new ii(!0),o.appendChildren(r,o.messageComp,o.errorMessageComp),o.inputComponent.ariaDescribedBy=o.messageComp.id,o.labelContainer=a,o.container=i,o.inputRow=r,o}return Me(t,ui),Fe(t,[{key:"addRightButton",value:function(e,t){var n=new st;return n.className="".concat(li,"_label_cta"),n.setText(e),n.onClick(t),this.container.appendChild(n),n}},{key:"addValidators",value:function(e){this.validators=this.validators.concat(e)}},{key:"addValidator",value:function(e){this.validators.push(e)}},{key:"focus",value:function(){this.inputComponent.focus()}},{key:"onBlur",value:function(e){this.inputComponent.onBlur(e)}},{key:"onFocus",value:function(e){this.inputComponent.onFocus(e)}},{key:"onChange",value:function(e){this.inputComponent.onChange(e)}},{key:"validateAndSetErrorMessage",value:function(){var e=this,t=!0,n=this.value.trim();return this.inputComponent.required?[this.getRequiredValidator()].concat(Ve(this.validators)):this.validators,!this.inputComponent.required&&this.isEmpty||(t=!this.validators.some((function(t){var o=t(n);return o&&e.setError(o),!!o}))),t&&this.clearError(),t}},{key:"setError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.error=!0,this.errorMessage=e||"",t&&(this.value="")}},{key:"clearError",value:function(){this.error=!1,this.errorMessage=""}},{key:"getRequiredValidator",value:function(){return ai.required}},{key:"addIcon",value:function(e){var t=new ct;t.className="".concat(li,"_icon ").concat(e),this.container.appendChild(t),this.icons.set(e,t)}},{key:"removeIcon",value:function(e){var t=this.icons.get(e);t&&(this.container.removeChild(t),this.icons.delete(e))}},{key:"prependToInputRow",value:function(e){this.inputRow.prependChild(e)}},{key:"setupPasswordInput",value:function(e){var t=this;this.inputComponent.type="password";var n=new £r(rt.PasswordVisible,rt.PasswordHidden);n.setIsOn(!1),n.onChange((function(e){t.inputComponent.type=e?"text":"password"})),e.appendChild(n)}},{key:"setupPositiveIntegerInput",value:function(){this.inputComponent.type="text",this.inputComponent.onKeypress((function(e,t){return ci.positiveInteger(t)}))}},{key:"setupEmailInput",value:function(){this.inputComponent.type="email",this.addValidator(ai.email)}},{key:"handlePaste",value:function(e){var t;this.inputType==ei.PositiveInteger&&(t=e.clipboardData&&e.clipboardData.getData?e.clipboardData.getData("text/plain"):window.clipboardData.getData("Text"))&&!di.test(t)&&e.preventDefault()}},{key:"updateHasValue",value:function(e){e?this.addClass(pi):this.removeClass(pi),this.hasValue=e}},{key:"handleChange",value:function(){var e=this.checkHasValue();this.hasValue!==e&&this.updateHasValue(e)}},{key:"checkHasValue",value:function(){return!!this.value.length}},{key:"name",set:function(e){this.inputComponent.name=e},get:function(){return this.inputComponent.name}},{key:"disabled",set:function(e){this.inputComponent.disabled=e}},{key:"message",set:function(e){this.messageComp.setText(e),this.messageComp.show=!!e.length}},{key:"value",set:function(e){this.inputComponent.value=e,this.handleChange()},get:function(){return this.inputComponent.value}},{key:"type",get:function(){return this.inputType}},{key:"ariaRole",set:function(e){this.inputComponent.ariaRole=e}},{key:"ariaLabel",set:function(e){this.inputComponent.ariaLabel=e}},{key:"automationId",set:function(e){this.inputComponent.automationId=e}},{key:"autocomplete",set:function(e){this.inputComponent.autocomplete=e}},{key:"placeholder",set:function(e){this.placeholderText=e,this.inputLabel.setText(e)},get:function(){return this.placeholderText}},{key:"minlength",set:function(e){this.inputComponent.minlength=e}},{key:"maxlength",set:function(e){this.inputComponent.maxlength=e}},{key:"required",set:function(e){this.inputComponent.required=e},get:function(){return this.inputComponent.required}},{key:"isEmpty",get:function(){return!this.value.trim().length}},{key:"errorMessage",set:function(e){this.errorMessageComp.setText(e)}}]),t}(),gi="xmui-form",yi="".concat(gi,"_hidden-submit-button"),bi=function(e){function t(e){var n;if(De(this,t),(n=Ue(this,qe(t).call(this))).submitButton=e,n.externalValidations=function(){return!0},n.className=gi,n.submitButton){var o=new Dr("");o.addClass(yi),o.type=Sr.Submit,o.disabled=!0,o.onClick((function(){return n.handleSubmit()})),n.appendChild(o),n.hiddenSubmitButton=o,n.submitButton&&n.submitButton.onClick((function(){return n.handleSubmit()}))}return n.element.on("submit",(function(){return event.preventDefault()})),n.element.on("input",Xr(n.handleInputEvent.bind(Ne(n)),100,!1)),n}return Me(t,at),Fe(t,[{key:"buildElement",value:function(){return ot("
")}},{key:"start",value:function(){this.updateSubmitButton()}},{key:"onSubmit",value:function(e){this.onSubmitCB=e}},{key:"onUserInput",value:function(e){this.onUserInputCB=e}},{key:"handleSubmit",value:function(){this.validate()&&this.onSubmitCB&&this.onSubmitCB(this.buildFormResult()),this.updateSubmitButton()}},{key:"updateSubmitButton",value:function(){if(this.submitButton){var e=this.isMandatoryEmpty();this.submitButton.disabled=this.hiddenSubmitButton.disabled=e}}},{key:"isMandatoryEmpty",value:function(){return this.getFormFields(this).some((function(e){return e.required&&e.isEmpty}))}},{key:"getFormFields",value:function(e){var t=this,n=[];return e.getChildren().forEach((function(e){e instanceof ui?n.push(e):e instanceof at&&(n=n.concat(t.getFormFields(e)))})),n}},{key:"validate",value:function(){var e=this.getFormFields(this).reduce((function(e,t){return t.validateAndSetErrorMessage()&&e}),!0),t=this.externalValidations();return e&&t}},{key:"buildFormResult",value:function(){return this.getFormFields(this).reduce((function(e,t){return e[t.name]="string"==typeof t.value?t.value.trim():t.value,e}),{})}},{key:"handleInputEvent",value:function(){this.updateSubmitButton(),this.onUserInputCB&&this.onUserInputCB()}},{key:"name",set:function(e){this.attr={name:e}}}]),t}();!function(e){e.Off="off",e.Username="username",e.NewPassword="new-password",e.CurrentPassword="current-password"}(fi||(fi={}));var vi,_i=function(e){function t(e,n,o,r,i){var s;return De(this,t),(s=Ue(this,qe(t).call(this,e,n,o))).recoveryAction=r,s.authenticatorId=i,s}return Me(t,Lr),Fe(t,[{key:"addRecoveryButtonToForm",value:function(e){var t=this;if(this.recoveryAction&&this.authenticatorId){var n=new Dr(vt.button_recovery,kr.Recovery);n.label=this.uiContext.formatString(fr,[this.uiContext.getString(Hr.getAuthenticatorNameKey(this.authenticatorId))]),n.onClick((function(){return t.handleEscapeButtonClicked(t.recoveryAction)})),e.appendChild(n)}}}]),t}(),wi="xmui-password-authentication",Ai="xmui-password-registration",Si=function(e){function t(e,n,o,r){var i,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];De(this,t),(i=Ue(this,qe(t).call(this,n?vt.page_password_reg:vt.page_password_auth,n?Ai:wi,e,o,r))).isRegistrationMode=n,i.disableAutocomplete=s,i.passwordInputRegex=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,}£/,i.setTitle(i.getTitle()),i.setInstructions(i.getInstructions());var a=new Dr(vt.button_continue);a.label=i.uiContext.getString(Mt),i.addRightButton(a),i.continueButton=a;var c=i.createForm();return i.setContent(c),i}return Me(t,_i),Fe(t,[{key:"setError",value:function(e){this.error=!0,this.passwordInput.setError(e)}},{key:"clearError",value:function(){this.error=!1,this.passwordInput.clearError()}},{key:"reset",value:function(){this.unblockInteraction(),this.passwordInput.value="",this.passwordInput.focus(),this.repeatPasswordInput&&(this.repeatPasswordInput.value="")}},{key:"onSubmit",value:function(e){this.onSubmitCB=e}},{key:"getTitle",value:function(){var e=this.isRegistrationMode?Tt:xt;return this.uiContext.getString(e)}},{key:"getInstructions",value:function(){var e;return e=this.isRegistrationMode?Lt:Dt,this.uiContext.getString(e)}},{key:"createForm",value:function(){var e=this,t=this.uiContext,n=new bi(this.continueButton);n.addClass("xmui-password-page-form"),n.id="xmui-password-form";var o=new mi(ei.Password,vt.input_password),r=this.getAutocompleteValue();if(o.name="password",o.placeholder=t.getString(Ft),o.disabled=!1,o.value="",o.required=!0,o.autocomplete=r,o.ariaLabel=t.getString(pr),o.focus(),this.passwordInput=o,n.appendChild(o),this.isRegistrationMode){var i=new ct;i.className="".concat("xmui-password-page-form","_spacer"),n.appendChild(i);var s=new mi(ei.Password,vt.input_repeat_password);s.name="repeat-password",s.placeholder=t.getString(jt),s.disabled=!1,s.value="",s.required=!0,o.autocomplete=r,s.ariaLabel=t.getString(hr),this.repeatPasswordInput=s,n.appendChild(s)}return this.addRecoveryButtonToForm(n),n.externalValidations=function(){var t=!0;return e.isRegistrationMode&&(e.validatePasswordsMatch()||(e.repeatPasswordInput.setError(e.uiContext.getString(qt),!1),e.passwordInput.focus(),t=!1),e.isPasswordValid()||(e.passwordInput.setError(e.uiContext.getString(Bt),!1),e.repeatPasswordInput.setError(null,!0),e.passwordInput.focus(),t=!1),0==t&&(e.passwordInput.value="",e.repeatPasswordInput.value="")),t},n.onUserInput(this.handlePasswordChanged.bind(this)),n.onSubmit((function(t){e.blockInteraction(),e.onSubmitCB&&e.onSubmitCB(t.password)})),n.start(),n}},{key:"validatePasswordsMatch",value:function(){return this.passwordInput.value===this.repeatPasswordInput.value}},{key:"isPasswordValid",value:function(){return this.passwordInputRegex.test(this.passwordInput.value)}},{key:"getAutocompleteValue",value:function(){return this.disableAutocomplete?fi.Off:this.isRegistrationMode?fi.NewPassword:fi.CurrentPassword}},{key:"handlePasswordChanged",value:function(){this.passwordInput.error&&this.passwordInput.clearError(),this.repeatPasswordInput&&this.repeatPasswordInput.error&&this.repeatPasswordInput.clearError()}}]),t}(),ki=function(e){function t(e,n){var o;return De(this,t),(o=Ue(this,qe(t).call(this,e,n))).supportsInlineError=!0,o}return Me(t,Zr),Fe(t,[{key:"showAuthUi",value:function(){this.showPasswordPage(!1)}},{key:"showRegUi",value:function(){this.showPasswordPage(!0)}},{key:"showPasswordPage",value:function(e){var t=this;if(this.authError&&this.passwordPage)this.passwordPage.reset(),this.passwordPage.setError(this.authErrorMessage);else{var n=!0===this.clientContext.disablePasswordAutocomplete,o=new Si(this.actionContext,e,this.description.getCredentialRecoveryEscapeOption(),this.description.getAuthenticatorId(),n);this.showAuthenticatorPage(o),this.passwordPage=o}this.passwordPage.onSubmit((function(e){var n=com.ts.mobile.sdk.PasswordInput.create(e);t.resolveInputPromise(com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(n))}))}}]),t}(),Ci=function(e){function t(e){var n;De(this,t),(n=Ue(this,qe(t).call(this,vt.page_select_device,"xmui-select-device-page",e))).selectedDevices=[],n.deviceKeys=[];var o=new Dr(vt.button_send_to_all);o.label=n.uiContext.getString(Dn),o.onClick((function(){n.onSubmitCB&&n.onSubmitCB(n.deviceKeys)})),n.addRightButton(o);var r=new Dr(vt.button_continue);r.label=n.uiContext.getString(Mt),r.disabled=!0,r.onClick((function(){n.onSubmitCB&&n.onSubmitCB(n.selectedDevices)})),n.addRightButton(r),n.confirmButton=r;var i=n.createContent();return n.setContent(i),n}return Me(t,_i),Fe(t,[{key:"createContent",value:function(){var e=this;return this.deviceList=new Er(vr.Multiple),this.deviceList.onSelectionChanged((function(t){e.selectedDevices=t,e.confirmButton.disabled=0===t.length})),this.deviceList.focus(),this.deviceList}},{key:"addDevice",value:function(e,t,n,o){var r=new Pr(t,n,rt.Device);this.deviceList.addListItem(e,o,r),this.deviceKeys.push(e)}},{key:"onSubmit",value:function(e){this.onSubmitCB=e}}]),t}(),Ii=function(e){function t(){return De(this,t),Ue(this,qe(t).apply(this,arguments))}return Me(t,it),Fe(t,[{key:"buildElement",value:function(){return ot("")}},{key:"src",set:function(e){this.attr={src:e}}}]),t}(),Ei="xmui-mobile-approve-pending",Ri=function(e){function t(e,n,o,r){var i;De(this,t);var s=(i=Ue(this,qe(t).call(this,vt.page_mobile_approve,Ei,e))).createContent(n,o,r);return i.setContent(s),ze(qe(t.prototype),"busy",!0,Ne(i),!0),i}return Me(t,_i),Fe(t,[{key:"createContent",value:function(e,t,n){var o=new ct;return o.className="".concat(Ei,"_container"),o.appendChild(this.createSpacer()),null==t?this.createNoCodeContent(e,o):t===com.ts.mobile.sdk.OtpFormatType.Numeric?this.createNumericCodeContent(n,e,o):t===com.ts.mobile.sdk.OtpFormatType.QrCode&&this.createQRCodeContent(n,e,o),o}},{key:"createMessage",value:function(e){var t=new st;return t.setText(e),t.className="".concat(Ei,"_message"),t}},{key:"createSpacer",value:function(){var e=new ct;return e.className="".concat(Ei,"_spacer"),e}},{key:"createNoCodeContent",value:function(e,t){var n=new ct;n.className="".concat(Ei,"_icon ").concat(rt.MobileApproveWaiting);var o=this.createMessage(e);t.appendChildren(n,this.createSpacer(),o,this.createSpacer())}},{key:"createNumericCodeContent",value:function(e,t,n){var o=this.createMessage(t),r=new st;return r.className="".concat(Ei,"_numeric-code"),r.setText(e),n.appendChildren(o,this.createSpacer(),r,this.createSpacer()),n}},{key:"createQRCodeContent",value:function(e,t,n){var o=this.createMessage(t),r=new ct;r.className="".concat(Ei,"_qr-code-container");var i=new Ii;return i.className="".concat(Ei,"_qr-code"),i.src=e,r.appendChild(i),n.appendChildren(o,this.createSpacer(),r),n}},{key:"busy",set:function(e){}}]),t}();!function(e){e[e.TargetSelection=0]="TargetSelection",e[e.PollingRequested=1]="PollingRequested",e[e.PollingStarted=2]="PollingStarted"}(vi||(vi={}));var Pi,Oi=function(e){function t(e,n,o){var r;return De(this,t),(r=Ue(this,qe(t).call(this,e,n))).state=vi.TargetSelection,r.pollingIntervalMillis=3e3,r.instructions=o,r}return Me(t,Zr),Fe(t,[{key:"setPollingIntervalInMillis",value:function(e){this.pollingIntervalMillis=e}},{key:"setCreatedApprovalInfo",value:function(e,t){null!=e?(this.setupOtp(t),this.state=vi.PollingRequested):(this.setupOtp(null),this.state=vi.TargetSelection,clearTimeout(this.pollingTimer))}},{key:"setAvailableTargets",value:function(e){this.availableTargets=e}},{key:"endSession",value:function(){We(qe(t.prototype),"endSession",this).call(this),clearTimeout(this.pollingTimer)}},{key:"promiseInput",value:function(){var e,t=this;switch(this.mode){case com.ts.mobile.sdk.AuthenticatorSessionMode.Authentication:switch(zr.log("Fetching Mobile Approve authentication input;"),this.state){case vi.TargetSelection:e=this.promiseTargetSelectionInput();break;case vi.PollingRequested:this.state=vi.PollingStarted,this.showPendingUI(),e=this.startPolling();break;case vi.PollingStarted:e=this.startPolling()}case com.ts.mobile.sdk.AuthenticatorSessionMode.Registration:}return(e=e||Promise.reject("Illegal state")).then((function(e){return t.clearError(),e}))}},{key:"promiseTargetSelectionInput",value:function(){var e=this;return new Promise((function(t,n){e.setInputResolver(t);var o=new Ci(e.actionContext);o.setTitle(e.uiContext.getString(Ot)),o.setInstructions(e.uiContext.getString(Ln));var r={};e.availableTargets.forEach((function(t){var n=t.getDeviceDetails(),i=n.getDeviceId(),s=Nr.getDeviceNameFromDeviceDetails(n),a=Nr.getLastAccessedFromDeviceDetails(e.uiContext,n);r[i]=t,o.addDevice(i,s,a,!1)})),o.onSubmit((function(t){o.blockInteraction();var n=t.map((function(e){return r[e]})),i=Nr.createTargetsSelectionResponse(n);e.resolveInputPromise(i)})),e.showAuthenticatorPage(o)}))}},{key:"showPendingUI",value:function(){var e=new Ri(this.actionContext,this.instructions,this.otpType,this.otpCode);e.setTitle(this.uiContext.getString(Ot)),this.showAuthenticatorPage(e)}},{key:"onCancel",value:function(){this.currentInputResolveFn?(clearTimeout(this.pollingTimer),We(qe(t.prototype),"onCancel",this).call(this)):this.pendingRequest=Nr.createCancelAuthenticatorRequest()}},{key:"onEscape",value:function(e){clearTimeout(this.pollingTimer),We(qe(t.prototype),"onEscape",this).call(this,e)}},{key:"setupOtp",value:function(e){if(e){var t=e.getFormat().getType();switch(this.otpType=t,t){case com.ts.mobile.sdk.OtpFormatType.Numeric:this.otpCode=e.getValue();break;case com.ts.mobile.sdk.OtpFormatType.QrCode:this.otpCode="data:image/jpeg;base64,"+e.getValue();break;default:throw zr.log("Unsupported otp format"),new Error("Unsupported otp format")}}else this.otpType=null,this.otpCode=null}},{key:"startPolling",value:function(){var e=this;return new Promise((function(t,n){e.setInputResolver(t),e.pollingTimer=setTimeout((function(){if(e.pendingRequest)e.resolveInputPromise(e.pendingRequest),e.pendingRequest=null;else{var t=com.ts.mobile.sdk.MobileApproveInputRequestPolling.createRequestPollingInput(),n=com.ts.mobile.sdk.TargetBasedAuthenticatorInput.createAuthenticatorInput(t),o=com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(n);e.resolveInputPromise(o)}}),e.pollingIntervalMillis)}))}},{key:"showAuthUi",value:function(){throw new Error("Method not implemented")}},{key:"showRegUi",value:function(){throw new Error("Method not implemented")}}]),t}(),xi="xmui-pin-code",Ti=function(e){function t(e,n){var o;De(this,t),(o=Ue(this,qe(t).call(this))).digits=[],o.className=xi,o.mainInput=new ti(e),o.mainInput.className="".concat(xi,"_input");var r=new ct;r.className="".concat(xi,"_container"),o.messageComp=new ii(!0,!0),o.changeHandler=o.changeHandler.bind(Ne(o));for(var i=0;i1?n.forEach((function(t){return qi(e,t)})):e.classList?e.classList.add(t):e.className+=" ".concat(t)}function Bi(e,t){var n=t.split(" ");n.length>1?n.forEach((function(t){return Bi(e,t)})):e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)".concat(t.split(" ").join("|"),"(\\b|£)"),"gi")," ")}function Ni(e){ji(e).forEach((function(e){e.parentNode.removeChild(e)}))}function Ui(e,t,n,o){var r=t-e,i=o-n;return{length:Math.ceil(Math.sqrt(r*r+i*i)),angle:Math.round(180*Math.atan2(i,r)/Math.PI)}}var Hi=new WeakMap,Wi=function(){function e(){De(this,e),this.holder=null,this.option=null,this.mapperFunc=Fi,this.holderLeft=0,this.holderTop=0,this.disabled=!1,this.patternAry=[],this.lastPosObj=[],this.rightPattern=null,this.onSuccess=Fi,this.onError=Fi,this.pattCircle=null,this.lineX1=0,this.lineY1=0,this.line=null,this.lastPosObj=null,this.dotYOffest=null}return Fe(e,[{key:"getElementsFromPoint",value:function(e,t){if(document.elementsFromPoint)return document.elementsFromPoint(e,t);for(var n=[],o=document.msElementsFromPoint(e,t),r=o.length,i=0;i1){var d=Ui(this.lineX1,u,this.lineY1,l),p=d.length,h=d.angle;Mi(this.line,{width:"".concat(p,"px"),transform:"rotate(".concat(h,"deg)")}),a||Mi(this.line,{display:"block"})}if(null==t){var f=document.createElement("div");f.className="patt-lines",f.style.width="0px",f.style.visibility="hidden",f.style.position="absolute",f.style.top="0px",f.style.left="0px",s.appendChild(f);var m=f.getBoundingClientRect();this.dotYOffest=m.height/2,s.removeChild(f)}var g,y,b=(g='
'),(y=document.createElement("div")).innerHTML=g,y.children[0]);this.line=b,this.lineX1=u,this.lineY1=l,this.holder.appendChild(b),a||Mi(this.line,{display:"none"})}},{key:"addDirectionClass",value:function(e){var t=this.lastElm,n=this.line,o=this.lastPosObj,r=[];if(e.j-o.j>0?r.push("s"):e.j-o.j<0&&r.push("n"),e.i-o.i>0?r.push("e"):e.i-o.i<0&&r.push("w"),r=r.join("-")){var i="".concat(r," dir");qi(t,i),qi(n,i)}}}]),e}(),Ki=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};De(this,e),this._onStart=this._onStart.bind(this),this._onMove=this._onMove.bind(this),this._onEnd=this._onEnd.bind(this),this._renderCircle=this._renderCircle.bind(this);var o=new Wi,r=t;if(r&&0!==r.length){var i={onDraw:Fi,onStart:Fi},s=n.matrix;s&&s[0]*s[1]>9&&(i.delimiter=","),o.option=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o0){var l=Ui(t.lineX1,a.x,t.lineY1,a.y),d=l.length,p=l.angle;Mi(t.line,{width:"".concat(d+2,"px"),transform:"rotate(".concat(p,"deg)")})}if(c&&(n.allowRepeat&&o[o.length-1]!==u||-1===o.indexOf(u))){var h=s[c-1];if(t.lastPosObj)for(var f=t.lastPosObj,m=a.i-f.i>0?1:-1,g=a.j-f.j>0?1:-1,y=f.i,b=f.j,v=Math.abs(a.i-y),_=Math.abs(a.j-b);0===v&&_>1||0===_&&v>1||_===v&&_>1;){y=v?y+m:y,b=_?b+g:b,v=Math.abs(a.i-y),_=Math.abs(a.j-b);var w=(b-1)*n.matrix[1]+y,A=t.mapperFunc(w)||w;(n.allowRepeat||-1===o.indexOf(A))&&(t.addDirectionClass({i:y,j:b}),t.markPoint(s[A-1],A),t.addLine({idx:c,i:y,j:b}))}t.lastPosObj&&t.addDirectionClass(a),t.markPoint(h,u),t.addLine(a),t.lastPosObj=a}}},{key:"_onEnd",value:function(e){e.preventDefault();var t=Hi.get(this),n=t.option,o=t.patternAry.join(n.delimiter);t.holder.removeEventListener(this.moveEvent,this._onMove),document.removeEventListener(this.endEvent,this._onEnd),Bi(t.holder,"patt-hidden"),o&&(Ni(t.line),n.onDraw(o),t.rightPattern&&(o===t.rightPattern?t.onSuccess():(t.onError(),this.error())))}},{key:"_renderCircle",value:function(e,t){var n=Hi.get(this),o=n.circContainerHeight,r=n.circContainerWidth;return'
\n
\n
\n
\n
')}},{key:"_render",value:function(){var e=Hi.get(this),t=e.option,n=e.holder,o=t.matrix,r=(t.margin,t.radius,'
\n '.concat(function(e,t){for(var n=new Array(e),o=0;o"));n.innerHTML=r,e.pattCircle=e.holder.querySelectorAll(".patt-circ")}},{key:"option",value:function(e,t){var n=Hi.get(this).option;return void 0===t?n[e]:(n[e]=t,"margin"!==e&&"matrix"!==e&&"radius"!==e||this._render(),this)}}]),e}();Ki.defaults={matrix:[3,3],margin:20,radius:25,patternVisible:!0,lineOnMove:!0,delimiter:"",enableSetPattern:!1,allowRepeat:!0};var zi,Vi="xmui-pattern-lock",Qi="".concat(Vi,"_pattern"),Gi=function(e){function t(e,n,o){var r;De(this,t),(r=Ue(this,qe(t).call(this))).className=Vi,r.tabindex=0,r.mainInput=new ti(e),r.mainInput.className="".concat(Vi,"_input"),r.appendChild(r.mainInput),r.handleSelectedPattern=r.handleSelectedPattern.bind(Ne(r)),r.handlePatternStarted=r.handlePatternStarted.bind(Ne(r));var i=new ct;return i.className=Qi,r.patternLockExt=new Ki(i.htmlElement,{matrix:[o,n],onDraw:r.handleSelectedPattern,onStart:r.handlePatternStarted}),r.messageComp=new ii(!0,!0),r.ariaDescribedBy=r.messageComp.id,r.appendChildren(i,r.messageComp),r}return Me(t,ct),Fe(t,[{key:"setError",value:function(e){this.error=!0,this.errorMessage=e||"",this.patternLockExt.setError()}},{key:"clearError",value:function(){this.error=!1,this.errorMessage="",this.patternLockExt.clearError()}},{key:"reset",value:function(){this.patternLockExt.reset()}},{key:"onChange",value:function(e){this.changeCB=e}},{key:"onStart",value:function(e){this.startCB=e}},{key:"handleSelectedPattern",value:function(e){this.mainInput.value=e,this.changeCB&&this.changeCB()}},{key:"handlePatternStarted",value:function(){this.startCB&&this.startCB()}},{key:"name",set:function(e){this.mainInput.name=e}},{key:"value",set:function(e){},get:function(){return this.mainInput.value}},{key:"errorMessage",set:function(e){this.messageComp.setText(e)}}]),t}();!function(e){e[e.Enter=0]="Enter",e[e.Repeat=1]="Repeat"}(zi||(zi={}));var Ji,Yi=function(e){function t(e,n,o,r,i,s,a){var c;De(this,t),(c=Ue(this,qe(t).call(this,i?vt.page_pattern_reg:vt.page_pattern_auth,i?"xmui-pattern-registration":"xmui-pattern-authentication",e,s,a))).minLength=r,c.isRegistrationMode=i,c.mode=zi.Enter,c.setTitle(c.getTitle()),c.setInstructions(c.getInstructions());var u=c.createForm(n,o);if(c.setContent(u),c.isRegistrationMode){var l=new Dr(vt.button_reset);l.label=c.uiContext.getString(fn),l.disabled=!0,l.onClick(c.handleReset.bind(Ne(c))),c.resetButton=l,c.addRightButton(l)}return c}return Me(t,_i),Fe(t,[{key:"onSubmit",value:function(e){this.onSubmitCB=e}},{key:"setError",value:function(e){this.error=!0,this.patternLock.setError(e)}},{key:"clearError",value:function(){this.error=!1,this.patternLock.clearError()}},{key:"handleReset",value:function(){this.mode=zi.Enter,this.patternLock.reset(),this.enteredPattern=null,this.resetButton.disabled=!0,this.setInstructions(this.getInstructions()),this.clearError()}},{key:"getTitle",value:function(){var e=this.isRegistrationMode?cn:an;return this.uiContext.getString(e)}},{key:"getRegModeInstructions",value:function(){var e=this.mode===zi.Enter?ln:hn;return this.uiContext.getString(e)}},{key:"getInstructions",value:function(){return this.isRegistrationMode?this.getRegModeInstructions():this.uiContext.getString(un)}},{key:"handleNoMatch",value:function(){this.patternLock.setError(this.uiContext.getString(dn))}},{key:"submitPattern",value:function(e){this.onSubmitCB&&this.onSubmitCB(e)}},{key:"repeat",value:function(){this.patternLock.reset(),this.mode=zi.Repeat,this.resetButton.disabled=!1,this.setInstructions(this.getInstructions())}},{key:"validateLength",value:function(e){return JSON.parse("["+e+"]").length>=this.minLength}},{key:"handleRegPatternChangedEnterMode",value:function(e){this.validateLength(e)?(this.enteredPattern=e,this.repeat()):this.notifyShortPattern()}},{key:"notifyShortPattern",value:function(){this.patternLock.setError(this.uiContext.getString(pn))}},{key:"handleRegPattrenChanged",value:function(e){this.mode===zi.Enter?this.handleRegPatternChangedEnterMode(e):this.enteredPattern===e?this.submitPattern(e):this.handleNoMatch()}},{key:"handlePattrenChanged",value:function(){var e=this.patternLock.value;this.isRegistrationMode?this.handleRegPattrenChanged(e):this.submitPattern(e)}},{key:"handlePatternStarted",value:function(){this.clearError()}},{key:"createForm",value:function(e,t){var n=new bi;n.addClass("xmui-pattern-form");var o=new Gi(vt.input_pattern_lock,e,t);return o.name="pattern",o.onChange(this.handlePattrenChanged.bind(this)),o.onStart(this.handlePatternStarted.bind(this)),o.focus(),this.patternLock=o,n.appendChild(o),this.addRecoveryButtonToForm(n),n}}]),t}(),Zi=function(e){function t(e,n,o,r){var i;return De(this,t),(i=Ue(this,qe(t).call(this,e,n))).gridWidth=o,i.gridHeight=r,i.supportsInlineError=!0,i.minLength=4,i}return Me(t,Zr),Fe(t,[{key:"setMinLength",value:function(e){null!=e&&(this.minLength=e)}},{key:"showAuthUi",value:function(){this.showPatternPage(!1)}},{key:"showRegUi",value:function(){this.showPatternPage(!0)}},{key:"showPatternPage",value:function(e){var t=this,n=new Yi(this.actionContext,this.gridWidth,this.gridHeight,this.minLength,e,this.description.getCredentialRecoveryEscapeOption(),this.description.getAuthenticatorId());this.authError&&n.setError(this.authErrorMessage),n.onSubmit((function(e){n.blockInteraction();var o=com.ts.mobile.sdk.PatternInput.create(t.createPatternInputString(e));t.resolveInputPromise(com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(o))})),this.showAuthenticatorPage(n)}},{key:"pointsIndexToCoorinate",value:function(e){var t=this;return e.map((function(e){return{y:Math.floor((e-1)/t.gridWidth),x:(e-1)%t.gridWidth}}))}},{key:"createPatternInputString",value:function(e){var t=JSON.parse("[".concat(e,"]"));return this.pointsIndexToCoorinate(t).map((function(e){return"r:".concat(e.y,",c:").concat(e.x)})).join("")}}]),t}(),£i="xmui-tabs",Xi=function(e){function t(){var e;return De(this,t),(e=Ue(this,qe(t).call(this))).tabs=new Map,e.className=£i,e}return Me(t,ct),Fe(t,[{key:"addTab",value:function(e,t){var n=this,o=new ct;o.className="".concat(£i,"_tab"),o.appendChild(t),this.tabs.set(e,o),this.appendChild(o),o.onClick((function(){o!==n.selectedTab&&(n.selectTab(o),n.selectionChangedCB&&n.selectionChangedCB(e))}))}},{key:"selectTabByKey",value:function(e){var t=this.tabs.get(e);this.selectTab(t)}},{key:"onSelectionChanged",value:function(e){this.selectionChangedCB=e}},{key:"selectTab",value:function(e){e&&(this.unselectCurrentTab(),e.selected=!0,this.selectedTab=e)}},{key:"unselectCurrentTab",value:function(){this.selectedTab&&(this.selectedTab.selected=!1,this.selectedTab=null)}}]),t}(),es="xmui-tabbed-panels",ts=function(e){function t(){var e;return De(this,t),(e=Ue(this,qe(t).call(this))).keyToPanel=new Map,e.curKey=0,e.className=es,e.tabs=new Xi,e.tabs.onSelectionChanged(e.selectPanel.bind(Ne(e))),e.container=new ct,e.container.className="".concat(es,"_container"),e.appendChildren(e.tabs,e.container),e}return Me(t,ct),Fe(t,[{key:"addPanel",value:function(e,t){var n=this.generateKey();this.tabs.addTab(n,e),t.show=!1,this.container.appendChild(t),this.keyToPanel.set(n,t),1===this.keyToPanel.size&&(this.tabs.selectTabByKey(n),this.selectPanel(n))}},{key:"generateKey",value:function(){return(++this.curKey).toString()}},{key:"selectPanel",value:function(e){var t=this.keyToPanel.get(e);t!==this.selectedPanel&&(t.show=!0,this.selectedPanel&&(this.selectedPanel.show=!1),this.selectedPanel=t)}}]),t}(),ns="xmui-tab-content",os="".concat(ns,"_title"),rs="".concat(ns,"_icon"),is=function(e){function t(){var e;return De(this,t),(e=Ue(this,qe(t).call(this))).className=ns,e.iconComp=new ct,e.iconComp.className=rs,e.titleComp=new st,e.titleComp.className=os,e.appendChildren(e.iconComp,e.titleComp),e}return Me(t,ct),Fe(t,[{key:"title",set:function(e){this.titleComp.setText(e)}},{key:"icon",set:function(e){this.iconComp.className="".concat(rs," ").concat(e)}}]),t}(),ss=function(e){function t(e){var n,o;De(this,t),(o=Ue(this,qe(t).call(this,vt.page_otp_select_channel,"xmui-select-channel-page",e))).typeToList=new Map,o.channelTypeToLocalizationKey=(je(n={},com.ts.mobile.sdk.OtpChannel.Sms,Gt),je(n,com.ts.mobile.sdk.OtpChannel.Email,Jt),je(n,com.ts.mobile.sdk.OtpChannel.PushNotification,Zt),je(n,com.ts.mobile.sdk.OtpChannel.VoiceCall,Yt),n);var r=o.createContent();return o.setContent(r),o.handleSelectionChanged=o.handleSelectionChanged.bind(Ne(o)),o}return Me(t,_i),Fe(t,[{key:"createContent",value:function(){return this.tabbedPanels=new ts,this.tabbedPanels}},{key:"addChannelTarget",value:function(e){var t=this.typeToList.get(e.channel)||this.createTabbedList(e),n=new Pr(e.targetName,e.targetInfo);t.addListItem(e.targetId,!1,n)}},{key:"onSubmit",value:function(e){this.onSubmitCB=e}},{key:"handleSelectionChanged",value:function(e){this.onSubmitCB&&this.onSubmitCB(e[0])}},{key:"createList",value:function(e){var t=new Er;return this.typeToList.set(e,t),t.onSelectionChanged(this.handleSelectionChanged),t}},{key:"createTabbedList",value:function(e){var t=new is,n=this.channelTypeToLocalizationKey[e.channel]||"UNKNOWN";t.title=this.uiContext.getString(n),t.icon=Or.getChannelIcon(e.channel);var o=this.createList(e.channel);return this.tabbedPanels.addPanel(t,o),o}}]),t}(),as="xmui-message-with-action",cs=function(e){function t(){var e;return De(this,t),(e=Ue(this,qe(t).call(this))).className=as,e.message=new st,e.message.className="".concat(as,"_message"),e.action=new st,e.action.className="".concat(as,"_action"),e.appendChildren(e.message,e.action),e}return Me(t,ct),Fe(t,[{key:"setMessage",value:function(e){this.message.setText(e)}},{key:"setAction",value:function(e,t){this.action.setText(e),this.onClick(t)}}]),t}(),us="xmui-otp-page",ls="".concat(us,"_content"),ds="".concat(us,"_message-container"),ps=function(e){function t(e,n,o){var r;De(this,t),(r=Ue(this,qe(t).call(this,vt.page_otp_auth,us,e))).numDigits=n,r.useBackButton=o,r.useNormalInput=r.numDigits>7,r.setTitle(r.uiContext.getString(Vt));var i=r.createContent();if(r.setContent(i),o&&(r.cancelButton.automationId=vt.button_back,r.cancelButton.label=r.uiContext.getString(kt)),r.useNormalInput){var s=new Dr(vt.button_continue);s.label=r.uiContext.getString(Ct),s.disabled=!0,s.onClick((function(){r.submitOtpCode(r.otpCodeComp.value)})),r.continueButton=s,r.addRightButton(s)}return r}return Me(t,_i),Fe(t,[{key:"handleCancelButtonClicked",value:function(){this.useBackButton?this.onBackCB&&this.onBackCB():We(qe(t.prototype),"handleCancelButtonClicked",this).call(this)}},{key:"onBack",value:function(e){this.onBackCB=e}},{key:"onSubmit",value:function(e){this.onSubmitCB=e}},{key:"onResend",value:function(e){this.onResendCB=e}},{key:"setError",value:function(e){this.error=!0,this.otpCodeComp.setError(e)}},{key:"clearError",value:function(){this.otpCodeComp.clearError(),this.error=!1}},{key:"submitOtpCode",value:function(e){this.onSubmitCB&&this.onSubmitCB(e)}},{key:"handleOtpCodeChanged",value:function(){this.clearError();var e=this.otpCodeComp.value;this.useNormalInput?this.continueButton.disabled=null==e||0===e.length:null!=e&&e.length===this.numDigits&&this.submitOtpCode(e)}},{key:"createForm",value:function(){var e=new bi;return this.useNormalInput?(this.otpCodeComp=new mi(ei.PositiveInteger,vt.input_otp_code),this.otpCodeComp.autocomplete=fi.Off):this.otpCodeComp=new Ti(vt.input_otp_code,this.numDigits),this.otpCodeComp.name="otp-code",this.otpCodeComp.value="",this.otpCodeComp.focus(),this.otpCodeComp.onChange(this.handleOtpCodeChanged.bind(this)),e.appendChild(this.otpCodeComp),e}},{key:"createContent",value:function(){var e=this,t=new ct;t.className=ls;var n=this.createForm(),o=new ct;o.className=ds;var r=new cs;return r.setMessage(this.uiContext.getString(rn)),r.setAction(this.uiContext.getString(on),(function(){e.onResendCB&&e.onResendCB()})),o.appendChild(r),t.appendChildren(n,o),t}}]),t}();!function(e){e[e.TargetSelection=0]="TargetSelection",e[e.Input=1]="Input"}(Ji||(Ji={}));var hs,fs,ms,gs=function(e){function t(e,n,o,r){var i,s;return De(this,t),(s=Ue(this,qe(t).call(this,e,n))).autoExecedTarget=r,s.supportsInlineError=!0,s.channelTypeToInstruction=(je(i={},com.ts.mobile.sdk.OtpChannel.Sms,£t),je(i,com.ts.mobile.sdk.OtpChannel.Email,Xt),je(i,com.ts.mobile.sdk.OtpChannel.PushNotification,en),je(i,com.ts.mobile.sdk.OtpChannel.VoiceCall,tn),je(i,com.ts.mobile.sdk.OtpChannel.Unknown,nn),i),s.possibleTargets=o,s.state=r?Ji.Input:Ji.TargetSelection,s.target=r,s}return Me(t,Zr),Fe(t,[{key:"setAvailableTargets",value:function(e){this.possibleTargets=e}},{key:"setGeneratedOtp",value:function(e,t){t?(this.state=Ji.Input,e instanceof com.ts.mobile.sdk.OtpFormatNumericImpl?(this.codeLength=e.getOtpLength(),this.isSupportedFormat=!0):this.isSupportedFormat=!1):this.state=Ji.TargetSelection,this.target=t}},{key:"showOtpInput",value:function(){var e=this,t=new ps(this.actionContext,this.codeLength,this.possibleTargets.length>1);t.setTitle(this.uiContext.getString(Vt)),t.setInstructions(this.uiContext.getString(this.channelTypeToInstruction[this.target.getChannel()])),this.authError&&t.setError(this.authErrorMessage),t.onSubmit((function(n){e.clearError(),t.blockInteraction();var o=com.ts.mobile.sdk.OtpInputOtpSubmission.createOtpSubmission(n),r=com.ts.mobile.sdk.TargetBasedAuthenticatorInput.createAuthenticatorInput(o);e.resolveInputPromise(com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(r))})),t.onBack((function(){e.clearError(),t.blockInteraction(),e.state=Ji.TargetSelection,e.showAuthUi()})),t.onResend((function(){e.clearError(),t.blockInteraction();var n=com.ts.mobile.sdk.OtpInputRequestResend.createOtpResendRequest(),o=com.ts.mobile.sdk.TargetBasedAuthenticatorInput.createAuthenticatorInput(n);e.resolveInputPromise(com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(o))})),this.showAuthenticatorPage(t)}},{key:"showTargetSelectionInput",value:function(){var e=this,t=0,n={},o=new ss(this.actionContext);o.error=!!this.authError,o.setTitle(this.uiContext.getString(Vt)),o.setInstructions(this.getTargetSelectionInstruction()),o.onSubmit((function(t){e.clearError(),o.blockInteraction();var r=com.ts.mobile.sdk.TargetBasedAuthenticatorInput.createTargetSelectionRequest(n[t]);e.resolveInputPromise(com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(r))})),this.possibleTargets.forEach((function(r){var i=r.getDeviceDetails(),s=(++t).toString();n[s]=r,o.addChannelTarget({channel:r.getChannel(),targetId:s,targetName:i?Nr.getDeviceNameFromDeviceDetails(i):r.getDescription(),targetInfo:i?Nr.getLastAccessedFromDeviceDetails(e.uiContext,i):null})})),this.showAuthenticatorPage(o)}},{key:"onCancel",value:function(){this.clearError(),We(qe(t.prototype),"onCancel",this).call(this)}},{key:"showAuthUi",value:function(){switch(this.state){case Ji.TargetSelection:this.showTargetSelectionInput();break;case Ji.Input:this.isSupportedFormat?this.showOtpInput():Promise.reject("Unsupported Otp code format")}}},{key:"showRegUi",value:function(){throw new Error("Otp registration unsupported")}},{key:"getTargetSelectionInstruction",value:function(){var e;return e=this.authError&&this.authError.getErrorCode()===com.ts.mobile.sdk.AuthenticationErrorCode.InvalidInput?sn:Qt,this.uiContext.getString(e)}}]),t}(),ys="xmui-totp-form",bs=function(e){function t(e,n,o){var r,i;De(this,t),(i=Ue(this,qe(t).call(this,vt.page_totp_auth,"xmui-totp-page",e))).challengeType=n,i.challenge=o,i.channelTypeLocalizationKeys=(je(r={},com.ts.mobile.sdk.TotpChallengeFormatType.Numeric,In),je(r,com.ts.mobile.sdk.TotpChallengeFormatType.AlphaNumeric,In),je(r,com.ts.mobile.sdk.TotpChallengeFormatType.QrCode,En),r),i.setTitle(i.uiContext.getString(Sn)),i.setInstructions(i.uiContext.getString(i.channelTypeLocalizationKeys[i.challengeType]||Cn));var s=i.createForm();i.setContent(s);var a=new Dr(vt.button_continue);return a.label=i.uiContext.getString(Mt),a.disabled=!0,a.type=Sr.Submit,a.form=ys,a.onClick(i.handleSend.bind(Ne(i))),i.sendButton=a,i.addRightButton(a),i}return Me(t,_i),Fe(t,[{key:"onSubmit",value:function(e){this.onSubmitCB=e}},{key:"setError",value:function(e){this.error=!0,this.totpCodeInput.setError(e)}},{key:"clearError",value:function(){this.error=!1,this.totpCodeInput.clearError()}},{key:"handleSend",value:function(){this.onSubmitCB&&this.onSubmitCB(this.totpCodeInput.value)}},{key:"handleTotpCodeChanged",value:function(){var e=this.totpCodeInput.value;this.sendButton.disabled=null==e||0===e.length}},{key:"createSpacer",value:function(){var e=new ct;return e.className="".concat("xmui-totp-form","_spacer"),e}},{key:"createChallenge",value:function(){var e;switch(this.challengeType){case com.ts.mobile.sdk.TotpChallengeFormatType.QrCode:var t=new ct;t.className="".concat("xmui-totp-form","_qr-code-container");var n=new Ii;n.className="".concat("xmui-totp-form","_qr-code"),n.src=this.challenge,t.appendChild(n),e=t;break;case com.ts.mobile.sdk.TotpChallengeFormatType.Numeric:case com.ts.mobile.sdk.TotpChallengeFormatType.AlphaNumeric:var o=new st;o.className="".concat("xmui-totp-form","_alphanumeric-code"),o.setText(this.challenge),e=o}return e}},{key:"createStep1Title",value:function(){var e=new st;e.className="".concat("xmui-totp-form","_step");var t=this.challengeType===com.ts.mobile.sdk.TotpChallengeFormatType.QrCode?Rn:On;return e.setText(this.uiContext.getString(t)),e}},{key:"createStep2Title",value:function(){var e=new st;e.className="".concat("xmui-totp-form","_step");var t=this.challengeType===com.ts.mobile.sdk.TotpChallengeFormatType.QrCode?Pn:xn;return e.setText(this.uiContext.getString(t)),e}},{key:"createForm",value:function(){var e=new bi;if(e.addClass("xmui-totp-form"),e.id=ys,e.appendChild(this.createSpacer()),null!=this.challengeType){var t=this.createStep1Title(),n=this.createChallenge(),o=this.createStep2Title();e.appendChildren(t,this.createSpacer(),n,this.createSpacer(),o,this.createSpacer())}var r=new ct;r.className="".concat("xmui-totp-form","_input");var i=new mi(ei.Text,vt.input_totp_code);return i.name="totp-code",i.value="",i.placeholder=this.uiContext.getString(Tn),i.onChange(this.handleTotpCodeChanged.bind(this)),i.focus(),r.appendChild(i),this.totpCodeInput=i,e.appendChild(r),e.appendChild(this.createSpacer()),e}}]),t}(),vs=function(e){function t(e,n){return De(this,t),Ue(this,qe(t).call(this,e,n))}return Me(t,Zr),Fe(t,[{key:"setAvailableTargets",value:function(e){this.availableTargets=e}},{key:"setTargetDevices",value:function(e){this.targetDevices=e}},{key:"setChallenge",value:function(e){this.challenge=this.getChallenge(e)}},{key:"showAuthUi",value:function(){this.availableTargets&&!this.targetDevices?this.showTargetSelectionUi():this.showCodeInputUi()}},{key:"promiseRecoveryForError",value:function(e,n,o){return e.getErrorCode()==com.ts.mobile.sdk.AuthenticationErrorCode.InvalidInput&&n.indexOf(com.ts.mobile.sdk.AuthenticationErrorRecovery.RetryAuthenticator)>-1&&e.getPublicSymbolicProperty(com.ts.mobile.sdk.AuthenticationErrorProperty.AuthenticatorInvalidInputErrorDescription)==com.ts.mobile.sdk.AuthenticationErrorPropertySymbol.AuthenticatorInvalidInputErrorDescriptionTotpIncorrectCheckDigit?(zr.log("Totp authentication failed due to invalid check-digit, starting recovery"),this.inputError="Typing error detected - retype code",Promise.resolve(com.ts.mobile.sdk.AuthenticationErrorRecovery.RetryAuthenticator)):We(qe(t.prototype),"promiseRecoveryForError",this).call(this,e,n,o)}},{key:"showTargetSelectionUi",value:function(){var e=this,t=this.uiContext,n=new Ci(this.actionContext);n.setTitle(t.getString(Sn)),n.setInstructions(t.getString(kn));var o={};this.availableTargets.forEach((function(t){var r=t.getDeviceDetails(),i=r.getDeviceId(),s=Nr.getDeviceNameFromDeviceDetails(r),a=Nr.getLastAccessedFromDeviceDetails(e.uiContext,r);o[i]=t,n.addDevice(i,s,a,!1)})),n.onSubmit((function(t){n.blockInteraction();var r=t.map((function(e){return o[e]})),i=Nr.createTargetsSelectionResponse(r);e.resolveInputPromise(i)})),this.showAuthenticatorPage(n)}},{key:"showCodeInputUi",value:function(){var e=this,t=new bs(this.actionContext,this.challenge.type,this.challenge.value);this.inputError&&t.setError(this.inputError),t.onSubmit((function(n){t.blockInteraction();var o=com.ts.mobile.sdk.impl.TotpInputCodeSubmissionImpl.createTotpCodeSubmission(n),r=com.ts.mobile.sdk.TargetBasedAuthenticatorInput.createAuthenticatorInput(o);e.resolveInputPromise(com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(r))})),this.showAuthenticatorPage(t)}},{key:"showRegUi",value:function(){throw new Error("Method not implemented.")}},{key:"getChallenge",value:function(e){var t={type:null,value:null};if(e)switch(t.type=e.getFormat().getType(),t.type){case com.ts.mobile.sdk.TotpChallengeFormatType.AlphaNumeric:case com.ts.mobile.sdk.TotpChallengeFormatType.Numeric:t.value=e.getValue();break;case com.ts.mobile.sdk.TotpChallengeFormatType.QrCode:t.value="data:image/jpeg;base64,"+e.getValue()}return t}}]),t}(),_s="xmui-fido2-authentication",ws="xmui-fido2-registration",As=function(e){function t(e,n,o,r){var i,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];De(this,t),(i=Ue(this,qe(t).call(this,n?vt.page_fido2_reg:vt.page_fido2_auth,n?ws:_s,e,o,r))).isRegistrationMode=n,i.disableAutocomplete=s,i.displayNameInputRegex=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,}£/,i.setTitle(i.getTitle()),i.setInstructions(i.getInstructions());var a=new Dr(vt.button_continue);a.label=i.uiContext.getString(Mt),i.addRightButton(a),i.continueButton=a;var c=i.createForm();return i.setContent(c),i}return Me(t,_i),Fe(t,[{key:"setError",value:function(e){this.error=!0,this.displayNameInput.setError(e)}},{key:"clearError",value:function(){this.error=!1,this.displayNameInput.clearError()}},{key:"reset",value:function(){this.unblockInteraction(),this.displayNameInput.value="",this.displayNameInput.focus(),this.repeatDisplayNameInput&&(this.repeatDisplayNameInput.value="")}},{key:"onSubmit",value:function(e){this.onSubmitCB=e}},{key:"getTitle",value:function(){var e=this.isRegistrationMode?"ts_authenticator_fido2_title_reg":"ts_authenticator_fido2_title_auth";return this.uiContext.getString(e)}},{key:"getInstructions",value:function(){var e;return e=this.isRegistrationMode?"ts_authenticator_fido2_intro_reg":"ts_authenticator_fido2_intro_auth",this.uiContext.getString(e)}},{key:"createForm",value:function(){var e=this,t=this.uiContext,n=new bi(this.continueButton);n.addClass("xmui-fido2-page-form"),n.id="xmui-fido2-form";var o=new mi(ei.Text,vt.input_text),r=this.getAutocompleteValue();if(o.name="displayName",o.placeholder=t.getString("ts_authenticator_fido2_field_hint"),o.disabled=!1,o.value="",o.required=!0,o.autocomplete=r,o.ariaLabel=t.getString("ts_accessibility_fido2_enter_name"),o.focus(),this.displayNameInput=o,n.appendChild(o),this.isRegistrationMode){var i=new ct;i.className="".concat("xmui-fido2-page-form","_spacer"),n.appendChild(i);var s=new mi(ei.Text,vt.input_repeat_fido2);s.name="repeat-displayName",s.placeholder=t.getString("ts_authenticator_fido2_reg_field_hint"),s.disabled=!1,s.value="",s.required=!0,o.autocomplete=r,s.ariaLabel=t.getString("ts_accessibility_fido2_enter_name_again"),this.repeatDisplayNameInput=s,n.appendChild(s)}return this.addRecoveryButtonToForm(n),n.externalValidations=function(){var t=!0;return e.isRegistrationMode&&(e.validateDisplayNameMatch()||(e.repeatDisplayNameInput.setError(e.uiContext.getString("ts_authenticator_fido2_error_reg_no_match"),!1),e.displayNameInput.focus(),t=!1),e.isDisplayNameValid()||(e.displayNameInput.setError(e.uiContext.getString("ts_authenticator_fido2_error_reg_strength_validation_failed"),!1),e.repeatDisplayNameInput.setError(null,!0),e.displayNameInput.focus(),t=!1),0==t&&(e.displayNameInput.value="",e.repeatDisplayNameInput.value="")),t},n.onUserInput(this.handleDisplayNameChanged.bind(this)),n.onSubmit((function(t){e.blockInteraction(),e.onSubmitCB&&e.onSubmitCB(t.displayName)})),n.start(),n}},{key:"validateDisplayNameMatch",value:function(){return this.displayNameInput.value===this.repeatDisplayNameInput.value}},{key:"isDisplayNameValid",value:function(){return!0}},{key:"getAutocompleteValue",value:function(){return this.disableAutocomplete?fi.Off:(this.isRegistrationMode,fi.Username)}},{key:"handleDisplayNameChanged",value:function(){this.displayNameInput.error&&this.displayNameInput.clearError(),this.repeatDisplayNameInput&&this.repeatDisplayNameInput.error&&this.repeatDisplayNameInput.clearError()}}]),t}(),Ss=function(e){function t(e,n){var o;return De(this,t),(o=Ue(this,qe(t).call(this,e,n))).supportsInlineError=!0,o}return Me(t,Zr),Fe(t,[{key:"showAuthUi",value:function(){this.showFido2Page(!1)}},{key:"showRegUi",value:function(){this.showFido2Page(!0)}},{key:"showFido2Page",value:function(e){var t=this;if(this.authError&&this.fido2Page)this.fido2Page.reset(),this.fido2Page.setError(this.authErrorMessage);else{var n=!0===this.clientContext.disableFido2Autocomplete,o=new As(this.actionContext,e,this.description.getCredentialRecoveryEscapeOption(),this.description.getAuthenticatorId(),n);this.showAuthenticatorPage(o),this.fido2Page=o}this.fido2Page.onSubmit((function(e){var n=com.ts.mobile.sdk.Fido2InputResponse.create(e);t.resolveInputPromise(com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(n))}))}}]),t}(),ks=function(e){function t(e,n,o,r){var i;De(this,t),i=Ue(this,qe(t).call(this,vt.page_ticket_wait,"xmui-ticket-wait-page",e)),ze(qe(t.prototype),"busy",!0,Ne(i),!0);var s=i.createContent(n,o,r);return i.setContent(s),i}return Me(t,Lr),Fe(t,[{key:"createSpacer",value:function(){var e=new ct;return e.className="".concat("xmui-ticket-wait","_spacer"),e}},{key:"createMessage",value:function(e){var t=new st;return t.setText(e),t.className="".concat("xmui-ticket-wait","_message"),t}},{key:"createContent",value:function(e,t,n){var o=new ct;if(o.className="xmui-ticket-wait",o.appendChild(this.createSpacer()),t===com.ts.mobile.sdk.TicketIdFormat.Qr){var r=this.createMessage(e),i=new ct;i.className="".concat("xmui-ticket-wait","_qr-code-container");var s=new Ii;s.src=n,s.className="".concat("xmui-ticket-wait","_qr-code"),i.appendChild(s),o.appendChildren(r,this.createSpacer(),i)}else{var a=new ct;a.className="".concat("xmui-ticket-wait","_icon ").concat(rt.WaitForTicket);var c=this.createMessage(e);o.appendChildren(a,this.createSpacer(),c,this.createSpacer())}return o}},{key:"busy",set:function(e){}}]),t}(),Cs=function e(){De(this,e)},Is=function(){function e(){De(this,e),this.pollingIntervalMillis=3e3}return Fe(e,[{key:"setWaitingTicket",value:function(e){this.ticket=this.getTicket(e)}},{key:"startSession",value:function(e,t){this.username=zr.getUsernameFromClientContext(t),this.clientContext=t,this.actionContext=e}},{key:"endSession",value:function(){this.abortPolling()}},{key:"promiseInput",value:function(){var e=this;return this.ticket?new Promise((function(t,n){e.currentPromiseResolve=t,e.ticketWaitPage||e.createTicketWaitPage(),e.startPolling()})):Promise.reject("TicketWaitSession: Failed build ticket info")}},{key:"createTicketWaitPage",value:function(){var e=this,t=new ks(this.actionContext,this.ticket.instructions,this.ticket.format,this.ticket.value);this.username&&t.setUserName(this.username),t.setTitle(this.ticket.title),t.onCancel((function(){e.resolve(Nr.createCancelAuthenticatorRequest()),e.abortPolling()})),t.onEscape((function(t){e.resolve(com.ts.mobile.sdk.InputOrControlResponse.createEscapeResponse(t,{})),e.abortPolling()})),zr.renderPage(t,this.clientContext),this.ticketWaitPage=t}},{key:"startPolling",value:function(){var e=this;this.pollingTimer=setTimeout((function(){e.resolve(com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(com.ts.mobile.sdk.TicketWaitInput.createPollRequest())),e.pollingTimer=null}),this.pollingIntervalMillis)}},{key:"abortPolling",value:function(){this.pollingTimer&&(clearTimeout(this.pollingTimer),this.pollingTimer=null)}},{key:"resolve",value:function(e){this.currentPromiseResolve&&this.currentPromiseResolve(e),this.currentPromiseResolve=null}},{key:"getTicket",value:function(e){var t=new Cs;if(e){t.title=e.getTitle(),t.instructions=e.getText();var n=e.getTicketId();if(n){if(t.format=n.getFormat(),t.format!==com.ts.mobile.sdk.TicketIdFormat.Qr)throw t=null,zr.log("Unsupported ticket ID format"),new Error("Unsupported ticket ID format");t.value="data:image/jpeg;base64,"+n.getValue()}}return t}}]),e}(),Es="xmui-actions-menu-button",Rs="".concat(Es,"_menu-container"),Ps=function(e){function t(e){var n;return De(this,t),(n=Ue(this,qe(t).call(this))).actionsMenu=e,n.isOpen=!1,n.className="".concat(Es," ").concat(rt.More),n.automationId=vt.button_actions_list,n.menuContainer=new ct,n.menuContainer.className=Rs,n.menuContainer.appendChild(e),n.appendChild(n.menuContainer),n.onMousedown((function(){n.openMenu()})),n.handleMousedownEvent=n.handleMousedownEvent.bind(Ne(n)),n.handleWheelEvent=n.handleWheelEvent.bind(Ne(n)),n.handleActionSelection=n.handleActionSelection.bind(Ne(n)),n.handleResize=Xr(n.handleResize.bind(Ne(n)),10,!1),e.onSelectionChanged(n.handleActionSelection),n.actionsMenu.onFocus(n.handleFocusEvent.bind(Ne(n))),n.actionsMenu.onBlur(n.handleBlurEvent.bind(Ne(n))),n.actionsMenu.onKeydown(n.handleKeydownEvent.bind(Ne(n))),n}return Me(t,ct),Fe(t,[{key:"openMenu",value:function(){this.isOpen||(this.previousFocusedElement=document.activeElement,this.addClass("".concat(Es,"--open")),this.actionsMenu.clearSelection(),this.actionsMenu.clearActive(),this.actionsMenu.focus(),this.updateMenuPosition(),this.isOpen=!0)}},{key:"updateMenuPosition",value:function(){var e=this.htmlElement.getBoundingClientRect(),t=e.left+e.width/2,n=e.top+e.height/2,o=this.menuContainer.htmlElement,r=window.getComputedStyle(o),i=parseInt(r.width),s=parseInt(r.height),a=window.innerHeight-n-s,c=a<0?a:0;o.style.left=t-i+"px",o.style.top=n+c+"px"}},{key:"closeMenu",value:function(){this.isOpen&&(this.previousFocusedElement&&this.previousFocusedElement.focus&&this.previousFocusedElement.focus(),this.removeClass("".concat(Es,"--open")),window.removeEventListener("resize",this.handleResize),document.removeEventListener("mousedown",this.handleMousedownEvent),document.removeEventListener("wheel",this.handleWheelEvent),this.isOpen=!1)}},{key:"handleFocusEvent",value:function(e){window.addEventListener("resize",this.handleResize),document.addEventListener("mousedown",this.handleMousedownEvent),document.addEventListener("wheel",this.handleWheelEvent)}},{key:"handleBlurEvent",value:function(e){this.actionsMenu.htmlElement.contains(document.activeElement)||(this.previousFocusedElement=null,this.closeMenu())}},{key:"handleKeydownEvent",value:function(e,t){t.keyCode===_t.Escape&&this.closeMenu()}},{key:"handleMousedownEvent",value:function(e){this.closeMenu()}},{key:"handleResize",value:function(){this.closeMenu()}},{key:"handleWheelEvent",value:function(){this.closeMenu()}},{key:"handleActionSelection",value:function(){this.closeMenu()}}]),t}(),Os=function(e){function t(){var e;return De(this,t),(e=Ue(this,qe(t).call(this))).className="xmui-text-state",e}return Me(t,st),t}(),xs=function(e){function t(e){var n;De(this,t),(n=Ue(this,qe(t).call(this,vt.page_configure_authenticators,"xmui-authenticator-configuration-page"))).uiContext=e,n.keyToActionMenuButton={},n.setTitle(e.getString(jn));var o=new Dr(vt.button_cancel);o.label=e.getString(It),o.onClick((function(){n.onCancelCB&&n.onCancelCB()})),n.addLeftButton(o);var r=n.createContent();return n.setContent(r),n}return Me(t,bt),Fe(t,[{key:"createContent",value:function(){var e=this;return this.authList=new Er(vr.None),this.authList.onItemClicked((function(t){var n=e.keyToActionMenuButton[t];n&&n.openMenu()})),this.authList.focus(),this.authList}},{key:"getDefaultState",value:function(){var e=new Os;return e.setText(this.uiContext.getString(Rt)),e}},{key:"addAuthenticator",value:function(e,t,n,o,r,i,s){var a=Or.getAuthenticatorIcon(o)||Or.getAuthenticatorIcon(com.ts.mobile.sdk.AuthenticatorType.Generic),c=i?[this.getDefaultState()]:null,u=s?[rt.Registered]:null,l=new Ps(r);this.keyToActionMenuButton[e]=l;var d=new Pr(t,n,a,l,c,u);this.authList.addListItem(e,!1,d)}},{key:"onCancel",value:function(e){this.onCancelCB=e}}]),t}(),Ts="xmui-actions-menu",Ds=function(e){function t(){var e;return De(this,t),(e=Ue(this,qe(t).call(this,vr.SingleMouseup,!0))).className=Ts,e.automationId=vt.list_actions,e.tabindex=-1,e.role="menu",e}return Me(t,Cr),Fe(t,[{key:"addAction",value:function(e){var t=new st;t.id=gr(),t.className="".concat(Ts,"_action"),t.key=e.key,t.setText(e.label),this.addItem(t),this.role="menuitem",this.selected=!1,this.disabled=!1}}]),t}();!function(e){e[e.Register=0]="Register",e[e.Unregister=1]="Unregister",e[e.Reregister=2]="Reregister",e[e.SetDefault=3]="SetDefault"}(ms||(ms={}));var Ls=(je(hs={},ms.Register,qn),je(hs,ms.Unregister,Bn),je(hs,ms.Reregister,Nn),je(hs,ms.SetDefault,Un),hs),Fs=(je(fs={},ms.Register,Vn),je(fs,ms.Unregister,Gn),je(fs,ms.Reregister,Qn),je(fs,ms.SetDefault,Jn),fs),js=function(){function e(t){var n;De(this,e),this.username=t,this.actionTypeToEMenuAction=(je(n={},com.ts.mobile.sdk.AuthenticatorConfigurationAction.Register,ms.Register),je(n,com.ts.mobile.sdk.AuthenticatorConfigurationAction.Unregister,ms.Unregister),je(n,com.ts.mobile.sdk.AuthenticatorConfigurationAction.Reregister,ms.Reregister),n)}return Fe(e,[{key:"setAuthenticatorsList",value:function(e){var t=this,n=this.uiContext,o=new xs(n);o.setInstructions(this.instructions||n.getString(Mn)),o.setUserName(this.username),e.forEach((function(e){var r=e.getDescription(),i=r.getAuthenticatorId(),s=n.getString(Hr.getAuthenticatorNameKey(i)),a=n.getString(Hr.getAuthenticatorDescriptionKey(i)),c=r.getType(),u=e.getAvailableActions(),l=r.getDefaultAuthenticator(),d=r.getRegistered(),p=t.buildActionsMenu(u,l);p.onSelectionChanged(t.handleAction.bind(t,e)),o.addAuthenticator(i,s,a,c,p,l,d)})),o.onCancel((function(){t.configServices.finishSession()})),zr.renderPage(o,this.clientContext)}},{key:"startSession",value:function(e,t,n){this.username=zr.getUsernameFromClientContext(n)||this.username,this.configServices=e,this.actionContext=t,this.clientContext=n,this.uiContext=e.getUiContext(),this.instructions=null,zr.log("Starting configuration session")}},{key:"endSession",value:function(){zr.log("Ending configuration session")}},{key:"buildActionsMenu",value:function(e,t){var n=this,o=new Ds;return e.forEach((function(e){o.addAction({key:n.actionTypeToEMenuAction[e].toString(),label:n.uiContext.getString(Ls[n.actionTypeToEMenuAction[e]])})})),t||o.addAction({key:ms.SetDefault.toString(),label:this.uiContext.getString(Ls[ms.SetDefault])}),o}},{key:"handleAction",value:function(e,t){var n,o=this,r=parseInt(t);switch(r){case ms.SetDefault:n=this.handleSetDefault(e);break;case ms.Register:n=this.handleRegister(e);break;case ms.Reregister:n=this.handleReregister(e);break;case ms.Unregister:n=this.handleUnregister(e)}n.then((function(){return o.configServices.requestRefreshAuthenticators()})).catch((function(t){if(t&&t.getErrorCode&&t.getErrorCode()===com.ts.mobile.sdk.AuthenticationErrorCode.UserCanceled)o.configServices.requestRefreshAuthenticators();else{var n=e.getDescription().getAuthenticatorId(),i=o.uiContext.getString(Hr.getAuthenticatorNameKey(n)),s="fido2"!==n&&t.getMessage?t.getMessage():"",a=o.uiContext.formatString(Fs[r],[i,s]);o.presentError(t,a)}}))}},{key:"setSuccessMessage",value:function(e,t){var n=this.uiContext,o=e.getDescription().getAuthenticatorId(),r=n.getString(Hr.getAuthenticatorNameKey(o));this.instructions=n.formatString(t,[r])}},{key:"handleSetDefault",value:function(e){var t=this;return this.configServices.setDefaultAuthenticator(e).then((function(n){return t.setSuccessMessage(e,t.uiContext.getString(zn)),n}))}},{key:"handleReregister",value:function(e){var t=this;return this.configServices.reregisterAuthenticator(e,this.clientContext).then((function(){return t.configServices.setDefaultAuthenticator(e).then((function(n){return t.setSuccessMessage(e,t.uiContext.getString(Wn)),n}))}))}},{key:"handleRegister",value:function(e){var t=this;return this.configServices.registerAuthenticator(e,this.clientContext).then((function(){return t.configServices.setDefaultAuthenticator(e).then((function(n){return t.setSuccessMessage(e,t.uiContext.getString(Hn)),n}))}))}},{key:"handleUnregister",value:function(e){var t=this;return new Promise((function(n,o){var r=t.uiContext;t.setSuccessMessage(e,r.getString(Kn));var i=e.getDescription().getAuthenticatorId(),s=r.getString(Hr.getAuthenticatorNameKey(i)),a=r.getString(£n),c=r.getString(It),u=new Yr(r,a,c);t.username&&U.KetUserName(t.username),U.KetDialogTitle(r.getString(Yn)),U.KetDialogMessage(r.formatString(Zn,[s])),U.KetDialogIconClass(rt.Unregister),u.onSelect((function(r){u.blockInteraction(),r?t.configServices.unregisterAuthenticator(e,t.clientContext).then(n,o):n(!0)})),zr.renderPage(u,t.clientContext)}))}},{key:"presentError",value:function(e,t){var n=this;this.instructions=null,Gr.promiseInformationInput(this.username,rt.Information,this.uiContext.getString(Xn),t,this.uiContext.getString(Ct),this.uiContext,this.clientContext).then((function(){e.getErrorCode()==com.ts.mobile.sdk.AuthenticationErrorCode.PolicyRejection?n.configServices.finishSession():n.configServices.requestRefreshAuthenticators()}))}}]),e}(),Ms=function(e){function t(e,n,o,r,i){var s;De(this,t),(s=Ue(this,qe(t).call(this,vt.dialog_registration_promotion_intro,"xmui-registration-promotion-introduction-page",e,!0,n,o,rt.Promotion))).cancelButton.label=i,s.cancelButton.automationId=vt.button_abort;var a=new Dr(vt.button_skip);a.label=e.getUiContext().getString(So),a.onClick((function(){return s.onSkipCB&&s.onSkipCB()})),s.addRightButton(a);var c=new Dr(vt.button_continue);return c.label=r,c.onClick((function(){return s.onContinueCB&&s.onContinueCB()})),s.addRightButton(c),s}return Me(t,Vr),Fe(t,[{key:"onContinue",value:function(e){this.onContinueCB=e}},{key:"onSkip",value:function(e){this.onSkipCB=e}}]),t}(),qs=function(){function e(t,n){De(this,e),this.username=t,this.actionContext=n}return Fe(e,[{key:"startSession",value:function(e,t){this.username=zr.getUsernameFromClientContext(e)||this.username,this.clientContext=e,this.uiContext=t.getUiContext(),zr.log("Starting registration promotion action session")}},{key:"endSession",value:function(){this.clientContext.overrideAuthenticatorCancelBehavior=!1,zr.log("Ending registration promotion action session")}},{key:"promptIntroduction",value:function(e,t,n,o){var r=this;return new Promise((function(i,s){var a=new Ms(r.actionContext,e,t,n,o);a.setUserName(r.username);var c=com.ts.mobile.sdk.PromotionControlRequest;a.onContinue((function(){i(com.ts.mobile.sdk.PromotionInput.createControlResponse(c.Continue))})),a.onSkip((function(){i(com.ts.mobile.sdk.PromotionInput.createControlResponse(c.Skip))})),a.onCancel((function(){i(com.ts.mobile.sdk.PromotionInput.createControlResponse(c.Abort))})),a.onEscape((function(e){i(com.ts.mobile.sdk.PromotionInput.createEscapeRequest(e,{}))})),zr.renderPage(a,r.clientContext)}))}},{key:"setPromotedAuthenticators",value:function(e){var t=this,n=this.uiContext,o=com.ts.mobile.sdk.PromotionControlRequest;return new Promise((function(r,i){var s={},a=new Fr(t.actionContext);a.setUserName(t.username),a.setTitle(n.getString(wo)),a.setInstructions(n.getString(Ao)),e.forEach((function(e){var t=e.getAuthenticatorId(),o=e.getType();s[t]=e;var r=n.getString(Hr.getAuthenticatorNameKey(t));a.addAuthenticator(t,r,o,!1)})),a.onSubmit((function(e){a.blockInteraction(),t.clientContext.overrideAuthenticatorCancelBehavior=!0,r(com.ts.mobile.sdk.PromotionInput.createAuthenticatorDescription(s[e]))})),a.onEscape((function(e){a.blockInteraction(),r(com.ts.mobile.sdk.PromotionInput.createEscapeRequest(e,{}))})),a.cancelButton.label=n.getString(ko),a.automationId=vt.button_abort,a.onCancel((function(){a.blockInteraction(),r(com.ts.mobile.sdk.PromotionInput.createControlResponse(o.Abort))}));var c=new Dr(vt.button_skip);c.label=n.getString(So),c.onClick((function(){a.blockInteraction(),r(com.ts.mobile.sdk.PromotionInput.createControlResponse(o.Skip))})),a.addRightButton(c),zr.renderPage(a,t.clientContext)}))}}]),e}(),Bs="xmui-select-device-to-manage",Ns=function(e){function t(e){var n;De(this,t),(n=Ue(this,qe(t).call(this,vt.page_select_device_to_manage,Bs))).uiContext=e,n.setTitle(e.getString(eo)),n.setInstructions(e.getString(ro));var o=new Dr(vt.button_back);o.label=e.getString(Et),o.onClick((function(){n.onBackCB&&n.onBackCB()})),n.addLeftButton(o);var r=n.createContent();return n.setContent(r),n}return Me(t,bt),Fe(t,[{key:"createContent",value:function(){var e=this;return this.deviceList=new Er(vr.Single),this.deviceList.onSelectionChanged((function(t){t.length&&e.onSelectCB&&e.onSelectCB(t[0])})),this.deviceList.focus(),this.deviceList}},{key:"getCurrentDeviceState",value:function(){var e=new Os;return e.setText(this.uiContext.getString(io)),e}},{key:"addDevice",value:function(e,t,n,o,r){var i=new ct;i.className="".concat(Bs,"_expand-icon ").concat(rt.Expand);var s=o?[this.getCurrentDeviceState()]:null,a=new Pr(t,n,r,i,s);this.deviceList.addListItem(e,!1,a)}},{key:"onSelect",value:function(e){this.onSelectCB=e}},{key:"onBack",value:function(e){this.onBackCB=e}}]),t}(),Us="".concat("xmui-manage-device","_row"),Hs="".concat("xmui-manage-device","_info"),Ws="".concat("xmui-manage-device","_separator"),Ks="".concat("xmui-manage-device","_name"),zs="".concat("xmui-manage-device","_spacer"),Vs=function(e){function t(e){var n;De(this,t),(n=Ue(this,qe(t).call(this,vt.page_manage_devices,"xmui-device-management-page"))).uiContext=e,n.setTitle(e.getString(oo)),n.setInstructions(e.getString(ro));var o=new Dr(vt.button_cancel);return o.label=e.getString(kt),o.onClick((function(){n.onCancelCB&&n.onCancelCB()})),o.focus(),n.addLeftButton(o),n.handleAction=n.handleAction.bind(Ne(n)),n}return Me(t,bt),Fe(t,[{key:"setDevice",value:function(e,t,n,o,r){var i=this.uiContext,s=new ct;s.className="xmui-manage-device";var a=new ct;a.className=Us;var c=new st;if(c.setText(e),c.className=Ks,a.appendChild(c),o){var u=new Os;U.KetText(this.uiContext.getString(to)),a.appendChild(u)}if(r.indexOf(com.ts.mobile.sdk.DeviceManagementAction.Rename)>-1){var l=new ct;l.className=zs;var d=new Dr(vt.button_rename);d.label=i.getString(so),d.value=com.ts.mobile.sdk.DeviceManagementAction.Rename,d.onClick(this.handleAction),a.appendChildren(l,d)}var p=new st;p.setText(t+"\n"+n),p.className=Hs;var h=new ct;if(h.className=Us,h.appendChildren(p),s.appendChildren(a,h),(new ct).className=Ws,o||r.indexOf(com.ts.mobile.sdk.DeviceManagementAction.Remove)>-1){var f=new ct;f.className=Ws,s.appendChild(f);var m=new ct;m.className=Us;var g=new st;g.setText(i.getString(ao)),g.className=Hs;var y=new Dr(vt.button_remove,kr.Alert);y.label=i.getString(co),y.value=com.ts.mobile.sdk.DeviceManagementAction.Remove,y.onClick(this.handleAction),m.appendChildren(g,y),s.appendChild(m)}this.setContent(s)}},{key:"onAction",value:function(e){this.onActionCB=e}},{key:"onCancel",value:function(e){this.onCancelCB=e}},{key:"handleAction",value:function(e){this.onActionCB&&this.onActionCB(e.value)}}]),t}(),Qs=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'];function Gs(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}function Js(e){for(var t=e.querySelectorAll(Qs.join(",")),n=[],o=0;o-1&&!r.disabled&&!Gs(r)&&n.push(r)}return n}function Ys(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}var Zs,£s="xmui-popup-dialog",Xs=function(e){function t(){var e;De(this,t),(e=Ue(this,qe(t).call(this))).className=£s;var n=new ct;return n.className="".concat(£s,"_overlay"),e.panel=new ct,e.panel.className="".concat(£s,"_panel"),e.appendChildren(n,e.panel),e.handleKeydownEvent=e.handleKeydownEvent.bind(Ne(e)),e}return Me(t,ct),Fe(t,[{key:"overlayAddClassName",value:function(e){this.panel.addClass(e)}},{key:"addToPanel",value:function(e){this.panel.appendChild(e)}},{key:"appendInto",value:function(e){We(qe(t.prototype),"appendInto",this).call(this,e),document.addEventListener("keydown",this.handleKeydownEvent)}},{key:"close",value:function(){document.removeEventListener("keydown",this.handleKeydownEvent),this.remove()}},{key:"handleKeydownEvent",value:function(e){!function(e,t){var n,o=(n=Js(t))[0],r=n[n.length-1];"Tab"===e.key?t.contains(e.target)?e.shiftKey&&e.target===o?(r.focus(),e.preventDefault()):e.shiftKey||e.target!==r||(o.focus(),e.preventDefault()):((o=(n=Js(t))[0]).focus(),e.preventDefault()):t.contains(e.target)||e.preventDefault()}(e,this.panel.htmlElement)}}]),t}(),ea=function(e){function t(){var e;return De(this,t),(e=Ue(this,qe(t).call(this))).headerPanel=new pt(!0),e.headerPanel.show=!1,e.addToPanel(e.headerPanel),e.contentContainer=new ct,e.contentContainer.className="".concat("xmui-action-popup-dialog","_content"),e.actionPanel=new ft(!0),e.addToPanel(e.contentContainer),e.addToPanel(e.actionPanel),e}return Me(t,Xs),Fe(t,[{key:"setTitle",value:function(e){this.headerPanel.show=!0,this.headerPanel.setText(e)}},{key:"setIcon",value:function(e){this.headerPanel.show=!0,this.headerPanel.setIcon(e)}},{key:"setContent",value:function(e){this.contentContainer.appendChild(e)}},{key:"addLeftButton",value:function(e){this.actionPanel.addLeftButton(e)}},{key:"addRightButton",value:function(e){this.actionPanel.addRightButton(e)}}]),t}(),ta="xmui-confirm-popup-dialog",na=function(e){function t(e,n,o){var r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];De(this,t),(r=Ue(this,qe(t).call(this))).automationId=vt.popup_dialog_confirm,r.handleClick=r.handleClick.bind(Ne(r));var s=new Dr(vt.button_cancel);s.label=o||e.getString(It),s.value=!1,s.onClick(r.handleClick),r.addLeftButton(s);var a=new Dr(vt.button_continue);a.label=n||e.getString(Mt),a.value=!0,a.onClick(r.handleClick),r.addRightButton(a);var c=new ct;return c.className="".concat(ta,"_container"),r.messageComp=new st,r.messageComp.className="".concat(ta,"_message"),c.appendChild(r.messageComp),r.setContent(c),i?a.focus():s.focus(),r}return Me(t,ea),Fe(t,[{key:"setMessage",value:function(e){this.messageComp.setText(e)}},{key:"onSelect",value:function(e){this.onSelectCB=e}},{key:"handleClick",value:function(e){this.onSelectCB(e.value)}}]),t}(),oa="xmui-text-input-form",ra=function(e){function t(e,n,o){var r;De(this,t),(r=Ue(this,qe(t).call(this))).addClass("xmui-input-popup-dialog"),r.automationId=vt.popup_dialog_confirm;var i=new Dr(vt.button_cancel);i.label=o||e.getString(It),i.value=!1,i.onClick((function(){r.onCancelCB&&r.onCancelCB()})),r.addLeftButton(i);var s=new Dr(vt.button_continue);s.label=n||e.getString(Mt),s.value=!0,s.type=Sr.Submit,s.disabled=!0,s.onClick((function(){r.onSubmitCB&&r.onSubmitCB(r.inputField.value)})),s.form=oa,r.addRightButton(s),r.confirmButton=s;var a=r.buildContent();return r.setContent(a),r}return Me(t,ea),Fe(t,[{key:"setPlacehoder",value:function(e){this.inputField.placeholder=e}},{key:"onSubmit",value:function(e){this.onSubmitCB=e}},{key:"onCancel",value:function(e){this.onCancelCB=e}},{key:"buildContent",value:function(){var e=this,t=new bi;t.id=oa;var n=new mi(ei.Text,vt.input_text);return n.disabled=!1,n.value="",n.onChange((function(){e.confirmButton.disabled=null==e.inputField.value||0===e.inputField.value.length})),n.focus(),this.inputField=n,t.appendChild(n),t}}]),t}(),ia=function(){function e(t){var n;De(this,e),this.username=t,this.actionToError=(je(n={},com.ts.mobile.sdk.DeviceManagementAction.Remove,vo),je(n,com.ts.mobile.sdk.DeviceManagementAction.Rename,yo),n)}return Fe(e,[{key:"setSessionDevicesList",value:function(e){var t=this;this.devices=e,this.deviceManagementSessionService&&(this.currentSelectedDevice=this.currentSelectedDevice?this.devices.find((function(e){return e.getInfo().getDeviceHwId()===t.currentSelectedDevice.getInfo().getDeviceHwId()})):null,this.currentSelectedDevice?this.openManageDevice(this.currentSelectedDevice):this.devices&&this.openSelectDeviceToManage())}},{key:"startSession",value:function(e,t,n){this.username=zr.getUsernameFromClientContext(n)||this.username,this.deviceManagementSessionService=e,this.actionContext=t,this.clientContext=n,this.uiContext=e.getUiContext(),this.instructions=null,zr.log("Starting device management session"),this.openSelectDeviceToManage()}},{key:"endSession",value:function(){zr.log("Ending device management session")}},{key:"handleRemove",value:function(e){var t=this,n=this.uiContext;return new Promise((function(o,r){var i=t.getDeviceName(e),s=new na(n,n.getString(po));s.setTitle(n.formatString(uo,[i])),s.setIcon(rt.Remove),s.setMessage(n.getString(lo)),s.onSelect((function(n){if(s.close(),n)if(e.getInfo().getIsCurrent()){var r=t.deviceManagementSessionService.removeCurrentDeviceAndFinishSession(t.clientContext).then((function(e){return e&&t.setSuccessMessage(bo,i),e}));o(r)}else o(t.deviceManagementSessionService.removeDevice(e,t.clientContext));else o(!1)})),zr.renderModal(s,t.clientContext)}))}},{key:"handleRename",value:function(e){var t=this,n=this.uiContext;return new Promise((function(o,r){var i=t.getDeviceName(e),s=new ra(n,n.getString(fo));s.setTitle(n.formatString(ho,[i])),s.setIcon(rt.Rename),s.setPlacehoder(n.getString(mo)),s.onCancel((function(){s.close(),o(!1)})),s.onSubmit((function(n){s.close();var r=t.deviceManagementSessionService.renameDevice(e,n,t.clientContext).then((function(e){return e&&t.setSuccessMessage(go,i,n),e}));o(r)})),zr.renderModal(s,t.clientContext)}))}},{key:"handleAction",value:function(e,t){var n,o=this;switch(t){case com.ts.mobile.sdk.DeviceManagementAction.Remove:n=this.handleRemove(e);break;case com.ts.mobile.sdk.DeviceManagementAction.Rename:n=this.handleRename(e)}n&&n.then((function(){})).catch((function(n){var r=o.getDeviceName(e),i=o.uiContext.formatString(o.actionToError[t],[r,n.getMessage()]);o.handleError(n,i)}))}},{key:"setSuccessMessage",value:function(e,t,n){this.instructions=this.uiContext.formatString(e,[t,n])}},{key:"handleError",value:function(e,t){var n=this;this.instructions=null,Gr.promiseInformationInput(this.username,rt.Information,this.uiContext.getString(_o),t,this.uiContext.getString(Ct),this.uiContext,this.clientContext).then((function(){n.openManageDevice(n.currentSelectedDevice)}))}},{key:"handleCancel",value:function(){this.openSelectDeviceToManage()}},{key:"openManageDevice",value:function(e){var t=e.getInfo(),n=e.getAvailableActions(),o=this.getDeviceName(e),r=this.getDeviceOS(e),i=this.getLastAccessed(e),s=t.getIsCurrent(),a=new Vs(this.uiContext);a.setUserName(this.username),a.setDevice(o,r,i,s,n),a.onAction(this.handleAction.bind(this,e)),a.onCancel(this.handleCancel.bind(this)),zr.renderPage(a,this.clientContext)}},{key:"openSelectDeviceToManage",value:function(){var e=this;this.currentSelectedDevice=null;var t={},n=new Ns(this.uiContext);n.setUserName(this.username),this.instructions&&n.setInstructions(this.instructions),this.devices.forEach((function(o){var r=o.getInfo(),i=r.getDeviceHwId(),s=e.getDeviceName(o),a=e.getLastAccessed(o),c=r.getIsCurrent();t[i]=o,n.addDevice(i,s,a,c,rt.WebBrowser)})),n.onSelect((function(n){e.instructions=null,e.currentSelectedDevice=t[n],e.openManageDevice(t[n])})),n.onBack((function(){e.instructions=null,e.deviceManagementSessionService.finishSession()})),zr.renderPage(n,this.clientContext)}},{key:"getDeviceName",value:function(e){var t=e.getInfo(),n=t.getName();return Nr.getDeviceName(n,t)}},{key:"getDeviceOS",value:function(e){var t=e.getInfo();return"".concat(t.getOsType()," ").concat(t.getOsVersion())}},{key:"getLastAccessed",value:function(e){var t=new Date(e.getInfo().getLastAccess()).toLocaleString();return this.uiContext.formatString(no,[t])}}]),e}();!function(e){e.Text="text",e.Email="email",e.MobileNumber="phone"}(Zs||(Zs={}));var sa,aa=/^[a-z]{2}£/i,ca=function(){function e(){De(this,e)}return Fe(e,null,[{key:"getFlagEmoji",value:function(t){return t.name_code?e.countryCodeEmoji(t.name_code):null}},{key:"countryCodeEmoji",value:function(e){if(!aa.test(e)){var t=Te(e);throw new TypeError("cc argument must be an ISO 3166-1 alpha-2 string, but got '".concat("string"===t?e:t,"' instead."))}return String.fromCodePoint(e.codePointAt(0)+127365)+String.fromCodePoint(e.codePointAt(1)+127365)}}]),e}(),ua="xmui-country-item-content",la=function(e){function t(e){var n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];De(this,t),(n=Ue(this,qe(t).call(this))).className=ua;var r=new st;r.className="".concat(ua,"_flag");var i=new st;i.className="".concat(ua,"_title");var s=new st;s.className="".concat(ua,"_phone_code"),null!=e&&(r.setText(ca.countryCodeEmoji(e.name_code.toLowerCase())),i.setText(e.name),s.setText("+".concat(e.phone_code)));var a=new ct;return a.className="".concat(ua,"_space"),o&&n.addClass("".concat(ua,"--selected")),n.appendChildren(r,i,a,s),n}return Me(t,ct),t}(),da="xmui-countries-popup-dialog",pa=function(e){function t(){var e;return De(this,t),(e=Ue(this,qe(t).call(this))).search="",e.className=da,e.container=new ct,e.container.addClass("".concat(da,"_container")),e.addToPanel(e.container),e.onClick(e.onDismiss.bind(Ne(e))),e.onKeypress(Xr(e.onKeyPressEvent.bind(Ne(e)),100,!1)),e.onKeydown(Xr(e.onKeyDownEvent.bind(Ne(e)),100,!1)),e}return Me(t,Xs),Fe(t,[{key:"onKeyDownEvent",value:function(e,t){t.keyCode===_t.Backspace&&(this.search=this.search.slice(0,-1),this.filter())}},{key:"onKeyPressEvent",value:function(e,t){this.search=this.search+t.key,this.filter()}},{key:"filter",value:function(){this.countries&&(this.search&&this.search.length>0?this.createList(this.filteredCountries(this.search)):this.createList(this.countries))}},{key:"filteredCountries",value:function(e){var t=this,n=this.countries.filter((function(e,n,o){return e.name.toLowerCase().startsWith(t.search.toLowerCase())||e.phone_code===t.search.toLowerCase()||e.name_code===t.search.toLowerCase()}));if(n&&n.length>0)return n;this.createList(this.countries)}},{key:"setCountries",value:function(e,t){this.countries=e,this.selectedCountryCode=t,this.createList(e),this.selectedCountryItem&&this.selectedCountryItem.scrollIntoView()}},{key:"createList",value:function(e){var t=this;null!=e&&(this.countriesList=new Er(vr.None),this.countriesList.focus(),this.container.setContent(this.countriesList),e.forEach((function(e){var n=new la(e,e.name_code===t.selectedCountryCode);e.name_code===t.selectedCountryCode&&(t.selectedCountryItem=n),t.countriesList.addListItem(e.name_code,!1,n)})),this.countriesList.onItemClicked((function(e){t.onSelectCB&&(t.onSelectCB(e),t.close())})))}},{key:"onSelect",value:function(e){this.onSelectCB=e}},{key:"onDismiss",value:function(e,t){this.close()}}]),t}(),ha=[{name_code:"ad",name:"Andorra",phone_code:"376"},{name_code:"ae",name:"United Arab Emirates (UAE)",phone_code:"971"},{name_code:"af",name:"Afghanistan",phone_code:"93"},{name_code:"ag",name:"Antigua and Barbuda",phone_code:"1"},{name_code:"ai",name:"Anguilla",phone_code:"1"},{name_code:"al",name:"Albania",phone_code:"355"},{name_code:"am",name:"Armenia",phone_code:"374"},{name_code:"ao",name:"Angola",phone_code:"244"},{name_code:"aq",name:"Antarctica",phone_code:"672"},{name_code:"ar",name:"Argentina",phone_code:"54"},{name_code:"as",name:"American Samoa",phone_code:"1"},{name_code:"at",name:"Austria",phone_code:"43"},{name_code:"au",name:"Australia",phone_code:"61"},{name_code:"aw",name:"Aruba",phone_code:"297"},{name_code:"ax",name:"\xc5land Islands",phone_code:"358"},{name_code:"az",name:"Azerbaijan",phone_code:"994"},{name_code:"ba",name:"Bosnia And Herzegovina",phone_code:"387"},{name_code:"bb",name:"Barbados",phone_code:"1"},{name_code:"bd",name:"Bangladesh",phone_code:"880"},{name_code:"be",name:"Belgium",phone_code:"32"},{name_code:"bf",name:"Burkina Faso",phone_code:"226"},{name_code:"bg",name:"Bulgaria",phone_code:"359"},{name_code:"bh",name:"Bahrain",phone_code:"973"},{name_code:"bi",name:"Burundi",phone_code:"257"},{name_code:"bj",name:"Benin",phone_code:"229"},{name_code:"bl",name:"Saint Barth\xe9lemy",phone_code:"590"},{name_code:"bm",name:"Bermuda",phone_code:"1"},{name_code:"bn",name:"Brunei Darussalam",phone_code:"673"},{name_code:"bo",name:"Bolivia, Plurinational State Of",phone_code:"591"},{name_code:"br",name:"Brazil",phone_code:"55"},{name_code:"bs",name:"Bahamas",phone_code:"1"},{name_code:"bt",name:"Bhutan",phone_code:"975"},{name_code:"bw",name:"Botswana",phone_code:"267"},{name_code:"by",name:"Belarus",phone_code:"375"},{name_code:"bz",name:"Belize",phone_code:"501"},{name_code:"ca",name:"Canada",phone_code:"1"},{name_code:"cc",name:"Cocos (keeling) Islands",phone_code:"61"},{name_code:"cd",name:"Congo, The Democratic Republic Of The",phone_code:"243"},{name_code:"cf",name:"Central African Republic",phone_code:"236"},{name_code:"cg",name:"Congo",phone_code:"242"},{name_code:"ch",name:"Switzerland",phone_code:"41"},{name_code:"ci",name:"C\xf4te D'ivoire",phone_code:"225"},{name_code:"ck",name:"Cook Islands",phone_code:"682"},{name_code:"cl",name:"Chile",phone_code:"56"},{name_code:"cm",name:"Cameroon",phone_code:"237"},{name_code:"cn",name:"China",phone_code:"86"},{name_code:"co",name:"Colombia",phone_code:"57"},{name_code:"cr",name:"Costa Rica",phone_code:"506"},{name_code:"cu",name:"Cuba",phone_code:"53"},{name_code:"cv",name:"Cape Verde",phone_code:"238"},{name_code:"cw",name:"Cura\xe7ao",phone_code:"599"},{name_code:"cx",name:"Christmas Island",phone_code:"61"},{name_code:"cy",name:"Cyprus",phone_code:"357"},{name_code:"cz",name:"Czech Republic",phone_code:"420"},{name_code:"de",name:"Germany",phone_code:"49"},{name_code:"dj",name:"Djibouti",phone_code:"253"},{name_code:"dk",name:"Denmark",phone_code:"45"},{name_code:"dm",name:"Dominica",phone_code:"1"},{name_code:"do",name:"Dominican Republic",phone_code:"1"},{name_code:"dz",name:"Algeria",phone_code:"213"},{name_code:"ec",name:"Ecuador",phone_code:"593"},{name_code:"ee",name:"Estonia",phone_code:"372"},{name_code:"eg",name:"Egypt",phone_code:"20"},{name_code:"er",name:"Eritrea",phone_code:"291"},{name_code:"es",name:"Spain",phone_code:"34"},{name_code:"et",name:"Ethiopia",phone_code:"251"},{name_code:"fi",name:"Finland",phone_code:"358"},{name_code:"fj",name:"Fiji",phone_code:"679"},{name_code:"fk",name:"Falkland Islands (malvinas)",phone_code:"500"},{name_code:"fm",name:"Micronesia, Federated States Of",phone_code:"691"},{name_code:"fo",name:"Faroe Islands",phone_code:"298"},{name_code:"fr",name:"France",phone_code:"33"},{name_code:"ga",name:"Gabon",phone_code:"241"},{name_code:"gb",name:"United Kingdom",phone_code:"44"},{name_code:"gd",name:"Grenada",phone_code:"1"},{name_code:"ge",name:"Georgia",phone_code:"995"},{name_code:"gf",name:"French Guyana",phone_code:"594"},{name_code:"gg",name:"Guernsey",phone_code:"44"},{name_code:"gh",name:"Ghana",phone_code:"233"},{name_code:"gi",name:"Gibraltar",phone_code:"350"},{name_code:"gl",name:"Greenland",phone_code:"299"},{name_code:"gm",name:"Gambia",phone_code:"220"},{name_code:"gn",name:"Guinea",phone_code:"224"},{name_code:"gp",name:"Guadeloupe",phone_code:"590"},{name_code:"gq",name:"Equatorial Guinea",phone_code:"240"},{name_code:"gr",name:"Greece",phone_code:"30"},{name_code:"gt",name:"Guatemala",phone_code:"502"},{name_code:"gu",name:"Guam",phone_code:"1"},{name_code:"gw",name:"Guinea-bissau",phone_code:"245"},{name_code:"gy",name:"Guyana",phone_code:"592"},{name_code:"hk",name:"Hong Kong",phone_code:"852"},{name_code:"hn",name:"Honduras",phone_code:"504"},{name_code:"hr",name:"Croatia",phone_code:"385"},{name_code:"ht",name:"Haiti",phone_code:"509"},{name_code:"hu",name:"Hungary",phone_code:"36"},{name_code:"id",name:"Indonesia",phone_code:"62"},{name_code:"ie",name:"Ireland",phone_code:"353"},{name_code:"il",name:"Israel",phone_code:"972"},{name_code:"im",name:"Isle Of Man",phone_code:"44"},{name_code:"is",name:"Iceland",phone_code:"354"},{name_code:"in",name:"India",phone_code:"91"},{name_code:"io",name:"British Indian Ocean Territory",phone_code:"246"},{name_code:"iq",name:"Iraq",phone_code:"964"},{name_code:"ir",name:"Iran, Islamic Republic Of",phone_code:"98"},{name_code:"it",name:"Italy",phone_code:"39"},{name_code:"je",name:"Jersey",phone_code:"44"},{name_code:"jm",name:"Jamaica",phone_code:"1"},{name_code:"jo",name:"Jordan",phone_code:"962"},{name_code:"jp",name:"Japan",phone_code:"81"},{name_code:"ke",name:"Kenya",phone_code:"254"},{name_code:"kg",name:"Kyrgyzstan",phone_code:"996"},{name_code:"kh",name:"Cambodia",phone_code:"855"},{name_code:"ki",name:"Kiribati",phone_code:"686"},{name_code:"km",name:"Comoros",phone_code:"269"},{name_code:"kn",name:"Saint Kitts and Nevis",phone_code:"1"},{name_code:"kp",name:"North Korea",phone_code:"850"},{name_code:"kr",name:"South Korea",phone_code:"82"},{name_code:"kw",name:"Kuwait",phone_code:"965"},{name_code:"ky",name:"Cayman Islands",phone_code:"1"},{name_code:"kz",name:"Kazakhstan",phone_code:"7"},{name_code:"la",name:"Lao People's Democratic Republic",phone_code:"856"},{name_code:"lb",name:"Lebanon",phone_code:"961"},{name_code:"lc",name:"Saint Lucia",phone_code:"1"},{name_code:"li",name:"Liechtenstein",phone_code:"423"},{name_code:"lk",name:"Sri Lanka",phone_code:"94"},{name_code:"lr",name:"Liberia",phone_code:"231"},{name_code:"ls",name:"Lesotho",phone_code:"266"},{name_code:"lt",name:"Lithuania",phone_code:"370"},{name_code:"lu",name:"Luxembourg",phone_code:"352"},{name_code:"lv",name:"Latvia",phone_code:"371"},{name_code:"ly",name:"Libya",phone_code:"218"},{name_code:"ma",name:"Morocco",phone_code:"212"},{name_code:"mc",name:"Monaco",phone_code:"377"},{name_code:"md",name:"Moldova, Republic Of",phone_code:"373"},{name_code:"me",name:"Montenegro",phone_code:"382"},{name_code:"mf",name:"Saint Martin",phone_code:"590"},{name_code:"mg",name:"Madagascar",phone_code:"261"},{name_code:"mh",name:"Marshall Islands",phone_code:"692"},{name_code:"mk",name:"Macedonia (FYROM)",phone_code:"389"},{name_code:"ml",name:"Mali",phone_code:"223"},{name_code:"mm",name:"Myanmar",phone_code:"95"},{name_code:"mn",name:"Mongolia",phone_code:"976"},{name_code:"mo",name:"Macau",phone_code:"853"},{name_code:"mp",name:"Northern Mariana Islands",phone_code:"1"},{name_code:"mq",name:"Martinique",phone_code:"596"},{name_code:"mr",name:"Mauritania",phone_code:"222"},{name_code:"ms",name:"Montserrat",phone_code:"1"},{name_code:"mt",name:"Malta",phone_code:"356"},{name_code:"mu",name:"Mauritius",phone_code:"230"},{name_code:"mv",name:"Maldives",phone_code:"960"},{name_code:"mw",name:"Malawi",phone_code:"265"},{name_code:"mx",name:"Mexico",phone_code:"52"},{name_code:"my",name:"Malaysia",phone_code:"60"},{name_code:"mz",name:"Mozambique",phone_code:"258"},{name_code:"na",name:"Namibia",phone_code:"264"},{name_code:"nc",name:"New Caledonia",phone_code:"687"},{name_code:"ne",name:"Niger",phone_code:"227"},{name_code:"nf",name:"Norfolk Islands",phone_code:"672"},{name_code:"ng",name:"Nigeria",phone_code:"234"},{name_code:"ni",name:"Nicaragua",phone_code:"505"},{name_code:"nl",name:"Netherlands",phone_code:"31"},{name_code:"no",name:"Norway",phone_code:"47"},{name_code:"np",name:"Nepal",phone_code:"977"},{name_code:"nr",name:"Nauru",phone_code:"674"},{name_code:"nu",name:"Niue",phone_code:"683"},{name_code:"nz",name:"New Zealand",phone_code:"64"},{name_code:"om",name:"Oman",phone_code:"968"},{name_code:"pa",name:"Panama",phone_code:"507"},{name_code:"pe",name:"Peru",phone_code:"51"},{name_code:"pf",name:"French Polynesia",phone_code:"689"},{name_code:"pg",name:"Papua New Guinea",phone_code:"675"},{name_code:"ph",name:"Philippines",phone_code:"63"},{name_code:"pk",name:"Pakistan",phone_code:"92"},{name_code:"pl",name:"Poland",phone_code:"48"},{name_code:"pm",name:"Saint Pierre And Miquelon",phone_code:"508"},{name_code:"pn",name:"Pitcairn Islands",phone_code:"870"},{name_code:"pr",name:"Puerto Rico",phone_code:"1"},{name_code:"ps",name:"Palestine",phone_code:"970"},{name_code:"pt",name:"Portugal",phone_code:"351"},{name_code:"pw",name:"Palau",phone_code:"680"},{name_code:"py",name:"Paraguay",phone_code:"595"},{name_code:"qa",name:"Qatar",phone_code:"974"},{name_code:"re",name:"R\xe9union",phone_code:"262"},{name_code:"ro",name:"Romania",phone_code:"40"},{name_code:"rs",name:"Serbia",phone_code:"381"},{name_code:"ru",name:"Russian Federation",phone_code:"7"},{name_code:"rw",name:"Rwanda",phone_code:"250"},{name_code:"sa",name:"Saudi Arabia",phone_code:"966"},{name_code:"sb",name:"Solomon Islands",phone_code:"677"},{name_code:"sc",name:"Seychelles",phone_code:"248"},{name_code:"sd",name:"Sudan",phone_code:"249"},{name_code:"se",name:"Sweden",phone_code:"46"},{name_code:"sg",name:"Singapore",phone_code:"65"},{name_code:"sh",name:"Saint Helena, Ascension And Tristan Da Cunha",phone_code:"290"},{name_code:"si",name:"Slovenia",phone_code:"386"},{name_code:"sk",name:"Slovakia",phone_code:"421"},{name_code:"sl",name:"Sierra Leone",phone_code:"232"},{name_code:"sm",name:"San Marino",phone_code:"378"},{name_code:"sn",name:"Senegal",phone_code:"221"},{name_code:"so",name:"Somalia",phone_code:"252"},{name_code:"sr",name:"Suriname",phone_code:"597"},{name_code:"ss",name:"South Sudan",phone_code:"211"},{name_code:"st",name:"Sao Tome And Principe",phone_code:"239"},{name_code:"sv",name:"El Salvador",phone_code:"503"},{name_code:"sx",name:"Sint Maarten",phone_code:"1"},{name_code:"sy",name:"Syrian Arab Republic",phone_code:"963"},{name_code:"sz",name:"Swaziland",phone_code:"268"},{name_code:"tc",name:"Turks and Caicos Islands",phone_code:"1"},{name_code:"td",name:"Chad",phone_code:"235"},{name_code:"tg",name:"Togo",phone_code:"228"},{name_code:"th",name:"Thailand",phone_code:"66"},{name_code:"tj",name:"Tajikistan",phone_code:"992"},{name_code:"tk",name:"Tokelau",phone_code:"690"},{name_code:"tl",name:"Timor-leste",phone_code:"670"},{name_code:"tm",name:"Turkmenistan",phone_code:"993"},{name_code:"tn",name:"Tunisia",phone_code:"216"},{name_code:"to",name:"Tonga",phone_code:"676"},{name_code:"tr",name:"Turkey",phone_code:"90"},{name_code:"tt",name:"Trinidad & Tobago",phone_code:"1"},{name_code:"tv",name:"Tuvalu",phone_code:"688"},{name_code:"tw",name:"Taiwan",phone_code:"886"},{name_code:"tz",name:"Tanzania, United Republic Of",phone_code:"255"},{name_code:"ua",name:"Ukraine",phone_code:"380"},{name_code:"ug",name:"Uganda",phone_code:"256"},{name_code:"us",name:"United Kingdom",phone_code:"1"},{name_code:"uy",name:"Uruguay",phone_code:"598"},{name_code:"uz",name:"Uzbekistan",phone_code:"998"},{name_code:"va",name:"Holy See (vatican City State)",phone_code:"379"},{name_code:"vc",name:"Saint Vincent & The Grenadines",phone_code:"1"},{name_code:"ve",name:"Venezuela, Bolivarian Republic Of",phone_code:"58"},{name_code:"vg",name:"British Virgin Islands",phone_code:"1"},{name_code:"vi",name:"US Virgin Islands",phone_code:"1"},{name_code:"vn",name:"Vietnam",phone_code:"84"},{name_code:"vu",name:"Vanuatu",phone_code:"678"},{name_code:"wf",name:"Wallis And Futuna",phone_code:"681"},{name_code:"ws",name:"Samoa",phone_code:"685"},{name_code:"xk",name:"Kosovo",phone_code:"383"},{name_code:"ye",name:"Yemen",phone_code:"967"},{name_code:"yt",name:"Mayotte",phone_code:"262"},{name_code:"za",name:"South Africa",phone_code:"27"},{name_code:"zm",name:"Zambia",phone_code:"260"},{name_code:"zw",name:"Zimbabwe",phone_code:"263"}],fa="xmui-mobile-phone-input",ma="".concat(fa,"_separator"),ga="".concat(fa,"_plus"),ya="".concat(fa,"_country-code-container"),ba="-",va=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";De(this,t),(e=Ue(this,qe(t).call(this,ei.PositiveInteger,vt.input_mobile_phone_number))).addClass(fa),e.countries=ha;var r=new st(ba);r.className=ma,e.prependToInputRow(r);var i=new ct;i.className=ya;var s=new Dr(vt.input_mobile_phone_coutry_code);s.onClick((function(){if(e.onCountriesCB){var t=e.countries;if(!t)return;var n=new pa;n.setCountries(t,e.currentSelectedCountryCode),n.onSelect((function(n){var o=t.find((function(e){return e.name_code===n}));o&&(e.currentSelectedCountryCode=o.name_code,s.label=o.phone_code)})),e.onCountriesCB(n)}})),i.appendChild(s),e.prependToInputRow(i);var a=new st("+");return a.className=ga,e.prependToInputRow(a),e.countryCodeButton=s,e.addValidator(ai.mobileNumber),e.value="".concat(n).concat(ba).concat(o),e}return Me(t,mi),Fe(t,[{key:"getRequiredValidator",value:function(){return function(e){var t=e.replace(ba,"");return ai.required(t)}}},{key:"checkHasValue",value:function(){return!!this.value.replace(ba,"").length}},{key:"onCountries",value:function(e){this.onCountriesCB=e}},{key:"isEmpty",get:function(){return!this.value.trim().replace(ba,"").length}},{key:"value",set:function(e){var n=e.length&&e.split(ba);n&&2===n.length&&(this.countryCodeButton.label=n[0],ze(qe(t.prototype),"value",n[1],this,!0))},get:function(){return"".concat(this.countryCodeButton.label).concat(ba).concat(We(qe(t.prototype),"value",this))}},{key:"countryCode",get:function(){return this.countryCodeButton.label}},{key:"number",get:function(){return We(qe(t.prototype),"value",this)}}]),t}(),_a=function(e){function t(e){var n;De(this,t),(n=Ue(this,qe(t).call(this))).addClass("xmui-dynamic-mobile-phone-input");var o=e.value&&e.value.country_code||"",r=e.value&&e.value.number||"",i=new va(o,r);return i.name=e.id,i.message=e.hint?e.hint:"",i.required=!0===e.mandatory,i.placeholder=i.required?e.name.trim()+" *":e.name,n.appendChild(i),n.mobilePhoneInput=i,n}return Me(t,ui),Fe(t,[{key:"validateAndSetErrorMessage",value:function(){return this.mobilePhoneInput.validateAndSetErrorMessage()}},{key:"onCountriesCB",value:function(e){this.mobilePhoneInput.onCountries(e)}},{key:"name",get:function(){return this.mobilePhoneInput.name}},{key:"value",get:function(){return{country_code:this.mobilePhoneInput.countryCode,number:this.mobilePhoneInput.number}}},{key:"required",get:function(){return this.mobilePhoneInput.required}},{key:"isEmpty",get:function(){return this.mobilePhoneInput.isEmpty}}]),t}(),wa=function(e){function t(e,n,o,r,i){var s;return De(this,t),(s=Ue(this,qe(t).call(this,e))).actions=i,s.id=n,s.name=o,s.clientContext=r,s.buildActions(i),s}return Me(t,bi),Fe(t,[{key:"buildActions",value:function(e){var t=this;e.forEach((function(e){var n=t.createInputField(e);t.appendChild(n)}))}},{key:"createInputField",value:function(e){var t,n,o;switch(e.type){case Zs.Text:t=ei.Text,o=new mi(t,vt.input_text);break;case Zs.Email:t=ei.Email,o=new mi(t,vt.input_email),n=254;break;case Zs.MobileNumber:var r=new _a(e);return r.onCountriesCB(this.onCountriesCB.bind(this)),r;default:throw new Error("Unsupported form field type")}return o.name=e.id,o.message=e.hint?e.hint:"",o.required=!0===e.mandatory,o.placeholder=o.required?e.name.trim()+" *":e.name,e.value&&(o.value=e.value),null!=n&&(o.maxlength=n),o}},{key:"onCountriesCB",value:function(e){zr.renderModal(e,this.clientContext)}}]),t}(),Aa=function(e){function t(e,n,o,r){var i;De(this,t),(i=Ue(this,qe(t).call(this,vt.page_dynamic_form,"xmui-dynamic-form-page",e))).clientContext=n,i.formId=o,i.payload=r,i.setTitle(i.payload.title||i.formId),i.payload.subtitle&&i.setInstructions(i.payload.subtitle);var s=i.createForm();return i.setContent(s),i}return Me(t,Lr),Fe(t,[{key:"onSubmit",value:function(e){this.onSubmitCB=e}},{key:"createForm",value:function(){var e=this,t=new Dr(vt.button_continue);t.label=this.uiContext.getString(Mt),this.addRightButton(t);var n=new wa(t,"xmui-dynamic-form","xmui-dynamic-form",this.clientContext,this.payload.actions);return n.onSubmit((function(t){e.onSubmitCB&&e.onSubmitCB({type:e.payload.type,actions:t})})),n.start(),n}}]),t}();!function(e){e[e.Init=0]="Init",e[e.Continue=1]="Continue",e[e.Error=2]="Error"}(sa||(sa={}));var Sa,ka=function(){function e(t,n){De(this,e),this.formId=t,this.payload=n,this.state=sa.Init}return Fe(e,[{key:"startSession",value:function(e,t){this.clientContext=e,this.actionContext=t}},{key:"endSession",value:function(){}},{key:"onContinue",value:function(e){this.payload=e,this.state=sa.Continue}},{key:"onError",value:function(e){this.payload=e,this.state=sa.Error}},{key:"promiseFormInput",value:function(){var e=this;return new Promise((function(t,n){var o=new Aa(e.actionContext,e.clientContext,e.formId,e.payload),r=zr.getUsernameFromClientContext(e.clientContext);r&&o.setUserName(r),o.onSubmit((function(e){t(com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest(e))})),o.onCancel((function(){t(com.ts.mobile.sdk.FormInput.createFormCancellationRequest())})),o.onEscape((function(e){t(com.ts.mobile.sdk.FormInput.createEscapeRequest(e,{}))})),zr.renderPage(o,e.clientContext)}))}}]),e}();!function(e){e.Button="button",e.Toggle="toggle",e.Separator="separator"}(Sa||(Sa={}));var Ca,Ia="xmui-button-user-detail",Ea=function(e){function t(e){var n;De(this,t);var o=new ct;return o.className="".concat(Ia,"_more ").concat(rt.CircledMore),(n=Ue(this,qe(t).call(this,e.title,e.value,null,o))).addClass(Ia),n}return Me(t,Pr),t}(),Ra="xmui-switch",Pa="".concat(Ra,"--on"),Oa="".concat(Ra,"_bar"),xa="".concat(Ra,"_knob"),Ta=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];De(this,t),(e=Ue(this,qe(t).call(this))).className=Ra,e.value=n;var o=new ct;o.className=Oa;var r=new ct;return r.className=xa,e.appendChildren(o,r),e}return Me(t,ct),Fe(t,[{key:"updateState",value:function(){this.value?this.addClass(Pa):this.removeClass(Pa)}},{key:"value",set:function(e){ze(qe(t.prototype),"value",e,this,!0),this.updateState()},get:function(){return We(qe(t.prototype),"value",this)}}]),t}(),Da=function(e){function t(e){var n;De(this,t);var o=new Ta(e.value);return(n=Ue(this,qe(t).call(this,e.title,null,null,o))).switchComp=o,n.addClass("xmui-toggle-user-detail"),n}return Me(t,Pr),Fe(t,[{key:"switchState",value:function(){this.switchComp.value=!this.switchComp.value}}]),t}(),La=function(e){function t(e,n){var o;De(this,t),(o=Ue(this,qe(t).call(this,vt.page_manage_user_details,"xmui-manage-user-details-page",!1))).actionContext=e,o.payload=n,o.uiContext=o.actionContext.getUiContext(),o.setTitle(n.title);var r=o.createContent();return o.setContent(r),n.footer_buttons.forEach((function(e){var t=new Dr(vt.button_dynamic);t.label=e.title,t.onClick((function(){return o.onSubmitCB&&o.onSubmitCB({selected_option:e.id})})),o.addRightButton(t)})),o}return Me(t,bt),Fe(t,[{key:"createContent",value:function(){var e=this,t=new Er;return this.payload.menu.items.forEach((function(e){switch(e.type){case Sa.Button:var n=new Ea(e);t.addListItem(e.id,!1,n);break;case Sa.Toggle:var o=new Da(e);t.addListItem(e.id,!1,o),t.onSelectionChanged((function(t){t[0]===e.id&&o.switchState()}));break;case Sa.Separator:t.startSection()}})),t.onSelectionChanged((function(t){e.onSubmitCB&&e.onSubmitCB({selected_option:t[0]})})),t.focus(),t}},{key:"onSubmit",value:function(e){this.onSubmitCB=e}}]),t}(),Fa=function(){function e(t,n){De(this,e),this.formId=t,this.payload=n}return Fe(e,[{key:"startSession",value:function(e,t){this.clientContext=e,this.actionContext=t}},{key:"endSession",value:function(){}},{key:"onContinue",value:function(e){this.payload=e}},{key:"onError",value:function(e){this.payload=e}},{key:"promiseFormInput",value:function(){var e=this;return new Promise((function(t,n){var o=new La(e.actionContext,e.payload);o.onSubmit((function(e){t(com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest(e))})),zr.renderPage(o,e.clientContext)}))}}]),e}(),ja="xmui-select-question-dialog",Ma="".concat(ja,"_container"),qa="".concat(ja,"_message"),Ba=function(e){function t(e,n,o){var r;De(this,t),(r=Ue(this,qe(t).call(this))).addClass(ja);var i=new Dr(vt.button_cancel);i.label=e.getString(It),i.value=!1,i.onClick((function(){r.close()})),r.addLeftButton(i),r.setTitle(e.getString("ts_authenticator_questions_reg_select_question"));var s=new ct;return s.className=Ma,n.forEach((function(e){var t=new st;t.className=qa,t.setText(e.getSecurityQuestionText()),t.onClick((function(){o(e),r.close()})),s.appendChild(t)})),r.setContent(s),r}return Me(t,ea),t}(),Na=function(e){function t(){var e;return De(this,t),(e=Ue(this,qe(t).call(this,ei.Text,vt.input_security_question))).answered=!1,e.onChange((function(){e.updateState(e.value)})),e}return Me(t,mi),Fe(t,[{key:"checkHasValue",value:function(){return!0}},{key:"updateState",value:function(e){this.answered!==!!e&&(e&&e.length>this.minlength-1?this.addIcon(rt.Checkmark):this.removeIcon(rt.Checkmark),this.answered=!!e)}},{key:"maxlength",set:function(e){ze(qe(t.prototype),"maxlength",e,this,!0)}},{key:"value",set:function(e){ze(qe(t.prototype),"value",e,this,!0),this.updateState(e)},get:function(){return We(qe(t.prototype),"value",this)}}]),t}(),Ua=function(){function e(t,n,o,r){De(this,e),this.input=t,this.container=n,this.parent=o,this.removeButton=r}return Fe(e,null,[{key:"createByState",value:function(t,n,o,r,i){var s=new ct;s.className=za;var a=t.getString("ts_authenticator_questions_reg_select_question"),c=new Na;c.ariaLabel=a,c.maxlength=r.getMaxAnswerLength(),c.minlength=r.getMinAnswerLength();var u=new Dr(vt.button_remove,kr.Normal);u.addClass(Ka),u.label=t.getString("ts_authenticator_questions_remove_this_question_cta"),s.appendChild(c),s.appendChild(u),o.appendChild(s);var l=new e(c,s,o,u);switch(n.state){case Ca.PROVIDED_REMOVED:case Ca.NEW_REMOVED:throw new Error("can't start with remove");case Ca.PROVIDED_ANSWERED:c.placeholder=n.question.getSecurityQuestionText();var d=t.getString("ts_authenticator_questions_reg_default_answer_placeholder");c.value=d,u.onClick((function(){n.state=Ca.PROVIDED_REMOVED,o.removeChild(s),zr.log("removed called for answered question ".concat(n.question.getSecurityQuestionText())),i(!0)}));break;default:c.placeholder=a,c.disabled=!0,u.onClick((function(){n.state=Ca.NEW_REMOVED,zr.log("remove called for new question"),o.removeChild(s),i(!0)}))}return c.onFocusIn((function(){zr.log("focus on "+c.placeholder),n.state==Ca.PROVIDED_ANSWERED&&(c.value="")})),c.onChange((function(){var e=c.value.length;c.clearError(),e>r.getMinAnswerLength()-1&&(n.state==Ca.PROVIDED_ANSWERED?n.state=Ca.PROVIDED_MODIFIED:n.state=Ca.NEW_ANSWERED,n.answer=c.value,i(!0))})),c.onFocusOut((function(){var e=c.value.length;if(0==e)if(n.state==Ca.PROVIDED_ANSWERED){var o=t.getString("ts_authenticator_questions_reg_default_answer_placeholder");c.value=o}else{var s=t.getString(wn);c.setError(s,!1)}else if(ethis.selectableQuestions.length+this.answeredQuestions.length}},{key:"canSendForm",value:function(e){return!(e0?document.getElementById("hdnRelyingParty").value=e.relyingParty.replace("//login","//UserIdRecoveredFromOLB"):document.getElementById("hdnRelyingParty").value=e.relyingParty,localStorage.removeItem("username"),this.authDispatch({type:v,key:O,value:e.username}),this.authDispatch({type:R});break;case"forgottenpw_login":(null===(r=e.relyingParty)||void 0===r?void 0:r.indexOf("mobilebanking"))>0?document.getElementById("hdnRelyingParty").value=e.relyingParty.replace("//login","//PasswordResetFromOLB"):document.getElementById("hdnRelyingParty").value=e.relyingParty,this.authDispatch({type:H.ForgotPasswordSuccess}),this.authDispatch({type:R});break;default:document.getElementById("hdnRelyingParty").value=e.relyingParty}return new Promise((function(e){e(window.com.ts.mobile.sdk.JsonDataProcessingResult.create(!0))}))}},{key:"createPasswordAuthSession",value:function(e,t){return this.PasswordSession=new nc(this.authDispatch,e,t),this.PasswordSession}},{key:"createFormSession",value:function(e,t){return this.FormSession=new oc(e,t,this.authDispatch),this.FormSession}},{key:"createOtpAuthSession",value:function(e,t,n,o){return new rc(e,t,n,o,this.authDispatch)}},{key:"startActivityIndicator",value:function(){}},{key:"endActivityIndicator",value:function(){}},{key:"getInformationResponse",value:function(e,t,n,o,r){return this.authDispatch({type:H.Information}),ec.prototype.getInformationResponse(e,t,n,o,r)}},{key:"handlePolicyRejection",value:function(e,t,n,o,r,i){return Promise.resolve(window.com.ts.mobile.sdk.ConfirmationInput.create(-1))}},{key:"controlOptionForCancellationRequestInSession",value:function(){return new Promise((function(e){e(window.com.ts.mobile.sdk.ControlRequest.create(window.com.ts.mobile.sdk.ControlRequestType.AbortAuthentication))}))}}]),n}(ec),sc=function(e){var t="";document.getElementById("hdnRelyingParty")&&(t=document.getElementById("hdnRelyingParty").value,document.getElementById("hdnRelyingParty").value=""),void 0!==t&&""!==t?window.location.href=t:(tc.ErrorMessage("relying party element or its value is undefined"),e({type:S,isDefaultError:!0}),e({type:H.GenericError}))},ac=function(e,t){try{localStorage.removeItem("users"),sessionStorage.removeItem("currentSession"),document.getElementById("hdnRelyingParty").value="";var n=Object(Ee.a)(),o=window.com.ts.mobile.sdk.SDKConnectionSettings.create(X.Transmit.Endpoint,X.Transmit.AppId,X.Transmit.ApiTokenId,"");n.setConnectionSettings(o);var r=new ic(t);r.setLogEnabled(!1),n.setUiHandler(r),n.setExternalLogger(new function(){this.log=function(t,n,o){if(t===X.Transmit.LogLevel){var r="User details: Username : ".concat(e.UserInput.Username," Level: ").concat(t," Category: ").concat(n," Message: ").concat(o);tc.ErrorMessage(r)}}}),n.setEnabledCollectors([window.com.ts.mobile.sdk.CollectorType.DeviceDetails]),n.setUiAssetsDownloadMode(window.com.ts.mobile.sdk.UIAssetsDownloadMode.Disable),n.initialize().then((function(o){var r=new URLSearchParams(document.location.search),i=r.get(X.ChannelQueryKey),s=r.get(X.ProductQueryKey),a=r.get(X.AppIdQueryKey),c=Object(y.a)(Object(y.a)({},Object.fromEntries(r)),{},{tmxid:sessionId,channel:i,product:s,appId:a}),u=r.get(X.OlbEnvironments);u&&(c.Env=u),("true"===r.get("IsLocalHost")||X.Transmit.IsLocalHost)&&(c.IsLocalHost=!0);var l={uiContainer:document.getElementById("transmitContainer"),username:e.UserInput.Username};e.UserInput.Username&&(t({type:C,policyId:X.Transmit.PolicyId}),n.authenticate(e.UserInput.Username,X.Transmit.PolicyId,c,l).then((function(e){switch(t({type:_}),null===i||void 0===i?void 0:i.toLowerCase()){case"blnd":case"clsp":case"sscp":case"rmda":case"rdo":case"rdom":sc(t);break;default:var o="".concat(sessionStorage.getItem("currentSession"),"|").concat(localStorage.getItem("users")),r={userToken:e._token,userData:encodeURIComponent(o)};n.invokePolicy("store_session",r,l).then((function(){sc(t)}))}})).catch((function(){var n,o,r,i,s,a,c,u,l,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p="User Name: ".concat(e.UserInput.Username," Error: ").concat(d);tc.ErrorMessageWithObject("Exception from SDK authenticate call",p),t({type:_});var h,f=d._message,m="",g=["User cancelled a form action.","Authentication cancelled due to abort control request."];if("locked"===(null===(n=d._data)||void 0===n||null===(o=n.failure_data)||void 0===o||null===(r=o.reason)||void 0===r?void 0:r.type)&&"user"===(null===(i=d._data.failure_data.reason)||void 0===i||null===(s=i.data)||void 0===s?void 0:s.lock_type))m="otp"===(null===(h=d._data.failure_data.source)||void 0===h?void 0:h.method)?"OTPLockout":"PasswordLockout";else if("assertion_rejected"===(null===(a=d._data)||void 0===a||null===(c=a.failure_data)||void 0===c||null===(u=c.reason)||void 0===u?void 0:u.type)){var y;m=(null===(y=d._data.failure_data.reason.data)||void 0===y?void 0:y.errorCode)||""}else m=d._message&&g.indexOf(f)>-1?"UserCancelled":d._message&&d._message.indexOf("session expired")>-1&&4002===(null===(l=d._data)||void 0===l?void 0:l.server_error_code)?"4002":"default";switch(m.toLocaleLowerCase()){case"otplockout":t({type:H.Lockout,isOTPLockout:!0});break;case"targetsexhausted":case"usercancelled":t({type:S});break;case"006a401":t({type:H.Lockout,isFIDisabled:!0});break;case"007a401":case"passwordlockout":t({type:H.Lockout,isPasswordLockout:!0});break;case"025a401":t({type:H.Lockout,IsPasswordExpired:!0});break;case"008a401":case"001ts401":t({type:H.Lockout,isAccountInactive:!0});break;case"4000":t({type:S,isTMXReject:!0}),t({type:H.GenericError});break;case"4002":sessionStorage.setItem("STO",!0),t({type:H.UserName});break;case"002ts401":t({type:S,isStepupInsufficient:!0}),t({type:H.GenericError});break;case"003ts401":t({type:S,isRCIFDown:!0}),t({type:H.GenericError});break;case"generic-i":t({type:S,isGenericIError:!0}),t({type:H.GenericError});break;case"generic-u":t({type:S,isGenericUError:!0}),t({type:H.GenericError});break;case"generic-t":t({type:S,isGenericTError:!0}),t({type:H.GenericError});break;default:t({type:S,isDefaultError:!0}),t({type:H.GenericError})}})))})).catch((function(n){var o="User Name: ".concat(e.UserInput.Username," Message: ").concat(n);tc.ErrorMessageWithObject("Exception from SDK initialize call",o),t({type:S,isSystemUnavailable:!0}),t({type:H.GenericError})}))}catch(s){var i="User Name: ".concat(e.UserInput.Username," Message: ").concat(s);tc.ErrorMessageWithObject("Login journey failed for User",i),t({type:S,isSystemUnavailable:!0}),t({type:H.GenericError})}},cc=function(){localStorage.removeItem("users"),sessionStorage.removeItem("currentSession");var e=Object(o.useRef)(null),t=Object(o.useRef)(null),n=K(),i=n.authState,s=n.authDispatch,u=i.UserInput,p=u.Username,f=u.RememberUsername,g=i.IsUsernameRetrieved,y=null===localStorage.getItem("username")?"":localStorage.getItem("username").trim(),b=Object(o.useState)(!0),_=Object(a.a)(b,2),w=_[0],A=_[1],C=Object(o.useState)(!1),I=Object(a.a)(C,2),E=I[0],R=I[1];Object(o.useEffect)((function(){var n;(te("login","enterusername"),g)?null===e||void 0===e||null===(n=e.current)||void 0===n||n.focus():null===t||void 0===t||t.current.focus()}),[]);var T=function(e,t){e===x&&localStorage.setItem("username",t?p:""),s({type:v,key:e,value:t})};return Object(o.useEffect)((function(){y&&"undefined"!==y&&!p&&(T(O,y),T(x,!0))}),[f]),Object(o.useEffect)((function(){f&&"undefined"!==p&&void 0!==p&&""!==p&&localStorage.setItem("username",null===p||void 0===p?void 0:p.trim())})),Object(d.jsxs)(h,{handleSubmit:function(){s({type:S}),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=/^[a-zA-Z0-9 ~!@£%^*\-_+|.?\u005b\u005d\u00e1\u00c1\u00e9\u00c9\u00ed\u00cd\u00f3\u00d3\u00fa\u00da\u00f1\u00d1\u00fc\u00dc\u00bf\u00a1\u2014]+£/gm;return!(e.length<=0||e.length>18||!n.test(e))||(A(!1),sessionStorage.setItem("STO",!1),null===t||void 0===t||t.current.focus(),!1)}(p)&&(R(!0),s({type:k,payload:[]}),ac(i,s))},children:[g&&Object(d.jsxs)(r.a.Fragment,{children:[Object(d.jsxs)("p",{children:["Logging in as"," ",Object(d.jsx)("strong",{children:(null===p||void 0===p?void 0:p.length)<=0?y:p})]}),Object(d.jsxs)("h2",{className:"centered tile-header",ref:e,tabIndex:-1,children:["Please make note of this username or select"," ",Object(d.jsx)("b",{children:"Remember my username"})," to save this information on your personal (not shared or public) device. Once you are logged in, you can change your username at any time."]})]}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",children:[Object(d.jsxs)(l.Stack,{verticalSpacing:"50",children:[g&&Object(d.jsxs)("p",{id:"button-desc",children:["Would you like to continue logging in as"," ",Object(d.jsxs)("strong",{children:[(null===p||void 0===p?void 0:p.length)<=0?y:p,"? "]})]}),Object(d.jsx)(l.TextInput,{isValid:w,errorMessages:[Ae.userName.fieldLevelErrors.validUsername],label:"Username",autoComplete:"off",initialValue:(null===p||void 0===p?void 0:p.length)<=0?y:p,handleOnChange:function(e){s({type:P,key:"UsernameUpdated",value:!0}),T(O,e.target.value.trim())},ref:t}),Object(d.jsx)(l.Checkbox,{size:"small",label:"Remember my username",isChecked:f,handleOnChange:function(e){return T(x,e.target.checked)}})]}),Object(d.jsx)(m,{children:Object(d.jsx)(l.Button,{variant:"primary",text:"Continue",size:"large",type:"submit","aria-describedby":"button-desc",isLoading:E,loadingText:"Loading",isDisabled:E,isFullWidth:!0})})]})}),!g&&Object(d.jsxs)(Ie,{children:[Object(d.jsxs)("p",{className:"text-style-body-3",children:[Object(d.jsx)("span",{"aria-hidden":"true",children:"Forgot "}),Object(d.jsx)(c.a,{to:"/forgot-username".concat(document.location.search),"aria-label":"Forgot username?",onClick:function(e){e.preventDefault(),s({type:H.RetrieveUserName}),s({type:S})},children:"username"})," ","or"," ",Object(d.jsx)(c.a,{to:"/password-reset".concat(document.location.search),"aria-label":"Forgot password?",onClick:function(e){e.preventDefault(),Object(c.c)("/password-reset".concat(document.location.search)),s({type:H.ForgotPassword}),s({type:S})},children:"password"}),"?"]}),Object(d.jsxs)("p",{className:"text-style-body-3",children:["Don\u2019t have an Online Banking account?"," ",Object(d.jsx)("a",{href:ee.Olb.EnrollNow,children:"Enroll now"}),"."]})]})]})},uc=fe(null,null,"dynamic-username-prompt").prefix,lc=function(){var e=Object(o.useRef)(null),t=Object(o.useState)(""),n=Object(a.a)(t,2),r=n[0],i=n[1],s=Object(o.useState)(!0),u=Object(a.a)(s,2),p=u[0],f=u[1],g=Object(o.useState)(!1),y=Object(a.a)(g,2),b=y[0],_=y[1],w=K(),A=w.authState,k=w.authDispatch,C=A.UserInput,I=C.Username,E=C.RememberUsername,R=A.TransmitEvents.resolve,P=A.ErrorType,x=A.CurrentFlow.isFormPassword,T=function(){k({type:S}),void 0!==R&&R(x?window.com.ts.mobile.sdk.FormInput.createFormCancellationRequest():window.com.ts.mobile.sdk.InputOrControlResponse.createControlResponse(window.com.ts.mobile.sdk.ControlRequest.create(window.com.ts.mobile.sdk.ControlRequestType.CancelAuthenticator)))};return Object(o.useEffect)((function(){te("login","enterpassword"),null===e||void 0===e||e.current.focus()}),[]),Object(o.useEffect)((function(){P.IsInvalidUsernameOrPassword&&_(!1)})),Object(d.jsxs)(h,{handleSubmit:function(){if(k({type:S}),f(!0),r.length<=0||r.length>32)return f(!1),void(null===e||void 0===e||e.current.focus());_(!0),void 0!==R&&R(x?window.com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({response:r}):window.com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(window.com.ts.mobile.sdk.PasswordInput.create(r)))},children:[Object(d.jsxs)("div",{className:"centered",children:[uc," ",Object(d.jsx)("strong",{children:I})]}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",children:[Object(d.jsx)(l.PasswordInput,{autoComplete:"off",isValid:p,errorMessages:[Ae.password.fieldLevelErrors.validPassword],ariaLabel:"Please enter your password for ".concat(I," to login."),label:"Password",labelId:"passwordLabel",inputId:"password",initialValue:r,handleOnChange:function(e){i(e.target.value)},ref:e,onClick:function(){null!=document.getElementById("auth-heading-error")&&(document.getElementById("auth-heading-error").style.border="0px dotted red")}}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Continue",size:"large",type:"submit",isLoading:b,loadingText:"Loading",isDisabled:b,isFullWidth:!0}),Object(d.jsx)(l.Button,{clickMethod:function(e){return function(e){e.preventDefault(),!1===E&&k({type:v,key:O,value:""}),T(),window.location.href=window.location.href}(e)},variant:"text-primary",text:"Switch username",type:"button"})]})]})}),Object(d.jsx)(Ie,{children:Object(d.jsxs)("p",{className:"text-style-body-3",children:[Object(d.jsx)(c.a,{to:"/password-reset".concat(document.location.search),onClick:function(e){e.preventDefault(),sessionStorage.setItem("fpUsername",I),T(),window.location.href=window.location.href.replace("/signin","/password-reset")},children:"Forgot password?"})," "]})})]})},dc=fe(null,null,"dynamic-username-prompt").prefix,pc=function(){var e=Object(o.useState)(""),t=Object(a.a)(e,2),n=t[0],r=t[1],i=Object(o.useState)(!0),s=Object(a.a)(i,2),c=s[0],u=s[1],p=Object(o.useRef)(null),f=Object(o.useRef)(null),g=K(),y=g.authState,b=y.OTCConfig,_=y.TransmitEvents,w=_.resolve,A=_.policyId,C=y.UserInput,I=C.ResendCounters,E=C.Username,R=C.RememberUsername,P=g.authDispatch,x=A===X.Transmit.PolicyId,T=Object(o.useState)(!1),D=Object(a.a)(T,2),L=D[0],F=D[1],j={data:[]},M=(null===b||void 0===b?void 0:b.phoneTargets)||[];if((M=void 0!==M?M.concat(null===b||void 0===b?void 0:b.emailTargets):null===b||void 0===b?void 0:b.emailTargets).length<=0&&void 0!==w){var q=window.com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({response:"Undefined"});w(q),P({type:S,isRCIFDown:!0}),tc.ErrorMessage("User Name: ".concat(E," Message: Transmit Journey sent null or empty contacts")),P({type:H.GenericError})}function B(e,t){switch(e){case window.com.ts.mobile.sdk.OtpChannel.Email:return"Email code to ".concat(t);case window.com.ts.mobile.sdk.OtpChannel.Sms:return"Text code to ".concat(t);default:return"unKnown"}}var N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];return void 0!==e&&null!==e&&e.length>0&&e.forEach((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=I.map((function(e){return e.description})).indexOf(e._description);if(-1!==n){var o=I[n];o.isMaxRetried||t.push({key:"".concat(e._channel).concat(e._targetIdentifier),title:B(e._channel,e._description),description:e._description,channel:e._channel,value:e})}})),t}(M),U=N.map((function(e){return{handleOnChange:function(e){return r(e.target.value)},isChecked:n===e.key,label:e.title,value:e.key}}));Object(o.useEffect)((function(){var e;(A===X.Transmit.RecoverUserIdPolicyId?te("retrieveusername","otccontactmethodselection"):A===X.Transmit.ForgotPasswordPolicyId?te("retrievepassword","otccontactmethodselection"):te("login","otccontactmethodselection"),1===U.length)?f.current.focus():null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus();1===U.length&&(u(!0),r(N[0].key)),P({type:S})}),[]);return Object(d.jsxs)(o.Fragment,{children:[Object(d.jsxs)(l.Stack,{verticalSpacing:"70",children:[x&&Object(d.jsxs)("p",{className:"centered",children:[dc," ",Object(d.jsx)("strong",{children:E})]}),Object(d.jsx)("span",{style:{padding:"0 20%"},children:Object(d.jsx)("h2",{className:"centered tile-header",ref:p,tabIndex:-1,children:"For your security, we\u2019ll verify your identity using a one-time code."})}),Object(d.jsxs)(h,{handleSubmit:function(e){if(e.preventDefault(),""===n)return u(!1),void(null!=document.getElementsByClassName("form-control__legend")&&null!=document.getElementsByClassName("form-control__legend")[0]&&document.getElementsByClassName("form-control__legend")[0].focus());F(!0);var t=N.find((function(e){return e.key===n}));if(P({type:k,selectedContact:t,resendCounter:j,remainingContactsCount:N.length,payload:I}),void 0!==w){var o=window.com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({response:t.value});w(o)}},children:[Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",children:[1!==U.length&&Object(d.jsx)(l.RadioGroup,{groupFormControlId:"otcContactMethodSelection",name:"otc-contact-method-selection",legendLabel:"How should we send your code?",radioItems:U,isValid:c,errorMessages:[Ae.otcContactMethodSelection.fieldLevelErrors.contactMethod]}),1===U.length&&Object(d.jsx)(o.Fragment,{children:Object(d.jsxs)("h2",{className:"centered tile-header",ref:f,tabIndex:-1,children:[M.length>1&&Object(d.jsx)("span",{children:"Ready for new code?"}),1===M.length&&Object(d.jsx)("span",{children:"Ready to send your code?"}),Object(d.jsx)("br",{}),Object(d.jsx)("strong",{children:N[0].title})]})}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Send",size:"large",type:"submit",isLoading:L,loadingText:"Loading",isDisabled:L,isFullWidth:!0}),Object(d.jsx)(l.Button,{clickMethod:function(e){return function(e){if(e.preventDefault(),!1===R&&P({type:v,key:O,value:""}),void 0!==w){var t=window.com.ts.mobile.sdk.FormInput.createFormCancellationRequest();w(t),x?window.location.href=window.location.href:P({type:H.UserName})}}(e)},variant:"text-primary",text:"Cancel",type:"button"})]})]})}),Object(d.jsx)(Ie,{children:Object(d.jsxs)("p",{className:"text-style-body-3 centered",children:["Don\u2019t recognize or no longer have access to these phone numbers or email addresses?"," ",Object(d.jsx)("span",{dangerouslySetInnerHTML:{__html:'Visit a branch or call us at 1-657-760-1476.'}})]})})]})]}),Object(d.jsxs)("p",{className:"text-style-body-4",children:["Codes can be sent only to active email addresses and SMS text-enabled mobile devices. When/if you receive messages from Barclaysmay depend on factors outside of our control, including your email provider and mobile carrier, and your email, device and app settings. Message and data rates may apply. Subject to terms and conditions of the"," ",Object(d.jsx)("a",{href:X.Urls.AgreementAndDisclosure,target:"_blank",rel:"noreferrer",children:"Agreement and Disclosure for Electronic Banking Services"}),"."]})]})},hc=fe(null,null,"dynamic-username-prompt").prefix,fc=function(){var e=Object(o.useRef)(null),t=K(),n=t.authState,r=n.UserInput,i=r.SelectedContact,s=r.ResendCounters,c=r.RemainingContactsCount,u=r.Username,p=n.TransmitEvents,f=p.resolve,g=p.currentSession,b=p.policyId,v=n.FailedAttemptsCount.OTPFailedAttemptsCount,_=n.CurrentFlow.isForgotUsername,w=t.authDispatch,A=b===X.Transmit.PolicyId,S=i.description,C=s.map((function(e){return e.description})).indexOf(S),I=s[C],E=Object(o.useState)(""),R=Object(a.a)(E,2),P=R[0],O=R[1],x=Object(o.useState)(!0),T=Object(a.a)(x,2),D=T[0],L=T[1],F=Object(o.useState)(!0),j=Object(a.a)(F,2),M=j[0],q=j[1],B=Object(o.useState)(!0),N=Object(a.a)(B,2),U=N[0],W=N[1],z=Object(o.useState)(0),V=Object(a.a)(z,2),Q=V[0],G=V[1],J=Object(o.useState)(!1),Y=Object(a.a)(J,2),Z=Y[0],£=Y[1],ee=Object(o.useState)(!0),ne=Object(a.a)(ee,2),oe=ne[0],re=ne[1],ie=Object(o.useState)(!1),se=Object(a.a)(ie,2),ae=se[0],ce=se[1],ue=/^[0-9]{6,6}£/,le=Ae.otc.fieldLevelErrors.lengthError;D?!M&&v>0&&ae?le=Ae.otc.fieldLevelErrors.invalidOtc:P.length<=0&&(le=Ae.otc.fieldLevelErrors.lengthError):le=Ae.otc.fieldLevelErrors.lengthError,Object(o.useEffect)((function(){b===X.Transmit.RecoverUserIdPolicyId?te("retrieveusername","enterotc"):b===X.Transmit.ForgotPasswordPolicyId?te("retrievepassword","enterotc"):te("login","enterotc"),void 0!==v&&v>0&&(O(""),q(!1),£(!1))}),[v]);var de=function(e){if(void 0!==f){var t=e,n=window.com.ts.mobile.sdk.InputOrControlResponse.createEscapeResponse(g.actionContext.getEscapeOptions()[0],{}),o=window.com.ts.mobile.sdk.InputOrControlResponse.createEscapeResponse(g.actionContext.getEscapeOptions()[2],{});f(t?n:o)}},pe=function(){var e=Object(y.a)({},s),t=s.map((function(e){return e.description})).indexOf(S);e[t]={description:S,retryValue:s[t].retryValue+1,isMaxRetried:s[t].retryValue>=2},Object.values(e).filter((function(e){return!0===e.isMaxRetried})).length===s.length&&re(!1),w({type:k,payload:Object.values(e),selectedContact:i,remainingContactsCount:c})},he=function(t){if(t.preventDefault(),void 0!==f){W(!0);var n=window.com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(window.com.ts.mobile.sdk.TargetBasedAuthenticatorInput.createAuthenticatorInput(window.com.ts.mobile.sdk.OtpInputRequestResend.createOtpResendRequest()));f(n),O(""),q(!0),null===e||void 0===e||e.current.focus(),pe()}};return Object(o.useEffect)((function(){null===e||void 0===e||e.current.focus(),pe()}),[]),Object(o.useEffect)((function(){M?q(!0):(q(!1),e.current.focus())}),[D]),Object(o.useEffect)((function(){!M&&D?(W(!1),O(""),e.current.focus()):W(!0)}),[Q,M]),Object(d.jsxs)(h,{handleSubmit:function(){if(le="",q(!0),L(!0),P.length<=0||P.length>6||P.length<6)return le=Ae.otc.fieldLevelErrors.lengthError,O(""),q(!1),ce(!1),void(null===e||void 0===e||e.current.focus());if(!ue.test(P))return le=Ae.otc.fieldLevelErrors.lengthError,O(""),L(!1),void(null===e||void 0===e||e.current.focus());if(Object(l.validateOTC)(P,L),£(!0),G(0),void 0!==f){ce(!0),_&&w({type:H.IsUsernameRetrieved});var t=window.com.ts.mobile.sdk.InputOrControlResponse.createInputResponse(window.com.ts.mobile.sdk.TargetBasedAuthenticatorInput.createAuthenticatorInput(window.com.ts.mobile.sdk.OtpInputOtpSubmission.createOtpSubmission(P)));f(t)}},children:[A&&Object(d.jsxs)("p",{children:[hc," ",Object(d.jsx)("strong",{children:u})]}),Object(d.jsx)("p",{children:"For your security, we\u2019ll verify your identity using a one-time code."}),2===I.retryValue&&Object(d.jsx)("p",{role:"alert","aria-live":"assertive",children:"We\u2019ve sent you a new code."}),I.retryValue>=3&&Object(d.jsx)("p",{role:"alert","aria-live":"assertive",children:"We\u2019ve sent you another one-time code. It may take a few moments to arrive."}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",children:[Object(d.jsx)(l.OTCInput,{isValid:D&&U,errorMessages:[le],label:"Enter the one-time code sent to ".concat(S),labelId:"OTCLabel",inputId:"OTC",autoComplete:"off",initialValue:P,handleOnChange:function(e){O(e.target.value)},ref:e,minLength:6,maxLength:6}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Continue",size:"large",type:"submit",isLoading:Z,loadingText:"Loading",isDisabled:Z,isFullWidth:!0}),Object(d.jsx)(l.Button,{clickMethod:function(e){return function(e){e.preventDefault(),de(oe),oe||(A?window.location.href=window.location.href:w({type:H.UserName}))}(e)},variant:"text-primary",text:oe?"Go back":"Cancel",type:"button"})]})]})}),Object(d.jsxs)(Ie,{children:[I.retryValue<2&&Object(d.jsxs)("p",{className:"text-style-body-3",children:["Didn\u2019t receive your code?"," ",Object(d.jsx)(l.Button,{text:"Send a new code",variant:"text-primary",size:"medium",clickMethod:function(e){return he(e)}}),"."]}),2===I.retryValue&&Object(d.jsxs)("p",{className:"text-style-body-3",children:["Still didn\u2019t receive your code?"," ",Object(d.jsx)(l.Button,{text:"Send a new code",variant:"text-primary",size:"medium",clickMethod:function(e){return he(e)}}),"."]}),I.retryValue>=3&&Object(d.jsxs)(o.Fragment,{children:[Object(d.jsxs)("p",{className:"text-style-body-3",children:["Still didn\u2019t receive your code? We\u2019ve reached the maximum number of codes we can send to ",S,"."]}),oe&&Object(d.jsx)(l.Button,{text:"Send code another way.",size:"medium",variant:"text-primary",clickMethod:function(e){return function(e){e.preventDefault(),de(I.isMaxRetried)}(e)}})]})]})]})},mc=function(){var e=Ae.challengeQuestion,t=Object(o.useRef)(null),n=Object(o.useState)(""),r=Object(a.a)(n,2),i=r[0],s=r[1],c=Object(o.useState)(!0),u=Object(a.a)(c,2),p=u[0],f=u[1],g=Object(o.useState)(!1),y=Object(a.a)(g,2),b=y[0],_=y[1],w=Object(o.useState)(!0),A=Object(a.a)(w,2),S=A[0],k=A[1],C=K(),I=C.authState,E=I.ChallengeQuestion,R=I.TransmitEvents.resolve,P=I.UserInput.RememberUsername,x=I.isChallengeQuestion,T=C.authDispatch,D=me();return Object(o.useEffect)((function(){te("login","entersecurityquestionanswer"),null===t||void 0===t||t.current.focus()}),[]),Object(o.useEffect)((function(){return!p&&t.current.focus()}),[p]),Object(o.useEffect)((function(){!1!==S&&""===E.message||(_(!1),f(!1),E.message=x?e.fieldLevelErrors.answerDidNotMatchSecurityQuestion:e.fieldLevelErrors.answerDidNotMatch,s(""))}),[E]),Object(d.jsxs)(h,{handleSubmit:function(){if(f(!0),i.length<=0)return E.message=x?e.fieldLevelErrors.answerDidNotMatchSecurityQuestion:e.fieldLevelErrors.enterValidAnswer,s(""),f(!1),void(null===t||void 0===t||t.current.focus());if(i.replace(/[^a-zA-Z0-9 ]/g,"").length!==i.length)return E.message=e.fieldLevelErrors.answerShouldContains,s(""),f(!1),void(null===t||void 0===t||t.current.focus());if(_(!0),R){var n=window.com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({response:i});k(!1),R(n)}},children:[Object(d.jsx)("p",{className:"centered",role:"alert","aria-live":"assertive",children:x?D.SecurityQuestionContentInTile:D.PasscodeQuestionContentInTile}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",children:[Object(d.jsx)(l.PasswordInput,{autoComplete:"off",isValid:p,errorMessages:""!==E.message?[E.message]:[],label:E.question,initialValue:i,"data-testid":"enteranswer_textbox",handleOnChange:function(e){s(e.target.value)},ref:t}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary","data-testid":"continue_button",text:"Continue",size:"large",type:"submit",isLoading:b,loadingText:"Loading",isDisabled:b,isFullWidth:!0}),Object(d.jsx)(l.Button,{clickMethod:function(e){return function(e){e.preventDefault(),!1===P&&T({type:v,key:O,value:""});var t=window.com.ts.mobile.sdk.FormInput.createFormCancellationRequest();R(t),window.location.href=window.location.href}(e)},variant:"text-primary","data-testid":"cancel_button",text:"Cancel",type:"button"})]})]})})]})},gc=n(6),yc=function(e){return e.split(/([A-Z]|\d)/).map((function(e,t,n){if(!t)return e.charAt(0).toUpperCase()+e.slice(1);if(!e)return e;if("_"===e)return" ";if(1===e.length&&e===e.toUpperCase()){var o=!n[t-1]||"_"===n[t-1],r=t+1n.length||!n[t+1]&&!n[t+3];o&&!r||(e=" ".concat(e)),(r||!o&&!i)&&(e=e.toLowerCase())}return e})).join("")},bc=function(e){if(!/^\d{2}\/\d{2}\/\d{4}£/.test(e))return!1;var t=e.split("/"),n=parseInt(t[1],10),o=parseInt(t[0],10),r=parseInt(t[2],10);if(r<1e3||r>3e3||0===o||o>12)return!1;var i=[31,28,31,30,31,30,31,31,30,31,30,31];return(r%400===0||r%100!==0&&r%4===0)&&(i[1]=29),n>0&&n<=i[o-1]},vc=function(e){var t=e.split("/");return"".concat(t[2],"-").concat(t[0],"-").concat(t[1])},_c=function(e){return/(^\d{5}£)|(^\d{5}-\d{4}£)/.test(e)},wc=function(e){var t=e?e.replace(/[^0-9 ]/g,""):e,n=/[^\d-\s]/g.test(t),o=/[\d]{3}(\s|-)[\d]{2}(\s|-)[\d]{1,4}/g.test(t);return n||o&&11!==t.length||9!==t.length&&!o||0===t.length},Ac=function(e,t,n){try{var o=function(){t({type:H.SelfServiceError})},r=Object(Ee.a)(),i=window.com.ts.mobile.sdk.SDKConnectionSettings.create(X.Transmit.Endpoint,X.Transmit.AppId,X.Transmit.ApiTokenId,"");r.setConnectionSettings(i);var s=new ic(t);s.setLogEnabled(!1),r.setUiHandler(s),r.setExternalLogger(new function(){this.log=function(t,n,o){if(t===X.Transmit.LogLevel){var r="Forgot Password journey :: User details: Username: ".concat(e.UserInput.Username," Level: ").concat(t," Category: ").concat(n," Message: ").concat(o);tc.ErrorMessage(r)}}}),r.setEnabledCollectors([window.com.ts.mobile.sdk.CollectorType.DeviceDetails]),r.setUiAssetsDownloadMode(window.com.ts.mobile.sdk.UIAssetsDownloadMode.Disable),r.initialize().then((function(i){tc.InfoMessageWithObject("Initialized successfully:",i);var s=new URLSearchParams(document.location.search),a=s.get(X.ChannelQueryKey),c=s.get(X.ProductQueryKey),u=s.get(X.AppIdQueryKey),l="";l="primary"===n?{tmxid:sessionId,username:e.UserInput.Username,ssn:e.UserInput.SSN,channel:a,product:c,appId:u}:{tmxid:sessionId,username:e.UserInput.Username,lastname:e.UserInput.LastName,dob:vc(e.UserInput.DOB),zip:e.UserInput.Zip,channel:a,product:c};var d=s.get(X.OlbEnvironments);d&&(l.Env=d),("true"===s.get("IsLocalHost")||X.Transmit.IsLocalHost)&&(l.IsLocalHost=!0);var p={uiContainer:document.getElementById("transmitContainer")};t({type:C,policyId:X.Transmit.ForgotPasswordPolicyId}),l=Object(y.a)(Object(y.a)({},Object.fromEntries(s)),l),r.authenticate(e.UserInput.Username,X.Transmit.ForgotPasswordPolicyId,l,p).then((function(e){tc.InfoMessageWithObject("ProcessAuth controller response",e),r.logout()})).catch((function(){var n,r,i,s,c,u,l,d,p,h,f=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},m="Forgot Password journey :: Username: ".concat(e.UserInput.Username," Message: ").concat(f);tc.ErrorMessageWithObject("Exception from SDK authenticate call",m),t({type:R});var g="",y=["User cancelled a form action.","Authentication cancelled due to abort control request."],b=f._message;if("locked"===(null===(n=f._data)||void 0===n||null===(r=n.failure_data)||void 0===r||null===(i=r.reason)||void 0===i?void 0:i.type)&&"user"===(null===(s=f._data.failure_data.reason)||void 0===s||null===(c=s.data)||void 0===c?void 0:c.lock_type)&&"otp"===(null===(u=f._data.failure_data.source)||void 0===u?void 0:u.method))g="012TS401";else if("assertion_rejected"===(null===(l=f._data)||void 0===l||null===(d=l.failure_data)||void 0===d||null===(p=d.reason)||void 0===p?void 0:p.type)){var v,_,w,A;g=null===(v=f._data)||void 0===v||null===(_=v.failure_data)||void 0===_||null===(w=_.reason)||void 0===w||null===(A=w.data)||void 0===A?void 0:A.errorCode}else g=f._message&&y.indexOf(b)>-1?"UserCancelled":f._message&&f._message.indexOf("session expired")>-1&&4002===(null===(h=f._data)||void 0===h?void 0:h.server_error_code)?"4002":"default";switch(t({type:S,isRetrievePasswordStepError:!0}),g){case"009TS401":case"014TS401":case"015TS401":t({type:E,errorMessage:"notOnFile"}),o();break;case"010TS401":case"012TS401":t({type:E,errorMessage:"lockedFromSelfService"}),o();break;case"011TS401":t({type:E,errorMessage:"accountNotActiveForSelfService"}),o();break;case"013TS401":case"4000":t({type:E,errorMessage:"tmxRejectForSelfService"}),o();break;case"4002":sessionStorage.setItem("STO",!0),t({type:H.UserName});break;case"016TS401":case"002TS401":t({type:E,errorMessage:"noTargetsInRCIF"}),o();break;case"003TS401":t({type:S,isRCIFDown:!0}),t({type:H.GenericError});break;case"targetsExhausted":case"UserCancelled":t({type:E}),sessionStorage.getItem("isLogin")||"olb"!==a?sessionStorage.removeItem("isLogin"):t({type:H.UserName});break;default:t({type:S,isDefaultError:!0}),t({type:H.GenericError})}}))})).catch((function(n){t({type:R});var o="Forgot Password journey :: Username: ".concat(e.UserInput.Username," Message: ").concat(n);tc.ErrorMessageWithObject("Exception from SDK initialize call",o),t({type:S,isSystemUnavailable:!0}),t({type:H.GenericError})}))}catch(c){t({type:R});var a="Username: ".concat(e.UserInput.Username," Message: ").concat(c);tc.ErrorMessageWithObject("Forgot Password journey failed",a),t({type:S,isSystemUnavailable:!0}),t({type:H.GenericError})}},Sc=function(){var e=Object(o.useRef)(null),t=Object(o.useRef)(null),n=Object(o.useRef)(null),r=Object(o.useRef)(null),i=K(),s=i.authState,u=i.authDispatch,p=s.UserInput,f=Object(o.useState)({username:localStorage.getItem("username")||sessionStorage.getItem("fpUsername")||p.Username,socialSecurityNumber:0===p.SSN?"":p.SSN}),b=Object(a.a)(f,2),_=b[0],w=b[1],A=Object(o.useState)(!0),S=Object(a.a)(A,2),k=S[0],C=S[1],E=Object(o.useState)(!0),P=Object(a.a)(E,2),x=P[0],T=P[1],D=Object(o.useState)(!1),F=Object(a.a)(D,2),j=F[0],M=F[1],q=Object(o.useState)(!1),N=Object(a.a)(q,2),U=N[0],W=N[1],z=Object(o.useState)([]),V=Object(a.a)(z,2),Q=V[0],G=V[1],J=function(e){var t="";if("socialSecurityNumber"===e)t="Social Security/tax ID number";else t=yc(e);return t},Y=function(e){var t=e.target.value;w(Object(y.a)(Object(y.a)({},_),{},Object(g.a)({},e.target.name,t)))},Z=function(e,t){u({type:v,key:e,value:t})};return Object(o.useEffect)((function(){var t;null===e||void 0===e||null===(t=e.current)||void 0===t||t.focus(),te("retrievepassword","verifyusernamessn"),sessionStorage.removeItem("fpUsername"),u({type:I,isForgotPassword:!0,isForgotUsername:!1,isFormPassword:!1}),u({type:R})}),[]),Object(o.useEffect)((function(){return Q.length>1&&W(!0),function(){W(!1)}}),[Q]),Object(o.useEffect)((function(){var e;U?null===r||void 0===r||null===(e=r.current)||void 0===e||e.focus():1===Q.length&&("username"===Q[0].inputID?null===t||void 0===t||t.current.focus():"socialSecurityNumber"===Q[0].inputID&&(null===n||void 0===n||n.current.focus()))}),[U,Q]),Object(d.jsx)(h,{handleSubmit:function(e){var t;e.preventDefault(),M(!0);var n,o=[],r=!1;if(wc(_.socialSecurityNumber)?(T(!1),r=!0,o=["socialSecurityNumber"].concat(Object(gc.a)(o))):T(!0),(null===(t=_.username)||void 0===t?void 0:t.length)<=0||void 0===_.username?(C(!1),r=!0,o=["username"].concat(Object(gc.a)(o))):C(!0),r)return n=o,G([]),n.map((function(e){return G((function(t){return[].concat(Object(gc.a)(t),[{ariaLabel:"Enter a valid ".concat(J(e),"."),inputID:e,text:J(e)}])})),null})),void M(!1);Ac(Object(y.a)(Object(y.a)({},s),{},{UserInput:Object(y.a)(Object(y.a)({},s.UserInput),{},{Username:_.username})}),u,B),M(!1)},children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsx)("p",{className:"centered",children:"To confirm your account, we\u2019ll ask you for some identifying information."}),U&&Object(d.jsx)(l.ErrorSummary,{errors:Q,ref:r,tabIndex:-1}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",children:[Object(d.jsxs)(l.Stack,{verticalSpacing:"50",children:[Object(d.jsx)("h2",{className:"justifyLeft tile-header",ref:e,tabIndex:-1,children:"Enter the username and Social Security or tax ID number (SSN / TIN) associated with your account."}),Object(d.jsxs)("div",{className:"form__row",children:[Object(d.jsx)(l.TextInput,{label:"Username",inputId:"username",name:"username",autoComplete:"off",initialValue:_.username,isValid:k,errorMessages:[Ae.forgotPassword.fieldLevelErrors.validUsername],handleOnChange:function(e){Z(O,e.target.value.trim()),Y(e)},ref:t,isRequired:!0}),Object(d.jsx)(l.Popover,{triggerAriaLabel:"Business user help",children:"If you are a business user and your username was provided by your organization, please contact your Company Administrator to reset your password."})]}),Object(d.jsxs)(l.Stack,{verticalSpacing:"20",children:[Object(d.jsx)(l.SSNInput,{onPaste:function(e){return e.preventDefault(),!1},onCopy:function(e){return e.preventDefault(),!1},label:"SSN/TIN",inputId:"socialSecurityNumber",name:"socialSecurityNumber",autoComplete:"off",initialValue:_.ssn,isValid:x,errorMessages:[Ae.forgotPassword.fieldLevelErrors.SSNError],handleOnChange:function(e){Z(L,e.target.value.trim().replace(/[^0-9]/g,"")),Y(e)},ref:n,isRequired:!0}),Object(d.jsx)(l.Button,{classes:"btn--left-aligned underlined italicized",text:"I don't have a Social Security or tax ID number.",variant:"text-primary",size:"small",clickMethod:function(e){return function(e){if(e.preventDefault(),X.isNRASelfServiceEnabled)u({type:H.UsernameLastDobZip});else{var t=new URLSearchParams(document.location.search),n=t.get(X.ChannelQueryKey).toLowerCase(),o=t.get(X.ProductQueryKey).toLowerCase();switch(n){case"mbank":n="mob";break;case"sscp":n="sscp";break;case"blnd":n="loheloc";break;case"clsp":n="clsp";break;case"rmda":n="heloc"===o?"loheloc":"".concat(n,"_").concat(o);break;case"rdo":n="".concat(n,"_").concat(o,"&appid=").concat(t.get(X.AppIdQueryKey));break;case"rdom":n="rdom";break;default:n=ee.Olb.Name}var r=ee.Olb.ForgotPassword;n===ee.Olb.Name?r+="?isnra=true":r="".concat(r,"?channel=").concat(n,"&isnra=true"),window.location.href=r}}(e)}})]})]}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Continue",size:"large",type:"submit",isLoading:j,isDisabled:j,isFullWidth:!0}),Object(d.jsx)(l.Button,{clickMethod:function(e){return function(e){e.preventDefault(),u({type:H.UserName}),!1===p.RememberUsername&&Z(O,"")}(e)},variant:"text-primary",text:"Cancel",type:"button"})]})]})}),Object(d.jsxs)(Ie,{children:[Object(d.jsxs)("p",{className:"text-style-body-3",children:[Object(d.jsx)(c.a,{to:"/forgot-username".concat(document.location.search),onClick:function(e){e.preventDefault(),u({type:H.RetrieveUserName})},children:"Forgot username?"})," "]}),Object(d.jsxs)("p",{className:"text-style-body-3",children:["Don\u2019t have an Online Banking account?"," ",Object(d.jsx)("a",{href:ee.Olb.EnrollNow,children:"Enroll now"}),"."]})]})]})})},kc=function(e){var t=Ae.setupSecurityQuestions,n=Object(o.useRef)(null),r=Object(o.useRef)(null),i=K(),s=i.authState,c=s.SecurityQuestions,u=s.TransmitEvents.resolve,p=s.UserInput.RememberUsername,f=i.authDispatch,b=c.questions.map((function(e){return{label:e.Text,value:String(e.Id)}})),_=e.initialValues,w=Object(o.useState)(_[0]),A=Object(a.a)(w,2),S=A[0],k=A[1],C=Object(o.useState)(b),I=Object(a.a)(C,2),E=I[0],R=I[1],P=Object(o.useState)(b),x=Object(a.a)(P,2),T=x[0],D=x[1],L=Object(o.useState)(b),F=Object(a.a)(L,2),j=F[0],M=F[1],q=Object(o.useState)(!0),B=Object(a.a)(q,2),N=B[0],U=B[1],H=Object(o.useState)(!0),W=Object(a.a)(H,2),z=W[0],V=W[1],Q=Object(o.useState)(!0),G=Object(a.a)(Q,2),J=G[0],Y=G[1],Z=Object(o.useState)(""),£=Object(a.a)(Z,2),X=£[0],ee=£[1],ne=Object(o.useState)(""),oe=Object(a.a)(ne,2),re=oe[0],ie=oe[1],se=Object(o.useState)(!0),ae=Object(a.a)(se,2),ce=ae[0],ue=ae[1],le=Object(o.useState)(!0),de=Object(a.a)(le,2),pe=de[0],he=de[1],fe=Object(o.useState)(!0),me=Object(a.a)(fe,2),ge=me[0],ye=me[1],be=Object(o.useState)(""),ve=Object(a.a)(be,2),_e=ve[0],we=ve[1],Se=Object(o.useState)(""),ke=Object(a.a)(Se,2),Ce=ke[0],Ie=ke[1],Ee=Object(o.useState)(!0),Re=Object(a.a)(Ee,2),Pe=Re[0],Oe=Re[1],xe=Object(o.useState)(!0),Te=Object(a.a)(xe,2),De=Te[0],Le=Te[1],Fe=Object(o.useState)(!0),je=Object(a.a)(Fe,2),Me=je[0],qe=je[1],Be=Object(o.useState)(""),Ne=Object(a.a)(Be,2),Ue=Ne[0],He=Ne[1],We=Object(o.useState)(""),Ke=Object(a.a)(We,2),ze=Ke[0],Ve=Ke[1],Qe=Object(o.useState)(""),Ge=Object(a.a)(Qe,2),Je=Ge[0],Ye=Ge[1],Ze=Object(o.useState)([]),£e=Object(a.a)(Ze,2),Xe=£e[0],et=£e[1],tt=Object(o.useState)(!1),nt=Object(a.a)(tt,2),ot=nt[0],rt=nt[1],it=Object(o.useState)(!1),st=Object(a.a)(it,2),at=st[0],ct=st[1],ut=function(e){var t=e.target,n=t.name,o=t.value;k(Object(y.a)(Object(y.a)({},S),{},Object(g.a)({},n,o)))},lt=function(e){var t="";switch(e){case"sq1Question":t="First security question";break;case"sq1Answer":t="First answer";break;case"sq1AnswerConfirmed":t="Confirm first answer";break;case"sq2Question":t="Second security question";break;case"sq2Answer":t="Second answer";break;case"sq2AnswerConfirmed":t="Confirm second answer";break;case"sq3Question":t="Third security question";break;case"sq3Answer":t="Third answer";break;case"sq3AnswerConfirmed":t="Confirm third answer";break;default:t=e}return t},dt=function(e){return/^[a-zA-Z0-9]{1}[a-zA-Z0-9 ]*[a-zA-Z0-9]{1}£/.test(e)},pt=function(e){return"/[!@#£%^&*()_+-=[]{};':\"\\|,.<>/?]+/;".split("").some((function(t){return e.includes(t)}))};Object(o.useEffect)((function(){var e;te("login","securityquestionssetup"),null===r||void 0===r||null===(e=r.current)||void 0===e||e.focus()}),[]),Object(o.useEffect)((function(){(S.sq2Question.length||S.sq3Question.length)&&R(b.filter((function(e){return e.value!=S.sq2Question&&e.value!=S.sq3Question}))),(S.sq1Question.length||S.sq3Question.length)&&D(b.filter((function(e){return e.value!=S.sq1Question&&e.value!=S.sq3Question}))),S.sq1Question.length&&M(b.filter((function(e){return e.value!=S.sq1Question&&e.value!=S.sq2Question})))}),[S]),Object(o.useEffect)((function(){S.sq1Question&&U(!0),S.sq2Question&&ue(!0),S.sq3Question&&Oe(!0)}),[S]),Object(o.useEffect)((function(){var e;ot&&(null===n||void 0===n||null===(e=n.current)||void 0===e||e.focus())}),[ot]),Object(o.useEffect)((function(){return Xe.length>1&&rt(!0),function(){rt(!1)}}),Array([Xe]));return Object(d.jsx)(o.Fragment,{children:Object(d.jsxs)(h,{handleSubmit:function(e){e.preventDefault();var n=[];U(!0),Ye(""),V(!0),ee(""),Y(!0),ie(""),ue(!0),he(!0),we(""),ye(!0),Ie(""),Oe(!0),Le(!0),He(""),qe(!0),Ve("");var o,r=!0;if(0===S.sq1Question.length&&(U(!1),Ye(t.fieldLevelErrors.selectquestion),r=!1,n=["sq1Question"].concat(Object(gc.a)(n))),0===S.sq1Answer.length?(V(!1),ee(t.fieldLevelErrors.enterValidAns),r=!1,n=["sq1Answer"].concat(Object(gc.a)(n))):dt(S.sq1Answer)||(V(!1),1===S.sq1Answer.length?(r=!1,n=["sq1Answer"].concat(Object(gc.a)(n)),ee(t.fieldLevelErrors.singleChar)):S.sq1Answer.indexOf(" ")>=0&&!pt(S.sq1Answer)?(r=!1,n=["sq1Answer"].concat(Object(gc.a)(n)),ee(t.fieldLevelErrors.noBeginOrEndSpaces)):(r=!1,n=["sq1Answer"].concat(Object(gc.a)(n)),ee(t.fieldLevelErrors.answerWithSplCharOrSpace))),0===S.sq1AnswerConfirmed.length?(Y(!1),ie(t.fieldLevelErrors.enterValidAns),r=!1,n=["sq1AnswerConfirmed"].concat(Object(gc.a)(n))):dt(S.sq1AnswerConfirmed)||(Y(!1),1===S.sq1AnswerConfirmed.length?(r=!1,n=["sq1AnswerConfirmed"].concat(Object(gc.a)(n)),ie(t.fieldLevelErrors.singleChar)):S.sq1AnswerConfirmed.indexOf(" ")>=0&&!pt(S.sq1AnswerConfirmed)?(r=!1,n=["sq1AnswerConfirmed"].concat(Object(gc.a)(n)),ie(t.fieldLevelErrors.noBeginOrEndSpaces)):(r=!1,n=["sq1AnswerConfirmed"].concat(Object(gc.a)(n)),ie(t.fieldLevelErrors.answerWithSplCharOrSpace))),S.sq1Answer.length>0&&S.sq1AnswerConfirmed.length>0&&S.sq1Answer.toLowerCase()!==S.sq1AnswerConfirmed.toLowerCase()&&(Y(!1),ie(t.fieldLevelErrors.ansmismatch),r=!1,n=["sq1AnswerConfirmed"].concat(Object(gc.a)(n))),0===S.sq2Question.length&&(ue(!1),Ye(t.fieldLevelErrors.selectquestion),r=!1,n=["sq2Question"].concat(Object(gc.a)(n))),0===S.sq2Answer.length?(he(!1),we(t.fieldLevelErrors.enterValidAns),r=!1,n=["sq2Answer"].concat(Object(gc.a)(n))):dt(S.sq2Answer)||(he(!1),1===S.sq2Answer.length?(n=["sq2Answer"].concat(Object(gc.a)(n)),r=!1,we(t.fieldLevelErrors.singleChar)):S.sq2Answer.indexOf(" ")>=0&&!pt(S.sq2Answer)?(r=!1,n=["sq2Answer"].concat(Object(gc.a)(n)),we(t.fieldLevelErrors.noBeginOrEndSpaces)):(n=["sq2Answer"].concat(Object(gc.a)(n)),r=!1,we(t.fieldLevelErrors.answerWithSplCharOrSpace))),0!==S.sq1Answer.length&&0!==S.sq2Answer.length&&S.sq1Answer.toLowerCase()===S.sq2Answer.toLowerCase()&&(he(!1),we(t.fieldLevelErrors.multipleSameAns),r=!1,n=["sq2Answer"].concat(Object(gc.a)(n)),0!==S.sq2Answer.length&&0!==S.sq2AnswerConfirmed.length&&S.sq2Answer.toLowerCase()===S.sq2AnswerConfirmed.toLowerCase()&&(ye(!1),Ie(t.fieldLevelErrors.multipleSameAns),r=!1,n=["sq2AnswerConfirmed"].concat(Object(gc.a)(n)))),0!==S.sq1AnswerConfirmed.length&&0!==S.sq2AnswerConfirmed.length&&S.sq1AnswerConfirmed.toLowerCase()===S.sq2AnswerConfirmed.toLowerCase()&&(0!==S.sq2Answer.length&&0!==S.sq2AnswerConfirmed.length&&S.sq2Answer.toLowerCase()===S.sq2AnswerConfirmed.toLowerCase()&&(r=!1,n=["sq2Answer"].concat(Object(gc.a)(n)),he(!1),we(t.fieldLevelErrors.multipleSameAns)),S.sq2AnswerConfirmed.length>0&&(ye(!1),Ie(t.fieldLevelErrors.multipleSameAns),r=!1,n=["sq2AnswerConfirmed"].concat(Object(gc.a)(n)))),0===S.sq2AnswerConfirmed.length?(ye(!1),Ie(t.fieldLevelErrors.enterValidAns),r=!1,n=["sq2AnswerConfirmed"].concat(Object(gc.a)(n))):dt(S.sq2AnswerConfirmed)||(ye(!1),1===S.sq2AnswerConfirmed.length?(r=!1,n=["sq2AnswerConfirmed"].concat(Object(gc.a)(n)),Ie(t.fieldLevelErrors.singleChar)):S.sq2AnswerConfirmed.indexOf(" ")>=0&&!pt(S.sq2AnswerConfirmed)?(r=!1,n=["sq2AnswerConfirmed"].concat(Object(gc.a)(n)),Ie(t.fieldLevelErrors.noBeginOrEndSpaces)):(r=!1,n=["sq2AnswerConfirmed"].concat(Object(gc.a)(n)),Ie(t.fieldLevelErrors.answerWithSplCharOrSpace))),S.sq2Answer.length>0&&S.sq2AnswerConfirmed.length>0&&S.sq2Answer.toLowerCase()!==S.sq2AnswerConfirmed.toLowerCase()&&(ye(!1),Ie(t.fieldLevelErrors.ansmismatch),r=!1,n=["sq2AnswerConfirmed"].concat(Object(gc.a)(n))),0===S.sq3Question.length&&(Oe(!1),Ye(t.fieldLevelErrors.selectquestion),n=["sq3Question"].concat(Object(gc.a)(n))),0===S.sq3Answer.length?(Le(!1),He(t.fieldLevelErrors.enterValidAns),r=!1,n=["sq3Answer"].concat(Object(gc.a)(n))):dt(S.sq3Answer)||(Le(!1),1===S.sq3Answer.length?(r=!1,n=["sq3Answer"].concat(Object(gc.a)(n)),He(t.fieldLevelErrors.singleChar)):S.sq3Answer.indexOf(" ")>=0&&!pt(S.sq3Answer)?(r=!1,n=["sq3Answer"].concat(Object(gc.a)(n)),He(t.fieldLevelErrors.noBeginOrEndSpaces)):(r=!1,n=["sq3Answer"].concat(Object(gc.a)(n)),He(t.fieldLevelErrors.answerWithSplCharOrSpace))),0!==S.sq1Answer.length&&0!==S.sq3Answer.length&&S.sq1Answer.toLowerCase()===S.sq3Answer.toLowerCase()&&(Le(!1),He(t.fieldLevelErrors.multipleSameAns),r=!1,n=["sq3Answer"].concat(Object(gc.a)(n)),0!==S.sq3Answer.length&&0!==S.sq3AnswerConfirmed.length&&S.sq3Answer.toLowerCase()===S.sq3AnswerConfirmed.toLowerCase()&&(qe(!1),Ve(t.fieldLevelErrors.multipleSameAns),r=!1,n=["sq3AnswerConfirmed"].concat(Object(gc.a)(n)))),(0!==S.sq2AnswerConfirmed.length&&0!==S.sq3AnswerConfirmed.length&&S.sq1AnswerConfirmed.toLowerCase()===S.sq3AnswerConfirmed.toLowerCase()||S.sq2AnswerConfirmed.toLowerCase()===S.sq3AnswerConfirmed.toLowerCase())&&(0!==S.sq3Answer.length&&0!==S.sq3AnswerConfirmed.length&&S.sq3Answer.toLowerCase()===S.sq3AnswerConfirmed.toLowerCase()&&(Le(!1),He(t.fieldLevelErrors.multipleSameAns),r=!1,n=["sq3Answer"].concat(Object(gc.a)(n))),S.sq3AnswerConfirmed.length>0&&(qe(!1),Ve(t.fieldLevelErrors.multipleSameAns),r=!1,n=["sq3AnswerConfirmed"].concat(Object(gc.a)(n)))),0===S.sq3AnswerConfirmed.length?(qe(!1),Ve(t.fieldLevelErrors.enterValidAns),r=!1,n=["sq3AnswerConfirmed"].concat(Object(gc.a)(n))):dt(S.sq3AnswerConfirmed)||(qe(!1),1===S.sq3AnswerConfirmed.length?(r=!1,n=["sq3AnswerConfirmed"].concat(Object(gc.a)(n)),Ve(t.fieldLevelErrors.singleChar)):S.sq3AnswerConfirmed.indexOf(" ")>=0&&!pt(S.sq3AnswerConfirmed)?(r=!1,n=["sq3AnswerConfirmed"].concat(Object(gc.a)(n)),Ve(t.fieldLevelErrors.noBeginOrEndSpaces)):(r=!1,n=["sq3AnswerConfirmed"].concat(Object(gc.a)(n)),Ve(t.fieldLevelErrors.answerWithSplCharOrSpace))),S.sq3Answer.length>0&&S.sq3AnswerConfirmed.length>0&&S.sq3Answer.toLowerCase()!==S.sq3AnswerConfirmed.toLowerCase()&&(qe(!1),Ve(t.fieldLevelErrors.ansmismatch),r=!1,n=["sq3AnswerConfirmed"].concat(Object(gc.a)(n))),!r)return o=n.sort((function(e,t){return e.itemM>t.itemM?1:-1})).filter((function(e,t){return n.indexOf(e)===t})),et([]),void o.map((function(e){return et((function(t){return[].concat(Object(gc.a)(t),[{ariaLabel:"Enter a valid ".concat(lt(e),"."),inputID:e,text:lt(e)}])})),null}));ct(!0);var i={};i.i1=S.sq1Question,i.q1=Object.values(E).find((function(e){return e.value==S.sq1Question})).label,i.a1=S.sq1Answer,i.i2=S.sq2Question,i.q2=Object.values(T).find((function(e){return e.value==S.sq2Question})).label,i.a2=S.sq2Answer,i.i3=S.sq3Question,i.q3=Object.values(j).find((function(e){return e.value==S.sq3Question})).label,i.a3=S.sq3Answer;var s=window.com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest(i);u(s),ct(!1)},children:[Object(d.jsx)("h2",{className:"centered tile-header","data-testid":"header",ref:r,tabIndex:-1,children:"Set up your security questions and answers."}),Object(d.jsxs)("ul",{children:[Object(d.jsx)("li",{className:"text-style-body-4",children:"Choose three different questions."}),Object(d.jsx)("li",{className:"text-style-body-4",children:"Provide a unique answer for each question \u2014 no repeats or special characters."}),Object(d.jsx)("li",{className:"text-style-body-4",children:"Confirm your answers. (Answers are not case-sensitive.)"})]}),ot&&Object(d.jsx)(l.ErrorSummary,{errors:Xe,ref:n}),Object(d.jsx)(l.Tile,{children:Object(d.jsxs)(l.Stack,{verticalSpacing:"90",children:[Object(d.jsx)("p",{className:"text-style-body-4-italic",children:"All fields are required."}),Object(d.jsxs)(l.Stack,{children:[Object(d.jsx)(l.Select,{inputId:"sq1Question",label:"First security question",name:"sq1Question",options:[{label:"Select a question",value:""}].concat(Object(gc.a)(E)),handleOnChange:ut,value:S.sq1Question,isValid:N,errorMessages:[Je],dataTestId:"select_sq1",isRequired:!0}),Object(d.jsx)(l.TextInput,{inputId:"sq1Answer",label:"First answer",name:"sq1Answer",autoComplete:"off",initialValue:S.sq1Answer,handleOnChange:ut,isValid:z,errorMessages:[X],dataTestId:"input1",isRequired:!0}),Object(d.jsx)(l.TextInput,{inputId:"sq1AnswerConfirmed",label:"Confirm first answer",name:"sq1AnswerConfirmed",autoComplete:"off",initialValue:S.sq1AnswerConfirmed,handleOnChange:ut,isValid:J,errorMessages:[re],dataTestId:"input2",isRequired:!0})]}),Object(d.jsxs)(l.Stack,{children:[Object(d.jsx)(l.Select,{inputId:"sq2Question",label:"Second security question",name:"sq2Question",options:[{label:"Select a question",value:""}].concat(Object(gc.a)(T)),handleOnChange:ut,value:S.sq2Question,isValid:ce,errorMessages:[Je],dataTestId:"select_sq2",isRequired:!0}),Object(d.jsx)(l.TextInput,{inputId:"sq2Answer",label:"Second answer",name:"sq2Answer",autoComplete:"off",initialValue:S.sq2Answer,handleOnChange:ut,isValid:pe,errorMessages:[_e],dataTestId:"input3",isRequired:!0}),Object(d.jsx)(l.TextInput,{inputId:"sq2AnswerConfirmed",label:"Confirm second answer",name:"sq2AnswerConfirmed",autoComplete:"off",initialValue:S.sq2AnswerConfirmed,handleOnChange:ut,isValid:ge,errorMessages:[Ce],dataTestId:"input4",isRequired:!0})]}),Object(d.jsxs)(l.Stack,{children:[Object(d.jsx)(l.Select,{inputId:"sq3Question",label:"Third security question",name:"sq3Question",options:[{label:"Select a question",value:""}].concat(Object(gc.a)(j)),handleOnChange:ut,value:S.sq3Question,isValid:Pe,errorMessages:[Je],dataTestId:"select_sq3",isRequired:!0}),Object(d.jsx)(l.TextInput,{inputId:"sq3Answer",label:"Third answer",name:"sq3Answer",autoComplete:"off",initialValue:S.sq3Answer,handleOnChange:ut,isValid:De,errorMessages:[Ue],dataTestId:"input5",isRequired:!0}),Object(d.jsx)(l.TextInput,{inputId:"sq3AnswerConfirmed",label:"Confirm third answer",name:"sq3AnswerConfirmed",autoComplete:"off",initialValue:S.sq3AnswerConfirmed,handleOnChange:ut,isValid:Me,errorMessages:[ze],dataTestId:"input6",isRequired:!0})]}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Continue",size:"large",type:"submit",isLoading:at,isDisabled:at,isFullWidth:!0,dataTestId:"continue_button"}),Object(d.jsx)(l.Button,{clickMethod:function(e){return function(e){e.preventDefault(),!1===p&&f({type:v,key:O,value:""});var t=window.com.ts.mobile.sdk.FormInput.createFormCancellationRequest();u(t),window.location.href=window.location.href}(e)},variant:"text-primary",text:"Cancel",type:"button",dataTestId:"cancel_button"})]})]})})]})})};kc.defaultProps={initialValues:[{sq1Question:"",sq1Answer:"",sq1AnswerConfirmed:"",sq2Question:"",sq2Answer:"",sq2AnswerConfirmed:"",sq3Question:"",sq3Answer:"",sq3AnswerConfirmed:""}]};var Cc=kc,Ic=function(){var e=Object(o.useRef)(null),t=K(),n=t.authState.LockoutType,i=t.authDispatch,s=Object(o.useState)(!1),c=Object(a.a)(s,2),u=c[0],p=c[1],f=fe(null,null,"errorContent");f=f.lockoutStep;var g=!0,y="",b=n.IsOTPLockout?(y=f.badOTC.cta.text,"badOTC"):n.IsPasswordLockout?(y=f.badCreds.cta.text,"badCreds"):n.IsFIDisabled?(y=f.fiDisabled.cta.text,g=!1,"fiDisabled"):n.IsFPLockout?(y=f.badFPData.cta.text,g=!1,"badFPData"):n.isAccountInactive?"accountInactive":n.IsPasswordExpired?(y=f.passwordExpired.cta.text,g=!0,"passwordExpired"):"";return Object(o.useEffect)((function(){if(te("login","accountlocked"),i({type:S}),n.isAccountInactive||n.IsPasswordExpired)null===e||void 0===e||e.current.focus();else if(null!==document.getElementsByClassName("auth-heading__description")){var t;null===(t=document.getElementsByClassName("auth-heading__description")[0])||void 0===t||t.focus()}}),[]),Object(d.jsxs)(h,{handleSubmit:function(){p(!0),""!==b&&(window.location.href=window.location.href.replace("/signin","/password-reset"))},children:[!g&&Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsx)(l.Stack,{verticalSpacing:"70",children:Object(d.jsx)("p",{dangerouslySetInnerHTML:{__html:f[b].prompt}})})}),g&&Object(d.jsx)(r.a.Fragment,{children:Object(d.jsxs)("div",{className:"centered",children:[Object(d.jsxs)("p",{id:"resetpassword-desc",children:["badCreds"===b&&f.badCreds.prompt,"badOTC"===b&&f.badOTC.prompt]}),"accountInactive"===b&&Object(d.jsx)("h2",{className:"tile-header",ref:e,tabIndex:-1,children:f.accountNotActive.prompt}),"passwordExpired"===b&&Object(d.jsx)("h2",{className:"tile-header",id:"resetpassword-desc",ref:e,tabIndex:-1,children:f.passwordExpired.prompt})]})}),g&&Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsxs)("div",{className:"centered",children:[Object(d.jsxs)("p",{children:["badCreds"===b&&""!==f.badCreds.subprompt&&f.badCreds.subprompt,"badOTC"===b&&""!==f.badOTC.subprompt&&f.badOTC.subprompt,"badFPData"===b&&""!==f.badFPData.subprompt&&f.badFPData.subprompt,"passwordExpired"===b&&""!==f.passwordExpired.subprompt&&f.passwordExpired.subprompt]}),"accountInactive"===b&&Object(d.jsx)("p",{className:"centered",dangerouslySetInnerHTML:{__html:f.accountNotActive.subprompt}}),Object(d.jsx)("br",{}),Object(d.jsxs)("p",{children:["badCreds"===b&&f.badCreds.note,"badOTC"===b&&f.badOTC.note,"badFPData"===b&&f.badFPData.note,"passwordExpired"===b&&f.passwordExpired.note]})]}),"accountInactive"!==b&&Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",ariaLabel:y,"aria-describedby":"resetpassword-desc",text:y,size:"large",type:"submit",isLoading:u,loadingText:"Loading",isDisabled:u,isFullWidth:!0}),Object(d.jsx)(l.Button,{clickMethod:function(e){return function(e){e.preventDefault(),window.location.href=window.location.href}(e)},variant:"text-primary",text:"Cancel",type:"button"})]})]})})]})},Ec=function(e,t){try{var n=function(){t({type:H.SelfServiceError})},o=Object(Ee.a)(),r=window.com.ts.mobile.sdk.SDKConnectionSettings.create(X.Transmit.Endpoint,X.Transmit.AppId,X.Transmit.ApiTokenId,"");o.setConnectionSettings(r);var i=new ic(t);i.setLogEnabled(!1),o.setUiHandler(i),o.setExternalLogger(new function(){this.log=function(e,t,n){if(e===X.Transmit.LogLevel){var o="Forgot Username journey :: Level: ".concat(e," Category: ").concat(t," Message: ").concat(n);tc.ErrorMessage(o)}}}),o.setEnabledCollectors([window.com.ts.mobile.sdk.CollectorType.DeviceDetails]),o.setUiAssetsDownloadMode(window.com.ts.mobile.sdk.UIAssetsDownloadMode.Disable),o.initialize().then((function(){})).catch((function(e){var n="Forgot Username journey :: Message: ".concat(e);tc.ErrorMessageWithObject("Exception from SDK initialize call",n),t({type:S,isSystemUnavailable:!0}),t({type:H.GenericError})}));var s=new URLSearchParams(document.location.search),a=s.get(X.ChannelQueryKey),c=s.get(X.ProductQueryKey),u=s.get(X.AppIdQueryKey),l=Object(y.a)(Object(y.a)({},Object.fromEntries(s)),{},{tmxid:sessionId,email:e.UserInput.EmailId,phone:e.UserInput.MobileNumber,channel:a,product:c,appId:u}),d=s.get(X.OlbEnvironments);d&&(l.Env=d),("true"===s.get("IsLocalHost")||X.Transmit.IsLocalHost)&&(l.IsLocalHost=!0);var p={uiContainer:document.getElementById("transmitContainer")};t({type:C,policyId:X.Transmit.RecoverUserIdPolicyId}),o.invokeAnonymousPolicyWithOptions(X.Transmit.RecoverUserIdPolicyId,l,p).then((function(e){var n;tc.InfoMessageWithObject("ProcessAuth controller response",e),o.logout();var r=null===(n=document.getElementById("hdnRelyingParty"))||void 0===n?void 0:n.value;t(void 0!==r&&""!==r?{type:H.RetreiveUsernameSucces}:{type:H.UserName})})).catch((function(){var e,o,r,i,s,a,c,u,l,d,p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h="Forgot Username journey :: Message: ".concat(p);tc.ErrorMessageWithObject("Exception from SDK invokeAnonymousPolicyWithOptions call",h),t({type:R});var f="",m=["User cancelled a form action.","Authentication cancelled due to abort control request."],g=p._message;if("locked"===(null===(e=p._data)||void 0===e||null===(o=e.failure_data)||void 0===o||null===(r=o.reason)||void 0===r?void 0:r.type)&&"user"===(null===(i=p._data.failure_data.reason)||void 0===i||null===(s=i.data)||void 0===s?void 0:s.lock_type)&&"otp"===(null===(a=p._data.failure_data.source)||void 0===a?void 0:a.method))f="012TS401";else if("assertion_rejected"===(null===(c=p._data)||void 0===c||null===(u=c.failure_data)||void 0===u||null===(l=u.reason)||void 0===l?void 0:l.type)){var y,b,v,_;f=null===(y=p._data)||void 0===y||null===(b=y.failure_data)||void 0===b||null===(v=b.reason)||void 0===v||null===(_=v.data)||void 0===_?void 0:_.errorCode}else f=p._message&&m.indexOf(g)>-1?"UserCancelled":p._message&&p._message.indexOf("session expired")>-1&&4002===(null===(d=p._data)||void 0===d?void 0:d.server_error_code)?"4002":"default";switch(t({type:S,IsRecoverUserStepError:!0}),f){case"009TS401":case"014TS401":case"015TS401":t({type:E,errorMessage:"notOnFile-RU"}),n();break;case"010TS401":case"012TS401":t({type:E,errorMessage:"lockedFromSelfService"}),n();break;case"011TS401":t({type:E,errorMessage:"accountNotActiveForSelfService"}),n();break;case"013TS401":case"4000":t({type:E,errorMessage:"tmxRejectForSelfService"}),n();break;case"4002":sessionStorage.setItem("STO",!0),t({type:H.UserName});break;case"016TS401":case"002TS401":t({type:E,errorMessage:"noTargetsInRCIF"}),n();break;case"003TS401":t({type:S,isRCIFDown:!0}),t({type:H.GenericError});break;case"targetsExhausted":case"UserCancelled":t({type:E}),t({type:H.UserName});break;default:t({type:S,isDefaultError:!0}),t({type:H.GenericError})}}))}catch(f){t({type:R});var h="Message: ".concat(f);tc.ErrorMessageWithObject("Forgot Username journey failed",h),t({type:S,isSystemUnavailable:!0}),t({type:H.GenericError})}},Rc=(n(154),function(){var e=K(),t=e.authState,n=e.authDispatch,i=Object(o.useRef)(null),s=Object(o.useRef)(null),c=Object(o.useRef)(null),u=Object(o.useRef)(null),p=Object(o.useState)(""),f=Object(a.a)(p,2),g=f[0],y=f[1],b=Object(o.useState)(""),_=Object(a.a)(b,2),w=_[0],A=_[1],k=Object(o.useState)(!0),C=Object(a.a)(k,2),E=C[0],P=C[1],x=Object(o.useState)(""),L=Object(a.a)(x,2),F=L[0],j=L[1],M=Object(o.useState)(!0),q=Object(a.a)(M,2),B=q[0],N=q[1],U=Object(o.useState)(""),W=Object(a.a)(U,2),z=W[0],V=W[1],Q=Object(o.useState)(!1),G=Object(a.a)(Q,2),J=G[0],Y=G[1],Z=Object(o.useState)(!0),£=Object(a.a)(Z,2),X=£[0],ee=£[1],ne=function(e,t){n({type:v,key:e,value:t})},oe=[{handleOnChange:function(e){return y(e.target.value)},inputId:"by-phone",isChecked:"By phone"===g,label:"Phone number",value:"By phone",dataTestId:"contact_option_phone"},{handleOnChange:function(e){return y(e.target.value)},inputId:"by-email",isChecked:"By email"===g,label:"Email address",value:"By email",dataTestId:"contact_option_email"}];return Object(o.useEffect)((function(){var e;te("retrieveusername","verifybyphoneoremail"),ne(O,""),null===u||void 0===u||null===(e=u.current)||void 0===e||e.focus(),n({type:I,isForgotPassword:!1,isForgotUsername:!0,isFormPassword:!1})}),[]),Object(d.jsx)(h,{handleSubmit:function(){if(Y(!0),n({type:S}),""===g)return null!=document.getElementsByClassName("form-control__legend")&&null!=document.getElementsByClassName("form-control__legend")[0]&&document.getElementsByClassName("form-control__legend")[0].focus(),V(Ae.retrieveUsername.fieldLevelErrors.ContactMethodError),Y(!1),void ee(!1);"By phone"===g&&(function(e){var t=e?e.replace(/[^0-9+ ]/g,""):e,n=/[^\d|\s|\-|.|+|(|)]/g.test(t),o=/[\d]{3}(\s|-|\.)[\d]{3}(\s|-|\.)[\d]{1,4}/g.test(t),r=/\([\d]{3}\)(\s|-)[\d]{3}-[\d]{1,4}/g.test(t),i=/\([\d]{3}\)[\d]{3}-[\d]{1,4}/g.test(t),s=10!==t.length&&!o&&!r&&!i,a=/\+([2-9]|0)/g.test(t);return 0===t.length||n||o&&12!==t.length||r&&14!==t.length||i&&13!==t.length||s&&!a}(F)?(V(""),N(!1),Y(!1),ee(!0),null===s||void 0===s||s.current.focus()):(Ec(t,n),Y(!1)));"By email"===g&&(String(w).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))£/)?(Ec(t,n),Y(!1)):(V(""),P(!1),Y(!1),ee(!0),null===i||void 0===i||i.current.focus()))},children:Object(d.jsx)(l.Container,{verticalSpacing:"70",children:Object(d.jsx)("div",{className:"content-wrapper",children:Object(d.jsx)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:Object(d.jsxs)("div",{style:{width:"100%"},children:[Object(d.jsx)("h2",{className:"centered tile-header",ref:u,tabIndex:-1,children:"To confirm your account, we\u2019ll ask you for some identifying information."}),Object(d.jsx)("br",{}),z&&Object(d.jsx)("p",{className:"auth-heading__error centered",id:"auth-heading-error",ref:c,tabIndex:-1}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",children:[Object(d.jsxs)(r.a.Fragment,{children:[Object(d.jsx)(l.RadioGroup,{groupFormControlId:"contact_method_radio_group",classes:"radio--horizontal",legendLabel:"Would you prefer to start with a phone number associated with your account or an email address?",radioItems:oe,isValid:X,name:"contact-options",size:"small",errorMessages:[z],onClick:function(){V(""),ee(!0)}}),"By phone"===g&&Object(d.jsx)(o.Fragment,{children:Object(d.jsx)(l.PhoneInput,{label:"Mobile phone number",autoComplete:"off",errorMessages:[Ae.retrieveUsername.fieldLevelErrors.PhoneError],isValid:B,initialValue:F,handleOnChange:function(e){n({type:R}),j(e.target.value.trim().replace(/[^0-9]/g,"")),ne(D,e.target.value.trim().replace(/[^0-9]/g,""))},dataTestId:"phone_input",ref:s,isRequired:!0})}),"By email"===g&&Object(d.jsx)(l.EmailInput,{label:"Email address",autoComplete:"off",errorMessages:[Ae.retrieveUsername.fieldLevelErrors.EmailError],initialValue:w,isValid:E,handleOnChange:function(e){n({type:R}),A(e.target.value.trim()),ne(T,e.target.value.trim())},dataTestId:"email_input",ref:i,isRequired:!0})]}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Continue",size:"large",type:"submit",loadingText:"Loading",isLoading:J,isDisabled:J,dataTestId:"submit_button",isFullWidth:!0}),Object(d.jsx)(l.Button,{clickMethod:function(e){return function(e){e.preventDefault(),n({type:H.UserName}),!1===t.UserInput.RememberUsername&&ne(O,"")}(e)},variant:"text-primary",text:"Cancel",type:"button",dataTestId:"cancel_button"})]})]})})]})})})})})}),Pc=function(){var e=Ae.setupSecurityQuestionSuccess,t=Object(o.useRef)(null),n=K().authState.TransmitEvents.resolve,r=function(e){e.preventDefault();var t=window.com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({response:"Continue"});n(t)};return Object(o.useEffect)((function(){var e;te("login","setupsecurityquestionssuccess"),null===t||void 0===t||null===(e=t.current)||void 0===e||e.focus()}),[]),Object(d.jsx)(h,{handleSubmit:r,children:Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsx)("div",{className:"centered",children:Object(d.jsx)("h2",{className:"tile-header",ref:t,tabIndex:-1,children:e.fieldLevelErrors.successMsg})}),Object(d.jsx)(m,{children:Object(d.jsx)(l.Button,{clickMethod:function(e){return r(e)},variant:"primary",text:"Continue",size:"large",type:"submit",isFullWidth:!0,ariaLabel:"Continue: Navigate to your destination."})})]})})})},Oc=function(){var e=Object(o.useRef)(null),t=Object(c.d)(),n=K().authState.ErrorType,r=!1,i=fe(null,null,"errorContent");i=i.genericError;var s=function(){var e="";switch(!0){case n.IsDefaultError:e="defaultError";break;case n.IsSystemUnavailable:e="systemUnavailable";break;case n.IsDownTimeMode:e="downTimeMode";break;case n.IsMaintenanceEnabled:e="maintenanceEnabled",r=!0;break;case n.IsTMXReject:e="tmxReject";break;case n.IsStepupInsufficient:e="stepupInsufficient";break;case n.IsRCIFDown:e="rcifDown";break;case n.IsGenericIError:e="genericIError";break;case n.IsGenericUError:e="genericUError";break;case n.IsGenericTError:e="genericTError";break;default:e="defaultError"}return e}();Object(o.useEffect)((function(){var t;te("login",s.toLowerCase()),null===e||void 0===e||null===(t=e.current)||void 0===t||t.focus()}),[]);return Object(d.jsx)(o.Fragment,{children:Object(d.jsxs)(l.Stack,{style:{marginTop:"-2.15rem"},children:[Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsx)(re,{heading:i[s].heading,description:i[s].description}),""!==i[s].prompt&&Object(d.jsx)("h2",{className:"centered tile-header",style:{marginBottom:"1rem"},ref:e,tabIndex:-1,children:i[s].prompt})]}),i[s].subprompt&&Object(d.jsxs)("form",{className:"form",children:[Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsx)("div",{className:"centered",children:""!==i[s].prompt?Object(d.jsx)("p",{dangerouslySetInnerHTML:{__html:i[s].subprompt}}):Object(d.jsx)("h2",{className:"tile-header",ref:e,tabIndex:-1,dangerouslySetInnerHTML:{__html:i[s].subprompt}})}),r&&Object(d.jsx)(m,{children:Object(d.jsx)(l.Button,{clickMethod:function(e){return function(e){e.preventDefault(),t(ee.Rdc.DefaultUrl,{replace:!0})}(e)},variant:"primary",text:"Go to Barclays.com",type:"button"})})]})}),Object(d.jsx)("p",{className:"text-style-body-3",style:{width:"100% !important"},dangerouslySetInnerHTML:{__html:i[s].note}})]})]})})},xc=function(){var e=Object(o.useState)(!1),t=Object(a.a)(e,2),n=t[0],r=t[1],i=K().authState,s=i.AuthStep,c=i.TransmitEvents.resolve,u=fe(s,null);u=u.lockoutStep;var p="badSecurityQuestion";return Object(o.useEffect)((function(){te("login","ialocked")}),[]),Object(d.jsx)(h,{handleSubmit:function(){r(!0);var e=window.com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({response:"Continue"});c(e)},children:Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsxs)("div",{className:"centered",children:[Object(d.jsx)("p",{children:Object(d.jsx)("strong",{children:u[p].prompt})}),Object(d.jsx)("br",{}),Object(d.jsx)("p",{children:""!==u[p].subprompt&&u[p].subprompt})," "]}),Object(d.jsx)(m,{children:Object(d.jsx)(l.Button,{variant:"primary",text:u[p].cta.text,size:"large",type:"submit",isLoading:n,loadingText:"Loading",isDisabled:n,isFullWidth:!0})})]})})})},Tc=fe(null,null,"dynamic-username-prompt").prefix,Dc=function(){var e=Ae.mustChangePassword,t=Object(o.useRef)(null),n=Object(o.useRef)(null),r=K(),i=r.authState,s=i.UserInput,c=s.Username,u=s.RememberUsername,p=i.MustChangePassword,f=i.TransmitEvents.resolve,b=r.authDispatch,_=Object(o.useRef)(null),w=Object(o.useRef)(null),A=Object(o.useRef)(null),k=Object(o.useState)(!0),C=Object(a.a)(k,2),I=C[0],E=C[1],R=Object(o.useState)(!0),P=Object(a.a)(R,2),x=P[0],T=P[1],D=Object(o.useState)(!0),L=Object(a.a)(D,2),F=L[0],j=L[1],M=Object(o.useState)(!1),q=Object(a.a)(M,2),B=q[0],N=q[1],U=Object(o.useState)(!0),W=Object(a.a)(U,2),z=W[0],V=W[1],Q=Object(o.useState)(""),G=Object(a.a)(Q,2),J=G[0],Y=G[1],Z=Object(o.useState)(""),£=Object(a.a)(Z,2),X=£[0],ee=£[1],ne=Object(o.useState)(""),oe=Object(a.a)(ne,2),re=oe[0],ie=oe[1],se=Object(o.useState)(!1),ae=Object(a.a)(se,2),ce=ae[0],ue=ae[1],le=Object(o.useState)([]),de=Object(a.a)(le,2),pe=de[0],he=de[1],fe=Object(o.useState)({tempPassword:"",newPassword:"",confirmNewPassword:""}),me=Object(a.a)(fe,2),ge=me[0],ye=me[1],be=!0,ve=!0,_e=!0,we=function(e){return/^(?=[A-Za-z0-9-.`,#@:?!()£/']+£)(?=.*\d)(?=.*\W+)(?=.*[a-z])(?=.*[A-Z]).{8,32}£/.test(e)},Se=function(e){var t="";switch(e){case"tempPassword":t="Temporary password";break;case"newPassword":t="New password";break;case"confirmNewPassword":t="Confirm new password";break;default:t=yc(e)}return t},ke=function(e){var t=e.target.value;ye(Object(y.a)(Object(y.a)({},ge),{},Object(g.a)({},e.target.name,t)))};return Object(o.useEffect)((function(){var t;(te("login","entermustchangepassword"),!1===z||""!==p.message)&&(N(!1),Y(e.fieldLevelErrors.tempPasswordBlankOrInvalid),T(!1),null===w||void 0===w||null===(t=w.current)||void 0===t||t.focus())}),[p]),Object(o.useEffect)((function(){b({type:S}),t.current.focus()}),[]),Object(o.useEffect)((function(){return pe.length>1&&ue(!0),function(){ue(!1)}}),[pe]),Object(o.useEffect)((function(){var e;ce&&(null===n||void 0===n||null===(e=n.current)||void 0===e||e.focus())}),[ce,pe]),Object(o.useEffect)((function(){var e;ce?null===n||void 0===n||null===(e=n.current)||void 0===e||e.focus():1===pe.length&&("tempPassword"===pe[0].inputID?null===w||void 0===w||w.current.focus():"newPassword"===pe[0].inputID?null===_||void 0===_||_.current.focus():"confirmNewPassword"===pe[0].inputID&&(null===A||void 0===A||A.current.focus()))}),[ce,pe]),Object(d.jsxs)(h,{handleSubmit:function(t){if(T(!0),E(!0),j(!0),he([]),Object.keys(ge).forEach((function(t){"tempPassword"===t?0===ge[t].length&&(be=!1,T(!1),Y(e.fieldLevelErrors.tempPasswordBlankOrInvalid)):"newPassword"===t?0!==ge[t].length&&we(ge[t])||(ve=!1,E(!1),ee(e.fieldLevelErrors.newPasswordBlankOrInvalid)):"confirmNewPassword"===t&&(0!==ge[t].length&&we(ge[t])?ve&&ge.newPassword!==ge[t]&&(_e=!1,ie(e.fieldLevelErrors.passwordMisMatch),j(!1)):(_e=!1,j(!1),ie(e.fieldLevelErrors.confirmNewPasswordBlank)))})),!be||!ve||!_e)return he([]),Object.keys(ge).map((function(e){return("tempPassword"===e&&!be||"newPassword"===e&&!ve||"confirmNewPassword"===e&&!_e)&&he((function(t){return[].concat(Object(gc.a)(t),[{ariaLabel:"Enter a valid ".concat(yc(e),"."),inputID:e,text:Se(e)}])})),null})),function(){var e;if(!x&&I&&F)null===w||void 0===w||null===(e=w.current)||void 0===e||e.focus();else if(x&&!I&&F){var t;null===_||void 0===_||null===(t=_.current)||void 0===t||t.focus()}else if(x&&I&&!F){var n;null===A||void 0===A||null===(n=A.current)||void 0===n||n.focus()}}(),void N(!1);N(!0);var n=window.com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({oldPassword:ge.tempPassword,password:ge.newPassword,confirmpassword:ge.confirmNewPassword});V(!1),f(n)},children:[Object(d.jsxs)("div",{className:"centered",children:[Tc," ",Object(d.jsx)("strong",{children:c})]}),ce&&Object(d.jsx)(l.ErrorSummary,{errors:pe,ref:n,tabIndex:-1}),Object(d.jsxs)("div",{className:"password-requirements",children:[Object(d.jsx)("h2",{className:"centered tile-header",ref:t,tabIndex:-1,children:"For your security, please first reset your password. Your new password must include:"}),Object(d.jsx)("br",{}),Object(d.jsxs)("ul",{children:[Object(d.jsx)("li",{children:"8-32 characters (no spaces)"}),Object(d.jsx)("li",{children:"An uppercase letter"}),Object(d.jsx)("li",{children:"A lowercase letter"}),Object(d.jsx)("li",{children:"A number"}),Object(d.jsx)("li",{children:"A special character: - ' . , @ # : ? ! ( ) £ /"})]})]}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",children:[Object(d.jsxs)(l.Stack,{verticalSpacing:"50",children:[Object(d.jsx)("p",{children:"Re-enter the temporary password provided to you. Then enter and confirm a new password."}),Object(d.jsx)(l.PasswordInput,{label:"Temporary password",inputId:"tempPassword",name:"tempPassword",autoComplete:"off",isValid:x,errorMessages:[J],initialValue:ge.tempPassword,handleOnChange:function(e){ke(e)},ref:w}),Object(d.jsx)(l.PasswordInput,{label:"New password",inputId:"newPassword",name:"newPassword",autoComplete:"off",isValid:I,errorMessages:[X],initialValue:ge.newPassword,handleOnChange:function(e){ke(e)},ref:_}),Object(d.jsx)(l.PasswordInput,{label:"Confirm new password",inputId:"confirmNewPassword",name:"confirmNewPassword",autoComplete:"off",isValid:F,errorMessages:[re],initialValue:ge.confirmNewPassword,handleOnChange:function(e){ke(e)},ref:A})]}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Continue",size:"large",type:"submit",isLoading:B,loadingText:"Loading",isDisabled:B,isFullWidth:!0}),Object(d.jsx)(l.Button,{clickMethod:function(e){e.preventDefault(),!1===u&&b({type:v,key:O,value:""});var t=window.com.ts.mobile.sdk.FormInput.createFormCancellationRequest();f(t),b({type:H.UserName})},variant:"text-primary",text:"Cancel",type:"button"})]})]})})]})},Lc=function(){var e=Object(o.useRef)(null),t=Object(o.useRef)(null),n=Object(o.useRef)(null),i=Object(o.useRef)(null),s=Object(o.useRef)(null),u=K(),p=u.authState,f=p.TransmitEvents,g=f.resolve,y=f.policyId,b=p.UserInput.RememberUsername,_=u.authDispatch,w=Object(o.useState)(!1),A=Object(a.a)(w,2),k=(A[0],A[1]),C=Object(o.useState)(""),I=Object(a.a)(C,2),E=I[0],R=I[1],P=Object(o.useState)(!0),x=Object(a.a)(P,2),T=x[0],D=x[1],L=Object(o.useState)(""),F=Object(a.a)(L,2),j=F[0],M=F[1],q=Object(o.useState)(!0),B=Object(a.a)(q,2),N=B[0],U=B[1],W=Object(o.useState)(""),z=Object(a.a)(W,2),V=z[0],Q=z[1],G=Object(o.useState)(!0),J=Object(a.a)(G,2),Y=J[0],Z=J[1],£=Object(o.useState)(!1),ne=Object(a.a)(£,2),oe=ne[0],re=ne[1],ie=Object(o.useState)([]),se=Object(a.a)(ie,2),ae=se[0],ce=se[1],ue=function(e){var t="";switch(e){case"lastName":t="Last name";break;case"zip":t="ZIP code";break;case"dateOfBirth":t="Date of birth";break;default:t=e}return t};return Object(o.useEffect)((function(){var t;y===X.Transmit.RecoverUserIdPolicyId?te("retrieveusername","lastdobzip"):te("retrievepassword","lastdobzip"),null===e||void 0===e||null===(t=e.current)||void 0===t||t.focus()}),[]),Object(o.useEffect)((function(){return ae.length>1&&re(!0),function(){re(!1)}}),[ae]),Object(o.useEffect)((function(){var e;oe?null===s||void 0===s||null===(e=s.current)||void 0===e||e.focus():1===ae.length&&("lastName"===ae[0].inputID?null===t||void 0===t||t.current.focus():"dateOfBirth"===ae[0].inputID?null===n||void 0===n||n.current.focus():"zip"===ae[0].inputID&&(null===i||void 0===i||i.current.focus()))}),[oe,ae]),Object(d.jsx)(h,{handleSubmit:function(e){var t;e.preventDefault();var n=[];_({type:S});var o,r=!0;if(_c(V)?Z(!0):(Z(!1),r=!1,n=["zip"].concat(Object(gc.a)(n))),bc(j)?j.length>10||j.length<10?U(!1):U(!0):(U(!1),r=!1,n=["dateOfBirth"].concat(Object(gc.a)(n))),E.length<=0?(D(!1),r=!1,n=["lastName"].concat(Object(gc.a)(n))):E.length>36?D(!1):D(!0),!r)return o=n,ce([]),void o.map((function(e){return ce((function(t){return[].concat(Object(gc.a)(t),[{ariaLabel:"Enter a valid ".concat(ue(e),"."),inputID:e,text:ue(e)}])})),null}));k(!0);var i={lastname:E,dob:vc(j),zipcode:V},s=null===(t=window.com)||void 0===t?void 0:t.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({inputvalues:i});g(s),k(!1)},children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[oe&&Object(d.jsx)(l.ErrorSummary,{errors:ae,ref:s,tabIndex:-1}),Object(d.jsx)("p",{className:"centered",children:"To confirm your account, we\u2019ll ask you for some identifying information."}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsxs)(r.a.Fragment,{children:[Object(d.jsx)("h2",{className:"left tile-header",ref:e,tabIndex:-1,children:"Next, enter the last name, date of birth and ZIP code associated with your account."}),Object(d.jsx)(l.TextInput,{label:"Last name",inputId:"lastName",autoComplete:"off",initialValue:E,isValid:T,dataTestId:"retrieve_user_last_name",errorMessages:[Ae.retrieveUsername.fieldLevelErrors.LastNameError],handleOnChange:function(e){var t;t=e.target.value.trim(),R(t)},ref:t,isRequired:!0}),Object(d.jsxs)("div",{className:"form__row form__row--50-50",children:[Object(d.jsx)(l.TextInput,{label:"Date of birth",inputId:"dateOfBirth",pattern:"^(1[0-2]|0?[1-9])/(3[01]|[1-2][0-9]|0?[1-9])/([0-9]{4}|(0{2}?[0-9]{2}))£",description:"mm/dd/yyyy",autoComplete:"off",initialValue:j,isValid:N,dataTestId:"retrieve_user_dob",errorMessages:[Ae.retrieveUsername.fieldLevelErrors.DOBError],handleOnChange:function(e){var t;t=e.target.value.trim(),M(t)},isRequired:!0,ref:n}),Object(d.jsx)(l.TextInput,{label:"ZIP code",inputId:"zip",pattern:"(^\\d{5}£)|(^\\d{5}-\\d{4}£)",autoComplete:"off",initialValue:V,isValid:Y,dataTestId:"retrieve_user_zip",errorMessages:[Ae.retrieveUsername.fieldLevelErrors.ZipError],handleOnChange:function(e){var t;t=e.target.value.trim(),Q(t)},ref:i,isRequired:!0})]})]}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Continue",size:"large",type:"submit",dataTestId:"submit_button",loadingText:"Loading",isFullWidth:!0}),Object(d.jsx)(l.Button,{clickMethod:function(e){return function(e){e.preventDefault(),!1===b&&_({type:v,key:O,value:""});var t=window.com.ts.mobile.sdk.FormInput.createFormCancellationRequest();g(t),_({type:H.UserName})}(e)},variant:"text-primary",text:"Cancel",type:"button",dataTestId:"cancel_button"})]})]})}),Object(d.jsxs)(Ie,{children:[Object(d.jsxs)("p",{className:"text-style-body-3",children:[Object(d.jsx)(c.a,{to:"/forgot-username".concat(document.location.search),onClick:function(e){e.preventDefault(),_({type:H.RetrieveUserName})},children:"Forgot username?"})," "]}),Object(d.jsxs)("p",{className:"text-style-body-3",children:["Don\u2019t have an Online Banking account?"," ",Object(d.jsx)("a",{href:ee.Olb.EnrollNow,children:"Enroll now"}),"."]})]})]})})},Fc=function(){var e,t=Object(o.useRef)(null),n=Object(o.useRef)(null),i=Object(o.useRef)(null),s=Object(o.useRef)(null),u=K(),p=u.authDispatch,f=u.authState,g=f.AccountTypeInfo,y=f.TransmitEvents,b=y.resolve,_=y.policyId,w=Object(o.useState)(!0),A=Object(a.a)(w,2),S=A[0],k=A[1],C=Object(o.useState)(!0),I=Object(a.a)(C,2),E=I[0],R=I[1],P=Object(o.useState)(!1),x=Object(a.a)(P,2),T=(x[0],x[1]),D=Object(o.useState)(""),L=Object(a.a)(D,2),F=L[0],j=L[1],M=Object(o.useState)(""),q=Object(a.a)(M,2),B=q[0],N=q[1],U=Object(o.useState)(!1),W=Object(a.a)(U,2),z=W[0],V=W[1],Q=Object(o.useState)([]),G=Object(a.a)(Q,2),J=G[0],Y=G[1];e=g.AccountTypes;var Z=[];Object.keys(e).forEach((function(t){return Z.push({label:t,value:e[t]})}));var £=function(e){var t="";switch(e){case"cardOrAccountNumber":t="Card or account number";break;case"cardOrAccountType":t="Card or account type";break;default:t=e}return t};Object(o.useEffect)((function(){var e;_===X.Transmit.RecoverUserIdPolicyId?te("retrieveusername","accountnumber"):te("retrievepassword","accountnumber"),null===i||void 0===i||null===(e=i.current)||void 0===e||e.focus()}),[]),Object(o.useEffect)((function(){return J.length>1&&V(!0),function(){V(!1)}}),[J]),Object(o.useEffect)((function(){var e;z?null===s||void 0===s||null===(e=s.current)||void 0===e||e.focus():1===J.length&&("cardOrAccountNumber"===J[0].inputID?null===n||void 0===n||n.current.focus():"cardOrAccountType"===J[0].inputID&&(null===t||void 0===t||t.current.focus()))}),[z,J]);var ne=function(e){var t;e.preventDefault(),!1===f.UserInput.RememberUsername&&p({type:v,key:O,value:""}),void 0!==b&&b(window.com.ts.mobile.sdk.FormInput.createFormCancellationRequest());var n=null===(t=window.com)||void 0===t?void 0:t.ts.mobile.sdk.FormInput.createFormCancellationRequest();b(n),p({type:H.UserName})};return Object(d.jsx)(h,{handleSubmit:function(e){var t;e.preventDefault();var n,o=!0,r=[];if(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=/[^\d|\s|\-|.|+|(|)]/g.test(e),o=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14}|587868[0-9]{10})£/g.test(e),r=/[ \t]+£/g.test(e);return 0===e.length||n||("creditCard"===t&&e.length>19||"creditCard"!==t&&e.length>20)&&!r||("creditCard"===t&&e.length>19||"creditCard"!==t&&e.length>20)&&!o&&!r}(B,F)?R(!0):(R(!1),o=!1,r=["cardOrAccountNumber"].concat(Object(gc.a)(r))),(null===F||void 0===F?void 0:F.length)<=0||void 0===F||0===Z.filter((function(e){return e.value===F})).length?(k(!1),o=!1,r=["cardOrAccountType"].concat(Object(gc.a)(r))):k(!0),!o)return n=r,Y([]),void n.map((function(e){return Y((function(t){return[].concat(Object(gc.a)(t),[{ariaLabel:"Enter a valid ".concat(£(e),"."),inputID:e,text:£(e)}])})),null}));T(!0);var i={accttype:F,acctnum:B},s=null===(t=window.com)||void 0===t?void 0:t.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({inputvalues:i});T(!1),b(s)},children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[z&&Object(d.jsx)(l.ErrorSummary,{errors:J,ref:s,tabIndex:-1}),Object(d.jsx)("p",{className:"centered",children:"To confirm your account, we\u2019ll ask you for some identifying information."}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsxs)(r.a.Fragment,{children:[Object(d.jsx)("h2",{className:"justifyLeft tile-header",ref:i,tabIndex:-1,children:"Now select a Barclayscard or account you currently have, and enter that card or account number."}),Object(d.jsx)(l.Select,{label:"Card or account type",inputId:"cardOrAccountType",name:"cardOrAccountType",options:[{label:"Select card or account type",value:""}].concat(Z),value:F,isValid:S,dataTestId:"account_card_type",errorMessages:[Ae.retrieveUsername.fieldLevelErrors.AccountTypeError],handleOnChange:function(e){var t;t=e.target.value,j(t)},ref:t,isRequired:!0}),Object(d.jsx)(l.TextInput,{label:"Card or account number",inputId:"cardOrAccountNumber",name:"cardOrAccountNumber",autoComplete:"off",initialValue:B,isValid:E,dataTestId:"account_card_number",errorMessages:[Ae.retrieveUsername.fieldLevelErrors.AccountNumberError],handleOnChange:function(e){var t;t=e.target.value,N(t)},ref:n,isRequired:!0})]}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Continue",size:"large",type:"submit",loadingText:"Loading",dataTestId:"submit_button",isFullWidth:!0}),Object(d.jsx)(l.Button,{clickMethod:function(e){return ne(e)},variant:"text-primary",text:"Cancel",type:"button",dataTestId:"cancel_button"})]})]})}),Object(d.jsxs)(Ie,{children:[Object(d.jsxs)("p",{className:"text-style-body-3",children:[Object(d.jsx)(c.a,{to:"/forgot-username".concat(document.location.search),onClick:function(e){e.preventDefault(),p({type:H.RetrieveUserName})},children:"Forgot username?"})," "]}),Object(d.jsxs)("p",{className:"text-style-body-3",children:["Don\u2019t have an Online Banking account?"," ",Object(d.jsx)("a",{href:ee.Olb.EnrollNow,children:"Enroll now"}),"."]})]})]})})},jc=function(){var e=Object(o.useRef)(null),t=Object(o.useRef)(null),n=K(),i=n.authDispatch,s=n.authState,c=s.TransmitEvents.resolve,u=s.UserInput.RememberUsername,p=Object(o.useState)(!0),f=Object(a.a)(p,2),g=f[0],y=f[1],b=Object(o.useState)(""),_=Object(a.a)(b,2),w=_[0],A=_[1],S=Object(o.useState)(!1),k=Object(a.a)(S,2),C=(k[0],k[1],Object(o.useState)(!1)),I=Object(a.a)(C,2),E=(I[0],I[1]);Object(o.useEffect)((function(){var e;te("retrieveusername","ssnnumber"),null===t||void 0===t||null===(e=t.current)||void 0===e||e.focus()}),[]);var R=function(){!1===u&&i({type:v,key:O,value:""}),void 0!==c&&c(window.com.ts.mobile.sdk.FormInput.createFormCancellationRequest())};return Object(d.jsx)(h,{handleSubmit:function(t){if(t.preventDefault(),wc(w))y(!1),null===e||void 0===e||e.current.focus();else{var n;E(!0);var o={ssn:w},r=null===(n=window.com)||void 0===n?void 0:n.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({inputData:o});c(r),E(!1)}},children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsx)("p",{className:"centered",children:"To confirm your account, we\u2019ll ask you for some identifying information."}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsxs)(r.a.Fragment,{children:[Object(d.jsx)("h2",{className:"left tile-header",ref:t,tabIndex:-1,children:"Enter the Social Security or tax ID number (SSN / TIN) associated with your account."}),Object(d.jsxs)(l.Stack,{verticalSpacing:"20",children:[Object(d.jsx)(l.SSNInput,{onPaste:function(e){return e.preventDefault(),!1},onCopy:function(e){return e.preventDefault(),!1},label:"SSN / TIN",inputId:"socialSecurityNumber",autoComplete:"off",initialValue:w,isValid:g,errorMessages:[Ae.retrieveUsername.fieldLevelErrors.SSNError],handleOnChange:function(e){A(e.target.value)},dataTestId:"ssn_input",ref:e,isRequired:!0}),X.isNRASelfServiceEnabled&&Object(d.jsx)(l.Button,{classes:"btn--left-aligned underlined italicized",text:"I don't have a Social Security or tax ID number.",variant:"text-primary",size:"small",dataTestId:"no_ssn_button",clickMethod:function(e){return function(e){var t;e.preventDefault();var n=null===(t=window.com)||void 0===t?void 0:t.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({inputData:{ssn:"no ssntin"}});c(n)}(e)}})]})]}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Continue",size:"large",type:"submit",loadingText:"Loading",dataTestId:"submit_button",isFullWidth:!0}),Object(d.jsx)(l.Button,{clickMethod:function(e){return function(e){e.preventDefault(),R(),i({type:H.UserName})}(e)},variant:"text-primary",text:"Cancel",type:"button",dataTestId:"cancel_button"})]})]})})]})})},Mc=function(){var e=Object(o.useRef)(null),t=Object(o.useRef)(null),n=Object(o.useRef)(null),i=Object(o.useRef)(null),s=Object(o.useRef)(null),u=Object(o.useRef)(null),p=Ae.usernameLastDobZip.fieldLevelErrors,f=K(),g=f.authState,y=g.TransmitEvents.resolve,b=g.UserInput.RememberUsername,_=f.authState,w=f.authDispatch,A=Object(o.useState)(!1),k=Object(a.a)(A,2),C=k[0],I=k[1],E=_.UserInput,R=Object(o.useState)(localStorage.getItem("username")||E.Username||""),P=Object(a.a)(R,2),x=P[0],T=P[1],D=Object(o.useState)(!0),L=Object(a.a)(D,2),q=L[0],B=L[1],N=Object(o.useState)(""),U=Object(a.a)(N,2),W=U[0],z=U[1],V=Object(o.useState)(!0),Q=Object(a.a)(V,2),G=Q[0],J=Q[1],Y=Object(o.useState)(""),Z=Object(a.a)(Y,2),£=Z[0],X=Z[1],ne=Object(o.useState)(!0),oe=Object(a.a)(ne,2),re=oe[0],ie=oe[1],se=Object(o.useState)(""),ae=Object(a.a)(se,2),ce=ae[0],ue=ae[1],le=Object(o.useState)(!0),de=Object(a.a)(le,2),pe=de[0],he=de[1],fe=Object(o.useState)(!1),me=Object(a.a)(fe,2),ge=me[0],ye=me[1],be=Object(o.useState)([]),ve=Object(a.a)(be,2),_e=ve[0],we=ve[1],Se=function(e){var t="";switch(e){case"userName":t="Username";break;case"lastName":t="Last name";break;case"zip":t="ZIP code";break;case"dateOfBirth":t="Date of birth";break;default:t=e}return t},ke=function(e,t){w({type:v,key:e,value:t})},Ce=function(e){e.preventDefault(),!1===b&&ke(O,""),void 0!==y&&y(window.com.ts.mobile.sdk.FormInput.createFormCancellationRequest()),w({type:H.UserName})};return Object(o.useEffect)((function(){te("retrievepassword","usernamelastdobzip"),e.current.focus()}),[]),Object(o.useEffect)((function(){return _e.length>1&&ye(!0),function(){ye(!1)}}),[_e]),Object(o.useEffect)((function(){var e;ge?null===u||void 0===u||null===(e=u.current)||void 0===e||e.focus():1===_e.length&&("userName"===_e[0].inputID?null===t||void 0===t||t.current.focus():"lastName"===_e[0].inputID?null===n||void 0===n||n.current.focus():"dateOfBirth"===_e[0].inputID?null===i||void 0===i||i.current.focus():"zip"===_e[0].inputID&&(null===s||void 0===s||s.current.focus()))}),[ge,_e]),Object(d.jsx)(h,{handleSubmit:function(e){e.preventDefault();var t=[];w({type:S});var n,o=!0;if(_c(ce)?he(!0):(he(!1),o=!1,t=["zip"].concat(Object(gc.a)(t))),bc(£)?£.length>10||£.length<10?ie(!1):ie(!0):(ie(!1),o=!1,t=["dateOfBirth"].concat(Object(gc.a)(t))),W.length<=0?(J(!1),o=!1,t=["lastName"].concat(Object(gc.a)(t))):W.length>36?J(!1):J(!0),x.length<=0?(B(!1),o=!1,t=["userName"].concat(Object(gc.a)(t))):x.length>18?B(!1):B(!0),!o)return n=t,we([]),void n.map((function(e){return we((function(t){return[].concat(Object(gc.a)(t),[{ariaLabel:"Enter a valid ".concat(Se(e),"."),inputID:e,text:Se(e)}])})),null}));I(!0),Ac(_,w,"nra"),I(!1)},children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsx)("p",{className:"centered",children:"To confirm your account, we\u2019ll ask you for some identifying information."}),ge&&Object(d.jsx)(l.ErrorSummary,{errors:_e,ref:u,tabIndex:-1}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsxs)(r.a.Fragment,{children:[Object(d.jsx)("h2",{className:"left tile-header",ref:e,tabIndex:-1,children:"Enter the username, last name, date of birth and ZIP code associated with your account."}),Object(d.jsx)(l.TextInput,{label:"Username",inputId:"userName",autoComplete:"off",initialValue:x,isValid:q,dataTestId:"retrieve_password_username",errorMessages:[p.emptyUsername],handleOnChange:function(e){T(e.target.value.trim()),ke(O,e.target.value.trim())},ref:t,isRequired:!0}),Object(d.jsx)(l.TextInput,{label:"Last name",inputId:"lastName",autoComplete:"off",initialValue:W,isValid:G,dataTestId:"retrieve_password_last_name",errorMessages:[p.emptyLastName],handleOnChange:function(e){z(e.target.value.trim()),ke(F,e.target.value.trim())},ref:n,isRequired:!0}),Object(d.jsxs)("div",{className:"form__row form__row--50-50",children:[Object(d.jsx)(l.TextInput,{label:"Date of birth",inputId:"dateOfBirth",pattern:"^(1[0-2]|0?[1-9])/(3[01]|[1-2][0-9]|0?[1-9])/([0-9]{4}|(0{2}?[0-9]{2}))£",autoComplete:"off",description:Object(d.jsxs)("span",{children:[Object(d.jsx)("span",{className:"sr-only",children:"Format:"})," mm/dd/yyyy"]}),initialValue:£,isValid:re,dataTestId:"retrieve_password_dob",errorMessages:[p.invalidDOB],handleOnChange:function(e){X(e.target.value.trim()),ke(j,e.target.value.trim())},isRequired:!0,ref:i}),Object(d.jsx)(l.TextInput,{label:"ZIP code",inputId:"zip",pattern:"(^\\d{5}£)|(^\\d{5}-\\d{4}£)",autoComplete:"off",initialValue:ce,isValid:pe,dataTestId:"retrieve_password_zip",errorMessages:[p.invalidZip],handleOnChange:function(e){ue(e.target.value.trim()),ke(M,e.target.value.trim())},ref:s,minLength:5,isRequired:!0})]})]}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Continue",size:"large",type:"submit",dataTestId:"submit_button",loadingText:"Loading",isFullWidth:!0,isLoading:C,isDisabled:C}),Object(d.jsx)(l.Button,{clickMethod:function(e){return Ce(e)},variant:"text-primary",text:"Cancel",type:"button",dataTestId:"cancel_button"})]})]})}),Object(d.jsxs)(Ie,{children:[Object(d.jsxs)("p",{className:"text-style-body-3",children:[Object(d.jsx)(c.a,{to:"/forgot-username".concat(document.location.search),onClick:function(e){e.preventDefault(),w({type:H.RetrieveUserName}),w({type:S})},className:"cta cta--text-primary cta--medium",children:"Forgot username?"})," "]}),Object(d.jsxs)("p",{className:"text-style-body-3",children:["Don\u2019t have an Online Banking account?"," ",Object(d.jsx)("a",{href:ee.Olb.EnrollNow,children:"Enroll now"}),"."]})]})]})})},qc=function(){var e=Object(o.useRef)(null),t=K(),n=t.authState,r=n.TransmitEvents.resolve,i=n.UserInput,s=t.authDispatch,c=Object(o.useRef)(null),u=Object(o.useRef)(null),p=Object(o.useState)(""),f=Object(a.a)(p,2),b=f[0],_=f[1],w=Object(o.useState)(),A=Object(a.a)(w,2),k=A[0],C=A[1],I=Object(o.useState)(""),E=Object(a.a)(I,2),R=E[0],P=E[1],x=Object(o.useState)(!0),T=Object(a.a)(x,2),D=T[0],L=T[1],F=Object(o.useState)(!1),j=Object(a.a)(F,2),M=j[0],q=j[1],B=Object(o.useState)(""),N=Object(a.a)(B,2),U=N[0],W=N[1],z=Object(o.useState)(""),V=Object(a.a)(z,2),Q=V[0],G=V[1],J=Object(o.useState)(!1),Y=Object(a.a)(J,2),Z=Y[0],£=Y[1],X=Object(o.useState)([]),ee=Object(a.a)(X,2),ne=ee[0],oe=ee[1],re=Object(o.useRef)(null),ie=Object(o.useState)({newPassword:"",confirmNewPassword:""}),se=Object(a.a)(ie,2),ae=se[0],ce=se[1],ue=!0,le=!0,de=function(e){return/^(?=[A-Za-z0-9-.`,#@:?!()£/']+£)(?=.*\d)(?=.*\W+)(?=.*[a-z])(?=.*[A-Z]).{8,32}£/.test(e)},pe=function(e){var t="";switch(e){case"newPassword":t="New password";break;case"confirmNewPassword":t="Confirm new password";break;default:t=yc(e)}return t},he=function(e){var t=e.target.value;ce(Object(y.a)(Object(y.a)({},ae),{},Object(g.a)({},e.target.name,t)))};return Object(o.useEffect)((function(){var t;te("retrievepassword","changepassword"),null===e||void 0===e||null===(t=e.current)||void 0===t||t.focus()}),[]),Object(o.useEffect)((function(){s({type:S})}),[]),Object(o.useEffect)((function(){return ne.length>1&&£(!0),function(){£(!1)}}),[ne]),Object(o.useEffect)((function(){var e;Z?null===re||void 0===re||null===(e=re.current)||void 0===e||e.focus():1===ne.length&&("newPassword"===ne[0].inputID?null===c||void 0===c||c.current.focus():"confirmNewPassword"===ne[0].inputID&&(null===u||void 0===u||u.current.focus()))}),[Z,ne]),Object(d.jsxs)(h,{handleSubmit:function(e){if(C(!0),L(!0),Object.keys(ae).forEach((function(e){"newPassword"===e?0!==ae[e].length&&de(ae[e])||(ue=!1,C(!1),W(Ae.changePassword.fieldLevelErrors.newPasswordBlankOrInvalid)):"confirmNewPassword"===e&&(0!==ae[e].length&&de(ae[e])?ue&&ae.newPassword!==ae[e]&&(le=!1,G(Ae.changePassword.fieldLevelErrors.passwordMisMatch),L(!1)):(le=!1,L(!1),G(Ae.changePassword.fieldLevelErrors.confirmNewPasswordBlank)))})),!ue||!le)return oe([]),Object.keys(ae).map((function(e){return("newPassword"===e&&!ue||"confirmNewPassword"===e&&!le)&&oe((function(t){return[].concat(Object(gc.a)(t),[{ariaLabel:"Enter a valid ".concat(yc(e),"."),inputID:e,text:pe(e)}])})),null})),function(){var e;if(!k&&D)null===c||void 0===c||null===(e=c.current)||void 0===e||e.focus();else if(k&&!D){var t;null===u||void 0===u||null===(t=u.current)||void 0===t||t.focus()}}(),void q(!1);q(!0);var t=window.com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({password:ae.newPassword,confirmpassword:ae.confirmNewPassword});r(t)},children:[Z&&Object(d.jsx)(l.ErrorSummary,{errors:ne,ref:re,tabIndex:-1}),Object(d.jsxs)("div",{className:"password-requirements",children:[Object(d.jsxs)("h2",{className:"centered tile-header",ref:e,tabIndex:-1,children:["Your new password must include:",Object(d.jsx)("span",{className:"sr-only",children:" the following"})]}),Object(d.jsx)("br",{}),Object(d.jsxs)("ul",{"aria-label":"password requirements",children:[Object(d.jsx)("li",{children:"8-32 characters (no spaces)"}),Object(d.jsx)("li",{children:"An uppercase letter"}),Object(d.jsx)("li",{children:"A lowercase letter"}),Object(d.jsx)("li",{children:"A number"}),Object(d.jsx)("li",{children:"A special character: - ' . , @ # : ? ! ( ) £ /"})]})]}),Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",children:[Object(d.jsxs)(l.Stack,{verticalSpacing:"50",children:[Object(d.jsx)(l.PasswordInput,{label:"New password",inputId:"newPassword",name:"newPassword",autoComplete:"off",isValid:k,errorMessages:[U],initialValue:b,handleOnKeyPress:function(){},handleOnChange:function(e){_(e.target.value),he(e)},ref:c}),Object(d.jsx)(l.PasswordInput,{label:"Confirm new password",inputId:"confirmNewPassword",name:"confirmNewPassword",autoComplete:"off",isValid:D,errorMessages:[Q],initialValue:R,handleOnKeyPress:function(){},handleOnChange:function(e){P(e.target.value),he(e)},ref:u})]}),Object(d.jsxs)(m,{children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Continue",size:"large",type:"submit",isLoading:M,loadingText:"Loading",isDisabled:M,isFullWidth:!0}),Object(d.jsx)(l.Button,{clickMethod:function(e){e.preventDefault(),!1===i.RememberUsername&&s({type:v,key:O,value:""});var t=window.com.ts.mobile.sdk.FormInput.createFormCancellationRequest();r(t),s({type:H.UserName})},variant:"text-primary",text:"Cancel",type:"button"})]})]})})]})},Bc=function(){var e=Ae.forgotPassword,t=Object(o.useRef)(null),n=K(),r=n.authState.UserInput.RememberUsername,i=n.authDispatch,s=function(e){var t;e.preventDefault(),!1===r&&i({type:v,key:O,value:""}),i({type:R});var n=null===(t=document.getElementById("hdnRelyingParty"))||void 0===t?void 0:t.value;void 0!==n&&""!==n?(document.getElementById("hdnRelyingParty").value="",window.location.href=n):i({type:H.UserName})};return Object(o.useEffect)((function(){te("retrievepassword","forgotpasswordsuccess"),t.current.focus()}),[]),Object(d.jsxs)(h,{handleSubmit:s,children:[Object(d.jsx)("h2",{className:"centered tile-header",ref:t,tabIndex:-1,children:e.fieldLevelErrors.fpSuccessMsg}),Object(d.jsx)("p",{className:"lineWrap",children:e.fieldLevelErrors.fpSuccessSubMsg}),Object(d.jsx)(m,{children:Object(d.jsx)(l.Button,{clickMethod:function(e){return s(e)},variant:"primary",text:"Log in",size:"large",type:"submit",isFullWidth:!0,ariaLabel:"Continue: Navigate to your destination."})})]})},Nc=function(){var e=Object(o.useRef)(null),t=Object(o.useState)(!1),n=Object(a.a)(t,2),i=n[0],s=n[1],c=Object(o.useState)(""),u=Object(a.a)(c,2),p=u[0],h=u[1],f=Object(o.useState)(""),g=Object(a.a)(f,2),y=g[0],b=g[1],_=Object(o.useState)(""),w=Object(a.a)(_,2),A=w[0],S=w[1],k=Object(o.useState)(""),C=Object(a.a)(k,2),I=C[0],E=C[1],R=Object(o.useState)(""),P=Object(a.a)(R,2),x=P[0],T=P[1],D=Object(o.useState)(""),L=Object(a.a)(D,2),F=L[0],j=L[1],M=Object(o.useState)(!1),q=Object(a.a)(M,2),B=q[0],N=q[1],U=K(),W=U.authState,z=W.AuthStep,V=W.TransmitError,Q=W.TransmitEvents.policyId,G=W.UserInput.RememberUsername,J=U.authDispatch,Y=fe(null,null,"errorContent");Y=Y.genericError;return Object(o.useEffect)((function(){z===H.SelfServiceError?(h(Y[V].heading),j(Y[V].description),E(Y[V].body),S(Y[V].bodyInTile),T(Y[V].bodyBeneathTile),N(Y[V].tryAgainButtonEnabled)):z===H.FPLockout&&b("It looks like your account may not be eligible for online access at this time.")}),[z]),Object(o.useEffect)((function(){Q===X.Transmit.RecoverUserIdPolicyId?te("retrieveusername",V):te("retrievepassword",V),e.current.focus()}),[]),Object(d.jsxs)(l.Stack,{style:{marginTop:"-2.15rem"},children:[Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsx)(re,{heading:p,description:F}),z===H.FPLockout?Object(d.jsx)("h2",{className:"centered tile-header",style:{marginBottom:"1rem"},ref:e,tabIndex:-1,children:y}):Object(d.jsx)("h2",{className:"centered tile-header",style:{marginBottom:"1rem"},ref:e,tabIndex:-1,children:I})]}),Object(d.jsxs)("form",{onSubmit:function(e){e.preventDefault(),s(!0),z===H.SelfServiceError&&(J({type:H.UserName}),!1===G&&J({type:v,key:O,value:""})),s(!1)},noValidate:!0,children:[Object(d.jsx)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:Object(d.jsx)(l.Tile,{classes:"form__tile",style:{maxWidth:"520px",marginLeft:"auto",marginRight:"auto"},children:Object(d.jsx)(l.Stack,{verticalSpacing:"70",children:Object(d.jsxs)(r.a.Fragment,{children:[Object(d.jsx)("p",{className:"centered",id:"button-tryagain",dangerouslySetInnerHTML:{__html:A}}),B&&Object(d.jsx)(m,{children:Object(d.jsx)(l.Button,{variant:"primary",text:"Try again",size:"large",type:"submit",loadingText:"Loading",isLoading:i,isDisabled:i,dataTestId:"submit_button","aria-describedby":"button-tryagain"})})]})})})}),z!==H.FPLockout&&Object(d.jsx)(l.Stack,{children:Object(d.jsx)("p",{className:"text-style-body-3 centered",style:{marginTop:"32px"},children:Object(d.jsx)("span",{dangerouslySetInnerHTML:{__html:x}})})})]})]})},Uc=function(){var e=Object(o.useRef)(null),t=Object(o.useState)(!1),n=Object(a.a)(t,2),i=n[0],s=n[1],c=Object(o.useState)(""),u=Object(a.a)(c,2),p=u[0],h=u[1],f=Object(o.useState)(""),m=Object(a.a)(f,2),g=m[0],b=m[1],_=Object(o.useState)(""),w=Object(a.a)(_,2),A=w[0],S=w[1],C=Object(o.useState)(""),I=Object(a.a)(C,2),E=I[0],R=I[1],P=Object(o.useState)(""),x=Object(a.a)(P,2),T=x[0],D=x[1],L=K(),F=L.authState,j=L.authDispatch,M=F.UsernameFromTransmit,q=F.WrongUsername,B=F.RelyingParty,N=F.TransmitEvents,U=N.resolve,W=N.policyId,z=F.AuthStep,V=F.UserInput.RememberUsername,Q=fe(z,W);Q=Q.FPWrongUsername;var G="Log in as ".concat(M),J="Reset password for ".concat(M);Object(o.useEffect)((function(){var t;te("retrievepassword","forgotPasswordWrongUsername"),null===e||void 0===e||null===(t=e.current)||void 0===t||t.focus(),""===M&&"undefined"===M||j({type:v,key:O,value:M})}),[]),Object(o.useEffect)((function(){z===H.FPWrongUsername&&(R(Q.heading),D(Q.description),h("".concat(Q.errortext1," ").concat(q,".")),b("".concat(Q.errortext2," ").concat(M,".")),S("".concat(Q.titleFirstHalf," ").concat(M,"").concat(Q.titleSecondHalf)))}),[z]);return Object(d.jsxs)("form",{onSubmit:function(e){e.preventDefault(),function(){if(s(!0),U(window.com.ts.mobile.sdk.FormInput.createFormCancellationRequest()),""!==B&&void 0!==B&&"undefined"!==B){var e=B;e.indexOf("mobilebanking")>0&&(e=e.replace("//login","//PasswordResetFromOLB")),window.location.href=e}else""!==M&&"undefined"!==M&&void 0!==M&&(j({type:v,key:O,value:M}),j({type:k,payload:[]}),sessionStorage.setItem("isLogin",!0),ac(Object(y.a)({UserInput:Object(y.a)({Username:M},F.UserInput)},F),j));s(!1)}()},noValidate:!0,children:[Object(d.jsxs)("div",{className:"centered",children:[Object(d.jsx)("h2",{children:E}),Object(d.jsx)("br",{}),Object(d.jsx)("p",{children:Object(d.jsx)("strong",{children:T})})]}),Object(d.jsx)(l.Stack,{isCentered:!0,width:"100",children:Object(d.jsx)("div",{className:"content-wrapper",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsx)("br",{}),Object(d.jsxs)("div",{style:{width:"100%"},children:[Object(d.jsxs)("h2",{className:"left tile-header",ref:e,tabIndex:-1,children:[Object(d.jsx)("span",{style:{display:"block"},className:"centered",dangerouslySetInnerHTML:{__html:p}}),Object(d.jsx)("span",{className:"centered",style:{marginBottom:"2rem",display:"block"},dangerouslySetInnerHTML:{__html:g}})]}),Object(d.jsx)(l.Tile,{classes:"form__tile",style:{maxWidth:"520px",marginLeft:"auto",marginRight:"auto"},children:Object(d.jsx)(l.Stack,{verticalSpacing:"70",children:Object(d.jsxs)(r.a.Fragment,{children:[Object(d.jsx)("p",{className:"centered",dangerouslySetInnerHTML:{__html:A}}),Object(d.jsxs)("div",{className:"centered",style:{width:"100%",justifyContent:"space-evenly",display:"flex"},children:[Object(d.jsx)(l.Button,{variant:"primary",text:"Log in",size:"large",type:"submit",loadingText:"Loading",isLoading:i,isDisabled:i,dataTestId:"submit_button",style:{width:"40%"},"aria-label":G}),Object(d.jsx)(l.Button,{variant:"secondary",text:"Reset password",size:"large",clickMethod:function(e){return function(e){e.preventDefault();var t=window.com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({reset:"reset"});U(t)}(e)},loadingText:"Loading",isLoading:i,isDisabled:i,dataTestId:"reset_password_button",style:{width:"40%"},"aria-label":J})]}),Object(d.jsx)("div",{className:"centered",children:Object(d.jsx)(l.Button,{clickMethod:function(e){return function(e){e.preventDefault(),!1===V&&j({type:v,key:O,value:""}),U(window.com.ts.mobile.sdk.FormInput.createFormCancellationRequest()),""!==B&&void 0!==B&&"undefined"!==B?window.location.href=B:j({type:H.UserName})}(e)},variant:"text-primary",text:"Cancel",dataTestId:"cancel_button",type:"button"})})]})})})]})]})})})]})},Hc=function(){var e=Ae.mustChangePasswordSuccess,t=Object(o.useRef)(null),n=K().authState.TransmitEvents.resolve,r=function(e){e.preventDefault();var t=window.com.ts.mobile.sdk.FormInput.createFormInputSubmissionRequest({response:"Continue"});n(t)};return Object(o.useEffect)((function(){var e;te("login","mustchangepasswordsuccess"),null===t||void 0===t||null===(e=t.current)||void 0===e||e.focus()}),[]),Object(d.jsx)(h,{handleSubmit:r,children:Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsx)("div",{className:"centered",children:Object(d.jsx)("h2",{className:"tile-header",ref:t,tabIndex:-1,children:e.fieldLevelErrors.successMsg})}),Object(d.jsx)(m,{children:Object(d.jsx)(l.Button,{clickMethod:function(e){return r(e)},variant:"primary",text:"Continue",size:"large",type:"submit",isFullWidth:!0,ariaLabel:"Continue: Navigate to your destination."})})]})})})},Wc=function(){var e=K().authState.AuthStep;return Object(d.jsx)(ke,{children:function(){switch(e){case H.Information:return Object(d.jsx)("div",{id:"transmitContainer"});case H.UserName:return Object(d.jsx)(cc,{});case H.RetrieveUserName:return Object(d.jsx)(Rc,{});case H.Password:return Object(d.jsx)(lc,{});case H.MustChangePassword:return Object(d.jsx)(Dc,{});case H.MustChangePasswordSuccess:return Object(d.jsx)(Hc,{});case H.ForgotPassword:return Object(d.jsx)(Sc,{});case H.OTCContactMethod:return Object(d.jsx)(pc,{});case H.OTC:return Object(d.jsx)(fc,{});case H.ChallengeQuestion:return Object(d.jsx)(mc,{});case H.SetupSecurityQuestions:return Object(d.jsx)(Cc,{});case H.SetupSecQuestionsSuccessOption:return Object(d.jsx)(Pc,{});case H.Lockout:return Object(d.jsx)(Ic,{});case H.IALockout:return Object(d.jsx)(xc,{});case H.GenericError:return Object(d.jsx)(Oc,{});case H.UserLastDobZip:return Object(d.jsx)(Lc,{});case H.UserAccountNumber:return Object(d.jsx)(Fc,{});case H.UserSSNNumber:return Object(d.jsx)(jc,{});case H.UsernameLastDobZip:return Object(d.jsx)(Mc,{});case H.ChangePassword:return Object(d.jsx)(qc,{});case H.ForgotPasswordSuccess:return Object(d.jsx)(Bc,{});case H.SelfServiceError:case H.FPLockout:return Object(d.jsx)(Nc,{});case H.FPWrongUsername:return Object(d.jsx)(Uc,{});case H.RetreiveUsernameSucces:return Object(d.jsx)(ne,{});default:return Object(d.jsx)(r.a.Fragment,{})}}()})},Kc=n(77),zc=Ae[404].authHeading,Vc=zc.heading,Qc=zc.description,Gc=zc.subHeading,Jc=function(){var e=Object(c.d)(),t=Object(o.useRef)(null),n=Object(o.useRef)(null),r=function(t,n){switch(t.preventDefault(),n){case"clsp":e(ee.Clsp.DefaultUrl,{replace:!0});break;case"rdom":e(ee.rdom.DefaultUrl,{replace:!0});break;case"barclays.com":e(ee.Rdc.DefaultUrl,{replace:!0});break;case"sscp":e(ee.Sscp.DefaultUrl,{replace:!0});break;default:e(ee.Olb.AccountOverview,{replace:!0})}};Object(o.useEffect)((function(){var e;null===n||void 0===n||null===(e=n.current)||void 0===e||e.focus()}),[]);var i=me();return Object(d.jsxs)(o.Fragment,{children:[Object(d.jsxs)(u.a,{children:[Object(d.jsx)("title",{children:i.fourOhFour||""}),Object(d.jsx)("meta",{name:"robots",content:"noindex, nofollow","data-rh":"true"})]}),Object(d.jsx)(we,{children:Object(d.jsx)(l.Container,{verticalSpacing:"30",children:Object(d.jsxs)("div",{className:"content-wrapper",children:[Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,classes:"auth-heading",children:[Object(d.jsx)(re,{heading:Vc}),Object(d.jsx)("h2",{className:"auth-heading__description centered tile-header.emphasis",tabIndex:-1,ref:n,dangerouslySetInnerHTML:{__html:Qc}}),Object(d.jsx)(re,{subHeading:Gc})]}),Object(d.jsx)("div",{style:{margin:"auto",textAlign:"center",marginTop:"2rem"}}),Object(d.jsx)("form",{className:"form",children:Object(d.jsx)(l.Tile,{classes:"form__tile",children:Object(d.jsxs)(l.Stack,{verticalSpacing:"70",isCentered:!0,children:[Object(d.jsxs)("div",{children:[Ae[404].authHeading.subMessage1,Object(d.jsxs)("ul",{children:[Object(d.jsx)("li",{children:Ae[404].authHeading.subMessage2}),Object(d.jsx)("li",{children:Ae[404].authHeading.subMessage3}),Object(d.jsx)("li",{children:Ae[404].authHeading.subMessage4}),Object(d.jsx)("li",{children:Ae[404].authHeading.subMessage5})]})]}),Object(d.jsx)("p",{className:"centered",children:Ae[404].authHeading.subMessage6}),Object(d.jsxs)(l.DropdownMenu,{dataTestId:"dropdown_menu",children:[Object(d.jsx)(l.DropdownTrigger,{variant:"primary",dataTestId:"dropdown_menu_trigger",text:"Log in to another account",ref:t}),Object(d.jsx)(l.DropdownMenuContent,{children:Object(d.jsx)(l.MenuList,{children:Kc.map((function(e,t){return Object(d.jsx)(l.MenuLink,{className:"cta cta--text-alternate cta--large cta--full-width menu-button justifyLeftImportant",dataTestId:"fourohfour".concat(t),text:e.Text,style:{cursor:"pointer"},clickMethod:function(t){return r(t,e.Value)},tabIndex:0,onKeyDown:function(t){return"Enter"===t.key?r(t,e.Value):""}},e.value)}))})})]})]})})})]})})})]})},Yc=function(e){var t=e.children,n=e.location;return Object(o.useEffect)((function(){return window.scrollTo(0,0)}),[n.pathname]),t},Zc=n(78),£c=n.n(Zc),Xc=(n(162),function(e){var t=e.isModal,n=e.isLoggedOut,r=e.isRender,i=e.updateValueTimeout,s=Object(o.useRef)(null),c=Object(o.useState)(t),u=Object(a.a)(c,2),l=u[0],p=u[1],h=Object(o.useState)(n),f=Object(a.a)(h,2),m=f[0],g=f[1],y=Object(o.useState)(Math.floor(X.SessionWarningRemainTime/60)),b=Object(a.a)(y,2),v=b[0],_=b[1],w=Object(o.useState)(X.SessionWarningRemainTime%60),A=Object(a.a)(w,2),S=A[0],k=A[1],C=Object(o.useState)(r),I=Object(a.a)(C,2),E=I[0],R=I[1],O=K(),x=O.authState,T=x.AuthStep,D=x.CurrentFlow,L=D.isForgotPassword,F=D.isForgotUsername,j=x.SessionTimeout,M=j.PasswordFlow,q=j.UsernameFlow,B=O.authDispatch,N=T===H.UserName||T===H.GenericError||T===H.Lockout||T===H.FPLockout||T===H.SelfServiceError||T===H.ForgotPassword||T===H.RetrieveUserName,U=T===H.Password,W=T!==H.ForgotPassword&&L,z=T!==H.RetrieveUserName&&F;Object(o.useEffect)((function(){if(U||z&&!q||N||W&&!M){W?B({type:P,key:"PasswordFlow",value:!0}):z&&B({type:P,key:"UsernameFlow",value:!0}),clearTimeout(window.timeout);var e=function(){return setTimeout((function(){N||(g(!1),B({type:P,key:"UsernameFlow",value:!1}),B({type:P,key:"PasswordFlow",value:!1}),window.location.href=window.location.href,sessionStorage.setItem("STO",!0),sessionStorage.setItem("TER",!0))}),1e3*(60*v+(S+1)))};window.timeout=m?e():setTimeout((function(){N||(te("login","timeout"),p(!0),g(!0),R(!0),e())}),1e3*X.SessionWarningTime)}}),[l,T]),Object(o.useEffect)((function(){var e=setTimeout((function(){m&&(R(!1),S>0&&k(S-1),0===S&&(0===v||(_(v-1),k(59))))}),i);return function(){clearTimeout(e)}}));var V=function(){p(!1)};return Object(o.useEffect)((function(){var e;E&&(null===(e=s.current)||void 0===e||e.focus(),document.title="Session ending soon")})),Object(d.jsx)("div",{children:Object(d.jsx)(£c.a,{isOpen:l,className:"modal--is-open",contentLabel:"Session ending soon",ariaHideApp:!1,children:Object(d.jsx)("div",{className:"modal__backdrop modal__backdrop--dark modalComp",role:"presentation","data-testid":"SessionTimeoutModal",children:Object(d.jsxs)("section",{className:"modal__element",role:"dialog","aria-label":"Session Timeout",children:[Object(d.jsx)("header",{className:"modal-header",children:Object(d.jsx)("button",{className:"cta cta--text-alternate cta--medium cta--icon-only modal-close",type:"button","data-testid":"modalClose","aria-label":"Close modal",onClick:function(){return V()},children:Object(d.jsx)("div",{className:"cta__icon-wrapper",children:Object(d.jsx)("svg",{"aria-hidden":"true",className:"icon icon__chevron-right",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",fillRule:"nonzero",children:Object(d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15,3 L9,9 M9,9 L3,3 M15,15 L9,9 M9,9 L3,15",stroke:"currentColor",strokeWidth:"1.6"})})})})}),Object(d.jsxs)("div",{className:"modal__body no-border",tabIndex:"-1","data-testid":"modalBody",ref:s,children:[Object(d.jsxs)("p",{className:"text-style-heading-4 no-borderp1","data-testid":"sessionHeader",children:["Session ending in ","0".concat(v),":",Object(d.jsx)("span",{className:"sr-only",children:" minute"}),S<10?"0".concat(S):S,Object(d.jsx)("span",{className:"sr-only",children:" seconds"})]}),Object(d.jsx)("p",{className:"text-style-body-2 no-borderp2","data-testid":"sessionContent",children:"This time cannot be extended. Close this message to continue before time expires."})]}),Object(d.jsx)("footer",{className:"modal-footer",children:Object(d.jsx)("div",{className:"modal-footer__cta-wrapper",children:Object(d.jsx)("button",{className:"cta cta--primary cta--large",type:"button","data-testid":"modal_close_button",onClick:function(){return V()},children:Object(d.jsx)("span",{className:"cta__label",children:"Close"})})})})]})})})})});Xc.defaultProps={isModal:!1,isLoggedOut:!1,isRender:!1,updateValueTimeout:1e3};var eu=Xc,tu=function(){for(var e=[],t=[],n=decodeURIComponent(window.location.href).slice(window.location.href.indexOf("?")+1).split("&"),o=0;o0?t.push("d4"):i.indexOf("onlinebankingregionsq")>0&&t.push("q4")}}return t};var nu=function(){var e,t,n=K(),i=n.authState,s=i.AuthStep,l=i.CurrentFlow,p=(l.isForgotPassword,l.isForgotUsername,l.isFormPassword,n.authDispatch),h=Object(o.useState)(!0),f=Object(a.a)(h,2),m=f[0],g=f[1],y=new URLSearchParams(document.location.search),b=null===(e=y.get(X.ChannelQueryKey))||void 0===e?void 0:e.toLowerCase(),v=null===(t=y.get(X.ProductQueryKey))||void 0===t?void 0:t.toLowerCase(),_=tu(),w=_.length>0?_[0]:"",A=_.length>1?_[1]:"",k=X.JoinTheBankProducts.map((function(e){return e.toLowerCase()})),C=X.ApplyNowProducts.map((function(e){return e.toLowerCase()})),I=X.DloProducts.map((function(e){return e.toLowerCase()}));if(["/404","/signin","/","","/forgot-username","/password-reset"].indexOf(window.location.pathname.toLowerCase())<0)Object(c.c)("/404",{replace:!0});else if(window.location.href.indexOf("404")<0&&s===H.UserName){var E=""!==A&&"d4"!==A&&"q4"!==A;if(w.indexOf("exclusiveproduct")>-1){var R=E?"".concat(X.ExclusiveProductRoute,"&olbenv=").concat(A):X.ExclusiveProductRoute;Object(c.c)(R,{replace:!0})}else if(w.indexOf("products/personalbanking?dlo")>-1){var P=E?"".concat(X.PersonalBankingDloProductRoute,"&olbenv=").concat(A):X.PersonalBankingDloProductRoute;Object(c.c)(P,{replace:!0})}else if(w.indexOf("accounts/overview")>-1){var O=E?"".concat(X.DefaultRoute,"&olbenv=").concat(A):X.DefaultRoute;Object(c.c)(O,{replace:!0})}else b&&v?Object(c.c)(window.location.pathname.toLowerCase()+document.location.search,{replace:!0}):Object(c.c)(X.DefaultRoute,{replace:!0});E&&window.location.reload()}var x=[{param:X.ChannelQueryKey,allowedValues:Object.keys(X.AllowedChannelProducts)},{param:X.ProductQueryKey,allowedValues:X.AllowedChannelProducts[b]},{param:X.OlbEnvironments,allowedValues:X.AllowedOlbEnvironments}],T=s===H.UserName;x.forEach((function(e){var t,n=e.param,o=e.allowedValues;("olb"===b&&0===(null===v||void 0===v?void 0:v.length)||0===(null===(t=b)||void 0===t?void 0:t.length)&&0===(null===v||void 0===v?void 0:v.length))&&Object(c.c)(X.DefaultRoute,{replace:!0});var r=y.get(n);null!==r&&void 0===(null===o||void 0===o?void 0:o.find((function(e){return e===r})))&&Object(c.c)("/404",{replace:!0})})),window.location.href.indexOf(X.RetrieveUserNameUrlKey)>-1&&(Object(c.c)("/signin".concat(window.location.search)),p({type:H.RetrieveUserName})),window.location.href.indexOf(X.ForgotPasswordUrlKey)>-1&&(Object(c.c)("/signin".concat(window.location.search)),p({type:H.ForgotPassword})),Object(o.useEffect)((function(){fetch("switches/channelModeConfig.json").then((function(e){return e.json()})).then((function(e){("rdo"!==(b=b||"olb")&&!0===e[b].maintenanceMode||"rdo"===b&&!0===e[b].joinTheBank.maintenanceMode&&k.includes(v)||"rdo"===b&&!0===e[b].applyNow.maintenanceMode&&C.includes(v)||"rdo"===b&&!0===e[b].dlo.maintenanceMode&&I.includes(v))&&(tc.ErrorMessage("Maintenance mode has been enabled for channel: ".concat(b," and product: ").concat(v)),p({type:S,isMaintenanceEnabled:!0}),p({type:H.GenericError})),("rdo"!==b&&!0===e[b].downTimeMode||"rdo"===b&&!0===e[b].joinTheBank.downTimeMode&&k.includes(v)||"rdo"===b&&!0===e[b].applyNow.downTimeMode&&C.includes(v)||"rdo"===b&&!0===e[b].dlo.downTimeMode&&I.includes(v))&&(tc.ErrorMessage("Downtime mode has been enabled for channel ".concat(b,": and product: ").concat(v)),p({type:S,IsDownTimeMode:!0}),p({type:H.GenericError})),g(!1)})).catch((function(e){g(!1),tc.ErrorMessage("Channel Mode Config json file thrown error ".concat(e," for ").concat(b,": and product: ").concat(v," "))}))}),[]);var D=fe(null,null,U);return Object(d.jsx)(r.a.Fragment,{children:!m&&Object(d.jsxs)(u.b,{children:[Object(d.jsxs)(u.a,{children:[Object(d.jsx)("meta",{name:"description",content:D.metaTag}),Object(d.jsx)("link",{rel:"canonical",href:D.canonicalTag}),"olb"!==b?Object(d.jsx)("meta",{name:"robots",content:"noindex, nofollow"}):null]}),Object(d.jsx)(c.b,{primary:!1,children:Object(d.jsxs)(Yc,{path:"/",children:[Object(d.jsx)(Wc,{path:"/signin"}),Object(d.jsx)(Jc,{path:"404",default:!0})]})}),T?null:Object(d.jsx)(eu,{})]})})},ou=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,164)).then((function(t){var n=t.getCLS,o=t.getFID,r=t.getFCP,i=t.getLCP,s=t.getTTFB;n(e),o(e),r(e),i(e),s(e)}))},ru=Object(o.createContext)(),iu=function(e){var t=e.children,n=Object(o.useState)(!1),r=Object(a.a)(n,2),i=r[0],s=r[1];return Object(d.jsx)(ru.Provider,{value:{toggleShowModal:i,openModal:function(){return s(!0)},closeModal:function(){return s(!1)}},children:t})};iu.defaultProps={children:void 0};var su=iu;s.a.render(Object(d.jsx)(r.a.StrictMode,{children:Object(d.jsx)(Q,{children:Object(d.jsx)(su,{children:Object(d.jsx)(nu,{})})})}),document.getElementById("root")),ou()},23:function(e,t,n){"use strict";(function(e){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n1){if("number"==typeof(n=function(){for(var e=arguments.length,t=new Array(e),n=0;n>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function t(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function n(e,t){return 32==(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function o(e,t){return 0==(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=r(e=t(e,[4283543511,3981806797]),[0,e[0]>>>1]),r(e=t(e,[3301882366,444984403]),[0,e[0]>>>1])}function s(s,a){a=a||0;for(var c=(s=s||"").length%16,u=s.length-c,l=[0,a],d=[0,a],p=[0,0],h=[0,0],f=[2277735313,289559509],m=[1291169091,658871167],g=0;g>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)+("00000000"+(d[0]>>>0).toString(16)).slice(-8)+("00000000"+(d[1]>>>0).toString(16)).slice(-8)}function a(e,t){if(Array.prototype.forEach&&e.forEach===Array.prototype.forEach)e.forEach(t);else if(e.length===+e.length)for(var n=0,o=e.length;nt.name?1:e.name=e.components.length)t(n.data);else{var s=e.components[o];if(e.excludes[s.key])r(!1);else{if(!i&&s.pauseBefore)return--o,void setTimeout((function(){r(!0)}),1);try{s.getData((function(e){n.addPreprocessedComponent(s.key,e),r(!1)}),e)}catch(i){n.addPreprocessedComponent(s.key,String(i)),r(!1)}}}}(!1)},u.getPromise=function(e){return new Promise((function(t,n){u.get(e,t)}))},u.getV18=function(e,t){return null==t&&(t=e,e={}),u.get(e,(function(n){for(var o=[],r=0;r0?2==s.length?"function"==o(s[1])?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:3==s.length?"function"!==o(s[1])||s[1].exec&&s[1].test?this[s[0]]=c?c.replace(s[1],s[2]):void 0:this[s[0]]=c?s[1].call(this,c,s[2]):void 0:4==s.length&&(this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):void 0):this[s]=c||void 0;u+=2}},str:function(e,t){for(var n in t)if("object"===o(t[n])&&t[n].length>0){for(var r=0;r255?h.trim(e,255):e,this},this.setUA(i),this};y.VERSION="0.7.28",y.BROWSER={NAME:s,MAJOR:"major",VERSION:u},y.CPU={ARCHITECTURE:"architecture"},y.DEVICE={MODEL:i,VENDOR:c,TYPE:a,CONSOLE:"console",MOBILE:l,SMARTTV:p,TABLET:d,WEARABLE:"wearable",EMBEDDED:"embedded"},y.ENGINE={NAME:s,VERSION:u},y.OS={NAME:s,VERSION:u},e.exports&&(t=e.exports=y),t.UAParser=y;var b=void 0!==n&&(n.jQuery||n.Zepto);if(b&&!b.ua){var v=new y;b.ua=v.getResult(),b.ua.get=function(){return v.getUA()},b.ua.set=function(e){v.setUA(e);var t=v.getResult();for(var n in t)b.ua[n]=t[n]}}}("object"===("undefined"==typeof window?"undefined":o(window))?window:m)})),_=v.UAParser,w=Object.freeze({__proto__:null,default:v,__moduleExports:v,UAParser:_}),A=void 0,S=void 0;function k(e){var t=void 0,n=function(){t=void 0},o=function(t,n,o){if(A)d(t,o);else{var i={excludes:{userAgent:!0,screenResolution:!0,fonts:!0,fontsFlash:!0,plugins:!0,colorDepth:!0,webdriver:!0,audio:!0,deviceMemory:!0,enumerateDevices:!0,timezone:!0,webglVendorAndRenderer:!0}};e.largeData||(i.excludes.canvas=!0,i.excludes.webgl=!0),n.getV18(i,(function(e,n){var i=r(n);A={id:e,details:i},d(t,o)}))}},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=e||[];for(var n={},o=0;o>16)+(t>>16)+(n>>16)<<16|65535&n}function I(e,t,n,o,r,i){return C((s=C(C(t,e),C(o,i)))<<(a=r)|s>>>32-a,n);var s,a}function E(e,t,n,o,r,i,s){return I(t&n|~t&o,e,t,r,i,s)}function R(e,t,n,o,r,i,s){return I(t&o|n&~o,e,t,r,i,s)}function P(e,t,n,o,r,i,s){return I(t^n^o,e,t,r,i,s)}function O(e,t,n,o,r,i,s){return I(n^(t|~o),e,t,r,i,s)}function x(e,t){var n,o,r,i,s;e[t>>5]|=128<>>9<<4)]=t;var a=1732584193,c=-271733879,u=-1732584194,l=271733878;for(n=0;n>5]>>>t%32&255);return n}function D(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+"0123456789abcdef".charAt(15&t);return o}function F(e){return unescape(encodeURIComponent(e))}function j(e){return function(e){return T(x(D(e),8*e.length))}(F(e))}function M(e,t){return function(e,t){var n,o,r=D(e),i=[],s=[];for(i[15]=s[15]=void 0,r.length>16&&(r=x(r,8*e.length)),n=0;n<16;n+=1)i[n]=909522486^r[n],s[n]=1549556828^r[n];return o=x(i.concat(D(t)),512+8*t.length),T(x(s.concat(o),640))}(F(e),F(t))}var q=function(){function e(){r(this,e),this.locales={}}return s(e,[{key:"getString",value:function(e,t){var n=t||"en-US",o=this.locales[n];return o&&o.hasOwnProperty(e)?o[e]:e}},{key:"addDictionary",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",n=this.locales[t]||{},o=Object.assign(n,e);this.locales[t]=o}}]),e}(),B=function(){function e(t,n){r(this,e),this.navi=navigator,this.opType=t,this.options=n}return s(e,[{key:"b64Encode",value:function(e){for(var t="",n=new Uint8Array(e),o=n.byteLength,r=0;r1&&void 0!==arguments[1]?arguments[1]:25;if(e instanceof ArrayBuffer)return this.b64Encode(e);if(t<=0)return e;if(e instanceof Array){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done);o=!0){var c=s.value;n.push(this.publicKeyCredentialToJSON(c),t-1)}}catch(e){r=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(r)throw i}}return n}if(e instanceof Object){var u={};for(var l in e)"function"!=typeof e[l]&&(u[l]=this.publicKeyCredentialToJSON(e[l],t-1));return u}return e}},{key:"execute",value:function(){var e,t=this,n=JSON.parse(JSON.stringify(this.options));switch(this.opType){case com.ts.mobile.sdkhost.Fido2CredentialsOpType.Create:n.publicKey.challenge=this.b64Decode(n.publicKey.challenge),n.publicKey.user.id=this.b64Decode(n.publicKey.user.id),n.publicKey.excludeCredentials.map((function(e){return e.id=t.b64Decode(e.id),e})),e=this.navi.credentials.create(n).then((function(e){e.clientExtensionResults=e.getClientExtensionResults();var n=e.response&&e.response.getTransports&&e.response.getTransports(),o=t.publicKeyCredentialToJSON(e);return n&&n.length>0&&(o.response.transports=n),o}));break;case com.ts.mobile.sdkhost.Fido2CredentialsOpType.Get:n.publicKey.challenge=this.b64Decode(n.publicKey.challenge);var o=!0,r=!1,i=void 0;try{for(var s,a=n.publicKey.allowCredentials[Symbol.iterator]();!(o=(s=a.next()).done);o=!0){var c=s.value;c.id=this.b64Decode(c.id)}}catch(e){r=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(r)throw i}}e=this.navi.credentials.get(n).then((function(e){return e.clientExtensionResults=e.getClientExtensionResults(),t.publicKeyCredentialToJSON(e)}))}return e.catch((function(e){throw N.indexOf(e.name)>-1?new com.ts.mobile.sdk.impl.AuthenticationErrorImpl(com.ts.mobile.sdk.AuthenticationErrorCode.UserCanceled,"Received FIDO2 cancellation request from platform; Error: ".concat(e)):e}))}}]),e}(),N=["NotAllowedError","AbortError"],U=function(){function e(t,n,o,i,s){r(this,e),this._tag=t,this._keyClass=n,this._protection=o,this._keyData=i,this._keyStore=s}return s(e,[{key:"getKeyClass",value:function(){return this._keyClass}},{key:"getTag",value:function(){return this._tag}},{key:"getBioProtected",value:function(){return this._protection}},{key:"setBiometricPromptInfo",value:function(e,t,n){}},{key:"signHex",value:function(e){return this._keyStore.signWithKeyPair(this._tag,this._keyClass,e)}},{key:"encrypt",value:function(e){throw new Error("Method not implemented.")}},{key:"decrypt",value:function(e){throw new Error("Method not implemented.")}},{key:"unwrapAsymmetricKeyPairFromPrivateKeyHex",value:function(e,t){throw new Error("Method not implemented.")}},{key:"unwrapSymmetricKeyHex",value:function(e,t){throw new Error("Method not implemented.")}},{key:"wrapSymmetricKey",value:function(e){throw new Error("Method not implemented.")}},{key:"publicKeyToJson",value:function(){return this._keyData}},{key:"closeKeyPair",value:function(){throw new Error("Method not implemented.")}}]),e}(),H=function(){function e(t){r(this,e),this._host=t}return s(e,[{key:"generateKeyPair",value:function(e,t,n,o){var r=this,i=this.keyGenParamsForKeyClass(t);return this.generateKeyPairInternal(e,i,t,n,o).catch((function(i){if(r._host.log(com.ts.mobile.sdk.LogLevel.Error,"TransmitSDK/Tarsus","Failed to generate key pair: ".concat(i)),i instanceof DOMException&&"DataCloneError"===i.name){var s=r.fallbackKeyGenParamsForKeyClass(t);return r.generateKeyPairInternal(e,s,t,n,o)}throw r._host.log(com.ts.mobile.sdk.LogLevel.Error,"TransmitSDK/Tarsus","Failed to generate key pair: ".concat(i)),com.ts.mobile.sdk.impl.AuthenticationErrorImpl.ensureAuthenticationError(i)}))}},{key:"generateKeyPairInternal",value:function(e,t,n,o,r){var i=this;return new Promise((function(r,s){t||r(null),i.promiseLikeToPromise(crypto.subtle.generateKey(t.params,!1,i.keyUsagesForKeyClass(n))).then((function(a){return i._host.log(com.ts.mobile.sdk.LogLevel.Debug,"TransmitSDK/Tarsus","key pair generated, now will validate private key is not exportable."),new Promise((function(e,t){i.promiseLikeToPromise(crypto.subtle.exportKey("pkcs8",a.privateKey)).then((function(e){var t="generated exportable private key";i._host.log(com.ts.mobile.sdk.LogLevel.Error,"TransmitSDK/Tarsus",t);var n=new com.ts.mobile.sdk.impl.AuthenticationErrorImpl(com.ts.mobile.sdk.AuthenticationErrorCode.Internal,t),o={};throw o[com.ts.mobile.sdkhost.ErrorDataInternalError]=com.ts.mobile.sdkhost.InternalErrorCouldNotGenerateSecureKey,com.ts.mobile.sdk.impl.AuthenticationErrorImpl.augmentErrorData(n,o)})).catch((function(n){if(n instanceof com.ts.mobile.sdk.impl.AuthenticationErrorImpl&&t(n),!(n instanceof DOMException)||n instanceof DOMException&&"InvalidAccessError"!==n.name){var o="failed to verify private key is not exportable";i._host.log(com.ts.mobile.sdk.LogLevel.Error,"TransmitSDK/Tarsus",o);var r=new com.ts.mobile.sdk.impl.AuthenticationErrorImpl(com.ts.mobile.sdk.AuthenticationErrorCode.Internal,o),s={};s[com.ts.mobile.sdkhost.ErrorDataInternalError]=com.ts.mobile.sdkhost.InternalErrorCouldNotGenerateSecureKey,t(com.ts.mobile.sdk.impl.AuthenticationErrorImpl.augmentErrorData(r,s))}e(!0)}))})).then((function(r){return i._host.log(com.ts.mobile.sdk.LogLevel.Debug,"TransmitSDK/Tarsus","generate key pair success"),i.promiseLikeToPromise(crypto.subtle.exportKey("spki",a.publicKey)).then((function(r){i._host.log(com.ts.mobile.sdk.LogLevel.Debug,"TransmitSDK/Tarsus","export key pair success");var c=i._db.transaction("keystore","readwrite");c.oncomplete=function(e){i._host.log(com.ts.mobile.sdk.LogLevel.Debug,"TransmitSDK/Tarsus","object store transaction complete")},c.onerror=function(e){var t="object store transaction failed: ".concat(c.error.message);i._host.log(com.ts.mobile.sdk.LogLevel.Debug,"TransmitSDK/Tarsus",t),s(new com.ts.mobile.sdk.impl.AuthenticationErrorImpl(com.ts.mobile.sdk.AuthenticationErrorCode.Internal,t))};var u=c.objectStore("keystore");try{var l=u.add({tag:e,key:a.privateKey});return i.promiseRequestResult(l).then((function(s){i._host.log(com.ts.mobile.sdk.LogLevel.Debug,"TransmitSDK/Tarsus","add key pair success");var a=btoa(String.fromCharCode.apply(String,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t127&&(n="00"+n);0===o.indexOf("00");)o=o.substring(2),i=!1;i&&parseInt(o.substring(0,2),16)>127&&(o="00"+o);var s=function(e){return("00"+(e.length/2).toString(16)).slice(-2).toString()},a="02"+s(n)+n+"02"+s(o)+o;return"30"+s(a)+a}},{key:"toHexString",value:function(e){return Array.prototype.map.call(new Uint8Array(e),(function(e){return("00"+e.toString(16)).slice(-2)})).join("")}}],[{key:"isIndexedDBSupported",value:function(){return!!(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB)}}]),e}(),W=function(){function e(){r(this,e)}return s(e,null,[{key:"isWebCryptoSupported",value:function(){if(!window.crypto||!window.crypto.subtle)return!1;var e=(new _).setUA(navigator.userAgent).getBrowser(),t=e.name,n=e.major,o=e.minor||0;return"Chrome"===t&&n>=45||"Safari"===t&&n>=11||"Mobile Safari"===t&&(n>=12||11==n&&o>=3)||"Edge"===t&&n>=79||"Firefox"===t&&n>=34}},{key:"isIndexedDBAvailable",value:function(){return new Promise((function(e){try{var t=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;if(t){var n=t.open("capability-test"),o=setTimeout((function(){n.onsuccess=n.onerror=null,e(!1)}),4e3);n.onerror=function(){clearTimeout(o),e(!1)},n.onsuccess=function(){clearTimeout(o),t.deleteDatabase("capability-test"),e(!0)}}else e(!1)}catch(t){e(!1)}}))}},{key:"collect",value:function(){return new Promise((function(t){e.isIndexedDBAvailable().then((function(n){t({indexedDB:n,webCrypto:e.isWebCryptoSupported()})}))}))}}]),e}().collect(),K=function(){function e(){r(this,e),this.logLevel=com.ts.mobile.sdk.LogLevel.Error,this.collectionResultsPromise=null,this.internalLogger=new u,this.externalLogger=null,this.cachedFidoMfuvaSupported=null,this.localizer=new q,this.browserCapabilities=null,window.__XMSDK_PLUGINS={},this.localizer.addDictionary(c)}return s(e,[{key:"initialize",value:function(e){var t=this;return this.log(com.ts.mobile.sdk.LogLevel.Debug,"TransmitSDK/Tarsus","initialize with collectors [".concat(e,"]")),this._localStorage=new f("localStorage"),this._sessionStorage=new f("sessionStorage"),W.then((function(n){return t.browserCapabilities=n,t._enabledCollectors=e,"true"!==t.queryHostInfo(com.ts.mobile.sdkhost.HostInformationKey.PersistentKeysSupported)||(t.keyStore=new H(t),t.keyStore.initialize())}))}},{key:"setLogLevel",value:function(e){this.logLevel=e}},{key:"log",value:function(e,t,n){e<=this.logLevel&&this.internalLogger.log(e,t,n),this.externalLogger&&this.externalLogger.log(e,t,n)}},{key:"readStorageKey",value:function(e){return JSON.parse(this._localStorage.getItem(e)||"{}")}},{key:"writeStorageKey",value:function(e,t){this._localStorage.setItem(e,JSON.stringify(t))}},{key:"deleteStorageKey",value:function(e){this._localStorage.removeItem(e)}},{key:"readSessionStorageKey",value:function(e){return JSON.parse(this._sessionStorage.getItem(e)||"{}")}},{key:"writeSessionStorageKey",value:function(e,t){this._sessionStorage.setItem(e,JSON.stringify(t))}},{key:"deleteSessionStorageKey",value:function(e){this._sessionStorage.removeItem(e)}},{key:"promiseCollectionResult",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null!=n?(this.log(com.ts.mobile.sdk.LogLevel.Debug,"TransmitSDK/Tarsus","promiseCollectionResult() override collectors"),e=n):e=this._enabledCollectors;var o={location:{allow:e.indexOf(com.ts.mobile.sdk.CollectorType.Location)>=0,timeout:4e3,maximumAge:18e4},deviceFingerprint:e.indexOf(com.ts.mobile.sdk.CollectorType.DeviceFingerprint)>=0,largeData:e.indexOf(com.ts.mobile.sdk.CollectorType.LargeData)>=0},r=new Promise((function(n,r){t.log(com.ts.mobile.sdk.LogLevel.Debug,"TransmitSDK/Tarsus","promiseCollectionResult() invoked with collectors: [".concat(e,"]")),k(o).get((function(e){t.log(com.ts.mobile.sdk.LogLevel.Debug,"TransmitSDK/Tarsus","promiseCollectionResult() completed"),n(e)}))}));return Promise.all([r]).then((function(e){var t=Object.assign(e[0]);return t.toJson=function(){return t},t}))}},{key:"calcHexStringEncodedMd5Hash",value:function(e){return function(e,t,n){return t?n?M(t,e):L(M(t,e)):n?j(e):L(j(e))}(com.ts.mobile.sdk.util.hexToAscii(e))}},{key:"generateRandomHexString",value:function(e){var t=new Uint8Array(e);(window.crypto||window.msCrypto).getRandomValues(t);for(var n="",o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"],r=0;r"},r.errorForAssertionResponse=function(e){var n;switch(e.assertion_error_code){case t.core.Protocol.AssertionErrorCode.FailedAssertion:n=t.AuthenticationErrorCode.InvalidInput;break;case t.core.Protocol.AssertionErrorCode.MethodLocked:n=t.AuthenticationErrorCode.AuthenticatorLocked;break;case t.core.Protocol.AssertionErrorCode.HistoryRepeat:n=t.AuthenticationErrorCode.RegisteredSecretAlreadyInHistory;break;default:n=t.AuthenticationErrorCode.Internal}var o={assertion_error_code:e.assertion_error_code,additional_data:e.data};return new r(n,e.assertion_error_message||"Assertion error code "+e.assertion_error_code,o)},r.appImplementationError=function(e){return new r(t.AuthenticationErrorCode.AppImplementation,e)},r.errorForTransportResponse=function(e){return new r(t.AuthenticationErrorCode.Communication,"HTTP response error",{status:e.getStatus(),body:e.getBodyJson()})},r.ensureAuthenticationError=function(e){if(r.dynamicCast(e))return e;var n={js_error_message:e.toString()};return e.stack&&(n.js_error_stack=e.stack),new r(t.AuthenticationErrorCode.Internal,"Internal error occurred ("+e.toString()+")",n)},r.augmentErrorData=function(e,t){var n,o={},i=e.getData();if(i)for(n in i)o[n]=i[n];for(n in t)o[n]=t[n];return new r(e.getErrorCode(),e.getMessage(),o)},r.dynamicCast=function(e){return void 0!==e.getErrorCode&&void 0!==e.getMessage&&void 0!==e.getData},r}(t.AuthenticationError);n.AuthenticationErrorImpl=o}(t.impl||(t.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){function e(e,t){this._authenticator=e,this._suggestedParams=t}return e.prototype.getAuthenticator=function(){return this._authenticator},e.prototype.getSuggestedParameters=function(){return this._suggestedParams},e}();e.AuthenticationOptionImpl=t}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){function e(e,t,n,o){this._appData=n||null,this._token=e||null,this._internalData=o||null,this._deviceId=t||null}return e.prototype.getToken=function(){return this._token||""},e.prototype.getDeviceId=function(){return this._deviceId||""},e.prototype.getData=function(){return this._appData||{}},e.prototype.getInternalData=function(){return this._internalData},e.fromCflowServerResponse=function(t,n){return new e(t.token,n,t.application_data,t.data)},e}();e.AuthenticationResultImpl=t}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getResultType=function(){return this._resultType},t.prototype.setResultType=function(e){this._resultType=e},t.prototype.getSelectedAuthenticator=function(){return this._selectedAuthenticator},t.prototype.setSelectedAuthenticator=function(e){this._selectedAuthenticator=e},t.prototype.getSelectedAuthenticationParameters=function(){return this._selectedAuthenticationParameters},t.prototype.setSelectedAuthenticationParameters=function(e){this._selectedAuthenticationParameters=e},t.prototype.getActionEscapeRequest=function(){return this._actionEscapeRequest},t.prototype.setActionEscapeRequest=function(e){this._actionEscapeRequest=e},t.createAbortRequest=function(){return e.ts.mobile.sdk.impl.AuthenticatorSelectionResultImpl.createAbortRequest()},t.createEscapeRequest=function(t,n){return e.ts.mobile.sdk.impl.AuthenticatorSelectionResultImpl.createEscapeRequest(t,n)},t.createSelectionRequest=function(t){return e.ts.mobile.sdk.impl.AuthenticatorSelectionResultImpl.createSelectionRequest(t)},t.createParameterizedSelectionRequest=function(t,n){return e.ts.mobile.sdk.impl.AuthenticatorSelectionResultImpl.createParameterizedSelectionRequest(t,n)},t.__tarsusInterfaceName="AuthenticatorSelectionResult",t}();t.AuthenticatorSelectionResult=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.createAbortRequest=function(){var t=new n;return t.setResultType(e.AuthenticatorSelectionResultType.Abort),t},n.createSelectionRequest=function(t){var o=new n;return o.setResultType(e.AuthenticatorSelectionResultType.SelectAuthenticator),o.setSelectedAuthenticator(t),o},n.createEscapeRequest=function(t,o){var r=new n;return r._resultType=e.AuthenticatorSelectionResultType.Escape,r._actionEscapeRequest=new e.ActionEscapeRequest,r._actionEscapeRequest._escapeOption=t,r._actionEscapeRequest._escapeParameters=o,r},n}(e.AuthenticatorSelectionResult);t.AuthenticatorSelectionResultImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){function e(e){this._acquisitionChallenges=e}return e.prototype.getStepTag=function(){return"imageAcquisition"},e.prototype.getAcquisitionChallenges=function(){return this._acquisitionChallenges},e.__tarsusInterfaceName="CameraAcquisitionStepDescription",e}();e.CameraAcquisitionStepDescriptionImpl=t}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getLocalEnrollmentKeySizeInBytes=function(){return this._localEnrollmentKeySizeInBytes},t.prototype.getLocalEnrollmentKeyIterationCount=function(){return this._localEnrollmentKeyIterationCount},t.prototype.setLocalEnrollmentKeyIterationCount=function(e){this._localEnrollmentKeyIterationCount=e},t.create=function(t){return e.ts.mobile.sdk.impl.ClientCryptoSettingsImpl.create(t)},t.__tarsusInterfaceName="ClientCryptoSettings",t}();t.ClientCryptoSettings=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e){var n=new t;return n.setLocalEnrollmentKeyIterationCount(e),n._localEnrollmentKeySizeInBytes=32,n},t}(e.ClientCryptoSettings);t.ClientCryptoSettingsImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(){function t(e,t){this._description=e,this._menuItemOptions=t||{}}return t.prototype.getDescription=function(){return this._description},t.prototype.getAvailableActions=function(){var t=this,n=[];switch(this._description.getRegistrationStatus()){case e.AuthenticatorRegistrationStatus.Registered:n=[e.AuthenticatorConfigurationAction.Reregister,e.AuthenticatorConfigurationAction.Unregister];break;case e.AuthenticatorRegistrationStatus.Unregistered:case e.AuthenticatorRegistrationStatus.LocallyInvalid:n=[e.AuthenticatorConfigurationAction.Register]}return n.filter((function(n){return n==e.AuthenticatorConfigurationAction.Reregister&&!t._menuItemOptions.hide_reregister||n==e.AuthenticatorConfigurationAction.Register&&!t._menuItemOptions.hide_register||n==e.AuthenticatorConfigurationAction.Unregister&&!t._menuItemOptions.hide_unregister}))},t}();t.ConfigurableAuthenticatorImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getUserChoice=function(){return this._userChoice},t.prototype.setUserChoice=function(e){this._userChoice=e},t.prototype.getActionEscapeRequest=function(){return this._actionEscapeRequest},t.prototype.setActionEscapeRequest=function(e){this._actionEscapeRequest=e},t.create=function(t){return e.ts.mobile.sdk.impl.ConfirmationInputImpl.create(t)},t.createEscapeRequest=function(t,n){return e.ts.mobile.sdk.impl.ConfirmationInputImpl.createEscapeRequest(t,n)},t.__tarsusInterfaceName="ConfirmationInput",t}();t.ConfirmationInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.create=function(e){var t=new n;return t.setUserChoice(e),t},n.createEscapeRequest=function(t,o){var r=new n,i=new e.ActionEscapeRequest;return i.setEscapeOption(t),i.setEscapeParameters(o),r.setActionEscapeRequest(i),r},n}(e.ConfirmationInput);t.ConfirmationInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getRequestType=function(){return this._requestType},t.prototype.setRequestType=function(e){this._requestType=e},t.create=function(t){return e.ts.mobile.sdk.impl.ControlRequestImpl.create(t)},t.__tarsusInterfaceName="ControlRequest",t}();t.ControlRequest=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e){var n=new t;return n.setRequestType(e),n},t}(e.ControlRequest);t.ControlRequestImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getPrompt=function(){return this._prompt},n.prototype.setPrompt=function(e){this._prompt=e},n.prototype.getTitle=function(){return this._title},n.prototype.setTitle=function(e){this._title=e},n.prototype.getSubtitle=function(){return this._subtitle},n.prototype.setSubtitle=function(e){this._subtitle=e},n.prototype.getCancelButtonTitle=function(){return this._cancelButtonTitle},n.prototype.setCancelButtonTitle=function(e){this._cancelButtonTitle=e},n.create=function(t){return e.ts.mobile.sdk.impl.DeviceBiometricsInputImpl.create(t)},n.createFull=function(t,n,o,r){return e.ts.mobile.sdk.impl.DeviceBiometricsInputImpl.createFull(t,n,o,r)},n.__tarsusInterfaceName="DeviceBiometricsInput",n}(t.InputResponseType);t.DeviceBiometricsInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e){var n=new t;return e&&n.setPrompt(e),n},t}(e.DeviceBiometricsInput);t.DeviceBiometricsInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){function e(e,t){this._id=e,this._name=t}return e.prototype.getId=function(){return this._id},e.prototype.getName=function(){return this._name},e}();e.DeviceGroupImpl=t}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(){function n(e){this.updateFromServer(e)}return n.prototype.getDeviceHwId=function(){return this._id},n.prototype.getName=function(){return this._name?this._name:this._model+" "+this._osType+" "+this._osVersion},n.prototype.getStatus=function(){return this._status},n.prototype.getLastAccess=function(){return this._lastAccess},n.prototype.getLastAccessLocation=function(){return this._lastAccessLocation},n.prototype.getLastAccessLocationAttributes=function(){return this._lastAccessLocationAttributes},n.prototype.getRegistered=function(){return this._registered},n.prototype.getModel=function(){return this._model},n.prototype.getOsType=function(){return this._osType},n.prototype.getOsVersion=function(){return this._osVersion},n.prototype.getUseCount=function(){return this._useCount},n.prototype.getIsCurrent=function(){return this._isCurrent},n.prototype.getDeviecId=function(){return this._id},n.prototype.setStatus=function(e){this._status=e},n.prototype.setName=function(e){this._name=e},n.prototype.forceCurrent=function(){this._isCurrent=!0},n.prototype.updateFromServer=function(n){switch(this._model=e.core.DeviceModelConverter.getDeviceModel(n.device_model,n.os_type),this._name=n.name,this._lastAccess=Date.parse(n.last_access),this._registered=Date.parse(n.registered),this._osType=e.core.DeviceModelConverter.getOsName(n.os_type),this._osVersion=n.os_version,this._useCount=n.use_count,this._isCurrent=n.cur_device,this._id=n.device_id,n.status){case e.core.Protocol.DeviceStatusServerFormat.Disabled:this._status=e.DeviceStatus.Disabled;break;case e.core.Protocol.DeviceStatusServerFormat.LongInactivity:this._status=e.DeviceStatus.LongInactivity;break;case e.core.Protocol.DeviceStatusServerFormat.NoRecentActivity:this._status=e.DeviceStatus.NoRecentActivity;break;case e.core.Protocol.DeviceStatusServerFormat.RecentlyUsed:this._status=e.DeviceStatus.RecentlyUsed;break;case e.core.Protocol.DeviceStatusServerFormat.Removed:this._status=e.DeviceStatus.Removed;break;default:throw new t.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Unknown device status "+n.status)}if(n.last_access_location){var o=new e.GeoLocation;o.longitude=n.last_access_location.lng,o.latitude=n.last_access_location.lat,this._lastAccessLocation=o,this._lastAccessLocationAttributes=new t.LocationAttributesImpl(n.last_access_location)}},n}();t.DeviceInfoImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){function e(){}return e.getOsName=function(e){var t=e;switch(e){case"iPhone":case"iPad":t="iOS"}return t},e.getDeviceModel=function(e,t){var n=e;if("iPhone"==t)switch(e){case"i386":case"x86_64":n="Simulator";break;case"iPod1,1":case"iPod2,1":case"iPod3,1":case"iPod4,1":case"iPod7,1":case"iPod9,1":n="iPod Touch";break;case"iPhone1,1":case"iPhone1,2":case"iPhone2,1":n="iPhone";break;case"iPhone3,1":case"iPhone3,3":n="iPhone 4";break;case"iPhone4,1":n="iPhone 4S";break;case"iPhone5,1":case"iPhone5,2":n="iPhone 5";break;case"iPhone5,3":case"iPhone5,4":n="iPhone 5c";break;case"iPhone6,1":case"iPhone6,2":n="iPhone 5s";break;case"iPhone7,1":n="iPhone 6 Plus";break;case"iPhone7,2":n="iPhone 6";break;case"iPhone8,1":n="iPhone 6S";break;case"iPhone8,2":n="iPhone 6S Plus";break;case"iPhone8,4":n="iPhone SE";break;case"iPhone9,1":case"iPhone9,3":n="iPhone 7";break;case"iPhone9,2":case"iPhone9,4":n="iPhone 7 Plus";break;case"iPhone10,1":case"iPhone10,4":n="iPhone 8";break;case"iPhone10,2":case"iPhone10,5":n="iPhone 8 Plus";break;case"iPhone10,3":case"iPhone10,6":n="iPhone X";break;case"iPhone11,2":n="iPhone XS";break;case"iPhone11,6":case"iPhone11,4":n="iPhone XS Max";break;case"iPhone11,8":n="iPhone XR";break;case"iPhone12,1":n="iPhone 11";break;case"iPhone12,3":n="iPhone 11 Pro";break;case"iPhone12,5":n="iPhone 11 Pro Max";break;case"iPhone12,8":n="iPhone SE 2nd Gen";break;case"iPhone13,1":n="iPhone 12 Mini";break;case"iPhone13,2":n="iPhone 12";break;case"iPhone13,3":n="iPhone 12 Pro";break;case"iPhone13,4":n="iPhone 12 Pro Max";break;case"iPhone14,2":n="iPhone 13 Pro";break;case"iPhone14,3":n="iPhone 13 Pro Max";break;case"iPhone14,4":n="iPhone 13 Mini";break;case"iPhone14,5":n="iPhone 13";break;case"iPhone14,6":n="iPhone SE 3rd Gen";break;case"iPhone14,7":n="iPhone 14";break;case"iPhone14,8":n="iPhone 14 Plus";break;case"iPhone15,2":n="iPhone 14 Pro";break;case"iPhone15,3":n="iPhone 14 Pro Max";break;case"iPad1,1":case"iPad3,1":case"iPad3,4":case"iPad7,5":case"iPad7,6":case"iPad11,6":case"iPad11,7":n="iPad";break;case"iPad2,1":n="iPad 2";break;case"iPad2,5":case"iPad4,4":case"iPad4,5":case"iPad4,7":n="iPad Mini";break;case"iPad4,1":case"iPad4,2":case"iPad11,3":case"iPad11,4":case"iPad13,1":case"iPad13,2":n="iPad Air";break;case"iPad6,7":case"iPad6,8":case"iPad8,5":case"iPad8,6":case"iPad8,7":case"iPad8,8":case"iPad8,11":case"iPad8,12":case"iPad13,8":case"iPad13,9":case"iPad13,10":case"iPad13,11":n='iPad Pro (12.9")';break;case"iPad6,3":case"iPad6,4":n='iPad Pro (9.7")';break;case"iPad6,11":case"iPad6,12":n="iPad (2017)";break;case"iPad7,1":case"iPad7,2":n="iPad Pro 2nd Gen";break;case"iPad7,3":case"iPad7,4":n='iPad Pro (10.5")';break;case"iPad7,11":case"iPad7,12":n="iPad 7th Gen 10.2-inch";break;case"iPad8,1":case"iPad8,2":case"iPad8,3":case"iPad8,4":case"iPad8,9":case"iPad8,10":case"iPad13,4":case"iPad13,5":case"iPad13,6":case"iPad13,7":n='iPad Pro (11")';break;case"iPad11,1":case"iPad11,2":n="iPad mini";break;case"iPad12,1":case"iPad12,2":n="iPad 9th Gen";break;case"iPad13,16":case"iPad13,17":n="iPad Air 5th Gen";break;case"iPad13,18":case"iPad13,19":n="iPad 10th Gen";break;case"iPad14,1":case"iPad14,2":n="iPad mini 6th Gen";break;case"iPad14,3":case"iPad14,4":n="iPad Pro 11 inch 4th Gen";break;case"iPad14,5":case"iPad14,6":n="iPad Pro 12.9 inch 6th Gen"}return n},e}();e.DeviceModelConverter=t}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Password=0]="Password",e[e.Fingerprint=1]="Fingerprint",e[e.Pincode=2]="Pincode",e[e.Pattern=3]="Pattern",e[e.Otp=4]="Otp",e[e.Face=5]="Face",e[e.Voice=6]="Voice",e[e.Eye=7]="Eye",e[e.Emoji=8]="Emoji",e[e.Questions=9]="Questions",e[e.FaceID=10]="FaceID",e[e.Generic=11]="Generic",e[e.MobileApprove=12]="MobileApprove",e[e.Totp=13]="Totp",e[e.DeviceBiometrics=14]="DeviceBiometrics",e[e.Fido2=15]="Fido2"}(e.AuthenticatorType||(e.AuthenticatorType={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.RedirectTypeBind=0]="RedirectTypeBind",e[e.RedirectTypeAuthenticate=1]="RedirectTypeAuthenticate",e[e.RedirectTypeBindOrAuthenticate=2]="RedirectTypeBindOrAuthenticate",e[e.RedirectTypeInvokePolicy=3]="RedirectTypeInvokePolicy"}(e.RedirectType||(e.RedirectType={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n,o;t.AuthTypeData={password:{authTypeEnum:e.AuthenticatorType.Password,authTypeName:"Password"},fingerprint:{authTypeEnum:e.AuthenticatorType.Fingerprint,authTypeName:"Fingerprint"},pin:{authTypeEnum:e.AuthenticatorType.Pincode,authTypeName:"PIN"},pin_centralized:{authTypeEnum:e.AuthenticatorType.Pincode,authTypeName:"PIN"},pattern:{authTypeEnum:e.AuthenticatorType.Pattern,authTypeName:"Pattern"},pattern_centralized:{authTypeEnum:e.AuthenticatorType.Pattern,authTypeName:"Pattern"},otp:{authTypeEnum:e.AuthenticatorType.Otp,authTypeName:"OTP"},face:{authTypeEnum:e.AuthenticatorType.Face,authTypeName:"Face"},face_server:{authTypeEnum:e.AuthenticatorType.Face,authTypeName:"Face"},voice_server:{authTypeEnum:e.AuthenticatorType.Voice,authTypeName:"Voice"},eye:{authTypeEnum:e.AuthenticatorType.Eye,authTypeName:"Eye"},emoji:{authTypeEnum:e.AuthenticatorType.Emoji,authTypeName:"Emoji"},question:{authTypeEnum:e.AuthenticatorType.Questions,authTypeName:"Questions"},face_id:{authTypeEnum:e.AuthenticatorType.FaceID,authTypeName:"FaceID"},mobile_approve:{authTypeEnum:e.AuthenticatorType.MobileApprove,authTypeName:"MobileApprove"},totp:{authTypeEnum:e.AuthenticatorType.Totp,authTypeName:"Totp"},device_biometrics:{authTypeEnum:e.AuthenticatorType.DeviceBiometrics,authTypeName:"DeviceBiometrics"},fido2:{authTypeEnum:e.AuthenticatorType.Generic,authTypeName:"FIDO2Authenticator"}},function(e){e.Closed="closed"}(t.SessionStateChangeState||(t.SessionStateChangeState={})),t.flowIdHeaderName="flow_id",function(e){e.Pending="pending",e.Completed="completed",e.Rejected="rejected"}(t.AuthSessionState||(t.AuthSessionState={})),function(e){e.LOGINS="frequency_logins",e.DAYS="frequency_days"}(t.PromotionStrategyFrequency||(t.PromotionStrategyFrequency={})),function(e){e.Numeric="numeric",e.Alphanumeric="alphanumeric",e.Binary="binary"}(t.QrCodeFormatType||(t.QrCodeFormatType={})),function(e){e.Alphanumeric="alphanumeric",e.QrCode="qrcode"}(t.TicketIdFormatType||(t.TicketIdFormatType={})),function(e){e.ApprovalApprove="approval_approve"}(t.FailureSourceTransactionType||(t.FailureSourceTransactionType={})),function(e){e.AutoExecute="auto_execute",e.AssertionRejected="assertion_rejected",e.Policy="policy",e.Locked="locked",e.ApprovalExpired="approval_expired"}(t.FailureReasonType||(t.FailureReasonType={})),function(e){e.DefaultAuthenticator="default",e.AuthenticatorMenu="menu",e.FirstAuthenticator="first"}(t.AuthMenuPresentationMode||(t.AuthMenuPresentationMode={})),function(e){e.Registered="registered",e.Registering="registering",e.Unregistered="unregistered"}(t.AuthenticationMethodStatus||(t.AuthenticationMethodStatus={})),function(e){e.Validate="validate",e.Generate="generate"}(t.AuthenticationMethodOtpState||(t.AuthenticationMethodOtpState={})),function(e){e.None="none",e.Sms="sms",e.Email="email",e.Voice="voice",e.Push="push_notification"}(t.AuthenticationMethodOtpChannelType||(t.AuthenticationMethodOtpChannelType={})),function(e){e.Numeric="numeric",e.QrCode="qrcode",e.External="external",e.Unknown=""}(t.OtpFormatType||(t.OtpFormatType={})),function(e){e.WaitForApproval="wait_for_approval",e.WaitForAuthenticate="wait_for_authenticate"}(t.AuthenticationMethodMobileApproveState||(t.AuthenticationMethodMobileApproveState={})),function(e){e.AlphaNumeric="alpha_numeric",e.Numeric="numeric",e.QrCode="qrcode"}(t.TotpChallengeFormatType||(t.TotpChallengeFormatType={})),function(e){e.SelectTargets="select_targets",e.Validate="validate",e.Generate="generate"}(t.AuthenticationMethodTotpState||(t.AuthenticationMethodTotpState={})),function(e){e.RedirectTypeNameBind="bind",e.RedirectTypeNameAuthenticate="auth",e.RedirectTypeNameBindOrAuthenticate="bind_or_auth",e.RedirectTypeNameInvokePolicy="invoke"}(o=t.RedirectTypeName||(t.RedirectTypeName={})),t.RedirectTypeMap=((n={})[o.RedirectTypeNameBind]=e.RedirectType.RedirectTypeBind,n[o.RedirectTypeNameAuthenticate]=e.RedirectType.RedirectTypeAuthenticate,n[o.RedirectTypeNameBindOrAuthenticate]=e.RedirectType.RedirectTypeBindOrAuthenticate,n[o.RedirectTypeNameInvokePolicy]=e.RedirectType.RedirectTypeInvokePolicy,n),function(e){e[e.EncryptionStateError=23]="EncryptionStateError",e[e.UserIdTokenExpired=29]="UserIdTokenExpired",e[e.DeviceKeyExpired=2017]="DeviceKeyExpired"}(t.ServerResponseErrorCode||(t.ServerResponseErrorCode={})),function(e){e[e.NotRegistered=1]="NotRegistered",e[e.InvalidAction=2]="InvalidAction",e[e.BadConfig=3]="BadConfig",e[e.BadFch=4]="BadFch",e[e.FailedAssertion=5]="FailedAssertion",e[e.MethodLocked=6]="MethodLocked",e[e.DataMissing=7]="DataMissing",e[e.Internal=9]="Internal",e[e.HistoryRepeat=11]="HistoryRepeat",e[e.ExternalProcessPending=13]="ExternalProcessPending",e[e.MustRegister=14]="MustRegister",e[e.NotFinished=16]="NotFinished",e[e.MissingQuestions=17]="MissingQuestions",e[e.RepeatCurrentStep=18]="RepeatCurrentStep",e[e.FailOver=19]="FailOver",e[e.AssertionContainerNotComplete=20]="AssertionContainerNotComplete",e[e.AckRequired=22]="AckRequired"}(t.AssertionErrorCode||(t.AssertionErrorCode={})),function(e){e.Pending="pending",e.Approved="approved",e.Denied="declined",e.Expired="expired"}(t.ServerResponseDataApprovalsApprovalStatus||(t.ServerResponseDataApprovalsApprovalStatus={})),function(e){e.RecentlyUsed="recently_used",e.NoRecentActivity="no_recent_activity",e.LongInactivity="long_inactivity",e.Disabled="disabled",e.Removed="removed"}(t.DeviceStatusServerFormat||(t.DeviceStatusServerFormat={})),function(e){e.ErrorReasonAttestationReverificationFailed="attestation_verification_failed",e.ErrorReasonCredentialFiltered="credential_filtered"}(t.ServerResponseDataErrorReasonReasons||(t.ServerResponseDataErrorReasonReasons={})),function(e){e.Active="active",e.Disabled="disabled"}(t.CollectorState||(t.CollectorState={}))}(t.Protocol||(t.Protocol={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(){function n(){for(var e=[],t=0;t-1}))?t.properties:{}},n.prototype.replaceRefValues=function(){var e=this;null!=this._styleSheet.values&&this._styleSheet.styles&&this._styleSheet.styles.forEach((function(t){t.properties=e.replaceStyleProperties(t.properties)}))},n.prototype.replaceRef=function(e){return t.Protocol.isRefType(e)?this._styleSheet.values[e.ref]:e},n.prototype.replaceStyleProperties=function(e){var t=e;for(var n in e)t[n]=this.replaceRef(e[n]);return t},n}();t.UIStyleSheets=n}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n={hide:e.ActionEscapeOptionPresentation.Hide,action:e.ActionEscapeOptionPresentation.Action,cancel:e.ActionEscapeOptionPresentation.Cancel,custom:e.ActionEscapeOptionPresentation.Custom},o=function(){function e(e){this._id=e.id,this._displayName=e.display_name,this._presentation=n[e.presentation]}return e.prototype.getId=function(){return this._id},e.prototype.getDisplayName=function(){return this._displayName},e.prototype.getPresentation=function(){return this._presentation},e}();t.EscapeOptionImpl=o}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getDisplayName=function(){return this._displayName},n.prototype.setDisplayName=function(e){this._displayName=e},n.create=function(t){return e.ts.mobile.sdk.impl.Fido2InputResponseImpl.create(t)},n.__tarsusInterfaceName="Fido2InputResponse",n}(t.InputResponseType);t.Fido2InputResponse=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e){var n=new t;return n.setDisplayName(e),n},t}(e.Fido2InputResponse);t.Fido2InputResponseImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getPrompt=function(){return this._prompt},n.prototype.setPrompt=function(e){this._prompt=e},n.prototype.getCancelButtonTitle=function(){return this._cancelButtonTitle},n.prototype.setCancelButtonTitle=function(e){this._cancelButtonTitle=e},n.prototype.getFallbackButtonTitle=function(){return this._fallbackButtonTitle},n.prototype.setFallbackButtonTitle=function(e){this._fallbackButtonTitle=e},n.prototype.getFallbackControlRequestType=function(){return this._fallbackControlRequestType},n.prototype.setFallbackControlRequestType=function(e){this._fallbackControlRequestType=e},n.create=function(t){return e.ts.mobile.sdk.impl.FingerprintInputImpl.create(t)},n.createFallbackEnabledPrompt=function(t,n,o){return e.ts.mobile.sdk.impl.FingerprintInputImpl.createFallbackEnabledPrompt(t,n,o)},n.__tarsusInterfaceName="FingerprintInput",n}(t.InputResponseType);t.FingerprintInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.create=function(e){var t=new n;return e&&t.setPrompt(e),t},n.createFallbackEnabledPrompt=function(t,o,r){var i=new n;return t&&i.setPrompt(t),o&&i.setFallbackButtonTitle(o),r?i.setFallbackControlRequestType(r):i.setFallbackControlRequestType(e.ControlRequestType.SelectMethod),i},n}(e.FingerprintInput);t.FingerprintInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getJsonData=function(){return this._jsonData},t.prototype.setJsonData=function(e){this._jsonData=e},t.prototype.getControlRequest=function(){return this._controlRequest},t.prototype.setControlRequest=function(e){this._controlRequest=e},t.prototype.getActionEscapeRequest=function(){return this._actionEscapeRequest},t.prototype.setActionEscapeRequest=function(e){this._actionEscapeRequest=e},t.createFormInputSubmissionRequest=function(t){return e.ts.mobile.sdk.impl.FormInputImpl.createFormInputSubmissionRequest(t)},t.createFormCancellationRequest=function(){return e.ts.mobile.sdk.impl.FormInputImpl.createFormCancellationRequest()},t.createEscapeRequest=function(t,n){return e.ts.mobile.sdk.impl.FormInputImpl.createEscapeRequest(t,n)},t.__tarsusInterfaceName="FormInput",t}();t.FormInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.createFormInputSubmissionRequest=function(t){var o=new n;return o.setJsonData(t),o.setControlRequest(e.FormControlRequest.Submit),o},n.createFormCancellationRequest=function(){var t=new n;return t.setControlRequest(e.FormControlRequest.Abort),t},n.createEscapeRequest=function(t,o){var r=new n,i=new e.ActionEscapeRequest;return i.setEscapeOption(t),i.setEscapeParameters(o),r.setActionEscapeRequest(i),r.setControlRequest(e.FormControlRequest.Escape),r},n}(e.FormInput);t.FormInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){e.GeoLocation=function(){}}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getResponse=function(){return this._response},t.prototype.setResponse=function(e){this._response=e},t.prototype.getControlRequest=function(){return this._controlRequest},t.prototype.setControlRequest=function(e){this._controlRequest=e},t.prototype.getActionEscapeRequest=function(){return this._actionEscapeRequest},t.prototype.setActionEscapeRequest=function(e){this._actionEscapeRequest=e},t.createControlResponse=function(t){return e.ts.mobile.sdk.impl.InputOrControlResponseImpl.createControlResponse(t)},t.createEscapeResponse=function(t,n){return e.ts.mobile.sdk.impl.InputOrControlResponseImpl.createEscapeResponse(t,n)},t.createInputResponse=function(t){return e.ts.mobile.sdk.impl.InputOrControlResponseImpl.createInputResponse(t)},t.__tarsusInterfaceName="InputOrControlResponse",t}();t.InputOrControlResponse=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.createControlResponse=function(e){var t=new n;return t.setControlRequest(e),t},n.createInputResponse=function(e){var t=new n;return t.setResponse(e),t},n.createEscapeResponse=function(t,o){var r=new n;return r._actionEscapeRequest=new e.ActionEscapeRequest,r._actionEscapeRequest._escapeOption=t,r._actionEscapeRequest._escapeParameters=o,r},n.prototype.isControlRequest=function(){return!!this._controlRequest},n}(e.InputOrControlResponse);t.InputOrControlResponseImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getContinueProcessing=function(){return this._continueProcessing},t.prototype.setContinueProcessing=function(e){this._continueProcessing=e},t.create=function(t){return e.ts.mobile.sdk.impl.JsonDataProcessingResultImpl.create(t)},t.__tarsusInterfaceName="JsonDataProcessingResult",t}();t.JsonDataProcessingResult=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e){var n=new t;return n.setContinueProcessing(e),n},t}(e.JsonDataProcessingResult);t.JsonDataProcessingResultImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){function e(e){this.city=e.city,this.state=e.state,this.country=e.country}return e.prototype.getCity=function(){return this.city},e.prototype.getCountry=function(){return this.country},e.prototype.getState=function(){return this.state},e}();e.LocationAttributesImpl=t}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(){function n(e){this._deviceInfo=new t.DeviceInfoImpl(e)}return n.prototype.getInfo=function(){return this._deviceInfo},n.prototype.getAvailableActions=function(){if(this._deviceInfo.getStatus()==e.DeviceStatus.Removed)return[];var t=[e.DeviceManagementAction.Rename];return this._deviceInfo.getIsCurrent()||t.push(e.DeviceManagementAction.Remove),t},n}();t.ManagedDeviceImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(){function n(n){if(this._approval=new t.MobileApprovalImpl(n),this._approval.getStatus()===e.MobileApprovalStatus.Pending)this._availableActions=[e.MobileApprovalAction.Approve,e.MobileApprovalAction.Deny];else this._availableActions=[]}return n.prototype.getApproval=function(){return this._approval},n.prototype.getAvailableActions=function(){return this._availableActions},n}();t.ManagedMobileApprovalImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(){function n(n){if(this._originDevice=null,this._approvalId=n.approval_id,this._source=n.source,this._title=n.title,this._details=n.details,this._creationTime=n.create,this._finishTime=n.finish,this._expiresAt=n.create+1e3*n.expiry_in,this._originAppId=n.origin_app_id,this._customParams=n.custom_params,n.origin_device&&(this._originDevice=e.TargetDeviceDetailsImpl.fromServerFormat(n.origin_device)),n.location){var o=new e.GeoLocation;o.longitude=n.location.lng,o.latitude=n.location.lat,this._location=o}switch(n.status){case e.core.Protocol.ServerResponseDataApprovalsApprovalStatus.Approved:this._status=e.MobileApprovalStatus.Approved;break;case e.core.Protocol.ServerResponseDataApprovalsApprovalStatus.Denied:this._status=e.MobileApprovalStatus.Denied;break;case e.core.Protocol.ServerResponseDataApprovalsApprovalStatus.Expired:this._status=e.MobileApprovalStatus.Expired;break;case e.core.Protocol.ServerResponseDataApprovalsApprovalStatus.Pending:this._status=e.MobileApprovalStatus.Pending;break;default:throw new t.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Unknown approval status "+n.status)}}return n.prototype.getApprovalId=function(){return this._approvalId},n.prototype.getSource=function(){return this._source},n.prototype.getTitle=function(){return this._title},n.prototype.getDetails=function(){return this._details},n.prototype.getCreationTime=function(){return this._creationTime},n.prototype.getFinishTime=function(){return this._finishTime},n.prototype.getExpiresAt=function(){return this._expiresAt},n.prototype.getOriginAppId=function(){return this._originAppId},n.prototype.getOriginDevice=function(){return this._originDevice},n.prototype.getLocation=function(){return this._location},n.prototype.getCustomParams=function(){return this._customParams},n.prototype.getStatus=function(){return this._status},n.prototype.isExpired=function(){return this._status==e.MobileApprovalStatus.Expired},n.prototype.updateStatus=function(e){this._status=e},n}();t.MobileApprovalImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.__tarsusInterfaceName="MobileApproveInput",t}(e.InputResponseType);e.MobileApproveInput=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getPollingTimeout=function(){return this._pollingTimeout},n.prototype.setPollingTimeout=function(e){this._pollingTimeout=e},n.createRequestPollingInput=function(){return e.ts.mobile.sdk.impl.MobileApproveInputRequestPollingImpl.createRequestPollingInput()},n.createRequestLongPollingInput=function(t){return e.ts.mobile.sdk.impl.MobileApproveInputRequestPollingImpl.createRequestLongPollingInput(t)},n.__tarsusInterfaceName="MobileApproveInputRequestPolling",n}(t.MobileApproveInput);t.MobileApproveInputRequestPolling=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.createRequestPollingInput=function(){var e=new t;return e.setPollingTimeout(0),e},t.createRequestLongPollingInput=function(e){var n=new t;return n.setPollingTimeout(e),n},t}(e.MobileApproveInputRequestPolling);t.MobileApproveInputRequestPollingImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(){function t(e,t,n){this.value=e,this.format=t,this.alt=n}return t.prototype.getValue=function(){return this.value},t.prototype.getFormat=function(){return this.format},t.prototype.getQrAlternativeRepresentation=function(){return this.alt},t.createFromServerFormat=function(n){var o=e.OtpFormatImpl.fromAssertionFormat(n.format),r=null;return(n.alt||[]).forEach((function(e){"qr_text"===e.type&&(r=e.value)})),new t(n.value,o,r)},t}();t.MobileApproveOtpImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t,n;t=e.impl||(e.impl={}),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.userId=function(){return this._userId},t.prototype.title=function(){return this._title},t.prototype.body=function(){return this._body},t.prototype.source=function(){return this._source},t.prototype.ticket=function(){return this._ticket},t.createWithUserId=function(e){var n=new t;return n._userId=e,n},t.createWithUserTicket=function(e){var n=new t;return n._userId=e,n},t.createWithJsonPayload=function(e){var n=e,o=new t;return o._userId=n.user_id,o._title=n.body,o._body=n.details,o._source=n.source,o},t}(e.MobileApprovePushRequestPayload),t.MobileApprovePushRequestPayloadImpl=n}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getPrompt=function(){return this._prompt},n.prototype.setPrompt=function(e){this._prompt=e},n.prototype.getCancelButtonTitle=function(){return this._cancelButtonTitle},n.prototype.setCancelButtonTitle=function(e){this._cancelButtonTitle=e},n.prototype.getFallbackButtonTitle=function(){return this._fallbackButtonTitle},n.prototype.setFallbackButtonTitle=function(e){this._fallbackButtonTitle=e},n.prototype.getFallbackControlRequestType=function(){return this._fallbackControlRequestType},n.prototype.setFallbackControlRequestType=function(e){this._fallbackControlRequestType=e},n.create=function(t){return e.ts.mobile.sdk.impl.NativeFaceInputImpl.create(t)},n.createFallbackEnabledPrompt=function(t,n,o){return e.ts.mobile.sdk.impl.NativeFaceInputImpl.createFallbackEnabledPrompt(t,n,o)},n.__tarsusInterfaceName="NativeFaceInput",n}(t.InputResponseType);t.NativeFaceInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.create=function(e){var t=new n;return e&&t.setPrompt(e),t},n.createFallbackEnabledPrompt=function(t,o,r){var i=new n;return t&&i.setPrompt(t),o&&i.setFallbackButtonTitle(o),r?i.setFallbackControlRequestType(r):i.setFallbackControlRequestType(e.ControlRequestType.SelectMethod),i},n}(e.NativeFaceInput);t.NativeFaceInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(){function t(){}return t.fromAssertionFormat=function(t){switch(t.type){case e.core.Protocol.OtpFormatType.Numeric:return new n(t.length);case e.core.Protocol.OtpFormatType.QrCode:return new o;case e.core.Protocol.OtpFormatType.External:return new i(t.data);default:throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Invalid format type encountered: "+t.type)}},t}();e.OtpFormatImpl=t;var n=function(){function e(e){this._length=e}return e.prototype.getOtpLength=function(){return this._length},e.prototype.getType=function(){return r.Numeric},e.__tarsusInterfaceName="OtpFormatNumeric",e}();e.OtpFormatNumericImpl=n;var o=function(){function e(){}return e.prototype.getType=function(){return r.QrCode},e.__tarsusInterfaceName="OtpFormatQr",e}();e.OtpFormatQrImpl=o;var r,i=function(){function e(e){this._data=e}return e.prototype.getData=function(){return this._data},e.prototype.getType=function(){return r.External},e.__tarsusInterfaceName="OtpFormatExternal",e}();e.OtpFormatExternalImpl=i,function(e){e[e.Numeric=0]="Numeric",e[e.QrCode=1]="QrCode",e[e.External=2]="External"}(r=e.OtpFormatType||(e.OtpFormatType={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getOtp=function(){return this._otp},n.prototype.setOtp=function(e){this._otp=e},n.createOtpSubmission=function(t){return e.ts.mobile.sdk.impl.OtpInputOtpSubmissionImpl.createOtpSubmission(t)},n.__tarsusInterfaceName="OtpInputOtpSubmission",n}(t.OtpInput);t.OtpInputOtpSubmission=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.createOtpSubmission=function(e){var n=new t;return n.setOtp(e),n},t}(e.OtpInputOtpSubmission);t.OtpInputOtpSubmissionImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.createOtpResendRequest=function(){return e.ts.mobile.sdk.impl.OtpInputRequestResendImpl.createOtpResendRequest()},n.__tarsusInterfaceName="OtpInputRequestResend",n}(t.OtpInput);t.OtpInputRequestResend=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.createOtpResendRequest=function(){return new t},t}(e.OtpInputRequestResend);t.OtpInputRequestResendImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.__tarsusInterfaceName="OtpPushRequestPayload",t}(e.PushRequestPayload);e.OtpPushRequestPayload=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t,n;t=e.impl||(e.impl={}),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.userId=function(){return this._userId},t.prototype.title=function(){return this._title},t.prototype.body=function(){return this._body},t.createWithJsonPayload=function(e){var n=e,o=new t;return o._userId=n.user_id,o._title=n.title,o._body=n.body,o},t}(e.OtpPushRequestPayload),t.OtpPushRequestPayloadImpl=n}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getPassword=function(){return this._password},n.prototype.setPassword=function(e){this._password=e},n.create=function(t){return e.ts.mobile.sdk.impl.PasswordInputImpl.create(t)},n.__tarsusInterfaceName="PasswordInput",n}(t.InputResponseType);t.PasswordInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e){var n=new t;return n.setPassword(e),n},t}(e.PasswordInput);t.PasswordInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getPatternDescription=function(){return this._patternDescription},n.prototype.setPatternDescription=function(e){this._patternDescription=e},n.create=function(t){return e.ts.mobile.sdk.impl.PatternInputImpl.create(t)},n.__tarsusInterfaceName="PatternInput",n}(t.InputResponseType);t.PatternInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(n){function o(){return null!==n&&n.apply(this,arguments)||this}return V(o,n),o.create=function(e){var t=new o;return t.setPatternDescription(e),t},o.validateFormat=function(e){return null!=e.getPatternDescription().match(/^(r:[0-9]+,c:[0-9]+)+£/)},o.getPatternLength=function(n){if(o.validateFormat(n))return n.getPatternDescription().match(/r/g).length;throw new t.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Invalid pattern input.")},o}(e.PatternInput);t.PatternInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getPin=function(){return this._pin},n.prototype.setPin=function(e){this._pin=e},n.create=function(t){return e.ts.mobile.sdk.impl.PinInputImpl.create(t)},n.__tarsusInterfaceName="PinInput",n}(t.InputResponseType);t.PinInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e){var n=new t;return n.setPin(e),n},t}(e.PinInput);t.PinInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.createSuccessResponse=function(t){var n=new e.PlaceholderAuthSuccessResponse;return n.setPlaceholderToken(t),n},n.createdFailedResponse=function(t,n){var o=new e.PlaceholderAuthFailureResponse;return o.setFailureError(n),o.setExpired(t.getExpired()),o.setLocked(t.getLocked()),o.setRegistered(t.getRegistered()),o.setRegistrationStatus(t.getRegistrationStatus()),o},n.createFailedResponseWithServerProvidedStatus=function(t){var n=new e.PlaceholderAuthFailureWithServerProvidedStatusResponse;return n.setFailureError(t),n},n}(e.PlaceholderInputResponse);t.PlaceholderInputResponseImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){};function n(e){return!!e.createContinuation}e.Continuation=t,e.IsResumableProcess=n;var o=function(){function e(e,t){this._ctxt=e}return Object.defineProperty(e.prototype,"rtContext",{get:function(){return this._ctxt},enumerable:!1,configurable:!0}),e.prototype.resume=function(e,t){return e instanceof s?(this._currentStep=e.currentStepContinuation.createResumableProcess(this),this.pumpSteps(this._currentStep.resume(e.currentStepContinuation,t))):Promise.reject("Attempt to resume a MultiStageResumableProcess with a bad continuation class.")},e.prototype.startWithStage=function(e){return this._currentStep=e,this.pumpSteps(e.run())},e.prototype.pumpSteps=function(e){var t=this;return e.then((function(e){return i(e)?(t._currentStep=e,t.pumpSteps(e.run())):e}))},e}();e.MultiStageResumableProcess=o;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t}(t);function i(e){return n(e)&&e.run}e.ResumableProcessStageContinuation=r,e.IsResumableProcessStage=i;var s=function(t){function n(n){var o=t.call(this)||this;return n instanceof e.SerializationContext?o.serializeFrom(n):o._currentStepContinuation=n._currentStep.createContinuation(),o}return V(n,t),n.prototype.serializeTo=function(e){e.writeObject("currentStepContinuation",this._currentStepContinuation)},n.prototype.serializeFrom=function(e){this._currentStepContinuation=e.readNonNullObject("currentStepContinuation")},Object.defineProperty(n.prototype,"currentStepContinuation",{get:function(){return this._currentStepContinuation},enumerable:!1,configurable:!0}),n}(t);e.MultiStageResumableProcessContinuation=s}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n=function(){function t(e,t){this._controlFlowProcessor=e,this._action=t,this._sdk=this._controlFlowProcessor._sdk,this._uiHandler=this._controlFlowProcessor._uiHandler,this._clientContext=this._controlFlowProcessor._clientContext}return t.prototype.cancelRun=function(){},t.prototype.policyAction=function(){return this._policyAction||(this._policyAction=e.impl.PolicyActionImpl.fromServerAction(this._controlFlowProcessor,this._action)),this._policyAction},t.prototype.processEscapeRequest=function(t){var n=this;return new Promise((function(o,r){var i=t.getEscapeOption().getId();n._sdk.log(e.LogLevel.Debug,(function(){return"Processing escape reques "+i}));for(var s=n._policyAction.getEscapeOptions(),a=!1,c=0;c=0;c--)(i=e[c])&&(a=(s<3?i(a):s>3?i(t,n,a):i(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},J=m&&m.__metadata||function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":o(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};!function(e){!function(e){!function(e){var t;!function(e){var n=function(){};e.ControlFlowProcessorRuntimeContext=n;var o=function(){function n(n,o,r,i,s){if(n instanceof e.SerializationContext)this.serializeFrom(n);else{if(!(o&&r&&void 0!==i&&s))throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Invalid arguments passed to ControlFlowProcessorContinuation ctor");this._initiatingRequest=n,this._initialCflowResponse=o,this._controlFlow=r,this._currentControlFlowStep=i,this._actionContinuation=s.createContinuation()}}return Object.defineProperty(n.prototype,"initiatingRequest",{get:function(){return this._initiatingRequest},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"initialCflowResponse",{get:function(){return this._initialCflowResponse},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"controlFlow",{get:function(){return this._controlFlow},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"currentControlFlowStep",{get:function(){return this._currentControlFlowStep},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"actionContinuation",{get:function(){return this._actionContinuation},enumerable:!1,configurable:!0}),n.prototype.createResumableProcess=function(e){return new r(e)},n.prototype.serializeTo=function(e){e.writeObject("intiatingRequest",this._initiatingRequest),e.writePrimitive("initialCflowResponse",this._initialCflowResponse),e.writePrimitive("controlFlow",this._controlFlow),e.writePrimitive("currentControlFlowStep",this._currentControlFlowStep),e.writeObject("actionContinuation",this._actionContinuation)},n.prototype.serializeFrom=function(t){this._initiatingRequest=t.readObject(e.SessionExchangeRequest,"intiatingRequest"),this._initialCflowResponse=t.readPrimitive("initialCflowResponse"),this._controlFlow=t.readPrimitive("controlFlow"),this._currentControlFlowStep=t.readPrimitive("currentControlFlowStep"),this._actionContinuation=t.readNonNullObject("actionContinuation")},G([e.Serializable("ControlFlowProcessorContinuation"),J("design:paramtypes",[Object,Object,Array,Number,e.actiondrivers.ResumableProcessActionDriver])],n)}(),r=function(){function r(e,t,o,r){if(this._cancelled=!1,!(e instanceof n)){var i=e;(e=new n).sdk=i,e.cflowRequestContext=r||null,e.clientContext=o,e.session=t,e.uiHandler=i.currentUiHandler}this._sdk=e.sdk,this._session=e.session,this._uiHandler=e.uiHandler,this._clientContext=e.clientContext,this._requestContext=e.cflowRequestContext}return r.findByClientContext=function(e){var t=r._allRunningControlFlows.filter((function(t){return t._clientContext==e}));return t.length?t[0]:null},r.prototype.createContinuation=function(){if(this._cancelled)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Cannot create continuation for cancelled control flow");if(!this._currentActionDriver)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Cannot create continuation for control flow without current action");if(this._currentActionDriver instanceof e.actiondrivers.ResumableProcessActionDriver)return new o(this._initiatingRequest,this._initialCflowResponse,this._controlFlow,this._currentControlFlowStep,this._currentActionDriver);throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Cannot create continuation for control flow running current action "+this._currentActionDriver._action.type)},Object.defineProperty(r.prototype,"sdk",{get:function(){return this._sdk},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"initiatingRequest",{get:function(){return this._initiatingRequest},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"requestContext",{get:function(){return this._requestContext},enumerable:!1,configurable:!0}),r.prototype.cancelFlow=function(){this._cancelled=!0,this._currentActionDriver&&this._currentActionDriver.cancelRun(),this._uiHandler.controlFlowCancelled(this._clientContext)},r.prototype.startControlFlow=function(n){var o,r=this;if(this._cancelled)return this.createExternalCancellationRejectionPromise();var i=null;return n instanceof e.SessionExchangeRequest?(i=n,o=t.util.wrapPromiseWithActivityIndicator(this._uiHandler,null,this._clientContext,this._session.performSessionExchange(n))):o=this._session.processInlineResponse(n),o.then((function(e){return r._initialCflowResponse=e.data,r._initiatingRequest=i,r.executeControlFlow(r._initialCflowResponse)}))},r.prototype.resume=function(n,r){var i=this;return new Promise((function(s,a){if(!(n instanceof o))throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Invalid continuation type provided to resume()");i._initiatingRequest=n.initiatingRequest,i._initialCflowResponse=n.initialCflowResponse,i._controlFlow=n.controlFlow,i._currentControlFlowStep=n.currentControlFlowStep;var c=new e.actiondrivers.ResumableProcessActionDriverRuntimeContext;c.controlFlowProcessor=i;var u=n.actionContinuation.createResumableProcess(c);i._currentActionDriver=u,u.resume(n.actionContinuation,r).then((function(e){return i.executeControlFlow(e)})).then(s,a)}))},Object.defineProperty(r.prototype,"challenge",{get:function(){return this._initialCflowResponse&&this._initialCflowResponse.challenge||null},enumerable:!1,configurable:!0}),r.prototype.executeControlFlow=function(e){var t=this;return new Promise((function(n,o){r._allRunningControlFlows.push(t),t._uiHandler.controlFlowStarting(t._clientContext),t.processSingleStepExchange(e).then((function(e){return t._uiHandler.controlFlowEnded(null,t._clientContext),e}),(function(e){throw t._uiHandler.controlFlowEnded(e,t._clientContext),e})).finally((function(){var e=r._allRunningControlFlows.indexOf(t);r._allRunningControlFlows.splice(e,1)})).then(n,o)}))},r.prototype.processSingleStepExchange=function(n){var o,r=this;return n.control_flow&&(this._controlFlow=n.control_flow,this._currentControlFlowStep=0,this._sdk.log(t.LogLevel.Debug,(function(){return"Got ControlFlow with "+r._controlFlow.length+" steps."}))),n.data&&n.data.json_data?(this._sdk.log(t.LogLevel.Debug,(function(){return"Got a JSON data attachment on control flow response. Processing."})),o=e.actiondrivers.ActionDriverJsonData.handleJsonDataByUiHandler(this._uiHandler,n,n.data.json_data,null,this._clientContext)):o=Promise.resolve(n),o.then((function(o){switch(n.state){case e.Protocol.AuthSessionState.Pending:return r._sdk.log(t.LogLevel.Debug,(function(){return"Execute step "+r._currentControlFlowStep+"."})),(i=r._controlFlow[r._currentControlFlowStep])?r._cancelled?r.createExternalCancellationRejectionPromise():r.promiseCancellableSingleActionProcessing(i).then((function(e){return r._currentControlFlowStep++,r.processSingleStepExchange(e)})):(r._sdk.log(t.LogLevel.Error,(function(){return"Step "+r._currentControlFlowStep+" nonexisting."})),Promise.reject(new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Session state is pending but no control flow.")));case e.Protocol.AuthSessionState.Rejected:r._sdk.log(t.LogLevel.Debug,(function(){return"Handle control flow rejection."}));var i=r._controlFlow&&r._controlFlow[r._currentControlFlowStep]||null;return r._uiHandler.handlePolicyRejection(n.rejection_data&&n.rejection_data.title||null,n.rejection_data&&n.rejection_data.text||null,n.rejection_data&&n.rejection_data.button_text||null,n.failure_data,i?t.impl.PolicyActionImpl.fromServerAction(r,i):t.impl.PolicyActionImpl.createPseudoAction(r._sdk,"rejection"),r._clientContext).then((function(e){if(-1!=e.getUserChoice())throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.AppImplementation,"ConfirmationInput.getUserChoice must be set to -1.");throw t.impl.AuthenticationErrorImpl.errorForSessionRejectionFailureData(n.failure_data)}));case e.Protocol.AuthSessionState.Completed:return r._sdk.log(t.LogLevel.Debug,(function(){return"Handle control flow completion."})),Promise.resolve(t.impl.AuthenticationResultImpl.fromCflowServerResponse(n,r._session.deviceId()))}}))},r.prototype.promiseCancellableSingleActionProcessing=function(n){var o=this,r=e.actiondrivers.ActionDrivers[n.type];if(!r)return Promise.reject(new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Don't know how to handle action.",{actionType:n.type}));var i=new r(this,n);return this._currentActionDriver=i,this._uiHandler.controlFlowActionStarting(i.policyAction(),this._clientContext),i.run().then((function(e){return o._uiHandler.controlFlowActionEnded(null,i.policyAction(),o._clientContext),e}),(function(e){var r=t.impl.AuthenticationErrorImpl.augmentErrorData(e,{});throw r.setPublicProperty(t.AuthenticationErrorProperty.AuthenticationErrorFailingActionType,n.type),o._uiHandler.controlFlowActionEnded(r,i.policyAction(),o._clientContext),r})).finally((function(){o._currentActionDriver=null}))},r.prototype.createAssertionRequest=function(n,o,r,i){var s;if(!this.challenge)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Attempt to create an assertion request without an initial control flow request.");var a={action:n.type,assert:o||"action",assertion_id:n.assertion_id,fch:this.challenge};if(r&&(a.data=r),i){var c=a;for(var u in i)c[u]=i[u]}return new e.SessionExchangeRequest("POST","auth/assert",a,[],null===(s=this.requestContext)||void 0===s?void 0:s.getFlowId())},r.prototype.createPollingRequest=function(t,n){var o,r={};return Object.keys(t).forEach((function(e){r[e]=t[e]})),r.polling_timeout=n,new e.SessionExchangeRequest("POST","auth/poll",r,[],null===(o=this.requestContext)||void 0===o?void 0:o.getFlowId())},r.prototype.createExternalCancellationRejectionPromise=function(){return Promise.reject(this.createExternalCancellationError())},r.prototype.createExternalCancellationError=function(){return new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.UserCanceled,"Operation cancelled by user.",{control_flow_external_cancellation:!0})},r.prototype.generateDebugPin=function(){var t=this;return new Promise((function(n,o){var r=new e.SessionExchangeRequest("POST","auth/create_debug_token",{},[]);t._session.performSessionExchange(r).then((function(e){return e.data.debug_pin})).then(n,o)}))},r._allRunningControlFlows=[],r}();e.ControlFlowProcessor=r}((t=e.sdk||(e.sdk={})).core||(t.core={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t,n,o;o=e.sdk||(e.sdk={}),t=o.impl||(o.impl={}),n=function(){function e(e,n,o,r,i,s){void 0===r&&(r=!1),void 0===i&&(i=null),void 0===s&&(s=null),this._isPseudoAction=!1,this._escapeOptions=[],this._actionType=n,this._isPseudoAction=r,this._actionLocalStrings=i,this._actionLocalStyles=s,this._uiContextImpl=new t.UIContextImpl(e,this._actionLocalStrings||void 0,this._actionLocalStyles),this._controlFlow=o}return e.prototype.getIsPseudoAction=function(){return this._isPseudoAction},e.prototype.getActionType=function(){return this._actionType},e.prototype.getAltLabel=function(){return""},e.prototype.getUiContext=function(){return this._uiContextImpl},e.prototype.getEscapeOptions=function(){return this._escapeOptions},e.prototype.escapeOptionById=function(e){var n=null;if(this._escapeOptions.forEach((function(t){t.getId()===e&&(n=t)})),!n)throw new t.AuthenticationErrorImpl(o.AuthenticationErrorCode.AppImplementation,"Invalid escape ID "+e+" for this action.");return n},Object.defineProperty(e.prototype,"controlFlow",{get:function(){return this._controlFlow},enumerable:!1,configurable:!0}),e.fromServerAction=function(n,o){var r=new e(n.sdk,o.type,n,!1,o.strings,o.styles);return o.escapes&&(r._escapeOptions=o.escapes.map((function(e){return new t.EscapeOptionImpl(e)}))),r},e.createPseudoAction=function(t,n){return new e(t,n,null,!0)},e}(),t.PolicyActionImpl=n}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getControlRequest=function(){return this._controlRequest},t.prototype.setControlRequest=function(e){this._controlRequest=e},t.prototype.getSelectedAuthenticator=function(){return this._selectedAuthenticator},t.prototype.setSelectedAuthenticator=function(e){this._selectedAuthenticator=e},t.prototype.getActionEscapeRequest=function(){return this._actionEscapeRequest},t.prototype.setActionEscapeRequest=function(e){this._actionEscapeRequest=e},t.createControlResponse=function(t){return e.ts.mobile.sdk.impl.PromotionInputImpl.createControlResponse(t)},t.createEscapeRequest=function(t,n){return e.ts.mobile.sdk.impl.PromotionInputImpl.createEscapeRequest(t,n)},t.createAuthenticatorDescription=function(t){return e.ts.mobile.sdk.impl.PromotionInputImpl.createAuthenticatorDescription(t)},t.__tarsusInterfaceName="PromotionInput",t}();t.PromotionInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.isControlRequest=function(){return!(void 0===this._controlRequest||null===this._controlRequest)},n.createControlResponse=function(e){var t=new n;return t.setControlRequest(e),t},n.createAuthenticatorDescription=function(e){var t=new n;return t.setSelectedAuthenticator(e),t},n.createEscapeRequest=function(t,o){var r=new n;return r._actionEscapeRequest=new e.ActionEscapeRequest,r._actionEscapeRequest._escapeOption=t,r._actionEscapeRequest._escapeParameters=o,r},n}(e.PromotionInput);t.PromotionInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(){function t(){}return t.fromAssertionFormat=function(t){switch(t){case e.core.Protocol.QrCodeFormatType.Numeric:return e.QrCodeFormat.Numeric;case e.core.Protocol.QrCodeFormatType.Alphanumeric:return e.QrCodeFormat.Alphanumeric;case e.core.Protocol.QrCodeFormatType.Binary:return e.QrCodeFormat.Binary;default:throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Invalid qr code format type encountered: "+t.type)}},t}();e.QrCodeFormatImpl=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getQrCode=function(){return this._qrCode},t.prototype.getQrCodeFormat=function(){return this._qrCodeFormat},t.createQrCodeResult=function(t,n){return e.ts.mobile.sdk.impl.QrCodeResultImpl.createQrCodeResult(t,n)},t.__tarsusInterfaceName="QrCodeResult",t}();t.QrCodeResult=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.createQrCodeResult=function(e,n){var o=new t;return o._qrCode=e,o._qrCodeFormat=n,o},t}(e.QrCodeResult);t.QrCodeResultImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getRedirectResponse=function(){return this._redirectResponse},t.prototype.setRedirectResponse=function(e){this._redirectResponse=e},t.prototype.getAdditionalParametersOverride=function(){return this._additionalParametersOverride},t.prototype.setAdditionalParametersOverride=function(e){this._additionalParametersOverride=e},t.create=function(t){return e.ts.mobile.sdk.impl.RedirectInputImpl.create(t)},t.__tarsusInterfaceName="RedirectInput",t}();t.RedirectInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e){var n=new t;return n.setRedirectResponse(e),n},t}(e.RedirectInput);t.RedirectInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getServerAddress=function(){return this._serverAddress},t.prototype.setServerAddress=function(e){this._serverAddress=e},t.prototype.getRealm=function(){return this._realm},t.prototype.setRealm=function(e){this._realm=e},t.prototype.getAppId=function(){return this._appId},t.prototype.setAppId=function(e){this._appId=e},t.prototype.getTokenName=function(){return this._tokenName},t.prototype.setTokenName=function(e){this._tokenName=e},t.prototype.getToken=function(){return this._token},t.prototype.setToken=function(e){this._token=e},t.prototype.getCryptoMode=function(){return this._cryptoMode},t.prototype.setCryptoMode=function(e){this._cryptoMode=e},t.create=function(t,n,o,r){return e.ts.mobile.sdk.impl.SDKConnectionSettingsImpl.create(t,n,o,r)},t.createWithCryptoMode=function(t,n,o,r,i){return e.ts.mobile.sdk.impl.SDKConnectionSettingsImpl.createWithCryptoMode(t,n,o,r,i)},t.__tarsusInterfaceName="SDKConnectionSettings",t}();t.SDKConnectionSettings=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.create=function(t,n,o,r){return this.createWithCryptoMode(t,n,o,r,e.ConnectionCryptoMode.None)},n.createWithCryptoMode=function(e,t,o,r,i){var s=new n;return s.setServerAddress(e),s.setAppId(t),s.setTokenName(o),s.setToken(r),s.setCryptoMode(i),s},n.prototype.setSendFlowIdAsHttpHeader=function(e){this.sendFlowIdAsHttpHeader=e},n.prototype.shouldSendFlowIdAsHttpHeader=function(){return this.sendFlowIdAsHttpHeader},n}(e.SDKConnectionSettings);t.SDKConnectionSettingsImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getQrCodeResult=function(){return this._qrCodeResult},n.prototype.setQrCodeResult=function(e){this._qrCodeResult=e},n.createScanQrCodeInput=function(t){return e.ts.mobile.sdk.impl.ScanQrCodeInputImpl.createScanQrCodeInput(t)},n.__tarsusInterfaceName="ScanQrCodeInput",n}(t.InputResponseType);t.ScanQrCodeInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.createScanQrCodeInput=function(e){var n=new t;return n.setQrCodeResult(e),n},t}(e.ScanQrCodeInput);t.ScanQrCodeInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.createAnswerToQuestion=function(e,n){var o=new t;return o._question=e,o._answer=n,o._isRemoved=!1,o},t.createAnswerRemovalRequest=function(e){var n=new t;return n._question=e,n._isRemoved=!0,n},t}(e.SecurityQuestionAndAnswer);t.SecurityQuestionAndAnswerImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.createWithText=function(e){var n=new t;return n._answerText=e,n},t}(e.SecurityQuestionAnswer);t.SecurityQuestionAnswerImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){function e(e,t,n){this._id=e,this._text=t,this._registered=n}return e.prototype.getSecurityQuestionId=function(){return this._id},e.prototype.getSecurityQuestionText=function(){return this._text},e.prototype.getAnswered=function(){return this._registered},e.__tarsusInterfaceName="SecurityQuestion",e}();e.SecurityQuestionImpl=t}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.createSecurityQuestionAnswersInputResponse=function(t){var n=new e.SecurityQuestionAnswersInputResponse;return n._answers=t,n},n}(e.SecurityQuestionInputResponse);t.SecurityQuestionInputResponseImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){function e(){}return e.prototype.getStepTag=function(){return"question"},e.prototype.getSecurityQuestions=function(){return this._securityQuestions},e.prototype.getMinAnswersNeeded=function(){return this._minAnswers},e.prototype.getMaxAnswerLength=function(){return this._maxAnswerLength},e.prototype.getMinAnswerLength=function(){return this._minAnswerLength},e.createForAuthQuestion=function(t){var n=new e;return n._minAnswers=1,n._securityQuestions=[t],n._maxAnswerLength=-1,n._minAnswerLength=-1,n},e.createForRegistrationQuestions=function(t,n,o,r){var i=new e;return i._minAnswers=n,i._securityQuestions=t,i._maxAnswerLength=o,i._minAnswerLength=r,i},e.__tarsusInterfaceName="SecurityQuestionStepDescription",e}();e.SecurityQuestionStepDescriptionImpl=t}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){var t="undefined"!=typeof window?window:t;t.com=e}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){function e(e){this._hex=e.hex||"",e.alpha&&(this._hex=this._hex.slice(0,1)+this.convertAlpha(e.alpha)+this._hex.slice(1))}return e.prototype.getHexValue=function(){return this._hex},e.prototype.convertAlpha=function(e){return Math.ceil(255*e).toString(16)},e}();e.TSColorImpl=t}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(t,n){var o=e.call(this)||this;return n&&(o._selectedTargets=n),t&&(o._authenticatorInput=t),o}return V(t,e),t.createAuthenticatorInput=function(e){return new t(e,null)},t.createTargetSelectionRequest=function(e){return new t(null,[e])},t.createTargetsSelectionRequest=function(e){return new t(null,e)},t}(e.TargetBasedAuthenticatorInput);t.TargetBasedAuthenticatorInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(){function t(t,n,o,r,i,s,a){this._deviceId=t,this._model=e.core.DeviceModelConverter.getDeviceModel(n,i),this._isCurrentDevice=r,this._osType=e.core.DeviceModelConverter.getOsName(i),this._osVersion=s,this._lastAccessed=o,this._alias=a}return t.prototype.getDeviceId=function(){return this._deviceId},t.prototype.getModel=function(){return this._model},t.prototype.getLastAccessed=function(){return this._lastAccessed},t.prototype.getIsCurrent=function(){return this._isCurrentDevice},t.prototype.getOsType=function(){return this._osType},t.prototype.getOsVersion=function(){return this._osVersion},t.prototype.getAlias=function(){return this._alias},t.prototype.describe=function(){var e=new Date(this._lastAccessed).toLocaleDateString();return(this._alias?this._alias+" : ":"")+this._model+" last accessed on "+e},t.fromServerFormat=function(e){return new t(e.device_id,e.model,e.last_access,e.current_device,e.os_type,e.os_version,e.alias||null)},t}();e.TargetDeviceDetailsImpl=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.createPollRequest=function(){return e.ts.mobile.sdk.impl.TicketWaitInputImpl.createPollRequest()},n.createLongPollRequest=function(t){return e.ts.mobile.sdk.impl.TicketWaitInputImpl.createLongPollRequest(t)},n.__tarsusInterfaceName="TicketWaitInput",n}(t.InputResponseType);t.TicketWaitInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.getPollingTimeout=function(){return this._pollingTimeout},t.prototype.setPollingTimeout=function(e){this._pollingTimeout=e},t.__tarsusInterfaceName="TicketWaitInputPollRequest",t}(e.TicketWaitInput);e.TicketWaitInputPollRequest=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.createPollRequest=function(){var e=new o;return e.setPollingTimeout(0),e},t.createLongPollRequest=function(e){var t=new o;return t.setPollingTimeout(e),t},t}(e.TicketWaitInput);t.TicketWaitInputImpl=n;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.__tarsusInterfaceName="TicketWaitInputPollRequest",t}(e.TicketWaitInputPollRequest);t.TicketWaitInputPollRequestImpl=o}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Qr=0]="Qr",e[e.Alphanumeric=1]="Alphanumeric"}(e.TicketIdFormat||(e.TicketIdFormat={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(){function t(e){this._ticketId=e}return t.prototype.getFormat=function(){switch(this._ticketId.format){case e.core.Protocol.TicketIdFormatType.Alphanumeric:return e.TicketIdFormat.Alphanumeric;case e.core.Protocol.TicketIdFormatType.QrCode:default:return e.TicketIdFormat.Qr}},t.prototype.getValue=function(){return this._ticketId.value},t.prototype.getValueAltRepresentation=function(){return this._ticketId.alt},t}();t.TicketIdImpl=n;var o=function(){function e(e){this._title=e.title,this._text=e.text,this._ticketId=e.ticket_id?new n(e.ticket_id):null}return e.prototype.getTitle=function(){return this._title},e.prototype.getText=function(){return this._text},e.prototype.getTicketId=function(){return this._ticketId},e}();t.TicketWaitingInformationImpl=o}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(){function t(){}return t.fromAssertionFormat=function(t){switch(t.type){case e.core.Protocol.TotpChallengeFormatType.Numeric:return new o;case e.core.Protocol.TotpChallengeFormatType.QrCode:return new i;case e.core.Protocol.TotpChallengeFormatType.AlphaNumeric:return new n;default:throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Invalid format type encountered: "+t.type)}},t}();e.TotpChallengeFormatImpl=t;var n=function(){function e(){}return e.prototype.getType=function(){return r.AlphaNumeric},e.__tarsusInterfaceName="TotpChallengeFormatAlphaNumeric",e}();e.TotpChallengeFormatAlphaNumericImpl=n;var o=function(){function e(){}return e.prototype.getType=function(){return r.Numeric},e.__tarsusInterfaceName="TotpChallengeFormatNumeric",e}();e.TotpChallengeFormatNumericImpl=o;var r,i=function(){function e(){}return e.prototype.getType=function(){return r.QrCode},e.__tarsusInterfaceName="TotpChallengeFormatQr",e}();e.TotpChallengeFormatQrImpl=i,function(e){e[e.AlphaNumeric=0]="AlphaNumeric",e[e.Numeric=1]="Numeric",e[e.QrCode=2]="QrCode"}(r=e.TotpChallengeFormatType||(e.TotpChallengeFormatType={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getChallenge=function(){return this._challenge},n.prototype.setChallenge=function(e){this._challenge=e},n.create=function(t){return e.ts.mobile.sdk.impl.TotpChallengeInputImpl.create(t)},n.__tarsusInterfaceName="TotpChallengeInput",n}(t.InputResponseType);t.TotpChallengeInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e){var n=new t;return n.setChallenge(e),n},t}(e.TotpChallengeInput);t.TotpChallengeInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){function e(){}return e.createTotpGenerationRequest=function(t,n,o){var r=new e;return r.setUserId(t.userHandle),r.setChallenge(n),r.setGeneratorName(o),r},e.prototype.getChallenge=function(){return this._challenge},e.prototype.getGeneratorName=function(){return this._generatorName},e.prototype.setGeneratorName=function(e){this._generatorName=e},e.prototype.setChallenge=function(e){this._challenge=e},e.prototype.setUserId=function(e){this._userId=e},e.prototype.getUserId=function(){return this._userId},e.prototype.setUserHandleType=function(e){this._userHandleType=e},e.prototype.getUserHandleType=function(){return this._userHandleType},e}();e.TotpGenerationRequestImpl=t}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.__tarsusInterfaceName="TotpInput",t}(e.InputResponseType);e.TotpInput=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getCode=function(){return this._code},n.prototype.setCode=function(e){this._code=e},n.createTotpCodeSubmission=function(t){return e.ts.mobile.sdk.impl.TotpInputCodeSubmissionImpl.createTotpCodeSubmission(t)},n.__tarsusInterfaceName="TotpInputCodeSubmission",n}(t.TotpInput);t.TotpInputCodeSubmission=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.createTotpCodeSubmission=function(e){var n=new t;return n.setCode(e),n},t}(e.TotpInputCodeSubmission);t.TotpInputCodeSubmissionImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(){function t(){}return t.createEscapeRequest=function(t){var n=new e.TotpProvisionEscapeRequest;return n.setEscapeRequest(t),n},t}();t.TotpProvisionResultImpl=n}(e.impl||(e.impl={}))}(e.tarsusplugin||(e.tarsusplugin={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={}));var Y=m&&m.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t0?this.format(n,t):n},e.prototype.resolveStringKey=function(e){var t;if(null!=(t=this._contextLocalStrings&&this._contextLocalStrings[e]))return t;var n=this._sdk.uiAssetsData;return n?n.getString(e):(this._sdk.log(o.LogLevel.Warning,(function(){return"Attempt to get string value without initialized asset data."})),null)},e.prototype.format=function(e,t){var n=this,o=e;return o&&(o=o.replace(/%(\d+)\£s/g,(function(e,o){var r=+o-1;return n.stringForIndex(r,t,e)}))),o},e.prototype.stringForIndex=function(e,t,n){return e>=0&&ee.ts.mobile.sdk.core.API_LEVEL)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"This SDK does not support API level "+this.apiLevel+".");this._apiLevel=t},Object.defineProperty(i.prototype,"currentSession",{get:function(){return this._currentSession},enumerable:!1,configurable:!0}),i.prototype.installPlugin=function(e,t){this.pluginManager.installPlugin(e,t)},i.prototype.initialize=function(){var e=this;return new Promise((function(t,r){if(!e.host)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to initialize SDK without host.");if(!e.connectionSettings)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to initialize SDK without connection settings.");if(!e.transportProvider)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to initialize SDK without transport provider.");e.cryptoSettings||(e.cryptoSettings=n.ClientCryptoSettings.create(1e4)),e.applyConfigurationDefaultsAndLogConfiguration(),e._nativeHost.initialize(e.allCollectorsSet()).then((function(t){var r=null;if(!e._wasLocaleSet){var i=e._nativeHost.getPreferredLocale(),s=e.getFullLocale(i);e.uiAssetsDownloadMode===n.UIAssetsDownloadMode.DownloadOnInit?r=e.setLocale(s).catch((function(){return!1})):e.uiAssetsData=new n.core.UIAssetsData(e,s)}return r=r||Promise.resolve(!0),Promise.all([e.pluginManager.initializePlugins(),r]).then((function(){var t=e.host.readSessionStorageKey(o);if(t){e.log(n.LogLevel.Info,(function(){return"Loading existing session from session store"}));try{e._currentSession=n.core.Session.fromJson(e,t),e.log(n.LogLevel.Debug,(function(){return"Loaded existing session for user "+(e._currentSession.user&&e._currentSession.user.displayName)}))}catch(t){e.log(n.LogLevel.Warning,(function(){return"Failed to load existing session from session store. Discarding existing session "+t+"."}))}}return!0}))})).then(t,r)})).catch((function(e){return Promise.reject(n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},i.prototype.getUsersInfo=function(){var e=[];return n.core.User.iterateUsers(this,(function(t){e.push(n.impl.UserInfoImpl.createWithUser(t))})),e},i.prototype.getUserInfo=function(e){var t=n.core.User.findUser(this,e);if(!t)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.UserNotFound,"Attempt to call getUserInfo with a non existing user.");return n.impl.UserInfoImpl.createWithUser(t)},i.prototype.isBoundForUser=function(e){var t=n.core.User.findUser(this,e);return!(!t||!t.deviceBound)},i.prototype.getBoundUserIds=function(){var e=[];return n.core.User.iterateUsers(this,(function(t){t.userId&&t.deviceBound&&e.push(t.userId)})),e},i.prototype.getKnownUserIds=function(){var e=[];return n.core.User.iterateUsers(this,(function(t){t.userId&&(t.hasLoggedIn||t.deviceBound)&&e.push(t.userId)})),e},i.prototype.logout=function(){var e=this;return new Promise((function(t,o){if(e._currentSession)if(e._currentSession.canTerminate()){var r,i=e._currentSession.createLogoutRequest(),s=e._currentSession;e._currentSession=null,e.saveCurrentSession(),s.invalidated?(e.log(n.LogLevel.Info,(function(){return"Logging out with an invalidated session; not issuing server request."})),r=Promise.resolve(!0)):r=s.performSessionExchange(i).then((function(e){return Promise.resolve(!0)})),r.then((function(e){return n.core.Session.notifySessionObserversOnMainSessionLogout(s),e})).then(t,o)}else o(new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to logout with a locked session."));else o(new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"No logged in user."))})).catch((function(e){return Promise.reject(n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},i.prototype.isTotpProvisionedForUser=function(e,t){var o=n.core.User.findUser(this,e);if(!o)return this.log(n.LogLevel.Error,(function(){return"Can not find user record for <"+e+">"})),!1;var r=new n.core.LocalSession(this,o);return n.core.totp.TotpPropertiesProcessor.createWithUserWithoutUIInteraction(o,this,r).isTotpProvisionedForGenerator(t||n.core.totp.TotpPropertiesProcessor.BACKWARD_COMPATIBILITY_DEFAULT_GENERATOR)},i.prototype.getVersionInfo=function(){return this._versionInfo||(this._versionInfo=new n.impl.VersionInfoImpl(this.host.queryHostInfo(t.sdkhost.HostInformationKey.Platform),this.host.queryHostInfo(t.sdkhost.HostInformationKey.Version))),this._versionInfo},i.prototype.resolveUserForBind=function(e){var t=n.core.User.findUser(this,e);return t||(this.log(n.LogLevel.Debug,(function(){return"bind: Creating new user "+e})),t=n.core.User.createUserWithUserId(this,e)),t},i.prototype.resumableControlFlowRequestRuntimeContext=function(e){var t=this;return{clientContext:e,sdk:this,sdkSessionManagementServices:new(function(){function e(){}return e.prototype.setCurrentSession=function(e){t._currentSession=e},Object.defineProperty(e.prototype,"lastReceivedPushToken",{get:function(){return t._lastReceivedPushToken},enumerable:!1,configurable:!0}),e.prototype.saveCurrentSession=function(){t.saveCurrentSession()},e}()),uiHandler:this.currentUiHandler}},i.prototype.internalBind=function(e,t,o,r){return this.log(n.LogLevel.Debug,(function(){return"Bind for user "+(e.userId||e.idToken)})),new n.core.BindControlFlowRequest(this.resumableControlFlowRequestRuntimeContext(o),this.getOrGenerateFlowId(r)).run(e,t)},i.prototype.bind=function(e,t,n){return this.bindWithOptions(e,t,n,null)},i.prototype.bindWithOptions=function(e,t,o,r){var i=this;return new Promise((function(n,s){var a=i.resolveUserForBind(e);return i.internalBind(a,t,o,r).then(n,s)})).catch((function(e){return Promise.reject(n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},i.prototype.deviceSupportsCryptoBinding=function(){return"true"==this.host.queryHostInfo(t.sdkhost.HostInformationKey.PersistentKeysSupported)},i.prototype.resolveUserForAuthenticate=function(e,t){var o=n.core.User.findUserWithType(this,e,t);if(!o){if(t!==n.UserHandleType.UserId)throw t===n.UserHandleType.IdToken?new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to authenticate with ID Token that is not provisioned on this device.",{uid_token:e}):new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.Internal,"Unsupported user handle type",{user_handle_type:t});this.log(n.LogLevel.Debug,(function(){return"authenticate: Creating new user "+e})),o=n.core.User.createUserWithUserId(this,e)}return o},i.prototype.internalAuthenticate=function(e,t,o,r,i){var s=this;return this.log(n.LogLevel.Debug,(function(){return"Authenticate for user "+(e.userId||e.idToken)+" with policy "+t})),new n.core.AuthenticateControlFlowRequest(this.resumableControlFlowRequestRuntimeContext(r),this.getOrGenerateFlowId(i)).run(e,t,o).catch((function(t){return s.applyInvalidUserRecordRecovery(e.userHandle,n.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}))},i.prototype.authenticate=function(e,t,n,o){return this.authenticateWithOptions(e,t,n,o,null)},i.prototype.authenticateWithOptions=function(e,t,o,r,i){try{var s=this.resolveUserForAuthenticate(e,n.UserHandleType.UserId);return this.internalAuthenticate(s,t,o,r,i)}catch(e){return Promise.reject(n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}},i.prototype.authenticateWithIdToken=function(e,t,n,o){return this.authenticateWithIdTokenWithOptions(e,t,n,o,null)},i.prototype.authenticateWithIdTokenWithOptions=function(e,t,o,r,i){try{var s=this.resolveUserForAuthenticate(e,n.UserHandleType.IdToken);return this.internalAuthenticate(s,t,o,r,i)}catch(e){return Promise.reject(n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}},i.prototype.invokePolicy=function(e,t,n){return this.invokePolicyWithOptions(e,t,n,null)},i.prototype.invokePolicyWithOptions=function(e,t,o,r){return this.log(n.LogLevel.Debug,(function(){return"Invoke policy "+e+" for current session."})),new n.core.InvokePolicyControlFlowRequest(this.resumableControlFlowRequestRuntimeContext(o),this.getOrGenerateFlowId(r)).run(e,t)},i.prototype.startTotpSessionForUser=function(e,t,o,r){var i=this;return o=o||n.core.totp.TotpPropertiesProcessor.BACKWARD_COMPATIBILITY_DEFAULT_GENERATOR,this.log(n.LogLevel.Debug,(function(){return"Start TOTP session for user "+e+", generator "+o})),new Promise((function(s,a){i.ensureConfigured(),i.log(n.LogLevel.Debug,(function(){return"Get TOTP data for <"+e+", "+o+">"}));var c=n.core.User.findUser(i,e);if(!c)throw i.log(n.LogLevel.Error,(function(){return"Can not find user record for <"+e+">"})),new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.Internal,"Can not find user <"+e+">");var u=new n.core.LocalSession(i,c);n.core.totp.TotpPropertiesProcessor.createWithUserHandle(e,i,u,r).runCodeGenerationSession(o,t,r,i.currentUiHandler).then(s,a)})).catch((function(e){return Promise.reject(n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},i.prototype.totpGenerationRequestForUserFromCanonicalString=function(e,t){this.ensureConfigured(),this.log(n.LogLevel.Debug,(function(){return"Get TOTP request for <"+e+">"}));var o=n.core.User.findUser(this,e);if(!o)throw this.log(n.LogLevel.Error,(function(){return"Can not find user record for <"+e+">"})),new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.Internal,"Can not find user <"+e+">");var r=new n.core.LocalSession(this,o);return n.core.totp.TotpPropertiesProcessor.createWithUserWithoutUIInteraction(o,this,r).totpRequestFromCanonicalString(t)},i.prototype.startTotpSessionWithRequest=function(e,t){var o=this;return new Promise((function(r,i){o.ensureConfigured(),o.log(n.LogLevel.Debug,(function(){return"Start TOTP session for user "+e.getUserId()+", generator "+e.getGeneratorName()}));var s=n.core.User.findUser(o,e.getUserId());if(!s)throw o.log(n.LogLevel.Error,(function(){return"Can not find user record for <"+e.getUserId()+">"})),new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.Internal,"Can not find user <"+e.getUserId()+">");var a=new n.core.LocalSession(o,s);n.core.totp.TotpPropertiesProcessor.createWithUserHandle(e.getUserId(),o,a,t).runCodeGenerationSessionWithRequest(e,t,o.currentUiHandler).then(r,i)})).catch((function(e){return Promise.reject(n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},i.prototype.startDeviceManagementSession=function(e){var t=this;return new Promise((function(o,r){t.ensureConfigured(),t.runWithCurrentSession((function(o){return t.log(n.LogLevel.Debug,(function(){return"User in current session: "+o.user.displayName})),new n.core.DeviceManagementSessionProcessor(t,o,e).run()})).then((function(e){switch(e){case n.core.DeviceManagementSessionProcessorReturnReason.CurrentDeviceDeleted:var o=t._currentSession&&t._currentSession.user;return t.log(n.LogLevel.Debug,(function(){return"Invalidating current session after deletion of current device."})),t._currentSession=null,t.saveCurrentSession(),o?(t.log(n.LogLevel.Debug,(function(){return"Clearing data for current user ("+o.displayName+") after deletion of current device."})),t.clearDataForUser(o.userHandle)):t.log(n.LogLevel.Warning,(function(){return"No current user after deletion of current device; not clearing sesison."})),!0;case n.core.DeviceManagementSessionProcessorReturnReason.FinishSession:return!0}})).then(o,r)})).catch((function(e){return Promise.reject(n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},i.prototype.startAuthenticationConfiguration=function(e){var t=this;return this.log(n.LogLevel.Debug,(function(){return"Start authentication configuration for current session"})),new Promise((function(o,r){t.ensureConfigured(),t.runWithCurrentSession((function(o){return t.log(n.LogLevel.Debug,(function(){return"User in current session: "+o.user.displayName})),new n.core.AuthenticationConfigurationSessionProcessor(t,o,e).run()})).then(o,r)})).catch((function(e){return Promise.reject(n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},i.prototype.startAuthenticationConfigurationWithToken=function(e,t){var o=this;return this.log(n.LogLevel.Debug,(function(){return"Start approval for provided session token"})),new Promise((function(r,i){o.ensureConfigured(),o.runWithCurrentSession((function(r){return o.log(n.LogLevel.Debug,(function(){return"User in current session: "+r.user.displayName})),new n.core.AuthenticationConfigurationSessionProcessor(o,r,t,e).run()})).then(r,i)})).catch((function(e){return Promise.reject(n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},i.prototype.startApprovalsSessionForCurrentSession=function(e){var t=this;return this.log(n.LogLevel.Debug,(function(){return"Start approval for current session"})),new Promise((function(o,r){t.ensureConfigured(),t.runWithCurrentSession((function(o){return t.log(n.LogLevel.Debug,(function(){return"User in current session: "+o.user.displayName})),new n.core.ApprovalSessionProcessor(t,o,e).run()})).then(o,r)})).catch((function(e){return Promise.reject(n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},i.prototype.startApprovalsSessionForPushedRequest=function(e,t){return this.startApprovalsSessionForPushedRequestWithOptions(e,t,null)},i.prototype.startApprovalsSessionForPushedRequestWithOptions=function(e,t,o){var r=this;return this.log(n.LogLevel.Debug,(function(){return"Start approval for push request"})),new Promise((function(o,i){if(r.ensureConfigured(),!e.userId())return e.ticket()?void i(new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.Internal,"Mobile approval push by ticket not yet implemented.")):void i(new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.Internal,"Unknown mobile approval push request."));r.log(n.LogLevel.Debug,(function(){return"startApprovalsSessionForPushedRequest with userid "+e.userId()}));var s=r.lookupBoundUser(e.userId()),a=new n.core.Session(r,s);new n.core.ApprovalSessionProcessor(r,a,t).run().then(o,i)})).catch((function(e){return Promise.reject(n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},i.prototype.invokeAnonymousPolicy=function(e,t,n){return this.invokeAnonymousPolicyWithOptions(e,t,n,null)},i.prototype.invokeAnonymousPolicyWithOptions=function(e,t,o,r){return this.log(n.LogLevel.Debug,(function(){return"Start anonymous policy "+e})),new n.core.InvokeAnonymousPolicyControlFlowRequest(this.resumableControlFlowRequestRuntimeContext(o),this.getOrGenerateFlowId(r)).run(e,t)},i.prototype.invokeAnonymousPolicyWithInlineInvokeResponse=function(e,t){return this.log(n.LogLevel.Debug,(function(){return"Start anonymous policy with inline server response"})),new n.core.InvokeAnonymousPolicyControlFlowRequest(this.resumableControlFlowRequestRuntimeContext(t),e.flow_id).run(e.inline_invoke_response)},i.prototype.cancelCurrentRunningControlFlow=function(){this.log(n.LogLevel.Debug,(function(){return"Cancel current running control flow requested."})),this._currentSession?this._currentSession.cancelCurrentControlFlow():this.log(n.LogLevel.Error,(function(){return"No current session"}))},i.prototype.ensureConfigured=function(){if(!this.currentUiHandler)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to start authentication without a registered UIHandler.")},i.prototype.getAppGlobalUIContext=function(){return this._appGlobalUiContext||(this._appGlobalUiContext=new n.impl.UIContextImpl(this)),this._appGlobalUiContext},i.prototype.userVaultExists=function(e,t){return n.UserVault.exists(this,e,t)},i.prototype.readUserVault=function(e,t,o){var r=this;return new Promise((function(i,s){n.UserVault.open(r,e,t).readData(o).then(i,s)}))},i.prototype.writeUserVault=function(e,t,o,r){var i=this;return new Promise((function(s,a){n.UserVault.open(i,e,t).writeData(o,r).then((function(){return s(!0)}),a)}))},i.prototype.saveCurrentSession=function(){this._currentSession?this.host.writeSessionStorageKey(o,this._currentSession.toJson()):this.host.deleteSessionStorageKey(o)},i.prototype.runWithCurrentSession=function(e){var t=this;if(!this._currentSession)return Promise.reject(new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.SessionRequired,"Operation requires an active session."));var o=this._currentSession;return o.lock(),e(o).finally((function(){o.unlock(),t.saveCurrentSession()}))},i.prototype.log=function(e,t){this._nativeHost.log(e,"TransmitSDK/Tarsus",t())},i.prototype.getOrGenerateFlowId=function(e){return(null==e?void 0:e.getFlowId())||this.generateFlowId()},i.prototype.generateFlowId=function(){return this.host.generateRandomHexString(64)},i.prototype.promiseCollectionResult=function(e){var t=this;return void 0===e&&(e=null),this._nativeHost.promiseCollectionResult(e).then((function(n){return null!=e?t.addTarsusCollectedData(n,e):t.addTarsusCollectedData(n,t.enabledCollectors)}))},i.prototype.getClientFeatureSet=function(){var e,o=this.host.queryHostInfo(t.sdkhost.HostInformationKey.HostProvidedFeatures);return e=o&&o.length?o.split(",").map((function(e){return parseInt(e)})):[],"true"==this.host.queryHostInfo(t.sdkhost.HostInformationKey.DeviceBiometricsFPContinuation)&&e.push(t.sdkhost.FeatureDeviceBiometricsFPContinuation),n.core.STATIC_FEATURE_SET.concat(e)},i.prototype.clearDataForUser=function(e){try{if(this.log(n.LogLevel.Debug,(function(){return"Delete data for user "+e+"."})),this._currentSession)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to call clearDataForUser with an active primary ongoing session.");var t=n.core.User.findUser(this,e);if(!t)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to call clearDataForUser with a non existing user.");try{this.host.deleteKeyPair(t.deviceSigningKeyTag)}catch(e){this.log(n.LogLevel.Warning,(function(){return"Can't delete device signing key."}))}try{this.host.deleteKeyPair(t.deviceEncryptionKeyTag)}catch(e){this.log(n.LogLevel.Warning,(function(){return"Can't delete device encryption key."}))}try{n.core.LocalEnrollment.deleteEnrollmentsForUser(t,this)}catch(e){this.log(n.LogLevel.Warning,(function(){return"Can't delete enrollments for user."}))}var o=new n.core.LocalSession(this,t);try{n.core.totp&&n.core.totp.TotpPropertiesProcessor.createWithUserWithoutUIInteraction(t,this,o).deleteAllProvisions()}catch(e){this.log(n.LogLevel.Warning,(function(){return"Can't delete enrollments for user."}))}n.core.User.deleteUser(t,this)}catch(t){throw this.log(n.LogLevel.Warning,(function(){return"Can't delete data for user "+e+": "+t})),t}},i.prototype.clearAllData=function(){var e=this;if(this._currentSession)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to call clearAllData with an active primary ongoing session.");this.log(n.LogLevel.Debug,(function(){return"Delete all data: collecting users"}));var t=[];n.core.User.iterateUsers(this,(function(e){t.push(e.userHandle)})),this.log(n.LogLevel.Debug,(function(){return"Delete all data: deleting users"})),t.forEach((function(t){try{e.clearDataForUser(t)}catch(o){e.log(n.LogLevel.Warning,(function(){return"Error when deleting user "+t+": "+o}))}}))},i.prototype.generateDebugPinForControlFlow=function(e){var t=this;return this.log(n.LogLevel.Debug,(function(){return"generateDebugPinForMainSession: Starting"})),new Promise((function(o,r){t.ensureConfigured();var i=n.core.ControlFlowProcessor.findByClientContext(e);if(!i)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to start debugging for an unknown control flow.");i.generateDebugPin().then(o,r)}))},i.prototype.lookupBoundUser=function(e,t){var o=n.core.User.findUserWithType(this,e,t);if(!o)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to authenticate with an unknown user on this device.",{user:e});if(!o.deviceBound)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to authenticate with an unbound user on this device.",{user:e});return o},i.prototype.addTarsusCollectedData=function(e,t){var o=this;return new Promise((function(r,i){var a=new Array,c=new Array;Object.keys(n.core.collectors.TarsusCollectors).forEach((function(e){var r=new n.core.collectors.TarsusCollectors[e].createCollector(t);r.isEnabled()&&(c.push(e),a.push(r.provide(o)))})),Promise.all(a.map((function(e){return e.catch((function(e){return new Error(e)}))}))).then((function(t){for(var i=e.toJson(),a=function(e){t[e]instanceof Error?o.log(n.LogLevel.Error,(function(){return"caught collection error "+t[e]})):(o.log(n.LogLevel.Debug,(function(){return"Tarsus collected from: "+c[e]+" "+JSON.stringify(t[e])})),i.content[c[e]]=o.mergeCollectedData(t[e],i.content[c[e]]))},u=0;u=0&&(n.util.LANGUAGES[e]=e),n.util.LANGUAGES[e]||e},i.prototype.applyConfigurationDefaultsAndLogConfiguration=function(){var t=this;null==this._apiLevel&&(this._apiLevel=e.ts.mobile.sdk.core.API_LEVEL),null==this.invalidUserRecoveryMode&&(this.invalidUserRecoveryMode=this.apiLevel>=9?n.InvalidUserRecordRecoveryMode.RecoverDeviceAndBindingOnAuthenticate:n.InvalidUserRecordRecoveryMode.Disable),this.log(n.LogLevel.Debug,(function(){return"Using Client API Level "+t.apiLevel})),this.log(n.LogLevel.Debug,(function(){return"Using invalid user recovery mode "+n.InvalidUserRecordRecoveryMode[t.invalidUserRecoveryMode]}))},i.prototype.applyInvalidUserRecordRecovery=function(e,t){switch(this.invalidUserRecoveryMode){case n.InvalidUserRecordRecoveryMode.Disable:break;case n.InvalidUserRecordRecoveryMode.RecoverDeviceAndBindingOnAuthenticate:t.getErrorCode()!=n.AuthenticationErrorCode.DeviceNotFound&&t.getErrorCode()!=n.AuthenticationErrorCode.InvalidDeviceBinding||(this.log(n.LogLevel.Error,(function(){return"Resetting user record due to error "+t})),this.clearDataForUser(e),t instanceof n.impl.AuthenticationErrorImpl||(t=new n.impl.AuthenticationErrorImpl(t.getErrorCode(),t.getMessage(),t.getData())),t.setPublicProperty(n.AuthenticationErrorProperty.UserRecordDeleted,!0))}return Promise.reject(t)},i.prototype.suspendControlFlowToDefaultSuspensionContext=function(e){if(!(e instanceof n.impl.PolicyActionImpl))throw this.log(n.LogLevel.Error,(function(){return"Attempt to request continuation for an unknown PolicyAction implementation"})),new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.Internal,"Cannot prepare SDK for continuation in this context.");if(!(e.controlFlow&&e.controlFlow.requestContext&&e.controlFlow.requestContext instanceof n.core.ResumableControlFlowRequest))throw this.log(n.LogLevel.Error,(function(){return"Attempt to request continuation for a PolicyAction implementation without a control flow request context"})),new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.Internal,"Cannot prepare SDK for continuation in this context.");this.log(n.LogLevel.Debug,(function(){return"Preparing for continuation of "+e.controlFlow}));var t=e.controlFlow.requestContext.topmost.createContinuation(),o=new n.core.SerializationContext;o.writeObject("continuation",t),this.log(n.LogLevel.Debug,(function(){return"Storing continuation"})),this.host.writeStorageKey(r,o.serializedContent)},i.prototype.resumeSuspendedControlFlow=function(e,t,o){var i=this;return new Promise((function(e,s){i.log(n.LogLevel.Debug,(function(){return"resumeSuspendedControlFlow Fetching continuation and deleting it..."}));var a=i.host.readStorageKey(r);i.host.deleteStorageKey(r),i.log(n.LogLevel.Debug,(function(){return"Deserializing continuation"}));var c=new n.core.SerializationContext(a).readNonNullObject("continuation");i.log(n.LogLevel.Debug,(function(){return"Resuming process based on continuation"})),c.createResumableProcess(i.resumableControlFlowRequestRuntimeContext(o)).resume(c,t).then(e,s)})).catch((function(e){throw n.impl.AuthenticationErrorImpl.ensureAuthenticationError(e)}))},i.prototype.resetCurrentSession=function(){var e=this;return new Promise((function(t,o){if(e.log(n.LogLevel.Debug,(function(){return"resetCurrentSession Invoked"})),e.log(n.LogLevel.Debug,(function(){return"resetCurrentSession will discard session"})),e._currentSession&&!e._currentSession.canTerminate())throw e.log(n.LogLevel.Error,(function(){return"resetCurrentSession Attempt to reset current session with a locked session"})),new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Attempt to resetCurrentSession with a locked session.");e._currentSession=null,e.saveCurrentSession(),e.log(n.LogLevel.Debug,(function(){return"resetCurrentSession will discard continuation"})),e.host.deleteStorageKey(r),t(!0)}))},i.__tarsusInterfaceName="TransmitSDKXm",i}());n.TransmitSDKXmImpl=i;var s=function(){function e(e){this.theResult=e}return e.prototype.toJson=function(){return this.theResult},e}();n.CollectionResultImpl=s,n.createSdk=function(){return new i}}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(){function n(n){this._backgroundColor=n.backgroundColor&&new t.TSColorImpl(e.core.Protocol.unwrap(n.backgroundColor)),this._tintColor=n.tintColor&&new t.TSColorImpl(e.core.Protocol.unwrap(n.tintColor)),this._lineColor=n.lineColor&&new t.TSColorImpl(e.core.Protocol.unwrap(n.lineColor)),this._iconColor=n.iconColor&&new t.TSColorImpl(e.core.Protocol.unwrap(n.iconColor)),this._imageUrl=n.imageUrl&&e.core.Protocol.unwrap(n.imageUrl),this._fontName=n.fontName&&e.core.Protocol.unwrap(n.fontName),this._fontSize=n.fontSize&&e.core.Protocol.unwrap(n.fontSize),this._fontBold=n.fontBold&&e.core.Protocol.unwrap(n.fontBold),this._maskInput=n.maskInput&&e.core.Protocol.unwrap(n.maskInput),this._rawJson=JSON.stringify({backgroundColor:this._backgroundColor&&this._backgroundColor.getHexValue(),tintColor:this._tintColor&&this._tintColor.getHexValue(),lineColor:this._lineColor&&this._lineColor.getHexValue(),iconColor:this._iconColor&&this._iconColor.getHexValue(),imageUrl:this._imageUrl,fontName:this._fontName,fontSize:this._fontSize,fontBold:this._fontBold,maskInput:this._maskInput})}return n.prototype.getBackgroundColor=function(){return this._backgroundColor||null},n.prototype.getTintColor=function(){return this._tintColor||null},n.prototype.getLineColor=function(){return this._lineColor||null},n.prototype.getIconColor=function(){return this._iconColor||null},n.prototype.getImageUrl=function(){return this._imageUrl||null},n.prototype.getFontName=function(){return this._fontName||null},n.prototype.getFontSize=function(){return this._fontSize||0},n.prototype.getFontBold=function(){return this._fontBold||!1},n.prototype.getMaskInput=function(){return this._maskInput||!1},n.prototype.getRawJson=function(){return this._rawJson},n.emptyStyle=function(){return this._emptyStyle||(this._emptyStyle=new n({})),this._emptyStyle},n}();t.UIStyleImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getUserChoice=function(){return this._userChoice},t.prototype.setUserChoice=function(e){this._userChoice=e},t.create=function(t){return e.ts.mobile.sdk.impl.UnregistrationInputImpl.create(t)},t.__tarsusInterfaceName="UnregistrationInput",t}();t.UnregistrationInput=n}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e){var n=new t;return n.setUserChoice(e),n},t}(e.UnregistrationInput);t.UnregistrationInputImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){function e(){}return e.prototype.getUserHandle=function(){return this._user.userHandle},e.prototype.getUserHandleType=function(){return this._user.userHandleType},e.prototype.getDisplayName=function(){return this._user.displayName},e.prototype.getDeviceBound=function(){return this._user.deviceBound},e.prototype.getHasLoggedIn=function(){return this._user.hasLoggedIn},e.createWithUser=function(t){var n=new e;return n._user=t,n},e}();e.UserInfoImpl=t}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t,n,o;t=e.sdk||(e.sdk={}),n=function(){function e(){}return e.prototype.getValidCancelOptions=function(){return null},e.prototype.getValidErrorRecoveryOptions=function(e){return[t.AuthenticationErrorRecovery.ChangeAuthenticator,t.AuthenticationErrorRecovery.SelectAuthenticator,t.AuthenticationErrorRecovery.Fail,t.AuthenticationErrorRecovery.RetryAuthenticator]},e}(),o=function(){function e(e,t){this._sdk=e,this._vault=t}return e.keyPathForUserVaultNamed=function(e){return new t.core.TarsusKeyPath("user_vaults",e)},e.isValidKeyPathForUserVault=function(e){return"user_vaults"==e.component(0)},e.open=function(o,r,i){var s=t.core.User.findUser(o,r);if(!s)throw o.log(t.LogLevel.Error,(function(){return"Can not find user record for <"+r+">"})),new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.InvalidInput,"Can not find user <"+r+">");return new e(o,t.core.vault.Vault.getVaultForUserWithId(s,this.keyPathForUserVaultNamed(i),new n,o,o.currentUiHandler))},e.exists=function(e,n,o){var r=t.core.User.findUser(e,n);return r?t.core.vault.Vault.vaultExists(r,this.keyPathForUserVaultNamed(o),e):(e.log(t.LogLevel.Error,(function(){return"Can not find user record for <"+n+">"})),!1)},e.prototype.readData=function(e){var n=this,o=t.impl.PolicyActionImpl.createPseudoAction(this._sdk,"user_vault_read");return this._vault.unlock(o,e,!0).then((function(e){if(e instanceof t.core.vault.VaultUnlockResultSuccessOrFailed&&e.successful){var o=n._vault.readVaultKey(t.core.vault.Vault.noIntegrityElementKey),r=t.util.hexToBase64(o);return n._vault.lock(),r}throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Invalid response from vault unlock operation",{result:JSON.stringify(e)})}))},e.prototype.writeData=function(e,n){var o=this,r=t.impl.PolicyActionImpl.createPseudoAction(this._sdk,"user_vault_write");return this._vault.unlock(r,n,!0).then((function(n){if(n instanceof t.core.vault.VaultUnlockResultSuccessOrFailed&&n.successful){var r=t.util.base64ToHex(e);return o._vault.writeVaultKey(t.core.vault.Vault.noIntegrityElementKey,r).then((function(){return o._vault.lock()}))}throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Invalid response from vault unlock operation")}))},e}(),t.UserVault=o}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(){function t(e,t){this._sdkVersion=t,this._platformName=e}return t.prototype.getSdkVersion=function(){return this._sdkVersion},t.prototype.getTarsusVersion=function(){return e.core.TARSUS_VERSION},t.prototype.getPlatformName=function(){return this._platformName},t.prototype.getApiLevel=function(){return e.core.API_LEVEL},t}();t.VersionInfoImpl=n}(e.impl||(e.impl={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){function t(e){return parseInt(e)===e}function n(e){if(!t(e.length))return!1;for(var n=0;n255)return!1;return!0}function o(e,o){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return o&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(t(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function r(e){return new Uint8Array(e)}function i(e,t,n,o,r){null==o&&null==r||(e=e.slice?e.slice(o,r):Array.prototype.slice.call(e,o,r)),t.set(e,n)}var s,a={toBytes:function(e){var t=[],n=0;for(e=encodeURI(e);n127)if(o>191&&o<224){if(t>=e.length)throw new Error("UTF-8 decode: incomplete 2-byte sequence");o=(31&o)<<6|63&e[t++]}else if(o>223&&o<240){if(t+1>=e.length)throw new Error("UTF-8 decode: incomplete 3-byte sequence");o=(15&o)<<12|(63&e[t++])<<6|63&e[t++]}else{if(!(o>239&&o<248))throw new Error("UTF-8 decode: unknown multibyte start 0x"+o.toString(16)+" at index "+(t-1));if(t+2>=e.length)throw new Error("UTF-8 decode: incomplete 4-byte sequence");o=(7&o)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++]}if(o<=65535)n+=String.fromCharCode(o);else{if(!(o<=1114111))throw new Error("UTF-8 decode: code point 0x"+o.toString(16)+" exceeds UTF-16 reach");o-=65536,n+=String.fromCharCode(o>>10|55296),n+=String.fromCharCode(1023&o|56320)}}return n}},c=(s="0123456789abcdef",{toBytes:function(e){for(var t=[],n=0;n>4]+s[15&o])}return t.join("")}}),u={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],p=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],h=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],f=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],g=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],y=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],b=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],v=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],_=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],w=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],S=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],k=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function C(e){for(var t=[],n=0;n>2,this._Ke[n][t%4]=i[t],this._Kd[e-n][t%4]=i[t];for(var s,a=0,c=r;c>16&255]<<24^d[s>>8&255]<<16^d[255&s]<<8^d[s>>24&255]^l[a]<<24,a+=1,8!=r)for(t=1;t>8&255]<<8^d[s>>16&255]<<16^d[s>>24&255]<<24,t=r/2+1;t>2,h=c%4,this._Ke[p][h]=i[t],this._Kd[e-p][h]=i[t++],c++}for(var p=1;p>24&255]^A[s>>16&255]^S[s>>8&255]^k[255&s]},I.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,n=[0,0,0,0],o=C(e),i=0;i<4;i++)o[i]^=this._Ke[0][i];for(var s=1;s>24&255]^f[o[(i+1)%4]>>16&255]^m[o[(i+2)%4]>>8&255]^g[255&o[(i+3)%4]]^this._Ke[s][i];o=n.slice()}var a,c=r(16);for(i=0;i<4;i++)a=this._Ke[t][i],c[4*i]=255&(d[o[i]>>24&255]^a>>24),c[4*i+1]=255&(d[o[(i+1)%4]>>16&255]^a>>16),c[4*i+2]=255&(d[o[(i+2)%4]>>8&255]^a>>8),c[4*i+3]=255&(d[255&o[(i+3)%4]]^a);return c},I.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,n=[0,0,0,0],o=C(e),i=0;i<4;i++)o[i]^=this._Kd[0][i];for(var s=1;s>24&255]^b[o[(i+3)%4]>>16&255]^v[o[(i+2)%4]>>8&255]^_[255&o[(i+1)%4]]^this._Kd[s][i];o=n.slice()}var a,c=r(16);for(i=0;i<4;i++)a=this._Kd[t][i],c[4*i]=255&(p[o[i]>>24&255]^a>>24),c[4*i+1]=255&(p[o[(i+3)%4]>>16&255]^a>>16),c[4*i+2]=255&(p[o[(i+2)%4]>>8&255]^a>>8),c[4*i+3]=255&(p[255&o[(i+1)%4]]^a);return c};var E=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new I(t)};E.prototype.encrypt=function(e){if((e=o(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=r(e.length),n=r(16),s=0;sNumber.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},x.prototype.setBytes=function(e){if(16!=(e=o(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},x.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var T=function e(t,n){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",n instanceof x||(n=new x(n)),this._counter=n,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new I(t)};T.prototype.encrypt=function(e){for(var t=o(e,!0),n=0;n16)throw new Error("PKCS#7 padding byte out of range");for(var n=e.length-t,s=0;s0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function r(e,t){this.curve=e,this.type=t,this.precomputed=null}var i=e("bn.js"),s=e("../../elliptic").utils,a=s.getNAF,c=s.getJSF,u=s.assert;t.exports=o,o.prototype.point=function(){throw new Error("Not implemented")},o.prototype.validate=function(){throw new Error("Not implemented")},o.prototype._fixedNafMul=function(e,t){u(e.precomputed);var n=e._getDoubles(),o=a(t,1),r=(1<=s;t--)c=(c<<1)+o[t];i.push(c)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),p=r;p>0;p--){for(s=0;s=0;c--){for(t=0;c>=0&&0===i[c];c--)t++;if(c>=0&&t++,s=s.dblp(t),c<0)break;var l=i[c];u(0!==l),s="affine"===e.type?l>0?s.mixedAdd(r[l-1>>1]):s.mixedAdd(r[-l-1>>1].neg()):l>0?s.add(r[l-1>>1]):s.add(r[-l-1>>1].neg())}return"affine"===e.type?s.toP():s},o.prototype._wnafMulAdd=function(e,t,n,o,r){for(var i=this._wnafT1,s=this._wnafT2,u=this._wnafT3,l=0,d=0;d=1;d-=2){var h=d-1,f=d;if(1===i[h]&&1===i[f]){var m=[t[h],null,null,t[f]];0===t[h].y.cmp(t[f].y)?(m[1]=t[h].add(t[f]),m[2]=t[h].toJ().mixedAdd(t[f].neg())):0===t[h].y.cmp(t[f].y.redNeg())?(m[1]=t[h].toJ().mixedAdd(t[f]),m[2]=t[h].add(t[f].neg())):(m[1]=t[h].toJ().mixedAdd(t[f]),m[2]=t[h].toJ().mixedAdd(t[f].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=c(n[h],n[f]);l=Math.max(y[0].length,l),u[h]=new Array(l),u[f]=new Array(l);for(var b=0;b=0;d--){for(var S=0;d>=0;){var k=!0;for(b=0;b=0&&S++,w=w.dblp(S),d<0)break;for(b=0;b0?C=s[b][I-1>>1]:I<0&&(C=s[b][-I-1>>1].neg()),w="affine"===C.type?w.mixedAdd(C):w.add(C))}}for(d=0;d=Math.ceil((e.bitLength()+1)/t.step)},r.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],o=this,r=0;r":""},r.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},r.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var o=this.curve._mulA(e),r=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),i=o.redAdd(t),s=i.redSub(n),a=o.redSub(t),c=r.redMul(s),u=i.redMul(a),l=r.redMul(a),d=s.redMul(i);return this.curve.point(c,u,d,l)},r.prototype._projDbl=function(){var e,t,n,o=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),i=this.y.redSqr();if(this.curve.twisted){var s=(u=this.curve._mulA(r)).redAdd(i);if(this.zOne)e=o.redSub(r).redSub(i).redMul(s.redSub(this.curve.two)),t=s.redMul(u.redSub(i)),n=s.redSqr().redSub(s).redSub(s);else{var a=this.z.redSqr(),c=s.redSub(a).redISub(a);e=o.redSub(r).redISub(i).redMul(c),t=s.redMul(u.redSub(i)),n=s.redMul(c)}}else{var u=r.redAdd(i);a=this.curve._mulC(this.c.redMul(this.z)).redSqr(),c=u.redSub(a).redSub(a),e=this.curve._mulC(o.redISub(u)).redMul(c),t=this.curve._mulC(u).redMul(r.redISub(i)),n=u.redMul(c)}return this.curve.point(e,t,n)},r.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},r.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),o=this.t.redMul(this.curve.dd).redMul(e.t),r=this.z.redMul(e.z.redAdd(e.z)),i=n.redSub(t),s=r.redSub(o),a=r.redAdd(o),c=n.redAdd(t),u=i.redMul(s),l=a.redMul(c),d=i.redMul(c),p=s.redMul(a);return this.curve.point(u,l,p,d)},r.prototype._projAdd=function(e){var t,n,o=this.z.redMul(e.z),r=o.redSqr(),i=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(i).redMul(s),c=r.redSub(a),u=r.redAdd(a),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(s),d=o.redMul(c).redMul(l);return this.curve.twisted?(t=o.redMul(u).redMul(s.redSub(this.curve._mulA(i))),n=c.redMul(u)):(t=o.redMul(u).redMul(s.redSub(i)),n=this.curve._mulC(c).redMul(u)),this.curve.point(d,t,n)},r.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},r.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},r.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},r.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},r.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},r.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},r.prototype.getX=function(){return this.normalize(),this.x.fromRed()},r.prototype.getY=function(){return this.normalize(),this.y.fromRed()},r.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},r.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),o=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(o),0===this.x.cmp(t))return!0}return!1},r.prototype.toP=r.prototype.normalize,r.prototype.mixedAdd=r.prototype.add},{"../../elliptic":1,"../curve":4,"bn.js":16,inherits:27}],4:[function(e,t,n){var o=n;o.base=e("./base"),o.short=e("./short"),o.mont=e("./mont"),o.edwards=e("./edwards")},{"./base":2,"./edwards":3,"./mont":5,"./short":6}],5:[function(e,t,n){function o(e){c.call(this,"mont",e),this.a=new s(e.a,16).toRed(this.red),this.b=new s(e.b,16).toRed(this.red),this.i4=new s(4).toRed(this.red).redInvm(),this.two=new s(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function r(e,t,n){c.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new s(t,16),this.z=new s(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var i=e("../curve"),s=e("bn.js"),a=e("inherits"),c=i.base,u=e("../../elliptic").utils;a(o,c),t.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),o=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===o.redSqrt().redSqr().cmp(o)},a(r,c.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(u.toArray(e,t),1)},o.prototype.point=function(e,t){return new r(this,e,t)},o.prototype.pointFromJSON=function(e){return r.fromJSON(this,e)},r.prototype.precompute=function(){},r.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},r.fromJSON=function(e,t){return new r(e,t[0],t[1]||e.one)},r.prototype.inspect=function(){return this.isInfinity()?"":""},r.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},r.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),o=e.redMul(t),r=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(o,r)},r.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},r.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),o=this.x.redSub(this.z),r=e.x.redAdd(e.z),i=e.x.redSub(e.z).redMul(n),s=r.redMul(o),a=t.z.redMul(i.redAdd(s).redSqr()),c=t.x.redMul(i.redISub(s).redSqr());return this.curve.point(a,c)},r.prototype.mul=function(e){for(var t=e.clone(),n=this,o=this.curve.point(null,null),r=[];0!==t.cmpn(0);t.iushrn(1))r.push(t.andln(1));for(var i=r.length-1;i>=0;i--)0===r[i]?(n=n.diffAdd(o,this),o=o.dbl()):(o=n.diffAdd(o,this),n=n.dbl());return o},r.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},r.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},r.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},r.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},r.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":1,"../curve":4,"bn.js":16,inherits:27}],6:[function(e,t,n){function o(e){l.call(this,"short",e),this.a=new c(e.a,16).toRed(this.red),this.b=new c(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function r(e,t,n,o){l.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new c(t,16),this.y=new c(n,16),o&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function i(e,t,n,o){l.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===o?(this.x=this.curve.one,this.y=this.curve.one,this.z=new c(0)):(this.x=new c(t,16),this.y=new c(n,16),this.z=new c(o,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var s=e("../curve"),a=e("../../elliptic"),c=e("bn.js"),u=e("inherits"),l=s.base,d=a.utils.assert;u(o,l),t.exports=o,o.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new c(e.beta,16).toRed(this.red);else{var o=this._getEndoRoots(this.p);t=(t=o[0].cmp(o[1])<0?o[0]:o[1]).toRed(this.red)}if(e.lambda)n=new c(e.lambda,16);else{var r=this._getEndoRoots(this.n);0===this.g.mul(r[0]).x.cmp(this.g.x.redMul(t))?n=r[0]:(n=r[1],d(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new c(e.a,16),b:new c(e.b,16)}})):this._getEndoBasis(n)}}},o.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:c.mont(e),n=new c(2).toRed(t).redInvm(),o=n.redNeg(),r=new c(3).toRed(t).redNeg().redSqrt().redMul(n);return[o.redAdd(r).fromRed(),o.redSub(r).fromRed()]},o.prototype._getEndoBasis=function(e){for(var t,n,o,r,i,s,a,u,l,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),p=e,h=this.n.clone(),f=new c(1),m=new c(0),g=new c(0),y=new c(1),b=0;0!==p.cmpn(0);){var v=h.div(p);u=h.sub(v.mul(p)),l=g.sub(v.mul(f));var _=y.sub(v.mul(m));if(!o&&u.cmp(d)<0)t=a.neg(),n=f,o=u.neg(),r=l;else if(o&&2==++b)break;a=u,h=p,p=u,g=f,f=l,y=m,m=_}i=u.neg(),s=l;var w=o.sqr().add(r.sqr());return i.sqr().add(s.sqr()).cmp(w)>=0&&(i=t,s=n),o.negative&&(o=o.neg(),r=r.neg()),i.negative&&(i=i.neg(),s=s.neg()),[{a:o,b:r},{a:i,b:s}]},o.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],o=t[1],r=o.b.mul(e).divRound(this.n),i=n.b.neg().mul(e).divRound(this.n),s=r.mul(n.a),a=i.mul(o.a),c=r.mul(n.b),u=i.mul(o.b);return{k1:e.sub(s).sub(a),k2:c.add(u).neg()}},o.prototype.pointFromX=function(e,t){(e=new c(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),o=n.redSqrt();if(0!==o.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var r=o.fromRed().isOdd();return(t&&!r||!t&&r)&&(o=o.redNeg()),this.point(e,o)},o.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,o=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(o).redIAdd(this.b);return 0===n.redSqr().redISub(r).cmpn(0)},o.prototype._endoWnafMulAdd=function(e,t,n){for(var o=this._endoWnafT1,r=this._endoWnafT2,i=0;i":""},r.prototype.isInfinity=function(){return this.inf},r.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),o=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,o)},r.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),o=e.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(o),i=r.redSqr().redISub(this.x.redAdd(this.x)),s=r.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,s)},r.prototype.getX=function(){return this.x.fromRed()},r.prototype.getY=function(){return this.y.fromRed()},r.prototype.mul=function(e){return e=new c(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},r.prototype.mulAdd=function(e,t,n){var o=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,r):this.curve._wnafMulAdd(1,o,r,2)},r.prototype.jmulAdd=function(e,t,n){var o=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,r,!0):this.curve._wnafMulAdd(1,o,r,2,!0)},r.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},r.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,o=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(o)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(o)}}}return t},r.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},u(i,l.BasePoint),o.prototype.jpoint=function(e,t,n){return new i(this,e,t,n)},i.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),o=this.y.redMul(t).redMul(e);return this.curve.point(n,o)},i.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},i.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),o=this.x.redMul(t),r=e.x.redMul(n),i=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),a=o.redSub(r),c=i.redSub(s);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),l=u.redMul(a),d=o.redMul(u),p=c.redSqr().redIAdd(l).redISub(d).redISub(d),h=c.redMul(d.redISub(p)).redISub(i.redMul(l)),f=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(p,h,f)},i.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,o=e.x.redMul(t),r=this.y,i=e.y.redMul(t).redMul(this.z),s=n.redSub(o),a=r.redSub(i);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),l=n.redMul(c),d=a.redSqr().redIAdd(u).redISub(l).redISub(l),p=a.redMul(l.redISub(d)).redISub(r.redMul(u)),h=this.z.redMul(s);return this.curve.jpoint(d,p,h)},i.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,n=0;n=0)return!1;if(n.redIAdd(r),0===this.x.cmp(n))return!0}return!1},i.prototype.inspect=function(){return this.isInfinity()?"":""},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":1,"../curve":4,"bn.js":16,inherits:27}],7:[function(e,t,n){function o(e){"short"===e.type?this.curve=new c.curve.short(e):"edwards"===e.type?this.curve=new c.curve.edwards(e):this.curve=new c.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,u(this.g.validate(),"Invalid curve"),u(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function r(e,t){Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get:function(){var n=new o(t);return Object.defineProperty(s,e,{configurable:!0,enumerable:!0,value:n}),n}})}var i,s=n,a=e("hash.js"),c=e("../elliptic"),u=c.utils.assert;s.PresetCurve=o,r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=e("./precomputed/secp256k1")}catch(e){i=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},{"../elliptic":1,"./precomputed/secp256k1":14,"hash.js":19}],8:[function(e,t,n){function r(e){return this instanceof r?("string"==typeof e&&(c(a.curves.hasOwnProperty(e),"Unknown curve "+e),e=a.curves[e]),e instanceof a.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),void(this.hash=e.hash||e.curve.hash)):new r(e)}var i=e("bn.js"),s=e("hmac-drbg"),a=e("../../elliptic"),c=a.utils.assert,u=e("./key"),l=e("./signature");t.exports=r,r.prototype.keyPair=function(e){return new u(this,e)},r.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},r.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},r.prototype.genKeyPair=function(e){e||(e={});for(var t=new s({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),o=this.n.sub(new i(2));;){var r=new i(t.generate(n));if(!(r.cmp(o)>0))return r.iaddn(1),this.keyFromPrivate(r)}},r.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},r.prototype.sign=function(e,t,n,r){"object"==o(n)&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new i(e,16));for(var a=this.n.byteLength(),c=t.getPrivate().toArray("be",a),u=e.toArray("be",a),d=new s({hash:this.hash,entropy:c,nonce:u,pers:r.pers,persEnc:r.persEnc||"utf8"}),p=this.n.sub(new i(1)),h=0;;h++){var f=r.k?r.k(h):new i(d.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(p)>=0)){var m=this.g.mul(f);if(!m.isInfinity()){var g=m.getX(),y=g.umod(this.n);if(0!==y.cmpn(0)){var b=f.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(m.getY().isOdd()?1:0)|(0!==g.cmp(y)?2:0);return r.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new l({r:y,s:b,recoveryParam:v})}}}}}},r.prototype.verify=function(e,t,n,o){e=this._truncateToN(new i(e,16)),n=this.keyFromPublic(n,o);var r=(t=new l(t,"hex")).r,s=t.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,c=s.invm(this.n),u=c.mul(e).umod(this.n),d=c.mul(r).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,n.getPublic(),d)).isInfinity()&&a.eqXToP(r):!(a=this.g.mulAdd(u,n.getPublic(),d)).isInfinity()&&0===a.getX().umod(this.n).cmp(r)},r.prototype.recoverPubKey=function(e,t,n,o){c((3&n)===n,"The recovery param is more than two bits"),t=new l(t,o);var r=this.n,s=new i(e),a=t.r,u=t.s,d=1&n,p=n>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");a=p?this.curve.pointFromX(a.add(this.curve.n),d):this.curve.pointFromX(a,d);var h=t.r.invm(r),f=r.sub(s).mul(h).umod(r),m=u.mul(h).umod(r);return this.g.mulAdd(f,a,m)},r.prototype.getKeyRecoveryParam=function(e,t,n,o){if(null!==(t=new l(t,o)).recoveryParam)return t.recoveryParam;for(var r=0;r<4;r++){var i;try{i=this.recoverPubKey(e,t,r)}catch(e){continue}if(i.eq(n))return r}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":1,"./key":9,"./signature":10,"bn.js":16,"hmac-drbg":25}],9:[function(e,t,n){function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var r=e("bn.js"),i=e("../../elliptic").utils.assert;t.exports=o,o.fromPublic=function(e,t,n){return t instanceof o?t:new o(e,{pub:t,pubEnc:n})},o.fromPrivate=function(e,t,n){return t instanceof o?t:new o(e,{priv:t,privEnc:n})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){return e.x||e.y?("mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y))):void(this.pub=this.ec.curve.decodePoint(e,t))},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},{"../../elliptic":1,"bn.js":16}],10:[function(e,t,n){function o(e,t){return e instanceof o?e:void(this._importDER(e,t)||(l(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam))}function r(){this.place=0}function i(e,t){var n=e[t.place++];if(!(128&n))return n;for(var o=15&n,r=0,i=0,s=t.place;i>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}var c=e("bn.js"),u=e("../../elliptic").utils,l=u.assert;t.exports=o,o.prototype._importDER=function(e,t){e=u.toArray(e,t);var n=new r;if(48!==e[n.place++])return!1;if(i(e,n)+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var o=i(e,n),s=e.slice(n.place,o+n.place);if(n.place+=o,2!==e[n.place++])return!1;var a=i(e,n);if(e.length!==a+n.place)return!1;var l=e.slice(n.place,a+n.place);return 0===s[0]&&128&s[1]&&(s=s.slice(1)),0===l[0]&&128&l[1]&&(l=l.slice(1)),this.r=new c(s),this.s=new c(l),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=s(t),n=s(n);!(n[0]||128&n[1]);)n=n.slice(1);var o=[2];a(o,t.length),(o=o.concat(t)).push(2),a(o,n.length);var r=o.concat(n),i=[48];return a(i,r.length),i=i.concat(r),u.encode(i,e)}},{"../../elliptic":1,"bn.js":16}],11:[function(e,t,n){function o(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof o))return new o(e);e=i.curves[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}var r=e("hash.js"),i=e("../../elliptic"),s=i.utils,a=s.assert,c=s.parseBytes,u=e("./key"),l=e("./signature");t.exports=o,o.prototype.sign=function(e,t){e=c(e);var n=this.keyFromSecret(t),o=this.hashInt(n.messagePrefix(),e),r=this.g.mul(o),i=this.encodePoint(r),s=this.hashInt(i,n.pubBytes(),e).mul(n.priv()),a=o.add(s).umod(this.curve.n);return this.makeSignature({R:r,S:a,Rencoded:i})},o.prototype.verify=function(e,t,n){e=c(e),t=this.makeSignature(t);var o=this.keyFromPublic(n),r=this.hashInt(t.Rencoded(),o.pubBytes(),e),i=this.g.mul(t.S());return t.R().add(o.pub().mul(r)).eq(i)},o.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=0;){var i;if(r.isOdd()){var s=r.andln(o-1);i=s>(o>>1)-1?(o>>1)-s:s,r.isubn(i)}else i=0;n.push(i);for(var a=0!==r.cmpn(0)&&0===r.andln(o-1)?t+1:1,c=1;c0||t.cmpn(-r)>0;){var i,s,a,c=e.andln(3)+o&3,u=t.andln(3)+r&3;3===c&&(c=-1),3===u&&(u=-1),i=0==(1&c)?0:3!=(a=e.andln(7)+o&7)&&5!==a||2!==u?c:-c,n[0].push(i),s=0==(1&u)?0:3!=(a=t.andln(7)+r&7)&&5!==a||2!==c?u:-u,n[1].push(s),2*o===i+1&&(o=1-o),2*r===s+1&&(r=1-r),e.iushrn(1),t.iushrn(1)}return n},o.cachedProperty=function(e,t,n){var o="_"+t;e.prototype[t]=function(){return void 0!==this[o]?this[o]:this[o]=n.call(this)}},o.parseBytes=function(e){return"string"==typeof e?o.toArray(e,"hex"):e},o.intFromLE=function(e){return new r(e,"hex","le")}},{"bn.js":16,"minimalistic-assert":28,"minimalistic-crypto-utils":29}],16:[function(e,t,n){!function(t,n){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){return s.isBN(e)?e:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))))}function a(e,t,n){for(var o=0,r=Math.min(e.length,n),i=t;i=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return o}function c(e,t,n,o){for(var r=0,i=Math.min(e.length,n),s=t;s=49?a-49+10:a>=17?a-17+10:a}return r}function u(e,t,n){n.negative=t.negative^e.negative;var o=e.length+t.length|0;n.length=o,o=o-1|0;var r=0|e.words[0],i=0|t.words[0],s=r*i,a=67108863&s,c=s/67108864|0;n.words[0]=a;for(var u=1;u>>26,d=67108863&c,p=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=p;h++){var f=u-h|0;l+=(s=(r=0|e.words[f])*(i=0|t.words[h])+d)/67108864|0,d=67108863&s}n.words[u]=0|d,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}function l(e,t,n){return(new d).mulp(e,t,n)}function d(e,t){this.x=e,this.y=t}function p(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function h(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function m(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function g(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function b(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}var v;"object"==o(t)?t.exports=s:n.BN=s,s.BN=s,s.wordSize=26;try{v=e("buffer").Buffer}catch(o){}s.isBN=function(e){return e instanceof s||null!==e&&"object"==o(e)&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==o(e))return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var o=0;o=0;o-=3)s=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===n)for(o=0,i=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},s.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=6)r=a(e,n,n+6),this.words[o]|=r<>>26-i&4194303,(i+=24)>=26&&(i-=26,o++);n+6!==t&&(r=a(e,t,n+6),this.words[o]|=r<>>26-i&4194303),this.strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var o=0,r=1;r<=67108863;r*=t)o++;o--,r=r/t|0;for(var i=e.length-n,s=i%o,a=Math.min(i,i-s)+n,u=0,l=n;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,i=0,s=0;s>>24-o&16777215)||s!==this.length-1?_[6-c.length]+c+n:c+n,(o+=2)>=26&&(o-=26,s--)}for(0!==i&&(n=i.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=w[e],l=A[e];n="";var d=this.clone();for(d.negative=0;!d.isZero();){var p=d.modn(l).toString(e);n=(d=d.idivn(l)).isZero()?p+n:_[u-p.length]+p+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return r(void 0!==v),this.toArrayLike(v,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),i=n||Math.max(1,o);r(o<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var s,a,c="le"===t,u=new e(i),l=this.clone();if(c){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),u[a]=s;for(;a=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var o=0;oe.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,o=e):(n=e,o=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,o,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(n=this,o=e):(n=e,o=this);for(var i=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==i&&s>26,this.words[s]=67108863&t;if(0===i&&s>>13,h=0|s[1],f=8191&h,m=h>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],_=8191&v,w=v>>>13,A=0|s[4],S=8191&A,k=A>>>13,C=0|s[5],I=8191&C,E=C>>>13,R=0|s[6],P=8191&R,O=R>>>13,x=0|s[7],T=8191&x,D=x>>>13,L=0|s[8],F=8191&L,j=L>>>13,M=0|s[9],q=8191&M,B=M>>>13,N=0|a[0],U=8191&N,H=N>>>13,W=0|a[1],K=8191&W,z=W>>>13,V=0|a[2],Q=8191&V,G=V>>>13,J=0|a[3],Y=8191&J,Z=J>>>13,£=0|a[4],X=8191&£,ee=£>>>13,te=0|a[5],ne=8191&te,oe=te>>>13,re=0|a[6],ie=8191&re,se=re>>>13,ae=0|a[7],ce=8191&ae,ue=ae>>>13,le=0|a[8],de=8191&le,pe=le>>>13,he=0|a[9],fe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(o=Math.imul(d,U))|0)+((8191&(r=(r=Math.imul(d,H))+Math.imul(p,U)|0))<<13)|0;u=((i=Math.imul(p,H))+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,o=Math.imul(f,U),r=(r=Math.imul(f,H))+Math.imul(m,U)|0,i=Math.imul(m,H);var ye=(u+(o=o+Math.imul(d,K)|0)|0)+((8191&(r=(r=r+Math.imul(d,z)|0)+Math.imul(p,K)|0))<<13)|0;u=((i=i+Math.imul(p,z)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,o=Math.imul(y,U),r=(r=Math.imul(y,H))+Math.imul(b,U)|0,i=Math.imul(b,H),o=o+Math.imul(f,K)|0,r=(r=r+Math.imul(f,z)|0)+Math.imul(m,K)|0,i=i+Math.imul(m,z)|0;var be=(u+(o=o+Math.imul(d,Q)|0)|0)+((8191&(r=(r=r+Math.imul(d,G)|0)+Math.imul(p,Q)|0))<<13)|0;u=((i=i+Math.imul(p,G)|0)+(r>>>13)|0)+(be>>>26)|0,be&=67108863,o=Math.imul(_,U),r=(r=Math.imul(_,H))+Math.imul(w,U)|0,i=Math.imul(w,H),o=o+Math.imul(y,K)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(b,K)|0,i=i+Math.imul(b,z)|0,o=o+Math.imul(f,Q)|0,r=(r=r+Math.imul(f,G)|0)+Math.imul(m,Q)|0,i=i+Math.imul(m,G)|0;var ve=(u+(o=o+Math.imul(d,Y)|0)|0)+((8191&(r=(r=r+Math.imul(d,Z)|0)+Math.imul(p,Y)|0))<<13)|0;u=((i=i+Math.imul(p,Z)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,o=Math.imul(S,U),r=(r=Math.imul(S,H))+Math.imul(k,U)|0,i=Math.imul(k,H),o=o+Math.imul(_,K)|0,r=(r=r+Math.imul(_,z)|0)+Math.imul(w,K)|0,i=i+Math.imul(w,z)|0,o=o+Math.imul(y,Q)|0,r=(r=r+Math.imul(y,G)|0)+Math.imul(b,Q)|0,i=i+Math.imul(b,G)|0,o=o+Math.imul(f,Y)|0,r=(r=r+Math.imul(f,Z)|0)+Math.imul(m,Y)|0,i=i+Math.imul(m,Z)|0;var _e=(u+(o=o+Math.imul(d,X)|0)|0)+((8191&(r=(r=r+Math.imul(d,ee)|0)+Math.imul(p,X)|0))<<13)|0;u=((i=i+Math.imul(p,ee)|0)+(r>>>13)|0)+(_e>>>26)|0,_e&=67108863,o=Math.imul(I,U),r=(r=Math.imul(I,H))+Math.imul(E,U)|0,i=Math.imul(E,H),o=o+Math.imul(S,K)|0,r=(r=r+Math.imul(S,z)|0)+Math.imul(k,K)|0,i=i+Math.imul(k,z)|0,o=o+Math.imul(_,Q)|0,r=(r=r+Math.imul(_,G)|0)+Math.imul(w,Q)|0,i=i+Math.imul(w,G)|0,o=o+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,Z)|0)+Math.imul(b,Y)|0,i=i+Math.imul(b,Z)|0,o=o+Math.imul(f,X)|0,r=(r=r+Math.imul(f,ee)|0)+Math.imul(m,X)|0,i=i+Math.imul(m,ee)|0;var we=(u+(o=o+Math.imul(d,ne)|0)|0)+((8191&(r=(r=r+Math.imul(d,oe)|0)+Math.imul(p,ne)|0))<<13)|0;u=((i=i+Math.imul(p,oe)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,o=Math.imul(P,U),r=(r=Math.imul(P,H))+Math.imul(O,U)|0,i=Math.imul(O,H),o=o+Math.imul(I,K)|0,r=(r=r+Math.imul(I,z)|0)+Math.imul(E,K)|0,i=i+Math.imul(E,z)|0,o=o+Math.imul(S,Q)|0,r=(r=r+Math.imul(S,G)|0)+Math.imul(k,Q)|0,i=i+Math.imul(k,G)|0,o=o+Math.imul(_,Y)|0,r=(r=r+Math.imul(_,Z)|0)+Math.imul(w,Y)|0,i=i+Math.imul(w,Z)|0,o=o+Math.imul(y,X)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(b,X)|0,i=i+Math.imul(b,ee)|0,o=o+Math.imul(f,ne)|0,r=(r=r+Math.imul(f,oe)|0)+Math.imul(m,ne)|0,i=i+Math.imul(m,oe)|0;var Ae=(u+(o=o+Math.imul(d,ie)|0)|0)+((8191&(r=(r=r+Math.imul(d,se)|0)+Math.imul(p,ie)|0))<<13)|0;u=((i=i+Math.imul(p,se)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,o=Math.imul(T,U),r=(r=Math.imul(T,H))+Math.imul(D,U)|0,i=Math.imul(D,H),o=o+Math.imul(P,K)|0,r=(r=r+Math.imul(P,z)|0)+Math.imul(O,K)|0,i=i+Math.imul(O,z)|0,o=o+Math.imul(I,Q)|0,r=(r=r+Math.imul(I,G)|0)+Math.imul(E,Q)|0,i=i+Math.imul(E,G)|0,o=o+Math.imul(S,Y)|0,r=(r=r+Math.imul(S,Z)|0)+Math.imul(k,Y)|0,i=i+Math.imul(k,Z)|0,o=o+Math.imul(_,X)|0,r=(r=r+Math.imul(_,ee)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,ee)|0,o=o+Math.imul(y,ne)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(b,ne)|0,i=i+Math.imul(b,oe)|0,o=o+Math.imul(f,ie)|0,r=(r=r+Math.imul(f,se)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,se)|0;var Se=(u+(o=o+Math.imul(d,ce)|0)|0)+((8191&(r=(r=r+Math.imul(d,ue)|0)+Math.imul(p,ce)|0))<<13)|0;u=((i=i+Math.imul(p,ue)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,o=Math.imul(F,U),r=(r=Math.imul(F,H))+Math.imul(j,U)|0,i=Math.imul(j,H),o=o+Math.imul(T,K)|0,r=(r=r+Math.imul(T,z)|0)+Math.imul(D,K)|0,i=i+Math.imul(D,z)|0,o=o+Math.imul(P,Q)|0,r=(r=r+Math.imul(P,G)|0)+Math.imul(O,Q)|0,i=i+Math.imul(O,G)|0,o=o+Math.imul(I,Y)|0,r=(r=r+Math.imul(I,Z)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,Z)|0,o=o+Math.imul(S,X)|0,r=(r=r+Math.imul(S,ee)|0)+Math.imul(k,X)|0,i=i+Math.imul(k,ee)|0,o=o+Math.imul(_,ne)|0,r=(r=r+Math.imul(_,oe)|0)+Math.imul(w,ne)|0,i=i+Math.imul(w,oe)|0,o=o+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,se)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,se)|0,o=o+Math.imul(f,ce)|0,r=(r=r+Math.imul(f,ue)|0)+Math.imul(m,ce)|0,i=i+Math.imul(m,ue)|0;var ke=(u+(o=o+Math.imul(d,de)|0)|0)+((8191&(r=(r=r+Math.imul(d,pe)|0)+Math.imul(p,de)|0))<<13)|0;u=((i=i+Math.imul(p,pe)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,o=Math.imul(q,U),r=(r=Math.imul(q,H))+Math.imul(B,U)|0,i=Math.imul(B,H),o=o+Math.imul(F,K)|0,r=(r=r+Math.imul(F,z)|0)+Math.imul(j,K)|0,i=i+Math.imul(j,z)|0,o=o+Math.imul(T,Q)|0,r=(r=r+Math.imul(T,G)|0)+Math.imul(D,Q)|0,i=i+Math.imul(D,G)|0,o=o+Math.imul(P,Y)|0,r=(r=r+Math.imul(P,Z)|0)+Math.imul(O,Y)|0,i=i+Math.imul(O,Z)|0,o=o+Math.imul(I,X)|0,r=(r=r+Math.imul(I,ee)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,ee)|0,o=o+Math.imul(S,ne)|0,r=(r=r+Math.imul(S,oe)|0)+Math.imul(k,ne)|0,i=i+Math.imul(k,oe)|0,o=o+Math.imul(_,ie)|0,r=(r=r+Math.imul(_,se)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,se)|0,o=o+Math.imul(y,ce)|0,r=(r=r+Math.imul(y,ue)|0)+Math.imul(b,ce)|0,i=i+Math.imul(b,ue)|0,o=o+Math.imul(f,de)|0,r=(r=r+Math.imul(f,pe)|0)+Math.imul(m,de)|0,i=i+Math.imul(m,pe)|0;var Ce=(u+(o=o+Math.imul(d,fe)|0)|0)+((8191&(r=(r=r+Math.imul(d,me)|0)+Math.imul(p,fe)|0))<<13)|0;u=((i=i+Math.imul(p,me)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,o=Math.imul(q,K),r=(r=Math.imul(q,z))+Math.imul(B,K)|0,i=Math.imul(B,z),o=o+Math.imul(F,Q)|0,r=(r=r+Math.imul(F,G)|0)+Math.imul(j,Q)|0,i=i+Math.imul(j,G)|0,o=o+Math.imul(T,Y)|0,r=(r=r+Math.imul(T,Z)|0)+Math.imul(D,Y)|0,i=i+Math.imul(D,Z)|0,o=o+Math.imul(P,X)|0,r=(r=r+Math.imul(P,ee)|0)+Math.imul(O,X)|0,i=i+Math.imul(O,ee)|0,o=o+Math.imul(I,ne)|0,r=(r=r+Math.imul(I,oe)|0)+Math.imul(E,ne)|0,i=i+Math.imul(E,oe)|0,o=o+Math.imul(S,ie)|0,r=(r=r+Math.imul(S,se)|0)+Math.imul(k,ie)|0,i=i+Math.imul(k,se)|0,o=o+Math.imul(_,ce)|0,r=(r=r+Math.imul(_,ue)|0)+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,o=o+Math.imul(y,de)|0,r=(r=r+Math.imul(y,pe)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,pe)|0;var Ie=(u+(o=o+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;u=((i=i+Math.imul(m,me)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,o=Math.imul(q,Q),r=(r=Math.imul(q,G))+Math.imul(B,Q)|0,i=Math.imul(B,G),o=o+Math.imul(F,Y)|0,r=(r=r+Math.imul(F,Z)|0)+Math.imul(j,Y)|0,i=i+Math.imul(j,Z)|0,o=o+Math.imul(T,X)|0,r=(r=r+Math.imul(T,ee)|0)+Math.imul(D,X)|0,i=i+Math.imul(D,ee)|0,o=o+Math.imul(P,ne)|0,r=(r=r+Math.imul(P,oe)|0)+Math.imul(O,ne)|0,i=i+Math.imul(O,oe)|0,o=o+Math.imul(I,ie)|0,r=(r=r+Math.imul(I,se)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,se)|0,o=o+Math.imul(S,ce)|0,r=(r=r+Math.imul(S,ue)|0)+Math.imul(k,ce)|0,i=i+Math.imul(k,ue)|0,o=o+Math.imul(_,de)|0,r=(r=r+Math.imul(_,pe)|0)+Math.imul(w,de)|0,i=i+Math.imul(w,pe)|0;var Ee=(u+(o=o+Math.imul(y,fe)|0)|0)+((8191&(r=(r=r+Math.imul(y,me)|0)+Math.imul(b,fe)|0))<<13)|0;u=((i=i+Math.imul(b,me)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,o=Math.imul(q,Y),r=(r=Math.imul(q,Z))+Math.imul(B,Y)|0,i=Math.imul(B,Z),o=o+Math.imul(F,X)|0,r=(r=r+Math.imul(F,ee)|0)+Math.imul(j,X)|0,i=i+Math.imul(j,ee)|0,o=o+Math.imul(T,ne)|0,r=(r=r+Math.imul(T,oe)|0)+Math.imul(D,ne)|0,i=i+Math.imul(D,oe)|0,o=o+Math.imul(P,ie)|0,r=(r=r+Math.imul(P,se)|0)+Math.imul(O,ie)|0,i=i+Math.imul(O,se)|0,o=o+Math.imul(I,ce)|0,r=(r=r+Math.imul(I,ue)|0)+Math.imul(E,ce)|0,i=i+Math.imul(E,ue)|0,o=o+Math.imul(S,de)|0,r=(r=r+Math.imul(S,pe)|0)+Math.imul(k,de)|0,i=i+Math.imul(k,pe)|0;var Re=(u+(o=o+Math.imul(_,fe)|0)|0)+((8191&(r=(r=r+Math.imul(_,me)|0)+Math.imul(w,fe)|0))<<13)|0;u=((i=i+Math.imul(w,me)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863,o=Math.imul(q,X),r=(r=Math.imul(q,ee))+Math.imul(B,X)|0,i=Math.imul(B,ee),o=o+Math.imul(F,ne)|0,r=(r=r+Math.imul(F,oe)|0)+Math.imul(j,ne)|0,i=i+Math.imul(j,oe)|0,o=o+Math.imul(T,ie)|0,r=(r=r+Math.imul(T,se)|0)+Math.imul(D,ie)|0,i=i+Math.imul(D,se)|0,o=o+Math.imul(P,ce)|0,r=(r=r+Math.imul(P,ue)|0)+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,o=o+Math.imul(I,de)|0,r=(r=r+Math.imul(I,pe)|0)+Math.imul(E,de)|0,i=i+Math.imul(E,pe)|0;var Pe=(u+(o=o+Math.imul(S,fe)|0)|0)+((8191&(r=(r=r+Math.imul(S,me)|0)+Math.imul(k,fe)|0))<<13)|0;u=((i=i+Math.imul(k,me)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,o=Math.imul(q,ne),r=(r=Math.imul(q,oe))+Math.imul(B,ne)|0,i=Math.imul(B,oe),o=o+Math.imul(F,ie)|0,r=(r=r+Math.imul(F,se)|0)+Math.imul(j,ie)|0,i=i+Math.imul(j,se)|0,o=o+Math.imul(T,ce)|0,r=(r=r+Math.imul(T,ue)|0)+Math.imul(D,ce)|0,i=i+Math.imul(D,ue)|0,o=o+Math.imul(P,de)|0,r=(r=r+Math.imul(P,pe)|0)+Math.imul(O,de)|0,i=i+Math.imul(O,pe)|0;var Oe=(u+(o=o+Math.imul(I,fe)|0)|0)+((8191&(r=(r=r+Math.imul(I,me)|0)+Math.imul(E,fe)|0))<<13)|0;u=((i=i+Math.imul(E,me)|0)+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,o=Math.imul(q,ie),r=(r=Math.imul(q,se))+Math.imul(B,ie)|0,i=Math.imul(B,se),o=o+Math.imul(F,ce)|0,r=(r=r+Math.imul(F,ue)|0)+Math.imul(j,ce)|0,i=i+Math.imul(j,ue)|0,o=o+Math.imul(T,de)|0,r=(r=r+Math.imul(T,pe)|0)+Math.imul(D,de)|0,i=i+Math.imul(D,pe)|0;var xe=(u+(o=o+Math.imul(P,fe)|0)|0)+((8191&(r=(r=r+Math.imul(P,me)|0)+Math.imul(O,fe)|0))<<13)|0;u=((i=i+Math.imul(O,me)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,o=Math.imul(q,ce),r=(r=Math.imul(q,ue))+Math.imul(B,ce)|0,i=Math.imul(B,ue),o=o+Math.imul(F,de)|0,r=(r=r+Math.imul(F,pe)|0)+Math.imul(j,de)|0,i=i+Math.imul(j,pe)|0;var Te=(u+(o=o+Math.imul(T,fe)|0)|0)+((8191&(r=(r=r+Math.imul(T,me)|0)+Math.imul(D,fe)|0))<<13)|0;u=((i=i+Math.imul(D,me)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,o=Math.imul(q,de),r=(r=Math.imul(q,pe))+Math.imul(B,de)|0,i=Math.imul(B,pe);var De=(u+(o=o+Math.imul(F,fe)|0)|0)+((8191&(r=(r=r+Math.imul(F,me)|0)+Math.imul(j,fe)|0))<<13)|0;u=((i=i+Math.imul(j,me)|0)+(r>>>13)|0)+(De>>>26)|0,De&=67108863;var Le=(u+(o=Math.imul(q,fe))|0)+((8191&(r=(r=Math.imul(q,me))+Math.imul(B,fe)|0))<<13)|0;return u=((i=Math.imul(B,me))+(r>>>13)|0)+(Le>>>26)|0,Le&=67108863,c[0]=ge,c[1]=ye,c[2]=be,c[3]=ve,c[4]=_e,c[5]=we,c[6]=Ae,c[7]=Se,c[8]=ke,c[9]=Ce,c[10]=Ie,c[11]=Ee,c[12]=Re,c[13]=Pe,c[14]=Oe,c[15]=xe,c[16]=Te,c[17]=De,c[18]=Le,0!==u&&(c[19]=u,n.length++),n};Math.imul||(S=u),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?S(this,e,t):n<63?u(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var o=0,r=0,i=0;i>>26)|0)>>>26,s&=67108863}n.words[i]=a,o=s,s=r}return 0!==o?n.words[i]=o:n.length--,n.strip()}(this,e,t):l(this,e,t)},d.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,o=0;o>=1;return o},d.prototype.permute=function(e,t,n,o,r,i){for(var s=0;s>>=1)r++;return 1<>>=13,n[2*s+1]=8191&i,i>>>=13;for(s=2*t;s>=26,t+=o/67108864|0,t+=i>>>26,this.words[n]=67108863&i}return 0!==t&&(this.words[n]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>r}return t}(e);if(0===t.length)return new s(1);for(var n=this,o=0;o=0);var t,n=e%26,o=(e-n)/26,i=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var i=e%26,s=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<s)for(this.length-=s,u=0;u=0&&(0!==l||u>=o);u--){var d=0|this.words[u];this.words[u]=l<<26-i|d>>>i,l=d&a}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,o=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[o+n]=67108863&s}for(;o>26,this.words[o+n]=67108863&s;if(0===a)return this.strip();for(r(-1===a),a=0,o=0;o>26,this.words[o]=67108863&s;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),o=this.clone(),r=e,i=0|r.words[r.length-1];0!=(n=26-this._countBits(i))&&(r=r.ushln(n),o.iushln(n),i=0|r.words[r.length-1]);var a,c=o.length-r.length;if("mod"!==t){(a=new s(null)).length=c+1,a.words=new Array(a.length);for(var u=0;u=0;d--){var p=67108864*(0|o.words[r.length+d])+(0|o.words[r.length+d-1]);for(p=Math.min(p/i|0,67108863),o._ishlnsubmul(r,p,d);0!==o.negative;)p--,o.negative=0,o._ishlnsubmul(r,1,d),o.isZero()||(o.negative^=1);a&&(a.words[d]=p)}return a&&a.strip(),o.strip(),"div"!==t&&0!==n&&o.iushrn(n),{div:a||null,mod:o}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(i=a.mod.neg(),n&&0!==i.negative&&i.iadd(e)),{div:o,mod:i}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(i=a.mod.neg(),n&&0!==i.negative&&i.isub(e)),{div:a.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,i,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,o=e.ushrn(1),r=e.andln(1),i=n.cmp(o);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(t*n+(0|this.words[o]))%e;return n},s.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*t;this.words[n]=o/e|0,t=o%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new s(1),i=new s(0),a=new s(0),c=new s(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),d=t.clone();!t.isZero();){for(var p=0,h=1;0==(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(l),i.isub(d)),o.iushrn(1),i.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(l),c.isub(d)),a.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a),i.isub(c)):(n.isub(t),a.isub(o),c.isub(i))}return{a:a,b:c,gcd:n.iushln(u)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t,n=this,o=e.clone();n=0!==n.negative?n.umod(e):n.clone();for(var i=new s(1),a=new s(0),c=o.clone();n.cmpn(1)>0&&o.cmpn(1)>0;){for(var u=0,l=1;0==(n.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(n.iushrn(u);u-- >0;)i.isOdd()&&i.iadd(c),i.iushrn(1);for(var d=0,p=1;0==(o.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(o.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);n.cmp(o)>=0?(n.isub(o),i.isub(a)):(o.isub(n),a.isub(i))}return(t=0===n.cmpn(1)?i:a).cmpn(0)<0&&t.iadd(e),t},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var o=0;t.isEven()&&n.isEven();o++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=t.cmp(n);if(r<0){var i=t;t=n,n=i}else if(0===r||0===n.cmpn(1))break;t.isub(n)}return n.iushln(o)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,o=1<>>26,a&=67108863,this.words[s]=a}return 0!==i&&(this.words[s]=i,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;n--){var o=0|this.words[n],r=0|e.words[n];if(o!==r){or&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new y(e)},s.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var k={k256:null,p224:null,p192:null,p25519:null};p.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},p.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var o=t0?n.isub(this.p):n.strip(),n},p.prototype.split=function(e,t){e.iushrn(this.n,0,t)},p.prototype.imulK=function(e){return e.imul(this.k)},i(h,p),h.prototype.split=function(e,t){for(var n=4194303,o=Math.min(e.length,9),r=0;r>>22,i=s}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},h.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=r,t=o}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(k[e])return k[e];var t;if("k256"===e)t=new h;else if("p224"===e)t=new f;else if("p192"===e)t=new m;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new g}return k[e]=t,t},y.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},y.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},y.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},y.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},y.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},y.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},y.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),i=0;!o.isZero()&&0===o.andln(1);)i++,o.iushrn(1);r(!o.isZero());var a=new s(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new s(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,o),p=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),f=i;0!==h.cmp(a);){for(var m=h,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;o--){for(var u=t.words[o],l=c-1;l>=0;l--){var d=u>>l&1;r!==n[0]&&(r=this.sqr(r)),0!==d||0!==i?(i<<=1,i|=d,(4==++a||0===o&&0===l)&&(r=this.mul(r,n[i]),a=0,i=0)):a=0}c=26}return r},y.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},y.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new b(e)},i(b,y),b.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},b.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},b.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),o=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(o).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},b.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),o=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(o).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},b.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{}],17:[function(e,t,n){function r(e){this.rand=e}var i;if(t.exports=function(e){return i||(i=new r(null)),i.generate(e)},t.exports.Rand=r,r.prototype.generate=function(e){return this._rand(e)},"object"==("undefined"==typeof self?"undefined":o(self)))self.crypto&&self.crypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:r.prototype._rand=function(){throw new Error("Not implemented yet")};else try{var s=e("crypto");r.prototype._rand=function(e){return s.randomBytes(e)}}catch(o){r.prototype._rand=function(e){for(var t=new Uint8Array(e),n=0;n=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o>>24&255,o[r++]=e>>>16&255,o[r++]=e>>>8&255,o[r++]=255&e}else for(o[r++]=255&e,o[r++]=e>>>8&255,o[r++]=e>>>16&255,o[r++]=e>>>24&255,o[r++]=0,o[r++]=0,o[r++]=0,o[r++]=0,i=8;ithis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3}function h(e){return O(e,17)^O(e,19)^e>>>10}function f(e,t,n,o){return 0===e?c(t,n,o):1===e||3===e?function(e,t,n){return e^t^n}(t,n,o):2===e?u(t,n,o):void 0}function m(e,t,n,o,r,i){var s=e&n^~e&r;return s<0&&(s+=4294967296),s}function g(e,t,n,o,r,i){var s=t&o^~t&i;return s<0&&(s+=4294967296),s}function y(e,t,n,o,r,i){var s=e&n^e&r^n&r;return s<0&&(s+=4294967296),s}function b(e,t,n,o,r,i){var s=t&o^t&i^o&i;return s<0&&(s+=4294967296),s}function v(e,t){var n=F(e,t,28)^F(t,e,2)^F(t,e,7);return n<0&&(n+=4294967296),n}function _(e,t){var n=j(e,t,28)^j(t,e,2)^j(t,e,7);return n<0&&(n+=4294967296),n}function w(e,t){var n=F(e,t,14)^F(e,t,18)^F(t,e,9);return n<0&&(n+=4294967296),n}function A(e,t){var n=j(e,t,14)^j(e,t,18)^j(t,e,9);return n<0&&(n+=4294967296),n}function S(e,t){var n=F(e,t,1)^F(e,t,8)^M(e,t,7);return n<0&&(n+=4294967296),n}function k(e,t){var n=j(e,t,1)^j(e,t,8)^q(e,t,7);return n<0&&(n+=4294967296),n}function C(e,t){var n=F(e,t,19)^F(t,e,29)^M(e,t,6);return n<0&&(n+=4294967296),n}function I(e,t){var n=j(e,t,19)^j(t,e,29)^q(e,t,6);return n<0&&(n+=4294967296),n}var E=e("../hash"),R=E.utils,P=R.assert,O=R.rotr32,x=R.rotl32,T=R.sum32,D=R.sum32_4,L=R.sum32_5,F=R.rotr64_hi,j=R.rotr64_lo,M=R.shr64_hi,q=R.shr64_lo,B=R.sum64,N=R.sum64_hi,U=R.sum64_lo,H=R.sum64_4_hi,W=R.sum64_4_lo,K=R.sum64_5_hi,z=R.sum64_5_lo,V=E.common.BlockHash,Q=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],G=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],J=[1518500249,1859775393,2400959708,3395469782];R.inherits(o,V),n.sha256=o,o.blockSize=512,o.outSize=256,o.hmacStrength=192,o.padLength=64,o.prototype._update=function(e,t){for(var n=this.W,o=0;o<16;o++)n[o]=e[t+o];for(;o>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function r(e){return 1===e.length?"0"+e:e}function i(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}function s(e,t){if(!e)throw new Error(t||"Assertion failed")}var a=n,c=e("inherits");a.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(var o=0;o>8,s=255&r;i?n.push(i,s):n.push(s)}else for(o=0;o>>0}return i},a.split32=function(e,t){for(var n=new Array(4*e.length),o=0,r=0;o>>24,n[r+1]=i>>>16&255,n[r+2]=i>>>8&255,n[r+3]=255&i):(n[r+3]=i>>>24,n[r+2]=i>>>16&255,n[r+1]=i>>>8&255,n[r]=255&i)}return n},a.rotr32=function(e,t){return e>>>t|e<<32-t},a.rotl32=function(e,t){return e<>>32-t},a.sum32=function(e,t){return e+t>>>0},a.sum32_3=function(e,t,n){return e+t+n>>>0},a.sum32_4=function(e,t,n,o){return e+t+n+o>>>0},a.sum32_5=function(e,t,n,o,r){return e+t+n+o+r>>>0},a.assert=s,a.inherits=c,n.sum64=function(e,t,n,o){var r=e[t],i=o+e[t+1]>>>0,s=(i>>0,e[t+1]=i},n.sum64_hi=function(e,t,n,o){return(t+o>>>0>>0},n.sum64_lo=function(e,t,n,o){return t+o>>>0},n.sum64_4_hi=function(e,t,n,o,r,i,s,a){var c=0,u=t;return c+=(u=u+o>>>0)>>0)>>0)>>0},n.sum64_4_lo=function(e,t,n,o,r,i,s,a){return t+o+i+a>>>0},n.sum64_5_hi=function(e,t,n,o,r,i,s,a,c,u){var l=0,d=t;return l+=(d=d+o>>>0)>>0)>>0)>>0)>>0},n.sum64_5_lo=function(e,t,n,o,r,i,s,a,c,u){return t+o+i+a+u>>>0},n.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},n.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},n.shr64_hi=function(e,t,n){return e>>>n},n.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},{inherits:27}],25:[function(e,t,n){function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),n=i.toArray(e.nonce,e.nonceEnc||"hex"),r=i.toArray(e.pers,e.persEnc||"hex");s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}var r=e("hash.js"),i=e("minimalistic-crypto-utils"),s=e("minimalistic-assert");t.exports=o,o.prototype._init=function(e,t,n){var o=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this.reseed=1},o.prototype.generate=function(e,t,n,o){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(o=n,n=t,t=null),n&&(n=i.toArray(n,o||"hex"),this._update(n));for(var r=[];r.length>8,s=255&r;i?n.push(i,s):n.push(s)}return n},i.zero2=o,i.toHex=r,i.encode=function(e,t){return"hex"===t?r(e):e}},{}],27:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],28:[function(e,t,n){function o(e,t){if(!e)throw new Error(t||"Assertion failed")}t.exports=o,o.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},{}],29:[function(e,t,n){function o(e){return 1===e.length?"0"+e:e}function r(e){for(var t="",n=0;n>8,s=255&r;i?n.push(i,s):n.push(s)}return n},i.zero2=o,i.toHex=r,i.encode=function(e,t){return"hex"===t?r(e):e}},{}],30:[function(e,t,n){t.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}},{}]},{},[1])(1)}(),function(e){var t="input is invalid type",n=!e.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,r="0123456789abcdef".split(""),i=[-2147483648,8388608,32768,128],s=[24,16,8,0],a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],c=["hex","array","digest","arrayBuffer"],u=[];!e.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!n||!e.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===o(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var l=function(e,t){return function(n){return new f(t,!0).update(n)[e]()}},d=function(e){var t=l("hex",e);t.create=function(){return new f(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n>6,u[d++]=128|63&c):c<55296||c>=57344?(u[d++]=224|c>>12,u[d++]=128|c>>6&63,u[d++]=128|63&c):(c=65536+((1023&c)<<10|1023&e.charCodeAt(++s)),u[d++]=240|c>>18,u[d++]=128|c>>12&63,u[d++]=128|c>>6&63,u[d++]=128|63&c);e=u}else{if("object"!==a)throw new Error(t);if(null===e)throw new Error(t);if(n&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||n&&ArrayBuffer.isView(e)))throw new Error(t)}e.length>64&&(e=new f(r,!0).update(e).array());var p=[],h=[];for(s=0;s<64;++s){var m=e[s]||0;p[s]=92^m,h[s]=54^m}f.call(this,r,i),this.update(h),this.oKeyPad=p,this.inner=!0,this.sharedMemory=i}f.prototype.update=function(e){if(!this.finalized){var r,i=o(e);if("string"!==i){if("object"!==i)throw new Error(t);if(null===e)throw new Error(t);if(n&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||n&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var a,c,u=0,l=e.length,d=this.blocks;u>2]|=e[u]<>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(d[c>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=64?(this.block=d[16],this.start=c-64,this.hash(),this.hashed=!0):this.start=c}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},f.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=i[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},f.prototype.hash=function(){var e,t,n,o,r,i,s,c,u,l=this.h0,d=this.h1,p=this.h2,h=this.h3,f=this.h4,m=this.h5,g=this.h6,y=this.h7,b=this.blocks;for(e=16;e<64;++e)t=((r=b[e-15])>>>7|r<<25)^(r>>>18|r<<14)^r>>>3,n=((r=b[e-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,b[e]=b[e-16]+t+b[e-7]+n<<0;for(u=d&p,e=0;e<64;e+=4)this.first?(this.is224?(i=300032,y=(r=b[0]-1413257819)-150054599<<0,h=r+24177077<<0):(i=704751109,y=(r=b[0]-210244248)-1521486534<<0,h=r+143694565<<0),this.first=!1):(t=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),o=(i=l&d)^l&p^u,y=h+(r=y+(n=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&m^~f&g)+a[e]+b[e])<<0,h=r+(t+o)<<0),t=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),o=(s=h&l)^h&d^i,g=p+(r=g+(n=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&f^~y&m)+a[e+1]+b[e+1])<<0,t=((p=r+(t+o)<<0)>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),o=(c=p&h)^p&l^s,m=d+(r=m+(n=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&y^~g&f)+a[e+2]+b[e+2])<<0,t=((d=r+(t+o)<<0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),o=(u=d&p)^d&h^c,f=l+(r=f+(n=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(m&g^~m&y)+a[e+3]+b[e+3])<<0,l=r+(t+o)<<0;this.h0=this.h0+l<<0,this.h1=this.h1+d<<0,this.h2=this.h2+p<<0,this.h3=this.h3+h<<0,this.h4=this.h4+f<<0,this.h5=this.h5+m<<0,this.h6=this.h6+g<<0,this.h7=this.h7+y<<0},f.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,o=this.h3,i=this.h4,s=this.h5,a=this.h6,c=this.h7,u=r[e>>28&15]+r[e>>24&15]+r[e>>20&15]+r[e>>16&15]+r[e>>12&15]+r[e>>8&15]+r[e>>4&15]+r[15&e]+r[t>>28&15]+r[t>>24&15]+r[t>>20&15]+r[t>>16&15]+r[t>>12&15]+r[t>>8&15]+r[t>>4&15]+r[15&t]+r[n>>28&15]+r[n>>24&15]+r[n>>20&15]+r[n>>16&15]+r[n>>12&15]+r[n>>8&15]+r[n>>4&15]+r[15&n]+r[o>>28&15]+r[o>>24&15]+r[o>>20&15]+r[o>>16&15]+r[o>>12&15]+r[o>>8&15]+r[o>>4&15]+r[15&o]+r[i>>28&15]+r[i>>24&15]+r[i>>20&15]+r[i>>16&15]+r[i>>12&15]+r[i>>8&15]+r[i>>4&15]+r[15&i]+r[s>>28&15]+r[s>>24&15]+r[s>>20&15]+r[s>>16&15]+r[s>>12&15]+r[s>>8&15]+r[s>>4&15]+r[15&s]+r[a>>28&15]+r[a>>24&15]+r[a>>20&15]+r[a>>16&15]+r[a>>12&15]+r[a>>8&15]+r[a>>4&15]+r[15&a];return this.is224||(u+=r[c>>28&15]+r[c>>24&15]+r[c>>20&15]+r[c>>16&15]+r[c>>12&15]+r[c>>8&15]+r[c>>4&15]+r[15&c]),u},f.prototype.toString=f.prototype.hex,f.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,o=this.h3,r=this.h4,i=this.h5,s=this.h6,a=this.h7,c=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i,s>>24&255,s>>16&255,s>>8&255,255&s];return this.is224||c.push(a>>24&255,a>>16&255,a>>8&255,255&a),c},f.prototype.array=f.prototype.digest,f.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},m.prototype=new f,m.prototype.finalize=function(){if(f.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();f.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),f.prototype.finalize.call(this)}};var g=d();g.sha256=g,g.sha224=d(!0),g.sha256.hmac=h(),g.sha224.hmac=h(!0),e.sha256=g.sha256,e.sha224=g.sha224}("undefined"!=typeof window?window:m),function(e){!function(e){!function(e){var t;!function(e){var n=function(){function e(e){this.flowId=e}return e.prototype.getFlowId=function(){return this.flowId},e}();e.ApprovalControlFlowExecutionContext=n;var o=function(){function e(e,n,o){this._session=n,this._sdk=e,this._clientContext=o,this._uiHandler=e.currentUiHandler,this._uiContextImpl=new t.impl.UIContextImpl(e)}return e.prototype.getUiContext=function(){return this._uiContextImpl},e.prototype.run=function(){var e=this;return this._sdk.log(t.LogLevel.Debug,(function(){return"approvals: Starting session"})),this.queryApprovalsFromServer().then((function(t){return new Promise((function(n,o){e._completeFn=n,e._rejectFn=o,e.kickStartSession(t)}))}))},e.prototype.approve=function(e,n){return this.changeApprovalStatus(e,t.MobileApprovalStatus.Approved,n)},e.prototype.deny=function(e){return this.changeApprovalStatus(e,t.MobileApprovalStatus.Denied).then((function(e){return!0}))},e.prototype.requestRefreshApprovals=function(){var e=this;return this.queryApprovalsFromServer().then((function(t){return e.updateManagedApprovals(t),!0}),(function(e){throw t.impl.AuthenticationErrorImpl.ensureAuthenticationError(e)}))},e.prototype.finishSession=function(){if(!this._appSession)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Attempt to finish a non started approval session.");this._appSession.endSession(),this._appSession=null,this._completeFn(!0)},e.prototype.kickStartSession=function(e){this._appSession=this._sdk.currentUiHandler.createApprovalsSession(this._session.user.displayName),this._appSession?(this.updateManagedApprovals(e),this._appSession.startSession(this,null,this._clientContext)):this._rejectFn(t.impl.AuthenticationErrorImpl.appImplementationError("Invalid return from createTicketWaitSession."))},e.prototype.updateManagedApprovals=function(e){if(this._managedApprovals=e,!this._appSession)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Attempt to update approvals on a non started approval session.");this._appSession.setSessionApprovalsList(e)},e.prototype.queryApprovalsFromServer=function(){var e=this;this._sdk.log(t.LogLevel.Debug,(function(){return"approvals: Initiating collection"}));var n=this._sdk.promiseCollectionResult();return t.util.wrapPromiseWithActivityIndicator(this._uiHandler,null,this._clientContext,n.then((function(n){e._sdk.log(t.LogLevel.Debug,(function(){return"approvals: Collection done; setting up request to query approvals"}));var o=e._session.createApprovalsFetchRequest(n);return e._sdk.log(t.LogLevel.Debug,(function(){return"approvals: Sending request to query approvals"})),e._session.performSessionExchange(o).then((function(e){return e.data.approvals.map((function(e){return new t.impl.ManagedMobileApprovalImpl(e)}))}))})))},e.prototype.changeApprovalStatus=function(e,o,r){var i=this;return this._sdk.log(t.LogLevel.Debug,(function(){return"approval: change status of approval "+e.getApproval().getApprovalId()+" to "+o})),this._sdk.log(t.LogLevel.Debug,(function(){return"approval: Initiating request promise"})),this._sdk.promiseCollectionResult().then((function(n){return i._sdk.log(t.LogLevel.Debug,(function(){return"approval: Collection done; setting up request"})),i._session.createApprovalReplyRequest(n,e.getApproval().getApprovalId(),o)})).then((function(s){i._sdk.log(t.LogLevel.Debug,(function(){return"approval: Initiating control flow"}));var a=new n(s.getFlowId());return a.approval=e.getApproval(),i._session.startControlFlow(s,a,r||i._clientContext).then((function(t){return e.getApproval().updateStatus(o),i.updateManagedApprovals(i._managedApprovals),t}),(function(e){var n=t.impl.AuthenticationErrorImpl.ensureAuthenticationError(e);throw i._sdk.log(t.LogLevel.Debug,(function(){return"approval: Got server error "+n})),n.getErrorCode()==t.AuthenticationErrorCode.Internal&&n.getData()&&6001==n.getData().server_error_code?(i._sdk.log(t.LogLevel.Debug,(function(){return"approval: Converting server error"})),new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.ApprovalWrongState,n.getMessage())):n}))}))},e}();e.ApprovalSessionProcessor=o}((t=e.sdk||(e.sdk={})).core||(t.core={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={}));var Z,£=m&&m.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function s(e){try{c(o.next(e))}catch(e){i(e)}}function a(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((o=o.apply(e,t||[])).next())}))},X=m&&m.__generator||function(e,t){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(r=(r=s.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]");s!=this._usedSession.user.userId&&(this.sdk.log(t.LogLevel.Debug,(function(){return"User id in request is different than that of the current user <"+s+", "+f._usedSession.user.userId+">"})),i=e.User.findUser(this.sdk,s)||e.User.createUserWithUserId(this.sdk,s))}else{if("uid_token"!=n.target.type)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Unhandled redirect target type '"+n.target.type+"'");if(a=n.target.uid_hash,!(c=n.target.token||this._usedSession.user.idToken))throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"failed to resolve id token for redirect request <"+n.redirect_type+", "+n.target.type+">");c!=this._usedSession.user.idToken&&(this.sdk.log(t.LogLevel.Debug,(function(){return"Id token in request is different than that of the current user <"+c+", "+f._usedSession.user.idToken+">"})),i=a&&e.User.findUserByUidHash(this.sdk,a)||e.User.findUser(this.sdk,c)||e.User.createUserWithIdToken(this.sdk,c,a))}switch(this.sdk.log(t.LogLevel.Info,(function(){return"control flow || type:"+n.redirect_type+" policy: "+o})),(u=n.redirect_type)===e.Protocol.RedirectTypeName.RedirectTypeNameBindOrAuthenticate&&(u=i.deviceBound?e.Protocol.RedirectTypeName.RedirectTypeNameAuthenticate:e.Protocol.RedirectTypeName.RedirectTypeNameBind),l=this.runtimeContextForCallee(),u){case e.Protocol.RedirectTypeName.RedirectTypeNameAuthenticate:return d=new e.AuthenticateControlFlowRequest(l,this._ownerRequest.getFlowId()),this._requestProcess=d,[2,d.run(i,o,r)];case e.Protocol.RedirectTypeName.RedirectTypeNameBind:return p=new e.BindControlFlowRequest(l,this._ownerRequest.getFlowId()),this._requestProcess=p,[2,p.run(i,r)];case e.Protocol.RedirectTypeName.RedirectTypeNameInvokePolicy:return h=new e.InvokePolicyControlFlowRequest(l,this._ownerRequest.getFlowId()),this._requestProcess=h,[2,h.run(o,r)];default:throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Unhandled redirect type '"+n.redirect_type+"'")}}))}))},n}();e.RunRedirectsStage=s;var a=function(e){function t(t,n){var o=e.call(this,t)||this;return o._flowId=n,o}return V(t,e),Object.defineProperty(t.prototype,"topmost",{get:function(){for(var e=this;e.rtContext.caller;)e=e.rtContext.caller;return e},enumerable:!1,configurable:!0}),t.prototype.getFlowId=function(){return this._flowId},t}(e.MultiStageResumableProcess);e.ResumableControlFlowRequest=a;var c=function(n){function o(){return null!==n&&n.apply(this,arguments)||this}return V(o,n),o.prototype.prepareForControlFlowExecution=function(){if(this.sdk.currentSession)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.AppImplementation,"Attempt to start a session (bind) with a current primary active session.");this.sdkSessionManagementServices.setCurrentSession(this._usedSession)},o.prototype.handleControlFlowError=function(e){this.sdk.log(t.LogLevel.Debug,(function(){return"Clearing session after error"})),this.sdkSessionManagementServices.setCurrentSession(null),this.sdkSessionManagementServices.saveCurrentSession()},o.prototype.postProcessControlFlowResult=function(t){return this._usedSession.persistUserData&&e.User.save(this.sdk,this._usedSession.user),this.sdkSessionManagementServices.saveCurrentSession(),e.Session.notifySessionObserversOnMainSessionLogin(this._usedSession),t},o.prototype.createNextStage=function(e){return new l(this._ownerRequest,this._usedSession,e)},o}(r);e.SessionSetupExecuteControlFlowStage=c;var u=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.createResumableProcess=function(e){return new l(e)},G([e.Serializable("SessionSetupProcessRedirectsStageContination")],n)}(i),l=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return V(n,e),n.prototype.resume=function(t,n){var o=this;return e.prototype.resume.call(this,t,n).catch((function(e){return o.handleRedirectionError(e)}))},n.prototype.processRedirectRequest=function(t){var n=this;return e.prototype.processRedirectRequest.call(this,t).catch((function(e){return n.handleRedirectionError(e)}))},n.prototype.createContinuation=function(){return new u(this)},n.prototype.handleRedirectionError=function(e){return this.sdk.apiLevel>=10?(this.sdk.log(t.LogLevel.Debug,(function(){return"Error in redirect after session establishing call. Logging out session."})),this.sdk.logout().then((function(t){throw e}),(function(t){throw e}))):Promise.reject(e)},n}(s);e.SessionSetupRunRedirectsStage=l;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t}(a);e.SessionSetupResumableControlFlowRequest=d}((t=e.sdk||(e.sdk={})).core||(t.core={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return V(n,e),n.prototype.createResumableProcess=function(e){return new o(e)},G([t.Serializable("AuthenticateRequestExecuteControlFlowStageContinuation")],n)}(t.ExecuteControlFlowStageContinuation);t.AuthenticateRequestExecuteControlFlowStageContinuation=n;var o=function(o){function r(e,t,n,r){void 0===r&&(r=null);var i=o.call(this,e)||this;return i.opName="authenticate",t&&(i._usedSession=t,i._additionalParameters=n,i._policy=r),i}return V(r,o),r.generateLoginRequest=function(e,n){var o={collection_result:e.toJson(),push_token:n.sdkSessionManagementServices.lastReceivedPushToken};return n.policy&&(o.policy_request_id=n.policy),n.additionalParameters&&(o.params=n.additionalParameters),new t.SessionExchangeRequest("POST","auth/login",o,[],n.getFlowId())},r.prototype.generateControlFlowRequest=function(){var t=this;return this.sdk.promiseCollectionResult().then((function(n){return t.sdk.log(e.LogLevel.Debug,(function(){return"authenticate: Collection done; setting up request"})),r.generateLoginRequest(n,t)}))},r.prototype.postProcessControlFlowResult=function(t){return this.sdk.log(e.LogLevel.Debug,(function(){return"authenticate: marking user has logged in after succesful completion"})),this.user.markLoggedIn(),o.prototype.postProcessControlFlowResult.call(this,t)},r.prototype.createContinuation=function(){return new n(this.session,this.getFlowId())},r}(t.SessionSetupExecuteControlFlowStage);t.AuthenticateRequestExecuteControlFlowStage=o;var r=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return V(n,e),n.prototype.createResumableProcess=function(e){return new i(e,this.flowId)},G([t.Serializable("AuthenticateControlFlowRequestContinuation")],n)}(t.ResumableControlFlowRequestContinuation),i=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return V(n,e),n.prototype.createContinuation=function(){return new r(this,this.getFlowId())},n.prototype.run=function(e,n,r){return this.startWithStage(new o(this,new t.Session(this.rtContext.sdk,e),r,n))},n}(t.SessionSetupResumableControlFlowRequest);t.AuthenticateControlFlowRequest=i}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){!function(n){!function(o){var r;!function(e){e[e.Builtin=0]="Builtin",e[e.Placeholder=1]="Placeholder",e[e.OTP=2]="OTP",e[e.Totp=3]="Totp",e[e.MobileApprove=4]="MobileApprove"}(r=o.AuthenticatorPrototype||(o.AuthenticatorPrototype={}));var i=function(){function i(t,n,o,i){this._session=t,this._authenticatorId=n;var s=n.match(/^placeholder_(.*)£/);if(s){this._authenticatorPrototype=r.Placeholder,this._placeholderId=s[1];var a=o;this._authetnicationMethodTypeName=a.placeholder_type}else n.match(/^otp_(.*)£/)?(this._authenticatorPrototype=r.OTP,this._authetnicationMethodTypeName=this.getAuthenticatorIdForMultiStep()):n.match(/^totp_(.*)£/)?(this._authenticatorPrototype=r.Totp,this._authetnicationMethodTypeName=this.getAuthenticatorIdForMultiStep()):n.match(/^mobile_approve_(.*)£/)?(this._authenticatorPrototype=r.MobileApprove,this._authetnicationMethodTypeName=this.getAuthenticatorIdForMobileApprove()):(this._authenticatorPrototype=r.Builtin,this._authetnicationMethodTypeName=this._authenticatorId);this._authenticatorMethodConfig=o,this._serverReportedRegistrationStatus=i.status,this._expired=i.expired||!1,this._locked=i.locked||!1,o.recovery_escape&&(this._recoveryEscapeOption=new e.ts.mobile.sdk.impl.EscapeOptionImpl(o.recovery_escape))}return Object.defineProperty(i.prototype,"authenticationDriverDescriptor",{get:function(){var t=this.internalAuthenticationDriverDescriptor();if(!t)throw new e.ts.mobile.sdk.impl.AuthenticationErrorImpl(e.ts.mobile.sdk.AuthenticationErrorCode.Internal,"Unhandled authenticator: "+this.getAuthenticatorId());return t},enumerable:!1,configurable:!0}),i.prototype.internalAuthenticationDriverDescriptor=function(){switch(this._authenticatorPrototype){case r.Placeholder:return o.AuthenticatorDrivers.__placeholder;case r.Totp:case r.OTP:var e=this.getAuthenticatorIdForMultiStep();return o.AuthenticatorDrivers[e];case r.MobileApprove:var t=this.getAuthenticatorIdForMobileApprove();return o.AuthenticatorDrivers[t];case r.Builtin:default:return o.AuthenticatorDrivers[this.getAuthenticatorId()]}},i.prototype.getAuthenticatorIdForMobileApprove=function(){var e=this._authenticatorId.split("_");return e[0]+"_"+e[1]},i.prototype.getAuthenticatorIdForMultiStep=function(){return""+this._authenticatorId.split("_")[0]},i.prototype.getAuthenticatorId=function(){return this._authenticatorId},i.prototype.getType=function(){var e=n.Protocol.AuthTypeData[this._authetnicationMethodTypeName];return e&&"authTypeEnum"in e?e.authTypeEnum:t.AuthenticatorType.Generic},i.prototype.getName=function(){var e=n.Protocol.AuthTypeData[this._authetnicationMethodTypeName];return e&&e.authTypeName||"Generic"},i.prototype.getExpired=function(){return this._expired},i.prototype.getRegistered=function(){return this.getRegistrationStatus()==t.AuthenticatorRegistrationStatus.Registered},i.prototype.getRegistrationStatus=function(){return this._serverReportedRegistrationStatus!=n.Protocol.AuthenticationMethodStatus.Registered?t.AuthenticatorRegistrationStatus.Unregistered:this.authenticationDriverDescriptor.evaluateLocalRegistrationStatus(this._session)},i.prototype.getLocked=function(){return this._locked},i.prototype.getDefaultAuthenticator=function(){return this._session.user.defaultAuthId==this.getAuthenticatorId()},i.prototype.getSupportedOnDevice=function(){return this.internalAuthenticationDriverDescriptor()&&this.authenticationDriverDescriptor.isSupportedOnDevice(this._session)},i.prototype.getPlaceholderId=function(){return this._placeholderId},i.prototype.updateWithAuthenticatorState=function(e){this._expired=e.expired||!1,this._locked=e.locked||!1,this._serverReportedRegistrationStatus=e.status},i.prototype.getCredentialRecoveryEscapeOption=function(){return this._recoveryEscapeOption},i}();o.AuthenticatorDescriptionImpl=i}(n.authenticationdrivers||(n.authenticationdrivers={}))}(t.core||(t.core={}))}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t,n,o,r;r=e.sdk||(e.sdk={}),t=r.core||(r.core={}),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.getEnabled=function(){return this.getSupportedOnDevice()},t}(t.authenticationdrivers.AuthenticatorDescriptionImpl),o=function(){function e(e,t,n,o){this._sdk=e,this._session=t,this._token=o||null,this._clientContext=n,this._uiHandler=this._sdk.currentUiHandler,this._uiContextImpl=new r.impl.UIContextImpl(e)}return e.prototype.getUiContext=function(){return this._uiContextImpl},e.prototype.run=function(){var e=this;return this._sdk.log(r.LogLevel.Debug,(function(){return"configuration: Starting session"})),this.queryConfigMenuFromServerAndFilter().then((function(t){return new Promise((function(n,o){e.kickStartSession(t),e._completeFn=n,e._rejectFn=o}))}))},e.prototype.registerAuthenticator=function(e,t){return this.requestAuthenticatorRegistrationChange(e,!0,t)},e.prototype.reregisterAuthenticator=function(e,t){return this.requestAuthenticatorRegistrationChange(e,!0,t)},e.prototype.setDefaultAuthenticator=function(e){var n=this;return this._sdk.log(r.LogLevel.Info,(function(){return"Configuration: Updating user default authenticator."})),new Promise((function(o,r){if(!n._session.anonymous){var i=n._session.user;i.updateDefaultAuthId(e.getDescription().getAuthenticatorId()),n._session.persistUserData&&t.User.save(n._sdk,i)}o(!0),n.updateManagedAuthenticators(n._authenticators)}))},e.prototype.unregisterAuthenticator=function(e,t){return this.requestAuthenticatorRegistrationChange(e,!1,t).then((function(e){return!0}))},e.prototype.requestRefreshAuthenticators=function(){var e=this;return this.queryConfigMenuFromServerAndFilter().then((function(t){return e.updateManagedAuthenticators(t),!0}),(function(e){throw r.impl.AuthenticationErrorImpl.ensureAuthenticationError(e)}))},e.prototype.finishSession=function(){if(!this._appSession)throw new r.impl.AuthenticationErrorImpl(r.AuthenticationErrorCode.Internal,"Attempt to finish a non started config session.");this._appSession.endSession(),this._appSession=null,this._completeFn(!0)},e.prototype.kickStartSession=function(e){this._appSession=this._uiHandler.createAuthenticationConfigurationSession(this._session.user.displayName),this._appSession?(this._appSession.startSession(this,null,this._clientContext),this.updateManagedAuthenticators(e)):this._rejectFn(r.impl.AuthenticationErrorImpl.appImplementationError("Invalid return from createAuthenticationConfigurationSession."))},e.prototype.updateManagedAuthenticators=function(e){if(!this._appSession)throw new r.impl.AuthenticationErrorImpl(r.AuthenticationErrorCode.Internal,"Attempt to work with a non started config session.");var t={};e.forEach((function(e){t[e.getDescription().getAuthenticatorId()]=e})),this._authenticators=e,this._authenticatorsByName=t,this._appSession.setAuthenticatorsList(e)},e.prototype.queryConfigMenuFromServerAndFilter=function(){var e=this;this._sdk.log(r.LogLevel.Debug,(function(){return"configuration: Initiating collection"}));var t=this._sdk.promiseCollectionResult();return r.util.wrapPromiseWithActivityIndicator(this._uiHandler,null,this._clientContext,t.then((function(t){e._sdk.log(r.LogLevel.Debug,(function(){return"configuration: Collection done; setting up request to query for config menu"}));var o=e._session.createConfigMenuFetchRequest(t,e._token);return e._sdk.log(r.LogLevel.Debug,(function(){return"configuration: Sending request to query approvals"})),e._session.performSessionExchange(o).then((function(t){var o=t.data&&"configuration"==t.data.type&&t.data;if(!o)throw new r.impl.AuthenticationErrorImpl(r.AuthenticationErrorCode.Internal,"Invalid configuration screen structure encountered.");return o.methods.map((function(t){var o=new n(e._session,t.type,t,t);return new r.impl.ConfigurableAuthenticatorImpl(o,t.options)})).filter((function(e){return e.getDescription().getSupportedOnDevice()}))}))})))},e.prototype.requestAuthenticatorRegistrationChange=function(e,n,o){var i=this;this._sdk.log(r.LogLevel.Debug,(function(){return"configuration: Authenticator "+e.getDescription().getName()+" request (un)registration "+n})),this._sdk.log(r.LogLevel.Debug,(function(){return"configuration: Initiating registration request promise"}));var s=this._sdk.promiseCollectionResult().then((function(t){return i._sdk.log(r.LogLevel.Debug,(function(){return"configuration: Collection done; setting up request"})),i._session.createAuthRegistrationRequest(t,e.getDescription().getAuthenticatorId(),n,i._token)}));return this._sdk.log(r.LogLevel.Debug,(function(){return"configuration: Initiating control flow"})),s.then((function(s){return i._session.startControlFlow(s,null,o||i._clientContext).then((function(o){var s=o.getInternalData(),a=!1;if(s&&s.methods&&s.methods.length&&(i._sdk.log(r.LogLevel.Debug,(function(){return"configuration: Processing updates."})),s.methods.forEach((function(e){var t=i._authenticatorsByName[e.type];t&&(t.getDescription().updateWithAuthenticatorState(e),a=!0)}))),a){if(!n&&e.getDescription().getDefaultAuthenticator()&&!i._session.anonymous){var c=i._session.user;c.updateDefaultAuthId(""),i._session.persistUserData&&t.User.save(i._sdk,c)}i.updateManagedAuthenticators(i._authenticators)}return o}),(function(e){throw r.impl.AuthenticationErrorImpl.ensureAuthenticationError(e)}))}))},e}(),t.AuthenticationConfigurationSessionProcessor=o}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t;!function(e){var t=function(){function e(e,t){this._sdk=e,this._user=t}return Object.defineProperty(e.prototype,"user",{get:function(){return this._user},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sdk",{get:function(){return this._sdk},enumerable:!1,configurable:!0}),e}();e.BaseSession=t;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t}(t);e.LocalSession=n}((t=e.sdk||(e.sdk={})).core||(t.core={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(n){var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.createResumableProcess=function(e){return new r(e)},G([n.Serializable("BindRequestExecuteControlFlowStageContinuation")],t)}(n.ExecuteControlFlowStageContinuation),r=function(r){function i(e,t,n){var o=r.call(this,e)||this;return o.opName="bind",t&&(o._usedSession=t,o._additionalParameters=n),o}return V(i,r),i.prototype.generateControlFlowRequest=function(){var o=this;this.sdk.log(t.LogLevel.Debug,(function(){return o.opName+": Generating new device keys for "+(o.user.userId||o.user.idToken)}));var r=this.sdk.host.generateKeyPair(this.user.deviceSigningKeyTag,e.sdkhost.KeyClass.StdSigningKey,e.sdkhost.KeyBiometricProtectionMode.None,!0),i=this.sdk.host.generateKeyPair(this.user.deviceEncryptionKeyTag,e.sdkhost.KeyClass.StdEncryptionKey,e.sdkhost.KeyBiometricProtectionMode.None,!0);return Promise.all([r,i]).then((function(e){var r=e[0],i=e[1];return o.sdk.log(t.LogLevel.Debug,(function(){return o.opName+": key generation done"})),o.sdk.promiseCollectionResult().then((function(e){o.sdk.log(t.LogLevel.Debug,(function(){return o.opName+": Collection result completed, Initiating request promise"}));var s={collection_result:e.toJson(),public_key:r.publicKeyToJson(),push_token:o.sdkSessionManagementServices.lastReceivedPushToken};return i&&(s.encryption_public_key=i.publicKeyToJson()),o.additionalParameters&&(s.params=o.additionalParameters),new n.SessionExchangeRequest("POST","auth/bind",s,[],o.getFlowId())}))}))},i.prototype.postProcessControlFlowResult=function(e){var n=this,o=this.sdk.currentSession&&this.sdk.currentSession.deviceId();return this.sdk.currentSession&&o&&(this.sdk.log(t.LogLevel.Debug,(function(){return n.opName+": binding device to user after succesful completion"})),this.sdk.currentSession.user.bindDeviceToUser(o)),r.prototype.postProcessControlFlowResult.call(this,e)},i.prototype.createContinuation=function(){return new o(this.session,this.getFlowId())},i}(n.SessionSetupExecuteControlFlowStage);n.BindRequestExecuteControlFlowStage=r;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.createResumableProcess=function(e){return new s(e,this.flowId)},G([n.Serializable("BindControlFlowRequestContinuation")],t)}(n.ResumableControlFlowRequestContinuation),s=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return V(o,e),o.prototype.createContinuation=function(){return new i(this,this.getFlowId())},o.prototype.run=function(e,o){var i=this;return new Promise((function(s,a){i._ctxt.sdk.deviceSupportsCryptoBinding()?e.deviceBound?a(new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.AppImplementation,"Attempt to bind an already bound user on this device.",{user:e.userHandle})):s(i.startWithStage(new r(i,new n.Session(i.rtContext.sdk,e),o))):a(new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.AppImplementation,"cryptographic binding is not supported for this device"))}))},o}(n.SessionSetupResumableControlFlowRequest);n.BindControlFlowRequest=s}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t,n,o;t=(o=e.sdk||(e.sdk={})).core||(o.core={}),n=function(){function e(e,t){if(this.sdk=e,this.ec=new elliptic.ec("secp256k1"),t&&(this.sessionId=t.session_id,this.aesKey=this.base64ToJsArray(t.key),!this.isReady()))throw new o.impl.AuthenticationErrorImpl(o.AuthenticationErrorCode.Internal,"Can't deserialize crypto session")}return e.prototype.getExchangeRequestHeader=function(){if(!this.kp){var e={entropy:this.sdk.host.generateRandomHexString(192),entropyEnc:"hex"};this.kp=this.ec.genKeyPair(e)}return{type:"key_exchange",scheme:2,y:this.jsArrayToBase64(this.kp.getPublic().encode())}},e.prototype.processExchangeResponseHeader=function(e){if(2!=e.scheme)throw"Unsupported crypto scheme "+e.scheme;this.sessionId=e.crypto_session_id;var t=this.kp.derive(this.ec.keyFromPublic(atob(e.y)).getPublic()),n=sha256.create();n.update(t.toArray("be",32)),this.aesKey=n.digest()},e.prototype.isReady=function(){return!(!this.aesKey||!this.sessionId)},e.prototype.decryptResponse=function(e){var t=null;if(e.headers.forEach((function(e){"encryption"==e.type&&(t=e)})),t){var n=this.base64ToJsArray(t.iv),o=new aesjs.ModeOfOperation.cbc(this.aesKey,n),r=this.base64ToJsArray(e.data),i=o.decrypt(r),s=aesjs.utils.utf8.fromBytes(i);s=this.pkcs7Unpad(s),e.data=JSON.parse(s)}return e},e.prototype.encryptRequest=function(e){var t=this,n=this.sdk.host.generateRandomHexString(32),r=aesjs.utils.hex.toBytes(n),i={type:"encryption",iv:o.util.hexToBase64(n),crypto_session_id:this.sessionId},s=e.headers.map((function(e){return t.encryptStringToBase64(JSON.stringify(e),r)})),a=JSON.stringify(e.data),c=this.encryptStringToBase64(a,r);e.headers=[i],e.enc_headers=s,e.data=c},e.prototype.encryptStringToBase64=function(e,t){var n=new aesjs.ModeOfOperation.cbc(this.aesKey,t),o=aesjs.utils.utf8.toBytes(e),r=this.pkcs7Pad(o),i=n.encrypt(r);return this.jsArrayToBase64(i)},e.prototype.toJson=function(){return{scheme:2,session_id:this.sessionId,key:this.jsArrayToBase64(this.aesKey)}},e.fromJson=function(t,n){return new e(t,n)},e.prototype.jsArrayToBase64=function(e){for(var t="",n=0;n0){var r=e.getUrl().substring(o+1);n=e.getUrl().substring(0,o)+"?"+r.split("&").sort().join("&")}var i=/%%/g,s=n.substr(this.connectionSettings().getServerAddress().length).replace(i,"\\%")+"%%"+this.clientVersionHeader.replace(i,"\\%")+"%%"+e.getBodyJson().replace(i,"\\%"),a=t.util.asciiToHex(s);return this.deviceSigningKeyPair.signHex(a).then((function(e){return t.util.hexToBase64(e)}))},s.prototype.connectionSettings=function(){return this._sdk.connectionSettings},s.prototype.processSessionIdHeader=function(e){this._sdk.log(t.LogLevel.Debug,(function(){return"Processing session ID header "+e})),this._sessionId=e.session_id},s.prototype.processDeviceIdHeader=function(e){var n=this;this._sdk.log(t.LogLevel.Debug,(function(){return"Processing Device ID header "+e})),this._deviceId?this._deviceId!=e.device_id&&this._sdk.log(t.LogLevel.Warning,(function(){return"Received device ID "+e.device_id+" in a session with an existing device id "+n._deviceId})):(this._user.setProvisionalDeviceId(e.device_id),this._deviceId=e.device_id)},s.prototype.processSessionStateChangeHeader=function(e){if(this._sdk.log(t.LogLevel.Debug,(function(){return"Processing session state change header "+e+" to state "+e.state})),e.state!==n.Protocol.SessionStateChangeState.Closed)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Communication,"Invalid session state change encountered in header.");this._sdk.log(t.LogLevel.Debug,(function(){return"Invalidating session."})),this._invalidated=!0},s.prototype.processSessionEphemeralUserHeader=function(e){this._sdk.log(t.LogLevel.Debug,(function(){return"Processing ephemeral user Id header "+e})),this._user.updateEphemeralUserId(e.uid)},s.prototype.noHeaderProcessing=function(e){},s.prototype.processEncryptedSharedSecretHeader=function(e){},s.prototype.processDisplayNameHeader=function(e){this._sdk.log(t.LogLevel.Debug,(function(){return"Processing display name header '"+e.display_name+"'"})),n.User.updateUserDisplayName(e.display_name,this._user,this._sdk)},s.prototype.processUidTokenHeader=function(e){this._sdk.log(t.LogLevel.Debug,(function(){return"Processing uid_token header '"+e.token+"', uid hash '"+e.uid_hash+"'"})),n.User.updateUserIdTokenForSession(e.token,this,e.uid_hash)},s.prototype.processDeviceKeyRollSuccess=function(e){if(this._sdk.log(t.LogLevel.Debug,(function(){return"DeviceKeyRoll: Processing device_key_roll_success header. device_key_roll_success = '"+e.device_key_roll_success+"'."})),e.device_key_roll_success&&this._deviceKeyRollData){var n=this._user.deviceSigningKeyTag;this._user.updateDeviceKeyTagSaltAndSave(this._deviceKeyRollData.salt),this._deviceKeyPair=this._deviceKeyRollData.deviceKeyPair,this._deviceKeyRollData=null;try{this._sdk.host.deleteKeyPair(n)}catch(e){this._sdk.log(t.LogLevel.Warning,(function(){return"DeviceKeyRoll: Can't delete old device signing key."}))}}},s.prototype.verifyDevicePublicKey=function(e){var n=t.util.calcPublicKeyHexStringEncodedSha256Hash(this.deviceSigningKeyPair,this._sdk);return this._sdk.log(t.LogLevel.Debug,(function(){return"DeviceKeyRoll: verify server key hash matches device key hash: "+(n===e)})),n===e},s.prototype.urlWithConcatenatedQuery=function(e,t){var n="";return e.indexOf("?")<0?n="?":"&"!=e[e.length-1]&&(n="&"),e+n+Object.keys(t).map((function(e){return e+"="+encodeURIComponent(t[e])})).join("&")},Object.defineProperty(s.prototype,"clientVersionHeader",{get:function(){if(!this._cachedClientVersionHeader){var e=this._sdk.getClientFeatureSet().join(",");this._cachedClientVersionHeader=this._sdk.getVersionInfo().getSdkVersion()+";["+e+"]"}return this._cachedClientVersionHeader},enumerable:!1,configurable:!0}),s.prototype.createPluginSessionInfo=function(){return new r(this)},s.prototype.lock=function(){var e=this;this._sdk.log(t.LogLevel.Debug,(function(){return"Locking session "+e._sessionId})),this._lockCount++},s.prototype.unlock=function(){var e=this;if(this._sdk.log(t.LogLevel.Debug,(function(){return"Unlocking session "+e._sessionId})),this._lockCount--,this._lockCount<0)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Unbalanced session locking: Attempt to unlock an already unlocked sessoin.")},s.prototype.canTerminate=function(){return!this._lockCount},s.prototype.toJson=function(){var e={session_id:this._sessionId,user_guid:this._user.guid.toString(),device_id:this._deviceId,invalidated:this._invalidated,persistUserData:this._persistUserData,anonymous:this._anonymous};return this._persistUserData||(e.nonPersistentUser=n.User.toUserRecord(this._user)),this._currentCryptoSession&&this._currentCryptoSession.isReady()&&(e.c_session=this._currentCryptoSession.toJson()),e},s.fromJson=function(e,o){var r=o,i=r.persistUserData?n.User.findUserByGuid(e,n.UserGuid.createFromString(r.user_guid)):r.nonPersistentUser&&n.User.fromUserRecord(r.nonPersistentUser,e);if(!i)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Can't deserialize session -- user "+r.user_guid+" not found.");return this.fromJsonWithUser(e,o,i)},s.fromJsonWithUser=function(e,t,o){var r=t,i=new s(e,o);return i._sessionId=r.session_id,i._deviceId=r.device_id,i._invalidated=r.invalidated||!1,i._persistUserData=r.persistUserData||!0,i._anonymous=r.anonymous||!1,r.c_session&&(i._currentCryptoSession=n.Scheme2CryptoSession.fromJson(e,r.c_session)),i},s.prototype.updateFromContinuedSession=function(e){this.user.updateFromContinuedSessionUser(e.user)},s.notifySessionObserversOnMainSessionLogin=function(e){var t=e.createPluginSessionInfo();this.sessionObservationExtensionPoint.forEach((function(e){e.mainSessionStarted(t)}))},s.notifySessionObserversOnMainSessionLogout=function(e){var t=e.createPluginSessionInfo();this.sessionObservationExtensionPoint.forEach((function(e){e.mainSessionEnded(t)}))},s.headerProcessors={session_id:s.prototype.processSessionIdHeader,device_id:s.prototype.processDeviceIdHeader,encrypted_shared_secret:s.prototype.processEncryptedSharedSecretHeader,session_state:s.prototype.processSessionStateChangeHeader,ephemeral_uid:s.prototype.processSessionEphemeralUserHeader,key_exchange:s.prototype.processKeyExchangeResponseHeader,encryption:s.prototype.noHeaderProcessing,display_name:s.prototype.processDisplayNameHeader,uid_token:s.prototype.processUidTokenHeader,device_key_roll_success:s.prototype.processDeviceKeyRollSuccess},s.messageFilteringExtensionPoint=new n.ExtensionPoint(e.tarsusplugin.TARSUS_EXTENSION_POINT_NAME_MESSAGE_FILTERS),s.sessionObservationExtensionPoint=new n.ExtensionPoint(e.tarsusplugin.TARSUS_EXTENSION_POINT_NAME_SESSION_OBSERVERS),s}(n.BaseSession);n.Session=o;var r=function(){function e(e){this._underlying=e}return e.prototype.getUsername=function(){return this._underlying.user.displayName},e}(),i=function(){function e(e){this._underlying=e}return e.prototype.getMethod=function(){return this._underlying.method},e.prototype.getBody=function(){return this._underlying.body},e.prototype.getHeaders=function(){return this._underlying.envelopeHeaders},e.prototype.addHeader=function(e){this._underlying.addEnvelopeHeader(e)},e}()}((t=e.sdk||(e.sdk={})).core||(t.core={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(){function n(n,o,r,i,s){if(this.flowId=s,n instanceof t.SerializationContext)this.serializeFrom(n);else{if("string"!=typeof n||!o||!r)throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Invalid arguments for constructing session message");this._requestMethod=n,this._requestServerRelativeUrl=o,this._requestBody=r,this._envelopeHeaders=i||[]}var a=this.createFlowIdSdkHeader();a&&this._envelopeHeaders.push(a)}return n.prototype.addEnvelopeHeader=function(e){this._envelopeHeaders.push(e)},Object.defineProperty(n.prototype,"method",{get:function(){return this._requestMethod},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"serverRelativeUrl",{get:function(){return this._requestServerRelativeUrl},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._requestBody},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"envelopeHeaders",{get:function(){return this._envelopeHeaders},enumerable:!1,configurable:!0}),n.prototype.serializeTo=function(e){e.writePrimitive("envelopeHeaders",this._envelopeHeaders),e.writePrimitive("requestBody",this._requestBody),e.writePrimitive("requestMethod",this._requestMethod),e.writePrimitive("requestServerRelativeUrl",this._requestServerRelativeUrl)},n.prototype.serializeFrom=function(e){this._envelopeHeaders=e.readPrimitive("envelopeHeaders"),this._requestBody=e.readPrimitive("requestBody"),this._requestMethod=e.readPrimitive("requestMethod"),this._requestServerRelativeUrl=e.readPrimitive("requestServerRelativeUrl")},n.prototype.getFlowId=function(){return this.flowId},n.prototype.createFlowIdSdkHeader=function(){var e;return this.flowId?((e={type:t.Protocol.flowIdHeaderName})[t.Protocol.flowIdHeaderName]=this.flowId,e):null},G([t.Serializable("ExchangeRequest"),J("design:paramtypes",[Object,String,Object,Array,String])],n)}();t.BaseExchangeRequest=n;var o=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return V(n,e),G([t.Serializable("SessionExchangeReqeust")],n)}(n);t.SessionExchangeRequest=o;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t}(n);t.PublicExchangeRequest=r}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t;!function(n){var o=function(){function e(e,t){this._sdk=e,this._hostedPluginName=t.getPluginInfo().getPluginName()}return e.prototype.extend=function(e,t){n.ExtensionPoint.byName(e).extend(t)},e.prototype.getSdk=function(){return this._sdk},e.prototype.generateRandomHexString=function(e){return this._sdk.host.generateRandomHexString(e)},e.prototype.suspendControlFlowToDefaultSuspensionContext=function(e){this._sdk.suspendControlFlowToDefaultSuspensionContext(e)},e.prototype.log=function(e,t){this._sdk.host.log(e,"TransmitSDK/Tarsus/Plugin/"+this._hostedPluginName,t)},e}();n.TarsusPluginHostImpl=o;var r=function(){function n(e){this._installedPluginsAndConfigs={},this._initializedPlugins=[],this._sdk=e}return n.prototype.getInitializedPlugins=function(){return this._initializedPlugins.concat([])},n.prototype.installPlugin=function(e,n){if(this._installedPluginsAndConfigs[e])throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.AppImplementation,"Attempt to install plugin "+e+" twice.");this._installedPluginsAndConfigs[e]=n},n.prototype.initializePlugins=function(){var n=this;this._sdk.log(t.LogLevel.Debug,(function(){return"Starting plugin initialization..."}));var r=Object.keys(this._installedPluginsAndConfigs).map((function(r){return n._sdk.log(t.LogLevel.Debug,(function(){return"Loading plugin "+r+"..."})),n._sdk.host.loadPlugin(r).then((function(i){var s=i.getPluginInfo(),a=e.tarsusplugin.impl.PluginInfoImpl.toString(s);if(i.getPluginInfo().getPluginName()!=r)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.AppImplementation,"Plugin "+r+": getPluginInfo() reported mismatched name -- "+a+".");n._sdk.log(t.LogLevel.Info,(function(){return"Initializing plugin "+a+"..."}));var c=new o(n._sdk,i);return i.initialize(c,n._installedPluginsAndConfigs[r]).then((function(){n._initializedPlugins.push(i)})).catch((function(e){n._sdk.log(t.LogLevel.Error,(function(){return"Couldn't initialize plugin "+a+": "+e}))}))}))}));return Promise.all(r).then((function(){n._sdk.log(t.LogLevel.Debug,(function(){return"Plugin initialization completed sucessfuly"}))}))},n}();n.TarsusPluginManager=r}((t=e.sdk||(e.sdk={})).core||(t.core={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t,n,o;o=e.sdk||(e.sdk={}),t=o.core||(o.core={}),n=function(){function e(e,n){this._locale=n,this._sdk=e,this._serverClientStrings=new t.ClientStrings({}),this._cachedClientStrings=new t.ClientStrings({})}return Object.defineProperty(e.prototype,"locale",{get:function(){return this._locale},enumerable:!1,configurable:!0}),e.prototype.isServerClientStringsEmpty=function(){var e=this._serverClientStrings.strings;return null==e||0===Object.keys(e).length&&e.constructor===Object},e.prototype.setServerClientStrings=function(e){this._serverClientStrings=e,this._cachedClientStrings=new t.ClientStrings({})},e.prototype.applyGlobalStyleSheetJson=function(e){this._styleSheetJson||(this._styleSheetJson=JSON.parse(this._sdk.host.getUIStyles())),this._styleSheetJson=t.UIStyleSheets.merge(this._styleSheetJson,e),this._cachedBaseStylesheet=null},Object.defineProperty(e.prototype,"uiStylesheets",{get:function(){return this.getUiStylesheetsWithOverrides()},enumerable:!1,configurable:!0}),e.prototype.getUiStylesheetsWithOverrides=function(){for(var e=[],n=0;n",guid:e._guid.toString(),user_id:e.userId,display_name:e._displayName,id_token:e._idToken,uid_hash:e._uidHash,user_number:e._phoneNumber,schemeVersion:"v1",device_signing_key_tag_salt:e._deviceSigningKeyTagSalt};return e._ephemeralUserId&&(t.ephemeral_id=e._ephemeralUserId),t},o.save=function(e,n){if(n._ephemeral)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Attempt to save ephemeral user record to persistent store.",{});var r=e.host.readStorageKey(o.storageKey);r.length=r.length||0;for(var i=0;i0}))),i.length)switch(n){case t.Protocol.AuthMenuPresentationMode.AuthenticatorMenu:var s=i.map((function(t){return new e.impl.AuthenticationOptionImpl(t,t.suggestedParameters)}));this._uiHandler.selectAuthenticator(s,this.policyAction(),this._clientContext).then((function(t){switch(t.getResultType()){case e.AuthenticatorSelectionResultType.Abort:r.completeAuthenticationWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.UserCanceled,"Cancel during authenticator selection."));break;case e.AuthenticatorSelectionResultType.SelectAuthenticator:if(!(s.filter((function(e){return e.getAuthenticator()==t.getSelectedAuthenticator()})).length>0)){r.completeAuthenticationWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"selectAuthenticator returned an authenticator not within options."));break}if(!t.getSelectedAuthenticator().getEnabled()){r.completeAuthenticationWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"selectAuthenticator returned a non-enabled authenticator."));break}r.runAuthenticator(t.getSelectedAuthenticator(),t.getSelectedAuthenticationParameters());break;case e.AuthenticatorSelectionResultType.Escape:r.completeWithEscapeRequest(t.getActionEscapeRequest())}}));break;case t.Protocol.AuthMenuPresentationMode.DefaultAuthenticator:this._defaultAuthenticator&&this._availableAuthenticators.indexOf(this._defaultAuthenticator)>=0?this.runAuthenticator(this._defaultAuthenticator,[]):(this._sdk.log(e.LogLevel.Warning,(function(){return"Default authenticator for user not found. Falling back to first authenticator in list."})),this.runAuthenticator(this._availableAuthenticators[0],[]));break;case t.Protocol.AuthMenuPresentationMode.FirstAuthenticator:this.runAuthenticator(this._availableAuthenticators[0],[])}else this._allAuthenticators.filter((function(e){return e.getLocked()})).length>0?this.completeAuthenticationWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AllAuthenticatorsLocked,"All authenticators locked.")):this.completeAuthenticationWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.NoRegisteredAuthenticator,"No registered authenticator available."))},r.prototype.loadAuthenticatorDescriptionsFromAction=function(e){var t=this;this._allAuthenticators=e.methods.map((function(e){return n.AuthenticationMenuAuthenticator.fromAuthenticationActionMenuOption(e,t)}))},r.prototype.updateAvailableAuthenticatorsList=function(){var t=this;this._defaultAuthenticator=null,this._availableAuthenticators=[],this._allAuthenticators.forEach((function(e){e.getEnabled()&&t._availableAuthenticators.push(e),e.getDefaultAuthenticator()&&(t._defaultAuthenticator=e)})),this._defaultAuthenticator||(this._defaultAuthenticator=this._availableAuthenticators[0]),this._sdk.log(e.LogLevel.Debug,(function(){return"Updated available authenticators list; "+t._availableAuthenticators.length+" available authenticators"}))},r.prototype.runAuthenticator=function(n,o){var r=this,i=n.authDriver;this.prepareForRunningAuthenticationDriver(i)&&i.runAuthentication(o).then((function(o){if(o instanceof t.authenticationdrivers.AuthenticationDriverSessionResultSwitchAuthenticator)o.requiredAuthenticator?r.runAuthenticator(o.requiredAuthenticator,[]):r.runWithPresentationMode(t.Protocol.AuthMenuPresentationMode.AuthenticatorMenu,o.allowedAuthenticators);else if(o instanceof t.authenticationdrivers.AuthenticationDriverSessionResultAuthenticationCompleted){if(r._shouldUpdateDefaultAuth&&(r._sdk.log(e.LogLevel.Info,(function(){return"Updating user default authenticator."})),!r._controlFlowProcessor._session.anonymous)){var i=r._controlFlowProcessor._session.user;i.updateDefaultAuthId(n.getAuthenticatorId()),r._controlFlowProcessor._session.persistUserData&&t.User.save(r._sdk,i)}r.completeAuthenticationWithAssertionResult(o.assertionResult)}else o instanceof t.authenticationdrivers.AuthenticationDriverSessionResultEscapeRequested?r.completeWithEscapeRequest(o.escapeRequest):r.completeAuthenticationWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Unknown authentication driver result type encountered."))}),(function(t){r._sdk.log(e.LogLevel.Debug,(function(){return"Received authentication driver error "+t})),r.completeAuthenticationWithError(t)}))},r}(n.ActionDriverAuthenticatorOp);n.ActionDriverAuthentication=o}(t.actiondrivers||(t.actiondrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n=function(n){function o(e,t){return n.call(this,e,t)||this}return V(o,n),o.prototype.doRunAction=function(){var n=this;this._sdk.log(e.LogLevel.Debug,(function(){return"Executing confirmation action."}));var o=this._action;return this._uiHandler.getConfirmationInput(o.title,o.text,o.continue_button_text,o.cancel_button_text,this.policyAction(),this._clientContext).then((function(r){var i=r.getActionEscapeRequest();if(i)return n.processEscapeRequest(i);var s={user_cancelled:1==r.getUserChoice()},a=Promise.resolve(s);if(o.require_sign_content){var c={params:{title:o.title,text:o.text,continue_button_text:o.continue_button_text,cancel_button_text:o.cancel_button_text,parameters:o.parameters,image:o.image},user_input:s.user_cancelled?o.cancel_button_text:o.continue_button_text};a=a.then((function(e){return t.ActionDriverSignContent.augmentAssertionDataWithSignedContent(e,c,n._controlFlowProcessor._session.deviceSigningKeyPair,n._sdk)}))}return a.then((function(t){return n._sdk.log(e.LogLevel.Debug,(function(){return"Asserting confirmation: "+t})),n.sendAssertionRequest(null,t).then((function(e){return e}))}))}))},o}(t.SimpleCancellationActionDriver);t.ActionDriverConfirmation=n}(t.actiondrivers||(t.actiondrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(n){var o=function(n){function o(e,t){return n.call(this,e,t)||this}return V(o,n),o.prototype.doRunAction=function(){var t=this;return this._sdk.log(e.LogLevel.Debug,(function(){return"Executing debug break action."})),this._sdk.host.setDebugIndicatorVisible(!0),this.pollUntilDone().finally((function(){t._sdk.host.setDebugIndicatorVisible(!1)}))},o.prototype.pollUntilDone=function(){var n=this,o={};return e.util.wrapPromiseWithActivityIndicator(this._uiHandler,this._policyAction,this._clientContext,this._sdk.host.createDelayedPromise(250)).then((function(){return n.sendAssertionRequest(null,o)})).then((function(e){return e.assertion_error_code==t.Protocol.AssertionErrorCode.NotFinished?n.pollUntilDone():e}))},o}(n.SimpleCancellationActionDriver);n.ActionDriverDebugBreak=o}(t.actiondrivers||(t.actiondrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(n){var o=function(n){function o(e,t){return n.call(this,e,t)||this}return V(o,n),o.prototype.doRunAction=function(){var n=this;this._sdk.log(e.LogLevel.Debug,(function(){return"Executing disable TOTP action..."}));var o=this._action,r=t.totp.TotpPropertiesProcessor.createWithUser(this._controlFlowProcessor._session.user,this._sdk,this._clientContext,this._controlFlowProcessor._session);return this._sdk.log(e.LogLevel.Debug,(function(){return"Obtained TOTP processor."})),o.config_ids.forEach((function(t){n._sdk.log(e.LogLevel.Debug,(function(){return"Deleting TOTP processor "+t+"."})),r.deleteProvisionForGenerator(t),n._sdk.log(e.LogLevel.Debug,(function(){return"TOTP processor "+t+" deleted."}))})),this.sendAssertionRequest()},o}(n.SimpleCancellationActionDriver);n.ActionDriverDisableTotp=o}(t.actiondrivers||(t.actiondrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(n){!function(o){var r=function(o){function r(e,t){return o.call(this,e,t)||this}return V(r,o),r.prototype.doRunAction=function(){var e=this,n=this._action,o=r.formExtensionPoint.firstNonNull((function(e){return e.createFormSession(n.form_id,n.app_data)}));return o?(this._sdk.log(t.LogLevel.Debug,(function(){return'Using extension of type "com.ts.mobile.plugins.form.settings" for formId '+n.form_id})),this.session=o):this.session=this._uiHandler.createFormSession(n.form_id,n.app_data),this.session?new Promise((function(t,n){e.completionFunction=t,e.rejectionFunction=n,e.session.startSession(e._clientContext,e.policyAction()),e.session.promiseFormInput().then((function(t){return e.processPromiseResult(t)}),e.rejectionFunction)})):Promise.reject(t.impl.AuthenticationErrorImpl.appImplementationError("Invalid return from createFormSession."))},r.prototype.processPromiseResult=function(e){switch(e.getControlRequest()){case t.FormControlRequest.Submit:var n={input:e.getJsonData()};this.request(n);break;case t.FormControlRequest.Abort:this.terminateSession(),this.rejectionFunction(new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.UserCanceled,"User cancelled a form action."));break;case t.FormControlRequest.Escape:this.terminateSession(),this.processEscapeRequest(e.getActionEscapeRequest()).then(this.completionFunction,this.rejectionFunction)}},r.prototype.terminateSession=function(){this.session&&(this.session.endSession(),delete this.session)},r.prototype.request=function(e){var t=this;this.sendAssertionRequest(null,null,e).then((function(e){var o=e.data;switch(e.assertion_error_code){case n.Protocol.AssertionErrorCode.NotFinished:t.session.onContinue(o),t.session.promiseFormInput().then((function(e){return t.processPromiseResult(e)}),t.rejectionFunction);break;case n.Protocol.AssertionErrorCode.RepeatCurrentStep:t.session.onError(o),t.session.promiseFormInput().then((function(e){return t.processPromiseResult(e)}),t.rejectionFunction);break;default:t.terminateSession(),t.completionFunction(e)}})).catch((function(e){t.terminateSession(),t.rejectionFunction(e)}))},r.formExtensionPoint=new n.ExtensionPoint(e.tarsusplugin.TARSUS_EXTENSION_POINT_NAME_FORMS_EXTENSION),r}(o.SimpleCancellationActionDriver);o.ActionDriverForm=r}(n.actiondrivers||(n.actiondrivers={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n=function(t){function n(e,n){return t.call(this,e,n)||this}return V(n,t),n.prototype.doRunAction=function(){var t=this;this._sdk.log(e.LogLevel.Debug,(function(){return"Executing information action."}));var n=this._action;return this._uiHandler.getInformationResponse(n.title,n.text,n.button_text,this.policyAction(),this._clientContext).then((function(n){if(n.getActionEscapeRequest())return t.processEscapeRequest(n.getActionEscapeRequest());if(t._sdk.log(e.LogLevel.Debug,(function(){return"Asserting information"})),-1!=n.getUserChoice())throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"ConfirmationInput.getUserChoice must be set to -1.");return t.sendAssertionRequest()}))},n}(t.SimpleCancellationActionDriver);t.ActionDriverInformation=n}(t.actiondrivers||(t.actiondrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(n){!function(o){var r=function(e){function t(t,o){var r=e.call(this,t)||this;return t instanceof n.SerializationContext||(r._idpSessionContinuationData=o),r}return V(t,e),Object.defineProperty(t.prototype,"idpSessionContinuationData",{get:function(){return this._idpSessionContinuationData},enumerable:!1,configurable:!0}),t.prototype.createResumableProcess=function(e){return new i(e,this)},t.prototype.serializeTo=function(t){e.prototype.serializeTo.call(this,t),t.writePrimitive("idpSessionContinuation",this._idpSessionContinuationData)},t.prototype.serializeFrom=function(t){e.prototype.serializeFrom.call(this,t),this._idpSessionContinuationData=t.readPrimitive("idpSessionContinuation")},G([n.Serializable("ActionDriverInvokeIdpContinuation"),J("design:paramtypes",[Object,Object])],t)}(o.ResumableProcessActionContinuation);o.ActionDriverInvokeIdpContinuation=r;var i=function(o){function i(){return null!==o&&o.apply(this,arguments)||this}return V(i,o),i.prototype.extensionPointForIdp=function(){var e=this,n=i.idpExtensionPoint.first((function(t){return t.canHandleIdp(e.idpName)}));if(!n)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.AppImplementation,"Could not locate IDP handler plugin for idp "+this.idpName+".");return n},i.prototype.resume=function(e,n){var o=this;if(!(e instanceof r))throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Invalid continuation type for ActionDriverInvokeIdp");return new Promise((function(t,r){o.extensionPointForIdp().resumeFromContinuation(e.idpSessionContinuationData,n).then((function(e){return o.processIdpResponse(e)})).then(t,r)}))},i.prototype.createContinuation=function(){return new r(this._action,this._activeIdpAuthSession&&this._activeIdpAuthSession.serializeContinuationData())},i.prototype.run=function(){var e=this;return new Promise((function(t,n){var o=e.extensionPointForIdp().createIdpAuthSession(e.idpName);e._activeIdpAuthSession=o,o.startSession(e._controlFlowProcessor._session.user.userHandle,e._action,e.policyAction(),e._clientContext),e._activeIdpAuthSession.invokeIdp().finally((function(){o.endSession(),e._activeIdpAuthSession=null})).then((function(t){return e.processIdpResponse(t)})).then(t,n)}))},Object.defineProperty(i.prototype,"idpName",{get:function(){return this._action.idp_name},enumerable:!1,configurable:!0}),i.prototype.processIdpResponse=function(e){return this.sendAssertionRequest(null,{idp_response:e.getResultPayload()})},i.idpExtensionPoint=new n.ExtensionPoint(e.tarsusplugin.TARSUS_EXTENSION_POINT_NAME_IDP_LOGIN_PROVIDER),i}(o.ResumableProcessActionDriver);o.ActionDriverInvokeIdp=i}(n.actiondrivers||(n.actiondrivers={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n=function(t){function n(e,n){return t.call(this,e,n)||this}return V(n,t),n.prototype.run=function(){var t=this;return this._sdk.log(e.LogLevel.Debug,(function(){return"Executing JSON data action."})),this.sendAssertionRequest().then((function(o){return t._sdk.log(e.LogLevel.Debug,(function(){return"Executing JSON data action: "+o})),n.handleJsonDataByUiHandler(t._uiHandler,o,o.data.json_data,t._policyAction,t._clientContext)}))},n.handleJsonDataByUiHandler=function(t,n,o,r,i){return t.processJsonData(o,r,i).then((function(t){if(t.getContinueProcessing())return n;throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.UserCanceled,"User cancelled a JSON action.")}))},n}(t.ActionDriver);t.ActionDriverJsonData=n}(t.actiondrivers||(t.actiondrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),Z.ts.mobile.tarsusplugin.KycDataCollectionResult,Z.ts.mobile.sdk.InputOrControlResponse,function(e){!function(t){!function(t){!function(n){!function(r){!function(i){var s=function(e){function t(t,n){var o=e.call(this,t)||this;return t instanceof r.SerializationContext||(o._kycSessionContinuationData=n),o}return V(t,e),Object.defineProperty(t.prototype,"kycSessionContinuationData",{get:function(){return this._kycSessionContinuationData},enumerable:!1,configurable:!0}),t.prototype.createResumableProcess=function(e){return new a(e,this)},t.prototype.serializeTo=function(t){e.prototype.serializeTo.call(this,t),t.writePrimitive("kycSessionContinuation",this._kycSessionContinuationData)},t.prototype.serializeFrom=function(t){e.prototype.serializeFrom.call(this,t),this._kycSessionContinuationData=t.readPrimitive("kycSessionContinuation")},G([r.Serializable("ActionDriverKycContinuation"),J("design:paramtypes",[Object,Object])],t)}(i.ResumableProcessActionContinuation);i.ActionDriverKycContinuation=s;var a=function(i){function a(){return null!==i&&i.apply(this,arguments)||this}return V(a,i),a.prototype.run=function(){return £(this,void 0,void 0,(function(){var e,t,n,o,i;return X(this,(function(s){switch(s.label){case 0:e=this.extensionPointForKyc(),this._activeKycSession=e.createSession(this.action.vendor_name,this.action.payload),this._activeKycSession.startSession(this._controlFlowProcessor._clientContext,this.policyAction()),s.label=1;case 1:s.trys.push([1,8,9,10]),t=null,s.label=2;case 2:return t&&t.assertion_error_code!=r.Protocol.AssertionErrorCode.NotFinished?[3,7]:(n=t?t.data.payload:this.action.payload,[4,this._activeKycSession.collectKycData(n)]);case 3:return(o=s.sent()).isControlRequest()?[2,this.handleControlRequest(o.getControlRequest())]:[3,4];case 4:return[4,this.handleUserResponse(this._activeKycSession,o.getResponse())];case 5:t=s.sent(),s.label=6;case 6:return[3,2];case 7:return[2,t];case 8:return i=s.sent(),[2,Promise.reject(i)];case 9:return this._activeKycSession.endSession(),[7];case 10:return[2]}}))}))},a.prototype.resume=function(e,t){var o=this;if(!(e instanceof s))throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.Internal,"Invalid continuation type for ActionDriverKyc");return new Promise((function(n,r){o.extensionPointForKyc().resumeFromContinuation(e.kycSessionContinuationData,t).then((function(e){return o.submitUserResponse(e)})).then(n,r)}))},a.prototype.createContinuation=function(){return new s(this._action,this._activeKycSession&&this._activeKycSession.serializeContinuationData())},a.prototype.handleControlRequest=function(t){if(this.logDebug((function(){return"Processing control request "+t.getRequestType()})),t.getRequestType()===n.ControlRequestType.AbortAuthentication){var o=this._policyAction.getEscapeOptions().filter((function(t){return t.getPresentation()==e.ts.mobile.sdk.ActionEscapeOptionPresentation.Cancel}))[0];if(o){this._sdk.log(n.LogLevel.Debug,(function(){return"Got cancel escape option; responding with that."}));var r=new n.ActionEscapeRequest;return r.setEscapeOption(o),this.sendAssertionEscapeRequest(r)}return this.rejectedPromise(n.AuthenticationErrorCode.UserCanceled,"KYC action canceled by user.")}return this.rejectedPromise(n.AuthenticationErrorCode.AppImplementation,"Unsupported control request: "+t.getRequestType()+" for kyc action.")},a.prototype.submitUserResponse=function(e){return £(this,void 0,void 0,(function(){var t,n,o;return X(this,(function(r){switch(r.label){case 0:return this.logDebug((function(){return"Processing kyc data"})),t=e.getPayload(),n={payload:t},[4,this.sendAssertionRequest(a.AssertActionSendData,n)];case 1:return o=r.sent(),this.logDebug((function(){return"Server result: "+o.assertion_error_code})),[2,o]}}))}))},a.prototype.handleUserResponse=function(e,t){return £(this,void 0,void 0,(function(){var n,i,s,c;return X(this,(function(u){switch(u.label){case 0:return[4,this.submitUserResponse(t)];case 1:n=U.Kent(),i=function(){var t,o;return X(this,(function(r){switch(r.label){case 0:return s.logDebug((function(){return"Received polling assertion response, asking session for duration"})),[4,e.processing(null===(r=n.data)||void 0===r?void 0:r.payload)];case 1:return(t=r.sent()).isControlRequest()?[2,{value:s.handleControlRequest(t.getControlRequest())}]:[3,2];case 2:return o=t.getResponse().getDelay(),s.logDebug((function(){return"Waiting for: "+o})),[4,s.delay(o)];case 3:return r.sent(),s.logDebug((function(){return"Polling after delay"})),[4,s.sendAssertionRequest(a.AssertActionPoll,{})];case 4:n=r.sent(),s.logDebug((function(){return"Server result: "+n.assertion_error_code})),r.label=5;case 5:return[2]}}))},s=this,u.label=2;case 2:return n.assertion_error_code!=r.Protocol.AssertionErrorCode.ExternalProcessPending?[3,4]:[5,i()];case 3:return"object"===o(c=U.Kent())?[2,c.value]:[3,2];case 4:return[2,n]}}))}))},a.prototype.extensionPointForKyc=function(){var e=this,t=a.kycExtensionPoint.firstNonNull((function(t){return t.canHandleProvider(e.action.vendor_name)?t:null}));if(!t)throw new n.impl.AuthenticationErrorImpl(n.AuthenticationErrorCode.AppImplementation,"Could not locate KYC handler plugin for kyc provider "+this.action.vendor_name+".");return t},Object.defineProperty(a.prototype,"action",{get:function(){return this._action},enumerable:!1,configurable:!0}),a.prototype.rejectedPromise=function(e,t){return Promise.reject(new n.impl.AuthenticationErrorImpl(e,t))},a.prototype.logDebug=function(e){this._sdk.log(n.LogLevel.Debug,e)},a.prototype.delay=function(e){return this._sdk.host.createDelayedPromise(e)},a.AssertActionPoll="poll",a.AssertActionSendData="data",a.kycExtensionPoint=new r.ExtensionPoint(t.tarsusplugin.TARSUS_EXTENSION_POINT_NAME_KYC),a}(i.ResumableProcessActionDriver);i.ActionDriverKyc=a}(r.actiondrivers||(r.actiondrivers={}))}(n.core||(n.core={}))}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(n){var o=function(o){function r(e,t){var n=o.call(this,e,t)||this;return n.isAssertionContainerNotComplete=!1,n}return V(r,o),r.prototype.strategyStatePerUserStorageKey=function(){var e=this._controlFlowProcessor._session.user.guid;return new t.TarsusKeyPath("per_user",e.toString(),"promotion_strategy_state")},r.prototype.runActionWithCompletionFunctions=function(){var t=this;if(this._sdk.log(e.LogLevel.Debug,(function(){return"ActionDriverPromotion#runActionWithCompletionFunctions() started"})),this._action=this._action,this._action.assertions.length<1)return this._sdk.log(e.LogLevel.Info,(function(){return"runActionWithCompletionFunctions() Promotion has no assertions, finishing action."})),void this.completeWithDeclineAssertion();if(!this.shouldDisplayPromotion())return this._sdk.log(e.LogLevel.Info,(function(){return"runActionWithCompletionFunctions() Promotion stragety stop, finishing action."})),void this.completeWithDeclineAssertion();if(this._session=this._uiHandler.createRegistrationPromotionSession(this._controlFlowProcessor._session.user.displayName,this._policyAction),this._session){this._session.startSession(this._clientContext,this.policyAction());var o=this._action.options;this._session.promptIntroduction(o.title,o.text,o.ok_button,o.decline_button).then((function(e){if(t.handlePromotionInputControlOrEscapeRequest(e)){for(var o=t._action.assertions,r=new Array,i=0;i-1&&n.splice(r,1)}this._session.setPromotedAuthenticators(n).then((function(n){if(o.handlePromotionInputControlOrEscapeRequest(n)){var r=n.getSelectedAuthenticator();o._currentAuthentictorSelected=r;var i=r.authDriver;o.prepareForRunningAuthenticationDriver(i)&&r.authDriver.runRegistration().then((function(n){if(n instanceof t.authenticationdrivers.AuthenticationDriverSessionResultAuthenticationCompleted)o.isAssertionContainerNotComplete?(o._sdk.log(e.LogLevel.Debug,(function(){return"suggestAuthenticators() callback result: promotion not completed. showing list again."})),o.suggestAuthenticators()):(o._sdk.log(e.LogLevel.Debug,(function(){return"suggestAuthenticators() callback result: promotion completed. finishing"})),o.completeAuthenticationWithAssertionResult(n.assertionResult));else if(n instanceof t.authenticationdrivers.AuthenticationDriverSessionResultSwitchAuthenticator)if(n.allowedAuthenticators){o._sdk.log(e.LogLevel.Debug,(function(){return"suggestAuthenticators() callback result: switch authentciator with allowed authenticators called"}));var r=n.allowedAuthenticators;o._currentAuthentictorSelected=null,o.suggestAuthenticators(r)}else o._sdk.log(e.LogLevel.Debug,(function(){return"suggestAuthenticators() callback result: switch authentciator called"})),o._currentAuthentictorSelected=null,o.suggestAuthenticators();else n instanceof t.authenticationdrivers.AuthenticationDriverSessionResultEscapeRequested?o.completeWithEscapeRequest(n.escapeRequest):(o._sdk.log(e.LogLevel.Error,(function(){return"suggestAuthenticators() unexpected callback result: stopping with error.'"})),o.completeAuthenticationWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Unknown authentication driver result type encountered during registration.")))}),(function(t){o._sdk.log(e.LogLevel.Error,(function(){return"suggestAuthenticators() error callback result: stopping with error. error: '"+t._data+"'"})),o.completeAuthenticationWithError(t)}))}else o._sdk.log(e.LogLevel.Debug,(function(){return"suggestAuthenticators() stopped by ControlRequest of type "+n.getControlRequest()}))}))},r.prototype.handlePromotionInputControlOrEscapeRequest=function(t){if(t.getActionEscapeRequest())return this.completeWithEscapeRequest(t.getActionEscapeRequest()),!1;if(!t.isControlRequest())return!0;switch(t.getControlRequest()){case e.PromotionControlRequest.Continue:return!0;case e.PromotionControlRequest.Skip:return this.completeWithDeclineAssertion(),!1;case e.PromotionControlRequest.Abort:return this.completeAuthenticationWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.UserCanceled,"User aborted/canceled")),!1;default:return this._sdk.log(e.LogLevel.Warning,(function(){return"handlePromotionInputControlRequest() received invalid PromotionInput, unsupported ControlRequest"})),!1}},r.prototype.sendDeclineAssertion=function(){return this.sendAssertionRequest(r.ASSERT_DECLINE)},r.prototype.completeWithDeclineAssertion=function(){var e=this;this.sendDeclineAssertion().then((function(t){e.completeAuthenticationWithAssertionResult(t)})).catch((function(t){e.completeAuthenticationWithError(t)}))},r.prototype.completeAuthenticationWithAssertionResult=function(e){this.terminateSession(),o.prototype.completeAuthenticationWithAssertionResult.call(this,e)},r.prototype.completeAuthenticationWithError=function(e){this.terminateSession(),o.prototype.completeAuthenticationWithError.call(this,e)},r.prototype.terminateSession=function(){this._session&&(this._session.endSession(),delete this._session)},Object.defineProperty(r.prototype,"availableAuthenticatorsForSwitching",{get:function(){return this.availableAuthenticators},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"availableAuthenticators",{get:function(){return this._authenticatorList.concat([])},enumerable:!1,configurable:!0}),r.prototype.shouldDisplayPromotion=function(){var t=this.readStrategyState();if(null==t||null==t.lastPromotionDate||null==t.loginsCounter)return this._sdk.log(e.LogLevel.Debug,(function(){return"shouldDisplayPromotion() first promotion. Stored data was empty."})),t={loginsCounter:1,lastPromotionDate:0},this.updateStrategyState(t),!0;for(var n=this._action.options.strategies,o=!0,r=function(n){if(0==i.checkStrategy(n,t))return i._sdk.log(e.LogLevel.Debug,(function(){return"shouldDisplayPromotion() strategy stopped promotion. strategy type: "+n.type})),o=!1,"break"},i=this,s=0,a=n;s0&&n.push(e.ControlRequestType.ChangeMethod),this._actionDriver.availableAuthenticatorsForSwitching.length>0&&n.push(e.ControlRequestType.SelectMethod),this._uiHandler.controlOptionForCancellationRequestInSession(n,this._inputSession).then((function(o){o.getRequestType()!=e.ControlRequestType.CancelAuthenticator?n.indexOf(o.getRequestType())<0?t.completeAuthenticatorSessionWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"controlOptionForCancellationRequestInSession returned an invalid option.")):t.processControlRequest(o):t.completeAuthenticatorSessionWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"controlOptionForCancellationRequestInSession returned CancelAuthenticator which is an invalid option."))}))}},o.prototype.getAuthenticationActionOtherAuthenticators=function(){var e=this;return this._actionDriver.availableAuthenticatorsForSwitching.filter((function(t){return t!=e._authenticatorDescription}))},o.prototype.handleFallback=function(){var t=this;if(this._authenticatorDescription.fallback){var o=[e.AuthenticatorFallbackAction.Retry,e.AuthenticatorFallbackAction.Cancel],r=null,i=this._authenticatorDescription.fallback.method;i?(r=this._actionDriver.availableAuthenticators.filter((function(e){return e.getAuthenticatorId()==i}))[0])&&o.push(e.AuthenticatorFallbackAction.Fallback):this.getAuthenticationActionOtherAuthenticators().length>0&&o.push(e.AuthenticatorFallbackAction.AuthMenu),this._uiHandler.selectAuthenticatorFallbackAction(o,r,this._inputSession,this._actionDriver.policyAction(),this._clientContext).then((function(i){switch(t._sdk.log(e.LogLevel.Debug,(function(){return"Fallback action selected "+i})),o.indexOf(i)<0&&(t._sdk.log(e.LogLevel.Error,(function(){return"Invalid fallback action selected: "+i+" not in "+o})),t.completeAuthenticatorSessionWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Invalid fallback action selected by callback."))),i){case e.AuthenticatorFallbackAction.Fallback:case e.AuthenticatorFallbackAction.AuthMenu:t.completeAuthenticatorSessionWithResult(new n.AuthenticationDriverSessionResultSwitchAuthenticator(r));break;case e.AuthenticatorFallbackAction.Retry:t.authOrRegInStartedSession(!0);break;case e.AuthenticatorFallbackAction.Cancel:t.completeAuthenticatorSessionWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.UserCanceled,"User cancel in response to fallback action."))}}))}else this.completeAuthenticatorSessionWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Cannot handle a fallback error without fallback specification in action."))},o.prototype.recoveryOptionsForError=function(t,n){var o=[e.AuthenticationErrorRecovery.Fail];return[e.AuthenticationErrorCode.AllAuthenticatorsLocked,e.AuthenticationErrorCode.AppImplementation,e.AuthenticationErrorCode.ControlFlowExpired,e.AuthenticationErrorCode.SessionRequired,e.AuthenticationErrorCode.InvalidDeviceBinding,e.AuthenticationErrorCode.UserCanceled].indexOf(t.getErrorCode())>=0||(n||!this._authenticatorDescription.getEnabled()||this._operationMode==e.AuthenticatorSessionMode.Authentication&&t.getErrorCode()==e.AuthenticationErrorCode.AuthenticatorExternalConfigError||o.push(e.AuthenticationErrorRecovery.RetryAuthenticator),this.getAuthenticationActionOtherAuthenticators().length>0&&o.push(e.AuthenticationErrorRecovery.ChangeAuthenticator),this._actionDriver.availableAuthenticatorsForSwitching.length>0&&o.push(e.AuthenticationErrorRecovery.SelectAuthenticator)),o},o.prototype.performErrorRecoveryForError=function(t,n){var o=this,r=this.recoveryOptionsForError(t,n),i=this.defaultRecoveryForError(t);r.indexOf(i)<0&&(i=r.indexOf(e.AuthenticationErrorRecovery.SelectAuthenticator)>=0?e.AuthenticationErrorRecovery.SelectAuthenticator:e.AuthenticationErrorRecovery.Fail),this._inputSession.promiseRecoveryForError(t,r,i).then((function(n){o._sdk.log(e.LogLevel.Debug,(function(){return"Error recovery selected "+n})),o._sdk.log(e.LogLevel.Debug,(function(){return"recover from error: "+t.getErrorCode()})),r.indexOf(n)<0&&(o._sdk.log(e.LogLevel.Error,(function(){return"Invalid error recovery option from callback: "+n+" not in "+r})),o.completeAuthenticatorSessionWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Invalid error recovery action selected by callback."))),o.handleErrorRecoveryAction(n,t)}))},o.prototype.handleErrorRecoveryAction=function(t,o){switch(t){case e.AuthenticationErrorRecovery.RetryAuthenticator:this.authOrRegInStartedSession(!0);break;case e.AuthenticationErrorRecovery.ChangeAuthenticator:this.completeAuthenticatorSessionWithResult(new n.AuthenticationDriverSessionResultSwitchAuthenticator(null,this.getAuthenticationActionOtherAuthenticators()));break;case e.AuthenticationErrorRecovery.SelectAuthenticator:this.completeAuthenticatorSessionWithResult(new n.AuthenticationDriverSessionResultSwitchAuthenticator);break;case e.AuthenticationErrorRecovery.Fail:default:this.completeAuthenticatorSessionWithError(o)}},o.prototype.defaultRecoveryForError=function(t){return this._operationMode==e.AuthenticatorSessionMode.Authentication?!this._authenticatorDescription.getLocked()&&this._authenticatorDescription.getRegistered()&&this._authenticatorDescription.getEnabled()&&t.getErrorCode()!=e.AuthenticationErrorCode.AuthenticatorLocked&&t.getErrorCode()!=e.AuthenticationErrorCode.AllAuthenticatorsLocked?e.AuthenticationErrorRecovery.RetryAuthenticator:t.getErrorCode()!=e.AuthenticationErrorCode.AllAuthenticatorsLocked?e.AuthenticationErrorRecovery.ChangeAuthenticator:e.AuthenticationErrorRecovery.Fail:e.AuthenticationErrorRecovery.RetryAuthenticator},o}();n.AuthenticationDriver=o}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n=function(t){function n(e,n,o){return t.call(this,e,n,o)||this}return V(n,t),n.prototype.authenticateInStartedSession=function(t){var n=this;this._inputSession.promiseInput().then((function(e){return n.handleInputOrControlResponse(e)}),(function(t){return n.completeAuthenticatorSessionWithError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}))},n.prototype.registerInStartedSession=function(t){var n=this;this._inputSession.promiseInput().then((function(e){return n.handleInputOrControlResponse(e)}),(function(t){return n.completeAuthenticatorSessionWithError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}))},n.prototype.handleAuthenticationInputResponse=function(t){var n;try{n=this.generateAssertionDataForInputResponse(t)}catch(t){return void this.performErrorRecoveryForError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}this.processAuthenticateAssertion(n)},n.prototype.handleRegistrationInputResponse=function(t){try{var n=this.generateAssertionDataForInputResponse(t)}catch(t){return void this.performErrorRecoveryForError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}this.processRegisterAssertion(n)},n.prototype.generateAssertionDataForInputResponse=function(e){return{secret:this.generateSecretToSignForInputResponse(e)}},n}(t.AuthenticationDriver);t.AuthenticationDriverCentralizedSecretInputBased=n}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n=function(){function n(e){this._authenticationDriverCtor=e}return n.prototype.createAuthenticationDriver=function(e,t,n){return new this._authenticationDriverCtor(e,t,n)},n.prototype.evaluateLocalRegistrationStatus=function(t){return e.AuthenticatorRegistrationStatus.Registered},n.prototype.isSupportedOnDevice=function(e){return!0},n.prototype.suggestParameters=function(e,t){return[]},n.refreshInvalidatedAuthenticatorsEnrollments=function(e){return new Promise((function(n,o){var r,i=new Array;for(var s in e.user.localEnrollments){r=e.user.localEnrollments[s];var a=t.AuthenticatorDrivers[r.authenticatorId];i.push(a.checkAuthenticatorInvalidatedAndNotifyUIHandler(e))}Promise.all(i).then((function(e){n(e)})).catch((function(e){o(e)}))}))},n.prototype.checkAuthenticatorInvalidatedAndNotifyUIHandler=function(e){return Promise.resolve(!0)},n}();t.SimpleAuthenticationDriverDescriptor=n}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(n){var o=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return V(n,e),n.prototype.getEnabled=function(){return this.getSupportedOnDevice()},n.getDescription=function(e,o){return new n(e,o,{},{status:t.Protocol.AuthenticationMethodStatus.Unregistered})},n}(n.AuthenticatorDescriptionImpl),r=function(r){function i(e,t){var n=r.call(this,e)||this;return n._authenticatorType=t,n}return V(i,r),i.prototype.evaluateLocalRegistrationStatus=function(n){var o=n.user.localEnrollments[this._authenticatorType];return o?o.validationStatus==t.LocalEnrollmentValidationStatus.Invalidated?e.AuthenticatorRegistrationStatus.LocallyInvalid:e.AuthenticatorRegistrationStatus.Registered:e.AuthenticatorRegistrationStatus.LocallyInvalid},i.prototype.checkAuthenticatorInvalidatedAndNotifyUIHandler=function(r){var i=this;return new Promise((function(s,a){r.sdk.log(e.LogLevel.Info,(function(){return"Checking if authenticator "+i._authenticatorType+" has become invalidated."}));var c=r.user.localEnrollments[i._authenticatorType];if(c.status==t.LocalEnrollmentStatus.Registered&&c.validationStatus!=t.LocalEnrollmentValidationStatus.Invalidated)if(n.AuthenticatorDrivers[i._authenticatorType].evaluateLocalRegistrationStatus(r)==e.AuthenticatorRegistrationStatus.LocallyInvalid){r.sdk.log(e.LogLevel.Info,(function(){return"Authenticator "+i._authenticatorType+" already became invalidated. Invalidating enrollment record and notifying ui handler."}));var u=o.getDescription(r,c.authenticatorId);t.LocalEnrollment.invalidateLocalRegistrationStatusAndNotifyUIHandler(r.getCurrentUserInteractionSessionProvider(),u).then((function(e){s(e)})).catch((function(e){a(e)}))}else s(!1);else s(!1)}))},i}(n.SimpleAuthenticationDriverDescriptor);n.AuthenticationDriverDescriptorLocal=r}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(n){!function(n){var o=function(o){function r(){return o.call(this,n.AuthenticationDriverDeviceBiometrics,r.authenticatorName)||this}return V(r,o),r.prototype.evaluateLocalRegistrationStatus=function(i){var s=o.prototype.evaluateLocalRegistrationStatus.call(this,i);if(s!=t.AuthenticatorRegistrationStatus.Registered)return s;var a=i.user.localEnrollments[r.authenticatorName],c=n.AuthenticationDriverDeviceBiometrics.authenticatorKeyTagForUser(i.user,a.version,a.salt),u=i.sdk.host.getKeyPair(c,e.sdkhost.KeyClass.HardwareProtectedSignAndEncryptKey,e.sdkhost.KeyBiometricProtectionMode.BindToEnrollmentDb);return u?(u.closeKeyPair(),t.AuthenticatorRegistrationStatus.Registered):t.AuthenticatorRegistrationStatus.LocallyInvalid},r.prototype.isSupportedOnDevice=function(t){var n=t.sdk.host.queryHostInfo(e.sdkhost.HostInformationKey.DeviceBiometricsSupported);return!!n&&"false"!=n},r.authenticatorName="device_biometrics",r}(n.AuthenticationDriverDescriptorLocal);n.AuthenticationDriverDescriptorDeviceBiometrics=o}(n.authenticationdrivers||(n.authenticationdrivers={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(t){!function(t){var n=function(n){function o(){return n.call(this,t.AuthenticationDriverFace)||this}return V(o,n),o.prototype.isSupportedOnDevice=function(t){return"true"==t.sdk.host.queryHostInfo(e.sdkhost.HostInformationKey.ImageAcquitisionSupported)},o}(t.SimpleAuthenticationDriverDescriptor);t.AuthenticationDriverDescriptorFace=n}(t.authenticationdrivers||(t.authenticationdrivers={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.isSupportedOnDevice=function(t){return"true"===t.sdk.host.queryHostInfo(e.sdkhost.HostInformationKey.Fido2ClientPresent)},n}(t.SimpleAuthenticationDriverDescriptor);t.AuthenticationDriverDescriptorFido2=n}(t.authenticationdrivers||(t.authenticationdrivers={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(n){!function(n){var o=function(o){function r(){return o.call(this,n.AuthenticationDriverFingerprint,r.authenticatorName)||this}return V(r,o),r.prototype.evaluateLocalRegistrationStatus=function(i){var s=o.prototype.evaluateLocalRegistrationStatus.call(this,i);if(s!=t.AuthenticatorRegistrationStatus.Registered)return s;var a=i.user.localEnrollments[r.authenticatorName],c=n.AuthenticationDriverFingerprint.authenticatorKeyTagForUser(i.user,a.version,a.salt),u=i.sdk.host.getKeyPair(c,e.sdkhost.KeyClass.StdSigningKey,e.sdkhost.KeyBiometricProtectionMode.BindToEnrollmentDb);return u?(u.closeKeyPair(),t.AuthenticatorRegistrationStatus.Registered):t.AuthenticatorRegistrationStatus.LocallyInvalid},r.prototype.isSupportedOnDevice=function(t){return"true"==t.sdk.host.queryHostInfo(e.sdkhost.HostInformationKey.FingerprintSupported)},r.authenticatorName="fingerprint",r}(n.AuthenticationDriverDescriptorLocal);n.AuthenticationDriverDescriptorFingerprint=o}(n.authenticationdrivers||(n.authenticationdrivers={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n=function(){function e(e,t){this._targetIdentifier=e,this._description=t.describe(),this._deviceDetails=t}return e.prototype.getDescription=function(){return this._description},e.prototype.getDeviceIdentifier=function(){return this._targetIdentifier},e.prototype.getDeviceDetails=function(){return this._deviceDetails},e.__tarsusInterfaceName="MobileApproveTarget",e}();t.MobileApproveTargetImpl=n;var o=function(){function o(){}return o.prototype.evaluateLocalRegistrationStatus=function(t){return e.AuthenticatorRegistrationStatus.Registered},o.prototype.isSupportedOnDevice=function(e){return!0},o.prototype.suggestParameters=function(t,n){return o.createTargetsFromConfig(t).map((function(t){return e.AuthenticationActionParameterTargetSelection.create(t)}))},o.prototype.createAuthenticationDriver=function(e,n,o){return new t.AuthenticationDriverMobileApprove(e,n,o)},o.createTargetsFromConfig=function(t){return t.selectable_devices.map((function(t,o){var r=e.TargetDeviceDetailsImpl.fromServerFormat(t);return new n(t.device_id,r)}))},o.prototype.checkAuthenticatorInvalidatedAndNotifyUIHandler=function(e){return Promise.resolve(!0)},o}();t.AuthenticationDriverDescriptorMobileApprove=o}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(n){!function(n){var o=function(o){function r(){return o.call(this,n.AuthenticationDriverNativeFace,r.authenticatorName)||this}return V(r,o),r.prototype.evaluateLocalRegistrationStatus=function(i){var s=o.prototype.evaluateLocalRegistrationStatus.call(this,i);if(s!=t.AuthenticatorRegistrationStatus.Registered)return s;var a=i.user.localEnrollments[r.authenticatorName],c=n.AuthenticationDriverNativeFace.authenticatorKeyTagForUser(i.user,a.version,a.salt),u=i.sdk.host.getKeyPair(c,e.sdkhost.KeyClass.StdSigningKey,e.sdkhost.KeyBiometricProtectionMode.BindToEnrollmentDb);return u?(u.closeKeyPair(),t.AuthenticatorRegistrationStatus.Registered):t.AuthenticatorRegistrationStatus.LocallyInvalid},r.prototype.isSupportedOnDevice=function(t){return"true"==t.sdk.host.queryHostInfo(e.sdkhost.HostInformationKey.FaceIdKeyBioProtectionSupported)},r.authenticatorName="face_id",r}(n.AuthenticationDriverDescriptorLocal);n.AuthenticationDriverDescriptorNativeFace=o}(n.authenticationdrivers||(n.authenticationdrivers={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(n){var o=function(){function e(e,t,n,o,r,i){this._channelIndex=e,this._channelAssertionId=t,this._targetIdentifier=n,this._description=o,this._channel=r,this._deviceDetails=i}return e.prototype.getDescription=function(){return this._description},e.prototype.getChannel=function(){return this._channel},e.prototype.getTargetIdentifier=function(){return this._targetIdentifier},e.prototype.getChannelAssertionId=function(){return this._channelAssertionId},e.prototype.getChannelIndex=function(){return this._channelIndex},e.prototype.getDeviceDetails=function(){return this._deviceDetails},e.__tarsusInterfaceName="OtpTarget",e}();n.OtpTargetImpl=o;var r=function(){function r(){}return r.prototype.evaluateLocalRegistrationStatus=function(t){return e.AuthenticatorRegistrationStatus.Registered},r.prototype.isSupportedOnDevice=function(e){return!0},r.prototype.suggestParameters=function(t,n){return this.createTargetsFromConfig(t).map((function(t){return e.AuthenticationActionParameterTargetSelection.create(t)}))},r.prototype.createAuthenticationDriver=function(e,t,o){var r=this.createTargetsFromConfig(t);return new n.AuthenticationDriverOtp(e,t,r,o)},r.prototype.createTargetsFromConfig=function(n){return n.channels.map((function(n){var r;switch(n.type){case t.Protocol.AuthenticationMethodOtpChannelType.Email:r=e.OtpChannel.Email;break;case t.Protocol.AuthenticationMethodOtpChannelType.Sms:r=e.OtpChannel.Sms;break;case t.Protocol.AuthenticationMethodOtpChannelType.Voice:r=e.OtpChannel.VoiceCall;break;case t.Protocol.AuthenticationMethodOtpChannelType.Push:r=e.OtpChannel.PushNotification;break;default:r=e.OtpChannel.Unknown}return!n.targets&&n.target&&(n.targets={},n.targets[0]=n.target),n.targets||(n.targets={}),Object.keys(n.targets).map((function(t,i){var s=n.targets[t];if(r===e.OtpChannel.PushNotification){var a=s,c=e.TargetDeviceDetailsImpl.fromServerFormat(a);return new o(i,n.assertion_id,t,c.describe(),r,c)}var u=s;return new o(i,n.assertion_id,t,u,r,null)}))})).reduce((function(e,t){return e.concat(t)}),[])},r.prototype.checkAuthenticatorInvalidatedAndNotifyUIHandler=function(e){return Promise.resolve(!0)},r}();n.AuthenticationDriverDescriptorOtp=r}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n=function(){function e(e,t){this._targetIdentifier=e,this._description=t.describe(),this._deviceDetails=t}return e.prototype.getDescription=function(){return this._description},e.prototype.getDeviceIdentifier=function(){return this._targetIdentifier},e.prototype.getDeviceDetails=function(){return this._deviceDetails},e.__tarsusInterfaceName="TotpTarget",e}();t.TotpTargetImpl=n;var o=function(){function o(){}return o.prototype.evaluateLocalRegistrationStatus=function(t){return e.AuthenticatorRegistrationStatus.Registered},o.prototype.isSupportedOnDevice=function(e){return!0},o.prototype.suggestParameters=function(t,n){return o.createTargetsFromConfig(t).map((function(t){return e.AuthenticationActionParameterTargetSelection.create(t)}))},o.prototype.createAuthenticationDriver=function(e,n,o){return new t.AuthenticationDriverTotp(e,n,o)},o.createTargetsFromConfig=function(t){var o=t;return o.selectable_devices?o.selectable_devices.map((function(t,o){var r=e.TargetDeviceDetailsImpl.fromServerFormat(t);return new n(t.device_id,r)})):[]},o.prototype.checkAuthenticatorInvalidatedAndNotifyUIHandler=function(e){return Promise.resolve(!0)},o}();t.AuthenticationDriverDescriptorTotp=o}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(t){!function(t){var n=function(n){function o(){return n.call(this,t.AuthenticationDriverVoice)||this}return V(o,n),o.prototype.isSupportedOnDevice=function(t){return"true"==t.sdk.host.queryHostInfo(e.sdkhost.HostInformationKey.AudioAcquitisionSupported)},o}(t.SimpleAuthenticationDriverDescriptor);t.AuthenticationDriverDescriptorVoice=n}(t.authenticationdrivers||(t.authenticationdrivers={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(n){var o=function(o){function r(e,t,n){return o.call(this,e,t,n)||this}return V(r,o),Object.defineProperty(r.prototype,"lastObtainedKeyPair",{get:function(){return this._lastObtainedKeyPair},set:function(e){this._lastObtainedKeyPair&&this._lastObtainedKeyPair!=e&&this._lastObtainedKeyPair.closeKeyPair(),this._lastObtainedKeyPair=e},enumerable:!1,configurable:!0}),r.prototype.completeAuthenticatorSessionWithResult=function(r){this.operationMode===e.AuthenticatorSessionMode.Registration&&r instanceof n.AuthenticationDriverSessionResultAuthenticationCompleted&&(!r.assertionResult.assertion_error_code||r.assertionResult.assertion_error_code===t.Protocol.AssertionErrorCode.AssertionContainerNotComplete)&&(this._enrollmentRecordToCommit?(this._sdk.log(e.LogLevel.Debug,(function(){return"Updating local enrollment record on registration"})),this.user.updateEnrollmentRecord(this._enrollmentRecordToCommit)):this._sdk.log(e.LogLevel.Warning,(function(){return"No enrollment record to update."}))),this._enrollmentRecordToCommit=null,this.lastObtainedKeyPair=null,o.prototype.completeAuthenticatorSessionWithResult.call(this,r)},r.prototype.completeAuthenticatorSessionWithError=function(e){this.lastObtainedKeyPair=null,o.prototype.completeAuthenticatorSessionWithError.call(this,e)},r.prototype.registerInStartedSession=function(e){this._enrollmentRecordToCommit=null},r.prototype.calculateAssertionFieldsWithAuthenticatorKey=function(t){var n=this;return new Promise((function(o,r){var i=e.util.asciiToHex(n.localAuthenticatorChallenge());t.signHex(i).then((function(t){return{fch:e.util.hexToBase64(t)}})).then(o,r)}))},r.prototype.handleAuthenticationInputResponse=function(n){var o=this,r=this.user.localEnrollments[this.authenticatorType];r||this.performErrorRecoveryForError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.NoRegisteredAuthenticator,"Missing key for "+this.authenticatorType+" authenticator")),this.getKeyForEnrollmentDataAndInput(r,n).then((function(i){return o._sdk.log(e.LogLevel.Debug,(function(){return"Local authenticator key obtained; signing challenge"})),o.addRolloverDataIfNeeded(i,r,n).then((function(n){return o._externalCancelled?Promise.reject(o._actionDriver._controlFlowProcessor.createExternalCancellationError()):(o.lastObtainedKeyPair=n.key,o.calculateAssertionFieldsWithAuthenticatorKey(n.key).then((function(i){var s={};if(n.rolloverKeyData){o._sdk.log(e.LogLevel.Info,(function(){return"Local authenticator rollover requested"}));var a={};n.rolloverKeyData.key&&(a.key=n.rolloverKeyData.key.publicKeyToJson(),a.version=n.rolloverKeyData.schemeVersion),n.rolloverReason&&(a.reason=n.rolloverReason),n.rolloverOldKeyHash&&(a.expired_key={hash:n.rolloverOldKeyHash}),s.rollover=a,o._enrollmentRecordToCommit=r.duplicate(),o._enrollmentRecordToCommit.status=t.LocalEnrollmentStatus.Registered,o._enrollmentRecordToCommit.validationStatus=t.LocalEnrollmentValidationStatus.Validated,o._enrollmentRecordToCommit.salt=n.rolloverKeyData.salt,o._enrollmentRecordToCommit.version=n.rolloverKeyData.schemeVersion,o._enrollmentRecordToCommit.keyMaterial=n.rolloverKeyData.keyMeterial,o._enrollmentRecordToCommit.cryptoSettings=o._sdk.cryptoSettings,o._enrollmentRecordToCommit.authenticatorConfig=n.rolloverKeyData.authenticatorConfig,o._enrollmentRecordToCommit.publicKeyHash=e.util.calcPublicKeyHexStringEncodedSha256Hash(n.rolloverKeyData.key,o._sdk)}o.processAuthenticateAssertion(s,i)}),(function(e){return Promise.reject(e)})))})).catch((function(t){o.processLocalAuthenticatorError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}))})).catch((function(t){o.processLocalAuthenticatorError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}))},r.prototype.addRolloverDataIfNeeded=function(t,n,o){var r=this;if(this.rolloverNeeded(n)){var i=this.getRolloverReason(n);return this._sdk.log(e.LogLevel.Debug,(function(){return"AuthenticatorKeyRoll: "+i})),this.generatePendingEnrollment(o,!0).then((function(o){return t.rolloverKeyData=o,t.rolloverReason=i,n.publicKeyHash?t.rolloverOldKeyHash=n.publicKeyHash:t.rolloverOldKeyHash=e.util.calcPublicKeyHexStringEncodedSha256Hash(t.key,r._sdk),Promise.resolve(t)}))}return Promise.resolve(t)},r.prototype.getNewOrUpdatedEnrollmentRecord=function(n){var o=this;this._sdk.log(e.LogLevel.Debug,(function(){return"Register "+o.authenticatorType+": fetching local enrollment record"}));var r=this.user.localEnrollments[this.authenticatorType],i=e.util.calcPublicKeyHexStringEncodedSha256Hash(n.key,this._sdk);return r||(this._sdk.log(e.LogLevel.Debug,(function(){return"Register "+o.authenticatorType+": Generating new local enrollment record"})),r=this.user.createEnrollmentRecord(this.authenticatorType,n.schemeVersion,n.salt,t.LocalEnrollmentStatus.Unregistered,i)),r.status=t.LocalEnrollmentStatus.Registered,r.validationStatus=t.LocalEnrollmentValidationStatus.Validated,r.salt=n.salt,r.version=n.schemeVersion,r.cryptoSettings=this._sdk.cryptoSettings,r.publicKeyHash=i,r.keyMaterial=n.keyMeterial,r.authenticatorConfig=n.authenticatorConfig,r},r.prototype.handleRegistrationInputResponse=function(t){var n=this;this._sdk.log(e.LogLevel.Debug,(function(){return"Register "+n.authenticatorType+": Generating pending enrollment data"})),this.generatePendingEnrollment(t).then((function(e){return n.handleRegisterAssertion(e)})).catch((function(t){n.processLocalAuthenticatorError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}))},r.prototype.handleRegisterAssertion=function(t){var n=this;return this._sdk.log(e.LogLevel.Debug,(function(){return"Register "+n.authenticatorType+": Signing registration assertion"})),this.calculateAssertionFieldsWithAuthenticatorKey(t.key).then((function(o){n._sdk.log(e.LogLevel.Debug,(function(){return"Register "+n.authenticatorType+": Preparing registration assertion"}));var r=n.getNewOrUpdatedEnrollmentRecord(t);if(n._enrollmentRecordToCommit=r,n._externalCancelled)return Promise.reject(n._actionDriver._controlFlowProcessor.createExternalCancellationError());n.lastObtainedKeyPair=t.key;var i=Q({public_key:t.key.publicKeyToJson(),version:t.schemeVersion},o);n.processRegisterAssertion(null,i)}),(function(e){return Promise.reject(e)}))},r.prototype.handleRegisterAssertionResult=function(e){return e.data&&e.data.update_vaults&&t.vault.MultiCredsVault.updateVaultsProtectingCreds(this.user,e.data.update_vaults,this._uiHandler,this._sdk),o.prototype.handleRegisterAssertionResult.call(this,e)},r.prototype.handleUnregistrationAssertionResult=function(n){var r=this,i=this.user.localEnrollments[this.authenticatorType];i?(i.status=t.LocalEnrollmentStatus.Unregistered,this.user.updateEnrollmentRecord(i),this.unregisterEnrollmentAssets(i)):this._sdk.log(e.LogLevel.Warning,(function(){return"Failed to find enrollment record for "+r.authenticatorType})),n.data&&n.data.update_vaults&&t.vault.MultiCredsVault.updateVaultsProtectingCreds(this.user,n.data.update_vaults,this._uiHandler,this._sdk),o.prototype.handleUnregistrationAssertionResult.call(this,n)},r.prototype.handleAuthenticateAssertionResult=function(n,r,i,s,a){if(this._enrollmentRecordToCommit)if(n.assertion_error_code){if(n.assertion_error_code==t.Protocol.AssertionErrorCode.AckRequired)return this.user.updateEnrollmentRecord(this._enrollmentRecordToCommit),n.data&&n.data.update_vaults&&t.vault.MultiCredsVault.updateVaultsProtectingCreds(this.user,n.data.update_vaults,this._uiHandler,this._sdk),this.processRolloverAckAssertionRequest(this._enrollmentRecordToCommit.publicKeyHash,a),this._enrollmentRecordToCommit=null,!0}else this._sdk.log(e.LogLevel.Debug,(function(){return"Pending commit for enrollment; checking rollover status."})),n.data&&n.data.rollover&&0==n.data.rollover.code?(this._sdk.log(e.LogLevel.Info,(function(){return"Updating local enrollment record on authentication result"})),this.user.updateEnrollmentRecord(this._enrollmentRecordToCommit)):this._sdk.log(e.LogLevel.Error,(function(){return"Received a rollover failure response from the server; aboting rollover."}));return this._enrollmentRecordToCommit=null,o.prototype.handleAuthenticateAssertionResult.call(this,n,r,i,s,a)},r.prototype.processRolloverAckAssertionRequest=function(t,n){this._sdk.log(e.LogLevel.Info,(function(){return"AuthenticatorKeyRollover: Processing ack assertion request..."}));var o={};if(n&&n.fch){o={fch:n.fch};var r={rollover_ack:{hash:t}};this.processAuthenticateAssertion(r,o)}else this.completeAuthenticatorSessionWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Invalid assertion fields - missing fch"))},r.prototype.processLocalAuthenticatorError=function(e){this.performErrorRecoveryForError(e)},r.prototype.localAuthenticatorChallenge=function(){return this._actionDriver._controlFlowProcessor.challenge+this._authenticatorDescription.assertionId},r.prototype.getAuthenticatorEnrollmentConfig=function(){return null},r.prototype.onCancelRun=function(){o.prototype.onCancelRun.call(this),this.lastObtainedKeyPair&&(this.lastObtainedKeyPair=null)},r.prototype.shouldAllowBiometricFallbackButton=function(n){var o=this;if(!n)return!1;var r=this._actionDriver.availableAuthenticatorsForSwitching.filter((function(e){return e!=o._authenticatorDescription}));if(this._actionDriver instanceof t.actiondrivers.ActionDriverRegistration||this._actionDriver instanceof t.actiondrivers.ActionDriverAuthentication&&0==r.length)return!1;var i=n,s=i.getFallbackButtonTitle();if(!(s&&s.length>0))return!1;var a=i.getFallbackControlRequestType();switch(null==a&&(a=e.ControlRequestType.SelectMethod),a){case e.ControlRequestType.ChangeMethod:case e.ControlRequestType.SelectMethod:return this._actionDriver.availableAuthenticators.length>1;default:return!0}},r.prototype.publicKeyExpired=function(t){var n=this;if(!this._authenticatorConfig.public_key_expired)return!1;var o=t===this._authenticatorConfig.public_key_expired.hash;return this._sdk.log(e.LogLevel.Debug,(function(){return"AuthenticatorKeyRoll: authenticator "+n.authenticatorType+" \n key hash matching expired key hash received from server: "+o})),o},r.prototype.getRolloverReason=function(e){return this.publicKeyExpired(e.publicKeyHash)?"Rollover of "+this.authenticatorType+" authenticator public key due to expiration":"Upgrading "+this.authenticatorType+" authenticator scheme from "+e.version+" to "+this.currentScheme},r.prototype.rolloverNeeded=function(e){return this.publicKeyExpired(e.publicKeyHash)||this.schemeVersionRequiresRollover(e.version)},r}(n.AuthenticationDriver);n.AuthenticationDriverLocal=o}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){!function(e){e.instanceOfAuthenticationDriverSilentRegistrationSupport=function(e){return e.runSilentRegistration}}(e.authenticationdrivers||(e.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){!function(n){!function(n){var o=function(o){function r(){return null!==o&&o.apply(this,arguments)||this}return V(r,o),r.prototype.unregisterEnrollmentAssets=function(e){var t=this.authenticatorKeyTagForScheme(e.version,e.salt);this._sdk.host.deleteKeyPair(t)},r.prototype.invokeCancellationUiOrEscape=function(){var o=this._actionDriver._policyAction.getEscapeOptions().filter((function(t){return t.getPresentation()==e.ts.mobile.sdk.ActionEscapeOptionPresentation.Cancel}))[0];if(o){this._sdk.log(t.LogLevel.Debug,(function(){return"Got cancel escape option; responding with that."}));var r=new t.ActionEscapeRequest;r._escapeOption=o,r._escapeParameters=null,this.completeAuthenticatorSessionWithResult(new n.AuthenticationDriverSessionResultEscapeRequested(r))}else this._sdk.log(t.LogLevel.Debug,(function(){return"Invoking UI cancellation handler."})),this.invokeUiHandlerCancellation()},r}(n.AuthenticationDriverLocal);n.AuthenticationDriverLocalPersistentKeyPairBased=o}(n.authenticationdrivers||(n.authenticationdrivers={}))}(t.core||(t.core={}))}(t.sdk||(t.sdk={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(t){!function(t){var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.schemeVersionRequiresRollover=function(t){return"v0"==t||"v1"==t||"v2"==t&&"true"!=this._sdk.host.queryHostInfo(e.sdkhost.HostInformationKey.StdSigningKeyIsHardwareProtectedSignAndEncryptKey)},n}(t.AuthenticationDriverLocalPersistentKeyPairBased);t.AuthenticationDriverLocalPersistentKeyPairBasedPostV2Scheme=n}(t.authenticationdrivers||(t.authenticationdrivers={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(t){var n=function(){function t(){}return t.deviceBiometricInput=function(e,n){var o=t.newBiometricPromptInfo();return o.setLocalizedTitle(e.getTitle()),o.setLocalizedSubtitle(e.getSubtitle()),o.setLocalizedPrompt(e.getPrompt()),o.setCancelButtonTitle(e.getCancelButtonTitle()),n&&void 0!==n.require_confirmation?o.setRequireConfirmation(n.require_confirmation):o.setRequireConfirmation(!0),o},t.fingerprintInput=function(e){var n=t.newBiometricPromptInfo();n.setLocalizedPrompt(e.getPrompt());var o=e.getCancelButtonTitle();o&&00))return!1;var a=i.getFallbackControlRequestType();switch(null==a&&(a=t.ControlRequestType.SelectMethod),a){case t.ControlRequestType.ChangeMethod:return this._actionDriver.availableAuthenticatorsForSwitching.filter((function(e){return e!=o._authenticatorDescription})).length>0;case t.ControlRequestType.SelectMethod:return this._actionDriver.availableAuthenticatorsForSwitching.length>0;default:return!0}},i.prototype.runSilentRegistration=function(){var e=this;return this.generateAuthenticatorKey().then((function(n){var r=e.getNewOrUpdatedEnrollmentRecord(n),i={public_key:n.key.publicKeyToJson(),version:n.schemeVersion};return e._actionDriver.sendAuthenticatorAssertionRequest(e._authenticatorDescription,"register",null,i).then((function(n){if(n.assertion_error_code)throw t.impl.AuthenticationErrorImpl.errorForAssertionResponse(n);return e.user.updateEnrollmentRecord(r),new o.AuthenticationDriverSessionResultAuthenticationCompleted(n)}))}))},i.prototype.createAuthenticatorSession=function(){return this._uiHandler.createFingerprintAuthSession(o.AuthenticationDriverDescriptorFingerprint.authenticatorName,this.user.displayName)},i.prototype.authenticateInStartedSession=function(e){var n=this;this._inputSession.promiseInput().then((function(e){return n.handleInputOrControlResponse(e)}),(function(e){return n.completeAuthenticatorSessionWithError(t.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},i.prototype.registerInStartedSession=function(e){var n=this;r.prototype.registerInStartedSession.call(this,e),this._inputSession.promiseInput().then((function(e){return n.handleInputOrControlResponse(e)}),(function(e){return n.completeAuthenticatorSessionWithError(t.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},Object.defineProperty(i.prototype,"authenticatorType",{get:function(){return o.AuthenticationDriverDescriptorFingerprint.authenticatorName},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"currentScheme",{get:function(){return o.AUTHENTICATION_DRIVER_FINGERPRINT_CURRENT_SCHEME},enumerable:!1,configurable:!0}),i.prototype.processLocalAuthenticatorError=function(o){var r=this,i=o,s=0,a=Promise.resolve();if(i.getErrorCode()==t.AuthenticationErrorCode.Internal&&i.getData()){var c=i.getData();s=c[e.sdkhost.ErrorDataNumFailures]||s,i=t.impl.AuthenticationErrorImpl.errorForHostInternalBiometricErrorData(c,"Fingerprint")||i,(c[e.sdkhost.ErrorDataInternalError]==e.sdkhost.InternalErrorBiometricNotConfigured&&this._authenticatorDescription.getRegistered()||c[e.sdkhost.ErrorDataInternalError]==e.sdkhost.InternalErrorBiometricInvalidated)&&(a=n.LocalEnrollment.invalidateLocalRegistrationStatusAndNotifyUIHandler(this._actionDriver._controlFlowProcessor,this._authenticatorDescription))}a.catch((function(e){r._sdk.log(t.LogLevel.Error,e)})),a.finally((function(){var n=i.getData();if(!s||r._operationMode!=t.AuthenticatorSessionMode.Authentication)return n[e.sdkhost.ErrorDataInternalError]==e.sdkhost.InternalErrorBiometricFallbackPressed?(r._sdk.log(t.LogLevel.Debug,(function(){return"Biometric prompt fallback button pressed"})),void r.processControlRequest(t.ControlRequest.create(r.getBiometricPromptFallbackControlType()))):i.getErrorCode()==t.AuthenticationErrorCode.UserCanceled?(r._sdk.log(t.LogLevel.Debug,(function(){return"Fingerprint authenticator captured user cancel error code."})),void r.invokeCancellationUiOrEscape()):void r.performErrorRecoveryForError(i);r.processAuthFailureAssertionAndHandleError(i,s)}))},i.prototype.getKeyForEnrollmentDataAndInput=function(n,o){var r=this;return new Promise((function(i,s){var a=o;r.shouldAllowBiometricFallbackButton(a)&&(r._biometricPromptFallbackControlType=a.getFallbackControlRequestType());var c=r.authenticatorKeyTagForScheme(n.version,n.salt),u=r._sdk.host.getKeyPair(c,e.sdkhost.KeyClass.StdSigningKey,e.sdkhost.KeyBiometricProtectionMode.BindToEnrollmentDb);if(!u){var l={};throw l[e.sdkhost.ErrorDataInternalError]=e.sdkhost.InternalErrorBiometricInvalidated,new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Attempt to authenticate with invalidated Fingerprint.",l)}U.KetBiometricPromptInfo(t.util.BiometricPromptInfoFrom.fingerprintInput(a),r._uiHandler,r._inputSession),i({key:u})}))},i.prototype.generatePendingEnrollment=function(e,n){var o=this;return this.generateAuthenticatorKey().then((function(r){if(!n){var i=e;o.shouldAllowBiometricFallbackButton(i)&&(o._biometricPromptFallbackControlType=i.getFallbackControlRequestType()),r.key.setBiometricPromptInfo(t.util.BiometricPromptInfoFrom.fingerprintInput(i),o._uiHandler,o._inputSession)}return r}))},i.prototype.generateAuthenticatorKey=function(){var n,o=this;n=this._sdk.host.generateRandomHexString(24),e.sdkhost.KeyClass.HardwareProtectedSignAndEncryptKey;var r=this.authenticatorKeyTagForScheme(this.currentScheme,n);return t.util.wrapPromiseWithActivityIndicator(this._uiHandler,this._actionDriver.policyAction(),this._clientContext,this._sdk.host.generateKeyPair(r,e.sdkhost.KeyClass.HardwareProtectedSignAndEncryptKey,e.sdkhost.KeyBiometricProtectionMode.BindToEnrollmentDb,!0).then((function(e){return{key:e,salt:n,schemeVersion:o.currentScheme}}),(function(e){if(e.getErrorCode()==t.AuthenticationErrorCode.Internal&&e.getData()){var n=e.getData(),o=t.impl.AuthenticationErrorImpl.errorForHostInternalBiometricErrorData(n,"Fingerprint");if(o)throw o}throw e})))},i.prototype.authenticatorKeyTagForScheme=function(e,t){return i.authenticatorKeyTagForUser(this.user,e,t)},i}(o.AuthenticationDriverLocalPersistentKeyPairBasedPostV2Scheme);o.AuthenticationDriverFingerprint=r}(n.authenticationdrivers||(n.authenticationdrivers={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t;!function(e){function t(e){for(var t=[],n=0;n>6,128|63&o):o<55296||o>=57344?t.push(224|o>>12,128|o>>6&63,128|63&o):(n++,o=65536+((1023&o)<<10|1023&e.charCodeAt(n)),t.push(240|o>>18,128|o>>12&63,128|o>>6&63,128|63&o))}return t}function n(e){var t,n="";for(t=0;t191&&o<224)n+=String.fromCharCode((31&o)<<6|63&e[t+1]),t+=1;else if(o>223&&o<240)n+=String.fromCharCode((15&o)<<12|(63&e[t+1])<<6|63&e[t+2]),t+=2;else{var r=((7&o)<<18|(63&e[t+1])<<12|(63&e[t+2])<<6|63&e[t+3])-65536;n+=String.fromCharCode(r>>10|55296,1023&r|56320),t+=3}}return n}function o(e){for(var t="",n=0;nt/4)throw"Number out of range for bitcount.";for(;n.length=6&&(r+=t[n>>o-6],n&=255>>8-(o-=6));for(o&&(r+=t[n<<6-o]);r.length%4;)r+="=";return r},e.isHexString=function(e){return new RegExp("^([0-9A-Fa-f]{2})+£").test(e)},e.stringToBytes=function(e){for(var t=[],n=0;n="v3"?"s2":"s1"},r.prototype.unregisterEnrollmentAssets=function(e){},Object.defineProperty(r.prototype,"currentScheme",{get:function(){return"v3"},enumerable:!1,configurable:!0}),r.prototype.processLocalAuthenticatorError=function(e){var n=e;e.getErrorCode()==t.AuthenticationErrorCode.InvalidInput&&this._operationMode==t.AuthenticatorSessionMode.Authentication?this.processAuthFailureAssertionAndHandleError(n,1):this.performErrorRecoveryForError(n)},r.prototype.getKeyForEnrollmentDataAndInput=function(e,n){var o=this;return new Promise((function(t,r){e.version>="v2"?o.getKeyForEnrollmentDataAndInputV2(e,n).then(t,r):o.getKeyForEnrollmentDataAndInputPreV2(e,n).then(t,r)})).then((function(e){if(!e)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.InvalidInput,"Invalid input provided to authenticator.");return{key:e}}))},r.prototype.generatePendingEnrollment=function(o){var i=this;return new Promise((function(s,a){var c=i._sdk.host.generateRandomHexString(32),u=i._sdk.host.generateRandomHexString(64),l=i.extractPbkdfInputFromInputResponse(o);return t.util.wrapPromiseWithActivityIndicator(i._uiHandler,i._actionDriver.policyAction(),i._clientContext,i._sdk.host.generateHexSeededKeyPairExternalRepresentation(e.sdkhost.KeyClass.FidoECCSigningKey,u,r.enrollmentVersion2KeyGenVersion(i.currentScheme),null).then((function(t){return n.vault.pbkdfStretchHexSecretIntoAESKey(c,l,i._sdk.cryptoSettings.getLocalEnrollmentKeySizeInBytes(),i._sdk.cryptoSettings.getLocalEnrollmentKeyIterationCount(),!0,i._sdk).then((function(n){return n.encrypt(u).then((function(n){return{key:i._sdk.host.importVolatileKeyPair(e.sdkhost.KeyClass.FidoECCSigningKey,t),salt:c,schemeVersion:i.currentScheme,keyMeterial:n}}))}))}))).then(s,a)}))},r.prototype.getKeyForEnrollmentDataAndInputV2=function(t,o){var i=this,s=this.extractPbkdfInputFromInputResponse(o);return n.vault.pbkdfStretchHexSecretIntoAESKey(t.salt,s,t.cryptoSettings.getLocalEnrollmentKeySizeInBytes(),t.cryptoSettings.getLocalEnrollmentKeyIterationCount(),!0,this._sdk).then((function(n){return n.decrypt(t.keyMaterial,null).then((function(n){return i._sdk.host.generateHexSeededKeyPairExternalRepresentation(e.sdkhost.KeyClass.FidoECCSigningKey,n,r.enrollmentVersion2KeyGenVersion(t.version),t.publicKeyHash).then((function(t){return i._sdk.host.importVolatileKeyPair(e.sdkhost.KeyClass.FidoECCSigningKey,t)}))}))}))},r.prototype.getKeyForEnrollmentDataAndInputPreV2=function(t,n){var o=this;return this.authenticatorKeyTagForScheme(t.version,t.salt,t.cryptoSettings,n).then((function(t){return o._sdk.host.getKeyPair(t,e.sdkhost.KeyClass.StdSigningKey,e.sdkhost.KeyBiometricProtectionMode.None)}))},r.prototype.schemeVersionRequiresRollover=function(e){return"v0"==e||"v1"==e},r.prototype.authenticatorKeyTagForScheme=function(e,o,r,i){var s=this;return new Promise((function(a,c){var u=s.extractPbkdfInputFromInputResponse(i);if("v0"==e&&(s._sdk.log(t.LogLevel.Debug,(function(){return"Using SDK CryptoSettings for migrated enrollment."})),r=s._sdk.cryptoSettings),!r)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Missing crypt settings for local enrollment.");s._sdk.host.generatePbkdf2HmacSha1HexString(o,u,r.getLocalEnrollmentKeySizeInBytes(),r.getLocalEnrollmentKeyIterationCount()).then((function(o){var r=t.util.hexToBase64(o);return new n.TarsusKeyPath("per_user",s.user.guid.toString(),"local_auth_keys",s.authenticatorType,e,r)})).then(a,c)}))},r}(o.AuthenticationDriverLocal);o.AuthenticationDriverLocalSecretInputBased=r}(n.authenticationdrivers||(n.authenticationdrivers={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n=function(t){function n(e,n,o){return t.call(this,e,n,o)||this}return V(n,t),Object.defineProperty(n.prototype,"authenticatorType",{get:function(){return n.authenticatorName},enumerable:!1,configurable:!0}),n.prototype.handleAuthenticationInputResponse=function(n){var o=n;e.impl.PatternInputImpl.validateFormat(o)?t.prototype.handleAuthenticationInputResponse.call(this,n):this.processLocalAuthenticatorError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Invalid pattern description format."))},n.prototype.handleRegistrationInputResponse=function(n){var o=this._authenticatorConfig,r=n;e.impl.PatternInputImpl.validateFormat(r)?o.min_length&&e.impl.PatternInputImpl.getPatternLength(r)0))return!1;var a=i.getFallbackControlRequestType();switch(null==a&&(a=t.ControlRequestType.SelectMethod),a){case t.ControlRequestType.ChangeMethod:return this._actionDriver.availableAuthenticatorsForSwitching.filter((function(e){return e!=o._authenticatorDescription})).length>0;case t.ControlRequestType.SelectMethod:return this._actionDriver.availableAuthenticatorsForSwitching.length>0;default:return!0}},i.prototype.runSilentRegistration=function(){var e=this;return this.generateFaceNativeKeyForScheme(this.currentScheme).then((function(n){var r=e.getNewOrUpdatedEnrollmentRecord(n),i={public_key:n.key.publicKeyToJson(),version:n.schemeVersion};return e._actionDriver.sendAuthenticatorAssertionRequest(e._authenticatorDescription,"register",null,i).then((function(n){if(n.assertion_error_code)throw t.impl.AuthenticationErrorImpl.errorForAssertionResponse(n);return e.user.updateEnrollmentRecord(r),new o.AuthenticationDriverSessionResultAuthenticationCompleted(n)}))}))},i.prototype.createAuthenticatorSession=function(){return this._uiHandler.createNativeFaceAuthSession(o.AuthenticationDriverDescriptorNativeFace.authenticatorName,this.user.displayName)},i.prototype.authenticateInStartedSession=function(e){var n=this;this._inputSession.promiseInput().then((function(e){return n.handleInputOrControlResponse(e)}),(function(e){return n.completeAuthenticatorSessionWithError(t.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},i.prototype.registerInStartedSession=function(e){var n=this;r.prototype.registerInStartedSession.call(this,e),this._inputSession.promiseInput().then((function(e){return n.handleInputOrControlResponse(e)}),(function(e){return n.completeAuthenticatorSessionWithError(t.impl.AuthenticationErrorImpl.ensureAuthenticationError(e))}))},Object.defineProperty(i.prototype,"authenticatorType",{get:function(){return o.AuthenticationDriverDescriptorNativeFace.authenticatorName},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"currentScheme",{get:function(){return"v2"},enumerable:!1,configurable:!0}),i.prototype.processLocalAuthenticatorError=function(o){var r=this,i=o,s=0,a=Promise.resolve();if(i.getErrorCode()==t.AuthenticationErrorCode.Internal&&i.getData()){var c=i.getData();s=c[e.sdkhost.ErrorDataNumFailures]||s,i=t.impl.AuthenticationErrorImpl.errorForHostInternalBiometricErrorData(c,"Native Face")||i,(c[e.sdkhost.ErrorDataInternalError]==e.sdkhost.InternalErrorBiometricNotConfigured&&this._authenticatorDescription.getRegistered()||c[e.sdkhost.ErrorDataInternalError]==e.sdkhost.InternalErrorBiometricInvalidated)&&(a=n.LocalEnrollment.invalidateLocalRegistrationStatusAndNotifyUIHandler(this._actionDriver._controlFlowProcessor,this._authenticatorDescription))}a.catch((function(e){r._sdk.log(t.LogLevel.Error,e)})),a.finally((function(){var n=i.getData();if(!s||r._operationMode!=t.AuthenticatorSessionMode.Authentication)return n[e.sdkhost.ErrorDataInternalError]==e.sdkhost.InternalErrorBiometricFallbackPressed?(r._sdk.log(t.LogLevel.Debug,(function(){return"Biometric prompt fallback button pressed"})),void r.processControlRequest(t.ControlRequest.create(r.getBiometricPromptFallbackControlType()))):i.getErrorCode()==t.AuthenticationErrorCode.UserCanceled?(r._sdk.log(t.LogLevel.Debug,(function(){return"Native face authenticator captured user cancel error code."})),void r.invokeCancellationUiOrEscape()):void r.performErrorRecoveryForError(i);r.processAuthFailureAssertionAndHandleError(i,s)}))},i.prototype.getKeyForEnrollmentDataAndInput=function(n,o){var r=this;return new Promise((function(i,s){var a=o;r.shouldAllowBiometricFallbackButton(a)&&(r._biometricPromptFallbackControlType=a.getFallbackControlRequestType());var c=r.authenticatorKeyTagForScheme(n.version,n.salt),u=r._sdk.host.getKeyPair(c,e.sdkhost.KeyClass.StdSigningKey,e.sdkhost.KeyBiometricProtectionMode.BindToEnrollmentDb);if(!u){var l={};throw l[e.sdkhost.ErrorDataInternalError]=e.sdkhost.InternalErrorBiometricInvalidated,new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Attempt to authenticate with invalidated FaceID.",l)}U.KetBiometricPromptInfo(t.util.BiometricPromptInfoFrom.nativeFaceInput(a),null,null),i({key:u})}))},i.prototype.generatePendingEnrollment=function(e,n){if(!n){var o=e;this.shouldAllowBiometricFallbackButton(o)&&(this._biometricPromptFallbackControlType=o.getFallbackControlRequestType())}return this.generateKeyForScheme(e,this.currentScheme).then((function(e){return n||e.key.setBiometricPromptInfo(t.util.BiometricPromptInfoFrom.nativeFaceInput(o),null,null),e}))},i.prototype.generateKeyForScheme=function(e,t){return this.generateFaceNativeKeyForScheme(t)},i.prototype.schemeVersionRequiresRollover=function(e){return"v0"==e||"v1"==e},i.prototype.generateFaceNativeKeyForScheme=function(n){var o;o="v1"==n||"v2"==n?this._sdk.host.generateRandomHexString(24):"";var r=this.authenticatorKeyTagForScheme(n,o);return t.util.wrapPromiseWithActivityIndicator(this._uiHandler,this._actionDriver.policyAction(),this._clientContext,this._sdk.host.generateKeyPair(r,e.sdkhost.KeyClass.StdSigningKey,e.sdkhost.KeyBiometricProtectionMode.BindToEnrollmentDb,!0).then((function(e){return{key:e,salt:o,schemeVersion:n}}),(function(e){if(e.getErrorCode()==t.AuthenticationErrorCode.Internal&&e.getData()){var n=e.getData(),o=t.impl.AuthenticationErrorImpl.errorForHostInternalBiometricErrorData(n,"Native Face");if(o)throw o}throw e})))},i.prototype.authenticatorKeyTagForScheme=function(e,t){return i.authenticatorKeyTagForUser(this.user,e,t)},i}(o.AuthenticationDriverLocalPersistentKeyPairBased);o.AuthenticationDriverNativeFace=r}(n.authenticationdrivers||(n.authenticationdrivers={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(n){var o=function(n){function o(e,t,o,r){var i=n.call(this,e,t,r)||this;return i._possibleTargets=o,i.setupDataModel(t),i}return V(o,n),o.prototype.getPossibleTargets=function(){return this._possibleTargets},o.prototype.createAuthenticatorSession=function(){var t,n=this;if(0!=(t=this._authenticationParameters?this._authenticationParameters.filter((function(t){return t instanceof e.AuthenticationActionParameterTargetSelection})):[]).length){this._sdk.log(e.LogLevel.Debug,(function(){return"Target based driver found target selection parameters."}));var o=t[0].getTarget().getChannelAssertionId(),r=this._possibleTargets.filter((function(e){return e.getChannelAssertionId()==o}));r.length?(this._pendingTargetSelection=r[0],this._sdk.log(e.LogLevel.Debug,(function(){return"Target based driver will select target "+n._pendingTargetSelection+" based on selection parameter."})),this._lastSelectedTarget=this._pendingTargetSelection):this._sdk.log(e.LogLevel.Warning,(function(){return"Target selection parameter for target based auth driver specified invalid target assertiong id "+o+"."}))}var i=this._uiHandler.createOtpAuthSession("otp",this.user.displayName,this._possibleTargets,this._autoExecTarget);if(!i)throw e.impl.AuthenticationErrorImpl.appImplementationError("Invalid return from createOtpAuthSession");return i.setAvailableTargets(this._possibleTargets),i},o.prototype.authenticateInStartedSession=function(t){var n=this;if(0==this._possibleTargets.length)return this._sdk.log(e.LogLevel.Warning,(function(){return"No authentication target available for OTP. Doing error recovery."})),void this.performErrorRecoveryForError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AuthenticatorExternalConfigError,"No targets available for OTP."),!0);if(this._sdk.log(e.LogLevel.Debug,(function(){return"Notifying current session of generated OTP format and target"})),this._inputSession.setGeneratedOtp(this._format,this._lastSelectedTarget),this._pendingTargetSelection){this._sdk.log(e.LogLevel.Debug,(function(){return"Performing pending target selection "+n._pendingTargetSelection}));var o=e.TargetBasedAuthenticatorInput.createTargetsSelectionRequest([this._pendingTargetSelection]);this._pendingTargetSelection=null,this.handleInputOrControlResponse(e.InputOrControlResponse.createInputResponse(o))}else this._inputSession.promiseInput().then((function(e){n.handleInputOrControlResponse(e)})).catch((function(t){n.completeAuthenticatorSessionWithError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}))},o.prototype.registerInStartedSession=function(t){throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Cannot register OTP authenticator.")},o.prototype.handleTargetBasedAuthenticatorConcreteInput=function(t){if(t instanceof e.OtpInputOtpSubmission)this.processAuthenticateAssertion({otp:t.getOtp()},{assertion_id:this._possibleTargets[0].getChannelAssertionId()});else{if(!(t instanceof e.OtpInputRequestResend))throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Unknown OTP response type received from application callback.");this.triggerForSelectedTarget()}},o.prototype.handleAuthenticateAssertionResult=function(t,o,r,i,s){return t.data&&t.data.additional_error_code&&1==t.data.additional_error_code&&(this._sdk.log(e.LogLevel.Debug,(function(){return"Reached max number of attempts - invalidating current target."})),this._lastSelectedTarget=null,this._format=null),n.prototype.handleAuthenticateAssertionResult.call(this,t,o,r,i,s)},o.prototype.handleAuthenticationInputResponse=function(t){if(t.getAuthenticatorInput())this.handleTargetBasedAuthenticatorConcreteInput(t.getAuthenticatorInput());else{if(!t.getSelectedTargets()[0])throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Invalid target-based authetnicator response type received from application callback. Target-based authenticator inputs must be created by calling TargetBasedAuthenticatorInput.createAuthenticatorInput.");var n=t.getSelectedTargets();if(n.length>1)throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Attempt to select multiple OTP targets while OTP supports only a single target.");var o=n[0];if(this._possibleTargets.indexOf(o)<0)throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Attempt to select an OTP target not originally listed in the session.");this._lastSelectedTarget=o,this.triggerForSelectedTarget()}},o.prototype.triggerForSelectedTarget=function(){var n=this;if(!this._lastSelectedTarget)throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Attempt to trigger OTP generation without a selected target.");var o={target_id:this._lastSelectedTarget.getTargetIdentifier(),channel_index:this._lastSelectedTarget.getChannelIndex()},r={assertion_id:this._lastSelectedTarget.getChannelAssertionId()};this._actionDriver.sendAuthenticatorAssertionRequest(this._authenticatorDescription,"otp",o,r).then((function(o){o.assertion_error_code&&o.assertion_error_code!=t.Protocol.AssertionErrorCode.FailOver&&(n._sdk.log(e.LogLevel.Error,(function(){return"Assertion error encoutered. Clearing last selected target."})),n._lastSelectedTarget=null),n.handleAuthenticateAssertionResult(o,n._authenticatorDescription,"otp",r,r)||(o.data&&o.data.otp_format&&(n._sdk.log(e.LogLevel.Debug,(function(){return"Received updated OTP and format."})),n._format=e.OtpFormatImpl.fromAssertionFormat(o.data.otp_format)),n._sdk.log(e.LogLevel.Debug,(function(){return"Restarting auth or reg."})),n.authOrRegInStartedSession(!0))})).catch((function(e){n.completeAuthenticatorSessionWithError(e)}))},o.prototype.handleRegistrationInputResponse=function(t){throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Cannot register OTP authenticator.")},o.prototype.setupDataModel=function(n){this._otpInitialState=n.state,this._otpInitialState==t.Protocol.AuthenticationMethodOtpState.Validate&&(this._lastSelectedTarget=this._possibleTargets[0],this._autoExecTarget=this._lastSelectedTarget);var o=n.format||n.otp_format;this._format=o&&e.OtpFormatImpl.fromAssertionFormat(o)||null},o}(n.AuthenticationDriver);n.AuthenticationDriverOtp=o}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n=function(t){function n(e,n,o){return t.call(this,e,n,o)||this}return V(n,t),n.prototype.createAuthenticatorSession=function(){return this._uiHandler.createPasswordAuthSession("password",this.user.displayName)},n.prototype.authenticateInStartedSession=function(t){var n=this;this._inputSession.promiseInput().then((function(e){return n.handleInputOrControlResponse(e)}),(function(t){return n.completeAuthenticatorSessionWithError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}))},n.prototype.registerInStartedSession=function(t){var n=this;this._inputSession.promiseInput().then((function(e){return n.handleInputOrControlResponse(e)}),(function(t){return n.completeAuthenticatorSessionWithError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}))},n.prototype.handleAuthenticationInputResponse=function(t){var n=t.getPassword();n&&n.length>0?this.processAuthenticateAssertion({password:n}):this.performErrorRecoveryForError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.InvalidInput,"Password can't be empty"))},n.prototype.handleRegistrationInputResponse=function(t){var n=t.getPassword();n&&n.length>0?this.processRegisterAssertion({password:n}):this.performErrorRecoveryForError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.InvalidInput,"Password can't be empty"))},n}(t.AuthenticationDriver);t.AuthenticationDriverPassword=n}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n=function(t){function n(e,n,o){return t.call(this,e,n,o)||this}return V(n,t),n.prototype.createAuthenticatorSession=function(){var e,t,n=this._authenticatorConfig,o=this._uiHandler.createPatternAuthSession("pattern_centralized",this.user.displayName,3,4);return null===(t=(e=o).setMinLength)||void 0===t||t.call(e,n.min_length),o},n.prototype.handleAuthenticationInputResponse=function(n){var o=n;e.impl.PatternInputImpl.validateFormat(o)?t.prototype.handleAuthenticationInputResponse.call(this,n):this.performErrorRecoveryForError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Invalid pattern description format."))},n.prototype.handleRegistrationInputResponse=function(n){var o=n,r=this._authenticatorConfig;e.impl.PatternInputImpl.validateFormat(o)?r.min_length&&e.impl.PatternInputImpl.getPatternLength(o)s)throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Only "+s+" answers were provided to security questions registration process. "+s+" answers out of required minimum of "+o+".");this.processRegisterAssertion(this.securityQuestionAnswersResposneToJson(n))},n.prototype.handleErrorRecoveryAction=function(n,o){o.getErrorCode()==e.AuthenticationErrorCode.InvalidInput&&(this._pendingRestartRequest=!0),t.prototype.handleErrorRecoveryAction.call(this,n,o)},n.prototype.sortValidAnswers=function(t){for(var n=Array(),o=0,r=t.getAnswers();o0&&i.getAnswer().getAnswerText().length>this.currentQuestionsStep.getMaxAnswerLength())throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Answer too long. Answer must be maximum "+this.currentQuestionsStep.getMaxAnswerLength()+" characters.");n.push(i)}}return n},n.prototype.securityQuestionAnswersResposneToJson=function(t){var n=this,o={},r=Array();return t.getAnswers().forEach((function(t){if(n.currentSecurityQuestionsStep().getSecurityQuestions().indexOf(t.getQuestion())<0)throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Answer provided to a question not included in this step.");if(t.getIsRemoved())r.push(t.getQuestion().getSecurityQuestionId());else{var i=t.getAnswer().getAnswerText().toLocaleLowerCase();o[t.getQuestion().getSecurityQuestionId()]=i}})),{answers:o,deleted_answers:r}},n.prototype.securityQuestionAnswersResposneToAnswerMap=function(t){var n=this,o={};return t.getAnswers().forEach((function(t){if(n.currentSecurityQuestionsStep().getSecurityQuestions().indexOf(t.getQuestion())<0)throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Answer provided to a question not included in this step.");var r=t.getAnswer().getAnswerText().toLocaleLowerCase();o[t.getQuestion().getSecurityQuestionId()]=r})),o},n.prototype.currentSecurityQuestionsStep=function(){return this._currentStep},n}(t.AuthenticationDriverMultiStep);t.AuthenticationDriverSecurityQuestions=n}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){!function(e){var t=function(){};e.AuthenticationDriverSessionResult=t;var n=function(e){function t(t,n){var o=e.call(this)||this;return o.requiredAuthenticator=t||null,o.allowedAuthenticators=n||null,o}return V(t,e),t}(t);e.AuthenticationDriverSessionResultSwitchAuthenticator=n;var o=function(e){function t(t){var n=e.call(this)||this;return n.assertionResult=t,n}return V(t,e),t}(t);e.AuthenticationDriverSessionResultAuthenticationCompleted=o;var r=function(e){function t(t){var n=e.call(this)||this;return n.escapeRequest=t,n}return V(t,e),t}(t);e.AuthenticationDriverSessionResultEscapeRequested=r}(e.authenticationdrivers||(e.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(n){var o=function(o){function r(e,t,n){var r=o.call(this,e,t,n)||this;return r._previousSelectedDevices=[],r.methodName="totp",r.setupDataModel(t,n),r}return V(r,o),r.prototype.setupDataModel=function(e,o){this._state=e.state,this._requiresChallengeGeneration=e.state!=t.Protocol.AuthenticationMethodTotpState.Validate,this._selectedDevices=null,this._state==t.Protocol.AuthenticationMethodTotpState.Validate&&e.challenge&&(this._challenge=this.createTotpChallenge(e.challenge)),e.selectable_devices?this._selectableDevices=n.AuthenticationDriverDescriptorTotp.createTargetsFromConfig(e):this._selectableDevices=null},r.prototype.createAuthenticatorSession=function(){var t=this;if(this._authenticationParameters){var n=this._authenticationParameters.filter((function(t){e.AuthenticationActionParameterTargetSelection}));if(this._selectableDevices&&0!=n.length){this._sdk.log(e.LogLevel.Debug,(function(){return"Target based driver found target selection parameters."}));var o=this._selectableDevices.reduce((function(e,t){return e[t.getDeviceIdentifier()]=t,e}),{});this._pendingTargetSelection=n.map((function(t){var n=t.getTarget(),r=o[n.getDeviceIdentifier()];if(!r)throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Authentication parameter tried to select a device not presented as a selectable target");return r}),{}),this._sdk.log(e.LogLevel.Debug,(function(){return"Target based driver will select targets "+t._pendingTargetSelection+" based on selection parameter."}))}}var r=this._uiHandler.createTotpAuthSession("totp",this.user.displayName);if(!r)throw e.impl.AuthenticationErrorImpl.appImplementationError("Invalid return from createTotpAuthSession");return r.setAvailableTargets(this._selectableDevices),r},r.prototype.handleRegistrationInputResponse=function(t){throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Cannot register TOTP authenticator.")},r.prototype.registerInStartedSession=function(t){throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Cannot register TOTP authenticator.")},r.prototype.authenticateInStartedSession=function(t){var n=this;!this._selectedDevices&&this._pendingTargetSelection&&this._pendingTargetSelection.length&&(this._sdk.log(e.LogLevel.Debug,(function(){return"TOTP authentication driver has "+n._pendingTargetSelection.length+" pending targets."})),this._selectedDevices=this._pendingTargetSelection),this.requestInput()},r.prototype.requestInput=function(){var t=this;this._inputSession.setTargetDevices(this._selectedDevices),this._inputSession.setChallenge(this._challenge),this.pendingChallengeGeneration()?this.sendGenerateTotpAssertion():this._inputSession.promiseInput().then((function(e){t.handleInputOrControlResponse(e)})).catch((function(n){t.performErrorRecoveryForError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(n))}))},r.prototype.handleAuthenticationInputResponse=function(t){var n=t.getAuthenticatorInput(),o=t.getSelectedTargets();if(n){this._sdk.log(e.LogLevel.Debug,(function(){return"Handling OTP code Input."}));var r={totp:n.getCode()};this._selectedDevices&&(r.device_ids=this._selectedDevices.map((function(e){return e.getDeviceIdentifier()}))),this.processAuthenticateAssertion(r)}else{if(!o||!this._selectableDevices)throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Invalid target-based authenticator response type received from application callback. Target-based authenticator inputs must be created by calling TargetBasedAuthenticatorInput.createAuthenticatorInput.");var i=this._selectableDevices;if(this._sdk.log(e.LogLevel.Debug,(function(){return"Handling target selection Input."})),this._selectedDevices=o.map((function(t){var n=t;if(i.indexOf(n)<0)throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Attempt to select a Totp target not originally listed in the session.");return n})),0===this._selectedDevices.length)throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.InvalidInput,"No targets selected for TOTP.");this.requestInput()}},r.prototype.sendGenerateTotpAssertion=function(){var n=this,o={};this._selectedDevices&&(o.device_ids=this._selectedDevices.map((function(e){return e.getDeviceIdentifier()}))),this._sdk.log(e.LogLevel.Debug,(function(){return"Requesting TOTP generation"})),this._actionDriver.sendAuthenticatorAssertionRequest(this._authenticatorDescription,"generate",o,{}).then((function(r){n._previousSelectedDevices=n._selectedDevices||[],r.assertion_error_code&&r.assertion_error_code!=t.Protocol.AssertionErrorCode.FailOver&&(n._sdk.log(e.LogLevel.Error,(function(){return"Assertion error encountered."})),n._selectedDevices=null),!n.handleAuthenticateAssertionResult(r,n._authenticatorDescription,"generate",o)&&r.data&&(n._state=r.data.state,r.data.challenge&&(n._challenge=n.createTotpChallenge(r.data.challenge)),n.requestInput())})).catch((function(t){n.performErrorRecoveryForError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}))},r.prototype.pendingChallengeGeneration=function(){var e=this._selectedDevices&&(this._previousSelectedDevices.length!==this._selectedDevices.length||this._previousSelectedDevices.some((function(e,t){return e!==this._selectedDevices[t]}),this)),n=!this._selectableDevices;return this._requiresChallengeGeneration&&(e||n&&this._state==t.Protocol.AuthenticationMethodTotpState.Generate)},r.prototype.createTotpChallenge=function(t){var n=new e.TotpChallenge;return n.setValue(t.value),n.setFormat(e.TotpChallengeFormatImpl.fromAssertionFormat(t.format)),n},r.prototype.handleAuthenticateAssertionResult=function(n,r,i,s,a){if(n.assertion_error_code&&n.assertion_error_code==t.Protocol.AssertionErrorCode.RepeatCurrentStep&&n.data&&"check_digit"==n.data.reason){this._sdk.log(e.LogLevel.Debug,(function(){return"handleAuthenticateAssertionResult() for Totp code with incorrect check digit"}));var c=new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.InvalidInput,n.assertion_error_message||"Totp code with incorrect check digit");return c.setPublicProperty(e.AuthenticationErrorProperty.AuthenticatorInvalidInputErrorDescription,e.AuthenticationErrorPropertySymbol.AuthenticatorInvalidInputErrorDescriptionTotpIncorrectCheckDigit),this.performErrorRecoveryForError(c),!0}return o.prototype.handleAuthenticateAssertionResult.call(this,n,r,i,s,a)},r}(n.AuthenticationDriver);n.AuthenticationDriverTotp=o}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n;!function(e){e.LONG="tooLong",e.SHORT="tooShort",e.LOUD="tooLoud",e.SOFT="tooSoft",e.NOISY="tooNoisy",e.WRONG_PASSPHRASE="wrongPassphrase",e.VALID_PASSPHRASE="000"}(n||(n={}));var o=function(t){function o(e,n,o){return t.call(this,e,n,o)||this}return V(o,t),o.prototype.createAuthenticatorSession=function(){return this._uiHandler.createVoiceAuthSession("voice",this.user.displayName)},o.prototype.updatePassphraseFromAssertionResultIfNeeded=function(t){var n=t.data;if(n){var o=n.passphrase_text;o&&(this._sdk.log(e.LogLevel.Debug,(function(){return"handleAuthenticateAssertionResult() received updated passphrase"})),this._authenticatorConfig.passphrase_text=o)}},o.prototype.handleRegisterAssertionResult=function(e){return this.updatePassphraseFromAssertionResultIfNeeded(e),t.prototype.handleRegisterAssertionResult.call(this,e)},o.prototype.handleAuthenticateAssertionResult=function(e,n,o,r,i){return this.updatePassphraseFromAssertionResultIfNeeded(e),t.prototype.handleAuthenticateAssertionResult.call(this,e,n,o,r,i)},o.prototype.createInitialInputStep=function(){var t=this._authenticatorConfig;return new e.impl.AudioAcquisitionStepDescriptionImpl(this.createStepTag(),t.passphrase_text)},o.prototype.prepareNextAuthenticationStep=function(t){var n=this._authenticatorConfig;return new e.impl.AudioAcquisitionStepDescriptionImpl(this.createStepTag(t.data&&t.data.additional_error_code),n.passphrase_text)},o.prototype.updateCurrentAuthenticationStep=function(e,t){return this.prepareNextAuthenticationStep(e)},o.prototype.handleAuthenticationInputResponse=function(e){var t=e;this.processAuthenticateAssertion(t.getAcquisitionResponse())},o.prototype.handleRegistrationInputResponse=function(e){var t=e;this.processRegisterAssertion(t.getAcquisitionResponse())},o.prototype.createStepTag=function(e){return"voice_"+(e?this.mapHintToVoiceError(e):n.VALID_PASSPHRASE)},o.prototype.mapHintToVoiceError=function(t){switch(t){case 101:return n.LONG;case 102:return n.SHORT;case 103:return n.LOUD;case 104:return n.SOFT;case 105:return n.NOISY;case 106:return n.WRONG_PASSPHRASE;default:throw new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.Internal,"Voice error code "+t+" is unknown/unhandled")}},o}(t.AuthenticationDriverMultiStep);t.AuthenticationDriverVoice=o}(t.authenticationdrivers||(t.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){!function(e){e.AuthenticatorDrivers={password:new e.SimpleAuthenticationDriverDescriptor(e.AuthenticationDriverPassword),pin_centralized:new e.SimpleAuthenticationDriverDescriptor(e.AuthenticationDriverPinCode),pin:new e.AuthenticationDriverDescriptorLocal(e.AuthenticationDriverLocalPinCode,e.AuthenticationDriverLocalPinCode.authenticatorName),pattern:new e.AuthenticationDriverDescriptorLocal(e.AuthenticationDriverLocalPattern,e.AuthenticationDriverLocalPattern.authenticatorName),pattern_centralized:new e.SimpleAuthenticationDriverDescriptor(e.AuthenticationDriverPattern),fingerprint:new e.AuthenticationDriverDescriptorFingerprint,face_id:new e.AuthenticationDriverDescriptorNativeFace,otp:new e.AuthenticationDriverDescriptorOtp,face_server:new e.AuthenticationDriverDescriptorFace,voice_server:new e.AuthenticationDriverDescriptorVoice,mobile_approve:new e.AuthenticationDriverDescriptorMobileApprove,totp:new e.AuthenticationDriverDescriptorTotp,question:new e.SimpleAuthenticationDriverDescriptor(e.AuthenticationDriverSecurityQuestions),fido2:new e.AuthenticationDriverDescriptorFido2(e.AuthenticationDriverFido2),device_biometrics:new e.AuthenticationDriverDescriptorDeviceBiometrics,__placeholder:new e.SimpleAuthenticationDriverDescriptor(e.AuthenticationDriverPlaceholder)}}(e.authenticationdrivers||(e.authenticationdrivers={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t,n,o,r;t=(o=(r=e.sdk||(e.sdk={})).core||(r.core={})).collectors||(o.collectors={}),n=function(){function e(e){this.enabledCollectors=e}return e.prototype.isEnabled=function(){var e=this.getAssociatedCollectorType();return null==e||-1!=this.enabledCollectors.indexOf(e)},e}(),t.Collector=n}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t,n,o,r;n=function(e){function t(t,n){var o=e.call(this,t)||this;return o.cacheValidityPeriod=n,o}return V(t,e),t.prototype.provide=function(e){var t=this;return new Promise((function(n,o){var r=t.getCachedData(e);r?n(r):t.provideNewData(e).then((function(o){t.saveCollectionResultToLocalStorage(e,o),n(o)}),o)}))},t.prototype.saveCollectionResultToLocalStorage=function(e,t){var n=e.host,o=this.getSchemeVersionTarsusKeyPath(),r=new Object;r.timeStamp=Date.now(),r.collectionResult=t,n.writeStorageKey(o,r)},t.prototype.getCachedData=function(e){var t=e.host,n=this.getSchemeVersionTarsusKeyPath(),o=t.readStorageKey(n);if(!o.collectionResult||!o.timeStamp)return e.log(r.LogLevel.Debug,(function(){return"No collected data found in cache."})),null;var i=o.timeStamp;return Date.now()-i>this.cacheValidityPeriod?(e.log(r.LogLevel.Debug,(function(){return"Cached collected data invalidated."})),null):(e.log(r.LogLevel.Debug,(function(){return"Loaded cached collector data: "+JSON.stringify(o.collectionResult)})),o.collectionResult)},t}((t=(o=(r=e.sdk||(e.sdk={})).core||(r.core={})).collectors||(o.collectors={})).Collector),t.CacheableCollector=n}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t,n,o,r;n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.provide=function(t){return £(this,void 0,void 0,(function(){var n,o;return X(this,(function(r){switch(r.label){case 0:return n=new Object,o=n,[4,t.host.queryAsyncHostInfo(e.sdkhost.AsyncHostInformationKey.Fido2UserVerifyingPlatformAuthenticatorAvailable)];case 1:return o.fido2_user_verifying_platform_authenticator_available="true"==r.sent(),n.audio_acquisition_supported="true"==t.host.queryHostInfo(e.sdkhost.HostInformationKey.AudioAcquitisionSupported),n.finger_print_supported="true"==t.host.queryHostInfo(e.sdkhost.HostInformationKey.FingerprintSupported),n.image_acquisition_supported="true"==t.host.queryHostInfo(e.sdkhost.HostInformationKey.ImageAcquitisionSupported),n.persistent_keys_supported="true"==t.host.queryHostInfo(e.sdkhost.HostInformationKey.PersistentKeysSupported),n.face_id_key_bio_protection_supported="true"==t.host.queryHostInfo(e.sdkhost.HostInformationKey.FaceIdKeyBioProtectionSupported),n.fido2_client_present="true"==t.host.queryHostInfo(e.sdkhost.HostInformationKey.Fido2ClientPresent),n.dyadic_present="true"==t.host.queryHostInfo(e.sdkhost.HostInformationKey.DyadicPresent),n.installed_plugins=t.pluginManager.getInitializedPlugins().map((function(t){return{plugin_name:t.getPluginInfo().getPluginName(),plugin_version:e.tarsusplugin.impl.PluginInfoImpl.versionToString(t.getPluginInfo())}})),""!=t.host.queryHostInfo(e.sdkhost.HostInformationKey.HostProvidedFeatures)&&(n.host_provided_features=t.host.queryHostInfo(e.sdkhost.HostInformationKey.HostProvidedFeatures)),[2,n]}}))}))},n.prototype.getAssociatedCollectorType=function(){return r.CollectorType.Capabilities},n}((t=(o=(r=e.sdk||(e.sdk={})).core||(r.core={})).collectors||(o.collectors={})).Collector),t.CapabilitiesCollector=n}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t,n,o,r;r=e.sdk||(e.sdk={}),o=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return V(n,e),n.prototype.provide=function(e){var n=new Object;for(var o in r.CollectorType)n[o]=t.Protocol.CollectorState.Disabled;for(var i=0,s=this.enabledCollectors;i=0},n}((n=(t=r.core||(r.core={})).collectors||(t.collectors={})).Collector),n.CollectorsStateCollector=o}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t,n,o,r;r=e.sdk||(e.sdk={}),n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.provide=function(t){var n=t.host,r=new Object;r.logged_users=0,o.User.iterateUsers(t,(function(e){e.deviceBound&&++r.logged_users}));var i=n.queryHostInfo(e.sdkhost.HostInformationKey.DevicePersistenceMode);return"string"==typeof i&&(r.persistence_mode=i),Promise.resolve(r)},n.prototype.getAssociatedCollectorType=function(){return r.CollectorType.DeviceDetails},n}((t=(o=r.core||(r.core={})).collectors||(o.collectors={})).Collector),t.DeviceDetailsCollector=n}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){var t,n,o,r;r=e.sdk||(e.sdk={}),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.provide=function(e){for(var n=new Object,o=0,r=t.authenticatorDriversLocal;o=0?e.AuthenticationErrorRecovery.SelectAuthenticator:e.AuthenticationErrorRecovery.Fail),this._inputSession.promiseRecoveryForError(t,n,o).then((function(o){return r.sdk.log(e.LogLevel.Debug,(function(){return"Error recovery selected "+o})),r.sdk.log(e.LogLevel.Debug,(function(){return"recover from error: "+t.getErrorCode()})),n.indexOf(o)<0?(r.sdk.log(e.LogLevel.Error,(function(){return"Invalid error recovery option from callback: "+o+" not in "+n})),Promise.reject(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Invalid error recovery action selected by callback."))):Promise.resolve(o)}))},o.prototype.evaluateLocalRegistrationStatus=function(){var n=this.user.localEnrollments[this.credentialId];return n?n.validationStatus==t.LocalEnrollmentValidationStatus.Invalidated?e.AuthenticatorRegistrationStatus.LocallyInvalid:n.status!=t.LocalEnrollmentStatus.Registered?e.AuthenticatorRegistrationStatus.Unregistered:e.AuthenticatorRegistrationStatus.Registered:e.AuthenticatorRegistrationStatus.LocallyInvalid},Object.defineProperty(o.prototype,"lastObtainedKeyPair",{get:function(){return this._lastObtainedKeyPair},set:function(e){this._lastObtainedKeyPair&&this._lastObtainedKeyPair!=e&&(e&&this._lastObtainedKeyPair.getTag()===e.getTag()||this._lastObtainedKeyPair.closeKeyPair()),this._lastObtainedKeyPair=e},enumerable:!1,configurable:!0}),o.prototype.authenticateInStartedSession=function(t){var n=this;this._inputSession.promiseInput().then((function(e){return n.handleInputOrControlResponse(e)}),(function(t){return n.completeCredentialOperationWithError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}))},o.prototype.handleAuthenticationInputResponse=function(t){var n=this,o=this.user.localEnrollments[this.credentialId];o?this.getKeyForEnrollmentDataAndInput(o,t).then((function(t){n.sdk.log(e.LogLevel.Debug,(function(){return"Local authenticator key obtained; signing challenge"})),n.completeCredentialOperationWithResult(t)})).catch((function(t){n.processLocalAuthenticatorError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))})):this.completeCredentialOperationWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.NoRegisteredAuthenticator,"Missing key for fingerprint authenticator"))},o.prototype.processLocalAuthenticatorError=function(t){var n=this,o=this._host.getCredentialValidErrorRecoveryOptions(this,t),r=o.indexOf(e.AuthenticationErrorRecovery.RetryAuthenticator)>=0?e.AuthenticationErrorRecovery.RetryAuthenticator:e.AuthenticationErrorRecovery.Fail;this.promiseRecoveryForError(t,o,r).then((function(e){n.handleErrorRecoveryAction(e,t)}))},o.prototype.completeCredentialOperationWithResult=function(e){this._completionFunction(e)},o.prototype.completeCredentialOperationWithError=function(e){this._rejectionFunction(e)},o.prototype.handleInputOrControlResponse=function(t){try{t.isControlRequest()?t.getControlRequest().getRequestType()==e.ControlRequestType.CancelAuthenticator?this.invokeUiHandlerCancellation():this.signalControlRequest(t.getControlRequest()):t.getActionEscapeRequest()?this.signalEscapeRequest(t.getActionEscapeRequest()):this.handleAuthenticationInputResponse(t.getResponse())}catch(t){this.completeCredentialOperationWithError(e.impl.AuthenticationErrorImpl.ensureAuthenticationError(t))}},o.prototype.signalControlRequest=function(t){this._externalCancelled&&t.getRequestType()==e.ControlRequestType.CancelAuthenticator&&(t=e.ControlRequest.create(e.ControlRequestType.AbortAuthentication)),this._rejectionFunction(t)},o.prototype.signalEscapeRequest=function(e){this._rejectionFunction(e)},o.prototype.invokeUiHandlerCancellation=function(){var t=this,n=this._host.getCredentialAvailableCancellationOptions(this);this.uiHandler.controlOptionForCancellationRequestInSession(n,this._inputSession).then((function(o){o.getRequestType()==e.ControlRequestType.CancelAuthenticator&&t.completeCredentialOperationWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"controlOptionForCancellationRequestInSession returned CancelAuthenticator which is an invalid option.")),n.indexOf(o.getRequestType())<0&&t.completeCredentialOperationWithError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"controlOptionForCancellationRequestInSession returned an invalid option.")),t.signalControlRequest(o)}))},o.prototype.handleErrorRecoveryAction=function(t,n){switch(t){case e.AuthenticationErrorRecovery.RetryAuthenticator:this.signalControlRequest(e.ControlRequest.create(e.ControlRequestType.RetryAuthenticator));break;case e.AuthenticationErrorRecovery.ChangeAuthenticator:this.signalControlRequest(e.ControlRequest.create(e.ControlRequestType.ChangeMethod));break;case e.AuthenticationErrorRecovery.SelectAuthenticator:this.signalControlRequest(e.ControlRequest.create(e.ControlRequestType.SelectMethod));break;case e.AuthenticationErrorRecovery.Fail:default:this.completeCredentialOperationWithError(n)}},o}(n.PKCredential);n.PKCredentialAuthLocal=o}(t.credential||(t.credential={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(n){!function(o){var r=function(o){function r(e,t,n){return o.call(this,e,t,n)||this}return V(r,o),r.prototype.getKeyForEnrollmentDataAndInput=function(e,n){var o=this;return new Promise((function(t,r){e.version>="v2"?o.getKeyForEnrollmentDataAndInputV2(e,n).then(t,r):o.getKeyForEnrollmentDataAndInputPreV2(e,n).then(t,r)})).then((function(e){if(!e)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.InvalidInput,"Invalid input provided to credential.");return e}))},r.prototype.getKeyForEnrollmentDataAndInputV2=function(t,o){var r=this,i=this.extractPbkdfInputFromInputResponse(o);return n.vault.pbkdfStretchHexSecretIntoAESKey(t.salt,i,t.cryptoSettings.getLocalEnrollmentKeySizeInBytes(),t.cryptoSettings.getLocalEnrollmentKeyIterationCount(),!0,this.sdk).then((function(o){return o.decrypt(t.keyMaterial,null).then((function(o){return r.sdk.host.generateHexSeededKeyPairExternalRepresentation(e.sdkhost.KeyClass.FidoECCSigningKey,o,n.authenticationdrivers.AuthenticationDriverLocalSecretInputBased.enrollmentVersion2KeyGenVersion(t.version),t.publicKeyHash).then((function(t){return r.sdk.host.importVolatileKeyPair(e.sdkhost.KeyClass.FidoECCSigningKey,t)}))}))}))},r.prototype.getKeyForEnrollmentDataAndInputPreV2=function(t,n){var o=this;return this.authenticatorKeyTagForScheme(t.version,t.salt,t.cryptoSettings,n).then((function(t){return o.sdk.host.getKeyPair(t,e.sdkhost.KeyClass.StdSigningKey,e.sdkhost.KeyBiometricProtectionMode.None)}))},r.prototype.authenticatorKeyTagForScheme=function(e,o,r,i){var s=this;return new Promise((function(a,c){var u=s.extractPbkdfInputFromInputResponse(i);if("v0"==e&&(s.sdk.log(t.LogLevel.Debug,(function(){return"Using SDK CryptoSettings for migrated enrollment."})),r=s.sdk.cryptoSettings),!r)throw new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Missing crypto settings for local enrollment.");s.sdk.host.generatePbkdf2HmacSha1HexString(o,u,r.getLocalEnrollmentKeySizeInBytes(),r.getLocalEnrollmentKeyIterationCount()).then((function(o){var r=t.util.hexToBase64(o);return new n.TarsusKeyPath("per_user",s.user.guid.toString(),"local_auth_keys",s.credentialId,e,r)})).then(a,c)}))},r}(o.PKCredentialAuthLocal);o.PKCredentialLocalSecretInputBased=r}(n.credential||(n.credential={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){t.CredentialAuthPinCodeConfig=function(){};var n=function(t){function n(e,n,o){return t.call(this,e,n,o)||this}return V(n,t),Object.defineProperty(n.prototype,"pinLength",{get:function(){return this._authenticatorConfig.length},enumerable:!1,configurable:!0}),n.prototype.extractPbkdfInputFromInputResponse=function(t){var n=t;return e.util.asciiToHex(n.getPin())},n.prototype.createAuthenticatorSession=function(){return this.uiHandler.createPinAuthSession(this.credentialId,this.user.displayName,this.pinLength)},n.create=function(e,t,o){return new n(e,t,o)},n}(t.PKCredentialLocalSecretInputBased);t.PKCredentialLocalPinCode=n}(t.credential||(t.credential={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(t){var n=function(t){function n(e,n,o){return t.call(this,e,n,o)||this}return V(n,t),n.prototype.handleAuthenticationInputResponse=function(n){var o=n;e.impl.PatternInputImpl.validateFormat(o)?t.prototype.handleAuthenticationInputResponse.call(this,n):this.processLocalAuthenticatorError(new e.impl.AuthenticationErrorImpl(e.AuthenticationErrorCode.AppImplementation,"Invalid pattern description format."))},n.prototype.extractPbkdfInputFromInputResponse=function(t){var n=t;return e.util.asciiToHex(n.getPatternDescription())},n.prototype.createAuthenticatorSession=function(){var e,t,n=this._authenticatorConfig,o=this.uiHandler.createPatternAuthSession(this.credentialId,this.user.displayName,3,4);return null===(t=(e=o).setMinLength)||void 0===t||t.call(e,n.min_length),o},n.create=function(e,t,o){return new n(e,t,o)},n}(t.PKCredentialLocalSecretInputBased);t.PKCredentialLocalPattern=n}(t.credential||(t.credential={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(t){!function(n){!function(o){var r=function(o){function r(){return null!==o&&o.apply(this,arguments)||this}return V(r,o),r.prototype.authenticatorKeyTagForScheme=function(e,t){return new n.TarsusKeyPath("per_user",this.user.guid.toString(),"local_auth_keys",this.credentialId,e,t)},r.prototype.getKeyForEnrollmentDataAndInput=function(n,o){var r=this;return new Promise((function(i,s){var a=r.authenticatorKeyTagForScheme(n.version,n.salt),c=r.sdk.host.getKeyPair(a,e.sdkhost.KeyClass.HardwareProtectedSignAndEncryptKey,e.sdkhost.KeyBiometricProtectionMode.BindToEnrollmentDb);if(!c){var u={};throw u[e.sdkhost.ErrorDataInternalError]=e.sdkhost.InternalErrorBiometricInvalidated,new t.impl.AuthenticationErrorImpl(t.AuthenticationErrorCode.Internal,"Attempt to authenticate with invalidated biometric authenticator.",u)}r.updateKeyPairWithAuthenticationInput(c,r._inputSession,o),i(c)}))},r.prototype.processLocalAuthenticatorError=function(o){var r=this,i=o,s=Promise.resolve();if(i.getErrorCode()==t.AuthenticationErrorCode.Internal&&i.getData()){var a=i.getData();i=t.impl.AuthenticationErrorImpl.errorForHostInternalBiometricErrorData(a,this.credentialId)||i,(a[e.sdkhost.ErrorDataInternalError]==e.sdkhost.InternalErrorBiometricNotConfigured&&this._authenticatorDescription.getRegistered()||a[e.sdkhost.ErrorDataInternalError]==e.sdkhost.InternalErrorBiometricInvalidated)&&(s=n.LocalEnrollment.invalidateLocalRegistrationStatusAndNotifyUIHandler(this._userInteractionSessionProvider,this._authenticatorDescription))}s.catch((function(e){r.sdk.log(t.LogLevel.Error,e)})),s.finally((function(){if(i.getErrorCode()==t.AuthenticationErrorCode.UserCanceled)return r.sdk.log(t.LogLevel.Debug,(function(){return"£{this.credentialId} authenticator captured user cancel error code."})),void r.invokeUiHandlerCancellation();r.completeCredentialOperationWithError(i)}))},r.prototype.evaluateLocalRegistrationStatus=function(){var n=o.prototype.evaluateLocalRegistrationStatus.call(this);if(n!=t.AuthenticatorRegistrationStatus.Registered)return n;var r=this.user.localEnrollments[this.credentialId],i=this.authenticatorKeyTagForScheme(r.version,r.salt),s=this.sdk.host.getKeyPair(i,e.sdkhost.KeyClass.HardwareProtectedSignAndEncryptKey,e.sdkhost.KeyBiometricProtectionMode.BindToEnrollmentDb);return s?(s.closeKeyPair(),t.AuthenticatorRegistrationStatus.Registered):t.AuthenticatorRegistrationStatus.LocallyInvalid},r}(o.PKCredentialAuthLocal);o.PKCredentialBiometric=r}(n.credential||(n.credential={}))}(t.core||(t.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(n){var o=function(n){function o(e,t,o){return n.call(this,e,t,o)||this}return V(o,n),o.prototype.updateKeyPairWithAuthenticationInput=function(t,n,o){t.setBiometricPromptInfo(e.util.BiometricPromptInfoFrom.fingerprintInput(o),this.uiHandler,n)},o.prototype.authenticatorKeyTagForScheme=function(e,n){return t.authenticationdrivers.AuthenticationDriverFingerprint.authenticatorKeyTagForUser(this.user,e,n)},o.prototype.createAuthenticatorSession=function(){return this.uiHandler.createFingerprintAuthSession(this.credentialId,this.user.displayName)},o.prototype.shouldAllowBiometricFallbackButton=function(e){if(!e)return!1;var t=e.getFallbackButtonTitle();return!!(t&&t.length>0)},o.create=function(e,t,n){return new o(e,t,n)},o}(n.PKCredentialBiometric);n.PKCredentialFingerprint=o}(t.credential||(t.credential={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(n){var o=function(n){function o(e,t,o){return n.call(this,e,t,o)||this}return V(o,n),o.prototype.updateKeyPairWithAuthenticationInput=function(t,n,o){t.setBiometricPromptInfo(e.util.BiometricPromptInfoFrom.nativeFaceInput(o),null,null)},o.prototype.authenticatorKeyTagForScheme=function(e,n){return t.authenticationdrivers.AuthenticationDriverNativeFace.authenticatorKeyTagForUser(this.user,e,n)},o.prototype.createAuthenticatorSession=function(){return this.uiHandler.createNativeFaceAuthSession(this.credentialId,this.user.displayName)},o.prototype.shouldAllowBiometricFallbackButton=function(e){if(!e)return!1;var t=e.getFallbackButtonTitle();return!!(t&&t.length>0)},o.create=function(e,t,n){return new o(e,t,n)},o}(n.PKCredentialBiometric);n.PKCredentialNativeFace=o}(t.credential||(t.credential={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){!function(n){var o=function(n){function o(e,t,o){return n.call(this,e,t,o)||this}return V(o,n),o.prototype.updateKeyPairWithAuthenticationInput=function(t,n,o){t.setBiometricPromptInfo(e.util.BiometricPromptInfoFrom.deviceBiometricInput(o,this._authenticatorConfig),null,null)},o.prototype.authenticatorKeyTagForScheme=function(e,o){return t.authenticationdrivers.AuthenticationDriverDeviceBiometrics.authenticatorKeyTagForUserForMigratedEnrollment(this.user,e,o)||n.prototype.authenticatorKeyTagForScheme.call(this,e,o)},o.prototype.createAuthenticatorSession=function(){return this.uiHandler.createDeviceBiometricsAuthSession(this.credentialId,this.user.displayName)},o.create=function(e,t,n){return new o(e,t,n)},o}(n.PKCredentialBiometric);n.PKCredentialDeviceBiometrics=o}(t.credential||(t.credential={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){!function(e){e.CredentialTypes={pin:e.PKCredentialLocalPinCode,pattern:e.PKCredentialLocalPattern,fingerprint:e.PKCredentialFingerprint,face_id:e.PKCredentialNativeFace,device_biometrics:e.PKCredentialDeviceBiometrics}}(e.credential||(e.credential={}))}(e.core||(e.core={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){}return e.prototype.getEscapeOption=function(){return this._escapeOption},e.prototype.setEscapeOption=function(e){this._escapeOption=e},e.prototype.getEscapeParameters=function(){return this._escapeParameters},e.prototype.setEscapeParameters=function(e){this._escapeParameters=e},e.__tarsusInterfaceName="ActionEscapeRequest",e}();e.ActionEscapeRequest=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.__tarsusInterfaceName="AnonymousPolicyInvocationOptions",t}(e.JourneyInvocationOptions);e.AnonymousPolicyInvocationOptions=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.__tarsusInterfaceName="ApprovalPolicyInvocationOptions",t}(e.JourneyInvocationOptions);e.ApprovalPolicyInvocationOptions=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.getAcquisitionResponse=function(){return this._acquisitionResponse},t.prototype.setAcquisitionResponse=function(e){this._acquisitionResponse=e},t.__tarsusInterfaceName="AudioInputResponse",t}(e.InputResponseType);e.AudioInputResponse=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.__tarsusInterfaceName="AuthenticateInvocationOptions",t}(e.JourneyInvocationOptions);e.AuthenticateInvocationOptions=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Internal=0]="Internal",e[e.InvalidInput=1]="InvalidInput",e[e.AuthenticatorLocked=2]="AuthenticatorLocked",e[e.AllAuthenticatorsLocked=3]="AllAuthenticatorsLocked",e[e.NoRegisteredAuthenticator=4]="NoRegisteredAuthenticator",e[e.RegisteredSecretAlreadyInHistory=5]="RegisteredSecretAlreadyInHistory",e[e.Communication=6]="Communication",e[e.UserCanceled=7]="UserCanceled",e[e.AppImplementation=8]="AppImplementation",e[e.PolicyRejection=9]="PolicyRejection",e[e.AuthenticatorInvalidated=10]="AuthenticatorInvalidated",e[e.ControlFlowExpired=11]="ControlFlowExpired",e[e.SessionRequired=12]="SessionRequired",e[e.AuthenticatorError=13]="AuthenticatorError",e[e.ApprovalWrongState=14]="ApprovalWrongState",e[e.TotpNotProvisioned=15]="TotpNotProvisioned",e[e.AuthenticatorExternalConfigError=16]="AuthenticatorExternalConfigError",e[e.InvalidDeviceBinding=17]="InvalidDeviceBinding",e[e.InvalidIdToken=18]="InvalidIdToken",e[e.DeviceNotFound=19]="DeviceNotFound",e[e.ApprovalDenied=20]="ApprovalDenied",e[e.ApprovalExpired=21]="ApprovalExpired",e[e.ApplicationGeneratedRecoverableError=22]="ApplicationGeneratedRecoverableError",e[e.UserNotFound=23]="UserNotFound"}(e.AuthenticationErrorCode||(e.AuthenticationErrorCode={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.AuthenticatorExternalConfigErrorReason=0]="AuthenticatorExternalConfigErrorReason",e[e.AuthenticatorInvalidInputErrorDescription=1]="AuthenticatorInvalidInputErrorDescription",e[e.InvalidIdTokenErrorReason=2]="InvalidIdTokenErrorReason",e[e.UserRecordDeleted=3]="UserRecordDeleted",e[e.AuthenticationErrorFailingActionType=4]="AuthenticationErrorFailingActionType",e[e.AuthenticationErrorReason=5]="AuthenticationErrorReason"}(e.AuthenticationErrorProperty||(e.AuthenticationErrorProperty={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.AuthenticatorExternalConfigErrorReasonBiometricsNotEnrolled=0]="AuthenticatorExternalConfigErrorReasonBiometricsNotEnrolled",e[e.AuthenticatorExternalConfigErrorReasonBiometricsOsLockTemporary=1]="AuthenticatorExternalConfigErrorReasonBiometricsOsLockTemporary",e[e.AuthenticatorExternalConfigErrorReasonBiometricsOsLockPermanent=2]="AuthenticatorExternalConfigErrorReasonBiometricsOsLockPermanent",e[e.AuthenticatorInvalidInputErrorDescriptionTotpIncorrectCheckDigit=3]="AuthenticatorInvalidInputErrorDescriptionTotpIncorrectCheckDigit",e[e.InvalidIdTokenErrorReasonExpiredToken=4]="InvalidIdTokenErrorReasonExpiredToken",e[e.InvalidIdTokenErrorReasonBadToken=5]="InvalidIdTokenErrorReasonBadToken",e[e.AuthenticationErrorReasonAttestationReverificationFailed=6]="AuthenticationErrorReasonAttestationReverificationFailed",e[e.AuthenticationErrorReasonCredentialFiltered=7]="AuthenticationErrorReasonCredentialFiltered",e[e.AuthenticatorExternalConfigErrorReasonGeneratedKeyIsNotSecure=8]="AuthenticatorExternalConfigErrorReasonGeneratedKeyIsNotSecure"}(e.AuthenticationErrorPropertySymbol||(e.AuthenticationErrorPropertySymbol={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.RetryAuthenticator=0]="RetryAuthenticator",e[e.ChangeAuthenticator=1]="ChangeAuthenticator",e[e.SelectAuthenticator=2]="SelectAuthenticator",e[e.Fail=3]="Fail"}(e.AuthenticationErrorRecovery||(e.AuthenticationErrorRecovery={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Register=0]="Register",e[e.Unregister=1]="Unregister",e[e.Reregister=2]="Reregister"}(e.AuthenticatorConfigurationAction||(e.AuthenticatorConfigurationAction={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Fallback=0]="Fallback",e[e.AuthMenu=1]="AuthMenu",e[e.Retry=2]="Retry",e[e.Cancel=3]="Cancel"}(e.AuthenticatorFallbackAction||(e.AuthenticatorFallbackAction={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Registered=0]="Registered",e[e.Unregistered=1]="Unregistered",e[e.LocallyInvalid=2]="LocallyInvalid"}(e.AuthenticatorRegistrationStatus||(e.AuthenticatorRegistrationStatus={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.SelectAuthenticator=0]="SelectAuthenticator",e[e.Abort=1]="Abort",e[e.Escape=2]="Escape"}(e.AuthenticatorSelectionResultType||(e.AuthenticatorSelectionResultType={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Authentication=0]="Authentication",e[e.Registration=1]="Registration"}(e.AuthenticatorSessionMode||(e.AuthenticatorSessionMode={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.__tarsusInterfaceName="BindInvocationOptions",t}(e.JourneyInvocationOptions);e.BindInvocationOptions=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.getAcquisitionResponse=function(){return this._acquisitionResponse},t.prototype.setAcquisitionResponse=function(e){this._acquisitionResponse=e},t.__tarsusInterfaceName="CameraInputResponse",t}(e.InputResponseType);e.CameraInputResponse=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Accounts=0]="Accounts",e[e.DeviceDetails=1]="DeviceDetails",e[e.Contacts=2]="Contacts",e[e.Owner=3]="Owner",e[e.Software=4]="Software",e[e.Location=5]="Location",e[e.LocationCountry=6]="LocationCountry",e[e.Bluetooth=7]="Bluetooth",e[e.ExternalSDKDetails=8]="ExternalSDKDetails",e[e.HWAuthenticators=9]="HWAuthenticators",e[e.Capabilities=10]="Capabilities",e[e.LargeData=11]="LargeData",e[e.LocalEnrollments=12]="LocalEnrollments",e[e.DeviceFingerprint=13]="DeviceFingerprint",e[e.AppPermissions=14]="AppPermissions"}(e.CollectorType||(e.CollectorType={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.None=0]="None",e[e.Credentials=1]="Credentials",e[e.Full=2]="Full"}(e.ConnectionCryptoMode||(e.ConnectionCryptoMode={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.CancelAuthenticator=0]="CancelAuthenticator",e[e.RetryAuthenticator=1]="RetryAuthenticator",e[e.ChangeMethod=2]="ChangeMethod",e[e.SelectMethod=3]="SelectMethod",e[e.AbortAuthentication=4]="AbortAuthentication"}(e.ControlRequestType||(e.ControlRequestType={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Remove=0]="Remove",e[e.Rename=1]="Rename"}(e.DeviceManagementAction||(e.DeviceManagementAction={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.RecentlyUsed=0]="RecentlyUsed",e[e.NoRecentActivity=1]="NoRecentActivity",e[e.LongInactivity=2]="LongInactivity",e[e.Disabled=3]="Disabled",e[e.Removed=4]="Removed"}(e.DeviceStatus||(e.DeviceStatus={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Submit=0]="Submit",e[e.Abort=1]="Abort",e[e.Escape=2]="Escape"}(e.FormControlRequest||(e.FormControlRequest={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Disable=0]="Disable",e[e.RecoverDeviceAndBindingOnAuthenticate=1]="RecoverDeviceAndBindingOnAuthenticate"}(e.InvalidUserRecordRecoveryMode||(e.InvalidUserRecordRecoveryMode={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Off=0]="Off",e[e.Critical=1]="Critical",e[e.Error=2]="Error",e[e.Warning=3]="Warning",e[e.Info=4]="Info",e[e.Debug=5]="Debug"}(e.LogLevel||(e.LogLevel={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Approve=0]="Approve",e[e.Deny=1]="Deny"}(e.MobileApprovalAction||(e.MobileApprovalAction={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Pending=0]="Pending",e[e.Approved=1]="Approved",e[e.Denied=2]="Denied",e[e.Expired=3]="Expired"}(e.MobileApprovalStatus||(e.MobileApprovalStatus={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Unknown=0]="Unknown",e[e.Sms=1]="Sms",e[e.Email=2]="Email",e[e.PushNotification=3]="PushNotification",e[e.VoiceCall=4]="VoiceCall"}(e.OtpChannel||(e.OtpChannel={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.getFailureError=function(){return this._failureError},t.prototype.setFailureError=function(e){this._failureError=e},t.prototype.getExpired=function(){return this._expired},t.prototype.setExpired=function(e){this._expired=e},t.prototype.getRegistered=function(){return this._registered},t.prototype.setRegistered=function(e){this._registered=e},t.prototype.getRegistrationStatus=function(){return this._registrationStatus},t.prototype.setRegistrationStatus=function(e){this._registrationStatus=e},t.prototype.getLocked=function(){return this._locked},t.prototype.setLocked=function(e){this._locked=e},t.__tarsusInterfaceName="PlaceholderAuthFailureResponse",t}(e.PlaceholderInputResponse);e.PlaceholderAuthFailureResponse=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.getFailureError=function(){return this._failureError},t.prototype.setFailureError=function(e){this._failureError=e},t.__tarsusInterfaceName="PlaceholderAuthFailureWithServerProvidedStatusResponse",t}(e.PlaceholderInputResponse);e.PlaceholderAuthFailureWithServerProvidedStatusResponse=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.getPlaceholderToken=function(){return this._placeholderToken},t.prototype.setPlaceholderToken=function(e){this._placeholderToken=e},t.__tarsusInterfaceName="PlaceholderAuthSuccessResponse",t}(e.PlaceholderInputResponse);e.PlaceholderAuthSuccessResponse=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.__tarsusInterfaceName="PolicyInvocationOptions",t}(e.JourneyInvocationOptions);e.PolicyInvocationOptions=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Skip=0]="Skip",e[e.Abort=1]="Abort",e[e.Continue=2]="Continue"}(e.PromotionControlRequest||(e.PromotionControlRequest={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Numeric=0]="Numeric",e[e.Alphanumeric=1]="Alphanumeric",e[e.Binary=2]="Binary"}(e.QrCodeFormat||(e.QrCodeFormat={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.RedirectToPolicy=0]="RedirectToPolicy",e[e.CancelRedirect=1]="CancelRedirect"}(e.RedirectResponseType||(e.RedirectResponseType={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.getAnswers=function(){return this._answers},t.__tarsusInterfaceName="SecurityQuestionAnswersInputResponse",t}(e.SecurityQuestionInputResponse);e.SecurityQuestionAnswersInputResponse=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){}return e.__tarsusInterfaceName="SuspensionContext",e}();e.SuspensionContext=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){}return e.prototype.getValue=function(){return this._value},e.prototype.setValue=function(e){this._value=e},e.prototype.getFormat=function(){return this._format},e.prototype.setFormat=function(e){this._format=e},e.__tarsusInterfaceName="TotpChallenge",e}();e.TotpChallenge=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){}return e.prototype.getName=function(){return this._name},e.prototype.setName=function(e){this._name=e},e.prototype.getValue=function(){return this._value},e.prototype.setValue=function(e){this._value=e},e.__tarsusInterfaceName="TransportHeader",e}();e.TransportHeader=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){}return e.prototype.getStatus=function(){return this._status},e.prototype.setStatus=function(e){this._status=e},e.prototype.getMethod=function(){return this._method},e.prototype.setMethod=function(e){this._method=e},e.prototype.getHeaders=function(){return this._headers},e.prototype.setHeaders=function(e){this._headers=e},e.prototype.getBodyJson=function(){return this._bodyJson},e.prototype.setBodyJson=function(e){this._bodyJson=e},e.__tarsusInterfaceName="TransportResponse",e}();e.TransportResponse=t}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Disable=0]="Disable",e[e.DownloadOnInit=1]="DownloadOnInit"}(e.UIAssetsDownloadMode||(e.UIAssetsDownloadMode={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.UserId=0]="UserId",e[e.IdToken=1]="IdToken"}(e.UserHandleType||(e.UserHandleType={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Fido2UserVerifyingPlatformAuthenticatorAvailable=0]="Fido2UserVerifyingPlatformAuthenticatorAvailable"}(e.AsyncHostInformationKey||(e.AsyncHostInformationKey={}))}(e.sdkhost||(e.sdkhost={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){}return e.prototype.getLocalizedTitle=function(){return this._localizedTitle},e.prototype.setLocalizedTitle=function(e){this._localizedTitle=e},e.prototype.getLocalizedSubtitle=function(){return this._localizedSubtitle},e.prototype.setLocalizedSubtitle=function(e){this._localizedSubtitle=e},e.prototype.getLocalizedPrompt=function(){return this._localizedPrompt},e.prototype.setLocalizedPrompt=function(e){this._localizedPrompt=e},e.prototype.getFallbackButtonTitle=function(){return this._fallbackButtonTitle},e.prototype.setFallbackButtonTitle=function(e){this._fallbackButtonTitle=e},e.prototype.getCancelButtonTitle=function(){return this._cancelButtonTitle},e.prototype.setCancelButtonTitle=function(e){this._cancelButtonTitle=e},e.prototype.getRequireConfirmation=function(){return this._requireConfirmation},e.prototype.setRequireConfirmation=function(e){this._requireConfirmation=e},e.__tarsusInterfaceName="BiometricPromptInfo",e}();e.BiometricPromptInfo=t}(e.sdkhost||(e.sdkhost={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Create=0]="Create",e[e.Get=1]="Get"}(e.Fido2CredentialsOpType||(e.Fido2CredentialsOpType={}))}(e.sdkhost||(e.sdkhost={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.Version=0]="Version",e[e.Platform=1]="Platform",e[e.FingerprintSupported=2]="FingerprintSupported",e[e.HostProvidedFeatures=3]="HostProvidedFeatures",e[e.FaceIdKeyBioProtectionSupported=4]="FaceIdKeyBioProtectionSupported",e[e.ImageAcquitisionSupported=5]="ImageAcquitisionSupported",e[e.AudioAcquitisionSupported=6]="AudioAcquitisionSupported",e[e.PersistentKeysSupported=7]="PersistentKeysSupported",e[e.DyadicPresent=8]="DyadicPresent",e[e.StdSigningKeyIsHardwareProtectedSignAndEncryptKey=9]="StdSigningKeyIsHardwareProtectedSignAndEncryptKey",e[e.Fido2ClientPresent=10]="Fido2ClientPresent",e[e.DeviceBiometricsSupported=11]="DeviceBiometricsSupported",e[e.DeviceBiometricsFPContinuation=12]="DeviceBiometricsFPContinuation",e[e.DeviceBiometricsUsesSign=13]="DeviceBiometricsUsesSign",e[e.DevicePersistenceMode=14]="DevicePersistenceMode",e[e.Fido2RelyingParty=15]="Fido2RelyingParty"}(e.HostInformationKey||(e.HostInformationKey={}))}(e.sdkhost||(e.sdkhost={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.None=0]="None",e[e.NormalProtection=1]="NormalProtection",e[e.BindToEnrollmentDb=2]="BindToEnrollmentDb"}(e.KeyBiometricProtectionMode||(e.KeyBiometricProtectionMode={}))}(e.sdkhost||(e.sdkhost={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.StdSigningKey=0]="StdSigningKey",e[e.StdEncryptionKey=1]="StdEncryptionKey",e[e.GeneralPurposeAES=2]="GeneralPurposeAES",e[e.NoIntegrityAES=3]="NoIntegrityAES",e[e.FidoECCSigningKey=4]="FidoECCSigningKey",e[e.HardwareProtectedSignAndEncryptKey=5]="HardwareProtectedSignAndEncryptKey"}(e.KeyClass||(e.KeyClass={}))}(e.sdkhost||(e.sdkhost={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getResultPayload=function(){return this._resultPayload},t.create=function(t){return e.ts.mobile.tarsusplugin.impl.IdpInvocationResultImpl.create(t)},t.__tarsusInterfaceName="IdpInvocationResult",t}();t.IdpInvocationResult=n}(t.tarsusplugin||(t.tarsusplugin={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(n){var o=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getPayload=function(){return this._payload},n.create=function(t){return e.ts.mobile.tarsusplugin.impl.KycDataCollectionResultImpl.create(t)},n.__tarsusInterfaceName="KycDataCollectionResult",n}(t.sdk.InputResponseType);n.KycDataCollectionResult=o}(t.tarsusplugin||(t.tarsusplugin={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(n){var o=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return V(n,t),n.prototype.getDelay=function(){return this._delay},n.create=function(t){return e.ts.mobile.tarsusplugin.impl.KycPollResultImpl.create(t)},n.__tarsusInterfaceName="KycPollResult",n}(t.sdk.InputResponseType);n.KycPollResult=o}(t.tarsusplugin||(t.tarsusplugin={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getPluginName=function(){return this._pluginName},t.prototype.setPluginName=function(e){this._pluginName=e},t.prototype.getVersionMajor=function(){return this._versionMajor},t.prototype.setVersionMajor=function(e){this._versionMajor=e},t.prototype.getVersionMinor=function(){return this._versionMinor},t.prototype.setVersionMinor=function(e){this._versionMinor=e},t.prototype.getVersionPatch=function(){return this._versionPatch},t.prototype.setVersionPatch=function(e){this._versionPatch=e},t.prototype.getRequiredPluginApiLevel=function(){return this._requiredPluginApiLevel},t.prototype.setRequiredPluginApiLevel=function(e){this._requiredPluginApiLevel=e},t.create=function(){return e.ts.mobile.tarsusplugin.impl.PluginInfoImpl.create()},t.__tarsusInterfaceName="PluginInfo",t}();t.PluginInfo=n}(t.tarsusplugin||(t.tarsusplugin={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getCode=function(){return this._code},t.prototype.getTimeStepSeconds=function(){return this._timeStepSeconds},t.prototype.getExpiresInSeconds=function(){return this._expiresInSeconds},t.prototype.getSecondsTillNextInvocation=function(){return this._secondsTillNextInvocation},t.prototype.getShouldUpdateSpecificProperties=function(){return this._shouldUpdateSpecificProperties},t.prototype.getGeneratorSpecificDataToStore=function(){return this._generatorSpecificDataToStore},t.prototype.getMessage=function(){return this._message},t.create=function(t,n,o,r,i,s,a){return e.ts.mobile.tarsusplugin.impl.TotpCodeGenerationOutputImpl.create(t,n,o,r,i,s,a)},t.__tarsusInterfaceName="TotpCodeGenerationOutput",t}();t.TotpCodeGenerationOutput=n}(t.tarsusplugin||(t.tarsusplugin={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.getEscapeRequest=function(){return this._escapeRequest},t.prototype.setEscapeRequest=function(e){this._escapeRequest=e},t.__tarsusInterfaceName="TotpProvisionEscapeRequest",t}(e.TotpProvisionResult);e.TotpProvisionEscapeRequest=t}(e.tarsusplugin||(e.tarsusplugin={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){}return t.prototype.getUnprotectedProvisionOutput=function(){return this._unprotectedProvisionOutput},t.prototype.getSecretToLock=function(){return this._secretToLock},t.create=function(t,n){return e.ts.mobile.tarsusplugin.impl.VaultBasedTotpProvisionOutputImpl.create(t,n)},t.__tarsusInterfaceName="VaultBasedTotpProvisionOutput",t}();t.VaultBasedTotpProvisionOutput=n}(t.tarsusplugin||(t.tarsusplugin={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.getResultPayload=function(){return this._resultPayload},t.create=function(e){var n=new t;return n._resultPayload=e,n},t.__tarsusInterfaceName="IdpInvocationResult",t}(e.IdpInvocationResult);t.IdpInvocationResultImpl=n}(e.impl||(e.impl={}))}(e.tarsusplugin||(e.tarsusplugin={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.prototype.getPayload=function(){return this._payload},t.create=function(e){var n=new t;return n._payload=e,n},t.__tarsusInterfaceName="KycDataCollectionResult",t}(e.KycDataCollectionResult);t.KycDataCollectionResultImpl=n}(e.impl||(e.impl={}))}(e.tarsusplugin||(e.tarsusplugin={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e){var n=new t;return n._delay=e,n},t.__tarsusInterfaceName="KycDataPollResult",t}(e.KycPollResult);t.KycPollResultImpl=n}(e.impl||(e.impl={}))}(e.tarsusplugin||(e.tarsusplugin={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(t){!function(t){!function(t){!function(n){var o=function(t){function n(){var e=t.call(this)||this;return e._versionMajor=0,e._versionMinor=0,e._versionPatch=0,e}return V(n,t),n.create=function(){return new e.ts.mobile.tarsusplugin.impl.PluginInfoImpl},n.versionToString=function(e){return e.getVersionMajor()+"."+e.getVersionMinor()+"."+e.getVersionPatch()},n.toString=function(e){return e.getPluginName()+" v"+this.versionToString(e)},n}(t.PluginInfo);n.PluginInfoImpl=o}(t.impl||(t.impl={}))}(t.tarsusplugin||(t.tarsusplugin={}))}(t.mobile||(t.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e,n,o,r,i,s,a){var c=new t;return c._code=e,n&&(c._message=n),c._timeStepSeconds=o,c._expiresInSeconds=r,c._secondsTillNextInvocation=i,c._shouldUpdateSpecificProperties=s,a&&(c._generatorSpecificDataToStore=a),c},t}(e.TotpCodeGenerationOutput);t.TotpCodeGenerationOutputImpl=n}(e.impl||(e.impl={}))}(e.tarsusplugin||(e.tarsusplugin={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(t){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return V(t,e),t.create=function(e,n){var o=new t;return o._secretToLock=e,o._unprotectedProvisionOutput=n,o},t}(e.VaultBasedTotpProvisionOutput);t.VaultBasedTotpProvisionOutputImpl=n}(e.impl||(e.impl={}))}(e.tarsusplugin||(e.tarsusplugin={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={})),function(e){!function(e){!function(e){!function(e){!function(e){function t(e){return!!e.tlvSerializable}function n(n,o){var r=[];return Object.keys(o).forEach((function(i){var s=n[i];if(!s)throw"TLV encoding error: Unknown tag "+i;var a=o[i];a instanceof Array||(a=[a]),a.forEach((function(o){var a=o.__type||s.tagType||t(o)&&e.TlvTypes.Serializable;if(!a)throw"Unknown type for tag "+i;o.__type&&(o=o.__value);var c=a(o,n);r.push(e.TlvTypes.UInt16(s.id)),r.push(e.TlvTypes.UInt16(c.length/2)),r.push(c)}))})),r.join("")}e.instanceOfTlvSerializable=t,e.TlvTypes={UInt8:function(t){return e.numberToHex(t,8)},UInt16:function(t){return e.numberToHex(t>>8&255|(255&t)<<8,16)},UInt32:function(t){return e.numberToHex((255&t)<<24|(t>>8&255)<<16|(t>>16&255)<<8|t>>24&255,32)},Object:function(e,t){return n(t,e)},Serializable:function(e,t){return e.tlvSerialize(t)},String:function(t,n){return e.asciiToHex(t)},HexBinary:function(e,t){return e},Struct:function(e){return function(t,n){var o=[];return Object.keys(e).forEach((function(r){if(r in t){var i=t[r],s=e[r];o.push(s(i,n))}})),o.join("")}}},e.tlvEncodeHex=n}(e.util||(e.util={}))}(e.sdk||(e.sdk={}))}(e.mobile||(e.mobile={}))}(e.ts||(e.ts={}))}(Z||(Z={}));var ee=com.ts.mobile.sdk.createSdk(),te=new K;function ne(){return ee}ee.setTarsusHost(te),ee.setTransportProvider(new a(te)),ee.setEnabledCollectors([com.ts.mobile.sdk.CollectorType.DeviceDetails,com.ts.mobile.sdk.CollectorType.LargeData,com.ts.mobile.sdk.CollectorType.Capabilities]),ee.setEnabledCollectorsForAnonymousJourneys([com.ts.mobile.sdk.CollectorType.DeviceDetails,com.ts.mobile.sdk.CollectorType.Capabilities]),ee.setLogLevel(com.ts.mobile.sdk.LogLevel.Error),window.xmui&&ee.setUiHandler(new window.xmui.XmUIHandler)}).call(this,n(41))},69:function(e){e.exports=JSON.parse('{"default":{"dynamic-username-prompt":{"prefix":"Logging in as"},"login":{"usernameStep":{"heading":"Access your accounts online","description":"Log in to Online Banking"},"passwordStep":{"heading":"Access your accounts online","description":"Log in using your Online Banking password"},"mustChangePasswordStep":{"heading":"Access your accounts online"},"mustChangePasswordSuccessStep":{"heading":"Access your accounts online","description":"Log in to Online Banking"},"otcContactMethodStep":{"heading":"Access your accounts online","description":"Log in"},"otcStep":{"heading":"Access your accounts online","description":"Log in"},"challengeQuestionStep":{"heading":"Access your accounts online"},"setupSecurityQuestionsStep":{"heading":"Access your accounts online"},"setupSecQuestionsSuccessOptionStep":{"heading":"Access your accounts online","description":"Log in to Online Banking"}},"retrieveUsername":{"retrieveUserName":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"},"UserSSNNumber":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"},"UserLastDobZip":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"},"UserAccountNumber":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"},"otcContactMethodStep":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"},"otcStep":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"},"RetreiveUsernameSuccesStep":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"}},"forgotPassword":{"forgotpassword":{"heading":"Access your accounts online","description":"Reset Online Banking password"},"UserLastDobZip":{"heading":"Access your accounts online","description":"Reset Online Banking password"},"UserAccountNumber":{"heading":"Access your accounts online","description":"Reset Online Banking password"},"otcContactMethodStep":{"heading":"Access your accounts online","description":"Reset Online Banking password"},"otcStep":{"heading":"Access your accounts online","description":"Reset Online Banking password"},"ChangePassword":{"heading":"Access your accounts online","description":"Reset Online Banking password"},"ForgotPasswordSuccess":{"heading":"Access your accounts online","description":"Reset Online Banking password"}},"errorContent":{"FPWrongUsername":{"heading":"Access your accounts online","description":"Reset Online Banking password","errortext1":"You entered username","errortext2":"Your username is","titleFirstHalf":"Would you like to log in now as","titleSecondHalf":", or do you still need to reset your password?"},"genericError":{"defaultError":{"heading":"Access your accounts online","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"systemUnavailable":{"heading":"Access your accounts online","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"maintenanceEnabled":{"heading":"Access your accounts online","description":"We\'re currently updating our system.","prompt":"We know that temporarily limiting access can be inconvenient and are working quickly to bring all services back online. Please check back soon.","subprompt":"Having trouble with our online services? You can access many banking features using the latest version of our mobile app. You can also visit any branch location during business hours and find 24/7 resources at our website.","note":""},"downTimeMode":{"heading":"Access your accounts online","description":"We are currently experiencing technical issues with BarclaysOnline Banking.","prompt":"We apologize for the inconvenience but we are currently experiencing technical issues. We\'re working quickly to restore access.","subprompt":"","note":""},"stepupInsufficient":{"heading":"Access your accounts online","description":"We can\u2019t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","note":""},"tmxReject":{"heading":"Access your accounts online","description":"We can\u2019t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","note":""},"rcifDown":{"heading":"Access your accounts online","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your accounts online","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your accounts online","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your accounts online","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your accounts online","description":"Reset Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your accounts online","description":"Retrieve Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your accounts online","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your accounts online","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your accounts online","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your accounts online","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your accounts online","description":"Log in to Online Banking","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your accounts online","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476reset your Password.","sessionTimedout":"You reached the time limit for your attempt. Please try again.","invalidUsernameOrPassword":"Either the username or password you entered is invalid. Please try again.","duplicateAns":"Provide a different answer for each security question. Answers cannot be used more than once."},"userName":{"fieldLevelErrors":{"validUsername":"Enter a valid username."}},"password":{"fieldLevelErrors":{"validPassword":"Enter a valid password."}},"mustChangePassword":{"fieldLevelErrors":{"tempPasswordBlankOrInvalid":"Enter a valid temporary password.","passwordLength":"Oops! Please enter a password containing between 8-32 characters.","newPasswordBlankOrInvalid":"Enter a password that includes all the required elements.","newPasswordIncorrectFormat":"New password is not in correct format.","confirmPasswordIncorrectFormat":"Enter a password that includes all the required elements.","confirmNewPasswordBlank":"Enter the new password again. Passwords must match.","passwordMisMatch":"The passwords do not match. Please try again."}},"challengeQuestion":{"fieldLevelErrors":{"enterValidAnswer":"Enter valid passcode.","answerShouldContains":"Enter valid passcode.","answerDidNotMatch":"This passcode is incorrect, please try again.","answerDidNotMatchSecurityQuestion":"Enter a valid answer."}},"setupSecurityQuestions":{"fieldLevelErrors":{"answerWithSplCharOrSpace":"Answers cannot include special characters.","ansmismatch":"Answers do not match.","multipleSameAns":"Answers cannot be used more than once.","selectquestion":"Select a question.","enterValidAns":"Enter a valid answer.","enterValidConfAns":"Enter a valid answer.","singleChar":"Answer must include two or more characters.","noBeginOrEndSpaces":"Answer cannot include a space as the first or last character."}},"otcContactMethodSelection":{"fieldLevelErrors":{"contactMethod":"Select a phone number or email address."}},"otc":{"fieldLevelErrors":{"lengthError":"Enter a six-digit one-time code.","emptyOtc":"Enter a six-digit one-time code.","invalidOtc":"This code is incorrect. Please try again."}},"lastDobZip":{"fieldLevelErrors":{}},"usernameLastDobZip":{"fieldLevelErrors":{"emptyUsername":"Enter a valid username.","emptyLastName":"Enter the account holder last name.","invalidDOB":"Enter a valid date of birth.","invalidZip":"Enter a valid five-digit ZIP code."}},"ssn":{"fieldLevelErrors":{}},"accountNumber":{"fieldLevelErrors":{}},"changePassword":{"fieldLevelErrors":{"enterValidAnswer":"Oops! You must enter a password to continue.","passwordMisMatch":"The passwords do not match. Please try again.","passwordLength":"Oops! Please enter a password containing between 8-32 characters.","newPasswordIncorrectFormat":"New password is not in correct format.","confirmPasswordIncorrectFormat":"Confirm password is not in correct format.","newPasswordBlankOrInvalid":"Enter a password that includes all the required elements.","confirmNewPasswordBlank":"Enter the new password again. Passwords must match."}},"createNewPassword":{"fieldLevelErrors":{"validPassword":"Enter a valid password."}},"retrieveUsername":{"fieldLevelErrors":{"AccountTypeError":"Select a Barclayscard or account type.","AccountNumberError":"Enter a valid card or account number.","ContactMethodError":"Select an option.","PhoneError":"Enter a valid phone number.","EmailError":"Enter a valid email address.","LastNameError":"Enter the account holder last name.","DOBError":"Enter a valid date of birth.","ZipError":"Enter a valid five-digit ZIP code.","SSNError":"Enter a valid nine-digit Social Security or tax ID number."}},"forgotPassword":{"fieldLevelErrors":{"validUsername":"Enter a valid username.","AccountTypeError":"Select a Barclayscard or account type.","AccountNumberError":"Enter a valid card or account number.","LastNameError":"Enter the account holder last name.","DOBError":"Enter a valid date of birth.","ZipError":"Enter a valid five-digit ZIP code.","SSNError":"Enter a valid nine-digit Social Security or tax ID number.","fpSuccessMsg":"Your password has been successfully reset.","fpSuccessSubMsg":"You will use this new password the next time you log in online or in the app."}},"setupSecurityQuestionSuccess":{"fieldLevelErrors":{"successMsg":"Your new security questions have been saved. You can manage these questions by accessing the Customer Service tab in Online Banking."}},"mustChangePasswordSuccess":{"fieldLevelErrors":{"successMsg":"Your password has been successfully reset. You will use this new password the next time you log in online or in the app."}}}')},70:function(e){e.exports=JSON.parse('{"default":{"dynamic-username-prompt":{"prefix":"Logging in as"},"login":{"usernameStep":{"heading":"Access your accounts online","description":"Log in to Online Banking"},"passwordStep":{"heading":"Access your accounts online","description":"Log in using your Online Banking password"},"mustChangePasswordStep":{"heading":"Access your accounts online"},"mustChangePasswordSuccessStep":{"heading":"Access your accounts online","description":"Log in to Online Banking"},"otcContactMethodStep":{"heading":"Access your accounts online","description":"Log in"},"otcStep":{"heading":"Access your accounts online","description":"Log in"},"challengeQuestionStep":{"heading":"Access your accounts online"},"setupSecurityQuestionsStep":{"heading":"Access your accounts online"},"setupSecQuestionsSuccessOptionStep":{"heading":"Access your accounts online","description":"Log in to Online Banking"}},"retrieveUsername":{"retrieveUserName":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"},"UserSSNNumber":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"},"UserLastDobZip":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"},"UserAccountNumber":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"},"otcContactMethodStep":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"},"otcStep":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"},"RetreiveUsernameSuccesStep":{"heading":"Access your accounts online","description":"Retrieve Online Banking username"}},"forgotPassword":{"forgotpassword":{"heading":"Access your accounts online","description":"Reset Online Banking password"},"UserLastDobZip":{"heading":"Access your accounts online","description":"Reset Online Banking password"},"UserAccountNumber":{"heading":"Access your accounts online","description":"Reset Online Banking password"},"otcContactMethodStep":{"heading":"Access your accounts online","description":"Reset Online Banking password"},"otcStep":{"heading":"Access your accounts online","description":"Reset Online Banking password"},"ChangePassword":{"heading":"Access your accounts online","description":"Reset Online Banking password"},"ForgotPasswordSuccess":{"heading":"Access your accounts online","description":"Reset Online Banking password"}},"errorContent":{"FPWrongUsername":{"heading":"Access your accounts online","description":"Reset Online Banking password","errortext1":"You entered username","errortext2":"Your username is","titleFirstHalf":"Would you like to log in now as","titleSecondHalf":", or do you still need to reset your password?"},"genericError":{"defaultError":{"heading":"Access your accounts online","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"systemUnavailable":{"heading":"Access your accounts online","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"maintenanceEnabled":{"heading":"Access your accounts online","description":"We\'re currently updating our system.","prompt":"We know that temporarily limiting access can be inconvenient and are working quickly to bring all services back online. Please check back soon.","subprompt":"Having trouble with our online services? You can access many banking features using the latest version of our mobile app. You can also visit any branch location during business hours and find 24/7 resources at our website.","note":""},"downTimeMode":{"heading":"Access your accounts online","description":"We are currently experiencing technical issues with BarclaysOnline Banking.","prompt":"We apologize for the inconvenience but we are currently experiencing technical issues. We\'re working quickly to restore access.","subprompt":"","note":""},"stepupInsufficient":{"heading":"Access your accounts online","description":"We can\u2019t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","note":""},"tmxReject":{"heading":"Access your accounts online","description":"We can\u2019t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","note":""},"rcifDown":{"heading":"Access your accounts online","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your accounts online","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your accounts online","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your accounts online","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your accounts online","description":"Reset Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your accounts online","description":"Retrieve Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your accounts online","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your accounts online","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your accounts online","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your accounts online","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your accounts online","description":"Log in to Online Banking","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your accounts online","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access BarclaysAccount Solutions","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access BarclaysAccount Solutions","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access BarclaysAccount Solutions","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access BarclaysAccount Solutions","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access BarclaysAccount Solutions","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access BarclaysAccount Solutions","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access BarclaysAccount Solutions","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access BarclaysAccount Solutions","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access BarclaysAccount Solutions","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access BarclaysAccount Solutions","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access BarclaysAccount Solutions","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access BarclaysAccount Solutions","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your Home Equity Line of Credit application","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your Home Equity Line of Credit application","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your Home Equity Line of Credit application","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your Home Equity Line of Credit application","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access our Consumer Loan Status Portal","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access our Consumer Loan Status Portal","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access our Consumer Loan Status Portal","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access our Consumer Loan Status Portal","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access our Consumer Loan Status Portal","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access our Consumer Loan Status Portal","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access our Consumer Loan Status Portal","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access our Consumer Loan Status Portal","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access our Consumer Loan Status Portal","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access our Consumer Loan Status Portal","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access our Consumer Loan Status Portal","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access our Consumer Loan Status Portal","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access your Mortgage application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your Mortgage application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your Mortgage application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your Mortgage application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your Mortgage application","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your Mortgage application","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your Mortgage application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your Mortgage application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your Mortgage application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your Mortgage application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your Mortgage application","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your Mortgage application","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access your Buying and Refinancing inquiry","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your Buying and Refinancing inquiry","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your Buying and Refinancing inquiry","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your Buying and Refinancing inquiry","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your Buying and Refinancing inquiry","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your Buying and Refinancing inquiry","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your Buying and Refinancing inquiry","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your Buying and Refinancing inquiry","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your Buying and Refinancing inquiry","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your Buying and Refinancing inquiry","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your Buying and Refinancing inquiry","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your Buying and Refinancing inquiry","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access your Mortgage Pre-qualification estimate","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your Mortgage Pre-qualification estimate","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your Mortgage Pre-qualification estimate","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your Mortgage Pre-qualification estimate","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your Mortgage Pre-qualification estimate","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your Mortgage Pre-qualification estimate","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your Mortgage Pre-qualification estimate","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your Mortgage Pre-qualification estimate","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your Mortgage Pre-qualification estimate","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your Mortgage Pre-qualification estimate","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your Mortgage Pre-qualification estimate","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your Mortgage Pre-qualification estimate","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access your HELOAN application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your HELOAN application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your HELOAN application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your HELOAN application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your HELOAN application","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your HELOAN application","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your HELOAN application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your HELOAN application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your HELOAN application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your HELOAN application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your HELOAN application","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your HELOAN application","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access your Preferred Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your Preferred Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your Preferred Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your Preferred Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your Preferred Line of Credit application","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your Preferred Line of Credit application","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your Preferred Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your Preferred Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your Preferred Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your Preferred Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your Preferred Line of Credit application","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your Preferred Line of Credit application","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access your Auto Loan application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your Auto Loan application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your Auto Loan application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your Auto Loan application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your Auto Loan application","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your Auto Loan application","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your Auto Loan application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your Auto Loan application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your Auto Loan application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your Auto Loan application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your Auto Loan application","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your Auto Loan application","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access your Deposit Secured Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your Deposit Secured Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your Deposit Secured Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your Deposit Secured Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your Deposit Secured Line of Credit application","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your Deposit Secured Line of Credit application","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your Deposit Secured Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your Deposit Secured Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your Deposit Secured Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your Deposit Secured Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your Deposit Secured Line of Credit application","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your Deposit Secured Line of Credit application","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access your Savings Secured Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your Savings Secured Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your Savings Secured Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your Savings Secured Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your Savings Secured Line of Credit application","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your Savings Secured Line of Credit application","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your Savings Secured Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your Savings Secured Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your Savings Secured Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your Savings Secured Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your Savings Secured Line of Credit application","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your Savings Secured Line of Credit application","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your Home Equity Line of Credit application","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your Home Equity Line of Credit application","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your Home Equity Line of Credit application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your Home Equity Line of Credit application","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your Home Equity Line of Credit application","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access My Offer Tracker","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access My Offer Tracker","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access My Offer Tracker","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access My Offer Tracker","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access My Offer Tracker","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access My Offer Tracker","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access My Offer Tracker","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access My Offer Tracker","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access My Offer Tracker","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access My Offer Tracker","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access My Offer Tracker","description":"Log in to Online Banking","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access My Offer Tracker","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-14761-657-760-1476.","note":""},"rcifDown":{"heading":"Access your application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericIError":{"heading":"Access your application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericUError":{"heading":"Access your application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"genericTError":{"heading":"Access your application","description":"We can\u2019t locate that page right now.","prompt":"","subprompt":"This could be because the system returned an unexpected error or is temporarily unable to process your request. Please try again later.","note":""},"notOnFile":{"heading":"Access your application","description":"Reset your Online Banking password","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"notOnFile-RU":{"heading":"Access your application","description":"Retrieve your Online Banking username","body":"We can\u2019t find an account matching the information you provided.","bodyInTile":"If you think you entered your information incorrectly, you can try again.","bodyBeneathTile":"Need help? Visit any branch location during business hours or call us at 1-657-760-1476.","tryAgainButtonEnabled":true},"noTargetsInRCIF":{"heading":"Access your application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"If you recently updated your profile information, it may take a few days for the change to process in our system. Please try again later.","bodyBneathTile":"","tryAgainButtonEnabled":false},"tmxRejectForSelfService":{"heading":"Access your application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"lockedFromSelfService":{"heading":"Access your application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""},"accountNotActiveForSelfService":{"heading":"Access your application","description":"We can\u2019t complete your request right now.","body":"It looks like your account may not be eligible for online access at this time.","bodyInTile":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","bodyBeneathTile":""}},"lockoutStep":{"badCreds":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity."},"badSecurityQuestion":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"If you can\u2019t remember your online account information or think you may have entered it incorrectly, you may be able to restore access by resetting your security questions.","cta":{"text":"Reset security questions","href":"/"},"subprompt":"We\u2019ll first confirm your account and verify your identity. ","note":"Please note: If you are a business owner and your username was created by a company assigned administrator, you will have to contact your company administrator to rest your user account."},"badOTC":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"You may be able to restore access by resetting your password.","cta":{"text":"Reset password","href":"/reset-password"},"subprompt":"We\u2019ll first confirm your account and verify your identity. "},"passwordExpired":{"heading":"Access your application","description":"Log in using your Online Banking username","prompt":"Your temporary password has expired.","subprompt":"If you are currently on the phone with a Barclays Banker, you can request a new temporary password. If not, please try your password reset again.","cta":{"text":"Reset password","href":"/reset-password"}},"fiDisabled":{"heading":"Account locked","description":"For your security, we\u2019ve locked your online account to prevent unauthorized access.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476.","cta":{"text":"Reset password","href":"/reset-password"}},"badFPData":{"heading":"Account locked","description":"It looks like your account may not be eligible for online access at this time.","prompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476","cta":{"text":"Reset password","href":"/reset-password"}},"accountNotActive":{"heading":"Access your application","description":"We can\'t complete your request right now.","prompt":"It looks like your account may not be eligible for online access at this time.","subprompt":"For help, visit a Barclaysbranch or call us at 1-657-760-1476