1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4866],{94866:function(e,l,o){o.r(l),o.d(l,{BacklinkExplorer:function(){return h}});var t=o(85893),n=o(67294),s=o(11163),a=o(39958),r=o(72918),i=o(48235),d=o(35131),c=o(21427),x=o(95364);let f=e=>e>=70?"#22c55e":e>=40?"#eab308":"#9ca3af",m=e=>{let{x:l,y:o,width:s,height:a,name:r,count:i,dofollow_percent:d,isZoomed:c,onClick:x}=e,[m,u]=(0,n.useState)(!1);if(s<30||a<30||!r)return null;let h=s>80&&a>50;return(0,t.jsxs)("g",{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),onClick:x,style:{cursor:x?"pointer":"default"},children:[(0,t.jsx)("rect",{x:l,y:o,width:s,height:a,fill:m?"#475569":"#334155",stroke:f(d||0),strokeWidth:m?3:2,rx:6,className:"transition-all duration-200"}),s>60&&a>40&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("text",{x:l+s/2,y:o+a/2-(h?8:0),textAnchor:"middle",dominantBaseline:"middle",fill:"#ffffff",fontSize:"13px",fontWeight:"bold",stroke:"#0f172a",strokeWidth:.5,paintOrder:"stroke",children:r.length>15?r.substring(0,13)+"..":r}),h&&void 0!==i&&(0,t.jsxs)("text",{x:l+s/2,y:o+a/2+12,textAnchor:"middle",dominantBaseline:"middle",fill:"rgba(255,255,255,0.6)",fontSize:"10px",stroke:"#0f172a",strokeWidth:.3,paintOrder:"stroke",children:[i.toLocaleString()," ",c?"links":"domains"]})]})]})},u=e=>{let{active:l,payload:o}=e;if(!l||!o||!o.length)return null;let n=o[0].payload;return(0,t.jsxs)("div",{className:"bg-popover text-popover-foreground shadow-lg rounded-lg px-3 py-2 text-sm border",children:[(0,t.jsxs)("div",{className:"font-semibold flex items-center gap-1.5",children:[(0,t.jsx)(d.Z,{className:"h-3 w-3"}),n.name]}),(0,t.jsxs)("div",{className:"text-muted-foreground text-xs mt-1",children:[n.count.toLocaleString()," backlinks",void 0!==n.dofollow_percent&&(0,t.jsxs)("span",{className:"ml-2 ".concat(n.dofollow_percent>=70?"text-green-500":n.dofollow_percent>=40?"text-yellow-500":"text-gray-500"),children:[n.dofollow_percent,"% dofollow"]}),void 0!==n.dofollow&&(0,t.jsx)("span",{className:"ml-2 ".concat(n.dofollow?"text-green-500":"text-gray-500"),children:n.dofollow?"Dofollow":"Nofollow"})]})]})};function h(e){let{domain:l,groups:o,totalReferringDomains:d}=e,f=(0,s.useRouter)(),[h,g]=(0,n.useState)(null),p=(0,n.useMemo)(()=>h?h.top_domains.map(e=>({name:e.domain,size:e.backlinks,count:e.backlinks,dofollow:e.dofollow,dofollow_percent:e.dofollow?100:0})):o.map(e=>({name:e.name,size:e.count,count:e.count,dofollow_count:e.dofollow_count,dofollow_percent:e.dofollow_percent,original:e})),[o,h]),w=e=>{h?f.push("/preview/".concat(e.name)):e.original&&g(e.original)};return 0===o.length?null:(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[h&&(0,t.jsxs)(x.z,{variant:"ghost",size:"sm",onClick:()=>{g(null)},className:"h-8 px-2",children:[(0,t.jsx)(c.Z,{className:"h-4 w-4"}),"Back"]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:h?"".concat(h.name," Domains"):"Backlink Distribution by TLD"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:h?"".concat(h.count.toLocaleString()," referring domains"):"".concat(d.toLocaleString()," total referring domains")})]})]}),h&&(0,t.jsxs)("span",{className:"text-xs px-2 py-0.5 rounded-full ".concat(h.dofollow_percent>=70?"bg-green-500/20 text-green-600":h.dofollow_percent>=40?"bg-yellow-500/20 text-yellow-600":"bg-gray-500/20 text-gray-600"),children:[h.dofollow_percent,"% dofollow"]})]}),(0,t.jsx)("div",{className:"w-full h-[300px] rounded-lg overflow-hidden",style:{background:"linear-gradient(180deg, #1e293b 0%, #0f172a 100%)"},children:(0,t.jsx)(a.h,{width:"100%",height:"100%",children:(0,t.jsx)(r.W,{data:p,dataKey:"size",aspectRatio:4/3,stroke:"#0f172a",content:e=>{let{x:l,y:o,width:n,height:s,name:a,count:r,dofollow_percent:i}=e;return(0,t.jsx)(m,{x:l,y:o,width:n,height:s,name:a,count:r,dofollow_percent:i,isZoomed:!!h,onClick:()=>{let e=p.find(e=>e.name===a);e&&w(e)}})},children:(0,t.jsx)(i.u,{content:(0,t.jsx)(u,{})})})})}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-center gap-4 mt-4 text-xs text-muted-foreground",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded bg-green-500"}),(0,t.jsx)("span",{children:"High dofollow (70%+)"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded bg-yellow-500"}),(0,t.jsx)("span",{children:"Medium dofollow (40-70%)"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded bg-gray-400"}),(0,t.jsx)("span",{children:"Low dofollow (<40%)"})]})]}),(0,t.jsx)("p",{className:"text-center text-xs text-muted-foreground mt-2",children:h?"Click a domain to explore its backlinks":"Click a TLD group to explore individual domains"})]})}}}]);
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.