1import{r as c,j as t,R as q,_ as me,D as xe,Q as ge,c as Z,O as H,$ as he,a0 as pe,b as ue,X as be,N as ye,m as fe,P as we}from"./index-B_KAAQRW.js";import{p as je}from"./backlinkCsv-BuzOppF6.js";import{U as Ne}from"./upload-jHQgtZSc.js";import{E as ve}from"./external-link-CaCnbLs9.js";import{B as Ce}from"./ban-B8XHNYoJ.js";const ke=["casino","poker","gambling","bet","slots","adult","xxx","porn","sex","escort","dating","lottery","betting","blackjack","roulette"],Se=[".cn",".ru",".jp",".kr",".vn",".th",".id",".tw",".hk",".sa",".ae",".ir",".pk",".bd",".tr",".pl",".cz",".hu",".ro",".bg",".ua",".by",".kz"],De=[".xyz",".info",".online",".site",".top",".club",".work",".click",".link",".space",".pro",".icu",".buzz",".monster",".bond",".homes",".shop",".store",".live",".life",".fun",".biz"],_e=10*1024*1024,j={social:{icon:"ð±",label:"Social Links",keywords:["facebook","twitter","linkedin","instagram","pinterest","tiktok","youtube","reddit","tumblr","snapchat"]},profile:{icon:"ð¤",label:"Profile Links",keywords:["profile","about","author","user","member","account","gravatar","behance","dribbble","github"]},company:{icon:"ð¢",label:"Company Backlinks",keywords:["business","company","corp","inc","llc","yellowpages","yelp","bbb","manta","crunchbase"]},tool:{icon:"ð§",label:"Tool Websites",keywords:["seo","tool","analyzer","checker","audit","test","validator","generator"]},review:{icon:"â",label:"Trust Reviews",keywords:["review","rating","trustpilot","capterra","g2","getapp","softwareadvice"]},comment:{icon:"ð",label:"Comment Backlinks",keywords:["comment","reply","respond","discuss","blog","wordpress","disqus"]},edu:{icon:"ð",label:"EDU Backlinks",keywords:[".edu","university","college","school","academic","education"]},gov:{icon:"ðï¸",label:"GOV Backlinks",keywords:[".gov","government","federal","state","municipal"]},forum:{icon:"ð¬",label:"Forum Backlinks",keywords:["forum","board","community","discuss","thread","phpbb","vbulletin","xenforo"]},bookmark:{icon:"ð",label:"Social Bookmarking",keywords:["bookmark","digg","stumble","delicious","pocket","flipboard","scoop"]},guest:{icon:"ð",label:"Guest Posting",keywords:["guest","contribute","writer","author","submission","article","publish"]},local:{icon:"ð",label:"Local Citation",keywords:["local","city","maps","places","location","directory","listing"]},directory:{icon:"ð",label:"Directory Backlinks",keywords:["directory","listing","submit","add-url","dmoz","jasmine"]},file:{icon:"ð¤",label:"File Upload",keywords:["file","upload","share","slideshare","scribd","issuu","docstoc","pdf"]},web2:{icon:"ð",label:"Web 2.0",keywords:["blog","wordpress","blogger","medium","tumblr","weebly","wix","livejournal"]},launch:{icon:"ð",label:"Product Launch",keywords:["launch","startup","product","hunt","betalist","launching"]},infographic:{icon:"ð",label:"Infographics",keywords:["infographic","visual","chart","graph","diagram","piktochart"]}},$e=()=>{const[n,u]=c.useState([]),[ee,L]=c.useState(!1),[T,E]=c.useState(""),[b,A]=c.useState("all"),[y,N]=c.useState(1),[R,P]=c.useState("domain"),[x,te]=c.useState({key:null,direction:"asc"}),[f,M]=c.useState(""),[v,se]=c.useState("all"),[C,I]=c.useState("domain"),F=50,[g,k]=c.useState(new Set),[h,w]=c.useState({}),[$,U]=c.useState(!1),[G,V]=c.useState({current:0,total:0}),[J,W]=c.useState(!1),[m,S]=c.useState({foreign:!0,spammy_tld:!0,adult_gambling:!0,low_dr:!0,low_dr_threshold:5}),z="backlink_cleaner_data";c.useEffect(()=>{try{const e=localStorage.getItem(z);if(e){const s=JSON.parse(e);s.backlinks&&u(s.backlinks),s.fileName&&E(s.fileName),s.csvFormat&&P(s.csvFormat),s.advancedData&&w(s.advancedData),s.excludedFromSpam&&k(new Set(s.excludedFromSpam)),s.filterCriteria&&S(s.filterCriteria)}}catch(e){console.error("Failed to load saved backlink cleaner data:",e)}},[]),c.useEffect(()=>{if(n.length>0)try{const e={backlinks:n,fileName:T,csvFormat:R,advancedData:h,excludedFromSpam:Array.from(g),filterCriteria:m};localStorage.setItem(z,JSON.stringify(e))}catch(e){console.error("Failed to save backlink cleaner data:",e)}},[n,T,R,h,g,m]);const ae=e=>{const s=`${e.domain} ${e.url} ${e.title||""} ${e.metaDescription||""}`.toLowerCase();for(const[a,r]of Object.entries(j))if(r.keywords.some(i=>s.includes(i)))return a;return"other"},D=c.useCallback(e=>e.map(s=>{if(g.has(s.id))return{...s,flags:[],isClean:!0};const a=[],r=s.domain.toLowerCase(),i=s.tld.toLowerCase();m.foreign&&Se.some(o=>i===o||i.endsWith(o))&&a.push({type:"foreign",message:"Foreign TLD"}),m.spammy_tld&&De.some(o=>i===o||i.endsWith(o))&&a.push({type:"spammy_tld",message:"Spammy TLD"}),m.adult_gambling&&ke.some(o=>r.includes(o))&&a.push({type:"adult_gambling",message:"Adult/Gambling"}),m.low_dr&&s.dr<=m.low_dr_threshold&&a.push({type:"low_dr",message:`Low DR (${s.dr})`});const l=h[s.id];return{...s,flags:a,isClean:a.length===0,category:s.category,title:(l==null?void 0:l.title)||s.title,metaDescription:(l==null?void 0:l.metaDescription)||s.metaDescription,statusCode:(l==null?void 0:l.statusCode)||s.statusCode}}),[m,g,h]),K=e=>{var r;if(!e)return;const s=(r=e.name.toLowerCase().match(/\.[^.]+$/))==null?void 0:r[0];if(![".csv",".tsv",".txt"].includes(s)){alert("Please select a CSV, TSV, or TXT export file.");return}if(e.size>_e){alert("The selected file is too large. Please upload a file smaller than 10 MB.");return}w({}),k(new Set);const a=new FileReader;a.onload=i=>{try{const{results:l,format:o}=je(i.target.result);E(e.name),P(o),u(D(l)),N(1)}catch(l){alert(l instanceof Error?l.message:"Could not parse this backlink file.")}},a.onerror=()=>alert("Could not read the selected file. Please try again."),a.readAsText(e)},re=async()=>
1{if(n.length===0)return;U(!0),V({current:0,total:n.length});const e={...h},s=5;for(let r=0;r<n.length;r+=s){const i=n.slice(r,r+s);await Promise.all(i.map(async l=>{if(!e[l.id])try{const d=await(await fetch("/api/fetch-url-meta",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l.url,includeMetaDescription:!0})})).json();e[l.id]={title:d.title||null,metaDescription:d.metaDescription||null,statusCode:d.statusCode||null}}catch{e[l.id]={title:null,metaDescription:null,statusCode:0}}})),V({current:Math.min(r+s,n.length),total:n.length}),w({...e})}w(e);const a=D(n.map(r=>{var i,l,o;return{...r,title:((i=e[r.id])==null?void 0:i.title)||r.title,metaDescription:((l=e[r.id])==null?void 0:l.metaDescription)||r.metaDescription,statusCode:((o=e[r.id])==null?void 0:o.statusCode)||r.statusCode}}));u(a),U(!1)},le=async()=>{if(n.length!==0){W(!0);try{const e=n.slice(0,100).map(i=>{var l,o;return{id:i.id,domain:i.domain,title:((l=h[i.id])==null?void 0:l.title)||"",meta:((o=h[i.id])==null?void 0:o.metaDescription)||""}}),a=await(await fetch("/api/ai-tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operation:"backlinks.categorize",inputs:{links:e}})})).json(),r=JSON.parse(a.text);if(r.results){const i={};r.results.forEach(l=>{i[l.id]=l.category}),u(l=>l.map(o=>({...o,category:i[o.id]||o.category||ae(o)})))}}catch(e){console.error("AI categorization error:",e)}W(!1)}},oe=e=>{k(s=>{const a=new Set(s);return a.has(e)?a.delete(e):a.add(e),a})},ne=c.useCallback(()=>{if(n.length>0){const e=D(n);u(e)}},[n,D]),p=c.useMemo(()=>{const e=n.length,s=n.filter(o=>o.isClean).length,a=n.filter(o=>!o.isClean).length,r=e>0?Math.round(n.reduce((o,d)=>o+d.dr,0)/e):0,i=Object.keys(h).length,l=g.size;return{total:e,clean:s,flagged:a,avgDR:r,scanned:i,excluded:l}},[n,h,g]),Q=c.useMemo(()=>{const e={};return n.forEach(s=>{const a=s.category||"other";e[a]=(e[a]||0)+1}),e},[n]),B=c.useMemo(()=>{let e=n;if(b==="clean"&&(e=e.filter(s=>s.isClean)),b==="flagged"&&(e=e.filter(s=>!s.isClean)),v!=="all"&&(e=e.filter(s=>s.category===v)),f.trim()){const s=f.toLowerCase();e=e.filter(a=>a.domain.toLowerCase().includes(s)||a.title&&a.title.toLowerCase().includes(s)||a.metaDescription&&a.metaDescription.toLowerCase().includes(s))}return e},[n,b,v,f]),O=c.useMemo(()=>x.key?[...B].sort((e,s)=>{let a=e[x.key],r=s[x.key];return typeof a=="string"&&(a=(a==null?void 0:a.toLowerCase())||"",r=(r==null?void 0:r.toLowerCase())||""),a<r?x.direction==="asc"?-1:1:a>r?x.direction==="asc"?1:-1:0}):B,[B,x]),_=Math.ceil(O.length/F),ie=O.slice((y-1)*F,y*F),X=e=>{te(s=>s.key!==e?{key:e,direction:"asc"}:s.direction==="asc"?{key:e,direction:"desc"}:{key:null,direction:"asc"})},ce=()=>{const e=n.filter(d=>d.isClean);if(e.length===0){alert("No clean backlinks!");return}const s="Domain,URL,DR,TLD,Category,Title,Status",a=e.map(d=>{var Y;return`"${d.domain}","${d.url}",${d.dr},"${d.tld}","${((Y=j[d.category])==null?void 0:Y.label)||"Other"}","${(d.title||"").replace(/"/g,'""')}",${d.statusCode||""}`}),r=[s,...a].join(` 2`),i=new Blob([r],{type:"text/csv"}),l=URL.createObjectURL(i),o=document.createElement("a");o.href=l,o.download=`clean_backlinks_${new Date().toISOString().split("T")[0]}.csv`,o.click()},de=()=>{u([]),E(""),w({}),k(new Set),N(1),localStorage.removeItem(z)};return t.jsxs("div",{className:"h-screen overflow-y-auto bg-gradient-to-br from-emerald-50 to-teal-50",children:[t.jsx("div",{className:"bg-gradient-to-r from-emerald-600 to-teal-600 text-white shadow-lg sticky top-0 z-40",children:t.jsx("div",{className:"max-w-7xl mx-auto px-4 py-6",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[t.jsx(q,{className:"w-8 h-8"}),"Backlink Cleaner"]}),t.jsx("p",{className:"text-emerald-100 text-sm mt-1",children:"Upload competitor backlinks CSV ⢠Advanced Analysis ⢠AI Categorization"})]}),n.length>0&&t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:de,className:"flex items-center gap-2 px-4 py-2 bg-white/20 hover:bg-white/30 rounded-lg transition",children:[t.jsx(me,{className:"w-4 h-4"})," Clear"]}),t.jsxs("button",{onClick:ce,className:"flex items-center gap-2 px-4 py-2 bg-white text-emerald-600 rounded-lg font-semibold hover:bg-emerald-50 transition",children:[t.jsx(xe,{className:"w-4 h-4"})," Export Clean (",p.clean,")"]})]})]})})}),t.jsx("div",{className:"max-w-7xl mx-auto px-4 py-8",children:n.length===0?t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-2xl shadow-lg border border-emerald-200 p-6",children:[t.jsxs("h3",{className:"text-lg font-bold text-gray-900 mb-4 flex items-center gap-2",children:[t.jsx(ge,{className:"w-5 h-5 text-emerald-600"}),"Cleaning Criteria"]}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[[{key:"foreign",icon:"ð",label:"Foreign TLDs",desc:".cn, .ru, .jp..."},{key:"spammy_tld",icon:"â ï¸",label:"Spammy TLDs",desc:".xyz, .info..."},{key:"adult_gambling",icon:"ð°",label:"Adult/Gambling",desc:"c
2asino, betting..."}].map(e=>t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-xl border border-gray-200 hover:border-emerald-400 cursor-pointer transition",children:[t.jsx("input",{type:"checkbox",checked:m[e.key],onChange:s=>S(a=>({...a,[e.key]:s.target.checked})),className:"w-5 h-5 rounded text-emerald-600"}),t.jsxs("div",{children:[t.jsxs("div",{className:"font-medium text-gray-900 text-sm",children:[e.icon," ",e.label]}),t.jsx("div",{className:"text-xs text-gray-500",children:e.desc})]})]},e.key)),t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-xl border border-gray-200 hover:border-emerald-400 cursor-pointer transition",children:[t.jsx("input",{type:"checkbox",checked:m.low_dr,onChange:e=>S(s=>({...s,low_dr:e.target.checked})),className:"w-5 h-5 rounded text-emerald-600"}),t.jsxs("div",{children:[t.jsx("div",{className:"font-medium text-gray-900 text-sm",children:"ð Low DR (0-5)"}),t.jsxs("div",{className:"text-xs text-gray-500",children:["DR ⤠",t.jsx("input",{type:"number",value:m.low_dr_threshold,onChange:e=>S(s=>({...s,low_dr_threshold:parseInt(e.target.value)||0})),onClick:e=>e.stopPropagation(),className:"w-12 px-1 border rounded text-center",min:"0",max:"100"})]})]})]})]})]}),t.jsxs("div",{className:`bg-white rounded-2xl shadow-lg border-2 border-dashed p-12 text-center transition-all ${ee?"border-emerald-500 bg-emerald-50":"border-gray-300 hover:border-emerald-400"}`,onDragOver:e=>{e.preventDefault(),L(!0)},onDragLeave:()=>L(!1),onDrop:e=>{e.preventDefault(),L(!1),K(e.dataTransfer.files[0])},children:[t.jsx(Ne,{className:"w-16 h-16 mx-auto text-emerald-400 mb-4"}),t.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Upload Competitor Backlinks CSV"}),t.jsx("p",{className:"text-gray-500 mb-6",children:"Supports Semrush backlinks and referring-domains exports, plus Ahrefs CSV/TSV files"}),t.jsx("input",{type:"file",accept:".csv,.tsv,.txt",onChange:e=>{K(e.target.files[0]),e.target.value=""},className:"hidden",id:"csv-upload"}),t.jsxs("label",{htmlFor:"csv-upload",className:"inline-flex items-center gap-2 px-6 py-3 bg-gradient-to-r from-emerald-600 to-teal-600 text-white rounded-xl font-semibold hover:shadow-lg cursor-pointer transition",children:[t.jsx(Z,{className:"w-5 h-5"})," Choose CSV File"]})]})]}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-6 gap-4",children:[t.jsxs("div",{onClick:()=>A("all"),className:`bg-white rounded-xl shadow p-4 border-l-4 border-gray-400 cursor-pointer hover:bg-gray-50 ${b==="all"?"ring-2 ring-gray-400":""}`,children:[t.jsx("div",{className:"text-2xl font-bold text-gray-900",children:p.total}),t.jsx("div",{className:"text-xs text-gray-500",children:"Total Links"})]}),t.jsxs("div",{onClick:()=>A("clean"),className:`bg-white rounded-xl shadow p-4 border-l-4 border-emerald-500 cursor-pointer hover:bg-emerald-50 ${b==="clean"?"ring-2 ring-emerald-500":""}`,children:[t.jsx("div",{className:"text-2xl font-bold text-emerald-600",children:p.clean}),t.jsx("div",{className:"text-xs text-gray-500",children:"Clean â"})]}),t.jsxs("div",{onClick:()=>A("flagged"),className:`bg-white rounded-xl shadow p-4 border-l-4 border-red-500 cursor-pointer hover:bg-red-50 ${b==="flagged"?"ring-2 ring-red-500":""}`,children:[t.jsx("div",{className:"text-2xl font-bold text-red-600",children:p.flagged}),t.jsx("div",{className:"text-xs text-gray-500",children:"Flagged"})]}),t.jsxs("div",{className:"bg-white rounded-xl shadow p-4 border-l-4 border-blue-500",children:[t.jsx("div",{className:"text-2xl font-bold text-blue-600",children:p.avgDR}),t.jsx("div",{className:"text-xs text-gray-500",children:"Avg DR"})]}),t.jsxs("div",{className:"bg-white rounded-xl shadow p-4 border-l-4 border-purple-500",children:[t.jsx("div",{className:"text-2xl font-bold text-purple-600",children:p.scanned}),t.jsx("div",{className:"text-xs text-gray-500",children:"Scanned"})]}),t.jsxs("div",{className:"bg-white rounded-xl shadow p-4 border-l-4 border-amber-500",children:[t.jsx("div",{className:"text-2xl font-bold text-amber-600",children:p.excluded}),t.jsx("div",{className:"text-xs text-gray-500",children:"Excluded"})]})]}),t.jsxs("div",{className:"bg-white rounded-xl shadow p-4 flex flex-wrap items-center gap-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Z,{className:"w-5 h-5 text-emerald-600"}),t.jsx("span",{className:"font-medium",children:T})]}),t.jsx("div",{className:"flex-1"}),t.jsxs("button",{onClick:re,disabled:$,className:"px-4 py-2 bg-gradient-to-r from-blue-600 to-indigo-600 text-white rounded-lg font-medium disabled:opacity-50 flex items-center gap-2",children:[$?t.jsx(H,{className:"w-4 h-4 animate-spin"}):t.jsx(he,{className:"w-4 h-4"}),$?`Scanning ${G.current}/${G.total}`:"Extract Title/Meta/Status"]}),Object.keys(h).length>0&&t.jsxs("button",{onClick:le,disabled:J,className:"px-4 py-2 bg-gradient-to-r from-purple-600 to-pink-600 text-white rounded-lg font-medium disabled:opacity-50 flex items-center gap-2",children:[J?t.jsx(H,{className:"w-4 h-4 animate-spin"}):t.jsx(pe,{className:"w-4 h-4"}),"AI Categorize"]}),t.jsxs("button",{onClick:ne,className:"px-4 py-2 bg-gray-100 hover:bg-gray-200 rounded-lg flex items-center gap-2",children:[t.jsx(q,{className:"w-4 h-4"}
2)," Re-analyze"]})]}),t.jsxs("div",{className:"bg-white rounded-xl shadow p-4 flex flex-wrap items-center gap-4",children:[t.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-[200px]",children:[t.jsx(ue,{className:"w-5 h-5 text-gray-400"}),t.jsx("input",{type:"text",value:f,onChange:e=>M(e.target.value),placeholder:"Search domains, titles...",className:"flex-1 border-none outline-none text-sm"}),f&&t.jsx(be,{className:"w-4 h-4 text-gray-400 cursor-pointer",onClick:()=>M("")})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(ye,{className:"w-4 h-4 text-gray-500"}),t.jsxs("select",{value:v,onChange:e=>se(e.target.value),className:"border rounded-lg px-3 py-1.5 text-sm",children:[t.jsx("option",{value:"all",children:"All Categories"}),Object.entries(j).map(([e,s])=>t.jsxs("option",{value:e,children:[s.icon," ",s.label," (",Q[e]||0,")"]},e)),t.jsxs("option",{value:"other",children:["Other (",Q.other||0,")"]})]})]}),t.jsxs("div",{className:"flex items-center gap-1 border rounded-lg overflow-hidden",children:[t.jsx("button",{onClick:()=>I("domain"),className:`px-3 py-1.5 text-xs font-medium transition ${C==="domain"?"bg-emerald-600 text-white":"bg-gray-50 text-gray-600 hover:bg-gray-100"}`,children:"Domain"}),t.jsx("button",{onClick:()=>I("url"),className:`px-3 py-1.5 text-xs font-medium transition ${C==="url"?"bg-emerald-600 text-white":"bg-gray-50 text-gray-600 hover:bg-gray-100"}`,children:"Full URL"})]})]}),t.jsxs("div",{className:"bg-white rounded-2xl shadow-lg overflow-hidden",children:[t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full text-sm",children:[t.jsx("thead",{className:"bg-gray-50 border-b",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-3 py-3 text-left font-semibold text-gray-600 w-10",children:"Status"}),t.jsxs("th",{className:"px-3 py-3 text-left font-semibold text-gray-600 cursor-pointer hover:text-emerald-600",onClick:()=>X("domain"),children:["Domain ",x.key==="domain"&&(x.direction==="asc"?"â":"â")]}),t.jsxs("th",{className:"px-3 py-3 text-left font-semibold text-gray-600 cursor-pointer hover:text-emerald-600 w-16",onClick:()=>X("dr"),children:["DR ",x.key==="dr"&&(x.direction==="asc"?"â":"â")]}),t.jsx("th",{className:"px-3 py-3 text-left font-semibold text-gray-600 w-20",children:"Category"}),t.jsx("th",{className:"px-3 py-3 text-left font-semibold text-gray-600",children:"Title"}),t.jsx("th",{className:"px-3 py-3 text-left font-semibold text-gray-600 w-16",children:"Status"}),t.jsx("th",{className:"px-3 py-3 text-left font-semibold text-gray-600",children:"Issues"}),t.jsx("th",{className:"px-3 py-3 text-center font-semibold text-gray-600 w-16",children:"Exclude"})]})}),t.jsx("tbody",{className:"divide-y divide-gray-100",children:ie.map(e=>{var s,a;return t.jsxs("tr",{className:`hover:bg-gray-50 ${e.isClean?"":"bg-red-50/50"} ${g.has(e.id)?"bg-amber-50/50":""}`,children:[t.jsx("td",{className:"px-3 py-2",children:e.isClean?t.jsx(fe,{className:"w-5 h-5 text-emerald-500"}):t.jsx(we,{className:"w-5 h-5 text-red-500"})}),t.jsx("td",{className:"px-3 py-2",children:t.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",title:C==="url"?e.url:e.domain,className:"text-blue-600 hover:underline flex items-start gap-1 text-xs break-all",children:[C==="url"?e.url:e.domain.length>30?e.domain.slice(0,30)+"...":e.domain,t.jsx(ve,{className:"w-3 h-3 flex-shrink-0 mt-0.5"})]})}),t.jsx("td",{className:"px-3 py-2",children:t.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-bold text-white ${e.dr>=50?"bg-green-600":e.dr>=20?"bg-amber-500":"bg-red-500"}`,children:e.dr})}),t.jsx("td",{className:"px-3 py-2",children:e.category?t.jsxs("span",{className:"text-xs flex items-center gap-1",children:[t.jsx("span",{children:((s=j[e.category])==null?void 0:s.icon)||"ð"}),t.jsx("span",{className:"text-gray-600",children:((a=j[e.category])==null?void 0:a.label)||"Other"})]}):t.jsx("span",{className:"text-gray-400 text-xs",children:"-"})}),t.jsx("td",{className:"px-3 py-2 text-xs text-gray-600 max-w-[200px] truncate",title:e.title||"",children:e.title||t.jsx("span",{className:"text-gray-400",children:"-"})}),t.jsx("td",{className:"px-3 py-2",children:e.statusCode?t.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-bold ${e.statusCode===200?"bg-green-100 text-green-700":e.statusCode>=400?"bg-red-100 text-red-700":"bg-yellow-100 text-yellow-700"}`,children:e.statusCode}):t.jsx("span",{className:"text-gray-400",children:"-"})}),t.jsx("td",{className:"px-3 py-2",children:t.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.flags.map((r,i)=>t.jsx("span",{className:"px-1.5 py-0.5 bg-red-100 text-red-700 rounded text-xs",children:r.message},i)),e.isClean&&t.jsx("span",{className:"px-1.5 py-0.5 bg-emerald-100 text-emerald-700 rounded text-xs",children:"Clean â"})]})}),t.jsx("td",{className:"px-3 py-2 text-center",children:!e.isClean||g.has(e.id)?t.jsx("button",{onClick:()=>oe(e.id),className:`p-1 rounded transition ${g.has(e.id)?"bg-amber-100 text-amber-700":"hover:bg-gray-100 text-gray-400"}`,title:g.has(e.id)?"Click to un-exclude":"Exclude from spam list",children:t.jsx(Ce,{className:"w-4 h-4"})}):t.jsx("span",{className:"text-gray-300",children:"-"})})]},e.id)})})]})}),_>1&&t.jsxs("div",{className:"px-4 py-3 border-t flex items-center justify-between",children:[t.jsx("button",{onClick:()=>N(e=>Math.max(1,e-1)),disabled:y===1,className:"px-3 py-1 bg-gray-100 rounded disabled:opacity-50",children:"Previous"}),t.jsxs("span",{className:"text-sm text-gray-600",children:["Page ",y," of ",_,"
2(",O.length," results)"]}),t.jsx("button",{onClick:()=>N(e=>Math.min(_,e+1)),disabled:y===_,className:"px-3 py-1 bg-gray-100 rounded disabled:opacity-50",children:"Next"})]})]})]})})]})};export{$e 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.