import{t as e}from"./got-BBDj7u1e.mjs";import{n as t,r as n,t as r}from"./utils-CuyG10_q.mjs";const i={path:`/today/:edition?/:tab?`,categories:[`new-media`],example:`/line/today`,parameters:{edition:`Edition, see below, Taiwan by default`,tab:"Tag, can be found in URL, `top` by default"},radar:[{source:[`today.line.me/`]}],name:`TODAY`,maintainers:[`nczitzk`],handler:a,url:`today.line.me/`,description:`Edition

| Taiwan | Thailand | Hong Kong |
| ------ | -------- | --------- |
| tw     | th       | hk        |`};async function a(i){let a=i.req.param(`edition`)||`tw`,o=i.req.param(`tab`)||`top`,s=`${r}/webapi/portal/page/${o}?country=${a}`,c=`${r}/webapi/api/v6/recommendation/articles/listings/mytoday_rec:id?offset=0&length=50&country=${a}&gender=&age=&excludeNoThumbnail=0&containMainSnapshot=0`,l=`${r}/${a}/v2/tab/${o}`,u=`Recommendation`,d;if(o!==`recommendation`){let t=await e({method:`get`,url:s}),n=t.data.modules.findLast(e=>e.source===`CATEGORY_MOST_VIEW`).listings[0];u=t.data.name,d=`${r}/webapi/trending/category/mostView/listings/${n.id}?offset=0&length=50&country=${a}&targetContent=${n.params.targetContent}&categories=${n.params.categories}&trendingEventPeriod=${n.params.trendingEventPeriod}`}let f=await t(n((await e({method:`get`,url:o===`recommendation`?c:d})).data.items));return{title:`${u} - Line Today`,link:l,item:f}}export{i as route};