1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/index-Ce6mdmka.js","static/js/vendor-mui-n0zgR2W0.js","static/js/vendor-redux-Bh6RIGug.js","static/css/index-BDsF2vIL.css"])))=>i.map(i=>d[i]); 2import{j as e,a4 as t,a5 as s,P as a,ak as l}from"./vendor-mui-n0zgR2W0.js";import{I as i,T as n,B as r,u as o,r as c,z as d,h as u}from"./index.esm-BwyhmeYI.js";import{L as m}from"./index-C9BSG2nf.js";import{d as x,o as p,r as f,u as g}from"./vendor-redux-Bh6RIGug.js";import{Q as v,R as h,S as j,D as b,g as w,z as y,d as N,b as S,_,T as C,C as k,c as T,H as E}from"./index-BLiVic6c.js";import{HeaderAfterLogin as U}from"./index-BeBanmxw.js";import{T as O}from"./index-BSTjV_Vz.js";import{V as I}from"./index-BJuEmjUD.js";import{i as L}from"./custom-AkIOAW2S.js";import{S as P}from"./S3Upload-BkHZTS8T.js";import{ImageCropper as R}from"./index-mUnW5GDy.js";import{I as A}from"./index-BGfHRbob.js";import{S as D}from"./index-yCmGkKM0.js";import{M}from"./index-w6X_2N5u.js";import{t as z,V as $}from"./timeOut-DZXw-80n.js";import{a as F}from"./addDeleteGetSessionStorage-Bk1mXItP.js";import{D as V}from"./index-CRf8nciO.js";import{A as q,a as B}from"./index-WInWSY5m.js";import{A as H,a as G}from"./index-D6Sddi1u.js";import{S as Y}from"./index-wm1QYNkA.js";import{F as Q}from"./FeaturedReviews-6Zso5Yj1.js";import{S as W}from"./index-DoFxId8L.js";import{S as J}from"./slick-ByM2JZ_n.js";/* empty css */import"./vendor-networking-C9Tr2w_g.js";import"./vendor-react-B2yXjvnQ.js";import"./useDepartments-CL0Q18Ka.js";import"./index-CB1fIqCx.js";import"./index-zx6w-Wd1.js";import"./socket-DOmb_TIS.js";import"./index-BsCKmbD-.js";import"./index-Ddzh_RNb.js";import"./index-D3SHXhES.js";import"./index-6y2jgl2W.js";import"./AdapterDayjs-D6ZOYnKZ.js";import"./index-BY2XNFDL.js";const X=({closepopup:t})=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"justify-center items-center flex overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none sm:p-4 w-fit h-fit m-auto",children:e.jsx("div",{className:"relative w-auto my-auto mx-auto max-w-400 min-w-[400px] sm:min-w-full sm:my-0",children:e.jsx("div",{className:"border-0 shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none",children:e.jsxs("div",{className:"p-6 relative",children:[e.jsx("button",{className:"w-6 h-6 ml-auto bg-transparent border-0 text-black opacity-75 float-right text-3xl leading-none font-semibold outline-none focus:outline-none absolute right-0 top-0 mt-3 mr-3",onClick:()=>t(!1),children:e.jsx(i,{src:"images/modal_close.svg",alt:"close"})}),e.jsx(n,{className:"font-proximanova text-black_900 mb-3",variant:"h4",as:"h3",children:"Thank you."}),e.jsxs(n,{className:"font-proximanova text-black_900 mb-6",variant:"body1",as:"p",children:["If you need to review this video again, you can find it at any time under"," ",e.jsx("span",{className:"font-semibold",children:"Video Resources"}),"."]}),e.jsx(r,{className:"ease-linear transition-all duration-150 w-full",variant:"FillRed900",size:"md",onClick:()=>t(!1),children:"Got it"})]})})})}),e.jsx("div",{className:"opacity-25 fixed inset-0 z-40 bg-black",onClick:()=>t(!1)})]}),Z=({closepopupVerifi:t,mobileNo:s,countryCode:a,setVerfiedIcon:l})=>{const{t:c}=o(),[d,u]=x.useState(""),[m,g]=x.useState(""),[v,h]=x.useState(!1),[_,C]=x.useState(30),[k,T]=x.useState(!1),E=p();return f.useEffect(()=>{z(e=>{T(e)},e=>{C(e)})},[v]),f.useEffect(()=>{let e=F(j.CHANGE_OTP,null,"get","single");E(b(e))},[]),e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"justify-center items-center flex overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none sm:p-4 w-fit h-fit m-auto",children:e.jsx("div",{className:"relative w-auto my-auto mx-auto max-w-560 min-w-[560px] sm:min-w-full",children:e.jsx("div",{className:"border-0 shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none",children:e.jsxs("div",{className:"p-6 relative",children:[e.jsx("button",{className:"p-1 ml-auto bg-transparent border-0 text-black opacity-75 float-right text-3xl leading-none font-semibold outline-none focus:outline-none absolute right-0 top-0 mt-3 mr-3",onClick:()=>t(!1),children:e.jsx(i,{src:"images/img_close_black_900.svg",alt:"close"})}),e.jsx(n,{className:"font-proximanova text-black_900 mb-3",variant:"h3",as:"h3",children:c("verification")}),e.jsxs(n,{className:"font-proximanova text-black_900 mb-4",variant:"body1",as:"p",children:[c("weHaveSentTheVerificationCodeToYourMobileNumber")," (",s,")."]}),e.jsxs("div",{className:"flex flex-col font-proximanova items-center justify-start mt-[25px] w-full",children:[e.jsx("div",{className:"flex sm:flex-col flex-row gap-[33px] items-center justify-between w-full",children:e.jsx($,{valueInp:d,error:m,onChange:e=>{u(e),g("")}})}),e.jsxs("div",{className:"flex flex-row items-center justify-between mt-[23px] w-full",children:[e.jsxs("div",{className:"flex items-center justify-start",children:[e.jsx(n,{className:"font-semibold text-gray_600 font-proximanova",variant:"body1",children:c("didntReceivedTheCode_QuestionMark")}),k?e.jsx(n,{className:"font-semibold text-gray_600 cursor-pointer font-proximanova mx-2",variant:"body1",onClick:()=>(async()=>{T(!k),h(!v);let e=y.TUTOR.Edit_Profile_Send_Otp,t={countryCode:a,mobileNo:s},l=await w("post",e,t,{},!0,!0);"SUCCESS"===l.status?E(N({isOpen:!0,state:"success",message:l.message})):E(N({isOpen:!0,state:"error",message:l.message}))})(),children:c("resend")}):""]}),_>0?e.jsx("div",{className:"flex flex-col items-center justify-end",children:e.jsxs(n,{className:"font-semibold text-black_900 text-right font-proximanova",variant:"body1",children:["00 : ",_<10&&0,_]})}):null]}),e.jsx(r,{className:"common-pointer cursor-pointer font-semibold text-base text-center text-white_A700 w-full mt-[40px]",size:"md",variant:"FillRed900",onClick:()=>(async()=>
2{if(E(S(!0)),d.length<4)g("Please enter 4 digit OTP"),E(S(!1));else{let e=y.TUTOR.Edit_Profile_Verify_Otp,i={mobileNo:s,otp:d.toString(),countryCode:a};E(b(d)),F(j.CHANGE_OTP,d.toString(),"add","single");let n=await w("post",e,i,{},!0,!0);"SUCCESS"===n.status?(l(!0),E(N({isOpen:!0,state:"success",message:n.message})),E(S(!1)),t(!1)):(E(N({isOpen:!0,state:"error",message:n.message})),E(S(!1)))}})(),children:c("verify")})]})]})})})}),e.jsx("div",{className:"opacity-25 fixed inset-0 z-40 bg-black",onClick:()=>t(!1)})]})},K=f.lazy(()=>_(()=>import("./index-Ce6mdmka.js"),__vite__mapDeps([0,1,2,3]))),ee=({closepopup:t})=>{const{t:s}=o(),[a,l]=x.useState(!1),[d,u]=x.useState([]);let[m,g]=x.useState([]);const[v,h]=x.useState(),[j,b]=x.useState(""),[_,C]=x.useState(""),[k,T]=x.useState(""),[E,U]=x.useState(""),[O,I]=x.useState(""),[L,P]=x.useState(""),[R,z]=x.useState(""),$=p(),[F,V]=x.useState(!1),[q,B]=x.useState(""),[H,G]=x.useState(!1),[Y,Q]=x.useState(""),[W,J]=x.useState(!1),[X,ee]=x.useState(""),[te,se]=x.useState(!1),[ae,le]=x.useState(""),[ie,ne]=x.useState(!1),[re,oe]=x.useState(""),[ce,de]=x.useState(!1),[ue,me]=x.useState(""),[xe,pe]=x.useState(!1),[fe,ge]=x.useState(""),ve=async()=>{if($(S(!0)),(()=>{let e=!1;return""===j&&(V(!0),B("Please enter first name"),e=!0),""===_&&(G(!0),Q("Please enter last name"),e=!0),""===E&&(J(!0),ee("Please enter mobile number"),e=!0),E&&E.length<10&&(J(!0),ee("Please enter valid mobile number"),e=!0),""===O&&(se(!0),le("Please enter email"),e=!0),O&&(/\S+@\S+\.\S+/.test(O)?c(O)&&(le("Please enter a valid email ID"),e=!0):(le("Please enter a valid email address"),se(!0),e=!0)),""===L&&(ne(!0),oe("Please enter profile tagline"),e=!0),""===R&&(de(!0),me("Please enter description"),e=!0),0===m.length&&(pe(!0),ge("Please select language"),e=!0),e})())return void $(S(!1));let e=y.TUTOR.Tutor_Edit_UpdateDetails,s={firstName:j,lastName:_,countryCode:k,mobileNo:E,profileTagline:L,description:R,languageId:m},a=await w("put",e,s,{},!0,!0);"SUCCESS"===a.status?($(N({message:null==a?void 0:a.message,status:"success",isOpen:!0})),$(S(!1)),t(!1)):($(N({message:null==a?void 0:a.message,status:"error",isOpen:!0})),$(S(!1)))};f.useEffect(()=>{(async()=>{var e;const t=y.COMMON.Tutor_Common_listing("language");let s=await w("get",t,{},{},!1,!1);u(null==(e=s.data)?void 0:e.map(e=>({value:e.id,label:e.name})))})(),(async()=>{var e,t,s,a,l,i,n,r;let o=y.TUTOR.Tutor_Edit_GetDetails,c=await w("get",o,{},{},!0,!1);"SUCCESS"===c.status&&(b(null==(e=null==c?void 0:c.data)?void 0:e.firstName),C(null==(t=null==c?void 0:c.data)?void 0:t.lastName),U(null==(s=null==c?void 0:c.data)?void 0:s.mobileNo),I(null==(a=null==c?void 0:c.data)?void 0:a.email),T(null==(l=null==c?void 0:c.data)?void 0:l.countryCode),P(null==(i=null==c?void 0:c.data)?void 0:i.profileTagline),z(null==(n=null==c?void 0:c.data)?void 0:n.description),g(null==(r=null==c?void 0:c.data)?void 0:r.userLanguages.map(e=>e.languageId)))})()},[]);return x.useEffect(()=>(!0===v?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden"),()=>{document.body.classList.remove("overflow-hidden")}),[v]),f.useEffect(()=>{const e=e=>{"Escape"===e.key&&h(!1)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[]),e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"justify-center items-center flex overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none sm:items-start sm:p-4 w-fit h-fit m-auto",children:e.jsx("div",{className:"relative w-auto my-auto mx-auto w-[560px] sm:w-full max-w-560 sm:min-w-full sm:my-0",children:e.jsx("div",{className:"border-0 shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none",children:e.jsxs("div",{className:"p-7 relative",children:[e.jsx(n,{className:"font-proximanova text-black_900 mb-1",variant:"h3",as:"h3",children:s("profile")}),e.jsx(n,{className:"font-proximanova text-black_900 mb-5",variant:"body1",as:"p",children:s("ifYouWantToEdit/UpdateInfoHereYouCanUpdate")}),e.jsxs("div",{className:"flex flex-row sm:grid sm:grid-cols-1 sm:gap-0 gap-5",children:[e.jsx(A,{label:"First Name",value:j,error:F,errorText:q,onChange:e=>{b(e.target.value),V(!1),B("")},required:!0}),e.jsx(A,{label:"Last Name",required:!0,error:H,errorText:Y,value:_,onCh
2ange:e=>{C(e.target.value),G(!1),Q("")}})]}),e.jsxs("div",{className:"flex flex-row sm:grid sm:grid-cols-1 sm:gap-0 gap-5",children:[e.jsx(M,{label:"Mobile Number",value:E,error:W,errorText:X,menuItemValue:k,onChange:e=>{U(e.target.value),J(!1),ee("")},required:!0,suffix:a?e.jsx(i,{src:"images/check_circle.svg",className:"w-6 h-6 my-4 absolute right-2 cursor-pointer",alt:"check circle"}):e.jsx(n,{className:"text-teal_500 text-[12px] my-5 absolute right-2 cursor-pointer",onClick:async()=>{h(!0);let e=y.TUTOR.Edit_Profile_Send_Otp,t={countryCode:k,mobileNo:E},s=await w("post",e,t,{},!0,!0);"SUCCESS"===s.status?$(N({message:null==s?void 0:s.message,status:"success",isOpen:!0})):$(N({message:null==s?void 0:s.message,status:"error",isOpen:!0}))},children:s("verify")})}),e.jsx(A,{label:s("emailAddress"),required:!0,value:O,error:te,errorText:ae,onChange:e=>{I(e.target.value),se(!1),le("")},suffix:e.jsx(i,{src:"images/check_circle.svg",className:"w-6 h-6 my-4 absolute right-2 cursor-pointer",alt:"check circle"})})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx(A,{label:"Your profile tagline/quote",required:!0,value:L,error:ie,errorText:re,onChange:e=>{P(e.target.value),ne(!1),oe("")}}),e.jsx(f.Suspense,{fallback:e.jsx("div",{className:"h-32 bg-gray-100 animate-pulse rounded"}),children:e.jsx(K,{label:"About you",required:!0,error:ce,errorText:ue,value:R,handleEditorChange:e=>{z(e),de(!1),me("")}})}),e.jsxs("div",{className:"relative mt-6",children:[e.jsx(D,{label:"Selected Spoken Languages",multiple:!0,error:xe,errorText:fe,options:d,value:m,onChange:e=>{m=e.target.value,g(m),pe(!1),ge("")}}),e.jsx("div",{className:"flex flex-row items-center justify-start mt-[0px] w-full gap-2 sm:flex-wrap",children:m.map((t,s)=>{var a;return e.jsx(r,{className:"cursor-pointer flex h-6 items-center justify-center w-auto px-2",rightIcon:e.jsx(i,{src:"images/img_close.svg",className:"ml-2 w-4 h-4",alt:"close",onClick:()=>{g(m.filter(e=>e!==t))}}),size:"md",variant:"FillLightblue50",children:e.jsx("div",{className:"font-normal text-black_900 text-left text-xs",children:null==(a=d.find(e=>e.value===t))?void 0:a.label})},`selectedOptions-${s}`)})})]})]}),e.jsx("button",{className:"w-6 h-6 ml-auto bg-transparent border-0 text-black opacity-75 float-right text-3xl leading-none font-semibold outline-none focus:outline-none absolute right-0 top-0 mt-3 mr-3",onClick:()=>t(!1),children:e.jsx(i,{src:"images/modal_close.svg",alt:"close"})}),e.jsx(r,{className:"mt-6 ease-linear transition-all duration-150 w-full",variant:"FillRed900",size:"md",onClick:()=>ve(),children:s("save")})]})})})}),e.jsx("div",{className:"opacity-25 fixed inset-0 z-40 bg-black",onClick:()=>t(!1)}),v&&e.jsx(Z,{closepopupVerifi:()=>h(!1),mobileNo:E,countryCode:k,setVerfiedIcon:l})]})},te=({qualification:t,getQualificationListing:s})=>{const a=p(),{t:l}=o(),[i,c]=x.useState([]),[d,u]=x.useState(null),[m]=x.useState(!1),[g,v]=x.useState(!1);let[h,j]=x.useState(!1);const b=async e=>{a(S(!0));const t=y.TUTOR_AUTH.Tutor_Qualification_Add,l=await w("post",t,{type:"delete",id:e},{},!0,!0);l.status,a(N({isOpen:!0,state:"SUCCESS"===l.status?"success":"error",message:l.message})),"SUCCESS"===l.status&&await s(),a(S(!1))};return x.useEffect(()=>{(async()=>{const e=y.COMMON.Tutor_Common_listing("qualification");let t=await w("get",e,{},{},!1,!1);c(null==t?void 0:t.data)})()},[]),x.useEffect(()=>{null==t||t.length},[t]),x.useEffect(()=>(g?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden"),()=>{document.body.classList.remove("overflow-hidden")}),[g]),f.useEffect(()=>{if(!t||0===t.length)return void j(!1);const e=[];t.forEach(t=>{"active"===(null==t?void 0:t.status)&&e.push(t)}),1===(null==e?void 0:e.length)?j(!0):j(!1)},[t]),x.useEffect(()=>{const e=e=>{"Escape"===e.key&&v(!1)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative w-full pb-6 sm:w-full",children:[e.jsx(n,{className:"font-semibold pt-5 text-black_900",as:"h5",variant:"h5",children:l("qual
2ification")}),null==t?void 0:t.map((a,l)=>e.jsx(q,{Qualification:a.options,Science:a.subject,Year:`${a.startYear} to ${""!==a.completedYear?a.completedYear:"Present"}`,gradePersent:a.grade,item:a,qualificationList:i,canDelete:t.length>1&&("pending"===(null==a?void 0:a.status)||("active"!==(null==a?void 0:a.status)||!h)),aboutqualification:m,qualification:t,getList:s,showPending:"pending"===(null==a?void 0:a.status),handleDelete:b,handleEdit:()=>{u(a),v(!0)}},a.id||`qualification-${l}`)),e.jsxs(r,{className:"cursor-pointer w-[150px] font-semibold text-center mt-[20px]",size:"sm",variant:"OutlineBlack900",onClick:()=>{v(!0),u(null)},children:["+ ",l("addQualification")]})]}),!0===g?e.jsx(B,{closepopup:()=>v(!1),qualification:t,editQualificationData:d,qualificationList:i,getQualifications:async()=>{await s(),a(S(!1)),v(!1)}}):null]})},se=({getAllTutorSubjects:t})=>{const{t:s}=o(),a=p(),[l,i]=x.useState(!1),[c,d]=x.useState([]),[u,m]=x.useState([]),[f,g]=x.useState([]);let[v,h]=x.useState(!1);const[j,b]=x.useState(null),S=async()=>{var e;const t=await w("get",y.TUTOR_AUTH.Tutor_Subject_Get+"?type=signup",{},{},!0,!0,!1);if("SUCCESS"===(null==t?void 0:t.status)){g(null==t?void 0:t.data);const s=[];null==(e=null==t?void 0:t.data)||e.map(e=>{"active"===(null==e?void 0:e.status)&&s.push(e)}),1===(null==s?void 0:s.length)&&h("active"===s[0].status)}};return x.useEffect(()=>{(async()=>{var e;const t=y.COMMON.Tutor_Common_listing("category"),s=(null==(e=(await w("get",t,{},{},!1,!1)).data)?void 0:e.filter(e=>0===e.categoryId||null===e.categoryId))||[];let a=(null==s?void 0:s.map(e=>({value:e.id,label:e.name})))||[];d(a)})(),(async()=>{var e;const t=y.COMMON.Tutor_Common_listing("level"),s=(null==(e=(await w("get",t,{},{},!1,!1)).data)?void 0:e.map(e=>({value:e.id,label:e.name})))||[];m(s)})(),S()},[]),x.useEffect(()=>(l?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden"),()=>{document.body.classList.remove("overflow-hidden")}),[l]),x.useEffect(()=>{const e=e=>{"Escape"===e.key&&i(!1)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative w-full w-full pb-6 sm:w-full",children:[e.jsx(n,{className:"font-semibold pt-5 text-black_900",as:"h5",variant:"h5",children:s("subjects")}),null==f?void 0:f.map((s,l)=>e.jsx(H,{Subject:`${null==s?void 0:s.subjectName} (${null==s?void 0:s.categoryName})`,labelText:null==s?void 0:s.userLevels.map(e=>e.levelName).join(", "),itemId:s.id,showPending:"pending"===(null==s?void 0:s.status),handleDeleteSubject:e=>(async e=>{i(!1);const s=await w("post",y.TUTOR_AUTH.Tutor_Subject_Add_Update,{type:"delete",id:e},{},!0,!0);a(N({isOpen:!0,state:"SUCCESS"===s.status?"success":"error",message:s.message})),"SUCCESS"===s.status&&(t(),S())})(e),canDelete:f.length>1&&("pending"===(null==s?void 0:s.status)||("active"!==(null==s?void 0:s.status)||!v)),handleEditSubject:e=>{b(null==f?void 0:f.find(t=>t.id===e)),i(!0)}},`Subject-${l}`)),e.jsxs(r,{className:"cursor-pointer font-semibold text-center w-[150px] mt-[20px]",size:"sm",variant:"OutlineBlack900",onClick:()=>{i(!0),b(null)},children:["+ ",s("addSubjects")]})]}),!0===l?e.jsx(G,{closepopup:i,CategorisedSubjects:c,SubjectLevels:u,editSubject:j,getAllSubjects:()=>{i(!1),t(),S()}}):null]})},ae=({closepopupVerifi:t,setVerfiedIconEmail:s,email:a})=>{const{t:l}=o(),[c,d]=x.useState(""),[u,m]=x.useState(""),[g,v]=x.useState(!1),[h,_]=x.useState(30),[C,k]=x.useState(!1),T=p();return f.useEffect(()=>{z(e=>{k(e)},e=>{_(e)})},[g]),f.useEffect(()=>{let e=F(j.CHANGE_OTP,null,"get","single");T(b(e))},[]),e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"justify-center items-center flex overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none sm:p-4 w-fit h-fit m-auto",children:e.jsx("div",{className:"relative w-auto my-auto mx-auto max-w-560 min-w-[560px] sm:min-w-full",children:e.jsx("div",{className:"border-0 shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none",children:e.jsxs("div",{className:"p-6 relative",children:[e.jsx("button",{className:"p-1 ml-auto bg-transparent border-0 text-black opacity-75 float-right text-3xl leading-none font-semibold outline-none focus:outline-none absolute right-0 top-0 mt-3 mr-3",onClick:()=>t(!1),children:e.jsx(i,{src:"images/img_close_black_900.svg",alt:"close"})}),e.jsx(n,{className:"font-proximanova text-black_900 mb-3",variant:"h3",as:"h3",children:l("verification")}),e.jsxs(n,{className:"font-proximanova text-black_900 mb-4",variant:"body1",as:"p",children:[l("weHaveSentTheVerificationCodeToYour")," (",a,")."]}),e.jsxs("div",{className:"flex flex-col font-proximanova items-center justify-start mt-[25px] w-full",children:[e.jsx("div",{className:"flex sm:flex-col flex-row gap-[33px] items-center justify-between w-full",children:e.jsx($,{valueInp:c,error:u,onChange:e=>{d(e),m("")}})}),e.jsxs("div",{className:"flex flex-row items-center justify-between mt-[23px] w-full",children:[e.jsxs("div",{className:"flex items-center justify-start",children:[e.jsx(n,{className:"font-semibold text-gray_600 font-proximanova",variant:"body1",children:l("didntReceivedTheCode_QuestionMark")}),C?e.jsx(n,{className:"font-semibold text-gray_600 cursor-pointer font-proximanova mx-2",variant:"body1",onClick:()=>(async()=>{k(!C),v(!g);let e=y.TUTOR_AUTH.Tutor_Register,t={email:a},s=await w("post",e,t,{},!0,!0);"SUCCESS"===s.status?T(N({isOpen:!0,state:"success",message:s.message})):T(N({isOpen:!0,state:"error",message:s.message}))})(),children:l("resend")}):""]}),h>0?e.jsx("div",{className:"flex flex-col items-center justify-end",children:e.jsxs(n,{className:"font-semibold text-black_900 text-right font-proximanova",variant:"body1",children:["00 : ",h<10&&0,h]})}):null]}),e.jsx(r,{className:"common-pointer cursor-pointer font-semibold text-base text-center text-white_A700 w-full mt-[40px]",size:"md",variant:"FillRed900",onClick:()=>(async()=>
2{if(T(S(!0)),c.length<4)m("Please enter 4 digit OTP"),T(S(!1));else{let e=y.TUTOR.Tutor_Profile_Verify_Email,l={otp:c.toString(),email:a};T(b(c)),F(j.CHANGE_OTP,c.toString(),"add","single");let i=await w("post",e,l,{},!0,!0);"SUCCESS"===i.status?(s(!0),T(N({isOpen:!0,state:"success",message:i.message})),T(S(!1)),t(!1)):(T(N({isOpen:!0,state:"error",message:i.message})),T(S(!1)))}})(),children:l("verify")})]})]})})})}),e.jsx("div",{className:"opacity-25 fixed inset-0 z-40 bg-black",onClick:()=>t(!1)})]})},le=/^https?:\/\/(www\.)?linkedin\.com\/.+/i,ie=/^https?:\/\/(www\.)?instagram\.com\/.+/i,ne=({userData:t,getProfileDetails:s})=>{const{t:a}=o(),l=p(),[,d]=x.useState(!1),[u,m]=x.useState(!0),[g,v]=x.useState([]),[h,j]=x.useState(),[b,_]=x.useState(),[T,E]=x.useState(""),[U,O]=x.useState(""),[I,L]=x.useState(""),[P,R]=x.useState(""),[D,z]=x.useState(""),[$,F]=x.useState(""),[V,q]=x.useState(""),[B,H]=x.useState(""),[G,Q]=x.useState(""),[W,J]=x.useState([]),[X,K]=x.useState(null),[ee,te]=x.useState(!1),[se,ne]=x.useState(""),[re,oe]=x.useState(!1),[ce,de]=x.useState(""),[ue,me]=x.useState(!1),[xe,pe]=x.useState(""),[fe,ge]=x.useState(!1),[ve,he]=x.useState(""),[je,be]=x.useState(!1),[we,ye]=x.useState(""),[Ne,Se]=x.useState(!1),[_e,Ce]=x.useState(""),[ke,Te]=x.useState(!1),[Ee,Ue]=x.useState(""),[Oe,Ie]=x.useState(!1),[Le,Pe]=x.useState(""),[Re,Ae]=x.useState("");let[De,Me]=x.useState([]);t&&t!==X&&(K(t),((e=!0)=>{var s;t&&e&&(E((null==t?void 0:t.firstName)||""),O((null==t?void 0:t.lastName)||""),R(((null==t?void 0:t.countryCode)||"")+((null==t?void 0:t.mobileNo)||"")),z((null==t?void 0:t.email)||""),L((null==t?void 0:t.countryCode)||""),F((null==t?void 0:t.profileTagline)||""),q((null==t?void 0:t.description)||""),H((null==t?void 0:t.linkedinUrl)||""),Q((null==t?void 0:t.instagramUrl)||""),Me((null==(s=null==t?void 0:t.userLanguages)?void 0:s.map(e=>e.languageId))||[]),d(1===(null==t?void 0:t.ismobileVerified)))})(!0));const ze=async()=>{if(l(S(!0)),(()=>{let e=!1;return""===T&&(te(!0),ne("Please enter first name"),e=!0),""===U&&(oe(!0),de("Please enter last name"),e=!0),""===P.substring(null==I?void 0:I.length,null==P?void 0:P.length)&&(me(!0),pe("Please enter mobile number"),e=!0),P.substring(null==I?void 0:I.length,null==P?void 0:P.length)&&(P.substring(null==I?void 0:I.length,null==P?void 0:P.length).length<6||P.substring(null==I?void 0:I.length,null==P?void 0:P.length).length>12)&&(me(!0),pe("Please enter valid mobile number"),e=!0),""===D&&(ge(!0),he("Please enter email"),e=!0),D&&(/\S+@\S+\.\S+/.test(D)?c(D)&&(he("Please enter a valid email ID"),e=!0):(he("Please enter a valid email address"),ge(!0),e=!0)),""===$&&(be(!0),ye("Please enter profile tagline"),e=!0),""===V&&(Se(!0),Ce("Please enter description"),e=!0),""===B||le.test(B)||(Te(!0),Ue("Please enter a valid LinkedIn profile URL"),e=!0),""===G||ie.test(G)||(Ie(!0),Pe("Please enter a valid Instagram profile URL"),e=!0),De&&0!==De.length||(Ae("Please select atleast one language"),e=!0),e})())return void l(S(!1));let e=y.TUTOR.Tutor_Edit_UpdateDetails,t={firstName:T,lastName:U,countryCode:I,mobileNo:P.substring(null==I?void 0:I.length,null==P?void 0:P.length),profileTagline:$,description:V,linkedinUrl:B,instagramUrl:G,languageId:De},a=await w("put",e,t,{},!0,!0);"SUCCESS"===a.status?(l(N({message:null==a?void 0:a.message,status:"success",isOpen:!0})),l(S(!1)),await C(),l(k()),s()):(l(N({message:null==a?void 0:a.message,status:"error",isOpen:!0})),l(S(!1)))};return f.useEffect(()=>{let e=!0;return(async()=>{var s,a;const l=y.COMMON.Tutor_Common_listing("language");let i=await w("get",l,{},{},!1,!1);e&&v(null==(s=i.data)?void 0:s.map(e=>({value:e.id,label:e.name})));const n=y.TUTOR.Tutor_Country_Code,r=await w("get",n,{},{},!1,!0);if(e&&"SUCCESS"===r.status){const e=null==(a=null==r?void 0:r.data)?void 0:a.map(e=>({item:null==e?void 0:e.countryCode,id:null==e?void 0:e.id}));L(null==t?void 0:t.countryCode),J(e)}})(),()=>{e=!1}},[]),f.useEffect(()=>(h||b?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden"),()=>{document.body.classList.remove("overflow-hidden")}),[h,b]),f.useEffect(()=>{const e=e=>{"Escape"===e.key&&(j(!1),_(!1))};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[]),e.jsx(e.Fragment,{children:e.jsxs("div",{className:"relative w-full pb-6 sm:w-full",children:[e.jsx(n,{className:"font-semibold pt-5 text-black_900",as:"h5",variant:"h5",children:a("profile")}),e.jsx(n,{className:"font-proximanova text-black_900 mb-5",variant:"body1",as:"p",children:a("ifYouWantToEdit/UpdateInfoHereYouCanUpdate")}),e.jsxs("div",{className:"flex flex-row sm:grid sm:grid-cols-1 sm:gap-0 gap-5",children:[e.jsx(A,{label:"First Name",value:T,error:ee,errorText:se,onChange:e=>{E(e.target.value),te(!1),ne("")},required:!0}),e.jsx(A,{label:"Last Name",required:!0,error:re,errorText:ce,value:U,onChange:e=>{O(e.target.value),oe(!1),de("")}})]}),e.jsxs("div",{className:"flex flex-row sm:grid sm:grid-cols-1 sm:gap-0 gap-5",children:[e.jsx(M,{label:"Mobile Number",countryCode:I,setCountryCode:L,setMobileNo:R,setMobileNoError:pe,value:P,required:!1,countryCodes:W,error:ue,errorText:xe}),e.jsx(A,{label:a("emailAddress"),required:!0,value:D,error:fe,errorText:ve,onChange:e=>{z(e.target.value),ge(!1),he(""),m(!1)},suffix:u?e.jsx(i,{src:"images/check_circle.svg",className:"w-6 h-6 my-4 absolute right-2 cursor-pointer",alt:"check circle"}):e.jsx(n,{className:"text-teal_500 text-[12px] my-5 absolute right-2 cursor-pointer",onClick:async()=>{_(!0);let e=y.TUTOR_AUTH.Tutor_Register,t={email:D},s=await w("post",e,t,{},!0,!0);"SUCCESS"===s.status?l(N({isOpen:!0,message:null==s?void 0:s.message,state:"success"})):l(N({isOpen:!0,message:null==s?void 0:s.message,state:"error"}))},children:a("verify")})})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx(A,{label:"Your profile tagline/quote",required:!0,value:$,error:je,errorText:we,inputProps:{maxLength:100},onChange:e=>{F(e.target.value),be(!1),ye("")},rightCount:((null==$?void 0:$.length)||0)+"/100"}),e.jsx(A,{error:Ne,errorText:_e,value:V,inputProps:{maxLength:500},onChange:e=>{q(e.target.value.trimStart()),Se(!1),Ce("")},multiline:!0,rows:4,label:"A brief summary of who you are and your experience",rightCount:((null==V?void 0:V.length)||0)+"/500"}),e.jsx(A,{error:ke,errorText:Ee,value:B,type:"url",onChange:e=>{H(e.target.value.trim()),Te(!1),Ue("")},label:"LinkedIn profile (optional)",placeholder:"https://www.linkedin.com/in/your-name"}),e.jsx(A,{error:Oe,errorText:Le,value:G,type:"url",onChange:e=>{Q(e.target.value.trim()),Ie(!1),Pe("")},label:"Instagram profile (optional)",placeholder:"https://www.instagram.com/your-name"}),e.jsxs("div",{className:"relative mt-0",children:[e.jsx(Y,{label:"Selected Spoken Languages",multiple:!0,errorText:Re,error:""!==Re,options:g,value:De,onChange:e=>{De=e.target.value,Me(De),Ae("")}}),e.jsx("div",{className:"flex flex-row items-center justify-start mt-[0px] w-full gap-2 sm:flex-wrap",children:De.map((t,s)=>{var a;return e.jsx(r,{className:"cursor-pointer flex h-6 items-center justify-center w-auto px-2",rightIcon:e.jsx(i,{src:"images/img_close.svg",className:"ml-2 w-4 h-4",alt:"close",onClick:()=>{Me(De.filter(e=>e!==t))}}),size:"md",variant:"FillLightblue50",children:e.jsx("div",{className:"font-normal text-black_900 text-left text-xs",children:null==(a=g.find(e=>e.value===t))?void 0:a.label})},`selectedOptions-${s}`)})})]})]}),e.jsx(r,{className:"mt-6 ease-linear transition-all duration-150 w-[120px]",variant:"FillRed900",size:"md",onClick:()=>ze(),children:a("save")}),h&&e.jsx(Z,{closepopupVerifi:()=>j(!1),mobileNo:P,countryCode:I,setVerfiedIcon:d}),b&&e.jsx(ae,{closepopupVerifi:()=>_(!1),email:D,setVerfiedIconEmail:m})]})})},re=({documents:t})=>{const{t:s}=o(),[a,l]=x.useState([]),[r,c]=x.useState([]),[d,u]=x.useState(!1),[m,f]=x.use
2State([]),g=p();let[v,h]=x.useState(""),[j,b]=x.useState(!1),[_,C]=x.useState("");const k=async(e,t)=>{g(S(!0));let s=[];s=[...r];const i=[...a],n=e.split(";")[0].split("/")[1],o=`${Math.floor(1e5+9e5*Math.random())}_${(new Date).getTime()}.${n}`,d=await P(e,o,t);if("SUCCESS"===d.status){let e=await w("post",y.TUTOR.ADD_CRIMINAL_DOCUMENT,{file:null==d?void 0:d.url},{},!0,!0);"SUCCESS"===e.status?(i.push({url:null==d?void 0:d.url,type:n}),s.push({url:null==d?void 0:d.url,type:n}),l(i),c(s),5!==i.length&&(document.getElementById("criminal").value=""),g(N({isOpen:!0,state:"success",message:null==e?void 0:e.message})),g(S(!1))):(g(N({isOpen:!0,state:"error",message:null==e?void 0:e.message})),g(S(!1)))}else g(N({isOpen:!0,state:"error",message:null==d?void 0:d.message})),g(S(!1))};return x.useEffect(()=>{t&&l(t.filter(e=>"criminal"===e.docType).map(e=>{const t=e.filePath.split(".").pop();return{url:e.filePath,type:t}}))},[t]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative w-full w-full pb-6 sm:w-full",children:[e.jsx(n,{className:"font-semibold pt-5 mb-4 text-black_900",as:"h5",variant:"h5",children:"Documents"}),e.jsx(n,{className:"font-semibold text-black_900 mb-[10px]",as:"h6",variant:"body2",children:"Disclosure and Barring Service"}),5!==a.length?e.jsxs("label",{className:"flex bg-gray_50_01 p-5 w-full mb-[10px] sm:items-start cursor-pointer",children:[e.jsx(i,{src:"images/img_carbonimagecopy.svg",alt:"rectangle2209",className:"w-8 h-10 mr-3"}),e.jsxs("div",{className:"",children:[e.jsx(n,{className:"font-semibold text-black_900",as:"h6",variant:"body2",children:s("uploadDocuments")}),e.jsx(n,{className:"font-normal text-gray_600",as:"span",variant:"body3",children:s("uploadImageInJPEG_JPG_PNG_PDFFormat")})]}),e.jsx("input",{type:"file",id:"criminal",className:"hidden",onChange:e=>{(async(e,t)=>{const s=[...a],l=e.target.files[0];let i=!0,n="";if(["image/jpeg","image/jpg","image/png","application/pdf"].includes(l.type)?l.size>5242880?(n+="File "+l.name+" exceeds the maximum file size.",i=!1):s.length>=5&&(n+="Cannot add more than 5 files.",i=!1):(n+="Invalid file format for "+l.name,i=!1),!i)return void g(N({isOpen:!0,state:"error",message:n}));const r=await L([l]);"application/pdf"===l.type?k(r,t):(h(r),b(!0),C(t))})(e,"criminal")},accept:".jpg,.jpeg,.png,.pdf"})]}):null,e.jsx("div",{className:"sm:flex-wrap flex-row gap-3 flex items-center justify-start mb-[10px] w-full",children:a.length>0?a.map((t,s)=>e.jsx("div",{className:"relative w-20 h-20 md:h-[90px] md:w-[90px]",children:"pdf"!==(null==t?void 0:t.type)?e.jsx(i,{src:t.url,className:"h-20 m-auto object-cover w-20",alt:"rectangle2209"}):e.jsx("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",children:e.jsx("img",{src:"images/pdf-icon.jpg",alt:"pdf",className:"h-20 m-auto object-contain w-20 md:w-full md:h-full"})})},`criminalDocuments-${s}}`)):null})]}),j?e.jsx(R,{cropperImage:v,closepopup:()=>{b(!1),document.getElementById("criminal").value=""},setCropImage:e=>{k(e.croppedImage,_),b(!1),h("")}}):null]})},oe=({userData:t,getProfileDetails:s})=>{const a=p(),l=null==t?void 0:t.videoUrl,r=async(e,t="add")=>{const l=await w("put",y.TUTOR.Tutor_Profile_Intro_Video,{videoUrl:e,type:t},{},!0,!0);"SUCCESS"===(null==l?void 0:l.status)?(s(),a(N({isOpen:!0,message:null==l?void 0:l.message,state:"success"}))):a(N({isOpen:!0,message:null==l?void 0:l.message,state:"error"})),a(S(!1))};return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"",children:[e.jsxs(n,{className:"mt-5 mb-5",variant:"h3",as:"h3",children:["Introductory Video"," ",e.jsx(n,{className:"text-gray_600 text-sm font-normal",children:"(Optional)"})]}),e.jsxs("label",{className:"flex items-center bg-gray_50_01 p-5 w-full mb-[10px] sm:items-start cursor-pointer max-w-[440px]",children:[e.jsx(i,{src:"images/img_carbonimagecopy.svg",alt:"rectangle2209",className:"w-8 h-10 mr-3"}),e.jsxs("div",{className:"",children:[e.jsx(n,{className:"font-semibold text-black_900",as:"h6",variant:"body2",children:"Upload"}),e.jsx(n,{className:"font-normal text-gray_600",as:"span",variant:"body3",children:"Upload video in MP4 format"})]}),e.jsx("input",{type:"file",className:"hidden",id:"videoID",accept:".mp4",onChange:async e=>{a(S(!0));const s=e.target.files[0];if(s){let l=[];
2if("video/mp4"!==s.type&&"video/webm"!==s.type&&l.push("Please select a video in MP4 or WEBM format."),s.size>10485760&&l.push("Video file size exceeds 10 MB."),(null==l?void 0:l.length)>0)a(N({isOpen:!0,message:l.join(", "),state:"error"})),e.target.value=null,a(S(!1));else{const l=new FileReader;l.onload=async l=>{const i=document.createElement("video");i.src=l.target.result,i.onloadedmetadata=async()=>{if(i.duration>31)a(N({isOpen:!0,message:"Video duration cannot exceed 30 seconds.",state:"error"})),e.target.value=null,a(S(!1));else{const e=l.target.result;if("video/mp4"===s.type||"video/webm"===s.type){const l=s.type.split("/")[1],i=d(t.firstName,t.lastName),n=`${Math.floor(1e5+9e5*Math.random())}-${i}.${l}`,o=await P(e,n,"intro");"SUCCESS"===o.status?r(o.url):(a(S(!1)),a(N({isOpen:!0,message:"Error uploading video. Please try again.",state:"error"})))}}}},l.readAsDataURL(s)}}else a(S(!1))}})]}),e.jsx("div",{className:"h-[214px] w-full bg-gray_FA",children:l?l&&e.jsxs("div",{className:"relative",children:[e.jsx("button",{onClick:async()=>{a(S(!0)),r("","delete"),document.getElementById("videoID").value=""},className:"absolute right-4 top-4 z-10",children:e.jsx(i,{src:"images/img_trash.svg",className:"w-5",alt:"delete icon"})}),e.jsxs("video",{className:"w-full h-[214px] max-h-[214px] mx-auto",controls:!0,children:[e.jsx("source",{src:l,type:"video/mp4"}),"Your browser does not support the video tag."]})]}):e.jsxs("div",{className:"relative flex flex-col items-center justify-center h-full",children:[e.jsx(i,{src:"images/img_carbonimagecopy.svg",alt:"rectangle2209",className:"w-24 h-32"}),e.jsx(n,{className:"font-normal text-gray_600 mt-5",as:"span",variant:"body3",children:"There Is No Introductory Video Uploaded Yet"})]})})]})})};function ce(t){const{children:s,value:a,index:l,...i}=t;return e.jsx("div",{role:"tabpanel",hidden:a!==l,id:`vertical-tabpanel-${l}`,"aria-labelledby":`vertical-tab-${l}`,...i,children:a===l&&e.jsx("div",{children:e.jsx(e.Fragment,{children:s})})})}function de(e){return{id:`vertical-tab-${e}`,"aria-controls":`vertical-tabpanel-${e}`}}ce.propTypes={children:a.node,index:a.number.isRequired,value:a.number.isRequired};const ue=({Subjects:a,getAllTutorSubjects:l,userData:r,getProfileDetails:o,qualification:c,getQualificationListing:d,documents:u,tutorEditGetDetails:m,getAllDocuments:p})=>{const[f,g]=x.useState(()=>{const e=localStorage.getItem("tutorAboutTab");return e?parseInt(e,10):0});return e.jsx(e.Fragment,{children:e.jsx("div",{className:"bg-white_A700 flex flex-col items-start justify-start w-[100%] md:w-full",children:e.jsxs("div",{className:"flex sm:flex-col flex-row gap-[0px] items-start justify-start w-full",children:[e.jsxs("div",{className:"bg-white_A700 flex flex-col gap-[0px] justify-start min-w-[22%] sm:w-full",children:[e.jsx(n,{className:"font-semibold py-5 px-5 text-black_900",as:"h5",variant:"h5",children:"About"}),e.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-start w-full vertical-tabs",children:e.jsxs(t,{orientation:"vertical",variant:"scrollable",value:f,onChange:(e,t)=>
2{g(t),localStorage.setItem("tutorAboutTab",t.toString())},"aria-label":"Vertical tabs example",className:"w-full",children:[e.jsx(s,{className:"max-w-full",label:"Profile",onClick:()=>{m()},icon:e.jsx(i,{src:"images/right-arrow.svg",alt:"rectangle2209",className:"absolute right-2"}),...de(0)}),e.jsx(s,{className:"max-w-full",label:"Qualification",onClick:()=>{d()},icon:e.jsx(i,{src:"images/right-arrow.svg",alt:"rectangle2209",className:"absolute right-2"}),...de(1)}),e.jsx(s,{className:"max-w-full",label:"Subjects",onClick:()=>{l()},icon:e.jsx(i,{src:"images/right-arrow.svg",alt:"rectangle2209",className:"absolute right-2"}),...de(2)}),e.jsx(s,{className:"max-w-full",label:"Documents",onClick:()=>{p()},icon:e.jsx(i,{src:"images/right-arrow.svg",alt:"rectangle2209",className:"absolute right-2"}),...de(3)}),e.jsx(s,{className:"max-w-full",label:"Introductory Video",icon:e.jsx(i,{src:"images/right-arrow.svg",alt:"rectangle2209",className:"absolute right-2"}),...de(4)}),e.jsx(s,{className:"max-w-full",label:"Reviews",icon:e.jsx(i,{src:"images/right-arrow.svg",alt:"rectangle2209",className:"absolute right-2"}),...de(5)})]})})]}),e.jsxs("div",{className:"flex flex-col gap-[30px] pl-[30px] pr-[30px] min-w-[78%] items-start justify-start w-full border-gray_400 border-l border-solid min-h-[384px] sm:px-5 sm:border-0",children:[e.jsx(ce,{value:f,index:0,className:"w-full",children:e.jsx(ne,{userData:r,getProfileDetails:o})}),e.jsx(ce,{value:f,index:1,className:"w-full",children:e.jsx(te,{qualification:c,getQualificationListing:d})}),e.jsx(ce,{value:f,index:2,className:"w-full",children:e.jsx(se,{Subjects:a,getAllTutorSubjects:l})}),e.jsx(ce,{value:f,index:3,className:"w-full",children:e.jsx(re,{documents:u})}),e.jsx(ce,{value:f,index:4,className:"w-full",children:e.jsx(oe,{userData:r,getProfileDetails:o})}),e.jsx(ce,{value:f,index:5,className:"w-full",children:e.jsx(Q,{userData:r,refreshUserData:o})})]})]})})})},me=({direction:t,onClick:s})=>e.jsx("button",{onClick:s,className:"absolute top-1/2 -translate-y-1/2 z-10 flex items-center justify-center w-9 h-9 rounded-full bg-white shadow-md border border-gray-200 hover:bg-gray-50 transition-colors "+("prev"===t?"-left-5":"-right-5"),children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#555",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:"prev"===t?e.jsx("polyline",{points:"15 18 9 12 15 6"}):e.jsx("polyline",{points:"9 18 15 12 9 6"})})}),xe=({review:t})=>{var s,a,l;const[n,r]=f.useState(!1),o="admin"===(null==t?void 0:t.slug)?null==t?void 0:t.reviewer_name:`${(null==(s=null==t?void 0:t.studentDetail)?void 0:s.firstName)||""} ${(null==(a=null==t?void 0:t.studentDetail)?void 0:a.lastName)||""}`.trim(),c="admin"===(null==t?void 0:t.slug)?null==t?void 0:t.reviewer_image:null==(l=null==t?void 0:t.studentDetail)?void 0:l.profile_image,d=(null==t?void 0:t.review)||"",m=d.length>160;return e.jsxs("div",{className:"bg-white rounded-xl shadow-[0_2px_12px_rgba(0,0,0,0.08)] border border-gray-100 p-5 mx-2 flex flex-col gap-3 h-full",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(i,{src:c,className:"h-11 w-11 rounded-full object-cover flex-shrink-0",type:"profile",alt:o}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-[#10231f] text-sm leading-tight",children:o}),e.jsx("p",{className:"text-xs text-gray-400 mt-0.5",children:(null==t?void 0:t.createdAt)?u(null==t?void 0:t.createdAt):""})]})]}),e.jsx("img",{src:"/images/footer-logo.png",alt:"Battersea House",className:"h-7 w-auto object-contain flex-shrink-0 opacity-80"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{star:null==t?void 0:t.rating}),e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"#1a73e8",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5l-4-4 1.41-1.41L10 13.67l6.59-6.59L18 8.5l-8 8z"})})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-600 leading-[1.6]",children:m&&!n?`${d.slice(0,160)}...`:d}),m&&e.jsx("button",{onClick:()=>r(e=>
2!e),className:"text-xs text-[#A4161A] font-medium mt-1 hover:underline",children:n?"Show less":"Read more"})]})]})},pe=[{label:"All",value:0},{label:"5 â
",value:5},{label:"4+ â
",value:4},{label:"3+ â
",value:3},{label:"2+ â
",value:2},{label:"1+ â
",value:1}],fe=({reviews:t,pagination:s,page:a,handleChangePage:i,minStars:r,refreshUserData:o,getReviews:c})=>{const d=p(),[u,m]=f.useState(!1),[x,g]=f.useState(null!=r?r:0);if(!t||0===t.length)return null;const v=x,h=0===v?t:t.filter(e=>Math.round(e.rating)>=v),j={dots:h.length>2,infinite:h.length>2,speed:400,slidesToShow:Math.min(2,h.length),slidesToScroll:1,prevArrow:e.jsx(me,{direction:"prev"}),nextArrow:e.jsx(me,{direction:"next"}),responsive:[{breakpoint:768,settings:{slidesToShow:1}}]};return e.jsx("div",{className:"bg-white_A700 flex flex-col gap-5 items-center justify-start py-6 w-full overflow-hidden md:px-4",children:e.jsxs("div",{className:"flex flex-col items-start justify-start w-full",children:[e.jsxs("div",{className:"flex items-start justify-between w-full mb-3 flex-wrap gap-3",children:[e.jsxs("div",{children:[e.jsx(n,{className:"font-semibold text-black_900",as:"h5",variant:"h5",children:"Reviews"}),e.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Only reviews meeting the minimum will appear on your public profile."})]}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:pe.map(t=>e.jsx("button",{disabled:u,onClick:()=>(async e=>{if(e===v||u)return;m(!0);const t=await w("patch",y.TUTOR.Tutor_Review_Min_Stars,{min_stars:e},{},!0,!0);m(!1),"SUCCESS"===(null==t?void 0:t.status)?(g(e),null==o||o(),null==c||c()):d(N({isOpen:!0,state:"error",message:(null==t?void 0:t.message)||"Error saving filter"}))})(t.value),className:"px-3 py-1 rounded-full text-xs font-medium border transition-colors disabled:opacity-50 "+(v===t.value?"bg-[#A4161A] text-white border-[#A4161A]":"bg-white text-gray-600 border-gray-300 hover:border-[#A4161A] hover:text-[#A4161A]"),children:t.label},t.value))})]}),0===h.length?e.jsxs("p",{className:"text-sm text-gray-400 mt-4",children:["No reviews meet the current minimum of ",v," stars."]}):1===h.length?e.jsx("div",{className:"w-full max-w-sm",children:e.jsx(xe,{review:h[0]})}):e.jsx("div",{className:"w-full max-w-3xl relative px-6",children:e.jsx(J,{...j,children:h.map((t,s)=>e.jsx("div",{className:"pb-2",children:e.jsx(xe,{review:t})},`review-${s}`))},v)}),(null==s?void 0:s.pageCount)>1&&0===v&&e.jsx("div",{className:"mt-6 flex justify-center w-full",children:e.jsx(l,{count:s.pageCount,page:a,onChange:i})})]})})},ge={premium:"bg-teal_500",executive:"bg-purple_400",standard:"bg-blue_700"};function ve(e){return{id:`simple-tab-${e}`,"aria-controls":`simple-tabpanel-${e}`}}a.node,a.number.isRequired,a.number.isRequired;const he=()=>{var a,l;const c=p(),{t:d}=o(),[u,x]=f.useState(0),[j,b]=f.useState(null),[_,A]=f.useState([]),[D,M]=f.useState(!1),[z,$]=f.useState([]),[F,q]=f.useState([]),[B,H]=f.useState(0),[G,Y]=f.useState(!1),[Q,W]=f.useState([]);let[J,Z]=f.useState(1),[K,te]=f.useState({}),[se,ae]=f.useState(!1);const le=g(T),{id:ie}=le;let[ne,re]=f.useState(""),[oe,ce]=f.useState({department:"",departmentId:0}),[de,me]=f.useState(""),[xe,pe]=f.useState(!1);const[he,je]=f.useState(!1),[be,we]=f.useState(!1),[ye,Ne]=f.useState(!1),Se=1===(null==le?void 0:le.admin_approved)&&(null==le?void 0:le.isActive)&&!(null==le?void 0:le.videoAcknowledgedAt),[_e,Ce]=f.useState(!1),[ke,Te]=f.useState(""),[Ee,Ue]=f.useState(!1),[Oe,Ie]=f.useState("");!0===D?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden");const Le=async()=>{var e,t,s,a;const l=await w("get",y.TUTOR_AUTH.Tutor_Subject_Get,{},{},!0,!0,!1);A(null==l?void 0:l.data),(null==(e=null==l?void 0:l.data)?void 0:e.length)>0?(oe={department:null==(t=null==l?void 0:l.data[0])?void 0:t.subjectName,departmentId:null==(s=null==l?void 0:l.data[0])?void 0:s.subId},ce(oe),ne=null==(a=null==l?void 0:l.data[0])?void 0:a.subjectSlug,re(ne)):(x(0),H(1),localStorage.setItem("tutorProfileMainTab","0"))},Pe=async()=>{var e,t;let s=y.TUTOR.Tutor_Edit_GetDetails,a=await w("get",s,{},{},!0,!1,!1);"SUCCESS"===(null==a?void 0:a.status)&&(b(null==a?void 0:a.data),Te((null==(e=null==a?void 0:a.data)?void 0:e.linkedinUrl)||""),Ie((null==(t=null==a?void 0:a.data)?void 0:t.instagramUrl)||""))},Re=/^https?:\/\/(www\.)?linkedin\.com\/.+/i,Ae=/^https?:\/\/(www\.)?instagram\.com\/.+/i,De=async()=>{const e=(new Date).getTime();let t=`${y.TUTOR_AUTH.Tutor_Qualification_listing}?_t=${e}`,s=await w("get",t,{},{},!0,!1);const a=[...(null==s?void 0:s.data)||[]];$(a)},Me=async()=>{let e=y.TUTOR.Tutor_Document_Get,t=await w("get",e,{},{},!0,!1);q((null==t?void 0:t.data)||[])},ze=async()=>{var e,t;let s=y.TUTOR.Tutor_Reviews;s+=`?page=${J}`;let a=await w("get",s,{},{},!0,!1,!1);W((null==(e=null==a?void 0:a.data)?void 0:e.list)||[]),K=null==(t=null==a?void 0:a.data)?void 0:t.paginator,te(K)};return f.useEffect(()=>{Le(),Pe(),De(),Me(),ze(),(async()=>{await C(),c(k())})(),v("tutor_own_profile_viewed",{...h(),event_category:"tutor",event_subcategory:"profile"})},[]),f.useEffect(()=>{if(!_)return;const e=localStorage.getItem("tutorProfileMainTab"),t=e?parseInt(e,10):0,s=_.length,a=s+2;let l=t;l=0===s?Math.min(t,1):Math.min(t,a-1),x(l),s>0?l<s?H(0):l===s?H(1):l===s+1&&H(2):0===l?H(1):1===l&&H(2)},[_]),f.useEffect(()=>(D?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden"),()=>{document.body.classList.remove("overflow-hidden")}),[D]),f.useEffect(()=>{const e=e=>{"Escape"===e.key&&M(!1)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[]),e.jsxs(e.Fragment,{children:[e.jsxs(E,{children:[e.jsx("title",{children:"Tutor Profile"}),e.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),e.jsx("div",{className:"bg-gray_50 flex flex-col font-proximanova items-start justify-start mx-auto w-full min-h-[100vh] pt-[70px]",children:e.jsxs("div",{className:"flex flex-col items-center justify-start w-full",children:[e.jsx(U,{}),e.jsxs("div",{className:"relative flex md:flex-col flex-row gap-[0px] items-start justify-start mx-auto md:px-4 w-full",children:[e.jsx(O,{}),e.jsxs("div",{className:"relative p-[30px] w-full overflow-x-hidden md:px-0 md:py-5",children:[Se&&e.jsx("div",{className:"mb-7 max-w-[520px]",children:e.jsx(I,{youtubeId:"JTi3fL0jqs8",title:"Before Your First Tutorial",description:"Please watch this before your first session â it only takes a couple of minutes.",status:"Recommended",isPlaying:ye,onPlay:()=>Ne(!0),children:e.jsxs("label",{className:"mt-2 flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:!1,onChange:async()=>{const e=await w("post",y.TUTOR.ACKNOWLEDGE_VIDEO,{},{},!0,!0);"SUCCESS"===(null==e?void 0:e.status)?(await C(),c(k()),we(!0)):c(N({isOpen:!0,message:(null==e?void 0:e.message)||"Could not save this right now",state:"error"}))},className:"h-4 w-4"}),e.jsx(n,{className:"text-sm text-black_900",variant:"body2",children:"I have reviewed the video, thank you."})]})})}),e.jsxs("div",{className:"bg-white_A700 w-full pt-[30px] px-[30px] mb-7",children:[e.jsxs("div",{className:"flex sm:flex-col flex-row md:gap-5 items-start sm:items-center justify-start w-full",children:[e.jsxs("div",{className:"h-[110px] md:mt-0 mt-0.5 relative min-w-[110px] w-[110px]",children:[e.jsxs("label",{className:"flex bg-gray_50_01 p-0 w-full mb-[10px] sm:items-start cursor-pointer relative",children:[(null==j?void 0:j.profile_image)?e.jsx("img",{src:j.profile_image,className:"h-[110px] w-[110px] min-w-[110px] m-auto object-cover rounded-full",alt:"tutor-profile",type:"profile"}):e.jsx("div",{className:"h-[110px] w-[110px] min-w-[110px] bg-gray-50 flex items-center justify-center rounded-full m-auto",children:e.jsx("img",{src:"images/img_camera_black_900.svg",className:"h-[50px] w-[50px] scale-75 object-contain opacity-60",alt:"camera-placeholder"})}),he&&e.jsx("div",{className:"absolute inset-0 bg-white/70 backdrop-blur-[1px] flex items-center justify-center rounded-full",children:e.jsxs("svg",{className:"animate-spin h-6 w-6 text-gray-600",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]})}),e.jsx("input",{type:"file",id:"profile",className:"hidden",accept:".jpg,.jpeg,.png",onCh
2ange:e=>{(async e=>{const t=e.target.files[0];let s=!0,a="";if(["image/jpeg","image/jpg","image/png"].includes(t.type)?t.size>20971520&&(a+="File "+t.name+" exceeds the maximum file size.",s=!1):(a+="Invalid file format for "+t.name,s=!1),!s)return void c(N({isOpen:!0,state:"error",message:a}));const l=await L([t]);me(l),pe(!0)})(e)}}),!he&&e.jsx("div",{className:"absolute top-[5px] right-[5px] bg-white p-1 rounded-full shadow-md",children:e.jsx(i,{src:"images/img_camera_black_900.svg",className:"h-[14px] w-[14px] object-contain",alt:"upload",onClick:()=>{document.getElementById("profile").click()}})}),!(null==j?void 0:j.profile_image)&&e.jsx("div",{className:"absolute bottom-[-30px] left-1/2 transform -translate-x-1/2 text-gray-500 text-[10px] text-center w-full",children:"Upload a profile image to appear in searches"})]}),(null==j?void 0:j.profile_image)&&!he&&e.jsx("div",{className:"common-pointer absolute bg-white_A700 flex flex-col h-5 items-center justify-center right-[5%] rounded-[50%] top-[5%] w-5",children:e.jsx(i,{src:"images/img_camera_black_900.svg",className:"h-[12px] w-[13px] object-cover",alt:"change-photo",onClick:()=>{document.getElementById("profile").click()}})}),e.jsx("div",{className:`absolute ${ge[null==j?void 0:j.category]} bottom-[0] h-4 inset-x-[0] mx-auto w-full`}),e.jsx(n,{className:"absolute bottom-[0] inset-x-[0] mx-auto text-white_A700 text-xs w-max",variant:"body3",style:{textTransform:"capitalize"},children:null==j?void 0:j.category})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full sm:flex-wrap sm:w-full",children:[e.jsxs("div",{className:"flex items-start justify-between sm:flex-col sm:items-center",children:[e.jsxs(n,{className:"font-bold text-black_900 w-auto font-trajanpro ml-[30px] md:ml-0",as:"h5",variant:"h5",children:[null==j?void 0:j.firstName," ",null==j?void 0:j.lastName]}),(null==_?void 0:_.find(e=>(null==e?void 0:e.tutorid)===ie))?e.jsx(r,{className:"cursor-pointer min-w-[116px] text-[12px] text-center text-white_A700 bg-teal_500 py-1 px-2 h-[24px] capitalize",children:`(${_.filter(e=>(null==e?void 0:e.tutorid)===ie).map(e=>null==e?void 0:e.subjectName).join(", ")}) Lead Tutor`}):null]}),e.jsx("div",{className:"flex items-end justify-between sm:flex-col sm:items-center sm:gap-4",children:e.jsxs("div",{className:"flex flex-col font-trajanpro gap-2 items-start sm:items-center justify-start md:ml-[0] ml-[30px] w-auto",children:[e.jsxs("div",{className:"flex flex-row font-proximanova gap-2 items-start justify-start sm:justify-center w-[100%] md:w-full",children:[e.jsx(i,{src:"images/img_mail.svg",className:"h-5 w-5",alt:"mail_One"}),e.jsx(n,{className:"font-normal text-black_900 capitalize line-clamp-2 max-w-[90%]",variant:"body2",children:_&&_.slice(0,50).map((e,t,s)=>{const a=t===s.length-1;return`${e.subjectName}${a?"":", "}`})})]}),(null==j?void 0:j.rating_avg)>0&&e.jsxs("div",{className:"flex flex-row font-lora gap-2 items-start justify-start sm:justify-center w-[100%] md:w-full",children:[e.jsx(i,{src:"images/img_star_orange_300.svg",className:"h-6 w-6",alt:"star"}),e.jsxs(n,{className:"font-medium mt-[3px] text-black_900",variant:"body2",children:[e.jsx("span",{className:"text-black_900 text-sm font-proximanova text-left font-semibold",children:null==j?void 0:j.rating_avg.toFixed(1)}),e.jsx("span",{className:"text-black_900 text-sm font-proximanova text-left font-normal",children:" "}),e.jsxs("span",{className:"text-black_900 text-xs font-proximanova text-left font-normal",children:["(",null==j?void 0:j.reviewCount," ",d("reviews"),")"]})]})]}),e.jsxs("div",{className:"flex flex-row flex-wrap font-proximanova gap-2.5 items-end justify-start w-full",children:[e.jsxs(n,{className:"font-normal my-1 text-black_900 whitespace-nowrap",variant:"body2",children:[d("spokenLanguage")," :"]}),e.jsx("div",{className:"flex flex-row gap-2 items-center justify-start w-auto",children:null==(a=null==j?void 0:j.userLanguages)?void 0:a.map((t,s)=>e.jsx(n,{className:"text-xs h-6 w-[72px] bg-light_blue_50 text-centerd flex justify-center items-center cursor-pointer",children:null==t?void 0:t.name},`lang-${s}`))})]}),e.jsxs("div",{className:"flex flex-row flex-wrap font-proximanova gap-6 items-center justify-start sm:justify-center w-full",children:[e.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"h-5 w-5 flex-shrink-0",fill:"#0077B5",children:e.jsx("path",{d:"M20 0C21.0609 0 22.0783.421 22.8284 1.172 23.5786 1.922 24 2.939 24 4v16c0 1.061-.4214 2.078-1.1716 2.828C22.0783 23.579 21.0609 24 20 24H4c-1.0609 0-2.0783-.421-2.8284-1.172C.421 22.078 0 21.061 0 20V4C0 2.939.421 1.922 1.1716 1.172 1.9217.421 2.9391 0 4 0h16zm-3.334 18.667c.354 0 .693-.141.943-.391.25-.25.391-.589.391-.943V13c0-.907-.227-1.701-.699-2.338-.434-.578-1.042-1.002-1.734-1.209-1.203-.378-2.535-.167-3.424.213-.285.122-.562.261-.830.430A1.336 1.336 0 0010.667 9.333c-.354 0-.693.14-.943.391-.25.25-.391.588-.391.943v8c0 .354.141.693.391.943.25.25.589.39.943.39.354 0 .693-.14.943-.39.25-.25.39-.589.39-.943v-4.88c.407-.541 1.094-1.08 1.858-1.406.444-.19 1.112-.267 1.576-.12.154.039.291.127.390.250.070.094.177.302.177.742v5.414c0 .354.14.693.39.943.25.25.589.39.943.39zM6.667 9.333c-.354 0-.693.14-.943.391-.25.25-.391.588-.391.943v6.666c0 .354.141.693.391.943.25.25.589.39.943.39.354 0 .692-.14.942-.39.25-.25.391-.589.391-.943v-6.666c0-.355-.141-.693-.391-.943-.25-.25-.588-.391-.942-.391zm0-4c-.354 0-.693.14-.943.391-.25.25-.391.588-.391.942 0 .354.141.693.391.943.25.25.589.39.943.39.354 0 .692-.14.942-.39.25-.25.391-.589.391-.943 0-.354-.141-.692-.391-.942-.25-.25-.588-.391-.942-.391z"})}),_e?e.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[e.jsx("input",{type:"url",value:ke,onChange:e=>Te(e.target.value),placeholder:"https://www.linkedin.com/in/your-name",className:"border border-gray-300 rounded px-2 py-0.5 text-sm text-black_900 w-[260px] outline-none focus:border-teal-500",autoFocus:!0}),e.jsx("button",{onClick:async()=>{var e;const t=ke.trim();if(""!==t&&!Re.test(t))return void c(N({isOpen:!0,state:"error",message:"Please enter a valid LinkedIn profile URL"}));c(S(!0));const s={firstName:j.firstName,lastName:j.lastName,countryCode:j.countryCode,mobileNo:j.mobileNo,profileTagline:j.profileTagline||"",description:j.description||"",languageId:(null==(e=j.userLanguages)?void 0:e.map(e=>e.languageId))||[],linkedinUrl:t},a=await w("put",y.TUTOR.Tutor_Edit_UpdateDetails,s,{},!0,!0);c(S(!1)),"SUCCESS"===a.status?(Ce(!1),Pe(),c(N({isOpen:!0,state:"success",message:"LinkedIn URL updated successfully."}))):c(N({isOpen:!0,state:"error",message:null==a?void 0:a.message}))},className:"text-xs text-white px-2 py-0.5 rounded",style:{backgroundColor:"#ba110b"},children:"Save"}),e.jsx("button",{onClick:()=>{Ce(!1),Te((null==j?void 0:j.linkedinUrl)||"")},className:"text-xs text-gray-500 hover:text-gray-700",children:"Cancel"})]}):e.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[(null==j?void 0:j.linkedinUrl)?e.jsx("a",{href:j.linkedinUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline",children:"LinkedIn"}):e.jsx(n,{className:"text-sm text-gray-400",variant:"body2",children:"Add LinkedIn URL"}),e.jsx("button",{onClick:()=>{Te((null==j?void 0:j.linkedinUrl)||""),Ce(!0)},className:"text-gray-400 hover:text-gray-600",title:"Edit LinkedIn URL",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{d:"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"})})})]})]}),e.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"h-5 w-5 flex-shrink-0",fill:"#E1306C",children:e.jsx("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0 5.838a4 4 0 100 8 4 4 0 000-8zm0 6.6
2a2.6 2.6 0 110-5.2 2.6 2.6 0 010 5.2zm5.094-9.99a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"})}),Ee?e.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[e.jsx("input",{type:"url",value:Oe,onChange:e=>Ie(e.target.value),placeholder:"https://www.instagram.com/your-name",className:"border border-gray-300 rounded px-2 py-0.5 text-sm text-black_900 w-[260px] outline-none focus:border-teal-500",autoFocus:!0}),e.jsx("button",{onClick:async()=>{var e;const t=Oe.trim();if(""!==t&&!Ae.test(t))return void c(N({isOpen:!0,state:"error",message:"Please enter a valid Instagram profile URL"}));c(S(!0));const s={firstName:j.firstName,lastName:j.lastName,countryCode:j.countryCode,mobileNo:j.mobileNo,profileTagline:j.profileTagline||"",description:j.description||"",languageId:(null==(e=j.userLanguages)?void 0:e.map(e=>e.languageId))||[],instagramUrl:t},a=await w("put",y.TUTOR.Tutor_Edit_UpdateDetails,s,{},!0,!0);c(S(!1)),"SUCCESS"===a.status?(Ue(!1),Pe(),c(N({isOpen:!0,state:"success",message:"Instagram URL updated successfully."}))):c(N({isOpen:!0,state:"error",message:null==a?void 0:a.message}))},className:"text-xs text-white px-2 py-0.5 rounded",style:{backgroundColor:"#ba110b"},children:"Save"}),e.jsx("button",{onClick:()=>{Ue(!1),Ie((null==j?void 0:j.instagramUrl)||"")},className:"text-xs text-gray-500 hover:text-gray-700",children:"Cancel"})]}):e.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[(null==j?void 0:j.instagramUrl)?e.jsx("a",{href:j.instagramUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline",children:"Instagram"}):e.jsx(n,{className:"text-sm text-gray-400",variant:"body2",children:"Add Instagram URL"}),e.jsx("button",{onClick:()=>{Ie((null==j?void 0:j.instagramUrl)||""),Ue(!0)},className:"text-gray-400 hover:text-gray-600",title:"Edit Instagram URL",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{d:"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"})})})]})]})]})]})})]})]}),e.jsx(m,{className:"border-b border-blue_gray_100 mt-[40px] w-full"}),e.jsxs(t,{value:u,onChange:(e,t)=>
2{x(t),H(t),localStorage.setItem("tutorProfileMainTab",t.toString())},"aria-label":"basic tabs example",className:"horizontal-tab sm:-mx-[30px] "+((null==_?void 0:_.length)>4?"noDisable":""),variant:"scrollable",scrollButtons:!0,children:[_?null==_?void 0:_.map((t,a)=>e.jsx(s,{style:{textTransform:"capitalize"},onClick:()=>{var e,s;se=!1,e=null==t?void 0:t.subjectName,s=null==t?void 0:t.subId,oe={department:e,departmentId:s},ce(oe),x(a),H(0),localStorage.setItem("tutorProfileMainTab",a.toString()),ne=null==t?void 0:t.subjectSlug,re(ne),se=ie===(null==t?void 0:t.tutorid),ae(se)},label:`${null==t?void 0:t.subjectName} Department`,...ve(0)},`tab-${a}`)):null,e.jsx(s,{onClick:()=>{const e=(null==_?void 0:_.length)||0;x(e),H(1),localStorage.setItem("tutorProfileMainTab",e.toString())},label:"About",...ve((null==_?void 0:_.length)||0)}),e.jsx(s,{onClick:()=>{const e=((null==_?void 0:_.length)||0)+1;x(e),H(2),localStorage.setItem("tutorProfileMainTab",e.toString())},label:"Reviews",...ve(((null==_?void 0:_.length)||0)+1)})]})]}),0===B?e.jsx(V,{currentDepartment:oe,departmentSlug:ne,getPosts:G,resetGetPost:()=>Y(!1),isLeadTutor:se}):null,1===B?e.jsx(ue,{Subjects:_,getAllTutorSubjects:Le,userData:j,getProfileDetails:Pe,qualification:z,getQualificationListing:De,documents:F,tutorEditGetDetails:Pe,getAllDocuments:Me,getReviews:ze}):null,2===B?e.jsx(fe,{reviews:Q,handleChangePage:(e,t)=>{J=t,Z(J),ze()},pagination:K,page:J,minStars:null!=(l=null==j?void 0:j.review_min_stars)?l:0,refreshUserData:Pe,getReviews:ze}):null]})]})]})}),!0===D?e.jsx(ee,{closepopup:M}):null,xe?e.jsx(R,{cropperImage:de,closepopup:()=>{pe(!1),document.getElementById("profile")&&(document.getElementById("profile").value="")},setCropImage:e=>{pe(!1),me(""),(async e=>{c(S(!0)),je(!0);const t=e.split(";")[0].split("/")[1],s=`${Math.floor(1e5+9e5*Math.random())}_${(new Date).getTime()}.${t}`,a=await P(e,s,"profile");if("SUCCESS"===a.status){const e=y.TUTOR.Tutor_Profile_Image_Update,t=await w("put",e,{profile_path:null==a?void 0:a.url},{},!0,!0);"SUCCESS"===t.status?(await C(),c(k(null==t?void 0:t.token)),c(N({isOpen:!0,state:"success",message:"Profile image updated successfully."})),Pe()):c(N({isOpen:!0,state:"error",message:null==t?void 0:t.message})),c(S(!1)),je(!1)}else c(N({isOpen:!0,state:"error",message:null==a?void 0:a.message})),c(S(!1)),je(!1)})(e.croppedImage)},otherParams:{aspectRatio:NaN}}):null,be&&e.jsx(X,{closepopup:we})]})};export{he 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.