NODEDC_SITE/assets/custom/js/app.js

693 lines
295 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>{var{defineProperty:KQ,getOwnPropertyNames:M6,getOwnPropertyDescriptor:z6}=Object,Y6=Object.prototype.hasOwnProperty;var lH=new WeakMap,N6=(Q)=>{var $=lH.get(Q),J;if($)return $;if($=KQ({},"__esModule",{value:!0}),Q&&typeof Q==="object"||typeof Q==="function")M6(Q).map((H)=>!Y6.call($,H)&&KQ($,H,{get:()=>Q[H],enumerable:!(J=z6(Q,H))||J.enumerable}));return lH.set(Q,$),$};var r=(Q,$)=>{for(var J in $)KQ(Q,J,{get:$[J],enumerable:!0,configurable:!0,set:(H)=>$[J]=()=>H})};var i4={};r(i4,{App:()=>l4});var D6="1.3.4";function rH(Q,$,J){return Math.max(Q,Math.min($,J))}function F6(Q,$,J){return(1-J)*Q+J*$}function V6(Q,$,J,H){return F6(Q,$,1-Math.exp(-J*H))}function R6(Q,$){return(Q%$+$)%$}var C6=class{isRunning=!1;value=0;from=0;to=0;currentTime=0;lerp;duration;easing;onUpdate;advance(Q){if(!this.isRunning)return;let $=!1;if(this.duration&&this.easing){this.currentTime+=Q;let J=rH(0,this.currentTime/this.duration,1);$=J>=1;let H=$?1:this.easing(J);this.value=this.from+(this.to-this.from)*H}else if(this.lerp){if(this.value=V6(this.value,this.to,this.lerp*60,Q),Math.round(this.value)===this.to)this.value=this.to,$=!0}else this.value=this.to,$=!0;if($)this.stop();this.onUpdate?.(this.value,$)}stop(){this.isRunning=!1}fromTo(Q,$,{lerp:J,duration:H,easing:Z,onStart:q,onUpdate:K}){this.from=this.value=Q,this.to=$,this.lerp=J,this.duration=H,this.easing=Z,this.currentTime=0,this.isRunning=!0,q?.(),this.onUpdate=K}};function E6(Q,$){let J;return function(...H){let Z=this;clearTimeout(J),J=setTimeout(()=>{J=void 0,Q.apply(Z,H)},$)}}var O6=class{constructor(Q,$,{autoResize:J=!0,debounce:H=250}={}){if(this.wrapper=Q,this.content=$,J){if(this.debouncedResize=E6(this.resize,H),this.wrapper instanceof Window)window.addEventListener("resize",this.debouncedResize,!1);else this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper);this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)}this.resize()}width=0;height=0;scrollHeight=0;scrollWidth=0;debouncedResize;wrapperResizeObserver;contentResizeObserver;destroy(){if(this.wrapperResizeObserver?.disconnect(),this.contentResizeObserver?.disconnect(),this.wrapper===window&&this.debouncedResize)window.removeEventListener("resize",this.debouncedResize,!1)}resize=()=>{this.onWrapperResize(),this.onContentResize()};onWrapperResize=()=>{if(this.wrapper instanceof Window)this.width=window.innerWidth,this.height=window.innerHeight;else this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight};onContentResize=()=>{if(this.wrapper instanceof Window)this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth;else this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth};get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},aH=class{events={};emit(Q,...$){let J=this.events[Q]||[];for(let H=0,Z=J.length;H<Z;H++)J[H]?.(...$)}on(Q,$){return this.events[Q]?.push($)||(this.events[Q]=[$]),()=>{this.events[Q]=this.events[Q]?.filter((J)=>$!==J)}}off(Q,$){this.events[Q]=this.events[Q]?.filter((J)=>$!==J)}destroy(){this.events={}}},iH=16.666666666666668,v$={passive:!1},A6=class{constructor(Q,$={wheelMultiplier:1,touchMultiplier:1}){this.element=Q,this.options=$,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,v$),this.element.addEventListener("touchstart",this.onTouchStart,v$),this.element.addEventListener("touchmove",this.onTouchMove,v$),this.element.addEventListener("touchend",this.onTouchEnd,v$)}touchStart={x:0,y:0};lastDelta={x:0,y:0};window={width:0,height:0};emitter=new aH;on(Q,$){return this.emitter.on(Q,$)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,v$),this.element.removeEventListener("touchstart",this.onTouchStart,v$),this.element.removeEventListener("touchmove",this.onTouchMove,v$),this.element.removeEventListener("touchend",this.onTouchEnd,v$)}onTouchStart=(Q)=>{let{clientX:$,clientY:J}=Q.targetTouches?Q.targetTouches[0]:Q;this.touchStart.x=$,this.touchStart.y=J,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:Q})};onTouchMove=(Q)=>{let{clientX:$,clientY:J}=Q.targetTouches?Q.targetTouches[0]:Q,H=-($-this.touchStart.x)*this.options.touchMultiplier,Z=-(J-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=$,this.touchStart.y=J,this.lastDelta={x:H,y:Z},this.emitter.emit("scroll",{deltaX:H,deltaY:Z,event:Q})};onTouchEnd=(Q)=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:Q})};onWheel=(Q)=>{let{deltaX:$,deltaY:J,deltaMode:H}=Q,Z=H===1?iH:H===2?this.window.width:1,q=H===1?iH:H===2?this.window.height:1;$*=Z,J*=q,$*=this.options.wheelMultiplier,J*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:$,deltaY:J,event:Q})};onWindowResize=()=>{this.window={width:window.innerWidth,height:window.innerHeight}}},nH=(Q)=>Math.min(1,1.001-Math.pow(2,-10*Q)),tH=class{_isScrolling=!1;_isStopped=!1;_isLocked=!1;_preventNextNativeScrollEvent=!1;_resetVelocityTimeout=null;__rafID=null;isTouching;time=0;userData={};lastVelocity=0;velocity=0;direction=0;options;targetScroll;animatedScroll;animate=new C6;emitter=new aH;dimensions;virtualScroll;constructor({wrapper:Q=window,content:$=document.documentElement,eventsTarget:J=Q,smoothWheel:H=!0,syncTouch:Z=!1,syncTouchLerp:q=0.075,touchInertiaMultiplier:K=35,duration:G,easing:U,lerp:W=0.1,infinite:X=!1,orientation:j="vertical",gestureOrientation:L="vertical",touchMultiplier:B=1,wheelMultiplier:M=1,autoResize:I=!0,prevent:z,virtualScroll:R,overscroll:F=!0,autoRaf:V=!1,anchors:Y=!1,autoToggle:N=!1,allowNestedScroll:C=!1,__experimental__naiveDimensions:D=!1}={}){if(window.lenisVersion=D6,!Q||Q===document.documentElement)Q=window;if(typeof G==="number"&&typeof U!=="function")U=nH;else if(typeof U==="function"&&typeof G!=="number")G=1;if(this.options={wrapper:Q,content:$,eventsTarget:J,smoothWheel:H,syncTouch:Z,syncTouchLerp:q,touchInertiaMultiplier:K,duration:G,easing:U,lerp:W,infinite:X,gestureOrientation:L,orientation:j,touchMultiplier:B,wheelMultiplier:M,autoResize:I,prevent:z,virtualScroll:R,overscroll:F,autoRaf:V,anchors:Y,autoToggle:N,allowNestedScroll:C,__experimental__naiveDimensions:D},this.dimensions=new O6(Q,$,{autoResize:I}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.anchors&&this.options.wrapper===window)this.options.wrapper.addEventListener("click",this.onClick,!1);if(this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new A6(J,{touchMultiplier:B,wheelMultiplier:M}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle)this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0});if(this.options.autoRaf)this.__rafID=requestAnimationFrame(this.raf)}destroy(){if(this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),this.options.anchors&&this.options.wrapper===window)this.options.wrapper.removeEventListener("click",this.onClick,!1);if(this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this.__rafID)cancelAnimationFrame(this.__rafID)}on(Q,$){return this.emitter.on(Q,$)}off(Q,$){return this.emitter.off(Q,$)}onScrollEnd=(Q)=>{if(!(Q instanceof CustomEvent)){if(this.isScrolling==="smooth"||this.isScrolling===!1)Q.stopPropagation()}};dispatchScrollendEvent=()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))};onTransitionEnd=(Q)=>{if(Q.propertyName.includes("overflow")){let $=this.isHorizontal?"overflow-x":"overflow-y",J=getComputedStyle(this.rootElement)[$];if(["hidden","clip"].includes(J))this.stop();else this.start()}};setScroll(Q){if(this.isHorizontal)this.options.wrapper.scrollTo({left:Q,behavior:"instant"});else this.options.wrapper.scrollTo({top:Q,behavior:"instant"})}onClick=(Q)=>{let J=Q.composedPath().find((H)=>H instanceof HTMLAnchorElement&&(H.getAttribute("href")?.startsWith("#")||H.getAttribute("href")?.startsWith("/#")||H.getAttribute("href")?.startsWith("./#")));if(J){let H=J.getAttribute("href");if(H){let Z=typeof this.options.anchors==="object"&&this.options.anchors?this.options.anchors:void 0,q=`#${H.split("#")[1]}`;if(["#","/#","./#","#top","/#top","./#top"].includes(H))q=0;this.scrollTo(q,Z)}}};onPointerDown=(Q)=>{if(Q.button===1)this.reset()};onVirtualScroll=(Q)=>{if(typeof this.options.virtualScroll==="function"&&this.options.virtualScroll(Q)===!1)return;let{deltaX:$,deltaY:J,event:H}=Q;if(this.emitter.emit("virtual-scroll",{deltaX:$,deltaY:J,event:H}),H.ctrlKey)return;if(H.lenisStopPropagation)return;let Z=H.type.includes("touch"),q=H.type.includes("wheel");this.isTouching=H.type==="touchstart"||H.type==="touchmove";let K=$===0&&J===0;if(this.options.syncTouch&&Z&&H.type==="touchstart"&&K&&!this.isStopped&&!this.isLocked){this.reset();return}let U=this.options.gestureOrientation==="vertical"&&J===0||this.options.gestureOrientation==="horizontal"&&$===0;if(K||U)return;let W=H.composedPath();W=W.slice(0,W.indexOf(this.rootElement));let X=this.options.prevent;if(W.find((z)=>z instanceof HTMLElement&&(typeof X==="function"&&X?.(z)||z.hasAttribute?.("data-lenis-prevent")||Z&&z.hasAttribute?.("data-lenis-prevent-touch")||q&&z.hasAttribute?.("data-lenis-prevent-wheel")||this.options.allowNestedScroll&&this.checkNestedScroll(z,{deltaX:$,deltaY:J}))))return;if(this.isStopped||this.isLocked){H.preventDefault();return}if(!(this.options.syncTouch&&Z||this.options.smoothWheel&&q)){this.isScrolling="native",this.animate.stop(),H.lenisStopPropagation=!0;return}let L=J;if(this.options.gestureOrientation==="both")L=Math.abs(J)>Math.abs($)?J:$;else if(this.options.gestureOrientation==="horizontal")L=$;if(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&J>0||this.animatedScroll===this.limit&&J<0))H.lenisStopPropagation=!0;H.preventDefault();let B=Z&&this.options.syncTouch,I=Z&&H.type==="touchend"&&Math.abs(L)>5;if(I)L=this.velocity*this.options.touchInertiaMultiplier;this.scrollTo(this.targetScroll+L,{programmatic:!1,...B?{lerp:I?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})};resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}onNativeScroll=()=>{if(this._resetVelocityTimeout!==null)clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null;if(this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){let Q=this.animatedScroll;if(this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-Q,this.direction=Math.sign(this.animatedScroll-Q),!this.isStopped)this.isScrolling="native";if(this.emit(),this.velocity!==0)this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400)}};reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(!this.isStopped)return;this.reset(),this.isStopped=!1,this.emit()}stop(){if(this.isStopped)return;this.reset(),this.isStopped=!0,this.emit()}raf=(Q)=>{let $=Q-(this.time||Q);if(this.time=Q,this.animate.advance($*0.001),this.options.autoRaf)this.__rafID=requestAnimationFrame(this.raf)};scrollTo(Q,{offset:$=0,immediate:J=!1,lock:H=!1,duration:Z=this.options.duration,easing:q=this.options.easing,lerp:K=this.options.lerp,onStart:G,onComplete:U,force:W=!1,programmatic:X=!0,userData:j}={}){if((this.isStopped||this.isLocked)&&!W)return;if(typeof Q==="string"&&["top","left","start"].includes(Q))Q=0;else if(typeof Q==="string"&&["bottom","right","end"].includes(Q))Q=this.limit;else{let L;if(typeof Q==="string")L=document.querySelector(Q);else if(Q instanceof HTMLElement&&Q?.nodeType)L=Q;if(L){if(this.options.wrapper!==window){let M=this.rootElement.getBoundingClientRect();$-=this.isHorizontal?M.left:M.top}let B=L.getBoundingClientRect();Q=(this.isHorizontal?B.left:B.top)+this.animatedScroll}}if(typeof Q!=="number")return;if(Q+=$,Q=Math.round(Q),this.options.infinite){if(X){this.targetScroll=this.animatedScroll=this.scroll;let L=Q-this.animatedScroll;if(L>this.limit/2)Q=Q-this.limit;else if(L<-this.limit/2)Q=Q+this.limit}}else Q=rH(0,Q,this.limit);if(Q===this.targetScroll){G?.(this),U?.(this);return}if(this.userData=j??{},J){this.animatedScroll=this.targetScroll=Q,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),U?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}if(!X)this.targetScroll=Q;if(typeof Z==="number"&&typeof q!=="function")q=nH;else if(typeof q==="function"&&typeof Z!=="number")Z=1;this.animate.fromTo(this.animatedScroll,Q,{duration:Z,easing:q,lerp:K,onStart:()=>{if(H)this.isLocked=!0;this.isScrolling="smooth",G?.(this)},onUpdate:(L,B)=>{if(this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=L-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=L,this.setScroll(this.scroll),X)this.targetScroll=L;if(!B)this.emit();if(B)this.reset(),this.emit(),U?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent()}})}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(Q,{deltaX:$,deltaY:J}){let H=Date.now(),Z=Q._lenis??={},q,K,G,U,W,X,j,L,B=this.options.gestureOrientation;if(H-(Z.time??0)>2000){Z.time=Date.now();let N=window.getComputedStyle(Q);Z.computedStyle=N;let{overflowX:C,overflowY:D}=N;if(q=["auto","overlay","scroll"].includes(C),K=["auto","overlay","scroll"].includes(D),Z.hasOverflowX=q,Z.hasOverflowY=K,!q&&!K)return!1;if(B==="vertical"&&!K)return!1;if(B==="horizontal"&&!q)return!1;W=Q.scrollWidth,X=Q.scrollHeight,j=Q.clientWidth,L=Q.clientHeight,G=W>j,U=X>L,Z.isScrollableX=G,Z.isScrollableY=U,Z.scrollWidth=W,Z.scrollHeight=X,Z.clientWidth=j,Z.clientHeight=L}else G=Z.isScrollableX,U=Z.isScrollableY,q=Z.hasOverflowX,K=Z.hasOverflowY,W=Z.scrollWidth,X=Z.scrollHeight,j=Z.clientWidth,L=Z.clientHeight;if(!q&&!K||!G&&!U)return!1;if(B==="vertical"&&(!K||!U))return!1;if(B==="horizontal"&&(!q||!G))return!1;let M;if(B==="horizontal")M="x";else if(B==="vertical")M="y";else{let N=$!==0,C=J!==0;if(N&&q&&G)M="x";if(C&&K&&U)M="y"}if(!M)return!1;let I,z,R,F,V;if(M==="x")I=Q.scrollLeft,z=W-j,R=$,F=q,V=G;else if(M==="y")I=Q.scrollTop,z=X-L,R=J,F=K,V=U;else return!1;return(R>0?I<z:I>0)&&F&&V}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){if(this.options.__experimental__naiveDimensions)if(this.isHorizontal)return this.rootElement.scrollWidth-this.rootElement.clientWidth;else return this.rootElement.scrollHeight-this.rootElement.clientHeight;else return this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){let Q=this.options.wrapper;return this.isHorizontal?Q.scrollX??Q.scrollLeft:Q.scrollY??Q.scrollTop}get scroll(){return this.options.infinite?R6(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(Q){if(this._isScrolling!==Q)this._isScrolling=Q,this.updateClassName()}get isStopped(){return this._isStopped}set isStopped(Q){if(this._isStopped!==Q)this._isStopped=Q,this.updateClassName()}get isLocked(){return this._isLocked}set isLocked(Q){if(this._isLocked!==Q)this._isLocked=Q,this.updateClassName()}get isSmooth(){return this.isScrolling==="smooth"}get className(){let Q="lenis";if(this.options.autoToggle)Q+=" lenis-autoToggle";if(this.isStopped)Q+=" lenis-stopped";if(this.isLocked)Q+=" lenis-locked";if(this.isScrolling)Q+=" lenis-scrolling";if(this.isScrolling==="smooth")Q+=" lenis-smooth";return Q}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}};function V$(Q){if(Q===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Q}function KZ(Q,$){Q.prototype=Object.create($.prototype),Q.prototype.constructor=Q,Q.__proto__=$}/*!
* GSAP 3.13.0
* https://gsap.com
*
* @license Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/var O1={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},S9={duration:0.5,overwrite:!1,delay:0},OQ,Q1,O0,d1=1e8,I0=1/d1,IQ=Math.PI*2,P6=IQ/4,k6=0,GZ=Math.sqrt,x6=Math.cos,w6=Math.sin,s0=function Q($){return typeof $==="string"},T0=function Q($){return typeof $==="function"},C$=function Q($){return typeof $==="number"},K7=function Q($){return typeof $==="undefined"},W$=function Q($){return typeof $==="object"},E1=function Q($){return $!==!1},AQ=function Q(){return typeof window!=="undefined"},a8=function Q($){return T0($)||s0($)},UZ=typeof ArrayBuffer==="function"&&ArrayBuffer.isView||function(){},G1=Array.isArray,MQ=/(?:-?\.?\d|\.)+/gi,PQ=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,q9=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,GQ=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,kQ=/[+-]=-?[.\d]+/,WZ=/[^,'"\[\]\s]+/gi,S6=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,x0,G$,zQ,xQ,b1={},Q7={},XZ,jZ=function Q($){return(Q7=b9($,b1))&&U1},G7=function Q($,J){return console.warn("Invalid property",$,"set to",J,"Missing plugin? gsap.registerPlugin()")},L8=function Q($,J){return!J&&console.warn($)},BZ=function Q($,J){return $&&(b1[$]=J)&&Q7&&(Q7[$]=J)||b1},I8=function Q(){return 0},b6={suppressEvents:!0,isStart:!0,kill:!1},t8={suppressEvents:!0,kill:!1},T6={suppressEvents:!0},wQ={},m$=[],YQ={},LZ,R1={},UQ={},eH=30,e8=[],SQ="",bQ=function Q($){var J=$[0],H,Z;if(W$(J)||T0(J)||($=[$]),!(H=(J._gsap||{}).harness)){Z=e8.length;while(Z--&&!e8[Z].targetTest(J));H=e8[Z]}Z=$.length;while(Z--)$[Z]&&($[Z]._gsap||($[Z]._gsap=new fQ($[Z],H)))||$.splice(Z,1);return $},d$=function Q($){return $._gsap||bQ(g1($))[0]._gsap},TQ=function Q($,J,H){return(H=$[J])&&T0(H)?$[J]():K7(H)&&$.getAttribute&&$.getAttribute(J)||H},L1=function Q($,J){return($=$.split(",")).forEach(J)||$},y0=function Q($){return Math.round($*1e5)/1e5||0},d0=function Q($){return Math.round($*1e7)/1e7||0},K9=function Q($,J){var H=J.charAt(0),Z=parseFloat(J.substr(2));return $=parseFloat($),H==="+"?$+Z:H==="-"?$-Z:H==="*"?$*Z:$/Z},y6=function Q($,J){var H=J.length,Z=0;for(;$.indexOf(J[Z])<0&&++Z<H;);return Z<H},J7=function Q(){var $=m$.length,J=m$.slice(0),H,Z;YQ={},m$.length=0;for(H=0;H<$;H++)Z=J[H],Z&&Z._lazy&&(Z.render(Z._lazy[0],Z._lazy[1],!0)._lazy=0)},yQ=function Q($){return!!($._initted||$._startAt||$.add)},IZ=function Q($,J,H,Z){m$.length&&!Q1&&J7(),$.render(J,H,Z||!!(Q1&&J<0&&yQ($))),m$.length&&!Q1&&J7()},MZ=function Q($){var J=parseFloat($);return(J||J===0)&&($+"").match(WZ).length<2?J:s0($)?$.trim():$},zZ=function Q($){return $},A1=function Q($,J){for(var H in J)H in $||($[H]=J[H]);return $},h6=function Q($){return function(J,H){for(var Z in H)Z in J||Z==="duration"&&$||Z==="ease"||(J[Z]=H[Z])}},b9=function Q($,J){for(var H in J)$[H]=J[H];return $},$Z=function Q($,J){for(var H in J)H!=="__proto__"&&H!=="constructor"&&H!=="prototype"&&($[H]=W$(J[H])?Q($[H]||($[H]={}),J[H]):J[H]);return $},H7=function Q($,J){var H={},Z;for(Z in $)Z in J||(H[Z]=$[Z]);return H},X8=function Q($){var J=$.parent||x0,H=$.keyframes?h6(G1($.keyframes)):A1;if(E1($.inherit))while(J)H($,J.vars.defaults),J=J.parent||J._dp;return $},f6=function Q($,J){var H=$.length,Z=H===J.length;while(Z&&H--&&$[H]===J[H]);return H<0},YZ=function Q($,J,H,Z,q){if(H===void 0)H="_first";if(Z===void 0)Z="_last";var K=$[Z],G;if(q){G=J[q];while(K&&K[q]>G)K=K._prev}if(K)J._next=K._next,K._next=J;else J._next=$[H],$[H]=J;if(J._next)J._next._prev=J;else $[Z]=J;return J._prev=K,J.parent=J._dp=$,J},Y8=function Q($,J,H,Z){if(H===void 0)H="_first";if(Z===void 0)Z="_last";var{_prev:q,_next:K}=J;if(q)q._next=K;else if($[H]===J)$[H]=K;if(K)K._prev=q;else if($[Z]===J)$[Z]=q;J._next=J._prev=J.parent=null},g$=function Q($,J){$.parent&&(!J||$.parent.autoRemoveChildren)&&$.parent.remove&&$.parent.remove($),$._act=0},J9=function Q($,J){if($&&(!J||J._end>$._dur||J._start<0)){var H=$;while(H)H._dirty=1,H=H.parent}return $},_6=function Q($){var J=$.parent;while(J&&J.parent)J._dirty=1,J.totalDuration(),J=J.parent;return $},NQ=function Q($,J,H,Z){return $._startAt&&(Q1?$._startAt.revert(t8):$.vars.immediateRender&&!$.vars.autoRevert||$._startAt.render(J,!0,Z))},v6=function Q($){return!$||$._ts&&Q($.parent)},QZ=function Q($){return $._repeat?T9($._tTime,$=$.duration()+$._rDelay)*$:0},T9=function Q($,J){var H=Math.floor($=d0($/J));return $&&H===$?H-1:H},Z7=function Q($,J){return($-J._start)*J._ts+(J._ts>=0?0:J._dirty?J.totalDuration():J._tDur)},U7=function Q($){return $._end=d0($._start+($._tDur/Math.abs($._ts||$._rts||I0)||0))},W7=function Q($,J){var H=$._dp;if(H&&H.smoothChildTiming&&$._ts)$._start=d0(H._time-($._ts>0?J/$._ts:(($._dirty?$.totalDuration():$._tDur)-J)/-$._ts)),U7($),H._dirty||J9(H,$);return $},NZ=function Q($,J){var H;if(J._time||!J._dur&&J._initted||J._start<$._time&&(J._dur||!J.add)){if(H=Z7($.rawTime(),J),!J._dur||N8(0,J.totalDuration(),H)-J._tTime>I0)J.render(H,!0)}if(J9($,J)._dp&&$._initted&&$._time>=$._dur&&$._ts){if($._dur<$.duration()){H=$;while(H._dp)H.rawTime()>=0&&H.totalTime(H._tTime),H=H._dp}$._zTime=-I0}},U$=function Q($,J,H,Z){return J.parent&&g$(J),J._start=d0((C$(H)?H:H||$!==x0?m1($,H,J):$._time)+J._delay),J._end=d0(J._start+(J.totalDuration()/Math.abs(J.timeScale())||0)),YZ($,J,"_first","_last",$._sort?"_start":0),DQ(J)||($._recent=J),Z||NZ($,J),$._ts<0&&W7($,$._tTime),$},DZ=function Q($,J){return(b1.ScrollTrigger||G7("scrollTrigger",J))&&b1.ScrollTrigger.create(J,$)},FZ=function Q($,J,H,Z,q){if(uQ($,J,q),!$._initted)return 1;if(!H&&$._pt&&!Q1&&($._dur&&$.vars.lazy!==!1||!$._dur&&$.vars.lazy)&&LZ!==C1.frame)return m$.push($),$._lazy=[q,Z],1},u6=function Q($){var J=$.parent;return J&&J._ts&&J._initted&&!J._lock&&(J.rawTime()<0||Q(J))},DQ=function Q($){var J=$.data;return J==="isFromStart"||J==="isStart"},m6=function Q($,J,H,Z){var q=$.ratio,K=J<0||!J&&(!$._start&&u6($)&&!(!$._initted&&DQ($))||($._ts<0||$._dp._ts<0)&&!DQ($))?0:1,G=$._rDelay,U=0,W,X,j;if(G&&$._repeat){if(U=N8(0,$._tDur,J),X=T9(U,G),$._yoyo&&X&1&&(K=1-K),X!==T9($._tTime,G))q=1-K,$.vars.repeatRefresh&&$._initted&&$.invalidate()}if(K!==q||Q1||Z||$._zTime===I0||!J&&$._zTime){if(!$._initted&&FZ($,J,Z,H,U))return;j=$._zTime,$._zTime=J||(H?I0:0),H||(H=J&&!j),$.ratio=K,$._from&&(K=1-K),$._time=0,$._tTime=U,W=$._pt;while(W)W.r(K,W.d),W=W._next;if(J<0&&NQ($,J,H,!0),$._onUpdate&&!H&&S1($,"onUpdate"),U&&$._repeat&&!H&&$.parent&&S1($,"onRepeat"),(J>=$._tDur||J<0)&&$.ratio===K){if(K&&g$($,1),!H&&!Q1)S1($,K?"onComplete":"onReverseComplete",!0),$._prom&&$._prom()}}else if(!$._zTime)$._zTime=J},d6=function Q($,J,H){var Z;if(H>J){Z=$._first;while(Z&&Z._start<=H){if(Z.data==="isPause"&&Z._start>J)return Z;Z=Z._next}}else{Z=$._last;while(Z&&Z._start>=H){if(Z.data==="isPause"&&Z._start<J)return Z;Z=Z._prev}}},y9=function Q($,J,H,Z){var q=$._repeat,K=d0(J)||0,G=$._tTime/$._tDur;return G&&!Z&&($._time*=K/$._dur),$._dur=K,$._tDur=!q?K:q<0?10000000000:d0(K*(q+1)+$._rDelay*q),G>0&&!Z&&W7($,$._tTime=$._tDur*G),$.parent&&U7($),H||J9($.parent,$),$},JZ=function Q($){return $ instanceof $1?J9($):y9($,$._dur)},g6={_start:0,endTime:I8,totalDuration:I8},m1=function Q($,J,H){var Z=$.labels,q=$._recent||g6,K=$.duration()>=d1?q.endTime(!1):$._dur,G,U,W;if(s0(J)&&(isNaN(J)||(J in Z))){if(U=J.charAt(0),W=J.substr(-1)==="%",G=J.indexOf("="),U==="<"||U===">")return G>=0&&(J=J.replace(/=/,"")),(U==="<"?q._start:q.endTime(q._repeat>=0))+(parseFloat(J.substr(1))||0)*(W?(G<0?q:H).totalDuration()/100:1);if(G<0)return J in Z||(Z[J]=K),Z[J];if(U=parseFloat(J.charAt(G-1)+J.substr(G+1)),W&&H)U=U/100*(G1(H)?H[0]:H).totalDuration();return G>1?Q($,J.substr(0,G-1),H)+U:K+U}return J==null?K:+J},j8=function Q($,J,H){var Z=C$(J[1]),q=(Z?2:1)+($<2?0:1),K=J[q],G,U;if(Z&&(K.duration=J[1]),K.parent=H,$){G=K,U=H;while(U&&!("immediateRender"in G))G=U.vars.defaults||{},U=E1(U.vars.inherit)&&U.parent;K.immediateRender=E1(G.immediateRender),$<2?K.runBackwards=1:K.startAt=J[q-1]}return new v0(J[0],K,J[q+1])},c$=function Q($,J){return $||$===0?J($):J},N8=function Q($,J,H){return H<$?$:H>J?J:H},J1=function Q($,J){return!s0($)||!(J=S6.exec($))?"":J[1]},c6=function Q($,J,H){return c$(H,function(Z){return N8($,J,Z)})},FQ=[].slice,VZ=function Q($,J){return $&&W$($)&&"length"in $&&(!J&&!$.length||($.length-1 in $)&&W$($[0]))&&!$.nodeType&&$!==G$},p6=function Q($,J,H){if(H===void 0)H=[];return $.forEach(function(Z){var q;return s0(Z)&&!J||VZ(Z,1)?(q=H).push.apply(q,g1(Z)):H.push(Z)})||H},g1=function Q($,J,H){return O0&&!J&&O0.selector?O0.selector($):s0($)&&!H&&(zQ||!h9())?FQ.call((J||xQ).querySelectorAll($),0):G1($)?p6($,H):VZ($)?FQ.call($,0):$?[$]:[]},VQ=function Q($){return $=g1($)[0]||L8("Invalid scope")||{},function(J){var H=$.current||$.nativeElement||$;return g1(J,H.querySelectorAll?H:H===$?L8("Invalid scope")||xQ.createElement("div"):$)}},RZ=function Q($){return $.sort(function(){return 0.5-Math.random()})},CZ=function Q($){if(T0($))return $;var J=W$($)?$:{each:$},H=H9(J.ease),Z=J.from||0,q=parseFloat(J.base)||0,K={},G=Z>0&&Z<1,U=isNaN(Z)||G,W=J.axis,X=Z,j=Z;if(s0(Z))X=j={center:0.5,edges:0.5,end:1}[Z]||0;else if(!G&&U)X=Z[0],j=Z[1];return function(L,B,M){var I=(M||J).length,z=K[I],R,F,V,Y,N,C,D,O,A;if(!z){if(A=J.grid==="auto"?0:(J.grid||[1,d1])[1],!A){D=-d1;while(D<(D=M[A++].getBoundingClientRect().left)&&A<I);A<I&&A--}z=K[I]=[],R=U?Math.min(A,I)*X-0.5:Z%A,F=A===d1?0:U?I*j/A-0.5:Z/A|0,D=0,O=d1;for(C=0;C<I;C++)V=C%A-R,Y=F-(C/A|0),z[C]=N=!W?GZ(V*V+Y*Y):Math.abs(W==="y"?Y:V),N>D&&(D=N),N<O&&(O=N);Z==="random"&&RZ(z),z.max=D-O,z.min=O,z.v=I=(parseFloat(J.amount)||parseFloat(J.each)*(A>I?I-1:!W?Math.max(A,I/A):W==="y"?I/A:A)||0)*(Z==="edges"?-1:1),z.b=I<0?q-I:q,z.u=J1(J.amount||J.each)||0,H=H&&I<0?bZ(H):H}return I=(z[L]-z.min)/z.max||0,d0(z.b+(H?H(I):I)*z.v)+z.u}},RQ=function Q($){var J=Math.pow(10,(($+"").split(".")[1]||"").length);return function(H){var Z=d0(Math.round(parseFloat(H)/$)*$*J);return(Z-Z%1)/J+(C$(H)?0:J1(H))}},EZ=function Q($,J){var H=G1($),Z,q;if(!H&&W$($))if(Z=H=$.radius||d1,$.values){if($=g1($.values),q=!C$($[0]))Z*=Z}else $=RQ($.increment);return c$(J,!H?RQ($):T0($)?function(K){return q=$(K),Math.abs(q-K)<=Z?q:K}:function(K){var G=parseFloat(q?K.x:K),U=parseFloat(q?K.y:0),W=d1,X=0,j=$.length,L,B;while(j--){if(q)L=$[j].x-G,B=$[j].y-U,L=L*L+B*B;else L=Math.abs($[j]-G);if(L<W)W=L,X=j}return X=!Z||W<=Z?$[X]:K,q||X===K||C$(K)?X:X+J1(K)})},OZ=function Q($,J,H,Z){return c$(G1($)?!J:H===!0?!!(H=0):!Z,function(){return G1($)?$[~~(Math.random()*$.length)]:(H=H||0.00001)&&(Z=H<1?Math.pow(10,(H+"").length-2):1)&&Math.floor(Math.round(($-H/2+Math.random()*(J-$+H*0.99))/H)*H*Z)/Z})},o6=function Q(){for(var $=arguments.length,J=new Array($),H=0;H<$;H++)J[H]=arguments[H];return function(Z){return J.reduce(function(q,K){return K(q)},Z)}},s6=function Q($,J){return function(H){return $(parseFloat(H))+(J||J1(H))}},l6=function Q($,J,H){return PZ($,J,0,1,H)},AZ=function Q($,J,H){return c$(H,function(Z){return $[~~J(Z)]})},i6=function Q($,J,H){var Z=J-$;return G1($)?AZ($,Q(0,$.length),J):c$(H,function(q){return(Z+(q-$)%Z)%Z+$})},n6=function Q($,J,H){var Z=J-$,q=Z*2;return G1($)?AZ($,Q(0,$.length-1),J):c$(H,function(K){return K=(q+(K-$)%q)%q||0,$+(K>Z?q-K:K)})},f9=function Q($){var J=0,H="",Z,q,K,G;while(~(Z=$.indexOf("random(",J)))K=$.indexOf(")",Z),G=$.charAt(Z+7)==="[",q=$.substr(Z+7,K-Z-7).match(G?WZ:MQ),H+=$.substr(J,Z-J)+OZ(G?q:+q[0],G?0:+q[1],+q[2]||0.00001),J=K+1;return H+$.substr(J,$.length-J)},PZ=function Q($,J,H,Z,q){var K=J-$,G=Z-H;return c$(q,function(U){return H+((U-$)/K*G||0)})},r6=function Q($,J,H,Z){var q=isNaN($+J)?0:function(B){return(1-B)*$+B*J};if(!q){var K=s0($),G={},U,W,X,j,L;if(H===!0&&(Z=1)&&(H=null),K)$={p:$},J={p:J};else if(G1($)&&!G1(J)){X=[],j=$.length,L=j-2;for(W=1;W<j;W++)X.push(Q($[W-1],$[W]));j--,q=function B(M){M*=j;var I=Math.min(L,~~M);return X[I](M-I)},H=J}else if(!Z)$=b9(G1($)?[]:{},$);if(!X){for(U in J)_Q.call(G,$,U,"get",J[U]);q=function B(M){return gQ(M,G)||(K?$.p:$)}}}return c$(H,q)},HZ=function Q($,J,H){var Z=$.labels,q=d1,K,G,U;for(K in Z)if(G=Z[K]-J,G<0===!!H&&G&&q>(G=Math.abs(G)))U=K,q=G;return U},S1=function Q($,J,H){var Z=$.vars,q=Z[J],K=O0,G=$._ctx,U,W,X;if(!q)return;return U=Z[J+"Params"],W=Z.callbackScope||$,H&&m$.length&&J7(),G&&(O0=G),X=U?q.apply(W,U):q.call(W),O0=K,X},U8=function Q($){return g$($),$.scrollTrigger&&$.scrollTrigger.kill(!!Q1),$.progress()<1&&S1($,"onInterrupt"),$},w9,kZ=[],xZ=function Q($){if(!$)return;if($=!$.name&&$.default||$,AQ()||$.headless){var J=$.name,H=T0($),Z=J&&!H&&$.init?function(){this._props=[]}:$,q={init:I8,render:gQ,add:_Q,kill:BG,modifier:jG,rawVars:0},K={targetTest:0,get:0,getSetter:X7,aliases:{},register:0};if(h9(),$!==Z){if(R1[J])return;if(A1(Z,A1(H7($,q),K)),b9(Z.prototype,b9(q,H7($,K))),R1[Z.prop=J]=Z,$.targetTest)e8.push(Z),wQ[J]=1;J=(J==="css"?"CSS":J.charAt(0).toUpperCase()+J.substr(1))+"Plugin"}BZ(J,Z),$.register&&$.register(U1,Z,I1)}else kZ.push($)},L0=255,W8={aqua:[0,L0,L0],lime:[0,L0,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,L0],navy:[0,0,128],white:[L0,L0,L0],olive:[128,128,0],yellow:[L0,L0,0],orange:[L0,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[L0,0,0],pink:[L0,192,203],cyan:[0,L0,L0],transparent:[L0,L0,L0,0]},WQ=function Q($,J,H){return $+=$<0?1:$>1?-1:0,($*6<1?J+(H-J)*$*6:$<0.5?H:$*3<2?J+(H-J)*(0.6666666666666666-$)*6:J)*L0+0.5|0},wZ=function Q($,J,H){var Z=!$?W8.black:C$($)?[$>>16,$>>8&L0,$&L0]:0,q,K,G,U,W,X,j,L,B,M;if(!Z){if($.substr(-1)===",")$=$.substr(0,$.length-1);if(W8[$])Z=W8[$];else if($.charAt(0)==="#"){if($.length<6)q=$.charAt(1),K=$.charAt(2),G=$.charAt(3),$="#"+q+q+K+K+G+G+($.length===5?$.charAt(4)+$.charAt(4):"");if($.length===9)return Z=parseInt($.substr(1,6),16),[Z>>16,Z>>8&L0,Z&L0,parseInt($.substr(7),16)/255];$=parseInt($.substr(1),16),Z=[$>>16,$>>8&L0,$&L0]}else if($.substr(0,3)==="hsl"){if(Z=M=$.match(MQ),!J)U=+Z[0]%360/360,W=+Z[1]/100,X=+Z[2]/100,K=X<=0.5?X*(W+1):X+W-X*W,q=X*2-K,Z.length>3&&(Z[3]*=1),Z[0]=WQ(U+0.3333333333333333,q,K),Z[1]=WQ(U,q,K),Z[2]=WQ(U-0.3333333333333333,q,K);else if(~$.indexOf("="))return Z=$.match(PQ),H&&Z.length<4&&(Z[3]=1),Z}else Z=$.match(MQ)||W8.transparent;Z=Z.map(Number)}if(J&&!M){if(q=Z[0]/L0,K=Z[1]/L0,G=Z[2]/L0,j=Math.max(q,K,G),L=Math.min(q,K,G),X=(j+L)/2,j===L)U=W=0;else B=j-L,W=X>0.5?B/(2-j-L):B/(j+L),U=j===q?(K-G)/B+(K<G?6:0):j===K?(G-q)/B+2:(q-K)/B+4,U*=60;Z[0]=~~(U+0.5),Z[1]=~~(W*100+0.5),Z[2]=~~(X*100+0.5)}return H&&Z.length<4&&(Z[3]=1),Z},SZ=function Q($){var J=[],H=[],Z=-1;return $.split(R$).forEach(function(q){var K=q.match(q9)||[];J.push.apply(J,K),H.push(Z+=K.length+1)}),J.c=H,J},ZZ=function Q($,J,H){var Z="",q=($+Z).match(R$),K=J?"hsla(":"rgba(",G=0,U,W,X,j;if(!q)return $;if(q=q.map(function(L){return(L=wZ(L,J,1))&&K+(J?L[0]+","+L[1]+"%,"+L[2]+"%,"+L[3]:L.join(","))+")"}),H){if(X=SZ($),U=H.c,U.join(Z)!==X.c.join(Z)){W=$.replace(R$,"1").split(q9),j=W.length-1;for(;G<j;G++)Z+=W[G]+(~U.indexOf(G)?q.shift()||K+"0,0,0,0)":(X.length?X:q.length?q:H).shift())}}if(!W){W=$.split(R$),j=W.length-1;for(;G<j;G++)Z+=W[G]+q[G]}return Z+W[j]},R$=function(){var Q="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",$;for($ in W8)Q+="|"+$+"\\b";return new RegExp(Q+")","gi")}(),a6=/hsl[a]?\(/,hQ=function Q($){var J=$.join(" "),H;if(R$.lastIndex=0,R$.test(J))return H=a6.test(J),$[1]=ZZ($[1],H),$[0]=ZZ($[0],H,SZ($[1])),!0},M8,C1=function(){var Q=Date.now,$=500,J=33,H=Q(),Z=H,q=4.166666666666667,K=q,G=[],U,W,X,j,L,B,M=function I(z){var R=Q()-Z,F=z===!0,V,Y,N,C;if((R>$||R<0)&&(H+=R-J),Z+=R,N=Z-H,V=N-K,V>0||F)C=++j.frame,L=N-j.time*1000,j.time=N=N/1000,K+=V+(V>=q?4:q-V),Y=1;if(F||(U=W(I)),Y)for(B=0;B<G.length;B++)G[B](N,L,C,z)};return j={time:0,frame:0,tick:function I(){M(!0)},deltaRatio:function I(z){return L/(1000/(z||60))},wake:function I(){if(XZ){if(!zQ&&AQ())G$=zQ=window,xQ=G$.document||{},b1.gsap=U1,(G$.gsapVersions||(G$.gsapVersions=[])).push(U1.version),jZ(Q7||G$.GreenSockGlobals||!G$.gsap&&G$||{}),kZ.forEach(xZ);X=typeof requestAnimationFrame!=="undefined"&&requestAnimationFrame,U&&j.sleep(),W=X||function(z){return setTimeout(z,K-j.time*1000+1|0)},M8=1,M(2)}},sleep:function I(){(X?cancelAnimationFrame:clearTimeout)(U),M8=0,W=I8},lagSmoothing:function I(z,R){$=z||1/0,J=Math.min(R||33,$)},fps:function I(z){q=1000/(z||240),K=j.time*1000+q},add:function I(z,R,F){var V=R?function(Y,N,C,D){z(Y,N,C,D),j.remove(V)}:z;return j.remove(z),G[F?"unshift":"push"](V),h9(),V},remove:function I(z,R){~(R=G.indexOf(z))&&G.splice(R,1)&&B>=R&&B--},_listeners:G},j}(),h9=function Q(){return!M8&&C1.wake()},q0={},t6=/^[\d.\-M][\d.\-,\s]/,e6=/["']/g,$G=function Q($){var J={},H=$.substr(1,$.length-3).split(":"),Z=H[0],q=1,K=H.length,G,U,W;for(;q<K;q++)U=H[q],G=q!==K-1?U.lastIndexOf(","):U.length,W=U.substr(0,G),J[Z]=isNaN(W)?W.replace(e6,"").trim():+W,Z=U.substr(G+1).trim();return J},QG=function Q($){var J=$.indexOf("(")+1,H=$.indexOf(")"),Z=$.indexOf("(",J);return $.substring(J,~Z&&Z<H?$.indexOf(")",H+1):H)},JG=function Q($){var J=($+"").split("("),H=q0[J[0]];return H&&J.length>1&&H.config?H.config.apply(null,~$.indexOf("{")?[$G(J[1])]:QG($).split(",").map(MZ)):q0._CE&&t6.test($)?q0._CE("",$):H},bZ=function Q($){return function(J){return 1-$(1-J)}},TZ=function Q($,J){var H=$._first,Z;while(H){if(H instanceof $1)Q(H,J);else if(H.vars.yoyoEase&&(!H._yoyo||!H._repeat)&&H._yoyo!==J)if(H.timeline)Q(H.timeline,J);else Z=H._ease,H._ease=H._yEase,H._yEase=Z,H._yoyo=J;H=H._next}},H9=function Q($,J){return!$?J:(T0($)?$:q0[$]||JG($))||J},G9=function Q($,J,H,Z){if(H===void 0)H=function G(U){return 1-J(1-U)};if(Z===void 0)Z=function G(U){return U<0.5?J(U*2)/2:1-J((1-U)*2)/2};var q={easeIn:J,easeOut:H,easeInOut:Z},K;return L1($,function(G){q0[G]=b1[G]=q,q0[K=G.toLowerCase()]=H;for(var U in q)q0[K+(U==="easeIn"?".in":U==="easeOut"?".out":".inOut")]=q0[G+"."+U]=q[U]}),q},yZ=function Q($){return function(J){return J<0.5?(1-$(1-J*2))/2:0.5+$((J-0.5)*2)/2}},XQ=function Q($,J,H){var Z=J>=1?J:1,q=(H||($?0.3:0.45))/(J<1?J:1),K=q/IQ*(Math.asin(1/Z)||0),G=function W(X){return X===1?1:Z*Math.pow(2,-10*X)*w6((X-K)*q)+1},U=$==="out"?G:$==="in"?function(W){return 1-G(1-W)}:yZ(G);return q=IQ/q,U.config=function(W,X){return Q($,W,X)},U},jQ=function Q($,J){if(J===void 0)J=1.70158;var H=function q(K){return K?--K*K*((J+1)*K+J)+1:0},Z=$==="out"?H:$==="in"?function(q){return 1-H(1-q)}:yZ(H);return Z.config=function(q){return Q($,q)},Z};L1("Linear,Quad,Cubic,Quart,Quint,Strong",function(Q,$){var J=$<5?$+1:$;G9(Q+",Power"+(J-1),$?function(H){return Math.pow(H,J)}:function(H){return H},function(H){return 1-Math.pow(1-H,J)},function(H){return H<0.5?Math.pow(H*2,J)/2:1-Math.pow((1-H)*2,J)/2})});q0.Linear.easeNone=q0.none=q0.Linear.easeIn;G9("Elastic",XQ("in"),XQ("out"),XQ());(function(Q,$){var J=1/$,H=2*J,Z=2.5*J,q=function K(G){return G<J?Q*G*G:G<H?Q*Math.pow(G-1.5/$,2)+0.75:G<Z?Q*(G-=2.25/$)*G+0.9375:Q*Math.pow(G-2.625/$,2)+0.984375};G9("Bounce",function(K){return 1-q(1-K)},q)})(7.5625,2.75);G9("Expo",function(Q){return Math.pow(2,10*(Q-1))*Q+Q*Q*Q*Q*Q*Q*(1-Q)});G9("Circ",function(Q){return-(GZ(1-Q*Q)-1)});G9("Sine",function(Q){return Q===1?1:-x6(Q*P6)+1});G9("Back",jQ("in"),jQ("out"),jQ());q0.SteppedEase=q0.steps=b1.SteppedEase={config:function Q($,J){if($===void 0)$=1;var H=1/$,Z=$+(J?0:1),q=J?1:0,K=1-I0;return function(G){return((Z*N8(0,K,G)|0)+q)*H}}};S9.ease=q0["quad.out"];L1("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(Q){return SQ+=Q+","+Q+"Params,"});var fQ=function Q($,J){this.id=k6++,$._gsap=this,this.target=$,this.harness=J,this.get=J?J.get:TQ,this.set=J?J.getSetter:X7},z8=function(){function Q(J){if(this.vars=J,this._delay=+J.delay||0,this._repeat=J.repeat===1/0?-2:J.repeat||0)this._rDelay=J.repeatDelay||0,this._yoyo=!!J.yoyo||!!J.yoyoEase;if(this._ts=1,y9(this,+J.duration,1,1),this.data=J.data,O0)this._ctx=O0,O0.data.push(this);M8||C1.wake()}var $=Q.prototype;return $.delay=function J(H){if(H||H===0)return this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+H-this._delay),this._delay=H,this;return this._delay},$.duration=function J(H){return arguments.length?this.totalDuration(this._repeat>0?H+(H+this._rDelay)*this._repeat:H):this.totalDuration()&&this._dur},$.totalDuration=function J(H){if(!arguments.length)return this._tDur;return this._dirty=0,y9(this,this._repeat<0?H:(H-this._repeat*this._rDelay)/(this._repeat+1))},$.totalTime=function J(H,Z){if(h9(),!arguments.length)return this._tTime;var q=this._dp;if(q&&q.smoothChildTiming&&this._ts){W7(this,H),!q._dp||q.parent||NZ(q,this);while(q&&q.parent){if(q.parent._time!==q._start+(q._ts>=0?q._tTime/q._ts:(q.totalDuration()-q._tTime)/-q._ts))q.totalTime(q._tTime,!0);q=q.parent}if(!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&H<this._tDur||this._ts<0&&H>0||!this._tDur&&!H))U$(this._dp,this,this._start-this._delay)}if(this._tTime!==H||!this._dur&&!Z||this._initted&&Math.abs(this._zTime)===I0||!H&&!this._initted&&(this.add||this._ptLookup))this._ts||(this._pTime=H),IZ(this,H,Z);return this},$.time=function J(H,Z){return arguments.length?this.totalTime(Math.min(this.totalDuration(),H+QZ(this))%(this._dur+this._rDelay)||(H?this._dur:0),Z):this._time},$.totalProgress=function J(H,Z){return arguments.length?this.totalTime(this.totalDuration()*H,Z):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},$.progress=function J(H,Z){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-H:H)+QZ(this),Z):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},$.iteration=function J(H,Z){var q=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(H-1)*q,Z):this._repeat?T9(this._tTime,q)+1:1},$.timeScale=function J(H,Z){if(!arguments.length)return this._rts===-I0?0:this._rts;if(this._rts===H)return this;var q=this.parent&&this._ts?Z7(this.parent._time,this):this._tTime;return this._rts=+H||0,this._ts=this._ps||H===-I0?0:this._rts,this.totalTime(N8(-Math.abs(this._delay),this.totalDuration(),q),Z!==!1),U7(this),_6(this)},$.paused=function J(H){if(!arguments.length)return this._ps;if(this._ps!==H)if(this._ps=H,H)this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0;else h9(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==I0&&(this._tTime-=I0));return this},$.startTime=function J(H){if(arguments.length){this._start=H;var Z=this.parent||this._dp;return Z&&(Z._sort||!this.parent)&&U$(Z,this,H-this._delay),this}return this._start},$.endTime=function J(H){return this._start+(E1(H)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},$.rawTime=function J(H){var Z=this.parent||this._dp;return!Z?this._tTime:H&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):!this._ts?this._tTime:Z7(Z.rawTime(H),this)},$.revert=function J(H){if(H===void 0)H=T6;var Z=Q1;if(Q1=H,yQ(this))this.timeline&&this.timeline.revert(H),this.totalTime(-0.01,H.suppressEvents);return this.data!=="nested"&&H.kill!==!1&&this.kill(),Q1=Z,this},$.globalTime=function J(H){var Z=this,q=arguments.length?H:Z.rawTime();while(Z)q=Z._start+q/(Math.abs(Z._ts)||1),Z=Z._dp;return!this.parent&&this._sat?this._sat.globalTime(H):q},$.repeat=function J(H){if(arguments.length)return this._repeat=H===1/0?-2:H,JZ(this);return this._repeat===-2?1/0:this._repeat},$.repeatDelay=function J(H){if(arguments.length){var Z=this._time;return this._rDelay=H,JZ(this),Z?this.time(Z):this}return this._rDelay},$.yoyo=function J(H){if(arguments.length)return this._yoyo=H,this;return this._yoyo},$.seek=function J(H,Z){return this.totalTime(m1(this,H),E1(Z))},$.restart=function J(H,Z){return this.play().totalTime(H?-this._delay:0,E1(Z)),this._dur||(this._zTime=-I0),this},$.play=function J(H,Z){return H!=null&&this.seek(H,Z),this.reversed(!1).paused(!1)},$.reverse=function J(H,Z){return H!=null&&this.seek(H||this.totalDuration(),Z),this.reversed(!0).paused(!1)},$.pause=function J(H,Z){return H!=null&&this.seek(H,Z),this.paused(!0)},$.resume=function J(){return this.paused(!1)},$.reversed=function J(H){if(arguments.length)return!!H!==this.reversed()&&this.timeScale(-this._rts||(H?-I0:0)),this;return this._rts<0},$.invalidate=function J(){return this._initted=this._act=0,this._zTime=-I0,this},$.isActive=function J(){var H=this.parent||this._dp,Z=this._start,q;return!!(!H||this._ts&&this._initted&&H.isActive()&&(q=H.rawTime(!0))>=Z&&q<this.endTime(!0)-I0)},$.eventCallback=function J(H,Z,q){var K=this.vars;if(arguments.length>1){if(!Z)delete K[H];else K[H]=Z,q&&(K[H+"Params"]=q),H==="onUpdate"&&(this._onUpdate=Z);return this}return K[H]},$.then=function J(H){var Z=this;return new Promise(function(q){var K=T0(H)?H:zZ,G=function U(){var W=Z.then;Z.then=null,T0(K)&&(K=K(Z))&&(K.then||K===Z)&&(Z.then=W),q(K),Z.then=W};if(Z._initted&&Z.totalProgress()===1&&Z._ts>=0||!Z._tTime&&Z._ts<0)G();else Z._prom=G})},$.kill=function J(){U8(this)},Q}();A1(z8.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-I0,_prom:0,_ps:!1,_rts:1});var $1=function(Q){KZ($,Q);function $(H,Z){var q;if(H===void 0)H={};return q=Q.call(this,H)||this,q.labels={},q.smoothChildTiming=!!H.smoothChildTiming,q.autoRemoveChildren=!!H.autoRemoveChildren,q._sort=E1(H.sortChildren),x0&&U$(H.parent||x0,V$(q),Z),H.reversed&&q.reverse(),H.paused&&q.paused(!0),H.scrollTrigger&&DZ(V$(q),H.scrollTrigger),q}var J=$.prototype;return J.to=function H(Z,q,K){return j8(0,arguments,this),this},J.from=function H(Z,q,K){return j8(1,arguments,this),this},J.fromTo=function H(Z,q,K,G){return j8(2,arguments,this),this},J.set=function H(Z,q,K){return q.duration=0,q.parent=this,X8(q).repeatDelay||(q.repeat=0),q.immediateRender=!!q.immediateRender,new v0(Z,q,m1(this,K),1),this},J.call=function H(Z,q,K){return U$(this,v0.delayedCall(0,Z,q),K)},J.staggerTo=function H(Z,q,K,G,U,W,X){return K.duration=q,K.stagger=K.stagger||G,K.onComplete=W,K.onCompleteParams=X,K.parent=this,new v0(Z,K,m1(this,U)),this},J.staggerFrom=function H(Z,q,K,G,U,W,X){return K.runBackwards=1,X8(K).immediateRender=E1(K.immediateRender),this.staggerTo(Z,q,K,G,U,W,X)},J.staggerFromTo=function H(Z,q,K,G,U,W,X,j){return G.startAt=K,X8(G).immediateRender=E1(G.immediateRender),this.staggerTo(Z,q,G,U,W,X,j)},J.render=function H(Z,q,K){var G=this._time,U=this._dirty?this.totalDuration():this._tDur,W=this._dur,X=Z<=0?0:d0(Z),j=this._zTime<0!==Z<0&&(this._initted||!W),L,B,M,I,z,R,F,V,Y,N,C,D;if(this!==x0&&X>U&&Z>=0&&(X=U),X!==this._tTime||K||j){if(G!==this._time&&W)X+=this._time-G,Z+=this._time-G;if(L=X,Y=this._start,V=this._ts,R=!V,j)W||(G=this._zTime),(Z||!q)&&(this._zTime=Z);if(this._repeat){if(C=this._yoyo,z=W+this._rDelay,this._repeat<-1&&Z<0)return this.totalTime(z*100+Z,q,K);if(L=d0(X%z),X===U)I=this._repeat,L=W;else{if(N=d0(X/z),I=~~N,I&&I===N)L=W,I--;L>W&&(L=W)}if(N=T9(this._tTime,z),!G&&this._tTime&&N!==I&&this._tTime-N*z-this._dur<=0&&(N=I),C&&I&1)L=W-L,D=1;if(I!==N&&!this._lock){var O=C&&N&1,A=O===(C&&I&1);if(I<N&&(O=!O),G=O?0:X%W?W:X,this._lock=1,this.render(G||(D?0:d0(I*z)),q,!W)._lock=0,this._tTime=X,!q&&this.parent&&S1(this,"onRepeat"),this.vars.repeatRefresh&&!D&&(this.invalidate()._lock=1),G&&G!==this._time||R!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(W=this._dur,U=this._tDur,A)this._lock=2,G=O?W:-0.0001,this.render(G,!0),this.vars.repeatRefresh&&!D&&this.invalidate();if(this._lock=0,!this._ts&&!R)return this;TZ(this,D)}}if(this._hasPause&&!this._forcing&&this._lock<2){if(F=d6(this,d0(G),d0(L)),F)X-=L-(L=F._start)}if(this._tTime=X,this._time=L,this._act=!V,!this._initted)this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=Z,G=0;if(!G&&X&&!q&&!N){if(S1(this,"onStart"),this._tTime!==X)return this}if(L>=G&&Z>=0){B=this._first;while(B){if(M=B._next,(B._act||L>=B._start)&&B._ts&&F!==B){if(B.parent!==this)return this.render(Z,q,K);if(B.render(B._ts>0?(L-B._start)*B._ts:(B._dirty?B.totalDuration():B._tDur)+(L-B._start)*B._ts,q,K),L!==this._time||!this._ts&&!R){F=0,M&&(X+=this._zTime=-I0);break}}B=M}}else{B=this._last;var P=Z<0?Z:L;while(B){if(M=B._prev,(B._act||P<=B._end)&&B._ts&&F!==B){if(B.parent!==this)return this.render(Z,q,K);if(B.render(B._ts>0?(P-B._start)*B._ts:(B._dirty?B.totalDuration():B._tDur)+(P-B._start)*B._ts,q,K||Q1&&yQ(B)),L!==this._time||!this._ts&&!R){F=0,M&&(X+=this._zTime=P?-I0:I0);break}}B=M}}if(F&&!q){if(this.pause(),F.render(L>=G?0:-I0)._zTime=L>=G?1:-1,this._ts)return this._start=Y,U7(this),this.render(Z,q,K)}if(this._onUpdate&&!q&&S1(this,"onUpdate",!0),X===U&&this._tTime>=this.totalDuration()||!X&&G){if(Y===this._start||Math.abs(V)!==Math.abs(this._ts)){if(!this._lock){if((Z||!W)&&(X===U&&this._ts>0||!X&&this._ts<0)&&g$(this,1),!q&&!(Z<0&&!G)&&(X||G||!U))S1(this,X===U&&Z>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(X<U&&this.timeScale()>0)&&this._prom()}}}}return this},J.add=function H(Z,q){var K=this;if(C$(q)||(q=m1(this,q,Z)),!(Z instanceof z8)){if(G1(Z))return Z.forEach(function(G){return K.add(G,q)}),this;if(s0(Z))return this.addLabel(Z,q);if(T0(Z))Z=v0.delayedCall(0,Z);else return this}return this!==Z?U$(this,Z,q):this},J.getChildren=function H(Z,q,K,G){if(Z===void 0)Z=!0;if(q===void 0)q=!0;if(K===void 0)K=!0;if(G===void 0)G=-d1;var U=[],W=this._first;while(W){if(W._start>=G)if(W instanceof v0)q&&U.push(W);else K&&U.push(W),Z&&U.push.apply(U,W.getChildren(!0,q,K));W=W._next}return U},J.getById=function H(Z){var q=this.getChildren(1,1,1),K=q.length;while(K--)if(q[K].vars.id===Z)return q[K]},J.remove=function H(Z){if(s0(Z))return this.removeLabel(Z);if(T0(Z))return this.killTweensOf(Z);if(Z.parent===this&&Y8(this,Z),Z===this._recent)this._recent=this._last;return J9(this)},J.totalTime=function H(Z,q){if(!arguments.length)return this._tTime;if(this._forcing=1,!this._dp&&this._ts)this._start=d0(C1.time-(this._ts>0?Z/this._ts:(this.totalDuration()-Z)/-this._ts));return Q.prototype.totalTime.call(this,Z,q),this._forcing=0,this},J.addLabel=function H(Z,q){return this.labels[Z]=m1(this,q),this},J.removeLabel=function H(Z){return delete this.labels[Z],this},J.addPause=function H(Z,q,K){var G=v0.delayedCall(0,q||I8,K);return G.data="isPause",this._hasPause=1,U$(this,G,m1(this,Z))},J.removePause=function H(Z){var q=this._first;Z=m1(this,Z);while(q){if(q._start===Z&&q.data==="isPause")g$(q);q=q._next}},J.killTweensOf=function H(Z,q,K){var G=this.getTweensOf(Z,K),U=G.length;while(U--)u$!==G[U]&&G[U].kill(Z,q);return this},J.getTweensOf=function H(Z,q){var K=[],G=g1(Z),U=this._first,W=C$(q),X;while(U){if(U instanceof v0){if(y6(U._targets,G)&&(W?(!u$||U._initted&&U._ts)&&U.globalTime(0)<=q&&U.globalTime(U.totalDuration())>q:!q||U.isActive()))K.push(U)}else if((X=U.getTweensOf(G,q)).length)K.push.apply(K,X);U=U._next}return K},J.tweenTo=function H(Z,q){q=q||{};var K=this,G=m1(K,Z),U=q,W=U.startAt,X=U.onStart,j=U.onStartParams,L=U.immediateRender,B,M=v0.to(K,A1({ease:q.ease||"none",lazy:!1,immediateRender:!1,time:G,overwrite:"auto",duration:q.duration||Math.abs((G-(W&&"time"in W?W.time:K._time))/K.timeScale())||I0,onStart:function I(){if(K.pause(),!B){var z=q.duration||Math.abs((G-(W&&"time"in W?W.time:K._time))/K.timeScale());M._dur!==z&&y9(M,z,0,1).render(M._time,!0,!0),B=1}X&&X.apply(M,j||[])}},q));return L?M.render(0):M},J.tweenFromTo=function H(Z,q,K){return this.tweenTo(q,A1({startAt:{time:m1(this,Z)}},K))},J.recent=function H(){return this._recent},J.nextLabel=function H(Z){if(Z===void 0)Z=this._time;return HZ(this,m1(this,Z))},J.previousLabel=function H(Z){if(Z===void 0)Z=this._time;return HZ(this,m1(this,Z),1)},J.currentLabel=function H(Z){return arguments.length?this.seek(Z,!0):this.previousLabel(this._time+I0)},J.shiftChildren=function H(Z,q,K){if(K===void 0)K=0;var G=this._first,U=this.labels,W;while(G){if(G._start>=K)G._start+=Z,G._end+=Z;G=G._next}if(q){for(W in U)if(U[W]>=K)U[W]+=Z}return J9(this)},J.invalidate=function H(Z){var q=this._first;this._lock=0;while(q)q.invalidate(Z),q=q._next;return Q.prototype.invalidate.call(this,Z)},J.clear=function H(Z){if(Z===void 0)Z=!0;var q=this._first,K;while(q)K=q._next,this.remove(q),q=K;return this._dp&&(this._time=this._tTime=this._pTime=0),Z&&(this.labels={}),J9(this)},J.totalDuration=function H(Z){var q=0,K=this,G=K._last,U=d1,W,X,j;if(arguments.length)return K.timeScale((K._repeat<0?K.duration():K.totalDuration())/(K.reversed()?-Z:Z));if(K._dirty){j=K.parent;while(G){if(W=G._prev,G._dirty&&G.totalDuration(),X=G._start,X>U&&K._sort&&G._ts&&!K._lock)K._lock=1,U$(K,G,X-G._delay,1)._lock=0;else U=X;if(X<0&&G._ts){if(q-=X,!j&&!K._dp||j&&j.smoothChildTiming)K._start+=X/K._ts,K._time-=X,K._tTime-=X;K.shiftChildren(-X,!1,-1/0),U=0}G._end>q&&G._ts&&(q=G._end),G=W}y9(K,K===x0&&K._time>q?K._time:q,1,1),K._dirty=0}return K._tDur},$.updateRoot=function H(Z){if(x0._ts)IZ(x0,Z7(Z,x0)),LZ=C1.frame;if(C1.frame>=eH){eH+=O1.autoSleep||120;var q=x0._first;if(!q||!q._ts){if(O1.autoSleep&&C1._listeners.length<2){while(q&&!q._ts)q=q._next;q||C1.sleep()}}}},$}(z8);A1($1.prototype,{_lock:0,_hasPause:0,_forcing:0});var HG=function Q($,J,H,Z,q,K,G){var U=new I1(this._pt,$,J,0,1,dQ,null,q),W=0,X=0,j,L,B,M,I,z,R,F;if(U.b=H,U.e=Z,H+="",Z+="",R=~Z.indexOf("random("))Z=f9(Z);if(K)F=[H,Z],K(F,$,J),H=F[0],Z=F[1];L=H.match(GQ)||[];while(j=GQ.exec(Z)){if(M=j[0],I=Z.substring(W,j.index),B)B=(B+1)%5;else if(I.substr(-5)==="rgba(")B=1;if(M!==L[X++])z=parseFloat(L[X-1])||0,U._pt={_next:U._pt,p:I||X===1?I:",",s:z,c:M.charAt(1)==="="?K9(z,M)-z:parseFloat(M)-z,m:B&&B<4?Math.round:0},W=GQ.lastIndex}if(U.c=W<Z.length?Z.substring(W,Z.length):"",U.fp=G,kQ.test(Z)||R)U.e=0;return this._pt=U,U},_Q=function Q($,J,H,Z,q,K,G,U,W,X){T0(Z)&&(Z=Z(q||0,$,K));var j=$[J],L=H!=="get"?H:!T0(j)?j:W?$[J.indexOf("set")||!T0($["get"+J.substr(3)])?J:"get"+J.substr(3)](W):$[J](),B=!T0(j)?mQ:W?UG:_Z,M;if(s0(Z)){if(~Z.indexOf("random("))Z=f9(Z);if(Z.charAt(1)==="="){if(M=K9(L,Z)+(J1(L)||0),M||M===0)Z=M}}if(!X||L!==Z||CQ){if(!isNaN(L*Z)&&Z!=="")return M=new I1(this._pt,$,J,+L||0,Z-(L||0),typeof j==="boolean"?XG:vZ,0,B),W&&(M.fp=W),G&&M.modifier(G,this,$),this._pt=M;return!j&&!(J in $)&&G7(J,Z),HG.call(this,$,J,L,Z,B,U||O1.stringFilter,W)}},ZG=function Q($,J,H,Z,q){if(T0($)&&($=B8($,q,J,H,Z)),!W$($)||$.style&&$.nodeType||G1($)||UZ($))return s0($)?B8($,q,J,H,Z):$;var K={},G;for(G in $)K[G]=B8($[G],q,J,H,Z);return K},vQ=function Q($,J,H,Z,q,K){var G,U,W,X;if(R1[$]&&(G=new R1[$]).init(q,G.rawVars?J[$]:ZG(J[$],Z,q,K,H),H,Z,K)!==!1){if(H._pt=U=new I1(H._pt,q,$,0,1,G.render,G,0,G.priority),H!==w9){W=H._ptLookup[H._targets.indexOf(q)],X=G._props.length;while(X--)W[G._props[X]]=U}}return G},u$,CQ,uQ=function Q($,J,H){var Z=$.vars,q=Z.ease,K=Z.startAt,G=Z.immediateRender,U=Z.lazy,W=Z.onUpdate,X=Z.runBackwards,j=Z.yoyoEase,L=Z.keyframes,B=Z.autoRevert,M=$._dur,I=$._startAt,z=$._targets,R=$.parent,F=R&&R.data==="nested"?R.vars.targets:z,V=$._overwrite==="auto"&&!OQ,Y=$.timeline,N,C,D,O,A,P,w,x,S,T,h,y,b;if(Y&&(!L||!q)&&(q="none"),$._ease=H9(q,S9.ease),$._yEase=j?bZ(H9(j===!0?q:j,S9.ease)):0,j&&$._yoyo&&!$._repeat)j=$._yEase,$._yEase=$._ease,$._ease=j;if($._from=!Y&&!!Z.runBackwards,!Y||L&&!Z.stagger){if(x=z[0]?d$(z[0]).harness:0,y=x&&Z[x.prop],N=H7(Z,wQ),I)I._zTime<0&&I.progress(1),J<0&&X&&G&&!B?I.render(-1,!0):I.revert(X&&M?t8:b6),I._lazy=0;if(K){if(g$($._startAt=v0.set(z,A1({data:"isStart",overwrite:!1,parent:R,immediateRender:!0,lazy:!I&&E1(U),startAt:null,delay:0,onUpdate:W&&function(){return S1($,"onUpdate")},stagger:0},K))),$._startAt._dp=0,$._startAt._sat=$,J<0&&(Q1||!G&&!B)&&$._startAt.revert(t8),G){if(M&&J<=0&&H<=0){J&&($._zTime=J);return}}}else if(X&&M){if(!I){if(J&&(G=!1),D=A1({overwrite:!1,data:"isFromStart",lazy:G&&!I&&E1(U),immediateRender:G,stagger:0,parent:R},N),y&&(D[x.prop]=y),g$($._startAt=v0.set(z,D)),$._startAt._dp=0,$._startAt._sat=$,J<0&&(Q1?$._startAt.revert(t8):$._startAt.render(-1,!0)),$._zTime=J,!G)Q($._startAt,I0,I0);else if(!J)return}}$._pt=$._ptCache=0,U=M&&E1(U)||U&&!M;for(C=0;C<z.length;C++){if(A=z[C],w=A._gsap||bQ(z)[C]._gsap,$._ptLookup[C]=T={},YQ[w.id]&&m$.length&&J7(),h=F===z?C:F.indexOf(A),x&&(S=new x).init(A,y||N,$,h,F)!==!1)$._pt=O=new I1($._pt,A,S.name,0,1,S.render,S,0,S.priority),S._props.forEach(function(m){T[m]=O}),S.priority&&(P=1);if(!x||y)for(D in N)if(R1[D]&&(S=vQ(D,N,$,h,A,F)))S.priority&&(P=1);else T[D]=O=_Q.call($,A,D,"get",N[D],h,F,0,Z.stringFilter);if($._op&&$._op[C]&&$.kill(A,$._op[C]),V&&$._pt)u$=$,x0.killTweensOf(A,T,$.globalTime(J)),b=!$.parent,u$=0;$._pt&&U&&(YQ[w.id]=1)}P&&cQ($),$._onInit&&$._onInit($)}$._onUpdate=W,$._initted=(!$._op||$._pt)&&!b,L&&J<=0&&Y.render(d1,!0,!0)},qG=function Q($,J,H,Z,q,K,G,U){var W=($._pt&&$._ptCache||($._ptCache={}))[J],X,j,L,B;if(!W){W=$._ptCache[J]=[],L=$._ptLookup,B=$._targets.length;while(B--){if(X=L[B][J],X&&X.d&&X.d._pt){X=X.d._pt;while(X&&X.p!==J&&X.fp!==J)X=X._next}if(!X)return CQ=1,$.vars[J]="+=0",uQ($,G),CQ=0,U?L8(J+" not eligible for reset"):1;W.push(X)}}B=W.length;while(B--)j=W[B],X=j._pt||j,X.s=(Z||Z===0)&&!q?Z:X.s+(Z||0)+K*X.c,X.c=H-X.s,j.e&&(j.e=y0(H)+J1(j.e)),j.b&&(j.b=X.s+J1(j.b))},KG=function Q($,J){var H=$[0]?d$($[0]).harness:0,Z=H&&H.aliases,q,K,G,U;if(!Z)return J;q=b9({},J);for(K in Z)if(K in q){U=Z[K].split(","),G=U.length;while(G--)q[U[G]]=q[K]}return q},GG=function Q($,J,H,Z){var q=J.ease||Z||"power1.inOut",K,G;if(G1(J))G=H[$]||(H[$]=[]),J.forEach(function(U,W){return G.push({t:W/(J.length-1)*100,v:U,e:q})});else for(K in J)G=H[K]||(H[K]=[]),K==="ease"||G.push({t:parseFloat($),v:J[K],e:q})},B8=function Q($,J,H,Z,q){return T0($)?$.call(J,H,Z,q):s0($)&&~$.indexOf("random(")?f9($):$},hZ=SQ+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",fZ={};L1(hZ+",id,stagger,delay,duration,paused,scrollTrigger",function(Q){return fZ[Q]=1});var v0=function(Q){KZ($,Q);function $(H,Z,q,K){var G;if(typeof Z==="number")q.duration=Z,Z=q,q=null;G=Q.call(this,K?Z:X8(Z))||this;var U=G.vars,W=U.duration,X=U.delay,j=U.immediateRender,L=U.stagger,B=U.overwrite,M=U.keyframes,I=U.defaults,z=U.scrollTrigger,R=U.yoyoEase,F=Z.parent||x0,V=(G1(H)||UZ(H)?C$(H[0]):("length"in Z))?[H]:g1(H),Y,N,C,D,O,A,P,w;if(G._targets=V.length?bQ(V):L8("GSAP target "+H+" not found. https://gsap.com",!O1.nullTargetWarn)||[],G._ptLookup=[],G._overwrite=B,M||L||a8(W)||a8(X)){if(Z=G.vars,Y=G.timeline=new $1({data:"nested",defaults:I||{},targets:F&&F.data==="nested"?F.vars.targets:V}),Y.kill(),Y.parent=Y._dp=V$(G),Y._start=0,L||a8(W)||a8(X)){if(D=V.length,P=L&&CZ(L),W$(L)){for(O in L)if(~hZ.indexOf(O))w||(w={}),w[O]=L[O]}for(N=0;N<D;N++){if(C=H7(Z,fZ),C.stagger=0,R&&(C.yoyoEase=R),w&&b9(C,w),A=V[N],C.duration=+B8(W,V$(G),N,A,V),C.delay=(+B8(X,V$(G),N,A,V)||0)-G._delay,!L&&D===1&&C.delay)G._delay=X=C.delay,G._start+=X,C.delay=0;Y.to(A,C,P?P(N,A,V):0),Y._ease=q0.none}Y.duration()?W=X=0:G.timeline=0}else if(M){X8(A1(Y.vars.defaults,{ease:"none"})),Y._ease=H9(M.ease||Z.ease||"none");var x=0,S,T,h;if(G1(M))M.forEach(function(y){return Y.to(V,y,">")}),Y.duration();else{C={};for(O in M)O==="ease"||O==="easeEach"||GG(O,M[O],C,M.easeEach);for(O in C){S=C[O].sort(function(y,b){return y.t-b.t}),x=0;for(N=0;N<S.length;N++)T=S[N],h={ease:T.e,duration:(T.t-(N?S[N-1].t:0))/100*W},h[O]=T.v,Y.to(V,h,x),x+=h.duration}Y.duration()<W&&Y.to({},{duration:W-Y.duration()})}}W||G.duration(W=Y.duration())}else G.timeline=0;if(B===!0&&!OQ)u$=V$(G),x0.killTweensOf(V),u$=0;if(U$(F,V$(G),q),Z.reversed&&G.reverse(),Z.paused&&G.paused(!0),j||!W&&!M&&G._start===d0(F._time)&&E1(j)&&v6(V$(G))&&F.data!=="nested")G._tTime=-I0,G.render(Math.max(0,-X)||0);return z&&DZ(V$(G),z),G}var J=$.prototype;return J.render=function H(Z,q,K){var G=this._time,U=this._tDur,W=this._dur,X=Z<0,j=Z>U-I0&&!X?U:Z<I0?0:Z,L,B,M,I,z,R,F,V,Y;if(!W)m6(this,Z,q,K);else if(j!==this._tTime||!Z||K||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==X||this._lazy){if(L=j,V=this.timeline,this._repeat){if(I=W+this._rDelay,this._repeat<-1&&X)return this.totalTime(I*100+Z,q,K);if(L=d0(j%I),j===U)M=this._repeat,L=W;else if(z=d0(j/I),M=~~z,M&&M===z)L=W,M--;else if(L>W)L=W;if(R=this._yoyo&&M&1,R)Y=this._yEase,L=W-L;if(z=T9(this._tTime,I),L===G&&!K&&this._initted&&M===z)return this._tTime=j,this;if(M!==z){if(V&&this._yEase&&TZ(V,R),this.vars.repeatRefresh&&!R&&!this._lock&&L!==I&&this._initted)this._lock=K=1,this.render(d0(I*M),!0).invalidate()._lock=0}}if(!this._initted){if(FZ(this,X?Z:L,K,q,j))return this._tTime=0,this;if(G!==this._time&&!(K&&this.vars.repeatRefresh&&M!==z))return this;if(W!==this._dur)return this.render(Z,q,K)}if(this._tTime=j,this._time=L,!this._act&&this._ts)this._act=1,this._lazy=0;if(this.ratio=F=(Y||this._ease)(L/W),this._from)this.ratio=F=1-F;if(!G&&j&&!q&&!z){if(S1(this,"onStart"),this._tTime!==j)return this}B=this._pt;while(B)B.r(F,B.d),B=B._next;if(V&&V.render(Z<0?Z:V._dur*V._ease(L/this._dur),q,K)||this._startAt&&(this._zTime=Z),this._onUpdate&&!q)X&&NQ(this,Z,q,K),S1(this,"onUpdate");if(this._repeat&&M!==z&&this.vars.onRepeat&&!q&&this.parent&&S1(this,"onRepeat"),(j===this._tDur||!j)&&this._tTime===j){if(X&&!this._onUpdate&&NQ(this,Z,!0,!0),(Z||!W)&&(j===this._tDur&&this._ts>0||!j&&this._ts<0)&&g$(this,1),!q&&!(X&&!G)&&(j||G||R))S1(this,j===U?"onComplete":"onReverseComplete",!0),this._prom&&!(j<U&&this.timeScale()>0)&&this._prom()}}return this},J.targets=function H(){return this._targets},J.invalidate=function H(Z){return(!Z||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(Z),Q.prototype.invalidate.call(this,Z)},J.resetTo=function H(Z,q,K,G,U){M8||C1.wake(),this._ts||this.play();var W=Math.min(this._dur,(this._dp._time-this._start)*this._ts),X;if(this._initted||uQ(this,W),X=this._ease(W/this._dur),qG(this,Z,q,K,G,X,W,U))return this.resetTo(Z,q,K,G,1);return W7(this,0),this.parent||YZ(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0)},J.kill=function H(Z,q){if(q===void 0)q="all";if(!Z&&(!q||q==="all"))return this._lazy=this._pt=0,this.parent?U8(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Q1),this;if(this.timeline){var K=this.timeline.totalDuration();return this.timeline.killTweensOf(Z,q,u$&&u$.vars.overwrite!==!0)._first||U8(this),this.parent&&K!==this.timeline.totalDuration()&&y9(this,this._dur*this.timeline._tDur/K,0,1),this}var G=this._targets,U=Z?g1(Z):G,W=this._ptLookup,X=this._pt,j,L,B,M,I,z,R;if((!q||q==="all")&&f6(G,U))return q==="all"&&(this._pt=0),U8(this);if(j=this._op=this._op||[],q!=="all"){if(s0(q))I={},L1(q,function(F){return I[F]=1}),q=I;q=KG(G,q)}R=G.length;while(R--)if(~U.indexOf(G[R])){if(L=W[R],q==="all")j[R]=q,M=L,B={};else B=j[R]=j[R]||{},M=q;for(I in M){if(z=L&&L[I],z){if(!("kill"in z.d)||z.d.kill(I)===!0)Y8(this,z,"_pt");delete L[I]}if(B!=="all")B[I]=1}}return this._initted&&!this._pt&&X&&U8(this),this},$.to=function H(Z,q){return new $(Z,q,arguments[2])},$.from=function H(Z,q){return j8(1,arguments)},$.delayedCall=function H(Z,q,K,G){return new $(q,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:Z,onComplete:q,onReverseComplete:q,onCompleteParams:K,onReverseCompleteParams:K,callbackScope:G})},$.fromTo=function H(Z,q,K){return j8(2,arguments)},$.set=function H(Z,q){return q.duration=0,q.repeatDelay||(q.repeat=0),new $(Z,q)},$.killTweensOf=function H(Z,q,K){return x0.killTweensOf(Z,q,K)},$}(z8);A1(v0.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});L1("staggerTo,staggerFrom,staggerFromTo",function(Q){v0[Q]=function(){var $=new $1,J=FQ.call(arguments,0);return J.splice(Q==="staggerFromTo"?5:4,0,0),$[Q].apply($,J)}});var mQ=function Q($,J,H){return $[J]=H},_Z=function Q($,J,H){return $[J](H)},UG=function Q($,J,H,Z){return $[J](Z.fp,H)},WG=function Q($,J,H){return $.setAttribute(J,H)},X7=function Q($,J){return T0($[J])?_Z:K7($[J])&&$.setAttribute?WG:mQ},vZ=function Q($,J){return J.set(J.t,J.p,Math.round((J.s+J.c*$)*1e6)/1e6,J)},XG=function Q($,J){return J.set(J.t,J.p,!!(J.s+J.c*$),J)},dQ=function Q($,J){var H=J._pt,Z="";if(!$&&J.b)Z=J.b;else if($===1&&J.e)Z=J.e;else{while(H)Z=H.p+(H.m?H.m(H.s+H.c*$):Math.round((H.s+H.c*$)*1e4)/1e4)+Z,H=H._next;Z+=J.c}J.set(J.t,J.p,Z,J)},gQ=function Q($,J){var H=J._pt;while(H)H.r($,H.d),H=H._next},jG=function Q($,J,H,Z){var q=this._pt,K;while(q)K=q._next,q.p===Z&&q.modifier($,J,H),q=K},BG=function Q($){var J=this._pt,H,Z;while(J){if(Z=J._next,J.p===$&&!J.op||J.op===$)Y8(this,J,"_pt");else if(!J.dep)H=1;J=Z}return!H},LG=function Q($,J,H,Z){Z.mSet($,J,Z.m.call(Z.tween,H,Z.mt),Z)},cQ=function Q($){var J=$._pt,H,Z,q,K;while(J){H=J._next,Z=q;while(Z&&Z.pr>J.pr)Z=Z._next;if(J._prev=Z?Z._prev:K)J._prev._next=J;else q=J;if(J._next=Z)Z._prev=J;else K=J;J=H}$._pt=q},I1=function(){function Q(J,H,Z,q,K,G,U,W,X){if(this.t=H,this.s=q,this.c=K,this.p=Z,this.r=G||vZ,this.d=U||this,this.set=W||mQ,this.pr=X||0,this._next=J,J)J._prev=this}var $=Q.prototype;return $.modifier=function J(H,Z,q){this.mSet=this.mSet||this.set,this.set=LG,this.m=H,this.mt=q,this.tween=Z},Q}();L1(SQ+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(Q){return wQ[Q]=1});b1.TweenMax=b1.TweenLite=v0;b1.TimelineLite=b1.TimelineMax=$1;x0=new $1({sortChildren:!1,defaults:S9,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});O1.stringFilter=hQ;var Z9=[],$7={},IG=[],qZ=0,MG=0,BQ=function Q($){return($7[$]||IG).map(function(J){return J()})},EQ=function Q(){var $=Date.now(),J=[];if($-qZ>2)BQ("matchMediaInit"),Z9.forEach(function(H){var{queries:Z,conditions:q}=H,K,G,U,W;for(G in Z)if(K=G$.matchMedia(Z[G]).matches,K&&(U=1),K!==q[G])q[G]=K,W=1;if(W)H.revert(),U&&J.push(H)}),BQ("matchMediaRevert"),J.forEach(function(H){return H.onMatch(H,function(Z){return H.add(null,Z)})}),qZ=$,BQ("matchMedia")},uZ=function(){function Q(J,H){this.selector=H&&VQ(H),this.data=[],this._r=[],this.isReverted=!1,this.id=MG++,J&&this.add(J)}var $=Q.prototype;return $.add=function J(H,Z,q){if(T0(H))q=Z,Z=H,H=T0;var K=this,G=function U(){var W=O0,X=K.selector,j;return W&&W!==K&&W.data.push(K),q&&(K.selector=VQ(q)),O0=K,j=Z.apply(K,arguments),T0(j)&&K._r.push(j),O0=W,K.selector=X,K.isReverted=!1,j};return K.last=G,H===T0?G(K,function(U){return K.add(null,U)}):H?K[H]=G:G},$.ignore=function J(H){var Z=O0;O0=null,H(this),O0=Z},$.getTweens=function J(){var H=[];return this.data.forEach(function(Z){return Z instanceof Q?H.push.apply(H,Z.getTweens()):Z instanceof v0&&!(Z.parent&&Z.parent.data==="nested")&&H.push(Z)}),H},$.clear=function J(){this._r.length=this.data.length=0},$.kill=function J(H,Z){var q=this;if(H)(function(){var G=q.getTweens(),U=q.data.length,W;while(U--)if(W=q.data[U],W.data==="isFlip")W.revert(),W.getChildren(!0,!0,!1).forEach(function(X){return G.splice(G.indexOf(X),1)});G.map(function(X){return{g:X._dur||X._delay||X._sat&&!X._sat.vars.immediateRender?X.globalTime(0):-1/0,t:X}}).sort(function(X,j){return j.g-X.g||-1/0}).forEach(function(X){return X.t.revert(H)}),U=q.data.length;while(U--)if(W=q.data[U],W instanceof $1){if(W.data!=="nested")W.scrollTrigger&&W.scrollTrigger.revert(),W.kill()}else!(W instanceof v0)&&W.revert&&W.revert(H);q._r.forEach(function(X){return X(H,q)}),q.isReverted=!0})();else this.data.forEach(function(G){return G.kill&&G.kill()});if(this.clear(),Z){var K=Z9.length;while(K--)Z9[K].id===this.id&&Z9.splice(K,1)}},$.revert=function J(H){this.kill(H||{})},Q}(),zG=function(){function Q(J){this.contexts=[],this.scope=J,O0&&O0.data.push(this)}var $=Q.prototype;return $.add=function J(H,Z,q){W$(H)||(H={matches:H});var K=new uZ(0,q||this.scope),G=K.conditions={},U,W,X;O0&&!K.selector&&(K.selector=O0.selector),this.contexts.push(K),Z=K.add("onMatch",Z),K.queries=H;for(W in H)if(W==="all")X=1;else if(U=G$.matchMedia(H[W]),U)Z9.indexOf(K)<0&&Z9.push(K),(G[W]=U.matches)&&(X=1),U.addListener?U.addListener(EQ):U.addEventListener("change",EQ);return X&&Z(K,function(j){return K.add(null,j)}),this},$.revert=function J(H){this.kill(H||{})},$.kill=function J(H){this.contexts.forEach(function(Z){return Z.kill(H,!0)})},Q}(),q7={registerPlugin:function Q(){for(var $=arguments.length,J=new Array($),H=0;H<$;H++)J[H]=arguments[H];J.forEach(function(Z){return xZ(Z)})},timeline:function Q($){return new $1($)},getTweensOf:function Q($,J){return x0.getTweensOf($,J)},getProperty:function Q($,J,H,Z){s0($)&&($=g1($)[0]);var q=d$($||{}).get,K=H?zZ:MZ;return H==="native"&&(H=""),!$?$:!J?function(G,U,W){return K((R1[G]&&R1[G].get||q)($,G,U,W))}:K((R1[J]&&R1[J].get||q)($,J,H,Z))},quickSetter:function Q($,J,H){if($=g1($),$.length>1){var Z=$.map(function(X){return U1.quickSetter(X,J,H)}),q=Z.length;return function(X){var j=q;while(j--)Z[j](X)}}$=$[0]||{};var K=R1[J],G=d$($),U=G.harness&&(G.harness.aliases||{})[J]||J,W=K?function(X){var j=new K;w9._pt=0,j.init($,H?X+H:X,w9,0,[$]),j.render(1,j),w9._pt&&gQ(1,w9)}:G.set($,U);return K?W:function(X){return W($,U,H?X+H:X,G,1)}},quickTo:function Q($,J,H){var Z,q=U1.to($,A1((Z={},Z[J]="+=0.1",Z.paused=!0,Z.stagger=0,Z),H||{})),K=function G(U,W,X){return q.resetTo(J,U,W,X)};return K.tween=q,K},isTweening:function Q($){return x0.getTweensOf($,!0).length>0},defaults:function Q($){return $&&$.ease&&($.ease=H9($.ease,S9.ease)),$Z(S9,$||{})},config:function Q($){return $Z(O1,$||{})},registerEffect:function Q($){var{name:J,effect:H,plugins:Z,defaults:q,extendTimeline:K}=$;if((Z||"").split(",").forEach(function(G){return G&&!R1[G]&&!b1[G]&&L8(J+" effect requires "+G+" plugin.")}),UQ[J]=function(G,U,W){return H(g1(G),A1(U||{},q),W)},K)$1.prototype[J]=function(G,U,W){return this.add(UQ[J](G,W$(U)?U:(W=U)&&{},this),W)}},registerEase:function Q($,J){q0[$]=H9(J)},parseEase:function Q($,J){return arguments.length?H9($,J):q0},getById:function Q($){return x0.getById($)},exportRoot:function Q($,J){if($===void 0)$={};var H=new $1($),Z,q;H.smoothChildTiming=E1($.smoothChildTiming),x0.remove(H),H._dp=0,H._time=H._tTime=x0._time,Z=x0._first;while(Z){if(q=Z._next,J||!(!Z._dur&&Z instanceof v0&&Z.vars.onComplete===Z._targets[0]))U$(H,Z,Z._start-Z._delay);Z=q}return U$(x0,H,0),H},context:function Q($,J){return $?new uZ($,J):O0},matchMedia:function Q($){return new zG($)},matchMediaRefresh:function Q(){return Z9.forEach(function($){var J=$.conditions,H,Z;for(Z in J)if(J[Z])J[Z]=!1,H=1;H&&$.revert()})||EQ()},addEventListener:function Q($,J){var H=$7[$]||($7[$]=[]);~H.indexOf(J)||H.push(J)},removeEventListener:function Q($,J){var H=$7[$],Z=H&&H.indexOf(J);Z>=0&&H.splice(Z,1)},utils:{wrap:i6,wrapYoyo:n6,distribute:CZ,random:OZ,snap:EZ,normalize:l6,getUnit:J1,clamp:c6,splitColor:wZ,toArray:g1,selector:VQ,mapRange:PZ,pipe:o6,unitize:s6,interpolate:r6,shuffle:RZ},install:jZ,effects:UQ,ticker:C1,updateRoot:$1.updateRoot,plugins:R1,globalTimeline:x0,core:{PropTween:I1,globals:BZ,Tween:v0,Timeline:$1,Animation:z8,getCache:d$,_removeLinkedListItem:Y8,reverting:function Q(){return Q1},context:function Q($){if($&&O0)O0.data.push($),$._ctx=O0;return O0},suppressOverwrites:function Q($){return OQ=$}}};L1("to,from,fromTo,delayedCall,set,killTweensOf",function(Q){return q7[Q]=v0[Q]});C1.add($1.updateRoot);w9=q7.to({},{duration:0});var YG=function Q($,J){var H=$._pt;while(H&&H.p!==J&&H.op!==J&&H.fp!==J)H=H._next;return H},NG=function Q($,J){var H=$._targets,Z,q,K;for(Z in J){q=H.length;while(q--)if(K=$._ptLookup[q][Z],K&&(K=K.d)){if(K._pt)K=YG(K,Z);K&&K.modifier&&K.modifier(J[Z],$,H[q],Z)}}},LQ=function Q($,J){return{name:$,headless:1,rawVars:1,init:function H(Z,q,K){K._onInit=function(G){var U,W;if(s0(q))U={},L1(q,function(X){return U[X]=1}),q=U;if(J){U={};for(W in q)U[W]=J(q[W]);q=U}NG(G,q)}}}},U1=q7.registerPlugin({name:"attr",init:function Q($,J,H,Z,q){var K,G,U;this.tween=H;for(K in J)U=$.getAttribute(K)||"",G=this.add($,"setAttribute",(U||0)+"",J[K],Z,q,0,0,K),G.op=K,G.b=U,this._props.push(K)},render:function Q($,J){var H=J._pt;while(H)Q1?H.set(H.t,H.p,H.b,H):H.r($,H.d),H=H._next}},{name:"endArray",headless:1,init:function Q($,J){var H=J.length;while(H--)this.add($,H,$[H]||0,J[H],0,0,0,0,0,1)}},LQ("roundProps",RQ),LQ("modifiers"),LQ("snap",EZ))||q7;v0.version=$1.version=U1.version="3.13.0";XZ=1;AQ()&&h9();var{Power0:DG,Power1:FG,Power2:VG,Power3:RG,Power4:CG,Linear:EG,Quad:OG,Cubic:AG,Quart:PG,Quint:kG,Strong:xG,Elastic:wG,Back:SG,SteppedEase:bG,Bounce:TG,Sine:yG,Expo:hG,Circ:fG}=q0;/*!
* CSSPlugin 3.13.0
* https://gsap.com
*
* Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/var mZ,p$,v9,nQ,j9,_G,dZ,rQ,vG=function Q(){return typeof window!=="undefined"},O$={},X9=180/Math.PI,u9=Math.PI/180,_9=Math.atan2,gZ=1e8,aQ=/([A-Z])/g,uG=/(left|right|width|margin|padding|x)/i,mG=/[\s,\(]\S/,X$={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},oQ=function Q($,J){return J.set(J.t,J.p,Math.round((J.s+J.c*$)*1e4)/1e4+J.u,J)},dG=function Q($,J){return J.set(J.t,J.p,$===1?J.e:Math.round((J.s+J.c*$)*1e4)/1e4+J.u,J)},gG=function Q($,J){return J.set(J.t,J.p,$?Math.round((J.s+J.c*$)*1e4)/1e4+J.u:J.b,J)},cG=function Q($,J){var H=J.s+J.c*$;J.set(J.t,J.p,~~(H+(H<0?-0.5:0.5))+J.u,J)},rZ=function Q($,J){return J.set(J.t,J.p,$?J.e:J.b,J)},aZ=function Q($,J){return J.set(J.t,J.p,$!==1?J.b:J.e,J)},pG=function Q($,J,H){return $.style[J]=H},oG=function Q($,J,H){return $.style.setProperty(J,H)},sG=function Q($,J,H){return $._gsap[J]=H},lG=function Q($,J,H){return $._gsap.scaleX=$._gsap.scaleY=H},iG=function Q($,J,H,Z,q){var K=$._gsap;K.scaleX=K.scaleY=H,K.renderTransform(q,K)},nG=function Q($,J,H,Z,q){var K=$._gsap;K[J]=H,K.renderTransform(q,K)},w0="transform",P1=w0+"Origin",rG=function Q($,J){var H=this,Z=this.target,q=Z.style,K=Z._gsap;if($ in O$&&q){if(this.tfm=this.tfm||{},$!=="transform")$=X$[$]||$,~$.indexOf(",")?$.split(",").forEach(function(G){return H.tfm[G]=E$(Z,G)}):this.tfm[$]=K.x?K[$]:E$(Z,$),$===P1&&(this.tfm.zOrigin=K.zOrigin);else return X$.transform.split(",").forEach(function(G){return Q.call(H,G,J)});if(this.props.indexOf(w0)>=0)return;if(K.svg)this.svgo=Z.getAttribute("data-svg-origin"),this.props.push(P1,J,"");$=w0}(q||J)&&this.props.push($,J,q[$])},tZ=function Q($){if($.translate)$.removeProperty("translate"),$.removeProperty("scale"),$.removeProperty("rotate")},aG=function Q(){var $=this.props,J=this.target,H=J.style,Z=J._gsap,q,K;for(q=0;q<$.length;q+=3)if(!$[q+1])$[q+2]?H[$[q]]=$[q+2]:H.removeProperty($[q].substr(0,2)==="--"?$[q]:$[q].replace(aQ,"-$1").toLowerCase());else if($[q+1]===2)J[$[q]]($[q+2]);else J[$[q]]=$[q+2];if(this.tfm){for(K in this.tfm)Z[K]=this.tfm[K];if(Z.svg)Z.renderTransform(),J.setAttribute("data-svg-origin",this.svgo||"");if(q=rQ(),(!q||!q.isStart)&&!H[w0]){if(tZ(H),Z.zOrigin&&H[P1])H[P1]+=" "+Z.zOrigin+"px",Z.zOrigin=0,Z.renderTransform();Z.uncache=1}}},eZ=function Q($,J){var H={target:$,props:[],revert:aG,save:rG};return $._gsap||U1.core.getCache($),J&&$.style&&$.nodeType&&J.split(",").forEach(function(Z){return H.save(Z)}),H},$5,sQ=function Q($,J){var H=p$.createElementNS?p$.createElementNS((J||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),$):p$.createElement($);return H&&H.style?H:p$.createElement($)},c1=function Q($,J,H){var Z=getComputedStyle($);return Z[J]||Z.getPropertyValue(J.replace(aQ,"-$1").toLowerCase())||Z.getPropertyValue(J)||!H&&Q($,m9(J)||J,1)||""},cZ="O,Moz,ms,Ms,Webkit".split(","),m9=function Q($,J,H){var Z=J||j9,q=Z.style,K=5;if($ in q&&!H)return $;$=$.charAt(0).toUpperCase()+$.substr(1);while(K--&&!(cZ[K]+$ in q));return K<0?null:(K===3?"ms":K>=0?cZ[K]:"")+$},lQ=function Q(){if(vG()&&window.document)mZ=window,p$=mZ.document,v9=p$.documentElement,j9=sQ("div")||{style:{}},_G=sQ("div"),w0=m9(w0),P1=w0+"Origin",j9.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",$5=!!m9("perspective"),rQ=U1.core.reverting,nQ=1},pZ=function Q($){var J=$.ownerSVGElement,H=sQ("svg",J&&J.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),Z=$.cloneNode(!0),q;Z.style.display="block",H.appendChild(Z),v9.appendChild(H);try{q=Z.getBBox()}catch(K){}return H.removeChild(Z),v9.removeChild(H),q},oZ=function Q($,J){var H=J.length;while(H--)if($.hasAttribute(J[H]))return $.getAttribute(J[H])},Q5=function Q($){var J,H;try{J=$.getBBox()}catch(Z){J=pZ($),H=1}return J&&(J.width||J.height)||H||(J=pZ($)),J&&!J.width&&!J.x&&!J.y?{x:+oZ($,["x","cx","x1"])||0,y:+oZ($,["y","cy","y1"])||0,width:0,height:0}:J},J5=function Q($){return!!($.getCTM&&(!$.parentNode||$.ownerSVGElement)&&Q5($))},B9=function Q($,J){if(J){var H=$.style,Z;if(J in O$&&J!==P1)J=w0;if(H.removeProperty){if(Z=J.substr(0,2),Z==="ms"||J.substr(0,6)==="webkit")J="-"+J;H.removeProperty(Z==="--"?J:J.replace(aQ,"-$1").toLowerCase())}else H.removeAttribute(J)}},o$=function Q($,J,H,Z,q,K){var G=new I1($._pt,J,H,0,1,K?aZ:rZ);return $._pt=G,G.b=Z,G.e=q,$._props.push(H),G},sZ={deg:1,rad:1,turn:1},tG={grid:1,flex:1},s$=function Q($,J,H,Z){var q=parseFloat(H)||0,K=(H+"").trim().substr((q+"").length)||"px",G=j9.style,U=uG.test(J),W=$.tagName.toLowerCase()==="svg",X=(W?"client":"offset")+(U?"Width":"Height"),j=100,L=Z==="px",B=Z==="%",M,I,z,R;if(Z===K||!q||sZ[Z]||sZ[K])return q;if(K!=="px"&&!L&&(q=Q($,J,H,"px")),R=$.getCTM&&J5($),(B||K==="%")&&(O$[J]||~J.indexOf("adius")))return M=R?$.getBBox()[U?"width":"height"]:$[X],y0(B?q/M*j:q/100*M);if(G[U?"width":"height"]=j+(L?K:Z),I=Z!=="rem"&&~J.indexOf("adius")||Z==="em"&&$.appendChild&&!W?$:$.parentNode,R)I=($.ownerSVGElement||{}).parentNode;if(!I||I===p$||!I.appendChild)I=p$.body;if(z=I._gsap,z&&B&&z.width&&U&&z.time===C1.time&&!z.uncache)return y0(q/z.width*j);else{if(B&&(J==="height"||J==="width")){var F=$.style[J];$.style[J]=j+Z,M=$[X],F?$.style[J]=F:B9($,J)}else(B||K==="%")&&!tG[c1(I,"display")]&&(G.position=c1($,"position")),I===$&&(G.position="static"),I.appendChild(j9),M=j9[X],I.removeChild(j9),G.position="absolute";if(U&&B)z=d$(I),z.time=C1.time,z.width=I[X]}return y0(L?M*q/j:M&&q?j/M*q:0)},E$=function Q($,J,H,Z){var q;if(nQ||lQ(),J in X$&&J!=="transform"){if(J=X$[J],~J.indexOf(","))J=J.split(",")[0]}if(O$[J]&&J!=="transform")q=V8($,Z),q=J!=="transformOrigin"?q[J]:q.svg?q.origin:B7(c1($,P1))+" "+q.zOrigin+"px";else if(q=$.style[J],!q||q==="auto"||Z||~(q+"").indexOf("calc("))q=j7[J]&&j7[J]($,J,H)||c1($,J)||TQ($,J)||(J==="opacity"?1:0);return H&&!~(q+"").trim().indexOf(" ")?s$($,J,q,H)+H:q},eG=function Q($,J,H,Z){if(!H||H==="none"){var q=m9(J,$,1),K=q&&c1($,q,1);if(K&&K!==H)J=q,H=K;else if(J==="borderColor")H=c1($,"borderTopColor")}var G=new I1(this._pt,$.style,J,0,1,dQ),U=0,W=0,X,j,L,B,M,I,z,R,F,V,Y,N;if(G.b=H,G.e=Z,H+="",Z+="",Z.substring(0,6)==="var(--")Z=c1($,Z.substring(4,Z.indexOf(")")));if(Z==="auto")I=$.style[J],$.style[J]=Z,Z=c1($,J)||Z,I?$.style[J]=I:B9($,J);if(X=[H,Z],hQ(X),H=X[0],Z=X[1],L=H.match(q9)||[],N=Z.match(q9)||[],N.length){while(j=q9.exec(Z)){if(z=j[0],F=Z.substring(U,j.index),M)M=(M+1)%5;else if(F.substr(-5)==="rgba("||F.substr(-5)==="hsla(")M=1;if(z!==(I=L[W++]||"")){if(B=parseFloat(I)||0,Y=I.substr((B+"").length),z.charAt(1)==="="&&(z=K9(B,z)+Y),R=parseFloat(z),V=z.substr((R+"").length),U=q9.lastIndex-V.length,!V){if(V=V||O1.units[J]||Y,U===Z.length)Z+=V,G.e+=V}if(Y!==V)B=s$($,J,I,V)||0;G._pt={_next:G._pt,p:F||W===1?F:",",s:B,c:R-B,m:M&&M<4||J==="zIndex"?Math.round:0}}}G.c=U<Z.length?Z.substring(U,Z.length):""}else G.r=J==="display"&&Z==="none"?aZ:rZ;return kQ.test(Z)&&(G.e=0),this._pt=G,G},lZ={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},$U=function Q($){var J=$.split(" "),H=J[0],Z=J[1]||"50%";if(H==="top"||H==="bottom"||Z==="left"||Z==="right")$=H,H=Z,Z=$;return J[0]=lZ[H]||H,J[1]=lZ[Z]||Z,J.join(" ")},QU=function Q($,J){if(J.tween&&J.tween._time===J.tween._dur){var H=J.t,Z=H.style,q=J.u,K=H._gsap,G,U,W;if(q==="all"||q===!0)Z.cssText="",U=1;else{q=q.split(","),W=q.length;while(--W>-1){if(G=q[W],O$[G])U=1,G=G==="transformOrigin"?P1:w0;B9(H,G)}}if(U){if(B9(H,w0),K)K.svg&&H.removeAttribute("transform"),Z.scale=Z.rotate=Z.translate="none",V8(H,1),K.uncache=1,tZ(Z)}}},j7={clearProps:function Q($,J,H,Z,q){if(q.data!=="isFromStart"){var K=$._pt=new I1($._pt,J,H,0,0,QU);return K.u=Z,K.pr=-10,K.tween=q,$._props.push(H),1}}},F8=[1,0,0,1,0,0],H5={},Z5=function Q($){return $==="matrix(1, 0, 0, 1, 0, 0)"||$==="none"||!$},iZ=function Q($){var J=c1($,w0);return Z5(J)?F8:J.substr(7).match(PQ).map(y0)},tQ=function Q($,J){var H=$._gsap||d$($),Z=$.style,q=iZ($),K,G,U,W;if(H.svg&&$.getAttribute("transform"))return U=$.transform.baseVal.consolidate().matrix,q=[U.a,U.b,U.c,U.d,U.e,U.f],q.join(",")==="1,0,0,1,0,0"?F8:q;else if(q===F8&&!$.offsetParent&&$!==v9&&!H.svg){if(U=Z.display,Z.display="block",K=$.parentNode,!K||!$.offsetParent&&!$.getBoundingClientRect().width)W=1,G=$.nextElementSibling,v9.appendChild($);if(q=iZ($),U?Z.display=U:B9($,"display"),W)G?K.insertBefore($,G):K?K.appendChild($):v9.removeChild($)}return J&&q.length>6?[q[0],q[1],q[4],q[5],q[12],q[13]]:q},iQ=function Q($,J,H,Z,q,K){var G=$._gsap,U=q||tQ($,!0),W=G.xOrigin||0,X=G.yOrigin||0,j=G.xOffset||0,L=G.yOffset||0,B=U[0],M=U[1],I=U[2],z=U[3],R=U[4],F=U[5],V=J.split(" "),Y=parseFloat(V[0])||0,N=parseFloat(V[1])||0,C,D,O,A;if(!H)C=Q5($),Y=C.x+(~V[0].indexOf("%")?Y/100*C.width:Y),N=C.y+(~(V[1]||V[0]).indexOf("%")?N/100*C.height:N);else if(U!==F8&&(D=B*z-M*I))O=Y*(z/D)+N*(-I/D)+(I*F-z*R)/D,A=Y*(-M/D)+N*(B/D)-(B*F-M*R)/D,Y=O,N=A;if(Z||Z!==!1&&G.smooth)R=Y-W,F=N-X,G.xOffset=j+(R*B+F*I)-R,G.yOffset=L+(R*M+F*z)-F;else G.xOffset=G.yOffset=0;if(G.xOrigin=Y,G.yOrigin=N,G.smooth=!!Z,G.origin=J,G.originIsAbsolute=!!H,$.style[P1]="0px 0px",K)o$(K,G,"xOrigin",W,Y),o$(K,G,"yOrigin",X,N),o$(K,G,"xOffset",j,G.xOffset),o$(K,G,"yOffset",L,G.yOffset);$.setAttribute("data-svg-origin",Y+" "+N)},V8=function Q($,J){var H=$._gsap||new fQ($);if("x"in H&&!J&&!H.uncache)return H;var Z=$.style,q=H.scaleX<0,K="px",G="deg",U=getComputedStyle($),W=c1($,P1)||"0",X,j,L,B,M,I,z,R,F,V,Y,N,C,D,O,A,P,w,x,S,T,h,y,b,m,_,E,c,Q0,j0,H0,F0;if(X=j=L=I=z=R=F=V=Y=0,B=M=1,H.svg=!!($.getCTM&&J5($)),U.translate){if(U.translate!=="none"||U.scale!=="none"||U.rotate!=="none")Z[w0]=(U.translate!=="none"?"translate3d("+(U.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(U.rotate!=="none"?"rotate("+U.rotate+") ":"")+(U.scale!=="none"?"scale("+U.scale.split(" ").join(",")+") ":"")+(U[w0]!=="none"?U[w0]:"");Z.scale=Z.rotate=Z.translate="none"}if(D=tQ($,H.svg),H.svg){if(H.uncache)m=$.getBBox(),W=H.xOrigin-m.x+"px "+(H.yOrigin-m.y)+"px",b="";else b=!J&&$.getAttribute("data-svg-origin");iQ($,b||W,!!b||H.originIsAbsolute,H.smooth!==!1,D)}if(N=H.xOrigin||0,C=H.yOrigin||0,D!==F8){if(w=D[0],x=D[1],S=D[2],T=D[3],X=h=D[4],j=y=D[5],D.length===6){if(B=Math.sqrt(w*w+x*x),M=Math.sqrt(T*T+S*S),I=w||x?_9(x,w)*X9:0,F=S||T?_9(S,T)*X9+I:0,F&&(M*=Math.abs(Math.cos(F*u9))),H.svg)X-=N-(N*w+C*S),j-=C-(N*x+C*T)}else{if(F0=D[6],j0=D[7],E=D[8],c=D[9],Q0=D[10],H0=D[11],X=D[12],j=D[13],L=D[14],O=_9(F0,Q0),z=O*X9,O)A=Math.cos(-O),P=Math.sin(-O),b=h*A+E*P,m=y*A+c*P,_=F0*A+Q0*P,E=h*-P+E*A,c=y*-P+c*A,Q0=F0*-P+Q0*A,H0=j0*-P+H0*A,h=b,y=m,F0=_;if(O=_9(-S,Q0),R=O*X9,O)A=Math.cos(-O),P=Math.sin(-O),b=w*A-E*P,m=x*A-c*P,_=S*A-Q0*P,H0=T*P+H0*A,w=b,x=m,S=_;if(O=_9(x,w),I=O*X9,O)A=Math.cos(O),P=Math.sin(O),b=w*A+x*P,m=h*A+y*P,x=x*A-w*P,y=y*A-h*P,w=b,h=m;if(z&&Math.abs(z)+Math.abs(I)>359.9)z=I=0,R=180-R;B=y0(Math.sqrt(w*w+x*x+S*S)),M=y0(Math.sqrt(y*y+F0*F0)),O=_9(h,y),F=Math.abs(O)>0.0002?O*X9:0,Y=H0?1/(H0<0?-H0:H0):0}if(H.svg)b=$.getAttribute("transform"),H.forceCSS=$.setAttribute("transform","")||!Z5(c1($,w0)),b&&$.setAttribute("transform",b)}if(Math.abs(F)>90&&Math.abs(F)<270)if(q)B*=-1,F+=I<=0?180:-180,I+=I<=0?180:-180;else M*=-1,F+=F<=0?180:-180;if(J=J||H.uncache,H.x=X-((H.xPercent=X&&(!J&&H.xPercent||(Math.round($.offsetWidth/2)===Math.round(-X)?-50:0)))?$.offsetWidth*H.xPercent/100:0)+K,H.y=j-((H.yPercent=j&&(!J&&H.yPercent||(Math.round($.offsetHeight/2)===Math.round(-j)?-50:0)))?$.offsetHeight*H.yPercent/100:0)+K,H.z=L+K,H.scaleX=y0(B),H.scaleY=y0(M),H.rotation=y0(I)+G,H.rotationX=y0(z)+G,H.rotationY=y0(R)+G,H.skewX=F+G,H.skewY=V+G,H.transformPerspective=Y+K,H.zOrigin=parseFloat(W.split(" ")[2])||!J&&H.zOrigin||0)Z[P1]=B7(W);return H.xOffset=H.yOffset=0,H.force3D=O1.force3D,H.renderTransform=H.svg?HU:$5?q5:JU,H.uncache=0,H},B7=function Q($){return($=$.split(" "))[0]+" "+$[1]},pQ=function Q($,J,H){var Z=J1(J);return y0(parseFloat(J)+parseFloat(s$($,"x",H+"px",Z)))+Z},JU=function Q($,J){J.z="0px",J.rotationY=J.rotationX="0deg",J.force3D=0,q5($,J)},U9="0deg",D8="0px",W9=") ",q5=function Q($,J){var H=J||this,Z=H.xPercent,q=H.yPercent,K=H.x,G=H.y,U=H.z,W=H.rotation,X=H.rotationY,j=H.rotationX,L=H.skewX,B=H.skewY,M=H.scaleX,I=H.scaleY,z=H.transformPerspective,R=H.force3D,F=H.target,V=H.zOrigin,Y="",N=R==="auto"&&$&&$!==1||R===!0;if(V&&(j!==U9||X!==U9)){var C=parseFloat(X)*u9,D=Math.sin(C),O=Math.cos(C),A;C=parseFloat(j)*u9,A=Math.cos(C),K=pQ(F,K,D*A*-V),G=pQ(F,G,-Math.sin(C)*-V),U=pQ(F,U,O*A*-V+V)}if(z!==D8)Y+="perspective("+z+W9;if(Z||q)Y+="translate("+Z+"%, "+q+"%) ";if(N||K!==D8||G!==D8||U!==D8)Y+=U!==D8||N?"translate3d("+K+", "+G+", "+U+") ":"translate("+K+", "+G+W9;if(W!==U9)Y+="rotate("+W+W9;if(X!==U9)Y+="rotateY("+X+W9;if(j!==U9)Y+="rotateX("+j+W9;if(L!==U9||B!==U9)Y+="skew("+L+", "+B+W9;if(M!==1||I!==1)Y+="scale("+M+", "+I+W9;F.style[w0]=Y||"translate(0, 0)"},HU=function Q($,J){var H=J||this,Z=H.xPercent,q=H.yPercent,K=H.x,G=H.y,U=H.rotation,W=H.skewX,X=H.skewY,j=H.scaleX,L=H.scaleY,B=H.target,M=H.xOrigin,I=H.yOrigin,z=H.xOffset,R=H.yOffset,F=H.forceCSS,V=parseFloat(K),Y=parseFloat(G),N,C,D,O,A;if(U=parseFloat(U),W=parseFloat(W),X=parseFloat(X),X)X=parseFloat(X),W+=X,U+=X;if(U||W){if(U*=u9,W*=u9,N=Math.cos(U)*j,C=Math.sin(U)*j,D=Math.sin(U-W)*-L,O=Math.cos(U-W)*L,W){if(X*=u9,A=Math.tan(W-X),A=Math.sqrt(1+A*A),D*=A,O*=A,X)A=Math.tan(X),A=Math.sqrt(1+A*A),N*=A,C*=A}N=y0(N),C=y0(C),D=y0(D),O=y0(O)}else N=j,O=L,C=D=0;if(V&&!~(K+"").indexOf("px")||Y&&!~(G+"").indexOf("px"))V=s$(B,"x",K,"px"),Y=s$(B,"y",G,"px");if(M||I||z||R)V=y0(V+M-(M*N+I*D)+z),Y=y0(Y+I-(M*C+I*O)+R);if(Z||q)A=B.getBBox(),V=y0(V+Z/100*A.width),Y=y0(Y+q/100*A.height);A="matrix("+N+","+C+","+D+","+O+","+V+","+Y+")",B.setAttribute("transform",A),F&&(B.style[w0]=A)},ZU=function Q($,J,H,Z,q){var K=360,G=s0(q),U=parseFloat(q)*(G&&~q.indexOf("rad")?X9:1),W=U-Z,X=Z+W+"deg",j,L;if(G){if(j=q.split("_")[1],j==="short"){if(W%=K,W!==W%(K/2))W+=W<0?K:-K}if(j==="cw"&&W<0)W=(W+K*gZ)%K-~~(W/K)*K;else if(j==="ccw"&&W>0)W=(W-K*gZ)%K-~~(W/K)*K}return $._pt=L=new I1($._pt,J,H,Z,W,dG),L.e=X,L.u="deg",$._props.push(H),L},nZ=function Q($,J){for(var H in J)$[H]=J[H];return $},qU=function Q($,J,H){var Z=nZ({},H._gsap),q="perspective,force3D,transformOrigin,svgOrigin",K=H.style,G,U,W,X,j,L,B,M;if(Z.svg)W=H.getAttribute("transform"),H.setAttribute("transform",""),K[w0]=J,G=V8(H,1),B9(H,w0),H.setAttribute("transform",W);else W=getComputedStyle(H)[w0],K[w0]=J,G=V8(H,1),K[w0]=W;for(U in O$)if(W=Z[U],X=G[U],W!==X&&q.indexOf(U)<0)B=J1(W),M=J1(X),j=B!==M?s$(H,U,W,M):parseFloat(W),L=parseFloat(X),$._pt=new I1($._pt,G,U,j,L-j,oQ),$._pt.u=M||0,$._props.push(U);nZ(G,Z)};L1("padding,margin,Width,Radius",function(Q,$){var J="Top",H="Right",Z="Bottom",q="Left",K=($<3?[J,H,Z,q]:[J+q,J+H,Z+H,Z+q]).map(function(G){return $<2?Q+G:"border"+G+Q});j7[$>1?"border"+Q:Q]=function(G,U,W,X,j){var L,B;if(arguments.length<4)return L=K.map(function(M){return E$(G,M,W)}),B=L.join(" "),B.split(L[0]).length===5?L[0]:B;L=(X+"").split(" "),B={},K.forEach(function(M,I){return B[M]=L[I]=L[I]||L[(I-1)/2|0]}),G.init(U,B,j)}});var eQ={name:"css",register:lQ,targetTest:function Q($){return $.style&&$.nodeType},init:function Q($,J,H,Z,q){var K=this._props,G=$.style,U=H.vars.startAt,W,X,j,L,B,M,I,z,R,F,V,Y,N,C,D,O;nQ||lQ(),this.styles=this.styles||eZ($),O=this.styles.props,this.tween=H;for(I in J){if(I==="autoRound")continue;if(X=J[I],R1[I]&&vQ(I,J,H,Z,$,q))continue;if(B=typeof X,M=j7[I],B==="function")X=X.call(H,Z,$,q),B=typeof X;if(B==="string"&&~X.indexOf("random("))X=f9(X);if(M)M(this,$,I,X,H)&&(D=1);else if(I.substr(0,2)==="--"){if(W=(getComputedStyle($).getPropertyValue(I)+"").trim(),X+="",R$.lastIndex=0,!R$.test(W))z=J1(W),R=J1(X);R?z!==R&&(W=s$($,I,W,R)+R):z&&(X+=z),this.add(G,"setProperty",W,X,Z,q,0,0,I),K.push(I),O.push(I,0,G[I])}else if(B!=="undefined"){if(U&&I in U)W=typeof U[I]==="function"?U[I].call(H,Z,$,q):U[I],s0(W)&&~W.indexOf("random(")&&(W=f9(W)),J1(W+"")||W==="auto"||(W+=O1.units[I]||J1(E$($,I))||""),(W+"").charAt(1)==="="&&(W=E$($,I));else W=E$($,I);if(L=parseFloat(W),F=B==="string"&&X.charAt(1)==="="&&X.substr(0,2),F&&(X=X.substr(2)),j=parseFloat(X),I in X$){if(I==="autoAlpha"){if(L===1&&E$($,"visibility")==="hidden"&&j)L=0;O.push("visibility",0,G.visibility),o$(this,G,"visibility",L?"inherit":"hidden",j?"inherit":"hidden",!j)}if(I!=="scale"&&I!=="transform")I=X$[I],~I.indexOf(",")&&(I=I.split(",")[0])}if(V=I in O$,V){if(this.styles.save(I),B==="string"&&X.substring(0,6)==="var(--")X=c1($,X.substring(4,X.indexOf(")"))),j=parseFloat(X);if(!Y)N=$._gsap,N.renderTransform&&!J.parseTransform||V8($,J.parseTransform),C=J.smoothOrigin!==!1&&N.smooth,Y=this._pt=new I1(this._pt,G,w0,0,1,N.renderTransform,N,0,-1),Y.dep=1;if(I==="scale")this._pt=new I1(this._pt,N,"scaleY",N.scaleY,(F?K9(N.scaleY,F+j):j)-N.scaleY||0,oQ),this._pt.u=0,K.push("scaleY",I),I+="X";else if(I==="transformOrigin"){if(O.push(P1,0,G[P1]),X=$U(X),N.svg)iQ($,X,0,C,0,this);else R=parseFloat(X.split(" ")[2])||0,R!==N.zOrigin&&o$(this,N,"zOrigin",N.zOrigin,R),o$(this,G,I,B7(W),B7(X));continue}else if(I==="svgOrigin"){iQ($,X,1,C,0,this);continue}else if(I in H5){ZU(this,N,I,L,F?K9(L,F+X):X);continue}else if(I==="smoothOrigin"){o$(this,N,"smooth",N.smooth,X);continue}else if(I==="force3D"){N[I]=X;continue}else if(I==="transform"){qU(this,X,$);continue}}else if(!(I in G))I=m9(I)||I;if(V||(j||j===0)&&(L||L===0)&&!mG.test(X)&&I in G){if(z=(W+"").substr((L+"").length),j||(j=0),R=J1(X)||(I in O1.units?O1.units[I]:z),z!==R&&(L=s$($,I,W,R)),this._pt=new I1(this._pt,V?N:G,I,L,(F?K9(L,F+j):j)-L,!V&&(R==="px"||I==="zIndex")&&J.autoRound!==!1?cG:oQ),this._pt.u=R||0,z!==R&&R!=="%")this._pt.b=W,this._pt.r=gG}else if(!(I in G)){if(I in $)this.add($,I,W||$[I],F?F+X:X,Z,q);else if(I!=="parseTransform"){G7(I,X);continue}}else eG.call(this,$,I,W,F?F+X:X);V||(I in G?O.push(I,0,G[I]):typeof $[I]==="function"?O.push(I,2,$[I]()):O.push(I,1,W||$[I])),K.push(I)}}D&&cQ(this)},render:function Q($,J){if(J.tween._time||!rQ()){var H=J._pt;while(H)H.r($,H.d),H=H._next}else J.styles.revert()},get:E$,aliases:X$,getSetter:function Q($,J,H){var Z=X$[J];return Z&&Z.indexOf(",")<0&&(J=Z),J in O$&&J!==P1&&($._gsap.x||E$($,"x"))?H&&dZ===H?J==="scale"?lG:sG:(dZ=H||{})&&(J==="scale"?iG:nG):$.style&&!K7($.style[J])?pG:~J.indexOf("-")?oG:X7($,J)},core:{_removeProperty:B9,_getMatrix:tQ}};U1.utils.checkPrefix=m9;U1.core.getStyleSaver=eZ;(function(Q,$,J,H){var Z=L1(Q+","+$+","+J,function(q){O$[q]=1});L1($,function(q){O1.units[q]="deg",H5[q]=1}),X$[Z[13]]=Q+","+$,L1(H,function(q){var K=q.split(":");X$[K[1]]=Z[K[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");L1("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(Q){O1.units[Q]="px"});U1.registerPlugin(eQ);var R8=U1.registerPlugin(eQ)||U1,G2=R8.core.Tween;function K5(Q,$){for(var J=0;J<$.length;J++){var H=$[J];if(H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H)H.writable=!0;Object.defineProperty(Q,H.key,H)}}function KU(Q,$,J){if($)K5(Q.prototype,$);if(J)K5(Q,J);return Q}/*!
* Observer 3.13.0
* https://gsap.com
*
* @license Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/var H1,M7,GU,T1,l$,i$,g9,U5,L9,E8,W5,A$,Q$,X5,j5=function Q(){return H1||typeof window!=="undefined"&&(H1=window.gsap)&&H1.registerPlugin&&H1},B5=1,d9=[],a=[],J$=[],O8=Date.now,$J=function Q($,J){return J},UU=function Q(){var $=E8.core,J=$.bridge||{},H=$._scrollers,Z=$._proxies;H.push.apply(H,a),Z.push.apply(Z,J$),a=H,J$=Z,$J=function q(K,G){return J[K](G)}},k$=function Q($,J){return~J$.indexOf($)&&J$[J$.indexOf($)+1][J]},A8=function Q($){return!!~W5.indexOf($)},z1=function Q($,J,H,Z,q){return $.addEventListener(J,H,{passive:Z!==!1,capture:!!q})},M1=function Q($,J,H,Z){return $.removeEventListener(J,H,!!Z)},L7="scrollLeft",I7="scrollTop",QJ=function Q(){return A$&&A$.isPressed||a.cache++},z7=function Q($,J){var H=function Z(q){if(q||q===0){B5&&(T1.history.scrollRestoration="manual");var K=A$&&A$.isPressed;q=Z.v=Math.round(q)||(A$&&A$.iOS?1:0),$(q),Z.cacheID=a.cache,K&&$J("ss",q)}else if(J||a.cache!==Z.cacheID||$J("ref"))Z.cacheID=a.cache,Z.v=$();return Z.v+Z.offset};return H.offset=0,$&&H},W1={s:L7,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:z7(function(Q){return arguments.length?T1.scrollTo(Q,g0.sc()):T1.pageXOffset||l$[L7]||i$[L7]||g9[L7]||0})},g0={s:I7,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:W1,sc:z7(function(Q){return arguments.length?T1.scrollTo(W1.sc(),Q):T1.pageYOffset||l$[I7]||i$[I7]||g9[I7]||0})},Y1=function Q($,J){return(J&&J._ctx&&J._ctx.selector||H1.utils.toArray)($)[0]||(typeof $==="string"&&H1.config().nullTargetWarn!==!1?console.warn("Element not found:",$):null)},WU=function Q($,J){var H=J.length;while(H--)if(J[H]===$||J[H].contains($))return!0;return!1},P$=function Q($,J){var{s:H,sc:Z}=J;A8($)&&($=l$.scrollingElement||i$);var q=a.indexOf($),K=Z===g0.sc?1:2;!~q&&(q=a.push($)-1),a[q+K]||z1($,"scroll",QJ);var G=a[q+K],U=G||(a[q+K]=z7(k$($,H),!0)||(A8($)?Z:z7(function(W){return arguments.length?$[H]=W:$[H]})));return U.target=$,G||(U.smooth=H1.getProperty($,"scrollBehavior")==="smooth"),U},Y7=function Q($,J,H){var Z=$,q=$,K=O8(),G=K,U=J||50,W=Math.max(500,U*3),X=function B(M,I){var z=O8();if(I||z-K>U)q=Z,Z=M,G=K,K=z;else if(H)Z+=M;else Z=q+(M-q)/(z-G)*(K-G)},j=function B(){q=Z=H?0:Z,G=K=0},L=function B(M){var I=G,z=q,R=O8();return(M||M===0)&&M!==Z&&X(M),K===G||R-G>W?0:(Z+(H?z:-z))/((H?R:K)-I)*1000};return{update:X,reset:j,getVelocity:L}},C8=function Q($,J){return J&&!$._gsapAllow&&$.preventDefault(),$.changedTouches?$.changedTouches[0]:$},G5=function Q($){var J=Math.max.apply(Math,$),H=Math.min.apply(Math,$);return Math.abs(J)>=Math.abs(H)?J:H},L5=function Q(){E8=H1.core.globals().ScrollTrigger,E8&&E8.core&&UU()},I5=function Q($){if(H1=$||j5(),!M7&&H1&&typeof document!=="undefined"&&document.body)T1=window,l$=document,i$=l$.documentElement,g9=l$.body,W5=[T1,l$,i$,g9],GU=H1.utils.clamp,X5=H1.core.context||function(){},L9="onpointerenter"in g9?"pointer":"mouse",U5=h0.isTouch=T1.matchMedia&&T1.matchMedia("(hover: none), (pointer: coarse)").matches?1:("ontouchstart"in T1)||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,Q$=h0.eventTypes=("ontouchstart"in i$?"touchstart,touchmove,touchcancel,touchend":!("onpointerdown"in i$)?"mousedown,mousemove,mouseup,mouseup":"pointerdown,pointermove,pointercancel,pointerup").split(","),setTimeout(function(){return B5=0},500),L5(),M7=1;return M7};W1.op=g0;a.cache=0;var h0=function(){function Q(J){this.init(J)}var $=Q.prototype;return $.init=function J(H){M7||I5(H1)||console.warn("Please gsap.registerPlugin(Observer)"),E8||L5();var{tolerance:Z,dragMinimum:q,type:K,target:G,lineHeight:U,debounce:W,preventDefault:X,onStop:j,onStopDelay:L,ignore:B,wheelSpeed:M,event:I,onDragStart:z,onDragEnd:R,onDrag:F,onPress:V,onRelease:Y,onRight:N,onLeft:C,onUp:D,onDown:O,onChangeX:A,onChangeY:P,onChange:w,onToggleX:x,onToggleY:S,onHover:T,onHoverEnd:h,onMove:y,ignoreCheck:b,isNormalizer:m,onGestureStart:_,onGestureEnd:E,onWheel:c,onEnable:Q0,onDisable:j0,onClick:H0,scrollSpeed:F0,capture:N0,allowClicks:W0,lockAxis:M0,onLockAxis:A0}=H;this.target=G=Y1(G)||i$,this.vars=H,B&&(B=H1.utils.toArray(B)),Z=Z||0.000000001,q=q||0,M=M||1,F0=F0||1,K=K||"wheel,touch,pointer",W=W!==!1,U||(U=parseFloat(T1.getComputedStyle(g9).lineHeight)||22);var i0,P0,V0,i,G0,D0,p0,k=this,v=0,X0=0,z0=H.passive||!X&&H.passive!==!1,R0=P$(G,W1),r1=P$(G,g0),V1=R0(),Y$=r1(),u0=~K.indexOf("touch")&&!~K.indexOf("pointer")&&Q$[0]==="pointerdown",H$=A8(G),C0=G.ownerDocument||l$,u1=[0,0,0],x1=[0,0,0],N$=0,Z8=function l(){return N$=O8()},m0=function l(g,K0){return(k.event=g)&&B&&WU(g.target,B)||K0&&u0&&g.pointerType!=="touch"||b&&b(g,K0)},i8=function l(){k._vx.reset(),k._vy.reset(),P0.pause(),j&&j(k)},D$=function l(){var g=k.deltaX=G5(u1),K0=k.deltaY=G5(x1),f=Math.abs(g)>=Z,o=Math.abs(K0)>=Z;if(w&&(f||o)&&w(k,g,K0,u1,x1),f)N&&k.deltaX>0&&N(k),C&&k.deltaX<0&&C(k),A&&A(k),x&&k.deltaX<0!==v<0&&x(k),v=k.deltaX,u1[0]=u1[1]=u1[2]=0;if(o)O&&k.deltaY>0&&O(k),D&&k.deltaY<0&&D(k),P&&P(k),S&&k.deltaY<0!==X0<0&&S(k),X0=k.deltaY,x1[0]=x1[1]=x1[2]=0;if(i||V0){if(y&&y(k),V0)z&&V0===1&&z(k),F&&F(k),V0=0;i=!1}if(D0&&!(D0=!1)&&A0&&A0(k),G0)c(k),G0=!1;i0=0},P9=function l(g,K0,f){u1[f]+=g,x1[f]+=K0,k._vx.update(g),k._vy.update(K0),W?i0||(i0=requestAnimationFrame(D$)):D$()},k9=function l(g,K0){if(M0&&!p0)k.axis=p0=Math.abs(g)>Math.abs(K0)?"x":"y",D0=!0;if(p0!=="y")u1[2]+=g,k._vx.update(g,!0);if(p0!=="x")x1[2]+=K0,k._vy.update(K0,!0);W?i0||(i0=requestAnimationFrame(D$)):D$()},f$=function l(g){if(m0(g,1))return;g=C8(g,X);var{clientX:K0,clientY:f}=g,o=K0-k.x,d=f-k.y,s=k.isDragging;if(k.x=K0,k.y=f,s||(o||d)&&(Math.abs(k.startX-K0)>=q||Math.abs(k.startY-f)>=q))V0=s?2:1,s||(k.isDragging=!0),k9(o,d)},t$=k.onPress=function(l){if(m0(l,1)||l&&l.button)return;k.axis=p0=null,P0.pause(),k.isPressed=!0,l=C8(l),v=X0=0,k.startX=k.x=l.clientX,k.startY=k.y=l.clientY,k._vx.reset(),k._vy.reset(),z1(m?G:C0,Q$[1],f$,z0,!0),k.deltaX=k.deltaY=0,V&&V(k)},J0=k.onRelease=function(l){if(m0(l,1))return;M1(m?G:C0,Q$[1],f$,!0);var g=!isNaN(k.y-k.startY),K0=k.isDragging,f=K0&&(Math.abs(k.x-k.startX)>3||Math.abs(k.y-k.startY)>3),o=C8(l);if(!f&&g){if(k._vx.reset(),k._vy.reset(),X&&W0)H1.delayedCall(0.08,function(){if(O8()-N$>300&&!l.defaultPrevented){if(l.target.click)l.target.click();else if(C0.createEvent){var d=C0.createEvent("MouseEvents");d.initMouseEvent("click",!0,!0,T1,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),l.target.dispatchEvent(d)}}})}k.isDragging=k.isGesturing=k.isPressed=!1,j&&K0&&!m&&P0.restart(!0),V0&&D$(),R&&K0&&R(k),Y&&Y(k,f)},e$=function l(g){return g.touches&&g.touches.length>1&&(k.isGesturing=!0)&&_(g,k.isDragging)},a1=function l(){return(k.isGesturing=!1)||E(k)},t1=function l(g){if(m0(g))return;var K0=R0(),f=r1();P9((K0-V1)*F0,(f-Y$)*F0,1),V1=K0,Y$=f,j&&P0.restart(!0)},e1=function l(g){if(m0(g))return;g=C8(g,X),c&&(G0=!0);var K0=(g.deltaMode===1?U:g.deltaMode===2?T1.innerHeight:1)*M;P9(g.deltaX*K0,g.deltaY*K0,0),j&&!m&&P0.restart(!0)},$9=function l(g){if(m0(g))return;var{clientX:K0,clientY:f}=g,o=K0-k.x,d=f-k.y;k.x=K0,k.y=f,i=!0,j&&P0.restart(!0),(o||d)&&k9(o,d)},x9=function l(g){k.event=g,T(k)},F$=function l(g){k.event=g,h(k)},q8=function l(g){return m0(g)||C8(g,X)&&H0(k)};P0=k._dc=H1.delayedCall(L||0.25,i8).pause(),k.deltaX=k.deltaY=0,k._vx=Y7(0,50,!0),k._vy=Y7(0,50,!0),k.scrollX=R0,k.scrollY=r1,k.isDragging=k.isGesturing=k.isPressed=!1,X5(this),k.enable=function(l){if(!k.isEnabled){if(z1(H$?C0:G,"scroll",QJ),K.indexOf("scroll")>=0&&z1(H$?C0:G,"scroll",t1,z0,N0),K.indexOf("wheel")>=0&&z1(G,"wheel",e1,z0,N0),K.indexOf("touch")>=0&&U5||K.indexOf("pointer")>=0)z1(G,Q$[0],t$,z0,N0),z1(C0,Q$[2],J0),z1(C0,Q$[3],J0),W0&&z1(G,"click",Z8,!0,!0),H0&&z1(G,"click",q8),_&&z1(C0,"gesturestart",e$),E&&z1(C0,"gestureend",a1),T&&z1(G,L9+"enter",x9),h&&z1(G,L9+"leave",F$),y&&z1(G,L9+"move",$9);k.isEnabled=!0,k.isDragging=k.isGesturing=k.isPressed=i=V0=!1,k._vx.reset(),k._vy.reset(),V1=R0(),Y$=r1(),l&&l.type&&t$(l),Q0&&Q0(k)}return k},k.disable=function(){if(k.isEnabled){if(d9.filter(function(l){return l!==k&&A8(l.target)}).length||M1(H$?C0:G,"scroll",QJ),k.isPressed)k._vx.reset(),k._vy.reset(),M1(m?G:C0,Q$[1],f$,!0);M1(H$?C0:G,"scroll",t1,N0),M1(G,"wheel",e1,N0),M1(G,Q$[0],t$,N0),M1(C0,Q$[2],J0),M1(C0,Q$[3],J0),M1(G,"click",Z8,!0),M1(G,"click",q8),M1(C0,"gesturestart",e$),M1(C0,"gestureend",a1),M1(G,L9+"enter",x9),M1(G,L9+"leave",F$),M1(G,L9+"move",$9),k.isEnabled=k.isPressed=k.isDragging=!1,j0&&j0(k)}},k.kill=k.revert=function(){k.disable();var l=d9.indexOf(k);l>=0&&d9.splice(l,1),A$===k&&(A$=0)},d9.push(k),m&&A8(G)&&(A$=k),k.enable(I)},KU(Q,[{key:"velocityX",get:function J(){return this._vx.getVelocity()}},{key:"velocityY",get:function J(){return this._vy.getVelocity()}}]),Q}();h0.version="3.13.0";h0.create=function(Q){return new h0(Q)};h0.register=I5;h0.getAll=function(){return d9.slice()};h0.getById=function(Q){return d9.filter(function($){return $.vars.id===Q})[0]};j5()&&H1.registerPlugin(h0);/*!
* ScrollTrigger 3.13.0
* https://gsap.com
*
* @license Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/var u,o9,e,Y0,f1,U0,zJ,T7,u8,T8,k8,N7,X1,_7,WJ,D1,M5,z5,s9,b5,JJ,T5,N1,XJ,y5,h5,n$,jJ,YJ,l9,NJ,y7,BJ,HJ,D7=1,j1=Date.now,ZJ=j1(),s1=0,x8=0,Y5=function Q($,J,H){var Z=h1($)&&($.substr(0,6)==="clamp("||$.indexOf("max")>-1);return H["_"+J+"Clamp"]=Z,Z?$.substr(6,$.length-7):$},N5=function Q($,J){return J&&(!h1($)||$.substr(0,6)!=="clamp(")?"clamp("+$+")":$},XU=function Q(){return x8&&requestAnimationFrame(Q)},D5=function Q(){return _7=1},F5=function Q(){return _7=0},j$=function Q($){return $},w8=function Q($){return Math.round($*1e5)/1e5||0},f5=function Q(){return typeof window!=="undefined"},_5=function Q(){return u||f5()&&(u=window.gsap)&&u.registerPlugin&&u},D9=function Q($){return!!~zJ.indexOf($)},v5=function Q($){return($==="Height"?NJ:e["inner"+$])||f1["client"+$]||U0["client"+$]},u5=function Q($){return k$($,"getBoundingClientRect")||(D9($)?function(){return b7.width=e.innerWidth,b7.height=NJ,b7}:function(){return x$($)})},jU=function Q($,J,H){var{d:Z,d2:q,a:K}=H;return(K=k$($,"getBoundingClientRect"))?function(){return K()[Z]}:function(){return(J?v5(q):$["client"+q])||0}},BU=function Q($,J){return!J||~J$.indexOf($)?u5($):function(){return b7}},B$=function Q($,J){var{s:H,d2:Z,d:q,a:K}=J;return Math.max(0,(H="scroll"+Z)&&(K=k$($,H))?K()-u5($)()[q]:D9($)?(f1[H]||U0[H])-v5(Z):$[H]-$["offset"+Z])},F7=function Q($,J){for(var H=0;H<s9.length;H+=3)(!J||~J.indexOf(s9[H+1]))&&$(s9[H],s9[H+1],s9[H+2])},h1=function Q($){return typeof $==="string"},B1=function Q($){return typeof $==="function"},S8=function Q($){return typeof $==="number"},I9=function Q($){return typeof $==="object"},P8=function Q($,J,H){return $&&$.progress(J?0:1)&&H&&$.pause()},qJ=function Q($,J){if($.enabled){var H=$._ctx?$._ctx.add(function(){return J($)}):J($);H&&H.totalTime&&($.callbackAnimation=H)}},c9=Math.abs,m5="left",d5="top",DJ="right",FJ="bottom",z9="width",Y9="height",y8="Right",h8="Left",f8="Top",_8="Bottom",c0="padding",p1="margin",n9="Width",VJ="Height",l0="px",o1=function Q($){return e.getComputedStyle($)},LU=function Q($){var J=o1($).position;$.style.position=J==="absolute"||J==="fixed"?J:"relative"},V5=function Q($,J){for(var H in J)H in $||($[H]=J[H]);return $},x$=function Q($,J){var H=J&&o1($)[WJ]!=="matrix(1, 0, 0, 1, 0, 0)"&&u.to($,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),Z=$.getBoundingClientRect();return H&&H.progress(0).kill(),Z},h7=function Q($,J){var H=J.d2;return $["offset"+H]||$["client"+H]||0},g5=function Q($){var J=[],H=$.labels,Z=$.duration(),q;for(q in H)J.push(H[q]/Z);return J},IU=function Q($){return function(J){return u.utils.snap(g5($),J)}},RJ=function Q($){var J=u.utils.snap($),H=Array.isArray($)&&$.slice(0).sort(function(Z,q){return Z-q});return H?function(Z,q,K){if(K===void 0)K=0.001;var G;if(!q)return J(Z);if(q>0){Z-=K;for(G=0;G<H.length;G++)if(H[G]>=Z)return H[G];return H[G-1]}else{G=H.length,Z+=K;while(G--)if(H[G]<=Z)return H[G]}return H[0]}:function(Z,q,K){if(K===void 0)K=0.001;var G=J(Z);return!q||Math.abs(G-Z)<K||G-Z<0===q<0?G:J(q<0?Z-$:Z+$)}},MU=function Q($){return function(J,H){return RJ(g5($))(J,H.direction)}},V7=function Q($,J,H,Z){return H.split(",").forEach(function(q){return $(J,q,Z)})},a0=function Q($,J,H,Z,q){return $.addEventListener(J,H,{passive:!Z,capture:!!q})},r0=function Q($,J,H,Z){return $.removeEventListener(J,H,!!Z)},R7=function Q($,J,H){if(H=H&&H.wheelHandler,H)$(J,"wheel",H),$(J,"touchmove",H)},R5={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},C7={toggleActions:"play",anticipatePin:0},f7={top:0,left:0,center:0.5,bottom:1,right:1},k7=function Q($,J){if(h1($)){var H=$.indexOf("="),Z=~H?+($.charAt(H-1)+1)*parseFloat($.substr(H+1)):0;if(~H)$.indexOf("%")>H&&(Z*=J/100),$=$.substr(0,H-1);$=Z+($ in f7?f7[$]*J:~$.indexOf("%")?parseFloat($)*J/100:parseFloat($)||0)}return $},E7=function Q($,J,H,Z,q,K,G,U){var{startColor:W,endColor:X,fontSize:j,indent:L,fontWeight:B}=q,M=Y0.createElement("div"),I=D9(H)||k$(H,"pinType")==="fixed",z=$.indexOf("scroller")!==-1,R=I?U0:H,F=$.indexOf("start")!==-1,V=F?W:X,Y="border-color:"+V+";font-size:"+j+";color:"+V+";font-weight:"+B+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return Y+="position:"+((z||U)&&I?"fixed;":"absolute;"),(z||U||!I)&&(Y+=(Z===g0?DJ:FJ)+":"+(K+parseFloat(L))+"px;"),G&&(Y+="box-sizing:border-box;text-align:left;width:"+G.offsetWidth+"px;"),M._isStart=F,M.setAttribute("class","gsap-marker-"+$+(J?" marker-"+J:"")),M.style.cssText=Y,M.innerText=J||J===0?$+"-"+J:$,R.children[0]?R.insertBefore(M,R.children[0]):R.appendChild(M),M._offset=M["offset"+Z.op.d2],x7(M,0,Z,F),M},x7=function Q($,J,H,Z){var q={display:"block"},K=H[Z?"os2":"p2"],G=H[Z?"p2":"os2"];$._isFlipped=Z,q[H.a+"Percent"]=Z?-100:0,q[H.a]=Z?"1px":0,q["border"+K+n9]=1,q["border"+G+n9]=0,q[H.p]=J+"px",u.set($,q)},t=[],LJ={},m8,C5=function Q(){return j1()-s1>34&&(m8||(m8=requestAnimationFrame(w$)))},p9=function Q(){if(!N1||!N1.isPressed||N1.startX>U0.clientWidth){if(a.cache++,N1)m8||(m8=requestAnimationFrame(w$));else w$();s1||V9("scrollStart"),s1=j1()}},KJ=function Q(){h5=e.innerWidth,y5=e.innerHeight},b8=function Q($){a.cache++,($===!0||!X1&&!T5&&!Y0.fullscreenElement&&!Y0.webkitFullscreenElement&&(!XJ||h5!==e.innerWidth||Math.abs(e.innerHeight-y5)>e.innerHeight*0.25))&&T7.restart(!0)},F9={},zU=[],c5=function Q(){return r0($0,"scrollEnd",Q)||M9(!0)},V9=function Q($){return F9[$]&&F9[$].map(function(J){return J()})||zU},y1=[],p5=function Q($){for(var J=0;J<y1.length;J+=5)if(!$||y1[J+4]&&y1[J+4].query===$)y1[J].style.cssText=y1[J+1],y1[J].getBBox&&y1[J].setAttribute("transform",y1[J+2]||""),y1[J+3].uncache=1},CJ=function Q($,J){var H;for(D1=0;D1<t.length;D1++)if(H=t[D1],H&&(!J||H._ctx===J))if($)H.kill(1);else H.revert(!0,!0);y7=!0,J&&p5(J),J||V9("revert")},o5=function Q($,J){a.cache++,(J||!F1)&&a.forEach(function(H){return B1(H)&&H.cacheID++&&(H.rec=0)}),h1($)&&(e.history.scrollRestoration=YJ=$)},F1,N9=0,E5,YU=function Q(){if(E5!==N9){var $=E5=N9;requestAnimationFrame(function(){return $===N9&&M9(!0)})}},s5=function Q(){U0.appendChild(l9),NJ=!N1&&l9.offsetHeight||e.innerHeight,U0.removeChild(l9)},O5=function Q($){return u8(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(J){return J.style.display=$?"none":"block"})},M9=function Q($,J){if(f1=Y0.documentElement,U0=Y0.body,zJ=[e,Y0,f1,U0],s1&&!$&&!y7){a0($0,"scrollEnd",c5);return}s5(),F1=$0.isRefreshing=!0,a.forEach(function(Z){return B1(Z)&&++Z.cacheID&&(Z.rec=Z())});var H=V9("refreshInit");b5&&$0.sort(),J||CJ(),a.forEach(function(Z){if(B1(Z))Z.smooth&&(Z.target.style.scrollBehavior="auto"),Z(0)}),t.slice(0).forEach(function(Z){return Z.refresh()}),y7=!1,t.forEach(function(Z){if(Z._subPinOffset&&Z.pin){var q=Z.vars.horizontal?"offsetWidth":"offsetHeight",K=Z.pin[q];Z.revert(!0,1),Z.adjustPinSpacing(Z.pin[q]-K),Z.refresh()}}),BJ=1,O5(!0),t.forEach(function(Z){var q=B$(Z.scroller,Z._dir),K=Z.vars.end==="max"||Z._endClamp&&Z.end>q,G=Z._startClamp&&Z.start>=q;(K||G)&&Z.setPositions(G?q-1:Z.start,K?Math.max(G?q:Z.start+1,q):Z.end,!0)}),O5(!1),BJ=0,H.forEach(function(Z){return Z&&Z.render&&Z.render(-1)}),a.forEach(function(Z){if(B1(Z))Z.smooth&&requestAnimationFrame(function(){return Z.target.style.scrollBehavior="smooth"}),Z.rec&&Z(Z.rec)}),o5(YJ,1),T7.pause(),N9++,F1=2,w$(2),t.forEach(function(Z){return B1(Z.vars.onRefresh)&&Z.vars.onRefresh(Z)}),F1=$0.isRefreshing=!1,V9("refresh")},IJ=0,w7=1,v8,w$=function Q($){if($===2||!F1&&!y7){$0.isUpdating=!0,v8&&v8.update(0);var J=t.length,H=j1(),Z=H-ZJ>=50,q=J&&t[0].scroll();if(w7=IJ>q?-1:1,F1||(IJ=q),Z){if(s1&&!_7&&H-s1>200)s1=0,V9("scrollEnd");k8=ZJ,ZJ=H}if(w7<0){D1=J;while(D1-- >0)t[D1]&&t[D1].update(0,Z);w7=1}else for(D1=0;D1<J;D1++)t[D1]&&t[D1].update(0,Z);$0.isUpdating=!1}m8=0},MJ=[m5,d5,FJ,DJ,p1+_8,p1+y8,p1+f8,p1+h8,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],S7=MJ.concat([z9,Y9,"boxSizing","max"+n9,"max"+VJ,"position",p1,c0,c0+f8,c0+y8,c0+_8,c0+h8]),NU=function Q($,J,H){i9(H);var Z=$._gsap;if(Z.spacerIsNative)i9(Z.spacerState);else if($._gsap.swappedIn){var q=J.parentNode;if(q)q.insertBefore($,J),q.removeChild(J)}$._gsap.swappedIn=!1},GJ=function Q($,J,H,Z){if(!$._gsap.swappedIn){var q=MJ.length,K=J.style,G=$.style,U;while(q--)U=MJ[q],K[U]=H[U];if(K.position=H.position==="absolute"?"absolute":"relative",H.display==="inline"&&(K.display="inline-block"),G[FJ]=G[DJ]="auto",K.flexBasis=H.flexBasis||"auto",K.overflow="visible",K.boxSizing="border-box",K[z9]=h7($,W1)+l0,K[Y9]=h7($,g0)+l0,K[c0]=G[p1]=G[d5]=G[m5]="0",i9(Z),G[z9]=G["max"+n9]=H[z9],G[Y9]=G["max"+VJ]=H[Y9],G[c0]=H[c0],$.parentNode!==J)$.parentNode.insertBefore(J,$),J.appendChild($);$._gsap.swappedIn=!0}},DU=/([A-Z])/g,i9=function Q($){if($){var J=$.t.style,H=$.length,Z=0,q,K;($.t._gsap||u.core.getCache($.t)).uncache=1;for(;Z<H;Z+=2)if(K=$[Z+1],q=$[Z],K)J[q]=K;else if(J[q])J.removeProperty(q.replace(DU,"-$1").toLowerCase())}},O7=function Q($){var J=S7.length,H=$.style,Z=[],q=0;for(;q<J;q++)Z.push(S7[q],H[S7[q]]);return Z.t=$,Z},FU=function Q($,J,H){var Z=[],q=$.length,K=H?8:0,G;for(;K<q;K+=2)G=$[K],Z.push(G,G in J?J[G]:$[K+1]);return Z.t=$.t,Z},b7={left:0,top:0},A5=function Q($,J,H,Z,q,K,G,U,W,X,j,L,B,M){if(B1($)&&($=$(U)),h1($)&&$.substr(0,3)==="max")$=L+($.charAt(4)==="="?k7("0"+$.substr(3),H):0);var I=B?B.time():0,z,R,F;if(B&&B.seek(0),isNaN($)||($=+$),!S8($)){B1(J)&&(J=J(U));var V=($||"0").split(" "),Y,N,C,D;if(F=Y1(J,U)||U0,Y=x$(F)||{},(!Y||!Y.left&&!Y.top)&&o1(F).display==="none")D=F.style.display,F.style.display="block",Y=x$(F),D?F.style.display=D:F.style.removeProperty("display");N=k7(V[0],Y[Z.d]),C=k7(V[1]||"0",H),$=Y[Z.p]-W[Z.p]-X+N+q-C,G&&x7(G,C,Z,H-C<20||G._isStart&&C>20),H-=H-C}else B&&($=u.utils.mapRange(B.scrollTrigger.start,B.scrollTrigger.end,0,L,$)),G&&x7(G,H,Z,!0);if(M)U[M]=$||-0.001,$<0&&($=0);if(K){var O=$+H,A=K._isStart;if(z="scroll"+Z.d2,x7(K,O,Z,A&&O>20||!A&&(j?Math.max(U0[z],f1[z]):K.parentNode[z])<=O+1),j)W=x$(G),j&&(K.style[Z.op.p]=W[Z.op.p]-Z.op.m-K._offset+l0)}if(B&&F)z=x$(F),B.seek(L),R=x$(F),B._caScrollDist=z[Z.p]-R[Z.p],$=$/B._caScrollDist*L;return B&&B.seek(I),B?$:Math.round($)},VU=/(webkit|moz|length|cssText|inset)/i,P5=function Q($,J,H,Z){if($.parentNode!==J){var q=$.style,K,G;if(J===U0){$._stOrig=q.cssText,G=o1($);for(K in G)if(!+K&&!VU.test(K)&&G[K]&&typeof q[K]==="string"&&K!=="0")q[K]=G[K];q.top=H,q.left=Z}else q.cssText=$._stOrig;u.core.getCache($).uncache=1,J.appendChild($)}},l5=function Q($,J,H){var Z=J,q=Z;return function(K){var G=Math.round($());if(G!==Z&&G!==q&&Math.abs(G-Z)>3&&Math.abs(G-q)>3)K=G,H&&H();return q=Z,Z=Math.round(K),Z}},A7=function Q($,J,H){var Z={};Z[J.p]="+="+H,u.set($,Z)},k5=function Q($,J){var H=P$($,J),Z="_scroll"+J.p2,q=function K(G,U,W,X,j){var L=K.tween,B=U.onComplete,M={};W=W||H();var I=l5(H,W,function(){L.kill(),K.tween=0});return j=X&&j||0,X=X||G-W,L&&L.kill(),U[Z]=G,U.inherit=!1,U.modifiers=M,M[Z]=function(){return I(W+X*L.ratio+j*L.ratio*L.ratio)},U.onUpdate=function(){a.cache++,K.tween&&w$()},U.onComplete=function(){K.tween=0,B&&B.call(L)},L=K.tween=u.to($,U),L};return $[Z]=H,H.wheelHandler=function(){return q.tween&&q.tween.kill()&&(q.tween=0)},a0($,"wheel",H.wheelHandler),$0.isTouch&&a0($,"touchmove",H.wheelHandler),q},$0=function(){function Q(J,H){o9||Q.register(u)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),jJ(this),this.init(J,H)}var $=Q.prototype;return $.init=function J(H,Z){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!x8){this.update=this.refresh=this.kill=j$;return}H=V5(h1(H)||S8(H)||H.nodeType?{trigger:H}:H,C7);var q=H,K=q.onUpdate,G=q.toggleClass,U=q.id,W=q.onToggle,X=q.onRefresh,j=q.scrub,L=q.trigger,B=q.pin,M=q.pinSpacing,I=q.invalidateOnRefresh,z=q.anticipatePin,R=q.onScrubComplete,F=q.onSnapComplete,V=q.once,Y=q.snap,N=q.pinReparent,C=q.pinSpacer,D=q.containerAnimation,O=q.fastScrollEnd,A=q.preventOverlaps,P=H.horizontal||H.containerAnimation&&H.horizontal!==!1?W1:g0,w=!j&&j!==0,x=Y1(H.scroller||e),S=u.core.getCache(x),T=D9(x),h=("pinType"in H?H.pinType:k$(x,"pinType")||T&&"fixed")==="fixed",y=[H.onEnter,H.onLeave,H.onEnterBack,H.onLeaveBack],b=w&&H.toggleActions.split(" "),m="markers"in H?H.markers:C7.markers,_=T?0:parseFloat(o1(x)["border"+P.p2+n9])||0,E=this,c=H.onRefreshInit&&function(){return H.onRefreshInit(E)},Q0=jU(x,T,P),j0=BU(x,T),H0=0,F0=0,N0=0,W0=P$(x,P),M0,A0,i0,P0,V0,i,G0,D0,p0,k,v,X0,z0,R0,r1,V1,Y$,u0,H$,C0,u1,x1,N$,Z8,m0,i8,D$,P9,k9,f$,t$,J0,e$,a1,t1,e1,$9,x9,F$;if(E._startClamp=E._endClamp=!1,E._dir=P,z*=45,E.scroller=x,E.scroll=D?D.time.bind(D):W0,P0=W0(),E.vars=H,Z=Z||H.animation,"refreshPriority"in H)b5=1,H.refreshPriority===-9999&&(v8=E);if(S.tweenScroll=S.tweenScroll||{top:k5(x,g0),left:k5(x,W1)},E.tweenTo=M0=S.tweenScroll[P.p],E.scrubDuration=function(f){if(e$=S8(f)&&f,!e$)J0&&J0.progress(1).kill(),J0=0;else J0?J0.duration(f):J0=u.to(Z,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:e$,paused:!0,onComplete:function o(){return R&&R(E)}})},Z)Z.vars.lazy=!1,Z._initted&&!E.isReverted||Z.vars.immediateRender!==!1&&H.immediateRender!==!1&&Z.duration()&&Z.render(0,!0,!0),E.animation=Z.pause(),Z.scrollTrigger=E,E.scrubDuration(j),f$=0,U||(U=Z.vars.id);if(Y){if(!I9(Y)||Y.push)Y={snapTo:Y};"scrollBehavior"in U0.style&&u.set(T?[U0,f1]:x,{scrollBehavior:"auto"}),a.forEach(function(f){return B1(f)&&f.target===(T?Y0.scrollingElement||f1:x)&&(f.smooth=!1)}),i0=B1(Y.snapTo)?Y.snapTo:Y.snapTo==="labels"?IU(Z):Y.snapTo==="labelsDirectional"?MU(Z):Y.directional!==!1?function(f,o){return RJ(Y.snapTo)(f,j1()-F0<500?0:o.direction)}:u.utils.snap(Y.snapTo),a1=Y.duration||{min:0.1,max:2},a1=I9(a1)?T8(a1.min,a1.max):T8(a1,a1),t1=u.delayedCall(Y.delay||e$/2||0.1,function(){var f=W0(),o=j1()-F0<500,d=M0.tween;if((o||Math.abs(E.getVelocity())<10)&&!d&&!_7&&H0!==f){var s=(f-i)/R0,n0=Z&&!w?Z.totalProgress():s,Z0=o?0:(n0-t$)/(j1()-k8)*1000||0,_0=u.utils.clamp(-s,1-s,c9(Z0/2)*Z0/0.185),Z1=s+(Y.inertia===!1?0:_0),b0,E0,B0=Y,$$=B0.onStart,k0=B0.onInterrupt,w1=B0.onComplete;if(b0=i0(Z1,E),S8(b0)||(b0=Z1),E0=Math.max(0,Math.round(i+b0*R0)),f<=G0&&f>=i&&E0!==f){if(d&&!d._initted&&d.data<=c9(E0-f))return;if(Y.inertia===!1)_0=b0-s;M0(E0,{duration:a1(c9(Math.max(c9(Z1-n0),c9(b0-n0))*0.185/Z0/0.05||0)),ease:Y.ease||"power3",data:c9(E0-f),onInterrupt:function Z$(){return t1.restart(!0)&&k0&&k0(E)},onComplete:function Z$(){if(E.update(),H0=W0(),Z&&!w)J0?J0.resetTo("totalProgress",b0,Z._tTime/Z._tDur):Z.progress(b0);f$=t$=Z&&!w?Z.totalProgress():E.progress,F&&F(E),w1&&w1(E)}},f,_0*R0,E0-f-_0*R0),$$&&$$(E,M0.tween)}}else if(E.isActive&&H0!==f)t1.restart(!0)}).pause()}if(U&&(LJ[U]=E),L=E.trigger=Y1(L||B!==!0&&B),F$=L&&L._gsap&&L._gsap.stRevert,F$&&(F$=F$(E)),B=B===!0?L:Y1(B),h1(G)&&(G={targets:L,className:G}),B){if(M===!1||M===p1||(M=!M&&B.parentNode&&B.parentNode.style&&o1(B.parentNode).display==="flex"?!1:c0),E.pin=B,A0=u.core.getCache(B),!A0.spacer){if(C)C=Y1(C),C&&!C.nodeType&&(C=C.current||C.nativeElement),A0.spacerIsNative=!!C,C&&(A0.spacerState=O7(C));A0.spacer=u0=C||Y0.createElement("div"),u0.classList.add("pin-spacer"),U&&u0.classList.add("pin-spacer-"+U),A0.pinState=r1=O7(B)}else r1=A0.pinState;H.force3D!==!1&&u.set(B,{force3D:!0}),E.spacer=u0=A0.spacer,k9=o1(B),Z8=k9[M+P.os2],C0=u.getProperty(B),u1=u.quickSetter(B,P.a,l0),GJ(B,u0,k9),Y$=O7(B)}if(m){X0=I9(m)?V5(m,R5):R5,k=E7("scroller-start",U,x,P,X0,0),v=E7("scroller-end",U,x,P,X0,0,k),H$=k["offset"+P.op.d2];var q8=Y1(k$(x,"content")||x);if(D0=this.markerStart=E7("start",U,q8,P,X0,H$,0,D),p0=this.markerEnd=E7("end",U,q8,P,X0,H$,0,D),D&&(x9=u.quickSetter([D0,p0],P.a,l0)),!h&&!(J$.length&&k$(x,"fixedMarkers")===!0))LU(T?U0:x),u.set([k,v],{force3D:!0}),i8=u.quickSetter(k,P.a,l0),P9=u.quickSetter(v,P.a,l0)}if(D){var l=D.vars.onUpdate,g=D.vars.onUpdateParams;D.eventCallback("onUpdate",function(){E.update(0,0,1),l&&l.apply(D,g||[])})}if(E.previous=function(){return t[t.indexOf(E)-1]},E.next=function(){return t[t.indexOf(E)+1]},E.revert=function(f,o){if(!o)return E.kill(!0);var d=f!==!1||!E.enabled,s=X1;if(d!==E.isReverted){if(d)e1=Math.max(W0(),E.scroll.rec||0),N0=E.progress,$9=Z&&Z.progress();if(D0&&[D0,p0,k,v].forEach(function(n0){return n0.style.display=d?"none":"block"}),d)X1=E,E.update(d);if(B&&(!N||!E.isActive))if(d)NU(B,u0,r1);else GJ(B,u0,o1(B),m0);d||E.update(d),X1=s,E.isReverted=d}},E.refresh=function(f,o,d,s){if((X1||!E.enabled)&&!o)return;if(B&&f&&s1){a0(Q,"scrollEnd",c5);return}if(!F1&&c&&c(E),X1=E,M0.tween&&!d)M0.tween.kill(),M0.tween=0;if(J0&&J0.pause(),I&&Z)Z.revert({kill:!1}).invalidate(),Z.getChildren&&Z.getChildren(!0,!0,!1).forEach(function(_$){return _$.vars.immediateRender&&_$.render(0,!0,!0)});E.isReverted||E.revert(!0,!0),E._subPinOffset=!1;var n0=Q0(),Z0=j0(),_0=D?D.duration():B$(x,P),Z1=R0<=0.01||!R0,b0=0,E0=s||0,B0=I9(d)?d.end:H.end,$$=H.endTrigger||L,k0=I9(d)?d.start:H.start||(H.start===0||!L?0:B?"0 0":"0 100%"),w1=E.pinnedContainer=H.pinnedContainer&&Y1(H.pinnedContainer,E),Z$=L&&Math.max(0,t.indexOf(E))||0,t0=Z$,e0,q1,Q9,n8,K1,o0,q$,qQ,sH,K8,K$,G8,r8;if(m&&I9(d))G8=u.getProperty(k,P.p),r8=u.getProperty(v,P.p);while(t0-- >0){if(o0=t[t0],o0.end||o0.refresh(0,1)||(X1=E),q$=o0.pin,q$&&(q$===L||q$===B||q$===w1)&&!o0.isReverted)K8||(K8=[]),K8.unshift(o0),o0.revert(!0,!0);if(o0!==t[t0])Z$--,t0--}if(B1(k0)&&(k0=k0(E)),k0=Y5(k0,"start",E),i=A5(k0,L,n0,P,W0(),D0,k,E,Z0,_,h,_0,D,E._startClamp&&"_startClamp")||(B?-0.001:0),B1(B0)&&(B0=B0(E)),h1(B0)&&!B0.indexOf("+="))if(~B0.indexOf(" "))B0=(h1(k0)?k0.split(" ")[0]:"")+B0;else b0=k7(B0.substr(2),n0),B0=h1(k0)?k0:(D?u.utils.mapRange(0,D.duration(),D.scrollTrigger.start,D.scrollTrigger.end,i):i)+b0,$$=L;B0=Y5(B0,"end",E),G0=Math.max(i,A5(B0||($$?"100% 0":_0),$$,n0,P,W0()+b0,p0,v,E,Z0,_,h,_0,D,E._endClamp&&"_endClamp"))||-0.001,b0=0,t0=Z$;while(t0--)if(o0=t[t0],q$=o0.pin,q$&&o0.start-o0._pinPush<=i&&!D&&o0.end>0){if(e0=o0.end-(E._startClamp?Math.max(0,o0.start):o0.start),(q$===L&&o0.start-o0._pinPush<i||q$===w1)&&isNaN(k0))b0+=e0*(1-o0.progress);q$===B&&(E0+=e0)}if(i+=b0,G0+=b0,E._startClamp&&(E._startClamp+=b0),E._endClamp&&!F1)E._endClamp=G0||-0.001,G0=Math.min(G0,B$(x,P));if(R0=G0-i||(i-=0.01)&&0.001,Z1)N0=u.utils.clamp(0,1,u.utils.normalize(i,G0,e1));if(E._pinPush=E0,D0&&b0)e0={},e0[P.a]="+="+b0,w1&&(e0[P.p]="-="+W0()),u.set([D0,p0],e0);if(B&&!(BJ&&E.end>=B$(x,P))){if(e0=o1(B),n8=P===g0,Q9=W0(),x1=parseFloat(C0(P.a))+E0,!_0&&G0>1){if(K$=(T?Y0.scrollingElement||f1:x).style,K$={style:K$,value:K$["overflow"+P.a.toUpperCase()]},T&&o1(U0)["overflow"+P.a.toUpperCase()]!=="scroll")K$.style["overflow"+P.a.toUpperCase()]="scroll"}if(GJ(B,u0,e0),Y$=O7(B),q1=x$(B,!0),qQ=h&&P$(x,n8?W1:g0)(),M){if(m0=[M+P.os2,R0+E0+l0],m0.t=u0,t0=M===c0?h7(B,P)+R0+E0:0,t0)m0.push(P.d,t0+l0),u0.style.flexBasis!=="auto"&&(u0.style.flexBasis=t0+l0);if(i9(m0),w1)t.forEach(function(_$){if(_$.pin===w1&&_$.vars.pinSpacing!==!1)_$._subPinOffset=!0});h&&W0(e1)}else t0=h7(B,P),t0&&u0.style.flexBasis!=="auto"&&(u0.style.flexBasis=t0+l0);if(h)K1={top:q1.top+(n8?Q9-i:qQ)+l0,left:q1.left+(n8?qQ:Q9-i)+l0,boxSizing:"border-box",position:"fixed"},K1[z9]=K1["max"+n9]=Math.ceil(q1.width)+l0,K1[Y9]=K1["max"+VJ]=Math.ceil(q1.height)+l0,K1[p1]=K1[p1+f8]=K1[p1+y8]=K1[p1+_8]=K1[p1+h8]="0",K1[c0]=e0[c0],K1[c0+f8]=e0[c0+f8],K1[c0+y8]=e0[c0+y8],K1[c0+_8]=e0[c0+_8],K1[c0+h8]=e0[c0+h8],V1=FU(r1,K1,N),F1&&W0(0);if(Z)sH=Z._initted,JJ(1),Z.render(Z.duration(),!0,!0),N$=C0(P.a)-x1+R0+E0,D$=Math.abs(R0-N$)>1,h&&D$&&V1.splice(V1.length-2,2),Z.render(0,!0,!0),sH||Z.invalidate(!0),Z.parent||Z.totalTime(Z.totalTime()),JJ(0);else N$=R0;K$&&(K$.value?K$.style["overflow"+P.a.toUpperCase()]=K$.value:K$.style.removeProperty("overflow-"+P.a))}else if(L&&W0()&&!D){q1=L.parentNode;while(q1&&q1!==U0){if(q1._pinOffset)i-=q1._pinOffset,G0-=q1._pinOffset;q1=q1.parentNode}}if(K8&&K8.forEach(function(_$){return _$.revert(!1,!0)}),E.start=i,E.end=G0,P0=V0=F1?e1:W0(),!D&&!F1)P0<e1&&W0(e1),E.scroll.rec=0;if(E.revert(!1,!0),F0=j1(),t1)H0=-1,t1.restart(!0);if(X1=0,Z&&w&&(Z._initted||$9)&&Z.progress()!==$9&&Z.progress($9||0,!0).render(Z.time(),!0,!0),Z1||N0!==E.progress||D||I||Z&&!Z._initted)Z&&!w&&(Z._initted||N0||Z.vars.immediateRender!==!1)&&Z.totalProgress(D&&i<-0.001&&!N0?u.utils.normalize(i,G0,0):N0,!0),E.progress=Z1||(P0-i)/R0===N0?0:N0;if(B&&M&&(u0._pinOffset=Math.round(E.progress*N$)),J0&&J0.invalidate(),!isNaN(G8))G8-=u.getProperty(k,P.p),r8-=u.getProperty(v,P.p),A7(k,P,G8),A7(D0,P,G8-(s||0)),A7(v,P,r8),A7(p0,P,r8-(s||0));if(Z1&&!F1&&E.update(),X&&!F1&&!z0)z0=!0,X(E),z0=!1},E.getVelocity=function(){return(W0()-V0)/(j1()-k8)*1000||0},E.endAnimation=function(){if(P8(E.callbackAnimation),Z)J0?J0.progress(1):!Z.paused()?P8(Z,Z.reversed()):w||P8(Z,E.direction<0,1)},E.labelToScroll=function(f){return Z&&Z.labels&&(i||E.refresh()||i)+Z.labels[f]/Z.duration()*R0||0},E.getTrailing=function(f){var o=t.indexOf(E),d=E.direction>0?t.slice(0,o).reverse():t.slice(o+1);return(h1(f)?d.filter(function(s){return s.vars.preventOverlaps===f}):d).filter(function(s){return E.direction>0?s.end<=i:s.start>=G0})},E.update=function(f,o,d){if(D&&!d&&!f)return;var s=F1===!0?e1:E.scroll(),n0=f?0:(s-i)/R0,Z0=n0<0?0:n0>1?1:n0||0,_0=E.progress,Z1,b0,E0,B0,$$,k0,w1,Z$;if(o){if(V0=P0,P0=D?W0():s,Y)t$=f$,f$=Z&&!w?Z.totalProgress():Z0}if(z&&B&&!X1&&!D7&&s1){if(!Z0&&i<s+(s-V0)/(j1()-k8)*z)Z0=0.0001;else if(Z0===1&&G0>s+(s-V0)/(j1()-k8)*z)Z0=0.9999}if(Z0!==_0&&E.enabled){if(Z1=E.isActive=!!Z0&&Z0<1,b0=!!_0&&_0<1,k0=Z1!==b0,$$=k0||!!Z0!==!!_0,E.direction=Z0>_0?1:-1,E.progress=Z0,$$&&!X1){if(E0=Z0&&!_0?0:Z0===1?1:_0===1?2:3,w)B0=!k0&&b[E0+1]!=="none"&&b[E0+1]||b[E0],Z$=Z&&(B0==="complete"||B0==="reset"||(B0 in Z))}if(A&&(k0||Z$)&&(Z$||j||!Z)&&(B1(A)?A(E):E.getTrailing(A).forEach(function(Q9){return Q9.endAnimation()})),!w){if(J0&&!X1&&!D7)if(J0._dp._time-J0._start!==J0._time&&J0.render(J0._dp._time-J0._start),J0.resetTo)J0.resetTo("totalProgress",Z0,Z._tTime/Z._tDur);else J0.vars.totalProgress=Z0,J0.invalidate().restart();else if(Z)Z.totalProgress(Z0,!!(X1&&(F0||f)))}if(B){if(f&&M&&(u0.style[M+P.os2]=Z8),!h)u1(w8(x1+N$*Z0));else if($$){if(w1=!f&&Z0>_0&&G0+1>s&&s+1>=B$(x,P),N)if(!f&&(Z1||w1)){var t0=x$(B,!0),e0=s-i;P5(B,U0,t0.top+(P===g0?e0:0)+l0,t0.left+(P===g0?0:e0)+l0)}else P5(B,u0);i9(Z1||w1?V1:Y$),D$&&Z0<1&&Z1||u1(x1+(Z0===1&&!w1?N$:0))}}if(Y&&!M0.tween&&!X1&&!D7&&t1.restart(!0),G&&(k0||V&&Z0&&(Z0<1||!HJ))&&u8(G.targets).forEach(function(Q9){return Q9.classList[Z1||V?"add":"remove"](G.className)}),K&&!w&&!f&&K(E),$$&&!X1){if(w){if(Z$)if(B0==="complete")Z.pause().totalProgress(1);else if(B0==="reset")Z.restart(!0).pause();else if(B0==="restart")Z.restart(!0);else Z[B0]();K&&K(E)}if(k0||!HJ){if(W&&k0&&qJ(E,W),y[E0]&&qJ(E,y[E0]),V&&(Z0===1?E.kill(!1,1):y[E0]=0),!k0)E0=Z0===1?1:3,y[E0]&&qJ(E,y[E0])}if(O&&!Z1&&Math.abs(E.getVelocity())>(S8(O)?O:2500))P8(E.callbackAnimation),J0?J0.progress(1):P8(Z,B0==="reverse"?1:!Z0,1)}else if(w&&K&&!X1)K(E)}if(P9){var q1=D?s/D.duration()*(D._caScrollDist||0):s;i8(q1+(k._isFlipped?1:0)),P9(q1)}x9&&x9(-s/D.duration()*(D._caScrollDist||0))},E.enable=function(f,o){if(!E.enabled){if(E.enabled=!0,a0(x,"resize",b8),T||a0(x,"scroll",p9),c&&a0(Q,"refreshInit",c),f!==!1)E.progress=N0=0,P0=V0=H0=W0();o!==!1&&E.refresh()}},E.getTween=function(f){return f&&M0?M0.tween:J0},E.setPositions=function(f,o,d,s){if(D){var n0=D.scrollTrigger,Z0=D.duration(),_0=n0.end-n0.start;f=n0.start+_0*f/Z0,o=n0.start+_0*o/Z0}E.refresh(!1,!1,{start:N5(f,d&&!!E._startClamp),end:N5(o,d&&!!E._endClamp)},s),E.update()},E.adjustPinSpacing=function(f){if(m0&&f){var o=m0.indexOf(P.d)+1;m0[o]=parseFloat(m0[o])+f+l0,m0[1]=parseFloat(m0[1])+f+l0,i9(m0)}},E.disable=function(f,o){if(E.enabled){if(f!==!1&&E.revert(!0,!0),E.enabled=E.isActive=!1,o||J0&&J0.pause(),e1=0,A0&&(A0.uncache=1),c&&r0(Q,"refreshInit",c),t1)t1.pause(),M0.tween&&M0.tween.kill()&&(M0.tween=0);if(!T){var d=t.length;while(d--)if(t[d].scroller===x&&t[d]!==E)return;r0(x,"resize",b8),T||r0(x,"scroll",p9)}}},E.kill=function(f,o){E.disable(f,o),J0&&!o&&J0.kill(),U&&delete LJ[U];var d=t.indexOf(E);if(d>=0&&t.splice(d,1),d===D1&&w7>0&&D1--,d=0,t.forEach(function(s){return s.scroller===E.scroller&&(d=1)}),d||F1||(E.scroll.rec=0),Z)Z.scrollTrigger=null,f&&Z.revert({kill:!1}),o||Z.kill();if(D0&&[D0,p0,k,v].forEach(function(s){return s.parentNode&&s.parentNode.removeChild(s)}),v8===E&&(v8=0),B)A0&&(A0.uncache=1),d=0,t.forEach(function(s){return s.pin===B&&d++}),d||(A0.spacer=0);H.onKill&&H.onKill(E)},t.push(E),E.enable(!1,!1),F$&&F$(E),Z&&Z.add&&!R0){var K0=E.update;E.update=function(){E.update=K0,a.cache++,i||G0||E.refresh()},u.delayedCall(0.01,E.update),R0=0.01,i=G0=0}else E.refresh();B&&YU()},Q.register=function J(H){if(!o9)u=H||_5(),f5()&&window.document&&Q.enable(),o9=x8;return o9},Q.defaults=function J(H){if(H)for(var Z in H)C7[Z]=H[Z];return C7},Q.disable=function J(H,Z){x8=0,t.forEach(function(K){return K[Z?"kill":"disable"](H)}),r0(e,"wheel",p9),r0(Y0,"scroll",p9),clearInterval(N7),r0(Y0,"touchcancel",j$),r0(U0,"touchstart",j$),V7(r0,Y0,"pointerdown,touchstart,mousedown",D5),V7(r0,Y0,"pointerup,touchend,mouseup",F5),T7.kill(),F7(r0);for(var q=0;q<a.length;q+=3)R7(r0,a[q],a[q+1]),R7(r0,a[q],a[q+2])},Q.enable=function J(){if(e=window,Y0=document,f1=Y0.documentElement,U0=Y0.body,u){if(u8=u.utils.toArray,T8=u.utils.clamp,jJ=u.core.context||j$,JJ=u.core.suppressOverwrites||j$,YJ=e.history.scrollRestoration||"auto",IJ=e.pageYOffset||0,u.core.globals("ScrollTrigger",Q),U0){if(x8=1,l9=document.createElement("div"),l9.style.height="100vh",l9.style.position="absolute",s5(),XU(),h0.register(u),Q.isTouch=h0.isTouch,n$=h0.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),XJ=h0.isTouch===1,a0(e,"wheel",p9),zJ=[e,Y0,f1,U0],u.matchMedia)Q.matchMedia=function(W){var X=u.matchMedia(),j;for(j in W)X.add(j,W[j]);return X},u.addEventListener("matchMediaInit",function(){return CJ()}),u.addEventListener("matchMediaRevert",function(){return p5()}),u.addEventListener("matchMedia",function(){M9(0,1),V9("matchMedia")}),u.matchMedia().add("(orientation: portrait)",function(){return KJ(),KJ});else console.warn("Requires GSAP 3.11.0 or later");KJ(),a0(Y0,"scroll",p9);var H=U0.hasAttribute("style"),Z=U0.style,q=Z.borderTopStyle,K=u.core.Animation.prototype,G,U;if(K.revert||Object.defineProperty(K,"revert",{value:function W(){return this.time(-0.01,!0)}}),Z.borderTopStyle="solid",G=x$(U0),g0.m=Math.round(G.top+g0.sc())||0,W1.m=Math.round(G.left+W1.sc())||0,q?Z.borderTopStyle=q:Z.removeProperty("border-top-style"),!H)U0.setAttribute("style",""),U0.removeAttribute("style");N7=setInterval(C5,250),u.delayedCall(0.5,function(){return D7=0}),a0(Y0,"touchcancel",j$),a0(U0,"touchstart",j$),V7(a0,Y0,"pointerdown,touchstart,mousedown",D5),V7(a0,Y0,"pointerup,touchend,mouseup",F5),WJ=u.utils.checkPrefix("transform"),S7.push(WJ),o9=j1(),T7=u.delayedCall(0.2,M9).pause(),s9=[Y0,"visibilitychange",function(){var{innerWidth:W,innerHeight:X}=e;if(Y0.hidden)M5=W,z5=X;else if(M5!==W||z5!==X)b8()},Y0,"DOMContentLoaded",M9,e,"load",M9,e,"resize",b8],F7(a0),t.forEach(function(W){return W.enable(0,1)});for(U=0;U<a.length;U+=3)R7(r0,a[U],a[U+1]),R7(r0,a[U],a[U+2])}}},Q.config=function J(H){"limitCallbacks"in H&&(HJ=!!H.limitCallbacks);var Z=H.syncInterval;if(Z&&clearInterval(N7)||(N7=Z)&&setInterval(C5,Z),"ignoreMobileResize"in H&&(XJ=Q.isTouch===1&&H.ignoreMobileResize),"autoRefreshEvents"in H)F7(r0)||F7(a0,H.autoRefreshEvents||"none"),T5=(H.autoRefreshEvents+"").indexOf("resize")===-1},Q.scrollerProxy=function J(H,Z){var q=Y1(H),K=a.indexOf(q),G=D9(q);if(~K)a.splice(K,G?6:2);if(Z)G?J$.unshift(e,Z,U0,Z,f1,Z):J$.unshift(q,Z)},Q.clearMatchMedia=function J(H){t.forEach(function(Z){return Z._ctx&&Z._ctx.query===H&&Z._ctx.kill(!0,!0)})},Q.isInViewport=function J(H,Z,q){var K=(h1(H)?Y1(H):H).getBoundingClientRect(),G=K[q?z9:Y9]*Z||0;return q?K.right-G>0&&K.left+G<e.innerWidth:K.bottom-G>0&&K.top+G<e.innerHeight},Q.positionInViewport=function J(H,Z,q){h1(H)&&(H=Y1(H));var K=H.getBoundingClientRect(),G=K[q?z9:Y9],U=Z==null?G/2:(Z in f7)?f7[Z]*G:~Z.indexOf("%")?parseFloat(Z)*G/100:parseFloat(Z)||0;return q?(K.left+U)/e.innerWidth:(K.top+U)/e.innerHeight},Q.killAll=function J(H){if(t.slice(0).forEach(function(q){return q.vars.id!=="ScrollSmoother"&&q.kill()}),H!==!0){var Z=F9.killAll||[];F9={},Z.forEach(function(q){return q()})}},Q}();$0.version="3.13.0";$0.saveStyles=function(Q){return Q?u8(Q).forEach(function($){if($&&$.style){var J=y1.indexOf($);J>=0&&y1.splice(J,5),y1.push($,$.style.cssText,$.getBBox&&$.getAttribute("transform"),u.core.getCache($),jJ())}}):y1};$0.revert=function(Q,$){return CJ(!Q,$)};$0.create=function(Q,$){return new $0(Q,$)};$0.refresh=function(Q){return Q?b8(!0):(o9||$0.register())&&M9(!0)};$0.update=function(Q){return++a.cache&&w$(Q===!0?2:0)};$0.clearScrollMemory=o5;$0.maxScroll=function(Q,$){return B$(Q,$?W1:g0)};$0.getScrollFunc=function(Q,$){return P$(Y1(Q),$?W1:g0)};$0.getById=function(Q){return LJ[Q]};$0.getAll=function(){return t.filter(function(Q){return Q.vars.id!=="ScrollSmoother"})};$0.isScrolling=function(){return!!s1};$0.snapDirectional=RJ;$0.addEventListener=function(Q,$){var J=F9[Q]||(F9[Q]=[]);~J.indexOf($)||J.push($)};$0.removeEventListener=function(Q,$){var J=F9[Q],H=J&&J.indexOf($);H>=0&&J.splice(H,1)};$0.batch=function(Q,$){var J=[],H={},Z=$.interval||0.016,q=$.batchMax||1e9,K=function U(W,X){var j=[],L=[],B=u.delayedCall(Z,function(){X(j,L),j=[],L=[]}).pause();return function(M){j.length||B.restart(!0),j.push(M.trigger),L.push(M),q<=j.length&&B.progress(1)}},G;for(G in $)H[G]=G.substr(0,2)==="on"&&B1($[G])&&G!=="onRefreshInit"?K(G,$[G]):$[G];if(B1(q))q=q(),a0($0,"refresh",function(){return q=$.batchMax()});return u8(Q).forEach(function(U){var W={};for(G in H)W[G]=H[G];W.trigger=U,J.push($0.create(W))}),J};var x5=function Q($,J,H,Z){return J>Z?$(Z):J<0&&$(0),H>Z?(Z-J)/(H-J):H<0?J/(J-H):1},UJ=function Q($,J){if(J===!0)$.style.removeProperty("touch-action");else $.style.touchAction=J===!0?"auto":J?"pan-"+J+(h0.isTouch?" pinch-zoom":""):"none";$===f1&&Q(U0,J)},P7={auto:1,scroll:1},RU=function Q($){var{event:J,target:H,axis:Z}=$,q=(J.changedTouches?J.changedTouches[0]:J).target,K=q._gsap||u.core.getCache(q),G=j1(),U;if(!K._isScrollT||G-K._isScrollT>2000){while(q&&q!==U0&&(q.scrollHeight<=q.clientHeight&&q.scrollWidth<=q.clientWidth||!(P7[(U=o1(q)).overflowY]||P7[U.overflowX])))q=q.parentNode;K._isScroll=q&&q!==H&&!D9(q)&&(P7[(U=o1(q)).overflowY]||P7[U.overflowX]),K._isScrollT=G}if(K._isScroll||Z==="x")J.stopPropagation(),J._gsapAllow=!0},i5=function Q($,J,H,Z){return h0.create({target:$,capture:!0,debounce:!1,lockAxis:!0,type:J,onWheel:Z=Z&&RU,onPress:Z,onDrag:Z,onScroll:Z,onEnable:function q(){return H&&a0(Y0,h0.eventTypes[0],S5,!1,!0)},onDisable:function q(){return r0(Y0,h0.eventTypes[0],S5,!0)}})},CU=/(input|label|select|textarea)/i,w5,S5=function Q($){var J=CU.test($.target.tagName);if(J||w5)$._gsapAllow=!0,w5=J},EU=function Q($){I9($)||($={}),$.preventDefault=$.isNormalizer=$.allowClicks=!0,$.type||($.type="wheel,touch"),$.debounce=!!$.debounce,$.id=$.id||"normalizer";var J=$,H=J.normalizeScrollX,Z=J.momentum,q=J.allowNestedScroll,K=J.onRelease,G,U,W=Y1($.target)||f1,X=u.core.globals().ScrollSmoother,j=X&&X.get(),L=n$&&($.content&&Y1($.content)||j&&$.content!==!1&&!j.smooth()&&j.content()),B=P$(W,g0),M=P$(W,W1),I=1,z=(h0.isTouch&&e.visualViewport?e.visualViewport.scale*e.visualViewport.width:e.outerWidth)/e.innerWidth,R=0,F=B1(Z)?function(){return Z(G)}:function(){return Z||2.8},V,Y,N=i5(W,$.type,!0,q),C=function b(){return Y=!1},D=j$,O=j$,A=function b(){U=B$(W,g0),O=T8(n$?1:0,U),H&&(D=T8(0,B$(W,W1))),V=N9},P=function b(){L._gsap.y=w8(parseFloat(L._gsap.y)+B.offset)+"px",L.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(L._gsap.y)+", 0, 1)",B.offset=B.cacheID=0},w=function b(){if(Y){requestAnimationFrame(C);var m=w8(G.deltaY/2),_=O(B.v-m);if(L&&_!==B.v+B.offset){B.offset=_-B.v;var E=w8((parseFloat(L&&L._gsap.y)||0)-B.offset);L.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+E+", 0, 1)",L._gsap.y=E+"px",B.cacheID=a.cache,w$()}return!0}B.offset&&P(),Y=!0},x,S,T,h,y=function b(){if(A(),x.isActive()&&x.vars.scrollY>U)B()>U?x.progress(1)&&B(U):x.resetTo("scrollY",U)};return L&&u.set(L,{y:"+=0"}),$.ignoreCheck=function(b){return n$&&b.type==="touchmove"&&w(b)||I>1.05&&b.type!=="touchstart"||G.isGesturing||b.touches&&b.touches.length>1},$.onPress=function(){Y=!1;var b=I;I=w8((e.visualViewport&&e.visualViewport.scale||1)/z),x.pause(),b!==I&&UJ(W,I>1.01?!0:H?!1:"x"),S=M(),T=B(),A(),V=N9},$.onRelease=$.onGestureStart=function(b,m){if(B.offset&&P(),!m)h.restart(!0);else{a.cache++;var _=F(),E,c;if(H)E=M(),c=E+_*0.05*-b.velocityX/0.227,_*=x5(M,E,c,B$(W,W1)),x.vars.scrollX=D(c);if(E=B(),c=E+_*0.05*-b.velocityY/0.227,_*=x5(B,E,c,B$(W,g0)),x.vars.scrollY=O(c),x.invalidate().duration(_).play(0.01),n$&&x.vars.scrollY>=U||E>=U-1)u.to({},{onUpdate:y,duration:_})}K&&K(b)},$.onWheel=function(){if(x._ts&&x.pause(),j1()-R>1000)V=0,R=j1()},$.onChange=function(b,m,_,E,c){if(N9!==V&&A(),m&&H&&M(D(E[2]===m?S+(b.startX-b.x):M()+m-E[1])),_){B.offset&&P();var Q0=c[2]===_,j0=Q0?T+b.startY-b.y:B()+_-c[1],H0=O(j0);Q0&&j0!==H0&&(T+=H0-j0),B(H0)}(_||m)&&w$()},$.onEnable=function(){if(UJ(W,H?!1:"x"),$0.addEventListener("refresh",y),a0(e,"resize",y),B.smooth)B.target.style.scrollBehavior="auto",B.smooth=M.smooth=!1;N.enable()},$.onDisable=function(){UJ(W,!0),r0(e,"resize",y),$0.removeEventListener("refresh",y),N.kill()},$.lockAxis=$.lockAxis!==!1,G=new h0($),G.iOS=n$,n$&&!B()&&B(1),n$&&u.ticker.add(j$),h=G._dc,x=u.to(G,{ease:"power4",paused:!0,inherit:!1,scrollX:H?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:l5(B,B(),function(){return x.pause()})},onUpdate:w$,onComplete:h.vars.onComplete}),G};$0.sort=function(Q){if(B1(Q))return t.sort(Q);var $=e.pageYOffset||0;return $0.getAll().forEach(function(J){return J._sortY=J.trigger?$+J.trigger.getBoundingClientRect().top:J.start+e.innerHeight}),t.sort(Q||function(J,H){return(J.vars.refreshPriority||0)*-1e6+(J.vars.containerAnimation?1e6:J._sortY)-((H.vars.containerAnimation?1e6:H._sortY)+(H.vars.refreshPriority||0)*-1e6)})};$0.observe=function(Q){return new h0(Q)};$0.normalizeScroll=function(Q){if(typeof Q==="undefined")return N1;if(Q===!0&&N1)return N1.enable();if(Q===!1){N1&&N1.kill(),N1=Q;return}var $=Q instanceof h0?Q:EU(Q);return N1&&N1.target===$.target&&N1.kill(),D9($.target)&&(N1=$),$};$0.core={_getVelocityProp:Y7,_inputObserver:i5,_scrollers:a,_proxies:J$,bridge:{ss:function Q(){s1||V9("scrollStart"),s1=j1()},ref:function Q(){return X1}}};_5()&&u.registerPlugin($0);/*!
* SplitText 3.13.0
* https://gsap.com
*
* @license Copyright 2025, GreenSock. All rights reserved. Subject to the terms at https://gsap.com/standard-license.
* @author: Jack Doyle
*/var d8,r9,OJ,OU=()=>OJ||L$.register(window.gsap),n5=typeof Intl!=="undefined"?new Intl.Segmenter:0,v7=(Q)=>typeof Q==="string"?v7(document.querySelectorAll(Q)):("length"in Q)?Array.from(Q):[Q],r5=(Q)=>v7(Q).filter(($)=>$ instanceof HTMLElement),AJ=[],EJ=function(){},AU=/\s+/g,a5=new RegExp("\\p{RI}\\p{RI}|\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(\\u{200D}\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*|.","gu"),t5={left:0,top:0,width:0,height:0},e5=(Q,$)=>{if($){let J=new Set(Q.join("").match($)||AJ),H=Q.length,Z,q,K,G;if(J.size)while(--H>-1){q=Q[H];for(K of J)if(K.startsWith(q)&&K.length>q.length){Z=0,G=q;while(K.startsWith(G+=Q[H+ ++Z])&&G.length<K.length);if(Z&&G.length===K.length){Q[H]=K,Q.splice(H+1,Z);break}}}}return Q},$q=(Q)=>window.getComputedStyle(Q).display==="inline"&&(Q.style.display="inline-block"),a9=(Q,$,J)=>$.insertBefore(typeof Q==="string"?document.createTextNode(Q):Q,J),PJ=(Q,$,J)=>{let H=$[Q+"sClass"]||"",{tag:Z="div",aria:q="auto",propIndex:K=!1}=$,G=Q==="line"?"block":"inline-block",U=H.indexOf("++")>-1,W=(X)=>{let j=document.createElement(Z),L=J.length+1;if(H&&(j.className=H+(U?" "+H+L:"")),K&&j.style.setProperty("--"+Q,L+""),q!=="none"&&j.setAttribute("aria-hidden","true"),Z!=="span")j.style.position="relative",j.style.display=G;return j.textContent=X,J.push(j),j};return U&&(H=H.replace("++","")),W.collection=J,W},PU=(Q,$,J,H)=>{let Z=PJ("line",J,H),q=window.getComputedStyle(Q).textAlign||"left";return(K,G)=>{let U=Z("");U.style.textAlign=q,Q.insertBefore(U,$[K]);for(;K<G;K++)U.appendChild($[K]);U.normalize()}},Qq=(Q,$,J,H,Z,q,K,G,U,W)=>{var X;let j=Array.from(Q.childNodes),L=0,{wordDelimiter:B,reduceWhiteSpace:M=!0,prepareText:I}=$,z=Q.getBoundingClientRect(),R=z,F=!M&&window.getComputedStyle(Q).whiteSpace.substring(0,3)==="pre",V=0,Y=J.collection,N,C,D,O,A,P,w,x,S,T,h,y,b,m,_,E,c,Q0;if(typeof B==="object")D=B.delimiter||B,C=B.replaceWith||"";else C=B===""?"":B||" ";N=C!==" ";for(;L<j.length;L++)if(O=j[L],O.nodeType===3){if(_=O.textContent||"",M)_=_.replace(AU," ");else if(F)_=_.replace(/\n/g,C+`
`);I&&(_=I(_,Q)),O.textContent=_,A=C||D?_.split(D||C):_.match(G)||AJ,c=A[A.length-1],x=N?c.slice(-1)===" ":!c,c||A.pop(),R=z,w=N?A[0].charAt(0)===" ":!A[0],w&&a9(" ",Q,O),A[0]||A.shift(),e5(A,U),q&&W||(O.textContent="");for(S=1;S<=A.length;S++){if(E=A[S-1],!M&&F&&E.charAt(0)===`
`)(X=O.previousSibling)==null||X.remove(),a9(document.createElement("br"),Q,O),E=E.slice(1);if(!M&&E==="")a9(C,Q,O);else if(E===" ")Q.insertBefore(document.createTextNode(" "),O);else{if(N&&E.charAt(0)===" "&&a9(" ",Q,O),V&&S===1&&!w&&Y.indexOf(V.parentNode)>-1)P=Y[Y.length-1],P.appendChild(document.createTextNode(H?"":E));else P=J(H?"":E),a9(P,Q,O),V&&S===1&&!w&&P.insertBefore(V,P.firstChild);if(H){h=n5?e5([...n5.segment(E)].map((j0)=>j0.segment),U):E.match(G)||AJ;for(Q0=0;Q0<h.length;Q0++)P.appendChild(h[Q0]===" "?document.createTextNode(" "):H(h[Q0]))}if(q&&W){if(_=O.textContent=_.substring(E.length+1,_.length),T=P.getBoundingClientRect(),T.top>R.top&&T.left<=R.left){y=Q.cloneNode(),b=Q.childNodes[0];while(b&&b!==P)m=b,b=b.nextSibling,y.appendChild(m);Q.parentNode.insertBefore(y,Q),Z&&$q(y)}R=T}if(S<A.length||x)a9(S>=A.length?" ":N&&E.slice(-1)===" "?" "+C:C,Q,O)}}Q.removeChild(O),V=0}else if(O.nodeType===1){if(K&&K.indexOf(O)>-1)Y.indexOf(O.previousSibling)>-1&&Y[Y.length-1].appendChild(O),V=O;else Qq(O,$,J,H,Z,q,K,G,U,!0),V=0;Z&&$q(O)}},Jq=class Q{constructor($,J){this.isSplit=!1,OU(),this.elements=r5($),this.chars=[],this.words=[],this.lines=[],this.masks=[],this.vars=J,this._split=()=>this.isSplit&&this.split(this.vars);let H=[],Z,q=()=>{let K=H.length,G;while(K--){G=H[K];let U=G.element.offsetWidth;if(U!==G.width){G.width=U,this._split();return}}};this._data={orig:H,obs:typeof ResizeObserver!=="undefined"&&new ResizeObserver(()=>{clearTimeout(Z),Z=setTimeout(q,200)})},EJ(this),this.split(J)}split($){this.isSplit&&this.revert(),this.vars=$=$||this.vars||{};let{type:J="chars,words,lines",aria:H="auto",deepSlice:Z=!0,smartWrap:q,onSplit:K,autoSplit:G=!1,specialChars:U,mask:W}=this.vars,X=J.indexOf("lines")>-1,j=J.indexOf("chars")>-1,L=J.indexOf("words")>-1,B=j&&!L&&!X,M=U&&("push"in U?new RegExp("(?:"+U.join("|")+")","gu"):U),I=M?new RegExp(M.source+"|"+a5.source,"gu"):a5,z=!!$.ignore&&r5($.ignore),{orig:R,animTime:F,obs:V}=this._data,Y;if(j||L||X)this.elements.forEach((N,C)=>{R[C]={element:N,html:N.innerHTML,ariaL:N.getAttribute("aria-label"),ariaH:N.getAttribute("aria-hidden")},H==="auto"?N.setAttribute("aria-label",(N.textContent||"").trim()):H==="hidden"&&N.setAttribute("aria-hidden","true");let D=[],O=[],A=[],P=j?PJ("char",$,D):null,w=PJ("word",$,O),x,S,T,h;if(Qq(N,$,w,P,B,Z&&(X||B),z,I,M,!1),X){let y=v7(N.childNodes),b=PU(N,y,$,A),m,_=[],E=0,c=y.map((j0)=>j0.nodeType===1?j0.getBoundingClientRect():t5),Q0=t5;for(x=0;x<y.length;x++)if(m=y[x],m.nodeType===1)if(m.nodeName==="BR")_.push(m),b(E,x+1),E=x+1,Q0=c[E];else{if(x&&c[x].top>Q0.top&&c[x].left<=Q0.left)b(E,x),E=x;Q0=c[x]}E<x&&b(E,x),_.forEach((j0)=>{var H0;return(H0=j0.parentNode)==null?void 0:H0.removeChild(j0)})}if(!L){for(x=0;x<O.length;x++)if(S=O[x],j||!S.nextSibling||S.nextSibling.nodeType!==3)if(q&&!X){T=document.createElement("span"),T.style.whiteSpace="nowrap";while(S.firstChild)T.appendChild(S.firstChild);S.replaceWith(T)}else S.replaceWith(...S.childNodes);else if(h=S.nextSibling,h&&h.nodeType===3)h.textContent=(S.textContent||"")+(h.textContent||""),S.remove();O.length=0,N.normalize()}this.lines.push(...A),this.words.push(...O),this.chars.push(...D)}),W&&this[W]&&this.masks.push(...this[W].map((N)=>{let C=N.cloneNode();return N.replaceWith(C),C.appendChild(N),N.className&&(C.className=N.className.replace(/(\b\w+\b)/g,"$1-mask")),C.style.overflow="clip",C}));if(this.isSplit=!0,r9&&(G?r9.addEventListener("loadingdone",this._split):r9.status==="loading"&&console.warn("SplitText called before fonts loaded")),(Y=K&&K(this))&&Y.totalTime)this._data.anim=F?Y.totalTime(F):Y;return X&&G&&this.elements.forEach((N,C)=>{R[C].width=N.offsetWidth,V&&V.observe(N)}),this}revert(){var $,J;let{orig:H,anim:Z,obs:q}=this._data;if(q&&q.disconnect(),H.forEach(({element:K,html:G,ariaL:U,ariaH:W})=>{K.innerHTML=G,U?K.setAttribute("aria-label",U):K.removeAttribute("aria-label"),W?K.setAttribute("aria-hidden",W):K.removeAttribute("aria-hidden")}),this.chars.length=this.words.length=this.lines.length=H.length=this.masks.length=0,this.isSplit=!1,r9==null||r9.removeEventListener("loadingdone",this._split),Z)this._data.animTime=Z.totalTime(),Z.revert();return(J=($=this.vars).onRevert)==null||J.call($,this),this}static create($,J){return new Q($,J)}static register($){if(d8=d8||$||window.gsap,d8)v7=d8.utils.toArray,EJ=d8.core.context||EJ;if(!OJ&&window.innerWidth>0)r9=document.fonts,OJ=!0}};Jq.version="3.13.0";var L$=Jq;var Hq=()=>{return window.matchMedia("(prefers-reduced-motion: reduce)").matches};R8.registerPlugin($0);var kU={ease:"expo.out",duration:1.2};R8.defaults(kU);var Zq=Hq(),n=R8;function qq(Q=null){let $=()=>{let q=document.body.firstElementChild;return q instanceof HTMLElement&&q.classList.contains("w-editor-publish-node")},J=$(),H=J;if(new MutationObserver((q)=>{q.forEach((K)=>{if(K.type==="childList"){let G=$();if(G!==J){if(console.log("Editor state changed to:",G),Q)Q(G);J=G}}})}).observe(document.body,{childList:!0,subtree:!1}),Q)Q(H);return H}var xU={infinite:!1,lerp:0.1,smoothWheel:!0,touchMultiplier:2};class Kq extends tH{#$=n.ticker.add((Q)=>this.raf(Q*1000));constructor(){super(xU);this.on("scroll",this.#H.bind(this))}#H(Q){this.notify(Q)}toTop(){this.scrollTo(0,{immediate:!0})}#Q=[];add(Q,$=0,J=Symbol()){let H=this.#Q.findIndex((Z)=>Z.priority>$);if(H===-1)this.#Q.push({fn:Q,priority:$,id:J});else this.#Q.splice(H,0,{fn:Q,priority:$,id:J});return()=>this.remove(J)}remove(Q){this.#Q=this.#Q.filter(($)=>$.id!==Q)}notify(Q){if(this.#Q.length<1)return;this.#Q.forEach(($)=>$.fn(Q))}}var S0=new Kq;qq((Q)=>{if(Q)S0.destroy();else S0.start()});class kJ{#$=[];add(Q,$=0,J=Symbol()){let H=this.#$.findIndex((Z)=>Z.priority>$);if(H===-1)this.#$.push({fn:Q,priority:$,id:J});else this.#$.splice(H,0,{fn:Q,priority:$,id:J});return()=>this.remove(J)}remove(Q){this.#$=this.#$.filter(($)=>$.id!==Q)}notify(Q){if(this.#$.length<1)return;this.#$.forEach(($)=>$.fn(Q))}}class Gq extends kJ{constructor(){super();n.ticker.add(this.update.bind(this))}update(Q,$){this.notify({deltaTime:Q,time:$*0.01})}}class Uq extends kJ{width=window.innerWidth;height=window.innerHeight;timeoutId=null;debounceDelay=100;constructor(){super();window.addEventListener("resize",this.update.bind(this))}update(){if(this.timeoutId)window.clearTimeout(this.timeoutId);this.timeoutId=window.setTimeout(()=>{let{innerWidth:Q,innerHeight:$}=window;if(Q!==this.width||$!==this.height)this.width=Q,this.height=$,this.notify({width:this.width,height:this.height});this.timeoutId=null},this.debounceDelay)}}var S$=new Gq,k1=new Uq;var Xq=[],xJ=[];function jq(Q){xJ.push(Q)}function t9(Q){Xq.push(Q)}function Bq(Q){Xq.push(Q)}function Lq(){xJ.forEach((Q)=>Q()),xJ.length=0}var Wq=[],wJ=[];function Iq(Q,{element:$}={}){if($)Wq.push(async()=>{let J=$.getBoundingClientRect();return J.top<k1.height&&J.bottom>0?await Q():Promise.resolve()});else Wq.push(Q)}function Mq(Q){wJ.push(Q)}async function zq(){await Promise.allSettled(wJ.map((Q)=>Q())),wJ.length=0}function l1(Q,{root:$,rootMargin:J,threshold:H,autoStart:Z,once:q,callback:K}){let G=new g8(Q,{root:$,rootMargin:J,threshold:H,autoStart:Z,once:q,callback:K});return t9(()=>{G.destroy()}),G}function u7(Q,$={}){let J=new SJ(Q,$);return t9(()=>{J.destroy()}),J}var bJ={};r(bJ,{default:()=>Yq});function Yq(Q,$){l1(Q,{autoStart:!0,callback:({isIn:J})=>{if(J)n.to(Q,{opacity:1,delay:0.8});else n.killTweensOf(Q),n.set(Q,{opacity:0})}})}var TJ={};r(TJ,{default:()=>Fq});var Nq=1;function Dq(Q){let $=Q.match(/^\s*(-?\d+(?:\.\d+)?)px(?:\s+|,\s*)(-?\d+(?:\.\d+)?)px/);if(!$)return[0,0];return[Number($[1]),Number($[2])]}var wU="app:opened";function Fq(Q,$){let J=Q.querySelector("[data-draggable-area]"),H=Q.querySelector("[data-close]"),Z=Q.dataset.appId||Q.dataset.id||Q.id,q=!1,K=!1,G=null,U=null,W=0,X=0,j=0,L=0,B=0,M=0,I=Q.style.willChange,z=Q.style.translate,R=Q.style.opacity,F=Q.style.visibility,V=Q.style.pointerEvents,Y=Q.style.zIndex,N=V||"auto",C=F||"visible",D=J?.style.touchAction??"",O=J?.style.userSelect??"",A=!1,P=()=>{Q.dataset.appOpened="true",Q.dispatchEvent(new CustomEvent(wU,{bubbles:!0}))},w=()=>{Q.style.zIndex=String(Nq),Nq+=1},x=()=>{if(!Z)return null;let v=typeof CSS!=="undefined"&&typeof CSS.escape==="function"?CSS.escape(Z):Z.replace(/\\/g,"\\\\").replace(/"/g,"\\\"");return document.querySelector(`[data-target="${v}"]`)},S=()=>{if(U!==null)J?.releasePointerCapture(U),U=null},T=()=>{S(),j=0,L=0,B=0,M=0,Q.style.willChange=I,Q.style.translate=z},h=()=>{Q.style.opacity="0",Q.style.visibility="hidden",Q.style.pointerEvents="none"},y=()=>{Q.style.opacity="1",Q.style.visibility=C,Q.style.pointerEvents=N},b=(v,X0,z0=80)=>{return Q.style.willChange="opacity",Q.animate([{opacity:v},{opacity:X0}],{duration:z0,easing:"ease-out",fill:"forwards"})},m=()=>{b(1,0,80).finished.finally(()=>{h(),T(),K=!0,q=!1,Q.style.willChange=I})},_=(v)=>{w(),T(),Q.style.visibility=C,Q.style.opacity="0",Q.style.pointerEvents="none",b(0,1,80).finished.finally(()=>{K=!1,q=!1,y(),Q.style.willChange=I,P(),v?.()})},E=(v)=>{if(!K)return;_(v)},c=(v)=>Boolean(v?.hasAttribute("data-single-click")),Q0=(v)=>{if(c(v)){v.addEventListener("click",F0,!0);return}v.addEventListener("dblclick",N0,!0)},j0=(v)=>{v.removeEventListener("click",F0,!0),v.removeEventListener("dblclick",N0,!0)},H0=(v)=>{let X0=v.getAttribute("data-to");if(!X0)return;let z0=document.getElementById(X0);if(z0)z0.scrollIntoView({behavior:"smooth",block:"start"})},F0=(v)=>{v.preventDefault();let X0=v.target instanceof HTMLElement?v.target.closest("[data-target]"):null;if(!X0)return;if(K)E(()=>H0(X0));else w(),H0(X0)},N0=(v)=>{v.preventDefault();let X0=v.target instanceof HTMLElement?v.target.closest("[data-target]"):null;if(!X0)return;if(K)E(()=>H0(X0));else w(),H0(X0)},W0=x();if(W0)G=W0,Q0(G);if(Q.dataset.start==="closed")K=!0,h();else{K=!1;let X0=Array.from(document.querySelectorAll("[data-module='app']")).filter((z0)=>z0.dataset.start!=="closed").indexOf(Q);y(),w(),l1(Q,{autoStart:!0,once:!0,callback:({isIn:z0})=>{if(!z0)return;n.to(Q,{scale:1,yPercent:0,duration:0.4,delay:X0*0.08,ease:"expo.out",onComplete:()=>{if(A)return;A=!0,P()}})}})}let A0=()=>{S(),b(1,0,70).finished.finally(()=>{Q.remove()})},i0=()=>{if(q)return;q=!0;let v=x();if(!v){A0();return}if(G!==v){if(G)j0(G);G=v,Q0(G)}m()};H?.addEventListener("click",i0);let[P0,V0]=Dq(z),i=()=>{Q.style.translate=`${P0+j}px ${V0+L}px`},G0=(v)=>{if(v.pointerId!==U)return;j=B+(v.clientX-W),L=M+(v.clientY-X),i()},D0=(v)=>{if(v.pointerId!==U)return;U=null,Q.style.willChange=I,J?.releasePointerCapture(v.pointerId)},p0=(v)=>{if(U!==null||v.button!==0)return;if(!(v.target instanceof HTMLElement))return;if(v.target.closest("[data-close],button,a,input,textarea,select,label,[contenteditable='true'],[role='button'],[role='textbox'],[data-module='slider'],[data-module='mail-list']"))return;w(),U=v.pointerId;let[X0,z0]=Dq(Q.style.translate);j=X0-P0,L=z0-V0,W=v.clientX,X=v.clientY,B=j,M=L,Q.style.willChange="transform",J?.setPointerCapture(v.pointerId),v.preventDefault()},k=(v)=>{if(K||q)return;if(v.button!==0)return;w()};if(J)J.style.touchAction="none",J.style.userSelect="none",J.addEventListener("pointerdown",p0),J.addEventListener("pointermove",G0),J.addEventListener("pointerup",D0),J.addEventListener("pointercancel",D0);return Q.addEventListener("pointerdown",k,!0),()=>{if(n.killTweensOf(Q),H?.removeEventListener("click",i0),G)j0(G);if(J?.removeEventListener("pointerdown",p0),J?.removeEventListener("pointermove",G0),J?.removeEventListener("pointerup",D0),J?.removeEventListener("pointercancel",D0),Q.removeEventListener("pointerdown",k,!0),Q.style.willChange=I,Q.style.translate=z,Q.style.opacity=R,Q.style.visibility=F,Q.style.pointerEvents=V,Q.style.zIndex=Y,J)J.style.touchAction=D,J.style.userSelect=O}}var yJ={};r(yJ,{default:()=>Vq});function Vq(Q,$){}var hJ={};r(hJ,{default:()=>Rq});function Rq(Q,$){let J=Q.children[0],H=new L$(J,{type:"chars"}).chars,Z=0.01;H.forEach((q,K)=>{let G=q;G.style.transitionDelay=`${K*0.01}s`})}var $H={};r($H,{default:()=>BK});var b$=null,fJ=new Map,SU=1,bU=0,e9=new Set;function Cq(Q,$={}){let J=SU++,H=Number.isFinite($.layer)?$.layer:0,Z={id:J,layer:H,order:bU++,callback:Q};return fJ.set(J,Z),()=>{fJ.delete(J)}}function TU(){return Array.from(fJ.values()).sort((Q,$)=>{if(Q.layer!==$.layer)return Q.layer-$.layer;return Q.order-$.order})}function Eq(){return b$}function m7(Q){return Math.max(0,Math.min(1,Q))}function yU(){let Q=window.devicePixelRatio;if(!Number.isFinite(Q)||(Q??0)<=0)return 1;return Q}async function hU(Q){if(b$?.canvas===Q)return b$;let $=Q.getContext("webgl2",{alpha:!0,antialias:!0,depth:!0,stencil:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1});if(!$)throw new Error("Unable to create WebGL2 canvas context.");$.getExtension("EXT_color_buffer_half_float"),$.getExtension("EXT_color_buffer_float");let J={gl:$},H="rgba8unorm",Z={r:0,g:0,b:0,a:0};$.clearColor(0,0,0,0),Q.style.backgroundColor="#000";let q=Z,K=!1,G=0,U=0,W=null,X=(Y,N)=>{let C=$.createTexture(),D=$.createFramebuffer(),O=$.createRenderbuffer();if(!C||!D||!O)throw new Error("Failed to create WebGL render target.");return $.bindTexture($.TEXTURE_2D,C),$.texImage2D($.TEXTURE_2D,0,$.RGBA16F,Y,N,0,$.RGBA,$.HALF_FLOAT,null),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MIN_FILTER,$.LINEAR),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MAG_FILTER,$.LINEAR),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_S,$.CLAMP_TO_EDGE),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_T,$.CLAMP_TO_EDGE),$.bindFramebuffer($.FRAMEBUFFER,D),$.framebufferTexture2D($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_2D,C,0),$.bindRenderbuffer($.RENDERBUFFER,O),$.renderbufferStorage($.RENDERBUFFER,$.DEPTH_COMPONENT16,Y,N),$.framebufferRenderbuffer($.FRAMEBUFFER,$.DEPTH_ATTACHMENT,$.RENDERBUFFER,O),$.bindTexture($.TEXTURE_2D,null),$.bindRenderbuffer($.RENDERBUFFER,null),$.bindFramebuffer($.FRAMEBUFFER,null),{texture:C,framebuffer:D,depth:O,width:Y,height:N,createView(){return this},destroy(){$.deleteTexture(C),$.deleteFramebuffer(D),$.deleteRenderbuffer(O)}}},j=()=>{let Y=Math.max(1,Q.width),N=Math.max(1,Q.height);if(W&&W.width===Y&&W.height===N)return W;return W?.destroy(),W=X(Y,N),W},L=()=>{let Y=yU(),N=Q.getBoundingClientRect(),C=N.width>0?N.width:Q.clientWidth,D=N.height>0?N.height:Q.clientHeight,O=Math.max(1,Math.round(C*Y)),A=Math.max(1,Math.round(D*Y));if(Q.width!==O||Q.height!==A)Q.width=O,Q.height=A,W?.destroy(),W=null;$.viewport(0,0,Q.width,Q.height)},B=()=>{let Y=performance.now(),N=U===0?0:Y-U;U=Y;let C=e9.size>0,D=C?j():null;if(D)$.bindFramebuffer($.FRAMEBUFFER,D.framebuffer);else $.bindFramebuffer($.FRAMEBUFFER,null);if($.viewport(0,0,Q.width,Q.height),$.enable($.DEPTH_TEST),$.depthFunc($.LEQUAL),$.clearColor(q.r,q.g,q.b,q.a),$.clearDepth(1),$.clear($.COLOR_BUFFER_BIT|$.DEPTH_BUFFER_BIT),TU().forEach(({callback:A})=>{try{A({canvas:Q,device:J,context:$,format:H,encoder:$,view:null,clearColor:q,now:Y,delta:N})}catch(P){console.warn("Render callback failed, skipping subscriber:",P)}}),C&&D)$.bindFramebuffer($.FRAMEBUFFER,null),$.viewport(0,0,Q.width,Q.height),$.disable($.DEPTH_TEST),e9.forEach((A)=>{try{A({canvas:Q,device:J,context:$,format:H,encoder:$,inputTexture:D,outputView:null,clearColor:q,now:Y,delta:N})}catch(P){console.warn("Post render callback failed:",P)}})},M=()=>{if(!K)return;L(),B(),G=window.requestAnimationFrame(M)},I=()=>{if(K)return;K=!0,U=0,G=window.requestAnimationFrame(M)},z=()=>{if(!K)return;K=!1,window.cancelAnimationFrame(G)},R=(Y)=>{q={r:m7(Y.r??q.r),g:m7(Y.g??q.g),b:m7(Y.b??q.b),a:m7(Y.a??q.a)}},F=()=>{if(z(),W?.destroy(),W=null,b$===V)b$=null};L();let V={canvas:Q,device:J,context:$,format:H,isRunning:()=>K,start:I,stop:z,resize:L,render:B,setClearColor:R,getClearColor:()=>q,onRender:(Y,N)=>Cq(Y,N),onPostRender:(Y)=>{return e9.add(Y),()=>{e9.delete(Y)}},destroy:F};return b$=V,V}var f0={init:hU,get(){return b$},chain(Q){if(!b$)return null;return Q(b$)},onRender(Q,$={}){return Cq(Q,$)},onPostRender(Q){return e9.add(Q),()=>{e9.delete(Q)}}};var Oq=Symbol("webgl.uni.watch");function fU(Q){let $=/^value(\d+)$/i.exec(Q);if(!$)return null;let J=Number.parseInt($[1]??"",10)-1;if(!Number.isFinite(J)||J<0)return null;return J}function Aq(Q,$,J){if(Object.getOwnPropertyDescriptor(Q,J)?.get)return;Object.defineProperty(Q,J,{enumerable:!0,configurable:!0,get(){return $.values[J]??0},set(H){if(typeof H!=="number"||!Number.isFinite(H))return;if(($.values[J]??0)===H)return;$.values[J]=H,$.listeners.forEach((Z)=>Z())}})}function T$(Q={}){let $=Q[Oq];if($)return $.controller;let J={},H=new Set;Object.keys(Q).forEach((q)=>{let K=Q[q];J[q]=typeof K==="number"&&Number.isFinite(K)?K:0});let Z={values:J,listeners:H,controller:{target:Q,subscribe(q){return H.add(q),()=>H.delete(q)},set(q){let K=!1;if(Object.entries(q).forEach(([G,U])=>{if(typeof U!=="number"||!Number.isFinite(U))return;if(!(G in J)){J[G]=U,Aq(Q,Z,G),K=!0;return}if(J[G]!==U)J[G]=U,K=!0}),K)H.forEach((G)=>G())},toFloat32(q){let K=new Float32Array(q),G=Object.keys(J),U=new Set;for(let X of G){let j=fU(X);if(j===null||j>=q)continue;K[j]=J[X]??0,U.add(X)}let W=0;for(let X of G){if(U.has(X))continue;while(W<q&&K[W]!==0)W+=1;if(W>=q)break;K[W]=J[X]??0,W+=1}return K}}};return Object.keys(J).forEach((q)=>Aq(Q,Z,q)),Object.defineProperty(Q,Oq,{enumerable:!1,configurable:!1,writable:!1,value:Z}),Z.controller}async function _U(Q){let $=performance.now();while(performance.now()-$<Q){let J=f0.get();if(J)return J;await new Promise((H)=>window.requestAnimationFrame(()=>H()))}return null}async function vU(Q){let $=await fetch(Q);if(!$.ok)throw new Error(`Failed to fetch texture "${Q}" (${$.status}).`);let J=await $.blob();return createImageBitmap(J)}async function uU(Q){if(!Q.complete||Q.naturalWidth===0||Q.naturalHeight===0)await Q.decode();return createImageBitmap(Q)}async function mU(Q){if(typeof Q==="string")return vU(Q);if(Q instanceof ImageBitmap)return Q;if(Q instanceof HTMLImageElement)return uU(Q);return createImageBitmap(Q)}function _J(Q,$,J="cover"){let H=Math.max(0.0001,Q),Z=Math.max(0.0001,$);if(J==="stretch")return{scaleX:1,scaleY:1,offsetX:0,offsetY:0};let q=Z>H;if(J==="cover"){if(q){let U=H/Z;return{scaleX:1,scaleY:U,offsetX:0,offsetY:(1-U)*0.5}}let G=Z/H;return{scaleX:G,scaleY:1,offsetX:(1-G)*0.5,offsetY:0}}if(q){let G=Z/H;return{scaleX:G,scaleY:1,offsetX:(1-G)*0.5,offsetY:0}}let K=H/Z;return{scaleX:1,scaleY:K,offsetX:0,offsetY:(1-K)*0.5}}class Pq{static async load(Q,$={}){let J=$.waitForWebgl??$.waitForGpu??!0,H=$.waitTimeoutMs??1e4,Z=f0.get()??(J?await _U(H):null);if(!Z)throw new Error("WebGL is not initialized yet. Initialize Scene/WEBGL before loading textures.");let K=Z.device.gl,G=await mU(Q),U=Math.max(1,G.width),W=Math.max(1,G.height),X=K.createTexture();if(!X)throw new Error("Unable to create WebGL texture.");K.bindTexture(K.TEXTURE_2D,X),K.pixelStorei(K.UNPACK_FLIP_Y_WEBGL,1),K.texImage2D(K.TEXTURE_2D,0,K.RGBA,K.RGBA,K.UNSIGNED_BYTE,G);let j=(V)=>V==="nearest"?K.NEAREST:K.LINEAR,L=(V)=>{if(V==="repeat")return K.REPEAT;if(V==="mirror-repeat")return K.MIRRORED_REPEAT;return K.CLAMP_TO_EDGE};K.texParameteri(K.TEXTURE_2D,K.TEXTURE_MIN_FILTER,j($.sampler?.minFilter)),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_MAG_FILTER,j($.sampler?.magFilter)),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_WRAP_S,L($.sampler?.addressModeU)),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_WRAP_T,L($.sampler?.addressModeV)),K.bindTexture(K.TEXTURE_2D,null);let B={texture:X,gl:K,width:U,height:W,createView(){return this},destroy(){this.gl.deleteTexture(this.texture)}},M=B,I=$.createSampler??!0?{}:null,z=U/Math.max(1,W),R=$.fit??"cover",F=!(Q instanceof ImageBitmap);return{texture:B,view:M,sampler:I,width:U,height:W,aspect:z,fit:R,getUvTransform(V,Y,N=R){let C=V/Math.max(1,Y);return _J(z,C,N)},destroy(){if(F)G.close();B.destroy()}}}}function c8(Q,$={}){return Pq.load(Q,$)}function kq(Q){let $=Q.trim();if($==="f32")return"float";if($==="i32")return"int";if($==="u32")return"uint";if($==="vec2f")return"vec2";if($==="vec3f")return"vec3";if($==="vec4f")return"vec4";if($==="mat4x4<f32>")return"mat4";return $}function dU(Q){if(Q.includes("vec4"))return"vec4";if(Q.includes("vec3"))return"vec3";if(Q.includes("vec2"))return"vec2";if(Q.includes("mat4"))return"mat4";if(Q.includes("uint"))return"uint";if(Q.includes("int"))return"int";return"float"}function gU(Q,$,J){let H=Q.trim();if(/^mat[234]\(/.test(H))return"mat4";if(/^vec4\(/.test(H))return"vec4";if(/^vec3\(/.test(H))return"vec3";if(/^vec2\(/.test(H))return"vec2";if(/\bvUv\b/.test(H))return"vec2";if(/\bvNormal\b/.test(H))return"vec3";if(/\.(?![xyzwrgba]{2})[xyzwrgba]\b/.test(H))return"float";if(/\.[xy]{2}\b/.test(H)||/\.[st]{2}\b/.test(H))return"vec2";if(/\.[xyz]{3}\b/.test(H)||/\.[rgb]{3}\b/.test(H))return"vec3";if(/\.[xyzw]{4}\b/.test(H)||/\.[rgba]{4}\b/.test(H))return"vec4";if(/texture(Size)?\s*\(/.test(H))return"vec2";if(/length\s*\(/.test(H))return"float";let Z=[];for(let[q,K]of $.entries())if(new RegExp(`\\b${q}\\b`).test(H))Z.push(K);for(let[q,K]of J.entries())if(new RegExp(`\\b${q}\\s*\\(`).test(H))Z.push(K);if(/\bvec2\s*\(/.test(H))Z.push("vec2");if(/\bvec3\s*\(/.test(H))Z.push("vec3");if(/\bvec4\s*\(/.test(H))Z.push("vec4");if(/\bmat4\s*\(/.test(H))Z.push("mat4");if(Z.length>0)return dU(Z);if(/^mat[234]\(/.test(H))return"mat4";return"float"}function cU(Q){return Q.replace(/fn\s+([A-Za-z_]\w*)\s*\(([^)]*)\)\s*->\s*([A-Za-z0-9_<>\[\]]+)\s*\{/g,($,J,H,Z)=>{let q=H.split(",").map((K)=>K.trim()).filter(Boolean).map((K)=>{let G=K.split(":");if(G.length!==2)return K;let U=G[0]?.trim()??"arg";return`${kq(G[1]??"")} ${U}`}).join(", ");return`${kq(Z)} ${J}(${q}) {`})}function pU(Q){let $=/\b(?:fn|vec4)\s+fsMain\s*\(/.exec(Q);if(!$||typeof $.index!=="number")return null;let J=$.index,H=Q.indexOf("{",J);if(H<0)return null;let Z=0,q=-1;for(let K=H;K<Q.length;K++){let G=Q[K];if(G==="{")Z+=1;if(G==="}"){if(Z-=1,Z===0){q=K;break}}}if(q<0)return null;return{fnStart:J,braceStart:H,fnEnd:q+1,body:Q.slice(H+1,q)}}function $8(Q,$={}){let J=new Map;J.set("vUv","vec2"),J.set("vNormal","vec3");let H=new Map,Z=Q.replace(/\r/g,"");Z=Z.replace(/@fragment/g,""),Z=Z.replace(/@location\(\d+\)\s*/g,""),Z=Z.replace(/\bvec2f\b/g,"vec2"),Z=Z.replace(/\bvec3f\b/g,"vec3"),Z=Z.replace(/\bvec4f\b/g,"vec4"),Z=Z.replace(/\bf32\b/g,"float"),Z=Z.replace(/\bi32\b/g,"int"),Z=Z.replace(/\bu32\b/g,"uint"),Z=Z.replace(/uUni\.values(\d+)/g,(U,W)=>`uUni[${W}]`),Z=Z.replace(/\bin\.uv\b/g,"vUv"),Z=Z.replace(/\bin\.normal\b/g,"vNormal"),Z=cU(Z),Z.replace(/\b(vec2|vec3|vec4|float|int|uint|mat4)\s+([A-Za-z_]\w*)\s*\(([^)]*)\)\s*\{/g,(U,W,X,j)=>{return H.set(X,W),j.split(",").map((L)=>L.trim()).filter(Boolean).forEach((L)=>{let B=/^([A-Za-z0-9_]+)\s+([A-Za-z_]\w*)$/.exec(L);if(!B)return;let M=B[1],I=B[2]??"";if(I)J.set(I,M)}),U}),Z=Z.replace(/\b(let|var)\s+([A-Za-z_]\w*)\s*=\s*([^;]+);/g,(U,W,X,j)=>{let L=gU(j,J,H);return J.set(X,L),`${L} ${X} = ${j};`});let q=pU(Z);if(!q)throw new Error("Unable to locate fsMain in WGSL fragment shader.");let K=q.body.replace(/\breturn\s+([^;]+);/g,(U,W)=>`outColor = ${W};
return;`);return Z=`${Z.slice(0,q.fnStart)}void main() {${K}
}${Z.slice(q.fnEnd)}`,`${["#version 300 es","precision highp float;",$.includeUv?"in vec2 vUv;":"",$.includeNormal?"in vec3 vNormal;":"","uniform vec4 uUni[4];","out vec4 outColor;",""].filter(Boolean).join(`
`)}
${Z}`}var vJ=new WeakMap;function oU(Q){if(vJ.has(Q))return vJ.get(Q)??null;let $=Q.getExtension("KHR_parallel_shader_compile");return vJ.set(Q,$),$}function I$(Q,$,J,H="program"){let Z=Q.createProgram(),q=Q.createShader(Q.VERTEX_SHADER),K=Q.createShader(Q.FRAGMENT_SHADER);if(!Z||!q||!K)throw new Error("Failed to create WebGL shader objects.");Q.shaderSource(q,$),Q.compileShader(q),Q.shaderSource(K,J),Q.compileShader(K),Q.attachShader(Z,q),Q.attachShader(Z,K),Q.linkProgram(Z);let G=oU(Q),U="compiling",W=!1,X=()=>{if(W)return;W=!0,Q.deleteShader(q),Q.deleteShader(K)};return{poll(){if(U==="ready")return Z;if(U==="failed")return null;if(G&&!Q.getProgramParameter(Z,G.COMPLETION_STATUS_KHR))return null;if(!Q.getProgramParameter(Z,Q.LINK_STATUS)){let j=Q.getProgramInfoLog(Z)??"",L=Q.getShaderInfoLog(q)??"",B=Q.getShaderInfoLog(K)??"";return console.warn(`[shader] "${H}" failed to link:`,j,L,B),X(),Q.deleteProgram(Z),U="failed",null}return X(),U="ready",Z},destroy(){if(X(),U!=="failed")Q.deleteProgram(Z)}}}function xq(Q){let $=Math.floor(Q??1);return Math.max(1,$)}function Sq(Q={}){let $=xq(Q.subdivisionsX),J=xq(Q.subdivisionsY),H=$+1,Z=J+1,q=H*Z,K=$*J*6,G=new Float32Array(q*4),U=0;for(let j=0;j<=J;j++){let L=j/J,B=1-L*2;for(let M=0;M<=$;M++){let I=M/$,z=-1+I*2;G[U++]=z,G[U++]=B,G[U++]=I,G[U++]=L}}let W=q>65535?new Uint32Array(K):new Uint16Array(K),X=0;for(let j=0;j<J;j++)for(let L=0;L<$;L++){let B=j*H+L,M=B+1,I=(j+1)*H+L,z=I+1;W[X++]=B,W[X++]=I,W[X++]=M,W[X++]=M,W[X++]=I,W[X++]=z}return{vertices:G,indices:W,vertexCount:q,indexCount:K,subdivisionsX:$,subdivisionsY:J}}function wq(){return`#version 300 es
in vec2 aPosition;
in vec2 aUv;
out vec2 vUv;
void main() {
gl_Position = vec4(aPosition, 0.0, 1.0);
vUv = aUv;
}`}function sU(Q){if(Q)return`#version 300 es
precision highp float;
in vec2 vUv;
uniform vec4 uUni[4];
out vec4 outColor;
void main() {
outColor = vec4(vUv, max(0.0, uUni[0].x), 1.0);
}`;return`#version 300 es
precision highp float;
uniform vec4 uUni[4];
out vec4 outColor;
void main() {
float c = max(0.0, uUni[0].x);
outColor = vec4(vec3(c), 1.0);
}`}function lU(){return`#version 300 es
precision highp float;
in vec2 vUv;
uniform vec4 uUni[4];
uniform sampler2D uTexture;
out vec4 outColor;
float hash21(vec2 p) {
vec2 q = vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3)));
return fract(sin(q.x + q.y) * 43758.5453);
}
float valueNoise(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
vec2 u = f * f * (3.0 - 2.0 * f);
float a = hash21(i + vec2(0.0, 0.0));
float b = hash21(i + vec2(1.0, 0.0));
float c = hash21(i + vec2(0.0, 1.0));
float d = hash21(i + vec2(1.0, 1.0));
return mix(mix(a, b, u.x), mix(c, d, u.x), u.y);
}
void main() {
float time = uUni[0].w;
vec2 uv = vUv * uUni[1].xy + uUni[1].zw;
vec2 noiseUv = uv * 9.0 + vec2(time * 0.35, time * 0.22);
float n = valueNoise(noiseUv);
float offset = (n - 0.5) * 0.035;
vec2 distortedUv = uv + vec2(offset, -offset * 0.65);
outColor = texture(uTexture, distortedUv);
}`}function iU(Q){let $=Q.shaders?.fragment??Q.shaders?.wgsl??null;if($)try{return{vertex:wq(),fragment:$8($,{includeUv:!0})}}catch(J){console.warn("Failed to compile custom WGSL fragment for WebGL, using default shader:",J)}if(Q.shaders?.vertex)console.warn("Custom WGSL vertex shaders are not supported on the WebGL runtime.");return{vertex:wq(),fragment:Q.hasTexture?lU():sU(Q.debugUv)}}function nU(Q,$={},J){let H=Sq($),q=Q.device.gl,K=J??T$($.uni??{value1:1}),G=K.toFloat32(16),U=K.subscribe(()=>{G=K.toFloat32(16)}),W=$.texture??null,X=W?.view?.texture,j=iU({debugUv:Boolean($.debugUv),shaders:$.shaders,hasTexture:Boolean(X)}),L=Boolean(X),B=I$(q,j.vertex,j.fragment,"plane"),M=null,I=null,z=null,R=q.createVertexArray(),F=q.createBuffer(),V=q.createBuffer();if(!R||!F||!V)throw new Error("Failed to create WebGL buffers.");q.bindVertexArray(R),q.bindBuffer(q.ARRAY_BUFFER,F),q.bufferData(q.ARRAY_BUFFER,H.vertices,q.STATIC_DRAW),q.enableVertexAttribArray(0),q.vertexAttribPointer(0,2,q.FLOAT,!1,16,0),q.enableVertexAttribArray(1),q.vertexAttribPointer(1,2,q.FLOAT,!1,16,8),q.bindBuffer(q.ELEMENT_ARRAY_BUFFER,V),q.bufferData(q.ELEMENT_ARRAY_BUFFER,H.indices,q.STATIC_DRAW),q.bindVertexArray(null);let Y=H.indices instanceof Uint32Array?q.UNSIGNED_INT:q.UNSIGNED_SHORT;return{geometry:H,render(N){if(!M){if(M=B.poll(),!M)return;I=q.getUniformLocation(M,"uUni"),z=q.getUniformLocation(M,"uTexture")}if(K.set({value4:performance.now()*0.001}),W){let C=N.canvas.width/Math.max(1,N.canvas.height),D=_J(W.aspect,C,$.textureFit??"cover");K.set({value5:D.scaleX,value6:D.scaleY,value7:D.offsetX,value8:D.offsetY})}if(q.disable(q.DEPTH_TEST),q.useProgram(M),I)q.uniform4fv(I,G);if(L&&X&&z)q.activeTexture(q.TEXTURE0),q.bindTexture(q.TEXTURE_2D,X),q.uniform1i(z,0);if(q.bindVertexArray(R),q.drawElements(q.TRIANGLES,H.indexCount,Y,0),q.bindVertexArray(null),L)q.bindTexture(q.TEXTURE_2D,null)},destroy(){U(),q.deleteBuffer(F),q.deleteBuffer(V),q.deleteVertexArray(R),B.destroy()}}}function uJ(Q={}){let $={subdivisionsX:Q.subdivisionsX??1,subdivisionsY:Q.subdivisionsY??1,debugUv:Q.debugUv??!1,shaders:Q.shaders,uni:Q.uni,texture:Q.texture??null,textureFit:Q.textureFit??"cover",renderLayer:Q.renderLayer??0},J=null,H=T$(Q.uni??{value1:1}),Z=null,q=(U)=>{if(!J)J=nU(U,$,H);if(Z)$.onFrame?.(Z,U);J.render(U)},K=null,G=()=>{K?.(),K=f0.onRender(q,{layer:$.renderLayer??0})};return G(),Z={render(){f0.chain((U)=>U.render())},configure(U){if($={...$,...U},G(),J)J.destroy(),J=null},destroy(){if(K?.(),K=null,J)J.destroy(),J=null},getGeometry(){return J?.geometry??Sq($)},setUni(U){H.set(U)},getUni(){return H.target}},Z}function rU(Q){if(typeof Q==="number")return{x:Q,y:Q};return{x:Q?.x??1,y:Q?.y??1}}function bq(Q){let $=rU(Q.subdivs);return{subdivisionsX:$.x,subdivisionsY:$.y,renderLayer:Q.layer??-100,debugUv:Q.debugUv??!1,shaders:Q.shaders,uni:Q.uni,texture:Q.texture??null,textureFit:Q.textureFit??"cover"}}function Tq(Q={}){let $=null,J=uJ({...bq(Q),onFrame:(H,Z)=>{if($)Q.onFrame?.($,Z)}});return $={render:()=>J.render(),configure(H){let Z={...Q,...H};Q=Z,J.configure(bq(Z))},destroy:()=>J.destroy(),getPlane:()=>J,setUni:(H)=>J.setUni(H),getUni:()=>J.getUni()},$}function d7(Q,$,J){return Math.min(J,Math.max($,Q))}function yq(Q,$){let J=Q.getBoundingClientRect(),H=$.getBoundingClientRect(),Z=J.left-H.left,q=J.right-H.left,K=J.top-H.top,G=J.bottom-H.top,U=Math.max(1,H.width),W=Math.max(1,H.height);if(!(q>0&&Z<U&&G>0&&K<W))return{isVisible:!1,vertices:new Float32Array(0)};let j=d7(Z/U*2-1,-1,1),L=d7(q/U*2-1,-1,1),B=d7(1-K/W*2,-1,1),M=d7(1-G/W*2,-1,1);return{isVisible:!0,vertices:new Float32Array([j,B,0,0,j,M,0,1,L,B,1,0,L,M,1,1])}}class _1{static pending=new Set;static pendingRafId=0;element;options;uni;renderer=null;unsubscribeRender=null;canvas=null;destroyed=!1;constructor(Q,$={}){this.element=Q,this.options=$,this.uni=T$($.uni??{value1:1}),this.connectOrQueue()}setUni(Q){this.uni.set(Q)}getUni(){return this.uni.target}destroy(){this.destroyed=!0,this.unsubscribeRender?.(),this.unsubscribeRender=null,this.renderer?.destroy(),this.renderer=null,this.canvas=null,_1.pending.delete(this)}connectOrQueue(){if(this.destroyed)return;if(f0.get()){this.attach();return}_1.pending.add(this),_1.ensurePendingLoop()}attach(){if(this.destroyed||this.unsubscribeRender)return;this.unsubscribeRender=f0.onRender((Q)=>{if(this.destroyed)return;if(!this.canvas)this.canvas=Q.canvas;if(this.canvas!==Q.canvas)return;if(!this.renderer)this.renderer=$W(this.element,Q,this.options,this.uni);this.options.onFrame?.(this,Q),this.renderer.render(Q)},{layer:this.options.layer??10})}static ensurePendingLoop(){if(_1.pendingRafId)return;let Q=()=>{if(_1.pendingRafId=0,_1.pending.size===0)return;if(!f0.get()){_1.pendingRafId=window.requestAnimationFrame(Q);return}let J=Array.from(_1.pending);_1.pending.clear(),J.forEach((H)=>H.attach())};_1.pendingRafId=window.requestAnimationFrame(Q)}}function hq(){return`#version 300 es
in vec2 aPosition;
in vec2 aUv;
out vec2 vUv;
void main() {
gl_Position = vec4(aPosition, 0.0, 1.0);
vUv = aUv;
}`}function aU(Q){if(Q)return`#version 300 es
precision highp float;
in vec2 vUv;
uniform vec4 uUni[4];
out vec4 outColor;
void main() {
outColor = vec4(vUv, 0.5 + 0.5 * uUni[0].x, 1.0);
}`;return`#version 300 es
precision highp float;
uniform vec4 uUni[4];
out vec4 outColor;
void main() {
float c = max(0.0, uUni[0].x);
outColor = vec4(vec3(c), 1.0);
}`}function tU(Q){let $=Q.shaders?.fragment??Q.shaders?.wgsl??null;if($)try{return{vertex:hq(),fragment:$8($,{includeUv:!0})}}catch(J){console.warn("Failed to compile custom WGSL fragment for WebGL, using default shader:",J)}if(Q.shaders?.vertex)console.warn("Custom WGSL vertex shaders are not supported on the WebGL runtime.");return{vertex:hq(),fragment:aU(Boolean(Q.debugUv))}}function fq(Q,$,J){let H=Q.createShader($);if(!H)throw new Error("Failed to create WebGL shader.");if(Q.shaderSource(H,J),Q.compileShader(H),!Q.getShaderParameter(H,Q.COMPILE_STATUS)){let Z=Q.getShaderInfoLog(H)??"Unknown shader compile error.";throw Q.deleteShader(H),new Error(Z)}return H}function eU(Q,$,J){let H=Q.createProgram();if(!H)throw new Error("Failed to create WebGL program.");let Z=fq(Q,Q.VERTEX_SHADER,$),q=fq(Q,Q.FRAGMENT_SHADER,J);if(Q.attachShader(H,Z),Q.attachShader(H,q),Q.linkProgram(H),Q.deleteShader(Z),Q.deleteShader(q),!Q.getProgramParameter(H,Q.LINK_STATUS)){let K=Q.getProgramInfoLog(H)??"Unknown program link error.";throw Q.deleteProgram(H),new Error(K)}return H}function $W(Q,$,J,H){let q=$.device.gl,K=H.toFloat32(16),G=H.subscribe(()=>{K=H.toFloat32(16)}),U=new Uint16Array([0,1,2,2,1,3]),W=tU(J),X=eU(q,W.vertex,W.fragment),j=q.createVertexArray(),L=q.createBuffer(),B=q.createBuffer();if(!j||!L||!B)throw new Error("Failed to create WebGL buffers.");q.bindVertexArray(j),q.bindBuffer(q.ARRAY_BUFFER,L),q.bufferData(q.ARRAY_BUFFER,16*Float32Array.BYTES_PER_ELEMENT,q.DYNAMIC_DRAW),q.enableVertexAttribArray(0),q.vertexAttribPointer(0,2,q.FLOAT,!1,16,0),q.enableVertexAttribArray(1),q.vertexAttribPointer(1,2,q.FLOAT,!1,16,8),q.bindBuffer(q.ELEMENT_ARRAY_BUFFER,B),q.bufferData(q.ELEMENT_ARRAY_BUFFER,U,q.STATIC_DRAW),q.bindVertexArray(null);let M=q.getUniformLocation(X,"uUni");return{render(I){let z=yq(Q,I.canvas);if(!z.isVisible)return;if(q.disable(q.DEPTH_TEST),q.bindBuffer(q.ARRAY_BUFFER,L),q.bufferSubData(q.ARRAY_BUFFER,0,z.vertices),q.useProgram(X),M)q.uniform4fv(M,K);q.bindVertexArray(j),q.drawElements(q.TRIANGLES,6,q.UNSIGNED_SHORT,0),q.bindVertexArray(null)},destroy(){G(),q.deleteBuffer(L),q.deleteBuffer(B),q.deleteVertexArray(j),q.deleteProgram(X)}}}function _q(){let Q=new Float32Array([-1,-1,1,0,0,1,1,-1,1,0,0,1,1,1,1,0,0,1,-1,1,1,0,0,1,1,-1,-1,0,0,-1,-1,-1,-1,0,0,-1,-1,1,-1,0,0,-1,1,1,-1,0,0,-1,-1,-1,-1,-1,0,0,-1,-1,1,-1,0,0,-1,1,1,-1,0,0,-1,1,-1,-1,0,0,1,-1,1,1,0,0,1,-1,-1,1,0,0,1,1,-1,1,0,0,1,1,1,1,0,0,-1,1,1,0,1,0,1,1,1,0,1,0,1,1,-1,0,1,0,-1,1,-1,0,1,0,-1,-1,-1,0,-1,0,1,-1,-1,0,-1,0,1,-1,1,0,-1,0,-1,-1,1,0,-1,0]),$=new Uint16Array([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]);return{vertices:Q,indices:$,vertexStride:6}}function QW(Q,$,J,H,Z){let K=Math.max(0,J-Z),G=Math.max(0,H-Z),U=Math.abs(Q),W=Math.abs($),X=Q>=0?1:-1,j=$>=0?1:-1;if(U<0.000001&&W<0.000001)return{px:0,py:0,nx:0,ny:0};let L=Math.min(J>0&&U>0.000001?K/U:10000000000,H>0&&W>0.000001?G/W:10000000000),B=10000000000;if(Z>0){let Y=Q*Q+$*$,N=Q*(K*X)+$*(G*j),C=K*K+G*G-Z*Z,D=N*N-Y*C;if(D>=0&&Y>0.000001)B=(N+Math.sqrt(D))/Y}let M=Math.min(L,B),I=M*Q,z=M*$,R,F;if(Z>0&&B<1e9&&M>=B-0.001&&(I-K*X)**2+(z-G*j)**2>0.000001){let Y=K*X,N=G*j,C=Math.hypot(I-Y,z-N)||1;R=(I-Y)/C,F=(z-N)/C}else if(L<=(J>0&&U>0.000001?K/U:10000000000)+0.001)R=X,F=0;else R=0,F=j;return{px:I,py:z,nx:R,ny:F}}function JW(Q){let{width:$,height:J,depth:H,rounding:Z}=Q,q=$/2,K=J/2,G=H/2,U=Math.max(0,Math.min(Z,$/2,J/2,H/2)),W=10,X=[],j=[],L=0,B=[{axis:"z",sign:1,halfA:q,halfB:K,posC:G,outNorm:[0,0,1],flatNorm:[0,0,1]},{axis:"z",sign:-1,halfA:q,halfB:K,posC:-G,outNorm:[0,0,-1],flatNorm:[0,0,-1]},{axis:"x",sign:1,halfA:K,halfB:G,posC:q,outNorm:[1,0,0],flatNorm:[1,0,0]},{axis:"x",sign:-1,halfA:K,halfB:G,posC:-q,outNorm:[-1,0,0],flatNorm:[-1,0,0]},{axis:"y",sign:1,halfA:q,halfB:G,posC:K,outNorm:[0,1,0],flatNorm:[0,1,0]},{axis:"y",sign:-1,halfA:q,halfB:G,posC:-K,outNorm:[0,-1,0],flatNorm:[0,-1,0]}];for(let M of B){let{halfA:I,halfB:z,posC:R,outNorm:F,flatNorm:V}=M,Y=M.axis==="z"?1:M.axis==="x"?1:1,N=M.sign;for(let C=0;C<=10;C++)for(let D=0;D<=10;D++){let O=D/10*2-1,A=(C/10*2-1)*N,{px:P,py:w,nx:x,ny:S}=QW(O,A,I,z,U),T=Math.abs(Math.abs(x)-1)<0.001||Math.abs(Math.abs(S)-1)<0.001,h,y,b;if(M.axis==="z")h=P*Y,y=w,b=R;else if(M.axis==="x")h=R,y=P*Y,b=w;else h=P*Y,y=R,b=w;if(Math.hypot(P,w)<0.000001){X.push(h,y,b,V[0],V[1],V[2]);continue}let m,_,E;if(M.axis==="z")if(T)m=V[0],_=V[1],E=V[2];else m=x*Y,_=S,E=0;else if(M.axis==="x")if(T)m=V[0],_=V[1],E=V[2];else m=0,_=x*Y,E=S;else if(T)m=V[0],_=V[1],E=V[2];else m=x*Y,_=0,E=S;let c=Math.hypot(m,_,E)||1;X.push(h,y,b,m/c,_/c,E/c)}for(let C=0;C<10;C++)for(let D=0;D<10;D++){let O=L+C*11+D,A=O+1,P=O+11,w=P+1;if(M.sign>0)j.push(O,A,w,O,w,P);else j.push(O,w,A,O,P,w)}L+=121}return{vertices:new Float32Array(X),indices:new Uint16Array(j),vertexStride:6}}function uq(Q="cube"){if(Q==="cube")return _q();if(typeof Q==="object"&&Q.type==="roundedBox"){let $=Q.depth??Math.min(Q.width,Q.height);return JW({width:Q.width,height:Q.height,depth:$,rounding:Q.rounding})}if(typeof Q==="object"&&Q.type==="custom")return{vertices:Q.vertices,indices:Q.indices,vertexStride:Q.vertexStride??6};return _q()}function vq(Q,$,J){return Math.min(J,Math.max($,Q))}function mq(Q,$){let J=Q.getBoundingClientRect(),H=$.getBoundingClientRect(),Z=J.left-H.left,q=J.right-H.left,K=J.top-H.top,G=J.bottom-H.top,U=Math.max(1,H.width),W=Math.max(1,H.height);if(!(q>0&&Z<U&&G>0&&K<W))return{isVisible:!1,centerX:0,centerY:0,x:0,y:0,width:0,height:0,scale:0};let j=$.width/U,L=$.height/W,B=(Z+q)*0.5*2/U-1,M=1-(K+G)*0.5*2/W,I=Math.floor(vq(Z,0,U)*j),z=Math.floor(vq(K,0,W)*L),R=Math.max(1,Math.floor(J.width*j)),F=Math.max(1,Math.floor(J.height*L)),V=Math.max(0.001,Math.min(R,F)/Math.max($.width,$.height));return{isVisible:!0,centerX:B,centerY:M,x:I,y:z,width:R,height:F,scale:V}}function dq(){return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}function R9(Q,$){let J=new Float32Array(16);for(let H=0;H<4;H++)for(let Z=0;Z<4;Z++)J[Z*4+H]=Q[0+H]*$[Z*4+0]+Q[4+H]*$[Z*4+1]+Q[8+H]*$[Z*4+2]+Q[12+H]*$[Z*4+3];return J}function mJ(Q,$,J){let H=dq();return H[12]=Q,H[13]=$,H[14]=J,H}function gq(Q,$,J){let H=dq();return H[0]=Q,H[5]=$,H[10]=J,H}function cq(Q){let $=Math.cos(Q),J=Math.sin(Q);return new Float32Array([1,0,0,0,0,$,J,0,0,-J,$,0,0,0,0,1])}function pq(Q){let $=Math.cos(Q),J=Math.sin(Q);return new Float32Array([$,0,-J,0,0,1,0,0,J,0,$,0,0,0,0,1])}function oq(Q){let $=Math.cos(Q),J=Math.sin(Q);return new Float32Array([$,J,0,0,-J,$,0,0,0,0,1,0,0,0,0,1])}function sq(Q,$,J,H){let Z=1/Math.tan(Q/2),q=1/(J-H);return new Float32Array([Z/$,0,0,0,0,Z,0,0,0,0,(H+J)*q,-1,0,0,2*H*J*q,0])}var HW=[[-1,-1,-1],[1,-1,-1],[-1,1,-1],[1,1,-1],[-1,-1,1],[1,-1,1],[-1,1,1],[1,1,1]];function ZW(Q,$,J,H){return{x:Q[0]*$+Q[4]*J+Q[8]*H+Q[12],y:Q[1]*$+Q[5]*J+Q[9]*H+Q[13],z:Q[2]*$+Q[6]*J+Q[10]*H+Q[14],w:Q[3]*$+Q[7]*J+Q[11]*H+Q[15]}}function qW(Q){let $=!0,J=!0,H=!0,Z=!0,q=!0,K=!0;for(let[G,U,W]of HW){let X=ZW(Q,G,U,W);$=$&&X.x<-X.w,J=J&&X.x>X.w,H=H&&X.y<-X.w,Z=Z&&X.y>X.w,q=q&&X.z<0,K=K&&X.z>X.w}return!($||J||H||Z||q||K)}class v1{static pending=new Set;static pendingRafId=0;element;options;uni;transform={scale:1,rotationX:0,rotationY:0,rotationZ:0};renderer=null;unsubscribeRender=null;canvas=null;destroyed=!1;constructor(Q,$={}){this.element=Q,this.options=$,this.uni=T$($.uni??{value1:1}),this.transform.scale=$.scale??1,this.transform.rotationX=$.rotationX??0,this.transform.rotationY=$.rotationY??0,this.transform.rotationZ=$.rotationZ??0,this.connectOrQueue()}setUni(Q){this.uni.set(Q)}getUni(){return this.uni.target}setTransform(Q){if(typeof Q.scale==="number")this.transform.scale=Q.scale;if(typeof Q.rotationX==="number")this.transform.rotationX=Q.rotationX;if(typeof Q.rotationY==="number")this.transform.rotationY=Q.rotationY;if(typeof Q.rotationZ==="number")this.transform.rotationZ=Q.rotationZ}getTransform(){return this.transform}destroy(){this.destroyed=!0,this.unsubscribeRender?.(),this.unsubscribeRender=null,this.renderer?.destroy(),this.renderer=null,this.canvas=null,v1.pending.delete(this)}connectOrQueue(){if(this.destroyed)return;if(f0.get()){this.attach();return}v1.pending.add(this),v1.ensurePendingLoop()}attach(){if(this.destroyed||this.unsubscribeRender)return;this.unsubscribeRender=f0.onRender((Q)=>{if(this.destroyed)return;if(!this.canvas)this.canvas=Q.canvas;if(this.canvas!==Q.canvas)return;if(!this.renderer)this.renderer=WW(this.element,Q,this.options,this.uni,this.transform);if(this.renderer.render(Q))this.options.onFrame?.(this,Q)},{layer:this.options.layer??20})}static ensurePendingLoop(){if(v1.pendingRafId)return;let Q=()=>{if(v1.pendingRafId=0,v1.pending.size===0)return;if(!f0.get()){v1.pendingRafId=window.requestAnimationFrame(Q);return}let J=Array.from(v1.pending);v1.pending.clear(),J.forEach((H)=>H.attach())};v1.pendingRafId=window.requestAnimationFrame(Q)}}function dJ(){return`#version 300 es
layout(location = 0) in vec3 aPosition;
layout(location = 1) in vec3 aNormal;
layout(location = 2) in vec2 aUv;
uniform mat4 uMvp;
uniform mat4 uModel;
out vec3 vNormal;
out vec2 vUv;
void main() {
gl_Position = uMvp * vec4(aPosition, 1.0);
vNormal = normalize((uModel * vec4(aNormal, 0.0)).xyz);
vUv = aUv;
}`}function KW(){return`#version 300 es
precision highp float;
in vec3 vNormal;
in vec2 vUv;
out vec4 outColor;
void main() {
outColor = vec4(mix(normalize(vNormal) * 0.5 + vec3(0.5), vec3(vUv, 0.0), 0.0), 1.0);
}`}function lq(Q,$){let J=Q.createTexture();if(!J)throw new Error("Failed to create fallback WebGL texture.");Q.bindTexture(Q.TEXTURE_2D,J);let H=new Uint8Array($);return Q.texImage2D(Q.TEXTURE_2D,0,Q.RGBA,1,1,0,Q.RGBA,Q.UNSIGNED_BYTE,H),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MIN_FILTER,Q.LINEAR),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MAG_FILTER,Q.LINEAR),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_S,Q.CLAMP_TO_EDGE),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_T,Q.CLAMP_TO_EDGE),Q.bindTexture(Q.TEXTURE_2D,null),J}function GW(Q){if(Q.shaders?.fragmentGlsl)return{vertex:dJ(),fragment:Q.shaders.fragmentGlsl};let $=Q.shaders?.fragment??Q.shaders?.wgsl??null;if($)try{return{vertex:dJ(),fragment:$8($,{includeUv:!0,includeNormal:!0})}}catch(J){console.warn("Failed to compile custom WGSL fragment for WebGL, using default shader:",J)}if(Q.shaders?.vertex)console.warn("Custom WGSL vertex shaders are not supported on the WebGL runtime.");return{vertex:dJ(),fragment:KW()}}function UW(Q,$){let J=$?.centerX??0,H=$?.centerY??0,Z=0.25*Math.min(Q.width,Q.height)/Math.max(Q.width,Q.height),q=($?.scale??1)*Z;return{isVisible:!0,centerX:J,centerY:H,x:0,y:0,width:Q.width,height:Q.height,scale:Math.max(0.001,q)}}function WW(Q,$,J,H,Z){let K=$.device.gl,G=Q==null,U=G?J.placement??{centerX:0,centerY:0,scale:1}:void 0,W=uq(J.shape??"cube"),X=GW(J),j=I$(K,X.vertex,X.fragment,"object"),L=null,B=K.createVertexArray(),M=K.createBuffer(),I=K.createBuffer();if(!B||!M||!I)throw new Error("Failed to create WebGL buffers.");K.bindVertexArray(B),K.bindBuffer(K.ARRAY_BUFFER,M),K.bufferData(K.ARRAY_BUFFER,W.vertices,K.STATIC_DRAW);let z=W.vertexStride*4;if(K.enableVertexAttribArray(0),K.vertexAttribPointer(0,3,K.FLOAT,!1,z,0),K.enableVertexAttribArray(1),K.vertexAttribPointer(1,3,K.FLOAT,!1,z,12),W.vertexStride>=8)K.enableVertexAttribArray(2),K.vertexAttribPointer(2,2,K.FLOAT,!1,z,24);else K.disableVertexAttribArray(2),K.vertexAttrib2f(2,0,0);K.bindBuffer(K.ELEMENT_ARRAY_BUFFER,I),K.bufferData(K.ELEMENT_ARRAY_BUFFER,W.indices,K.STATIC_DRAW),K.bindVertexArray(null);let R=W.indices instanceof Uint32Array?K.UNSIGNED_INT:K.UNSIGNED_SHORT,F=null,V=null,Y=null,N=null,C=null,D=null,O=lq(K,[255,255,255,255]),A=lq(K,[0,0,0,255]),P=J.envMap?.gl===K?J.envMap.texture:O,w=J.maskMap?.gl===K?J.maskMap.texture:A,x=H.subscribe(()=>{});return{render(S){if(!L){if(L=j.poll(),!L)return!1;F=K.getUniformLocation(L,"uMvp"),V=K.getUniformLocation(L,"uModel"),Y=K.getUniformLocation(L,"uEnvMap"),N=K.getUniformLocation(L,"uMaskMap"),C=K.getUniformLocation(L,"uHasUv"),D=K.getUniformLocation(L,"uValue1")}let T=G?UW(S.canvas,U):mq(Q,S.canvas);if(!T.isVisible)return!1;let h=Math.max(0.001,T.scale*Z.scale),y=gq(h,h,h),b=cq(Z.rotationX),m=pq(Z.rotationY),_=oq(Z.rotationZ),E=R9(_,R9(m,R9(b,y))),c=J.camera?.enabled??!0,Q0=(()=>{if(!c)return E;let H0=S.canvas,F0=Math.max(0.0001,H0.width/H0.height),N0=(J.camera?.fov??50)*Math.PI/180,W0=J.camera?.near??0.1,M0=J.camera?.far??10,A0=J.camera?.distance??2.6,i0=sq(N0,F0,W0,M0),P0=mJ(0,0,-A0),V0=R9(i0,P0),i=R9(V0,E),G0=mJ(T.centerX,T.centerY,0);return R9(G0,i)})();if(!G&&(J.frustumCulling??!0)&&!qW(Q0))return!1;if(K.enable(K.DEPTH_TEST),K.depthMask(!0),K.enable(K.CULL_FACE),K.cullFace(K.BACK),K.frontFace(K.CCW),K.useProgram(L),F)K.uniformMatrix4fv(F,!1,Q0);if(V)K.uniformMatrix4fv(V,!1,E);if(Y)K.activeTexture(K.TEXTURE0),K.bindTexture(K.TEXTURE_2D,P),K.uniform1i(Y,0);if(N)K.activeTexture(K.TEXTURE1),K.bindTexture(K.TEXTURE_2D,w),K.uniform1i(N,1);if(C)K.uniform1f(C,W.vertexStride>=8?1:0);if(D)K.uniform1f(D,H.target.value1??0);return K.bindVertexArray(B),K.drawElements(K.TRIANGLES,W.indices.length,R,0),K.bindVertexArray(null),!0},destroy(){x(),K.deleteBuffer(M),K.deleteBuffer(I),K.deleteVertexArray(B),j.destroy(),K.deleteTexture(O),K.deleteTexture(A)}}}function iq(Q={}){let $=Q.threshold??0.72,J=Q.intensity??0.85;return`
fn applyEffect(color: vec4f, uv: vec2f, size: vec2u, _uni: PostUni) -> vec4f {
let sizeI = vec2i(size);
let center = vec2i(clamp(vec2u(uv * vec2f(size)), vec2u(0), size - vec2u(1)));
let maxCoord = sizeI - vec2i(1, 1);
let r = ${Q.radius??1.5};
let threshold = ${$};
let intensity = ${J} * max(0.0, _uni.values0.x);
let o = i32(round(r));
let c0 = textureLoad(srcTexture, clamp(center + vec2i(-o, -o), vec2i(0), maxCoord), 0).rgb;
let c1 = textureLoad(srcTexture, clamp(center + vec2i( 0, -o), vec2i(0), maxCoord), 0).rgb;
let c2 = textureLoad(srcTexture, clamp(center + vec2i( o, -o), vec2i(0), maxCoord), 0).rgb;
let c3 = textureLoad(srcTexture, clamp(center + vec2i(-o, 0), vec2i(0), maxCoord), 0).rgb;
let c4 = textureLoad(srcTexture, center, 0).rgb;
let c5 = textureLoad(srcTexture, clamp(center + vec2i( o, 0), vec2i(0), maxCoord), 0).rgb;
let c6 = textureLoad(srcTexture, clamp(center + vec2i(-o, o), vec2i(0), maxCoord), 0).rgb;
let c7 = textureLoad(srcTexture, clamp(center + vec2i( 0, o), vec2i(0), maxCoord), 0).rgb;
let c8 = textureLoad(srcTexture, clamp(center + vec2i( o, o), vec2i(0), maxCoord), 0).rgb;
let blur = (c0 + c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8) / 9.0;
let bright = max(max(blur.r, blur.g), blur.b);
let mask = smoothstep(threshold, 1.0, bright);
let bloom = blur * mask * intensity;
return vec4f(color.rgb + bloom, color.a);
}
`}function nq(){return`
fn applyEffect(color: vec4f, _uv: vec2f, _size: vec2u, _uni: PostUni) -> vec4f {
let luma = dot(color.rgb, vec3f(0.2126, 0.7152, 0.0722));
let mixAmount = clamp(_uni.values0.x, 0.0, 1.0);
return vec4f(mix(color.rgb, vec3f(luma), mixAmount), color.a);
}
`}function rq(Q={}){return`
fn applyEffect(_color: vec4f, _uv: vec2f, _size: vec2u, _uni: PostUni) -> vec4f {
let noiseAdd = 1.0;
return _color;
}
`}var Q8=`#version 300 es
in vec2 aPosition;
out vec2 vUv;
void main() {
gl_Position = vec4(aPosition, 0.0, 1.0);
vUv = aPosition * vec2(0.5, -0.5) + vec2(0.5, 0.5);
}`,XW=`#version 300 es
precision highp float;
in vec2 vUv;
uniform sampler2D uTexture;
out vec4 outColor;
void main() {
outColor = texture(uTexture, vUv);
}`,jW=`#version 300 es
precision highp float;
in vec2 vUv;
uniform sampler2D uTexture;
uniform float uMix;
out vec4 outColor;
void main() {
vec4 color = texture(uTexture, vUv);
float luma = dot(color.rgb, vec3(0.2126, 0.7152, 0.0722));
outColor = vec4(mix(color.rgb, vec3(luma), clamp(uMix, 0.0, 1.0)), color.a);
}`,BW=`#version 300 es
precision highp float;
in vec2 vUv;
uniform sampler2D uTexture;
uniform float uIntensity;
uniform float uThreshold;
uniform float uRadius;
out vec4 outColor;
void main() {
vec2 texel = 1.0 / vec2(textureSize(uTexture, 0));
vec2 o = texel * max(0.25, uRadius);
vec3 c0 = texture(uTexture, vUv + vec2(-o.x, -o.y)).rgb;
vec3 c1 = texture(uTexture, vUv + vec2(0.0, -o.y)).rgb;
vec3 c2 = texture(uTexture, vUv + vec2(o.x, -o.y)).rgb;
vec3 c3 = texture(uTexture, vUv + vec2(-o.x, 0.0)).rgb;
vec3 c4 = texture(uTexture, vUv).rgb;
vec3 c5 = texture(uTexture, vUv + vec2(o.x, 0.0)).rgb;
vec3 c6 = texture(uTexture, vUv + vec2(-o.x, o.y)).rgb;
vec3 c7 = texture(uTexture, vUv + vec2(0.0, o.y)).rgb;
vec3 c8 = texture(uTexture, vUv + vec2(o.x, o.y)).rgb;
vec3 blur = (c0 + c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8) / 9.0;
float bright = max(max(blur.r, blur.g), blur.b);
float mask = smoothstep(uThreshold, 1.0, bright);
vec3 bloom = blur * mask * max(0.0, uIntensity);
outColor = vec4(c4 + bloom, 1.0);
}`,LW=`#version 300 es
precision highp float;
in vec2 vUv;
uniform sampler2D uTexture;
uniform float uAmount;
uniform float uScale;
uniform float uTime;
out vec4 outColor;
float hash(vec2 p) {
return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453);
}
void main() {
vec4 color = texture(uTexture, vUv);
vec2 cell = floor(vUv * uScale);
float cellHash = hash(cell);
float n = hash(vec2(cellHash, uTime * 1000.0));
float noise = (n - 0.5) * uAmount;
vec3 rgb = clamp(color.rgb + noise, 0.0, 1.0);
outColor = vec4(rgb, color.a);
}`;function IW(){return`post_${Math.random().toString(36).slice(2,10)}`}function aq(Q,$,J){let H=Q.createShader($);if(!H)throw new Error("Failed to create WebGL shader.");if(Q.shaderSource(H,J),Q.compileShader(H),!Q.getShaderParameter(H,Q.COMPILE_STATUS)){let Z=Q.getShaderInfoLog(H)??"Unknown shader compile error.";throw Q.deleteShader(H),new Error(Z)}return H}function MW(Q,$,J){let H=Q.createProgram();if(!H)throw new Error("Failed to create WebGL program.");let Z=aq(Q,Q.VERTEX_SHADER,$),q=aq(Q,Q.FRAGMENT_SHADER,J);if(Q.attachShader(H,Z),Q.attachShader(H,q),Q.linkProgram(H),Q.deleteShader(Z),Q.deleteShader(q),!Q.getProgramParameter(H,Q.LINK_STATUS)){let K=Q.getProgramInfoLog(H)??"Unknown program link error.";throw Q.deleteProgram(H),new Error(K)}return H}function tq(Q,$,J){let H=Q.createTexture(),Z=Q.createFramebuffer();if(!H||!Z)throw new Error("Failed to create WebGL post-processing target.");return Q.bindTexture(Q.TEXTURE_2D,H),Q.texImage2D(Q.TEXTURE_2D,0,Q.RGBA16F,$,J,0,Q.RGBA,Q.HALF_FLOAT,null),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MIN_FILTER,Q.LINEAR),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MAG_FILTER,Q.LINEAR),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_S,Q.CLAMP_TO_EDGE),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_T,Q.CLAMP_TO_EDGE),Q.bindFramebuffer(Q.FRAMEBUFFER,Z),Q.framebufferTexture2D(Q.FRAMEBUFFER,Q.COLOR_ATTACHMENT0,Q.TEXTURE_2D,H,0),Q.bindTexture(Q.TEXTURE_2D,null),Q.bindFramebuffer(Q.FRAMEBUFFER,null),{texture:H,framebuffer:Z,width:$,height:J,destroy(){Q.deleteTexture(H),Q.deleteFramebuffer(Z)}}}class eq{effects=[];unsubscribe=null;options;targets=[];programs=null;quadVao=null;quadBuffer=null;programGl=null;unsupportedWarnings=new Set;customPrograms=new Map;compileState="idle";pendingAsync=new Map;constructor(Q={}){this.options=Q,this.unsubscribe=f0.onPostRender(($)=>this.onPostRender($))}addEffect(Q={}){let $={id:Q.id??IW(),enabled:Q.enabled??!0,computeShader:Q.computeShader,fragmentShader:Q.fragmentShader,passes:Math.max(1,Math.floor(Q.passes??1)),textureUniforms:Q.textureUniforms,uni:Q.uni,uniWatch:T$(Q.uni??{}),uniUnsubscribe:null};return $.uniUnsubscribe=$.uniWatch.subscribe(()=>{}),this.effects.push($),$.id}addBloomEffect(Q={}){return this.addEffect({id:Q.id,enabled:Q.enabled??!0,computeShader:iq(Q),passes:1,uni:{intensity:Q.intensity??0.85}})}addBlackAndWhiteEffect(Q={}){return this.addEffect({id:Q.id,enabled:Q.enabled??!0,computeShader:nq(),passes:1,uni:{mix:1}})}addNoiseEffect(Q={}){return this.addEffect({id:Q.id,enabled:Q.enabled??!0,computeShader:rq(Q),passes:1,uni:{amount:Q.amount??0.03,scale:Q.scale??520}})}addFragmentEffect(Q){return this.addEffect({id:Q.id,enabled:Q.enabled??!0,fragmentShader:Q.fragmentShader,passes:Q.passes??1,textureUniforms:Q.textureUniforms,uni:Q.uni})}updateEffect(Q,$){let J=this.effects.find((H)=>H.id===Q);if(!J)return;if(J.enabled=$.enabled??J.enabled,$.uni)J.uniWatch.set($.uni);if(typeof $.computeShader!=="undefined")J.computeShader=$.computeShader;if(typeof $.fragmentShader!=="undefined"){if(J.fragmentShader=$.fragmentShader,!$.fragmentShader){let H=this.customPrograms.get(J.id);if(H&&this.programGl)this.programGl.deleteProgram(H);this.customPrograms.delete(J.id)}}if(typeof $.passes==="number")J.passes=Math.max(1,Math.floor($.passes));if(typeof $.textureUniforms!=="undefined")J.textureUniforms=$.textureUniforms}setEffectUni(Q,$){let J=this.effects.find((H)=>H.id===Q);if(!J)return;J.uniWatch.set($)}removeEffect(Q){this.effects=this.effects.filter(($)=>{if($.id!==Q)return!0;return $.uniUnsubscribe?.(),!1})}clearEffects(){this.effects.forEach((Q)=>{Q.uniUnsubscribe?.()}),this.effects=[]}destroy(){if(this.unsubscribe?.(),this.unsubscribe=null,this.effects.forEach((Q)=>{Q.uniUnsubscribe?.()}),this.targets.forEach((Q)=>Q.destroy()),this.targets=[],this.programGl)this.programs&&this.programGl.deleteProgram(this.programs.copy),this.programs&&this.programGl.deleteProgram(this.programs.bw),this.programs&&this.programGl.deleteProgram(this.programs.bloom),this.programs&&this.programGl.deleteProgram(this.programs.noise),this.quadVao&&this.programGl.deleteVertexArray(this.quadVao),this.quadBuffer&&this.programGl.deleteBuffer(this.quadBuffer),this.customPrograms.forEach((Q)=>this.programGl.deleteProgram(Q));this.pendingAsync.forEach((Q)=>Q.destroy()),this.pendingAsync.clear(),this.programs=null,this.quadVao=null,this.quadBuffer=null,this.programGl=null,this.customPrograms.clear(),this.compileState="idle"}beginCompile(Q){this.programGl=Q,this.compileState="compiling",this.pendingAsync.set("copy",I$(Q,Q8,XW,"post:copy")),this.pendingAsync.set("bw",I$(Q,Q8,jW,"post:bw")),this.pendingAsync.set("bloom",I$(Q,Q8,BW,"post:bloom")),this.pendingAsync.set("noise",I$(Q,Q8,LW,"post:noise"));for(let $ of this.effects)if($.fragmentShader?.trim())this.pendingAsync.set($.id,I$(Q,Q8,this.toFragmentShaderSource($.fragmentShader,$),`post:${$.id}`))}pollCompile(Q){let $=new Map;for(let[Z,q]of this.pendingAsync){let K=q.poll();if(!K)return!1;$.set(Z,K)}this.programs={copy:$.get("copy"),bw:$.get("bw"),bloom:$.get("bloom"),noise:$.get("noise")};for(let Z of this.effects){let q=$.get(Z.id);if(q)this.customPrograms.set(Z.id,q)}this.pendingAsync.clear();let J=Q.createVertexArray(),H=Q.createBuffer();if(!J||!H)throw new Error("Failed to create WebGL post-process geometry.");return this.quadVao=J,this.quadBuffer=H,Q.bindVertexArray(J),Q.bindBuffer(Q.ARRAY_BUFFER,H),Q.bufferData(Q.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),Q.STATIC_DRAW),Q.enableVertexAttribArray(0),Q.vertexAttribPointer(0,2,Q.FLOAT,!1,0,0),Q.bindVertexArray(null),this.compileState="ready",!0}ensureTargets(Q,$,J){if(this.targets.length===2&&this.targets[0]?.width===$&&this.targets[0]?.height===J)return;this.targets.forEach((H)=>H.destroy()),this.targets=[tq(Q,$,J),tq(Q,$,J)]}drawPass(Q,$,J,H,Z,q,K={}){Q.bindFramebuffer(Q.FRAMEBUFFER,H),Q.viewport(0,0,Z,q),Q.disable(Q.DEPTH_TEST),Q.useProgram($),Q.activeTexture(Q.TEXTURE0),Q.bindTexture(Q.TEXTURE_2D,J);let G=Q.getUniformLocation($,"uTexture");if(G!=null)Q.uniform1i(G,0);Object.entries(K).forEach(([U,W])=>{let X=Q.getUniformLocation($,U);if(X!=null)Q.uniform1f(X,W)}),Q.bindVertexArray(this.quadVao),Q.drawArrays(Q.TRIANGLES,0,3),Q.bindVertexArray(null),Q.bindTexture(Q.TEXTURE_2D,null)}drawFragmentPass(Q,$,J,H,Z,q,K,G,U,W){Q.bindFramebuffer(Q.FRAMEBUFFER,H),Q.viewport(0,0,Z,q),Q.disable(Q.DEPTH_TEST),Q.useProgram($),Q.activeTexture(Q.TEXTURE0),Q.bindTexture(Q.TEXTURE_2D,J);let X=Q.getUniformLocation($,"uTexture");if(X!=null)Q.uniform1i(X,0);let j=1;if(W.textureUniforms)for(let[R,F]of Object.entries(W.textureUniforms)){let V=F();if(!V||V.gl!==Q)continue;let Y=Q.getUniformLocation($,R);if(Y==null)continue;Q.activeTexture(Q.TEXTURE0+j),Q.bindTexture(Q.TEXTURE_2D,V.texture),Q.uniform1i(Y,j),j+=1}let L=Q.getUniformLocation($,"uResolution");if(L!=null)Q.uniform2f(L,Z,q);let B=Q.getUniformLocation($,"uTime");if(B!=null)Q.uniform1f(B,K.now*0.001);let M=Q.getUniformLocation($,"uDelta");if(M!=null)Q.uniform1f(M,K.delta*0.001);let I=Q.getUniformLocation($,"uPassIndex");if(I!=null)Q.uniform1f(I,G);let z=Q.getUniformLocation($,"uUni");if(z!=null)Q.uniform4fv(z,U);Q.bindVertexArray(this.quadVao),Q.drawArrays(Q.TRIANGLES,0,3),Q.bindVertexArray(null);while(j>1)j-=1,Q.activeTexture(Q.TEXTURE0+j),Q.bindTexture(Q.TEXTURE_2D,null);Q.activeTexture(Q.TEXTURE0),Q.bindTexture(Q.TEXTURE_2D,null)}getEffectMode(Q){if(Q.fragmentShader?.trim())return"fragment";let $=Q.computeShader??"";if($.includes("let luma = dot"))return"bw";if($.includes("let bloom = blur"))return"bloom";if($.includes("noiseAdd"))return"noise";return"custom"}toFragmentShaderSource(Q,$){if(Q.includes("#version"))return Q;return`#version 300 es
precision highp float;
in vec2 vUv;
uniform sampler2D uTexture;
${Object.keys($.textureUniforms??{}).map((H)=>`uniform sampler2D ${H};`).join(`
`)}
uniform vec2 uResolution;
uniform float uTime;
uniform float uDelta;
uniform float uPassIndex;
uniform vec4 uUni[4];
out vec4 outColor;
${Q}
void main() {
vec4 color = texture(uTexture, vUv);
outColor = applyEffect(color, vUv, uResolution, uUni);
}`}ensureCustomProgram(Q,$){let J=this.customPrograms.get($.id);if(J)return J;if(!$.fragmentShader)return null;let H=MW(Q,Q8,this.toFragmentShaderSource($.fragmentShader,$));return this.customPrograms.set($.id,H),H}parseBloomTuning(Q){let $=Q??"",J=/let threshold = ([0-9.]+)/.exec($),H=/let r = ([0-9.]+)/.exec($);return{threshold:Number.parseFloat(J?.[1]??"0.72")||0.72,radius:Number.parseFloat(H?.[1]??"1.5")||1.5}}onPostRender(Q){this.options.onFrame?.(this,Q);let $=Q.device.gl,J=Q.inputTexture?.texture;if(!$||!J)return;let H=Math.max(1,Q.canvas.width),Z=Math.max(1,Q.canvas.height);if(this.programGl!==$)this.pendingAsync.forEach((U)=>U.destroy()),this.pendingAsync.clear(),this.compileState="idle";if(this.compileState==="idle"){this.beginCompile($);return}if(this.compileState==="compiling"){if(!this.pollCompile($))return}this.ensureTargets($,H,Z);let q=this.effects.filter((U)=>U.enabled),K=J,G=0;for(let U of q){let W=this.getEffectMode(U);if(W==="custom"){if(!this.unsupportedWarnings.has(U.id))this.unsupportedWarnings.add(U.id),console.warn(`Custom post effect "${U.id}" is not supported in WebGL post chain and was skipped.`);continue}let X=U.uniWatch.toFloat32(16),j=Math.max(1,Math.floor(U.passes??1));if(W==="fragment"){let L=this.ensureCustomProgram($,U);if(!L)continue;for(let B=0;B<j;B++){let M=this.targets[G%2];this.drawFragmentPass($,L,K,M.framebuffer,H,Z,Q,B,X,U),K=M.texture,G+=1}}else if(W==="bw"){let L=this.targets[G%2];this.drawPass($,this.programs.bw,K,L.framebuffer,H,Z,{uMix:X[0]??1}),K=L.texture,G+=1}else if(W==="noise"){let L=this.targets[G%2];this.drawPass($,this.programs.noise,K,L.framebuffer,H,Z,{uAmount:X[0]??0.03,uScale:X[1]??520,uTime:Q.now*0.001}),K=L.texture,G+=1}else{let L=this.targets[G%2],B=this.parseBloomTuning(U.computeShader);this.drawPass($,this.programs.bloom,K,L.framebuffer,H,Z,{uIntensity:X[0]??0.85,uThreshold:B.threshold,uRadius:B.radius}),K=L.texture,G+=1}}this.drawPass($,this.programs.copy,K,null,H,Z)}}function $K(Q={}){return new eq(Q)}function zW(Q){return{subdivs:Q.subdivs??1,layer:Q.layer??-100,debugUv:Q.debugUv??!1,texture:Q.texture??null,textureFit:Q.textureFit??"cover",textureUrl:Q.textureUrl,onFrame:Q.onFrame,uni:{value1:1,...Q.uni??{}},shaders:Q.shaders}}class QK{surface;constructor(Q={}){this.surface=Tq(zW(Q))}render(){this.surface.render()}configure(Q){this.surface.configure(Q)}destroy(){this.surface.destroy()}getPlane(){return this.surface.getPlane()}setUni(Q){this.surface.setUni(Q)}getUni(){return this.surface.getUni()}}function JK(Q={},$={}){let J=new QK(Q);return $.onCreate?.(J),J}class gJ{canvas=null;webgl=null;screen=null;options;initPromise=null;screenTexture=null;constructor(Q,$={}){if(this.canvas=Q,this.options={autoStart:$.autoStart??!0,autoInit:$.autoInit??!0,exposeToWindow:$.exposeToWindow??!0,screen:$.screen??{subdivs:1},onInitError:$.onInitError},this.options.autoInit)this.initPromise=this.init().catch((J)=>{this.options.onInitError?.(J)})}async init(){if(!this.canvas)throw new Error("Scene requires a canvas element.");if(this.webgl=await f0.init(this.canvas),this.options.autoStart)this.webgl.start();this.screenTexture?.destroy(),this.screenTexture=null;let Q={...this.options.screen??{subdivs:1}};if(Q.textureUrl)this.screenTexture=await c8(Q.textureUrl,{fit:Q.textureFit??"cover"}),Q.texture=this.screenTexture;if(this.screen?.destroy(),this.screen=JK(Q),this.options.exposeToWindow)window.__miniGpu=this.webgl,window.__miniWebgl=this.webgl,window.__miniScreen=this.screen}configureScreen(Q){if(this.screen){this.screen.configure(Q);return}this.options.screen={...this.options.screen,...Q}}getGpu(){return this.webgl}getWebgl(){return this.webgl}getScreen(){return this.screen}getInitPromise(){return this.initPromise}destroy(){if(this.screen){let $=this.screen;if($.destroy(),this.screen=null,this.options.exposeToWindow&&window.__miniScreen===$)delete window.__miniScreen}this.screenTexture?.destroy(),this.screenTexture=null;let Q=Eq();if(this.canvas&&Q?.canvas===this.canvas){if(Q.destroy(),this.options.exposeToWindow&&window.__miniGpu===Q)delete window.__miniGpu;if(this.options.exposeToWindow&&window.__miniWebgl===Q)delete window.__miniWebgl}this.webgl=null,this.canvas=null}}class HK{manager;constructor(Q,$={}){this.manager=new _1(Q,$)}destroy(){this.manager.destroy()}setUni(Q){this.manager.setUni(Q)}getUni(){return this.manager.getUni()}}function ZK(Q,$={},J={}){let H=new HK(Q,$);return J.onCreate?.(H),H}class qK{manager;constructor(Q,$={}){this.manager=new v1(Q,$)}destroy(){this.manager.destroy()}setUni(Q){this.manager.setUni(Q)}getUni(){return this.manager.getUni()}setTransform(Q){this.manager.setTransform(Q)}getTransform(){return this.manager.getTransform()}}function J8(Q,$={},J={}){let H=new qK(Q,$);return J.onCreate?.(H),H}function YW(Q){let $=new DataView(Q);if($.getUint32(0,!0)!==1179937895)throw new Error("Invalid GLB: bad magic");let J=$.getUint32(8,!0);if(Q.byteLength<12)throw new Error("Invalid GLB: file too short");let H=12,Z=$.getUint32(H,!0),q=$.getUint32(H+4,!0);if(H+=8,q!==1313821514)throw new Error("Invalid GLB: first chunk is not JSON");let K=H,G=Z;if(H+=Z,H>=Q.byteLength)return{jsonLength:G,jsonOffset:K,binLength:0,binOffset:0};let U=$.getUint32(H,!0),W=$.getUint32(H+4,!0);return H+=8,{jsonLength:G,jsonOffset:K,binLength:W===5130562?U:0,binOffset:W===5130562?H:0}}function cJ(Q,$,J,H,Z,q){let K=J.accessors?.[H];if(!K||K.bufferView==null)throw new Error("Missing accessor or bufferView");let G=J.bufferViews?.[K.bufferView];if(!G)throw new Error("Missing bufferView");let U=(G.byteOffset??0)+(K.byteOffset??0),W=KK(Z),X=W*q,j=G.byteStride??X,L=K.count*q,B=$+U,M=j===X,I=B%W===0;if(Z===5126){if(M&&I)return new Float32Array(Q,B,L).slice();let z=new DataView(Q),R=new Float32Array(L);for(let F=0;F<K.count;F++){let V=B+F*j;for(let Y=0;Y<q;Y++)R[F*q+Y]=z.getFloat32(V+Y*W,!0)}return R}if(Z===5123){if(M&&I)return new Uint16Array(Q,B,L).slice();let z=new DataView(Q),R=new Uint16Array(L);for(let F=0;F<K.count;F++){let V=B+F*j;for(let Y=0;Y<q;Y++)R[F*q+Y]=z.getUint16(V+Y*W,!0)}return R}if(Z===5125){if(M&&I)return new Uint32Array(Q,B,L).slice();let z=new DataView(Q),R=new Uint32Array(L);for(let F=0;F<K.count;F++){let V=B+F*j;for(let Y=0;Y<q;Y++)R[F*q+Y]=z.getUint32(V+Y*W,!0)}return R}throw new Error(`Unsupported accessor componentType: ${Z}`)}function KK(Q){switch(Q){case 5120:case 5121:return 1;case 5122:case 5123:return 2;case 5125:case 5126:return 4;default:return 0}}function NW(Q,$,J,H){let Z=J.accessors?.[H];if(!Z||Z.bufferView==null)throw new Error("Missing indices accessor");let q=J.bufferViews?.[Z.bufferView];if(!q)throw new Error("Missing bufferView for indices");let K=(q.byteOffset??0)+(Z.byteOffset??0),G=Z.componentType,U=KK(G),W=q.byteStride??U,X=$+K,j=Z.count,L=W===U,B=X%U===0;if(G===5123){if(L&&B)return new Uint16Array(Q,X,j).slice();let M=new DataView(Q),I=new Uint16Array(j);for(let z=0;z<j;z++)I[z]=M.getUint16(X+z*W,!0);return I}if(G===5125){if(L&&B)return new Uint32Array(Q,X,j).slice();let M=new DataView(Q),I=new Uint32Array(j);for(let z=0;z<j;z++)I[z]=M.getUint32(X+z*W,!0);return I}throw new Error(`Unsupported index componentType: ${G}`)}function DW(Q,$){let J=Q.length/3,H=new Float32Array(J*3);for(let Z=0;Z<$.length;Z+=3){let q=$[Z],K=$[Z+1],G=$[Z+2],U=Q[K*3+0]-Q[q*3+0],W=Q[K*3+1]-Q[q*3+1],X=Q[K*3+2]-Q[q*3+2],j=Q[G*3+0]-Q[q*3+0],L=Q[G*3+1]-Q[q*3+1],B=Q[G*3+2]-Q[q*3+2],M=W*B-X*L,I=X*j-U*B,z=U*L-W*j,R=Math.hypot(M,I,z)||1;M/=R,I/=R,z/=R,H[q*3+0]+=M,H[q*3+1]+=I,H[q*3+2]+=z,H[K*3+0]+=M,H[K*3+1]+=I,H[K*3+2]+=z,H[G*3+0]+=M,H[G*3+1]+=I,H[G*3+2]+=z}for(let Z=0;Z<J;Z++){let q=Math.hypot(H[Z*3],H[Z*3+1],H[Z*3+2])||1;H[Z*3]/=q,H[Z*3+1]/=q,H[Z*3+2]/=q}return H}async function g7(Q){let $=await fetch(Q);if(!$.ok)throw new Error(`Failed to fetch GLB: ${$.status} ${$.statusText}`);let J=await $.arrayBuffer();return FW(J)}function FW(Q){let{jsonLength:$,jsonOffset:J,binLength:H,binOffset:Z}=YW(Q),q=new Uint8Array(Q,J,$),K=new TextDecoder().decode(q),G=JSON.parse(K),U=Z,W=[];if(!G.meshes)return W;for(let X of G.meshes)for(let j of X.primitives){if(j.mode!==void 0&&j.mode!==4)continue;let L=j.attributes.POSITION;if(L==null)continue;let B=cJ(Q,U,G,L,5126,3),M;if(j.indices!=null)M=NW(Q,U,G,j.indices);else{M=new Uint32Array(B.length/3);for(let C=0;C<M.length;C++)M[C]=C}let I,z=j.attributes.NORMAL;if(z!=null)I=cJ(Q,U,G,z,5126,3);else I=DW(B,M);let R=null,F=j.attributes.TEXCOORD_0;if(F!=null)R=cJ(Q,U,G,F,5126,2);let V=B.length/3,Y=R?8:6,N=new Float32Array(V*Y);for(let C=0;C<V;C++)if(N[C*Y+0]=B[C*3+0],N[C*Y+1]=B[C*3+1],N[C*Y+2]=B[C*3+2],N[C*Y+3]=I[C*3+0],N[C*Y+4]=I[C*3+1],N[C*Y+5]=I[C*3+2],R)N[C*Y+6]=R[C*2+0],N[C*Y+7]=R[C*2+1];if(M instanceof Uint32Array&&M.length<=65535){let C=new Uint16Array(M.length);for(let D=0;D<M.length;D++)C[D]=M[D];M=C}W.push({vertices:N,indices:M,vertexStride:Y})}return W}var pJ=Object.assign({icon:"./assets/custom/icon.glb",logo:"./assets/custom/logo.png"},(()=>{let Q=window.__NODEDC_STATIC__?.assets;if(Q)return Q;try{return JSON.parse(document.getElementById("node-dc-static-config")?.textContent||"{}").assets||{}}catch{return {}}})());function oJ(Q={}){let $=Math.max(64,Math.floor(Q.width??1024)),J=Math.max(32,Math.floor(Q.height??512)),H=document.createElement("canvas");H.width=$,H.height=J;let Z=H.getContext("2d");if(!Z)throw new Error("Failed to create 2D context for fake HDRI.");let q=Q.skyTop??"#2c3f63",K=Q.skyBottom??"#10192b",G=Q.groundTop??"#18131f",U=Q.groundBottom??"#050508",W=Q.sunColor??"rgba(255, 228, 180, 0.85)",X=Z.createLinearGradient(0,0,0,J*0.55);X.addColorStop(0,q),X.addColorStop(1,K),Z.fillStyle=X,Z.fillRect(0,0,$,Math.ceil(J*0.55));let j=Z.createLinearGradient(0,J*0.45,0,J);j.addColorStop(0,G),j.addColorStop(1,U),Z.fillStyle=j,Z.fillRect(0,Math.floor(J*0.45),$,J);let L=Z.createLinearGradient(0,J*0.36,0,J*0.66);L.addColorStop(0,"rgba(255, 191, 134, 0.23)"),L.addColorStop(0.45,"rgba(176, 214, 255, 0.17)"),L.addColorStop(0.62,"rgba(255, 171, 114, 0.12)"),L.addColorStop(1,"rgba(44, 58, 84, 0.0)"),Z.fillStyle=L,Z.fillRect(0,0,$,J);let B=$*0.2,M=J*0.24,I=Z.createRadialGradient(B,M,0,B,M,$*0.15);I.addColorStop(0,W),I.addColorStop(0.24,"rgba(255, 231, 190, 0.28)"),I.addColorStop(1,"rgba(255, 210, 154, 0.0)"),Z.fillStyle=I,Z.fillRect(0,0,$,J);let z=$*0.72,R=J*0.3,F=Z.createRadialGradient(z,R,0,z,R,$*0.19);F.addColorStop(0,"rgba(168, 214, 255, 0.26)"),F.addColorStop(0.32,"rgba(120, 173, 255, 0.17)"),F.addColorStop(1,"rgba(88, 120, 170, 0.0)"),Z.fillStyle=F,Z.fillRect(0,0,$,J);let V=Z.createLinearGradient($*0.88,0,$,0);V.addColorStop(0,"rgba(120, 160, 255, 0.0)"),V.addColorStop(0.5,"rgba(186, 212, 255, 0.16)"),V.addColorStop(1,"rgba(255, 245, 220, 0.33)"),Z.fillStyle=V,Z.fillRect(Math.floor($*0.86),0,$,J);let Y=Z.createRadialGradient($*0.5,J*0.48,$*0.2,$*0.5,J*0.5,$*0.72);return Y.addColorStop(0,"rgba(0, 0, 0, 0.0)"),Y.addColorStop(1,"rgba(0, 0, 0, 0.38)"),Z.fillStyle=Y,Z.fillRect(0,0,$,J),Z.fillStyle="rgba(0, 0, 0, 0.5)",Z.fillRect(0,0,$,Math.ceil(J*0.5)),H}class sJ{element;easing;dragSensitivity;dragSensitivityYMultiplier=1.8;resetOnLeave;releaseInertiaDamping=0.9;releaseInertiaBoost=0.7;releaseInertiaMinVelocity=0.0007;recenterDurationFrames=64;returnToCenterActive=!1;recenterStarted=!1;recenterProgress=0;recenterFromX=0;recenterFromY=0;activePointerId=null;lastDragClientX=0;lastDragClientY=0;dragInertiaVelocityX=0;dragInertiaVelocityY=0;dragInertiaActive=!1;state={x:0,y:0,targetX:0,targetY:0,dragX:0,dragY:0,dragTargetX:0,dragTargetY:0,isDragging:!1,hasPointer:!1};onPointerMove=(Q)=>{this.state.hasPointer=!0;let{x:$,y:J}=this.normalizePointer(Q);if(this.state.targetX=$,this.state.targetY=J,this.activePointerId!==Q.pointerId)return;let{width:H,height:Z}=this.getInteractionSize(),q=(Q.clientX-this.lastDragClientX)/H*2,K=(Q.clientY-this.lastDragClientY)/Z*2;this.lastDragClientX=Q.clientX,this.lastDragClientY=Q.clientY;let G=q*this.dragSensitivity,U=K*this.dragSensitivity*this.dragSensitivityYMultiplier;this.state.dragTargetX=r$(this.state.dragTargetX+G,-9,9),this.state.dragTargetY=r$(this.state.dragTargetY+U,-9,9),this.dragInertiaVelocityX=G,this.dragInertiaVelocityY=U};onPointerDown=(Q)=>{this.activePointerId=Q.pointerId,this.lastDragClientX=Q.clientX,this.lastDragClientY=Q.clientY,this.returnToCenterActive=!1,this.recenterStarted=!1,this.recenterProgress=0,this.dragInertiaActive=!1,this.dragInertiaVelocityX=0,this.dragInertiaVelocityY=0,this.state.isDragging=!0,this.state.hasPointer=!0};onPointerUpOrCancel=(Q)=>{if(this.activePointerId!==Q.pointerId)return;this.releaseDrag()};onPointerLeave=()=>{if(this.state.hasPointer=!1,this.state.isDragging)this.releaseDrag();if(this.resetOnLeave)this.state.targetX=0,this.state.targetY=0};constructor(Q={}){if(!Q.element&&typeof window==="undefined")throw new Error("MouseMonad requires a browser element or window.");this.element=Q.element??window,this.easing=Math.max(0,Math.min(1,Q.easing??0.09)),this.dragSensitivity=Math.max(0.05,Math.min(4,Q.dragSensitivity??0.9)),this.resetOnLeave=Q.resetOnLeave??!0,this.element.addEventListener("pointermove",this.onPointerMove),this.element.addEventListener("pointerdown",this.onPointerDown),this.element.addEventListener("pointerup",this.onPointerUpOrCancel),this.element.addEventListener("pointercancel",this.onPointerUpOrCancel),this.element.addEventListener("pointerleave",this.onPointerLeave)}get(){return this.state}update(){if(this.state.x+=(this.state.targetX-this.state.x)*this.easing,this.state.y+=(this.state.targetY-this.state.y)*this.easing,!this.state.isDragging&&this.dragInertiaActive)this.state.dragTargetX=r$(this.state.dragTargetX+this.dragInertiaVelocityX,-9,9),this.state.dragTargetY=r$(this.state.dragTargetY+this.dragInertiaVelocityY,-9,9),this.dragInertiaVelocityX*=this.releaseInertiaDamping,this.dragInertiaVelocityY*=this.releaseInertiaDamping,this.dragInertiaActive=Math.abs(this.dragInertiaVelocityX)>this.releaseInertiaMinVelocity||Math.abs(this.dragInertiaVelocityY)>this.releaseInertiaMinVelocity;if(this.returnToCenterActive&&!this.state.isDragging){if(!this.dragInertiaActive){if(!this.recenterStarted)this.recenterStarted=!0,this.recenterProgress=0,this.recenterFromX=this.state.dragTargetX,this.recenterFromY=this.state.dragTargetY;this.recenterProgress=Math.min(1,this.recenterProgress+1/this.recenterDurationFrames);let Q=VW(this.recenterProgress);if(this.state.dragTargetX=this.recenterFromX*(1-Q),this.state.dragTargetY=this.recenterFromY*(1-Q),this.recenterProgress>=1)this.state.dragTargetX=0,this.state.dragTargetY=0,this.returnToCenterActive=!1,this.recenterStarted=!1}}return this.state.dragX+=(this.state.dragTargetX-this.state.dragX)*this.easing,this.state.dragY+=(this.state.dragTargetY-this.state.dragY)*this.easing,this.state}destroy(){this.element.removeEventListener("pointermove",this.onPointerMove),this.element.removeEventListener("pointerdown",this.onPointerDown),this.element.removeEventListener("pointerup",this.onPointerUpOrCancel),this.element.removeEventListener("pointercancel",this.onPointerUpOrCancel),this.element.removeEventListener("pointerleave",this.onPointerLeave)}getInteractionSize(){if(this.element instanceof Window)return{width:Math.max(1,this.element.innerWidth),height:Math.max(1,this.element.innerHeight)};let Q=this.element.getBoundingClientRect();return{width:Math.max(1,Q.width),height:Math.max(1,Q.height)}}releaseDrag(){this.activePointerId=null,this.state.isDragging=!1,this.returnToCenterActive=!0,this.recenterStarted=!1,this.recenterProgress=0,this.dragInertiaVelocityX*=this.releaseInertiaBoost,this.dragInertiaVelocityY*=this.releaseInertiaBoost,this.dragInertiaActive=Math.abs(this.dragInertiaVelocityX)>this.releaseInertiaMinVelocity||Math.abs(this.dragInertiaVelocityY)>this.releaseInertiaMinVelocity}normalizePointer(Q){if(this.element instanceof Window){let K=Math.max(1,this.element.innerWidth),G=Math.max(1,this.element.innerHeight),U=Q.clientX/K*2-1,W=Q.clientY/G*2-1;return{x:r$(U,-1,1),y:r$(W,-1,1)}}let $=this.element.getBoundingClientRect(),J=Math.max(1,$.width),H=Math.max(1,$.height),Z=(Q.clientX-$.left)/J*2-1,q=(Q.clientY-$.top)/H*2-1;return{x:r$(Z,-1,1),y:r$(q,-1,1)}}}function C9(Q={}){return new sJ(Q)}function r$(Q,$,J){return Math.max($,Math.min(J,Q))}function VW(Q){return Q>=1?1:1-Math.pow(2,-10*Q)}class lJ{element;eventElement;resolutionScale;fade;radius;strength;cutoff;growth;dissipate;unsubscribe=null;gl=null;bundle=null;targets=[];readIndex=0;pointer={x:0.5,y:0.5};prevPointer={x:0.5,y:0.5};speed=0;smoothedSize=0;hasPointer=!1;lastPointerAt=0;onPointerMove=(Q)=>{let $=performance.now(),J=this.resolveUv(Q),H=Math.max(1,$-this.lastPointerAt),Z=J.x-this.pointer.x,q=J.y-this.pointer.y,K=Math.sqrt(Z*Z+q*q)/(H/1000);this.prevPointer.x=this.pointer.x,this.prevPointer.y=this.pointer.y,this.pointer.x=J.x,this.pointer.y=J.y,this.speed=Math.max(this.speed*0.5,K),this.hasPointer=!0,this.lastPointerAt=$};onPointerLeave=()=>{this.hasPointer=!1};constructor(Q={}){if(!Q.element&&typeof window==="undefined")throw new Error("MouseTrail requires a browser element or window.");this.element=Q.element??window,this.eventElement=Q.eventElement??this.element,this.resolutionScale=i1(Q.resolutionScale??0.75,0.125,1),this.fade=i1(Q.fade??0.986,0.75,0.995),this.radius=i1(Q.radius??0.012,0.002,0.35),this.strength=i1(Q.strength??0.9,0.05,4),this.cutoff=i1(Q.cutoff??0.0025,0.0001,0.25),this.growth=i1(Q.growth??0.24,0,1),this.dissipate=i1(Q.dissipate??0.992,0.8,1),this.eventElement.addEventListener("pointermove",this.onPointerMove),this.eventElement.addEventListener("pointerleave",this.onPointerLeave),this.unsubscribe=f0.onPostRender(($)=>this.onPostRender($))}getTextureHandle(){if(!this.gl||this.targets.length!==2)return null;let Q=this.targets[this.readIndex];if(!Q)return null;return{texture:Q.texture,gl:this.gl,width:Q.width,height:Q.height}}destroy(){this.unsubscribe?.(),this.unsubscribe=null,this.eventElement.removeEventListener("pointermove",this.onPointerMove),this.eventElement.removeEventListener("pointerleave",this.onPointerLeave),this.disposeGpuResources()}onPostRender(Q){let $=Q.device.gl;if(!$)return;if(this.ensureResources($,Q.canvas.width,Q.canvas.height),!this.bundle||this.targets.length!==2)return;let J=this.targets[this.readIndex],H=this.targets[(this.readIndex+1)%2],Z=$.getParameter($.FRAMEBUFFER_BINDING),q=$.getParameter($.VIEWPORT);$.bindFramebuffer($.FRAMEBUFFER,H.framebuffer),$.viewport(0,0,H.width,H.height),$.disable($.DEPTH_TEST),$.useProgram(this.bundle.paintProgram),$.activeTexture($.TEXTURE0),$.bindTexture($.TEXTURE_2D,J.texture);let K=$.getUniformLocation(this.bundle.paintProgram,"uPrev");if(K!=null)$.uniform1i(K,0);let G=$.getUniformLocation(this.bundle.paintProgram,"uFade");if(G!=null)$.uniform1f(G,this.fade);let U=$.getUniformLocation(this.bundle.paintProgram,"uRadius");if(U!=null)$.uniform1f(U,this.radius);let W=$.getUniformLocation(this.bundle.paintProgram,"uStrength");if(W!=null)$.uniform1f(W,this.strength);let X=$.getUniformLocation(this.bundle.paintProgram,"uCutoff");if(X!=null)$.uniform1f(X,this.cutoff);let j=$.getUniformLocation(this.bundle.paintProgram,"uSpeed");if(j!=null)$.uniform1f(j,this.hasPointer?this.speed:0);let L=$.getUniformLocation(this.bundle.paintProgram,"uTime");if(L!=null)$.uniform1f(L,Q.now*0.001);let B=Math.max(0.001,Q.delta*0.001),M=i1((this.hasPointer?this.speed:0)*0.02,0,1),I=8,z=4,R=M>this.smoothedSize?I:z,F=1-Math.exp(-R*B);this.smoothedSize+=(M-this.smoothedSize)*F;let V=$.getUniformLocation(this.bundle.paintProgram,"uSize");if(V!=null)$.uniform1f(V,this.smoothedSize);let Y=$.getUniformLocation(this.bundle.paintProgram,"uMouse");if(Y!=null)$.uniform2f(Y,this.pointer.x,this.pointer.y);let N=$.getUniformLocation(this.bundle.paintProgram,"uMousePrev");if(N!=null)$.uniform2f(N,this.prevPointer.x,this.prevPointer.y);let C=$.getUniformLocation(this.bundle.paintProgram,"uResolution");if(C!=null)$.uniform2f(C,H.width,H.height);$.bindVertexArray(this.bundle.vao),$.drawArrays($.TRIANGLES,0,3),$.bindVertexArray(null),$.bindTexture($.TEXTURE_2D,null),$.bindFramebuffer($.FRAMEBUFFER,J.framebuffer),$.viewport(0,0,J.width,J.height),$.useProgram(this.bundle.growProgram),$.activeTexture($.TEXTURE0),$.bindTexture($.TEXTURE_2D,H.texture);let D=$.getUniformLocation(this.bundle.growProgram,"uPrev");if(D!=null)$.uniform1i(D,0);let O=$.getUniformLocation(this.bundle.growProgram,"uResolution");if(O!=null)$.uniform2f(O,J.width,J.height);let A=$.getUniformLocation(this.bundle.growProgram,"uGrow");if(A!=null)$.uniform1f(A,this.growth);let P=$.getUniformLocation(this.bundle.growProgram,"uDissipate");if(P!=null)$.uniform1f(P,this.dissipate);let w=$.getUniformLocation(this.bundle.growProgram,"uTime");if(w!=null)$.uniform1f(w,Q.now*0.001);let x=$.getUniformLocation(this.bundle.growProgram,"uCutoff");if(x!=null)$.uniform1f(x,this.cutoff*0.6);$.bindVertexArray(this.bundle.vao),$.drawArrays($.TRIANGLES,0,3),$.bindVertexArray(null),$.bindTexture($.TEXTURE_2D,null),$.bindFramebuffer($.FRAMEBUFFER,Z),$.viewport(q[0],q[1],q[2],q[3]),this.prevPointer.x=this.pointer.x,this.prevPointer.y=this.pointer.y,this.speed*=0.9}ensureResources(Q,$,J){let H=Math.max(1,Math.round($*this.resolutionScale)),Z=Math.max(1,Math.round(J*this.resolutionScale));if(this.gl&&this.gl!==Q)this.disposeGpuResources(),this.gl=null;if(!this.gl)this.gl=Q;if(!this.bundle)this.bundle=RW(Q);if(this.targets.length===2&&this.targets[0]?.width===H&&this.targets[0]?.height===Z)return;this.targets.forEach((q)=>q.destroy()),this.targets=[GK(Q,H,Z),GK(Q,H,Z)],this.readIndex=0;for(let q of this.targets)Q.bindFramebuffer(Q.FRAMEBUFFER,q.framebuffer),Q.viewport(0,0,q.width,q.height),Q.clearColor(0,0,0,1),Q.clear(Q.COLOR_BUFFER_BIT);Q.bindFramebuffer(Q.FRAMEBUFFER,null)}disposeGpuResources(){if(this.gl&&this.bundle)this.gl.deleteProgram(this.bundle.paintProgram),this.gl.deleteProgram(this.bundle.growProgram),this.gl.deleteVertexArray(this.bundle.vao),this.gl.deleteBuffer(this.bundle.buffer);this.targets.forEach((Q)=>Q.destroy()),this.targets=[],this.bundle=null,this.gl=null}resolveUv(Q){if(this.element instanceof Window){let Z=Math.max(1,this.element.innerWidth),q=Math.max(1,this.element.innerHeight);return{x:i1(Q.clientX/Z,0,1),y:i1(1-Q.clientY/q,0,1)}}let $=this.element.getBoundingClientRect(),J=Math.max(1,$.width),H=Math.max(1,$.height);return{x:i1((Q.clientX-$.left)/J,0,1),y:i1(1-(Q.clientY-$.top)/H,0,1)}}}function RW(Q){let Z=WK(Q,`#version 300 es
layout(location = 0) in vec2 aPosition;
out vec2 vUv;
void main() {
gl_Position = vec4(aPosition, 0.0, 1.0);
vUv = aPosition * 0.5 + 0.5;
}`,`#version 300 es
precision highp float;
in vec2 vUv;
uniform sampler2D uPrev;
uniform vec2 uMouse;
uniform vec2 uMousePrev;
uniform vec2 uResolution;
uniform float uSpeed;
uniform float uSize;
uniform float uTime;
uniform float uFade;
uniform float uRadius;
uniform float uStrength;
uniform float uCutoff;
out vec4 outColor;
float distanceToSegment(vec2 p, vec2 a, vec2 b) {
vec2 ab = b - a;
float l2 = dot(ab, ab);
if (l2 <= 1e-6) return length(p - a);
float t = clamp(dot(p - a, ab) / l2, 0.0, 1.0);
vec2 q = a + t * ab;
return length(p - q);
}
float hash12(vec2 p) {
vec3 p3 = fract(vec3(p.xyx) * 0.1031);
p3 += dot(p3, p3.yzx + 33.33);
return fract((p3.x + p3.y) * p3.z);
}
float valueNoise(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
vec2 u = f * f * (3.0 - 2.0 * f);
float a = hash12(i + vec2(0.0, 0.0));
float b = hash12(i + vec2(1.0, 0.0));
float c = hash12(i + vec2(0.0, 1.0));
float d2 = hash12(i + vec2(1.0, 1.0));
return mix(mix(a, b, u.x), mix(c, d2, u.x), u.y);
}
float fbm(vec2 p) {
float v = 0.0;
float a = 0.5;
mat2 m = mat2(1.6, 1.2, -1.2, 1.6);
for (int i = 0; i < 4; i++) {
v += a * valueNoise(p);
p = m * p;
a *= 0.5;
}
return v;
}
void main() {
vec3 prev = texture(uPrev, vUv).rgb * uFade;
float aspect = uResolution.x / max(1.0, uResolution.y);
vec2 p = vec2(vUv.x * aspect, vUv.y);
vec2 a = vec2(uMousePrev.x * aspect, uMousePrev.y);
vec2 b = vec2(uMouse.x * aspect, uMouse.y);
float d = distanceToSegment(p, a, b);
float segmentLen = length(b - a);
float movementMask = smoothstep(0.00025, 0.0015, segmentLen);
float speedCurve = clamp(uSize, 0.0, 1.0);
float dynamicRadius = mix(uRadius, uRadius * 18.0, speedCurve);
float intensity = movementMask * uStrength;
// Organic edge variation using warped fBm (avoids blocky/hash look).
vec2 baseNoiseUv = vUv * vec2(7.0, 4.8) + vec2(uTime * 0.35, -uTime * 0.22);
float warpX = fbm(baseNoiseUv + vec2(1.7, 5.1));
float warpY = fbm(baseNoiseUv + vec2(8.3, 2.4));
vec2 warpedUv = baseNoiseUv + (vec2(warpX, warpY) - 0.5) * 1.35;
float organic = fbm(warpedUv);
float edgeNoise = (organic - 0.5) * 2.0;
float noisyD = d + edgeNoise * dynamicRadius * 0.22;
float brush = exp(-pow(noisyD / max(0.0001, dynamicRadius), 2.0) * 2.0) * intensity;
vec3 ink = vec3(brush);
vec3 trail = clamp(prev + ink, 0.0, 1.0);
trail = max(trail - vec3(uCutoff), vec3(0.0));
outColor = vec4(trail, 1.0);
}`),q=WK(Q,`#version 300 es
layout(location = 0) in vec2 aPosition;
out vec2 vUv;
void main() {
gl_Position = vec4(aPosition, 0.0, 1.0);
vUv = aPosition * 0.5 + 0.5;
}`,`#version 300 es
precision highp float;
in vec2 vUv;
uniform sampler2D uPrev;
uniform vec2 uResolution;
uniform float uGrow;
uniform float uDissipate;
uniform float uTime;
uniform float uCutoff;
out vec4 outColor;
float hash12(vec2 p) {
vec3 p3 = fract(vec3(p.xyx) * 0.1031);
p3 += dot(p3, p3.yzx + 33.33);
return fract((p3.x + p3.y) * p3.z);
}
float valueNoise(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
vec2 u = f * f * (3.0 - 2.0 * f);
float a = hash12(i + vec2(0.0, 0.0));
float b = hash12(i + vec2(1.0, 0.0));
float c = hash12(i + vec2(0.0, 1.0));
float d = hash12(i + vec2(1.0, 1.0));
return mix(mix(a, b, u.x), mix(c, d, u.x), u.y);
}
void main() {
vec2 texel = 1.0 / max(uResolution, vec2(1.0));
vec3 c = texture(uPrev, vUv).rgb;
vec3 s1 = texture(uPrev, vUv + vec2(texel.x, 0.0)).rgb;
vec3 s2 = texture(uPrev, vUv + vec2(-texel.x, 0.0)).rgb;
vec3 s3 = texture(uPrev, vUv + vec2(0.0, texel.y)).rgb;
vec3 s4 = texture(uPrev, vUv + vec2(0.0, -texel.y)).rgb;
vec3 s5 = texture(uPrev, vUv + vec2(texel.x, texel.y)).rgb;
vec3 s6 = texture(uPrev, vUv + vec2(-texel.x, texel.y)).rgb;
vec3 s7 = texture(uPrev, vUv + vec2(texel.x, -texel.y)).rgb;
vec3 s8 = texture(uPrev, vUv + vec2(-texel.x, -texel.y)).rgb;
vec3 neighborMax = max(max(max(s1, s2), max(s3, s4)), max(max(s5, s6), max(s7, s8)));
vec3 grown = mix(c, max(c, neighborMax), clamp(uGrow, 0.0, 1.0));
// Add low-frequency animated noise to dissipate less uniformly.
vec2 noiseUv = vUv * vec2(5.0, 3.4) + vec2(uTime * 0.18, -uTime * 0.12);
float n = valueNoise(noiseUv) * 2.0 - 1.0;
float noisyDissipate = clamp(uDissipate + n * 0.04, 0.0, 1.0);
vec3 dissipated = grown * noisyDissipate;
vec3 trail = max(dissipated - vec3(uCutoff), vec3(0.0));
outColor = vec4(trail, 1.0);
}`),K=Q.createVertexArray(),G=Q.createBuffer();if(!K||!G)throw new Error("Failed to create mouse trail geometry.");return Q.bindVertexArray(K),Q.bindBuffer(Q.ARRAY_BUFFER,G),Q.bufferData(Q.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),Q.STATIC_DRAW),Q.enableVertexAttribArray(0),Q.vertexAttribPointer(0,2,Q.FLOAT,!1,0,0),Q.bindVertexArray(null),Q.bindBuffer(Q.ARRAY_BUFFER,null),{paintProgram:Z,growProgram:q,vao:K,buffer:G}}function GK(Q,$,J){let H=Q.createTexture(),Z=Q.createFramebuffer();if(!H||!Z)throw new Error("Failed to create mouse trail target.");return Q.bindTexture(Q.TEXTURE_2D,H),Q.texImage2D(Q.TEXTURE_2D,0,Q.RGBA,$,J,0,Q.RGBA,Q.UNSIGNED_BYTE,null),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MIN_FILTER,Q.LINEAR),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_MAG_FILTER,Q.LINEAR),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_S,Q.CLAMP_TO_EDGE),Q.texParameteri(Q.TEXTURE_2D,Q.TEXTURE_WRAP_T,Q.CLAMP_TO_EDGE),Q.bindFramebuffer(Q.FRAMEBUFFER,Z),Q.framebufferTexture2D(Q.FRAMEBUFFER,Q.COLOR_ATTACHMENT0,Q.TEXTURE_2D,H,0),Q.bindTexture(Q.TEXTURE_2D,null),Q.bindFramebuffer(Q.FRAMEBUFFER,null),{texture:H,framebuffer:Z,width:$,height:J,destroy(){Q.deleteTexture(H),Q.deleteFramebuffer(Z)}}}function UK(Q,$,J){let H=Q.createShader($);if(!H)throw new Error("Failed to create WebGL shader.");if(Q.shaderSource(H,J),Q.compileShader(H),!Q.getShaderParameter(H,Q.COMPILE_STATUS)){let Z=Q.getShaderInfoLog(H)??"Unknown shader compile error.";throw Q.deleteShader(H),new Error(Z)}return H}function WK(Q,$,J){let H=Q.createProgram();if(!H)throw new Error("Failed to create WebGL program.");let Z=UK(Q,Q.VERTEX_SHADER,$),q=UK(Q,Q.FRAGMENT_SHADER,J);if(Q.attachShader(H,Z),Q.attachShader(H,q),Q.linkProgram(H),Q.deleteShader(Z),Q.deleteShader(q),!Q.getProgramParameter(H,Q.LINK_STATUS)){let K=Q.getProgramInfoLog(H)??"Unknown program link error.";throw Q.deleteProgram(H),new Error(K)}return H}function i1(Q,$,J){return Math.max($,Math.min(J,Q))}function iJ(Q={}){return new lJ(Q)}function nJ(Q,$={}){let J=$.url??pJ.icon,H={centerX:0,centerY:0,scale:17},Z=H.centerX,q=H.centerY,K=$.mousePositionAmount??0.03,G=$.log??!0,U=$.mouse??C9(),W=$.getScrollVelocity??(()=>0),X=$.scrollVelocityToYOffset??0.0045,j=$.scrollVelocityToXRotation??0,L=$.scrollVelocityToYRotation??0,B=$.scrollFlipVelocityThreshold??0,M=Math.max(0.05,$.scrollFlipDuration??0.5),I=Math.max(0,$.scrollFlipCooldown??0.35),z=$.scrollYOffsetDamping??0.86,R=$.scrollYOffsetRecenter??0.055,F=$.scrollYOffsetEase??0.18,V=$.idleFloatYOffsetAmplitude??0.004,Y=$.idleFloatYOffsetSpeed??0.9,N=$.idleFloatRotationAmplitude??0.012,C=$.idleFloatRotationSpeed??0.7,D=$.getScale,O=$.getBackgroundFlipProgress,A=!$.mouse,P=Q.getInitPromise()??Promise.resolve(),w=P.then(()=>c8(oJ(),{fit:"stretch",sampler:{minFilter:"linear",magFilter:"linear",addressModeU:"repeat",addressModeV:"clamp-to-edge"}})),x=P.then(()=>c8(pJ.logo,{fit:"stretch",sampler:{minFilter:"linear",magFilter:"linear",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}})),S=null,T=null,h=null,y=!1;return Promise.all([P,g7(J),w,x]).then(([,b,m,_])=>{if(T=m,h=_,y||!b?.length){if(b?.length===0&&G)console.warn("[webgl] GLB has no meshes");return}let E=b[0],c=0,Q0=0,j0=0,H0=0,F0=0,N0=0,W0=0,M0=1,A0=1,i0=0,P0=0,V0=0,i=0;S=J8(null,{placement:H,shape:{type:"custom",vertices:E.vertices,indices:E.indices,vertexStride:E.vertexStride},shaders:{fragmentGlsl:`#version 300 es
precision highp float;
in vec3 vNormal;
in vec2 vUv;
uniform sampler2D uEnvMap;
uniform sampler2D uMaskMap;
uniform float uHasUv;
uniform float uValue1;
out vec4 outColor;
const float PI = 3.14159265359;
void main() {
vec3 n = normalize(vNormal);
vec3 v = normalize(vec3(0.0, 0.0, 1.0));
vec3 r = reflect(-v, n);
vec2 envUv = vec2(
atan(r.z, r.x) / (2.0 * PI) + 0.5,
acos(clamp(r.y, -1.0, 1.0)) / PI
);
vec3 env = texture(uEnvMap, envUv).rgb;
vec2 envUvDiffuse = vec2(
atan(n.z, n.x) / (2.0 * PI) + 0.5,
acos(clamp(n.y, -1.0, 1.0)) / PI
);
vec3 envDiffuse = texture(uEnvMap, envUvDiffuse).rgb;
float metallic = 0.0;
float roughness = 0.9;
float bgFlipRaw = clamp(uValue1, 0.0, 1.0);
float bgFlip = bgFlipRaw * bgFlipRaw * (3.0 - 2.0 * bgFlipRaw);
float highlightBoost = 1.0 + bgFlip * 0.6;
float gradBase = clamp(0.5 + n.y * 0.5, 0.0, 1.0);
float gradWave =
sin(n.x * 6.0) * 0.03 +
sin(n.z * 8.5) * 0.02 +
sin((n.x + n.z) * 4.0) * 0.015;
float grad = clamp(gradBase + gradWave, 0.0, 1.0);
vec3 albedo = mix(
vec3(0.004, 0.004, 0.005),
vec3(0.04, 0.043, 0.048),
grad
);
vec3 f0 = mix(vec3(0.04), albedo, metallic);
float ndv = max(dot(n, v), 0.0);
vec3 fresnel = f0 + (1.0 - f0) * pow(1.0 - ndv, 5.0);
float rim = pow(1.0 - ndv, 1.55);
vec3 diffuse = (1.0 - metallic) * albedo * envDiffuse * 0.55;
vec3 specular = env * fresnel * (1.0 - roughness) * 0.08 * highlightBoost;
vec3 rimLight = envDiffuse * vec3(0.95, 0.98, 1.04) * rim * 0.72 * highlightBoost;
float baseBrightness = mix(0.48, 0.72, bgFlip);
vec3 baseColor = (diffuse + specular + rimLight) * baseBrightness;
float mask = uHasUv > 0.5 ? texture(uMaskMap, vUv).r : 0.0;
mask = smoothstep(0.1, 0.9, mask);
float whiteGrad = clamp(1.0 - vUv.y, 0.0, 1.0);
vec3 whiteColorDark = mix(
vec3(0.48, 0.49, 0.51),
vec3(0.68, 0.69, 0.72),
whiteGrad
);
vec3 whiteColorLight = mix(
vec3(0.62, 0.63, 0.66),
vec3(0.82, 0.83, 0.86),
whiteGrad
);
vec3 whiteColor = mix(whiteColorDark, whiteColorLight, bgFlip);
vec3 whiteShinyColor = whiteColor + (specular + rimLight) * 0.96;
vec3 color = mix(baseColor, whiteShinyColor, mask);
color = color / (color + vec3(1.0));
color = pow(color, vec3(1.0 / 2.2));
outColor = vec4(color, 1.0);
}
`},envMap:m.texture,maskMap:_.texture,uni:{value1:O?.()??0},onFrame:(G0)=>{let D0=performance.now()*0.001,p0=i>0?D0-i:0.016;i=D0;let k=Math.sin(D0*Y)*V,v=Math.sin(D0*C)*N,X0=Math.cos(D0*C)*N,z0=U.update(),R0=z0.x+z0.dragX,r1=z0.y+z0.dragY,V1=W();if(V0=Math.max(0,V0-p0),B>0&&V0<=0&&Math.abs(V1)>=B&&M0>=1)M0=0,A0=Math.sign(V1)||1;if(M0<1){M0=Math.min(1,M0+p0/M);let C0=M0;if(i0=(1-(1-C0)*(1-C0))*Math.PI*A0*Math.sign(j||1),P0=0,M0>=1)H0+=i0,i0=0,V0=I}j0-=V1*X,j0*=z,Q0+=j0,Q0+=(0-Q0)*R,c+=(Q0-c)*F,N0+=(V1*j-N0)*0.12,W0+=(V1*L-W0)*0.12;let Y$=H0+N0,u0=F0+W0;H.centerX=Z+z0.x*K,H.centerY=q+c+k+z0.y*K;let H$=D?.()??1;return G0.setUni({value1:O?.()??0}),G0.setTransform({scale:H$,rotationY:R0*0.55+u0+X0+P0,rotationX:r1*0.4+Y$+v+i0}),G0}})}).catch((b)=>{if(!y){if(console.error("[webgl] GLB load failed:",b),b instanceof Error&&b.stack)console.error(b.stack)}}),()=>{if(y=!0,S?.destroy(),S=null,T?.destroy(),T=null,h?.destroy(),h=null,A)U.destroy()}}var XK=1;function p8(Q){XK=typeof Q==="number"&&Number.isFinite(Q)?Q:1}function rJ(){return XK}function c7(Q,$,J,H,Z){return H+(Z-H)*(Q-$)/(J-$)}function M$(Q,$,J){return Math.min(Math.max(J,Q),$)}var jK=0,CW=0;var o8=[],p7=null,aJ=null;function EW(Q){return Math.max(0,Math.min(1,Q))}function OW(Q,$,J){let{top:H,bottom:Z}=$;if(H===Z)return J[0];let q=Math.min(H,Z),K=Math.max(H,Z);if(Q<=q)return J[0];if(Q>=K)return J[1];let G=c7(Q,H,Z,J[0],J[1]),U=Math.min(J[0],J[1]),W=Math.max(J[0],J[1]);return M$(U,W,G)}function tJ(Q){return Math.abs(Q.bottom-Q.top)}function AW(Q,$){if(tJ(Q)>=$)return Q;if(Q.top<=Q.bottom)return{top:Q.top,bottom:Q.top+$};return{top:Q.top,bottom:Q.top-$}}function o7(){let Q=S0.scroll,$=0,J=0,H=0,Z=o8.map((q)=>({zone:q,bounds:q.getBounds()})).filter((q)=>Boolean(q.bounds)).sort((q,K)=>Math.min(q.bounds.top,q.bounds.bottom)-Math.min(K.bounds.top,K.bounds.bottom));for(let{zone:q,bounds:K}of Z){let G=K,U=tJ(K)*q.spanScale;if(q.reverse&&H>U)G=AW(K,H),U=tJ(G);let W=Math.min(G.top,G.bottom),X=Math.max(G.top,G.bottom);if(Q<W)break;if(Q<=X){$=OW(Q,G,q.outputBounds),J=q.reverse?1:0,H=U;break}$=q.outputBounds[1],J=q.reverse?1:0,H=U}jK=EW($),CW=J}function PW(){if(p7)return;p7=S0.add(o7),aJ=k1.add(o7)}function kW(){if(o8.length>0)return;p7?.(),aJ?.(),p7=null,aJ=null}function eJ(Q){return o8.push(Q),PW(),o7(),()=>{let $=o8.indexOf(Q);if($>=0)o8.splice($,1);kW(),o7()}}function s8(){return jK}function xW(Q){let $=parseFloat(Q??"1");return Number.isFinite($)&&$>0?$:1}function BK(Q,$){let J=$.flipReverse==="true",H=J?[1,0]:[0,1],Z=xW($.flipSpan),q=u7(Q,{bounds:H,top:"bottom",bottom:J?"top":"center"});return eJ({reverse:J,outputBounds:H,spanScale:Z,getBounds:()=>q?.bounds??null})}var QH={};r(QH,{default:()=>IK});class LK{events;constructor(){this.events={}}on(Q,$){if(!this.events[Q])this.events[Q]=[];this.events[Q].push($)}once(Q,$){let J=(H)=>{$(H),this.off(Q,J)};this.on(Q,J)}off(Q,$){if(!this.events[Q])return;this.events[Q]=this.events[Q].filter((J)=>J!==$)}emit(Q,$){if(!this.events[Q])return;this.events[Q].forEach((J)=>J($))}}class z${static emitter=new LK;static state={};static createProxy(Q){return new Proxy(Q,{set:function($,J,H,Z){return z$.emitter.emit(J.toString(),H),Reflect.set($,J,H,Z)}})}static proxy=new Proxy(z$.state,{set:function(Q,$,J,H){if(typeof J==="object"&&J!==null)J=z$.createProxy(J);return z$.emitter.emit($.toString(),J),Reflect.set(Q,$,J,H)}});static on(Q,$){this.emitter.on(Q,$)}static once(Q,$){this.emitter.once(Q,$)}static off(Q,$){this.emitter.off(Q,$)}}var wW={get(Q,$){if(typeof $==="string"&&$ in z$)return z$[$].bind(z$);return Q[$]},set(Q,$,J,H){return Reflect.set(z$.proxy,$,J,H)}},y$=new Proxy(z$.proxy,wW);function IK(Q,$){y$.on("SOMETHING",(J)=>{console.log("something",J)}),Mq(async()=>{await n.to(Q,{duration:0.2,backgroundColor:"green"})}),Iq(async()=>{await n.to(Q,{duration:1,backgroundColor:"blue"}),await n.to(Q,{duration:1,autoAlpha:0})},{element:Q}),jq(()=>{}),t9(()=>{})}var JH={};r(JH,{default:()=>MK});function MK(Q,$){let H=new Intl.DateTimeFormat("en-US",{weekday:"short",month:"short",day:"numeric"}).formatToParts(new Date),Z=H.find((U)=>U.type==="weekday")?.value??"",q=H.find((U)=>U.type==="month")?.value??"",K=H.find((U)=>U.type==="day")?.value??"",G=`${Z} ${q} ${K}`;Q.textContent=G}var HH={};r(HH,{default:()=>zK});function zK(Q,$){let J=Array.from(Q.children).filter((D)=>D instanceof HTMLElement);if(!J.length)return;let H=Q.style.height,Z=Q.style.maxHeight,q=Q.style.overflow,K=Math.max(Q.offsetHeight,1),G=J.map((D)=>({transform:D.style.transform,transformOrigin:D.style.transformOrigin,willChange:D.style.willChange,width:D.style.width,height:D.style.height,minWidth:D.style.minWidth,minHeight:D.style.minHeight})),U=J.map((D)=>{let O=D.getBoundingClientRect();return{width:Math.max(O.width,1),height:Math.max(O.height,1)}}),W=J.map(()=>({current:1,target:1})),X=J.length>=2?J.length-2:-1,j=0,L=0,B=0,M=0,I=!1,z=0;Q.style.height=`${K}px`,Q.style.maxHeight=`${K}px`,Q.style.overflow="visible";for(let D of J)D.style.transformOrigin="center bottom",D.style.willChange="width,height";let R=()=>{if(!z)z=requestAnimationFrame(V)},F=(D=!0)=>{for(let O=0;O<J.length;O+=1){let A=J[O],P=W[O];if(O===X){P.target=1;continue}if(!I){P.target=1;continue}let w=A.getBoundingClientRect(),x=w.left+w.width*0.5,S=w.top+w.height*0.5,T=Math.abs(B-x),h=Math.abs(M-S)/1.15,y=Math.max(0,1-T/140),b=Math.max(0,1-h/140),_=1+Math.pow(y*b,1.6)*0.8999999999999999;if(Math.abs(_-P.target)>0.003)P.target=_}if(D)R()},V=()=>{z=0;let D=!1;if(I){if(B+=(j-B)*0.5,M+=(L-M)*0.5,Math.abs(j-B)>0.1||Math.abs(L-M)>0.1)D=!0;F(!1)}for(let O=0;O<J.length;O+=1){let A=J[O],P=W[O];if(O===X){P.current=1,P.target=1;let T=U[O];A.style.width=`${T.width}px`,A.style.height=`${T.height}px`,A.style.minWidth=`${T.width}px`,A.style.minHeight=`${T.height}px`,A.style.transform="translateZ(0)";continue}if(P.current+=(P.target-P.current)*0.16,Math.abs(P.target-P.current)>0.001)D=!0;else P.current=P.target;let w=U[O],x=w.width*P.current,S=w.height*P.current;A.style.width=`${x}px`,A.style.height=`${S}px`,A.style.minWidth=`${x}px`,A.style.minHeight=`${S}px`,A.style.transform="translateZ(0)"}if(D)R()},Y=(D)=>{let O=!I;I=!0;let{clientX:A,clientY:P}=D;if(!O){let w=Math.abs(A-j),x=Math.abs(P-L);if(w<2&&x<2)return}if(j=A,L=P,O){B=j,M=L,F();return}R()},N=()=>{I=!1;for(let D of W)D.target=1;R()},C=()=>{if(!I)return;F()};return Q.addEventListener("pointerenter",Y),Q.addEventListener("pointermove",Y),Q.addEventListener("pointerleave",N),window.addEventListener("resize",C),()=>{if(Q.removeEventListener("pointerenter",Y),Q.removeEventListener("pointermove",Y),Q.removeEventListener("pointerleave",N),window.removeEventListener("resize",C),z)cancelAnimationFrame(z);Q.style.height=H,Q.style.maxHeight=Z,Q.style.overflow=q;for(let D=0;D<J.length;D+=1){let O=J[D],A=G[D];O.style.transform=A.transform,O.style.transformOrigin=A.transformOrigin,O.style.willChange=A.willChange,O.style.width=A.width,O.style.height=A.height,O.style.minWidth=A.minWidth,O.style.minHeight=A.minHeight}}}var ZH={};r(ZH,{default:()=>YK});function YK(Q){let $=Q.contentEditable,J=Q.style.userSelect,H=Q.style.outline,Z=Q.style.boxShadow,q=Q.getAttribute("tabindex"),K=Q.getAttribute("role");if(Q.contentEditable="true",Q.style.userSelect="text",Q.style.outline="none",Q.style.boxShadow="none",q===null)Q.tabIndex=0;if(K===null)Q.setAttribute("role","textbox");let G=(U)=>{U.stopPropagation()};return Q.addEventListener("pointerdown",G),()=>{if(Q.removeEventListener("pointerdown",G),Q.contentEditable=$,Q.style.userSelect=J,Q.style.outline=H,Q.style.boxShadow=Z,q===null)Q.removeAttribute("tabindex");else Q.setAttribute("tabindex",q);if(K===null)Q.removeAttribute("role");else Q.setAttribute("role",K)}}var qH={};r(qH,{default:()=>FK});function NK(Q){if(Q==="0")return 0;if(!Q.endsWith("px"))return null;let $=Number(Q.slice(0,-2));return Number.isFinite($)?$:null}function DK(Q){let $=Q.trim();if(!$||$==="none")return null;let J=$.split(/[\s,]+/).filter(Boolean);if(!J.length)return null;let H=NK(J[0]),Z=NK(J[1]??"0");if(H===null||Z===null)return null;return[H,Z]}function SW(Q){let $=Q.trim();if(!$||$==="none")return null;if($.startsWith("matrix3d(")&&$.endsWith(")")){let J=$.slice(9,-1).split(",").map((H)=>Number(H.trim()));if(J.length===16&&J.every(Number.isFinite))return[J[12],J[13]]}if($.startsWith("matrix(")&&$.endsWith(")")){let J=$.slice(7,-1).split(",").map((H)=>Number(H.trim()));if(J.length===6&&J.every(Number.isFinite))return[J[4],J[5]]}return null}function bW(Q){let $=DK(Q.style.translate);if($)return $;let J=getComputedStyle(Q),H=DK(J.translate);if(H)return H;let Z=SW(J.transform);if(Z)return Z;return[0,0]}function FK(Q,$){let J=Array.from(Q.querySelectorAll("[data-spread]"));if(!J.length)return;let{innerWidth:H,innerHeight:Z}=window,q=new Map,K=new Map,G=1;J.forEach((W,X)=>{if(W.closest("[data-module='app']"))return;let j=X*0.05*Z,L=(Math.random()*2-1)*0.02*H,B=(Math.random()*2-1)*0.02*Z;q.set(W,W.style.translate),K.set(W,W.style.zIndex);let M=Number.parseInt(W.style.zIndex||"",10);if(Number.isFinite(M))G=Math.max(G,M+1);let[I,z]=bW(W);W.style.translate=`${I+L}px ${z+j+B}px`});let U=(W)=>{if(!(W.target instanceof HTMLElement))return;let X=W.target.closest("[data-spread]");if(!X)return;if(!Q.contains(X))return;if(X.closest("[data-module='app']"))return;X.style.zIndex=String(G),G+=1};return Q.addEventListener("pointerdown",U,!0),()=>{Q.removeEventListener("pointerdown",U,!0),q.forEach((W,X)=>{X.style.translate=W}),K.forEach((W,X)=>{X.style.zIndex=W})}}var KH={};r(KH,{default:()=>VK});function VK(Q,$){let J=Array.from(Q.children);if(J.length===0)return;return n.to(J,{scale:1,duration:0.4,stagger:0.08,ease:"expo.out"}),()=>{n.killTweensOf(J)}}var BH={};r(BH,{default:()=>SK});function GH(Q){if(!Q||typeof Q!=="string")return{isValid:!1,normalizedUrl:"",error:"No URL provided"};let $=Q.trim();if($.endsWith("/"))$=$.slice(0,-1);if($.startsWith("http://")||$.startsWith("https://"))try{let H=new URL($);if(!H.hostname||!H.protocol)return{isValid:!1,normalizedUrl:"",error:"Invalid URL format"};return{isValid:!0,normalizedUrl:H.protocol==="https:"?$:$.replace("http://","https://")}}catch(H){return{isValid:!1,normalizedUrl:"",error:"Invalid URL format"}}let J=`https://${$}`;try{if(!new URL(J).hostname)return{isValid:!1,normalizedUrl:"",error:"Invalid hostname"};return{isValid:!0,normalizedUrl:J}}catch(H){return{isValid:!1,normalizedUrl:"",error:"Invalid URL format"}}}function RK(Q){if(typeof process==="undefined")return null;let $=GH(process.env[Q]);if(!$.isValid)return console.warn(`⚠️ Invalid ${Q}: ${$.error}`),null;return $.normalizedUrl}var UH="/api/",TW=!0,yW="https://ssscript-website.vercel.app",CK=6545,EK=6546,n1=null;function hW(){if(n1)return n1;try{let $=window.__API_ORIGIN__;if($)return n1=new URL($).origin,n1;let J=window.location.hostname;if(!(J==="localhost"||J==="127.0.0.1"))return n1=yW,n1;let Z=document.currentScript,q=Z?.src?new URL(Z.src).origin:window.location.origin,K=new URL(q);if(K.hostname==="localhost"&&Number(K.port)===CK)q=`${K.protocol}//${K.hostname}:${EK}`;return n1=q,n1}catch{}try{return n1=new URL("https://ssscript-website-pj5rav8w5-federicoooo.vercel.app").origin,n1}catch{}let Q=window.location.origin;try{let $=new URL(Q);if($.hostname==="localhost"&&Number($.port)===CK)Q=`${$.protocol}//${$.hostname}:${EK}`}catch{}return n1=Q,n1}var s7=(Q="")=>{if(typeof window!=="undefined")return`${hW()}${UH}${Q}`;if(typeof process!=="undefined"&&!1)return`${TW?"https":"http"}://localhost:6546${UH}${Q}`;let J=RK("VERCEL_URL");if(!J)throw new Error("VERCEL_URL is not set or invalid. Please set a valid URL in your environment variables.");return`${J}${UH}${Q}`};var OK=["Email","email","EMAIL","emailAddress","email_address"],AK=["FNAME","firstName","first_name","First-Name"],PK=["Name","name"];function H8(Q){return Q.trim().toLowerCase().replace(/\s+/g,"-")}function WH(Q,$){let J=new Set($.map((H)=>H8(H)));for(let[H,Z]of Object.entries(Q)){if(typeof Z!=="string")continue;let q=Z.trim();if(!q)continue;if(J.has(H8(H)))return q}return""}function fW(Q){let $=WH(Q,OK);if(!$)return null;let J=WH(Q,AK),H=WH(Q,PK);if(!J&&H)J=H.split(/\s+/)[0]??"";return{email:$,firstName:J,fullName:H||void 0}}function h$(Q){let $=fW(Q);if(!$)return;try{localStorage.setItem("form-shared-contact",JSON.stringify($))}catch{}}function l7(){try{let Q=[];for(let $=0;$<localStorage.length;$++){let J=localStorage.key($);if(J?.startsWith("form-draft")&&!J.endsWith(":submitted"))Q.push(J)}Q.sort();for(let $ of Q){let J=localStorage.getItem($);if(!J)continue;try{let H=JSON.parse(J);h$(H)}catch{}}}catch{}}var _W=new Set(OK.map((Q)=>H8(Q))),vW=new Set(AK.map((Q)=>H8(Q))),uW=new Set(PK.map((Q)=>H8(Q)));function i7(Q){let $=null;try{$=localStorage.getItem("form-shared-contact")}catch{return}if(!$)return;let J;try{J=JSON.parse($)}catch{return}if(!J?.email)return;Q.querySelectorAll("[name]").forEach((Z)=>{if(!Z.name||Z.disabled)return;if(typeof Z.value!=="string")return;if(Z.value.trim()!=="")return;let q=H8(Z.name);if(_W.has(q)){Z.value=J.email;return}if(vW.has(q)&&J.firstName){Z.value=J.firstName;return}if(uW.has(q)){if(J.fullName)Z.value=J.fullName;else if(J.firstName)Z.value=J.firstName}})}var mW="form-beta",dW=5000,wK="form-draft",XH="form:draft-sync",jH="form:submitted-sync",gW=(Q,$,J,H)=>{let Z=H.draftStorageKey||H.storageKey||J.id||window.location.pathname;return`${wK}:${Q}:${Z}`},cW=(Q,$,J)=>{let H=J.submittedStorageKey||J.storageKey||$.id||window.location.pathname;return`${wK}:${Q}:${H}:submitted`},kK=(Q)=>{let $={},J=Array.from(Q.querySelectorAll("[name]")),H=new Map;return J.forEach((Z)=>{if(Z instanceof HTMLInputElement&&Z.type==="checkbox"&&!Z.disabled)H.set(Z.name,(H.get(Z.name)??0)+1)}),J.forEach((Z)=>{if(!Z.name||Z.disabled)return;if(Z instanceof HTMLInputElement&&(Z.type==="file"||Z.type==="password"))return;if(Z instanceof HTMLInputElement&&Z.type==="radio"){if(Z.checked)$[Z.name]=Z.value;return}if(Z instanceof HTMLInputElement&&Z.type==="checkbox"){if((H.get(Z.name)??0)>1){let K=Array.isArray($[Z.name])?$[Z.name]:[];if(Z.checked)K.push(Z.value);$[Z.name]=K}else $[Z.name]=Z.checked;return}if(Z instanceof HTMLSelectElement&&Z.multiple){$[Z.name]=Array.from(Z.selectedOptions).map((q)=>q.value);return}$[Z.name]=Z.value}),$},pW=(Q)=>{return Object.values(Q).some(($)=>{if(Array.isArray($))return $.length>0;if(typeof $==="boolean")return $;return $.trim().length>0})},xK=(Q,$)=>{Array.from(Q.querySelectorAll("[name]")).forEach((H)=>{let Z=$[H.name];if(typeof Z==="undefined")return;if(H instanceof HTMLInputElement&&H.type==="radio"){H.checked=String(Z)===H.value;return}if(H instanceof HTMLInputElement&&H.type==="checkbox"){if(Array.isArray(Z))H.checked=Z.includes(H.value);else if(typeof Z==="boolean")H.checked=Z;else H.checked=Z===H.value;return}if(H instanceof HTMLSelectElement&&H.multiple){let q=Array.isArray(Z)?Z:[String(Z)];Array.from(H.options).forEach((K)=>{K.selected=q.includes(K.value)});return}H.value=Array.isArray(Z)?Z[0]??"":String(Z)})};function SK(Q,$){let J=Q.querySelector("form");if(!J)return;let H=Q.querySelector("[data-form]"),Z=Q.querySelector("[data-success]"),q=Q.querySelector("[data-failure]"),K=Q.querySelector("[data-form-error]"),G=($.action??$.api??mW).replace(/^\/api\/?/,""),U=s7(G),W=gW(G,J,Q,$),X=cW(G,Q,$);J.action=U,J.method="post",J.removeAttribute("target");let j=()=>{if(!K)return;K.textContent="",K.hidden=!0},L=null,B=()=>{if(L!=null)clearTimeout(L),L=null},M=()=>{try{return localStorage.getItem(X)==="1"}catch{return!1}},I=()=>{if(B(),q)q.style.display="none";if(M())return;if(H)H.hidden=!1,H.style.display="";else J.hidden=!1;let D=Q.querySelector("[data-form-moderation-message]");if(D)D.hidden=!0,D.textContent="";j()},z=(D)=>{if(B(),j(),Z)Z.style.display="none";if(H)H.hidden=!0,H.style.display="none";else J.hidden=!0;if(q){q.style.display="flex";let O=q.querySelector("[data-failure-message]");if(O&&D)O.textContent=D}L=window.setTimeout(()=>{L=null,I()},dW)},R=(D)=>{if(D){if(B(),q)q.style.display="none"}if(H)H.hidden=D,H.style.display=D?"none":"";else J.hidden=D;if(Z)Z.style.display=D?"flex":"none";if(D)j()};try{let D=localStorage.getItem(X)==="1";R(D)}catch(D){console.warn("[form-beta] failed to restore submitted state",D)}let F=()=>{try{let D=kK(J);if(h$(D),pW(D))localStorage.setItem(W,JSON.stringify(D));else localStorage.removeItem(W);window.dispatchEvent(new CustomEvent(XH,{detail:{key:W,data:D,sourceForm:J}}))}catch(D){console.warn("[form-beta] failed to save draft",D)}},V=(D)=>{let O=D;if(!O.detail||O.detail.key!==W||O.detail.sourceForm===J)return;xK(J,O.detail.data)};try{let D=localStorage.getItem(W);if(D){let O=JSON.parse(D);xK(J,O),h$(O)}}catch(D){console.warn("[form-beta] failed to restore draft",D)}if(l7(),i7(J),q)q.style.display="none";let Y=async(D)=>{D.preventDefault(),D.stopPropagation(),D.stopImmediatePropagation(),j(),I();let O=D.currentTarget,A=O.querySelector("[type='submit']"),P=A?.textContent??"";if(A){if(A.disabled=!0,A.dataset.loading)A.textContent=A.dataset.loading}try{let w=new FormData(O),x=O.enctype==="multipart/form-data",S;if(x)S=w;else{let m=new URLSearchParams;w.forEach((_,E)=>{m.append(E,_ instanceof File?_.name:String(_))}),S=m.toString()}let T=x?{}:{"Content-Type":"application/x-www-form-urlencoded"};console.log("[form-beta] submitting to api",{actionUrl:U,isMultipart:x});let h=await fetch(U,{method:"POST",headers:T,body:x?w:S}),y=await h.json().catch(()=>({}));if(console.log("[form-beta] response received",{ok:h.ok,status:h.status,json:y}),!h.ok){let m=(y&&typeof y.error==="string"?y.error:null)??`Request failed: ${h.status}`,_=h.status===400;J.dispatchEvent(new CustomEvent("form:error",{bubbles:!0,detail:{message:m,flagged:_}}));return}let b=y?.debug?.persistDraftAfterSubmit===!0;if(h$(kK(O)),b)console.log("[form-beta] DEBUG: draft persisted after submit",{draftKey:W});else localStorage.removeItem(W),console.log("[form-beta] draft cleared after submit");if(localStorage.setItem(X,"1"),R(!0),window.dispatchEvent(new CustomEvent(jH,{detail:{key:X,isSubmitted:!0,sourceForm:J}})),$.successRedirect){window.location.href=$.successRedirect;return}J.dispatchEvent(new CustomEvent("form:success",{bubbles:!0,detail:y})),console.log("[form-beta] success event dispatched")}catch(w){console.error("[form-beta] submit failed",{actionUrl:U,err:w}),J.dispatchEvent(new CustomEvent("form:error",{bubbles:!0,detail:{message:w instanceof Error?w.message:"Submit failed",flagged:!1}}))}finally{if(A)A.disabled=!1,A.textContent=P}},N=(D)=>{let O=D,A=O.detail?.message??(O.detail?.flagged?"Your message was not accepted.":"Something went wrong. Please try again.");if(q){z(A);return}if(O.detail?.flagged){let P=Q.querySelector("[data-form-moderation-message]");if(P)P.textContent=A,P.hidden=!1;else{let w=document.createElement("div");w.setAttribute("data-form-moderation-message",""),w.className="form-moderation-message",w.textContent=A,Q.prepend(w)}J.hidden=!0;return}if(K)K.textContent=A,K.hidden=!1};Q.addEventListener("form:error",N),window.addEventListener(XH,V);let C=(D)=>{let O=D;if(!O.detail||O.detail.key!==X||O.detail.sourceForm===J)return;R(O.detail.isSubmitted)};return window.addEventListener(jH,C),J.addEventListener("input",F),J.addEventListener("change",F),J.addEventListener("submit",Y,{capture:!0}),()=>{B(),Q.removeEventListener("form:error",N),window.removeEventListener(XH,V),window.removeEventListener(jH,C),J.removeEventListener("input",F),J.removeEventListener("change",F),J.removeEventListener("submit",Y,{capture:!0})}}var MH={};r(MH,{default:()=>hK});var oW="form",sW=5000,yK="form-draft",LH="form:draft-sync",IH="form:submitted-sync",lW=(Q,$,J,H)=>{let Z=H.draftStorageKey||H.storageKey||J.id||window.location.pathname;return`${yK}:${Q}:${Z}`},iW=(Q,$,J)=>{let H=J.submittedStorageKey||J.storageKey||$.id||window.location.pathname;return`${yK}:${Q}:${H}:submitted`},bK=(Q)=>{let $={},J=Array.from(Q.querySelectorAll("[name]")),H=new Map;return J.forEach((Z)=>{if(Z instanceof HTMLInputElement&&Z.type==="checkbox"&&!Z.disabled)H.set(Z.name,(H.get(Z.name)??0)+1)}),J.forEach((Z)=>{if(!Z.name||Z.disabled)return;if(Z instanceof HTMLInputElement&&(Z.type==="file"||Z.type==="password"))return;if(Z instanceof HTMLInputElement&&Z.type==="radio"){if(Z.checked)$[Z.name]=Z.value;return}if(Z instanceof HTMLInputElement&&Z.type==="checkbox"){if((H.get(Z.name)??0)>1){let K=Array.isArray($[Z.name])?$[Z.name]:[];if(Z.checked)K.push(Z.value);$[Z.name]=K}else $[Z.name]=Z.checked;return}if(Z instanceof HTMLSelectElement&&Z.multiple){$[Z.name]=Array.from(Z.selectedOptions).map((q)=>q.value);return}$[Z.name]=Z.value}),$},nW=(Q)=>{return Object.values(Q).some(($)=>{if(Array.isArray($))return $.length>0;if(typeof $==="boolean")return $;return $.trim().length>0})},TK=(Q,$)=>{Array.from(Q.querySelectorAll("[name]")).forEach((H)=>{let Z=$[H.name];if(typeof Z==="undefined")return;if(H instanceof HTMLInputElement&&H.type==="radio"){H.checked=String(Z)===H.value;return}if(H instanceof HTMLInputElement&&H.type==="checkbox"){if(Array.isArray(Z))H.checked=Z.includes(H.value);else if(typeof Z==="boolean")H.checked=Z;else H.checked=Z===H.value;return}if(H instanceof HTMLSelectElement&&H.multiple){let q=Array.isArray(Z)?Z:[String(Z)];Array.from(H.options).forEach((K)=>{K.selected=q.includes(K.value)});return}H.value=Array.isArray(Z)?Z[0]??"":String(Z)})};function hK(Q,$){let J=Q.querySelector("form");if(!J)return;let H=Q.querySelector("[data-form]"),Z=Q.querySelector("[data-success]"),q=Q.querySelector("[data-failure]"),K=($.action??$.api??oW).replace(/^\/api\/?/,""),G=s7(K),U=lW(K,J,Q,$),W=iW(K,Q,$);J.action=G,J.method="post";let X=null,j=()=>{if(X!=null)clearTimeout(X),X=null},L=()=>{try{return localStorage.getItem(W)==="1"}catch{return!1}},B=()=>{if(j(),q)q.style.display="none";if(L())return;if(H)H.hidden=!1,H.style.display="";else J.hidden=!1;let N=Q.querySelector("[data-form-moderation-message]");if(N)N.hidden=!0,N.textContent=""},M=(N)=>{if(j(),Z)Z.style.display="none";if(H)H.hidden=!0,H.style.display="none";else J.hidden=!0;if(q){q.style.display="flex";let C=q.querySelector("[data-failure-message]");if(C&&N)C.textContent=N}X=window.setTimeout(()=>{X=null,B()},sW)},I=(N)=>{if(N){if(j(),q)q.style.display="none"}if(H)H.hidden=N,H.style.display=N?"none":"";else J.hidden=N;if(Z)Z.style.display=N?"flex":"none"};try{let N=localStorage.getItem(W)==="1";I(N)}catch(N){console.warn("[form] failed to restore submitted state",N)}let z=()=>{try{let N=bK(J);if(h$(N),nW(N))localStorage.setItem(U,JSON.stringify(N));else localStorage.removeItem(U);window.dispatchEvent(new CustomEvent(LH,{detail:{key:U,data:N,sourceForm:J}}))}catch(N){console.warn("[form] failed to save draft",N)}},R=(N)=>{let C=N;if(!C.detail||C.detail.key!==U||C.detail.sourceForm===J)return;TK(J,C.detail.data)};try{let N=localStorage.getItem(U);if(N){let C=JSON.parse(N);TK(J,C),h$(C)}}catch(N){console.warn("[form] failed to restore draft",N)}if(l7(),i7(J),q)q.style.display="none";let F=async(N)=>{N.preventDefault(),N.stopPropagation(),N.stopImmediatePropagation(),B();let C=N.currentTarget,D=C.querySelector("[type='submit']"),O=D?.textContent??"";if(D){if(D.disabled=!0,D.dataset.loading)D.textContent=D.dataset.loading}try{let A=new FormData(C),P=C.enctype==="multipart/form-data",w;if(P)w=A;else{let y=new URLSearchParams;A.forEach((b,m)=>{y.append(m,b instanceof File?b.name:String(b))}),w=y.toString()}let x=P?{}:{"Content-Type":"application/x-www-form-urlencoded"};console.log("[form] submitting to api",{actionUrl:G,isMultipart:P});let S=await fetch(G,{method:"POST",headers:x,body:P?A:w}),T=await S.json().catch(()=>({}));if(console.log("[form] response received",{ok:S.ok,status:S.status,json:T}),!S.ok){let y=(T&&typeof T.error==="string"?T.error:null)??`Request failed: ${S.status}`,b=S.status===400;J.dispatchEvent(new CustomEvent("form:error",{bubbles:!0,detail:{message:y,flagged:b}}));return}let h=T?.debug?.persistDraftAfterSubmit===!0;if(h$(bK(C)),h)console.log("[form] DEBUG: draft persisted after submit",{draftKey:U});else localStorage.removeItem(U),console.log("[form] draft cleared after submit");if(localStorage.setItem(W,"1"),I(!0),window.dispatchEvent(new CustomEvent(IH,{detail:{key:W,isSubmitted:!0,sourceForm:J}})),$.successRedirect){window.location.href=$.successRedirect;return}J.dispatchEvent(new CustomEvent("form:success",{bubbles:!0,detail:T})),console.log("[form] success event dispatched")}catch(A){console.error("[form] submit failed",{actionUrl:G,err:A}),J.dispatchEvent(new CustomEvent("form:error",{bubbles:!0,detail:{message:A instanceof Error?A.message:"Submit failed",flagged:!1}}))}finally{if(D)D.disabled=!1,D.textContent=O}},V=(N)=>{let C=N,D=C.detail?.message??(C.detail?.flagged?"Your message was not accepted.":"Something went wrong. Please try again.");if(q){M(D);return}if(!C.detail?.flagged)return;let O=Q.querySelector("[data-form-moderation-message]");if(O)O.textContent=D,O.hidden=!1;else{let A=document.createElement("div");A.setAttribute("data-form-moderation-message",""),A.className="form-moderation-message",A.textContent=D,Q.prepend(A)}J.hidden=!0};Q.addEventListener("form:error",V),window.addEventListener(LH,R);let Y=(N)=>{let C=N;if(!C.detail||C.detail.key!==W||C.detail.sourceForm===J)return;I(C.detail.isSubmitted)};return window.addEventListener(IH,Y),J.addEventListener("input",z),J.addEventListener("change",z),J.addEventListener("submit",F,{capture:!0}),()=>{j(),Q.removeEventListener("form:error",V),window.removeEventListener(LH,R),window.removeEventListener(IH,Y),J.removeEventListener("input",z),J.removeEventListener("change",z),J.removeEventListener("submit",F,{capture:!0})}}var zH={};r(zH,{default:()=>fK});var rW="[data-remaining-spots]",l8=/^\d+$/;function aW(Q){let $=Number.isInteger(Q)?Q:Math.max(0,Math.floor(Q));return`${$} ${$===1?"Spot":"Spots"} Left`}function tW(Q){if(typeof Q==="number"&&Number.isFinite(Q))return Q;if(typeof Q==="string"){let Z=Q.trim();if(l8.test(Z))return parseInt(Z,10);return null}if(!Q||typeof Q!=="object")return null;let $=Q,J=$.remainingSpots??$.remaining??$.spots??$.count??$.available;if(typeof J==="number"&&Number.isFinite(J))return J;if(typeof J==="string"){let Z=J.trim();if(l8.test(Z))return parseInt(Z,10)}let H=$.message??$.text??$.label??$.remainingLabel??$.remainingText;if(typeof H==="string"){let Z=H.trim();if(l8.test(Z))return parseInt(Z,10)}return null}function eW(Q){if(typeof Q==="string"){let H=Q.trim();if(H&&!l8.test(H))return H;return null}if(!Q||typeof Q!=="object")return null;let $=Q,J=$.message??$.text??$.label??$.remainingLabel??$.remainingText;if(typeof J==="string"&&J.trim()&&!l8.test(J.trim()))return J.trim();return null}function $4(Q,$){if($ instanceof Error&&$.name==="AbortError")return;let J=$ instanceof Error?$.name:typeof $,H=$ instanceof Error?$.message:String($),Z=["[founders-spots] Fetch failed",` url: ${Q}`,` page: ${typeof window!=="undefined"?window.location.href:"(ssr)"}`,` error: ${J}: ${H}`];if(H==="Failed to fetch"||J==="TypeError")Z.push(" likely: CORS (API must send Access-Control-Allow-Origin for this origin), mixed content (https page cannot call http API), DNS/adblock, or offline.");console.warn(Z.join(`
`),$)}function fK(Q,$){let{url:J}=$,H=GH(J);if(!H.isValid){console.warn("[founders-spots] Invalid data-url:",J,H.error);return}let Z=H.normalizedUrl,q=Q.querySelector(rW)??Q,K=new AbortController;return(async()=>{try{let G=await fetch(Z,{signal:K.signal,headers:{Accept:"application/json"}});if(!G.ok){let j="";try{let L=await G.clone().text();j=L.length>280?`${L.slice(0,280)}`:L}catch{}console.warn(["[founders-spots] Non-OK response",` url: ${Z}`,` status: ${G.status} ${G.statusText}`,j?` body: ${j}`:""].filter(Boolean).join(`
`));return}let U;try{U=await G.json()}catch(j){console.warn(["[founders-spots] Response was not valid JSON",` url: ${Z}`,` content-type: ${G.headers.get("content-type")??"(none)"}`,j instanceof Error?` parse: ${j.name}: ${j.message}`:` parse: ${String(j)}`].join(`
`));return}let W=tW(U);if(W!==null){q.textContent=aW(W);return}let X=eW(U);if(X!==null)q.textContent=X}catch(G){$4(Z,G)}})(),()=>K.abort()}var NH={};r(NH,{default:()=>n7});var YH={};r(YH,{default:()=>n7});function n7(Q,$){let J=ZK(Q,{uni:{value1:1},shaders:{fragment:`
@fragment
fn fsMain(in: VertexOut) -> @location(0) vec4f {
let t = clamp(uUni.values0.x, 0.0, 1.0);
let uvColor = vec3f(in.uv, 0.0);
let color = mix(uvColor, vec3f(0.0), t);
return vec4f(color, 1.0);
}
`}}),H=J.getUni(),Z=n.to(H,{value1:0,duration:1.2,ease:"sine.inOut",yoyo:!0,repeat:-1});return()=>{Z.kill(),J.destroy()}}var FH={};r(FH,{default:()=>r7});var DH={};r(DH,{default:()=>r7});var Q4=1,J4=0.6;var H4=0.15;function r7(Q,$){let J=Number($.width)||Q4,H=Number($.height)||J4,Z=$.depth!=null?Number($.depth):void 0,q=Number($.rounding)??H4,K=J8(Q,{shape:{type:"roundedBox",width:J,height:H,depth:Z,rounding:q},onFrame:(G,U)=>{let W=G.getTransform();return G.setTransform({rotationY:W.rotationY+U.delta*0.001,rotationX:W.rotationX+U.delta*0.0006}),G}});return()=>{K.destroy()}}var RH={};r(RH,{default:()=>a7});var VH={};r(VH,{default:()=>a7});function a7(Q,$){let J=J8(Q,{shape:"cube",uni:{value1:1,value2:0},onFrame:(H,Z)=>{let q=H.getTransform();return H.setTransform({rotationY:q.rotationY+Z.delta*0.001,rotationX:q.rotationX+Z.delta*0.0006}),H}});return()=>{J.destroy()}}var OH={};r(OH,{default:()=>e7,WEBGL_DARK_BACKGROUND:()=>t7,GPU_DARK_BACKGROUND:()=>CH});var EH={};r(EH,{default:()=>e7,WEBGL_DARK_BACKGROUND:()=>t7,GPU_DARK_BACKGROUND:()=>CH});var t7="rgb(3, 2, 5)",CH=t7,p={scene:{subdivs:1,mouseEasing:0.12,icon:{placement:{centerX:0,centerY:0,scale:1},scrollVelocityToYOffset:0.000055,scrollVelocityToXRotation:-0.012,scrollVelocityToYRotation:-0.0015,scrollFlipVelocityThreshold:70,scrollFlipDuration:0.85,scrollYOffsetDamping:0.9,scrollBounceBack:0.04,scrollYOffsetEase:0.14,idleFloatYOffsetAmplitude:0.04,idleFloatYOffsetSpeed:0.9,idleFloatRotationAmplitude:0.082,idleFloatRotationSpeed:0.9,log:!0},background:{xWaveFreq:6.28,yWaveFreq:9.42,diagonalFreq:4,timeFreq:0.5,xWaveAmp:0.025,yWaveAmp:0.02,diagonalAmp:0.015,darkGray:[0.08,0.08,0.09],lightGradientA:[0.39,0.41,0.46],lightGradientB:[0.72,0.74,0.79],lightMotionFreqX:3.8,lightMotionFreqY:2.2,lightMotionTimeFreq:0.42,lightMotionAmp:0.09}},ascii:{flipSceneTextureY:!1,cellSizePx:10,trailThreshold:0.14,rgbShiftPx:10.2,trailBoost:1.45,sampledGain:0.18,sampledLift:0.015,shiftedGain:1.45,shiftedLift:0.08}};var _K=`
float flipEase(float amount) {
return amount * amount * (3.0 - 2.0 * amount);
}
void computeFlipWipe(
vec2 uv,
float flipRaw,
out float wipeY,
out float lightMix,
out float transitionAmount
) {
float flip = flipEase(flipRaw);
float xFromCenter = (uv.x - 0.5) * 2.0;
const float soft = 0.035;
// Light above the wipe line. Flip 0→1 fills top→bottom; 1→0 returns dark from bottom.
transitionAmount = flip;
wipeY = -0.14 + flip * 1.22;
wipeY += (1.0 - xFromCenter * xFromCenter) * mix(0.09, 0.002, flip);
lightMix = 1.0 - smoothstep(wipeY - soft, wipeY + soft, uv.y);
}
`;function Z4(Q,$){let J=$K();return J.addFragmentEffect({id:"background-flip-wipe",uni:{value1:$()},fragmentShader:`
${_K}
vec4 applyEffect(vec4 color, vec2 uv, vec2 _resolution, vec4 uni[4]) {
float t = uTime;
float flipRaw = clamp(uni[0].x, 0.0, 1.0);
// Alpha=0 marks background, alpha=1 marks model (set in the screen shader).
float backgroundMask = 1.0 - color.a;
float foregroundMask = color.a;
float grad = clamp(1.0 - uv.y, 0.0, 1.0);
float lightMotion = 0.5 + 0.5 * sin(
uv.x * ${p.scene.background.lightMotionFreqX.toFixed(2)} +
uv.y * ${p.scene.background.lightMotionFreqY.toFixed(2)} +
t * ${p.scene.background.lightMotionTimeFreq.toFixed(2)}
);
float animatedGrad = clamp(
grad + (lightMotion - 0.5) * ${p.scene.background.lightMotionAmp.toFixed(2)},
0.0,
1.0
);
vec3 lightGradientA = vec3(
${p.scene.background.lightGradientA[0].toFixed(2)},
${p.scene.background.lightGradientA[1].toFixed(2)},
${p.scene.background.lightGradientA[2].toFixed(2)}
);
vec3 lightGradientB = vec3(
${p.scene.background.lightGradientB[0].toFixed(2)},
${p.scene.background.lightGradientB[1].toFixed(2)},
${p.scene.background.lightGradientB[2].toFixed(2)}
);
vec3 lightCol = mix(lightGradientA, lightGradientB, 1.0 - animatedGrad) * 0.92;
float wipeY;
float lightMix;
float transitionAmount;
computeFlipWipe(uv, flipRaw, wipeY, lightMix, transitionAmount);
vec3 bgResult = mix(color.rgb, lightCol, lightMix);
vec3 fgResult = color.rgb + color.rgb * lightMix * 0.35;
vec3 outRgb = mix(fgResult, bgResult, backgroundMask);
float band = 1.0 - smoothstep(0.0, 0.022, abs(uv.y - wipeY));
float transitionStrength =
(1.0 - abs(transitionAmount * 2.0 - 1.0)) *
smoothstep(0.06, 0.14, transitionAmount) *
(1.0 - smoothstep(0.86, 0.96, transitionAmount));
vec3 bandTint = vec3(0.18, 0.55, 1.0) * band * 0.16;
outRgb = clamp(outRgb + bandTint * transitionStrength * backgroundMask, 0.0, 1.0);
// Dither to hide banding in the light gradient.
vec2 ditherUv = uv * _resolution + vec2(t * 60.0, t * 37.0);
float ditherNoise = fract(sin(dot(ditherUv, vec2(12.9898, 78.233))) * 43758.5453);
float dither = (ditherNoise - 0.5) / 255.0;
outRgb = clamp(outRgb + vec3(dither) * backgroundMask, 0.0, 1.0);
// Restore alpha to 1.0 for final canvas output.
return vec4(outRgb, 1.0);
}
`}),J.addFragmentEffect({id:"ascii-trail-mix",uni:{value1:$()},textureUniforms:{uTrail:()=>Q.getTextureHandle()},fragmentShader:`
${_K}
float glyphStroke(float dist, float radius, float edge) {
return 1.0 - smoothstep(radius, radius + edge, dist);
}
float glyphDot(vec2 p, vec2 center, float radius) {
return glyphStroke(length(p - center), radius, 0.03);
}
float glyphLine(vec2 p, vec2 a, vec2 b, float thickness) {
vec2 pa = p - a;
vec2 ba = b - a;
float h = clamp(dot(pa, ba) / dot(ba, ba), 0.0, 1.0);
float d = length(pa - ba * h);
return glyphStroke(d, thickness, 0.02);
}
float glyph(vec2 cellUv, float level) {
vec2 p = cellUv;
float c = 0.0;
if (level < 0.5) {
return 0.0; // " "
} else if (level < 1.5) {
c = glyphDot(p, vec2(0.5, 0.5), 0.08); // "."
} else if (level < 2.5) {
c = max(glyphDot(p, vec2(0.5, 0.33), 0.08), glyphDot(p, vec2(0.5, 0.68), 0.08)); // ":"
} else if (level < 3.5) {
c = max(glyphLine(p, vec2(0.18, 0.5), vec2(0.82, 0.5), 0.05), glyphLine(p, vec2(0.5, 0.18), vec2(0.5, 0.82), 0.05)); // "+"
} else if (level < 4.5) {
c = max(
glyphLine(p, vec2(0.2, 0.2), vec2(0.8, 0.8), 0.05),
glyphLine(p, vec2(0.8, 0.2), vec2(0.2, 0.8), 0.05)
); // "x"
} else if (level < 5.5) {
float ring = abs(length(p - vec2(0.5)) - 0.24);
c = glyphStroke(ring, 0.06, 0.02); // "o"
} else if (level < 6.5) {
c = max(
max(glyphLine(p, vec2(0.2, 0.32), vec2(0.8, 0.32), 0.045), glyphLine(p, vec2(0.2, 0.68), vec2(0.8, 0.68), 0.045)),
max(glyphLine(p, vec2(0.32, 0.2), vec2(0.32, 0.8), 0.045), glyphLine(p, vec2(0.68, 0.2), vec2(0.68, 0.8), 0.045))
); // "#"
} else if (level < 7.5) {
float ringTop = abs(length(p - vec2(0.5, 0.37)) - 0.16);
float ringBottom = abs(length(p - vec2(0.5, 0.65)) - 0.16);
c = max(glyphStroke(ringTop, 0.05, 0.02), glyphStroke(ringBottom, 0.05, 0.02)); // "8"
} else {
float ring = abs(length(p - vec2(0.5)) - 0.24);
float core = glyphDot(p, vec2(0.52, 0.48), 0.09);
float tail = glyphLine(p, vec2(0.55, 0.55), vec2(0.82, 0.76), 0.045);
c = max(max(glyphStroke(ring, 0.06, 0.02), core), tail); // "@"
}
return clamp(c, 0.0, 1.0);
}
vec4 applyEffect(vec4 color, vec2 uv, vec2 resolution, vec4 uni[4]) {
vec2 sourceUv = uv;
float cellSizePx = ${p.ascii.cellSizePx.toFixed(1)};
vec2 grid = floor((sourceUv * resolution) / cellSizePx);
vec2 cellUv = fract((sourceUv * resolution) / cellSizePx);
vec2 sampleUv = ((grid + 0.5) * cellSizePx) / resolution;
vec2 textureSampleUv = vec2(
sampleUv.x,
${p.ascii.flipSceneTextureY?"1.0 - sampleUv.y":"sampleUv.y"}
);
vec3 sampled = texture(uTexture, textureSampleUv).rgb;
vec2 shift = vec2(${p.ascii.rgbShiftPx.toFixed(2)} / resolution.x, 0.0);
vec3 shiftedSampled = vec3(
texture(uTexture, textureSampleUv + shift).r,
texture(uTexture, textureSampleUv).g,
texture(uTexture, textureSampleUv - shift).b
);
// Quantize trail mask at ASCII cell resolution (not per-pixel).
// Trail texture has y=1 at top (same as sourceUv/sampleUv after scene flip).
vec2 trailSampleUv = vec2(sampleUv.x, 1.0 - sampleUv.y);
float trail = texture(uTrail, trailSampleUv).r;
float trailForGlyph = clamp(pow(trail, 0.9), 0.0, 1.0);
float level = floor(trailForGlyph * 8.0 + 0.5);
float charMask = glyph(cellUv, level);
// Use the exact same wipe math as the flip effect to know which region this pixel is in.
float flipRaw = clamp(uni[0].x, 0.0, 1.0);
float wipeY;
float lightMix;
float transitionAmount;
computeFlipWipe(uv, flipRaw, wipeY, lightMix, transitionAmount);
float lightness = lightMix;
vec3 bgDark = sampled * ${p.ascii.sampledGain.toFixed(2)} + vec3(${p.ascii.sampledLift.toFixed(3)});
vec3 fgDark = clamp(shiftedSampled * ${p.ascii.shiftedGain.toFixed(2)} + vec3(${p.ascii.shiftedLift.toFixed(2)}), 0.0, 1.0);
vec3 bgLight = clamp(sampled * 1.06 + vec3(0.015), 0.0, 1.0);
float shiftedLuma = dot(shiftedSampled, vec3(0.2126, 0.7152, 0.0722));
vec3 shiftedChroma = shiftedSampled - vec3(shiftedLuma);
vec3 fgLight = clamp(vec3(0.07) + shiftedChroma * 2.6, 0.0, 1.0);
vec3 bg = mix(bgDark, bgLight, lightness);
vec3 fg = mix(fgDark, fgLight, lightness);
vec3 asciiRgb = mix(bg, fg, charMask);
float asciiMask = step(${p.ascii.trailThreshold.toFixed(2)}, trail);
vec3 mixed = mix(color.rgb, asciiRgb, asciiMask);
return vec4(mixed, color.a);
}
`}),J.addNoiseEffect({amount:0.03,enabled:!0}),J}function e7(Q,$){let J=typeof window!=="undefined"?window.location.pathname:"";if(!(Q instanceof HTMLCanvasElement)){console.warn('"webgl" module expects a <canvas> element.');return}let H=new gJ(Q,{screen:{subdivs:p.scene.subdivs,shaders:{fragment:`
@fragment
fn fsMain(in: VertexOut) -> @location(0) vec4f {
let uv = in.uv;
let t = uUni.values0.w;
// Slight distortion so the gradient isn't a straight line
let distort =
sin(uv.x * ${p.scene.background.xWaveFreq.toFixed(2)}) * ${p.scene.background.xWaveAmp.toFixed(3)} +
sin(uv.y * ${p.scene.background.yWaveFreq.toFixed(2)}) * ${p.scene.background.yWaveAmp.toFixed(3)} +
sin((uv.x + uv.y) * ${p.scene.background.diagonalFreq.toFixed(1)} + t * ${p.scene.background.timeFreq.toFixed(1)}) * ${p.scene.background.diagonalAmp.toFixed(3)};
let grad = clamp(1.0 - uv.y + distort, 0.0, 1.0);
let black = vec3f(0.0, 0.0, 0.0);
let darkGray = vec3f(
${p.scene.background.darkGray[0].toFixed(2)},
${p.scene.background.darkGray[1].toFixed(2)},
${p.scene.background.darkGray[2].toFixed(2)}
);
let darkCol = mix(black, darkGray, grad);
// Alpha=0 marks background pixels so the post wipe can distinguish them from the model.
return vec4f(darkCol, 0.0);
}
`}},onInitError:(j)=>{console.warn("Failed to initialize mini WebGL runtime:",j)}}),Z=C9({easing:p.scene.mouseEasing}),q=iJ({element:Q,eventElement:window}),K=Z4(q,s8),G=S$.add(()=>{let j=s8();K.setEffectUni("background-flip-wipe",{value1:j}),K.setEffectUni("ascii-trail-mix",{value1:j})}),U=0,W=S0.add((j)=>{if(typeof j?.velocity==="number"){U=j.velocity;return}U=0}),X=nJ(H,{placement:p.scene.icon.placement,mouse:Z,getScale:rJ,getBackgroundFlipProgress:s8,getScrollVelocity:()=>U,scrollVelocityToYOffset:p.scene.icon.scrollVelocityToYOffset,scrollVelocityToXRotation:p.scene.icon.scrollVelocityToXRotation,scrollVelocityToYRotation:p.scene.icon.scrollVelocityToYRotation,scrollFlipVelocityThreshold:p.scene.icon.scrollFlipVelocityThreshold,scrollFlipDuration:p.scene.icon.scrollFlipDuration,scrollYOffsetDamping:p.scene.icon.scrollYOffsetDamping,scrollYOffsetRecenter:p.scene.icon.scrollBounceBack,scrollYOffsetEase:p.scene.icon.scrollYOffsetEase,idleFloatYOffsetAmplitude:p.scene.icon.idleFloatYOffsetAmplitude,idleFloatYOffsetSpeed:p.scene.icon.idleFloatYOffsetSpeed,idleFloatRotationAmplitude:p.scene.icon.idleFloatRotationAmplitude,idleFloatRotationSpeed:p.scene.icon.idleFloatRotationSpeed,log:p.scene.icon.log});return()=>{X(),G(),W(),K.destroy(),q.destroy(),Z.destroy(),H.destroy()}}var AH={};r(AH,{default:()=>dK});var vK="h1, h2, h3, h4",uK={opacity:0,xPercent:20,yPercent:20},q4="blur(6px)",mK={opacity:0,yPercent:12},E9={stagger:0.2,delay:0.1,paragraphDelay:0.05,paragraphWordStagger:0.04,groupStagger:0.18};function $Q(Q){return Q.filter(($)=>!!$&&$.isConnected)}function O9(Q,$){let J=$Q(Q);if(!J.length)return;n.set(J,$)}function K4(Q,$){let J=$Q(Q);if(!J.length)return;n.to(J,$)}function G4(Q){let $=$Q(Q);if(!$.length)return;n.killTweensOf($)}function U4(Q){let $=Q.parentElement,J=document.createElement("div");J.style.position="relative",J.style.display=Q.style.display||"block",$.insertBefore(J,Q),J.appendChild(Q),Q.style.opacity="0";let H=Q.cloneNode(!0);return H.setAttribute("aria-hidden","true"),H.style.opacity="1",H.style.position="absolute",H.style.top="0",H.style.left="0",H.style.width="100%",H.style.height="100%",H.style.pointerEvents="none",H.style.overflow="visible",H.style.zIndex="1",J.appendChild(H),new L$(H,{type:"words"}).words}function dK(Q,$){let J=$.group,H=J?Array.from(document.querySelectorAll(`[data-module="hg"][data-group="${CSS.escape(J)}"]`)).indexOf(Q):0,Z=Q.querySelector(`:scope > ${vK}`),q=Array.from(Q.querySelectorAll(`:scope > p, :scope > div:not(:has(${vK})):not(:has(a, button, [data-module="btn"]))`)).filter((X)=>!X.closest("a, button, [data-module='btn']")),K=Z?Array.from(Z.querySelectorAll("span")):[],G=K.length>0?K:Z?[Z]:[],U=[];if(q.length)U=q.flatMap(U4),O9(U,mK);if(!(G.length>0||U.length>0))return;O9(G,uK),O9([Q],{opacity:1}),l1(Q,{autoStart:!0,once:!1,callback:({isIn:X,direction:j})=>{if(X){if(Zq){O9([Q],{opacity:1}),O9(q,{opacity:1});return}let L=j===-1,B=J==="hero"&&!Q._hgAnimated,M=H*(B?E9.groupStagger*3:E9.groupStagger),I=E9.delay+M,z=E9.delay+E9.paragraphDelay+M;if(G.length){let R=$Q(G);if(R.length)n.fromTo(R,{filter:q4},{opacity:1,filter:"blur(0px)",xPercent:0,yPercent:0,stagger:{each:E9.stagger,from:L?"end":"start"},delay:I,onComplete:()=>{n.set(R,{clearProps:"filter"})}})}if(U.length)K4(U,{opacity:1,yPercent:0,stagger:{each:E9.paragraphWordStagger,from:L?"end":"start"},delay:z,ease:"expo.out"});if(B)Q._hgAnimated=!0}else G4([...G,...U]),O9(G,{...uK,clearProps:"filter"}),O9(U,mK)}})}var PH={};r(PH,{default:()=>oK});var gK="[data-ho-sticky]",W4="[data-ho-track]",X4=".ho-c",cK=0;function pK(Q,$){if(Q==null||Q==="")return $;let J=parseFloat(Q);if(!Number.isFinite(J))return $;return M$(0,0.45,J)}function j4(Q){let $=cK,J=cK,H=Q.hoBuffer?.split(",").map((Z)=>parseFloat(Z.trim()));if(H&&H.length>=2&&Number.isFinite(H[0])&&Number.isFinite(H[1]))$=M$(0,0.45,H[0]),J=M$(0,0.45,H[1]);if($=pK(Q.hoBufferStart,$),J=pK(Q.hoBufferEnd,J),$+J>=1){let Z=0.98/($+J);return{start:$*Z,end:J*Z}}return{start:$,end:J}}function B4(Q){if(Q.matches(gK))return Q;return Q.querySelector(gK)??Q.firstElementChild}function oK(Q,$){let J=j4($),H=B4(Q),Z=H?.querySelector(W4)??H?.firstElementChild;if(!H){console.warn("[ho-scroll] No sticky wrapper: put [data-ho-sticky] on the module root or add a first element child as the sticky container.");return}if(!Z){console.warn("[ho-scroll] No track: add [data-ho-track] inside the sticky wrapper, or make the wide row its first element child.");return}let q=0,K=1,G=[],U=null,W=parseFloat($.hoCThreshold??""),X=Number.isFinite(W)?M$(0.01,1,W):0.15,j=()=>{U?.disconnect(),U=null;for(let z of G)z.style.opacity="";if(G=Array.from(Z.querySelectorAll(X4)),G.length===0)return;for(let z of G)z.style.opacity="0";U=new IntersectionObserver((z)=>{for(let R of z){let F=R.target;F.style.opacity=R.isIntersecting?"1":"0"}},{root:H,threshold:X});for(let z of G)U.observe(z)},L=()=>{let z=Q.getBoundingClientRect().top+S0.scroll,R=S0.scroll-z,F=0;if(q>0){let V=J.start*K,Y=J.end*K,N=Math.max(0.000001,K-V-Y);F=M$(0,1,(R-V)/N)}if(q<=0){Z.style.transform="";return}Z.style.transform=`translate3d(${-F*q}px, 0, 0)`},B=()=>{q=Math.max(0,Z.scrollWidth-window.innerWidth);let z=H.offsetHeight;if(Q.style.minHeight=`${z+q}px`,K=Math.max(0.000001,Q.offsetHeight-H.offsetHeight),q>0&&K<q-0.5){let R=q-K;Q.style.minHeight=`${Q.offsetHeight+R}px`,K=Math.max(0.000001,Q.offsetHeight-H.offsetHeight)}j(),L()},M=S0.add(L),I=k1.add(B);return B(),()=>{M(),I(),U?.disconnect(),Q.style.minHeight="",Z.style.transform="";for(let z of G)z.style.opacity=""}}var kH={};r(kH,{default:()=>sK});function sK(Q,$){let J=Q.children[0].children[0],H=new L$(J,{type:"chars"}).chars,Z=0.018;H.forEach((q,K)=>{let G=q;G.style.transitionDelay=`${K*0.018}s`})}var xH={};r(xH,{default:()=>lK});var L4=0.12,I4=0.21;function lK(Q,$){let J=Q.querySelectorAll("a"),H=$.group,Z=H?Array.from(document.querySelectorAll(`[data-module="list"][data-group="${CSS.escape(H)}"]`)).indexOf(Q)*I4:0;n.set(J,{opacity:0,yPercent:100}),l1(Q,{autoStart:!0,callback:({isIn:q})=>{if(q)n.to(J,{opacity:1,yPercent:0,stagger:L4,delay:Z});else n.killTweensOf(J),n.set(J,{opacity:0,yPercent:100})}})}var wH={};r(wH,{default:()=>aK});var M4=Object.create,{getPrototypeOf:z4,defineProperty:iK,getOwnPropertyNames:Y4}=Object,N4=Object.prototype.hasOwnProperty,D4=(Q,$,J)=>{J=Q!=null?M4(z4(Q)):{};let H=$||!Q||!Q.__esModule?iK(J,"default",{value:Q,enumerable:!0}):J;for(let Z of Y4(Q))if(!N4.call(H,Z))iK(H,Z,{get:()=>Q[Z],enumerable:!0});return H},F4=(Q,$)=>()=>($||Q(($={exports:{}}).exports,$),$.exports),V4=F4((Q,$)=>{(function(J,H){typeof Q=="object"&&typeof $!="undefined"?$.exports=H():typeof define=="function"&&define.amd?define(H):(J||self).virtualScroll=H()})(Q,function(){var J=0;function H(I){return"__private_"+J+++"_"+I}function Z(I,z){if(!Object.prototype.hasOwnProperty.call(I,z))throw new TypeError("attempted to use private field on non-instance");return I}function q(){}q.prototype={on:function(I,z,R){var F=this.e||(this.e={});return(F[I]||(F[I]=[])).push({fn:z,ctx:R}),this},once:function(I,z,R){var F=this;function V(){F.off(I,V),z.apply(R,arguments)}return V._=z,this.on(I,V,R)},emit:function(I){for(var z=[].slice.call(arguments,1),R=((this.e||(this.e={}))[I]||[]).slice(),F=0,V=R.length;F<V;F++)R[F].fn.apply(R[F].ctx,z);return this},off:function(I,z){var R=this.e||(this.e={}),F=R[I],V=[];if(F&&z)for(var Y=0,N=F.length;Y<N;Y++)F[Y].fn!==z&&F[Y].fn._!==z&&V.push(F[Y]);return V.length?R[I]=V:delete R[I],this}};var K=q;K.TinyEmitter=q;var G,U="virtualscroll",W=H("options"),X=H("el"),j=H("emitter"),L=H("event"),B=H("touchStart"),M=H("bodyTouchAction");return function(){function I(R){var F=this;Object.defineProperty(this,W,{writable:!0,value:void 0}),Object.defineProperty(this,X,{writable:!0,value:void 0}),Object.defineProperty(this,j,{writable:!0,value:void 0}),Object.defineProperty(this,L,{writable:!0,value:void 0}),Object.defineProperty(this,B,{writable:!0,value:void 0}),Object.defineProperty(this,M,{writable:!0,value:void 0}),this._onWheel=function(V){var Y=Z(F,W)[W],N=Z(F,L)[L];N.deltaX=V.wheelDeltaX||-1*V.deltaX,N.deltaY=V.wheelDeltaY||-1*V.deltaY,G.isFirefox&&V.deltaMode===1&&(N.deltaX*=Y.firefoxMultiplier,N.deltaY*=Y.firefoxMultiplier),N.deltaX*=Y.mouseMultiplier,N.deltaY*=Y.mouseMultiplier,F._notify(V)},this._onMouseWheel=function(V){var Y=Z(F,L)[L];Y.deltaX=V.wheelDeltaX?V.wheelDeltaX:0,Y.deltaY=V.wheelDeltaY?V.wheelDeltaY:V.wheelDelta,F._notify(V)},this._onTouchStart=function(V){var Y=V.targetTouches?V.targetTouches[0]:V;Z(F,B)[B].x=Y.pageX,Z(F,B)[B].y=Y.pageY},this._onTouchMove=function(V){var Y=Z(F,W)[W];Y.preventTouch&&!V.target.classList.contains(Y.unpreventTouchClass)&&V.preventDefault();var N=Z(F,L)[L],C=V.targetTouches?V.targetTouches[0]:V;N.deltaX=(C.pageX-Z(F,B)[B].x)*Y.touchMultiplier,N.deltaY=(C.pageY-Z(F,B)[B].y)*Y.touchMultiplier,Z(F,B)[B].x=C.pageX,Z(F,B)[B].y=C.pageY,F._notify(V)},this._onKeyDown=function(V){var Y=Z(F,L)[L];Y.deltaX=Y.deltaY=0;var N=window.innerHeight-40;switch(V.keyCode){case 37:case 38:Y.deltaY=Z(F,W)[W].keyStep;break;case 39:case 40:Y.deltaY=-Z(F,W)[W].keyStep;break;case 32:Y.deltaY=N*(V.shiftKey?1:-1);break;default:return}F._notify(V)},Z(this,X)[X]=window,R&&R.el&&(Z(this,X)[X]=R.el,delete R.el),G||(G={hasWheelEvent:"onwheel"in document,hasMouseWheelEvent:"onmousewheel"in document,hasTouch:"ontouchstart"in document,hasTouchWin:navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints>1,hasPointer:!!window.navigator.msPointerEnabled,hasKeyDown:"onkeydown"in document,isFirefox:navigator.userAgent.indexOf("Firefox")>-1}),Z(this,W)[W]=Object.assign({mouseMultiplier:1,touchMultiplier:2,firefoxMultiplier:15,keyStep:120,preventTouch:!1,unpreventTouchClass:"vs-touchmove-allowed",useKeyboard:!0,useTouch:!0},R),Z(this,j)[j]=new K,Z(this,L)[L]={y:0,x:0,deltaX:0,deltaY:0},Z(this,B)[B]={x:null,y:null},Z(this,M)[M]=null,Z(this,W)[W].passive!==void 0&&(this.listenerOptions={passive:Z(this,W)[W].passive})}var z=I.prototype;return z._notify=function(R){var F=Z(this,L)[L];F.x+=F.deltaX,F.y+=F.deltaY,Z(this,j)[j].emit(U,{x:F.x,y:F.y,deltaX:F.deltaX,deltaY:F.deltaY,originalEvent:R})},z._bind=function(){G.hasWheelEvent&&Z(this,X)[X].addEventListener("wheel",this._onWheel,this.listenerOptions),G.hasMouseWheelEvent&&Z(this,X)[X].addEventListener("mousewheel",this._onMouseWheel,this.listenerOptions),G.hasTouch&&Z(this,W)[W].useTouch&&(Z(this,X)[X].addEventListener("touchstart",this._onTouchStart,this.listenerOptions),Z(this,X)[X].addEventListener("touchmove",this._onTouchMove,this.listenerOptions)),G.hasPointer&&G.hasTouchWin&&(Z(this,M)[M]=document.body.style.msTouchAction,document.body.style.msTouchAction="none",Z(this,X)[X].addEventListener("MSPointerDown",this._onTouchStart,!0),Z(this,X)[X].addEventListener("MSPointerMove",this._onTouchMove,!0)),G.hasKeyDown&&Z(this,W)[W].useKeyboard&&document.addEventListener("keydown",this._onKeyDown)},z._unbind=function(){G.hasWheelEvent&&Z(this,X)[X].removeEventListener("wheel",this._onWheel),G.hasMouseWheelEvent&&Z(this,X)[X].removeEventListener("mousewheel",this._onMouseWheel),G.hasTouch&&(Z(this,X)[X].removeEventListener("touchstart",this._onTouchStart),Z(this,X)[X].removeEventListener("touchmove",this._onTouchMove)),G.hasPointer&&G.hasTouchWin&&(document.body.style.msTouchAction=Z(this,M)[M],Z(this,X)[X].removeEventListener("MSPointerDown",this._onTouchStart,!0),Z(this,X)[X].removeEventListener("MSPointerMove",this._onTouchMove,!0)),G.hasKeyDown&&Z(this,W)[W].useKeyboard&&document.removeEventListener("keydown",this._onKeyDown)},z.on=function(R,F){Z(this,j)[j].on(U,R,F);var V=Z(this,j)[j].e;V&&V[U]&&V[U].length===1&&this._bind()},z.off=function(R,F){Z(this,j)[j].off(U,R,F);var V=Z(this,j)[j].e;(!V[U]||V[U].length<=0)&&this._unbind()},z.destroy=function(){Z(this,j)[j].off(),this._unbind()},I}()})}),R4=D4(V4(),1);function nK(Q,$,J,H){let Z=1-Math.exp(-J*H);return Q+($-Q)*Z}function QQ(Q,$){let J=Q%$;if(Math.abs(J)>$/2)J=J>0?J-$:J+$;return J}var C4={infinite:!0,snap:!0,variableWidth:!1,vertical:!1,dragSensitivity:0.005,lerpFactor:0.3,scrollSensitivity:1,snapStrength:0.1,speedDecay:0.85,bounceLimit:1,virtualScroll:{mouseMultiplier:0.5,touchMultiplier:2,firefoxMultiplier:30,useKeyboard:!1,passive:!0},setOffset:({itemWidth:Q,wrapperWidth:$,itemHeight:J,wrapperHeight:H,vertical:Z})=>Z?J:Q,scrollInput:!1};class rK{speed=0;#$=0;#H=0;#Q=0;deltaTime=0;#J=!0;#Z=!1;#q=0;#j=0;config;wrapper;items;viewport;itemWidths=[];itemOffsets=[];itemHeights=[];itemHeightOffsets=[];isDragging=!1;isTouching=!1;dragStart=0;dragStartTarget=0;isVisible=!1;current=0;target=0;maxScroll=0;resizeTimeout;virtualScroll;observer;touchStartY;touchStartX;touchPreviousX;touchPreviousY;scrollDirection;parallaxValues;webglValue=0;onSlideChange;onResize;onUpdate;constructor(Q,$={}){if(this.config={...C4,...$},$.onSlideChange)this.onSlideChange=$.onSlideChange;if($.onResize)this.onResize=$.onResize;if($.onUpdate)this.onUpdate=$.onUpdate;if(delete this.config.onSlideChange,delete this.config.onResize,delete this.config.onUpdate,this.wrapper=Q,this.items=[...Q.children],this.current=0,this.target=0,this.isDragging=!1,this.isTouching=!1,this.dragStart=0,this.dragStartTarget=0,this.isVisible=!1,this.#q=0,this.#j=0,this.#B(),this.#D(),this.#F(),this.wrapper.style.cursor="grab",this.#B(),this.#V(),this.config.variableWidth&&!this.config.infinite&&this.items.length>0){let J=this.#K(0);this.target=J,this.current=J,this.#N()}}#D(){let Q={root:null,rootMargin:"50px",threshold:0};this.observer=new IntersectionObserver(($)=>{$.forEach((J)=>{this.isVisible=J.isIntersecting})},Q),this.observer.observe(this.wrapper)}#B(){let Q=this.items.map((U)=>U.getBoundingClientRect().width),$=this.items.map((U)=>U.getBoundingClientRect().height),J=this.wrapper.clientWidth,H=this.wrapper.clientHeight,Z=Q.reduce((U,W)=>U+W,0),q=$.reduce((U,W)=>U+W,0),K=0;this.itemOffsets=Q.map((U)=>{let W=K;return K+=U,W}),this.itemWidths=Q;let G=0;if(this.itemHeightOffsets=$.map((U)=>{let W=G;return G+=U,W}),this.itemHeights=$,this.viewport={itemWidth:Q[0]??0,wrapperWidth:J,totalWidth:Z,itemHeight:$[0]??0,wrapperHeight:H,totalHeight:q,vertical:this.config.vertical},this.#H=this.config.setOffset(this.viewport),this.config.variableWidth)if(this.config.vertical)this.maxScroll=-(this.viewport.totalHeight-this.#H);else this.maxScroll=-(this.viewport.totalWidth-this.#H);else{let U=this.config.vertical?this.viewport.itemHeight||1:this.viewport.itemWidth||1,W=this.config.vertical?this.viewport.totalHeight:this.viewport.totalWidth;this.maxScroll=-(W-this.#H)/U}queueMicrotask(()=>{this.onResize?.(this)})}#F(){let Q=(G)=>this.#G(G),$=(G)=>this.#U(G),J=()=>this.#W();this.wrapper.addEventListener("mousedown",Q),window.addEventListener("mousemove",$),window.addEventListener("mouseup",J);let H=5,Z=(G)=>{let U=G.touches[0];this.touchStartY=U.clientY,this.touchStartX=U.clientX,this.touchPreviousX=U.clientX,this.touchPreviousY=U.clientY,this.scrollDirection=void 0,this.isTouching=!0,this.#G(U)},q=(G)=>{if(!this.isTouching||this.#Z)return;let U=G.touches[0],W=Math.abs(U.clientY-this.touchStartY),X=Math.abs(U.clientX-this.touchStartX);if(!this.scrollDirection&&(X>H||W>H))this.scrollDirection=X>W?"horizontal":"vertical";if(this.config.vertical?this.scrollDirection==="vertical":this.scrollDirection==="horizontal")if(G.preventDefault(),this.#U(U),this.config.vertical)this.touchPreviousY=U.clientY;else this.touchPreviousX=U.clientX},K=()=>{this.isTouching=!1,this.scrollDirection=void 0,this.touchPreviousX=void 0,this.touchPreviousY=void 0,this.#W()};this.wrapper.addEventListener("touchstart",Z),window.addEventListener("touchmove",q,{passive:!1}),window.addEventListener("touchend",K),new ResizeObserver(()=>{if(this.resizeTimeout)clearTimeout(this.resizeTimeout);this.resizeTimeout=setTimeout(()=>this.resize(),10)}).observe(this.wrapper)}#M(Q){if(!this.config.infinite){let $=this.config.vertical?this.viewport.itemHeight:this.viewport.itemWidth,J=this.config.variableWidth&&$?this.config.bounceLimit*$:this.config.bounceLimit;if(Q>J)return J;else if(Q<this.maxScroll-J)return this.maxScroll-J}return Q}#V(){this.virtualScroll=new R4.default({...this.config.virtualScroll,el:this.wrapper});let Q=5;this.virtualScroll.on(($)=>{if(!this.isDragging&&!this.#Z){if($.touchDevice){let K=Math.abs($.deltaY),G=Math.abs($.deltaX);if(K<Q&&G<Q)return;if(this.config.vertical){if(G>K)return}else if(K>G)return}let J=this.config.vertical?!this.config.scrollInput?$.deltaY:Math.abs($.deltaY)>Math.abs($.deltaX)?$.deltaY:$.deltaX:!this.config.scrollInput?$.deltaX:Math.abs($.deltaX)>Math.abs($.deltaY)?$.deltaX:$.deltaY,H=this.config.variableWidth?this.config.scrollSensitivity:this.config.scrollSensitivity*0.001,Z=J*H,q=this.target+Z;if(!this.config.infinite){if(q>0)q=0;else if(q<this.maxScroll)q=this.maxScroll}this.target=this.#M(q),this.speed=-Z*(this.config.variableWidth?0.1:10)}})}#G(Q){if(this.#Z)return;this.isDragging=!0,this.dragStart=this.config.vertical?Q.clientY:Q.clientX,this.dragStartTarget=this.target,this.wrapper.style.cursor="grabbing"}#U(Q){if(!this.isDragging||this.#Z)return;let $=this.config.vertical?Q.clientY-this.dragStart:Q.clientX-this.dragStart,J=this.config.variableWidth?1:this.config.dragSensitivity,H=this.dragStartTarget+$*J;if(this.target=this.#M(H),"movementX"in Q){let Z=this.config.vertical?Q.movementY:Q.movementX;this.speed+=Z*0.01}else{let Z=this.config.vertical?Q.clientY:Q.clientX,q=this.config.vertical?this.touchPreviousY||Z:this.touchPreviousX||Z,K=Z-q;this.speed+=K*0.01}}#W(){if(this.isDragging=!1,this.wrapper.style.cursor="grab",this.config.variableWidth){if(!this.config.infinite){if(this.target>0)this.target=0;else if(this.target<this.maxScroll)this.target=this.maxScroll}if(this.config.snap)this.target=this.#Y(this.target)}else if(!this.config.infinite){if(this.target>0)this.target=0;else if(this.target<this.maxScroll)this.target=this.maxScroll;else if(this.config.snap){let Q=Math.round(this.target);this.target=Math.min(0,Math.max(this.maxScroll,Q))}}else if(this.config.snap)this.target=Math.round(this.target)}update(){if(!this.isVisible||!this.#J)return;let Q=performance.now();if(this.deltaTime=(Q-this.#Q)/1000,this.#Q=Q,this.config.snap&&!this.isDragging)if(this.config.variableWidth){let $=this.#Y(this.target)-this.target;this.target+=$*this.config.snapStrength}else{let $=Math.round(this.target)-this.target;this.target+=$*this.config.snapStrength}if(this.current=nK(this.current,this.target,1/this.config.lerpFactor,this.deltaTime),this.config.infinite)if(this.config.variableWidth){let $=this.config.vertical?this.viewport.wrapperHeight/2:this.viewport.wrapperWidth/2,J=this.#L(-this.current+$),H=this.#I(J);this.#X(H),this.#E()}else{let $=Math.round(-this.current),J=this.items.length,H=($%J+J)%J;this.#X(H),this.#C()}else if(this.config.variableWidth){let $=this.config.vertical?this.viewport.wrapperHeight/2:this.viewport.wrapperWidth/2,J=this.config.vertical?this.viewport.totalHeight:this.viewport.totalWidth,H=Math.max(0,Math.min(-this.current+$,J));this.#X(this.#I(H)),this.#N()}else this.#X(Math.round(Math.abs(this.current))),this.#R();this.#O(),this.onUpdate?.(this)}#R(){this.parallaxValues=this.items.map((Q,$)=>{let J=this.config.vertical?this.current*this.viewport.itemHeight:this.current*this.viewport.itemWidth,H=this.config.vertical?`translateY(${J}px)`:`translateX(${J}px)`;return Q.style.transform=H,J})}#C(){this.parallaxValues=this.items.map((Q,$)=>{let J=this.current+$,H=QQ(J,this.items.length)-$,Z=this.config.vertical?this.viewport.itemHeight:this.viewport.itemWidth,q=H*Z,K=this.config.vertical?`translateY(${q}px)`:`translateX(${q}px)`;return Q.style.transform=K,QQ(J,this.items.length)})}#z(Q){if(this.config.vertical){let $=this.itemHeights[Q]??this.viewport.itemHeight??0;return(this.itemHeightOffsets[Q]??0)+$/2}else{let $=this.itemWidths[Q]??this.viewport.itemWidth??0;return(this.itemOffsets[Q]??0)+$/2}}#K(Q){let $=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1,J=this.config.vertical?this.viewport.wrapperHeight/2:this.viewport.wrapperWidth/2,H=-(this.#z(Q)-J);if(this.config.infinite){let Z=Math.round((this.target-H)/$);H+=Z*$}else H=Math.min(0,Math.max(this.maxScroll,H));return H}#L(Q){let $=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1;return(Q%$+$)%$}#I(Q){let $=this.config.vertical?this.itemHeightOffsets:this.itemOffsets;if(!$.length)return 0;let J=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1,H=this.config.infinite?this.#L(Q):Math.max(0,Math.min(Q,J)),Z=0,q=Number.POSITIVE_INFINITY;return $.forEach((K,G)=>{let U=this.#z(G),W=Math.abs(H-U);if(W<q)q=W,Z=G}),Z}#Y(Q){if(!(this.config.vertical?this.itemHeightOffsets:this.itemOffsets).length)return Q;let $=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1,J=this.config.vertical?this.viewport.wrapperHeight/2:this.viewport.wrapperWidth/2,H=this.config.infinite?this.#L(-Q+J):Math.max(0,Math.min(-Q+J,$)),Z=this.#I(H);return this.#K(Z)}#N(){this.parallaxValues=this.items.map((Q,$)=>{let J=this.current,H=this.config.vertical?this.itemHeightOffsets:this.itemOffsets,Z=this.config.vertical?`translateY(${J}px)`:`translateX(${J}px)`;return Q.style.transform=Z,J+H[$]})}#E(){let Q=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1;this.parallaxValues=this.items.map(($,J)=>{let H=(this.config.vertical?this.itemHeightOffsets:this.itemOffsets)[J]??0,Z=QQ(this.current+H,Q)-H,q=this.config.vertical?`translateY(${Z}px)`:`translateX(${Z}px)`;return $.style.transform=q,QQ(this.current+H,Q)})}#O(){this.#$=nK(this.#$,this.speed,1/this.config.lerpFactor,this.deltaTime),this.speed*=this.config.speedDecay}goToNext(){if(this.config.variableWidth){let Q=this.config.infinite?(this.currentSlide+1)%this.items.length:Math.min(this.currentSlide+1,this.items.length-1);this.target=this.#K(Q)}else if(!this.config.infinite)this.target=Math.max(this.maxScroll,Math.round(this.target-1));else this.target=Math.round(this.target-1)}goToPrev(){if(this.config.variableWidth){let Q=this.config.infinite?(this.currentSlide-1+this.items.length)%this.items.length:Math.max(this.currentSlide-1,0);this.target=this.#K(Q)}else if(!this.config.infinite)this.target=Math.min(0,Math.round(this.target+1));else this.target=Math.round(this.target+1)}goToIndex(Q){if(this.config.variableWidth){let $=this.config.infinite?(Q%this.items.length+this.items.length)%this.items.length:Math.min(Math.max(Q,0),this.items.length-1);this.target=this.#K($)}else this.target=-Q}set snap(Q){this.config.snap=Q}getProgress(){if(this.config.variableWidth){let $=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1;return(-this.current%$+$)%$/$}let Q=this.items.length;return Math.abs(this.current)%Q/Q}destroy(){if(this.kill(),window.removeEventListener("mousemove",(Q)=>this.#U(Q)),window.removeEventListener("mouseup",()=>this.#W()),window.removeEventListener("touchmove",(Q)=>{let $=Q.touches[0];this.#U($)}),window.removeEventListener("touchend",()=>this.#W()),this.wrapper.removeEventListener("mousedown",(Q)=>this.#G(Q)),this.wrapper.removeEventListener("touchstart",(Q)=>{let $=Q.touches[0];this.#G($)}),this.resizeTimeout)clearTimeout(this.resizeTimeout);if(this.virtualScroll&&this.config.scrollInput)this.virtualScroll.destroy();if(this.observer)this.observer.disconnect()}get currentSlide(){return this.#q}#X(Q){if(this.#q!==Q)this.#j=this.#q,this.#q=Q,this.onSlideChange?.(this.#q,this.#j)}kill(){this.#J=!1,this.items.forEach((Q)=>{Q.style.transform=""}),this.current=0,this.target=0,this.speed=0,this.#$=0,this.touchPreviousX=void 0,this.touchPreviousY=void 0,this.isTouching=!1}init(){this.#J=!0,this.#Q=performance.now()}set paused(Q){this.#Z=Q}get paused(){return this.#Z}get progress(){if(this.config.variableWidth){let Q=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1,$=-this.target;if(this.config.infinite)return($%Q+Q)%Q/Q;else return Math.max(0,Math.min($,Q))/Q}else if(this.config.infinite){let Q=-this.target,$=this.items.length;return(Q%$+$)%$/($-1)}else{let Q=Math.abs(this.current),$=Math.abs(this.maxScroll);return Math.max(0,Math.min(1,Q/$))}}resize(){if(this.#B(),this.config.variableWidth&&!this.config.infinite&&this.items.length>0){let J=this.currentSlide,H=this.#K(J);if(this.target=H,Math.abs(this.current-this.target)<1)this.current=H}let Q=this.#J,$=this.isVisible;this.#J=!0,this.isVisible=!0,this.update(),this.#J=Q,this.isVisible=$}}var JQ=rK;function aK(Q,$){let H=!1,Z=null,q=Q.closest("[data-module='app']"),K=()=>{if(H)return;H=!0;let G=Array.from(Q.children),U="current",W=80,X=(V)=>{setTimeout(()=>{G[V]?.querySelectorAll("[data-unread]").forEach((Y)=>Y.remove())},W)},j=new JQ(Q,{vertical:!0,infinite:!1,snap:!0,dragSensitivity:0.01,onSlideChange:(V,Y)=>{G[Y]?.classList.remove(U),G[V]?.classList.add(U),X(V),y$.CURRENT_MAIL=V}});G[j.currentSlide]?.classList.add(U),X(j.currentSlide),S$.add(()=>{j.update()});let L=8,B=G.length,M=(V,Y)=>-Y+B*Math.round((V+Y)/B),I=[],z=null,R=null,F=()=>{if(z)document.removeEventListener("pointermove",z),z=null;if(R)document.removeEventListener("pointerup",R),R=null};G.forEach((V,Y)=>{let N=0,C=0,D=!1,O=(w)=>{let x=w.clientX-N,S=w.clientY-C;if(Math.abs(x)>L||Math.abs(S)>L)D=!0},A=()=>{if(F(),!D)j.target=M(j.current,Y)},P=(w)=>{N=w.clientX,C=w.clientY,D=!1,z=O,R=A,document.addEventListener("pointermove",O),document.addEventListener("pointerup",A)};V.addEventListener("pointerdown",P),I.push(()=>V.removeEventListener("pointerdown",P))}),Z=()=>{F(),I.forEach((V)=>V()),j.destroy()}};if(!q)K();else if(q.dataset.appOpened==="true")K();else q.addEventListener("app:opened",K,{once:!0});return()=>{q?.removeEventListener("app:opened",K),Z?.()}}var SH={};r(SH,{default:()=>tK});function tK(Q,$){let H=Array.from(Q.children),Z=Q.closest("[data-module='app']"),q=0,K=!1,G=(W)=>{H[q]?.style.setProperty("opacity","0"),q=W,H[W]?.style.setProperty("opacity","1")},U=()=>{if(K)return;K=!0,y$.on("CURRENT_MAIL",G)};if(!Z||Z.dataset.appOpened==="true")U();else Z.addEventListener("app:opened",U,{once:!0});return()=>{if(Z?.removeEventListener("app:opened",U),K)y$.off("CURRENT_MAIL",G)}}var bH={};r(bH,{default:()=>eK});var E4=0.12,O4=-10,A4=10,P4=100;function eK(Q){let $=C9({easing:E4,element:window}),J=Q.style.transform,H=Q.style.willChange,Z=Q.style.backfaceVisibility,q=Q.style.transformStyle;Q.style.willChange="transform",Q.style.backfaceVisibility="hidden",Q.style.transformStyle="preserve-3d";let K=S$.add(()=>{let G=$.update(),U=G.x+G.dragX,X=(G.y+G.dragY)*O4,j=U*A4,L=`perspective(${P4}px) rotateX(${X.toFixed(3)}deg) rotateY(${j.toFixed(3)}deg)`;Q.style.transform=J?`${J} ${L}`:L});return()=>{K(),$.destroy(),Q.style.transform=J,Q.style.willChange=H,Q.style.backfaceVisibility=Z,Q.style.transformStyle=q}}var TH={};r(TH,{default:()=>$6});function $6(Q,$){y$.on("PAGE",(J)=>{console.log("page changed")})}var yH={};r(yH,{default:()=>Q6});function Q6(Q,$){let J=Array.from(Q.children);n.set(Q,{xPercent:150}),n.set(J,{visibility:"visible"}),setTimeout(()=>{n.to(Q,{xPercent:0,duration:0.6,ease:"expo.out"})},3200);let H=(Z)=>{n.killTweensOf(Z),n.to(Z,{xPercent:120,autoAlpha:0,duration:0.1,ease:"expo.out",onComplete:()=>{Z.remove()}})};Q.addEventListener("click",(Z)=>{let q=Z.target;if(!q)return;let K=q.closest("[data-close]");if(!K||!Q.contains(K))return;let G=K.closest('[data-module="notification"]');if(!(G instanceof HTMLElement))return;H(G)})}var fH={};r(fH,{default:()=>J6});var hH="current";function J6(Q,$){let J=Array.from(Q.children),H=new JQ(Q,{infinite:!0,onSlideChange:(Z,q)=>{J[q]?.classList.remove(hH),J[Z]?.classList.add(hH)}});return J[H.currentSlide]?.classList.add(hH),S$.add(()=>{H.update()}),()=>{H.destroy()}}var _H={};r(_H,{default:()=>H6});function k4(Q){Q.setAttribute("aria-hidden","true"),Q.style.position="absolute",Q.style.left="-9999px",Q.style.top="-9999px",Q.style.width="1px"}var x4=(Q)=>{let $=Q.textContent;Q.textContent="";let J=document.createElement("span");J.textContent=$,Q.appendChild(J),k4(J);let H=document.createElement("span");return H.setAttribute("data-css","overflow-clip"),H.textContent=$,H.setAttribute("aria-hidden","true"),Q.appendChild(H),new L$(H,{type:"chars"})};function H6(Q){let $=x4(Q);l1(Q,{autoStart:!0,callback:({isIn:J})=>{if(J)n.to($.chars,{yPercent:0,stagger:0.02});else n.killTweensOf($.chars),n.set($.chars,{yPercent:100})}})}var vH={};r(vH,{default:()=>Z6});function Z6(Q,$){}var uH={};r(uH,{default:()=>q6});function w4(Q){return Array.from(Q)}function HQ(Q,$,J){return Math.min(J,Math.max($,Q))}function S4(Q,$,J,H){if($<=1)return H;let Z=Q/($-1),q=Math.abs(Z*2-1),K=q*q;return J+(H-J)*K}function b4(Q,$){let J=(Math.random()*2-1)*$;return Math.max(8,Q+J)}function T4(Q){let $=Math.max(1,Q),J=HQ(10/$,0.75,1.8),H=18*J,Z=56*J,q=HQ(420*J,280,700),G=(H+Z)/2*$,U=HQ(1400+G*1.2,1400,4200),W=HQ(120+$*3,80,260);return{fastStepMs:H,slowStepMs:Z,returnMs:q,loopGapMs:U,loopJitterMs:W}}function q6(Q){let $=Q.innerHTML,J=Q.textContent??"",H=w4(J),Z=H.filter((M)=>M.trim().length>0),q=T4(Z.length||H.length);if(!J.trim())return;let K=document.createElement("span");K.setAttribute("data-text-wave-original","true"),K.classList.add("opacity-0"),K.style.opacity="0",K.style.whiteSpace="pre-wrap",K.textContent=J;let G=document.createElement("span");if(G.setAttribute("data-text-wave-overlay","true"),G.setAttribute("aria-hidden","true"),G.style.position="absolute",G.style.inset="0",G.style.pointerEvents="none",G.style.whiteSpace="pre-wrap",H.forEach((M)=>{let I=document.createElement("span");I.setAttribute("data-text-wave-char","true"),I.style.display="inline-block",I.style.opacity="1",I.style.filter="blur(0px)",I.style.scale="1",I.style.transition=`opacity ${q.returnMs}ms ease-in-out, filter ${q.returnMs}ms ease-in-out, scale ${q.returnMs}ms ease-in-out`,I.textContent=M===" "?" ":M,G.appendChild(I)}),getComputedStyle(Q).position==="static")Q.style.position="relative";Q.innerHTML="",Q.appendChild(K),Q.appendChild(G);let U=Array.from(G.querySelectorAll("[data-text-wave-char]")),W,X=[],j=0,L=()=>{if(W!==void 0)window.clearTimeout(W),W=void 0;X.forEach((M)=>window.clearTimeout(M)),X.length=0},B=()=>{if(!U.length)return;let M=j,I=U[M];I.style.opacity="0.62",I.style.filter="blur(1.3px)",I.style.scale="0.985";let z=window.setTimeout(()=>{I.style.opacity="1",I.style.filter="blur(0px)",I.style.scale="1"},q.returnMs);X.push(z);let R=M>=U.length-1;j=R?0:M+1;let F=R?b4(q.loopGapMs,q.loopJitterMs):S4(M,U.length,q.fastStepMs,q.slowStepMs);W=window.setTimeout(B,F)};return B(),()=>{L(),Q.innerHTML=$}}var mH={};r(mH,{default:()=>G6});var y4=new Intl.DateTimeFormat("ru-RU",{hour:"2-digit",minute:"2-digit",hour12:!1});function K6(Q){Q.textContent=y4.format(new Date)}function G6(Q,$){K6(Q);let J=setInterval(()=>K6(Q),60000);return()=>clearInterval(J)}var dH={};r(dH,{default:()=>U6});function U6(Q,$){let J=$.locale||"ru-RU",H=new Intl.DateTimeFormat(J,{weekday:"short",day:"numeric",month:"short"});Q.textContent=H.format(new Date)}var cH={};r(cH,{default:()=>W6});var h4=500,f4=300,ZQ=new Set,a$=null,gH=!1;function _4(Q){if(Q instanceof HTMLVideoElement)return Q;return Q.querySelector("video")}function v4(Q){if(a$!==null)return;let $=()=>{let H=Array.from(ZQ).filter((Z)=>!Z.preloaded).sort((Z,q)=>Z.video.getBoundingClientRect().top+window.scrollY-(q.video.getBoundingClientRect().top+window.scrollY))[0];if(!H){if(a$!==null)window.clearInterval(a$),a$=null;return}H.preload()};a$=window.setInterval($,Q),$()}function u4(Q){if(gH)return;gH=!0;let $=()=>window.setTimeout(()=>v4(Q),f4);if(document.readyState==="complete")$();else window.addEventListener("load",$,{once:!0})}function W6(Q,$){let J=_4(Q);if(!J){console.warn('"video-handle" found no <video> in/at the element.');return}let H=Number.parseInt($.stagger??"",10),Z=$.rootMargin??"200px";J.muted=!0,J.playsInline=!0,J.preload="none";let q={video:J,preloaded:!1,preload:()=>{if(q.preloaded)return;q.preloaded=!0,J.preload="auto";try{J.load()}catch{}}};ZQ.add(q),u4(Number.isFinite(H)?H:h4);let K=l1(Q,{autoStart:!0,once:!1,rootMargin:Z,callback:({isIn:G})=>{if(G){q.preload();let U=J.play();if(U&&typeof U.catch==="function")U.catch(()=>{})}else J.pause()}});t9(()=>{if(K.destroy(),J.pause(),ZQ.delete(q),ZQ.size===0&&a$!==null)window.clearInterval(a$),a$=null,gH=!1})}var pH={};r(pH,{default:()=>j6});var m4=0.6,d4=1;function g4(Q){return Math.max(0,Math.min(1,Q))}function c4(Q,$){let J=$?.top,H=$?.bottom;if(typeof J!=="number"||typeof H!=="number"||J===H)return 0;return g4((Q-J)/(H-J))}function X6(Q,$){if(Q==null||Q==="")return $;let J=Number(Q);return Number.isFinite(J)?J:$}function p4(Q){if(Q==null||Q==="")return null;let $=Q.split(",").map((Z)=>Z.trim());if($.length<2)return null;let J=Number($[0]),H=Number($[1]);if(!Number.isFinite(J)||!Number.isFinite(H))return null;return[J,H]}function j6(Q,$){let J=p4($.scale),H=J?J[0]:X6($.scaleMax,d4),Z=J?J[1]:X6($.scaleMin,m4),q=u7(Q,{bounds:[0,1],top:"bottom",bottom:"center",callback:(U)=>{let W=H+U*(Z-H);p8(W)}}),K=c4(S0.scroll,q?.bounds),G=H+K*(Z-H);return p8(G),()=>{p8(1)}}var oH={"./../alpha.ts":bJ,"./../app.ts":TJ,"./../apple-icon.ts":yJ,"./../btn.ts":hJ,"./../color-flip.ts":$H,"./../cycle.ts":QH,"./../date.ts":JH,"./../dock.ts":HH,"./../editable-text.ts":ZH,"./../features.ts":qH,"./../folder-wrap.ts":KH,"./../form-beta.ts":BH,"./../form.ts":MH,"./../founders-spots.ts":zH,"./../gpu-item.ts":NH,"./../gpu-object-rounded.ts":FH,"./../gpu-object.ts":RH,"./../gpu.ts":OH,"./../hg.ts":AH,"./../ho-scroll.ts":PH,"./../link.ts":kH,"./../list.ts":xH,"./../mail-list.ts":wH,"./../mail-view.ts":SH,"./../mouse-follow.ts":bH,"./../nav.ts":TH,"./../notification-w.ts":yH,"./../slider.ts":fH,"./../split.ts":_H,"./../test.ts":vH,"./../text-wave.ts":uH,"./../time.ts":mH,"./../today.ts":dH,"./../video-handle.ts":cH,"./../webgl-item.ts":YH,"./../webgl-object-rounded.ts":DH,"./../webgl-object.ts":VH,"./../webgl-target.ts":pH,"./../webgl.ts":EH};function B6(Q="module"){return Array.from(document.querySelectorAll(`[data-${Q}]`)).map(($)=>{let J=$,H=J.dataset[Q];if(J._moduleInitialized)return null;let Z=oH[`./../${H}.ts`]?`./../${H}.ts`:`./../${H}.js`;if(oH[Z]){let q=oH[Z].default;if(typeof q==="function")try{J._moduleInitialized=!0;let K=q(J,J.dataset);if(typeof K==="function")Bq(K);return K}catch(K){return delete J._moduleInitialized,console.warn(`Failed to call default function for ${Q} "${H}":`,K),null}else return console.warn(`Default export is not a function for ${Q} "${H}"`),null}else return console.warn(`${Q} not found: "${H}"`),null}).filter(($)=>$!==null)}class A9{static instance;groups=[];constructor(){}static getInstance(){if(!A9.instance)A9.instance=new A9;return A9.instance}configsMatch(Q,$){return Q.root===$.root&&Q.rootMargin===$.rootMargin}handleIntersection(Q){Q.forEach(($)=>{let J=this.groups.find((W)=>{return Array.from(W.elements.keys()).includes($.target)});if(!J)return;let H=$.target,Z=J.elements.get(H);if(!Z)return;let{isIntersecting:q,intersectionRatio:K,boundingClientRect:G}=$,U=-1;if(Z.lastDirection!==void 0)U=q?G.top>0?1:-1:G.top>0?-1:1;if(Z.lastDirection=U,q){if(Z.callbacks.isIn?.({entry:$,direction:U}),Z.callbacks.callback?.({entry:$,direction:U,isIn:!0}),Z.once)this.removeElement(H)}else Z.callbacks.isOut?.({entry:$,direction:U}),Z.callbacks.callback?.({entry:$,direction:U,isIn:!1})})}addElement(Q,$,J){this.removeElement(Q);let H=this.groups.find((Z)=>this.configsMatch(Z.config,$));if(!H){let Z=new IntersectionObserver((q)=>this.handleIntersection(q),{...$,threshold:[0]});H={config:$,observer:Z,elements:new Map},this.groups.push(H)}return H.elements.set(Q,{callbacks:J,once:$.once||!1,lastDirection:void 0}),H.observer.observe(Q),H}removeElement(Q){let $=this.groups.find((J)=>J.elements.has(Q));if(!$)return;if($.observer.unobserve(Q),$.elements.delete(Q),$.elements.size===0)$.observer.disconnect(),this.groups=this.groups.filter((J)=>J!==$)}}class g8{element;#$;#H;isIn(Q){}isOut(Q){}inView;callback;#Q=null;#J=null;constructor(Q,$={root:null,rootMargin:"0px",threshold:0,autoStart:!1,once:!1,callback:void 0}){if(this.element=Q,this.#$=$,this.inView=!1,this.callback=$.callback||(()=>{}),$.autoStart)this.start()}start(){this.#H=A9.getInstance().addElement(this.element,this.#$,{isIn:(Q)=>{this.inView=!0,this.isIn?.(Q)},isOut:(Q)=>{this.inView=!1,this.isOut?.(Q)},callback:this.callback})}stop(){A9.getInstance().removeElement(this.element)}destroy(){this.stop(),this.#Q=null,this.#J=null}}var L6=(Q)=>{let $=Q.getBoundingClientRect();return{top:$.top+S0.scroll,bottom:$.bottom+S0.scroll,width:$.width,height:$.height,left:$.left,right:$.right,wh:k1.height,ww:k1.width,offset:$.top+S0.scroll,centery:k1.height/2-$.height/2-$.top-S0.scroll,centerx:-k1.width/2+$.left+$.width/2}};var o4={bounds:[0,1],top:"bottom",bottom:"top",callback:void 0};class SJ extends g8{value=0;init=!1;isIn(Q){this.#J()}isOut(Q){}bounds;config;resize;handleScroll;#$;#H;constructor(Q,$={}){super(Q,{autoStart:!0,once:!1,threshold:0});this.element=Q,this.config={...o4,...$},this.#Q(),this.#$=S0.add(this.#J.bind(this)),this.#H=k1.add(this.#Q.bind(this)),this.init=!0,this.#J()}#Q=()=>{this.bounds=s4(this.element,this.config),this.resize?.(this.bounds),this.#J()};#J(){if(!this.inView||!this.init)return;this.value=M$(0,1,c7(S0.scroll,this.bounds.top,this.bounds.bottom,this.config.bounds[0],this.config.bounds[1])),this.handleScroll?.(this.value),this.config.callback?.(this.value)}destroy(){this.config.callback=void 0,this.#$(),this.#H(),super.destroy()}}function s4(Q,$){let J=L6(Q),{top:H,bottom:Z,wh:q}=J,K=q/2;return J.top=H-($.top==="center"?K:$.top==="bottom"?q:0),J.bottom=Z-($.bottom==="center"?K:$.bottom==="bottom"?q:0),J}class I6{scroll=S0;constructor(){B6(),zq(),Lq()}}var l4=new I6;})();
//# debugId=A656B71830305AD464756E2164756E21