import{t as e}from"./cache-DUthuMSu.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";import{t as r}from"./timezone-keeL11Io.mjs";import{load as i}from"cheerio";const a=async a=>{let{columnId:o=`1832739866673426433`,subColumnId:s}=a.req.param(),c=a.req.query(`limit`)?Number.parseInt(a.req.query(`limit`),10):30,l=`https://www.jgjcndrc.org.cn`,u=new URL(`list?clmId=${o}${s?`&sclmId=${s}`:``}`,l).href,d=new URL(`prod-api/portal/artPageByColumn/${s??o}`,l).href,{data:f}=await n(u),p=i(f),m=p(`html`).prop(`lang`),{data:h}=await n(d,{searchParams:{pageNum:1,pageSize:c}}),g=h.data.slice(0,c).map(e=>{let n=`jgjcndrc-${e.articleId}`;return{title:e.articleTitle,pubDate:t(e.pubDate),link:new URL(`prod-api/portal/article/${e.articleId}`,l).href,guid:n,id:n,language:m}});g=await Promise.all(g.map(i=>e.tryGet(i.link,async()=>{let{data:e}=await n(i.link),a=e.data,o=a.articleTitle,s=a.articleContent,c=`jgjcndrc-${a.articleId}`;return i.title=o,i.description=s,i.pubDate=r(t(a.pubDate),8),i.link=a.linkUrl||new URL(a.articleUrl,l).href,i.category=a.parentColumns.map(e=>e.columnName),i.guid=c,i.id=c,i.content={html:s,text:s},i.language=m,i})));let _=new URL(p(`header img`).last().prop(`src`),l).href;return{title:`${p(`title`).text()}${p(`div.tit`).text()?` - ${p(`div.tit`).text()}`:``}`,description:p(`meta[name="description"]`).prop(`content`),link:u,item:g,allowEmpty:!0,image:_,author:p(`header h1`).text(),language:m}},o={path:`/jgjcndrc/:columnId?/:subColumnId?`,name:`中华人民共和国国家发展和改革委员会价格监测中心`,url:`www.jgjcndrc.org.cn`,maintainers:[`nczitzk`],handler:a,example:`/gov/jgjcndrc/1832739866673426433`,parameters:{columnId:"栏目 id，默认为 `1832739866673426433`，即通知公告，可在对应栏目页 URL 中找到",subColumnId:`子栏目 id，默认为空，可在对应子栏目页 URL 中找到`},description:"::: tip\n  若订阅 [通知公告](https://www.jgjcndrc.org.cn/list?clmId=1832739866673426433)，网址为 `https://www.jgjcndrc.org.cn/list?clmId=1832739866673426433`。截取 `clmId` 的参数部分 `1832739866673426433` 作为参数填入，此时路由为 [`/gov/jgjcndrc/1832739866673426433`](https://rsshub.app/gov/jgjcndrc/1832739866673426433)。\n\n  若订阅 [国内外市场价格监测情况周报](https://www.jgjcndrc.org.cn/list?clmId=1832298113994649601&sclmId=1832751799531220993)，网址为 `https://www.jgjcndrc.org.cn/list?clmId=1832298113994649601&sclmId=1832751799531220993`。截取 `clmId` 和 `sclmId` 的参数部分 `1832298113994649601` 和 `1832751799531220993` 作为参数填入，此时路由为 [`/gov/jgjcndrc/1832298113994649601/1832751799531220993`](https://rsshub.app/gov/jgjcndrc/1832298113994649601/1832751799531220993)。\n:::",categories:[`government`],features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportRadar:!0,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`www.jgjcndrc.org.cn/list`],target:(e,t)=>{t=new URL(t);let n=t.searchParams.get(`clmId`),r=t.searchParams.get(`sclmId`);return`/jgjcndrc${n?`/${n}${r?`/${r}`:``}`:``}`}}]};export{a as handler,o as route};