import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./config-BYRrjYC5.mjs";import{t as n}from"./cache-DUthuMSu.mjs";import{t as r}from"./parse-date-BdYTmLpo.mjs";import{Fragment as i,jsx as a,jsxs as o}from"hono/jsx/jsx-runtime";import{renderToString as s}from"hono/jsx/dom/server";import{raw as c}from"hono/html";const l=`https://app.daily.dev`,u={version:54,loggedIn:!1},d=()=>n.tryGet(`daily:buildId`,async()=>(await e(`${l}/onboarding`)).match(/"buildId":"(.*?)"/)[1],t.cache.routeExpire,!1),f=async(t,n=!1)=>{let r=await e(`https://api.daily.dev/graphql`,{method:`POST`,body:t});return n?r.data.source:r.data.page.edges},p=({image:e,content:t})=>s(o(i,{children:[e?o(i,{children:[a(`img`,{src:e}),a(`br`,{})]}):null,t?c(t):null]})),m=(e,t,n)=>e.map(({node:e})=>{let i,a;return t&&e.type===`share`?(i=e.sharedPost.permalink,a=e.sharedPost.title):(i=e.commentsPermalink??e.permalink,a=e.title),{id:e.id,title:a,link:i,guid:e.permalink,description:p({image:e.image,content:e.contentHtml?.replaceAll(`
`,`<br>`)??e.summary}),author:e.author?.name,itunes_item_image:e.image,pubDate:n?r(e.createdAt):``,upvotes:e.numUpvotes,comments:e.numComments,category:e.tags}});export{u as a,m as i,d as n,f as r,l as t};