1import{_ as x,u as b,a as k,r as P,b as i,c as y,e as l,w as p,d as e,t as d,g as w,h as V,S as N,B,E as $,A as C}from"./index-5cac08e5.js";import{F as T}from"./index-e3d288f0.js";import{N as E}from"./index-6e7d9dcb.js";import{h as U}from"./index-106b37ce.js";import"./use-id-0834ae0d.js";const M={class:"container w-full min-h-[100vh] bg-[var(--search-bg)]"},O={class:"w-full pl-6 pr-6 box-border flex flex-col"},S={class:"w-full flex flex-col mt-6"},F={class:"w-full flex flex-col"},I={class:"text-[var(--main-text-color)] font-semibold text-xs pl-4"},L={class:"w-full mt-2 overflow-hidden"},j={class:"w-full flex flex-col mt-4"},A={class:"text-[var(--main-text-color)] text-sm pl-4"},D={class:"w-full mt-2 overflow-hidden"},R={class:"w-full flex flex-col mt-4"},q={class:"text-[var(--main-text-color)] text-sm pl-4"},z={class:"w-full mt-2 overflow-hidden"},G={class:"w-full mt-6"},H={class:"text-black"},J={__name:"updateTransactionPassword",props:{item:{type:Object,default:()=>({topBar:0})}},setup(m){const f=b(),{t:a}=k(),_=m,o=P({form:{old_password:"",password:"",password_confirmation:""},formMsg:{old_password:a("Old Password"),password:a("New Password"),password_confirmation:a("Confirm New Password"),check_password:a("The two password inputs are inconsistent"),check_password_length:a("Please enter a 6-32 digit password")}}),u=()=>{try{if(["old_password","password","password_confirmation"].forEach(s=>{if(!o.form[s])throw new Error(o.formMsg[s])}),o.form.password.length<6||o.form.password.length>32)throw new Error(o.formMsg.check_password_length);if(o.form.password!==o.form.password_confirmation)throw new Error(o.formMsg.check_password)}catch(s){w({message:s.message,duration:2e3});return}V({forbidClick:!0}),U(o.form).then(s=>{w({message:a("Successfully modified"),duration:2e3}),c()})},c=()=>{f.back()};return(s,t)=>{const h=E,v=N,n=T,g=B;return i(),y("div",M,[l(v,null,{default:p(()=>[_.item.topBar===0?(i(),$(h,{key:0,class:"shadow",title:s.$t("Transaction Password"),placeholder:!0,"safe-area-inset-top":!0,"left-arrow":"",onClickLeft:t[0]||(t[0]=r=>c())},null,8,["title"])):C("",!0)]),_:1}),e("div",O,[e("div",S,[e("div",F,[e("div",I,d(s.$t("Old Password")),1),e("div",L,[l(n,{modelValue:o.form.old_password,"onUpdate:modelValue":t[1]||(t[1]=r=>o.form.old_password=r),type:"password",placeholder:s.$t("Old Password")},null,8,["modelValue","placeholder"])])]),e("div",j,[e("div",A,d(s.$t("New Password")),1),e("div",D,[l(n,{modelValue:o.form.password,"onUpdate:modelValue":t[2]||(t[2]=r=>o.form.password=r),type:"password",placeholder:s.$t("New Password")},null,8,["modelValue","placeholder"])])]),e("div",R,[e("div",q,d(s.$t("Confirm New Password")),1),e("div",z,[l(n,{modelValue:o.form.password_confirmation,"onUpdate:modelValue":t[3]||(t[3]=r=>o.form.password_confirmation=r),type:"password",placeholder:s.$t("Confirm New Password")},null,8,["modelValue","placeholder"])])]),e("div",G,[l(g,{onClick:u,color:"var(--btn-color)",block:""},{default:p(()=>[e("span",H,d(s.$t("Update")),1)]),_:1})])])])])}}},Z=x(J,[["__scopeId","data-v-d24b0ec3"]]);export{Z 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.