Path: blob/master/phs/ola-otpbypass/index_files/sso-verifypwd.29a2efad.js.download
996 views
"use strict";Vue.component("sso-verifypwd",{_scopeId:"data-v-24f53df4",owCSS:".sso[data-v-24f53df4]{position:relative;padding:25px;text-align:center;margin:8% auto 16px;width:372px;border-radius:4px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(0,0,0,.1)}.sso__title[data-v-24f53df4]{font-size:18px;font-weight:500;padding-bottom:8px;letter-spacing:-.4px}.sso__sub-title[data-v-24f53df4]{opacity:.5;font-size:14px;line-height:1.21;letter-spacing:-.2px}.sso__new-user__pwd-wrapper[data-v-24f53df4]{position:relative;height:48px;border-radius:4px;background-color:#fff;border:1px solid #e5e5e5}.sso__new-user__pwd-icon[data-v-24f53df4]{display:inline-block;vertical-align:middle;padding:0 14px 0 4px;font-size:16px;letter-spacing:-.3px;border-right:1px solid #ebebeb;padding-right:30px}.sso__new-user__pwd[data-v-24f53df4]{display:inline-block;vertical-align:middle;opacity:.5;font-size:16px;letter-spacing:-.3px;height:44px;border-radius:4px;background-color:#fff;border:none;width:75%;padding-left:8px;outline:none}.sso__new-user__pwd-wrapper[data-v-24f53df4]{margin-top:16px;border-radius:8px}.sso__clear-icon[data-v-24f53df4],.sso__new-user__pwd-icon[data-v-24f53df4]{padding:0;height:24px;position:relative;right:5px;width:42px}.sso__clear-icon[data-v-24f53df4]{opacity:1}.sso__cta[data-v-24f53df4]{margin-top:15px;border-radius:4px;background-color:#e6e6e6;padding:12px;cursor:pointer;color:rgba(0,0,0,.4)}.sso__cta.enabled[data-v-24f53df4]{background-color:#000;color:#cddc39}.sso__resend-pwd[data-v-24f53df4]{font-size:14px;text-align:center;color:#448dff;margin:0 auto;cursor:pointer}.sso__notice a[data-v-24f53df4]{color:#000}.sso__back[data-v-24f53df4]{position:absolute;left:20px;top:18px}.sso__back-btn[data-v-24f53df4]{width:24px;height:24px;opacity:1;cursor:pointer}.sso__clear[data-v-24f53df4]{position:absolute;width:40px;right:0;top:12px}@media screen and (max-width:500px){.sso[data-v-24f53df4]{margin:0;background:none;box-shadow:none;width:100%;padding:12px 0 0}.sso__cta[data-v-24f53df4]{border-radius:4px;z-index:10;margin:20px 8px 8px}.sso__new-user__pwd-wrapper[data-v-24f53df4]{width:94%;margin:0 auto 10px;height:46px}.sso__logo[data-v-24f53df4]{padding-bottom:12px}.sso__new-user__pwd-wrapper[data-v-24f53df4]{margin-top:20px;margin-bottom:0}.sso__resend-pwd[data-v-24f53df4]{margin:16px auto 0}.sso__back[data-v-24f53df4]{left:12px;top:12px}}",render:function(){var s=this,t=s.$createElement,e=s._self._c||t;return e("div",{staticClass:"sso__wrapper"},[e("div",{staticClass:"sso"},[s.owRegistry["sso-header"]?e("sso-header",{attrs:{hideback:!1},on:{back:s.goback}}):s._e(),s._v(" "),e("div",{staticClass:"sso__content"},[e("div",{staticClass:"sso__title"},[s._v(s._s(s.info.title))]),s._v(" "),e("div",{staticClass:"sso__sub-title"},[s._v(s._s(s.info.subtitle))]),s._v(" "),e("div",{staticClass:"sso__new-user__pwd-wrapper"},[e("ow-icon",{staticClass:"sso__new-user__pwd-icon",attrs:{name:"LOCK",width:"24",height:"24",viewbox:"0 0 24 24",fill:"#000000"}}),s._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],staticClass:"sso__new-user__pwd",attrs:{type:"password",pattern:s.mfaInfo.regex,autocomplete:"off",placeholder:"Enter Ola account password",id:"pwd"},domProps:{value:s.password},on:{keyup:function(t){if(!("button"in t)&&s._k(t.keyCode,"enter",13))return null;s.click(t)},input:function(t){t.target.composing||(s.password=t.target.value)}}}),s._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:s.password,expression:"password"}],staticClass:"sso__clear",on:{click:function(){s.password=""}}},[e("div",{staticClass:"sso__clear-icon"},[s.owRegistry["ow-icon"]?e("ow-icon",{staticClass:"sso__clear-icon",attrs:{name:"CLEAR",width:"24",height:"24",viewbox:"0 0 24 24",opacity:"1"}}):s._e()],1)])],1)]),s._v(" "),e("ow-ajax",{attrs:{trigger:s.fetch_data,url:s.info.url,method:"POST",body:s.info.data},on:{success:s.getSuccessCB,error:s.getErrorCB}}),s._v(" "),e("div",{staticClass:"sso__cta",class:{enabled:s.enableCTA},on:{click:s.click}},[s._v(s._s(s.info.cta))])],1),s._v(" "),e("div",{staticClass:"sso__resend-pwd",on:{click:s.forgotPassword}},[s._v("\n Unable to login?\n ")]),s._v(" "),s.owRegistry["ow-top-loader"]?e("ow-top-loader",{attrs:{overlay:!0,show:s.ajaxInProgress}}):s._e()],1)},staticRenderFns:[],name:"ssoVerifypwd",data:function(){return{password:"",toast:{show:!1,type:"",content:""},verifyPwd:"dormant",triggerVerificationLink:"dormant",ajaxInProgress:!1}},props:{iframe:Boolean,verificationId:String,captcha:Object,returnurl:String,partner:Boolean,mfaInfo:Object,passwordInfo:Object,trackingParams:Object,platform:String,app_version:String},mounted:function(){var t=this;setTimeout(function(){t.$el.querySelector(".sso__new-user__pwd").focus()},500)},computed:{info:function(){return{title:"Account Password",subtitle:"Verify your password for this account",cta:"Login",url:this.partner?"/api/partner/mfa/password/verify":"/api/mfa/password/verify",data:{password:this.password,mfaId:this.mfaInfo&&this.mfaInfo.mfaId,verificationId:this.verificationId,platform:this.platform,app_version:this.app_version,captchaInfo:{fingerPrint:this.captcha.fingerPrint,storageId:this.captcha.storageId},liteParams:window.params}}},enableCTA:function(){return this.password&&8<=this.password.length}},methods:{click:function(){this.mfaInfo&&(new RegExp(this.mfaInfo.regex).test(this.password1)?(this.fetch_data="fire",this.ajaxInProgress=!0):(this.toast={show:!0,type:"warning",content:"Please enter a valid password"},this.$emit("showtoast",this.toast)));this.sendGAEvent&&this.sendGAEvent("SSO","verify_pwd_clicked"),this.trackEvent&&(this.trackingParams.newUser=this.newUser,this.trackEvent({eventName:"verify_pwd_clicked",eventValue:this.trackingParams}))},forgotPassword:function(){this.$emit("setstate",{screen:"forgotpassword"})},goback:function(){this.$emit("screen","login"),this.captcha.gcaptcha="",this.captcha.reset=!0,this.$emit("setstate",{captcha:this.captcha}),this.sendGAEvent&&this.sendGAEvent("SSO","back_button_verify_pwd_page"),this.trackEvent&&this.trackEvent({eventName:"back_button_verify_pwd_page",eventValue:this.trackingParams})},getSuccessCB:function(t){t.response&&(t.response.data&&t.response.data.status&&"success"===t.response.data.status.toLowerCase()?this.partner?this.$emit("setstate",{screen:"permission",partnerInfo:t.response.data.partnerInfo}):this.returnurl?this.returnurl&&-1<window.owConfig.domainList.indexOf(this.extractHostname(this.returnurl))?window.location.href=this.returnurl:this.toast={show:!0,type:"warning",content:"Invalid domain"}:this.iframe&&parent.postMessage(t.response&&t.response.data,"*"):t.response.error&&t.response.error.status&&"failure"===t.response.error.status.toLowerCase()&&(this.toast={show:!0,type:"warning",content:t.response.error.message},t.response.error&&701===t.response.error.status?(this.$emit("screen","signup"),this.$emit("setstate",{email:""})):this.password="")),this.$emit("showtoast",this.toast),this.$set(this,"fetch_data","dormant"),this.ajaxInProgress=!1},getErrorCB:function(){}}}); //# sourceMappingURL=../sourcemap/components/sso-verifypwd.29a2efad.js.map