1"use strict";(globalThis.webpackChunkreact_ts=globalThis.webpackChunkreact_ts||[]).push([[1502],{51502(e,s,a){a.r(s);var l=a(5544),t=a(9950),i=a(40978),r=a(41420),n=a(86311),d=a(31855),o=a(61878),c=a(81946),x=a(2263),m=a(84814),h=a(96479),v=a(10300),u=a(86400),p=a(84104),g=a(19207),j=a(77139),f=a(41182),N=a(87117),b=a(65242),y=a(42461),A=a(16255),w=a(10876),C=a(98932),S=a(44414);const R=()=>{var e,s,a;const R=(0,v.d4)(e=>e.auth).user,k=(0,t.useState)(!1),E=(0,l.A)(k,2),P=E[0],T=E[1],D=(0,t.useState)(!1),F=(0,l.A)(D,2),I=(F[0],F[1],(0,t.useState)(!1)),H=(0,l.A)(I,2),K=(H[0],H[1],(0,t.useState)(null)),G=(0,l.A)(K,2),J=(G[0],G[1],(0,t.useState)(null)),L=(0,l.A)(J,2),Q=(L[0],L[1],(0,u.jLQ)()),W=(0,t.useState)({regular:100,emergency:5}),$=(0,l.A)(W,2),_=($[0],$[1],(0,t.useState)(!1)),B=(0,l.A)(_,2),M=(B[0],B[1],(0,t.useState)({reviews:[],badges:{topRatedPlus:!0,topRated:!0,risingTalent:!1,expertVerified:!0},stats:{totalJobs:186,inProgress:3,completionRate:0,onBudget:95,onTime:97,rehireRate:85},personal:{companyName:"Tech Solutions Inc.",vatNumber:"IT12345678901",name:(null===R||void 0===R?void 0:R.firstName)+" "+(null===R||void 0===R?void 0:R.lastName),title:null===R||void 0===R?void 0:R.title,photo:(null===R||void 0===R||null===(e=R.photo)||void 0===e?void 0:e.path)||"https://i.pravatar.cc/150?img=3",phone:null===R||void 0===R?void 0:R.phone,email:null===R||void 0===R?void 0:R.email,hourlyRate:null===R||void 0===R?void 0:R.hourlyRate,location:"No location",bio:null===R||void 0===R?void 0:R.bio,availability:{regularHours:{monday:{start:"",end:"",isAvailable:!1},tuesday:{start:"",end:"",isAvailable:!1},wednesday:{start:"",end:"",isAvailable:!1},thursday:{start:"",end:"",isAvailable:!1},friday:{start:"",end:"",isAvailable:!1},saturday:{start:"",end:"",isAvailable:!1},sunday:{start:"",end:"",isAvailable:!1}},emergencyHours:{monday:{start:"00:00",end:"23:59",active:!0},tuesday:{start:"00:00",end:"23:59",active:!0},wednesday:{start:"00:00",end:"23:59",active:!0},thursday:{start:"00:00",end:"23:59",active:!0},friday:{start:"00:00",end:"23:59",active:!0},saturday:{start:"00:00",end:"23:59",active:!0},sunday:{start:"00:00",end:"23:59",active:!0}}},languages:["English (Native)","French (Professional)","Spanish (Conversational)"],joined:"January 2023",lastActive:"2 hours ago",verified:!0,rating:4.9,completedProjects:0,totalEarned:"0",successRate:0},skills:[{name:"React.js",level:"Expert",endorsements:45},{name:"Node.js",level:"Expert",endorsements:38},{name:"TypeScript",level:"Expert",endorsements:32},{name:"AWS",level:"Advanced",endorsements:28},{name:"PostgreSQL",level:"Advanced",endorsements:25},{name:"Docker",level:"Advanced",endorsements:22}],certifications:[],serviceCategories:["Web Development","Mobile Development","Cloud Architecture"]})),O=(0,l.A)(M,2),V=O[0],q=O[1],z=(0,t.useState)(!1),U=(0,l.A)(z,2),X=U[0],Y=U[1];return(0,S.jsxs)("div",{className:"min-h-screen bg-gray-50",style:{textAlign:"left"},children:[(0,S.jsx)("div",{className:"bg-white border-b",children:(0,S.jsxs)("div",{className:"max-w-full mx-auto px-4 py-8",children:[(0,S.jsxs)("div",{className:"flex flex-col md:flex-row gap-6 items-start",children:[(0,S.jsxs)("div",{className:"relative",children:[(0,S.jsxs)("div",{className:"w-32 h-32 rounded-full overflow-hidden bg-gray-100",children:[(0,S.jsx)("img",{src:V.personal.photo,alt:V.personal.name,className:"w-full h-full object-cover"}),X&&(0,S.jsxs)("div",{className:"absolute bottom-2 right-2 flex gap-1",children:[(0,S.jsxs)("label",{htmlFor:"profile-image-upload",className:"p-2 bg-blue-600 rounded-full text-white hover:bg-blue-700 cursor-pointer",children:[(0,S.jsx)(r.A,{className:"w-4 h-4"}),(0,S.jsx)("input",{id:"profile-image-upload",type:"file",accept:"image/*",className:"hidden",onChange:async e=>{var s,a,l;const t=null===(s=e.target.files)||void 0===s?void 0:s[0],i=(await Q((0,u.eK1)({file:t}))).payload;t&&q(e=>{var s;return{...e,personal:{...e.personal,photo:null===i||void 0===i||null===(s=i.file)||void 0===s?void 0:s.path}}});const r={...R,photo:{id:null===i||void 0===i||null===(a=i.file)||void 0===a?void 0:a.id,path:null===i||void 0===i||null===(l=i.file)||void 0===l?void 0:l.path}};await Q((0,u.KgG)({id:R.id,data:r}))}})]}),V.personal.photo&&(0,S.jsx)("button",{onClick:async()=>{try{q(e=>({...e,personal:{...e.personal,photo:""}}));const e={...R,photo:null};await Q((0,u.KgG)({id:R.id,data:e})),C.dI.showToast("success","Success","Photo removed successfully")}catch(e){console.error("Error removing photo:",e),C.dI.showToast("error","Error","Failed to remove photo")}},className:"p-2 bg-red-600 rounded-full text-white hover:bg-red-700 cursor-pointer",title:"Remove photo",children:(0,S.jsx)(m.A,{className:"w-4 h-4"})})]})]}),V.personal.verified&&(0,S.jsx)("div",{className:"absolute -bottom-2 -right-2 bg-green-500 text-white p-1.5 rounded-full",children:(0,S.jsx)(c.A,{className:"w-4 h-4"})})]}),(0,S.jsxs)("div",{className:"flex-1",children:[(0,S.jsxs)("div",{className:"flex justify-between items-start",children:[(0,S.jsxs)("div",{children:[(0,S.jsxs)("h1",{className:"text-2xl font-bold text-gray-900 flex items-center gap-2",children:[V.personal.name,V.personal.verified&&(0,S.jsx)(n.A,{className:"w-5 h-5 text-green-500"})]}),(0,S.jsx)("p",{className:"text-lg text-gray-600",children:V.personal.title}),(0,S.jsxs)("div",{className:"flex items-center gap-4 mt-2 text-sm text-gray-500",children:[(0,S.jsxs)("div",{className:"flex items-center gap-1",children:[(0,S.jsx)(d.A,{className:"w-4 h-4"}),V.personal.location]}),(0,S.jsxs)("div",{className:"flex items-center gap-1",children:[(0,S.jsx)(x.A,{className:"w-4 h-4 text-yellow-400"}),"Not rating yet"]})]})]}),(0,S.jsx)("div",{className:"flex gap-3",children:X?(0,S.jsxs)(y.A,{onClick:()=>Y(!1),variant:"outline",className:"hidden md:flex items-center gap-2",children:[(0,S.jsx)(h.A,{className:"w-4 h-4"}),"Cancel"]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(y.A,{onClick:()=>{Y(!0),T(!0)},variant:"outline",className:"hidden md:flex items-center gap-2",children:[(0,S.jsx)(i.A,{className:"w-4 h-4"}),"Edit Profile"]}),(0,S.jsxs)(y.A,{className:"hidden md:flex items-center gap-2",children:[(0,S.jsx)(o.A,{className:"w-4 h-4"}),"Contact"]})]})})]}),(0,S.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mt-6",children:[(0,S.jsxs)("div",{className:"bg-blue-50 p-4 rounded-lg",children:[(0,S.jsxs)("div",{className:"text-2xl font-bold text-blue-600",children:["$",V.personal.totalEarned]}),(0,S.jsx)("div",{className:"text-sm text-gray-600",children:"Total Earned"})]}),(0,S.jsxs)("div",{className:"bg-green-50 p-4 rounded-lg",children:[(0,S.jsx)("div",{className:"text-2xl font-bold text-green-600",children:V.personal.completedProjects}),(0,S.jsx)("div",{className:"text-sm text-gray-600",children:"Projects Completed"})]}),(0,S.jsxs)("div",{className:"bg-purple-50 p-4 rounded-lg",children:[(0,S.jsxs)("div",{className:"text-2xl font-bold text-purple-600",children:[V.personal.successRate,"%"]}),(0,S.jsx)("div",{className:"text-sm text-gray-600",children:"Success Rate"})]}),(0,S.jsxs)("div",{className:"bg-orange-50 p-4 rounded-lg",children:[(0,S.jsxs)("div",{className:"text-2xl font-bold text-orange-600",children:["$",V.personal.hourlyRate]}),(0,S.jsx)("div",{className:"text-sm text-gray-600",children:"Hourly Rate"})]})]})]})]}),(0,S.jsx)("div",{className:"flex gap-3 mt-6 md:hidden",children:X?(0,S.jsxs)(y.A,{onClick:()=>Y(!1),variant:"outline",className:"flex-1 flex items-center justify-center gap-2",children:[(0,S.jsx)(h.A,{className:"w-4 h-4"}),"Cancel"]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(y.A,{onClick:()=>{Y(!0)},variant:"outline",className:"flex-1 flex items-center justify-center gap-2",children:[(0,S.jsx)(i.A,{className:"w-4 h-4"}),"Edit Profile"]}),(0,S.jsxs)(y.A,{className:"flex-1 flex items-center justify-center gap-2",children:[(0,S.jsx)(o.A,{className:"w-4 h-4"}),"Contact"]})]})})]})}),(0,S.jsx)("div",{className:"max-w-full mx-auto px-4 py-8",children:(0,S.jsxs)("div",{className:"flex flex-col lg:flex-row gap-8",children:[(0,S.jsxs)("div",{className:"lg:w-3/4 space-y-6",children:[(0,S.jsxs)(A.Ay,{color:void 0,className:"p-6",children:[(0,S.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"About"}),X?(0,S.jsxs)("div",{children:[(0,S.jsx)("textarea",{value:V.personal.bio,onChange:e=>{var s;(s=e.target.value).length<=500&&q(e=>({...e,personal:{...e.personal,bio:s}}))},className:"w-full p-3 border rounded-lg min-h-[150px]"}),(0,S.jsxs)("p",{className:"text-sm text-gray-500 mt-2",children:[null===V||void 0===V||null===(s=V.personal)||void 0===s||null===(s=s.bio)||void 0===s?void 0:s.length,"/500 characters"]})]}):(0,S.jsx)("p",{className:"text-gray-600",children:null===V||void 0===V||null===(a=V.personal)||void 0===a?void 0:a.bio})]}),(0,S.jsx)(f.A,{}),(0,S.jsx)(g.A,{}),(0,S.jsx)(j.A,{})]}),(0,S.jsxs)("div",{className:"lg:w-1/4 space-y-6",children:[(0,S.jsx)(N.A,{}),(0,S.jsx)(b.A,{})]})]})}),(0,S.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white border-t py-4 px-4 md:hidden",children:(0,S.jsx)("div",{className:"max-w-full mx-auto
1space-y-2",children:(0,S.jsx)(y.A,{variant:"destructive",className:"w-full",children:"Delete Account"})})}),(0,S.jsx)("br",{}),(0,S.jsx)("br",{}),(0,S.jsx)("br",{}),(0,S.jsx)("br",{}),(0,S.jsx)(p.A,{isOpen:P,onClose:()=>T(!1),profileData:V.personal,setProfileData:q}),(0,S.jsx)(w.A,{})]})};a.d(s,["default",0,R])}}]);
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.