PageSourceSearch

https://www.bagchee.com/static/js/9925.861e5c8e.chunk.js

js bagchee.com collected 2026-10-02 11:15:34 UTC 21,451 bytes, 3 lines download raw bytes

1/*! For license information please see 9925.861e5c8e.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[9925],{1493(e,t,s){s.d(t,{A:()=>j});var a=s(5043),r=s(7874),i=s(3658),l=s(1990),n=s(4918),o=s(8006),c=s(4459),d=s(3946),m=s(614),h=s(9493),u=s(2983),p=s(8326),x=s(9463),g=s(2339),b=s(3716),f=s(579);const y=e=>{let{className:t=""}=e;return(0,f.jsxs)(r.N_,{to:"/",className:"flex items-center group gap-2 ".concat(t),children:[(0,f.jsxs)("div",{className:"relative",children:[(0,f.jsx)("div",{className:"absolute inset-0 bg-primary rounded-lg opacity-90"}),(0,f.jsx)("img",{src:b,alt:"Bagchee Icon",className:"relative h-10 md:h-12 w-auto object-contain p-1",fetchPriority:"high",decoding:"async"})]}),(0,f.jsxs)("div",{className:"flex flex-col leading-none",children:[(0,f.jsx)("span",{className:"text-xl md:text-2xl tracking-[0.2em] text-black uppercase font-bold",children:"Bagchee"}),(0,f.jsx)("div",{className:"h-[1px] bg-white/80 my-0.5 w-full"})," ",(0,f.jsx)("span",{className:"text-[8px] md:text-[10px] tracking-[0.4em] text-black/80 uppercase font-medium",children:"Books That Stick"})]})]})},v=(0,a.memo)(y),j=e=>{let{children:t}=e;const s=(0,r.Zp)(),b=(0,r.zy)(),[y,j]=(0,a.useState)(!1),[w,N]=(0,a.useState)(!1),[A,k]=(0,a.useState)(null);(0,a.useEffect)(()=>{const e=localStorage.getItem("auth");if(!e)return void s("/login");const t=JSON.parse(e);k(t.userDetails)},[s]),(0,a.useEffect)(()=>{N(!1)},[b.pathname]);const S=()=>{localStorage.removeItem("auth"),g.Ay.success("Logged out successfully"),s("/login")},C=[{icon:i.A,label:"Dashboard",hint:"Overview",path:"/account"},{icon:l.A,label:"Orders",hint:"Track purchases",path:"/account/orders"},{icon:n.A,label:"Wishlist",hint:"Saved books",path:"/account/wishlist"},{icon:o.A,label:"Addresses",hint:"Shipping details",path:"/account/address"},{icon:c.A,label:"Profile",hint:"Personal info",path:"/account/profile"},{icon:d.A,label:"Gift Cards",hint:"Redeem & balance",path:"/account/gift-cards"}];if(!A)return(0,f.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-cream",children:(0,f.jsx)("div",{className:"animate-spin rounded-full h-16 w-16 border-b-4 border-primary"})});const P=e=>{var t,s;let{isMobile:a=!1}=e;return(0,f.jsxs)("div",{className:"flex flex-col h-full bg-cream-100/95 backdrop-blur-sm",children:[(0,f.jsxs)("div",{className:"p-6 border-b border-gray-200 bg-gradient-to-r from-cream-100/60 to-cream-100/30",children:[a&&(0,f.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,f.jsx)(r.N_,{to:"/",className:"flex items-center",children:(0,f.jsx)(v,{className:"h-8 w-auto"})}),(0,f.jsx)("button",{onClick:()=>N(!1),className:"lg:hidden p-2 hover:bg-cream-100 rounded-lg transition-colors",children:(0,f.jsx)(m.A,{size:20})})]}),!y&&(0,f.jsx)("div",{className:"space-y-4",children:(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[(0,f.jsx)("div",{className:"w-12 h-12 bg-primary/15 rounded-full flex items-center justify-center text-primary font-bold shadow-sm",children:null===(t=A.name)||void 0===t?void 0:t.charAt(0).toUpperCase()}),(0,f.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,f.jsx)("p",{className:"text-sm font-semibold text-text-main truncate",children:A.name}),(0,f.jsx)("p",{className:"text-xs text-text-muted truncate",children:A.email})]})]})}),y&&(0,f.jsx)("div",{className:"w-10 h-10 bg-primary/15 rounded-full flex items-center justify-center text-primary font-bold mx-auto shadow-sm",children:null===(s=A.name)||void 0===s?void 0:s.charAt(0).toUpperCase()})]}),(0,f.jsx)("nav",{className:"flex-1 p-4 space-y-1.5 overflow-y-auto",children:C.map(e=>{const t=e.icon,s=b.pathname===e.path;return(0,f.jsxs)(r.N_,{to:e.path,className:"flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-200 ".concat(s?"bg-primary text-white shadow-md":"text-text-main hover:bg-cream-50 hover:text-primary"),children:[(0,f.jsx)(t,{size:20,className:s?"text-white":"text-text-muted"}),!y&&(0,f.jsxs)("div",{className:"min-w-0",children:[(0,f.jsx)("p",{className:"font-medium leading-tight",children:e.label}),(0,f.jsx)("p",{className:"text-[11px] leading-tight truncate ".concat(s?"text-white/85":"text-text-muted"),children:e.hint})]})]},e.path)})}),(0,f.jsxs)("div",{className:"p-4 border-t border-gray-200 space-y-2 bg-cream-50/30",children:[(0,f.jsxs)(r.N_,{to:"/",className:"flex items-center gap-3 px-4 py-3 w-full rounded-lg text-text-main hover:bg-cream-100 hover:text-primary transition-all duration-200",children:[(0,f.jsx)(i.A,{size:20}),!y&&(0,f.jsx)("span",{className:"font-medium",children:"Back to Website"})]}),(0,f.jsxs)("button",{onClick:S,className:"flex items-center gap-3 px-4 py-3 w-full rounded-lg text-red-600 hover:bg-red-50 transition-all duration-200",children:[(0,f.jsx)(h.A,{size:20}),!y&&(0,f.jsx)("span",{className:"font-medium",children:"Logout"})]})]})]})};return(0,f.jsxs)("div",{className:"min-h-screen bg-cream",children:[(0,f.jsx)("header",{className:"fixed top-0 left-0 right-0 bg-cream-100 border-b border-gray-200 z-40",children:(0,f.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,f.jsx)("div",{className:"lg:hidden",children:(0,f.jsx)("button",{onClick:()=>N(!0),className:"p-2 hover:bg-cream-100 rounded-lg",children:(0,f.jsx)(u.A,{size:24})})}),(0,f.jsx)("div",{className:"hidden lg:block w-10"}),(0,f.jsx)(r.N_,{to:"/",className:"flex items-center",children:(0,f.jsx)(v,{className:"h-8 w-auto"})}),(0,f.jsx)("div",{className:"w-10"})]})}),w&&(0,f.jsx)("div",{className:"fixed inset-0 bg-black/50 z-50 lg:hidden",onClick:()=>N(!1)}),(0,f.jsx)("aside",{className:"fixed top-0 left-0 bottom-0 w-72 bg-cream-100 z-50 transform transition-transform duration-300 lg:hidden ".concat(w?"translate-x-0":"-translate-x-full"),children:(0,f.jsx)(P,{isMobile:!0})}),(0,f.jsxs)("aside",{className:"hidden lg:block fixed top-[61px] left-0 bottom-0 bg-cream-100 border-r border-gray-200 transition-all duration-300 z-30 ".concat(y?"w-20":"w-64"),children:[(0,f.jsx)(P,{}),(0,f.jsx)("button",{onClick:()=>j(!y),className:"absolute -right-3 top-4 w-6 h-6 bg-white border border-gray-200 rounded-full flex items-center justify-center hover:bg-gray-50 shadow-sm",children:y?(0,f.jsx)(p.A,{size:14}):(0,f.jsx)(x.A,{size:14})})]}),(0,f.jsx)("main",{className:"transition-all duration-300 pt-[61px] min-h-screen ".concat(y?"lg:ml-20":"lg:ml-64"),children:(0,f.jsx)("div",{className:"max-w-7xl mx-auto p-4 lg:p-8",children:t})})]})}},1990(e,t,s){s.d(t,{A:()=>a});const a=(0,s(7784).A)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]])},3658(e,t,s){s.d(t,{A:()=>a});const a=(0,s(7784).A)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]])},3946(e,t,s){s.d(t,{A:()=>a});const a=(0,s(7784).A)("gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]])},7097(e,t,s){s.d(t,{n:()=>N});var a,r,i,l,n,o=s(9379),c=s(5043),d=s(9790),m=s(5149),h=s(8458),u=s(6562),p=s(4558),x=s(5239),g=s(1454),b=s(329),f=s(9723),y=(a=new WeakMap,r=new WeakMap,i=new WeakMap,l=new WeakMap,n=new WeakSet,class extends b.Q{constructor(e,t){super(),(0,d.A)(this,n),(0,m.A)(this,a,void 0),(0,m.A)(this,r,void 0),(0,m.A)(this,i,void 0),(0,m.A)(this,l,void 0),(0,p.A)(a,this,e),this.setOptions(t),this.bindMethods(),(0,u.A)(n,this,v).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const s=this.options;this.options=(0,h.A)(a,this).defaultMutationOptions(e),(0,f.f8)(this.options,s)||(0,h.A)(a,this).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,h.A)(i,this),observer:this}),null!==s&&void 0!==s&&s.mutationKey&&this.options.mutationKey&&(0,f.EN)(s.mutationKey)!==(0,f.EN)(this.options.mutationKey)?this.reset():"pending"===(null===(t=(0,h.A)(i,this))||void 0===t?void 0:t.state.status)&&(0,h.A)(i,this).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(null===(e=(0,h.A)(i,this))||void 0===e||e.removeObserver(this))}onMutationUpdate(e){(0,u.A)(n,this,v).call(this),(0,u.A)(n,this,j).call(this,e)}getCurrentResult(){return(0,h.A)(r,this)}reset(){var e;null===(e=(0,h.A)(i,this))||void 0===e||e.removeObserver(this),(0,p.A)(i,this,void 0),(0,u.A)(n,this,v).call(this),(0,u.A)(n,this,j).call(this)}mutate(e,t){var s;return(0,p.A)(l,this,t),null===(s=(0,h.A)(i,this))||void 0===s||s.removeObserver(this),(0,p.A)(i,this,(0,h.A)(a,this).getMutationCache().build((0,h.A)(a,this),this.options)),(0,h.A)(i,this).addObserver(this),(0,h.A)(i,this).execute(e)}});function v(){var e,t;const s=null!==(e=null===(t=(0,h.A)(i,this))||void 0===t?void 0:t.state)&&void 0!==e?e:(0,x.$)();(0,p.A)(r,this,(0,o.A)((0,o.A)({},s),{},{isPending:"pending"===s.status,isSuccess:"success"===s.status,isError:"error"===s.status,isIdle:"idle"===s.status,mutate:this.mutate,reset:this.reset}))}function j(e){g.jG.batch(()=>
2{if((0,h.A)(l,this)&&this.hasListeners()){const p=(0,h.A)(r,this).variables,x=(0,h.A)(r,this).context,g={client:(0,h.A)(a,this),meta:this.options.meta,mutationKey:this.options.mutationKey};if("success"===(null===e||void 0===e?void 0:e.type)){try{var t,s;null===(t=(s=(0,h.A)(l,this)).onSuccess)||void 0===t||t.call(s,e.data,p,x,g)}catch(u){Promise.reject(u)}try{var i,n;null===(i=(n=(0,h.A)(l,this)).onSettled)||void 0===i||i.call(n,e.data,null,p,x,g)}catch(u){Promise.reject(u)}}else if("error"===(null===e||void 0===e?void 0:e.type)){try{var o,c;null===(o=(c=(0,h.A)(l,this)).onError)||void 0===o||o.call(c,e.error,p,x,g)}catch(u){Promise.reject(u)}try{var d,m;null===(d=(m=(0,h.A)(l,this)).onSettled)||void 0===d||d.call(m,void 0,e.error,p,x,g)}catch(u){Promise.reject(u)}}}this.listeners.forEach(e=>{e((0,h.A)(r,this))})})}var w=s(3248);function N(e,t){const s=(0,w.jE)(t),[a]=c.useState(()=>new y(s,e));c.useEffect(()=>{a.setOptions(e)},[a,e]);const r=c.useSyncExternalStore(c.useCallback(e=>a.subscribe(g.jG.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),i=c.useCallback((e,t)=>{a.mutate(e,t).catch(f.lQ)},[a]);if(r.error&&(0,f.GU)(a.options.throwOnError,[r.error]))throw r.error;return(0,o.A)((0,o.A)({},r),{},{mutate:i,mutateAsync:r.mutate})}},9925(e,t,s){s.r(t),s.d(t,{default:()=>v});var a=s(9379),r=s(5043),i=s(7784);const l=(0,i.A)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);var n=s(614),o=s(4459);const c=(0,i.A)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]),d=(0,i.A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);var m=s(3046),h=s(2339),u=s(1493),p=s(7097),x=s(3248),g=s(579);const b="https://www.bagchee.com/api",f=e=>{let{label:t,value:s,isInput:a=!1,name:r,type:i="text",onChange:l,icon:n,readOnly:o=!1,onClick:c}=e;return(0,g.jsxs)("div",{onClick:c,className:"group flex flex-col md:flex-row items-start md:items-center justify-between py-5 border-b border-gray-100 last:border-0 px-2 transition-all gap-3 md:gap-0 ".concat(o?"":"hover:bg-gray-50 rounded-lg cursor-pointer"),children:[(0,g.jsx)("div",{className:"w-full md:w-1/3",children:(0,g.jsx)("span",{className:"text-sm font-bold text-gray-600 uppercase tracking-wider",children:t})}),(0,g.jsxs)("div",{className:"w-full md:w-2/3 flex items-center justify-between gap-4",children:[(0,g.jsx)("div",{className:"flex-grow",children:a?(0,g.jsx)("input",{type:i,name:r,value:s,onChange:l,readOnly:o,placeholder:"Enter ".concat(t),className:"w-full bg-transparent outline-none text-base font-medium text-gray-900 placeholder-gray-300 py-1 ".concat(o?"cursor-not-allowed text-gray-400":"focus:text-primary transition-colors")}):(0,g.jsx)("span",{className:"text-base font-medium text-gray-900 truncate block py-1",children:s})}),n&&!o&&(0,g.jsx)("div",{className:"text-gray-400 group-hover:text-primary transition-colors p-2 bg-gray-100 rounded-full group-hover:bg-primary-50 shrink-0",children:(0,g.jsx)(n,{size:16})})]})]})},y=e=>{let{isOpen:t,onClose:s,userId:i}=e;const[o,c]=(0,r.useState)({oldPassword:"",newPassword:""}),d=(0,p.n)({mutationFn:async e=>{const t="".concat(b,"/user/change-password");return(await m.A.post(t,e)).data},onSuccess:e=>{e.status?(h.Ay.success("Password Changed Successfully!"),c({oldPassword:"",newPassword:""}),s()):h.Ay.error(e.msg)},onError:e=>{var t,s;h.Ay.error((null===(t=e.response)||void 0===t||null===(s=t.data)||void 0===s?void 0:s.msg)||"Password update failed")}});if(!t)return null;const u=e=>c((0,a.A)((0,a.A)({},o),{},{[e.target.name]:e.target.value}));return(0,g.jsx)("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4 backdrop-blur-sm",children:(0,g.jsxs)("div",{className:"bg-cream-100 rounded-2xl w-full max-w-md p-6 shadow-2xl animate-fadeIn",children:[(0,g.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,g.jsxs)("h3",{className:"text-lg font-bold text-gray-900 flex items-center gap-2",children:[(0,g.jsx)(l,{size:20,className:"text-primary"})," Change Password"]}),(0,g.jsx)("button",{onClick:s,className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:(0,g.jsx)(n.A,{size:20})})]}),(0,g.jsxs)("form",{onSubmit:e=>{e.preventDefault(),d.mutate((0,a.A)({userId:i},o))},className:"space-y-4",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"text-xs font-bold text-gray-500 uppercase tracking-wide",children:"Current Password"}),(0,g.jsx)("input",{type:"password",name:"oldPassword",value:o.oldPassword,onChange:u,className:"w-full mt-1 p-3 bg-gray-50 rounded-lg border border-gray-200 outline-none focus:border-primary",placeholder:"Enter old password",required:!0})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"text-xs font-bold text-gray-500 uppercase tracking-wide",children:"New Password"}),(0,g.jsx)("input",{type:"password",name:"newPassword",value:o.newPassword,onChange:u,className:"w-full mt-1 p-3 bg-gray-50 rounded-lg border border-gray-200 outline-none focus:border-primary",placeholder:"Enter new password",required:!0})]}),(0,g.jsx)("button",{type:"submit",disabled:d.isPending,className:"w-full bg-primary hover:bg-primary-dark text-white py-3 rounded-xl font-bold uppercase tracking-wider mt-4 shadow-lg shadow-primary/20 transition-all disabled:opacity-50",children:d.isPending?"Upd
2ating...":"Update Password"})]})]})})},v=()=>{const e=(0,x.jE)(),[t,s]=(0,r.useState)(null),[i,n]=(0,r.useState)(null),[v,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)({firstName:"",lastName:"",email:"",phone:"",userId:""});(0,r.useEffect)(()=>{const e=JSON.parse(localStorage.getItem("auth"));if(e&&e.userDetails){const a=e.userDetails;let r=a.firstName||"",i=a.lastName||"";if(!r&&!i&&a.name){const e=a.name.trim().split(" ");r=e[0]||"",i=e.slice(1).join(" ")||""}if(N({firstName:r,lastName:i,email:a.email||"",phone:a.phone||"",userId:a.id}),e.userDetails.profileImage){let a=e.userDetails.profileImage;if(a.startsWith("http"))s(a);else{var t;const e=null===(t="https://www.bagchee.com/api")?void 0:t.replace("/api","").replace(/\/$/,""),r=a.replace(/\\/g,"/"),i=r.startsWith("/")?r:"/".concat(r),l="".concat(e).concat(i);s(l)}}}},[]);const A=(0,p.n)({mutationFn:async e=>{const t=JSON.parse(localStorage.getItem("auth")),s="".concat(b,"/user/update");return(await m.A.patch(s,e,{headers:{"Content-Type":"multipart/form-data",Authorization:"Bearer ".concat(null===t||void 0===t?void 0:t.token)}})).data},onSuccess:t=>{if(t.status){h.Ay.success("Profile Updated Successfully!");const r=JSON.parse(localStorage.getItem("auth"));if(r&&t.data){var s;const e=t.data;r.userDetails=(0,a.A)((0,a.A)({},r.userDetails),{},{firstName:e.firstName,lastName:e.lastName,name:e.name||"".concat(e.firstName," ").concat(e.lastName).trim(),phone:e.phone,profileImage:null!==(s=e.profileImage)&&void 0!==s?s:r.userDetails.profileImage}),localStorage.setItem("auth",JSON.stringify(r))}e.invalidateQueries(["user-profile"])}else h.Ay.error(t.msg)},onError:e=>{var t,s;h.Ay.error((null===(t=e.response)||void 0===t||null===(s=t.data)||void 0===s?void 0:s.msg)||"Update failed")}}),k=e=>N((0,a.A)((0,a.A)({},w),{},{[e.target.name]:e.target.value}));return(0,g.jsxs)(u.A,{children:[(0,g.jsxs)("div",{className:"max-w-4xl mx-auto font-montserrat",children:[(0,g.jsxs)("div",{className:"mb-8",children:[(0,g.jsx)("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"My Profile"}),(0,g.jsx)("p",{className:"text-gray-600",children:"Manage your personal information"})]}),(0,g.jsxs)("form",{onSubmit:e=>{e.preventDefault();const t=new FormData;t.append("userId",w.userId),t.append("firstName",w.firstName),t.append("lastName",w.lastName),t.append("phone",w.phone),i&&t.append("profileImage",i),A.mutate(t)},className:"bg-cream-100 rounded-xl shadow-sm border border-gray-200 overflow-hidden",children:[(0,g.jsxs)("div",{className:"flex flex-col md:flex-row items-center gap-6 md:gap-8 p-6 md:p-8 bg-cream-100 border-b border-gray-200",children:[(0,g.jsxs)("div",{className:"relative group shrink-0",children:[(0,g.jsx)("div",{className:"w-24 h-24 md:w-28 md:h-28 rounded-full bg-white border-4 border-white shadow-lg overflow-hidden flex items-center justify-center relative ring-2 ring-gray-100",children:t?(0,g.jsx)("img",{src:t,alt:"Profile",className:"w-full h-full object-cover"}):(0,g.jsx)(o.A,{size:48,className:"text-gray-400"})}),(0,g.jsx)("label",{htmlFor:"file-upload",className:"absolute bottom-1 right-1 bg-primary hover:bg-primary-dark text-white p-2 rounded-full shadow-lg cursor-pointer transition-all hover:scale-110 border-2 border-white",children:(0,g.jsx)(c,{size:16})}),(0,g.jsx)("input",{id:"file-upload",type:"file",accept:"image/*",onChange:e=>{const t=e.target.files[0];t&&(n(t),s(URL.createObjectURL(t)))},className:"hidden"})]}),(0,g.jsxs)("div",{className:"text-center md:text-left",children:[(0,g.jsx)("h3",{className:"text-lg font-bold text-gray-900",children:"Profile Photo"}),(0,g.jsx)("p",{className:"text-sm text-gray-600 mt-1 mb-2",children:"Upload a high-quality photo."}),(0,g.jsx)("p",{className:"text-xs font-bold tracking-wide",children:i?(0,g.jsx)("span",{className:"text-primary",children:"Photo Selected"}):(0,g.jsx)("span",{className:"text-gray-400",children:"No file chosen"})})]})]}),(0,g.jsxs)("div",{className:"px-5 md:px-10 py-6",children:[(0,g.jsxs)("h2",{className:"text-xs font-bold text-primary uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,g.jsx)(o.A,{size:14})," Personal Details"]}
2),(0,g.jsx)(f,{label:"First Name",isInput:!0,name:"firstName",value:w.firstName,onChange:k,icon:d}),(0,g.jsx)(f,{label:"Last Name",isInput:!0,name:"lastName",value:w.lastName,onChange:k,icon:d}),(0,g.jsx)(f,{label:"Phone",isInput:!0,name:"phone",type:"tel",value:w.phone,onChange:k,icon:d}),(0,g.jsx)("div",{className:"my-8 border-t border-dashed border-gray-200"}),(0,g.jsxs)("h2",{className:"text-xs font-bold text-primary uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,g.jsx)(l,{size:14})," Account Security"]}),(0,g.jsx)(f,{label:"Email",isInput:!0,value:w.email,readOnly:!0}),(0,g.jsxs)("div",{onClick:()=>j(!0),className:"group flex flex-col md:flex-row items-start md:items-center justify-between py-5 border-b border-gray-100 px-2 transition-all gap-3 md:gap-0 hover:bg-gray-50 rounded-lg cursor-pointer",children:[(0,g.jsx)("div",{className:"w-full md:w-1/3",children:(0,g.jsx)("span",{className:"text-sm font-bold text-gray-600 uppercase tracking-wider",children:"Password"})}),(0,g.jsxs)("div",{className:"w-full md:w-2/3 flex items-center justify-between gap-4",children:[(0,g.jsx)("span",{className:"text-base font-medium text-gray-900",children:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"}),(0,g.jsx)("div",{className:"text-gray-400 group-hover:text-primary transition-colors p-2 bg-gray-100 rounded-full group-hover:bg-primary-50",children:(0,g.jsx)(d,{size:16})})]})]})]}),(0,g.jsx)("div",{className:"px-6 py-4 md:py-6 border-t border-gray-200 flex flex-col md:flex-row items-center justify-end gap-3 bg-gray-50",children:(0,g.jsx)("button",{type:"submit",disabled:A.isPending,className:"w-full md:w-auto bg-primary hover:bg-primary-hover text-white px-10 py-3 rounded-lg text-sm font-bold uppercase tracking-widest shadow-lg shadow-primary/20 transition-all disabled:opacity-50 disabled:cursor-not-allowed font-montserrat",children:A.isPending?"Saving...":"Save Changes"})})]})]}),(0,g.jsx)(y,{isOpen:v,onClose:()=>j(!1),userId:w.userId})]})}}}]);
3//# sourceMappingURL=9925.861e5c8e.chunk.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.