Module 348858

1,024 characters · in d81cf62d3772c525.js
Dependencies
Required by (2)
Lazily required by (0)none
Requires (3)
Lazily requires (1)
Source Raw
function(e,t,n){n.d(t,{I:()=>a});var i=n(627968),l=n(64700),s=n(744682);let r={deafen:{name:"deafen",start:0,duration:70},undeafen:{name:"undeafen",start:110,duration:70},hover_undeafened:{name:"hover_undeafened",start:200,duration:70},hover_deafened:{name:"hover_deafened",start:300,duration:70}},a=e=>{let t=l.useRef(null),a=l.useRef(e);a.current=e;let o=l.useMemo(()=>()=>{null!=t.current&&t.current.play(e)},[e]),u=l.useCallback(()=>{if(null==t.current)return;let n="deafen"===e?"hover_undeafened":"hover_deafened";t.current.play(n)},[e]),d=l.useCallback(()=>{if(null==t.current)return;let n="deafen"===e?"hover_undeafened":"hover_deafened";t.current.stopIfPlaying(n)},[e]),c=l.useCallback(e=>(0,i.jsx)(s.P,{...e,src:()=>n.e("93768").then(n.t.bind(n,894619,19)),ref:t,initialAnimation:a.current,markers:r}),[]);return{events:{onClick:o,onMouseEnter:u,onMouseLeave:d},play:o,getDuration:l.useCallback(()=>t.current?.getDuration(),[]),getCurrentFrame:l.useCallback(()=>t.current?.getCurrentFrame()??null,[]),Component:c}}}