import{t as e}from"./parse-date-BdYTmLpo.mjs";import{t}from"./invalid-parameter-DLv2wPKB.mjs";import{t as n}from"./utils-v2GLie-e.mjs";import{Fragment as r,jsx as i,jsxs as a}from"hono/jsx/jsx-runtime";import{renderToString as o}from"hono/jsx/dom/server";const s={path:`/news/coronavirus/data/:province?/:city?`,name:`Unknown`,maintainers:[`CaoMeiYouRen`],handler:c};async function c(s){let c=s.req.param(`province`)||``,l=s.req.param(`city`)||``,u=`https://news.qq.com/zt2020/page/feiyan.htm#/`,d=[],{lastUpdateTime:f,areaTree:p}=(await n([`diseaseh5Shelf`]))?.data?.diseaseh5Shelf||{},m=p?.[0],h=m?.children,g,_;if(!c||c===`中国`||c===`全国`?(g=m,_=`中国`):(g=h?.find(e=>e.name===c),_=c,l&&(g=g?.children?.find(e=>e.name===l),g&&(_=`${c}-${l}`))),!g)throw new t(`未找到 ${_} 的疫情数据，请检查输入的省市名称是否正确`);let v=g.today?.confirm,y=g.total?.nowConfirm,b=g.total?.confirm,x=g.total?.dead,S=e(g.total?.mtime||f),C=`${_} - 腾讯新闻 - 新型冠状病毒肺炎疫情实时追踪`,w={title:`${_} - 疫情数据`,description:o(a(r,{children:[i(`p`,{children:`新增确诊：`}),i(`p`,{children:`+${v}`}),i(`br`,{}),i(`p`,{children:`现有确诊：`}),i(`p`,{children:y}),i(`br`,{}),i(`p`,{children:`累计确诊：`}),i(`p`,{children:b}),i(`br`,{}),i(`p`,{children:`累计死亡：`}),i(`p`,{children:x}),i(`br`,{})]})),pubDate:S,guid:`${u}${_}?pubDate=${S.toISOString()}`};return d.push(w),{title:C,link:u,item:d}}export{s as route};