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