import{r as c,H as D,d8 as F,dc as H,j as $,dB as q,dC as A,dD as x}from"./index-c3f592b2.js";const G={entering:{transform:"none"},entered:{transform:"none"}},J=c.forwardRef(function(h,p){const o=D(),g={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:l,appear:R=!0,children:s,easing:f,in:E,onEnter:m,onEntered:y,onEntering:T,onExit:u,onExited:w,onExiting:P,style:a,timeout:d=g,TransitionComponent:Z=q,...j}=h,i=c.useRef(null),C=F(i,H(s),p),r=n=>t=>{if(n){const e=i.current;t===void 0?n(e):n(e,t)}},L=r(T),S=r((n,t)=>{A(n);const e=x({style:a,timeout:d,easing:f},{mode:"enter"});n.style.webkitTransition=o.transitions.create("transform",e),n.style.transition=o.transitions.create("transform",e),m&&m(n,t)}),k=r(y),v=r(P),b=r(n=>{const t=x({style:a,timeout:d,easing:f},{mode:"exit"});n.style.webkitTransition=o.transitions.create("transform",t),n.style.transition=o.transitions.create("transform",t),u&&u(n)}),z=r(w),B=n=>{l&&l(i.current,n)};return $.jsx(Z,{appear:R,in:E,nodeRef:i,onEnter:S,onEntered:k,onEntering:L,onExit:b,onExited:z,onExiting:v,addEndListener:B,timeout:d,...j,children:(n,{ownerState:t,...e})=>c.cloneElement(s,{style:{transform:"scale(0)",visibility:n==="exited"&&!E?"hidden":void 0,...G[n],...a,...s.props.style},ref:C,...e})})}),N=J;export{N as Z};
