import{t as e}from"./cache-DUthuMSu.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";import{t as r}from"./timezone-keeL11Io.mjs";import{n as i,r as a,t as o}from"./util-_VoHbVHZ.mjs";import{load as s}from"cheerio";const c={path:`/chinamine-safety/xw/:category{.+}?`,name:`Unknown`,maintainers:[],handler:l};async function l(c){let{category:l=`yjglbyw`}=c.req.param(),u=c.req.query(`limit`)?Number.parseInt(c.req.query(`limit`),10):30,d=new URL(`xw/${l.endsWith(`/`)?l:`${l}/`}`,a).href,{data:f}=await n(d),p=s(f),m=p(`div.center_display_right table tbody tr td a`).slice(0,u).toArray().map(e=>(e=p(e),{title:e.text(),link:new URL(e.prop(`href`),d).href,pubDate:r(t(e.parent().find(`span`).text()),8)}));return m=await i(m,e.tryGet),{item:m,...o(p,d)}}export{c as route};