1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{8312:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(2603)}])},6655:function(e,l,s){"use strict";s.d(l,{Z:function(){return u}});var a=s(5893),n=s(1664),i=s.n(n),t=s(4080),r=s(6722),o=s(7294);let c=e=>{var l,s;let[n,c]=(0,o.useState)(!1),[d,u]=(0,o.useState)(),h=e=>[e.find(e=>e.endsWith(".png")||e.endsWith(".jpg")||e.endsWith(".webp"))||"no img"],m=async l=>{var s;l.preventDefault(),c(!0);let a=await fetch("/api/link-preview?url=".concat(e.url)),n=await a.json();n.description||(n.description=e.url),(null==n?void 0:null===(s=n.images)||void 0===s?void 0:s.length)||(n.images=["no img"]),n.images.length&&(n.images=h(n.images)),u(n)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{onClick:m,className:"p-2 my-4 flex justify-between lg:hover:shadow-md lg:hover:shadow-[#ff66004c] lg:hover:cursor-pointer lg:hover:-translate-y-1 lg:hover:scale-110 hover:rounded-[15px] transition ease-in-out delay-50 duration-300",children:[(0,a.jsxs)("div",{className:"w-4/5",children:[(0,a.jsx)("div",{className:"w-11/12 font-bold text-lg break-words",children:(0,a.jsx)("a",{href:e.url,target:"_blank",rel:"noreferrer",children:e.title})}),(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-[#FF6600] font-bold",children:e.score}),"\xa0points by\xa0",(0,a.jsx)("span",{className:"hover:underline",children:(0,a.jsx)(i(),{href:"/user/".concat(e.by),children:e.by})})," ⢠(",(0,a.jsx)("a",{className:"hover:underline",href:"https://".concat(e.hostname),target:"_blank",rel:"noreferrer",children:e.hostname}),")"]})]}),(0,a.jsx)("div",{className:"text-gray-600 font-bold",children:e.time})]}),(0,a.jsx)(t.u,{appear:!0,show:n,as:o.Fragment,children:(0,a.jsxs)(r.V,{as:"div",className:"relative z-10",onClose:()=>c(!1),children:[(0,a.jsx)(t.u.Child,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),(0,a.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,a.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,a.jsx)(t.u.Child,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,a.jsx)(r.V.Panel,{className:"w-[620px] h-[460px] transform overflow-hidden rounded-2xl bg-white shadow-xl transition-all",children:(0,a.jsxs)("div",{className:"w-full h-full flex flex-col justify-between",children:[(0,a.jsx)("div",{className:"w-full h-[310px]",children:(null==d?void 0:null===(l=d.images)||void 0===l?void 0:l.length)&&(null==d?void 0:d.images[0])==="no img"?(0,a.jsx)("div",{style:{background:"linear-gradient(135deg, rgb(255, 223, 152), rgb(168, 78, 0))"},className:"w-full h-full"}):(null==d?void 0:null===(s=d.images)||void 0===s?void 0:s.length)?(0,a.jsx)("img",{className:"w-full h-full object-cover",src:(null==d?void 0:d.images)?null==d?void 0:d.images[0]:""}):(0,a.jsx)("div",{className:"w-full h-full bg-slate-200 animate-pulse"})}),(0,a.jsxs)("div",{className:"w-full h-[140px] p-6 flex flex-col justify-between",children:[(0,a.jsx)("div",{className:"text-link truncate flex-1",children:(0,a.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"focus:outline-none",children:["\uD83D\uDD17 ",e.hostname]})}),(0,a.jsx)("div",{className:"w-full text-link-title truncate flex-1",children:e.title}),(null==d?void 0:d.description)?(0,a.jsx)("div",{className:"text-link-desc line-clamp-2 flex-2",children:null==d?void 0:d.description}):(0,a.jsx)("div",{className:"h-10 rounded-sm bg-slate-200 animate-pulse"})]})]})})})})})]})})]})},d=e=>{let{stories:l}=e;return(0,a.jsx)("div",{className:"px-2",children:l.map(e=>(0,a.jsx)("div",{children:(0,a.jsx)(c,{...e})},e.id))})};var u=d},5111:function(e,l,s){"use strict";var a=s(7294);let n=e=>{(0,a.useEffect)(()=>{let l=sessionStorage.getItem("".concat(e,"_POS_Y"));l&&window.scrollTo(0,parseInt(l))},[])};l.Z=n},2603:function(e,l,s){"use strict";s.r(l),s.d(l,{__N_SSG:function(){return o}});var a=s(5893),n=s(6655),i=s(5395),t=s(5111);let r=e=>{let{stories:l}=e;return(0,t.Z)(i.Dv.Index.toLowerCase()),(0,a.jsx)(n.Z,{stories:l})};var o=!0;l.default=r}},function(e){e.O(0,[501,774,888,179],function(){return e(e.s=8312)}),_N_E=e.O()}]);
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.