PageSourceSearch

https://www.scienceweek.ie/_next/static/chunks/2060-1fbcb60ed5c8a48f.js?dpl=dpl_HXXuRdqkW33oGbCUJUcGdPchzqwi

js scienceweek.ie collected 2026-10-02 11:13:46 UTC 23,933 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2060],{4853:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),!function(t,e){for(var i in e)Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}(e,{cancelIdleCallback:function(){return s},requestIdleCallback:function(){return i}});let i="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(t){let e=Date.now();return self.setTimeout(function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1)},s="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(t){return clearTimeout(t)};("function"==typeof e.default||"object"==typeof e.default&&null!==e.default)&&void 0===e.default.__esModule&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),t.exports=e.default)},6973:t=>{t.exports={style:{fontFamily:"'bwGradual', 'bwGradual Fallback'",fontStyle:"normal"},className:"__className_782b39",variable:"__variable_782b39"}},16203:()=>{},29001:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),!function(t,e){for(var i in e)Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}(e,{ESCAPE_REGEX:function(){return s},htmlEscapeAttributeString:function(){return l},htmlEscapeJsonString:function(){return r}});let i={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},s=/[&><\u2028\u2029]/g,o={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},n=/[&"'<>]/g;function r(t){return t.replace(s,t=>i[t])}function l(t){return t.replace(n,t=>o[t])}},41402:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),!function(t,e){for(var i in e)Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}(e,{default:function(){return w},handleClientScriptLoad:function(){return f},initScriptLoader:function(){return v}});let s=i(28140),o=i(49417),n=i(95155),r=s._(i(47650)),l=o._(i(12115)),a=i(82073),h=i(94681),c=i(4853),d=i(29001),u=new Map,p=new Set,m=t=>{let{src:e,id:i,onLoad:s=()=>{},onReady:o=null,dangerouslySetInnerHTML:n,children:l="",strategy:a="afterInteractive",onError:c,stylesheets:d}=t,m=i||e;if(m&&p.has(m))return;if(u.has(e)){p.add(m),u.get(e).then(s,c);return}let f=()=>{o&&o(),p.add(m)},v=document.createElement("script"),g=new Promise((t,e)=>{v.addEventListener("load",function(e){t(),s&&s.call(this,e),f()}),v.addEventListener("error",function(t){e(t)})}).catch(function(t){c&&c(t)});n?(v.innerHTML=n.__html||"",f()):l?(v.textContent="string"==typeof l?l:Array.isArray(l)?l.join(""):"",f()):e&&(v.src=e,u.
1set(e,g)),(0,h.setAttributesFromProps)(v,t),"worker"===a&&v.setAttribute("type","text/partytown"),v.setAttribute("data-nscript",a),d&&(t=>{if(r.default.preinit)return t.forEach(t=>{r.default.preinit(t,{as:"style"})});{let e=document.head;t.forEach(t=>{let i=document.createElement("link");i.type="text/css",i.rel="stylesheet",i.href=t,e.appendChild(i)})}})(d),document.body.appendChild(v)};function f(t){let{strategy:e="afterInteractive"}=t;"lazyOnload"===e?window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(t))}):m(t)}function v(t){t.forEach(f),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(t=>{let e=t.id||t.getAttribute("src");p.add(e)})}function g(t){let{id:e,src:i="",onLoad:s=()=>{},onReady:o=null,strategy:h="afterInteractive",onError:u,stylesheets:f,...v}=t,{updateScripts:g,scripts:w,getIsSsr:S,appDir:y,nonce:b}=(0,l.useContext)(a.HeadManagerContext);b=v.nonce||b;let E=(0,l.useRef)(!1);(0,l.useEffect)(()=>{let t=e||i;E.current||(o&&t&&p.has(t)&&o(),E.current=!0)},[o,e,i]);let _=(0,l.useRef)(!1);if((0,l.useEffect)(()=>{if(!_.current){if("afterInteractive"===h)m(t);else"lazyOnload"===h&&("complete"===document.readyState?(0,c.requestIdleCallback)(()=>m(t)):window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(t))}));_.current=!0}},[t,h]),("beforeInteractive"===h||"worker"===h)&&(g?(w[h]=(w[h]||[]).concat([{id:e,src:i,onLoad:s,onReady:o,onError:u,...v,nonce:b}]),g(w)):S&&S()?p.add(e||i):S&&!S()&&m({...t,nonce:b})),y){if(f&&f.forEach(t=>{r.default.preinit(t,{as:"style"})}),"beforeInteractive"===h)if(!i)return v.dangerouslySetInnerHTML&&(v.children=v.dangerouslySetInnerHTML.__html,delete v.dangerouslySetInnerHTML),(0,n.jsx)("script",{nonce:b,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+(0,d.htmlEscapeJsonString)(JSON.stringify([0,{...v,id:e}]))+")"}});else return r.default.preload(i,v.integrity?{as:"script",integrity:v.integrity,nonce:b,crossOrigin:v.crossOrigin}:{as:"script",nonce:b,crossOrigin:v.crossOrigin}),(0,n.jsx)("script",{nonce:b,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+(0,d.htmlEscapeJsonString)(JSON.stringify([i,{...v,id:e}]))+")"}});"afterInteractive"===h&&i&&r.default.preload(i,v.integrity?{as:"script",integrity:v.integrity,nonce:b,crossOrigin:v.crossOrigin}:{as:"script",nonce:b,crossOrigin:v.crossOrigin})}return null}Object.defineProperty(g,"__nextScript",{value:!0});let w=g;("function"==typeof e.default||"object"==typeof e.default&&null!==e.default)&&void 0===e.default.__esModule&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),t.exports=e.default)},92691:(t,e,i)=>{"use strict";i.d(e,{A:()=>p});var s="1.3.26";function o(t,e,i){return Math.max(t,Math.min(e,i))}var n=class{isRunning=!1;value=0;from=0;to=0;currentTime=0;lerp;duration;easing;onUpdate;advance(t){if(!this.isRunning)return;let e=!1;if(this.duration&&this.easing){this.currentTime+=t;let i=o(0,this.currentTime/this.duration,1),s=(e=i>=1)?1:this.easing(i);this.value=this.from+(this.to-this.from)*s}else if(this.lerp){var i,s,n,r;this.value=(i=this.value,s=this.to,n=60*this.lerp,(1-(r=1-Math.exp(-n*t)))*i+r*s),Math.round(this.value)===Math.round(this.to)&&(this.value=this.to,e=!0)}else this.value=this.to,e=!0;e&&this.stop(),this.onUpdate?.(this.value,e)}stop(){this.isRunning=!1}fromTo(t,e,{lerp:i,duration:s,easing:o,onStart:n,onUpdate:r}){this.from=this.value=t,this.to=e,this.lerp=i,this.duration=s,this.easing=o,this.currentTime=0,this.isRunning=!0,n?.(),this.onUpdate=r}},r=class{width=0;height=0;scrollHeight=0;scrollWidth=0;debouncedResize;wrapperResizeObserver;contentResizeObserver;constructor(t,e,{autoResize:i=!0,debounce:s=250}={}){this.wrapper=t,this.content=e,i&&(this.debouncedResize=function(t,e){let i;return function(...s){clearTimeout(i),i=setTimeout(()=>{i=void 0,t.apply(this,s)},e)}}(this.resize,s),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){this.wrapperResizeObserver?.disconnect(),this.contentResizeObserver?.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize)}resize=()=>{this.onWrapperResize(),this.onContentResize()};onWrapperResize=()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)};onContentResize=()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)};get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},l=class{events={};emit(t,...e){let i=this.events[t]||[];for(let t=0,s=i.length;t<s;t++)i[t]?.(...e)}on(t,e){return this.events[t]?this.events[t].push(e):this.events[t]=[e],()=>{this.events[t]=this.events[t]?.filter(t=>e!==t)}}off(t,e){this.events[t]=this.events[t]?.filter(t=>e!==t)}destroy(){this.events={}}};let a=100/6,h={passive:!1};function c(t,e){return 1===t?a:2===t?e:1}var d=class{touchStart={x:0,y:0};lastDelta={x:0,y:0};window={width:0,height:0};emitter=new l;constructor(t,e={wheelMultiplier:1,touchMultiplier:1}){this.element=t,this.options=e,window.addEventListener("resize",this.onWindowResize),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,h),this.element.addEventListener("touchstart",this.onTouchStart,h),this.element.addEventListener("touchmove",this.onTouchMove,h),this.element.addEventListener("touchend",this.onTouchEnd,h)}on(t,e){return this.emitter.on(t,e)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize),this.element.removeEventListener("wheel",this.onWheel,h),this.element.removeEventListener("touchstart",this.onTouchStart,h),this.element.removeEventListener("touchmove",this.onTouchMove,h),this.element.removeEventListener("touchend",this.onTouchEnd,h)}onTouchStart=t=>{let{clientX:e,clientY:i}=t.targetTouches?t.targetTouches[0]:t;this.touchStart.x=e,this.touchStart.y=i,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:t})};onTouchMove=t=>{let{clientX:e,clientY:i}=t.targetTouches?t.targetTouches[0]:t,s=-(e-this.touchStart.x)*this.options.touchMultiplier,o=-(i-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=e,this.touchStart.y=i,this.lastDelta={x:s,y:o},this.emitter.emit("scroll",{deltaX:s,deltaY:o,event:t})};onTouchEnd=t=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:t})};onWheel=t=>{let{deltaX:e,deltaY:i,deltaMode:s}=t,o=c(s,this.window.width),n=c(s,this.window.height);e*=o,i*=n,e*=this.options.wheelMultiplier,i*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:e,deltaY:i,event:t})};onWindowResize=()=>{this.window={width:window.innerWidth,height:window.innerHeight}}};let u=t=>Math.min(1,1.001-2**(-10*t));var p=class{_isScrolling=!1;_isStopped=!1;_isLocked=!1;_preventNextNativeScrollEvent=!1;_resetVelocityTimeout=null;_rafId=null;_isDraggingSelection=!1;reducedMotionMediaQuery=window.matchMedia("(prefers-reduced-motion: reduce)");
1isTouching;isIos;time=0;userData={};lastVelocity=0;velocity=0;direction=0;options;targetScroll;animatedScroll;animate=new n;emitter=new l;dimensions;virtualScroll;constructor({wrapper:t=window,content:e=document.documentElement,eventsTarget:i=t,smoothWheel:o=!0,syncTouch:n=!1,syncTouchLerp:l=.075,touchInertiaExponent:a=1.7,duration:h,easing:c,lerp:p=.1,infinite:m=!1,orientation:f="vertical",gestureOrientation:v="horizontal"===f?"both":"vertical",touchMultiplier:g=1,wheelMultiplier:w=1,autoResize:S=!0,prevent:y,virtualScroll:b,overscroll:E=!0,autoRaf:_=!1,anchors:T=!1,autoToggle:L=!1,allowNestedScroll:M=!1,__experimental__naiveDimensions:z=!1,naiveDimensions:O=z,stopInertiaOnNavigate:N=!1,respectReducedMotion:R=!0}={}){window.lenisVersion=s,window.lenis||(window.lenis={}),window.lenis.version=s,"horizontal"===f&&(window.lenis.horizontal=!0),!0===n&&(window.lenis.touch=!0),this.isIos=/(iPad|iPhone|iPod)/g.test(navigator.userAgent),t&&t!==document.documentElement||(t=window),"number"==typeof h&&"function"!=typeof c?c=u:"function"==typeof c&&"number"!=typeof h&&(h=1),this.options={wrapper:t,content:e,eventsTarget:i,smoothWheel:o,syncTouch:n,syncTouchLerp:l,touchInertiaExponent:a,duration:h,easing:c,lerp:p,infinite:m,gestureOrientation:v,orientation:f,touchMultiplier:g,wheelMultiplier:w,autoResize:S,prevent:y,virtualScroll:b,overscroll:E,autoRaf:_,anchors:T,autoToggle:L,allowNestedScroll:M,naiveDimensions:O,stopInertiaOnNavigate:N,respectReducedMotion:R},this.dimensions=new r(t,e,{autoResize:S}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown),this.virtualScroll=new d(i,{touchMultiplier:g,wheelMultiplier:w}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd)),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(t,e){return this.emitter.on(t,e)}off(t,e){return this.emitter.off(t,e)}onScrollEnd=t=>{t instanceof CustomEvent||"smooth"!==this.isScrolling&&!1!==this.isScrolling||t.stopPropagation()};dispatchScrollendEvent=()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))};get overflow(){let t=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[t]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}onTransitionEnd=t=>{t.propertyName?.includes("overflow")&&t.target===this.rootElement&&this.checkOverflow()};setScroll(t){this.isHorizontal?this.options.wrapper.scrollTo({left:t,behavior:"instant"}):this.options.wrapper.scrollTo({top:t,behavior:"instant"})}onClick=t=>{let e=t.composedPath().filter(t=>t instanceof HTMLAnchorElement&&t.href).map(t=>new URL(t.href)),i=new URL(window.location.href);if(this.options.anchors){let t=e.find(t=>i.host===t.host&&i.pathname===t.pathname&&t.hash);if(t){let e="object"==typeof this.options.anchors&&this.options.anchors?this.options.anchors:void 0,i=decodeURIComponent(t.hash);this.scrollTo(i,e);return}}if(this.options.stopInertiaOnNavigate&&e.some(t=>i.host===t.host&&i.pathname!==t.pathname))return void this.reset()};onPointerDown=t=>{1===t.button&&this.reset()};isTouchOnSelectionHandle(t){let e=window.getSelection();if(!e||e.isCollapsed||0===e.rangeCount)return!1;let i=t.targetTouches[0]??t.changedTouches[0];if(!i)return!1;let s=e.getRangeAt(0).getClientRects();if(0===s.length)return!1;let o=s[0],n=s[s.length-1],r=40>=Math.hypot(i.clientX-o.left,i.clientY-o.top),l=40>=Math.hypot(i.clientX-n.right,i.clientY-n.bottom);return r||l}onVirtualScroll=t=>{if("function"==typeof this.options.virtualScroll&&!1===this.options.virtualScroll(t))return;let{deltaX:e,deltaY:i,event:s}=t;if(this.emitter.emit("virtual-scroll",{deltaX:e,deltaY:i,event:s}),s.ctrlKey||s.lenisStopPropagation)return;let o=s.type.includes("touch"),n=s.type.includes("wheel");if(o&&this.isIos&&("touchstart"===s.type&&(this._isDraggingSelection=this.isTouchOnSelectionHandle(s)),this._isDraggingSelection)){"touchend"===s.type&&(this._isDraggingSelection=!1);return}this.isTouching="touchstart"===s.type||"touchmove"===s.type;let r=0===e&&0===i;if(this.options.syncTouch&&o&&"touchstart"===s.type&&r&&!this.isStopped&&!this.isLocked)return void this.reset();let l="vertical"===this.options.gestureOrientation&&0===i||"horizontal"===this.options.gestureOrientation&&0===e;if(r||l)return;let a=s.composedPath();a=a.slice(0,a.indexOf(this.rootElement));let h=this.options.prevent,c=Math.abs(e)>=Math.abs(i)?"horizontal":"vertical";if(a.find(t=>t instanceof HTMLElement&&("function"==typeof h&&h?.(t)||t.hasAttribute?.("data-lenis-prevent")||"vertical"===c&&t.hasAttribute?.("data-lenis-prevent-vertical")||"horizontal"===c&&t.hasAttribute?.("data-lenis-prevent-horizontal")||o&&t.hasAttribute?.("data-lenis-prevent-touch")||n&&t.hasAttribute?.("data-lenis-prevent-wheel")||this.options.allowNestedScroll&&this.hasNestedScroll(t,{deltaX:e,deltaY:i}
1))))return;if(this.isStopped||this.isLocked){s.cancelable&&s.preventDefault();return}if(!(this.options.syncTouch&&o||this.options.smoothWheel&&n)){this.isScrolling="native",this.animate.stop(),s.lenisStopPropagation=!0;return}let d=i;"both"===this.options.gestureOrientation?d=Math.abs(i)>Math.abs(e)?i:e:"horizontal"===this.options.gestureOrientation&&(d=e),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||0===this.animatedScroll&&i>0||this.animatedScroll===this.limit&&i<0))&&(s.lenisStopPropagation=!0),s.cancelable&&s.preventDefault();let u=o&&this.options.syncTouch,p=o&&"touchend"===s.type;p&&(d=Math.sign(d)*Math.abs(this.velocity)**this.options.touchInertiaExponent),this.scrollTo(this.targetScroll+d,{programmatic:!1,...u?{lerp:p?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(null!==this._resetVelocityTimeout&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(!1===this.isScrolling||"native"===this.isScrolling){let t=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-t,this.direction=Math.sign(this.animatedScroll-t),this.isStopped||(this.isScrolling="native"),this.emit(),0!==this.velocity&&(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){if(this.options.autoToggle)return void this.rootElement.style.removeProperty("overflow");this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle)return void this.rootElement.style.setProperty("overflow","clip");this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}raf=t=>{let e=t-(this.time||t);this.time=t,this.animate.advance(.001*e),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))};scrollTo(t,{offset:e=0,immediate:i=!1,lock:s=!1,programmatic:n=!0,lerp:r=n?this.options.lerp:void 0,duration:l=n?this.options.duration:void 0,easing:a=n?this.options.easing:void 0,onStart:h,onComplete:c,force:d=!1,userData:p}={}){if(this.prefersReducedMotion&&(n?i=!0:(r=1,l=void 0,a=void 0)),(this.isStopped||this.isLocked)&&!d)return;let m=t,f=e;if("string"==typeof m&&["top","left","start","#"].includes(m))m=0;else if("string"==typeof m&&["bottom","right","end"].includes(m))m=this.limit;else{let t=null;if("string"==typeof m?(t=m.startsWith("#")?document.getElementById(m.slice(1)):document.querySelector(m))||("#top"===m?m=0:console.warn("Lenis: Target not found",m)):m instanceof HTMLElement&&m?.nodeType&&(t=m),t){if(this.options.wrapper!==window){let t=this.rootElement.getBoundingClientRect();f-=this.isHorizontal?t.left:t.top}let e=t.getBoundingClientRect(),i=getComputedStyle(t),s=this.isHorizontal?Number.parseFloat(i.scrollMarginLeft):Number.parseFloat(i.scrollMarginTop),o=getComputedStyle(this.rootElement),n=this.isHorizontal?Number.parseFloat(o.scrollPaddingLeft):Number.parseFloat(o.scrollPaddingTop);m=(this.isHorizontal?e.left:e.top)+this.animatedScroll-(Number.isNaN(s)?0:s)-(Number.isNaN(n)?0:n)}}if("number"==typeof m){if(m+=f,this.options.infinite){if(n){this.targetScroll=this.animatedScroll=this.scroll;let t=m-this.animatedScroll;t>this.limit/2?m-=this.limit:t<-this.limit/2&&(m+=this.limit)}}else m=o(0,m,this.limit);if(m===this.targetScroll){h?.(this),c?.(this);return}if(this.userData=p??{},i){this.animatedScroll=this.targetScroll=m,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit
1(),c?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}n||(this.targetScroll=m),"number"==typeof l&&"function"!=typeof a?a=u:"function"==typeof a&&"number"!=typeof l&&(l=1),this.animate.fromTo(this.animatedScroll,m,{duration:l,easing:a,lerp:r,onStart:()=>{s&&(this.isLocked=!0),this.isScrolling="smooth",h?.(this)},onUpdate:(t,e)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=t-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=t,this.setScroll(this.scroll),n&&(this.targetScroll=t),e||this.emit(),e&&(this.reset(),this.emit(),c?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}hasNestedScroll(t,{deltaX:e,deltaY:i}){let s,o,n,r,l,a,h,c,d,u,p,m,f,v,g,w,S=Date.now();t._lenis||(t._lenis={});let y=t._lenis;if(S-(y.time??0)>2e3){y.time=Date.now();let e=window.getComputedStyle(t);if(y.computedStyle=e,s=["auto","overlay","scroll"].includes(e.overflowX),o=["auto","overlay","scroll"].includes(e.overflowY),l=["auto"].includes(e.overscrollBehaviorX),a=["auto"].includes(e.overscrollBehaviorY),y.hasOverflowX=s,y.hasOverflowY=o,!(s||o))return!1;h=t.scrollWidth,c=t.scrollHeight,d=t.clientWidth,u=t.clientHeight,n=h>d,r=c>u,y.isScrollableX=n,y.isScrollableY=r,y.scrollWidth=h,y.scrollHeight=c,y.clientWidth=d,y.clientHeight=u,y.hasOverscrollBehaviorX=l,y.hasOverscrollBehaviorY=a}else n=y.isScrollableX,r=y.isScrollableY,s=y.hasOverflowX,o=y.hasOverflowY,h=y.scrollWidth,c=y.scrollHeight,d=y.clientWidth,u=y.clientHeight,l=y.hasOverscrollBehaviorX,a=y.hasOverscrollBehaviorY;if(!(s&&n||o&&r))return!1;let b=Math.abs(e)>=Math.abs(i)?"horizontal":"vertical";if("horizontal"===b)p=Math.round(t.scrollLeft),m=h-d,f=e,v=s,g=n,w=l;else{if("vertical"!==b)return!1;p=Math.round(t.scrollTop),m=c-u,f=i,v=o,g=r,w=a}return!w&&(p>=m||p<=0)||(f>0?p<m:p>0)&&v&&g}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return"horizontal"===this.options.orientation}get actualScroll(){let t=this.options.wrapper;return this.isHorizontal?t.scrollX??t.scrollLeft:t.scrollY??t.scrollTop}get scroll(){var t;return this.options.infinite?(this.animatedScroll%(t=this.limit)+t)%t:this.animatedScroll}get progress(){return 0===this.limit?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(t){this._isScrolling!==t&&(this._isScrolling=t,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(t){this._isStopped!==t&&(this._isStopped=t,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(t){this._isLocked!==t&&(this._isLocked=t,this.updateClassName())}get isSmooth(){return"smooth"===this.isScrolling}get prefersReducedMotion(){return this.options.respectReducedMotion&&this.reducedMotionMediaQuery.matches}get className(){let t="lenis";return this.options.autoToggle&&(t+=" lenis-autoToggle"),this.isStopped&&(t+=" lenis-stopped"),this.isLocked&&(t+=" lenis-locked"),this.isScrolling&&(t+=" lenis-scrolling"),"smooth"===this.isScrolling&&(t+=" lenis-smooth"),t}updateClassName(){this.cleanUpClassName(),this.className.split(" ").forEach(t=>{this.rootElement.classList.add(t)})}cleanUpClassName(){for(let t of Array.from(this.rootElement.classList))("lenis"===t||t.startsWith("lenis-"))&&this.rootElement.classList.remove(t)}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.