import{i as e,n as t}from"./rolldown-runtime-ConPGZeh.js";import{$n as n,C as r,Gn as i,Lr as a,Nn as o,Qn as s,Sr as c,Ut as l,Wt as u,Xn as d,Zn as f,_ as p,er as m,g as h,h as ee,ii as g,ir as _,li as v,oi as te,or as y,rr as ne,v as re,w as ie,wr as b}from"./vendor-primevue-D1-E3-0M.js";import{n as x,r as S}from"./vendor-vue-W0uRz0qB.js";import{_n as ae,hn as C,mn as w,vn as oe,yn as se}from"./api-DvJuMrZn.js";import{M as T,N as ce,P as E,f as D,i as O,j as k,n as le,r as ue,s as A,t as de,y as j}from"./PanelTemplate-CURL0L1Z.js";var M,N,P,F=t((()=>{o(),j(),M={class:`grid grid-cols-2 gap-2`},N={class:`font-medium`},P=y({__name:`DeviceInfo`,props:{device:{}},setup(e){let t=e,n=[{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`}],formatValue=(e,t)=>[`vram_total`,`vram_free`,`torch_vram_total`,`torch_vram_free`].includes(t)?D(e):e;return(e,r)=>(c(),m(`div`,M,[(c(),m(i,null,b(n,e=>(c(),m(i,{key:e.field},[f(`div`,N,v(e.header),1),f(`div`,null,v(formatValue(t.device[e.field],e.field)),1)],64))),64))]))}})})),I,fe=t((()=>{F(),F(),I=P})),L,R,z,B,V,H,U,W=t((()=>{o(),l(),r(),p(),fe(),w(),j(),L={class:`system-stats`},R={class:`mb-6`},z={class:`mb-4 text-2xl font-semibold`},B={class:`grid grid-cols-2 gap-2`},V={class:`font-medium`},H={class:`mb-4 text-2xl font-semibold`},U=y({__name:`SystemStatsPanel`,props:{stats:{}},setup(e){let t=e,r=d(()=>({...t.stats.system,argv:t.stats.system.argv.join(` `)})),o=d(()=>t.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:D},{field:`ram_free`,header:`RAM Free`,formatNumber:D}],p=[{field:`cloud_version`,header:`Cloud Version`},{field:`comfyui_version`,header:`ComfyUI Version`,format:A},{field:`comfyui_frontend_version`,header:`Frontend Version`,format:A},{field:`workflow_templates_version`,header:`Templates Version`}],h=d(()=>C?p:l),getDisplayValue=e=>{let t=r.value[e.field];return e.formatNumber&&typeof t==`number`?e.formatNumber(t):e.format&&typeof t==`string`?e.format(t):t};return(e,r)=>(c(),m(`div`,L,[f(`div`,R,[f(`h2`,z,v(e.$t(`g.systemInfo`)),1),f(`div`,B,[(c(!0),m(i,null,b(h.value,e=>(c(),m(i,{key:e.field},[f(`div`,V,v(e.header),1),f(`div`,null,v(getDisplayValue(e)),1)],64))),128))])]),o.value?(c(),m(i,{key:0},[_(g(u)),f(`div`,null,[f(`h2`,H,v(e.$t(`g.devices`)),1),t.stats.devices.length>1?(c(),s(g(re),{key:0},{default:a(()=>[(c(!0),m(i,null,b(t.stats.devices,e=>(c(),s(g(ie),{key:e.index,header:e.name,value:e.index},{default:a(()=>[_(I,{device:e},null,8,[`device`])]),_:2},1032,[`header`,`value`]))),128))]),_:1})):(c(),s(I,{key:1,device:t.stats.devices[0]},null,8,[`device`]))])],64)):n(``,!0)]))}})})),G,K=t((()=>{W(),W(),G=U})),q,pe=t((()=>{S(),o(),ce(),w(),oe(),j(),ue(),k(),q=x(`aboutPanel`,()=>{let e=O(),t=T(),{staticUrls:n}=E(),r=d(()=>t?.systemStats?.system?.comfyui_version??``),i=d(()=>[{label:`ComfyUI ${se()?`v`+ae().getComfyUIVersion():A(r.value)}`,url:C?n.comfyOrg:n.github,icon:C?`pi pi-cloud`:`pi pi-github`},{label:`ComfyUI_frontend v1.38.8`,url:n.githubFrontend,icon:`pi pi-github`},{label:`Discord`,url:n.discord,icon:`pi pi-discord`},{label:`ComfyOrg`,url:n.comfyOrg,icon:`pi pi-globe`}]);return{badges:d(()=>[...i.value,...e.extensions.flatMap(e=>e.aboutPageBadges??[])])}})})),J,Y,X,Z,Q=t((()=>{o(),l(),ee(),K(),pe(),k(),le(),J={class:`mb-2 text-2xl font-bold`},Y={class:`space-y-2`},X=[`href`,`title`],Z=y({__name:`AboutPanel`,setup(e){let t=T(),r=q();return(e,o)=>(c(),s(de,{value:`About`,class:`about-container`},{default:a(()=>[f(`h2`,J,v(e.$t(`g.about`)),1),f(`div`,Y,[(c(!0),m(i,null,b(g(r).badges,e=>(c(),m(`a`,{key:e.url,href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`about-badge inline-flex items-center no-underline`,title:e.url},[_(g(h),{class:`mr-2`},{icon:a(()=>[f(`i`,{class:te([e.icon,`mr-2 text-xl`])},null,2)]),default:a(()=>[ne(` `+v(e.label),1)]),_:2},1024)],8,X))),128))]),_(g(u)),g(t).systemStats?(c(),s(G,{key:0,stats:g(t).systemStats},null,8,[`stats`])):n(``,!0)]),_:1}))}})})),$;t((()=>{Q(),Q(),$=Z}))();export{$ as default};
//# sourceMappingURL=AboutPanel-DN-D7xN4.js.map