import{bF as _,bG as q,bt as G,bH as B,r as h,bI as I,E as N,bJ as Q,j as U,bK as V,bL as X,bM as A}from"./index-60a3c753.js";function tt(s){var f;const{elementType:y,externalSlotProps:x,ownerState:l,skipResolvingSlotProps:R=!1,...d}=s,o=R?{}:_(x,l),{props:p,internalRef:g}=q({...d,externalSlotProps:o}),b=G(g,o==null?void 0:o.ref,(f=s.additionalProps)==null?void 0:f.ref);return B(y,{...p,ref:b},l)}function w(s){return`scale(${s}, ${s**2})`}const Y={entering:{opacity:1,transform:w(1)},entered:{opacity:1,transform:"none"}},P=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),j=h.forwardRef(function(y,x){const{addEndListener:l,appear:R=!0,children:d,easing:o,in:p,onEnter:g,onEntered:b,onEntering:v,onExit:f,onExited:H,onExiting:D,style:S,timeout:i="auto",TransitionComponent:F=V,...L}=y,$=I(),T=h.useRef(),a=N(),m=h.useRef(null),C=G(m,Q(d),x),u=t=>r=>{if(t){const n=m.current;r===void 0?t(n):t(n,r)}},K=u(v),k=u((t,r)=>{X(t);const{duration:n,delay:E,easing:e}=A({style:S,timeout:i,easing:o},{mode:"enter"});let c;i==="auto"?(c=a.transitions.getAutoHeightDuration(t.clientHeight),T.current=c):c=n,t.style.transition=[a.transitions.create("opacity",{duration:c,delay:E}),a.transitions.create("transform",{duration:P?c:c*.666,delay:E,easing:e})].join(","),g&&g(t,r)}),z=u(b),J=u(D),M=u(t=>{const{duration:r,delay:n,easing:E}=A({style:S,timeout:i,easing:o},{mode:"exit"});let e;i==="auto"?(e=a.transitions.getAutoHeightDuration(t.clientHeight),T.current=e):e=r,t.style.transition=[a.transitions.create("opacity",{duration:e,delay:n}),a.transitions.create("transform",{duration:P?e:e*.666,delay:P?n:n||e*.333,easing:E})].join(","),t.style.opacity=0,t.style.transform=w(.75),f&&f(t)}),O=u(H),W=t=>{i==="auto"&&$.start(T.current||0,t),l&&l(m.current,t)};return U.jsx(F,{appear:R,in:p,nodeRef:m,onEnter:k,onEntered:z,onEntering:K,onExit:M,onExited:O,onExiting:J,addEndListener:W,timeout:i==="auto"?null:i,...L,children:(t,{ownerState:r,...n})=>h.cloneElement(d,{style:{opacity:0,transform:w(.75),visibility:t==="exited"&&!p?"hidden":void 0,...Y[t],...S,...d.props.style},ref:C,...n})})});j&&(j.muiSupportAuto=!0);const nt=j;export{nt as G,tt as u};
