1import{d as M,u as G,aU as W,b2 as E,c as m,o as s,a as l,b as t,k as e,F as I,v as r,n as g,B as q,j as f,cW as Q,m as x,aJ as J,S as K,p as D,z as X,y as V,M as Y,q as j,bT as Z,Q as ee,U as te,V as z,fL as se,P as H,I as oe,iR as ae,J as ne,bl as A,cA as le,H as L,cI as re,cV as ie,aI as ce,bn as O,bR as de,at as ue,e as pe,g as me,a_ as fe,gC as he,gD as _e,ah as ge,bW as be}from"./DvgxvNL0.js";import"./Cvd4DGHj.js";import{a as ve}from"./CO2Pkobv.js";import{_ as xe}from"./DqMByUtI.js";import{_ as ye}from"./Cvd_CCXx.js";import{u as we}from"./hfN1AajU.js";import{_ as N}from"./Dt8Hubkr.js";import{u as ke}from"./C0jx6QEY.js";const $e={class:"rounded-2xl border border-solid border-surface-4 bg-surface-3 overflow-hidden grid grid-cols-1 md:grid-cols-[2fr_4fr]"},Ie={class:"flex flex-col gap-2 p-4"},je={class:"text-contrast font-semibold text-xl"},Ce=["innerHTML"],Se={key:1,class:"m-0 break-words"},Te={class:"flex flex-col bg-surface-2 border-0 border-l border-solid border-surface-4 overflow-hidden"},Me={key:0,class:"w-full py-12 text-center"},Ae={class:"flex flex-col gap-1 truncate"},Le={class:"flex items-center gap-2"},De={class:"text-contrast font-medium text-base group-hover:underline"},Pe={class:"flex items-center gap-1 text-sm"},Re={class:"flex items-center gap-1 text-sm"},qe={class:"text-primary text-sm truncate"},Ee={key:0,class:"w-full py-12 text-center"},Ve={key:1,class:"w-full py-12 text-center"},ze=M({__name:"CollectionWidget",props:{collectionId:{}},setup(b){const{formatMessage:o}=G(),{formatCompactNumber:a}=we(),v=b,y=W(),{data:c,isLoading:h}=E({queryKey:["collection",()=>v.collectionId],queryFn:()=>y.labrinth.collections.get(v.collectionId),enabled:m(()=>!!v.collectionId)}),n=m(()=>c.value?.projects??[]),{data:u,isLoading:w}=E({queryKey:["collection-projects",()=>n.value],queryFn:()=>y.labrinth.projects_v3.getMultiple(n.value),enabled:m(()=>n.value.length>0)}),i=ee(""),C=m(()=>u.value?.slice().sort((S,p)=>p.followers-S.followers).filter(S=>S.name.toLowerCase().includes(i.value.toLowerCase()))??[]),R=m(()=>c.value?.user==="2REoufqX"),$=te({projectCount:{id:"collection-widget.project-count",defaultMessage:"{count, plural, one {# project} other {# projects}}"},searchPlaceholder:{id:"collection-widget.search-placeholder",defaultMessage:"Search projects"},loadingProjects:{id:"collection-widget.loading-projects",defaultMessage:"Loading projects..."},emptyCollection:{id:"collection-widget.empty-collection",defaultMessage:"This collection is empty."},noSearchResults:{id:"collection-widget.no-search-results",defaultMessage:"No projects match your search."}});return(S,p)=>(s(),l("div",$e,[t("div",Ie,[e(h)?(s(),l(I,{key:0},[p[1]||(p[1]=t("div",{class:"size-[96px] rounded-[16px] bg-surface-4 animate-pulse"},null,-1)),p[2]||(p[2]=t("div",{class:"w-52 h-8 rounded-full bg-surface-4 animate-pulse"},null,-1)),p[3]||(p[3]=t("div",{class:"w-28 h-5 rounded-full bg-surface-4 animate-pulse"},null,-1)),p[4]||(p[4]=t("div",{class:"w-44 h-5 rounded-full bg-surface-4 animate-pulse"},null,-1))],64)):(s(),l(I,{key:1},[r(N,{to:`/collection/${e(c)?.id}`,class:"flex flex-col gap-2 hover:underline",target:"_blank"},{default:g(()=>[r(q,{src:e(c)?.icon_url,size:"96px"},null,8,["src"]),t("span",je,f(e(c)?.name),1)]),_:1},8,["to"]),t("span",null,f(e(o)(e($).projectCount,{count:e(c)?.projects.length??0})),1),R.value?(s(),l("div",{key:0,class:"description-body",innerHTML:e(Q)(e(c)?.description??"")},null,8,Ce)):(s(),l("p",Se,f(e(c)?.description),1))],64))]),t("div",Te,[(e(u)?.length??0)>5?(s(),x(J,{key:0,modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=d=>i.value=d),placeholder:e(o)(e($).searchPlaceholder),"wrapper-class":"m-1 !rounded-l-none !rounded-b-none !bg-transparent",icon:e(K),disabled:e(h)||e(w)},null,8,["modelValue","placeholder","icon","disabled"])):D("",!0),t("div",{class:X(["flex flex-col h-[20rem] overflow-y-auto",{"border-0 border-t border-solid border-surface-4":(e(u)?.length??0)>5}])},[e(w)?(s(),l("span",Me,f(e(o)(e($).loadingProjects)),1)):(s(),l(I,{key:1},[(s(!0),l(I,null,V(C.value,d=>(s(),x(N,{key:d.id,to:`/project/${d.id}`,class:"flex items-center gap-2 px-3 py-2 even:bg-surface-2.5 hover:bg-surface-4 group",target:"_blank"},{default:g(()=>[r(q,{src:d.icon_url,size:"48px"},null,8,["src"]),t("div",Ae,[t("span",Le,[t("span",De,f(d.name),1),t("span",Pe,[r(e(Y),{class:"size-4 text-secondary"}),j(" "+f(e(a)(d.downloads)),1)]),t("span",Re,[r(e(Z),{class:"size-4 text-secondary"}),j(" "+f(e(a)(d.followers)),1)])]),t("span",qe,f(d.summary),1)])]),_:2},1032,["to"]))),128)),e(u)?.length===0?(s(),l("span",Ee,f(e(o)(e($).emptyCollection)),1)):C.value.length===0?(s(),l("span",Ve,f(e(o)(e($).noSearchResults)),1)):D("",!0)],64))],2)])]))}}),Be=z(ze,[["__scopeId","data-v-a1b39eca"]]),Ne=M({__name:"PrideCollectionWidget",setup(b){return(o,a)=>{const v=se;return s(),x(v,null,{default:g(()=>[r(Be,{"collection-id":"M4c3ITvd"})]),_:1})}}}),Ue={},We={id:"rule-6",class:"rounded-2xl border border-solid border-surface-4 bg-surface-3 markdown-body p-4"};function He(b,o){const a=H;return s(),l("div",We,[r(a,{to:"/legal/rules#generative-ai",target:"_blank"},{default:g(()=>[...o[0]||(o[0]=[t("h2",{class:"!mt-0"},'6. Usage of Generative "AI"',-1)])]),_:1}),o[1]||(o[1]=oe('<p data-v-ea335cf1> Projects must be forthright and honest about the usage of generative AI in their production, publication, and within the project itself. Projects cannot be entirely or primarily comprised of content created or derived from generative AI output. </p><h3 id="disclosure-of-ai-generated-content" data-v-ea335cf1>6.1. Disclosure of AI generated content</h3><p data-v-ea335cf1>You must apply the appropriate âContains AI-generated contentâ content disclosure when:</p><ol type="a" data-v-ea335cf1><li data-v-ea335cf1>a substantial portion of the project's code is a product of AI output.</li><li data-v-ea335cf1> the project includes any assets that are primarily or entirely a product of AI output. </li><li data-v-ea335cf1>the project's design or functionality relies on the use of generative AI.</li><li data-v-ea335cf1> any element of the project's page such as description or publishing relies on generative AI. </li></ol><h3 id="prohibited-usage-of-ai" data-v-ea335cf1>6.2. Prohibited AI generated content</h3><ol type="a" data-v-ea335cf1><li data-v-ea335cf1> No images uploaded to a gallery, icon, description, or any other part of a project page may be created or derived from generative AI output. Any such images may be removed. </li><li data-v-ea335cf1> Projects may not be published publicly if the contents are primarily or entirely a product of AI output. </li></ol>',6))])}const Oe=z(Ue,[["render",He],["__scopeId","data-v-ea335cf1"]]),Fe={class:"rounded-2xl border border-solid border-surface-4 bg-surface-3 overflow-hidden"},Ge={class:"p-4 flex flex-col gap-3"},Qe={class:"flex items-center gap-2"},Je={key:0,style:{left:"0",width:"100%",height:"0",position:"relative","padding-bottom":"56.25%"}},F=M({__name:"SparkLiveWidget",props:{embed:{type:Boolean,default:!1}},setup(b){return(o,a)=>(s(),l("div",Fe,[t("div",Ge,[t("div",Qe,[r(e(ae),{class:"size-6 text-brand"}),a[0]||(a[0]=t("span",{class:"text-contrast font-medium"}," We're hosting a live chat with Spark later today to answer all of your questions! ",-1))]),a[1]||(a[1]=t("span",null,[j(" Ask questions for us to answer in our "),t("a",{href:"https://discord.modrinth.com",target:"_blank",class:"text-brand font-semibold hover:underline"},"Discord server"),j(". ")],-1)),a[2]||(a[2]=t("span",null,[j("Tune in live on June 15, 11am PST / 2pm EST / 7pm BST / 8pm CEST over on our "),t("a",{href:"https://www.youtube.com/live/p1Dg-fud0TQ",target:"_blank",class:"text-brand font-semibold hover:underline"},"YouTube channel"),j(".")],-1))]),b.embed?(s(),l("div",Je,[...a[3]||(a[3]=[t("iframe",{src:"https://www.youtube.com/embed/p1Dg-fud0TQ",style:{to
1p:"0",left:"0",width:"100%",height:"100%",position:"absolute",border:"0"},allowfullscreen:"",scrolling:"no",allow:` 2 accelerometer *; 3 clipboard-write *; 4 encrypted-media *; 5 gyroscope *; 6 picture-in-picture *; 7 web-share *; 8 `,referrerpolicy:"strict-origin"},null,-1)])])):D("",!0)]))}}),Ke=M({__name:"SparkLiveWidgetEmbed",setup(b){return(o,a)=>(s(),x(F,{embed:""}))}}),Xe=["innerHTML"],Ye={key:1,class:"flex flex-col gap-4"},Ze=["innerHTML"],et=M({__name:"ArticleBody",props:{html:{}},setup(b){const o={"spark-live-widget":F,"spark-live-widget-embed":Ke,"pride-collection-widget":Ne,"rule-6":Oe};function a(c){const h=Object.keys(o);if(h.length===0)return[{type:"html",content:c}];const n=new RegExp(`<div id="(${h.join("|")})"></div>`,"g"),u=[];let w=0,i;for(;(i=n.exec(c))!==null;)i.index>w&&u.push({type:"html",content:c.slice(w,i.index)}),u.push({type:"widget",id:i[1]}),w=n.lastIndex;return w<c.length&&u.push({type:"html",content:c.slice(w)}),u.length>0?u:[{type:"html",content:c}]}const v=b,y=m(()=>a(v.html));return(c,h)=>y.value.length===1&&y.value[0].type==="html"?(s(),l("div",{key:0,class:"markdown-body",innerHTML:y.value[0]?.content},null,8,Xe)):(s(),l("div",Ye,[(s(!0),l(I,null,V(y.value,(n,u)=>(s(),l(I,{key:u},[n.type==="html"?(s(),l("div",{key:0,class:"markdown-body",innerHTML:n.content},null,8,Ze)):(s(),x(ne(o[n.id]),{key:1}))],64))),128))]))}}),tt={class:"flex gap-2"},U=M({__name:"ShareArticleButtons",props:{title:{},url:{}},setup(b){const o=b,a=m(()=>encodeURIComponent(o.url)),v=m(()=>o.title?encodeURIComponent(o.title):void 0);return(y,c)=>{const h=O("tooltip");return s(),l("div",tt,[A((s(),x(e(L),{href:`https://bsky.app/intent/compose?text=${e(a)}`,target:"_blank",class:"!w-9 !rounded-full !px-0"},{default:g(()=>[r(e(le))]),_:1},8,["href"])),[[h,"Share on Bluesky"]]),A((s(),x(e(L),{href:`https://tootpick.org/#text=${e(a)}`,target:"_blank",class:"!w-9 !rounded-full !px-0"},{default:g(()=>[r(e(re))]),_:1},8,["href"])),[[h,"Share on Mastodon"]]),A((s(),x(e(L),{href:`https://www.x.com/intent/post?url=${e(a)}`,target:"_blank",class:"!w-9 !rounded-full !px-0"},{default:g(()=>[r(e(ie))]),_:1},8,["href"])),[[h,"Share on X"]]),A((s(),x(e(L),{href:`mailto:${e(v)?`?subject=${e(v)}&`:"?"}body=${e(a)}`,target:"_blank",class:"!w-9 !rounded-full !px-0"},{default:g(()=>[r(e(ce))]),_:1},8,["href"])),[[h,"Share via email"]]),r(e(ye),{url:b.url},null,8,["url"])])}}}),st={class:"page py-6"},ot={class:"flex flex-wrap items-center justify-between gap-4 border-0 border-b-[1px] border-solid border-divider px-6 pb-6"},at={class:"flex gap-2"},nt={class:"mt-6 flex flex-col gap-4 px-6"},lt={class:"m-0 text-2xl font-semibold leading-tight sm:text-4xl"},rt={class:"m-0 text-base leading-tight sm:text-lg"},it={class:"mt-auto flex flex-wrap items-center gap-1 text-sm text-secondary sm:text-base"},ct={key:0},dt={class:"flex items-center"},ut={key:0},pt={class:"hidden md:block"},mt={class:"text-sm text-secondary sm:text-base md:hidden"},ft=["src","alt"],ht=M({__name:"[slug]",async setup(b){let o,a;const v=W(),y=be(),c=de(),h=ke({dateStyle:"long"}),n=ve.find(d=>d.slug===c.params.slug);if(!n)throw ue({fatal:!0,statusCode:404,message:"The requested article could not be found."});const{data:u}=E({queryKey:m(()=>["users",n.authors]),queryFn:async()=>{const d=await v.labrinth.users_v2.getMultiple(n.authors);return d.sort((_,k)=>n.authors.indexOf(_.id)-n.authors.indexOf(k.id)),d},enabled:m(()=>n.authors.length>0)}),w=([o,a]=pe(()=>n.html()),o=await o,a(),o),i=m(()=>({...n,path:`/news/${n.slug}`,thumbnail:n.thumbnail?`/news/article/${n.slug}/thumbnail.webp`:"/news/default.webp",title:n.title,summary:n.summary,date:n.date,html:w})),C=m(()=>u?.value?.length??0),R=m(()=>i.value.title),$=m(()=>`https://modrinth.com/news/article/${c.params.slug}`),S=m(()=>i.value.thumbnail?`${y.public.siteUrl}${i.value.thumbnail}`:`${y.public.siteUrl}/news/default.jpg`),p=m(()=>ge(i.value.date));return me({title:()=>`${R.value} - Modrinth News`,ogTitle:()=>R.value,description:()=>i.value.summary,ogDescription:()=>i.value.summary,ogType:"article",ogImage:()=>S.value,articlePublishedTime:()=>p.value.toISOString(),twitterCard:"summary_large_image",twitterImage:()=>S.value}),fe(()=>{const d=document.querySelectorAll(".markdown-body video");if("IntersectionObserver"in window){const _=new IntersectionObserver(k=>
8{k.forEach(P=>{const T=P.target;P.isIntersecting?T.play().catch(()=>{}):T.pause()})},{threshold:.5});d.forEach(k=>{_.observe(k)})}else d.forEach(_=>{_.setAttribute("autoplay","")})}),(d,_)=>{const k=H,P=O("tooltip");return s(),l("div",st,[t("div",ot,[r(k,{to:"/news"},{default:g(()=>[..._[0]||(_[0]=[t("h1",{class:"m-0 text-3xl font-semibold hover:underline"},"News",-1)])]),_:1}),t("div",at,[r(xe),A((s(),x(e(L),{href:"/news/feed/rss.xml",target:"_blank",class:"!w-9 !rounded-full !px-0"},{default:g(()=>[r(e(he))]),_:1})),[[P,"RSS feed"]]),A((s(),x(e(L),{href:"/news/changelog",class:"!w-9 !rounded-full !px-0"},{default:g(()=>[r(e(_e))]),_:1})),[[P,"Changelog"]])])]),t("article",nt,[t("h2",lt,f(i.value.title),1),t("p",rt,f(i.value.summary),1),t("div",it,[(s(!0),l(I,null,V(e(u),(T,B)=>(s(),l(I,{key:`author-${T.id}`},[C.value-1===B&&C.value>1?(s(),l("span",ct,"and")):D("",!0),t("span",dt,[r(k,{to:`/user/${T.id}`,class:"inline-flex items-center gap-1 font-semibold hover:underline hover:brightness-[--hover-brightness]"},{default:g(()=>[r(e(q),{src:T.avatar_url,circle:"",size:"24px"},null,8,["src"]),j(" "+f(T.username),1)]),_:2},1032,["to"]),(e(u)?.length??0)>2&&B!==C.value-1?(s(),l("span",ut,",")):D("",!0)])],64))),128)),!e(u)||C.value===0?(s(),x(k,{key:0,to:"/organization/modrinth",class:"inline-flex items-center gap-1 font-semibold hover:underline hover:brightness-[--hover-brightness]"},{default:g(()=>[r(e(q),{src:"https://cdn.modrinth.com/modrinth-icon-96.webp",size:"24px"}),_[1]||(_[1]=j(" Modrinth Team ",-1))]),_:1})):D("",!0),_[2]||(_[2]=t("span",{class:"hidden md:block"},"â¢",-1)),t("span",pt,f(e(h)(p.value.toDate())),1)]),t("span",mt," Posted on "+f(e(h)(p.value.toDate())),1),r(U,{title:i.value.title,url:$.value},null,8,["title","url"]),t("img",{src:i.value.thumbnail,class:"aspect-video w-full rounded-xl border-[1px] border-solid border-button-border object-cover sm:rounded-2xl",alt:i.value.title},null,8,ft),r(e(et),{html:i.value.html},null,8,["html"]),_[3]||(_[3]=t("h3",{class:"mb-0 mt-4 border-0 border-t-[1px] border-solid border-divider pt-4 text-base font-extrabold sm:text-lg"}," Share this article ",-1)),r(U,{title:i.value.title,url:$.value},null,8,["title","url"])])])}}}),$t=z(ht,[["__scopeId","data-v-b5c2b08a"]]);export{$t as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.