import{W as y,V as w,c as R,_,b as o,s as S,d as U,f as $,ai as u,aj as b}from"./OdysseyThemeProvider-Bh0Bu-2o.js";import{r as j}from"./index-NdkWRN8K.js";import{j as M}from"./jsx-runtime-CnH95YSl.js";import{a as A}from"./colorManipulator-DKifQsuo.js";function X(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function N(t){return parseFloat(t)}function W(t){return w("MuiSkeleton",t)}const T=y("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]),B=["animation","className","component","height","style","variant","width"];let r=t=>t,p,m,f,g;const E=t=>{const{classes:a,variant:e,animation:i,hasChildren:s,width:l,height:n}=t;return $({root:["root",e,i,s&&"withChildren",s&&!l&&"fitContent",s&&!n&&"heightAuto"]},W,a)},F=b(p||(p=r`
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }

  100% {
    opacity: 1;
  }
`)),K=b(m||(m=r`
  0% {
    transform: translateX(-100%);
  }

  50% {
    /* +0.5s of delay between each loop */
    transform: translateX(100%);
  }

  100% {
    transform: translateX(100%);
  }
`)),P=S("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:e}=t;return[a.root,a[e.variant],e.animation!==!1&&a[e.animation],e.hasChildren&&a.withChildren,e.hasChildren&&!e.width&&a.fitContent,e.hasChildren&&!e.height&&a.heightAuto]}})(({theme:t,ownerState:a})=>{const e=X(t.shape.borderRadius)||"px",i=N(t.shape.borderRadius);return o({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:A(t.palette.text.primary,t.palette.mode==="light"?.11:.13),height:"1.2em"},a.variant==="text"&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${i}${e}/${Math.round(i/.6*10)/10}${e}`,"&:empty:before":{content:'"\\00a0"'}},a.variant==="circular"&&{borderRadius:"50%"},a.variant==="rounded"&&{borderRadius:(t.vars||t).shape.borderRadius},a.hasChildren&&{"& > *":{visibility:"hidden"}},a.hasChildren&&!a.width&&{maxWidth:"fit-content"},a.hasChildren&&!a.height&&{height:"auto"})},({ownerState:t})=>t.animation==="pulse"&&u(f||(f=r`
      animation: ${0} 2s ease-in-out 0.5s infinite;
    `),F),({ownerState:t,theme:a})=>t.animation==="wave"&&u(g||(g=r`
      position: relative;
      overflow: hidden;

      /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
      -webkit-mask-image: -webkit-radial-gradient(white, black);

      &::after {
        animation: ${0} 2s linear 0.5s infinite;
        background: linear-gradient(
          90deg,
          transparent,
          ${0},
          transparent
        );
        content: '';
        position: absolute;
        transform: translateX(-100%); /* Avoid flash during server-side hydration */
        bottom: 0;
        left: 0;
        right: 0;
        top: 0;
      }
    `),K,(a.vars||a).palette.action.hover)),q=j.forwardRef(function(a,e){const i=R({props:a,name:"MuiSkeleton"}),{animation:s="pulse",className:l,component:n="span",height:d,style:v,variant:C="text",width:k}=i,h=_(i,B),c=o({},i,{animation:s,component:n,variant:C,hasChildren:!!h.children}),x=E(c);return M.jsx(P,o({as:n,ref:e,className:U(x.root,l),ownerState:c},h,{style:o({width:k,height:d},v)}))});export{q as S,T as s};
