"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[2428],{52705:(e,r,t)=>{t.d(r,{Z:()=>b});var a=t(55559),o=t(30984),s=t(66204),l=t(56317),n=t(58029),c=t(61125),i=t(57369),u=t(50968),d=t(43188);const v=(0,u.Z)((0,d.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");var f=t(8568);const g=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],m=(0,c.ZP)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,r[t.variant],t.colorDefault&&r.colorDefault]}})((({theme:e,ownerState:r})=>(0,o.Z)({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},"rounded"===r.variant&&{borderRadius:(e.vars||e).shape.borderRadius},"square"===r.variant&&{borderRadius:0},r.colorDefault&&(0,o.Z)({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[600]})))),h=(0,c.ZP)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,r)=>r.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),p=(0,c.ZP)(v,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,r)=>r.fallback})({width:"75%",height:"75%"}),b=s.forwardRef((function(e,r){const t=(0,i.Z)({props:e,name:"MuiAvatar"}),{alt:c,children:u,className:v,component:b="div",imgProps:Z,sizes:w,src:k,srcSet:S,variant:y="circular"}=t,R=(0,a.Z)(t,g);let x=null;const A=function({crossOrigin:e,referrerPolicy:r,src:t,srcSet:a}){const[o,l]=s.useState(!1);return s.useEffect((()=>{if(!t&&!a)return;l(!1);let o=!0;const s=new Image;return s.onload=()=>{o&&l("loaded")},s.onerror=()=>{o&&l("error")},s.crossOrigin=e,s.referrerPolicy=r,s.src=t,a&&(s.srcset=a),()=>{o=!1}}),[e,r,t,a]),o}((0,o.Z)({},Z,{src:k,srcSet:S})),j=k||S,P=j&&"error"!==A,C=(0,o.Z)({},t,{colorDefault:!P,component:b,variant:y}),D=(e=>{const{classes:r,variant:t,colorDefault:a}=e,o={root:["root",t,a&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,n.Z)(o,f.$,r)})(C);return x=P?(0,d.jsx)(h,(0,o.Z)({alt:c,srcSet:S,src:k,sizes:w,ownerState:C,className:D.img},Z)):null!=u?u:j&&c?c[0]:(0,d.jsx)(p,{ownerState:C,className:D.fallback}),(0,d.jsx)(m,(0,o.Z)({as:b,ownerState:C,className:(0,l.Z)(D.root,v),ref:r},R,{children:x}))}))},8568:(e,r,t)=>{t.d(r,{$:()=>s,Z:()=>l});var a=t(58109),o=t(95201);function s(e){return(0,o.Z)("MuiAvatar",e)}const l=(0,a.Z)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"])},42428:(e,r,t)=>{t.r(r),t.d(r,{avatarClasses:()=>o.Z,default:()=>a.Z,getAvatarUtilityClass:()=>o.$});var a=t(52705),o=t(8568)}}]);
//# sourceMappingURL=2428.2e70a54d.chunk.js.map