PageSourceSearch

https://maktabkhooneh.org/_nuxt/aSfC-4VD.js

js maktabkhooneh.org collected 2026-09-24 10:05:44 UTC 14,899 bytes, 2 lines download raw bytes

1import{_ as j}from"./CrZwRRPN.js";import{d as P,$ as J,j as $,a0 as W,c as T,p as A,o as f,u as t,q as x,r as X,a as g,y as V,l as c,A as F,a6 as q,aG as Y,Z as R,aj as G,S as Z,aa as N,N as L,k as h,t as I,z as H,F as ee,m as se,n as te,_ as z,e as U,ac as C,H as B,G as M,I as K,ap as oe,Q as ae,aq as ne,O as le,P as re}from"./BHR2SXiT.js";import{_ as E,p as de,e as ie}from"./CTUETP0I.js";import{_ as Q}from"./_yufcFR_.js";import{n as ue,d as pe,o as ce}from"./BvbixIeG.js";import{d as me,b as fe,c as _e}from"./CtUL6UkP.js";import{_ as ye,a as be}from"./CMkpjkgP.js";import{_ as ge}from"./7Q4EjnLr.js";import{a as he}from"./pYhbs1cJ.js";import"./Dqtw0Roq.js";import"./BrCRJHDW.js";import"./Bv5n_oNE.js";import"./BpAYdCVG.js";try{(function(){var _=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new _.Error().stack;s&&(_._sentryDebugIds=_._sentryDebugIds||{},_._sentryDebugIds[s]="2d576c2a-6752-468b-a6cc-04cfd736f18b",_._sentryDebugIdIdentifier="sentry-dbid-2d576c2a-6752-468b-a6cc-04cfd736f18b")})()}catch{}const ve=P({__name:"dashboardPasswordInput",props:J({label:{default:""},id:{default:"input"}},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(_){const s=$(!1),l=W(_,"modelValue"),m=T(()=>`general-eye-${s.value?"visible":"slash-visible"}`);return(r,o)=>{const n=F,u=E;return f(),A(u,{id:r.id,modelValue:l.value,"onUpdate:modelValue":o[1]||(o[1]=e=>l.value=e),type:t(s)?"text":"password",label:r.label,"input-class":"english !text-left",class:"flex-col"},{extra:x(()=>[l.value?(f(),g("span",{key:0,class:"absolute right-10 top-1/2 -translate-y-1/2 z-10 cursor-pointer",onClick:o[0]||(o[0]=e=>s.value=!t(s))},[c(n,{size:24,name:t(m)},null,8,["name"])])):V("",!0)]),error:x(()=>[X(r.$slots,"error")]),_:3},8,["id","modelValue","type","label"])}}}),we=Object.assign(ve,{__name:"DashboardPasswordInput"}),$e={class:"p-20 sm:px-56"},xe={class:"text-center"},Ve={class:"text-lightgrey list-disc text-tiny p-5 pr-10"},Ie=P({__name:"dashboardResetPasswordModal",props:{isOpen:{type:Boolean}},emits:["close"],setup(_,{emit:s}){const l=s,m=q(),{csrfToken:r}=Y(m),o=R(),n=$(!1),u=$([{title:"حداقل 6 کارکتر باشد",regex:/^.{6,}$/,pass:!1},{title:"حداقل یک کاراکتر خاص شامل (~!@#$%^&*) داشته باشد",regex:/^(?=.*[~!@#$%^&*]).{6,}$/,pass:!1},{title:"حداقل یک حرف بزرگ یا کوچک داشته باشد",regex:/^(?=.*[A-Za-z]).{6,}$/,pass:!1}]);let e=G({oldPassword:"",newPassword:"",repeatPassword:""});Z(()=>e.newPassword,i=>{u.value.forEach((a,d)=>{i.match(a.regex)?u.value[d].pass=!0:u.value[d].pass=!1})});function y(){const i=u.value.find(a=>!a.pass);if(i)return i.title;if(e.newPassword!==e.repeatPassword)return"تکرار رمز عبور همخوانی ندارد";if(o.studentInfo.has_user_set_password&&!e.oldPassword.trim())return"رمز عبور قبلی خود را وارد کنید";if(e.oldPassword.trim()===e.newPassword.trim())return"رمز عبور نمی تواند همان رمز عبور قبلی باشد"}const v=N(),{$api:b}=L();async function p(){const i=y();if(i)return v.error(i);n.value=!0;try{const a="recaptcha-token",d=o.studentInfo.phone_confirmation&&o.studentInfo.phone_num?o.studentInfo.phone_num:o.studentInfo.email_confirmation&&o.studentInfo.email?o.studentInfo.email:"",k=C({"last-password":e.oldPassword,"new-password":e.newPassword,"edit-repeat":e.repeatPassword}),S=C({csrfmiddlewaretoken:B("csrftoken").value||r.value,tessera:d,hidden_username:d,password:e.newPassword,"g-recaptcha-response":a});if(await ue(b,k),(await me(b,S)).status!=="success")return v.error("تغییر رمز عبور با مشکل مواجه شد");v.success("تغییر رمز عبور با موفقیت انجام شد"),e={newPassword:"",oldPassword:"",repeatPassword:""},l("close")}catch(a){const d=a;typeof d.response?._data=="string"?v.error(d.response._data):v.error("تغییر رمز عبور با مشکل مواجه شد")}finally{n.value=!1}}return(i,a)=>{const d=j,k=we,S=z,D=Q;return i.isOpen?(f(),A(D,{key:0,title:"","has-close":"","right-closable":!1,class:"reset-password !top-0 bottom-0 !p-0 sm:!px-20","modal-main-class":"reset-password__modal-box rounded-none sm:rounded-lg !m-0 sm:!mx-10 !p-15 sm:!p-32","outside-closeable":!1,onClose:a[3]||(a[3]=w=>i.$emit("close"))},{content:x(()=>[h("div",$e,[c(d,{"is-loading":t(n)},null,8,["is-loading"]),h("h2",xe,I(t(o).studentInfo.has_user_set_password?"تغییر":"تنظیم")+" رمز عبور ",1),h("form",{class:"flex flex-col gap-12 mt-10",onSubmit:H(p,["prevent"])},[t(o).studentInfo.has_user_set_password?(f(),A(k,{key:0,id:"old-password-input",modelValue:t(e).oldPassword,"onUpdate:modelValue":a[0]||(a[0]=w=>t(e).oldPassword=w),label:"رمز عبور فعلی"},null,8,["modelValue"])):V("",!0),c(k,{id:"new-password-input",modelValue:t(e).newPassword,"onUpdate:modelValue":a[1]||(a[1]=w=>t(e).newPassword=w),label:"رمز عبور جدید"},{error:x(()=>[h("ul",Ve,[(f(!0),g(ee,null,se(t(u),(w,O)=>(f(),g("li",{key:O,class:te({"reset-password__input--pass":w.pass})},I(w.title),3))),128))])]),_:1},8,["modelValue"]),c(k,{id:"repeat-password-input",modelValue:t(e).repeatPassword,"onUpdate:modelValue":a[2]||(a[2]=w=>t(e).repeatPassword=w),label:"تکرار رمز عبور جدید"},null,8,["modelValue"]),c(S,{"is-full":"",class:"mt-10 h-[31px]"},{default:x(()=>[U(I(t(o).studentInfo.has_user_set_password?"تغییر":"تنظیم")+" رمز عبور ",1)]),_:1})],32)])]),_:1})):V("",!0)}}}),ke=Object.assign(M(Ie,[["__scopeId","data-v-53e69e85"]]),{__name:"DashboardResetPasswordModal"}),Pe={key:0,class:"text-red justify-start text-right"},Se={key:1,class:"text-red justify-start text-right"},Ae=P({__name:"dashboardChangeAuthStep",props:{type:{},defaultValue:{default:""}},emits:["set-step","set-tessera"],setup(_,{emit:s}){const l=_,m=$(""),r=$(""),o=$(!1),n=$(!0);Z(()=>r.value,b=>{const p={email:ie,phone:de};n.value=!ne(b,p[l.type])},{immediate:!0}),K(()=>{r.value=l.defaultValue,l.defaultValue?m.value=l.type==="email"?"ویرایش ایمیل":"ویرایش شماره Ù
1‡Ù…راه":m.value=l.type==="email"?"ایمیل خود را وارد کنید":"شماره همراه خود را وارد کنید"});const u=s,{$api:e}=L(),y=N();async function v(){if(n.value)return;const b=l.type==="phone"?"phone_num":"email";try{const p=C({[b]:r.value});await pe(e,p),u("set-step",1),u("set-tessera",r.value)}catch(p){const i=p,{melli_code:a}=i.response?._data||{};a&&a.length&&a.includes("student with this کد ملی already exists.")&&y.error("کد ملی وارد شده در حساب کاربری دیگری تعریف شده است.");const d=l.type==="email"?"آدرس ایمیل":"شماره همراه";i.response?._data[b]&&i.response?._data[b][0].includes("already exists")&&y.error(`${d} وارد شده قبلا در اکانت دیگری ثبت شده است.`)}}return(b,p)=>{const i=E,a=z;return f(),g("form",{class:"flex flex-col gap-15",onSubmit:H(v,["prevent"])},[c(i,{id:"tessera",modelValue:t(r),"onUpdate:modelValue":p[0]||(p[0]=d=>ae(r)?r.value=d:null),class:"flex-col gap-4","input-class":"!text-left",label:t(m),"has-blur":"",onBlur:p[1]||(p[1]=d=>o.value=!0)},oe({_:2},[t(n)&&t(o)?{name:"error",fn:x(()=>[b.type==="email"?(f(),g("p",Pe," فرمت ایمیل وارد شده صحیح نمی‌باشد ")):(f(),g("p",Se," فرمت شماره موبایل وارد شده صحیح نمی‌باشد "))]),key:"0"}:void 0]),1032,["modelValue","label"]),c(a,{"is-full":"",class:"h-32",disabled:t(n)},{default:x(()=>p[2]||(p[2]=[U("دریافت کد تایید",-1)])),_:1,__:[2]},8,["disabled"])],32)}}}),Ce=Object.assign(Ae,{__name:"DashboardChangeAuthStep"}),Me={class:"p-20 sm:px-0"},De={class:"text-center text-lg font-normal"},Te={class:"flex flex-col gap-12 mt-10"},Re=P({__name:"dashboardVerifyAuthStep",props:{type:{},tessera:{}},emits:["close"],setup(_,{emit:s}){const l=_,m=q(),r=R(),{$api:o}=L(),n=N(),u=$(!1),e={"invalid-code":"کد وارد شده صحیح نمی‌ باشد.","time-out":"کد وارد شده منقضی شده است. کد جدیدی درخواست کنید.","too-soon":"زمان کافی از ارسال کد قبلی نگذشته است.",other:"خطایی رخ داد. دوباره امتحان کنید."},y=G({value:"",error:!1}),v=le("optRetry");async function b(){u.value=!0;try{const a=await fe(o,C({csrfmiddlewaretoken:B("csrftoken").value||m.csrfToken,tessera:l.tessera}));y.value="";const d=a.message;if(a.status!=="success"||d!=="new-code"&&e[d])return n.error(d!=="new-code"?e[d]:e.other);d==="new-code"&&(n.success("کد جدید صادر شد."),y.value="",v.value?.handleResetCounter())}catch{n.error(e.other)}finally{u.value=!1}}K(()=>{b()});const p=s;async function i(){u.value=!0;try{const a=await _e(o,C({csrfmiddlewaretoken:B("csrftoken").value||m.csrfToken,tessera:l.tessera,code:y.value,process:"login"}));if(a.status!=="success"||e[a.message])return y.error=!0,n.error(e[a.message]||e.other);const d=await ce(o);r.studentInfo=d,p("close"),n.success(`${l.type==="email"?"ایمیل":"شماره همراه"} با موفقیت تغییر کرد`)}catch{y.error=!0,n.error(e.other)}finally{u.value=!1}}return(a,d)=>{const k=j,S=ye,D=z,w=be;return f(),g("div",Me,[c(k,{"is-loading":t(u),overlay:""},null,8,["is-loading"]),h("h3",De,I(a.type==="email"?`کد تایید 6 رقمی ارسال شده برای ایمیل ${a.tessera} را در کادر زیر وارد کنید.`:`کد تایید 6 رقمی ارسال شده برای شماره ${a.tessera} را در کادر زیر وارد
2              کنید.`),1),h("div",Te,[c(S,{modelValue:t(y).value,"onUpdate:modelValue":d[0]||(d[0]=O=>t(y).value=O),class:"mt-20","custom-class":"justify-center sm:gap-8","auto-focus":"",error:t(y).error?"کد احزار هویت نادرست است":"",onCompleted:i},null,8,["modelValue","error"]),d[1]||(d[1]=h("p",{class:"text-base mt-10 text-center"},"مدت اعتبار کد 5 دقیقه می باشد",-1)),c(D,{"is-full":"",onClick:i},{default:x(()=>[U(" تایید "+I(a.type==="email"?"ایمیل":"شماره همراه"),1)]),_:1}),c(w,{ref:"optRetry",class:"text-center",onSendVerifyCode:b},null,512)])])}}}),Oe=Object.assign(M(Re,[["__scopeId","data-v-80677d31"]]),{__name:"DashboardVerifyAuthStep"}),Be={class:"px-20 sm:px-48 py-24 mt-64 sm:mt-0"},je=P({__name:"dashboardChangeAuthModal",props:{isOpen:{type:Boolean},type:{},step:{default:0},tessera:{}},emits:["close","change-step","set-tessera"],setup(_){const s=_,l=R(),m=T(()=>s.type==="email"?l.studentInfo.user?.email||"":l.studentInfo.phone_num||""),r=T(()=>s.step===0?Ce:Oe);return(o,n)=>{const u=Q;return o.isOpen?(f(),A(u,{key:0,title:"","has-close":"","right-closable":!1,class:"change-auth-modal !top-0 bottom-0 !p-0 sm:!px-20","modal-main-class":"change-auth-modal__box rounded-none sm:rounded-lg !m-0 sm:!mx-10 !p-15 sm:!p-32","outside-closeable":!1,onClose:n[3]||(n[3]=e=>o.$emit("close"))},{content:x(()=>[h("div",Be,[(f(),A(re(t(r)),{type:o.type==="phone"?"phone":"email","default-value":t(m),tessera:o.tessera,onClose:n[0]||(n[0]=e=>o.$emit("close")),onSetStep:n[1]||(n[1]=e=>o.$emit("change-step",e)),onSetTessera:n[2]||(n[2]=e=>o.$emit("set-tessera",e))},null,40,["type","default-value","tessera"]))])]),_:1})):V("",!0)}}}),Ne=Object.assign(M(je,[["__scopeId","data-v-5fad9941"]]),{__name:"DashboardChangeAuthModal"}),Le={class:"account-setting relative w-full"},ze={class:"flex items-center gap-8"},Ue={key:0,class:"text-tiny flex items-center gap-2 text-blue"},Ee={key:0,class:"text-tiny"}
2,Fe=P({__name:"dashboardAccountInput",props:{type:{default:""},defaultValue:{default:""},confirmed:{type:Boolean,default:!1},label:{default:""},editable:{type:Boolean,default:!0},id:{default:"accountInput"}},emits:["set-tessera-modal"],setup(_){return(s,l)=>{const m=F,r=E;return f(),g("div",Le,[c(r,{id:s.id,class:"setting-form-input setting-form-input--disabled flex-col gap-4 w-full","wrapper-class":"w-full","input-class":`${s.editable&&"setting-form-input__main"} !text-left`,label:s.label,disabled:"","model-value":s.defaultValue},{label:x(()=>[h("div",ze,[h("span",null,I(s.label),1),s.confirmed?(f(),g("div",Ue,[l[2]||(l[2]=h("span",null," تایید شده ",-1)),c(m,{size:12,stroke:t(he),name:"landing-roadmap-purchased"},null,8,["stroke"])])):V("",!0)])]),error:x(()=>[s.type!=="password"&&s.confirmed?(f(),g("span",Ee,"(در صورت تغییر، باید "+I(s.label)+" جدید را تایید نمایید.)",1)):s.type!=="password"&&s.defaultValue&&!s.confirmed?(f(),g("span",{key:1,class:"text-tiny text-blue underline cursor-pointer",onClick:l[0]||(l[0]=o=>s.$emit("set-tessera-modal",{type:s.type,tesseraValue:s.defaultValue,step:1}))},"تایید "+I(s.label),1)):V("",!0)]),_:1},8,["id","input-class","label","model-value"]),s.editable?(f(),g("button",{key:0,class:"account-setting__edit absolute",onClick:l[1]||(l[1]=o=>s.$emit("set-tessera-modal",{type:s.type,tesseraValue:s.defaultValue,step:0}))},[c(m,{name:s.defaultValue?"profile-edit-pen":"profile-plus",stroke:t(ge),size:16},null,8,["name","stroke"])])):V("",!0)])}}}),qe=Object.assign(M(Fe,[["__scopeId","data-v-fcec5a1a"]]),{__name:"DashboardAccountInput"}),Ge={class:"flex-1 px-10 py-12 md:px-20 w-0"},Ze={key:0,class:"text-dark font-semibold pb-32"},He={class:"setting-form flex flex-col max-w-7xl gap-32 mt-15 pb-32 mx-auto"},Ke={class:"flex flex-col gap-24 px-12 md:px-24 md:flex-row md:gap-15"},Qe=P({__name:"account-settings",setup(_){const s=R(),l=T(()=>!s.studentInfo.user),m=$(""),r=$(null),o=$(0);function n({type:u,tesseraValue:e,step:y}){o.value=y,r.value=u,m.value=e}return(u,e)=>{const y=j,v=ke,b=Ne,p=qe;return f(),g("section",Ge,[u.$device.isMobile?V("",!0):(f(),g("h2",Ze," تنظیمات حساب کاربری ")),h("div",He,[c(y,{"is-loading":t(l),overlay:"","z-index":10},null,8,["is-loading"]),c(v,{"is-open":t(r)==="password",onClose:e[0]||(e[0]=i=>r.value=null)},null,8,["is-open"]),c(b,{type:t(r)?t(r):"email","is-open":t(r)==="email"||t(r)==="phone",tessera:t(m)||"",step:t(o),onClose:e[1]||(e[1]=i=>r.value=null),onSetTessera:e[2]||(e[2]=i=>m.value=i),onChangeStep:e[3]||(e[3]=i=>o.value=i)},null,8,["type","is-open","tessera","step"]),h("div",null,[h("div",Ke,[c(p,{id:"phone-input",type:"phone",label:"شماره همراه","default-value":t(s).studentInfo.phone_num,confirmed:t(s).studentInfo.phone_confirmation,onSetTesseraModal:n},null,8,["default-value","confirmed"]),c(p,{id:"email-input",type:"email",label:"آدرس ایمیل","default-value":t(s).studentInfo.email,confirmed:t(s).studentInfo.email_confirmation,onSetTesseraModal:n},null,8,["default-value","confirmed"]),c(p,{id:"password-input",type:"password",label:"رمز عبور","default-value":"********",confirmed:!1,onSetTesseraModal:n})])])])])}}}),is=M(Qe,[["__scopeId","data-v-fc3e537c"]]);export{is 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.