(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[7360],{135800(__unused_webpack_module,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>r});var t=__webpack_require__(380301);var o=__webpack_require__.n(t);var i=__webpack_require__(67659);var e=__webpack_require__(410788);var n=__webpack_require__.n(e);var s=__webpack_require__(517288);__webpack_require__.n(s);var l=__webpack_require__(425855);class r extends i.Component{static propTypes={animationEventEmitter:o().object.isRequired,width:o().string,height:o().string,followMouse:o().bool,lookAtTarget:o().object,lookAtDirection:o().oneOf(["up","down","left","right","middle"])};static defaultProps={width:"200",height:"200",followMouse:!0,lookAtTarget:{},lookAtDirection:null};constructor(t){super(t);let{width:o,height:e,followMouse:r}=t;this.logo=n()({followMouse:r,pxNotRatio:!0,width:o,height:e,meshJson:(0,l.zk)(),verticalFieldOfView:Math.PI/37.5,near:100,far:340}),this.mascotContainer=(0,i.createRef)(),this.refollowMouse=(0,s.debounce)(this.logo.setFollowMouse.bind(this.logo,!0),1e3),this.unfollowMouse=this.logo.setFollowMouse.bind(this.logo,!1)}handleAnimationEvents(){if(this.animations)return;this.animations=this.props.animationEventEmitter,this.animations.on("point",this.lookAt.bind(this)),this.animations.on("setFollowMouse",this.logo.setFollowMouse.bind(this.logo))}lookAt(t){this.unfollowMouse(),this.logo.lookAtAndRender(t),this.refollowMouse()}componentDidMount(){this.mascotContainer.current.appendChild(this.logo.container),this.directionTargetMap=(({top:t,left:o,height:i,width:e})=>{let n=o+e/2;let s=t+i/2;return{up:{x:n,y:t-i},down:{x:n,y:t+i*2},left:{x:o-e,y:s},right:{x:o+e*2,y:s},middle:{x:n,y:s}}})(this.mascotContainer.current.getBoundingClientRect());let{lookAtTarget:t,lookAtDirection:o}=this.props;t?.x&&t?.y?this.logo.lookAtAndRender(t):o&&this.logo.lookAtAndRender(this.directionTargetMap[o])}componentDidUpdate(t){let{lookAtTarget:o={},lookAtDirection:i=null,followMouse:e}=t;let{lookAtTarget:n={},followMouse:s,lookAtDirection:l}=this.props;l&&i!==l?this.logo.lookAtAndRender(this.directionTargetMap[l]):(n?.x!==o?.x||n?.y!==o?.y)&&this.logo.lookAtAndRender(n),e!==s&&(this.unfollowMouse(),s&&this.refollowMouse())}componentWillUnmount(){this.animations=this.props.animationEventEmitter,this.animations.removeAllListeners(),this.logo.container.remove(),this.logo.stopAnimation()}render(){return this.handleAnimationEvents(),i.createElement("div",{ref:this.mascotContainer,style:{zIndex:0}})}}}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()},757360(__unused_webpack_module,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>t.A});var t=__webpack_require__(135800)}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()}}]);