PageSourceSearch

https://wmods.net/wp-content/cache/min/1/wp-content/themes/woodmart-child/assets/js/theme.js?ver=1788993988

js wmods.net collected 2026-10-04 06:57:15 UTC 34,866 bytes, 124 lines download raw bytes

1(function(){'use strict';if(window.woodmart_settings){window.woodmart_settings.add_to_cart_action='none'}
2function initHeaderShadow(){var header=document.querySelector('.whb-header');if(!header){return}
3var sentinel=document.createElement('div');sentinel.setAttribute('aria-hidden','true');sentinel.style.position='absolute';sentinel.style.top='0';sentinel.style.height='1px';sentinel.style.width='1px';header.parentNode.insertBefore(sentinel,header);var observer=new IntersectionObserver(function(entries){var entry=entries[0];document.body.classList.toggle('fv-header-scrolled',!entry.isIntersecting)});observer.observe(sentinel)}
4function initScrollReveal(){var targets=document.querySelectorAll('[data-fv-reveal]');if(!targets.length){return}
5if(!('IntersectionObserver' in window)||window.matchMedia('(prefers-reduced-motion: reduce)').matches){targets.forEach(function(el){el.classList.add('is-visible')});return}
6var observer=new IntersectionObserver(function(entries){entries.forEach(function(entry,index){if(entry.isIntersecting){setTimeout(function(){entry.target.classList.add('is-visible')},index*60);observer.unobserve(entry.target)}})},{threshold:0.15,rootMargin:'0px 0px -60px 0px'});targets.forEach(function(el){observer.observe(el)})}
7function initReviewsDrag(){var tracks=document.querySelectorAll('[data-fivem-slider] .fivem-reviews__track');tracks.forEach(function(track){var isDown=!1;var startX=0;var scrollStart=0;track.addEventListener('pointerdown',function(e){isDown=!0;startX=e.clientX;scrollStart=track.scrollLeft;track.setPointerCapture(e.pointerId)});track.addEventListener('pointermove',function(e){if(!isDown){return}
8track.scrollLeft=scrollStart-(e.clientX-startX)});['pointerup','pointercancel','pointerleave'].forEach(function(evt){track.addEventListener(evt,function(){isDown=!1})})})}
9var prefersFinePointer=window.matchMedia('(hover: hover) and (pointer: fine)');var prefersReducedMotion=window.matchMedia('(prefers-reduced-motion: reduce)');function originForEvent(el,clientX,clientY){var rect=el.getBoundingClientRect();var x=clientX-rect.left;var y=clientY-rect.top;var size=2*Math.max(Math.hypot(x,y),Math.hypot(rect.width-x,y),Math.hypot(x,rect.height-y),Math.hypot(rect.width-x,rect.height-y));el.style.setProperty('--fv-ripple-x',x+'px');el.style.setProperty('--fv-ripple-y',y+'px');el.style.setProperty('--fv-ripple-size',size+'px')}
10function originAtCenter(el){var rect=el.getBoundingClientRect();originForEvent(el,rect.left+rect.width/2,rect.top+rect.height/2)}
11function initOriginRipple(){if(!prefersFinePointer.matches||prefersReducedMotion.matches){return}
12var selector='.fv-btn .elementor-button, .cart-widget-side .woocommerce-mini-cart__buttons .button';var targets=document.querySelectorAll(selector);targets.forEach(function(btn){if(btn.classList.contains('fv-ripple')){return}
13btn.classList.add('fv-ripple');if(btn.closest('.fv-btn-secondary')||btn.classList.contains('btn-cart')){btn.classList.add('fv-ripple-secondary')}
14Array.prototype.slice.call(btn.childNodes).forEach(function(node){if(node.nodeType===Node.TEXT_NODE&&node.textContent.trim()!==''){var textSpan=document.createElement('span');textSpan.textContent=node.textContent;btn.replaceChild(textSpan,node)}});var fill=document.createElement('span');fill.className='fv-ripple-fill';fill.setAttribute('aria-hidden','true');btn.appendChild(fill);btn.addEventListener('pointerenter',function(e){originForEvent(btn,e.clientX,e.clientY);btn.classList.add('is-filled')});btn.addEventListener('pointerdown',function(e){originForEvent(btn,e.clientX,e.clientY)});btn.addEventListener('pointerleave',function(){btn.classList.remove('is-filled')});btn.addEventListener('focus',function(){if(btn.matches(':focus-visible')){originAtCenter(btn);btn.classList.add('is-filled')}});btn.addEventListener('blur',function(){btn.classList.remove('is-filled')})})}
15function initAddToCartFlight(){if(typeof window.jQuery==='undefined'||prefersReducedMotion.matches){return}
16window.jQuery(document.body).on('added_to_cart',function(event,fragments,cartHash,$button){var button=$button&&$button.get?$button.get(0):null;if(!button){return}
17var cartIcon=null;var cartIcons=document.querySelectorAll('.wd-header-cart .wd-tools-icon');for(var i=0;i<cartIcons.length;i++){var candidate=cartIcons[i];var candidateRect=candidate.getBoundingClientRect();if(candidate.offsetParent!==null&&candidateRect.width>0){cartIcon=candidate;break}}
18if(!cartIcon){return}
19var card=button.closest('.wd-product');var sourceImg=card?card.querySelector('.wd-product-img-link img'):null;if(!sourceImg){var gallery=document.querySelector('.woocommerce-product-gallery');sourceImg=gallery?gallery.querySelector('.wd-carousel-item.is-active img')||gallery.querySelector('.wd-carousel-item img'):null}
20if(!sourceImg){return}
21var startRect=sourceImg.getBoundingClientRect();var endRect=cartIcon.getBoundingClientRect();var flying=sourceImg.cloneNode(!1);flying.removeAttribute('srcset');flying.removeAttribute('sizes');flying.className='fv-flying-item';flying.style.left=startRect.left+'px';flying.style.top=startRect.top+'px';flying.style.width=startRect.width+'px';flying.style.height=startRect.height+'px';document.body.appendChild(flying);
21var dx=(endRect.left+endRect.width/2)-(startRect.left+startRect.width/2);var dy=(endRect.top+endRect.height/2)-(startRect.top+startRect.height/2);var animation=flying.animate([{transform:'translate(0, 0) scale(1)',opacity:1,offset:0},{transform:'translate('+dx*0.5+'px, '+(dy*0.5-60)+'px) scale(0.7)',opacity:1,offset:0.6},{transform:'translate('+dx+'px, '+dy+'px) scale(0.12)',opacity:0.2,offset:1}],{duration:650,easing:'cubic-bezier(0.77, 0, 0.175, 1)',fill:'forwards'});animation.onfinish=function(){flying.remove();var cartWrap=document.querySelector('.wd-header-cart');if(!cartWrap){return}
22cartWrap.classList.add('fv-cart-bump');setTimeout(function(){cartWrap.classList.remove('fv-cart-bump')},450)}})}
23function initCategoryShowcase(){var roots=document.querySelectorAll('[data-fv-showcase]');if(!roots.length){return}
24var TIERS=[{x:0,scale:1,rotate:0,opacity:1,z:30,filter:'brightness(1)'},{x:190,scale:0.78,rotate:-24,opacity:0.6,z:20,filter:'brightness(0.75)'},{x:340,scale:0.58,rotate:-38,opacity:0.32,z:10,filter:'brightness(0.55) blur(1px)'}];roots.forEach(function(root){var cards=Array.prototype.slice.call(root.querySelectorAll('.fv-showcase__card'));var ambienceImgs=Array.prototype.slice.call(root.querySelectorAll('.fv-showcase__ambience-img'));var dots=Array.prototype.slice.call(root.querySelectorAll('.fv-showcase__dot'));var count=cards.length;if(!count){return}
25var current=0;var autoplayTimer=null;function render(){cards.forEach(function(card,index){var offset=index-current;offset=((offset%count)+count)%count;if(offset>count/2){offset-=count}
26var distance=Math.abs(offset);var sign=offset<0?-1:1;var tier=TIERS[Math.min(distance,TIERS.length-1)];if(distance>=TIERS.length){card.style.opacity='0';card.style.zIndex='0';card.style.pointerEvents='none';card.style.transform='translateX(0) scale(0.4) rotateY(0deg)';card.classList.remove('is-active');return}
27var x=tier.x*sign;var rotate=tier.rotate*sign;card.style.transform='translateX('+x+'px) scale('+tier.scale+') rotateY('+rotate+'deg)';card.style.opacity=String(tier.opacity);card.style.zIndex=String(tier.z);card.style.filter=tier.filter;card.style.pointerEvents=distance===0?'auto':'none';card.classList.toggle('is-active',distance===0)});ambienceImgs.forEach(function(img,index){img.classList.toggle('is-active',index===current)});dots.forEach(function(dot,index){dot.classList.toggle('is-active',index===current)})}
28function goTo(index){current=((index%count)+count)%count;render()}
29function next(){goTo(current+1)}
30function prev(){goTo(current-1)}
31function stopAutoplay(){if(autoplayTimer){clearInterval(autoplayTimer);autoplayTimer=null}}
32function startAutoplay(){if(prefersReducedMotion.matches||count<=1){return}
33stopAutoplay();autoplayTimer=setInterval(next,5000)}
34var prevBtn=root.querySelector('[data-fv-showcase-prev]');var nextBtn=root.querySelector('[data-fv-showcase-next]');if(prevBtn){prevBtn.addEventListener('click',function(){prev();startAutoplay()})}
35if(nextBtn){nextBtn.addEventListener('click',function(){next();startAutoplay()})}
36dots.forEach(function(dot,index){dot.addEventListener('click',function(){goTo(index);startAutoplay()})});cards.forEach(function(card,index){card.addEventListener('click',function(e){if(index!==current){e.preventDefault();goTo(index);startAutoplay()}})});root.addEventListener('keydown',function(e){if(e.key==='ArrowLeft'){e.preventDefault();prev();startAutoplay()}else if(e.key==='ArrowRight'){e.preventDefault();next();startAutoplay()}});var touchStartX=0;root.addEventListener('touchstart',function(e){touchStartX=e.touches[0].clientX},{passive:!0});root.addEventListener('touchend',function(e){var diff=e.changedTouches[0].clientX-touchStartX;if(Math.abs(diff)>45){diff<0?next():prev();startAutoplay()}});root.addEventListener('mouseenter',stopAutoplay);root.addEventListener('mouseleave',startAutoplay);render();startAutoplay()})}
37function initLetterSwapNav(){if(!prefersFinePointer.matches||prefersReducedMotion.matches){return}
38var CHARS='ABCDEFGHIJKLMNOPQRSTUVWXYZ';var links=document.querySelectorAll('.wd-header-nav.wd-header-main-nav > ul > li > a');links.forEach(function(link){var textNode=link.querySelector('.nav-link-text')||link;if(textNode.children.length>0){return}
39var text=textNode.textContent.trim();if(!text){return}
40textNode.textContent='';link.setAttribute('aria-label',text);var letters=text.split('').map(function(ch){var span=document.createElement('span');span.textContent=ch;span.style.display='inline-block';if(ch===' '){span.style.width='0.3em'}
41textNode.appendChild(span);return{el:span,real:ch}});var activeTimers=[];
41function clearTimers(){activeTimers.forEach(function(t){clearTimeout(t);clearInterval(t)});activeTimers=[]}
42link.addEventListener('pointerenter',function(){clearTimers();letters.forEach(function(letter,i){if(letter.real===' '){return}
43var startTimer=setTimeout(function(){var iterations=0;var maxIterations=5;var scrambleTimer=setInterval(function(){if(iterations>=maxIterations){letter.el.textContent=letter.real;clearInterval(scrambleTimer);return}
44letter.el.textContent=CHARS[(Math.random()*CHARS.length)|0];iterations++},35);activeTimers.push(scrambleTimer)},i*25);activeTimers.push(startTimer)})});link.addEventListener('pointerleave',function(){clearTimers();letters.forEach(function(letter){letter.el.textContent=letter.real})})})}
45function initProductGallery(){var galleries=document.querySelectorAll('.woocommerce-product-gallery');galleries.forEach(function(gallery){var items=Array.prototype.slice.call(gallery.querySelectorAll('.wd-carousel-item'));if(items.length<2||gallery.classList.contains('fv-gallery-ready')){return}
46gallery.classList.add('fv-gallery-ready');var wrap=gallery.querySelector('.wd-carousel-wrap')||gallery;wrap.classList.add('fv-gallery-wrap');items.forEach(function(item){var img=item.querySelector('img');if(!img){return}
47var realSrc=img.getAttribute('data-src')||img.getAttribute('data-lazy-src');var realSrcset=img.getAttribute('data-srcset')||img.getAttribute('data-lazy-srcset');if(realSrc){img.src=realSrc}
48if(realSrcset){img.srcset=realSrcset}else{img.removeAttribute('srcset')}
49img.removeAttribute('data-src');img.removeAttribute('data-lazy-src');img.removeAttribute('data-srcset');img.removeAttribute('data-lazy-srcset');img.loading='eager';img.classList.remove('lazyload','rocket-lazyload')});var current=0;var thumbs=[];function show(index){current=(index+items.length)%items.length;items.forEach(function(item,i){item.classList.toggle('is-active',i===current)});thumbs.forEach(function(t,i){t.classList.toggle('is-active',i===current)})}
50var prevBtn=document.createElement('button');prevBtn.type='button';prevBtn.className='fv-gallery-arrow fv-gallery-arrow--prev';prevBtn.setAttribute('aria-label','Previous image');prevBtn.innerHTML='&#8249;';prevBtn.addEventListener('click',function(){show(current-1)});var nextBtn=document.createElement('button');nextBtn.type='button';nextBtn.className='fv-gallery-arrow fv-gallery-arrow--next';nextBtn.setAttribute('aria-label','Next image');nextBtn.innerHTML='&#8250;';nextBtn.addEventListener('click',function(){show(current+1)});wrap.appendChild(prevBtn);wrap.appendChild(nextBtn);var allSrcs=items.map(function(item){var figure=item.querySelector('figure');var img=item.querySelector('img');return{thumb:(figure&&figure.getAttribute('data-thumb'))||(img&&(img.currentSrc||img.src))||'',full:(img&&(img.currentSrc||img.src))||''}});var openLightbox=initGalleryLightbox(gallery,allSrcs,show);var thumbRow=document.createElement('div');thumbRow.className='fv-gallery-thumbs';var maxThumbs=5;items.forEach(function(item,i){if(i>=maxThumbs){return}
51var thumbSrc=allSrcs[i].thumb;if(!thumbSrc){return}
52var thumb=document.createElement('button');thumb.type='button';thumb.className='fv-gallery-thumb';var thumbImg=document.createElement('img');thumbImg.src=thumbSrc;thumbImg.alt='';thumbImg.loading='lazy';thumb.appendChild(thumbImg);var isOverflowTile=i===maxThumbs-1&&items.length>maxThumbs;if(isOverflowTile){var overlay=document.createElement('span');overlay.className='fv-gallery-thumb__more';overlay.textContent='+'+(items.length-maxThumbs);thumb.appendChild(overlay);thumb.setAttribute('aria-label','View all '+items.length+' photos');thumb.addEventListener('click',function(){openLightbox(current)})}else{thumb.addEventListener('click',function(){show(i)})}
53thumbRow.appendChild(thumb);thumbs.push(thumb)});wrap.classList.add('fv-gallery-frame--expandable');wrap.setAttribute('role','button');wrap.setAttribute('tabindex','0');wrap.setAttribute('aria-label','View all '+items.length+' photos');wrap.addEventListener('click',function(e){if(e.target.closest('.fv-gallery-arrow')){return}
54openLightbox(current)});wrap.addEventListener('keydown',function(e){if(e.key==='Enter'||e.key===' '){e.preventDefault();openLightbox(current)}});gallery.parentElement.insertBefore(thumbRow,gallery.nextSibling);show(0)})}
55function initGalleryLightbox(gallery,allSrcs,show){var overlay=document.createElement('div');overlay.className='fv-lightbox';overlay.setAttribute('role','dialog');overlay.setAttribute('aria-modal','true');overlay.setAttribute('aria-label','All photos');overlay.hidden=!0;var panel=document.createElement('div');panel.className='fv-lightbox__panel';var closeBtn=document.createElement('button');closeBtn.type='button';closeBtn.className='fv-lightbox__close';closeBtn.setAttribute('aria-label','Close');closeBtn.innerHTML='&times;';var grid=document.createElement('div');grid.className='fv-lightbox__grid';allSrcs.forEach(function(src,i){if(!src.thumb){return}
56var tile=document.createElement('button');
56tile.type='button';tile.className='fv-lightbox__tile';var img=document.createElement('img');img.src=src.thumb;img.loading='lazy';img.alt='';tile.appendChild(img);tile.addEventListener('click',function(){show(i);close()});grid.appendChild(tile)});panel.appendChild(closeBtn);panel.appendChild(grid);overlay.appendChild(panel);document.body.appendChild(overlay);var lastFocused=null;function open(){lastFocused=document.activeElement;overlay.hidden=!1;requestAnimationFrame(function(){overlay.classList.add('is-open')});closeBtn.focus();document.addEventListener('keydown',onKeydown);document.body.classList.add('fv-lightbox-open')}
57function close(){overlay.classList.remove('is-open');document.removeEventListener('keydown',onKeydown);document.body.classList.remove('fv-lightbox-open');setTimeout(function(){overlay.hidden=!0},220);if(lastFocused&&lastFocused.focus){lastFocused.focus()}}
58function onKeydown(e){if(e.key==='Escape'){close()}}
59closeBtn.addEventListener('click',close);overlay.addEventListener('click',function(e){if(e.target===overlay){close()}});return open}
60function initArchiveBannerCircuit(){var banners=document.querySelectorAll('.fv-archive-banner');if(!banners.length){return}
61var wires=[{d:'M0,80 L300,80 L340,120 L700,120 L740,80 L1600,80',delay:'-0.6s'},{d:'M0,220 L200,220 L240,260 L900,260 L940,220 L1600,220',delay:'-2.4s'},{d:'M0,330 L500,330 L540,290 L1100,290 L1140,330 L1600,330',delay:'-4s'},{d:'M420,0 L420,60 L460,100 L460,400',delay:'-1.6s'}];var nodes=[[340,120],[740,80],[240,260],[940,220],[460,100]];var svg=document.createElementNS('http://www.w3.org/2000/svg','svg');svg.setAttribute('class','fv-circuit');svg.setAttribute('viewBox','0 0 1600 400');svg.setAttribute('preserveAspectRatio','none');svg.setAttribute('width','100%');svg.setAttribute('height','100%');svg.setAttribute('aria-hidden','true');wires.forEach(function(wire){var line=document.createElementNS('http://www.w3.org/2000/svg','path');line.setAttribute('class','fv-circuit-line');line.setAttribute('d',wire.d);line.setAttribute('pathLength','1000');svg.appendChild(line);var pulse=document.createElementNS('http://www.w3.org/2000/svg','path');pulse.setAttribute('class','fv-circuit-pulse');pulse.setAttribute('d',wire.d);pulse.setAttribute('pathLength','1000');pulse.style.animationDelay=wire.delay;svg.appendChild(pulse)});nodes.forEach(function(pos){var node=document.createElementNS('http://www.w3.org/2000/svg','circle');node.setAttribute('class','fv-circuit-node');node.setAttribute('cx',pos[0]);node.setAttribute('cy',pos[1]);node.setAttribute('r',4);svg.appendChild(node)});banners.forEach(function(banner){if(banner.querySelector('.fv-circuit')){return}
62banner.insertBefore(svg.cloneNode(!0),banner.firstChild)})}
63function initHeroTrustbar(){var bar=document.querySelector('.fv-hero-trustbar');if(!bar){return}
64setTimeout(function(){bar.classList.add('is-visible')},500)}
65function initHeroBackdropHeight(){var atmosphere=document.querySelector('.fv-hero-atmosphere');var trustbar=document.querySelector('.fv-hero-trustbar');var cta=document.querySelector('.fv-hero-cta');var nextSection=document.querySelector('.fv-showcase');if(!atmosphere||!cta){return}
66function sync(){var top=atmosphere.getBoundingClientRect().top;var ctaBottom=cta.getBoundingClientRect().bottom;var gap=40;var contentHeight=(ctaBottom-top)+gap;atmosphere.style.height=Math.max(contentHeight,900)+'px';if(trustbar){trustbar.style.top=Math.round(contentHeight)+'px';if(nextSection&&getComputedStyle(trustbar).position==='absolute'){nextSection.style.marginTop=Math.round(trustbar.offsetHeight+48)+'px'}else if(nextSection){nextSection.style.marginTop=''}}}
67sync();window.addEventListener('load',sync);var resizeTimer;window.addEventListener('resize',function(){clearTimeout(resizeTimer);resizeTimer=setTimeout(sync,150)})}
68function initHeroLightning(){var canvas=document.querySelector('.fv-hero-lightning');if(!canvas||!('WebGLRenderingContext' in window)){return}
69var VERT='attribute vec2 aPosition;\n'+'void main() {\n'+'  gl_Position = vec4(aPosition, 0.0, 1.0);\n'+'}';var FRAG=['precision mediump float;','uniform vec2 iResolution;','uniform float iTime;','uniform float uHue;','uniform float uXOffset;','uniform float uSpeed;','uniform float uIntensity;','uniform float uSize;','#define OCTAVE_COUNT 10','vec3 hsv2rgb(vec3 c) {','    vec3 rgb = clamp(abs(mod(c.x * 6.0 + vec3(0.0,4.0,2.0), 6.0) - 3.0) - 1.0, 0.0, 1.0);','    return c.z * mix(vec3(1.0), rgb, c.y);','}','float hash11(float p) {','    p = fract(p * .1031);','    p *= p + 33.33;','    p *= p + p;','    return fract(p);','}','float hash12(vec2 p) {','    vec3 p3 = fract(vec3(p.xyx) * .1031);','    p3 += dot(p3, p3.yzx + 33.33);','    return fract((p3.x + p3.y) * p3.z);','}','mat2 rotate2d(float theta) {','    float c = cos(theta);','    float s = sin(theta);','    return mat2(c, -s, s, c);','}','float noise(vec2 p) {','    vec2 ip = floor(p);','    vec2 fp = fract(p);','    float a = hash12(ip);','    float b = hash12(ip + vec2(1.0, 0.0));','    float c = hash12(ip + vec2(0.0, 1.0));','    float d = hash12(ip + vec2(1.0, 1.0));','    vec2 t = smoothstep(0.0, 1.0, fp);','    return mix(mix(a, b, t.x), mix(c, d, t.x), t.y);','}','float fbm(vec2 p) {','    float value = 0.0;','    float amplitude = 0.5;','    for (int i = 0; i < OCTAVE_COUNT; ++i) {','        value += amplitude * noise(p);','        p *= rotate2d(0.45);','        p *= 2.0;','        amplitude *= 0.5;','    }','    return value;','}','void main() {','    vec2 baseUv = gl_FragCoord.xy / iResolution.xy;','    baseUv = 2.0 * baseUv - 1.0;','    baseUv.x *= iResolution.x / iResolution.y;','    vec3 baseColor = hsv2rgb(vec3(uHue / 360.0, 0.7, 0.8));','    float flicker = mix(0.0, 0.05, hash11(iTime * uSpeed));','    float spread = (iResolution.x / iResolution.y) * 0.48;','    vec3 col = vec3(0.0);','    float weights[3];','    weights[0] = 0.4;','    weights[1] = 0.0;','    weights[2] = 0.4;','    for (int i = 0; i < 3; i++) {','        float anchorX = uXOffset + (float(i) - 1.0) * spread;','        vec2 local = baseUv - vec2(anchorX, 0.0);','        float tilt = (float(i) - 1.0) * 0.4;','        local = rotate2d(tilt) * local;','        local.x += (2.0 * fbm((local + vec2(anchorX, 0.0)) * uSize + 0.8 * iTime * uSpeed + vec2(float(i) * 12.3, float(i) * 27.1)) - 1.0) * 0.4;','        float dist = abs(local.x);','        col += baseColor * (flicker / dist) * weights[i];','    }','    col *= uIntensity;','    gl_FragColor = vec4(col, 1.0);','}'].join('\n');var gl=canvas.getContext('webgl',{antialias:!1,alpha:!0,premultipliedAlpha:!1,preserveDrawingBuffer:!0});if(!gl){return}
70function compile(type,src){var s=gl.createShader(type);gl.shaderSource(s,src);gl.compileShader(s);return s}
71var program=gl.createProgram();var vertexShader=compile(gl.VERTEX_SHADER,VERT);var fragmentShader=compile(gl.FRAGMENT_SHADER,FRAG);gl.attachShader(program,vertexShader);gl.attachShader(program,fragmentShader);gl.linkProgram(program);gl.deleteShader(vertexShader);gl.deleteShader(fragmentShader);if(!gl.getProgramParameter(program,gl.LINK_STATUS)){return}
72gl.useProgram(program);var buf=gl.createBuffer();gl.bindBuffer(gl.ARRAY_BUFFER,buf);gl.bufferData(gl.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),gl.STATIC_DRAW);var posLoc=gl.getAttribLocation(program,'aPosition');gl.enableVertexAttribArray(posLoc);gl.vertexAttribPointer(posLoc,2,gl.FLOAT,!1,0,0);var uni={resolution:gl.getUniformLocation(program,'iResolution'),time:gl.getUniformLocation(program,'iTime'),hue:gl.getUniformLocation(program,'uHue'),xOffset:gl.getUniformLocation(program,'uXOffset'),speed:gl.getUniformLocation(program,'uSpeed'),intensity:gl.getUniformLocation(program,'uIntensity'),size:gl.getUniformLocation(program,'uSize')};var SETTINGS={hue:198,xOffset:0,speed:1.6,intensity:0.13,size:1.1};var raf=0;var start=performance.now();var timeAnimated=!prefersReducedMotion.matches;var isVisible=!0;function resizeCanvas(){var dpr=Math.min(window.devicePixelRatio||1,2);var width=Math.max(1,Math.round(canvas.clientWidth*dpr));var height=Math.max(1,Math.round(canvas.clientHeight*dpr));if(canvas.width!==width||canvas.height!==height){canvas.width=width;canvas.height=height;gl.viewport(0,0,width,height)}}
73function requestRender(){if(isVisible&&document.visibilityState==='visible'&&raf===0){raf=requestAnimationFrame(render)}}
74function render(now){raf=0;if(!isVisible||document.visibilityState!=='visible'){return}
75resizeCanvas();gl.uniform2f(uni.resolution,canvas.width,canvas.height);gl.uniform1f(uni.time,((now-start)/1000));gl.uniform1f(uni.hue,SETTINGS.hue);gl.uniform1f(uni.xOffset,SETTINGS.xOffset);gl.uniform1f(uni.speed,SETTINGS.speed);gl.uniform1f(uni.intensity,SETTINGS.intensity);gl.uniform1f(uni.size,SETTINGS.size);gl.drawArrays(gl.TRIANGLES,0,6);if(timeAnimated){requestRender()}}
76window.addEventListener('resize',function(){resizeCanvas();requestRender()});document.addEventListener('visibilitychange',requestRender);if('IntersectionObserver' in window){var observer=new IntersectionObserver(function(entries){isVisible=entries[0].isIntersecting;requestRender()},{threshold:0});observer.observe(canvas)}
77requestRender()}
78function initAddToCartIcon(){var buttons=document.querySelectorAll('.wd-product .wd-add-btn .add_to_cart_button');if(!buttons.length){return}
79var iconMarkup='<span class="fv-cart-icon" aria-hidden="true">'+'<svg class="fv-cart-icon__cart" viewBox="0 0 24 24" fill="none"><path d="M3 3h2l2.4 12.4a2 2 0 0 0 2 1.6h8.4a2 2 0 0 0 2-1.6L21 8H6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="9" cy="20" r="1.4" fill="currentColor"/><circle cx="18" cy="20" r="1.4" fill="currentColor"/></svg>
79'+'<svg class="fv-cart-icon__check" viewBox="0 0 24 24" fill="none"><path d="M4 12l5 5L20 6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>'+'<svg class="fv-cart-icon__spinner" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-dasharray="16 100"/></svg>'+'</span>';buttons.forEach(function(button){if(button.querySelector('.fv-cart-icon')){return}
80button.insertAdjacentHTML('afterbegin',iconMarkup)})}
81function initBuyNowLoopButtons(){var wraps=document.querySelectorAll('.wd-product .fc-price-cart-row .wd-add-btn');wraps.forEach(function(wrap){var row=wrap.closest('.fc-price-cart-row');var product=wrap.closest('.wd-product');var addBtn=wrap.querySelector('.add_to_cart_button');if(!row||!product||!addBtn||product.querySelector('.fv-cart-actions')){return}
82var productId=addBtn.getAttribute('data-product_id');if(!productId){return}
83var label=addBtn.querySelector('.wd-action-text');if(label&&!label.dataset.fvShortened){label.dataset.fvFullText=label.textContent;label.textContent='Add';label.dataset.fvShortened='1'}
84var actions=document.createElement('div');actions.className='fv-cart-actions';var buyNow=document.createElement('a');buyNow.className='fv-buy-now-loop';buyNow.href='/?add-to-cart='+productId+'&wd-add-to-cart='+productId;buyNow.textContent='Buy Now';row.parentElement.insertBefore(actions,row.nextSibling);actions.appendChild(wrap);actions.appendChild(buyNow)})}
85function initAddToCartMorph(){if(typeof window.jQuery==='undefined'){return}
86window.jQuery(document.body).on('added_to_cart',function(event,fragments,cartHash,$button){var button=$button&&$button.get?$button.get(0):null;var productId=button?button.getAttribute('data-product_id'):null;if(!productId){return}
87document.querySelectorAll('.add_to_cart_button[data-product_id="'+productId+'"]').forEach(function(match){if(match.classList.contains('fv-in-cart')){return}
88match.classList.add('fv-in-cart');var parent=match.parentElement;var attempts=0;(function renameViewCartLink(){var viewCartLink=parent?parent.querySelector('.added_to_cart'):null;if(viewCartLink){viewCartLink.textContent='View Cart'}else if(attempts++<5){setTimeout(renameViewCartLink,100)}})()})});function syncInCartButtons(){var inCartButtons=document.querySelectorAll('.add_to_cart_button.fv-in-cart');if(!inCartButtons.length){return}
89fetch('/wp-json/wc/store/v1/cart').then(function(response){return response.json()}).then(function(cart){var idsInCart={};(cart.items||[]).forEach(function(item){idsInCart[item.id]=!0});inCartButtons.forEach(function(match){var productId=Number(match.getAttribute('data-product_id'));if(idsInCart[productId]){return}
90match.classList.remove('fv-in-cart');var parent=match.parentElement;var viewCartLink=parent?parent.querySelector('.added_to_cart'):null;if(viewCartLink){viewCartLink.remove()}})}).catch(function(){})}
91window.jQuery(document.body).on('removed_from_cart item_removed_from_classic_cart wc_cart_emptied updated_cart_totals',syncInCartButtons)}
92function decodeHtmlEntities(str){var div=document.createElement('div');div.innerHTML=str||'';return div.textContent||''}
93function buildPriceMarkup(html){var div=document.createElement('div');div.innerHTML=html||'';div.querySelectorAll('.screen-reader-text').forEach(function(el){el.remove()});return div.innerHTML}
94function initHeroSearchAutocomplete(){var input=document.querySelector('.fv-hero-search__input');var form=input?input.closest('.fv-hero-search'):null;if(!input||!form||typeof window.fetch==='undefined'){return}
95var panel=document.createElement('div');panel.className='fv-hero-search__results';panel.setAttribute('role','listbox');document.body.appendChild(panel);input.setAttribute('aria-expanded','false');input.setAttribute('role','combobox');input.setAttribute('aria-autocomplete','list');var debounceTimer=null;var activeIndex=-1;var items=[];var controller=null;function positionPanel(){var rect=input.getBoundingClientRect();var formRect=form.getBoundingClientRect();panel.style.left=formRect.left+'px';panel.style.width=formRect.width+'px';panel.style.top=(rect.bottom+10)+'px'}
96function closePanel(){panel.classList.remove('is-open');panel.innerHTML='';items=[];activeIndex=-1;input.setAttribute('aria-expanded','false');window.removeEventListener('scroll',positionPanel,!0);window.removeEventListener('resize',positionPanel)}
97function setActive(index){activeIndex=index;items.forEach(function(item,i){item.classList.toggle('is-active',i===activeIndex)});if(activeIndex>-1){items[activeIndex].scrollIntoView({block:'nearest'})}}
98function openPanel(){positionPanel();panel.classList.add('is-open');input.setAttribute('aria-expanded','true');window.addEventListener('scroll',positionPanel,!0);window.addEventListener('resize',positionPanel)}
99function renderStatus(text){panel.innerHTML='<div class="fv-hero-search__status">'+text+'</div>';openPanel();items=[];activeIndex=-1}
100function renderResults(products){panel.innerHTML='';items=products.map(function(product){var a=document.createElement('a');a.className='fv-hero-search__item';a.href=product.permalink;a.setAttribute('role','option');var img=product.images&&product.images[0]?product.images[0].thumbnail:'';var imgEl=document.createElement(img?'img':'span');imgEl.className='fv-hero-search__item-img';if(img){imgEl.src=img;imgEl.alt='';imgEl.loading='lazy'}
101var textWrap=document.createElement('span');textWrap.className='fv-hero-search__item-text';var nameEl=document.createElement('span');nameEl.className='fv-hero-search__item-name';nameEl.textContent=decodeHtmlEntities(product.name);var priceEl=document.createElement('span');priceEl.className='fv-hero-search__item-price';priceEl.innerHTML=buildPriceMarkup(product.price_html);textWrap.appendChild(nameEl);textWrap.appendChild(priceEl);a.appendChild(imgEl);a.appendChild(textWrap);panel.appendChild(a);return a});openPanel()}
102function search(term){if(controller){controller.abort()}
103controller=new AbortController();renderStatus('Searching…');fetch('/wp-json/wc/store/v1/products?search='+encodeURIComponent(term)+'&per_page=6',{signal:controller.signal}).then(function(res){return res.ok?res.json():[]}).then(function(products){if(!products||!products.length){renderStatus('No products found');return}
104renderResults(products)}).catch(function(err){if(err.name!=='AbortError'){closePanel()}})}
105input.addEventListener('input',function(){var term=input.value.trim();clearTimeout(debounceTimer);if(term.length<2){if(controller){controller.abort()}
106closePanel();return}
107debounceTimer=setTimeout(function(){search(term)},300)});input.addEventListener('keydown',function(e){if(!panel.classList.contains('is-open')||!items.length){return}
108if(e.key==='ArrowDown'){e.preventDefault();setActive(Math.min(activeIndex+1,items.length-1))}else if(e.key==='ArrowUp'){e.preventDefault();setActive(Math.max(activeIndex-1,0))}else if(e.key==='Enter'&&activeIndex>-1){e.preventDefault();window.location.href=items[activeIndex].href}else if(e.key==='Escape'){closePanel()}});document.addEventListener('click',function(e){if(!form.contains(e.target)&&!panel.contains(e.target)){closePanel()}})}
109function initFooterSignature(){var root=document.querySelector('[data-fv-footer-signature]');if(!root){return}
110var svg=root.querySelector('svg');var mask=root.querySelector('[data-fv-footer-mask]');if(!svg||!mask){return}
111var target={x:50,y:50};var current={x:50,y:50};var raf=0;function apply(){mask.setAttribute('cx',current.x+'%');mask.setAttribute('cy',current.y+'%')}
112function loop(){current.x+=(target.x-current.x)*0.18;current.y+=(target.y-current.y)*0.18;apply();if(Math.abs(target.x-current.x)>0.1||Math.abs(target.y-current.y)>0.1){raf=requestAnimationFrame(loop)}else{raf=0}}
113svg.addEventListener('pointermove',function(e){var rect=svg.getBoundingClientRect();target.x=((e.clientX-rect.left)/rect.width)*100;target.y=((e.clientY-rect.top)/rect.height)*100;if(prefersReducedMotion.matches){current.x=target.x;current.y=target.y;apply();return}
114if(!raf){raf=requestAnimationFrame(loop)}});if('IntersectionObserver' in window){var observer=new IntersectionObserver(function(entries){if(entries[0].isIntersecting){root.classList.add('is-visible');observer.disconnect()}},{threshold:0.3});observer.observe(root)}else{root.classList.add('is-visible')}}
115function initStatCounters(){var counters=document.querySelectorAll('.fv-stat-card .elementor-counter-number-wrapper');if(!counters.length){return}
116counters.forEach(function(el){var match=el.textContent.trim().match(/^(\d+)(.*)$/);if(!match){return}
117var target=parseInt(match[1],10);var suffix=match[2]||'';if(prefersReducedMotion.matches){return}
118el.textContent='0'+suffix;if(!('IntersectionObserver' in window)){el.textContent=target+suffix;return}
119var observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){if(!entry.isIntersecting){return}
120observer.disconnect();var duration=1600;var start=null;function step(now){if(start===null){start=now}
121var progress=Math.min((now-start)/duration,1);var eased=1-Math.pow(1-progress,3);el.textContent=Math.round(target*eased)+suffix;if(progress<1){requestAnimationFrame(step)}}
122requestAnimationFrame(step)})},{threshold:0.4});observer.observe(el)})}
123function initFaqAccordion(){var buttons=document.querySelectorAll('.fv-faq-q');
123buttons.forEach(function(btn){btn.addEventListener('click',function(){var item=btn.closest('.fv-faq-item');var isOpen=item.classList.toggle('is-open');btn.setAttribute('aria-expanded',isOpen?'true':'false')})})}
124document.addEventListener('DOMContentLoaded',function(){initHeaderShadow();initScrollReveal();initReviewsDrag();initOriginRipple();initAddToCartFlight();initCategoryShowcase();initLetterSwapNav();initProductGallery();initArchiveBannerCircuit();initHeroBackdropHeight();initHeroLightning();initHeroTrustbar();initHeroSearchAutocomplete();initFaqAccordion();initStatCounters();initFooterSignature();initAddToCartIcon();initAddToCartMorph();initBuyNowLoopButtons();if(typeof window.jQuery!=='undefined'){window.jQuery(document.body).on('wc_fragments_refreshed wc_fragments_loaded added_to_cart',initOriginRipple);window.jQuery(document.body).on('wc_fragments_refreshed wc_fragments_loaded',initAddToCartIcon);window.jQuery(document.body).on('wc_fragments_refreshed wc_fragments_loaded',initBuyNowLoopButtons)}})})()

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.