1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8416],{69663:(e,t,a)=>{a.r(t),a.d(t,{Avatar:()=>i,AvatarFallback:()=>c,AvatarImage:()=>n});var s=a(95155);a(12115);var r=a(78513),l=a(53999);function i(e){let{className:t,...a}=e;return(0,s.jsx)(r.bL,{"data-slot":"avatar",className:(0,l.cn)("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...a})}function n(e){let{className:t,...a}=e;return(0,s.jsx)(r._V,{"data-slot":"avatar-image",className:(0,l.cn)("aspect-square size-full",t),...a})}function c(e){let{className:t,...a}=e;return(0,s.jsx)(r.H4,{"data-slot":"avatar-fallback",className:(0,l.cn)("bg-secondary flex size-full items-center justify-center rounded-full",t),...a})}},98416:(e,t,a)=>{a.d(t,{Z:()=>N});var s=a(95155),r=a(6874),l=a.n(r),i=a(66766),n=a(88482),c=a(69663),o=a(88145),d=a(85690),u=a(82218),m=a(51154),x=a(1243),h=a(32919),p=a(70333),g=a(92657),b=a(91788),v=a(53999),f=a(6824),y=a(51362),w=a(12115),j=a(6156);function N(e){var t,a,r,N,k,_,A,E;let{mod:L,showGameName:z=!1,variant:M="default",priority:D=!1}=e,{resolvedTheme:S}=(0,y.D)(),[C,I]=(0,w.useState)(!1),[W,F]=(0,w.useState)(!1),[T,q]=(0,w.useState)(!1);(0,w.useEffect)(()=>{I(!0)},[]);let[P,Z]=(0,w.useState)(!1);(0,w.useEffect)(()=>{let e=window.matchMedia("(hover: hover)");Z(e.matches);let t=e=>{Z(e.matches)};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]);let H=(null==(a=L.youtube_videos)||null==(t=a[0])?void 0:t.url)?(0,j.Z)(L.youtube_videos[0].url):null,U=!!H,V=((null==(r=L.images)?void 0:r.length)||0)>1,X=(0,w.useCallback)(()=>{P&&F(!0)},[P]),B=(0,w.useCallback)(()=>{F(!1),q(!1)},[]),G=(0,w.useCallback)(e=>{q(e)},[]),K=C&&"light"===S,R=(null==(N=L.community)?void 0:N.slug)&&(null==(k=L.game)?void 0:k.slug)?"/".concat(L.community.slug,"/").concat(L.game.slug,"/mods/").concat(L.slug):"#",Y=L.user.username&&L.user.username_discriminator?"/u/".concat((0,v.z4)(L.user.username,L.user.username_discriminator)):"#",J=L.user.display_name||L.user.username||"Anonymous",O=J.slice(0,2).toUpperCase(),Q=L.thumbnail_url&&""!==L.thumbnail_url.trim()&&(L.thumbnail_url.startsWith("http://")||L.thumbnail_url.startsWith("https://")),$=(null==(_=L.game)?void 0:_.webp_image_url)||null,ee=Q?L.thumbnail_url:$,et=L.created_at?new Date(L.created_at):new Date,ea=L.updated_at?new Date(L.updated_at):null,es=ea&&Math.abs(ea.getTime()-et.getTime())>6e4&&ea?ea:et,er=(0,f.GP)(es,"MMM dd, yy"),el="glass"===M?K?"text-gray-600":"text-white/70":"text-muted-foreground";return(0,s.jsxs)(n.Zp,{className:(0,v.cn)("mod-card group overflow-hidden p-0 gap-0 border-0 rounded-md","glass"===M?K?"bg-white/40 hover:bg-white/60 border-0 backdrop-blur-sm":"bg-black/40 hover:bg-black/60 border-0 backdrop-blur-sm":"",""),children:[(0,s.jsxs)("div",{className:"relative w-full bg-muted overflow-hidden rounded-t-md",style:{paddingBottom:"56.25%"},onMouseEnter:X,onMouseLeave:B,children:[(0,s.jsxs)(l(),{prefetch:!1,href:R,className:"block absolute inset-0 z-10",children:[P&&((null==(A=L.images)?void 0:A.length)||ee)?(0,s.jsx)(j.F,{cardId:L.id,images:L.images||[],youtubeVideoId:H,thumbnailUrl:ee,isHovering:W,alt:L.title,onPreviewActive:G,priority:D}):ee?(0,s.jsx)(i.default,{src:ee,alt:L.title,fill:!0,sizes:"(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw",className:"object-cover object-center",priority:D}):(0,s.jsx)("div",{className:"w-full h-full flex items-center justify-center text-muted-foreground",children:"No image"}),(U||V)&&(0,s.jsx)("div",{className:(0,v.cn)("absolute top-1 left-1 z-20 flex items-center justify-center transition-opacity duration-1000 ease-out",T?"opacity-0":"opacity-100"),children:(0,s.jsxs)("div",{className:"bg-black/70 rounded-full p-1.5 relative flex items-center justify-center",children:[(0,s.jsx)("div",{className:(0,v.cn)("transition-opacity duration-200",W&&!T?"opacity-0":"opacity-100"),children:U?(0,s.jsx)(d.A,{className:"h-3.5 w-3.5 text-white"}):(0,s.jsx)(u.A,{className:"h-3.5 w-3.5 text-white"})}),(0,s.jsx)(m.A,{className:(0,v.cn)("absolute h-3.5 w-3.5 text-white transition-opacity duration-200",W&&!T?"opacity-100 animate-spin":"opacity-0")})]})}),(L.is_paid||L.adult_content)&&(0,s.jsxs)("div",{className:(0,v.cn)("absolute top-1 right-1 z-20 flex flex-row gap-1 items-start transition-opacity duration-1000 ease-out",T?"opacity-0":"opacity-100"),children:[L.adult_content&&(0,s.jsxs)("span",{className:"cappedbold bg-black text-white text-[8px] px-1 py-0.5 rounded flex items-center gap-0.5 border border-red-500",children:[(0,s.jsx)(x.A,{className:"h-2 w-2"}),"NSFW"]}),L.is_paid&&(0,s.jsxs)("span",{className:"cappedbold bg-black text-white text-[8px] px-1 py-0.5 rounded flex items-center gap-0.5 border border-amber-500",children:[(0,s.jsx)(h.A,{className:"h-2 w-2"}),"PAYWALLED"]})]})]}),(z&&L.game||L.categories&&L.categories.length>0)&&(0,s.jsx)("div",{className:(0,v.cn)("absolute bottom-0 left-0 right-0 z-30 cursor-grab active:cursor-grabbing transition-opacity duration-1000 ease-out",T?"opacity-0":"opacity-100"),role:"region","aria-label":"Mod tags",tabIndex:0,onKeyDown:e=>{let t=e.currentTarget.querySelector(".badge-scroll");t&&("ArrowLeft"===e.key?t.scrollLeft-=50:"ArrowRight"===e.key&&(t.scrollLeft+=50))},onMouseDown:e=>{let t=e.currentTarget.querySelector(".badge-scroll");
1if(!t)return;let a=e.pageX,s=t.scrollLeft,r=e=>{e.preventDefault(),t.scrollLeft=s+(a-e.pageX)*2},l=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",l)},children:(0,s.jsxs)("div",{className:"badge-scroll flex gap-1 overflow-x-auto hide-scrollbar px-2 py-2",children:[z&&L.game&&(0,s.jsx)(o.E,{className:"text-[10px] px-1.5 py-0 h-4 rounded-sm bg-primary text-primary-foreground hover:bg-primary/90 flex-shrink-0",children:L.game.title}),null==(E=L.categories)?void 0:E.map(e=>(0,s.jsx)(o.E,{variant:"secondary",className:"text-[10px] px-1.5 py-0 h-4 rounded-sm bg-background/90 flex-shrink-0 border-0",children:e.name},e.id))]})})]}),(0,s.jsxs)(n.Wu,{className:(0,v.cn)("px-3 py-2 space-y-2","glass"===M?K?"text-gray-900":"text-white":""),children:[(0,s.jsx)(l(),{prefetch:!1,href:R,className:"block h-10",children:(0,s.jsx)("h3",{className:"font-semibold text-base line-clamp-2 opacity-80 group-hover:opacity-100 transition-opacity leading-5",children:L.title})}),(0,s.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,s.jsxs)(o.E,{variant:"secondary",className:(0,v.cn)("text-[10px] flex-shrink-0 rounded-sm px-1.5 py-0 border-0","glass"===M?K?"bg-black/10 text-gray-900 border-gray-300":"bg-white/20 text-white border-white/20":""),children:["v",L.version]}),(0,s.jsxs)("div",{className:(0,v.cn)("flex items-center gap-3",el),children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(p.A,{className:"h-3 w-3"}),(0,s.jsx)("span",{children:(0,v.wk)(L.rating_count)})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(g.A,{className:"h-3 w-3"}),(0,s.jsx)("span",{children:(0,v.wk)(L.view_count)})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(b.A,{className:"h-3 w-3"}),(0,s.jsx)("span",{children:(0,v.wk)(L.download_count)})]})]})]}),(0,s.jsxs)("div",{className:(0,v.cn)("border-t pt-1.5 flex items-center justify-between text-xs","glass"===M?K?"border-gray-300/50":"border-white/10":"border-border/50"),children:[(0,s.jsxs)(l(),{prefetch:!1,href:Y,className:"flex items-center gap-1.5 group/author",children:[(0,s.jsxs)(c.Avatar,{className:"h-6 w-6",children:[(0,s.jsx)(c.AvatarImage,{src:L.user.avatar_url||void 0,alt:J}),(0,s.jsx)(c.AvatarFallback,{className:"text-[10px]",children:O})]}),(0,s.jsx)("span",{className:(0,v.cn)("transition-colors truncate max-w-[95px]","glass"===M?K?"text-gray-600 group-hover/author:text-gray-900":"text-white/70 group-hover/author:text-white":"text-muted-foreground group-hover/author:text-foreground"),children:J})]}),(0,s.jsx)("span",{className:(0,v.cn)("text-xs",el),children:er})]})]})]})}}}]);
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.