import{t as e}from"./parse-date-BdYTmLpo.mjs";import{t}from"./got-BBDj7u1e.mjs";import{t as n}from"./timezone-keeL11Io.mjs";import{c as r,t as i}from"./utils-gPF6hGYo.mjs";import{t as a}from"./comment-B6h6049R.mjs";import{load as o}from"cheerio";const s={path:`/user/:lang?/appComment/:uid`,categories:[`anime`],example:`/qoo-app/user/en/appComment/35399143`,parameters:{lang:"Language, see the table above, empty means `中文`",uid:`User ID, can be found in URL`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`User Game Comments`,maintainers:[`TonyRL`],handler:c};async function c(s){let{uid:c,lang:l=``}=s.req.param(),u=`${r}${l?`/${l}`:``}/${c}`,{data:d}=await t(u),{data:f}=await t(`${r}/getUserAppCommentList`,{searchParams:{fid:c}}),p=o(d),m=p(`.person .name`).text(),h=f.list.map(t=>({title:`${m} ▶ ${t.app.name}`,link:`${i}/comment-detail/${t.comment.id}`,description:a({rating:t.score,text:t.comment.content}),pubDate:n(e(t.comment.created_at,`YYYY-MM-DD`),8),author:m}));return{title:p(`head title`).text(),link:u,image:decodeURIComponent(p(`.person div.slot`).attr(`data-args`)).replace(`avatar=`,``).split(`?`)[0],language:p(`html`).attr(`lang`),item:h}}export{s as route};