import{ag as s,r as a,c as t,a4 as r,aN as p,aL as e,a3 as g,aW as n}from"./vendor-BXdGExd0.js";const c=["src"],d=s({__name:"Avatar",props:{src:{},size:{},round:{type:Boolean,default:!0},bg:{default:"#6b7280"}},setup(s){const d=s,v=a(!1),o=Object.assign({"../assets/avatars/1.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-DD1c7VIz.png","../assets/avatars/10.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-Cb0P1JDS.png","../assets/avatars/11.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-Dgbohfn-.png","../assets/avatars/12.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-DT7kbua6.png","../assets/avatars/13.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-DV_35Uij.png","../assets/avatars/14.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-DplQBHwi.png","../assets/avatars/15.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-Dxw17drK.png","../assets/avatars/16.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-BWrFNGG9.png","../assets/avatars/17.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-CzA1lvxp.png","../assets/avatars/18.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-CS0cquyX.png","../assets/avatars/19.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-kC98y4Z8.png","../assets/avatars/2.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-CE_Cd1r3.png","../assets/avatars/20.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-BSPOm01p.png","../assets/avatars/3.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-B723UZFT.png","../assets/avatars/4.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-oDgedg2u.png","../assets/avatars/5.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-BjXUEEA5.png","../assets/avatars/6.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-SoJjIIaL.png","../assets/avatars/7.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-CeJoEjhR.png","../assets/avatars/8.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-CQ0VJkvY.png","../assets/avatars/9.png":"https://ggjs.bdrcp.cn/pwa/1.0.1/assets/verdor-D6YFcE_g.png"}),h=t(()=>{if(!d.src)return"";const s=String(d.src);return s.startsWith("http")?s:o[`../assets/avatars/${s}.png`]}),b=t(()=>{if(!d.size)return{width:"100%",height:"100%"};const s="number"==typeof d.size?`${d.size}px`:d.size;return{width:s,height:s}});function j(){v.value=!0}return(a,t)=>(n(),r("div",{class:e(["overflow-hidden shrink-0 flex items-center justify-center",s.round?"rounded-full":""]),style:p([b.value,{background:s.bg}])},[h.value&&!v.value?(n(),r("img",{key:0,src:h.value,class:"w-full h-full object-cover",onError:j},null,40,c)):g("",!0)],6))}});export{d as _};
