1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4583],{34583:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(95155),a=r(12115),u=r(45911),i=r(29722),o=r(68966),c=r(48384),s=r(86119),l=r(67568),f=r.n(l);function d(e){var t;let r,l,d,p,m,h,y,w,v,g,x,A,b,_=(0,a.useRef)(null),E=(0,a.useRef)(null),j=(0,a.useRef)(null),N=(0,c.A)(),R=(0,s.A)(E,{root:null,rootMargin:"150px 0px 0px 0px",threshold:.1});t=e.activeElement,r=(0,a.useRef)(u.Ay.timeline()),l=(0,a.useRef)(null),d=(0,a.useRef)({width:200,height:100,ratio:1}),p=(0,a.useRef)([]),m=(0,a.useRef)({opacity:0}),h=u.Ay.utils.random(0,200,1,!0),y=u.Ay.utils.random(100,110,1,!0),w=u.Ay.utils.random(.1,5,.01,!0),v=a.useMemo(()=>["#fffe66","#f0ef00","#f6f5b9","#fffb00","#d3d212"],[]),g=u.Ay.utils.random(0,v.length-1,1,!0),x=a.useCallback(()=>{if(!(0,o.a4)(j.current))return;let e=Math.min(2,window.devicePixelRatio);d.current.ratio=e,j.current.width=d.current.width*e,j.current.height=d.current.height*e,j.current.style.width="200px",j.current.style.height="100px",l.current=j.current.getContext("2d"),l.current?.scale(e,e)},[j]),A=a.useCallback((e,t,r)=>{if(!e||!t)return;e.clearRect(0,0,t.width,t.height),e.globalCompositeOperation="source-over",e.shadowColor="#f6f5b9",e.shadowBlur=2,e.shadowOffsetX=0,e.shadowOffsetY=0;for(let t=0,n=r.length;t<n;t++)e.fillStyle=r[t].color,e.beginPath(),e.arc(r[t].x,r[t].y,r[t].r,0,2*Math.PI),e.fill();e.shadowColor="#ffff",e.shadowBlur=30,e.fillStyle=`rgba(255, 255, 255, ${m.current.opacity})`,e.beginPath(),e.moveTo(100,0),e.lineTo(0,100),e.lineTo(160,100),e.fill(),e.globalCompositeOperation="destination-in";let n=e.createLinearGradient(0,70,0,d.current.height);n.addColorStop(0,"black"),n.addColorStop(1,"transparent"),e.fillStyle=n,e.beginPath(),e.rect(0,0,200,100),e.fill()},[l.current,j.current,p.current]),b=a.useCallback(()=>{p.current=[{x:0,y:0,r:0,color:"#f0ef00"}];for(let e=0;e<250;e++){let e={x:h(),y:y(),r:w(),color:v[g()]};p.current.push(e)}},[v,g,w,h,y]),(0,a.useEffect)(()=>{if(null!=j.current&&((0,o.a4)(r.current)&&r.current.revert(),r.current=u.Ay.timeline({paused:!0,repeat:-1,onUpdate:()=>{A(l.current,j.current,p.current)}}),b(),x(),null!=p.current))return r.current.to(p.current,{y:-5,x:d.current.width/2-1,r:.5,duration:.7,stagger:.004,ease:"power2.in"},"in"),()=>{null!=r.current&&r.current.kill()}},[j,A,x,b]),(0,a.useEffect)(()=>{if((0,o.a4)(t))r.current?.timeScale(1).play(0),u.Ay.fromTo(m.current,{opacity:0},{opacity:.08,duration:.23,overwrite:!0});else{if(null==r.current)return;r.current.seek(0).pause(),A(l.current,j.current,p.current),u.Ay.to(m.current,{opacity:0,duration:.6,delay:.3,onUpdate:()=>{A(l.current,j.current,p.current)}})}},[t,j,A]);let k=(0,a.useRef)(u.Ay.timeline({paused:!1,yoyo:!0,repeat:-1}
1)),C=(0,a.useRef)(u.Ay.timeline({paused:!1,repeat:-1})),O=u.Ay.utils.random(-50,50,10,!0),W=e=>e>window.innerWidth/2-300&&e<window.innerWidth/2+100?-20:e<window.innerWidth/2?5:e>window.innerWidth/2?-30:0;return(0,a.useEffect)(()=>{if((0,o.a4)(e.activeElement)&&(0,o.a4)(e.activeElement.current)&&(0,o.a4)(_.current)){let t=e.activeElement.current.getBoundingClientRect();u.Ay.to(E.current,{x:Number(t.left)+Number(t.width)/2-O(),y:Math.min(e.activeElement.current.offsetTop+t.top-t.y-150,_.current.offsetHeight),rotate:W(t.x),overwrite:!0,ease:"back.inOut(1)",duration:.34}),u.Ay.to(j.current,{rotate:-W(t.x),duration:.4})}else u.Ay.to(E.current,{delay:.01,x:Math.max(0,window.innerWidth/2-600),y:-120,rotate:0,duration:3,ease:"back.inOut(5)"})},[e.activeElement]),(0,a.useEffect)(()=>{let e=u.Ay.utils.selector(E);return k.current=u.Ay.timeline({paused:!1,yoyo:!0,repeat:-1}),C.current=u.Ay.timeline({paused:!1,repeat:-1,repeatDelay:.5,yoyo:!1,ease:"power1.inOut"}),C.current.fromTo(e(".js-lamp"),{opacity:0},{opacity:1,stagger:.5,duration:.1}),C.current.to(e(".js-lamp"),{opacity:0,stagger:.5,duration:.1},"-=0.5"),C.current.timeScale(4),k.current?.fromTo(e(".js-ufo"),{y:-5},{y:5,duration:.5,ease:"power1.in",yoyoEase:"power1.inOut"}),()=>{C?.current?.revert(),k.current?.revert()}},[]),(0,a.useEffect)(()=>{null!=R&&R.intersectionRatio<1?(C?.current?.pause(),k.current?.pause()):(C?.current?.play(),k.current?.play())},[R]),(0,a.useEffect)(()=>{(0,o.a4)(e.activeElement)||u.Ay.to(E.current,{x:Math.max(0,window.innerWidth/2-600),y:-120,rotate:0,duration:3,ease:"back.inOut(5)"})},[N]),(0,n.jsx)("div",{className:f().wrapper,ref:_,children:(0,n.jsx)("div",{ref:E,className:f().ufoWrapper,children:(0,n.jsxs)("div",{className:(0,i.A)(f().ufo,"js-ufo"),children:[(0,n.jsx)("img",{className:e.className,src:e.customUFOImage?e.customUFOImage:"/decorations/mentos/unique/ufo.png",alt:"decoration",width:"212px",height:"130px"}),(0,n.jsxs)("div",{className:f().ufoLamps,children:[(0,n.jsx)("div",{className:(0,i.A)(f().ufoLamp,"js-lamp")}),(0,n.jsx)("div",{className:(0,i.A)(f().ufoLamp,"js-lamp")}),(0,n.jsx)("div",{className:(0,i.A)(f().ufoLamp,"js-lamp")})]}),(0,n.jsx)("div",{className:f().beam,children:(0,n.jsx)("canvas",{className:f().canvas,ref:j})})]})})})}},48384:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(12115);let a=function(e){(0,n.useEffect)(e,[])},u=function(e){var t=(0,n.useRef)(e);t.current=e,a(function(){return function(){return t.current()}})},i=function(e){var t=(0,n.useRef)(0),r=(0,n.useState)(e),a=r[0],i=r[1],o=(0,n.useCallback)(function(e){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(e)})},[]);return u(function(){cancelAnimationFrame(t.current)}),[a,o]};var o=r(30412);let c=function(e,t){void 0===e&&(e=1/0),void 0===t&&(t=1/0);var r=i({width:o.Bd?window.innerWidth:e,height:o.Bd?window.innerHeight:t}),a=r[0],u=r[1];return(0,n.useEffect)(function(){if(o.Bd){var e=function(){u({width:window.innerWidth,height:window.innerHeight})};return(0,o.on)(window,"resize",e),function(){(0,o.AU)(window,"resize",e)}}},[]),a}},67568:e=>{e.exports={wrapper:"styles_wrapper__dM0J0",ufoWrapper:"styles_ufoWrapper__ObN5W",ufo:"styles_ufo__rMx3X",ufoLamps:"styles_ufoLamps__BV_Oq",ufoLamp:"styles_ufoLamp__hQ0Z8",canvas:"styles_canvas__nLp9X"}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.