PageSourceSearch

https://askent.ai/assets/CitationIntelligence-C2rD_YVd.js

js askent.ai collected 2026-10-05 11:50:45 UTC 23,823 bytes, 1 lines download raw bytes

1import{g as O,r as f,j as e,C as x,k as N,i as G,e as u,l as v,S as te,m as k,B as d,s as q,u as ie,f as ae,bc as Q,G as R,T as re,aV as L,b as ne,P as le,o as ce,t as oe,D as de,ag as me,aU as xe}from"./index-RN3KaJm1.js";import{S as ue,a as he,b as pe,c as je,d as V}from"./select-1WpgGLkV.js";import{P as fe}from"./PlatformCapabilityMatrix-CPgGLv6e.js";import{u as ge}from"./useCitationAnalytics-S0Rcpoqz.js";import{S as X}from"./swords-CDx3rEyD.js";import{R as Ne}from"./refresh-cw-DTGUZY9Q.js";import{I as ve}from"./info-cgKk-04P.js";import{A as ye}from"./award-BXdFGJER.js";import{R as Z,p as W,T as H}from"./generateCategoricalChart-BBObOfIE.js";import{P as Y,a as J}from"./PieChart-CM8QG2db.js";import"./index-CnFF1EPa.js";import"./platformCapabilities-e6feGMkd.js";const B={editorial:"Editorial",review_site:"Review Site",directory:"Verzeichnis",forum:"Forum",social:"Social Media",unknown:"Unbekannt"},be={editorial:"hsl(var(--primary))",review_site:"hsl(38, 92%, 50%)",directory:"hsl(262, 83%, 58%)",forum:"hsl(142, 71%, 45%)",social:"hsl(199, 89%, 48%)",unknown:"hsl(var(--muted-foreground))"},A=["hsl(var(--primary))","hsl(var(--accent))","hsl(142, 71%, 45%)","hsl(38, 92%, 50%)"];function we({userId:t}){const{t:c}=O(),[p,o]=f.useState([]),[g,l]=f.useState(!0);return f.useEffect(()=>{if(!t)return;(async()=>{l(!0);try{const{data:r}=await q.from("monitored_queries").select("id, query_text").eq("user_id",t).eq("is_active",!0).limit(50);if(!r||r.length===0){o([]);return}const b=r.map(a=>a.id),{data:m}=await q.from("query_results").select("id, query_id").in("query_id",b).limit(500);if(!m||m.length===0){o([]);return}const j=m.map(a=>a.id),{data:n}=await q.from("ai_citations").select("query_result_id, domain, platform, position").in("query_result_id",j).limit(500);if(!n){o([]);return}const _={};m.forEach(a=>{_[a.id]=a.query_id});const P={};r.forEach(a=>{P[a.id]=a.query_text});const w={};n.forEach(a=>{const D=_[a.query_result_id];if(!D)return;const y=P[D];y&&(w[y]||(w[y]=[]),w[y].some(S=>S.domain===a.domain&&S.platform===a.platform)||w[y].push({domain:a.domain,platform:a.platform,position:a.position}))}),o(Object.entries(w).map(([a,D])=>({queryText:a,domains:D.sort((y,S)=>(y.position||99)-(S.position||99))})).sort((a,D)=>D.domains.length-a.domains.length))}catch(r){console.error("QueryLevelCitations error:",r)}finally{l(!1)}})()},[t]),g?e.jsxs(x,{children:[e.jsx(N,{children:e.jsx(G,{className:"h-6 w-48"})}),e.jsx(u,{children:e.jsx(G,{className:"h-32 w-full"})})]}):p.length===0?null:e.jsxs(x,{children:[e.jsxs(N,{children:[e.jsxs(v,{className:"flex items-center gap-2",children:[e.jsx(te,{className:"w-5 h-5 text-primary"}),c("citByQuery")]}),e.jsx(k,{children:c("citByQueryDesc")})]}),e.jsx(u,{children:e.jsx("div",{className:"space-y-4",children:p.slice(0,8).map(h=>e.jsxs("div",{className:"p-3 bg-muted/15 rounded-xl space-y-2",children:[e.jsxs("p",{className:"font-medium text-sm text-foreground",children:['"',h.queryText,'"']}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:h.domains.map((r,b)=>e.jsxs(d,{variant:"outline",className:"text-[11px]",children:[r.domain,e.jsxs("span",{className:"ml-1 text-muted-foreground",children:["(",r.platform,r.position?` #${r.position}`:"",")"]})]},`${r.domain}-${r.platform}-${b}`))})]},h.queryText))})})]})}function De({citations:t}){const{t:c}=O(),p=f.useMemo(()=>{const o=t.filter(l=>l.is_competitor_domain),g=[...new Set(o.map(l=>l.domain))];return new Set(o.map(l=>l.id)),g.map(l=>{const h=o.filter(m=>m.domain===l),r={};h.forEach(m=>{t.filter(n=>n.platform===m.platform&&n.domain!==l&&!n.is_competitor_domain).forEach(n=>{r[n.domain]=(r[n.domain]||0)+1})});const b=Object.entries(r).map(([m,j])=>({domain:m,count:j})).sort((m,j)=>j.count-m.count).slice(0,5);return{competitorDomain:l,sourceDomains:b,totalCitations:h.length}}).sort((l,h)=>h.totalCitations-l.totalCitations).slice(0,5)},[t]);return p.length===0?null:e.jsxs(x,{children:[e.jsxs(N,{children:[e.jsxs(v,{className:"flex items-center gap-2",children:[e.jsx(X,{className:"w-5 h-5 text-destructive"}),c("citCompetitorSources")]}),e.jsx(k,{children:c("citCompetitorSourcesDesc")})]}),e.jsx(u,{children:e.jsx("div",{className:"space-y-4",children:p.map(o=>e.jsxs("div",{className:"p-3 bg-muted/20 rounded-lg border border-border/30 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"font-medium text-sm text-foreground",children:o.competitorDomain}),e.jsxs(d,{variant:"outline",className:"text-[10px]",children:[o.totalCitations," ",c("citCitations")]})]}),o.sourceDomains.length>0?e.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.sourceDomains.map(g=>e.jsxs(d,{variant:"secondary",className:"text-[11px]",children:[g.domain," ",e.jsxs("span",{className:"ml-1 text-muted-foreground",children:["(",g.count,")"]})]},g.domain))}):e.jsx("p",{className:"text-xs text-muted-foreground",children:c("citNoCoSources")})]},o.competitorDomain))})})]})}function T({icon:t,title:c,description:p}){return e.jsxs("div",{className:"flex items-center gap-3 pt-6 pb-2",children:[e.jsx("div",{className:"flex items-center justify-center w-9 h-9 rounded-xl bg-primary/10 text-primary shrink-0",children:e.jsx(t,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:c}),e.jsx("p",{className:"text-sm text-muted-foreground",children:p})]})]})}const Le=()=>{const{t}=O(),{user:c}=ie(),[p,o]=f.useState([]),[g,l]=f.useState(!0),[h,r]=f.useState("all"),b=async()=>
1{if(c){l(!0);try{const{data:s,error:i}=await q.from("ai_citations").select("*").eq("user_id",c.id).order("created_at",{ascending:!1}).limit(500);if(i)throw i;o(s||[])}catch(s){console.error("Error fetching citations:",s),xe.error(t("unexpectedError"))}finally{l(!1)}}};f.useEffect(()=>{b()},[c]);const m=f.useMemo(()=>{const s=new Set(p.map(i=>i.model_name).filter(Boolean));return Array.from(s)},[p]),j=f.useMemo(()=>h==="all"?p:p.filter(s=>s.model_name===h),[p,h]),{domainStats:n,sourceGaps:_,influencePatterns:P,crossPlatformDomains:w,totalCitations:a,uniqueDomains:D,avgPosition:y,userDomainCount:S,competitorDomainCount:ee,platformPieData:I,sourceTypeBreakdown:se}=ge(j),M=Object.entries(se).map(([s,i])=>({name:B[s]||s,value:i,key:s})),E=n.slice(0,8),$=E.length>0?Math.max(...E.map(s=>s.influenceScore)):1,z=f.useMemo(()=>{if(n.length===0)return[];const s=Math.max(...n.map(i=>i.influenceScore));return s===0?[]:n.slice(0,12).map(i=>({...i,normalizedScore:Math.round(i.influenceScore/s*100)}))},[n]),U=f.useMemo(()=>{const s={};return j.forEach(i=>{s[i.platform]||(s[i.platform]={total:0,userDomain:0,competitor:0}),s[i.platform].total++,i.is_user_domain&&s[i.platform].userDomain++,i.is_competitor_domain&&s[i.platform].competitor++}),Object.entries(s).map(([i,C])=>({platform:i,...C})).sort((i,C)=>C.total-i.total)},[j]),K=n.filter(s=>s.isUserDomain);return e.jsxs("div",{className:"page-container space-y-6",children:[e.jsxs("div",{className:"page-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"page-title",children:t("ci.title")}),e.jsx("p",{className:"page-description",children:t("ci.desc")})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[m.length>0&&e.jsxs(ue,{value:h,onValueChange:r,children:[e.jsx(he,{className:"w-[160px]",children:e.jsx(pe,{placeholder:t("ci.filterModel")})}),e.jsxs(je,{children:[e.jsx(V,{value:"all",children:t("ci.allModels")}),m.map(s=>e.jsx(V,{value:s,children:s},s))]})]}),e.jsxs(ae,{variant:"outline",onClick:b,disabled:g,children:[e.jsx(Ne,{className:`w-4 h-4 mr-2 ${g?"animate-spin":""}`}),t("ci.refresh")]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-4",children:[e.jsxs("div",{className:"kpi-tile",children:[e.jsx("div",{className:"kpi-icon",children:e.jsx(Q,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"kpi-value",children:a}),e.jsx("p",{className:"kpi-label",children:t("ci.totalCitations")})]})]}),e.jsxs("div",{className:"kpi-tile",children:[e.jsx("div",{className:"kpi-icon",children:e.jsx(R,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"kpi-value",children:D}),e.jsx("p",{className:"kpi-label",children:t("ci.domains")})]})]}),e.jsxs("div",{className:"kpi-tile",children:[e.jsx("div",{className:"kpi-icon",children:e.jsx(re,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"kpi-value",children:y||"-"}),e.jsx("p",{className:"kpi-label",children:t("ci.avgPosition")})]})]}),e.jsxs("div",{className:"kpi-tile",children:[e.jsx("div",{className:"kpi-icon",children:e.jsx(L,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"kpi-value",children:S}),e.jsx("p",{className:"kpi-label",children:t("ci.ownDomain")})]})]}),e.jsxs("div",{className:"kpi-tile",children:[e.jsx("div",{className:"kpi-icon",children:e.jsx(X,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"kpi-value",children:ee}),e.jsx("p",{className:"kpi-label",children:t("ci.competition")})]})]})]}),e.jsx(x,{className:"bg-primary/5",children:e.jsx(u,{className:"p-4",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ve,{className:"w-4 h-4 text-primary shrink-0"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.jsx("strong",{children:t("ci.platformCapabilities")})," ",t("ci.platformCapabilitiesDesc")]})]}),e.jsx(fe,{triggerVariant:"button"})]})})}),j.length===0&&!g?e.jsx(x,{className:"bg-primary/5",children:e.jsxs(u,{className:"p-8 text-center space-y-4",children:[e.jsx(Q,{className:"w-12 h-12 text-primary mx-auto"}),e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:t("ci.emptyTitle")}),e.jsx("p",{className:"text-muted-foreground max-w-lg mx-auto",children:t("ci.emptyDesc")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("ci.emptyTip")})]})}):e.jsxs(e.Fragment,{children:[e.jsx(T,{icon:ne,title:"AI Citation Leaders",description:"Die von KI-Systemen am häufigsten zitierten Domains — gerankt nach Influence Score"}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[e.jsx(x,{className:"xl:col-span-2",children:e.jsx(u,{className:"p-0",children:e.jsxs("div",{className:"divide-y divide-border",children:[E.map((s,i)=>{const C=$>0?s.influenceScore/$*100:0;return e.jsxs("div",{className:"flex items-center gap-4 p-4 hover:bg-muted/30 transition-colors",children:[e.jsx("span",{className:"text-lg font-bold text-muted-foreground w-8 text-center",children:i+1}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-semibold text-foreground text-sm truncate",children:s.domain}),s.isUserDomain&&e.jsx(d,{className:"bg-success/20 text-success border-success/30 text-[10px] px-1.5 py-0",children:t("ci.own")}),s.isCompetitorDomain&&e.jsx(d,{className:"bg-destructive/20 text-destructive border-destructive/30 text-[10px] px-1.5 py-0",children:t("ci.competitor")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${C}%`,backgroundColor:s.isUserDomain?"hsl(142, 71%, 45%)":s.isCompetitorDomain?"hsl(0, 84%, 60%)":"hsl(var(--primary))"}})}),e.jsx("div",{className:"flex gap-1",children:s.platforms.map(F=>e.jsx(d,{variant:"outline",className:"text-[10px] py-0",children:F},F))})]})]}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:s.count}),e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Ø ",s.avgPosition]})]})]},s.domain)}),E.length===0&&e.jsx("p",{className:"text-muted-foreground text-center py-8",children:t("ci.noData")})]})})}),e.jsxs(x,{children:[e.jsx(N,{className:"pb-3",children:e.jsxs(v,{className:"flex items-center gap-2 text-base",children:[e.jsx(L,{className:"w-5 h-5 text-success"}),"Deine Domain-Präsenz"]})}),e.jsx(u,{children:K.length>0?e.jsx("div",{className:"space-y-4",children:K.map(s=>e.jsxs("div",{className:"p-3 bg-success/5 rounded-lg border border-success/20 space-y-2",children:[e.jsx("p",{className:"font-medium text-sm text-foreground",children:s.domain}),e.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Zitate"}),e.jsx("p",{className:"text-lg font-bold text-foreground",children:s.count})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Influence"}),e.jsx("p",{className:"text-lg font-bold text-foreground",children:s.influenceScore.toFixed(1)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Ø Pos"}),e.jsx("p",{className:"text-lg font-bold text-foreground",children:s.avgPosition})]})]}),e.jsx("div",{className:"flex gap-1",children:s.platforms.map(i=>e.jsx(d,{variant:"outline",className:"text-[10px]",children:i},i))})]},s.domain))}):e.jsxs("div",{className:"text-center py-6 space-y-2",children:[e.jsx(L,{className:"w-8 h-8 text-muted-foreground
1/30 mx-auto"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Noch keine eigene Domain in Citations erkannt"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Stelle sicher, dass deine Domains im Brand-Profil hinterlegt sind"})]})})]})]}),e.jsx(T,{icon:ye,title:t("ci.authorityRankingTitle","AI Authority Ranking"),description:t("ci.authorityRankingDesc","Diese Domains haben den stärksten Einfluss auf KI-Antworten")}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[e.jsxs(x,{children:[e.jsxs(N,{className:"pb-3",children:[e.jsx(v,{className:"text-base",children:t("ci.authorityScore","Authority Score")}),e.jsx(k,{children:t("ci.authorityScoreDesc","Normalisierter Einfluss jeder Domain (0–100)")})]}),e.jsx(u,{children:z.length>0?e.jsx("div",{className:"space-y-3",children:z.map(s=>e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium text-foreground truncate max-w-[200px]",children:s.domain}),s.isUserDomain&&e.jsx(d,{className:"bg-success/20 text-success border-success/30 text-[10px] px-1.5 py-0",children:t("ci.own")}),s.isCompetitorDomain&&e.jsx(d,{className:"bg-destructive/20 text-destructive border-destructive/30 text-[10px] px-1.5 py-0",children:t("ci.competitor")})]}),e.jsx("span",{className:"text-sm font-bold text-foreground",children:s.normalizedScore})]}),e.jsx(le,{value:s.normalizedScore,className:"h-2"})]},s.domain))}):e.jsx("p",{className:"text-muted-foreground text-center py-8",children:t("ci.noData")})})]}),e.jsxs(x,{children:[e.jsxs(N,{className:"pb-3",children:[e.jsxs(v,{className:"flex items-center gap-2 text-base",children:[e.jsx(ce,{className:"w-5 h-5 text-primary"}),"Influence Patterns"]}),e.jsx(k,{children:"Welche Quellentypen korrelieren mit den besten Positionen"})]}),e.jsx(u,{className:"space-y-4",children:P.length===0?e.jsx("p",{className:"text-sm text-muted-foreground text-center py-6",children:t("ci.noData")}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-2",children:P.map(s=>e.jsxs("div",{className:"flex items-center justify-between p-2.5 rounded-lg bg-muted/20 border border-border/30",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(d,{variant:"outline",className:"text-[10px]",children:B[s.sourceType]||s.sourceType}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[s.count," Zitate"]})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-sm font-semibold text-foreground",children:["Ø ",s.avgPosition]}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:s.recommendation})]})]},s.sourceType))}),w.length>0&&e.jsxs("div",{className:"space-y-2 pt-2 border-t border-border/30",children:[e.jsxs("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider flex items-center gap-1.5",children:[e.jsx(R,{className:"w-3.5 h-3.5"}),"Cross-Platform Autorität"]}),w.slice(0,5).map(s=>e.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg bg-primary/5 border border-primary/10",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:s.domain}),e.jsx("div",{className:"flex gap-1",children:s.platforms.map(i=>e.jsx(d,{variant:"outline",className:"text-[10px]",children:i},i))})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[s.count,"×"]}),e.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[s.platforms.length," Plattformen"]})]})]},s.domain))]})]})})]})]}),e.jsx(T,{icon:oe,title:"Citation Opportunities",description:"Domains, auf denen Wettbewerber zitiert werden — du aber nicht. Hier kannst du Sichtbarkeit gewinnen."}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[e.jsxs(x,{children:[e.jsxs(N,{className:"pb-3",children:[e.jsxs(v,{className:"flex items-center gap-2 text-base",children:[e.jsx(de,{className:"w-5 h-5 text-destructive"}),"Source Gaps"]}),e.jsx(k,{children:"Domains mit Konkurrenz-Citations, aber ohne deine Präsenz"})]}),e.jsx(u,{children:_.length===0?e.jsxs("div",{className:"text-center py-6 space-y-2",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Keine Source Gaps erkannt"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Entweder fehlen Konkurrenz-Citations oder du bist überall präsent 🎉"})]}):e.jsx("div",{className:"space-y-3",children:_.slice(0,8).map(s=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-destructive/5 rounded-lg border border-destructive/20",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"font-medium text-sm text-foreground",children:s.domain}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(d,{variant:"outline",className:"text-[10px]",children:B[s.sourceType]||s.sourceType}),s.platforms.map(i=>e.jsx(d,{variant:"outline",className:"text-[10px]",children:i},i))]})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-sm font-semibold text-destructive",children:[s.competitorCitations,"× Konkurrenz"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Du: 0 Zitate"})]})]},s.domain))})})]}),e.jsx(De,{citations:j})]}),e.jsx(T,{icon:R,title:"Platform Citation Behavior",description:"Wie sich ChatGPT, Perplexity und Google AI in ihren Quellpräferenzen unterscheiden"}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[U.map(s=>e.jsxs(x,{children:[e.jsx(N,{className:"pb-3",children:e.jsx(v,{className:"text-base",children:s.platform})}),e.jsx(u,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Gesamt-Zitate"}),e.jsx("span",{className:"text-xl font-bold text-foreground",children:s.total})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm text-muted-foreground flex items-center gap-1.5",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-success inline-block"}),"Eigene Domain"]}),e.jsx("span",{className:"text-sm font-semibold text-foreground",children:s.userDomain})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm text-muted-foreground flex items-center gap-1.5",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-destructive inline-block"}),"Konkurrenz"]}),e.jsx("span",{className:"text-sm font-semibold text-foreground",children:s.competitor})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm text-muted-foreground flex items-center gap-1.5",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-primary inline-block"}),"Drittanbieter"]}),e.jsx("span",{className:"text-sm font-semibold text-foreground",children:s.total-s.userDomain-s.competitor})]}),s.total>0&&e.jsxs("div",{className:"h-2 rounded-full bg-muted overflow-hidden flex",children:[s.userDomain>0&&e.jsx("div",{className:"h-full bg-success",style:{width:`${s.userDomain/s.total*100}%`}}),s.competitor>0&&e.jsx("div",{className:"h-full bg-destructive",style:{width:`${s.competitor/s.total*100}%`}}),e.jsx("div",{className:"h-full bg-primary flex-1"})]})]})})]},s.platform)),U.length===0&&e.jsx(x,{className:"xl:col-span-3",children:e.jsx(u,{className:"p-8 text-center text-muted-foreground",children:t("ci.noData")})})]}),e.jsx(T,{icon:me,title:"Citation Analytics",description:"Detaillierte Verteilungen und Query-Level-Analyse"}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[e.jsxs(x,{children:[e.jsxs(N,{className:"pb-3",children:[e.jsx(v,{className:"text-base",children:t("ci.sourceTypeDistribution")}),e.jsx(k,{children:t("ci.sourceTypeDistributionDesc")})]}),e.jsx(u,{children:M.length>0?e.jsx(Z,{width:"100%",height:260,children:e.jsxs(Y,{children:[e.jsx(J,{data:M,cx:"50%",cy:"50%",outerRadius:90,dataKey:"value",label:({name:s,value:i})=>`${s}: ${i}`,children:M.map((s,i)=>e.jsx(W,{fill:be[s.key]||A[i%A.length]},`cell-st-${i}`))}),e.jsx(H,{})]})}):e.jsx("p",{className:"text-muted-foreground text-center py-8",children:t("ci.noData")})})]}),e.jsxs(x,{children:[e.jsxs(N,{className:"pb-3",children:[e.jsx(v,{className:"text-base",children:t("ci.citationsByPlatform")}),e.jsx(k,{children:t("ci.citationsByPlatformDesc")})]}),e.jsx(u,{children:I.length>0?e.jsx(Z,{width:"100%",height:260,children:e.jsxs(Y,{children:[e.jsx(J,{data:I,cx:"50%",cy:"50%",outerRadius:90,dataKey:"value",label:({name:s,value:i})=>`${s}: ${i}`,children:I.map((s,i)=>e.jsx(W,{fill:A[i%A.length]},`cell-p-${i}`))}),e.jsx(H,{})]})}):e.jsx("p",{className:"text-muted-foreground text-center py-8",children:t("ci.noData")})})]}),e.jsx(we,{userId:c==null?void 0:c.id}),e.jsxs(x,{children:[e.jsxs(N,{className:"pb-3",children:[e.jsx(v,{className:"text-base",children:t("ci.allCitedDomains")}),e.jsx(k,{children:t("ci.sortedByInfluence")})]}),e.jsx(u,{children:e.jsxs("div",{className:"space-y-2",children:[n.slice(0,20).map((s,i)=>e.jsxs("div",{className:"flex items-center justify-between p-2.5 bg-muted/15 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs font-mono text-muted-foreground w-5",children:["#",i+1]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("p",{className:"font-medium text-foreground text-sm",children:s.domain}),s.isUserDomain&&e.jsx(d,{className:"bg-success/20 text-success border-success/30 text-[10px] px-1 py-0",children:t("ci.own")}),s.isCompetitorDomain&&e.jsx(d,{className:"bg-destructive/20 text-destructive border-destructive/30 text-[10px] px-1 py-0",children:t("ci.competitor")})]}),e.jsx("div",{className:"flex gap-1 mt-0.5",children:s.platforms.map(C=>e.jsx(d,{variant:"outline",className:"text-[10px] py-0",children:C},C))})]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"font-semibold text-foreground text-sm",children:s.influenceScore.toFixed(2)}),e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[s.count,t("ci.timesAvgPos")," ",s.avgPosition]})]})]},s.domain)),n.length===0&&e.jsx("p",{className:"text-muted-foreground text-center py-4",children:t("ci.noDomainData")})]})})]})]})]})]})};export{Le 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.