1import{n as e,t}from"./rolldown-runtime-C_Wo6T2N.js";import{n}from"./carousel-UiQ6QiIh.js";import{bt as r,ft as i,ht as a,xt as o}from"./radix-overlays-DjJXZ2rJ.js";import{t as s}from"./utils-m4alnODA.js";import{n as c}from"./dist-BdVpDRd7.js";var l=e(n(),1),u=e(r(),1);function d(e,t=[]){let n=[];function r(t,r){let i=l.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=l.useMemo(()=>o,Object.values(o));return(0,u.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=l.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>l.createContext(e));return function(n){let r=n?.[e]||t;return l.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,f(i,...t)]}function f(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}o();var p=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=c(`Primitive.${t}`),r=l.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,u.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),m=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),h=t(((e,t)=>{t.exports=m()})),g=h();function _(){return(0,g.useSyncExternalStore)(v,()=>!0,()=>!1)}function v(){return()=>{}}var y=`Avatar`,[b,x]=d(y),[S,C]=b(y),w=l.forwardRef((e,t)=>{let{__scopeAvatar:n,...r}=e,[i,a]=l.useState(`idle`);return(0,u.jsx)(S,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:(0,u.jsx)(p.span,{...r,ref:t})})});w.displayName=y;var T=`AvatarImage`,E=l.forwardRef((e,t)=>{let{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,c=C(T,n),l=A(r,s),d=i(e=>{o(e),c.onImageLoadingStatusChange(e)});return a(()=>{l!==`idle`&&d(l)},[l,d]),l===`loaded`?(0,u.jsx)(p.img,{...s,ref:t,src:r}):null});E.displayName=T;var D=`AvatarFallback`,O=l.forwardRef((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,a=C(D,n),[o,s]=l.useState(r===void 0);return l.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,u.jsx)(p.span,{...i,ref:t}):null});O.displayName=D;function k(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?`loaded`:`loading`):`error`:`idle`}function A(e,{referrerPolicy:t,crossOrigin:n}){let r=_(),i=l.useRef(null),o=(()=>r?(i.current||=new window.Image,i.current):null)(),[s,c]=l.useState(()=>k(o,e));return a(()=>{c(k(o,e))},[o,e]),a(()=>{let e=e=>()=>{c(e)};if(!o)return;let r=e(`loaded`),i=e(`error`);return o.addEventListener(`load`,r),o.addEventListener(`error`,i),t&&(o.referrerPolicy=t),typeof n==`string`&&(o.crossOrigin=n),()=>{o.removeEventListener(`load`,r),o.removeEventListener(`error`,i)}},[o,n,t]),s}var j=w;function M({className:e,...t}){return(0,u.jsx)(j,{"data-slot":`avatar`,className:s(`relative flex size-8 shrink-0 overflow-hidden rounded-full`,e),...t})}function N({className:e,src:t,srcSet:n,sizes:r,alt:i,...a}){let[o,c]=l.useState(!1);return l.useEffect(()=>{c(!1)},[t]),!t||o?null:(0,u.jsx)(`img`,{"data-slot":`avatar-image`,src:t,srcSet:n,sizes:r,alt:i,loading:`lazy`,decoding:`async`,className:s(`aspect-square size-full object-cover relative z-10`,e),onError:()=>c(!0),...a})}function P({className:e,...t}){return(0,u.jsx)(`span`,{"data-slot":`avatar-fallback`,className:s(`bg-muted flex size-full items-center justify-center rounded-full absolute inset-0`,e),...t})}export{h as i,P as n,N as r,M as t};
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.