PageSourceSearch

https://clipo.ai/assets/ChangePasswordPage-CJtqq5-6.js

js clipo.ai collected 2026-10-05 11:55:45 UTC 3,344 bytes, 2 lines download raw bytes

1import{a as _,w as C,x as k,z as G,bk as D,r as M,c as T,bl as V,j as s,K as q,M as z,k as m,X as x,T as B,F as g,n as L,e as R,bm as U,m as h,l as A,aB as H,t as f,D as K}from"./index-aREvobyF.js";import{P as N}from"./PasswordValidationGuide-DX_Oo0B2.js";import{P as O}from"./PageMetaHeader-6lUw-EYb.js";import{P as i}from"./password-input-CxfYkeLY.js";import{u as Q}from"./usePasswordValidate-DHkPXInF.js";import"./input-group-DnK3Ig9p.js";import"./input-element-D7gNC_RA.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="38146cf4-0dd9-46c4-92a8-2dc1248c73e6",e._sentryDebugIdIdentifier="sentry-dbid-38146cf4-0dd9-46c4-92a8-2dc1248c73e6")}catch{}const es=()=>{const e=_(),{data:a}=C(k.unauthorized.userInfo),o=(a==null?void 0:a.user_role)==="student",{register:r,handleSubmit:b,watch:c}=G({reValidateMode:"onChange",defaultValues:{old_password:"",password:"",confirmPassword:""}});D();const d=c("password"),u=c("confirmPassword"),{validEqual:j,validForm:y,validLength:P,validPassword:S}=Q({newPassword:d,confirmPassword:u}),[l,p]=M.useState(null),w=r("old_password"),{mutate:F,isPending:E}=T({mutationFn:({requestBody:t})=>V.appsUsersApiChangePassword({requestBody:t})}),I=t=>{F({requestBody:{old_password:t.old_password,password:t.password}},{onSuccess:()=>{f.create({title:"비밀번호가 변경되었습니다.",type:"success"}),e("..",{replace:!0})},onError:v=>{f.create({title:K(v),type:"error"}),p("비밀번호가 일치하지 않습니다.")}})};return s.jsx(q,{maxWidth:z,px:0,children:s.jsxs(m,{px:4,as:"form",rowGap:0,onSubmit:b(I),children:[s.jsx(O,{title:"비밀번호 변경",description:`${o?"학생":"선생님"}의 클리포 비밀번호를 변경할 수 있습니다.`}),s.jsxs(x,{w:"full",alignItems:"flex-start",rowGap:5,children:[s.jsxs(m,{w:"full",p:6,borderRadius:"xl",bg:"white",rowGap:5,boxShadow:"sm",children:[s.jsx(B,{textStyle:"t4-semibold-compact",children:"비밀번호 입력"}),s.jsxs(x,{w:"full",alignItems:"flex-start",rowGap:3,children:[s.jsx(n,{label:"현재 비밀번호",invalid:!!l,errorText:l,children:s.jsx(i,{type:"password",placeholder:"현재 비밀번호를 입력해 주세요.",...w,onChange:t=>{w.onChange(t),l&&p(null)}})}),s.jsx(n,{label:"변경 비밀번호",children:s.jsx(i,{type:"password",placeholder:"변경할 비밀번호를 입력해 주세요.",...r("password"),width:"100%"})}),s.jsx(n,{label:"비밀번호 재입력",children:s.jsx(i,{type:"password",placeholder:"비밀번호 재입력",...r("confirmPassword"),width:"100%"})})]}),s.jsx(g,{children:s.jsx(N,{validLength:P,validForm:y,validEqual:j&&!!d,newPassword:d,confirmPassword:u})})]}),s.jsxs(L,{circle:!0,type:"submit",size:"lg",disabled:!S,loading:E,width:{base:"full",md:"fit-content"},alignSelf:"end",children:[s.jsx(R,{as:U,boxSize:5}),"비밀번호 변경"]})]})]})})},n=({label:e,children:a,invalid:o,errorText:r})=>s.jsxs(g,{as:h,flexDir:"row",alignItems:"center",columnGap:3,invalid:o,children:[s.jsx(A,{w:"7rem",textStyle:"b1-medium-compact",flexShrink:0,...r&&{mb:"1.5rem"},children:e}),s.jsxs(h,{direction:"column",flex:1,children:[a,r&&s.jsx(H,{mt:1.5,children:r})]})]});export{es as default};
2//# sourceMappingURL=ChangePasswordPage-CJtqq5-6.js.map

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.