1import{b as ze,i as He,R as We,K as qe,f as Qe,d as Ce,m as W,j as r,a,F as $e,U as Ke,V as Je}from"./index-7a84a097.js";import{u as _e,e as Ge,l as Xe,r as m,o as Ye,q as Ze}from"./vendor-56877fa0.js";import"./swiper-react-a99c8e34.js";import{u as er}from"./index-cd5be65c.js";/* empty css */import{B as te}from"./BlogLayout-8b255bfb.js";import{c as I}from"./slugUtils-3accbaf0.js";import{B as rr}from"./BlogDataManagement-9ec6fa25.js";import{T as tr}from"./TaskManagement-3046c763.js";import{u as ar}from"./useBlogOptimizations-7664d3cc.js";import{u as or}from"./CheckPermissions-afd20e60.js";import{F as sr}from"./data-f4081293.js";import{a as lr}from"./blogService-2e13b1ad.js";import{u as nr,g as ir}from"./uploadFileToWordpress-4368437d.js";import{P as cr}from"./pen-line-bde60f37.js";import{R as Pe}from"./refresh-cw-1e477dcd.js";import{L as dr}from"./list-checks-0f5182fa.js";import{X as mr}from"./x-f4d47a47.js";import{C as gr}from"./camera-8900dd3c.js";import{C as ur}from"./chevron-down-d60fcb04.js";import{C as hr}from"./chevron-right-699598bb.js";import{C as fr}from"./clock-06681489.js";import{H as pr}from"./heart-ee5d57aa.js";import{M as br}from"./message-circle-a09b6b0a.js";import"./chart-libs-b4df5823.js";import"./dbUtils-23702e29.js";import"./settings-4fc3767b.js";import"./sun-37068fda.js";import"./menu-7e7bb316.js";import"./user-00eae526.js";import"./crown-de58961d.js";import"./users-7a182e1b.js";import"./book-open-check-06fdd364.js";import"./database-e7449c93.js";import"./log-out-c168f799.js";import"./chevron-up-42504bb0.js";import"./thumbnailUtils-40816877.js";import"./index-1cb706c3.js";import"./index-74208b03.js";import"./index-491523bf.js";import"./index-64b1ca1a.js";import"./eye-ccfe7e06.js";import"./chart-column-d0a218df.js";import"./calendar-0467a7e3.js";import"./search-ae40e1da.js";import"./plus-95e565c6.js";import"./tag-fdc32cdd.js";import"./square-pen-a2723bdc.js";import"./trash-2-c05bd201.js";import"./file-text-475b247c.js";import"./image-f1998b49.js";import"./pin-9055c5f7.js";import"./eye-off-bbc74c7c.js";import"./folder-43a63f99.js";import"./mail-b4c3be00.js";import"./copy-2a43f03c.js";import"./loader-circle-ffdb44c4.js";import"./queryKeys-bc8c2df5.js";const p={primary:"#F97316",secondary:"#FB923C"},ke=({nodes:i,depth:y,categorySlug:c,isDarkMode:b,textSecondary:M,textMuted:f,onSelect:s})=>!i||i.length===0?null:r("div",{className:y>0?"ml-3 border-l border-dashed pl-1":"",style:y>0?{borderColor:b?"#374151":"#e5e7eb"}:void 0,children:i.map(n=>r(yr,{cat:n,depth:y,categorySlug:c,isDarkMode:b,textSecondary:M,textMuted:f,onSelect:s},n.id||n.slug||n.name))}),yr=({cat:i,depth:y,categorySlug:c,isDarkMode:b,textSecondary:M,textMuted:f,onSelect:s})=>{const n=i.slug||I(i.name),g=c===n,E=i.children&&i.children.length>0,F=x=>(x.slug||I(x.name))===c?!0:(x.children||[]).some(S=>F(S)),[h,q]=m.useState(E?F(i):!1);return a("div",{children:[a("div",{className:`group flex items-center gap-1 rounded-lg pr-2 transition ${g?"bg-blue-500 text-white":`${M} hover:bg-blue-500/10`}`,children:[E?r("button",{onClick:()=>q(x=>!x),className:"flex-shrink-0 p-1.5","aria-label":h?"Thu gá»n":"Má» rá»ng",children:h?r(ur,{className:"w-3.5 h-3.5"}):r(hr,{className:"w-3.5 h-3.5"})}):r("span",{className:"w-6 flex-shrink-0"}),a("button",{onClick:()=>s(n),className:"flex-1 min-w-0 py-1.5 text-left text-sm font-medium truncate",title:i.name,children:[i.name,typeof i.postCount=="number"&&a("span",{className:`ml-1.5 text-xs ${g?"text-white/80":f}`,children:["(",i.postCount,")"]})]})]}),E&&h&&r(ke,{nodes:i.children,depth:y+1,categorySlug:c,isDarkMode:b,textSecondary:M,textMuted:f,onSelect:s})]})},Pt=()=>{var pe,be,ye,xe,ve,we,Ne;const{categorySlug:i}=_e(),[y]=Ge(),c=Xe(),[b,M]=m.useState("");m.useState(null);const f=y.get("tab")==="management"?"management":y.get("tab")==="tasks"?"tasks":"home",s=ze(e=>e.user.user),{siteSettings:n}=He(s),{userData:g,createOrUpdateUserData:E,forceFetchData:F}=We({user:s});qe();const{showAlert:h}=Qe(),[q,x]=m.useState(!1),[R,S]=m.useState(!1),[Q,D]=m.useState(""),[ae,oe]=m.useState(!1),[j,se]=m.useState(!1),[K,B]=m.useState(null),[O,V]=m.useState(null),T=or(s,sr.EDIT_ROLE),[xr,Ue]=m.useState(()=>typeof window<"u"?window.innerWidth>=768:!0),[t,le]=m.useState(()=>{const e=localStorage.getItem("homepage-dark-mode");return e?JSON.parse(e):!1});m.useEffect(()=>{const e=()=>{Ue(window.innerWidth>=768)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),m.useEffect(()=>{const e=o=>{o.key==="homepage-dark-mode"&&o.newValue&&le(JSON.parse(o.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]);const J=()=>{const e=!t;le(e),localStorage.setItem("homepage-dark-mode",JSON.stringify(e))},{data:_}=Ce({queryKey:["blogCategoryTree",W],queryFn:()=>lr(s,W,!1),staleTime:5*60*1e3}),G=(_==null?void 0:_.data)||[],L=m.useMemo(()=>{const e=o=>{let l=[];return o.forEach(d=>{l.push(d),d.children&&d.children.length>0&&(l=[...l,...e(d.children)])}),l};return e(G)},[G]),{blogPostsQuery:A,useInfiniteBlogPosts:Me,featuredPostsQuery:ne,popularPostsQuery:Ee,useSearchBlogPosts:Se}=ar({user:s}),{ref:Te,inView:ie}=er({threshold:.1}),ce=m.useMemo(()=>{var e;if(!(!i||L.length===0))return(e=L.find(o=>(o.slug||I(o.name))===i))==null?void 0:e.id},[i,L]),{data:z,fetchNextPage:de,hasNextPage:X,isFetchingNextPage:Y,isLoading:vr,refetch:me}=Me(6,{categoryId:ce,isPublished:!0});m.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"}),me()},[ce,me]),m.useEffect(()=>{ie&&X&&!Y&&de()},[ie,X,Y,de]),(((pe=A.data)==null?void 0:pe.data)||[]).filter(e=>e.isPublished);const Z=(((be=ne.data)==null?void 0:be.data)||[]).filter(e=>e.isPublished);(((ye=Ee.data)==null?void 0:ye.data)||[]).filter(e=>e.isPublished);const ge=m.useMemo(()=>z?z.pages.flatMap(e=>e.data||[]):[],[z]),ue=Se(b,{tags:void 0,sortBy:"RECENT",sortOrder:"DESC"}),Le=A.isLoading&&!z||ne.isLoading,he=m.useMemo(()=>new Set(Z.map(e=>e.id)),[Z]),ee=m.useMemo(()=>{var e;return b&&b.length>2?(((e=ue.data)==null?void 0:e.data)||[]).filter(o=>o.isPublished):ge.filter(o=>!he.has(o.id))},[b,ue.data,ge,he]),N=t?"bg-gray-800":"bg-white",v=t?"border-gray-700":"border-gray-100",C=t?"text-white":"text-gray-900",$=t?"text-gray-300":"text-gray-600",P=t?"text-gray-400":"text-gray-500",Ae=t?"bg-gray-700":"bg-gray-50",Ie=e=>{const o=new Date(e),d=new Date().getTime()-o.getTime(),u=Math.floor(d/(1e3*60*60*24));return u===0?"Today":u===1?"1d":u<7?`${u}d`:u<30?`${Math.floor(u/7)}w`:`${Math.floor(u/30)}mo`},Fe=(e,o)=>{const d=(e||o||"").replace(/<[^>]*>/g,"").split(/\s+/).filter(w=>w.length>0).length;return Math.ceil(d/200)||1},Re=e=>Ce({queryKey:["authorData",e],queryFn:async()=>
1{if(!e)return null;console.log(`[BlogHome] Fetching author data for: ${e}`);const o=await Je(s,e,W,!1);return console.log("[BlogHome] Author data received:",o),o},enabled:!!e,staleTime:10*60*1e3,gcTime:30*60*1e3}),De=e=>{if(e)try{const o=new URL(e,window.location.origin),l=O?Date.now().toString():(g==null?void 0:g.lastLogin)||"";return l&&o.searchParams.set("v",l),o.toString()}catch{const o=e.includes("?")?"&":"?",l=O?Date.now().toString():(g==null?void 0:g.lastLogin)||"";return l?`${e}${o}v=${encodeURIComponent(l)}`:e}},H=()=>{if(s)return O||De(g==null?void 0:g.profilePictureUrl)},k=()=>s?(g==null?void 0:g.name)||(s==null?void 0:s.displayName)||"User":"Guest",je=async()=>{s&&await F()};k(),""+(((ve=(xe=s==null?void 0:s.email)==null?void 0:xe.split("@")[0])==null?void 0:ve.toLowerCase())||"author"),n!=null&&n.loginSlogan,n!=null&&n.mainUrl||W,H()||(n==null||n.logoSquareUrl),n!=null&&n.logoRectangleUrl;const re=()=>{x(!1),S(!1),D(""),B(null),V(null)},Be=()=>{S(!0),D(k())},Oe=()=>{S(!1),D(""),B(null),V(null)},Ve=async e=>{var l;const o=(l=e.target.files)==null?void 0:l[0];if(o){if(!s){h("error","Please log in to upload avatar");return}if(!o.type.startsWith("image/")){h("error","Please select an image file");return}if(o.size>5*1024*1024){h("error","Image size must be less than 5MB");return}try{oe(!0);const d=URL.createObjectURL(o);B(d);const u=await nr(o,`avatar-${s==null?void 0:s.uid}`),U=ir(u);U&&(V(U),await fe(Q||k(),U),h("success","Avatar updated successfully!"))}catch(d){console.error("Avatar upload error:",d),h("error","Failed to upload avatar. Please try again."),B(null)}finally{oe(!1)}}},fe=async(e,o)=>{if(!g||!s){console.warn("Cannot save profile: user not logged in"),h("error","Please log in to update your profile");return}try{se(!0);const l={...g,name:e.trim(),profilePictureUrl:o||g.profilePictureUrl},d=await E(l,!0);if(d&&d.status===200){if(e.trim()!==k()&&s)try{await Ke(s,{displayName:e.trim()})}catch(u){console.error("Error updating Firebase Auth profile:",u)}try{await je(),setTimeout(()=>{V(null)},1e3)}catch(u){console.error("Error refreshing user data:",u)}h("success","Profile updated successfully!"),re()}else h("error",(d==null?void 0:d.message)||"Failed to update profile")}catch(l){console.error("Error saving profile:",l),h("error","Failed to save profile. Please try again.")}finally{se(!1)}};return Le?r(te,{isDarkMode:t,onToggleDarkMode:J,currentMode:f,onModeChange:e=>{c(e==="management"?"/blog?tab=management":e==="tasks"?"/blog?tab=tasks":"/blog")},showManagementOption:T,onCreatePost:()=>c("/blog/create"),children:r("div",{className:"py-8",children:a("div",{className:"flex flex-col lg:flex-row gap-8",children:[r("div",{className:"flex-1",children:r("div",{className:"space-y-6",children:[1,2,3].map(e=>a("div",{className:`${N} rounded-2xl border ${v} overflow-hidden animate-pulse`,children:[r("div",{className:`aspect-video ${t?"bg-gray-700":"bg-gray-200"}`}),a("div",{className:"p-5 space-y-3",children:[r("div",{className:`h-4 ${t?"bg-gray-700":"bg-gray-200"} rounded w-1/4`}),r("div",{className:`h-6 ${t?"bg-gray-700":"bg-gray-200"} rounded w-3/4`}),r("div",{className:`h-4 ${t?"bg-gray-700":"bg-gray-200"} rounded w-full`})]})]},e))})}),r("div",{className:"w-full lg:w-80 flex-shrink-0",children:a("div",{className:`${N} rounded-2xl p-5 animate-pulse`,children:[r("div",{className:`h-6 ${t?"bg-gray-700":"bg-gray-200"} rounded w-1/2 mb-4`}),r("div",{className:"space-y-3",children:[1,2,3,4].map(e=>r("div",{className:`h-4 ${t?"bg-gray-700":"bg-gray-200"} rounded`},e))})]})})]})})}):A.isError?r(te,{isDarkMode:t,onToggleDarkMode:J,currentMode:f,onModeChange:e=>{c(e==="management"?"/blog?tab=management":e==="tasks"?"/blog?tab=tasks":"/blog")},showManagementOption:T,onCreatePost:()=>c("/blog/create"),children:r("div",{className:"py-16 text-center",children:a("div",{className:`max-w-md mx-auto ${N} rounded-2xl border ${v} p-8`,children:[r("div",{className:`w-16 h-16 mx-auto mb-4 ${t?"bg-red-900/30":"bg-red-50"} rounded-full flex items-center justify-center`,children:r("span",{className:"text-2xl",children:"â ï¸"})}),r("h3",{className:`text-lg font-semibold ${C} mb-2`,children:"Error loading posts"}),r("p",{className:`${$} text-sm mb-6`,children:((we=A.error)==null?void 0:we.message)||"Unable to load blog posts. Please try again."}),r("button",{onClick:()=>A.refetch(),className:"px-6 py-2.5 text-gray-900 font-medium rounded-full transition-colors",style:{backgroundColor:p.primary},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=p.secondary},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=p.primary},children:"Try Again"})]})})}):a($e,{children:[r("style",{children:` 2 /* For WebKit browsers (Chrome, Safari, Edge) */ 3 html::-webkit-scrollbar {
4 width: 8px; 5 } 6 html::-webkit-scrollbar-track { 7 background: ${t?"rgba(17, 24, 39, 1)":"rgba(249, 250, 251, 1)"}; 8 } 9 html::-webkit-scrollbar-thumb { 10 background: ${t?"#374151":"#cbd5e1"}; 11 border-radius: 4px; 12 } 13 html::-webkit-scrollbar-thumb:hover { 14 background: ${t?"#4b5563":"#94a3b8"}; 15 } 16 /* For Firefox */ 17 html { 18 scrollbar-width: thin; 19 scrollbar-color: ${t?"#374151 rgba(17, 24, 39, 1)":"#cbd5e1 rgba(249, 250, 251, 1)"}; 20 } 21 22 /* Hide scrollbar for category menu */ 23 .scrollbar-hide::-webkit-scrollbar { 24 display: none; 25 } 26 .scrollbar-hide { 27 -ms-overflow-style: none; 28 scrollbar-width: none; 29 } 30 `}),r(te,{isDarkMode:t,onToggleDarkMode:J,currentMode:f,onModeChange:e=>{c(e==="management"?"/blog?tab=management":"/blog")},showManagementOption:T,onCreatePost:()=>c("/blog/create"),children:a("div",{className:`min-h-screen ${t?"bg-gray-900":"bg-gray-50"}`,style:{},children:[f==="management"&&T&&r("div",{className:`${t?"bg-gray-800":"bg-white"} border-b ${t?"border-gray-700":"border-gray-200"} sticky top-16 z-40`,children:r("div",{className:"max-w-5xl mx-auto px-4 py-6",children:r(rr,{isDarkMode:t,onClose:()=>c("/blog")})})}),f==="tasks"&&T&&r("div",{className:`${t?"bg-gray-800":"bg-white"} border-b ${t?"border-gray-700":"border-gray-200"} sticky top-16 z-40`,children:r("div",{className:"max-w-5xl mx-auto px-4 py-6",children:r(tr,{isDarkMode:t,onClose:()=>c("/blog")})})}),f==="home"&&a($e,{children:[!1,r("div",{className:"px-4",children:r("div",{className:"max-w-5xl mx-auto",children:a("div",{className:"pt-8 pb-12 flex flex-col lg:flex-row gap-8 items-start",children:[a("div",{className:"flex-1 min-w-0
30w-full",children:[Z.length>=0&&r("h3",{className:`text-2xl font-bold ${C} mb-6`,children:i&&L.length>0&&((Ne=L.find(e=>(e.slug||I(e.name))===i))==null?void 0:Ne.name)||"Recent Posts"}),ee.length>0?r("div",{className:"flex flex-col gap-5 pb-12",children:ee.map(e=>r(()=>{const{data:l}=Re(e.author),d=(l==null?void 0:l.name)||e.author||"Unknown Author",u=(l==null?void 0:l.profilePictureUrl)||(n==null?void 0:n.logoSquareUrl),U=Fe(e.content,e.description);return a("div",{onClick:()=>{const w=e.slug||I(e.title||"")||"post";c(`/blog/${w}/${e.id}`)},className:`group cursor-pointer ${N} rounded-2xl border ${v} overflow-hidden transition-all hover:shadow-lg ${t?"hover:border-gray-600":"hover:border-gray-300"} flex flex-col sm:flex-row`,children:[a("div",{className:"relative aspect-[16/10] sm:aspect-auto sm:w-56 sm:min-h-[9rem] overflow-hidden flex-shrink-0",children:[r("img",{src:e.thumbnailUrl||"https://ielts-vuive.com/wp-content/uploads/2025/12/ai-generated-blog-1764976813333.jpg",alt:e.title,className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105"}),e.category&&r("div",{className:"absolute top-3 left-3",children:r("span",{className:"inline-block rounded-full bg-blue-500 px-3 py-1 text-xs font-semibold text-white",children:e.category})})]}),a("div",{className:"p-5 flex flex-col flex-grow min-w-0",children:[r("h3",{className:`text-lg font-bold ${C} leading-tight mb-2 line-clamp-2 group-hover:text-blue-500 transition-colors`,children:e.title}),r("p",{className:`text-sm ${$} leading-relaxed mb-4 line-clamp-3 flex-grow`,children:e.description}),a("div",{className:`flex items-center justify-between pt-4 border-t ${v} mt-auto`,children:[a("div",{className:"flex items-center gap-2",children:[u?r("img",{src:u,alt:d,className:"w-8 h-8 rounded-full flex-shrink-0",onError:w=>{w.target.style.display="none"}}):r("div",{className:"w-8 h-8 rounded-full flex-shrink-0 bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white text-xs font-bold",children:d.split(" ").map(w=>w[0]).join("").toUpperCase().slice(0,2)}),a("div",{className:"flex flex-col min-w-0",children:[r("span",{className:`text-xs font-medium ${C} truncate`,children:d}),a("div",{className:`flex items-center gap-2 text-xs ${P}`,children:[r("span",{children:Ie(e.createdAt)}),r("span",{children:"â¢"}),a("span",{className:"flex items-center gap-1",children:[r(fr,{className:"w-3 h-3"}),U," min"]})]})]})]}),a("div",{className:"flex items-center gap-3 flex-shrink-0",children:[a("div",{className:`flex items-center gap-1 ${P}`,children:[r(pr,{className:"w-4 h-4"}),r("span",{className:"text-xs font-medium",children:e.likes||0})]}),a("div",{className:`flex items-center gap-1 ${P}`,children:[r(br,{className:"w-4 h-4"}),r("span",{className:"text-xs font-medium",children:e.commentCount||0})]})]})]})]})]})},{},e.id))}):a("div",{className:`${N} rounded-2xl border ${v} p-12 text-center`,children:[r("div",{className:`w-20 h-20 mx-auto mb-6 ${Ae} rounded-full flex items-center justify-center`,children:r(cr,{className:`w-10 h-10 ${$}`})}),r("h3",{className:`text-xl font-semibold ${C} mb-2`,children:"No posts yet"}),r("p",{className:`${$} mb-6`,children:"Start creating your first post!"})]}),ee.length>0&&r("div",{ref:Te,className:"py-10 flex justify-center items-center",children:Y?a("div",{className:"flex items-center gap-3 text-blue-500 font-medium",children:[r(Pe,{className:"w-5 h-5 animate-spin"}),r("span",{children:"Loading more posts..."})]}):X?r("div",{className:`text-sm ${P}`,children:"Scroll down to load more"}):r("div",{className:`text-sm ${P}`,children:"You've reached the end"})})]}),r("aside",{className:"w-full lg:w-64 flex-shrink-0 lg:sticky lg:top-24",children:a("div",{className:`${N} rounded-2xl border ${v} overflow-hidden`,children:[a("div",{className:`px-4 py-3 border-b ${v} flex items-center gap-2`,children:[r(dr,{className:"w-4 h-4 text-blue-500"}),r("h3",{className:`text-sm font-bold ${C}`,children:"Danh mục"})]}),a("div",{className:"p-2 max-h-[70vh] overflow-y-auto",children:[r("button",{onClick:()=>c("/blog"),className:`w-full text-left px-3 py-2 rounded-lg text-sm font-medium transition ${i?`${$} hover:bg-blue-500/10`:"bg-blue-500 text-white"}`,children:"Tất cả bà i viết"}),r(ke,{nodes:G,depth:0,categorySlug:i,isDarkMode:t,textSecondary:$,textMuted:P,onSelect:e=>c(`/blog/category/${e}`)})]})]})})]})})})]}),s&&r(Ye,{open:q,onClose:re,maxWidth:"xs",fullWidth:!0,PaperProps:{sx:{borderRadius:3}},children:r(Ze,{sx:{p:0,position:"relative"},children:a("div",{className:`p-6 pb-4 ${t?"bg-gray-800":"bg-white"} border-b ${t?"border-gray-700":"border-gray-100"}`,children:[r("button",{onClick:re,className:"absolute right-4 top-4 roun
30ded-full p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600",children:r(mr,{className:"h-5 w-5"})}),a("div",{className:"flex flex-col items-center gap-3",children:[a("div",{className:"relative",children:[a("div",{className:"w-20 h-20 rounded-full overflow-hidden border-4 shadow-lg",style:{borderColor:p.primary},children:[K||H()?r("img",{src:K||H(),alt:"User avatar",className:"w-full h-full object-cover",onError:e=>{e.target.style.display="none"}}):null,r("div",{className:"absolute inset-0 bg-gradient-to-br from-orange-400 to-pink-500 flex items-center justify-center text-white font-bold text-2xl",style:{display:K||H()?"none":"flex"},children:k().split(" ").map(e=>e.charAt(0)).join("").toUpperCase().slice(0,2)})]}),R&&a("label",{htmlFor:"avatar-upload",className:"absolute bottom-0 right-0 flex cursor-pointer items-center justify-center w-8 h-8 rounded-full text-white transition-colors shadow-lg",style:{backgroundColor:p.primary},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=p.secondary},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=p.primary},children:[ae?r(Pe,{className:"h-4 w-4 animate-spin"}):r(gr,{className:"h-4 w-4"}),r("input",{id:"avatar-upload",type:"file",accept:"image/*",className:"hidden",onChange:Ve,disabled:ae})]})]}),R?r("input",{type:"text",value:Q,onChange:e=>D(e.target.value),className:`w-full rounded-lg border px-3 py-2 text-center text-lg font-semibold focus:outline-none focus:ring-2 focus:ring-orange-500/20 ${t?"bg-gray-700 border-gray-600 text-white":"bg-gray-50 border-gray-300 text-gray-900"}`,placeholder:"Enter your name"}):r("h3",{className:`text-xl font-bold ${t?"text-white":"text-gray-900"}`,children:k()}),r("p",{className:`text-sm ${t?"text-gray-400":"text-gray-500"}`,children:s==null?void 0:s.email}),R?a("div",{className:"flex gap-2 mt-4 w-full",children:[r("button",{onClick:()=>fe(Q,O||void 0),disabled:j,className:"flex-1 rounded-full px-4 py-2 text-sm font-medium text-white transition-all disabled:opacity-50",style:{backgroundColor:p.primary},onMouseEnter:e=>{j||(e.currentTarget.style.backgroundColor=p.secondary)},onMouseLeave:e=>{j||(e.currentTarget.style.backgroundColor=p.primary)},children:j?"Saving...":"Save"}),r("button",{onClick:Oe,className:`flex-1 rounded-full px-4 py-2 text-sm font-medium transition-all ${t?"bg-gray-700 text-white hover:bg-gray-600":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"Cancel"})]}):r("button",{onClick:Be,className:`mt-4 rounded-full px-4 py-2 text-sm font-medium transition-all ${t?"bg-gray-700 text-white hover:bg-gray-600":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"Edit Profile"})]})]})})})]})})]})};export{Pt 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.