1import{r as o,j as e,H as I,t as y}from"./index-ab38db77.js";import{L,j as N}from"./Layout-ae221617.js";import{B as v}from"./button-aceb6222.js";import{A as _}from"./AdPlaceholder-9ddf71ab.js";import{R as E}from"./RoboticsQuote-b0c1f94b.js";import{R as C}from"./refresh-cw-efb268fe.js";import{L as D}from"./loader-2-1b0f84cc.js";import{E as F}from"./x-dbcb06f2.js";import"./input-88a8d561.js";import"./bot-f88ad613.js";import"./createLucideIcon-350a23d4.js";import"./streakUtils-4796b5f1.js";import"./mail-d6f89251.js";import"./cpu-1ebd5e89.js";import"./book-open-d6b4bdaf.js";import"./studyVault-4c6970a9.js";import"./shield-check-89bf9027.js";import"./target-1c7ddc66.js";import"./authRedirect-9431f409.js";import"./search-b7443866.js";import"./users-e8160425.js";import"./chevron-left-3f1f1bc1.js";import"./trophy-93bb35a2.js";import"./code-2-e970a78e.js";import"./index-38ea8514.js";import"./heart-16f11fbb.js";const le=()=>{const[c,l]=o.useState([]),[i,f]=o.useState(1),[m,g]=o.useState(!0),[d,p]=o.useState(!1),[x,h]=o.useState(!1),u=async(t,r=!1)=>{r?h(!0):p(!0);try{const s=`news_cache_page_${t}`,a=localStorage.getItem(s),w=localStorage.getItem(`${s}_time`);if(a&&w&&!r&&Date.now()-parseInt(w)<30*60*1e3){const b=JSON.parse(a);l(t===1?b.data:R=>[...R,...b.data]),g(b.hasMore),p(!1),h(!1);return}const S=`/api/news/aggregated?page=${t}&limit=6${r?"&refresh=true":""}`,n=await(await fetch(S)).json();localStorage.setItem(s,JSON.stringify(n)),localStorage.setItem(`${s}_time`,Date.now().toString()),l(t===1?n.data:j=>[...j,...n.data]),g(n.page<n.totalPages),r&&y.success("News updated!",{description:"Fetched the latest articles from Dev.to"})}catch(s){console.error(s),y.error("Failed to fetch news")}finally{p(!1),h(!1)}};o.useEffect(()=>{u(1)},[]),o.useEffect(()=>{const t=new IntersectionObserver(s=>{if(s[0].isIntersecting&&m&&!d){const a=i+1;f(a),u(a)}},{threshold:.1}),r=document.getElementById("scroll-sentinel");return r&&t.observe(r),()=>t.disconnect()},[m,d,i]);const k=()=>{f(1),u(1,!0)};return e.jsxs(L,{children:[e.jsxs(I,{children:[e.jsx("title",{children:"Latest Robotics News | Research, Foundation Models, and Industry Updates"}),e.jsx("meta",{name:"title",content:"Latest Robotics News | Research, Foundation Models, and Industry Updates"}),e.jsx("meta",{name:"description",content:"Track the latest robotics news, research breakthroughs, foundation models, commercial deployments, and industry announcements in one place."}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:"https://robocloud-dashboard.vercel.app/news"}),e.jsx("meta",{property:"og:title",content:"Robotics News Hub - Latest Industry Updates & Trends"}),e.jsx("meta",{property:"og:description",content:"Daily updates on robotics, AI, and automation. Curated news for robotics engineers and enthusiasts by Darsh Menon."}),e.jsx("meta",{property:"og:image",content:"https://robocloud-dashboard.vercel.app/seo_research.png"}),e.jsx("meta",{property:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{property:"twitter:url",content:"https://robocloud-dashboard.vercel.app/news"}),e.jsx("meta",{property:"twitter:title",content:"Robotics News & Trends | RoboCloud Hub"}),e.jsx("meta",{property:"twitter:description",content:"Breaking news in robotics, ROS, and AI. Stay informed with curated updates from the robotics world."}),e.jsx("meta",{property:"twitter:image",content:"https://robocloud-dashboard.vercel.app/seo_research.png"}),e.jsx("meta",{name:"twitter:site",content:"@darsh_menon"}),e.jsx("meta",{property:"twitter:creator",content:"@darsh_menon"}),e.jsx("link",{rel:"canonical",href:"https://robocloud-dashboard.vercel.app/news"}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"CollectionPage",name:"Robotics News Feed",description:"Latest news and updates from the world of robotics",publisher:{"@type":"Person",name:"Darsh Menon",affiliation:"BITS Pilani"}})})]}),e.jsx("div",{className:"min-h-screen",children:e.jsxs("div",{className:"container mx-auto px-4 py-12 max-w-7xl",children:[e.jsxs("div",{className:"relative text-center space-y-6 py-12 px-6 rounded-3xl bg-gradient-to-br from-blue-600 via-blue-700 to-blue-900 overflow-hidden mb-12",children:[e.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-white/10 rounded-full -mr-32 -mt-32 blur-3xl"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-48 h-48 bg-blue-400/20 rounded-full -ml-24 -mb-24 blur-2xl"}),e.jsx("div",{className:"absolute top-1/2 left-1/4 w-32 h-32 bg-blue-300/10 rounded-full blur-xl animate-pulse"}),e.jsxs("div",{className:"relative z-10",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-white/20 backdrop-blur-sm border border-white/30 mb-4",children:[e.jsx(N,{className:"w-4 h-4 text-white"}),e.jsx("span",{className:"text-sm font-medium text-white",children:"Stay Updated"})]}),e.jsxs("h1",{className:"text-4xl md:text-5xl font-bold tracking-tight text-white",children:["Robotics ",e.jsx("span",{className:"text-blue-200",children:"News"})]}),e.jsx("p",{className:"text-lg text-blue-100 max-w-2xl mx-auto mt-4",children:"Latest updates from the industry, powered by Dev.to, IEEE Spectrum, and TechCrunch"}),e.jsxs("div",{className:"flex justify-center gap-4 mt-8 flex-wrap",children:[e.jsxs("div",{className:"bg-white/20 backdrop-blur-sm rounded-xl px-6 py-4 border border-white/30",children:[e.jsxs("p",{className:"text-3xl font-bold text-white",children:[c.length,"+"]}),e.jsx("p",{className:"text-sm text-blue-100",children:"Articles"})]}),e.jsxs("div",{className:"bg-white/20 backdrop-blur-sm rounded-xl px-6 py-4 border border-white/30",children:[e.jsx("p",{className:"text-3xl font-bold text-white",children:"Live"}),e.jsx("p",{className:"text-sm text-blue-100",children:"Updates"})]}),e.jsxs("div",{className:"bg-white/20 backdrop-blur-sm rounded-xl px-6 py-4 border border-white/30",children:[e.jsx("p",{className:"text-3xl font-bold text-white",children:"Free"}),e.jsx("p",{className:"text-sm text-blue-100",children:"Forever"})]})]}),e.jsxs(v,{variant:"outline",onClick:k,disabled:x,className:"mt-6 bg-white/20 border-white/30 text-white hover:bg-white/30 backdrop-blur-sm",children:[e.jsx(C,{className:`w-4 h-4 mr-2 ${x?"animate-spin":""}`}),x?"Updating...":"Refresh Feed"]})]})]}),e.jsx(E,{quoteIndex:15,variant:"compact",className:"mb-8"}),e.jsx(_,{variant:"banner",className:"mb-8"}),d&&i===1&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 gap-4",children:[e.jsx(D,{className:"w-8 h-8 animate-spin text-primary"}),e.jsx("p",{className:"text-muted-foreground font-medium",children:"Loading latest articles..."})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:c.map(t=>{var r,s;return e.jsxs("div",{className:"glass-card rounded-2xl overflow-hidden group cursor-pointer flex flex-col h-full hover:-translate-y-1 hover:shadow-xl transition-all duration-300",onClick:()=>window.open(t.url,"_blank"),children:[e.jsxs("div",{className:"h-56 overflow-hidden relative",children:[t.image?e.jsx("img",{src:t.image,alt:t.title,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-700"}):e.jsx("div",{className:"w-full h-full bg-secondary flex items-center justify-center",children:e.jsx(N,{className:"w-12 h-12 text-muted-foreground
1/30"})}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent opacity-60"}),e.jsx("div",{className:"absolute bottom-4 left-4 right-4 flex gap-2 flex-wrap",children:(r=t.tags)==null?void 0:r.slice(0,3).map(a=>e.jsx("span",{className:"text-[10px] uppercase tracking-wider bg-white/20 text-white px-2.5 py-1 rounded-full backdrop-blur-md font-bold border border-white/10",children:a},a))})]}),e.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("span",{className:"text-xs font-bold text-primary bg-primary/10 px-3 py-1 rounded-full",children:typeof t.source=="string"?t.source:((s=t.source)==null?void 0:s.name)||"Unknown"}),e.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:new Date(t.date).toLocaleDateString()})]}),e.jsx("h3",{className:"text-xl font-bold text-foreground leading-tight mb-3 group-hover:text-primary transition-colors line-clamp-2",children:t.title}),e.jsx("p",{className:"text-sm text-muted-foreground mb-6 line-clamp-3 flex-1 leading-relaxed",children:t.summary||"Click to read the full story..."}),e.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-border/50 mt-auto",children:[e.jsxs("span",{className:"text-xs font-medium text-muted-foreground",children:["By ",t.author||"Editor"]}),e.jsx("div",{className:"flex gap-2",children:e.jsx(v,{size:"sm",variant:"ghost",className:"h-8 w-8 p-0 rounded-full hover:bg-primary/10 hover:text-primary",onClick:a=>{a.stopPropagation(),window.open(t.url,"_blank")},children:e.jsx(F,{className:"w-4 h-4"})})})]})]})]},t.id)})}),d&&i>1&&e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-primary"}),e.jsx("p",{className:"text-muted-foreground mt-4 font-medium",children:"Loading more articles..."})]}),e.jsx("div",{id:"scroll-sentinel",className:"h-10"}),!m&&c.length>0&&e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-muted-foreground font-medium",children:"You've reached the end of the feed"})})]})})]})};export{le 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.