1import{h as re,r as N,c as W,o as G,i as L,e as z,j as e,G as k,p as f,d as n,f as F,S as M,B as V,k as le,l as ie,m as oe,n as ne,M as de,q as ce}from"./index-BNIUXFGR.js";import{C as g,a as b,d as w,b as v}from"./card-CbdnxEcK.js";import{P as I}from"./PieChart-Bj8FqTYr.js";import{S as y,a as T,b as D,c as C,d as i}from"./select-a2YQn4QM.js";import{u as S}from"./useSuspenseQuery-D49Zv99D.js";import{S as me}from"./SheetDialog-CfbLwySF.js";import{a as xe,b as pe,F as he}from"./FeedDetailHeader-CeP-41ng.js";import{N as ue}from"./NoDataFound-BmjR9Zo8.js";import{T as fe}from"./trending-down-DCBVMJDa.js";import{M as ge}from"./minus-3J-9s_cL.js";import{C as je}from"./calendar-Co0E113F.js";import{R as _}from"./generateCategoricalChart-C4ZtzvYg.js";import{A as Ne,a as ve}from"./AreaChart-D03qIvJj.js";import{T as be}from"./thumbs-up-CgisVyMZ.js";import{F as Q}from"./file-text-BTJBQyno.js";import{L as O}from"./lightbulb-n1PFsLT1.js";import{L as we,a as ye}from"./LineChart-1z4yoTLL.js";import"./FormDialog-bR0reNd_.js";import"./fixMardownLinks-hYhfxUrd.js";import"./differenceInCalendarDays-Db1tqh3O.js";import"./separator-dCkY31KD.js";import"./info-B5oUworL.js";import"./heart-BvRA5QaB.js";import"./schemas-DHo55-80.js";import"./business-DEh1s8Vl.js";import"./feed-DaHaiK1P.js";import"./feed-DFomaFfO.js";import"./external-link-C611VAew.js";import"./index-DOg0vyE0.js";import"./copy-BD_pDQv5.js";import"./paperclip-DGfxYPIf.js";import"./progress-D4IfvxL0.js";import"./YAxis-CrNsSs9x.js";/** 2 * @license lucide-react v0.539.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Te=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],K=re("funnel",Te),$=r=>{const{post:t,score:a}=r;return{post:{id:t?.id||"",unifiedId:t?.unifiedId||"",title:t?.title||"",authorId:t?.authorUsername||t?.authorName||"anonymous",authorName:t?.authorName||"",authorUsername:t?.authorUsername||"",authorProfileUrl:t?.authorProfileUrl||"",url:t?.url||"",platform:t?.platform||"TWITTER",keywords:t?.keywords||[],text:t?.fullText||t?.title||"",fullText:t?.fullText||t?.title||"",images:t?.images||[],likeCount:t?.likeCount||0,commentCount:t?.commentCount||0,engagementRatio:t?.engagementRatio||0,postedAt:t?.postedAt||new Date().toISOString(),postedAtTimestamp:t?.postedAtTimestamp?new Date(t.postedAtTimestamp).getTime():Date.now(),isNsfw:t?.isNsfw||!1,communityName:t?.communityName||"",platformSpecificData:{score:t?.platformSpecificData?.score||0,upvote_ratio:t?.platformSpecificData?.upvote_ratio||0,is_video:t?.platformSpecificData?.is_video||!1,domain:t?.platformSpecificData?.domain||"",created_utc:t?.platformSpecificData?.created_utc||0},miscellaneous:t?.miscellaneous||{},leadTypes:a?.leadTypes||[]},score:{totalScore:a.totalScore||0,keywordRelevanceScore:a.keywordRelevanceScore||0,businessAlignmentScore:a.businessAlignmentScore||0,engagementQualityScore:a.engagementQualityScore||0,contentQualityScore:a.contentQualityScore||0,authorCredibilityScore:a.authorCredibilityScore||0,timelinessFreshnessScore:a.timelinessFreshnessScore||0,exactKeywordMatches:a.exactKeywordMatches||0,partialKeywordMatches:a.partialKeywordMatches||0,sentimentScore:a.sentimentScore||0,sentimentLabel:a.sentimentLabel||"NEUTRAL",normalizedLikes:a.normalizedLikes||0,normalizedShares:a.normalizedShares||0,normalizedComments:a.normalizedComments||0,normalizedViews:a.normalizedViews||0,contentLength:(t.fullText||t.title||"").length,hasMedia:a.hasMedia||!1,hasLinks:(t.fullText||t.title||"").includes("http"),contentType:a.contentType||"text",scoreCalculatedAt:a.scoreCalculatedAt||Date.now(),rankingVersion:a.rankingVersion||"1.0",scoreExplanation:a.scoreExplanation||"High relevance detected from reputation analysis.",correlationDescription:a.correlationDescription||"",priority:a.priority||"LOW",priorityExplanation:a.priorityExplanation||"This mention requires attention based on automated brand sentiment analysis.",leadTypes:a.leadTypes||[]}}},De=({postIds:r,onPostClick:t})=>{const{data:a,isLoading:l}=W(L.batchPosts(r));if(l)return e.jsx("div",{className:"space-y-4",children:[1,2].map(p=>e.jsx(ce,{className:"h-[200px] w-full rounded-xl"},p))});const x=a?.data||[],A={sortField:"RELEVANCE",keywords:[],platforms:[],relavances:[],priority:[],sentiments:[],leadTypes:[]};return e.jsx("div",{className:"grid grid-cols-1 gap-6",children:x.map(p=>{const j=$(p);return e.jsx(he,{data:j,openFeedDialog:()=>
6t(j),filterFeedOptions:A,hidePriorityBadge:!0},j.post.unifiedId)})})},U=({topic:r,type:t,onPostClick:a})=>{const l=t==="negative",x=l?F:O;return console.log("topic",r.trendData),e.jsx(le,{className:"w-full",children:e.jsxs(g,{className:n("shadow-sm border-muted/20 transition-all overflow-hidden group/card bg-white/50 backdrop-blur-sm relative",l?"hover:border-rose-200":"hover:border-emerald-200"),children:[e.jsx("div",{className:n("absolute left-0 top-0 bottom-0 w-1 transition-all duration-300",l?"bg-rose-500/40 group-hover/card:bg-rose-500":"bg-emerald-500/40 group-hover/card:bg-emerald-500")}),e.jsx(ie,{asChild:!0,children:e.jsxs("div",{className:"w-full flex items-center justify-between py-3.5 px-5 cursor-pointer hover:bg-muted/5 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[e.jsx("div",{className:n("relative flex items-center justify-center h-9 w-9 shrink-0 rounded-lg transition-transform group-hover:scale-105",l?"bg-rose-50 text-rose-600":"bg-emerald-50 text-emerald-600"),children:e.jsx(x,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-0.5",children:[e.jsx("h3",{className:n("text-sm font-bold tracking-tight truncate",l?"text-rose-900":"text-emerald-900"),children:r.topic}),e.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:e.jsxs("span",{className:"text-[10px] font-bold text-muted-foreground/40 tabular-nums",children:[r.totalMentions," Mentions"]})})]}),e.jsx("p",{className:"text-xs text-muted-foreground/70 font-medium line-clamp-1 italic",children:r.summary})]})]}),e.jsx("div",{className:"flex items-center gap-3 ml-4 shrink-0",children:e.jsx("div",{className:"h-8 w-8 flex items-center justify-center rounded-full border border-transparent group-hover:border-muted/20 group-hover:bg-white transition-all shadow-sm group-hover:shadow-rose-100/50",children:e.jsx(oe,{className:"h-4 w-4 text-muted-foreground group-data-[state=open]:rotate-180 transition-transform duration-300"})})})]})}),e.jsx(ne,{className:"data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down overflow-hidden",children:e.jsx(v,{className:"pt-0 pb-6 px-6 sm:px-14",children:e.jsxs("div",{className:"space-y-6 pt-2 border-t border-muted/10",children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.jsxs("div",{className:n("p-4 rounded-2xl border transition-colors",l?"bg-rose-50/20 border-rose-100/30":"bg-emerald-50/20 border-emerald-100/30"),children:[e.jsxs("div",{className:n("flex items-center gap-2 text-[10px] font-black uppercase tracking-widest mb-3",l?"text-rose-700/70":"text-emerald-700/70"),children:[e.jsx(Q,{className:"h-3 w-3"})," Core Analysis"]}),e.jsx("p",{className:n("text-[13px] leading-relaxed font-semibold",l?"text-rose-900":"text-emerald-900"),children:r.summary})]}),e.jsxs("div",{className:"bg-muted/5 p-4 rounded-2xl border border-muted/10 flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest",children:[e.jsx(z,{className:"h-3 w-3"})," mention trend"]}),e.jsx("div",{className:"text-[9px] font-bold text-muted-foreground/30 uppercase",children:"7D Velocity"})]}),e.jsx("div",{className:"h-[60px] w-full mt-auto",children:r.trendData?.length>0?e.jsx(_,{width:"100%",height:"100%",children:e.jsx(we,{data:r.trendData,children:e.jsx(ye,{type:"monotone",dataKey:"count",stroke:l?"#e11d48":"#059669",strokeWidth:2.5,dot:!1,activeDot:{r:4,strokeWidth:0}})})}):e.jsx(ue,{text:"No trend data found",className:"text-sm"})})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest",children:[e.jsx(de,{className:"h-3 w-3"})," high priority mentions"]}),e.jsx(De,{postIds:r.topPostIds,type:t,onPostClick:a})]}),e.jsxs("div",{className:n("p-5 rounded-2xl border relative overflow-hidden group transition-all",l?"bg-amber-500 border-amber-400/30":"bg-blue-600 border-blue-400/30"),children:[e.jsx("div",{className:"absolute -top-4 -right-4 p-8 opacity-10 group-hover:scale-110 transition-transform text-white",children:e.jsx(O,{className:"h-20 w-20"})}),e.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-black uppercase tracking-widest mb-2 relative z-10 text-white/70",children:[e.jsx(O,{className:"h-3 w-3"}),l?"Recommended Remediation":"Growth Strategic Action"]}),e.jsx("p",{className:"text-sm text-white font-bold leading-relaxed relative z-10",children:r.remediation})]})]})})})]})})},Ce=()=>{const[r,t]=N.useState("ALL"),[a,l]=N.useState("ALL"),[x,A]=N.useState("30D"),[p,j]=N.useState("ALL"),[h,E]=N.useState({isOpen:!1,data:null,platform:null}),{data:B}=W(G.org()),{data:q}=S(G.keywordGroups()),H=q,P=s=>{const o=$(s),u=(s.post.platform||"TWITTER").toUpperCase(),ae=f[u];E({isOpen:!0,data:o,platform:ae?.name||String(s.post.platform)})},{data:Z}=S(L.overview({platform:r,dateRange:x,keywordGroupId:p})),d=Z?.data,{data:J}=S(L.topics({sentiment:"NEGATIVE",platform:r,dateRange:x,keywordGroupId:p})),c=J?.data.topics||[],{data:X}=S(L.topics({sentiment:"POSITIVE",platform:r,dateRange:x,keywordGroupId:p})),m=X?.data.topics||[],Y=[{name:"Positive",value:parseFloat(d?.distribution.POSITIVE||"0"),color:"bg-emerald-500",textColor:"text-emerald-700",bgColor:"bg-emerald-50",icon:z},{name:"Negative",value:parseFloat(d?.distribution.NEGATIVE||"0"),color:"bg-rose-500",textColor:"text-rose-700",bgColor:"bg-rose-50",icon:fe},{name:"Neutral",value:parseFloat(d?.distribution.NEUTRAL||"0"),color:"bg-slate-400",textColor:"text-slate-700",bgColor:"bg-slate-50",icon:ge}],R=["#2563eb","#7c3aed","#db2777","#ea580c","#ca8a04","#16a34a","#0891b2"],ee=m.map((s,o)=>({name:s.topic,topic:s.topic,value:s.totalMentions||0,fill:R[o%R.length]})),se=c.map((s,o)=>({name:s.topic,topic:s.topic,value:s.totalMentions||0,fill:["#e11d48","#f43f5e","#fb7185","#fda4af","#fff1f2"][o%5]})),te=d.platformBreakdown.map(s=>{const o=s.platform.toUpperCase();let u="#0a66c2";return o==="REDDIT"?u="#ff4500":o==="TWITTER"?u="#1da1f2":o==="GOOGLE_NEWS"?u="#4285F4":o==="AMAZON"&&(u="#FF9900"),{platform:s.platform,percentage:s.percentage,fill:u}});
6return d?e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex flex-col xl:flex-row items-start xl:items-center justify-between gap-6 bg-muted/5 p-5 rounded-2xl border border-muted/10 shadow-sm",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Reputation Management"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Monitor and analyze your brand reputation across platforms"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4 w-full xl:w-auto",children:[e.jsx("div",{className:"flex-1 min-w-[200px] xl:w-64",children:e.jsxs(y,{value:p,onValueChange:j,children:[e.jsxs(T,{className:"h-10 border-muted/20",children:[e.jsx(K,{className:"h-4 w-4 mr-2 text-muted-foreground"}),e.jsx(D,{placeholder:"All Keyword Groups"})]}),e.jsxs(C,{children:[e.jsx(i,{value:"ALL",children:"All Keyword Groups"}),H.map(s=>e.jsx(i,{value:s.id||"",children:s.name},s.id))]})]})}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs(y,{value:r,onValueChange:s=>t(s),children:[e.jsx(T,{className:"w-[160px] h-10 border-muted/20 focus:ring-1 focus:ring-primary/20",children:e.jsxs("div",{className:"flex items-center gap-2",children:[r==="ALL"?e.jsx(k,{className:"h-4 w-4 text-muted-foreground"}):e.jsx("img",{src:f[r].icon,alt:"",className:"h-4 w-4 rounded-full"}),e.jsx(D,{placeholder:"Platform"})]})}),e.jsxs(C,{className:"rounded-xl border-muted/20",children:[e.jsx(i,{value:"ALL",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:"All Platforms"})]})}),e.jsx(i,{value:"REDDIT",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:f.REDDIT.icon,alt:"",className:"h-4 w-4 rounded-full"}),e.jsx("span",{children:"Reddit"})]})}),e.jsx(i,{value:"TWITTER",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:f.TWITTER.icon,alt:"",className:"h-4 w-4 rounded-full"}),e.jsx("span",{children:"Twitter"})]})}),e.jsx(i,{value:"LINKEDIN",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:f.LINKEDIN.icon,alt:"",className:"h-4 w-4 rounded-full"}),e.jsx("span",{children:"LinkedIn"})]})}),e.jsx(i,{value:"GOOGLE_NEWS",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:f.GOOGLE_NEWS.icon,alt:"",className:"h-4 w-4 rounded-full"}),e.jsx("span",{children:"Google News"})]})}),e.jsx(i,{value:"AMAZON",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:f.AMAZON.icon,alt:"",className:"h-4 w-4 rounded-full"}),e.jsx("span",{children:"Amazon"})]})})]})]}),e.jsxs(y,{value:a,onValueChange:s=>l(s),children:[e.jsxs(T,{className:"w-[140px] h-10 border-muted/20",children:[e.jsx(K,{className:"h-4 w-4 mr-2 text-muted-foreground"}),e.jsx(D,{placeholder:"Sentiment"})]}),e.jsxs(C,{children:[e.jsx(i,{value:"ALL",children:"All Sentiments"}),e.jsx(i,{value:"POSITIVE",children:"Positive Only"}),e.jsx(i,{value:"NEGATIVE",children:"Negative Only"})]})]}),e.jsxs(y,{value:x,onValueChange:A,children:[e.jsxs(T,{className:"w-[160px] h-10 border-muted/20",children:[e.jsx(je,{className:"h-4 w-4 mr-2 text-muted-foreground"}),e.jsx(D,{placeholder:"Date Range"})]}),e.jsxs(C,{children:[e.jsx(i,{value:"7D",children:"Last 7 Days"}),e.jsx(i,{value:"30D",children:"Last 30 Days"}),e.jsx(i,{value:"90D",children:"Last 90 Days"}),e.jsx(i,{value:"ALL",children:"All Time"})]})]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs(g,{className:"shadow-sm border-muted/20",children:[e.jsxs(b,{className:"pb-2",children:[e.jsx(w,{className:"text-sm font-medium text-muted-foreground",children:"Overall Mentions"}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-bold",children:d.totalMentions}),e.jsx("span",{className:n("text-xs font-semibold",d.mentionTrend.startsWith("+")?"text-emerald-500":"text-rose-500"),children:d.mentionTrend})]})]}),e.jsx(v,{className:"h-24 p-0 px-1 overflow-hidden pointer-events-none",children:e.jsx(_,{width:"100%",height:"100%",children:e.jsx(Ne,{data:[{v:10},{v:15},{v:12},{v:20}],children:e.jsx(ve,{type:"monotone",dataKey:"v",stroke:"#3b82f6",fill:"#3b82f6",fillOpacity:.1})})})})]}),e.jsxs(g,{className:"shadow-sm border-muted/20 bg-rose-50/10 hover:bg-rose-50/20 transition-colors",children:[e.jsxs(b,{className:"pb-2",children:[e.jsxs(w,{className:"text-sm font-medium text-rose-600 flex items-center gap-2",children:[e.jsx(F,{className:"h-4 w-4"}),"Negative Topics"]}),e.jsxs("div",{className:"flex items-baseline gap-2 mt-1",children:[e.jsx("span",{className:"text-2xl font-bold text-rose-700",children:c.length}),e.jsx("span",{className:"text-xs font-medium text-rose-600/70",children:"Detected"})]})]}),e.jsx(v,{className:"pb-4 pt-1",children:e.jsxs("div",{className:"space-y-2 border-t border-rose-100/30 pt-3 mt-1",children:[c.slice(0,3).map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-bold text-rose-900/80",children:[e.jsx("div",{className:"h-1 w-1 rounded-full bg-rose-500"}),e.jsx("span",{className:"truncate",children:s.topic})]},s.topic)),c.length>
63&&e.jsxs("div",{className:"text-[10px] text-muted-foreground/60 pl-3 font-medium",children:["+ ",c.length-3," more negative topics"]}),c.length===0&&e.jsx("div",{className:"text-[10px] text-emerald-600 font-bold italic",children:"No negative topics detected"})]})})]}),e.jsxs(g,{className:"shadow-sm border-muted/20 bg-emerald-50/10 hover:bg-emerald-50/20 transition-colors",children:[e.jsxs(b,{className:"pb-2",children:[e.jsxs(w,{className:"text-sm font-medium text-emerald-600 flex items-center gap-2",children:[e.jsx(M,{className:"h-4 w-4"}),"Positive Topics"]}),e.jsxs("div",{className:"flex items-baseline gap-2 mt-1",children:[e.jsx("span",{className:"text-2xl font-bold text-emerald-700",children:m.length}),e.jsx("span",{className:"text-xs font-medium text-emerald-600/70",children:"Opportunities"})]})]}),e.jsx(v,{className:"pb-4 pt-1",children:e.jsxs("div",{className:"space-y-2 border-t border-emerald-100/30 pt-3 mt-1",children:[m.slice(0,3).map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-bold text-emerald-900/80",children:[e.jsx("div",{className:"h-1 w-1 rounded-full bg-emerald-500"}),e.jsx("span",{className:"truncate",children:s.topic})]},s.topic)),m.length>3&&e.jsxs("div",{className:"text-[10px] text-muted-foreground/60 pl-3 font-medium",children:["+ ",m.length-3," more positive topics"]}),m.length===0&&e.jsx("div",{className:"text-[10px] text-muted-foreground font-medium italic",children:"Scanning for new positive topics..."})]})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6",children:[e.jsx("div",{className:"lg:col-span-4 space-y-6",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-lg font-semibold flex items-center gap-2",children:"Sentiment Distribution"}),e.jsx("div",{className:"grid grid-cols-1 gap-4",children:Y.map(s=>{const o=s.icon;return e.jsxs("div",{className:`rounded-lg p-4 ${s.bgColor} border border-border shadow-sm transition-all hover:shadow-md`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:`font-semibold ${s.textColor}`,children:s.name}),e.jsx(o,{className:`h-5 w-5 ${s.textColor}`})]}),e.jsxs("p",{className:`text-3xl font-bold ${s.textColor}`,children:[s.value.toFixed(1),"%"]}),e.jsx("div",{className:"mt-3 h-2 rounded-full bg-white/60",children:e.jsx("div",{className:`h-2 rounded-full ${s.color}`,style:{width:`${s.value}%`}})})]},s.name)})})]})}),e.jsxs("div",{className:"lg:col-span-8 flex flex-col md:flex-row gap-6",children:[e.jsx("div",{className:"flex-1",children:e.jsx(I,{title:"Critical Topic Distribution",description:"Share of mentions across negative topics",chartData:se,config:{},dataKey:"value",nameKey:"topic"})}),e.jsx("div",{className:"flex-1",children:e.jsx(I,{title:"Positive Topic Distribution",description:"Share of mentions across positive topics",chartData:ee,config:{},dataKey:"value",nameKey:"topic"})})]})]}),r==="ALL"&&e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6 scale-in",children:[e.jsxs(g,{className:"lg:col-span-4 shadow-sm border-muted/20",children:[e.jsx(b,{children:e.jsxs(w,{className:"text-sm font-semibold text-muted-foreground flex items-center gap-2",children:[e.jsx(k,{className:"h-4 w-4"})," Platform Distribution"]})}),e.jsx(v,{children:e.jsx("div",{className:"space-y-6",children:d.platformBreakdown.map(s=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx("span",{className:"text-sm font-medium",children:s.platform})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm font-bold",children:s.mentions}),e.jsxs("span",{className:"text-sm text-muted-foreground w-12 text-right",children:[s.percentage,"%"]})]})]}),e.jsx("div",{className:"h-1.5 w-full bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:n("h-full transition-all",s.platform.toUpperCase()==="REDDIT"?"bg-[#ff4500]":s.platform.toUpperCase()==="TWITTER"?"bg-[#1da1f2]":s.platform.toUpperCase()==="GOOGLE_NEWS"?"bg-[#4285F4]":s.platform.toUpperCase()==="AMAZON"?"bg-[#FF9900]":"bg-[#0a66c2]"),style:{width:`${s.percentage}%`}})})]},s.platform))})})]}),e.jsx("div",{className:"lg:col-span-8",children:e.jsx(I,{title:"Platform Analysis",description:`Breakdown of mentions for ${r==="ALL"?"all platforms":r}`,chartData:te,config:{},dataKey:"percentage",nameKey:"platform"})})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-8",children:[(a==="ALL"||a==="NEGATIVE")&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h2",{className:"text-lg font-bold text-rose-900 flex items-center gap-2",children:[e.jsx(F,{className:"h-5 w-5"})," Negative Topics"]}),e.jsxs(V,{variant:"outline",className:"text-rose-600 border-rose-200",children:[c.length," Negative Topics"]})]}),e.jsx("div",{className:"grid grid-cols-1 gap-4",children:c.length>0?c.map(s=>e.jsx(U,{topic:s,type:"negative",onPostClick:P},s.topic)):e.jsx(g,{className:"p-8 text-center border-dashed border-rose-200 bg-rose-50/30",children:e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx(be,{className:"h-8 w-8 text-rose-300"}),e.jsx("p",{className:"text-rose-900 font-bold",children:"No negative topics foun
6d for this filter."})]})})})]}),(a==="ALL"||a==="POSITIVE")&&e.jsxs("div",{className:"space-y-4 pt-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h2",{className:"text-lg font-bold text-emerald-900 flex items-center gap-2",children:[e.jsx(M,{className:"h-5 w-5"})," Positive Topics"]}),e.jsxs(V,{variant:"outline",className:"text-emerald-600 border-emerald-200",children:[m.length," Positive Topics"]})]}),e.jsx("div",{className:"grid grid-cols-1 gap-4",children:m.length>0?m.map(s=>e.jsx(U,{topic:s,type:"positive",onPostClick:P},s.topic)):e.jsx(g,{className:"p-8 text-center border-dashed border-emerald-200 bg-emerald-50/30",children:e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx(Q,{className:"h-8 w-8 text-emerald-300"}),e.jsx("p",{className:"text-emerald-900 font-bold",children:"No positive topics identified for this filter."})]})})})]})]}),e.jsx(me,{isOpen:h.isOpen,onClose:()=>E({isOpen:!1,data:null,platform:null}),title:h.data?e.jsx(pe,{data:h.data}):null,widthPreset:"extraLarge",children:h.data&&h.platform&&e.jsx(xe,{data:h.data,orgData:B?.data||{name:"",businessDescription:"",story:""},platform:h.platform,filterFeedOptions:{sortField:"RELEVANCE",keywords:[],platforms:[],relavances:[],priority:[],sentiments:[],leadTypes:[]},closeFeedDialog:()=>E({isOpen:!1,data:null,platform:null})})},h.data?.post.id||"empty-dialog")]}):null},is=Ce;export{is as component};
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.