"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[2284],{2284:(t,s,e)=>{e.d(s,{loadPerlinNoisePath:()=>l});var i=e(9201);class o{constructor(t,s,e){this.x=t,this.y=s,this.z=e}dot2(t,s){return this.x*t+this.y*s}dot3(t,s,e){return this.dot2(t,s)+this.z*e}}class n{constructor(){this._grad3=[new o(1,1,0),new o(-1,1,0),new o(1,-1,0),new o(-1,-1,0),new o(1,0,1),new o(-1,0,1),new o(1,0,-1),new o(-1,0,-1),new o(0,1,1),new o(0,-1,1),new o(0,1,-1),new o(0,-1,-1)],this._p=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],this._gradP=new Array(512),this._perm=new Array(512)}noise2d(t,s){const{_gradP:e,_perm:i}=this;let o=Math.floor(t),n=Math.floor(s);t-=o,s-=n,o&=255,n&=255;const r=e[o+i[n]].dot2(t,s),h=e[o+i[n+1]].dot2(t,s-1),a=e[o+1+i[n]].dot2(t-1,s),l=e[o+1+i[n+1]].dot2(t-1,s-1),d=this._fade(t);return this._lerp(this._lerp(r,a,d),this._lerp(h,l,d),this._fade(s))}noise3d(t,s,e){const{_gradP:i,_perm:o}=this;let n=Math.floor(t),r=Math.floor(s),h=Math.floor(e);t-=n,s-=r,e-=h,n&=255,r&=255,h&=255;const a=i[n+o[r+o[h]]].dot3(t,s,e),l=i[n+o[r+o[h+1]]].dot3(t,s,e-1),d=i[n+o[r+1+o[h]]].dot3(t,s-1,e),c=i[n+o[r+1+o[h+1]]].dot3(t,s-1,e-1),f=i[n+1+o[r+o[h]]].dot3(t-1,s,e),p=i[n+1+o[r+o[h+1]]].dot3(t-1,s,e-1),_=i[n+1+o[r+1+o[h]]].dot3(t-1,s-1,e),w=i[n+1+o[r+1+o[h+1]]].dot3(t-1,s-1,e-1),g=this._fade(t),u=this._fade(s),m=this._fade(e);return this._lerp(this._lerp(this._lerp(a,f,g),this._lerp(l,p,g),m),this._lerp(this._lerp(d,_,g),this._lerp(c,w,g),m),u)}seed(t){const{_grad3:s,_gradP:e,_perm:i,_p:o}=this;let n=t;n>0&&n<1&&(n*=65536),n=Math.floor(n),n<256&&(n|=n<<8);for(let t=0;t<256;t++){const r=1&t?o[t]^255&n:o[t]^n>>8&255;i[t]=i[t+256]=r,e[t]=e[t+256]=s[r%12]}}_fade(t){return t*t*t*(t*(6*t-15)+10)}_lerp(t,s,e){return(1-e)*t+e*s}}const r={draw:!1,size:20,increment:.004,columns:0,rows:0,width:0,height:0,factor:{angle:.02,length:.01},offset:{x:4e4,y:4e4}};class h{constructor(){this._calculateField=()=>{const{field:t,noiseGen:s,options:e}=this,i=e.factor.length,o=e.factor.angle;for(let n=0;n<e.columns;n++){const r=t[n];for(let t=0;t<e.rows;t++){const h=r[t];h.length=s.noise3d(n*i+e.offset.x,t*i+e.offset.y,this.noiseZ),h.angle=s.noise3d(n*o,t*o,this.noiseZ)*Math.PI*2}}},this._drawField=t=>{const{field:s,options:e}=this;for(let i=0;i<e.columns;i++){const o=s[i];for(let s=0;s<e.rows;s++){const e=o[s],{angle:n,length:r}=e;t.setTransform(1,0,0,1,i*this.options.size,s*this.options.size),t.rotate(n),t.strokeStyle="white",t.beginPath(),t.moveTo(0,0),t.lineTo(0,this.options.size*r),t.stroke(),t.setTransform(1,0,0,1,0,0)}}},this._initField=()=>{const{columns:t,rows:s}=this.options;this.field=new Array(t);for(let e=0;e<t;e++){this.field[e]=new Array(s);for(let t=0;t<s;t++)this.field[e][t]=i.OW.origin}},this.noiseGen=new n,this.field=[],this.noiseZ=0,this.options=(0,i.ZB)({},r)}generate(t){const s=t.getPosition(),{size:e}=this.options,o=Math.max(Math.floor(s.x/e),0),n=Math.max(Math.floor(s.y/e),0),{field:r}=this;return r&&r[o]&&r[o][n]?r[o][n].copy():i.OW.origin}init(t){this.container=t,this._setup()}reset(){}update(){this.container&&(this._calculateField(),this.noiseZ+=this.options.increment,this.options.draw&&this.container.canvas.draw((t=>this._drawField(t))))}_resetField(){const t=this.container;if(!t)return;const s=t.actualOptions.particles.move.path.options,{options:e}=this;e.size=s.size>0?s.size:r.size,e.increment=s.increment>0?s.increment:r.increment,e.draw=!!s.draw;const o=s.offset;e.offset.x=o?.x??r.offset.x,e.offset.y=o?.y??r.offset.y;const n=s.factor;e.factor.angle=n?.angle??r.factor.angle,e.factor.length=n?.length??r.factor.length,e.width=t.canvas.size.width,e.height=t.canvas.size.height,this.options.seed=s.seed,this.noiseGen.seed(this.options.seed??(0,i.sZ)()),e.columns=Math.floor(this.options.width/this.options.size)+1,e.rows=Math.floor(this.options.height/this.options.size)+1,this._initField()}_setup(){this.noiseZ=0,this._resetField(),window.addEventListener("resize",(()=>this._resetField()))}}const a="perlinNoise";async function l(t,s=!0){await t.addPathGenerator(a,new h,s)}}}]);