import{t as e}from"./jsx-runtime-wTfS3W87.js";var t=e(),n={idle:`待开始`,running:`运行中`,partial:`分段输出中`,done:`已完成`,failed:`失败`,cancelled:`已取消`};function r({state:e,progress:r}){let i=Number.isFinite(Number(r))?Math.max(0,Math.min(100,Math.round(Number(r||0)))):0;return(0,t.jsxs)(`div`,{className:`he-runstate`,children:[(0,t.jsx)(`span`,{className:[`he-runstate-badge`,`s-${e}`].join(` `),children:n[e]||`待开始`}),e===`running`||e===`partial`?(0,t.jsxs)(`span`,{className:`he-runstate-meta`,children:[i,`%`]}):null]})}export{r as t};