import{t as e}from"./config-BYRrjYC5.mjs";import{t}from"./got-BBDj7u1e.mjs";import{t as n}from"./config-not-found-B9AOp828.mjs";import{t as r}from"./utils-BDdVYk8R.mjs";const i={path:`/remote/:site/:only_media?`,categories:[`social-media`],view:1,example:`/mastodon/remote/pawoo.net/true`,parameters:{site:"instance address, only domain, no `http://` or `https://` protocol header",only_media:{description:`whether only display media content, default to false, any value to true`,options:[{value:`true`,label:`true`},{value:`false`,label:`false`}],default:`false`}},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`Instance timeline (federated)`,maintainers:[`hoilc`],handler:a,description:"If the instance address is not `mastodon.social` or `pawoo.net`, then the route requires `ALLOW_USER_SUPPLY_UNSAFE_DOMAIN` to be `true`."};async function a(i){let a=i.req.param(`site`),o=i.req.param(`only_media`)===`true`?`true`:`false`;if(!e.feature.allow_user_supply_unsafe_domain&&!r.allowSiteList.includes(a))throw new n(`This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`);let s=`http://${a}/api/v1/timelines/public?remote=true&only_media=${o}`,c=(await t.get(s,{headers:r.apiHeaders(a)})).data;return{title:`Federated Public${i.req.param(`only_media`)===`true`?` Media`:``} Timeline on ${a}`,link:`https://${a}`,item:r.parseStatuses(c)}}export{i as route};