1import{c as I}from"./cn-ikUPuW0X-De5nhjqQ.js";import{r as O,g as J,f as Q}from"./chunk-62JRHF6Z-CiITS9Lr.js";import{j as A,r as Z}from"./jsx-runtime-BJcAWMsb.js";import{c as ee}from"./index-DgsrlLi2.js";import{P as q,f as te,d as re}from"./index-CpFdIny-.js";var T=globalThis?.document?O.useLayoutEffect:()=>{},R="Avatar",[ae]=re(R),[le,X]=ae(R),Y=O.forwardRef((v,S)=>{const{__scopeAvatar:E,...f}=v,[u,l]=O.useState("idle");return A.jsx(le,{scope:E,imageLoadingStatus:u,onImageLoadingStatusChange:l,children:A.jsx(q.span,{...f,ref:S})})});Y.displayName=R;var N="AvatarImage",G=O.forwardRef((v,S)=>{const{__scopeAvatar:E,src:f,onLoadingStatusChange:u=()=>{},...l}=v,a=X(N,E),e=ie(f),c=te(k=>{u(k),a.onImageLoadingStatusChange(k)});return T(()=>{e!=="idle"&&c(e)},[e,c]),e==="loaded"?A.jsx(q.img,{...l,ref:S,src:f}):null});G.displayName=N;var H="AvatarFallback",D=O.forwardRef((v,S)=>{const{__scopeAvatar:E,delayMs:f,...u}=v,l=X(H,E),[a,e]=O.useState(f===void 0);return O.useEffect(()=>{if(f!==void 0){const c=window.setTimeout(()=>e(!0),f);return()=>window.clearTimeout(c)}},[f]),a&&l.imageLoadingStatus!=="loaded"?A.jsx(q.span,{...u,ref:S}):null});D.displayName=H;function ie(v){const[S,E]=O.useState("idle");return T(()=>{if(!v){E("error");return}let f=!0;const u=new window.Image,l=a=>()=>{f&&E(a)};return E("loading"),u.onload=l("loaded"),u.onerror=l("error"),u.src=v,()=>{f=!1}},[v]),S}var ne=Y,ce=G,oe=D,$={exports:{}};(function(v,S){(function(E,f){v.exports=f(Z)})(Q,(function(E){return(function(f){var u={};function l(a){if(u[a])return u[a].exports;var e=u[a]={i:a,l:!1,exports:{}};return f[a].call(e.exports,e,e.exports,l),e.l=!0,e.exports}return l.m=f,l.c=u,l.d=function(a,e,c){l.o(a,e)||Object.defineProperty(a,e,{enumerable:!0,get:c})},l.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},l.t=function(a,e){if(1&e&&(a=l(a)),8&e||4&e&&typeof a=="object"&&a&&a.__esModule)return a;var c=Object.create(null);if(l.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:a}),2&e&&typeof a!="string")for(var k in a)l.d(c,k,(function(_){return a[_]}).bind(null,k));return c},l.n=function(a){var e=a&&a.__esModule?function(){return a.default}:function(){return a};return l.d(e,"a",e),e},l.o=function(a,e){return Object.prototype.hasOwnProperty.call(a,e)},l.p="/",l(l.s=1)})([function(f,u){f.exports=E},function(f,u,l){f.exports=l(2)},function(f,u,l){function a(r,i){if(r==null)return{};var o,p,F=(function(y,t){if(y==null)return{};var s,w,m={},n=Object.keys(y);for(w=0;w<n.length;w++)s=n[w],t.indexOf(s)>=0||(m[s]=y[s]);return m})(r,i);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(r);for(p=0;p<g.length;p++)o=g[p],i.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(r,o)&&(F[o]=r[o])}return F}l.r(u);var e=l(0),c=l.n(e),k=function(r){for(var i=0,o=0;o<r.length;o++)i=(i<<5)-i+r.charCodeAt(o),i&=i;return Math.abs(i)},_=function(r,i){return Math.floor(r/Math.pow(10,i)%10)},z=function(r,i){return!(_(r,i)%2)},b=function(r,i,o){var p=r%i;return o&&_(r,o)%2===0?-p:p},C=function(r,i,o){return i[r%o]},P=function(r){var i=r.name,o=r.colors,p=r.title,F=r.square,g=r.size,y=a(r,["name","colors","title","square","size"]),t=(function(w,m){var n=k(w),d=m&&m.length;return Array.from({length:3},(function(x,h){return{color:C(n+h,m,d),translateX:b(n*(h+1),8,1),translateY:b(n*(h+1),8,2),scale:1.2+b(n*(h+1),4)/10,rotate:b(n*(h+1),360,1)}}))})(i,o),s=e.useId();return e.createElement("svg",Object.assign({viewBox:"0 0 80 80",fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:g,height:g},y),p&&e.createElement("title",null,i),e.createElement("mask",{id:s,maskUnits:"userSpaceOnUse",x:0,y:0,width:80,height:80},e.createElement("rect",{width:80,height:80,rx:F?void 0:160,fill:"#FFFFFF"})),e.createElement("g",{mask:"url(#".concat(s,")")},e.createElement("rect",{width:80,height:80,fill:t[0].color}),e.createElement("path",{filter:"url(#filter_".concat(s,")"),d:"M32.414 59.35L50.376 70.5H72.5v-71H33.728L26.5 13.381l19.057 27.08L32.414 59.35z",f
1ill:t[1].color,transform:"translate("+t[1].translateX+" "+t[1].translateY+") rotate("+t[1].rotate+" 40 40) scale("+t[2].scale+")"}),e.createElement("path",{filter:"url(#filter_".concat(s,")"),style:{mixBlendMode:"overlay"},d:"M22.216 24L0 46.75l14.108 38.129L78 86l-3.081-59.276-22.378 4.005 12.972 20.186-23.35 27.395L22.215 24z",fill:t[2].color,transform:"translate("+t[2].translateX+" "+t[2].translateY+") rotate("+t[2].rotate+" 40 40) scale("+t[2].scale+")"})),e.createElement("defs",null,e.createElement("filter",{id:"filter_".concat(s),filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},e.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),e.createElement("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),e.createElement("feGaussianBlur",{stdDeviation:7,result:"effect1_foregroundBlur"}))))},K={pixel:function(r){var i=r.name,o=r.colors,p=r.title,F=r.square,g=r.size,y=a(r,["name","colors","title","square","size"]),t=(function(w,m){var n=k(w),d=m&&m.length;return Array.from({length:64},(function(x,h){return C(n%(h+1),m,d)}))})(i,o),s=e.useId();return e.createElement("svg",Object.assign({viewBox:"0 0 80 80",fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:g,height:g},y),p&&e.createElement("title",null,i),e.createElement("mask",{id:s,"mask-type":"alpha",maskUnits:"userSpaceOnUse",x:0,y:0,width:80,height:80},e.createElement("rect",{width:80,height:80,rx:F?void 0:160,fill:"#FFFFFF"})),e.createElement("g",{mask:"url(#".concat(s,")")},e.createElement("rect",{width:10,height:10,fill:t[0]}),e.createElement("rect",{x:20,width:10,height:10,fill:t[1]}),e.createElement("rect",{x:40,width:10,height:10,fill:t[2]}),e.createElement("rect",{x:60,width:10,height:10,fill:t[3]}),e.createElement("rect",{x:10,width:10,height:10,fill:t[4]}),e.createElement("rect",{x:30,width:10,height:10,fill:t[5]}),e.createElement("rect",{x:50,width:10,height:10,fill:t[6]}),e.createElement("rect",{x:70,width:10,height:10,fill:t[7]}),e.createElement("rect",{y:10,width:10,height:10,fill:t[8]}),e.createElement("rect",{y:20,width:10,height:10,fill:t[9]}),e.createElement("rect",{y:30,width:10,height:10,fill:t[10]}),e.createElement("rect",{y:40,width:10,height:10,fill:t[11]}),e.createElement("rect",{y:50,width:10,height:10,fill:t[12]}),e.createElement("rect",{y:60,width:10,height:10,fill:t[13]}),e.createElement("rect",{y:70,width:10,height:10,fill:t[14]}),e.createElement("rect",{x:20,y:10,width:10,height:10,fill:t[15]}),e.createElement("rect",{x:20,y:20,width:10,height:10,fill:t[16]}),e.createElement("rect",{x:20,y:30,width:10,height:10,fill:t[17]}),e.createElement("rect",{x:20,y:40,width:10,height:10,fill:t[18]}),e.createElement("rect",{x:20,y:50,width:10,height:10,fill:t[19]}),e.createElement("rect",{x:20,y:60,width:10,height:10,fill:t[20]}),e.createElement("rect",{x:20,y:70,width:10,height:10,fill:t[21]}),e.createElement("rect",{x:40,y:10,width:10,height:10,fill:t[22]}),e.createElement("rect",{x:40,y:20,width:10,height:10,fill:t[23]}),e.createElement("rect",{x:40,y:30,width:10,height:10,fill:t[24]}),e.createElement("rect",{x:40,y:40,width:10,height:10,fill:t[25]}),e.createElement("rect",{x:40,y:50,width:10,height:10,fill:t[26]}),e.createElement("rect",{x:40,y:60,width:10,height:10,fill:t[27]}),e.createElement("rect",{x:40,y:70,width:10,height:10,fill:t[28]}),e.createElement("rect",{x:60,y:10,width:10,height:10,fill:t[29]}),e.createElement("rect",{x:60,y:20,width:10,height:10,fill:t[30]}),e.createElement("rect",{x:60,y:30,width:10,height:10,fill:t[31]}),e.createElement("rect",{x:60,y:40,width:10,height:10,fill:t[32]}),e.createElement("rect",{x:60,y:50,width:10,height:10,fill:t[33]}),e.createElement("rect",{x:60,y:60,width:10,height:10,fill:t[34]}),e.createElement("rect",{x:60,y:70,width:10,height:10,fill:t[35]}),e.createElement("rect",{x:10,y:10,width:10,height:10,fill:t[36]}),e.createElement("rect",{x:10,y:20,width:10,height:10,fill:t[37]}),e.createElement("rect",{x:10,y:30,width:10,height:10,fill:t[38]}),e.createElement("rect",{x:10,y:40,width:10,height:10,fill:t[39]}),e.createElement("rect",{x:10,y:50,width:10,height:10,fill:t[40]}),e.createElement("rect",{x:10,y:60,width:10,height:10,fill:t[41]}),e.createElement("rect",{x:10,y:70,width:10,height:10,fill:t[42]}),e.createElement("rect",{x:30,y:10,width:10,height:10,fill:t[43]}),e.createElement("rect",{x:30,y:20,width:10,height:10,fill:t[44]}),e.createElement("rect",{x:30,y:30,width:10,height:10,fill:t[45]}),e.createElement("rect",{x:30,y:40,width:10,height:10,fill:t[46]}),e.createElement("rect",{x:30,y:50,width:10,height:10,fill:t[47]}),e.createElement("rect",{x:30,y:60,width:10,height:10,fill:t[48]}),e.createElement("rect",{x:30,y:70,width:10,height:10,fill:t[49]}),e.createElement("rect",{x:50,y:10,width:10,height:10,fill:t[50]}),e.createElement("rect",{x:50,y:20,width:10,height:10,fill:t[51]}),e.createElement("rect",{x:50,y:30,width:10,height:10,fill:t[52]}),e.createElement("rect",{x:50,y:40,width:10,height:10,fill:t[53]}
1),e.createElement("rect",{x:50,y:50,width:10,height:10,fill:t[54]}),e.createElement("rect",{x:50,y:60,width:10,height:10,fill:t[55]}),e.createElement("rect",{x:50,y:70,width:10,height:10,fill:t[56]}),e.createElement("rect",{x:70,y:10,width:10,height:10,fill:t[57]}),e.createElement("rect",{x:70,y:20,width:10,height:10,fill:t[58]}),e.createElement("rect",{x:70,y:30,width:10,height:10,fill:t[59]}),e.createElement("rect",{x:70,y:40,width:10,height:10,fill:t[60]}),e.createElement("rect",{x:70,y:50,width:10,height:10,fill:t[61]}),e.createElement("rect",{x:70,y:60,width:10,height:10,fill:t[62]}),e.createElement("rect",{x:70,y:70,width:10,height:10,fill:t[63]})))},bauhaus:function(r){var i=r.name,o=r.colors,p=r.title,F=r.square,g=r.size,y=a(r,["name","colors","title","square","size"]),t=(function(w,m){var n=k(w),d=m&&m.length;return Array.from({length:4},(function(x,h){return{color:C(n+h,m,d),translateX:b(n*(h+1),40-(h+17),1),translateY:b(n*(h+1),40-(h+17),2),rotate:b(n*(h+1),360),isSquare:z(n,2)}}))})(i,o),s=e.useId();return e.createElement("svg",Object.assign({viewBox:"0 0 80 80",fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:g,height:g},y),p&&e.createElement("title",null,i),e.createElement("mask",{id:s,maskUnits:"userSpaceOnUse",x:0,y:0,width:80,height:80},e.createElement("rect",{width:80,height:80,rx:F?void 0:160,fill:"#FFFFFF"})),e.createElement("g",{mask:"url(#".concat(s,")")},e.createElement("rect",{width:80,height:80,fill:t[0].color}),e.createElement("rect",{x:10,y:30,width:80,height:t[1].isSquare?80:10,fill:t[1].color,transform:"translate("+t[1].translateX+" "+t[1].translateY+") rotate("+t[1].rotate+" 40 40)"}),e.createElement("circle",{cx:40,cy:40,fill:t[2].color,r:16,transform:"translate("+t[2].translateX+" "+t[2].translateY+")"}),e.createElement("line",{x1:0,y1:40,x2:80,y2:40,strokeWidth:2,stroke:t[3].color,transform:"translate("+t[3].translateX+" "+t[3].translateY+") rotate("+t[3].rotate+" 40 40)"})))},ring:function(r){var i=r.name,o=r.colors,p=r.title,F=r.square,g=r.size,y=a(r,["name","colors","title","square","size"]),t=(function(w,m){var n=k(m),d=w&&w.length,x=Array.from({length:5},(function(j,M){return C(n+M,w,d)})),h=[];return h[0]=x[0],h[1]=x[1],h[2]=x[1],h[3]=x[2],h[4]=x[2],h[5]=x[3],h[6]=x[3],h[7]=x[0],h[8]=x[4],h})(o,i),s=c.a.useId();return c.a.createElement("svg",Object.assign({viewBox:"0 0 90 90",fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:g,height:g},y),p&&c.a.createElement("title",null,i),c.a.createElement("mask",{id:s,maskUnits:"userSpaceOnUse",x:0,y:0,width:90,height:90},c.a.createElement("rect",{width:90,height:90,rx:F?void 0:180,fill:"#FFFFFF"})),c.a.createElement("g",{mask:"url(#".concat(s,")")},c.a.createElement("path",{d:"M0 0h90v45H0z",fill:t[0]}),c.a.createElement("path",{d:"M0 45h90v45H0z",fill:t[1]}),c.a.createElement("path",{d:"M83 45a38 38 0 00-76 0h76z",fill:t[2]}),c.a.createElement("path",{d:"M83 45a38 38 0 01-76 0h76z",fill:t[3]}),c.a.createElement("path",{d:"M77 45a32 32 0 10-64 0h64z",fill:t[4]}),c.a.createElement("path",{d:"M77 45a32 32 0 11-64 0h64z",fill:t[5]}),c.a.createElement("path",{d:"M71 45a26 26 0 00-52 0h52z",fill:t[6]}),c.a.createElement("path",{d:"M71 45a26 26 0 01-52 0h52z",fill:t[7]}),c.a.createElement("circle",{cx:45,cy:45,r:23,fill:t[8]})))},beam:function(r){var i=r.name,o=r.colors,p=r.title,F=r.square,g=r.size,y=a(r,["name","colors","title","square","size"]),t=(function(w,m){var n,d=k(w),x=m&&m.length,h=C(d,m,x),j=b(d,10,1),M=j<5?j+4:j,L=b(d,10,2),B=L<5?L+4:L;return{wrapperColor:h,faceColor:(n=h,n.slice(0,1)==="#"&&(n=n.slice(1)),(299*parseInt(n.substr(0,2),16)+587*parseInt(n.substr(2,2),16)+114*parseInt(n.substr(4,2),16))/1e3>=128?"#000000":"#FFFFFF"),backgroundColor:C(d+13,m,x),wrapperTranslateX:M,wrapperTranslateY:B,wrapperRotate:b(d,360),wrapperScale:1+b(d,3)/10,isMouthOpen:z(d,2),isCircle:z(d,1),eyeSpread:b(d,5),mouthSpread:b(d,3),faceRotate:b(d,10,3),faceTranslateX:M>6?M/2:b(d,8,1),faceTranslateY:B>6?B/2:b(d,7,2)}})(i,o),s=e.useId();return e.createElement("svg",Object.assign({viewBox:"0 0 36 36",fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:g,height:g},y),p&&e.createElement("title",null,i),e.createElement("mask",{id:s,maskUnits:"userSpaceOnUse",x:0,y:0,width:36,height:36},e.createElement("rect",{width:36,height:36,rx:F?void 0:72,fill:"#FFFFFF"})),e.createElement("g",{mask:"url(#".concat(s,")")},e.createElement("rect",{width:36,height:36,fill:t.backgroundColor}),e.createElement("rect",{x:"0",y:"0",width:36,height:36,transform:"translate("+t.wrapperTranslateX+" "+t.wrapperTranslateY+") rotate("+t.wrapperRotate+" 18 18) scale("+t.wrapperScale+")",fill:t.wrapperColor,rx:t.isCircle?36:6}),e.createElement("g",{transform:"translate("+t.faceTranslateX+" "+t.faceTranslateY+") rotate("+t.faceRotate
1+" 18 18)"},t.isMouthOpen?e.createElement("path",{d:"M15 "+(19+t.mouthSpread)+"c2 1 4 1 6 0",stroke:t.faceColor,fill:"none",strokeLinecap:"round"}):e.createElement("path",{d:"M13,"+(19+t.mouthSpread)+" a1,0.75 0 0,0 10,0",fill:t.faceColor}),e.createElement("rect",{x:14-t.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:t.faceColor}),e.createElement("rect",{x:20+t.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:t.faceColor}))))},sunset:function(r){var i=r.name,o=r.colors,p=r.title,F=r.square,g=r.size,y=a(r,["name","colors","title","square","size"]),t=(function(m,n){var d=k(m),x=n&&n.length;return Array.from({length:4},(function(h,j){return C(d+j,n,x)}))})(i,o),s=i.replace(/\s/g,""),w=e.useId();return e.createElement("svg",Object.assign({viewBox:"0 0 80 80",fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:g,height:g},y),p&&e.createElement("title",null,i),e.createElement("mask",{id:w,maskUnits:"userSpaceOnUse",x:0,y:0,width:80,height:80},e.createElement("rect",{width:80,height:80,rx:F?void 0:160,fill:"#FFFFFF"})),e.createElement("g",{mask:"url(#".concat(w,")")},e.createElement("path",{fill:"url(#gradient_paint0_linear_"+s+")",d:"M0 0h80v40H0z"}),e.createElement("path",{fill:"url(#gradient_paint1_linear_"+s+")",d:"M0 40h80v40H0z"})),e.createElement("defs",null,e.createElement("linearGradient",{id:"gradient_paint0_linear_"+s,x1:40,y1:0,x2:40,y2:40,gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:t[0]}),e.createElement("stop",{offset:1,stopColor:t[1]})),e.createElement("linearGradient",{id:"gradient_paint1_linear_"+s,x1:40,y1:40,x2:40,y2:80,gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:t[2]}),e.createElement("stop",{offset:1,stopColor:t[3]}))))},marble:P},V={geometric:"beam",abstract:"bauhaus"},W=function(r){var i=r.variant,o=i===void 0?"marble":i,p=r.colors,F=p===void 0?["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"]:p,g=r.name,y=g===void 0?"Clara Barton":g,t=r.title,s=t!==void 0&&t,w=r.size,m=r.square,n=m!==void 0&&m,d=a(r,["variant","colors","name","title","size","square"]),x=K[V[o]||o]||P;return c.a.createElement(x,Object.assign({colors:F,name:y,title:s,size:w,square:n},d))};u.default=W}])}))})($);var se=$.exports;const U=J(se),he=typeof U.default<"u"?U.default:U;function fe(v,S){if(S)return S;const E=v.trim().replace(/\s+/g," ").split(" ");return E.length?E.length===1?E[0].slice(0,2).toUpperCase():E.slice(0,2).map(f=>f.charAt(0).toUpperCase()).join(""):""}const me=O.forwardRef(({className:v,fallbackDelayMs:S,fallbackType:E="avatar",initials:f,name:u="Avatar",size:l="md",src:a,...e},c)=>A.jsxs(ne,{ref:c,className:I("relative flex shrink-0 flex-center overflow-hidden rounded-full after:pointer-events-none after:absolute after:inset-0 after:rounded-full after:ring-1 after:ring-primary-transparent after:ring-offset-0 after:ring-inset [&>svg>g>g>:is(rect,path)]:fill-black [&>svg>g>g>:is(rect,path)]:stroke-black",{"size-4":l==="sm","size-6":l==="md","size-8":l==="lg","size-14":l==="xl","bg-primary":E==="initials"&&!a},v),"data-size":l,...e,children:[A.jsx(ce,{alt:u,className:I("aspect-square size-full",v),src:a}),A.jsx(oe,{asChild:!0,className:I("flex size-full flex-center",v),delayMs:S,children:E==="avatar"?A.jsx(he,{colors:["rgb(var(--illustration-main-40))","rgb(var(--illustration-main-50))","rgb(var(--illustration-main-60))","rgb(var(--illustration-main-70))","rgb(var(--illustration-main-80))","rgb(var(--illustration-main-90))","rgb(var(--illustration-main-100))","rgb(var(--illustration-main-110))"],name:u,size:l==="xl"?56:l==="lg"?32:l==="sm"?16:24,variant:"beam"}):A.jsx("span",{className:I("font-semibold text-secondary",{"scale-50":l==="sm","scale-90":l==="md","text-h6":ee(l,"sm","md"),"text-p2":l==="lg","text-p1":l==="xl"}),children:fe(u,f)})})]}));me.displayName="Avatar";export{me as A};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.