import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./invalid-parameter-DLv2wPKB.mjs";import{n as r,r as i,t as a}from"./utils-B9Fu5Js5.mjs";import{Fragment as o,jsx as s,jsxs as c}from"hono/jsx/jsx-runtime";import{renderToString as l}from"hono/jsx/dom/server";const u=e=>l(c(o,{children:[`租金: `,e.rent,s(`br`,{}),e.dailyRent?c(o,{children:[`日租: `,e.dailyRent,s(`br`,{})]}):null,s(`br`,{}),e.video?c(o,{children:[s(`video`,{controls:!0,preload:`metadata`,poster:`${e.video}?vframe/png/offset/0`,children:s(`source`,{src:e.video,type:`video/mp4`})}),s(`br`,{})]}):null,e.imgs?.length?e.imgs.map(e=>c(o,{children:[s(`img`,{src:e}),s(`br`,{})]})):null]})),d={path:`/rent/:city/:district?`,example:`/wellcee/rent/北京`,parameters:{city:`城市`,district:`地区`},name:`租房信息`,maintainers:[`TonyRL`],handler:f,url:`www.wellcee.com`,description:`支持的城市可以通过 [/wellcee/support-city](https://rsshub.app/wellcee/support-city) 获取`};async function f(o){let{city:s,district:c=``}=o.req.param(),l=(await r()).find(e=>e.chCityName===s);if(!l)throw new n(`Invalid city`);let d;if(c){let e=(await i(l.id)).find(e=>e.name===c);if(!e)throw new n(`Invalid district`);d=e}let f=(await e(`${a}/api/house/filter`,{method:`POST`,body:{districtIds:d?.id?[d.id]:[],subways:[],rentTypeIds:[],timeTypeIds:[],price:[],tagTypeIds:[],cityId:l.id,lang:1,pn:1}})).data.list.map(e=>({title:e.address,link:`${a}/rent-apartment/${e.id}`,description:u(e),pubDate:t(e.loginTime,`X`),author:e.userInfo.name,category:[...e.tags,...e.typeTags]}));return{title:`${s}${d?.name??``}租房信息 - Wellcee`,description:`${l.statics.online_text} ${l.statics.total_text}`,image:l.icon,icon:l.icon,logo:l.icon,link:`${a}/rent-apartment/${l.cityName}/list?cityId=${l.id}&lang=zh${c?`#districtIds=${d?.id}`:``}`,item:f}}export{d as route};