anegis-webflow-new 1.2.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,9 +1,112 @@
1
- "use strict";(()=>{var W=Object.defineProperty;var G=(a,n,e)=>n in a?W(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e;var w=(a,n,e)=>G(a,typeof n!="symbol"?n+"":n,e);var L=(a=document)=>{let n="Last Published:";for(let e of a.childNodes)if(e.nodeType===Node.COMMENT_NODE&&e.textContent?.includes(n)){let t=e.textContent.trim().split(n)[1];if(t)return new Date(t)}};var A=()=>{let a=L();console.log("index.js loaded"),console.log(`Last published: ${a?.toLocaleString("en-US",{year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit"})}`)};var q=(a={pauseOnHover:!1})=>{let n=document.querySelector(".banner_component"),e=document.querySelector(".banner_inner-wrapper"),t=document.querySelector(".banner_marquee");if(!n||!e||!t)return;let s="perfect-marquee-styles";if(!document.getElementById(s)){let o=document.createElement("style");o.id=s;let u=a.pauseOnHover?`
1
+ "use strict";(()=>{var oe=Object.defineProperty;var ne=(d,o,e)=>o in d?oe(d,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[o]=e;var _=(d,o,e)=>ne(d,typeof o!="symbol"?o+"":o,e);var B=(d=document)=>{let o="Last Published:";for(let e of d.childNodes)if(e.nodeType===Node.COMMENT_NODE&&e.textContent?.includes(o)){let t=e.textContent.trim().split(o)[1];if(t)return new Date(t)}};var z=()=>{let d=B();console.log("index.js loaded"),console.log(`Last published: ${d?.toLocaleString("en-US",{year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit"})}`)};function U(d){let o=d.match(/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i);return o?[parseInt(o[1],16)/255,parseInt(o[2],16)/255,parseInt(o[3],16)/255]:null}var re=[.224,.478,.463],ie=[.106,.275,.435],se=[.047,.047,.047],V=()=>{let d=document.querySelector("[data-blob-main]");if(!d)return;d.innerHTML="";let o=d.getAttribute("data-color-1"),e=d.getAttribute("data-color-2"),t=d.getAttribute("data-color-3"),i=d.getAttribute("data-blur")||"1.2rem",r=o&&U(o)||re,n=e&&U(e)||ie,m=t&&U(t)||se,c=document.createElement("canvas");c.style.cssText=`position:absolute;inset:0;width:100%;height:100%;filter:blur(${i});`,d.appendChild(c);let a=document.createElement("canvas");a.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;mix-blend-mode:overlay;",d.appendChild(a);let l=a.getContext("2d"),s=c.getContext("webgl");if(!s){console.error("WebGL not supported");return}let S=`
2
+ attribute vec2 a_position;
3
+ varying vec2 v_uv;
4
+ void main() {
5
+ v_uv = a_position * 0.5 + 0.5;
6
+ gl_Position = vec4(a_position, 0.0, 1.0);
7
+ }
8
+ `,O=`
9
+ precision highp float;
10
+
11
+ varying vec2 v_uv;
12
+ uniform float u_time;
13
+ uniform vec2 u_resolution;
14
+ uniform vec3 u_color1;
15
+ uniform vec3 u_color2;
16
+ uniform vec3 u_colorBg;
17
+
18
+ // Simplex noise functions
19
+ vec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
20
+ vec2 mod289(vec2 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
21
+ vec3 permute(vec3 x) { return mod289(((x*34.0)+1.0)*x); }
22
+
23
+ float snoise(vec2 v) {
24
+ const vec4 C = vec4(0.211324865405187, 0.366025403784439,
25
+ -0.577350269189626, 0.024390243902439);
26
+ vec2 i = floor(v + dot(v, C.yy));
27
+ vec2 x0 = v - i + dot(i, C.xx);
28
+ vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);
29
+ vec4 x12 = x0.xyxy + C.xxzz;
30
+ x12.xy -= i1;
31
+ i = mod289(i);
32
+ vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0)) + i.x + vec3(0.0, i1.x, 1.0));
33
+ vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0);
34
+ m = m*m;
35
+ m = m*m;
36
+ vec3 x = 2.0 * fract(p * C.www) - 1.0;
37
+ vec3 h = abs(x) - 0.5;
38
+ vec3 ox = floor(x + 0.5);
39
+ vec3 a0 = x - ox;
40
+ m *= 1.79284291400159 - 0.85373472095314 * (a0*a0 + h*h);
41
+ vec3 g;
42
+ g.x = a0.x * x0.x + h.x * x0.y;
43
+ g.yz = a0.yz * x12.xz + h.yz * x12.yw;
44
+ return 130.0 * dot(m, g);
45
+ }
46
+
47
+ // Fractal Brownian Motion for richer noise
48
+ float fbm(vec2 p) {
49
+ float value = 0.0;
50
+ float amplitude = 0.5;
51
+ float frequency = 1.0;
52
+ for (int i = 0; i < 4; i++) {
53
+ value += amplitude * snoise(p * frequency);
54
+ amplitude *= 0.5;
55
+ frequency *= 2.0;
56
+ }
57
+ return value;
58
+ }
59
+
60
+ // Film grain
61
+ float grain(vec2 uv, float t) {
62
+ return fract(sin(dot(uv + t, vec2(12.9898, 78.233))) * 43758.5453);
63
+ }
64
+
65
+ void main() {
66
+ vec2 uv = v_uv;
67
+ float time = u_time * 0.25; // Animation speed
68
+
69
+ // --- CENTER the blob in the canvas ---
70
+ vec2 center = vec2(0.5, 0.5);
71
+ vec2 fromCenter = uv - center;
72
+
73
+ // Distance that works for rectangular canvas - use max of abs coords
74
+ // This ensures we reach the edge on ALL sides (not just corners)
75
+ float distX = abs(fromCenter.x) * 2.0; // 0 at center, 1 at left/right edge
76
+ float distY = abs(fromCenter.y) * 2.0; // 0 at center, 1 at top/bottom edge
77
+ float dist = max(distX, distY); // Use maximum - reaches 1.0 at any edge
78
+
79
+ // --- ANIMATED NOISE for organic color morphing ---
80
+ vec2 noiseCoord = uv * 6.0;
81
+ float n1 = fbm(noiseCoord + vec2(time * 0.6, time * 0.4));
82
+ float n2 = fbm(noiseCoord * 0.8 - vec2(time * 0.5, time * -0.3));
83
+ float noise = (n1 + n2) * 0.5;
84
+
85
+ // --- COLOR MIXING: two colors morphing together ---
86
+ float colorMix = noise * 0.75 + 0.5;
87
+ colorMix = smoothstep(0.3, 0.7, colorMix);
88
+ vec3 gradientColor = mix(u_color1, u_color2, colorMix);
89
+
90
+ // --- RADIAL FADE: MUST reach background before canvas edges ---
91
+ float edgeNoise = snoise(uv * 4.0 + time * 0.2) * 0.5;
92
+
93
+ // Fade from center to edges
94
+ float innerRadius = 0.2 + edgeNoise; // Start fading at 20% from center
95
+ float outerRadius = 0.9; // Complete fade at 90% (before edge)
96
+
97
+ float fade = smoothstep(innerRadius, outerRadius, dist);
98
+
99
+ // Apply fade: gradient -> background
100
+ vec3 finalColor = mix(gradientColor, u_colorBg, fade);
101
+
102
+ gl_FragColor = vec4(finalColor, 1.0);
103
+ }
104
+ `;function q(h,x,g){let y=h.createShader(x);return y?(h.shaderSource(y,g),h.compileShader(y),h.getShaderParameter(y,h.COMPILE_STATUS)?y:(console.error("Shader compile error:",h.getShaderInfoLog(y)),h.deleteShader(y),null)):null}let R=q(s,s.VERTEX_SHADER,S),k=q(s,s.FRAGMENT_SHADER,O);if(!R||!k)return;let f=s.createProgram();if(!f)return;if(s.attachShader(f,R),s.attachShader(f,k),s.linkProgram(f),!s.getProgramParameter(f,s.LINK_STATUS)){console.error("Program link error:",s.getProgramInfoLog(f));return}let u=s.createBuffer();s.bindBuffer(s.ARRAY_BUFFER,u),s.bufferData(s.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),s.STATIC_DRAW);let b=s.getAttribLocation(f,"a_position"),M=s.getUniformLocation(f,"u_time"),p=s.getUniformLocation(f,"u_resolution"),L=s.getUniformLocation(f,"u_color1"),E=s.getUniformLocation(f,"u_color2"),w=s.getUniformLocation(f,"u_colorBg");function A(){let h=window.devicePixelRatio||1,x=Math.floor(c.clientWidth*h),g=Math.floor(c.clientHeight*h);(c.width!==x||c.height!==g)&&(c.width=x,c.height=g),(a.width!==x||a.height!==g)&&(a.width=x,a.height=g)}let v,H=performance.now(),P=0,N=12,te=.08,$=4,T=null;function G(){A(),s.viewport(0,0,c.width,c.height),s.useProgram(f);let h=(performance.now()-H)/1e3;s.uniform1f(M,h),s.uniform2f(p,c.width,c.height),s.uniform3f(L,r[0],r[1],r[2]),s.uniform3f(E,n[0],n[1],n[2]),s.uniform3f(w,m[0],m[1],m[2]),s.enableVertexAttribArray(b),s.bindBuffer(s.ARRAY_BUFFER,u),s.vertexAttribPointer(b,2,s.FLOAT,!1,0,0),s.drawArrays(s.TRIANGLES,0,6);let x=performance.now();if(l&&x-P>1e3/N){P=x;let g=Math.ceil(a.width/$),y=Math.ceil(a.height/$);(!T||T.width!==g||T.height!==y)&&(T=l.createImageData(g,y));let{data:I}=T;for(let C=0;C<I.length;C+=4){let F=(Math.random()-.5)*255*te;I[C]=128+F,I[C+1]=128+F,I[C+2]=128+F,I[C+3]=255}l.clearRect(0,0,a.width,a.height),l.imageSmoothingEnabled=!1,l.putImageData(T,0,0),l.drawImage(a,0,0,g,y,0,0,a.width,a.height)}v=requestAnimationFrame(G)}G();let W=new MutationObserver(h=>{for(let x of h)for(let g of x.removedNodes)(g===c||g instanceof Element&&g.contains(c))&&(cancelAnimationFrame(v),W.disconnect())});W.observe(d.parentElement||document.body,{childList:!0,subtree:!0})};var X=(d={pauseOnHover:!1})=>{let o=document.querySelector(".banner_component"),e=document.querySelector(".banner_inner-wrapper"),t=document.querySelector(".banner_marquee");if(!o||!e||!t)return;let i="perfect-marquee-styles";if(!document.getElementById(i)){let n=document.createElement("style");n.id=i;let m=d.pauseOnHover?`
2
105
  /* Pause on hover for better UX (Optional) */
3
106
  .banner_component:hover .banner_marquee {
4
107
  animation-play-state: paused;
5
108
  }
6
- `:"";o.textContent=`
109
+ `:"";n.textContent=`
7
110
  .banner_inner-wrapper {
8
111
  /* Ensure the gap between the original and clone matches the internal grid gap */
9
112
  column-gap: 3rem;
@@ -30,5 +133,5 @@
30
133
  transform: translateX(calc(-100% - 3rem));
31
134
  }
32
135
  }
33
- ${u}
34
- `,document.head.appendChild(o)}if(e.querySelectorAll(".banner_marquee").length===1){let o=t.cloneNode(!0);o.setAttribute("aria-hidden","true"),o.classList.add("is-clone"),e.appendChild(o)}};function k(){let a=document.querySelector("[data-line-scroll] line");if(!a)return;let n=a.closest("svg");n&&gsap.set(n,{attr:{preserveAspectRatio:"none"}}),gsap.to(a,{strokeDashoffset:-16,duration:1,ease:"none",repeat:-1})}function M(){let a=document.querySelectorAll(".layout_card.is-faq"),n=document.querySelectorAll(".about_component-image-outer");gsap.set(".layout-card-bottom",{height:0,overflow:"hidden",display:"block"}),gsap.set(n,{autoAlpha:0,display:"none",width:"100%",height:"100%",objectFit:"cover",position:"absolute",top:0,left:0});let e=document.querySelectorAll(".about_component-image-outer img");gsap.set(e,{width:"100%",height:"100%",objectFit:"cover"});function t(r,o){let u=r.querySelector(".layout-card-bottom"),c=r.querySelector(".layout_action-icon"),l=r.getAttribute("data-card"),i=document.querySelector(`.about_component-image-outer[data-image="${l}"]`);o?(u&&gsap.to(u,{height:"auto",duration:.6,ease:"power3.inOut"}),c&&c.classList.add("is-active"),i?(gsap.set(i,{display:"block",zIndex:2}),gsap.to(i,{autoAlpha:1,duration:.6,ease:"power3.inOut",overwrite:!0})):console.warn(`No image found for Card ID: ${l}`)):(gsap.to(u,{height:0,duration:.6,ease:"power3.inOut"}),c&&c.classList.remove("is-active"),i&&(gsap.set(i,{zIndex:1}),gsap.to(i,{autoAlpha:0,duration:.6,ease:"power3.inOut",onComplete:()=>gsap.set(i,{display:"none"})})))}let s=Array.from(a).find(r=>{let o=r.getAttribute("data-card");return document.querySelector(`.about_component-image-outer[data-image="${o}"]`)});s&&t(s,!0),a.forEach(r=>{let o=r.querySelector(".layout_card-top");o&&o.addEventListener("click",()=>{let u=r.querySelector(".layout-card-bottom"),c=u?gsap.getProperty(u,"height"):0,l=parseFloat(String(c))>0;a.forEach(i=>{i!==r&&t(i,!1)}),l||t(r,!0)})})}function O(){if(!window.matchMedia("(hover: hover) and (pointer: fine)").matches)return;let n=document.querySelectorAll("[data-cursor]"),e=document.getElementById("cursor-hijack"),t=document.getElementById("cursor-trail-canvas"),s=document.getElementById("cursor-trail-path"),r=document.getElementById("trailGradient");if(!e||!t||!s||!n.length)return;if(typeof gsap>"u"){console.warn("GSAP not found");return}gsap.set(s,{opacity:.08});let o={tipOffset:{x:0,y:14},trailOffset:32,positionLerp:.25,maxPoints:50,minDistance:4,trailDecay:.92,rotationLerp:.15,idleSpeedThreshold:.5},u=!1,c={x:0,y:0},l={x:0,y:0},i=[],b=0,g=0;function T(){t&&t.setAttribute("viewBox",`0 0 ${window.innerWidth} ${window.innerHeight}`)}T(),window.addEventListener("resize",T),window.addEventListener("mousemove",d=>{c.x=d.clientX,c.y=d.clientY},{passive:!0});function N(){u=!0,document.body.classList.add("cursor-active"),l.x=c.x,l.y=c.y,i=[];for(let d=0;d<o.maxPoints;d++)i.push({x:c.x,y:c.y});g=0,b=0}function D(){u=!1,document.body.classList.remove("cursor-active")}n.forEach(d=>{d.addEventListener("mouseenter",N),d.addEventListener("mouseleave",D)}),document.querySelectorAll(".button-wrapper").forEach(d=>{d.addEventListener("mouseenter",()=>{document.body.classList.add("cursor-hidden")}),d.addEventListener("mouseleave",()=>{document.body.classList.remove("cursor-hidden")})}),gsap.ticker.add(()=>{if(!u)return;l.x+=(c.x-l.x)*o.positionLerp,l.y+=(c.y-l.y)*o.positionLerp;let d=l.x-i[1].x,f=l.y-i[1].y;Math.hypot(d,f)>o.idleSpeedThreshold&&(b=Math.atan2(f,d)*(180/Math.PI));let p=b-g;p>180&&(p-=360),p<-180&&(p+=360),g+=p*o.rotationLerp;let v=g*Math.PI/180,y=l.x-Math.cos(v)*o.trailOffset,h=l.y-Math.sin(v)*o.trailOffset;i[0].x=y,i[0].y=h;for(let m=1;m<i.length;m++)i[m].x+=(i[m-1].x-i[m].x)*(1-o.trailDecay),i[m].y+=(i[m-1].y-i[m].y)*(1-o.trailDecay);let S=R(i);s&&s.setAttribute("d",S),_(),gsap.set(e,{x:l.x-o.tipOffset.x,y:l.y-o.tipOffset.y,rotation:g+180,transformOrigin:`${o.tipOffset.x}px ${o.tipOffset.y}px`})});function _(){if(!r||i.length<2)return;let d=i[i.length-1],f=i[0];r.setAttribute("x1",String(d.x)),r.setAttribute("y1",String(d.y)),r.setAttribute("x2",String(f.x)),r.setAttribute("y2",String(f.y))}function R(d,f=.5){if(d.length<2)return"";let E=`M ${d[0].x.toFixed(2)} ${d[0].y.toFixed(2)}`;for(let p=0;p<d.length-1;p++){let v=d[Math.max(p-1,0)],y=d[p],h=d[p+1],S=d[Math.min(p+2,d.length-1)],m=y.x+(h.x-v.x)/6*f,F=y.y+(h.y-v.y)/6*f,$=h.x-(S.x-y.x)/6*f,B=h.y-(S.y-y.y)/6*f;E+=` C ${m.toFixed(2)} ${F.toFixed(2)}, ${$.toFixed(2)} ${B.toFixed(2)}, ${h.x.toFixed(2)} ${h.y.toFixed(2)}`}return E}}function I(){let a=document.querySelectorAll(".w-dropdown");function n(e){let t=e.querySelector(".w-dropdown-toggle"),s=e.querySelector(".w-dropdown-list"),r=e.querySelector(".dropdown_icon");t&&(t.classList.remove("w--open"),t.setAttribute("aria-expanded","false")),s&&s.classList.remove("w--open"),r&&r.classList.remove("is-open"),window.jQuery&&window.jQuery(e).trigger("w-close.w-dropdown")}a.forEach(e=>{let t=e.querySelector(".w-dropdown-toggle"),s=e.querySelector(".w-dropdown-list"),r=e.querySelector(".dropdown_icon");if(!t||!s)return;s.querySelectorAll("a").forEach(c=>{c.addEventListener("keydown",l=>{l.key==="Tab"&&setTimeout(()=>{e.contains(document.activeElement)||n(e)},0)})}),e.addEventListener("keydown",c=>{let l=c;l.key==="Escape"&&s.classList.contains("w--open")&&(n(e),t.focus(),l.preventDefault())}),new MutationObserver(c=>{c.forEach(l=>{if(l.attributeName==="class"){let i=t.classList.contains("w--open");r&&(i?r.classList.add("is-open"):r.classList.remove("is-open"))}})}).observe(t,{attributes:!0})}),document.addEventListener("focusin",e=>{a.forEach(t=>{let s=t.querySelector(".w-dropdown-list");s&&s.classList.contains("w--open")&&(t.contains(e.target)||n(t))})})}function C(){let a="[fs-scrolldisable-element='smart-nav']",n=".button-wrapper",e="is-pinned",t="w-variant-a4b72284-6321-8341-edca-223fdec43abe",o=document.querySelector(a);if(!o)return;let u=o.querySelector(n),c=!1,l=!1,i=()=>{let b=window.scrollY||window.pageYOffset;!l&&b>50?(o.classList.add(e),u&&u.classList.remove(t),l=!0):l&&b<40&&(o.classList.remove(e),u&&u.classList.add(t),l=!1),c=!1};window.addEventListener("scroll",()=>{c||(window.requestAnimationFrame(i),c=!0)},{passive:!0}),i()}function H(){if(typeof Swiper>"u")return;let a=document.querySelector(".swiper-progress-track"),n=document.querySelector(".swiper-progress-thumb"),e=new Swiper(".swiper.w-dyn-list",{slidesPerView:1,spaceBetween:36,loop:!1,centeredSlides:!0,navigation:{nextEl:".swiper-arrow.is-next",prevEl:".swiper-arrow.is-prev"},breakpoints:{768:{slidesPerView:1},1024:{slidesPerView:1}},on:{init:function(){t(this),s(this)},slideChange:function(){t(this),s(this)}}});a&&a.addEventListener("click",function(r){let o=r,u=a.getBoundingClientRect(),c=o.clientX-u.left,l=u.width,i=c/l,b=e.slides.length,g=Math.floor(i*b);e.slideTo(g)});function t(r){r.slides.forEach(function(o,u){u===r.activeIndex?(o.style.transform="scale(1)",o.style.transition="transform 0.4s ease"):(o.style.transform="scale(0.9)",o.style.transition="transform 0.4s ease")})}function s(r){if(!n)return;let o=r.slides.length,c=(r.realIndex+1)/o*100;n.style.width=c+"%"}}var x=class{constructor(n){w(this,"tablistNode");w(this,"tabs",[]);w(this,"firstTab",null);w(this,"lastTab",null);w(this,"tabpanels",[]);this.tablistNode=n;let e=this.tablistNode.getAttribute("data-orientation")||"horizontal";this.tablistNode.setAttribute("aria-orientation",e),this.tabs=Array.from(this.tablistNode.querySelectorAll("[role=tab]")),this.tabs.forEach(s=>{let r=s.getAttribute("aria-controls");if(!r)return;let o=document.getElementById(r);s.tabIndex=s.getAttribute("aria-selected")==="true"?0:-1,o&&(o.setAttribute("role","tabpanel"),o.setAttribute("aria-labelledby",s.id),o.removeAttribute("tabindex"),this.tabpanels.push(o)),s.addEventListener("keydown",this.onKeydown.bind(this)),s.addEventListener("click",this.onClick.bind(this)),this.firstTab||(this.firstTab=s),this.lastTab=s});let t=this.tabs.find(s=>s.getAttribute("aria-selected")==="true")||this.firstTab;t&&this.setSelectedTab(t,!1)}setSelectedTab(n,e=!0){this.tabs.forEach(t=>{let s=t.getAttribute("aria-controls"),r=s?document.getElementById(s):null;n===t?(t.setAttribute("aria-selected","true"),t.tabIndex=0,t.classList.add("is-active-tab"),r&&(r.classList.add("is-active-tab"),r.removeAttribute("hidden"),r.removeAttribute("style")),e&&t.focus()):(t.setAttribute("aria-selected","false"),t.tabIndex=-1,t.classList.remove("is-active-tab"),r&&(r.classList.remove("is-active-tab"),r.setAttribute("hidden","true"),r.removeAttribute("style")))})}setSelectedToPreviousTab(n){if(n===this.firstTab&&this.lastTab)this.setSelectedTab(this.lastTab);else{let e=this.tabs.indexOf(n);this.setSelectedTab(this.tabs[e-1])}}setSelectedToNextTab(n){if(n===this.lastTab&&this.firstTab)this.setSelectedTab(this.firstTab);else{let e=this.tabs.indexOf(n);this.setSelectedTab(this.tabs[e+1])}}onKeydown(n){let e=n.currentTarget,t=!1,s=this.tablistNode.getAttribute("aria-orientation")||"horizontal";switch(n.key){case"ArrowLeft":s==="horizontal"&&(this.setSelectedToPreviousTab(e),t=!0);break;case"ArrowRight":s==="horizontal"&&(this.setSelectedToNextTab(e),t=!0);break;case"ArrowUp":s==="vertical"&&(this.setSelectedToPreviousTab(e),t=!0);break;case"ArrowDown":s==="vertical"&&(this.setSelectedToNextTab(e),t=!0);break;case"Home":this.firstTab&&(this.setSelectedTab(this.firstTab),t=!0);break;case"End":this.lastTab&&(this.setSelectedTab(this.lastTab),t=!0);break;case"Enter":case" ":this.setSelectedTab(e),t=!0;break;default:break}t&&(n.stopPropagation(),n.preventDefault())}onClick(n){this.setSelectedTab(n.currentTarget)}};function P(){document.querySelectorAll('[data-module="tabs"]').forEach(e=>{let t=e.querySelector('[role="tablist"]');if(t instanceof HTMLElement){if(e.hasAttribute("data-orientation")&&!t.hasAttribute("data-orientation")){let s=e.getAttribute("data-orientation");s&&t.setAttribute("data-orientation",s)}new x(t)}}),document.querySelectorAll('[role="tablist"]').forEach(e=>{e instanceof HTMLElement&&!e.closest('[data-module="tabs"]')&&new x(e)})}window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{A(),P(),C(),M(),H(),O(),k(),I(),q()});})();
136
+ ${m}
137
+ `,document.head.appendChild(n)}if(e.querySelectorAll(".banner_marquee").length===1){let n=t.cloneNode(!0);n.setAttribute("aria-hidden","true"),n.classList.add("is-clone"),e.appendChild(n)}};function Y(){let d=document.querySelector("[data-line-scroll] line");if(!d)return;let o=d.closest("svg");o&&gsap.set(o,{attr:{preserveAspectRatio:"none"}}),gsap.to(d,{strokeDashoffset:-16,duration:1,ease:"none",repeat:-1})}function j(){let d=document.querySelectorAll(".layout_card.is-faq"),o=document.querySelectorAll(".about_component-image-outer");gsap.set(".layout-card-bottom",{height:0,overflow:"hidden",display:"block"}),gsap.set(o,{autoAlpha:0,display:"none",width:"100%",height:"100%",objectFit:"cover",position:"absolute",top:0,left:0});let e=document.querySelectorAll(".about_component-image-outer img");gsap.set(e,{width:"100%",height:"100%",objectFit:"cover"});function t(r,n){let m=r.querySelector(".layout-card-bottom"),c=r.querySelector(".layout_action-icon"),a=r.getAttribute("data-card"),l=document.querySelector(`.about_component-image-outer[data-image="${a}"]`);n?(m&&gsap.to(m,{height:"auto",duration:.6,ease:"power3.inOut"}),c&&c.classList.add("is-active"),l?(gsap.set(l,{display:"block",zIndex:2}),gsap.to(l,{autoAlpha:1,duration:.6,ease:"power3.inOut",overwrite:!0})):console.warn(`No image found for Card ID: ${a}`)):(gsap.to(m,{height:0,duration:.6,ease:"power3.inOut"}),c&&c.classList.remove("is-active"),l&&(gsap.set(l,{zIndex:1}),gsap.to(l,{autoAlpha:0,duration:.6,ease:"power3.inOut",onComplete:()=>gsap.set(l,{display:"none"})})))}let i=Array.from(d).find(r=>{let n=r.getAttribute("data-card");return document.querySelector(`.about_component-image-outer[data-image="${n}"]`)});i&&t(i,!0),d.forEach(r=>{let n=r.querySelector(".layout_card-top");n&&n.addEventListener("click",()=>{let m=r.querySelector(".layout-card-bottom"),c=m?gsap.getProperty(m,"height"):0,a=parseFloat(String(c))>0;d.forEach(l=>{l!==r&&t(l,!1)}),a||t(r,!0)})})}function K(){if(!window.matchMedia("(hover: hover) and (pointer: fine)").matches)return;let o=document.querySelectorAll("[data-cursor]"),e=document.getElementById("cursor-hijack"),t=document.getElementById("cursor-trail-canvas"),i=document.getElementById("cursor-trail-path"),r=document.getElementById("trailGradient");if(!e||!t||!i||!o.length)return;if(typeof gsap>"u"){console.warn("GSAP not found");return}gsap.set(i,{opacity:.08});let n={tipOffset:{x:0,y:14},trailOffset:32,positionLerp:.25,maxPoints:50,minDistance:4,trailDecay:.92,rotationLerp:.15,idleSpeedThreshold:.5},m=!1,c={x:0,y:0},a={x:0,y:0},l=[],s=0,S=0;function O(){t&&t.setAttribute("viewBox",`0 0 ${window.innerWidth} ${window.innerHeight}`)}O(),window.addEventListener("resize",O),window.addEventListener("mousemove",u=>{c.x=u.clientX,c.y=u.clientY},{passive:!0});function q(){m=!0,document.body.classList.add("cursor-active"),a.x=c.x,a.y=c.y,l=[];for(let u=0;u<n.maxPoints;u++)l.push({x:c.x,y:c.y});S=0,s=0}function R(){m=!1,document.body.classList.remove("cursor-active")}o.forEach(u=>{u.addEventListener("mouseenter",q),u.addEventListener("mouseleave",R)}),document.querySelectorAll(".button-wrapper").forEach(u=>{u.addEventListener("mouseenter",()=>{document.body.classList.add("cursor-hidden")}),u.addEventListener("mouseleave",()=>{document.body.classList.remove("cursor-hidden")})}),gsap.ticker.add(()=>{if(!m)return;a.x+=(c.x-a.x)*n.positionLerp,a.y+=(c.y-a.y)*n.positionLerp;let u=a.x-l[1].x,b=a.y-l[1].y;Math.hypot(u,b)>n.idleSpeedThreshold&&(s=Math.atan2(b,u)*(180/Math.PI));let p=s-S;p>180&&(p-=360),p<-180&&(p+=360),S+=p*n.rotationLerp;let L=S*Math.PI/180,E=a.x-Math.cos(L)*n.trailOffset,w=a.y-Math.sin(L)*n.trailOffset;l[0].x=E,l[0].y=w;for(let v=1;v<l.length;v++)l[v].x+=(l[v-1].x-l[v].x)*(1-n.trailDecay),l[v].y+=(l[v-1].y-l[v].y)*(1-n.trailDecay);let A=f(l);i&&i.setAttribute("d",A),k(),gsap.set(e,{x:a.x-n.tipOffset.x,y:a.y-n.tipOffset.y,rotation:S+180,transformOrigin:`${n.tipOffset.x}px ${n.tipOffset.y}px`})});function k(){if(!r||l.length<2)return;let u=l[l.length-1],b=l[0];r.setAttribute("x1",String(u.x)),r.setAttribute("y1",String(u.y)),r.setAttribute("x2",String(b.x)),r.setAttribute("y2",String(b.y))}function f(u,b=.5){if(u.length<2)return"";let M=`M ${u[0].x.toFixed(2)} ${u[0].y.toFixed(2)}`;for(let p=0;p<u.length-1;p++){let L=u[Math.max(p-1,0)],E=u[p],w=u[p+1],A=u[Math.min(p+2,u.length-1)],v=E.x+(w.x-L.x)/6*b,H=E.y+(w.y-L.y)/6*b,P=w.x-(A.x-E.x)/6*b,N=w.y-(A.y-E.y)/6*b;M+=` C ${v.toFixed(2)} ${H.toFixed(2)}, ${P.toFixed(2)} ${N.toFixed(2)}, ${w.x.toFixed(2)} ${w.y.toFixed(2)}`}return M}}function Q(){let d=document.querySelectorAll(".w-dropdown");function o(e){let t=e.querySelector(".w-dropdown-toggle"),i=e.querySelector(".w-dropdown-list"),r=e.querySelector(".dropdown_icon");t&&(t.classList.remove("w--open"),t.setAttribute("aria-expanded","false")),i&&i.classList.remove("w--open"),r&&r.classList.remove("is-open"),window.jQuery&&window.jQuery(e).trigger("w-close.w-dropdown")}d.forEach(e=>{let t=e.querySelector(".w-dropdown-toggle"),i=e.querySelector(".w-dropdown-list"),r=e.querySelector(".dropdown_icon");if(!t||!i)return;i.querySelectorAll("a").forEach(c=>{c.addEventListener("keydown",a=>{a.key==="Tab"&&setTimeout(()=>{e.contains(document.activeElement)||o(e)},0)})}),e.addEventListener("keydown",c=>{let a=c;a.key==="Escape"&&i.classList.contains("w--open")&&(o(e),t.focus(),a.preventDefault())}),new MutationObserver(c=>{c.forEach(a=>{if(a.attributeName==="class"){let l=t.classList.contains("w--open");r&&(l?r.classList.add("is-open"):r.classList.remove("is-open"))}})}).observe(t,{attributes:!0})}),document.addEventListener("focusin",e=>{d.forEach(t=>{let i=t.querySelector(".w-dropdown-list");i&&i.classList.contains("w--open")&&(t.contains(e.target)||o(t))})})}function J(){let d="[fs-scrolldisable-element='smart-nav']",o=".button-wrapper",e="is-pinned",t="w-variant-a4b72284-6321-8341-edca-223fdec43abe",n=document.querySelector(d);if(!n)return;let m=n.querySelector(o),c=!1,a=!1,l=()=>{let s=window.scrollY||window.pageYOffset;!a&&s>50?(n.classList.add(e),m&&m.classList.remove(t),a=!0):a&&s<40&&(n.classList.remove(e),m&&m.classList.add(t),a=!1),c=!1};window.addEventListener("scroll",()=>{c||(window.requestAnimationFrame(l),c=!0)},{passive:!0}),l()}function Z(){if(typeof Swiper>"u")return;let d=document.querySelector(".swiper-progress-track"),o=document.querySelector(".swiper-progress-thumb"),e=new Swiper(".swiper.w-dyn-list",{slidesPerView:1,spaceBetween:36,loop:!1,centeredSlides:!0,navigation:{nextEl:".swiper-arrow.is-next",prevEl:".swiper-arrow.is-prev"},breakpoints:{768:{slidesPerView:1},1024:{slidesPerView:1}},on:{init:function(){t(this),i(this)},slideChange:function(){t(this),i(this)}}});d&&d.addEventListener("click",function(r){let n=r,m=d.getBoundingClientRect(),c=n.clientX-m.left,a=m.width,l=c/a,s=e.slides.length,S=Math.floor(l*s);e.slideTo(S)});function t(r){r.slides.forEach(function(n,m){m===r.activeIndex?(n.style.transform="scale(1)",n.style.transition="transform 0.4s ease"):(n.style.transform="scale(0.9)",n.style.transition="transform 0.4s ease")})}function i(r){if(!o)return;let n=r.slides.length,c=(r.realIndex+1)/n*100;o.style.width=c+"%"}}var D=class{constructor(o){_(this,"tablistNode");_(this,"tabs",[]);_(this,"firstTab",null);_(this,"lastTab",null);_(this,"tabpanels",[]);this.tablistNode=o;let e=this.tablistNode.getAttribute("data-orientation")||"horizontal";this.tablistNode.setAttribute("aria-orientation",e),this.tabs=Array.from(this.tablistNode.querySelectorAll("[role=tab]")),this.tabs.forEach(i=>{let r=i.getAttribute("aria-controls");if(!r)return;let n=document.getElementById(r);i.tabIndex=i.getAttribute("aria-selected")==="true"?0:-1,n&&(n.setAttribute("role","tabpanel"),n.setAttribute("aria-labelledby",i.id),n.removeAttribute("tabindex"),this.tabpanels.push(n)),i.addEventListener("keydown",this.onKeydown.bind(this)),i.addEventListener("click",this.onClick.bind(this)),this.firstTab||(this.firstTab=i),this.lastTab=i});let t=this.tabs.find(i=>i.getAttribute("aria-selected")==="true")||this.firstTab;t&&this.setSelectedTab(t,!1)}setSelectedTab(o,e=!0){this.tabs.forEach(t=>{let i=t.getAttribute("aria-controls"),r=i?document.getElementById(i):null;o===t?(t.setAttribute("aria-selected","true"),t.tabIndex=0,t.classList.add("is-active-tab"),r&&(r.classList.add("is-active-tab"),r.removeAttribute("hidden"),r.removeAttribute("style")),e&&t.focus()):(t.setAttribute("aria-selected","false"),t.tabIndex=-1,t.classList.remove("is-active-tab"),r&&(r.classList.remove("is-active-tab"),r.setAttribute("hidden","true"),r.removeAttribute("style")))})}setSelectedToPreviousTab(o){if(o===this.firstTab&&this.lastTab)this.setSelectedTab(this.lastTab);else{let e=this.tabs.indexOf(o);this.setSelectedTab(this.tabs[e-1])}}setSelectedToNextTab(o){if(o===this.lastTab&&this.firstTab)this.setSelectedTab(this.firstTab);else{let e=this.tabs.indexOf(o);this.setSelectedTab(this.tabs[e+1])}}onKeydown(o){let e=o.currentTarget,t=!1,i=this.tablistNode.getAttribute("aria-orientation")||"horizontal";switch(o.key){case"ArrowLeft":i==="horizontal"&&(this.setSelectedToPreviousTab(e),t=!0);break;case"ArrowRight":i==="horizontal"&&(this.setSelectedToNextTab(e),t=!0);break;case"ArrowUp":i==="vertical"&&(this.setSelectedToPreviousTab(e),t=!0);break;case"ArrowDown":i==="vertical"&&(this.setSelectedToNextTab(e),t=!0);break;case"Home":this.firstTab&&(this.setSelectedTab(this.firstTab),t=!0);break;case"End":this.lastTab&&(this.setSelectedTab(this.lastTab),t=!0);break;case"Enter":case" ":this.setSelectedTab(e),t=!0;break;default:break}t&&(o.stopPropagation(),o.preventDefault())}onClick(o){this.setSelectedTab(o.currentTarget)}};function ee(){document.querySelectorAll('[data-module="tabs"]').forEach(e=>{let t=e.querySelector('[role="tablist"]');if(t instanceof HTMLElement){if(e.hasAttribute("data-orientation")&&!t.hasAttribute("data-orientation")){let i=e.getAttribute("data-orientation");i&&t.setAttribute("data-orientation",i)}new D(t)}}),document.querySelectorAll('[role="tablist"]').forEach(e=>{e instanceof HTMLElement&&!e.closest('[data-module="tabs"]')&&new D(e)})}window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{z(),ee(),J(),j(),Z(),K(),Y(),Q(),X(),V()});})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anegis-webflow-new",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "Webflow development project for Anegis",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/ANEGIS/anegis-webflow-new#readme",
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { greetUser } from '$utils/greet';
2
2
 
3
+ import { initBlobAnimation } from './animations/BlobAnimation';
3
4
  import { initMarquee } from './animations/Marquee';
4
5
  import { initScrollLine } from './animations/ScrollLine';
5
6
  import { initFaqCards } from './components/cards/FaqCards';
@@ -22,4 +23,5 @@ window.Webflow.push(() => {
22
23
  initScrollLine();
23
24
  initAccessibleDropdown();
24
25
  initMarquee();
26
+ initBlobAnimation();
25
27
  });