module.exports=[894461,a=>{"use strict";var b=a.i(187924),c=a.i(572131);let d=a=>[(a>>16&255)/255,(a>>8&255)/255,(255&a)/255];["SCREEN","LINEAR_LIGHT"].reduce((a,b,c)=>Object.assign(a,{[b]:c}),{});class e{constructor(a,b,c,d=!1){const e=this,f=-1!==document.location.search.toLowerCase().indexOf("debug=webgl");e.canvas=a,e.gl=e.canvas.getContext("webgl",{antialias:!0}),e.meshes=[];const g=e.gl;b&&c&&this.setSize(b,c),e.lastDebugMsg,e.debug=d&&f?function(a){let b=new Date;b-e.lastDebugMsg>1e3&&console.log("---"),console.log(`${b.toLocaleTimeString()+Array(Math.max(0,32-a.length)).join(" ")+a}: `,...Array.from(arguments).slice(1)),e.lastDebugMsg=b}:()=>{},Object.defineProperties(e,{Material:{enumerable:!1,value:class{constructor(a,b,c={}){const d=(a,b)=>{let c=g.createShader(a);return g.shaderSource(c,b),g.compileShader(c),g.getShaderParameter(c,g.COMPILE_STATUS)||console.error(g.getShaderInfoLog(c)),e.debug("Material.compileShaderSource",{source:b}),c},f=(a,b)=>Object.entries(a).map(([a,c])=>c.getDeclaration(a,b)).join("\n");this.uniforms=c,this.uniformInstances=[];const h="\n              precision highp float;\n            ";this.vertexSource=`
              ${h}
              attribute vec4 position;
              attribute vec2 uv;
              attribute vec2 uvNorm;
              ${f(e.commonUniforms,"vertex")}
              ${f(c,"vertex")}
              ${a}
            `,this.Source=`
              ${h}
              ${f(e.commonUniforms,"fragment")}
              ${f(c,"fragment")}
              ${b}
            `,this.vertexShader=d(g.VERTEX_SHADER,this.vertexSource),this.fragmentShader=d(g.FRAGMENT_SHADER,this.Source),this.program=g.createProgram(),g.attachShader(this.program,this.vertexShader),g.attachShader(this.program,this.fragmentShader),g.linkProgram(this.program),g.getProgramParameter(this.program,g.LINK_STATUS)||console.error(g.getProgramInfoLog(this.program)),g.useProgram(this.program),this.attachUniforms(void 0,e.commonUniforms),this.attachUniforms(void 0,this.uniforms)}attachUniforms(a,b){let c=this;void 0===a?Object.entries(b).forEach(([a,b])=>{c.attachUniforms(a,b)}):"array"==b.type?b.value.forEach((b,d)=>c.attachUniforms(`${a}[${d}]`,b)):"struct"==b.type?Object.entries(b.value).forEach(([b,d])=>c.attachUniforms(`${a}.${b}`,d)):(e.debug("Material.attachUniforms",{name:a,uniform:b}),c.uniformInstances.push({uniform:b,location:g.getUniformLocation(c.program,a)}))}}},Uniform:{enumerable:!1,value:class{constructor(a){this.type="float",Object.assign(this,a),this.typeFn=({float:"1f",int:"1i",vec2:"2fv",vec3:"3fv",vec4:"4fv",mat4:"Matrix4fv"})[this.type]||"1f",this.update()}update(a){void 0!==this.value&&g[`uniform${this.typeFn}`](a,0===this.typeFn.indexOf("Matrix")?this.transpose:this.value,0===this.typeFn.indexOf("Matrix")?this.value:null)}getDeclaration(a,b,c){if(this.excludeFrom!==b){if("array"===this.type)return`${this.value[0].getDeclaration(a,b,this.value.length)}
const int ${a}_length = ${this.value.length};`;if("struct"===this.type){let d=a.replace("u_","");return d=d.charAt(0).toUpperCase()+d.slice(1),`uniform struct ${d} 
                                  {
${Object.entries(this.value).map(([a,c])=>c.getDeclaration(a,b).replace(/^uniform/,"")).join("")}
} ${a}${c>0?`[${c}]`:""};`}return`uniform ${this.type} ${a}${c>0?`[${c}]`:""};`}}}},PlaneGeometry:{enumerable:!1,value:class{constructor(a,b,c,d,f){g.createBuffer(),this.attributes={position:new e.Attribute({target:g.ARRAY_BUFFER,size:3}),uv:new e.Attribute({target:g.ARRAY_BUFFER,size:2}),uvNorm:new e.Attribute({target:g.ARRAY_BUFFER,size:2}),index:new e.Attribute({target:g.ELEMENT_ARRAY_BUFFER,size:3,type:g.UNSIGNED_SHORT})},this.setTopology(c,d),this.setSize(a,b,f)}setTopology(a=1,b=1){this.xSegCount=a,this.ySegCount=b,this.vertexCount=(this.xSegCount+1)*(this.ySegCount+1),this.quadCount=this.xSegCount*this.ySegCount*2,this.attributes.uv.values=new Float32Array(2*this.vertexCount),this.attributes.uvNorm.values=new Float32Array(2*this.vertexCount),this.attributes.index.values=new Uint16Array(3*this.quadCount);for(let a=0;a<=this.ySegCount;a++)for(let b=0;b<=this.xSegCount;b++){let c=a*(this.xSegCount+1)+b;if(this.attributes.uv.values[2*c]=b/this.xSegCount,this.attributes.uv.values[2*c+1]=1-a/this.ySegCount,this.attributes.uvNorm.values[2*c]=b/this.xSegCount*2-1,this.attributes.uvNorm.values[2*c+1]=1-a/this.ySegCount*2,b<this.xSegCount&&a<this.ySegCount){let d=a*this.xSegCount+b;this.attributes.index.values[6*d]=c,this.attributes.index.values[6*d+1]=c+1+this.xSegCount,this.attributes.index.values[6*d+2]=c+1,this.attributes.index.values[6*d+3]=c+1,this.attributes.index.values[6*d+4]=c+1+this.xSegCount,this.attributes.index.values[6*d+5]=c+2+this.xSegCount}}this.attributes.uv.update(),this.attributes.uvNorm.update(),this.attributes.index.update(),e.debug("Geometry.setTopology",{uv:this.attributes.uv,uvNorm:this.attributes.uvNorm,index:this.attributes.index})}setSize(a=1,b=1,c="xz"){this.width=a,this.height=b,this.orientation=c,this.attributes.position.values&&this.attributes.position.values.length===3*this.vertexCount||(this.attributes.position.values=new Float32Array(3*this.vertexCount));let d=-(a/2),f=-(b/2),g=a/this.xSegCount,h=b/this.ySegCount;for(let a=0;a<=this.ySegCount;a++){let b=f+a*h;for(let e=0;e<=this.xSegCount;e++){let f=d+e*g,h=a*(this.xSegCount+1)+e;this.attributes.position.values[3*h+"xyz".indexOf(c[0])]=f,this.attributes.position.values[3*h+"xyz".indexOf(c[1])]=-b}}this.attributes.position.update(),e.debug("Geometry.setSize",{position:this.attributes.position})}}},Mesh:{enumerable:!1,value:class{constructor(a,b){const c=this;c.geometry=a,c.material=b,c.wireframe=!1,c.attributeInstances=[],Object.entries(c.geometry.attributes).forEach(([a,b])=>{c.attributeInstances.push({attribute:b,location:b.attach(a,c.material.program)})}),e.meshes.push(c),e.debug("Mesh.constructor",{mesh:c})}draw(){g.useProgram(this.material.program),this.material.uniformInstances.forEach(({uniform:a,location:b})=>a.update(b)),this.attributeInstances.forEach(({attribute:a,location:b})=>a.use(b)),g.drawElements(this.wireframe?g.LINES:g.TRIANGLES,this.geometry.attributes.index.values.length,g.UNSIGNED_SHORT,0)}remove(){e.meshes=e.meshes.filter(a=>a!=this)}}},Attribute:{enumerable:!1,value:class{constructor(a){this.type=g.FLOAT,this.normalized=!1,this.buffer=g.createBuffer(),Object.assign(this,a),this.update()}update(){void 0!==this.values&&(g.bindBuffer(this.target,this.buffer),g.bufferData(this.target,this.values,g.STATIC_DRAW))}attach(a,b){let c=g.getAttribLocation(b,a);return this.target===g.ARRAY_BUFFER&&(g.enableVertexAttribArray(c),g.vertexAttribPointer(c,this.size,this.type,this.normalized,0,0)),c}use(a){g.bindBuffer(this.target,this.buffer),this.target===g.ARRAY_BUFFER&&(g.enableVertexAttribArray(a),g.vertexAttribPointer(a,this.size,this.type,this.normalized,0,0))}}}});const h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];e.commonUniforms={projectionMatrix:new e.Uniform({type:"mat4",value:h}),modelViewMatrix:new e.Uniform({type:"mat4",value:h}),resolution:new e.Uniform({type:"vec2",value:[1,1]}),aspectRatio:new e.Uniform({type:"float",value:1})}}setSize(a=640,b=480){this.width=a,this.height=b,this.canvas.width=a,this.canvas.height=b,this.gl.viewport(0,0,a,b),this.commonUniforms.resolution.value=[a,b],this.commonUniforms.aspectRatio.value=a/b,this.debug("MiniGL.setSize",{width:a,height:b})}setOrthographicCamera(a=0,b=0,c=0,d=-2e3,e=2e3){this.commonUniforms.projectionMatrix.value=[2/this.width,0,0,0,0,2/this.height,0,0,0,0,2/(d-e),0,a,b,c,1],this.debug("setOrthographicCamera",this.commonUniforms.projectionMatrix.value)}render(){this.gl.clearColor(0,0,0,0),this.gl.clearDepth(1),this.meshes.forEach(a=>a.draw())}}let f=(a,b,c)=>b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c;class g{constructor(...a){f(this,"el",void 0),f(this,"cssVarRetries",0),f(this,"maxCssVarRetries",200),f(this,"angle",0),f(this,"isLoadedClass",!1),f(this,"isScrolling",!1),f(this,"scrollingTimeout",void 0),f(this,"scrollingRefreshDelay",200),f(this,"isIntersecting",!1),f(this,"shaderFiles",void 0),f(this,"vertexShader",void 0),f(this,"sectionColors",void 0),f(this,"computedCanvasStyle",void 0),f(this,"conf",void 0),f(this,"uniforms",void 0),f(this,"t",1253106),f(this,"last",0),f(this,"width",void 0),f(this,"minWidth",1111),f(this,"height",600),f(this,"xSegCount",void 0),f(this,"ySegCount",void 0),f(this,"mesh",void 0),f(this,"material",void 0),f(this,"geometry",void 0),f(this,"minigl",void 0),f(this,"scrollObserver",void 0),f(this,"amp",320),f(this,"seed",5),f(this,"freqX",14e-5),f(this,"freqY",29e-5),f(this,"freqDelta",1e-5),f(this,"activeColors",[1,1,1,1]),f(this,"isMetaKey",!1),f(this,"isGradientLegendVisible",!1),f(this,"isMouseDown",!1),f(this,"handleScroll",()=>{clearTimeout(this.scrollingTimeout),this.scrollingTimeout=setTimeout(this.handleScrollEnd,this.scrollingRefreshDelay),this.isGradientLegendVisible&&this.hideGradientLegend(),this.conf.playing&&(this.isScrolling=!0,this.pause())}),f(this,"handleScrollEnd",()=>{this.isScrolling=!1,this.isIntersecting&&this.play()}),f(this,"resize",()=>{this.width=window.innerWidth,this.minigl.setSize(this.width,this.height),this.minigl.setOrthographicCamera(),this.xSegCount=Math.ceil(this.width*this.conf.density[0]),this.ySegCount=Math.ceil(this.height*this.conf.density[1]),this.mesh.geometry.setTopology(this.xSegCount,this.ySegCount),this.mesh.geometry.setSize(this.width,this.height),this.mesh.material.uniforms.u_shadow_power.value=this.width<600?5:6}),f(this,"handleMouseDown",a=>{this.isGradientLegendVisible&&(this.isMetaKey=a.metaKey,this.isMouseDown=!0,!1===this.conf.playing&&requestAnimationFrame(this.animate))}),f(this,"handleMouseUp",()=>{this.isMouseDown=!1}),f(this,"animate",a=>{if(!this.shouldSkipFrame(a)||this.isMouseDown){if(this.t+=Math.min(a-this.last,1e3/15),this.last=a,this.isMouseDown){let a=160;this.isMetaKey&&(a=-160),this.t+=a}this.mesh.material.uniforms.u_time.value=this.t,this.minigl.render()}0!==this.last&&this.isStatic?(this.minigl.render(),this.disconnect()):(this.conf.playing||this.isMouseDown)&&requestAnimationFrame(this.animate)}),f(this,"addIsLoadedClass",()=>{this.isLoadedClass||(this.isLoadedClass=!0,this.el.classList.add("isLoaded"),setTimeout(()=>{this.el.parentElement.classList.add("isLoaded")},3e3))}),f(this,"pause",()=>{this.conf.playing=!1}),f(this,"play",()=>{requestAnimationFrame(this.animate),this.conf.playing=!0}),f(this,"initGradient",a=>(this.el=document.querySelector(a),this.connect(),this))}async connect(){this.shaderFiles={vertex:"varying vec3 v_color;\n\nvoid main() {\n  float time = u_time * u_global.noiseSpeed;\n\n  vec2 noiseCoord = resolution * uvNorm * u_global.noiseFreq;\n\n  vec2 st = 1. - uvNorm.xy;\n\n  //\n  // Tilting the plane\n  //\n\n  // Front-to-back tilt\n  float tilt = resolution.y / 2.0 * uvNorm.y;\n\n  // Left-to-right angle\n  float incline = resolution.x * uvNorm.x / 2.0 * u_vertDeform.incline;\n\n  // Up-down shift to offset incline\n  float offset = resolution.x / 2.0 * u_vertDeform.incline * mix(u_vertDeform.offsetBottom, u_vertDeform.offsetTop, uv.y);\n\n  //\n  // Vertex noise\n  //\n\n  float noise = snoise(vec3(\n    noiseCoord.x * u_vertDeform.noiseFreq.x + time * u_vertDeform.noiseFlow,\n    noiseCoord.y * u_vertDeform.noiseFreq.y,\n    time * u_vertDeform.noiseSpeed + u_vertDeform.noiseSeed\n  )) * u_vertDeform.noiseAmp;\n\n  // Fade noise to zero at edges\n  noise *= 1.0 - pow(abs(uvNorm.y), 2.0);\n\n  // Clamp to 0\n  noise = max(0.0, noise);\n\n  vec3 pos = vec3(\n    position.x,\n    position.y + tilt + incline + noise - offset,\n    position.z\n  );\n\n  //\n  // Vertex color, to be passed to fragment shader\n  //\n\n  if (u_active_colors[0] == 1.) {\n    v_color = u_baseColor;\n  }\n\n  for (int i = 0; i < u_waveLayers_length; i++) {\n    if (u_active_colors[i + 1] == 1.) {\n      WaveLayers layer = u_waveLayers[i];\n\n      float noise = smoothstep(\n        layer.noiseFloor,\n        layer.noiseCeil,\n        snoise(vec3(\n          noiseCoord.x * layer.noiseFreq.x + time * layer.noiseFlow,\n          noiseCoord.y * layer.noiseFreq.y,\n          time * layer.noiseSpeed + layer.noiseSeed\n        )) / 2.0 + 0.5\n      );\n\n      v_color = blendNormal(v_color, layer.color, pow(noise, 4.));\n    }\n  }\n\n  //\n  // Finish\n  //\n\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);\n}",noise:"//\n// Ventoo WebGL noise helpers\n// © گروه نرم‌افزاری ونتو | ventoo.ir\n// ونتو جریان هوشمند کسب و کار\n//\n\nvec3 mod289(vec3 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n  return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n    return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n  return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n{\n  const vec2  C = vec2(1.0/6.0, 1.0/3.0) ;\n  const vec4  D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n  vec3 i  = floor(v + dot(v, C.yyy) );\n  vec3 x0 =   v - i + dot(i, C.xxx) ;\n\n// Other corners\n  vec3 g = step(x0.yzx, x0.xyz);\n  vec3 l = 1.0 - g;\n  vec3 i1 = min( g.xyz, l.zxy );\n  vec3 i2 = max( g.xyz, l.zxy );\n\n  //   x0 = x0 - 0.0 + 0.0 * C.xxx;\n  //   x1 = x0 - i1  + 1.0 * C.xxx;\n  //   x2 = x0 - i2  + 2.0 * C.xxx;\n  //   x3 = x0 - 1.0 + 3.0 * C.xxx;\n  vec3 x1 = x0 - i1 + C.xxx;\n  vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n  vec3 x3 = x0 - D.yyy;      // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n  i = mod289(i);\n  vec4 p = permute( permute( permute(\n            i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n          + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n          + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n  float n_ = 0.142857142857; // 1.0/7.0\n  vec3  ns = n_ * D.wyz - D.xzx;\n\n  vec4 j = p - 49.0 * floor(p * ns.z * ns.z);  //  mod(p,7*7)\n\n  vec4 x_ = floor(j * ns.z);\n  vec4 y_ = floor(j - 7.0 * x_ );    // mod(j,N)\n\n  vec4 x = x_ *ns.x + ns.yyyy;\n  vec4 y = y_ *ns.x + ns.yyyy;\n  vec4 h = 1.0 - abs(x) - abs(y);\n\n  vec4 b0 = vec4( x.xy, y.xy );\n  vec4 b1 = vec4( x.zw, y.zw );\n\n  //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n  //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n  vec4 s0 = floor(b0)*2.0 + 1.0;\n  vec4 s1 = floor(b1)*2.0 + 1.0;\n  vec4 sh = -step(h, vec4(0.0));\n\n  vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n  vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n  vec3 p0 = vec3(a0.xy,h.x);\n  vec3 p1 = vec3(a0.zw,h.y);\n  vec3 p2 = vec3(a1.xy,h.z);\n  vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n  vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n  p0 *= norm.x;\n  p1 *= norm.y;\n  p2 *= norm.z;\n  p3 *= norm.w;\n\n// Mix final noise value\n  vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n  m = m * m;\n  return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n                                dot(p2,x2), dot(p3,x3) ) );\n}",blend:"//\n// Ventoo GLSL blend helpers | ventoo.ir\n//\n\n// Normal\n\nvec3 blendNormal(vec3 base, vec3 blend) {\n	return blend;\n}\n\nvec3 blendNormal(vec3 base, vec3 blend, float opacity) {\n	return (blendNormal(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Screen\n\nfloat blendScreen(float base, float blend) {\n	return 1.0-((1.0-base)*(1.0-blend));\n}\n\nvec3 blendScreen(vec3 base, vec3 blend) {\n	return vec3(blendScreen(base.r,blend.r),blendScreen(base.g,blend.g),blendScreen(base.b,blend.b));\n}\n\nvec3 blendScreen(vec3 base, vec3 blend, float opacity) {\n	return (blendScreen(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Multiply\n\nvec3 blendMultiply(vec3 base, vec3 blend) {\n	return base*blend;\n}\n\nvec3 blendMultiply(vec3 base, vec3 blend, float opacity) {\n	return (blendMultiply(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Overlay\n\nfloat blendOverlay(float base, float blend) {\n	return base<0.5?(2.0*base*blend):(1.0-2.0*(1.0-base)*(1.0-blend));\n}\n\nvec3 blendOverlay(vec3 base, vec3 blend) {\n	return vec3(blendOverlay(base.r,blend.r),blendOverlay(base.g,blend.g),blendOverlay(base.b,blend.b));\n}\n\nvec3 blendOverlay(vec3 base, vec3 blend, float opacity) {\n	return (blendOverlay(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Hard light\n\nvec3 blendHardLight(vec3 base, vec3 blend) {\n	return blendOverlay(blend,base);\n}\n\nvec3 blendHardLight(vec3 base, vec3 blend, float opacity) {\n	return (blendHardLight(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Soft light\n\nfloat blendSoftLight(float base, float blend) {\n	return (blend<0.5)?(2.0*base*blend+base*base*(1.0-2.0*blend)):(sqrt(base)*(2.0*blend-1.0)+2.0*base*(1.0-blend));\n}\n\nvec3 blendSoftLight(vec3 base, vec3 blend) {\n	return vec3(blendSoftLight(base.r,blend.r),blendSoftLight(base.g,blend.g),blendSoftLight(base.b,blend.b));\n}\n\nvec3 blendSoftLight(vec3 base, vec3 blend, float opacity) {\n	return (blendSoftLight(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Color dodge\n\nfloat blendColorDodge(float base, float blend) {\n	return (blend==1.0)?blend:min(base/(1.0-blend),1.0);\n}\n\nvec3 blendColorDodge(vec3 base, vec3 blend) {\n	return vec3(blendColorDodge(base.r,blend.r),blendColorDodge(base.g,blend.g),blendColorDodge(base.b,blend.b));\n}\n\nvec3 blendColorDodge(vec3 base, vec3 blend, float opacity) {\n	return (blendColorDodge(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Color burn\n\nfloat blendColorBurn(float base, float blend) {\n	return (blend==0.0)?blend:max((1.0-((1.0-base)/blend)),0.0);\n}\n\nvec3 blendColorBurn(vec3 base, vec3 blend) {\n	return vec3(blendColorBurn(base.r,blend.r),blendColorBurn(base.g,blend.g),blendColorBurn(base.b,blend.b));\n}\n\nvec3 blendColorBurn(vec3 base, vec3 blend, float opacity) {\n	return (blendColorBurn(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Vivid Light\n\nfloat blendVividLight(float base, float blend) {\n	return (blend<0.5)?blendColorBurn(base,(2.0*blend)):blendColorDodge(base,(2.0*(blend-0.5)));\n}\n\nvec3 blendVividLight(vec3 base, vec3 blend) {\n	return vec3(blendVividLight(base.r,blend.r),blendVividLight(base.g,blend.g),blendVividLight(base.b,blend.b));\n}\n\nvec3 blendVividLight(vec3 base, vec3 blend, float opacity) {\n	return (blendVividLight(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Lighten\n\nfloat blendLighten(float base, float blend) {\n	return max(blend,base);\n}\n\nvec3 blendLighten(vec3 base, vec3 blend) {\n	return vec3(blendLighten(base.r,blend.r),blendLighten(base.g,blend.g),blendLighten(base.b,blend.b));\n}\n\nvec3 blendLighten(vec3 base, vec3 blend, float opacity) {\n	return (blendLighten(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Linear burn\n\nfloat blendLinearBurn(float base, float blend) {\n	// Note : Same implementation as BlendSubtractf\n	return max(base+blend-1.0,0.0);\n}\n\nvec3 blendLinearBurn(vec3 base, vec3 blend) {\n	// Note : Same implementation as BlendSubtract\n	return max(base+blend-vec3(1.0),vec3(0.0));\n}\n\nvec3 blendLinearBurn(vec3 base, vec3 blend, float opacity) {\n	return (blendLinearBurn(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Linear dodge\n\nfloat blendLinearDodge(float base, float blend) {\n	// Note : Same implementation as BlendAddf\n	return min(base+blend,1.0);\n}\n\nvec3 blendLinearDodge(vec3 base, vec3 blend) {\n	// Note : Same implementation as BlendAdd\n	return min(base+blend,vec3(1.0));\n}\n\nvec3 blendLinearDodge(vec3 base, vec3 blend, float opacity) {\n	return (blendLinearDodge(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Linear light\n\nfloat blendLinearLight(float base, float blend) {\n	return blend<0.5?blendLinearBurn(base,(2.0*blend)):blendLinearDodge(base,(2.0*(blend-0.5)));\n}\n\nvec3 blendLinearLight(vec3 base, vec3 blend) {\n	return vec3(blendLinearLight(base.r,blend.r),blendLinearLight(base.g,blend.g),blendLinearLight(base.b,blend.b));\n}\n\nvec3 blendLinearLight(vec3 base, vec3 blend, float opacity) {\n	return (blendLinearLight(base, blend) * opacity + base * (1.0 - opacity));\n}",fragment:"varying vec3 v_color;\n\nvoid main() {\n  vec3 color = v_color;\n  if (u_darken_top == 1.0) {\n    vec2 st = gl_FragCoord.xy/resolution.xy;\n    color.g -= pow(st.y + sin(-12.0) * st.x, u_shadow_power) * 0.4;\n  }\n  gl_FragColor = vec4(color, 1.0);\n}"},this.conf={presetName:"",wireframe:!1,density:[.06,.16],zoom:1,rotation:0,playing:!0},document.querySelectorAll("canvas").length<1?console.log("VENTOO_GRADIENT_CANVAS_SKIPPED"):(this.minigl=new e(this.el,null,null,!0),requestAnimationFrame(()=>{this.el&&(this.computedCanvasStyle=getComputedStyle(this.el),this.waitForCssVars())}))}disconnect(){this.scrollObserver&&(window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("mousedown",this.handleMouseDown),window.removeEventListener("mouseup",this.handleMouseUp),window.removeEventListener("keydown",this.handleKeyDown),this.scrollObserver.disconnect()),window.removeEventListener("resize",this.resize)}initMaterial(){this.uniforms={u_time:new this.minigl.Uniform({value:0}),u_shadow_power:new this.minigl.Uniform({value:5}),u_darken_top:new this.minigl.Uniform({value:+(""===this.el.dataset.jsDarkenTop)}),u_active_colors:new this.minigl.Uniform({value:this.activeColors,type:"vec4"}),u_global:new this.minigl.Uniform({value:{noiseFreq:new this.minigl.Uniform({value:[this.freqX,this.freqY],type:"vec2"}),noiseSpeed:new this.minigl.Uniform({value:5e-6})},type:"struct"}),u_vertDeform:new this.minigl.Uniform({value:{incline:new this.minigl.Uniform({value:Math.sin(this.angle)/Math.cos(this.angle)}),offsetTop:new this.minigl.Uniform({value:-.5}),offsetBottom:new this.minigl.Uniform({value:-.5}),noiseFreq:new this.minigl.Uniform({value:[3,4],type:"vec2"}),noiseAmp:new this.minigl.Uniform({value:this.amp}),noiseSpeed:new this.minigl.Uniform({value:10}),noiseFlow:new this.minigl.Uniform({value:3}),noiseSeed:new this.minigl.Uniform({value:this.seed})},type:"struct",excludeFrom:"fragment"}),u_baseColor:new this.minigl.Uniform({value:this.sectionColors[0],type:"vec3",excludeFrom:"fragment"}),u_waveLayers:new this.minigl.Uniform({value:[],excludeFrom:"fragment",type:"array"})};for(let a=1;a<this.sectionColors.length;a+=1)this.uniforms.u_waveLayers.value.push(new this.minigl.Uniform({value:{color:new this.minigl.Uniform({value:this.sectionColors[a],type:"vec3"}),noiseFreq:new this.minigl.Uniform({value:[2+a/this.sectionColors.length,3+a/this.sectionColors.length],type:"vec2"}),noiseSpeed:new this.minigl.Uniform({value:11+.3*a}),noiseFlow:new this.minigl.Uniform({value:6.5+.3*a}),noiseSeed:new this.minigl.Uniform({value:this.seed+10*a}),noiseFloor:new this.minigl.Uniform({value:.1}),noiseCeil:new this.minigl.Uniform({value:.63+.07*a})},type:"struct"}));return this.vertexShader=[this.shaderFiles.noise,this.shaderFiles.blend,this.shaderFiles.vertex].join("\n\n"),new this.minigl.Material(this.vertexShader,this.shaderFiles.fragment,this.uniforms)}initMesh(){this.material=this.initMaterial(),this.geometry=new this.minigl.PlaneGeometry,this.mesh=new this.minigl.Mesh(this.geometry,this.material)}shouldSkipFrame(a){return!!window.document.hidden||!this.conf.playing||parseInt(a,10)%2==0||void 0}updateFrequency(a){this.freqX+=a,this.freqY+=a}toggleColor(a){this.activeColors[a]=+(0===this.activeColors[a])}showGradientLegend(){this.width>this.minWidth&&(this.isGradientLegendVisible=!0,document.body.classList.add("isGradientLegendVisible"))}hideGradientLegend(){this.isGradientLegendVisible=!1,document.body.classList.remove("isGradientLegendVisible")}init(){this.initGradientColors(),this.initMesh(),this.resize(),requestAnimationFrame(this.animate),window.addEventListener("resize",this.resize)}waitForCssVars(){if(this.computedCanvasStyle&&-1!==this.computedCanvasStyle.getPropertyValue("--gradient-color-1").indexOf("#"))this.init(),this.addIsLoadedClass();else{if(this.cssVarRetries+=1,this.cssVarRetries>this.maxCssVarRetries)return this.sectionColors=[0xff0000,0xff0000,0xff00ff,65280,255],void this.init();requestAnimationFrame(()=>this.waitForCssVars())}}initGradientColors(){this.sectionColors=["--gradient-color-1","--gradient-color-2","--gradient-color-3","--gradient-color-4"].map(a=>{let b=this.computedCanvasStyle.getPropertyValue(a).trim();if(4===b.length){let a=b.substr(1).split("").map(a=>a+a).join("");b=`#${a}`}return b&&`0x${b.substr(1)}`}).filter(Boolean).map(d)}}a.s(["Canvas",0,()=>{let a=(0,c.useRef)(null);return(0,c.useEffect)(()=>{new g().initGradient("#gradient-canvas")},[]),(0,b.jsx)("canvas",{id:"gradient-canvas",className:"absolute",ref:a,"data-transition-in":!0})}],894461)}];

//# sourceMappingURL=app_%28store%29_%28booking%29_%28with-footer%29_home-3_components_canvas_canvas_tsx_fe293073._.js.map