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={jinqigengxin:`近期更新`,dushi:`都市`,xianxia:`仙侠`,xuanhuan:`玄幻`,qihuan:`奇幻`,lishi:`历史`,youxi:`游戏`,wuxia:`武侠`,kehuan:`科幻`,tiyu:`体育`,lingyi:`灵异`,junshi:`军事`,erciyuan:`轻小说`},a={path:`/novel/:type`,name:`小说列表`,url:`zxcs.click`,maintainers:[`liaochuan`],example:`/zxcs/novel/jinqigengxin`,parameters:{type:`小说类型, 可在对应类型页 URL 中找到`},description:`支持小说类型：${Object.entries(i).map(([e,t])=>`${e}-${t}`).join(`,`)}`,categories:[`reading`],features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`zxcs.click/:type`],target:`/novel/:type`}],handler:o};async function o(a){let{type:o}=a.req.param(),s=`https://www.zxcs.click`,c=`${s}/${o}`,l=r(await e(c)),u=l(`div.book-info`).toArray().map(e=>{let t=l(e),r=t.find(`a`).first();return{title:r.text(),link:String(r.attr(`href`)),pubDate:n(t.find(`.update`).text()),category:[],description:``,image:``,author:``}}),d=await Promise.all(u.map(n=>t.tryGet(String(n.link),async()=>{let t=r(await e(String(n.link))),a=String(n.link).split(`/`);return n.category=[i[String(a.at(-2))]],n.description=String(t(`.intro`).first().html()),n.image=s+String(t(`.book-cover img`).attr(`src`)),n.author=t(`.author`).text(),n})));return{title:`知轩藏书 - ${i[o]}`,link:c,item:d}}export{a as route};