PageSourceSearch

https://partner.inbank.lv/_nuxt/Bk3trGht.js

js inbank.lv collected 2026-10-08 12:10:06 UTC 3,587 bytes, 1 lines download raw bytes

1import{B as b}from"./-E_N7wPZ.js";import{o as h}from"./BBJR_hzU.js";import{_ as f,z as _,o as p,c as g,a as e,t as o,e as P,w as n,d as c,y as S,q as v,b as i,p as w,U as k,a$ as y,aA as C,f as E,u as V}from"./CzrXd7wh.js";import{_ as $,a as M,g as B}from"./DNRj_HJY.js";import"./ZET11PUr.js";import"./D0QyccKN.js";import"./CBNW12IZ.js";const N=2,D={name:"PasswordCreatePage",components:{NewPasswordInput:$,InbButton:h},setup(){const{$t:s}=E();V({title:s("createPassword.title")})},data(){return{password:"",passwordConfirm:"",showPwStrength:!1,passwordStrength:0,reset_password_token:null,pwMatch:!0,submitErrors:[]}},computed:{isSubmitDisabled(){return this.passwordStrength<N||!this.pwMatch}},watch:{password(){this.checkPasswordStrength(),this.checkPasswordMatch()},passwordConfirm(){this.checkPasswordMatch()}},mounted(){this.reset_password_token=(this._.provides[C]||this.$route).query.reset_password_token},methods:{checkPasswordStrength(){this.showPwStrength=!!this.password.length,this.passwordStrength=B(this.password)},checkPasswordMatch(){this.pwMatch=!!(this.password.length&&this.passwordConfirm.length&&this.password===this.passwordConfirm)},getProgressClass(){return M(this.passwordStrength)},async submitPassword(){try{await k.createPassword({reset_password_token:this.reset_password_token,password:this.password}),this.$router.push(this.$localePath({name:"login"}))}catch(s){this.submitErrors=y(this.$t,this.submitErrors,s)}}}},R={role:"main",class:"p-2"},U={class:"login-block frame my-4 py-4 px-3"},A={class:"text-center mb-4","data-testid":"pp-password-create-header-form"},I={id:"modal-login-tabContent",class:"tab-content my-3"},T={id:"password-container",class:"tab-pane fade show active",role:"tabpanel","aria-labelledby":"password-tab"},q={class:"form-group"},z={class:"form-group"};function H(s,a,L,j,t,d){const m=b,l=_("new-password-input"),u=h;return p(),g("main",R,[e("div",U,[e("h4",A,o(s.$t("createPassword.label.header")),1),t.submitErrors.length?(p(),P(m,{key:0,variant:"danger","model-value":!0,"data-testid":"pp-password-create-div-error-message"},{default:n(()=>[c(o(s.$t("password.create.error")),1)]),_:1})):S("",!0),e("div",I,[e("div",T,[e("form",{class:"px-2",onSubmit:a[2]||(a[2]=v(r=>d.submitPassword(),["prevent"]))},[e("div",q,[i(l,{modelValue:t.password,"onUpdate:modelValue":a[0]||(a[0]=r=>t.password=r),label:s.$t("createPassword.label.password"),placeholder:s.$t("createPassword.label.password"),"data-test-id":{label:"pp-password-create-field-placeholder-password",input:"pp-password-create-field-password"}},null,8,["modelValue","label","placeholder"])]),e("div",z,[i(l,{modelValue:t.passwordConfirm,"onUpdate:modelValue":a[1]||(a[1]=r=>t.passwordConfirm=r),"param-id":"confirm-password",label:s.$t("createPassword.label.confirmPassword"),placeholder:s.$t("createPassword.label.confirmPassword"),"data-test-id":{label:"pp-password-create-field-placeholder-password-confirmation",input:"pp-password-create-field-password-confirmation"},"show-tip":!1},null,8,["modelValue","label","placeholder"]),e("div",{class:w(["invalid-feedback",{show:!t.pwMatch&&t.passwordStrength>1}]),"data-testid":"pp-password-create-div-password-validation-error"},o(s.$t("createPassword.label.ensurePasswordMatch")),3)]),i(u,{type:"submit",variant:"primary",class:w(["btn-block mt-4 js-submit",{disabled:d.isSubmitDisabled}]),disabled:d.isSubmitDisabled,"data-testid":"pp-password-create-button-submit"},{default:n(()=>[c(o(s.$t("createPassword.buttons.submit")),1)]),_:1},8,["disabled","class"])],32)])])])])}const K=f(D,[["render",H]]);export{K as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.