import"./C6MRUCyE.js";const f=e=>e.categories.slice().sort((t,r)=>{const i=t.header.localeCompare(r.header);if(i!==0)return i;if(t.header==="resolutions"&&r.header==="resolutions")return t.name.replace(/\D/g,"")-r.name.replace(/\D/g,"");if(t.header==="performance impact"&&r.header==="performance impact"){const o=["potato","low","medium","high","screenshot"];return o.indexOf(t.name)-o.indexOf(r.name)}return 0}),d=(e,t=!0)=>{const r=Number(e);return r>=1e6&&t?`${(r/1e6).toFixed(2).toString()}M`:r>=1e4&&t?`${(r/1e3).toFixed(1).toString()}k`:r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")};function g(e,t={month:"long",day:"numeric",year:"numeric"}){return e.toDate().toLocaleDateString(void 0,t)}function p(e,t=!1){const r=Number(e);return r>=1e6&&t?`$${(r/1e6).toFixed(2).toString()}M`:r>=1e4&&t?`$${(r/1e3).toFixed(2).toString()}k`:`$${r.toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}`}const l=(e,t=2)=>{if(e===0)return"0 Bytes";const r=1024,i=t<0?0:t,o=["Bytes","KiB","MiB","GiB"],n=Math.floor(Math.log(e)/Math.log(r));return`${parseFloat((e/Math.pow(r,n)).toFixed(i))} ${o[n]}`},a=e=>e&&e.charAt(0).toUpperCase()+e.slice(1),h=e=>e==="paypal"?"PayPal":a(e),N=e=>e==="resourcepack"?"Resource Pack":e==="datapack"?"Data Pack":a(e),m=e=>e==="modloader"?"Risugami's ModLoader":e==="bungeecord"?"BungeeCord":e==="liteloader"?"LiteLoader":e==="neoforge"?"NeoForge":e==="game-mechanics"?"Game Mechanics":e==="worldgen"?"World Generation":e==="core-shaders"?"Core Shaders":e==="gui"?"GUI":e==="8x-"?"8x or lower":e==="512x+"?"512x or higher":e==="kitchen-sink"?"Kitchen Sink":e==="path-tracing"?"Path Tracing":e==="pbr"?"PBR":e==="datapack"?"Data Pack":e==="colored-lighting"?"Colored Lighting":e==="optifine"?"OptiFine":e==="bta-babric"?"BTA (Babric)":e==="legacy-fabric"?"Legacy Fabric":e==="java-agent"?"Java Agent":e==="nilloader"?"NilLoader":e==="mrpack"?"Modpack":e==="minecraft"?"Resource Pack":e==="vanilla"?"Vanilla Shader":a(e),x=e=>a(e),k=e=>e==="approved"?"Public":e==="processing"?"Under review":a(e),S=(e,t)=>{const{maxSize:r,alertOnInvalid:i}=t;return r!=null&&e.size>r?(i&&alert(`File ${e.name} is too big! Must be less than ${l(r)}`),!1):!0},B=(e,t)=>(e.sort((r,i)=>{for(const o of t){const n=parseFloat(r[o]),u=parseFloat(i[o]);if(isNaN(n)&&isNaN(u)){const s=r[o].localeCompare(i[o]);if(s!=0)return s}else if(!isNaN(n)&&!isNaN(u)){const s=n-u;if(s!=0)return s}else{const s=isNaN(n)?1:-1;if(s!=0)return s}}return 0}),e);function C(e){return e<120?5:e<200?4:e<300?3:e<400?2:1}export{m as a,N as b,k as c,x as d,l as e,d as f,S as g,a as h,p as i,g as j,h as k,C as l,B as m,f as s};