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"./desc-Dp6HJ21q.mjs";import i from"markdown-it";const a=i({html:!0,linkify:!0}),o={path:`/studios`,categories:[`programming`],example:`/modelscope/studios`,parameters:{},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`modelscope.cn/studios`]}],name:`创空间`,maintainers:[`TonyRL`],handler:s,url:`modelscope.cn/studios`};async function s(i){let o=`https://modelscope.cn`,s=`${o}/studios`,{data:c}=await n.put(`${o}/api/v1/studios`,{json:{PageSize:i.req.query(`limit`)?Number.parseInt(i.req.query(`limit`)):36,PageNumber:1,SortBy:`gmt_modified`}}),l=c.Data.Studios.map(e=>({title:e.ChineseName||e.Name,description:e.Description,author:e.CreatedBy,link:`${s}/${e.Path}/${e.Name}`,pubDate:t(e.CreatedTime,`X`),category:e.Tags,slug:`/${e.Path}/${e.Name}`,coverImage:e.CoverImage.startsWith(`https://img.alicdn.com/`)?void 0:e.CoverImage}));return{title:`创空间首页 · 魔搭社区`,description:`ModelScope——汇聚各领域先进的机器学习模型，提供模型探索体验、推理、训练、部署和应用的一站式服务。在这里，共建模型开源社区，发现、学习、定制和分享心仪的模型。`,image:`https://g.alicdn.com/sail-web/maas/0.8.10/favicon/128.ico`,link:s,item:await Promise.all(l.map(t=>e.tryGet(t.link,async()=>{let{data:e}=await n(`${o}/api/v1/studio${t.slug}`),i=e.Data.ReadMeContent;return t.description=r({coverImage:t.coverImage,description:t.description,md:a.render(i)}),t})))}}export{o as route};