1import{o as Oe}from"./rolldown-runtime-ChpBd9eV.js";import{$n as He,$t as de,Dn as We,Dt as xe,Ei as p,Fi as b,Gt as Je,La as Ke,Lt as Qe,Ma as Ze,Na as es,Ni as $,On as ss,Sr as c,St as ue,T as ts,Ta as as,Ti as q,Yn as R,Yt as ls,_i as me,at as rs,bi as F,bn as is,dn as ns,ft as os,g as cs,gi as ds,gn as xs,ja as us,ji as T,mn as ms,mt as he,on as hs,pt as fs,qt as fe,un as A,vi as C,vt as pe,xi as V}from"./chat-page-evUfHQgD.js";import{Vr as ps}from"./community-page-CrngAMw5.js";import{At as gs,St as ws,bt as bs,kt as js,l as vs,zt as Ns}from"./education-page-vD6yUpCZ.js";var l=Oe(Ke(),1),e=as(),Rs=({user:j,bookmarks:D=[],onBookmark:z})=>{const{videoId:d}=es(),v=Ze(),ge=us(),r=(0,l.useRef)(null),Y=(0,l.useRef)(null),u=(0,l.useRef)(null),x=ge.state?.videoData,[t,g]=(0,l.useState)(x||null),[we,M]=(0,l.useState)(!x),[G,X]=(0,l.useState)(null),[o,E]=(0,l.useState)(!1),[N,O]=(0,l.useState)(!1),[H,W]=(0,l.useState)(!1),[J,be]=(0,l.useState)(1),[je,ve]=(0,l.useState)(0),[m,Ne]=(0,l.useState)(0),[K,ye]=(0,l.useState)(0),[L,y]=(0,l.useState)(!0),[Q,ke]=(0,l.useState)(1),[Z,ee]=(0,l.useState)(!1),[Se,$e]=(0,l.useState)(0),[I,_]=(0,l.useState)(!1),[h,se]=(0,l.useState)(!1),[f,te]=(0,l.useState)(!1),[ae,Re]=(0,l.useState)(!1),[P,Fe]=(0,l.useState)(!1),[n,Te]=(0,l.useState)([]),[le,Ce]=(0,l.useState)([]),[U,Ve]=(0,l.useState)("overview"),[k,De]=(0,l.useState)(!0),w=(0,l.useMemo)(()=>t?.videoUrl?.includes("youtube.com")||t?.videoUrl?.includes("youtu.be"),[t?.videoUrl]),Me=(0,l.useMemo)(()=>{if(!w||!t?.videoUrl)return null;for(const s of[/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([^&\n?#]+)/,/youtube\.com\/watch\?.*v=([^&\n?#]+)/]){const a=t.videoUrl.match(s);if(a)return a[1]}return null},[w,t?.videoUrl]),Ee=(0,l.useMemo)(()=>[{id:"overview",label:"Overview",icon:de},{id:"comments",label:"Comments",icon:ns}],[]);(0,l.useEffect)(()=>(o&&L&&!w&&(u.current=setTimeout(()=>{y(!1)},3e3)),()=>{u.current&&clearTimeout(u.current)}),[o,L,w]);const re=(0,l.useCallback)(async()=>{if(!(ae||!t?.id))try{await q($(c,"educationVideos",t.id),{views:b(1)}),g(s=>({...s,views:(s?.views||0)+1})),Re(!0)}catch(s){console.error("Error tracking view:",s)}},[t?.id,ae]);(0,l.useEffect)(()=>{(async()=>{if(d){if(x&&x.id===d){g(x),M(!1),_(D.includes(d)),await ie(x),await ne(),setTimeout(()=>re(),3e3);return}try{M(!0);const a=await ds($(c,"educationVideos",d));if(!a.exists()){X("Video not found");return}const i={id:a.id,...a.data()};g(i),_(D.includes(d)),await ie(i),await ne(),setTimeout(()=>re(),3e3)}catch(a){console.error("Error loading video:",a),X("Failed to load video")}finally{M(!1)}}})()},[d,x,D]);const ie=async s=>{try{let a;s?.tags&&s.tags.length>0?a=V(T(c,"educationVideos"),p("tags","array-contains-any",s.tags.slice(0,3)),p("status","==","published"),F("views","desc"),C(10)):s?.category?a=V(T(c,"educationVideos"),p("category","==",s.category),p("status","==","published"),F("views","desc"),C(10)):a=V(T(c,"educationVideos"),p("status","==","published"),F("views","desc"),C(10)),Te((await me(a)).docs.map(i=>({id:i.id,...i.data()})).filter(i=>i.id!==s?.id).slice(0,8))}catch(a){console.error("Error loading related videos:",a)}},ne=async()=>{try{Ce((await me(V(T(c,"educationVideos"),p("status","==","published"),F("views","desc"),C(6)))).docs.map(s=>({id:s.id,...s.data()})).filter(s=>s.id!==d).slice(0,5))}catch(s){console.error("Error loading trending videos:",s)}},Le=async()=>{if(j)try{const s=h?-1:1,a=f?-1:0;await q($(c,"educationVideos",t.id),{likes:b(s),dislikes:b(a)}),g(i=>({...i,likes:(i?.likes||0)+s,dislikes:(i?.dislikes||0)+a})),se(!h),f&&te(!1)}catch(s){console.error("Error updating like:",s)}},Ie=async()=>{if(j)try{const s=f?-1:1,a=h?-1:0;await q($(c,"educationVideos",t.id),{dislikes:b(s),likes:b(a)}),g(i=>({...i,dislikes:(i?.dislikes||0)+s,likes:(i?.likes||0)+a})),te(!f),h&&se(!1)}catch(s){console.error("Error updating dislike:",s)}},_e=async()=>{if(j)try{z&&await z(t.id),_(!I)}catch(s){console.error("Error bookmarking video:",s)}},oe=async()=>{try{navigator.share?await navigator.share({title:t.title,text:t.description||"Check out this video",url:window.location.href}):await navigator.clipboard.writeText(window.location.href)}catch(s){console.error("Error sharing:",s)}},B=()=>{r.current&&(o?r.current.pause():r.current.play().catch(console.error))},Pe=()=>{r.current&&(r.current.muted=!N,O(!N))},Ue=s=>{const a=parseFloat(s.target.value);be(a),r.current&&(r.current.volume=a,O(a===0))},Be=s=>{const a=s.currentTarget.getBoundingClientRect(),i=(s.clientX-a.left)/a.width;r.current&&m&&(r.current.currentTime=i*m)},qe=()=>{r.current&&(r.current.currentTime=Math.min(m,r.current.currentTime+10))},Ae=()=>{r.current&&(r.current.currentTime=Math.max(0,r.current.currentTime-10))},ze=s=>{ke(s),r.current&&(r.current.playbackRate=s),ee(!1)},Ye=async()=>{try{document.fullscreenElement?(await document.exitFullscreen(),W(!1)):(await Y.current?.requestFullscreen(),W(!0))}catch(s){console.error("Fullscreen error:",s)}},Ge=()=>{y(!0),u.current&&clearTimeout(u.current),o&&(u.current=setTimeout(()=>{y(!1)},3e3))},ce=s=>!s||isNaN(s)?"0:00":`${Math.floor(s/60)}:${Math.floor(s%60).toString().padStart(2,"0")}`,Xe=s=>{if(!s)return"Recently";try{return(s.toDate?s.toDate():new Date(s)).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"Recently"}},S=s=>{v(`/education/video/${s.id}`,{state:{videoData:s}})};return we?(0,e.jsx)(ts,{}):G||!t?(0,e.jsx)("div",{className:"min-h-screen theme-page bg-[var(--bg-primary)] flex items-center justify-center",children:(0,e.jsxs)("div",{className:"text-center max-w-md px-6",children:[(0,e.jsx)("div",{className:"w-20 h-20 bg-red-500/20 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,e.jsx)(ls,{className:"w-10 h-10 text-red-400"})}),(0,e.jsx)("h2",{className:"text-2xl font-bold text-[var(--text-primary)] mb-3",children:"Video Not Found"}),(0,e.jsx)("p",{className:"text-[var(--text-secondary)] mb-6",children:G||"The video you're looking for doesn't exist or has been removed."}),(0,e.jsxs)("div",{className:"flex gap-3 justify-center",children:[(0,e.jsx)("button",{onClick:()=>v(-1),className:"px-6 py-3 bg-slate-700 hover:bg-slate-600 text-white rounded-xl transition-colors",children:"Go Back"}),(0,e.jsx)("button",{onClick:()=>v("/education-hub"),className:"px-6 py-3 bg-purple-600 hover:bg-purple-700 text-white rounded-xl transition-colors",children:"Browse Videos"})]})]})}):(0,e.jsxs)("div",{className:"min-h-screen theme-page bg-[var(--bg-primary)] text-[var(--text-primary)]",children:[(0,e.jsx)("div",{className:"sticky top-0 z-40 bg-slate-950/95 backdrop-blur-xl border-b border-slate-800",children:(0,e.jsxs)("div",{className:"w-full px-4 py-3 flex items-center justify-between",children:[(0,e.jsxs)("button",{onClick:()=>v(-1),className:"flex items-center gap-2 text-slate-400 hover:text-white transition-colors",children:[(0,e.jsx)(ss,{className:"w-5 h-5"}),(0,e.jsx)("span",{className:"hidden sm:inline",children:"Back"})]}),(0,e.jsx)("h1",{className:"text-lg font-semibold text-white truncate max-w-md px-4",children:t.title}),(0,e.jsx)("div",{className:"flex items-center gap-2",children:(0,e.jsx)("button",{onClick:oe,className:"p-2 hover:bg-slate-800 rounded-lg transition-colors",title:"Share",children:(0,e.jsx)(pe,{className:"w-5 h-5 text-slate-400"})})})]})}),(0,e.jsx)("div",{className:"w-full px-0 lg:px-6",children:(0,e.jsxs)("div",{className:"flex flex-col xl:flex-row gap-6",children:[(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("div",{ref:Y,className:`relative bg-black w-full ${H?"fixed inset-0 z-50":"aspect-video lg:rounded-xl overflow-hidden"}`,onMouseMove:Ge,onMouseLeave:()=>o&&y(!1),children:w?(0,e.jsx)(cs,{videoId:Me,title:t?.title,className:"absolute inset-0 w-full h-full",params:{enablejsapi:"1",origin:window.location.origin}}
1):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("video",{ref:r,src:t.videoUrl,className:"w-full h-full object-contain",playsInline:!0,onClick:B,onTimeUpdate:s=>{ve(s.target.currentTime),ye(s.target.currentTime/m*100)},onLoadedMetadata:s=>{Ne(s.target.duration)},onProgress:s=>{s.target.buffered.length>0&&$e(s.target.buffered.end(0)/m*100)},onPlay:()=>E(!0),onPause:()=>E(!1),onEnded:()=>{E(!1),k&&n.length>0&&setTimeout(()=>S(n[0]),2e3)}}),(0,e.jsxs)("div",{className:`absolute inset-0 flex flex-col justify-between transition-opacity duration-300 ${L?"opacity-100":"opacity-0"}`,children:[(0,e.jsx)("div",{className:"h-24 bg-gradient-to-b from-black/70 to-transparent"}),(0,e.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,e.jsx)("button",{onClick:B,className:`w-20 h-20 rounded-full flex items-center justify-center transition-all pointer-events-auto ${o?"bg-black/40 hover:bg-black/60 scale-90":"bg-white/90 hover:bg-white shadow-2xl scale-100"}`,children:o?(0,e.jsx)(xe,{className:"w-10 h-10 text-white"}):(0,e.jsx)(ue,{className:"w-10 h-10 text-slate-900 ml-1"})})}),(0,e.jsxs)("div",{className:"bg-gradient-to-t from-black/80 to-transparent p-4",children:[(0,e.jsxs)("div",{className:"h-1.5 bg-white/30 rounded-full overflow-hidden cursor-pointer mb-4 group relative",onClick:Be,children:[(0,e.jsx)("div",{className:"absolute h-full bg-white/30 rounded-full",style:{width:`${Se}%`}}),(0,e.jsx)("div",{className:"absolute h-full bg-purple-500 rounded-full transition-all",style:{width:`${K}%`}}),(0,e.jsx)("div",{className:"absolute top-1/2 -translate-y-1/2 w-4 h-4 bg-purple-500 rounded-full opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",style:{left:`calc(${K}% - 8px)`}})]}),(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 sm:gap-4",children:[(0,e.jsx)("button",{onClick:B,className:"p-2 hover:bg-white/20 rounded-lg transition-colors",children:o?(0,e.jsx)(xe,{className:"w-6 h-6 text-white"}):(0,e.jsx)(ue,{className:"w-6 h-6 text-white"})}),(0,e.jsx)("button",{onClick:Ae,className:"p-2 hover:bg-white/20 rounded-lg transition-colors hidden sm:block",title:"Rewind 10s",children:(0,e.jsx)(js,{className:"w-5 h-5 text-white"})}),(0,e.jsx)("button",{onClick:qe,className:"p-2 hover:bg-white/20 rounded-lg transition-colors hidden sm:block",title:"Forward 10s",children:(0,e.jsx)(ws,{className:"w-5 h-5 text-white"})}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("button",{onClick:Pe,className:"p-2 hover:bg-white/20 rounded-lg transition-colors",children:N||J===0?(0,e.jsx)(os,{className:"w-5 h-5 text-white"}):(0,e.jsx)(fs,{className:"w-5 h-5 text-white"})}),(0,e.jsx)("input",{type:"range",min:"0",max:"1",step:"0.1",value:N?0:J,onChange:Ue,className:"w-20 accent-purple-500 hidden sm:block"})]}),(0,e.jsxs)("span",{className:"text-white text-sm font-mono",children:[ce(je)," / ",ce(m)]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsxs)("button",{onClick:()=>ee(!Z),className:"px-2 py-1 hover:bg-white/20 rounded-lg transition-colors text-white text-sm",children:[Q,"x"]}),Z&&(0,e.jsx)("div",{className:"absolute bottom-full right-0 mb-2 bg-slate-800 rounded-lg shadow-xl overflow-hidden",children:[.5,.75,1,1.25,1.5,2].map(s=>(0,e.jsxs)("button",{onClick:()=>ze(s),className:`block w-full px-4 py-2 text-sm text-left hover:bg-slate-700 ${Q===s?"text-purple-400":"text-white"}`,children:[s,"x"]},s))})]}),(0,e.jsx)("button",{onClick:Ye,className:"p-2 hover:bg-white/20 rounded-lg transition-colors",children:H?(0,e.jsx)(gs,{className:"w-5 h-5 text-white"}):(0,e.jsx)(is,{className:"w-5 h-5 text-white"})})]})]})]})]})]})}),(0,e.jsxs)("div",{className:"p-4 lg:p-6",children:[(0,e.jsx)("h1",{className:"text-xl lg:text-2xl font-bold text-white mb-4",children:t.title}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 pb-4 border-b border-slate-800",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4 text-sm text-slate-400",children:[(0,e.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(fe,{className:"w-4 h-4"}
1),(t.views||0).toLocaleString()," views"]}),(0,e.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(ms,{className:"w-4 h-4"}),Xe(t.createdAt)]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsxs)("button",{onClick:Le,className:`flex items-center gap-2 px-4 py-2 rounded-full transition-all ${h?"bg-purple-600 text-white":"bg-slate-800 text-slate-300 hover:bg-slate-700"}`,children:[h?(0,e.jsx)(ps,{className:"w-5 h-5"}):(0,e.jsx)(Qe,{className:"w-5 h-5"}),(0,e.jsx)("span",{children:t.likes||0})]}),(0,e.jsx)("button",{onClick:Ie,className:`flex items-center gap-2 px-4 py-2 rounded-full transition-all ${f?"bg-red-600 text-white":"bg-slate-800 text-slate-300 hover:bg-slate-700"}`,children:f?(0,e.jsx)(Ns,{className:"w-5 h-5"}):(0,e.jsx)(bs,{className:"w-5 h-5"})}),(0,e.jsxs)("button",{onClick:_e,className:`flex items-center gap-2 px-4 py-2 rounded-full transition-all ${I?"bg-blue-600 text-white":"bg-slate-800 text-slate-300 hover:bg-slate-700"}`,children:[I?(0,e.jsx)(He,{className:"w-5 h-5"}):(0,e.jsx)(xs,{className:"w-5 h-5"}),(0,e.jsx)("span",{className:"hidden sm:inline",children:"Save"})]}),(0,e.jsxs)("button",{onClick:oe,className:"flex items-center gap-2 px-4 py-2 bg-slate-800 text-slate-300 hover:bg-slate-700 rounded-full transition-all",children:[(0,e.jsx)(pe,{className:"w-5 h-5"}),(0,e.jsx)("span",{className:"hidden sm:inline",children:"Share"})]})]})]}),(0,e.jsxs)("div",{className:"flex items-center justify-between py-4 border-b border-slate-800",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)("div",{className:"w-12 h-12 bg-gradient-to-br from-purple-600 to-blue-600 rounded-full flex items-center justify-center",children:(0,e.jsx)(rs,{className:"w-6 h-6 text-white"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"font-semibold text-white",children:t.creatorName||t.authorInfo?.name||"TradeIntelX"}),(0,e.jsxs)("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[(0,e.jsx)("span",{className:"capitalize",children:t.category||"Education"}),(0,e.jsx)("span",{children:"â¢"}),(0,e.jsx)("span",{className:"capitalize",children:t.difficulty||"All Levels"})]})]})]}),t.tags&&t.tags.length>0&&(0,e.jsx)("div",{className:"hidden md:flex flex-wrap gap-2",children:t.tags.slice(0,4).map((s,a)=>(0,e.jsxs)("span",{className:"px-3 py-1 bg-purple-600/20 text-purple-300 text-xs rounded-full",children:["#",s]},a))})]}),(0,e.jsxs)("div",{className:"py-4",children:[(0,e.jsx)("div",{className:`text-slate-300 leading-relaxed ${P?"":"line-clamp-3"}`,children:t.description||"No description available for this video."}),t.description&&t.description.length>150&&(0,e.jsx)("button",{onClick:()=>Fe(!P),className:"text-purple-400 hover:text-purple-300 text-sm mt-2 font-medium transition-colors",children:P?"Show less":"Show more"})]}),(0,e.jsxs)("div",{className:"border-t border-slate-800 pt-4",children:[(0,e.jsx)("div",{className:"flex gap-4 mb-4",children:Ee.map(s=>(0,e.jsxs)("button",{onClick:()=>Ve(s.id),className:`flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-colors ${U===s.id?"bg-purple-600 text-white":"text-slate-400 hover:text-white hover:bg-slate-800"}`,children:[(0,e.jsx)(s.icon,{className:"w-4 h-4"}),s.label]},s.id))}),(0,e.jsxs)("div",{className:"min-h-[300px]",children:[U==="overview"&&(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{children:[(0,e.jsxs)("h3",{className:"text-lg font-semibold text-white mb-3 flex items-center gap-2",children:[(0,e.jsx)(he,{className:"w-5 h-5 text-purple-400"}),"What You'll Learn"]}),(0,e.jsxs)("ul",{className:"space-y-3",children:[(0,e.jsxs)("li",{className:"flex items-start gap-3 text-slate-300",children:[(0,e.jsx)(A,{className:"w-5 h-5 text-green-400 flex-shrink-0 mt-0.5"}),(0,e.jsx)("span",{children:"Master the key concepts and strategies covered in this video"})]}),(0,e.jsxs)("li",{className:"flex items-start gap-3 text-slate-300",children:[(0,e.jsx)(A,{className:"w-5 h-5 text-green-400 flex-shrink-0 mt-0.5"}),(0,e.jsx)("span",{children:"Apply practical techniques to improve your trading"})]}),(0,e.jsxs)("li",{className:"flex items-start gap-3 text-slate-300",children:[(0,e.jsx)(A,{className:"w-5 h-5 text-green-400 flex-shrink-0 mt-0.5"}),(0,e.jsx)("span",{children:"Understand risk management principles"})]})]})]}),t.resources&&t.resources.length>0&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("h3",{className:"text-lg font-semibold text-white mb-3 flex items-center gap-2",children:[(0,e.jsx)(de,{className:"w-5 h-5 text-blue-400"}),"Resources"]}),(0,e.jsx)("div",{className:"space-y-2",children:t.resources.map((s,a)=>(0,e.jsxs)("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between p-3 bg-slate-800/50 rounded-lg hover:bg-slate-800 transition-colors",children:[(0,e.jsx)("span",{className:"text-slate-300",children:s.title}),(0,e.jsx)(hs,{className:"w-4 h-4 text-slate-500"})]},a))})]})]}),U==="comments"&&(0,e.jsx)(vs,{videoId:t.id,user:j})]})]})]})]}),(0,e.jsxs)("div",{className:"w-full xl:w-[380px] xl:border-l border-slate-800 p-4 xl:max-h-screen xl:overflow-y-auto",children:[n.length>0&&(0,e.jsxs)("div",{className:"mb-6",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,e.jsxs)("h3",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[(0,e.jsx)(We,{className:"w-5 h-5 text-purple-400"}),"Up Next"]}),(0,e.jsxs)("label",{className:"flex items-center gap-2 text-sm text-slate-400",children:[(0,e.jsx)("span",{children:"Autoplay"}),(0,e.jsx)("button",{onClick:()=>De(!k),className:`w-10 h-6 rounded-full transition-colors ${k?"bg-purple-600":"bg-slate-700"}`,children:(0,e.jsx)("div",{className:`w-4 h-4 bg-white rounded-full transition-transform ${k?"translate-x-5":"translate-x-1"}`})})]})]}),(0,e.jsxs)("div",{onClick:()=>S(n[0]),className:"relative rounded-xl overflow-hidden cursor-pointer group mb-4",children:[(0,e.jsx)("div",{className:"aspect-video bg-slate-800",children:n[0].thumbnail?(0,e.jsx)("img",{src:n[0].thumbnail,alt:n[0].title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}):(0,e.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-purple-600/20 to-blue-600/20",children:(0,e.jsx)(R,{className:"w-12 h-12 text-white/40"})})}),(0,e.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent flex flex-col justify-end p-4",children:[(0,e.jsx)("h4",{className:"font-semibold text-white line-clamp-2 mb-1",children:n[0].title}),(0,e.jsxs)("div",{className:"flex items-center gap-2 text-xs text-slate-300",children:[(0,e.jsx)(fe,{className:"w-3 h-3"}
1),(0,e.jsxs)("span",{children:[(n[0].views||0).toLocaleString()," views"]})]})]}),(0,e.jsx)("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:(0,e.jsx)("div",{className:"w-14 h-14 bg-white/90 rounded-full flex items-center justify-center shadow-xl",children:(0,e.jsx)(R,{className:"w-6 h-6 text-slate-900"})})})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsxs)("h3",{className:"text-lg font-semibold text-white mb-4 flex items-center gap-2",children:[(0,e.jsx)(he,{className:"w-5 h-5 text-yellow-400"}),"Related Videos"]}),(0,e.jsxs)("div",{className:"space-y-3",children:[n.slice(1).map(s=>(0,e.jsxs)("div",{onClick:()=>S(s),className:"flex gap-3 p-2 hover:bg-slate-800/50 rounded-xl cursor-pointer transition-colors group",children:[(0,e.jsxs)("div",{className:"w-40 h-24 bg-slate-800 rounded-lg flex-shrink-0 overflow-hidden relative",children:[s.thumbnail?(0,e.jsx)("img",{src:s.thumbnail,alt:s.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}):(0,e.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-purple-600/20 to-blue-600/20",children:(0,e.jsx)(R,{className:"w-8 h-8 text-white/40"})}),s.duration&&(0,e.jsx)("span",{className:"absolute bottom-1 right-1 px-1.5 py-0.5 bg-black/80 text-white text-xs rounded",children:s.duration})]}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("h4",{className:"font-medium text-white text-sm line-clamp-2 mb-1 group-hover:text-purple-400 transition-colors",children:s.title}),(0,e.jsx)("p",{className:"text-xs text-slate-500 mb-1",children:s.creatorName||"TradeIntelX"}),(0,e.jsx)("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:(0,e.jsxs)("span",{children:[(s.views||0).toLocaleString()," views"]})})]})]},s.id)),n.length===0&&(0,e.jsx)("div",{className:"text-center py-8",children:(0,e.jsx)("p",{className:"text-slate-500",children:"No related videos found"})})]})]}),le.length>0&&(0,e.jsxs)("div",{className:"mt-8 pt-6 border-t border-slate-800",children:[(0,e.jsxs)("h3",{className:"text-lg font-semibold text-white mb-4 flex items-center gap-2",children:[(0,e.jsx)(Je,{className:"w-5 h-5 text-orange-400"}),"Trending Now"]}),(0,e.jsx)("div",{className:"space-y-3",children:le.map((s,a)=>(0,e.jsxs)("div",{onClick:()=>S(s),className:"flex items-center gap-3 p-2 hover:bg-slate-800/50 rounded-xl cursor-pointer transition-colors group",children:[(0,e.jsx)("span",{className:"text-2xl font-bold text-slate-600 w-8",children:a+1}),(0,e.jsx)("div",{className:"w-20 h-14 bg-slate-800 rounded-lg flex-shrink-0 overflow-hidden",children:s.thumbnail?(0,e.jsx)("img",{src:s.thumbnail,alt:s.title,className:"w-full h-full object-cover"}):(0,e.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-purple-600/20 to-blue-600/20",children:(0,e.jsx)(R,{className:"w-5 h-5 text-white/40"})})}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("h4",{className:"font-medium text-white text-sm line-clamp-2 group-hover:text-purple-400 transition-colors",children:s.title}),(0,e.jsxs)("span",{className:"text-xs text-slate-500",children:[(s.views||0).toLocaleString()," views"]})]})]},s.id))})]})]})]})})]})};export{Rs 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.