1import{j as e}from"./vendor-markdown-Bj2spg3f.js";import{r as l}from"./vendor-react-B-0p-RVf.js";import{b as I,s as X}from"./index-45gJDKBt.js";import{u as V,P as $}from"./Pagination-YjWvfJrB.js";import{Y as L,aX as N,b0 as q,bC as J,aj as M,b8 as D,U as B,b as Q,E as Z,bV as ee,bc as te,q as re,D as ie,i as ne,bs as se,bW as oe,bX as ae,s as le,ap as de,b6 as ce,a8 as ge}from"./vendor-icons-D-5f6XKt.js";import"./vendor-misc-D0V4jby4.js";import"./vendor-i18n-D8j9R6P3.js";const W={green:"#10B981",blue:"#3B82F6",yellow:"#F59E0B",orange:"#F97316",red:"#EF4444"},xe={green:"ð¢",blue:"ðµ",yellow:"ð¡",orange:"ð ",red:"ð´"},A={Easy:"#10B981",Medium:"#F59E0B",Hard:"#F97316",Extreme:"#EF4444"};function E({label:m,score:d,icon:u,description:b,explanations:h,expanded:v,onToggle:r}){let c="#EF4444",g="rgba(239,68,68,0.1)",f="Saturated";return d>=70?(c="#10B981",g="rgba(16,185,129,0.1)",f="Great"):d>=40&&(c="#F59E0B",g="rgba(245,158,11,0.1)",f="Medium"),e.jsxs("div",{style:{background:"var(--card-bg)",borderRadius:14,padding:"20px",border:"1px solid var(--border)",flex:1,minWidth:200},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[e.jsx("div",{style:{width:32,height:32,borderRadius:8,background:g,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(u,{size:16,style:{color:c}})}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:500},children:m}),e.jsx("div",{style:{fontSize:11,color:"var(--text-muted)"},children:b})]}),h&&h.length>0&&e.jsx("button",{onClick:r,style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",padding:4,display:"flex",alignItems:"center"},children:v?e.jsx(ce,{size:16}):e.jsx(ge,{size:16})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:8},children:[e.jsx("span",{style:{fontSize:32,fontWeight:800,color:c},children:d}),e.jsx("span",{style:{fontSize:13,fontWeight:600,color:c},children:"/100"}),e.jsx("span",{style:{marginLeft:"auto",fontSize:11,fontWeight:600,padding:"2px 10px",borderRadius:20,background:g,color:c},children:f})]}),e.jsx("div",{style:{height:6,borderRadius:3,background:"var(--bg)",marginTop:10,overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",borderRadius:3,background:c,width:`${d}%`,transition:"width 0.8s ease"}})}),v&&h&&h.length>0&&e.jsx("div",{style:{marginTop:12,paddingTop:12,borderTop:"1px solid var(--border)"},children:h.map((x,z)=>e.jsxs("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"flex",gap:6,alignItems:"flex-start"},children:[e.jsx("span",{style:{color:c,marginTop:2},children:"â¢"}),e.jsx("span",{children:x})]},z))})]})}function S({label:m,value:d,icon:u,color:b}){return e.jsxs("div",{style:{background:"var(--card-bg)",borderRadius:12,padding:"16px",border:"1px solid var(--border)",display:"flex",alignItems:"center",gap:12},children:[e.jsx("div",{style:{width:36,height:36,borderRadius:10,background:`${b}15`,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(u,{size:16,style:{color:b}})}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:500},children:m}),e.jsx("div",{style:{fontSize:18,fontWeight:700,color:"var(--text)"},children:typeof d=="number"?d.toLocaleString():d})]})]})}function je(){const[m,d]=l.useState(""),[u,b]=l.useState(!1),[h,v]=l.useState(""),[r,c]=l.useState(null),[g,f]=l.useState("videos"),[x,z]=l.useState(0),[C,U]=l.useState({demand:!1,competition:!1,opportunity:!1}),[j,P]=l.useState(!1),[a,R]=l.useState({used:0,limit:5}),[_,H]=l.useState(30);l.useEffect(()=>{I.get("/api/auth/dashboard-stats").then(t=>{const i=t.data.user||{},n=t.data.plan_limits||{};R({used:i.niche_analyses_used_today||0,limit:n.niche_limit||5}),H(i.tool_usage_reset_hours||30)}).catch(()=>{})},[]);const k=async t=>{const i=t||m;if(i.trim()){b(!0),v(""),c(null);try{const n=await I.post("/api/tools/youtube-niche-finder",{keyword:i.trim()});c(n.data),R(T=>({...T,used:T.used+1}))}catch(n){v(X(n,"Analysis failed. Please try again."))}finally{b(!1)}}},K=t=>{t.key==="Enter"&&!u&&k()},w=t=>{U(i=>({...i,[t]:!i[t]}))},F=r?x===0?r.topVideos||[]:x===1e5&&r.smallCreatorVideos?r.smallCreatorVideos:(r.topVideos||[]).filter(t=>t.subscribers<x):[],p=V(F,10),y=V(r?.topChannels||[],10);l.useEffect(()=>{p.setCurrentPage(1)},[x]);const Y=t=>t<1e4?{label:"Micro",color:"#8B5CF6",bg:"rgba(139,92,246,0.1)"}:t<1e5?{label:"Small",color:"#10B981",bg:"rgba(16,185,129,0.1)"}:t<1e6?{label:"Medium",color:"#F59E0B",bg:"rgba(245,158,11,0.1)"}:{label:"Large",color:"#EF4444",bg:"rgba(239,68,68,0.1)"},O=()=>{if(!r)return;const t=[`YouTube Niche Analysis: "${r.keyword}"`,`${"=".repeat(50)}`,`Verdict: ${r.verdict?.rating} (${r.difficulty})`,`Reasons: ${(r.verdict?.reasons||[]).join(", ")}`,"",`Demand Score: ${r.demandScore}/100`,`Competition Score: ${r.competitionScore}/100`,`Opportunity Score: ${r.opportunityScore}
1/100`,"",`Avg Views: ${r.avgViews?.toLocaleString()}`,`Avg Subscribers: ${r.avgSubscribers?.toLocaleString()}`,`Avg Velocity: ${r.avgVelocity}/day`,`Avg Engagement: ${r.avgEngagement}%`,`Total Results: ${r.totalResults?.toLocaleString()}`,"",`Monetization: Tier ${r.monetization?.tier}/5 | CPM: ${r.monetization?.cpmLevel} | Category: ${r.monetization?.category}`,"","Strategy:",r.strategy||"","",`Niche Variants: ${(r.nicheVariants||[]).join(", ")}`];navigator.clipboard.writeText(t.join(` 2`)),P(!0),setTimeout(()=>P(!1),2e3)},G=t=>{d(t),k(t)},s={textAlign:"left",padding:"10px 16px",color:"var(--text-muted)",fontWeight:600,fontSize:11,textTransform:"uppercase",letterSpacing:"0.05em",whiteSpace:"nowrap"},o={padding:"12px 16px",fontSize:13};return e.jsxs("div",{className:"fade-in",style:{maxWidth:1100,margin:"0 auto"},children:[e.jsxs("div",{style:{marginBottom:24},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:4},children:[e.jsx("div",{style:{width:36,height:36,borderRadius:10,background:"linear-gradient(135deg, #FF0000, #CC0000)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(L,{size:20,color:"white"})}),e.jsx("h1",{style:{fontSize:24,fontWeight:700,color:"var(--text)",margin:0},children:"YouTube Niche Finder"})]}),e.jsx("p",{style:{fontSize:14,color:"var(--text-muted)",margin:"4px 0 0"},children:"Analyze any keyword to discover demand, competition, and opportunity scores"})]}),e.jsxs("div",{style:{background:"var(--card-bg)",borderRadius:14,padding:"20px",border:"1px solid var(--border)",marginBottom:24},children:[e.jsxs("div",{style:{display:"flex",gap:12},children:[e.jsxs("div",{style:{flex:1,position:"relative"},children:[e.jsx(N,{size:16,style:{position:"absolute",left:14,top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),e.jsx("input",{type:"text",value:m,onChange:t=>d(t.target.value),onKeyDown:K,placeholder:"Enter a keyword or niche (e.g., AI tools, cooking recipes, fitness...)",className:"input icon-input-l",style:{paddingLeft:40}})]}),e.jsx("button",{className:"btn btn-primary",onClick:()=>k(),disabled:!m.trim()||u||a.limit!==-1&&a.used>=a.limit,style:{display:"flex",alignItems:"center",gap:8,whiteSpace:"nowrap",padding:"10px 24px"},children:u?e.jsxs(e.Fragment,{children:[e.jsx(q,{size:16,className:"spin"})," Analyzing..."]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{size:16})," Analyze"]})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:12,fontSize:12},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,color:"var(--text-muted)"},children:[e.jsx(J,{size:13}),e.jsxs("span",{children:["Analyses used: ",e.jsx("strong",{style:{color:a.limit!==-1&&a.used>=a.limit?"#EF4444":"var(--text)"},children:a.used})," / ",a.limit===-1?"â":a.limit]})]}),e.jsxs("span",{style:{color:"var(--text-muted)",fontSize:11},children:["Resets every ",_," hours"]})]}),a.limit!==-1&&a.used>=a.limit&&e.jsxs("div",{style:{marginTop:8,padding:"8px 12px",borderRadius:8,fontSize:12,background:"rgba(239,68,68,0.08)",color:"#EF4444",border:"1px solid rgba(239,68,68,0.15)",display:"flex",alignItems:"center",gap:6},children:[e.jsx(M,{size:14})," Niche analysis limit reached. Upgrade your plan or wait for the reset."]})]}),h&&e.jsxs("div",{style:{padding:"12px 16px",borderRadius:10,marginBottom:20,fontSize:13,background:"rgba(239,68,68,0.1)",color:"#EF4444",border:"1px solid rgba(239,68,68,0.2)",display:"flex",alignItems:"center",gap:8},children:[e.jsx(M,{size:16})," ",h]}),r&&e.jsxs(e.Fragment,{children:[r.verdict&&e.jsxs("div",{style:{background:"var(--card-bg)",borderRadius:14,padding:"20px 24px",border:"1px solid var(--border)",marginBottom:20,borderLeft:`4px solid ${W[r.verdict.color]||"#6B7280"}`},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[e.jsx("span",{style:{fontSize:28},children:xe[r.verdict.color]||"âª"}),e.jsxs("span",{style:{fontSize:20,fontWeight:800,color:W[r.verdict.color]||"var(--text)"},children:["Niche Verdict: ",r.verdict.rating]}),r.difficulty&&e.jsx("span",{style:{fontSize:12,fontWeight:700,padding:"4px 14px",borderRadius:20,background:`${A[r.difficulty]||"#6B7280"}15`,color:A[r.difficulty]||"#6B7280",border:`1px solid ${A[r.difficulty]||"#6B7280"}30`},children:r.difficulty})]}),r.verdict.reasons&&r.verdict.reasons.length>0&&e.jsx("div",{style:{marginTop:12},children:r.verdict.reasons.map((t,i)=>e.jsxs("div",{style:{fontSize:13,color:"var(--text-muted)",marginBottom:4,display:"flex",gap:8,alignItems:"center"},children:[e.jsx("span",{style:{color:W[r.verdict.color]},children:"â¢"}),e.jsx("span",{children:t})]},i))})]}),e.jsxs("div",{style:{display:"flex",gap:16,marginBottom:20,flexWrap:"wrap"},children:[e.jsx(E,{label:"Demand Score",score:r.demandScore,icon:D,description:"How much people search for this",explanations:r.scoreExplanations?.demand,expanded:C.demand,onToggle:()=>w("demand")}),e.jsx(E,{label:"Competition Score",score:r.competitionScore,icon:B,description:"How many creators compete",explanations:r.scoreExplanations?.competition,expanded:C.competition,onToggle:()=>w("competition")}),e.jsx(E,{label:"Opportunity Score",score:r.opportunityScore,icon:Q,description:"Overall niche potential",explanations:r.scoreExplanations?.opportunity,expanded:C.opportunity,onToggle:()=>w("opportunity")})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:12,marginBottom:20}
2,children:[e.jsx(S,{label:"Avg Views (Top 20)",value:r.avgViews,icon:Z,color:"#3B82F6"}),e.jsx(S,{label:"Avg Subscribers",value:r.avgSubscribers,icon:B,color:"#8B5CF6"}),e.jsx(S,{label:"Avg View Velocity",value:`${r.avgVelocity}/day`,icon:D,color:"#10B981"}),e.jsx(S,{label:"Avg Engagement",value:`${r.avgEngagement}%`,icon:ee,color:"#F59E0B"})]}),e.jsxs("div",{style:{background:"var(--card-bg)",borderRadius:14,padding:"12px 16px",border:"1px solid var(--border)",marginBottom:12,display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[e.jsx(te,{size:14,style:{color:"var(--text-muted)"}}),e.jsx("span",{style:{fontSize:12,color:"var(--text-muted)",fontWeight:600,marginRight:4},children:"Creator Size:"}),[{label:"All Channels",value:0},{label:"Under 10K",value:1e4},{label:"Under 50K",value:5e4},{label:"Under 100K",value:1e5}].map(t=>e.jsx("button",{onClick:()=>z(t.value),style:{padding:"5px 14px",borderRadius:20,fontSize:12,fontWeight:600,cursor:"pointer",border:x===t.value?"1px solid var(--primary)":"1px solid var(--border)",background:x===t.value?"var(--primary)":"transparent",color:x===t.value?"#fff":"var(--text-muted)",transition:"all 0.2s ease"},children:t.label},t.value))]}),e.jsxs("div",{style:{background:"var(--card-bg)",borderRadius:14,border:"1px solid var(--border)",overflow:"hidden",marginBottom:20},children:[e.jsx("div",{style:{display:"flex",borderBottom:"1px solid var(--border)"},children:[{key:"videos",label:"Top Videos",icon:L},{key:"channels",label:"Top Channels",icon:B}].map(t=>e.jsxs("button",{onClick:()=>f(t.key),style:{padding:"12px 20px",fontSize:13,fontWeight:600,cursor:"pointer",background:"transparent",border:"none",color:g===t.key?"var(--primary)":"var(--text-muted)",borderBottom:g===t.key?"2px solid var(--primary)":"2px solid transparent",display:"flex",alignItems:"center",gap:6,transition:"all 0.2s ease"},children:[e.jsx(t.icon,{size:14})," ",t.label]},t.key))}),g==="videos"&&e.jsxs("div",{style:{overflowX:"auto"},children:[e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13},children:[e.jsx("thead",{children:e.jsxs("tr",{style:{background:"var(--bg)"},children:[e.jsx("th",{style:{...s,textAlign:"center",width:40},children:"#"}),e.jsx("th",{style:s,children:"Video Title"}),e.jsx("th",{style:{...s,textAlign:"right"},children:"Views"}),e.jsx("th",{style:{...s,textAlign:"right"},children:"Likes"}),e.jsx("th",{style:s,children:"Channel"}),e.jsx("th",{style:{...s,textAlign:"right"},children:"Subs"}),e.jsx("th",{style:{...s,textAlign:"right"},children:"Velocity"}),e.jsx("th",{style:{...s,textAlign:"right"},children:"Engagement"}),e.jsx("th",{style:{...s,textAlign:"right"},children:"Age"})]})}),e.jsx("tbody",{children:p.paginatedItems.map((t,i)=>e.jsxs("tr",{style:{borderTop:"1px solid var(--border)"},children:[e.jsx("td",{style:{...o,textAlign:"center",color:"var(--text-muted)",fontWeight:600},children:(p.currentPage-1)*p.itemsPerPage+i+1}),e.jsx("td",{style:{...o,maxWidth:280},children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsx("a",{href:`https://youtube.com/watch?v=${t.videoId}`,target:"_blank",rel:"noopener noreferrer",style:{fontWeight:600,color:"var(--text)",textDecoration:"none",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:280,display:"block"},title:t.title,children:t.title}),e.jsxs("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:[t.subscribers<1e5&&e.jsx("span",{style:{fontSize:10,padding:"1px 6px",borderRadius:8,background:"rgba(16,185,129,0.1)",color:"#10B981",fontWeight:600},children:"ð¢ Small Creator"}),t.velocity>1e3&&e.jsx("span",{style:{fontSize:10,padding:"1px 6px",borderRadius:8,background:"rgba(245,158,11,0.1)",color:"#F59E0B",fontWeight:600},children:"â¡ Fast Growth"}),t.engagement>3&&e.jsx("span",{style:{fontSize:10,padding:"1px 6px",borderRadius:8,background:"rgba(139,92,246,0.1)",color:"#8B5CF6",fontWeight:600},children:"ð High Engagement"})]})]})}),e.jsx("td",{style:{...o,textAlign:"right",fontWeight:600,color:"var(--text)"},children:t.views?.toLocaleString()}),e.jsx("td",{style:{...o,textAlign:"right",color:"var(--text-muted)"}
2,children:t.likes?.toLocaleString()}),e.jsx("td",{style:o,children:e.jsx("a",{href:`https://youtube.com/channel/${t.channelId}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--text-secondary)",textDecoration:"none",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:160,display:"block"},title:t.channelName,children:t.channelName})}),e.jsx("td",{style:{...o,textAlign:"right",color:"var(--text-muted)"},children:t.subscribers?.toLocaleString()}),e.jsx("td",{style:{...o,textAlign:"right"},children:e.jsxs("span",{style:{fontSize:11,padding:"2px 8px",borderRadius:8,background:t.velocity>1e3?"rgba(16,185,129,0.1)":"var(--bg)",color:t.velocity>1e3?"#10B981":"var(--text-muted)",fontWeight:600},children:[t.velocity?.toLocaleString(),"/d"]})}),e.jsx("td",{style:{...o,textAlign:"right"},children:e.jsxs("span",{style:{fontSize:11,padding:"2px 8px",borderRadius:8,background:t.engagement>3?"rgba(245,158,11,0.1)":"var(--bg)",color:t.engagement>3?"#F59E0B":"var(--text-muted)",fontWeight:600},children:[t.engagement,"%"]})}),e.jsx("td",{style:{...o,textAlign:"right",color:"var(--text-muted)",fontSize:12},children:e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4,justifyContent:"flex-end"},children:[e.jsx(re,{size:12})," ",t.daysSinceUpload,"d"]})})]},i))})]}),e.jsx($,{currentPage:p.currentPage,totalPages:p.totalPages,onPageChange:p.setCurrentPage,totalItems:p.totalItems,itemsPerPage:p.itemsPerPage}),F.length===0&&e.jsx("div",{style:{padding:32,textAlign:"center",color:"var(--text-muted)",fontSize:13},children:"No videos found for this filter"})]}),g==="channels"&&r.topChannels&&e.jsxs("div",{style:{overflowX:"auto"},children:[e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13},children:[e.jsx("thead",{children:e.jsxs("tr",{style:{background:"var(--bg)"},children:[e.jsx("th",{style:{...s,textAlign:"center",width:40},children:"#"}),e.jsx("th",{style:s,children:"Channel Name"}),e.jsx("th",{style:{...s,textAlign:"right"},children:"Subscribers"}),e.jsx("th",{style:{...s,textAlign:"right"},children:"Total Views"}),e.jsx("th",{style:{...s,textAlign:"right"},children:"Videos in Results"}),e.jsx("th",{style:{...s,textAlign:"right"},children:"Avg Engagement"})]})}),e.jsx("tbody",{children:y.paginatedItems.map((t,i)=>{const n=Y(t.subscribers);return e.jsxs("tr",{style:{borderTop:"1px solid var(--border)"},children:[e.jsx("td",{style:{...o,textAlign:"center",color:"var(--text-muted)",fontWeight:600},children:(y.currentPage-1)*y.itemsPerPage+i+1}),e.jsx("td",{style:o,children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("a",{href:`https://youtube.com/channel/${t.channelId}`,target:"_blank",rel:"noopener noreferrer",style:{fontWeight:600,color:"var(--text)",textDecoration:"none"},children:t.channelName}),e.jsx("span",{style:{fontSize:10,padding:"1px 8px",borderRadius:8,background:n.bg,color:n.color,fontWeight:600},children:n.label})]})}),e.jsx("td",{style:{...o,textAlign:"right",fontWeight:600,color:"var(--text)"},children:t.subscribers?.toLocaleString()}),e.jsx("td",{style:{...o,textAlign:"right",color:"var(--text-muted)"},children:t.totalViews?.toLocaleString()}),e.jsx("td",{style:{...o,textAlign:"right",color:"var(--text-muted)"},children:t.videoCount}),e.jsx("td",{style:{...o,textAlign:"right"},children:e.jsxs("span",{style:{fontSize:11,padding:"2px 8px",borderRadius:8,background:t.avgEngagement>3?"rgba(245,158,11,0.1)":"var(--bg)",color:t.avgEngagement>3?"#F59E0B":"var(--text-muted)",fontWeight:600},children:[t.avgEngagement,"%"]})})]},i)})})]}),e.jsx($,{currentPage:y.currentPage,totalPages:y.totalPages,onPageChange:y.setCurrentPage,totalItems:y.totalItems,itemsPerPage:y.itemsPerPage})]})]}),r.monetization&&e.jsxs("div",{style:{background:"var(--card-bg)",borderRadius:14,padding:"20px 24px",border:"1px solid var(--border)",marginBottom:20},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:16},children:[e.jsx("div",{style:{width:32,height:32,borderRadius:8,background:"rgba(16,185,129,0.1)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(ie,{size:16,style:{color:"#10B981"}})}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:15,fontWeight:700,color:"var(--text)"},children:"Monetization Score"}),e.jsx("div",{style:{fontSize:11,color:"var(--text-muted)"},children:"Estimated Earning Potential"})]})]}),e.jsxs("div",{style:{display:"flex",gap:24,flexWrap:"wrap",alignItems:"center"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:"CPM Level"}),e.jsx("div",{style:{fontSize:16,fontWeight:700,color:"var(--text)"},children:r.monetization.cpmLevel})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:"Category"}),e.jsx("div",{style:{fontSize:16,fontWeight:700,color:"var(--text)"},children:r.monetization.category})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:"Rating"}),e.jsx("div",{style:{display:"flex",gap:2},children:[1,2,3,4,5].map(t=>e.jsx(ne,{size:18,style:{color:t<=r.monetization.tier?"#F59E0B":"var(--border)",fill:t<=r.monetization.tier?"#F59E0B":"none"}},t))})]})]})]}),r.contentPatterns&&e.jsxs("div",{style:{background:"var(--card-bg)",borderRadius:14,padding:"20px 24px",border:"1px solid var(--border)",marginBottom:20},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:16},children:[e.jsx("div",{style:{width:32,height:32,borderRadius:8,background:"rgba(139,92,246,0.1)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(se,{size:16,style:{color:"#8B5CF6"}})}),e.jsx("div",{style:{fontSize:15,fontWeight:700,color:"var(--text)"},children:"Content Pattern Analysis"})]}),r.contentPatterns.commonTitleWords&&r.contentPatterns.commonTitleWords.length>0&&e.jsxs("div",{style:{marginBottom:16},children:[e.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:8,fontWeight:600},children:"Common Title Words"}),e.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:r.contentPatterns.commonTitleWords.map((t,i)=>e.jsx("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:20,background:"var(--bg)",color:"var(--text-secondary)",border:"1px solid var(--border)",fontWeight:500},children:t},i))})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(180px, 1fr))",gap:16},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:"Avg Video Age"}),e.jsxs("div",{style:{fontSize:16,fontWeight:700,color:"var(--text)"},children:[r.contentPatterns.avgVideoAgeDays," days"]})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:4},children:"High Engagement Videos"}),e.jsx("div",{style:{fontSize:16,fontWeight:700,color:"#F59E0B"},children:r.contentPatterns.highEngagementCount})]})]}),e.jsxs("div",{style:{marginTop:16},children:[e.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:6},children:["Small Creators (",r.contentPatterns.smallCreatorCount,") vs Big Creators (",r.contentPatterns.bigCreatorPercent,"%)"]}),e.jsxs("div",{style:{height:8,borderRadius:4,background:"var(--bg)",overflow:"hidden",display:"flex"},children:[e.jsx("div",{style:{height:"100%",background:"#10B981",width:`${100-r.contentPatterns.bigCreatorPercent}%`,transition:"width 0.8s ease"}}),e.jsx("div",{style:{height:"100%",background:"#EF4444",width:`${r.contentPatterns.bigCreatorPercent}%`,transition:"width 0.8s ease"}})]}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:4,fontSize:10,
2color:"var(--text-muted)"},children:[e.jsx("span",{style:{color:"#10B981"},children:"Small Creators"}),e.jsx("span",{style:{color:"#EF4444"},children:"Big Creators"})]})]})]}),r.strategy&&e.jsxs("div",{style:{background:"var(--card-bg)",borderRadius:14,padding:"20px 24px",border:"1px solid var(--border)",marginBottom:20,borderLeft:"4px solid var(--primary)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:16},children:[e.jsx("div",{style:{width:32,height:32,borderRadius:8,background:"rgba(59,130,246,0.1)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(oe,{size:16,style:{color:"#3B82F6"}})}),e.jsx("div",{style:{fontSize:15,fontWeight:700,color:"var(--text)"},children:"Strategy Recommendation"})]}),e.jsx("div",{children:r.strategy.split(` 3`).filter(t=>t.trim()).map((t,i)=>e.jsxs("div",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:8,display:"flex",gap:8,alignItems:"flex-start"},children:[e.jsx("span",{style:{color:"var(--primary)",marginTop:2,flexShrink:0},children:"â¢"}),e.jsx("span",{children:t.trim()})]},i))})]}),r.nicheVariants&&r.nicheVariants.length>0&&e.jsxs("div",{style:{background:"var(--card-bg)",borderRadius:14,padding:"20px 24px",border:"1px solid var(--border)",marginBottom:20},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:16},children:[e.jsx("div",{style:{width:32,height:32,borderRadius:8,background:"rgba(249,115,22,0.1)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(ae,{size:16,style:{color:"#F97316"}})}),e.jsx("div",{style:{fontSize:15,fontWeight:700,color:"var(--text)"},children:"Micro-Niche Suggestions"})]}),e.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:r.nicheVariants.map((t,i)=>e.jsx("button",{onClick:()=>G(t),style:{padding:"6px 16px",borderRadius:20,fontSize:12,fontWeight:600,background:"var(--bg)",color:"var(--text-secondary)",border:"1px solid var(--border)",cursor:"pointer",transition:"all 0.2s ease"},onMouseEnter:n=>{n.target.style.background="var(--primary)",n.target.style.color="#fff",n.target.style.borderColor="var(--primary)"},onMouseLeave:n=>{n.target.style.background="var(--bg)",n.target.style.color="var(--text-secondary)",n.target.style.borderColor="var(--border)"},children:t},i))})]}),e.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:32},children:e.jsx("button",{onClick:O,style:{padding:"10px 24px",borderRadius:10,fontSize:13,fontWeight:600,background:j?"rgba(16,185,129,0.1)":"var(--card-bg)",color:j?"#10B981":"var(--text-secondary)",border:`1px solid ${j?"#10B981":"var(--border)"}`,cursor:"pointer",display:"flex",alignItems:"center",gap:8,transition:"all 0.2s ease"},children:j?e.jsxs(e.Fragment,{children:[e.jsx(le,{size:14})," Copied!"]}):e.jsxs(e.Fragment,{children:[e.jsx(de,{size:14})," Copy Report"]})})})]})]})}export{je 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.