import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./description-Dw_iy-yT.mjs";const r={path:`/bangumi/:id/:embed?`,categories:[`anime`],view:3,example:`/acfun/bangumi/6000617`,parameters:{id:`番剧 id`,embed:`默认为开启内嵌视频, 任意值为关闭`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`番剧`,maintainers:[`xyqfer`],handler:i,description:`::: tip
番剧 id 不包含开头的 aa。
例如：\`https://www.acfun.cn/bangumi/aa6000617\` 的番剧 id 是 6000617，不包括开头的 aa。
:::`};async function i(r){let i=r.req.param(`id`),a=!r.req.param(`embed`),o=`https://www.acfun.cn/bangumi/aa${i}`,s=await e(o),c=JSON.parse(s.match(/window.bangumiData = (.*?);\n/)[1]),l=JSON.parse(s.match(/window.bangumiList = (.*?);\n/)[1]);return{title:c.bangumiTitle,link:o,description:c.bangumiIntro,image:c.belongResource.coverImageV,item:l.items.map(e=>({title:`${e.episodeName}${e.title?` - ${e.title}`:``}`,description:n({embed:a,aid:`ac${e.itemId}`,img:e.imgInfo.thumbnailImage.cdnUrls[0].url.split(`?`)[0]}),link:`https://www.acfun.cn/bangumi/aa${i}_36188_${e.itemId}`,pubDate:t(e.updateTime,`x`)}))}}export{r as route};