1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,815558,e=>{"use strict";var t=e.i(843476),s=e.i(522016),l=e.i(271645);let a="lacspace:articles-filter";e.s(["ARTICLES_FILTER_EVENT",0,a,"ArchiveBarcode",0,function({ticks:e,families:i,startLabel:r,endLabel:n}){let[o,c]=(0,l.useState)(null),[d,x]=(0,l.useState)(null),h=Object.fromEntries(i.map(e=>[e.key,e.color])),m=null!==o?e[o]:null,u=e.length||1;return(0,t.jsxs)("figure",{className:"mt-10 md:mt-16",children:[(0,t.jsxs)("figcaption",{className:"mb-4 flex flex-wrap items-baseline justify-between gap-x-6 gap-y-1",children:[(0,t.jsx)("span",{className:"text-sm font-semibold text-white",children:"Every article we've published â one line each"}),(0,t.jsxs)("span",{className:"text-xs text-slate-500",children:[(0,t.jsx)("span",{className:"hidden md:inline",children:"Taller lines have been read more. Hover to preview, click to open."}),(0,t.jsx)("span",{className:"md:hidden",children:"Taller lines have been read more. Tap one to open it."})]})]}),(0,t.jsx)("div",{className:"relative flex h-20 items-end gap-[2px] md:h-28",onMouseLeave:()=>c(null),role:"list","aria-label":`${e.length} articles, oldest to newest`,children:e.map((e,l)=>{let a=d&&e.family!==d||null!==o&&o!==l;return(0,t.jsx)(s.default,{href:`/articles/${e.slug}`,role:"listitem","aria-label":`${e.title} â ${e.date}`,onMouseEnter:()=>c(l),onFocus:()=>c(l),onBlur:()=>c(null),className:"barcode-tick group relative min-w-0 flex-1 rounded-[1px] outline-none focus-visible:ring-2 focus-visible:ring-white",style:{height:`${Math.round(100*e.h)}%`,background:h[e.family],opacity:a?.18:1,animationDelay:`${Math.min(4*l,700)}ms`}},e.slug)})}),(0,t.jsxs)("div",{className:"mt-3 flex items-start justify-between gap-4 border-t border-white/[0.08] pt-3 text-xs tabular-nums text-slate-500",children:[(0,t.jsx)("span",{className:"shrink-0",children:r}),(0,t.jsx)("span",{className:"min-h-[2.5rem] min-w-0 flex-1 text-center md:min-h-0","aria-live":"polite",children:m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mr-2 inline-block h-2 w-2 rounded-full align-middle",style:{background:h[m.family]}}),(0,t.jsx)("span",{className:"font-medium text-slate-200",children:m.title}),(0,t.jsxs)("span",{className:"ml-2 whitespace-nowrap text-slate-500",children:[m.date," · ",m.views.toLocaleString("en-US")," reads"]})]}):(0,t.jsxs)("span",{className:"text-slate-600",children:[e.length," articles, oldest on the left"]})}),(0,t.jsx)("span",{className:"shrink-0",children:n})]}),(0,t.jsx)("div",{className:"mt-6 grid grid-cols-2 gap-2 sm:grid-cols-3 md:mt-8 lg:grid-cols-6",children:i.map(e=>{let s=d===e.key;return(0,t.jsxs)("button",{type:"button",onClick:()=>{let t,s;return x(t=e&&d!==e.key?e.key:null),s=t&&e?{label:e.label,categories:e.categories}:null,void(window.dispatchEvent(new CustomEvent(a,{detail:s})),t&&document.getElementById("all-articles")?.scrollIntoView({behavior:"smooth",block:"start"}))},"aria-pressed":s,className:`group flex flex-col items-start rounded-lg border px-3 py-2.5 text-left transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-white ${s?"border-white/40 bg-white/[0.06]":"border-white/[0.08] hover:border-white/20 hover:bg-white/[0.03]"}`,children:[(0,t.jsxs)("span",{className:"flex w-full items-center gap-2",children:[(0,t.jsx)("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{background:e.color}}),(0,t.jsx)("span",{className:"truncate text-[13px] font-medium text-slate-200",children:e.label})]}),(0,t.jsxs)("span",{className:"mt-1 text-xs tabular-nums text-slate-500",children:[e.count," · ",Math.round(e.count/u*100),"%"]})]},e.key)})}),(0,t.jsx)("style",{children:` 2 @keyframes barcode-rise { from { transform: scaleY(0.08); } to { transform: scaleY(1); } } 3 .barcode-tick { transform-origin: bottom; animation: barcode-rise 600ms cubic-bezier(.2,.8,.2,1) both; transition: opacity 160ms ease; } 4 @media (prefers-reduced-motion: reduce) { .barcode-tick { animation: none; } } 5 `})]})}])},626189,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(618566),a=e.i(522016),i=e.i(6
557688),r=e.i(945919),n=e.i(972520);let o=[{key:"ai",label:"AI",color:"#A78BFA",test:/\bai\b|artificial|future tech/i},{key:"learning",label:"Learning & careers",color:"#22D3EE",test:/educat|edtech|career|^guides$/i},{key:"business",label:"Business & startups",color:"#FB923C",test:/business|startup|finance|growth/i},{key:"products",label:"Products & company",color:"#34D399",test:/product|lacspace|company|founder|client|case stud|announce|logistics|restaurant|games|health/i},{key:"news",label:"News & society",color:"#FBBF24",test:/news|trending|society/i},{key:"engineering",label:"Engineering",color:"#60A5FA",test:/./}];function c(e){return o.find(t=>t.test.test(e||""))??o[o.length-1]}function d({article:e}){if(!e)return null;let s=c(e.category);return(0,t.jsx)("section",{className:"pb-8 pt-10 md:pb-12 md:pt-16",children:(0,t.jsxs)("div",{className:"container mx-auto px-4 sm:px-6",children:[(0,t.jsx)("p",{className:"mb-4 text-xs font-semibold uppercase tracking-[0.18em] text-slate-500",children:"Latest"}),(0,t.jsxs)(a.default,{href:`/articles/${e.slug}`,className:"group grid overflow-hidden rounded-2xl border border-white/[0.08] bg-[#0a0d14] transition-colors hover:border-white/20 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-400 lg:grid-cols-[1.25fr_1fr]",children:[(0,t.jsx)("div",{className:"relative aspect-[1200/630] overflow-hidden bg-white/[0.03]",children:(0,t.jsx)(i.default,{src:e.coverImage||"https://placehold.co/1200x630",alt:e.title,fill:!0,sizes:"(max-width: 1024px) 100vw, 640px",className:"object-cover transition-transform duration-700 group-hover:scale-[1.02]",priority:!0,unoptimized:!0})}),(0,t.jsxs)("div",{className:"flex flex-col justify-center p-5 sm:p-7 lg:p-9",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-slate-500",children:[(0,t.jsx)("span",{className:"h-2 w-2 rounded-full",style:{background:s.color}}),(0,t.jsx)("span",{className:"font-medium text-slate-300",children:e.category||s.label}),(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)("time",{dateTime:e.createdAt,children:(0,r.format)(new Date(e.createdAt),"d MMM yyyy")})]}),(0,t.jsx)("h2",{className:"mt-3 font-headline text-2xl font-bold leading-[1.15] tracking-[-0.015em] text-white [text-wrap:balance] transition-colors group-hover:text-blue-300 sm:text-3xl lg:text-[2.1rem]",children:e.title}),e.excerpt&&(0,t.jsx)("p",{className:"mt-3 line-clamp-3 text-[0.95rem] leading-relaxed text-slate-400 sm:text-base",children:e.excerpt}),(0,t.jsxs)("div",{className:"mt-6 flex items-center gap-3",children:[(0,t.jsx)("span",{className:"relative h-8 w-8 overflow-hidden rounded-full border border-white/10",children:(0,t.jsx)(i.default,{src:e.author.profileImage||"https://placehold.co/64x64.png",alt:"",fill:!0,sizes:"32px",className:"object-cover",unoptimized:!0})}),(0,t.jsx)("span",{className:"text-sm font-medium text-slate-200",children:e.author.name}),(0,t.jsxs)("span",{className:"ml-auto inline-flex items-center gap-1.5 text-sm font-semibold text-white",children:["Read ",(0,t.jsx)(n.ArrowRight,{className:"h-4 w-4 transition-transform group-hover:translate-x-0.5"})]})]})]})]})]})})}o.map(({key:e,label:t,color:s})=>({key:e,label:t,color:s}));var x=e.i(174080),h=e.i(846932),m=e.i(88653),u=e.i(555436),g=e.i(475254);let p=(0,g.default)("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),f=(0,g.default)("ArrowDownUp",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);var b=e.i(37727),w=e.i(373264),j=e.i(370956);let v=(0,g.default)("Shuffle",[["path",{d:"M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22",key:"1wmou1"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 6h1.9c1.5 0 2.9.9 3.6 2.2",key:"10bdb2"}],["path",{d:"M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8",key:"vgxac0"}],["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}]]),N=(0,g.default)("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}
5]]);var y=e.i(643531),k=e.i(649582),C=e.i(793479),S=e.i(967489);let A={newest:"Newest first",oldest:"Oldest first",popular:"Most read",liked:"Most liked",az:"AâZ (title)"};function E({categories:e,selectedCategory:l,onCategoryChange:a,searchTerm:i,onSearchChange:r,sortBy:n,onSortChange:o,tags:c,selectedTags:d,onToggleTag:x,view:h,onViewChange:m,onSurprise:g,resultCount:y,totalCount:T,onClear:M}){let I=""!==i||"All"!==l||"newest"!==n||d.length>0,$=+("All"!==l)+ +("newest"!==n)+d.length,[F,z]=(0,s.useState)(!1),B=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let e=e=>{let t=document.activeElement,s=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t?.isContentEditable;"/"!==e.key||s||(e.preventDefault(),B.current?.focus())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),(0,s.useEffect)(()=>{if(!F)return;let e=document.body.style.overflow;document.body.style.overflow="hidden";let t=e=>{"Escape"===e.key&&z(!1)};return window.addEventListener("keydown",t),()=>{document.body.style.overflow=e,window.removeEventListener("keydown",t)}},[F]),(0,t.jsxs)("div",{className:"sticky top-20 z-40 mb-10",children:[(0,t.jsx)("div",{className:"container mx-auto px-4",children:(0,t.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-[#0A0A0F] p-4 shadow-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 lg:hidden",children:[(0,t.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,t.jsx)(u.Search,{className:"pointer-events-none absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-slate-500"}),(0,t.jsx)(C.Input,{placeholder:"Search insightsâ¦",value:i,onChange:e=>r(e.target.value),className:"h-12 rounded-xl border-white/5 bg-white/5 pl-12 pr-10 text-white transition-colors placeholder:text-slate-600 focus:bg-white/10"}),i&&(0,t.jsx)("button",{onClick:()=>r(""),"aria-label":"Clear search",className:"absolute right-3 top-1/2 -translate-y-1/2 rounded-full p-1 text-slate-500 hover:bg-white/10 hover:text-white",children:(0,t.jsx)(b.X,{className:"h-4 w-4"})})]}),(0,t.jsxs)("button",{onClick:()=>z(!0),"aria-label":"Filters and sorting","aria-haspopup":"dialog",className:"relative flex h-12 w-12 shrink-0 items-center justify-center rounded-xl border border-white/10 bg-white/5 text-white transition-colors hover:bg-white/10 active:scale-95",children:[(0,t.jsx)(k.SlidersHorizontal,{className:"h-5 w-5"}),$>0&&(0,t.jsx)("span",{className:"absolute -right-1.5 -top-1.5 flex h-5 min-w-5 items-center justify-center rounded-full bg-indigo-500 px-1 text-[11px] font-bold text-white ring-2 ring-[#0A0A0F]",children:$})]})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2 px-1 text-xs text-slate-500 lg:hidden",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-semibold text-slate-300",children:y})," ",1===y?"article":"articles",I&&T>0&&(0,t.jsxs)("span",{className:"text-slate-600",children:[" of ",T]})]}),I&&(0,t.jsxs)("button",{onClick:M,className:"ml-auto inline-flex items-center gap-1 rounded-full px-2.5 py-1 font-medium text-slate-400 transition-colors hover:bg-white/10 hover:text-white",children:[(0,t.jsx)(b.X,{className:"h-3 w-3"})," Clear"]})]}),(0,t.jsxs)("div",{className:"hidden flex-col gap-4 lg:flex lg:flex-row lg:items-center",children:[(0,t.jsxs)("div",{className:"relative w-full flex-1",children:[(0,t.jsx)(u.Search,{className:"absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-slate-500"}),(0,t.jsx)(C.Input,{ref:B,placeholder:"Search insights, topics, tags⦠(press / )",value:i,onChange:e=>r(e.target.value),className:"h-12 rounded-xl border-white/5 bg-white/5 pl-12 text-white transition-colors placeholder:text-slate-600 focus:bg-white/10"}),i&&(0,t.jsx)("button",{onClick:()=>r(""),"aria-label":"Clear search",className:"absolute right-3 top-1/2 -translate-y-1/2 rounded-full p-1 text-slate-500 hover:bg-white/10 hover:text-white",children:(0,t.jsx)(b.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("div",{className:"w-full lg:w-auto lg:min-w-[170px]",children:(0,t.jsxs)(S.Select,{value:l,onValueChange:a,children:[(0,t.jsx)(S.SelectTrigger,{className:"h-12 rounded-xl border-white/5 bg-white/5 text-white",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(p,{className:"h-4 w-4 text-slate-500"}),(0,t.jsx)(S.SelectValue,{placeholder:"Category"})]})}),(0,t.jsx)(S.SelectContent,{className:"border-white/10 bg-[#0F0F16] text-white",children:e.map(e=>(0,t.jsx)(S.SelectItem,{value:e,className:"cursor-pointer focus:bg-white/10 focus:text-white",children:e},e))})]})}),(0,t.jsx)("div",{className:"w-full lg:w-auto lg:min-w-[170px]",children:(0,t.jsxs)(S.Select,{value:n,onValueChange:e=>o(e),children:[(0,t.jsx)(S.SelectTrigger,{className:"h-12 rounded-xl border-white/5 bg-white/5 text-white",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f,{className:"h-4 w-4 text-slate-500"}),(0,t.jsx)(S.SelectValue,{placeholder:"Sort"})]})}),(0,t.jsx)(S.SelectContent,{className:"border-white/10 bg-[#0F0F16] text-white",children:Object.keys(A).map(e=>(0,t.jsx)(S.SelectItem,{value:e,className:"cursor-pointer focus:bg-white/10 focus:text-white",children:A[e]},e))})]})}),(0,t.jsxs)("button",{onClick:g,className:"inline-flex h-12 items-center justify-center gap-2 rounded-xl border border-white/5 bg-white/5 px-4 text-sm font-semibold text-white transition-colors hover:bg-white/10",title:"Open a random article",children:[(0,t.jsx)(v,{className:"h-4 w-4 text-indigo-400"})," Surprise me"]}),(0,t.jsx)("div",{className:"flex h-12 items-center rounded-xl border border-white/5 bg-white/5 p-1",children:[["grid",w.LayoutGrid],["list",j.List]].map(([e,s])=>(0,t.jsx)("button",{onClick:()=>m(e),"aria-label":`${e} view`,"aria-pressed":h===e,className:`flex h-full items-center rounded-lg px-3 transition-colors ${h===e?"bg-white/10 text-white":"text-slate-500 hover:text-white"}`,children:(0,t.jsx)(s,{className:"h-4 w-4"})},e))})]}),c.length>0&&(0,t.jsxs)("div",{className:"mt-4 hidden items-center gap-2 overflow-x-auto pb-1 lg:flex",children:[(0,t.jsx)(N,{className:"h-4 w-4 shrink-0 text-slate-600"}),c.map(e=>{let s=d.includes(e);return(0,t.jsx)("button",{onClick:()=>x(e),className:`shrink-0 rounded-full border px-3 py-1 text-xs font-medium transition-colors ${s?"border-indigo-500/50 bg-indigo-500/15 text-indigo-300":"border-white/10 bg-white/[0.03] text-slate-400 hover:border-white/20 hover:text-white"}`,children:e},e)})]}),(0,t.jsxs)("div",{className:"mt-3 hidden flex-wrap items-center gap-3 px-1 text-sm text-slate-500 lg:flex",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-semibold text-slate-300",children:y})," ",1===y?"article":"articles",I&&T>0&&(0,t.jsxs)("span",{className:"text-slate-600",children:[" of ",T]}
5)]}),"All"!==l&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white/5 px-2.5 py-0.5 text-xs text-slate-300",children:[l,(0,t.jsx)("button",{onClick:()=>a("All"),"aria-label":"Remove category filter",children:(0,t.jsx)(b.X,{className:"h-3 w-3"})})]}),d.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-indigo-500/30 bg-indigo-500/10 px-2.5 py-0.5 text-xs text-indigo-300",children:["#",e,(0,t.jsx)("button",{onClick:()=>x(e),"aria-label":`Remove ${e} filter`,children:(0,t.jsx)(b.X,{className:"h-3 w-3"})})]},e)),I&&(0,t.jsxs)("button",{onClick:M,className:"ml-auto inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium text-slate-400 transition-colors hover:bg-white/10 hover:text-white",children:[(0,t.jsx)(b.X,{className:"h-3.5 w-3.5"})," Clear all"]})]})]})}),(0,t.jsx)(L,{open:F,onClose:()=>z(!1),categories:e,selectedCategory:l,onCategoryChange:a,sortBy:n,onSortChange:o,tags:c,selectedTags:d,onToggleTag:x,view:h,onViewChange:m,onSurprise:g,resultCount:y,activeCount:$,onClear:M})]})}function L({open:e,onClose:l,categories:a,selectedCategory:i,onCategoryChange:r,sortBy:n,onSortChange:o,tags:c,selectedTags:d,onToggleTag:u,view:g,onViewChange:C,onSurprise:S,resultCount:E,activeCount:M,onClear:I}){let[$,F]=(0,s.useState)(!1);return((0,s.useEffect)(()=>F(!0),[]),$)?(0,x.createPortal)((0,t.jsx)(m.AnimatePresence,{children:e&&(0,t.jsxs)("div",{className:"fixed inset-0 z-[70] lg:hidden",role:"dialog","aria-modal":"true","aria-label":"Filters",children:[(0,t.jsx)(h.motion.div,{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",initial:{opacity:0}
5,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},onClick:l}),(0,t.jsxs)(h.motion.div,{className:"absolute inset-x-0 bottom-0 flex max-h-[88vh] flex-col overflow-hidden rounded-t-3xl border-t border-white/10 bg-[#0A0A0F] shadow-2xl",initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:32,stiffness:340},drag:"y",dragConstraints:{top:0,bottom:0},dragElastic:{top:0,bottom:.4},onDragEnd:(e,t)=>{(t.offset.y>120||t.velocity.y>700)&&l()},children:[(0,t.jsx)("div",{className:"flex shrink-0 justify-center pb-1 pt-3",children:(0,t.jsx)("span",{className:"h-1.5 w-11 rounded-full bg-white/20"})}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-between px-5 pb-4 pt-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(k.SlidersHorizontal,{className:"h-5 w-5 text-indigo-400"}),(0,t.jsx)("h3",{className:"text-base font-semibold text-white",children:"Refine"}),M>0&&(0,t.jsxs)("span",{className:"rounded-full bg-indigo-500/15 px-2 py-0.5 text-xs font-semibold text-indigo-300",children:[M," active"]})]}),(0,t.jsx)("button",{onClick:l,"aria-label":"Close filters",className:"flex h-9 w-9 items-center justify-center rounded-full text-slate-400 transition-colors hover:bg-white/10 hover:text-white",children:(0,t.jsx)(b.X,{className:"h-5 w-5"})})]}),(0,t.jsxs)("div",{className:"min-h-0 flex-1 space-y-7 overflow-y-auto px-5 pb-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)(T,{icon:p,children:"Category"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>{let s=i===e;return(0,t.jsx)("button",{onClick:()=>r(e),className:`rounded-full border px-3.5 py-2 text-sm font-medium transition-colors ${s?"border-indigo-500/60 bg-indigo-500/15 text-indigo-200":"border-white/10 bg-white/[0.03] text-slate-300 hover:border-white/20"}`,children:e},e)})})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)(T,{icon:f,children:"Sort by"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-1.5",children:Object.keys(A).map(e=>{let s=n===e;return(0,t.jsxs)("button",{onClick:()=>o(e),className:`flex items-center justify-between rounded-xl border px-4 py-3 text-sm transition-colors ${s?"border-indigo-500/50 bg-indigo-500/10 text-white":"border-white/5 bg-white/[0.03] text-slate-300 hover:bg-white/5"}`,children:[(0,t.jsx)("span",{className:"font-medium",children:A[e]}),s&&(0,t.jsx)(y.Check,{className:"h-4 w-4 text-indigo-400"})]},e)})})]}),(0,t.jsxs)("section",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(T,{icon:w.LayoutGrid,children:"Layout"}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:[["grid",w.LayoutGrid,"Grid"],["list",j.List,"List"]].map(([e,s,l])=>(0,t.jsxs)("button",{onClick:()=>C(e),"aria-pressed":g===e,className:`inline-flex items-center gap-2 rounded-xl border px-4 py-2.5 text-sm font-medium transition-colors ${g===e?"border-indigo-500/50 bg-indigo-500/10 text-white":"border-white/5 bg-white/[0.03] text-slate-400"}`,children:[(0,t.jsx)(s,{className:"h-4 w-4"})," ",l]},e))})]}),(0,t.jsxs)("button",{onClick:()=>{S(),l()},className:"mt-6 inline-flex items-center gap-2 self-end rounded-xl border border-white/5 bg-white/5 px-4 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:[(0,t.jsx)(v,{className:"h-4 w-4 text-indigo-400"})," Surprise me"]})]}),c.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)(T,{icon:N,children:"Topics"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(e=>{let s=d.includes(e);return(0,t.jsx)("button",{onClick:()=>u(e),className:`rounded-full border px-3 py-1.5 text-xs font-medium transition-colors ${s?"border-indigo-500/50 bg-indigo-500/15 text-indigo-300":"border-white/10 bg-white/[0.03] text-slate-400 hover:border-white/20 hover:text-white"}`,children:e},e)})})]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-t border-white/10 bg-[#0A0A0F] px-5 py-4 pb-[calc(1rem+env(safe-area-inset-bottom))]",children:[(0,t.jsx)("button",{onClick:I,disabled:0===M,className:"rounded-xl px-4 py-3 text-sm font-semibold text-slate-300 transition-colors hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-40",children:"Clear all"}),(0,t.jsxs)("button",{onClick:l,className:"flex-1 rounded-xl bg-indigo-500 px-4 py-3 text-sm font-semibold text-white shadow-lg shadow-indigo-500/25 transition-colors hover:bg-indigo-400",children:["Show ",E," ",1===E?"result":"results"]})]})]})]})}),document.body):null}function T({icon:e,children:s}){return(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-slate-500",children:[(0,t.jsx)(e,{className:"h-3.5 w-3.5"}),s]})}var M=e.i(936636);function I({article:e}){let s=c(e.category),l=e.engagement?.views||0;return(0,t.jsxs)(a.default,{href:`/articles/${e.slug}`,className:"group flex h-full flex-col overflow-hidden rounded-2xl border border-white/[0.08] bg-[#0a0d14] transition-colors duration-200 hover:border-white/20 focu
5s-visible:outline focus-visible:outline-2 focus-visible:outline-blue-400",children:[(0,t.jsx)("div",{className:"relative aspect-[1200/630] overflow-hidden bg-white/[0.03]",children:e.coverImage?(0,t.jsx)(M.SmartImage,{src:e.coverImage,alt:e.title,label:e.title,fill:!0,sizes:"(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 25vw",className:"object-cover transition-transform duration-500 group-hover:scale-[1.03]",unoptimized:!0}):(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",style:{background:`${s.color}22`},children:(0,t.jsx)("span",{className:"select-none font-headline text-4xl font-bold text-white/25",children:e.title?.charAt(0).toUpperCase()||"L"})})}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col p-4 sm:p-5",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-xs text-slate-500",children:[(0,t.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:s.color}}),(0,t.jsx)("span",{className:"truncate font-medium text-slate-300",children:e.category||s.label})]}),(0,t.jsx)("h3",{className:"mt-2 line-clamp-3 font-headline text-[1.05rem] font-bold leading-snug text-white transition-colors group-hover:text-blue-300 sm:text-lg",children:e.title}),e.excerpt&&(0,t.jsx)("p",{className:"mt-2 line-clamp-2 text-sm leading-relaxed text-slate-400",children:e.excerpt}),(0,t.jsxs)("div",{className:"mt-auto flex items-center gap-2 pt-4 text-xs tabular-nums text-slate-500",children:[(0,t.jsx)("time",{dateTime:e.createdAt,children:(0,r.format)(new Date(e.createdAt),"d MMM yyyy")}),l>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsxs)("span",{children:[l.toLocaleString("en-US")," reads"]})]})]})]})]})}var $=e.i(975157);function F({className:e,...s}){return(0,t.jsx)("div",{className:(0,$.cn)("animate-pulse rounded-md bg-muted",e),...s})}var z=e.i(515288);function B(){return(0,t.jsxs)(z.Card,{className:"h-full flex flex-col bg-background",children:[(0,t.jsx)(z.CardHeader,{className:"p-0",children:(0,t.jsx)(F,{className:"relative aspect-video w-full"})}),(0,t.jsxs)(z.CardContent,{className:"p-6 flex-grow flex flex-col",children:[(0,t.jsx)(F,{className:"h-4 w-1/4 mb-2"}),(0,t.jsx)(F,{className:"h-6 w-full mb-2"}),(0,t.jsx)(F,{className:"h-6 w-4/5"}),(0,t.jsx)("div",{className:"flex-grow"}),(0,t.jsxs)("div",{className:"space-y-2 mt-4",children:[(0,t.jsx)(F,{className:"h-4 w-full"}),(0,t.jsx)(F,{className:"h-4 w-full"}),(0,t.jsx)(F,{className:"h-4 w-3/4"})]})]}),(0,t.jsxs)(z.CardFooter,{className:"flex-col items-start p-6 pt-0",children:[(0,t.jsxs)("div",{className:"flex justify-between w-full text-xs text-muted-foreground mb-4",children:[(0,t.jsx)(F,{className:"h-4 w-1/3"}),(0,t.jsx)(F,{className:"h-4 w-1/4"})]}),(0,t.jsx)(F,{className:"h-5 w-24"})]})]})}var R=e.i(519455),D=e.i(531278),V=e.i(503116),_=e.i(286536);function H({article:e}){return(0,t.jsxs)(a.default,{href:`/articles/${e.slug}`,className:"group flex gap-4 rounded-2xl border border-white/10 bg-white/[0.02] p-4 transition-colors hover:bg-white/[0.05]",children:[(0,t.jsx)("div",{className:"relative hidden h-28 w-44 shrink-0 overflow-hidden rounded-xl sm:block",children:(0,t.jsx)(M.SmartImage,{src:e.coverImage,alt:e.title||"",label:e.title,fill:!0,sizes:"176px",unoptimized:!0})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-slate-500",children:[e.category&&(0,t.jsx)("span",{className:"rounded-full bg-white/5 px-2 py-0.5 font-medium text-slate-300",children:e.category}),(0,t.jsx)("span",{children:(e=>{try{return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}catch{return""}})(e.createdAt)}),(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,t.jsx)(V.Clock,{className:"h-3 w-3"})," ",Math.max(1,Math.round((e.content||"").replace(/<[^>]+>/g," ").split(/\s+/).filter(Boolean).length/200))," min"]}),e.engagement?.views?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,t.jsx)(_.Eye,{className:"h-3 w-3"}
5)," ",e.engagement.views.toLocaleString()]}):null]}),(0,t.jsx)("h3",{className:"mt-1.5 line-clamp-2 text-lg font-bold text-white transition-colors group-hover:text-blue-400",children:e.title}),e.excerpt&&(0,t.jsx)("p",{className:"mt-1 line-clamp-2 text-sm text-slate-400",children:e.excerpt}),(0,t.jsxs)("div",{className:"mt-2 text-xs text-slate-500",children:["By ",e.author?.name||"Lacspace"]})]})]})}function O({articles:e,isLoading:l,hasMore:a,onLoadMore:i,view:r="grid"}){let n=(0,s.useRef)(null);return((0,s.useEffect)(()=>{let e=n.current;if(!e||!a||l)return;let t=new IntersectionObserver(e=>{e[0].isIntersecting&&i()},{rootMargin:"600px 0px"});return t.observe(e),()=>t.disconnect()},[a,l,i]),l||0!==e.length)?(0,t.jsx)("section",{className:"pb-16 md:pb-24",children:(0,t.jsxs)("div",{className:"container mx-auto px-4 sm:px-6",children:["list"===r?(0,t.jsx)("div",{className:"mx-auto flex max-w-4xl flex-col gap-4",children:e.map((e,s)=>(0,t.jsx)("div",{className:"lac-fade-up",style:{animationDelay:`${s%8*40}ms`},children:(0,t.jsx)(H,{article:e})},e._id))}):(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-5 lg:grid-cols-3 xl:grid-cols-4",children:[e.map((e,s)=>(0,t.jsx)("div",{className:"lac-fade-up group",style:{animationDelay:`${s%8*50}ms`},children:(0,t.jsx)(I,{article:e})},e._id)),l&&Array.from({length:4}).map((e,s)=>(0,t.jsx)(B,{},`sk-${s}`))]}),a&&(0,t.jsx)("div",{ref:n,"aria-hidden":!0,className:"h-px w-full"}),a&&(0,t.jsx)("div",{className:"mt-14 text-center",children:(0,t.jsxs)(R.Button,{onClick:i,variant:"outline",size:"lg",disabled:l,className:"rounded-full border-white/10 bg-white/5 px-8 py-6 text-white hover:bg-white/10",children:[l&&(0,t.jsx)(D.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),l?"Loadingâ¦":"Load more articles"]})})]})}):(0,t.jsxs)("div",{className:"py-24 text-center",children:[(0,t.jsx)("div",{className:"mb-4 text-6xl",children:"ð"}),(0,t.jsx)("h3",{className:"mb-2 text-2xl font-bold text-white",children:"No results found"}),(0,t.jsx)("p",{className:"text-slate-500",children:"Try adjusting your search or filters."})]})}var U=e.i(263488);function X(){return(0,t.jsx)("section",{className:"py-24 border-t border-white/5 bg-[#020205]",children:(0,t.jsx)("div",{className:"container mx-auto px-4",children:(0,t.jsx)(h.motion.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},viewport:{once:!0},className:"relative overflow-hidden rounded-[2.5rem] bg-gradient-to-br from-blue-900/20 to-purple-900/20 border border-white/5 p-8 md:p-16 text-center",children:(0,t.jsxs)("div",{className:"relative z-10 max-w-2xl mx-auto",children:[(0,t.jsx)("div",{className:"w-16 h-16 mx-auto bg-blue-500/10 rounded-2xl flex items-center justify-center mb-6 text-blue-400",children:(0,t.jsx)(U.Mail,{className:"w-8 h-8"})}),(0,t.jsx)("h2",{className:"text-3xl md:text-5xl font-black text-white mb-4",children:"Stay Ahead of the Curve"}),(0,t.jsx)("p",{className:"text-slate-400 mb-10 text-lg",children:"Get the latest insights on AI and digital transformation delivered straight to your inbox. No spam, just knowledge."}),(0,t.jsxs)("form",{className:"flex flex-col sm:flex-row gap-4",children:[(0,t.jsx)(C.Input,{placeholder:"Enter your email",className:"h-14 bg-black/40 border-white/10 text-white rounded-full px-6 focus:bg-black/60"}),(0,t.jsx)(R.Button,{size:"lg",className:"h-14 px-8 rounded-full bg-blue-600 hover:bg-blue-700 text-white font-bold",children:"Subscribe"})]})]})})})})}var G=e.i(815558);e.s(["ArticlesLayout",0,function({articles:e}){let a=(0,l.useRouter)(),[i,r]=(0,s.useState)(""),[n,o]=(0,s.useState)("All"),[c,x]=(0,s.useState)("newest"),[h,m]=(0,s.useState)([]),[u,g]=(0,s.useState)(null),[p,f]=(0,s.useState)("grid"),[b,w]=(0,s.useState)(()=>e.slice(1,13)),[j,v]=(0,s.useState)(12),[N,y]=(0,s.useState)(!1),k=""===i&&"All"===n&&"newest"===c&&0===h.length&&!u,C=(0,s.useMemo)(()=>["All",...new Set(e.map(e=>e.category).filter(Boolean))],[e]),S=(0,s.useMemo)(()=>{let t=new Map;for(let s of e)for(let e of s.tags||[])t.set(e,(t.get(e)||0)+1);return[...t.entries()].sort((e,t)=>t[1]-e[1]).slice(0,18).map(([e])=>e)},[e]),A=e.length>0?e[0]:null,L=(0,s.useMemo)(()=>{let t=k&&A?1:0,s=e.slice(t),l=i.toLowerCase(),a=s.filter(e=>{let t=("All"===n||e.category===n)&&(!u||u.includes(e.category||"")),s=""===l||e.title.toLowerCase().includes(l)||e.excerpt?.toLowerCase().includes(l)||e.tags?.some(e=>
5e.toLowerCase().includes(l)),a=0===h.length||(e.tags||[]).some(e=>h.includes(e));return t&&s&&a}),r=e=>new Date(e.createdAt).getTime();return a.sort((e,t)=>"oldest"===c?r(e)-r(t):"az"===c?e.title.localeCompare(t.title):"popular"===c?(t.engagement?.views||0)-(e.engagement?.views||0):"liked"===c?(t.engagement?.likes||0)-(e.engagement?.likes||0):r(t)-r(e)),a},[e,n,u,i,c,h,A,k]);(0,s.useEffect)(()=>{let e=e=>{let t=e.detail;g(t?t.categories:null),o("All"),v(12)};return window.addEventListener(G.ARTICLES_FILTER_EVENT,e),()=>window.removeEventListener(G.ARTICLES_FILTER_EVENT,e)},[]),(0,s.useEffect)(()=>{w(L.slice(0,j))},[L,j]);let T=(0,s.useCallback)(()=>{y(!0),setTimeout(()=>{v(e=>e+12),y(!1)},350)},[]),M=j<L.length;return(0,t.jsxs)("div",{className:"min-h-screen bg-[#020205]",children:[A&&k&&(0,t.jsx)(d,{article:A}),(0,t.jsx)("div",{id:"all-articles",className:"scroll-mt-24"}),(0,t.jsx)(E,{categories:C,selectedCategory:n,onCategoryChange:e=>{o(e),g(null),v(12)},searchTerm:i,onSearchChange:e=>{r(e),v(12)},sortBy:c,onSortChange:e=>{x(e),v(12)},tags:S,selectedTags:h,onToggleTag:e=>{m(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),v(12)},view:p,onViewChange:f,onSurprise:()=>{let t=L.length?L:e;if(!t.length)return;let s=t[Math.floor(Math.random()*t.length)];s?.slug&&a.push(`/articles/${s.slug}`)},resultCount:L.length,totalCount:e.length,onClear:()=>{r(""),o("All"),x("newest"),m([]),g(null),v(12)}}),(0,t.jsx)(O,{articles:b,isLoading:N,hasMore:M,onLoadMore:T,view:p}),(0,t.jsx)(X,{})]})}],626189)}]);
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.