(()=>{function t(t){this.maxFlake=(t=t||{}).maxFlake||10,this.flakeSize=t.flakeSize||10,this.fallSpeed=t.fallSpeed||1}const s=DreamConfig.effects_snowflake_mode;let n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){setTimeout(t,1e3/60)};function h(t,e,i,a){this.x=Math.floor(Math.random()*t),this.y=Math.floor(Math.random()*e),this.size=Math.random()*i+2,this.maxSize=i,this.speed=+Math.random()+a,this.fallSpeed=a,this.velY=this.speed,this.velX=0,this.stepSize=Math.random()/30,this.step=0}function o(){var t=document.documentElement.classList.contains("night");if("all"===s||"day"===s&&!t||"night"===s&&t){var e=this.maxFlake,i=this.flakes;ctx=this.ctx,canvas=this.canvas,ctx.clearRect(0,0,canvas.width,canvas.height);for(var a=0;a=canvas.width||this.x<=0||this.y>=canvas.height||this.y<=0)&&this.reset(canvas.width,canvas.height)},h.prototype.reset=function(t,e){this.x=Math.floor(Math.random()*t),this.y=0,this.size=Math.random()*this.maxSize+2,this.speed=+Math.random()+this.fallSpeed,this.velY=this.speed,this.velX=0},h.prototype.render=function(t){var e=t.createRadialGradient(this.x,this.y,0,this.x,this.y,this.size);e.addColorStop(0,"rgba(255, 255, 255, 0.9)"),e.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),e.addColorStop(1,"rgba(255, 255, 255, 0)"),t.save(),t.fillStyle=e,t.beginPath(),t.arc(this.x,this.y,this.size,0,2*Math.PI),t.fill(),t.restore()},new t({maxFlake:150}).start()})();