import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./cache-DUthuMSu.mjs";import{t as n}from"./parse-date-BdYTmLpo.mjs";import{load as r}from"cheerio";const i={path:`/news`,name:`News`,url:`thinkingmachines.ai/news`,maintainers:[`w3nhao`],example:`/thinkingmachines/news`,categories:[`programming`],features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1},radar:[{source:[`thinkingmachines.ai/news`,`thinkingmachines.ai/news/`],target:`/news`}],handler:a};async function a(){let i=`https://thinkingmachines.ai`,a=`${i}/news/`,o=r(await e(a)),s=o(`main li a`).toArray().map(e=>{let t=o(e),n=t.find(`.post-title`).text().trim(),r=t.find(`time.desktop-time`).text().trim(),a=t.attr(`href`)||``;return{title:n,dateStr:r,link:a.startsWith(`http`)?a:`${i}${a}`}}).filter(e=>e.title&&e.link);return{title:`Thinking Machines Lab - News`,link:a,item:await Promise.all(s.map(i=>t.tryGet(i.link,async()=>{let t=r(await e(i.link));t(`nav, footer, header, script, style`).remove(),t(`.post-heading, #post-prev-link, #post-next-link`).remove();let a=t(`main`).html()?.trim()||``;return{title:i.title,link:i.link,pubDate:n(i.dateStr,`MMM D, YYYY`),description:a}})))}}export{i as route};