var P=Object.defineProperty;var S=(i,e)=>P(i,"name",{value:e,configurable:!0});import{q as V,ac as N,G as B,w as I}from"./vendor-primevue-B6rcS73U.js";import{dm as x,Z as M,bk as A,$ as T,dn as E,a6 as F,bn as R,dp as D}from"./index-2-qFLlQP.js";import{bx as $,c as n,d as t,F as _,y as b,e as r,u as m,E as p,q as C,z as g,by as c,j as v,k as y,A as U,s as z}from"./vendor-other-CSX7WseZ.js";import{d as O}from"./vendor-vue-CXt3ZZQ3.js";import"./vendor-xterm-CWYFmgbN.js";import"./vendor-three-BKWXAgVe.js";import"./vendor-tiptap-BkFTmTb3.js";const j={class:"grid grid-cols-2 gap-2"},q={class:"font-medium"},k=$({__name:"DeviceInfo",props:{device:{}},setup(i){const e=i,u=[{field:"name",header:"Name"},{field:"type",header:"Type"},{field:"vram_total",header:"VRAM Total"},{field:"vram_free",header:"VRAM Free"},{field:"torch_vram_total",header:"Torch VRAM Total"},{field:"torch_vram_free",header:"Torch VRAM Free"}],a=S((l,s)=>["vram_total","vram_free","torch_vram_total","torch_vram_free"].includes(s)?x(l):l,"formatValue");return(l,s)=>(t(),n("div",j,[(t(),n(_,null,b(u,f=>(t(),n(_,{key:f.field},[r("div",q,m(f.header),1),r("div",null,m(a(e.device[f.field],f.field)),1)],64))),64))]))}}),w={class:"system-stats"},L={class:"mb-6"},G={class:"mb-4 text-2xl font-semibold"},H={class:"grid grid-cols-2 gap-2"},Z={class:"font-medium"},J={class:"mb-4 text-2xl font-semibold"},K=$({__name:"SystemStatsPanel",props:{stats:{}},setup(i){const e=i,u=p(()=>({...e.stats.system,argv:e.stats.system.argv.join(" ")})),a=p(()=>e.stats.devices.length>0),l=[{field:"os",header:"OS"},{field:"python_version",header:"Python Version"},{field:"embedded_python",header:"Embedded Python"},{field:"pytorch_version",header:"Pytorch Version"},{field:"argv",header:"Arguments"},{field:"ram_total",header:"RAM Total",formatNumber:x},{field:"ram_free",header:"RAM Free",formatNumber:x}],s=p(()=>l),f=S(o=>{const h=u.value[o.field];return o.formatNumber&&typeof h=="number"?o.formatNumber(h):o.format&&typeof h=="string"?o.format(h):h},"getDisplayValue");return(o,h)=>(t(),n("div",w,[r("div",L,[r("h2",G,m(o.$t("g.systemInfo")),1),r("div",H,[(t(!0),n(_,null,b(s.value,d=>(t(),n(_,{key:d.field},[r("div",Z,m(d.header),1),r("div",null,m(f(d)),1)],64))),128))])]),a.value?(t(),n(_,{key:0},[g(c(V)),r("div",null,[r("h2",J,m(o.$t("g.devices")),1),e.stats.devices.length>1?(t(),v(c(N),{key:0},{default:y(()=>[(t(!0),n(_,null,b(e.stats.devices,d=>(t(),v(c(B),{key:d.index,header:d.name,value:d.index},{default:y(()=>[g(k,{device:d},null,8,["device"])]),_:2},1032,["header","value"]))),128))]),_:1})):(t(),v(k,{key:1,device:e.stats.devices[0]},null,8,["device"]))])],64)):C("",!0)]))}}),Q=O("aboutPanel",()=>{const i="1.37.3",e=M(),u=A(),{staticUrls:a}=T(),l=p(()=>u?.systemStats?.system?.comfyui_version??""),s=p(()=>[{label:`ComfyUI ${F()?"v"+R().getComfyUIVersion():E(l.value)}`,url:a.github,icon:"pi pi-github"},{label:`ComfyUI_frontend v${i}`,url:a.githubFrontend,icon:"pi pi-github"},{label:"Discord",url:a.discord,icon:"pi pi-discord"},{label:"ComfyOrg",url:a.comfyOrg,icon:"pi pi-globe"}]);return{badges:p(()=>[...s.value,...e.extensions.flatMap(o=>o.aboutPageBadges??[])])}}),W={class:"mb-2 text-2xl font-bold"},X={class:"space-y-2"},Y=["href","title"],le=$({__name:"AboutPanel",setup(i){const e=A(),u=Q();return(a,l)=>(t(),v(D,{value:"About",class:"about-container"},{default:y(()=>[r("h2",W,m(a.$t("g.about")),1),r("div",X,[(t(!0),n(_,null,b(c(u).badges,s=>(t(),n("a",{key:s.url,href:s.url,target:"_blank",rel:"noopener noreferrer",class:"about-badge inline-flex items-center no-underline",title:s.url},[g(c(I),{class:"mr-2"},{icon:y(()=>[r("i",{class:z([s.icon,"mr-2 text-xl"])},null,2)]),default:y(()=>[U(" "+m(s.label),1)]),_:2},1024)],8,Y))),128))]),g(c(V)),c(e).systemStats?(t(),v(K,{key:0,stats:c(e).systemStats},null,8,["stats"])):C("",!0)]),_:1}))}});export{le as default};
//# sourceMappingURL=AboutPanel-6wNn9DuA.js.map
