var mo=Object.defineProperty;var go=(U,X,J)=>X in U?mo(U,X,{enumerable:!0,configurable:!0,writable:!0,value:J}):U[X]=J;var w=(U,X,J)=>go(U,typeof X!="symbol"?X+"":X,J);(function(){"use strict";var U=document.createElement("style");U.textContent=`html.lenis,html.lenis body{height:auto}.lenis.lenis-smooth{scroll-behavior:auto!important}.lenis.lenis-smooth [data-lenis-prevent]{overscroll-behavior:contain}.lenis.lenis-stopped{overflow:clip}.lenis.lenis-smooth iframe{pointer-events:none} /*$vite$:1*/`,document.head.appendChild(U);function X(){const n=document.querySelector(".bunny-bg.is-features-1"),i=n==null?void 0:n.querySelector(".bunny-bg__video"),t=document.querySelector(".hero_sub_wrap"),o=document.querySelector(".features_wrap");if(!i||!t||!o){console.warn("Video scroll interactions: Missing required elements");return}n!=null&&n._io&&(n._io.disconnect(),console.log("Disconnected Bunny IO for:",n.className)),i.setAttribute("playsinline","true"),i.setAttribute("webkit-playsinline","true"),i.setAttribute("muted","true"),i.setAttribute("loop","true"),i.muted=!0,i.playsInline=!0,i.loop=!0,i.addEventListener("ended",()=>{console.log("Feature video ended unexpectedly, restarting..."),i.currentTime=0,a.aboveFeatures&&!a.belowFeatures&&c()});const a={video1Playing:!1,aboveFeatures:!1,belowFeatures:!1};function c(){a.video1Playing||(i.muted=!0,i.play().then(()=>{a.video1Playing=!0,n&&(n.setAttribute("data-player-status","playing"),n.setAttribute("data-player-activated","true")),console.log("Feature video 1 playing")}).catch(console.warn))}function u(){a.video1Playing&&(i.pause(),a.video1Playing=!1,n&&n.setAttribute("data-player-status","paused"),console.log("Feature video 1 paused"))}function p(){a.aboveFeatures&&!a.belowFeatures?c():u()}ScrollTrigger.create({trigger:t,start:"bottom bottom",end:"bottom bottom",onEnter:()=>{a.aboveFeatures=!0,p()},onLeaveBack:()=>{a.aboveFeatures=!1,p()}}),ScrollTrigger.create({trigger:o,start:"bottom top",end:"bottom top",onEnter:()=>{a.belowFeatures=!0,p()},onLeaveBack:()=>{a.belowFeatures=!1,p()}}),setTimeout(f,500);function f(){const _=t.getBoundingClientRect().bottom,S=o.getBoundingClientRect().bottom,e=window.innerHeight;a.belowFeatures=S<=0,a.aboveFeatures=_>=e&&!a.belowFeatures,console.log("Initial state:",a),p()}}function J(){const n=document.querySelector(".g_visual_wrap.is-btm"),i=n==null?void 0:n.querySelector("video");if(!i||!n){console.warn("Bottom video control: Missing video element");return}return i.setAttribute("playsinline","true"),i.setAttribute("webkit-playsinline","true"),i.setAttribute("muted","true"),i.muted=!0,i.playsInline=!0,i.load(),ScrollTrigger.create({trigger:n,start:"top bottom",end:"bottom top",onEnter:()=>{i.play().catch(o=>console.warn("Bottom video play failed:",o))},onLeave:()=>{i.pause()},onEnterBack:()=>{i.play().catch(o=>console.warn("Bottom video play failed on enter back:",o))},onLeaveBack:()=>{i.pause()}}),setTimeout(()=>{const o=n.getBoundingClientRect();o.top0&&(i.muted=!0,i.play().catch(c=>console.warn("Bottom video initial play failed:",c)))},100),()=>{i.pause()}}function gt(n){const i=document.querySelector(".loader_p_wrap p:first-child"),t=document.querySelector(".loader_p_wrap p:nth-child(2)"),o=document.querySelector(".loader_final_wrap"),a=document.querySelector(".loader_final_p"),c=document.querySelector(".btn-wrap.is-loader");if(i){gsap.set(i,{opacity:0});const u=_e(i,.3,!0);n.add(u)}if(t){gsap.set(t,{opacity:0});const u=_e(t,.05,!0);n.add(u,"-=0.2")}if(o&&a&&c){const u=gsap.timeline();gsap.set([o,c],{opacity:0}),gsap.set(a,{opacity:0}),gsap.set(c,{pointerEvents:"none"}),u.to(o,{opacity:1,duration:.1},"-=0.2");const p=_e(a,0,!1);u.add(p),u.to(c,{opacity:1,pointerEvents:"auto",duration:.8,ease:"customEase"},"-=0.7"),n.add(u,"-=0.3")}n.play()}function _e(n,i=0,t=!0,o=.25){if(!gsap||!n)return null;const a=_t(n),c=gsap.timeline({delay:i});return gsap.set(a,{x:"0.75rem",opacity:0}),gsap.set(n,{opacity:1}),c.to(a,{x:"0em",opacity:1,duration:1,stagger:{amount:.6,from:"start"},ease:"power2.out"}),t&&(c.to({},{duration:o}),c.to(a,{x:"-0.75rem",opacity:0,duration:.8,stagger:{amount:.5,from:"end"},ease:"power2.in"}),c.to(n,{opacity:0,duration:.1})),c}function _t(n){return n.getAttribute("data-char-animated")==="true"||(n.setAttribute("data-char-animated","true"),xe(n)),n.querySelectorAll(".animated-char")}function xe(n){n&&Array.from(n.childNodes).forEach(i=>{i.nodeType===Node.TEXT_NODE?yt(i):i.nodeType===Node.ELEMENT_NODE&&xe(i)})}function yt(n){const i=n.textContent;if(!i.trim())return;const t=document.createDocumentFragment();i.split(/(\s+)/).forEach(a=>{if(a)if(/^\s+$/.test(a))t.appendChild(document.createTextNode(a));else{const c=document.createElement("span");c.className="animated-word",[...a].forEach(u=>{const p=document.createElement("span");p.className="char-mask";const f=document.createElement("span");f.className="animated-char",f.textContent=u,p.appendChild(f),c.appendChild(p)}),t.appendChild(c)}}),n.parentNode.replaceChild(t,n)}function vt(){if(document.getElementById("char-animation-styles"))return;const n=document.createElement("style");n.id="char-animation-styles",n.textContent=` .animated-word { display: inline-block; white-space: nowrap; } .char-mask { display: inline-block; overflow: hidden; vertical-align: top; } .animated-char { display: inline-block; position: relative; will-change: transform, opacity; } `,document.head.appendChild(n)}function wt(){const n=document.querySelectorAll(".hero_main_svg path");n.length&&typeof gsap<"u"&&gsap.set(n,{opacity:0,x:"50%",filter:"blur(5px)",force3D:!0})}function bt(){if(!gsap)return;const n=document.querySelectorAll(".hero_main_svg path");n.length!==0&&gsap.to(n,{opacity:1,x:"0%",filter:"blur(0px)",duration:1.2,stagger:.15,ease:"power2.out",force3D:!0})}function St(n=12){const i=[];for(let t=0;t{gsap.set(document.querySelector(".loader_wrap"),{visibility:"hidden"}),console.log("Preloader complete!")}}),c=[...n,...i],u=St(c.length);c.forEach((f,_)=>{const S=u[_%u.length];a.to(f,{scaleY:0,duration:1.6,ease:S},0)}),a.play()}var re=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ye={};/*! * howler.js v2.2.3 * howlerjs.com * * (c) 2013-2020, James Simpson of GoldFire Studios * goldfirestudios.com * * MIT License */var Le;function At(){return Le||(Le=1,function(n){(function(){var i=function(){this.init()};i.prototype={init:function(){var e=this||t;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator=typeof window<"u"&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var r=this||t;if(e=parseFloat(e),r.ctx||S(),typeof e<"u"&&e>=0&&e<=1){if(r._volume=e,r._muted)return r;r.usingWebAudio&&r.masterGain.gain.setValueAtTime(e,t.ctx.currentTime);for(var s=0;s=0;r--)e._howls[r].unload();return e.usingWebAudio&&e.ctx&&typeof e.ctx.close<"u"&&(e.ctx.close(),e.ctx=null,S()),e},codecs:function(e){return(this||t)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||t;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if(typeof Audio<"u")try{var r=new Audio;typeof r.oncanplaythrough>"u"&&(e._canPlayEvent="canplay")}catch{e.noAudio=!0}else e.noAudio=!0;try{var r=new Audio;r.muted&&(e.noAudio=!0)}catch{}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||t,r=null;try{r=typeof Audio<"u"?new Audio:null}catch{return e}if(!r||typeof r.canPlayType!="function")return e;var s=r.canPlayType("audio/mpeg;").replace(/^no$/,""),d=e._navigator?e._navigator.userAgent:"",h=d.match(/OPR\/([0-6].)/g),m=h&&parseInt(h[0].split("/")[1],10)<33,l=d.indexOf("Safari")!==-1&&d.indexOf("Chrome")===-1,g=d.match(/Version\/(.*?) /),v=l&&g&&parseInt(g[1],10)<15;return e._codecs={mp3:!!(!m&&(s||r.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!s,opus:!!r.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!r.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!r.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(r.canPlayType('audio/wav; codecs="1"')||r.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!r.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!r.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(r.canPlayType("audio/x-m4a;")||r.canPlayType("audio/m4a;")||r.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(r.canPlayType("audio/x-m4b;")||r.canPlayType("audio/m4b;")||r.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(r.canPlayType("audio/x-mp4;")||r.canPlayType("audio/mp4;")||r.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!v&&r.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!v&&r.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!r.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(r.canPlayType("audio/x-flac;")||r.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||t;if(!(e._audioUnlocked||!e.ctx)){e._audioUnlocked=!1,e.autoUnlock=!1,!e._mobileUnloaded&&e.ctx.sampleRate!==44100&&(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var r=function(s){for(;e._html5AudioPool.length"u"?v.noteOn(0):v.start(0),typeof e.ctx.resume=="function"&&e.ctx.resume(),v.onended=function(){v.disconnect(0),e._audioUnlocked=!0,document.removeEventListener("touchstart",r,!0),document.removeEventListener("touchend",r,!0),document.removeEventListener("click",r,!0),document.removeEventListener("keydown",r,!0);for(var y=0;y"u"||!t.usingWebAudio)){for(var r=0;r"u"||!t.usingWebAudio))return e.state==="running"&&e.ctx.state!=="interrupted"&&e._suspendTimer?(clearTimeout(e._suspendTimer),e._suspendTimer=null):e.state==="suspended"||e.state==="running"&&e.ctx.state==="interrupted"?(e.ctx.resume().then(function(){e.state="running";for(var r=0;r"u"&&(e="__default",!s._playLock)){for(var h=0,m=0;m0?l._seek:s._sprite[e][0]/1e3),y=Math.max(0,(s._sprite[e][0]+s._sprite[e][1])/1e3-v),A=y*1e3/Math.abs(l._rate),E=s._sprite[e][0]/1e3,k=(s._sprite[e][0]+s._sprite[e][1])/1e3;l._sprite=e,l._ended=!1;var O=function(){l._paused=!1,l._seek=v,l._start=E,l._stop=k,l._loop=!!(l._loop||s._sprite[e][2])};if(v>=k){s._ended(l);return}var b=l._node;if(s._webAudio){var M=function(){s._playLock=!1,O(),s._refreshBuffer(l);var q=l._muted||s._muted?0:l._volume;b.gain.setValueAtTime(q,t.ctx.currentTime),l._playStart=t.ctx.currentTime,typeof b.bufferSource.start>"u"?l._loop?b.bufferSource.noteGrainOn(0,v,86400):b.bufferSource.noteGrainOn(0,v,y):l._loop?b.bufferSource.start(0,v,86400):b.bufferSource.start(0,v,y),A!==1/0&&(s._endTimers[l._id]=setTimeout(s._ended.bind(s,l),A)),r||setTimeout(function(){s._emit("play",l._id),s._loadQueue()},0)};t.state==="running"&&t.ctx.state!=="interrupted"?M():(s._playLock=!0,s.once("resume",M),s._clearTimer(l._id))}else{var P=function(){b.currentTime=v,b.muted=l._muted||s._muted||t._muted||b.muted,b.volume=l._volume*t.volume(),b.playbackRate=l._rate;try{var q=b.play();if(q&&typeof Promise<"u"&&(q instanceof Promise||typeof q.then=="function")?(s._playLock=!0,O(),q.then(function(){s._playLock=!1,b._unlocked=!0,r?s._loadQueue():s._emit("play",l._id)}).catch(function(){s._playLock=!1,s._emit("playerror",l._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),l._ended=!0,l._paused=!0})):r||(s._playLock=!1,O(),s._emit("play",l._id)),b.playbackRate=l._rate,b.paused){s._emit("playerror",l._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}e!=="__default"||l._loop?s._endTimers[l._id]=setTimeout(s._ended.bind(s,l),A):(s._endTimers[l._id]=function(){s._ended(l),b.removeEventListener("ended",s._endTimers[l._id],!1)},b.addEventListener("ended",s._endTimers[l._id],!1))}catch(ie){s._emit("playerror",l._id,ie)}};b.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(b.src=s._src,b.load());var x=window&&window.ejecta||!b.readyState&&t._navigator.isCocoonJS;if(b.readyState>=3||x)P();else{s._playLock=!0,s._state="loading";var H=function(){s._state="loaded",P(),b.removeEventListener(t._canPlayEvent,H,!1)};b.addEventListener(t._canPlayEvent,H,!1),s._clearTimer(l._id)}}return l._id},pause:function(e){var r=this;if(r._state!=="loaded"||r._playLock)return r._queue.push({event:"pause",action:function(){r.pause(e)}}),r;for(var s=r._getSoundIds(e),d=0;d"u"?h._node.bufferSource.noteOff(0):h._node.bufferSource.stop(0),r._cleanBuffer(h._node)}else(!isNaN(h._node.duration)||h._node.duration===1/0)&&h._node.pause();arguments[1]||r._emit("pause",h?h._id:null)}return r},stop:function(e,r){var s=this;if(s._state!=="loaded"||s._playLock)return s._queue.push({event:"stop",action:function(){s.stop(e)}}),s;for(var d=s._getSoundIds(e),h=0;h"u"?m._node.bufferSource.noteOff(0):m._node.bufferSource.stop(0),s._cleanBuffer(m._node)):(!isNaN(m._node.duration)||m._node.duration===1/0)&&(m._node.currentTime=m._start||0,m._node.pause(),m._node.duration===1/0&&s._clearSound(m._node))),r||s._emit("stop",m._id))}return s},mute:function(e,r){var s=this;if(s._state!=="loaded"||s._playLock)return s._queue.push({event:"mute",action:function(){s.mute(e,r)}}),s;if(typeof r>"u")if(typeof e=="boolean")s._muted=e;else return s._muted;for(var d=s._getSoundIds(r),h=0;h"u"){var h=e._getSoundIds(),m=h.indexOf(r[0]);m>=0?d=parseInt(r[0],10):s=parseFloat(r[0])}else r.length>=2&&(s=parseFloat(r[0]),d=parseInt(r[1],10));var l;if(typeof s<"u"&&s>=0&&s<=1){if(e._state!=="loaded"||e._playLock)return e._queue.push({event:"volume",action:function(){e.volume.apply(e,r)}}),e;typeof d>"u"&&(e._volume=s),d=e._getSoundIds(d);for(var g=0;g"u")}}return h},_startFadeInterval:function(e,r,s,d,h,m){var l=this,g=r,v=s-r,y=Math.abs(v/.01),A=Math.max(4,y>0?d/y:d),E=Date.now();e._fadeTo=s,e._interval=setInterval(function(){var k=(Date.now()-E)/d;E=Date.now(),g+=v*k,g=Math.round(g*100)/100,v<0?g=Math.max(s,g):g=Math.min(s,g),l._webAudio?e._volume=g:l.volume(g,e._id,!0),m&&(l._volume=g),(sr&&g>=s)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,l.volume(s,e._id),l._emit("fade",e._id))},A)},_stopFade:function(e){var r=this,s=r._soundById(e);return s&&s._interval&&(r._webAudio&&s._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(s._interval),s._interval=null,r.volume(s._fadeTo,e),s._fadeTo=null,r._emit("fade",e)),r},loop:function(){var e=this,r=arguments,s,d,h;if(r.length===0)return e._loop;if(r.length===1)if(typeof r[0]=="boolean")s=r[0],e._loop=s;else return h=e._soundById(parseInt(r[0],10)),h?h._loop:!1;else r.length===2&&(s=r[0],d=parseInt(r[1],10));for(var m=e._getSoundIds(d),l=0;l=0?d=parseInt(r[0],10):s=parseFloat(r[0])}else r.length===2&&(s=parseFloat(r[0]),d=parseInt(r[1],10));var l;if(typeof s=="number"){if(e._state!=="loaded"||e._playLock)return e._queue.push({event:"rate",action:function(){e.rate.apply(e,r)}}),e;typeof d>"u"&&(e._rate=s),d=e._getSoundIds(d);for(var g=0;g=0?d=parseInt(r[0],10):e._sounds.length&&(d=e._sounds[0]._id,s=parseFloat(r[0]))}else r.length===2&&(s=parseFloat(r[0]),d=parseInt(r[1],10));if(typeof d>"u")return 0;if(typeof s=="number"&&(e._state!=="loaded"||e._playLock))return e._queue.push({event:"seek",action:function(){e.seek.apply(e,r)}}),e;var l=e._soundById(d);if(l)if(typeof s=="number"&&s>=0){var g=e.playing(d);g&&e.pause(d,!0),l._seek=s,l._ended=!1,e._clearTimer(d),!e._webAudio&&l._node&&!isNaN(l._node.duration)&&(l._node.currentTime=s);var v=function(){g&&e.play(d,!0),e._emit("seek",d)};if(g&&!e._webAudio){var y=function(){e._playLock?setTimeout(y,0):v()};setTimeout(y,0)}else v()}else if(e._webAudio){var A=e.playing(d)?t.ctx.currentTime-l._playStart:0,E=l._rateSeek?l._rateSeek-l._seek:0;return l._seek+(E+A*Math.abs(l._rate))}else return l._node.currentTime;return e},playing:function(e){var r=this;if(typeof e=="number"){var s=r._soundById(e);return s?!s._paused:!1}for(var d=0;d=0&&t._howls.splice(d,1);var h=!0;for(s=0;s=0){h=!1;break}return c&&h&&delete c[e._src],t.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,r,s,d){var h=this,m=h["_on"+e];return typeof r=="function"&&m.push(d?{id:s,fn:r,once:d}:{id:s,fn:r}),h},off:function(e,r,s){var d=this,h=d["_on"+e],m=0;if(typeof r=="number"&&(s=r,r=null),r||s)for(m=0;m=0;m--)(!h[m].id||h[m].id===r||e==="load")&&(setTimeout((function(l){l.call(this,r,s)}).bind(d,h[m].fn),0),h[m].once&&d.off(e,h[m].fn,h[m].id));return d._loadQueue(e),d},_loadQueue:function(e){var r=this;if(r._queue.length>0){var s=r._queue[0];s.event===e&&(r._queue.shift(),r._loadQueue()),e||s.action()}return r},_ended:function(e){var r=this,s=e._sprite;if(!r._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime=0;d--){if(s<=r)return;e._sounds[d]._ended&&(e._webAudio&&e._sounds[d]._node&&e._sounds[d]._node.disconnect(0),e._sounds.splice(d,1),s--)}}},_getSoundIds:function(e){var r=this;if(typeof e>"u"){for(var s=[],d=0;d=0;if(t._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),s))try{e.bufferSource.buffer=t._scratchBuffer}catch{}return e.bufferSource=null,r},_clearSound:function(e){var r=/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent);r||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var a=function(e){this._parent=e,this.init()};a.prototype={init:function(){var e=this,r=e._parent;return e._muted=r._muted,e._loop=r._loop,e._volume=r._volume,e._rate=r._rate,e._seek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++t._counter,r._sounds.push(e),e.create(),e},create:function(){var e=this,r=e._parent,s=t._muted||e._muted||e._parent._muted?0:e._volume;return r._webAudio?(e._node=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),e._node.gain.setValueAtTime(s,t.ctx.currentTime),e._node.paused=!0,e._node.connect(t.masterGain)):t.noAudio||(e._node=t._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,!1),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(t._canPlayEvent,e._loadFn,!1),e._endFn=e._endListener.bind(e),e._node.addEventListener("ended",e._endFn,!1),e._node.src=r._src,e._node.preload=r._preload===!0?"auto":r._preload,e._node.volume=s*t.volume(),e._node.load()),e},reset:function(){var e=this,r=e._parent;return e._muted=r._muted,e._loop=r._loop,e._volume=r._volume,e._rate=r._rate,e._seek=0,e._rateSeek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++t._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,!1)},_loadListener:function(){var e=this,r=e._parent;r._duration=Math.ceil(e._node.duration*10)/10,Object.keys(r._sprite).length===0&&(r._sprite={__default:[0,r._duration*1e3]}),r._state!=="loaded"&&(r._state="loaded",r._emit("load"),r._loadQueue()),e._node.removeEventListener(t._canPlayEvent,e._loadFn,!1)},_endListener:function(){var e=this,r=e._parent;r._duration===1/0&&(r._duration=Math.ceil(e._node.duration*10)/10,r._sprite.__default[1]===1/0&&(r._sprite.__default[1]=r._duration*1e3),r._ended(e)),e._node.removeEventListener("ended",e._endFn,!1)}};var c={},u=function(e){var r=e._src;if(c[r]){e._duration=c[r].duration,_(e);return}if(/^data:[^;]+;base64,/.test(r)){for(var s=atob(r.split(",")[1]),d=new Uint8Array(s.length),h=0;h0?(c[r._src]=h,_(r,h)):s()};typeof Promise<"u"&&t.ctx.decodeAudioData.length===1?t.ctx.decodeAudioData(e).then(d).catch(s):t.ctx.decodeAudioData(e,d,s)},_=function(e,r){r&&!e._duration&&(e._duration=r.duration),Object.keys(e._sprite).length===0&&(e._sprite={__default:[0,e._duration*1e3]}),e._state!=="loaded"&&(e._state="loaded",e._emit("load"),e._loadQueue())},S=function(){if(t.usingWebAudio){try{typeof AudioContext<"u"?t.ctx=new AudioContext:typeof webkitAudioContext<"u"?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch{t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),r=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),s=r?parseInt(r[1],10):null;if(e&&s&&s<9){var d=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!d&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};n.Howler=t,n.Howl=o,typeof re<"u"?(re.HowlerGlobal=i,re.Howler=t,re.Howl=o,re.Sound=a):typeof window<"u"&&(window.HowlerGlobal=i,window.Howler=t,window.Howl=o,window.Sound=a)})();/*! * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported. * * howler.js v2.2.3 * howlerjs.com * * (c) 2013-2020, James Simpson of GoldFire Studios * goldfirestudios.com * * MIT License */(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(t){var o=this;if(!o.ctx||!o.ctx.listener)return o;for(var a=o._howls.length-1;a>=0;a--)o._howls[a].stereo(t);return o},HowlerGlobal.prototype.pos=function(t,o,a){var c=this;if(!c.ctx||!c.ctx.listener)return c;if(o=typeof o!="number"?c._pos[1]:o,a=typeof a!="number"?c._pos[2]:a,typeof t=="number")c._pos=[t,o,a],typeof c.ctx.listener.positionX<"u"?(c.ctx.listener.positionX.setTargetAtTime(c._pos[0],Howler.ctx.currentTime,.1),c.ctx.listener.positionY.setTargetAtTime(c._pos[1],Howler.ctx.currentTime,.1),c.ctx.listener.positionZ.setTargetAtTime(c._pos[2],Howler.ctx.currentTime,.1)):c.ctx.listener.setPosition(c._pos[0],c._pos[1],c._pos[2]);else return c._pos;return c},HowlerGlobal.prototype.orientation=function(t,o,a,c,u,p){var f=this;if(!f.ctx||!f.ctx.listener)return f;var _=f._orientation;if(o=typeof o!="number"?_[1]:o,a=typeof a!="number"?_[2]:a,c=typeof c!="number"?_[3]:c,u=typeof u!="number"?_[4]:u,p=typeof p!="number"?_[5]:p,typeof t=="number")f._orientation=[t,o,a,c,u,p],typeof f.ctx.listener.forwardX<"u"?(f.ctx.listener.forwardX.setTargetAtTime(t,Howler.ctx.currentTime,.1),f.ctx.listener.forwardY.setTargetAtTime(o,Howler.ctx.currentTime,.1),f.ctx.listener.forwardZ.setTargetAtTime(a,Howler.ctx.currentTime,.1),f.ctx.listener.upX.setTargetAtTime(c,Howler.ctx.currentTime,.1),f.ctx.listener.upY.setTargetAtTime(u,Howler.ctx.currentTime,.1),f.ctx.listener.upZ.setTargetAtTime(p,Howler.ctx.currentTime,.1)):f.ctx.listener.setOrientation(t,o,a,c,u,p);else return _;return f},Howl.prototype.init=function(t){return function(o){var a=this;return a._orientation=o.orientation||[1,0,0],a._stereo=o.stereo||null,a._pos=o.pos||null,a._pannerAttr={coneInnerAngle:typeof o.coneInnerAngle<"u"?o.coneInnerAngle:360,coneOuterAngle:typeof o.coneOuterAngle<"u"?o.coneOuterAngle:360,coneOuterGain:typeof o.coneOuterGain<"u"?o.coneOuterGain:0,distanceModel:typeof o.distanceModel<"u"?o.distanceModel:"inverse",maxDistance:typeof o.maxDistance<"u"?o.maxDistance:1e4,panningModel:typeof o.panningModel<"u"?o.panningModel:"HRTF",refDistance:typeof o.refDistance<"u"?o.refDistance:1,rolloffFactor:typeof o.rolloffFactor<"u"?o.rolloffFactor:1},a._onstereo=o.onstereo?[{fn:o.onstereo}]:[],a._onpos=o.onpos?[{fn:o.onpos}]:[],a._onorientation=o.onorientation?[{fn:o.onorientation}]:[],t.call(this,o)}}(Howl.prototype.init),Howl.prototype.stereo=function(t,o){var a=this;if(!a._webAudio)return a;if(a._state!=="loaded")return a._queue.push({event:"stereo",action:function(){a.stereo(t,o)}}),a;var c=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof o>"u")if(typeof t=="number")a._stereo=t,a._pos=[t,0,0];else return a._stereo;for(var u=a._getSoundIds(o),p=0;p"u")if(typeof t=="number")u._pos=[t,o,a];else return u._pos;for(var p=u._getSoundIds(c),f=0;f"u")if(typeof t=="number")u._orientation=[t,o,a];else return u._orientation;for(var p=u._getSoundIds(c),f=0;f"u"&&(a.pannerAttr||(a.pannerAttr={coneInnerAngle:a.coneInnerAngle,coneOuterAngle:a.coneOuterAngle,coneOuterGain:a.coneOuterGain,distanceModel:a.distanceModel,maxDistance:a.maxDistance,refDistance:a.refDistance,rolloffFactor:a.rolloffFactor,panningModel:a.panningModel}),t._pannerAttr={coneInnerAngle:typeof a.pannerAttr.coneInnerAngle<"u"?a.pannerAttr.coneInnerAngle:t._coneInnerAngle,coneOuterAngle:typeof a.pannerAttr.coneOuterAngle<"u"?a.pannerAttr.coneOuterAngle:t._coneOuterAngle,coneOuterGain:typeof a.pannerAttr.coneOuterGain<"u"?a.pannerAttr.coneOuterGain:t._coneOuterGain,distanceModel:typeof a.pannerAttr.distanceModel<"u"?a.pannerAttr.distanceModel:t._distanceModel,maxDistance:typeof a.pannerAttr.maxDistance<"u"?a.pannerAttr.maxDistance:t._maxDistance,refDistance:typeof a.pannerAttr.refDistance<"u"?a.pannerAttr.refDistance:t._refDistance,rolloffFactor:typeof a.pannerAttr.rolloffFactor<"u"?a.pannerAttr.rolloffFactor:t._rolloffFactor,panningModel:typeof a.pannerAttr.panningModel<"u"?a.pannerAttr.panningModel:t._panningModel});else return u=t._soundById(parseInt(o[0],10)),u?u._pannerAttr:t._pannerAttr;else o.length===2&&(a=o[0],c=parseInt(o[1],10));for(var p=t._getSoundIds(c),f=0;f{(n.clientX!==ze||n.clientY!==Ne)&&(de=!0,ze=n.clientX,Ne=n.clientY)}),window.addEventListener("scroll",()=>{ve=!0,de=!1,clearTimeout(Be),Be=setTimeout(()=>{ve=!1},150)},{passive:!0});function Mt(){const n=window.scrollY||document.documentElement.scrollTop;if(I.galleryElement){const t=I.galleryElement.getBoundingClientRect().top+n-window.innerHeight/2;if(n>=t)return T.PEOPLE}if(I.yearSoundElement){const t=I.yearSoundElement.getBoundingClientRect().top+n;if(n>=t)return T.POOL}if(I.featuresElement){const t=I.featuresElement.getBoundingClientRect().top+n+window.innerHeight;if(n>=t)return T.PEOPLE}return T.LEAVES}function ae(n){const i=document.querySelector(".nav_audio_contain .js-nc-int-icon");i&&(n?i.classList.remove("nc-int-icon-state-b"):i.classList.add("nc-int-icon-state-b"))}function Ct(n=500){[B,D,W,V,Y].forEach(i=>{i.fade(i.volume(),0,n)})}function Pt(n=600){setTimeout(()=>{[B,D,W,V,Y].forEach(i=>{i.pause()})},n)}function De(n){if(!L)return;const i=Date.now();if(i-Ce{if(n.matches(":hover")){const t=Ie.play();Ie.volume(xt,t)}K.delete(n)},275);K.set(n,i)}function qt(n){K.has(n)&&(clearTimeout(K.get(n)),K.delete(n))}function Fe(n){if(!L)return;const i=He.play();let t=Oe+Oe*.1*(Math.random()-.5);t=Math.max(0,Math.min(1,t)),He.volume(t,i)}function Bt(){const n=I.audioTrigger;if(n){z.volume(0),z.play();const i=n.querySelector(".js-nc-int-icon");if(i){const t=i.closest("svg");if(t){const o=t.cloneNode(!0);t.parentNode.replaceChild(o,t)}}n.onclick=function(){if(L)Ct(500),z.fade(z.volume(),0,500),Pt(600),setTimeout(()=>z.pause(),600),L=!1,N=null,n.classList.remove("is-playing"),ae(!1),$e();else{z.playing()||z.play(),z.fade(0,Me,1e3);const t=Mt();B.volume(0),B.playing()||B.play(),D.volume(0),D.playing()||D.play(),W.volume(0),W.playing()||W.play(),V.volume(0),V.playing()||V.play(),Y.volume(0),Y.playing()||Y.play(),t===T.PEOPLE?(D.fade(0,le,1e3),N=T.PEOPLE):(B.fade(0,le,1e3),N=T.LEAVES),L=!0,n.classList.add("is-playing"),ae(!0),we()}},n.oncontextmenu=function(t){return t.preventDefault(),se.Howler.volume()>0?(se.Howler.volume(0),n.classList.add("is-muted"),ae(!1),$e()):(se.Howler.volume(1),n.classList.remove("is-muted"),L&&ae(!0),L&&we()),!1}}}function R(n){if(!L||N===n)return;let i,t;switch(N){case T.LEAVES:i=B;break;case T.PEOPLE:i=D;break;case T.POOL:i=W;break;case T.GYM:i=V;break;case T.COWORK:i=Y;break}switch(n){case T.LEAVES:t=B;break;case T.PEOPLE:t=D;break;case T.POOL:t=W;break;case T.GYM:t=V;break;case T.COWORK:t=Y;break}if(t&&!t.playing()&&t.play(),i&&i.fade(i.volume(),0,2e3),t){const o=n===T.COWORK?Lt:le;t.fade(t.volume(),o,2e3)}N=n}function zt(){const n=document.querySelectorAll(".nav_audio_bar");if(n.length!==0)if(n.forEach(function(i){gsap.set(i,{height:"1.25rem",scaleY:.4,transformOrigin:"center center"})}),window.isMobileOrTablet){const i=gsap.to(n,{scaleY:.8,duration:.5,repeat:-1,yoyo:!0,ease:"sine.inOut",paused:!0});ue.push(i)}else n.forEach(function(i){const t=gsap.to(i,{scaleY:function(){return .4+Math.random()*.6},duration:.4,repeat:-1,yoyo:!0,ease:"sine.inOut",repeatRefresh:!0,delay:Math.random()*.5,paused:!0});ue.push(t)})}function we(){ue.forEach(function(n){n.play()})}function $e(){ue.forEach(function(n){n.pause(),n.targets().forEach(function(i){gsap.to(i,{scaleY:.4,duration:.5,ease:"power1.out"})})})}function Nt(n,i,t){n.forEach(o=>{o.addEventListener(i,()=>t(o))})}const Rt=function(){if(typeof ScrollTrigger>"u"){console.error("ScrollTrigger not available - transition sounds will not work");return}document.querySelectorAll("[data-sound-transition]").forEach(function(i,t){ScrollTrigger.create({trigger:i,start:"center 52%",end:"center 48%",onEnter:function(){const o=i.getAttribute("id")||`transition-${t}`;ee.has(o)||(De(),ee.add(o),setTimeout(()=>{ee.delete(o)},2e3))},onEnterBack:function(){const o=i.getAttribute("id")||`transition-${t}`;ee.has(o)||(De(),ee.add(o),setTimeout(()=>{ee.delete(o)},2e3))},once:!1})})};function Dt(){const n=document.querySelectorAll("[data-hover-sound-main]"),i=document.querySelectorAll("[data-hover-sound-text-mask]");Nt(n,"mouseenter",It),i.forEach(t=>{t.addEventListener("mouseenter",()=>Ht(t)),t.addEventListener("mouseleave",()=>qt(t))})}function Ft(){qe||(qe=!0,document.body.addEventListener("click",n=>{if(n.target.closest("[data-hover-sound-main]:not([data-modal-cta]), [data-modal-close]")){Fe();return}n.target.closest("[data-modal-cta]")&&setTimeout(()=>Fe(),180)}))}function $t(){if(window.isMobileOrTablet)return;const n=I.horizontalScrollWrap,i=I.gymCopyElement;if(!n||!i){console.log("Missing horizontal scroll elements for audio triggers");return}setTimeout(function(){ScrollTrigger.create({trigger:n,start:"top top",end:"bottom bottom",scrub:!0,onUpdate:function(t){if(!L)return;const o=t.progress;o>=.6&&o<=.9?N!==T.COWORK&&R(T.COWORK):o>=.25&&o<.6?N!==T.GYM&&R(T.GYM):o<.25?N!==T.POOL&&N!==T.PEOPLE&&R(T.POOL):o>.9&&N!==T.COWORK&&R(T.COWORK)}})},1500)}function Wt(){if(typeof ScrollTrigger>"u"){console.error("ScrollTrigger not available - audio transitions may not work correctly");return}const n=I.featuresElement,i=I.yearSoundElement,t=I.galleryElement,o=I.territoryElement;n&&ScrollTrigger.create({trigger:n,start:"top bottom",end:"bottom top",onEnter:function(){L&&R(T.PEOPLE)},onLeaveBack:function(){L&&R(T.LEAVES)}}),i&&ScrollTrigger.create({trigger:i,start:"center center",end:"bottom top",onEnter:function(){L&&R(T.POOL)},onLeaveBack:function(){L&&R(T.PEOPLE)}}),t&&ScrollTrigger.create({trigger:t,start:"top center",end:"bottom center",onEnter:function(){L&&R(T.PEOPLE)},onLeaveBack:function(){L&&R(T.COWORK)}}),o&&ScrollTrigger.create({trigger:o,start:"top center",end:"bottom center",onEnter:function(){L&&R(T.LEAVES)},onLeaveBack:function(){L&&R(T.PEOPLE)}}),Rt(),Dt(),Ft(),$t()}function We(){if(L)return;z.volume(0),z.playing()||z.play(),z.fade(0,Me,1e3),B.volume(0),B.playing()||B.play(),B.fade(0,le,1e3),D.playing()||(D.volume(0),D.play()),W.playing()||(W.volume(0),W.play()),V.playing()||(V.volume(0),V.play()),Y.playing()||(Y.volume(0),Y.play()),L=!0,N=T.LEAVES;const n=I.audioTrigger;n&&n.classList.add("is-playing"),ae(!0),we()}function Vt(){typeof We=="function"&&We();const n=I.audioTrigger;n&&!n.classList.contains("is-playing")&&n.click()}function Ve(n,i){let t;return function(...a){clearTimeout(t),t=setTimeout(()=>n(...a),i)}}const Ye=991;function te(){const n=window.innerWidth<=Ye,t=("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&window.innerWidth>640,o=n||t;return window.isMobileOrTablet=o,navigator.hardwareConcurrency&&navigator.hardwareConcurrency<=4?window.isLowPowerDevice=!0:window.isLowPowerDevice=!1,o}function Yt(){const n=document.createElement("div");n.id="preloader-scroll-blocker",Object.assign(n.style,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:9990,background:"transparent",pointerEvents:"all"}),document.body.appendChild(n),document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%";const i=t=>(t.preventDefault(),t.stopPropagation(),!1);n.addEventListener("wheel",i,{passive:!1}),n.addEventListener("touchmove",i,{passive:!1})}function Gt(){const n=document.getElementById("preloader-scroll-blocker");n&&n.remove(),document.body.style.overflow="",document.documentElement.style.overflow="",document.body.style.position="",document.body.style.width="",document.documentElement.classList.remove("is-loading"),window.lenis&&typeof window.lenis.start=="function"&&window.lenis.start()}const be=document.querySelector(".unicorn_wrap_1"),Ge=document.querySelector(".gallery_wrap"),Xe=document.querySelector(".hero_sub_wrap.is-territory"),Ue=document.querySelector(".btm-img_wrap")||document.querySelector(".img-btm_blinds_contain.is-btm");function Xt(){pe(),setTimeout(pe,200),new MutationObserver(i=>{for(const t of i)t.attributeName==="class"&&pe()}).observe(document.body,{attributes:!0,attributeFilter:["class"]}),Ge&&ScrollTrigger.create({trigger:Ge,start:"top 50%",onEnter:()=>ne("light"),onLeaveBack:()=>ne("dark")}),Xe&&ScrollTrigger.create({trigger:Xe,start:"top bottom",onEnter:()=>ne("dark","territory enter",!0),onLeaveBack:()=>ne("light","territory leave back",!0)}),Ue&&ScrollTrigger.create({trigger:Ue,start:"center center",onEnter:()=>ne("light"),onLeaveBack:()=>ne("dark")}),window.addEventListener("scroll",()=>{Se()&&pe()})}function Se(){return window.scrollY<50}function pe(){Se()&&document.body.classList.contains("u-theme-light")&&(document.body.classList.remove("u-theme-light"),document.body.classList.add("u-theme-dark"))}function ne(n,i,t=!1){n==="light"&&Se()||(document.body.classList.remove("u-theme-dark","u-theme-light"),document.body.classList.add(`u-theme-${n}`),t&&be&&(be.classList.remove("u-theme-dark","u-theme-light"),be.classList.add(`u-theme-${n}`)))}function Ut(){const n=".hero_animation-trigger",i=".hero_main_wrap",t=".hero_main_svg";if(window.isMobileOrTablet){const a=document.querySelector(i),c=document.querySelector(t);a&&c&&(a.style.transition="transform 0.3s linear, opacity 0.3s linear",c.style.transition="transform 0.3s linear",ScrollTrigger.create({trigger:n,start:"top top",end:"bottom top",onUpdate:u=>{const p=u.progress;a.style.transform=`scale(${1-(1-.65)*p})`,a.style.opacity=1-(1-.75)*p,c.style.transform=`scale(${1-(1-.7)*p})`}}))}else{const a=gsap.timeline({scrollTrigger:{trigger:n,start:"top top",end:"bottom top",scrub:!0}});a.to(i,{scale:.65,opacity:.75,filter:"blur(3px)",rotateZ:-4,force3D:!0}),a.to(t,{scale:.7,force3D:!0},"<")}}function jt(){document.querySelectorAll("[data-button-animate-chars]").forEach(t=>{const o=t.textContent.trim();t.innerHTML="",[...o].forEach((a,c)=>{const u=document.createElement("span");u.textContent=a,u.style.transitionDelay=`${c*.01}s`,a===" "&&(u.style.whiteSpace="pre");const p=document.createElement("div");p.style.overflow="hidden",p.appendChild(u),t.appendChild(p)})})}function Kt(){const n=document.querySelector(".features_blinds_contain.is-top"),i=Array.from(n.children),t={},o={};i.forEach((p,f)=>{t[f]||(t[f]=Math.random()*.25+.05,o[f]=`power${Math.ceil(Math.random()*4)}.inOut`),gsap.set(p,{height:"100%",width:"calc(100% + 2px)",marginLeft:"-1px",scaleY:1,transformOrigin:"top left",willChange:"transform",force3D:!0}),gsap.to(p,{scrollTrigger:{trigger:".features_blinds_trigger",start:"top bottom",end:"bottom top",scrub:.5},scaleY:t[f],ease:o[f]})});const a=document.querySelectorAll(".features_blinds_contain.is-bottom > *"),c={},u={};a.forEach((p,f)=>{c[f]||(c[f]=Math.random()*.5+.5,u[f]=`power${Math.ceil(Math.random()*4)}.inOut`),gsap.set(p,{height:"100%",width:"calc(100% + 2px)",marginLeft:"-1px",scaleY:0,transformOrigin:"bottom left",willChange:"transform",force3D:!0}),gsap.to(p,{scrollTrigger:{trigger:".features_blinds_contain.is-bottom",start:"top+=40lvh bottom",end:"bottom top",scrub:.5},scaleY:c[f],ease:u[f]})})}function Zt(){if(typeof gsap>"u"||typeof ScrollTrigger>"u"){console.error("Required GSAP or ScrollTrigger missing. Ensure both are loaded.");return}document.querySelectorAll("[data-clip-path-in]").forEach(i=>{if(i.hasAttribute("data-clip-initialized"))return;i.setAttribute("data-clip-initialized","true");const t=i.closest(".gallery_img_wrap"),o=t!==null,a=t||i,c=i.getAttribute("data-clip-duration"),u=c!==null?parseFloat(c):1.5;if(window.isMobileOrTablet)gsap.set(i,{opacity:0,clipPath:"none",visibility:"visible"}),ScrollTrigger.create({trigger:a,start:"top 90%",once:!0,onEnter:()=>{gsap.to(i,{opacity:1,duration:Math.min(u*.8,1),ease:"power2.out"})}});else{const p="polygon(0 100%, 100% 100%, 100% 100%, 0 100%)",f="polygon(0 0%, 100% 0%, 100% 100%, 0 100%)";gsap.set(i,{clipPath:p,opacity:1}),o&&gsap.set(i,{zIndex:2,position:"relative"}),ScrollTrigger.create({trigger:a,start:"top 80%",once:!0,onEnter:()=>{gsap.to(i,{clipPath:f,duration:u,ease:"matteoEase"})}})}})}function Qt(){gsap.set(".gallery_unicorn_embed",{opacity:0}),gsap.timeline({scrollTrigger:{trigger:".gallery_wrap",start:"top top",end:"top+=100 top",scrub:.5,markers:!1}}).to(".gallery_unicorn_embed",{opacity:1,ease:"power2.out"}),gsap.timeline({scrollTrigger:{trigger:".year_copy_wrap",start:"bottom-=100 bottom",end:"bottom bottom",scrub:.5,markers:!1}}).to(".gallery_unicorn_embed",{opacity:0,ease:"power2.in"})}function Jt(){if(typeof gsap>"u"||typeof ScrollTrigger>"u"){console.error("[LineReveal] GSAP or ScrollTrigger is missing.");return}const n=document.querySelectorAll("[data-line-in]");if(!n.length){console.log("[LineReveal] No elements found with data-line-in attribute.");return}n.forEach(i=>{if(i.hasAttribute("data-line-initialized"))return;i.setAttribute("data-line-initialized","true");const t=i.hasAttribute("data-line-rtl"),o=i.getAttribute("data-line-duration"),a=o!==null?parseFloat(o):2;gsap.set(i,{scaleX:0,transformOrigin:t?"right center":"left center"}),ScrollTrigger.create({trigger:i,start:"top 85%",once:!0,onEnter:()=>{gsap.to(i,{scaleX:1,duration:a,ease:"matteoEase"})}})})}function en(){document.querySelectorAll(".avail_list_item").forEach(i=>{const t=i.querySelector(".avail_item_button");if(!t)return;const o=.015;i.addEventListener("mousemove",a=>{if(!i.matches(":hover"))return;const c=t.getBoundingClientRect(),u=c.left+c.width/2,p=c.top+c.height/2,f=a.clientX-u,_=a.clientY-p;gsap.to(t,{x:f*o,y:_*o,duration:.3,ease:"power1.out"})}),i.addEventListener("mouseleave",()=>{gsap.to(t,{x:0,y:0,duration:.4,ease:"power2.out"})})})}function tn(){const n="[data-scroll-overlap='true']",i=".cta_wrap",t=document.querySelector(n);if(!t)return;const o=t.previousElementSibling;if(!o)return;if(window.isMobileOrTablet){const c=document.querySelector(i);c&&(gsap.set(c,{scale:1,opacity:1}),c.style.transition="transform 0.3s linear, opacity 0.3s linear",ScrollTrigger.create({trigger:t,start:t.offsetHeight{const p=u.progress;c.style.transform=`scale(${1-(1-.65)*p})`,c.style.opacity=1-(1-.75)*p}}))}else gsap.set(i,{scale:1,opacity:1,filter:"blur(0px)",rotateZ:0}),gsap.timeline({scrollTrigger:{trigger:t,start:t.offsetHeight{n.classList.toggle("w--open"),n.classList.contains("w--open")?rn():je()}),an(),document.addEventListener("click",o=>{n.classList.contains("w--open")&&i&&t&&!i.contains(o.target)&&!t.contains(o.target)&&(n.classList.remove("w--open"),je())}))}function on(){document.querySelectorAll(".nav_link_wrap").forEach((i,t)=>{i.dataset.blockIndex=t,i.querySelectorAll("[data-nav-animate-chars]").forEach(a=>{const c=a.textContent.trim();a.textContent="",[...c].forEach((u,p)=>{const f=document.createElement("span");f.textContent=u,f.dataset.charIndex=p,gsap.set(f,{x:"1.3em"}),u===" "&&(f.style.whiteSpace="pre");const _=document.createElement("div");_.style.overflow="hidden",_.appendChild(f),a.appendChild(_)})})})}function rn(){const n=document.querySelectorAll(".nav_link_wrap");gsap.killTweensOf(".nav_link_wrap [data-nav-animate-chars] span"),n.forEach(i=>{const t=parseInt(i.dataset.blockIndex||0),o=i.querySelectorAll("[data-nav-animate-chars] span");gsap.to(o,{x:0,duration:.8,ease:"power3.out",stagger:{each:.035,from:"start",ease:"power1.in"},delay:t*.08})})}function je(){const n=document.querySelectorAll(".nav_link_wrap");gsap.killTweensOf(".nav_link_wrap [data-nav-animate-chars] span"),n.forEach(i=>{const t=parseInt(i.dataset.blockIndex||0),o=i.querySelectorAll("[data-nav-animate-chars] span");gsap.to(o,{x:"1.3em",duration:.75,ease:"power3.inOut",stagger:{each:.035,from:"start",ease:"power1.in"},delay:t*.08})})}function an(){document.querySelectorAll(".nav_link_wrap").forEach(i=>{i.addEventListener("mouseenter",()=>{if(!document.querySelector(".menu_button.w--open"))return;const t=i.querySelectorAll("[data-nav-animate-chars] span");gsap.killTweensOf(t),gsap.to(t,{x:"-1.3em",duration:.6,ease:"cubic-bezier(0.625, 0.05, 0, 1)",stagger:{each:.02,from:"start",ease:"none"}})}),i.addEventListener("mouseleave",()=>{if(!document.querySelector(".menu_button.w--open"))return;const t=i.querySelectorAll("[data-nav-animate-chars] span");gsap.killTweensOf(t),gsap.to(t,{x:0,duration:.6,ease:"cubic-bezier(0.625, 0.05, 0, 1)",stagger:{each:.02,from:"start",ease:"none"}})})})}function sn(){document.querySelectorAll(".scroll_horizontal_wrap").forEach(n=>{const i=n.querySelector(".scroll_horizontal_inner"),t=n.querySelector(".scroll_horizontal_track"),o=window.isMobileOrTablet||te();n.classList.toggle("mobile-view",o),i.classList.toggle("mobile-view",o),t.classList.toggle("mobile-view",o),o?un(n,i,t):cn(n,i,t)})}function ln(){const n=window.innerWidth<=Ye;document.querySelectorAll(".scroll_horizontal_wrap").forEach(i=>{const t=i.querySelector(".scroll_horizontal_inner"),o=i.querySelector(".scroll_horizontal_track");i.classList.toggle("mobile-view",n),t.classList.toggle("mobile-view",n),o.classList.toggle("mobile-view",n),n?(i.style.height="",o.style.transform="none"):i.style.height=`calc(${o.offsetWidth}px + 100vh)`}),typeof ScrollTrigger<"u"&&ScrollTrigger.refresh()}function cn(n,i,t){const o=()=>{n.style.height=`calc(${t.offsetWidth}px + 100vh)`};o();const a=new ResizeObserver(()=>{window.isMobileOrTablet?(n.style.height="",t.style.transform="",n._resizeObserver&&(n._resizeObserver.disconnect(),delete n._resizeObserver)):(o(),ScrollTrigger.refresh())});n._resizeObserver=a,a.observe(t);const c=gsap.timeline({scrollTrigger:{trigger:n,start:"top top",end:"bottom bottom",scrub:!0},defaults:{ease:"none"}});c.to(t,{xPercent:-100}),t.querySelectorAll(".scroll_pool_heading_overflow").forEach((p,f)=>{const _=p.querySelector(".scroll_big_heading");gsap.set(_,{y:"100%"}),ScrollTrigger.create({trigger:p,containerAnimation:c,start:"left right-=5%",once:!0,onEnter:()=>{gsap.to(_,{y:"0%",duration:1,ease:"power3.out",delay:f*.05})}})}),t.querySelectorAll(".scroll_big_heading.is-cowo.is-1").forEach(p=>{const f=p.closest(".scroll_cowo_hero_wrap");gsap.timeline({scrollTrigger:{trigger:f,containerAnimation:c,start:"left+=20vw right",end:"right left",scrub:.5}}).to(p,{x:"-20%",duration:.5,ease:"power2.out"})}),dn(t,c),hn(t.querySelectorAll('[data-horizontal-text-in]:not([data-horizontal-text-in="opacity"])'),c),mn(t.querySelectorAll('[data-horizontal-text-in="opacity"]'),c),yn(),pn(t,c),fn(t,c)}function un(n,i,t){if(n.style.height="",i.style.width="100%",Object.assign(t.style,{transform:"none",width:"100%",display:"flex",flexDirection:"column"}),!document.getElementById("horizontal-to-vertical-styles")){const a=document.createElement("style");a.id="horizontal-to-vertical-styles",a.textContent=` @media (max-width: 991px) { .scroll_horizontal_wrap.mobile-view { height: auto !important; overflow: visible !important; } .scroll_horizontal_inner.mobile-view { overflow: visible !important; height: auto !important; } .scroll_horizontal_track.mobile-view { position: relative !important; transform: none !important; width: 100% !important; display: flex !important; flex-direction: column !important; left: 0 !important; } .scroll_horizontal_track.mobile-view > * { width: 100% !important; min-width: 100% !important; max-width: 100% !important; margin: 2rem 0 !important; } } `,document.head.appendChild(a)}t.querySelectorAll(".scroll_big_heading, .scroll_gym_heading").forEach((a,c)=>{gsap.set(a,{y:"100%"}),ScrollTrigger.create({trigger:a,start:"top 85%",once:!0,onEnter:()=>{gsap.to(a,{y:"0%",duration:1,ease:"power3.out",delay:Math.min(c*.05,.3)})}})}),t.querySelectorAll("[data-horizontal-text-in]").forEach(a=>{gsap.set(a,{opacity:0,y:"15px"}),ScrollTrigger.create({trigger:a,start:"top 85%",once:!0,onEnter:()=>{gsap.to(a,{opacity:1,y:"0px",duration:.8,ease:"power2.out"})}})}),t.querySelectorAll("[data-line-in-horizontal]").forEach(a=>{const c=a.hasAttribute("data-line-rtl")?"right center":"left center";gsap.set(a,{scaleX:0,transformOrigin:c}),ScrollTrigger.create({trigger:a,start:"top 85%",once:!0,onEnter:()=>{gsap.to(a,{scaleX:1,duration:1,ease:"power3.out"})}})}),t.querySelectorAll("[data-clip-path-in-horizontal]").forEach(a=>{gsap.set(a,{opacity:0}),ScrollTrigger.create({trigger:a,start:"top 85%",once:!0,onEnter:()=>{gsap.to(a,{opacity:1,duration:.8,ease:"power2.out"})}})})}function dn(n,i){n.querySelectorAll(".scroll_gym_heading").forEach((o,a)=>{o.dataset.gymHeadingInitialized||(o.dataset.gymHeadingInitialized="true",gsap.set(o,{y:"100%"}),ScrollTrigger.create({trigger:o,containerAnimation:i,start:"left right-=5%",once:!0,onEnter:()=>{gsap.to(o,{y:"0%",duration:1,ease:"power3.out",delay:a*.05})}}))})}function pn(n,i){n.querySelectorAll("[data-line-in-horizontal]").forEach(o=>{if(o.dataset.lineHorizontalInitialized)return;o.dataset.lineHorizontalInitialized="true";const a=o.hasAttribute("data-line-rtl"),c=parseFloat(o.getAttribute("data-line-duration"))||1.2;o.getAttribute("data-line-ease"),gsap.set(o,{scaleX:0,transformOrigin:a?"right center":"left center"}),ScrollTrigger.create({trigger:o,containerAnimation:i,start:"left right-=15%",once:!0,onEnter:()=>{gsap.to(o,{scaleX:1,duration:c,ease:"matteoEase"})}})})}function fn(n,i){n.querySelectorAll("[data-clip-path-in-horizontal]").forEach(o=>{if(o.dataset.clipHorizontalInitialized)return;o.dataset.clipHorizontalInitialized="true";const a="polygon(0 100%, 100% 100%, 100% 100%, 0 100%)",c="polygon(0 0%, 100% 0%, 100% 100%, 0 100%)",u=parseFloat(o.getAttribute("data-clip-duration"))||1.5;gsap.set(o,{clipPath:a}),ScrollTrigger.create({trigger:o,containerAnimation:i,start:"left right-=20%",once:!0,onEnter:()=>{gsap.to(o,{clipPath:c,duration:u,ease:"matteoEase"})}})})}function hn(n,i){if(!n.length)return;const t=.8,o=.03;n.forEach(a=>{if(a.hasAttribute("data-horizontal-char-animated"))return;Ze(a),a.setAttribute("data-horizontal-char-animated","true");const c=parseFloat(a.getAttribute("data-horizontal-duration"))||t,u=parseFloat(a.getAttribute("data-horizontal-stagger"))||o,p=a.querySelectorAll(".horizontal-animated-char");p.length&&(gsap.set(p,{x:"1rem",opacity:0}),Ke(a,()=>{gsap.to(p,{x:"0em",opacity:1,duration:c,stagger:{amount:Math.min(c*.75,u*p.length),from:"start"},ease:"power2.out"})},i))})}function mn(n,i){if(!n.length)return;const t=.8;n.forEach(o=>{if(o.hasAttribute("data-horizontal-opacity-animated"))return;o.setAttribute("data-horizontal-opacity-animated","true");const a=parseFloat(o.getAttribute("data-horizontal-duration"))||t;gsap.set(o,{opacity:0}),Ke(o,()=>{gsap.to(o,{opacity:1,duration:a,ease:"power2.out"})},i)})}function Ke(n,i,t){if(t){ScrollTrigger.create({trigger:n,start:"center right-=20%",end:"center right",containerAnimation:t,onEnter:i,once:!0});return}const o=n.closest(".scroll_horizontal_wrap");new IntersectionObserver((c,u)=>{c.forEach(p=>{p.isIntersecting&&!n.hasAttribute("data-animated")&&(i(),n.setAttribute("data-animated","true"),u.unobserve(p.target))})},{root:o,threshold:.5}).observe(n)}function Ze(n){if(!n)return;const i=Array.from(n.childNodes);if(i.length===0||i.length===1&&i[0].nodeType===Node.TEXT_NODE){const o=n.textContent;o&&o.trim()&&gn(n);return}i.forEach(o=>{if(o.nodeType===Node.TEXT_NODE)_n(o);else if(o.nodeType===Node.ELEMENT_NODE){const a=o.tagName.toLowerCase();["script","style","svg","canvas","input","textarea","select","button"].includes(a)||Ze(o)}})}function gn(n){const i=n.textContent?n.textContent.trim():"";if(!i)return;n.innerHTML="";const t=document.createElement("span");t.className="horizontal-animated-text-wrapper",i.split(/(\s+)/).forEach(o=>{if(o)if(/^\s+$/.test(o))t.appendChild(document.createTextNode(o));else{const a=document.createElement("span");a.className="horizontal-animated-word",Array.from(o).forEach(c=>{const u=document.createElement("span");u.className="horizontal-char-mask";const p=document.createElement("span");p.className="horizontal-animated-char",p.textContent=c,u.appendChild(p),a.appendChild(u)}),t.appendChild(a)}}),n.appendChild(t)}function _n(n){const i=n.textContent;if(!i||!i.trim())return;const t=document.createDocumentFragment();i.split(/(\s+)/).forEach(o=>{if(o)if(/^\s+$/.test(o))t.appendChild(document.createTextNode(o));else{const a=document.createElement("span");a.className="horizontal-animated-word",Array.from(o).forEach(c=>{const u=document.createElement("span");u.className="horizontal-char-mask";const p=document.createElement("span");p.className="horizontal-animated-char",p.textContent=c,u.appendChild(p),a.appendChild(u)}),t.appendChild(a)}}),n.parentNode.replaceChild(t,n)}function yn(){if(document.getElementById("horizontal-text-animation-styles"))return;const n=document.createElement("style");n.id="horizontal-text-animation-styles",n.textContent=` .horizontal-animated-text-wrapper { display: inline; } .horizontal-animated-word { display: inline-block; white-space: nowrap; } .horizontal-char-mask { display: inline-block; overflow: hidden; vertical-align: top; } .horizontal-animated-char { display: inline-block; position: relative; will-change: transform, opacity; } [data-horizontal-char-animated="true"], [data-horizontal-opacity-animated="true"] { text-align: inherit; text-align-last: inherit; } sup .horizontal-animated-char, sub .horizontal-animated-char { vertical-align: inherit; } `,document.head.appendChild(n)}function vn(){if(typeof gsap>"u"||typeof ScrollTrigger>"u"){console.error("GSAP or ScrollTrigger not found. Ensure both are loaded.");return}const n=t=>window.isMobileOrTablet?{initialScale:1.08,moveDistance:20}:{initialScale:1.2,moveDistance:40},i=document.querySelectorAll("[data-img-parallax]");for(const t of i){if(t.hasAttribute("data-parallax-initialized"))continue;t.setAttribute("data-parallax-initialized","true");const{initialScale:o,moveDistance:a}=n(),c={opacity:1,scale:o,transformOrigin:"center center",will_change:"transform",force3D:!0},u={y:a,ease:"none",force3D:!0,scrollTrigger:{trigger:t,start:"top bottom",end:"bottom top",scrub:window.isMobileOrTablet?.5:1}};gsap.set(t,c),gsap.to(t,u)}}function wn(){const n=i=>{if(window.isMobileOrTablet)return-50;const t=i.clientHeight,o=-300;return o+t/500*(-10-o)};document.querySelectorAll(".gallery_img_wrap").forEach(i=>{gsap.set(i,{opacity:1}),gsap.to(i,{y:n(i),ease:"none",scrollTrigger:{trigger:i,start:"top bottom",end:"bottom top",scrub:window.isMobileOrTablet?.5:1}})})}function bn(){const n=document.querySelector(".btm-img_wrap");n&&window.getComputedStyle(n).position==="static"&&(n.style.position="relative"),document.querySelectorAll(".img-btm_blinds_contain.is-top > .img-btm_blind").forEach(i=>{const t=Math.random()*.4+.6,o=Math.random()*.2,a=`power${Math.ceil(Math.random()*4)}.inOut`;gsap.set(i,{height:"100%",width:"calc(100% + 2px)",marginLeft:"-1px",scaleY:t,transformOrigin:"top left",willChange:"transform",force3D:!0}),gsap.to(i,{scrollTrigger:{trigger:".btm-img_wrap",start:"top bottom",end:"bottom top",scrub:.5},scaleY:o,ease:a})}),document.querySelectorAll(".img-btm_blinds_contain.is-btm > .img-btm_blind").forEach(i=>{const t=Math.random()*.5+.5,o=`power${Math.ceil(Math.random()*4)}.inOut`;gsap.set(i,{height:"100%",width:"calc(100% + 2px)",marginLeft:"-1px",scaleY:0,transformOrigin:"bottom left",willChange:"transform",force3D:!0}),gsap.to(i,{scrollTrigger:{trigger:".btm-img_wrap",start:"center bottom",end:"bottom top",scrub:.5},scaleY:t,ease:o})})}function Sn(){if(typeof gsap>"u"){console.error("Required GSAP missing. Ensure gsap is loaded.");return}const n=document.querySelectorAll(".g_visual_wrap"),i=new Map;n.forEach((u,p)=>{if(u.dataset.hoverInitialized)return;u.dataset.hoverInitialized="true";const f=u.querySelector(".img_info_p")||u.querySelector(".img_info_prompt_wrap p");if(!f||!f.textContent.trim())return;const _=f.textContent.trim();gsap.set(f,{opacity:0}),u.addEventListener("mouseenter",()=>a(u,f,_,p)),u.addEventListener("mouseleave",()=>c(u,f,_,p))});function t(u){return u.split(" ").map(o).join(" ")}function o(u){const p=u.split("");for(let f=p.length-1;f>0;f--){const _=Math.floor(Math.random()*(f+1));[p[f],p[_]]=[p[_],p[f]]}return p.join("")}function a(u,p,f,_){var m;(m=i.get(u))==null||m.kill();const{height:S,width:e}=p.getBoundingClientRect(),r=document.createElement("style");r.id=`fixed-style-${_}`,r.textContent=` #fixed-style-${_} ~ p { height: ${S}px !important; width: ${e}px !important; overflow: hidden !important; display: -webkit-box !important; -webkit-box-orient: vertical !important; } `,p.parentNode.insertBefore(r,p),p.textContent=t(f);const s=gsap.timeline({onComplete:()=>p.textContent=f});i.set(u,s),s.to(p,{opacity:1,duration:.3,delay:.15,ease:"power2.out"});const d=12,h=gsap.timeline();for(let l=0;l{p.textContent=f.split(" ").map(v=>{const y=v.split("");return y.map((A,E)=>Math.random(){p.textContent=f,p.style.display="none",p.offsetHeight,p.style.display=""}})}}function Tn(){let n=document.querySelectorAll(".modal-wrap[data-modal]"),i=!1,t=null,o=null,a=[],c=window.lenis,u=!1,p=null;n.forEach(l=>{l.style.position="fixed",l.style.top="0",l.style.left="0",l.style.width="100%",l.style.height="100%",l.style.zIndex="9999",l.style.pointerEvents="none",l.style.display="none",l.style.overflow="hidden",l.querySelectorAll(".modal_bg_overlay, .modal_bg, .modal_card, .modal_scroll").forEach(y=>{y.style.pointerEvents="auto"});const v=l.querySelector(".modal_card");v&&An(v)}),document.body.addEventListener("click",l=>{const g=l.target.closest("[data-modal-cta]");if(!g||l.target.closest("[copy-trigger]"))return;const v=g.getAttribute("data-modal-cta");if(!v)return;const y=document.querySelector(`.modal-wrap[data-modal="${v}"]`);y&&(t&&m(!0),h(y))});function f(){const l=document.querySelectorAll("[data-horizontal-scroll]");l.length>0&&(p={},l.forEach((v,y)=>{p[y]={section:v,left:v.scrollLeft,top:v.scrollTop}})),c&&typeof c.stop=="function"&&(u=!0,c.stop());const g=document.createElement("div");g.id="modal-event-blocker",g.style.position="fixed",g.style.top="0",g.style.left="0",g.style.width="100%",g.style.height="100%",g.style.zIndex="9998",g.style.pointerEvents="all",g.style.background="transparent",document.body.appendChild(g),document.addEventListener("wheel",e,{passive:!1}),document.addEventListener("touchmove",_,{passive:!1}),document.addEventListener("keydown",r,!1)}function _(l){if(s(l)){const g=S(l.target);if(!g||g._isTouchScrolling===!0)return;const v=g.scrollTop,y=g.scrollHeight,A=g.clientHeight,k=l.touches[0].clientY;if(!g._lastTouchY){g._lastTouchY=k;return}const O=g._lastTouchY-k;g._lastTouchY=k;const b=v<=1,M=v+A>=y-1;(b&&O<0||M&&O>0)&&l.preventDefault()}else l.preventDefault()}function S(l){for(;l;){if(l.classList&&l.classList.contains("modal_scroll"))return l;l=l.parentElement}return null}function e(l){s(l)||l.preventDefault()}function r(l){if(s(l))return;if({32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1}[l.keyCode])return e(l),!1}function s(l){if(!t)return!1;let g=l.target;for(;g;){if(g.classList&&g.classList.contains("modal_scroll"))return!0;g=g.parentElement}return!1}function d(){const l=document.getElementById("modal-event-blocker");l&&l.remove(),document.removeEventListener("wheel",e,{passive:!1}),document.removeEventListener("touchmove",_,{passive:!1}),document.removeEventListener("keydown",r,!1),c&&u&&typeof c.start=="function"&&(c.start(),u=!1),p&&(Object.values(p).forEach(g=>{g.section&&(g.section.scrollLeft=g.left,g.section.scrollTop=g.top)}),p=null)}function h(l){t=l,i=!0;const g=l.querySelector(".modal_bg_overlay"),v=l.querySelector(".modal_bg"),y=l.querySelector(".modal_card"),A=l.querySelector(".modal_scroll"),E=l.querySelector(".modal_btn-close"),k=document.querySelectorAll(".scroll_horizontal_wrap");k.length>0&&(l.setAttribute("data-opened-in-horizontal","true"),k.forEach(P=>{P.style.visibility="visible";const x=P.querySelector(".scroll_horizontal_track");if(x){const H=window.getComputedStyle(x).zIndex;x.setAttribute("data-original-z-index",H||"auto"),x.style.zIndex="1",x.style.visibility="visible"}})),E&&!E.hasAttribute("data-modal-close")&&E.setAttribute("data-modal-close","");const O=l.querySelectorAll("[data-split='lines'] .single-line, .modal_p .single-line, h1 .single-line, h2 .single-line, h3 .single-line, h4 .single-line, h5 .single-line, h6 .single-line"),b=l.querySelectorAll("[data-modal-custom-in]"),M=l.querySelectorAll("[data-modal-reveal]");if(O&&O.length>0&&gsap.set(O,{y:"120%",opacity:1}),b&&b.length>0&&gsap.set(b,{opacity:0}),M&&M.length>0&&gsap.set(M,{yPercent:20,autoAlpha:0}),l.style.display="block",y&&(y.style.display="flex"),f(),o=gsap.timeline(),o.fromTo(g,{opacity:0},{opacity:1,duration:.7,ease:"power2.out"}),o.fromTo(v,{...window.isMobileOrTablet?{yPercent:100,xPercent:0}:{xPercent:100,yPercent:0}},{...window.isMobileOrTablet?{yPercent:0}:{xPercent:0},duration:.7,ease:"matteoEase"},"-=0.5"),A&&o.fromTo(A,{...window.isMobileOrTablet?{yPercent:100,xPercent:0}:{xPercent:100,yPercent:0}},{...window.isMobileOrTablet?{yPercent:0}:{xPercent:0},duration:.7,ease:"matteoEase"},"-=0.6"),O&&O.length>0&&o.fromTo(O,{y:"120%",opacity:1},{y:"0%",opacity:1,stagger:.03,duration:1,ease:"power2.out"},"-=0.7"),a.forEach(P=>P.kill()),a=[],b&&b.length>0&&b.forEach(P=>{const x=parseFloat(P.getAttribute("data-modal-custom-in"))||.65,H=gsap.fromTo(P,{opacity:0},{opacity:1,duration:.6,ease:"power2.out",delay:x});a.push(H)}),M&&M.length>0){let P=0;M.forEach(x=>{const H=parseFloat(x.getAttribute("data-modal-reveal")),q=isNaN(H)?.75:H,ie=.05*P,ho=gsap.fromTo(x,{yPercent:20,autoAlpha:0},{yPercent:0,autoAlpha:1,duration:.6,ease:"power2.out",delay:q+ie});a.push(ho),P++})}E&&setTimeout(()=>{t===l&&E.classList.add("is-active")},500)}function m(l=!1){if(!t)return;o&&(o.kill(),o=null),a.forEach(x=>x.kill()),a=[];const g=t,v=g.querySelector(".modal_bg_overlay"),y=g.querySelector(".modal_bg"),A=g.querySelector(".modal_scroll"),E=g.querySelector(".modal_btn-close");g.hasAttribute("data-opened-in-horizontal")&&(document.querySelectorAll(".scroll_horizontal_wrap").forEach(H=>{const q=H.querySelector(".scroll_horizontal_track");if(q){const ie=q.getAttribute("data-original-z-index");ie&&(q.style.zIndex=ie,q.removeAttribute("data-original-z-index"))}}),g.removeAttribute("data-opened-in-horizontal"));const k=g.querySelectorAll("[data-split='lines'] .single-line, .modal_p .single-line, h1 .single-line, h2 .single-line, h3 .single-line, h4 .single-line, h5 .single-line, h6 .single-line"),O=g.querySelectorAll("[data-modal-custom-in]"),b=g.querySelectorAll("[data-modal-reveal]");if(E&&E.classList.remove("is-active"),l){g.style.display="none",i=!1,t=null,d();return}const M=gsap.timeline({onComplete:()=>{g.style.display="none",i=!1,t=null,d()}});k&&k.length>0&&M.to(k,{y:"120%",stagger:{each:.01,from:"end"},duration:.6,ease:"power2.out"});const P=[...Array.from(O),...Array.from(b)];P.length>0&&P.forEach(x=>{x.hasAttribute("data-modal-reveal")?gsap.to(x,{yPercent:20,autoAlpha:0,duration:.4,ease:"power2.out"}):gsap.to(x,{opacity:0,duration:.4,ease:"power2.out"})}),A&&M.to(A,{...window.isMobileOrTablet?{yPercent:100}:{xPercent:100},duration:.6,ease:"matteoEase"},"<+=0.09"),M.to(y,{...window.isMobileOrTablet?{yPercent:100}:{xPercent:100},duration:.6,ease:"matteoEase"},"<+=0.2"),M.to(v,{opacity:0,duration:.5,ease:"power2.out"},"<+=0.1")}document.body.addEventListener("click",l=>{l.target.closest("[data-modal-close]")&&m()}),document.addEventListener("keydown",l=>{l.key==="Escape"&&i&&m()}),document.querySelectorAll(".modal_scroll").forEach(l=>{l.style.overflow="auto",l.style.overflowX="hidden",l.style.overflowY="auto",l.style.pointerEvents="auto";const g=()=>{l.scrollLeft!==0&&(l.scrollLeft=0)};l.addEventListener("scroll",g,{passive:!0}),l._wheelHandler&&l.removeEventListener("wheel",l._wheelHandler),l._wheelHandler=function(y){if(Math.abs(y.deltaX)>0)return y.preventDefault(),y.stopPropagation(),!1;const A=this.scrollTop,E=this.scrollHeight,k=this.clientHeight,O=y.deltaY,b=A<=0,M=A+k>=E-1;if(b&&O<0||M&&O>0)return y.preventDefault(),y.stopPropagation(),!1},l.addEventListener("wheel",l._wheelHandler,{passive:!1}),document._hasExtraWheelHandler||(document.addEventListener("wheel",function(y){if(i){let A=!1,E=y.target;for(;E&&!A;){if(E.classList&&E.classList.contains("modal_scroll")){A=!0;break}E=E.parentElement}if(!A)return y.preventDefault(),y.stopPropagation(),!1}},{passive:!1,capture:!0}),document._hasExtraWheelHandler=!0),l._touchHandler&&l.removeEventListener("touchmove",l._touchHandler),l._touchStartY=null,l._touchStartX=null,l._lastTouchY=null,l._isTouchScrolling=!1,l.addEventListener("touchstart",function(y){y.touches.length===1&&(l._isTouchScrolling=!1,l._touchStartY=y.touches[0].clientY,l._touchStartX=y.touches[0].clientX,l._lastTouchY=l._touchStartY,l.setAttribute("data-touch-active","start"))},{passive:!0}),l.addEventListener("touchend",function(){l._touchStartY=null,l._touchStartX=null,l._lastTouchY=null,l._isTouchScrolling=!1,l.removeAttribute("data-touch-active")},{passive:!0}),l._touchHandler=function(y){if(y.touches.length!==1||l._touchStartY===null)return;l.setAttribute("data-touch-active","move");const A=y.touches[0].clientY,E=y.touches[0].clientX,k=l._lastTouchY-A,O=l._touchStartX-E;if(Math.abs(O)>Math.abs(k)*1.5){y.preventDefault();return}const b=this.scrollTop,M=this.scrollHeight,P=this.clientHeight,x=b<=1,H=b+P>=M-1;x&&k<0||H&&k>0?(y.preventDefault(),l.setAttribute("data-touch-boundary",x?"at-top":"at-bottom")):(l.removeAttribute("data-touch-boundary"),l._isTouchScrolling=!0),l._lastTouchY=A},l.addEventListener("touchmove",l._touchHandler,{passive:!1});const v=l.getAttribute("style")||"";if(v.includes("scrollbar-width")||l.setAttribute("style",v+"; scrollbar-width: none; -ms-overflow-style: none;"),!document.getElementById("hide-horizontal-scrollbar")){const y=document.createElement("style");y.id="hide-horizontal-scrollbar",y.textContent=".modal_scroll::-webkit-scrollbar-horizontal { display: none !important; }",document.head.appendChild(y)}})}function An(n){n=n||document;let i=n.querySelectorAll('[data-split="lines"]');if(i.length===0||typeof SplitText>"u")return null;try{if(n.classList.contains("modal_card")){let t=n.closest(".modal-wrap");if(t){const o=t.style.display,a=t.style.visibility,c=t.style.opacity;t.style.display="block",t.style.visibility="hidden",t.style.opacity="0",gsap.set(i,{opacity:1,visibility:"visible",display:"block"});let u=new SplitText(i,{type:"lines",linesClass:"single-line",lineThreshold:.4});n.querySelectorAll(".single-line").forEach(f=>{if(!f.parentNode.classList.contains("single-line-wrap")){let _=document.createElement("div");_.classList.add("single-line-wrap"),_.style.overflow="hidden",f.parentNode.insertBefore(_,f),_.appendChild(f)}gsap.set(f,{y:"120%",opacity:1,display:"block",position:"relative"})}),t.style.display=o,t.style.visibility=a,t.style.opacity=c}}else{gsap.set(i,{opacity:1,visibility:"visible",display:"block"});let t=new SplitText(i,{type:"lines",linesClass:"single-line",lineThreshold:.4});n.querySelectorAll(".single-line").forEach(a=>{if(!a.parentNode.classList.contains("single-line-wrap")){let c=document.createElement("div");c.classList.add("single-line-wrap"),c.style.overflow="hidden",a.parentNode.insertBefore(c,a),c.appendChild(a)}gsap.set(a,{y:"120%",opacity:1,display:"block",position:"relative"})})}return!0}catch{return null}}function En(){if(!(window.isMobileOrTablet||te()))gsap.to(".gallery_text_inner-wrap",{scrollTrigger:{trigger:".gallery_text_trigger",start:"top bottom",end:"bottom center",scrub:!0},x:"-66%",ease:"power4.out"}),gsap.to(".gallery_text",{scrollTrigger:{trigger:".gallery_text_sticky",start:"bottom bottom",end:"center top",scrub:!0},y:"-150%",ease:"none"});else{const i=document.querySelector(".gallery_text_inner-wrap"),t=document.querySelector(".gallery_text");i&&gsap.set(i,{x:0,clearProps:"x,transform"}),t&&gsap.set(t,{y:0,clearProps:"y,transform"})}}function xn(){if(!(window.isMobileOrTablet||te()))gsap.to(".avail_text_inner-wrap",{scrollTrigger:{trigger:".avail_text_trigger",start:"top bottom",end:"bottom center",scrub:!0,markers:!1},x:"-70%",ease:"power3.out"});else{const i=document.querySelector(".avail_text_inner-wrap");i&&gsap.set(i,{x:0,clearProps:"x,transform"})}}function Ln(){document.querySelectorAll(".avail_grid_item").forEach(i=>{i.querySelectorAll(".avail_item_text, .avail_item_meta_title, .avail_item_number, .avail_line_title").forEach(o=>{o.setAttribute("data-animate-chars","");const a=o.textContent.trim(),c=document.createDocumentFragment();[...a].forEach((u,p)=>{const f=document.createElement("span");f.textContent=u,f.style.setProperty("--char-index",p),u===" "&&(f.style.whiteSpace="pre");const _=document.createElement("div");_.style.overflow="hidden",_.style.display="inline-block",_.appendChild(f),c.appendChild(_)}),o.textContent="",o.appendChild(c)})})}function kn(){const i=document.querySelector(".nav_m_count.is-number");if(!i||!window.ScrollTrigger){console.error("Could not initialize counter: Missing element or ScrollTrigger.");return}i.textContent="0",ScrollTrigger.create({trigger:"body",start:"top top",end:"bottom bottom",scrub:.5,onUpdate:({progress:t})=>{const o=Math.round(t*150);i.textContent!==String(o)&&(i.textContent=o)}})}function On(){const n=navigator.userAgent.toLowerCase(),i=n.indexOf("safari")!==-1&&n.indexOf("chrome")===-1,t=/applewebkit/.test(n);return i||t&&!n.includes("chrome")&&!n.includes("chromium")}function Qe(n){return{textAlign:n.textAlign,textAlignLast:n.textAlignLast,fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:n.fontWeight,lineHeight:n.lineHeight,letterSpacing:n.letterSpacing,wordSpacing:n.wordSpacing,color:n.color,width:n.width,maxWidth:n.maxWidth,minWidth:n.minWidth}}function Mn(n){const i=window.getComputedStyle(n),t=Qe(i);if(typeof SplitText<"u")try{new SplitText(n,{type:"lines",linesClass:"safari-split-line"}),n.querySelectorAll(".safari-split-line").forEach((a,c)=>{const u=document.createElement("div");u.className="safari-line-wrapper",u.style.overflow="hidden",u.style.width="100%";const p=document.createElement("div");p.className="safari-animated-line",p.innerHTML=a.innerHTML,Object.keys(t).forEach(f=>{t[f]&&t[f]!=="auto"&&(p.style[f]=t[f])}),a.parentNode.insertBefore(u,a),u.appendChild(p),a.remove()})}catch(o){console.warn("SplitText failed, using manual line splitting:",o),Je(n,t)}else console.warn("SplitText not available, using manual line splitting"),Je(n,t)}function Je(n,i){if(!i){const c=window.getComputedStyle(n);i=Qe(c)}const t=n.textContent;let o=t.split(/\n/);if(o.length===1&&(o=t.split(//i)),o.length===1){const c=t.split(/\.\s+/);c.length>1&&(o=c.map((u,p)=>p{if(c.trim()){const u=document.createElement("div");u.className="safari-line-wrapper",u.style.overflow="hidden",u.style.width="100%";const p=document.createElement("div");p.className="safari-animated-line",p.textContent=c.trim(),Object.keys(i).forEach(f=>{i[f]&&i[f]!=="auto"&&(p.style[f]=i[f])}),u.appendChild(p),a.appendChild(u)}}),n.appendChild(a)}function et(n){n&&Array.from(n.childNodes).forEach(i=>{i.nodeType===Node.TEXT_NODE?Cn(i):i.nodeType===Node.ELEMENT_NODE&&et(i)})}function Cn(n){const i=n.textContent;if(!i.trim())return;const t=document.createDocumentFragment();i.split(/(\s+)/).forEach(a=>{if(a)if(/^\s+$/.test(a))t.appendChild(document.createTextNode(a));else{const c=document.createElement("span");c.className="animated-word",[...a].forEach(u=>{const p=document.createElement("span");p.className="char-mask";const f=document.createElement("span");f.className="animated-char",f.textContent=u,p.appendChild(f),c.appendChild(p)}),t.appendChild(c)}}),n.parentNode&&n.parentNode.replaceChild(t,n)}function tt(){const i=On();document.querySelectorAll("[data-text-in]").forEach(o=>{if(o.hasAttribute("data-char-animated"))return;const a=o.getAttribute("data-text-in-duration"),c=a?parseFloat(a):1;if(o.setAttribute("data-char-animated","true"),window.isMobileOrTablet)gsap.set(o,{opacity:0}),gsap.to(o,{opacity:1,duration:c,ease:"power2.out",scrollTrigger:{trigger:o,start:"top 86%",once:!0}});else if(i){Mn(o);const u=o.querySelectorAll(".safari-animated-line");u.length>0&&(gsap.set(u,{y:"100%",opacity:1}),gsap.fromTo(u,{y:"100%"},{y:"0%",duration:c,stagger:{amount:c*.3,from:"start"},ease:"power2.out",scrollTrigger:{trigger:o,start:"top 86%",once:!0}}))}else{et(o);const u=o.querySelectorAll(".animated-char");u.length>0&&gsap.fromTo(u,{x:"0.75rem",opacity:0},{x:"0em",opacity:1,duration:c,stagger:{amount:c,from:"start"},ease:"power2.out",scrollTrigger:{trigger:o,start:"top 86%",once:!0}})}})}if(!document.getElementById("char-animation-styles")){const n=document.createElement("style");n.id="char-animation-styles",n.textContent=` .animated-word { display: inline-block; white-space: nowrap; } .char-mask { display: inline-block; overflow: hidden; vertical-align: top; } .animated-char { display: inline-block; position: relative; will-change: transform, opacity; } /* Safari line animation styles */ .safari-line-wrapper { overflow: hidden; display: block; width: 100%; } .safari-animated-line { display: block; position: relative; will-change: transform; width: 100%; /* Force block display for proper text justification */ box-sizing: border-box; } .safari-split-line { display: block; width: 100%; } [data-char-animated="true"] { text-align: justify; text-align-last: auto; } `,document.head.appendChild(n)}const Pn=250;let nt,ot=window.innerWidth;const it=991;window.addEventListener("resize",()=>{clearTimeout(nt),nt=setTimeout(()=>{const n=window.innerWidth,i=ot<=it,t=n<=it;(i&&!t||!i&&t)&&(document.querySelectorAll("[data-char-animated]").forEach(o=>{if(o.removeAttribute("data-char-animated"),gsap.killTweensOf(o,!0),!window.isMobileOrTablet&&(o.querySelectorAll(".animated-char").length>0||o.querySelectorAll(".safari-animated-line").length>0)){const a=o.textContent;o.innerHTML=a}}),tt()),ot=n},Pn)});const Te=1985,In=2025,rt=document.querySelectorAll(".year_number");rt.forEach(n=>{n.textContent=Te}),ScrollTrigger.create({trigger:".year_trigger_1",start:"top bottom",end:"bottom bottom",scrub:1,onUpdate:n=>{const i=gsap.parseEase("power2.out")(n.progress),t=Math.floor(Te+(In-Te)*i);rt.forEach(o=>{o.textContent=t})}});function at(n){const t=[];if(n){t.push("0% 0%"),t.push("100% 0%");for(let o=0;o<16;o++){const a=100-o*6.25;t.push(`${a}% 100%`)}t.push("0% 100%")}else{t.push("0% 100%"),t.push("100% 100%");for(let o=0;o<16;o++){const a=100-o*6.25;t.push(`${a}% 0%`)}t.push("0% 0%")}return`polygon(${t.join(", ")})`}const st=[n=>100*(1-Math.pow(n,.7)),n=>100*(1-Math.pow(n,1.4)),n=>100*(1-n),n=>100*(1-Math.pow(n,.5)),n=>100*Math.cos(n*Math.PI/2),n=>100*(1-Math.pow(n,1.2)),n=>100*(1-Math.pow(n,.8)),n=>100*(1-Math.pow(n,1.5)),n=>100*(1-Math.pow(n,.6)),n=>100*(1-Math.pow(n,1.1)),n=>100*(1-Math.pow(n,.9)),n=>100*(1-Math.pow(n,1.3)),n=>100*(1-Math.pow(n,.65)),n=>100*(1-Math.pow(n,1.25)),n=>100*(1-Math.pow(n,.75)),n=>100*(1-Math.pow(n,1.15))],lt=[n=>100*Math.pow(n,.9),n=>100*Math.pow(n,1.2),n=>100*n,n=>100*Math.pow(n,.7),n=>100*Math.sin(n*Math.PI/2),n=>100*Math.pow(n,1.3),n=>100*Math.pow(n,.6),n=>100*Math.pow(n,1.1),n=>100*Math.pow(n,.8),n=>100*Math.pow(n,.5),n=>100*Math.pow(n,1.4),n=>100*Math.pow(n,.65),n=>100*(1-Math.cos(n*Math.PI/2)),n=>100*Math.pow(n,1.25),n=>100*Math.pow(n,.85),n=>100*Math.pow(n,.95)];function Hn(n){const t=["0% 0%","100% 0%"];for(let o=0;o<16;o++){const a=st[o](n),c=100-o*6.25;if(o===0)t.push(`${c}% ${a}%`);else{const u=100-(o-1)*6.25;t.push(`${u}% ${a}%`),t.push(`${c}% ${a}%`)}}return t.push(`0% ${st[15](n)}%`),t.push("0% 0%"),t}function qn(n){const t=["0% 100%","100% 100%"];for(let o=0;o<16;o++){const a=lt[o](n),c=100-o*6.25;if(o===0)t.push(`${c}% ${a}%`);else{const u=100-(o-1)*6.25;t.push(`${u}% ${a}%`),t.push(`${c}% ${a}%`)}}return t.push(`0% ${lt[15](n)}%`),t.push("0% 100%"),t}function Bn(){const n=at(!0),i=at(!1);gsap.set(".year_half.is-1",{clipPath:n}),gsap.set(".year_half.is-2",{clipPath:i});const t=gsap.timeline({scrollTrigger:{trigger:".year_trigger_2",start:"top top",end:"bottom top",scrub:.5,onUpdate:function(a){o(a.progress)}}});function o(a){const c=Hn(a),u=qn(a);gsap.set(".year_half.is-1",{clipPath:`polygon(${c.join(", ")})`}),gsap.set(".year_half.is-2",{clipPath:`polygon(${u.join(", ")})`})}t.to({},{duration:1})}function zn(){const n={trigger:".year_trigger_2",start:"top top",end:"bottom top",scrub:!0,markers:!1},i=gsap.timeline({scrollTrigger:n});i.to(".year_number_holder.is-btm",{y:"45svh",ease:"power1.in"}),i.to(".year_number_holder.is-top",{y:"-45svh",ease:"power1.in"},"<")}function Nn(){if(window.isMobileOrTablet){gsap.set(".year_img",{x:"0",clearProps:"x"});return}gsap.timeline({scrollTrigger:{trigger:".year_trigger_3",start:"top top",end:"bottom top",scrub:!0,markers:!1}}).to(".year_img",{x:"-100%",ease:"none"})}function Rn(){document.querySelectorAll("[copy-trigger]").forEach(n=>{n.addEventListener("click",()=>{const i=n.closest(".img_info_bottom");if(!i)return;const t=i.querySelector("[copy-target]");t&&setTimeout(()=>{const o=t.textContent.trim().replace(/^==\s*\$\d+\s*/,"");navigator.clipboard.writeText(o).then(()=>console.log("Text copied to clipboard:",o)).catch(a=>{console.error("Clipboard copy failed:",a)})},300)})})}var Dn="1.1.18";function ct(n,i,t){return Math.max(n,Math.min(i,t))}function Fn(n,i,t){return(1-t)*n+t*i}function $n(n,i,t,o){return Fn(n,i,1-Math.exp(-t*o))}function Wn(n,i){return(n%i+i)%i}var Vn=class{constructor(){w(this,"isRunning",!1);w(this,"value",0);w(this,"from",0);w(this,"to",0);w(this,"currentTime",0);w(this,"lerp");w(this,"duration");w(this,"easing");w(this,"onUpdate")}advance(n){var t;if(!this.isRunning)return;let i=!1;if(this.duration&&this.easing){this.currentTime+=n;const o=ct(0,this.currentTime/this.duration,1);i=o>=1;const a=i?1:this.easing(o);this.value=this.from+(this.to-this.from)*a}else this.lerp?(this.value=$n(this.value,this.to,this.lerp*60,n),Math.round(this.value)===this.to&&(this.value=this.to,i=!0)):(this.value=this.to,i=!0);i&&this.stop(),(t=this.onUpdate)==null||t.call(this,this.value,i)}stop(){this.isRunning=!1}fromTo(n,i,{lerp:t,duration:o,easing:a,onStart:c,onUpdate:u}){this.from=this.value=n,this.to=i,this.lerp=t,this.duration=o,this.easing=a,this.currentTime=0,this.isRunning=!0,c==null||c(),this.onUpdate=u}};function Yn(n,i){let t;return function(...o){let a=this;clearTimeout(t),t=setTimeout(()=>{t=void 0,n.apply(a,o)},i)}}var Gn=class{constructor(n,i,{autoResize:t=!0,debounce:o=250}={}){w(this,"width",0);w(this,"height",0);w(this,"scrollHeight",0);w(this,"scrollWidth",0);w(this,"debouncedResize");w(this,"wrapperResizeObserver");w(this,"contentResizeObserver");w(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});w(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});w(this,"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)});this.wrapper=n,this.content=i,t&&(this.debouncedResize=Yn(this.resize,o),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(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(){var n,i;(n=this.wrapperResizeObserver)==null||n.disconnect(),(i=this.contentResizeObserver)==null||i.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},ut=class{constructor(){w(this,"events",{})}emit(n,...i){var o;let t=this.events[n]||[];for(let a=0,c=t.length;a{var o;this.events[n]=(o=this.events[n])==null?void 0:o.filter(a=>i!==a)}}off(n,i){var t;this.events[n]=(t=this.events[n])==null?void 0:t.filter(o=>i!==o)}destroy(){this.events={}}},dt=100/6,j={passive:!1},Xn=class{constructor(n,i={wheelMultiplier:1,touchMultiplier:1}){w(this,"touchStart",{x:0,y:0});w(this,"lastDelta",{x:0,y:0});w(this,"window",{width:0,height:0});w(this,"emitter",new ut);w(this,"onTouchStart",n=>{const{clientX:i,clientY:t}=n.targetTouches?n.targetTouches[0]:n;this.touchStart.x=i,this.touchStart.y=t,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:n})});w(this,"onTouchMove",n=>{const{clientX:i,clientY:t}=n.targetTouches?n.targetTouches[0]:n,o=-(i-this.touchStart.x)*this.options.touchMultiplier,a=-(t-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=i,this.touchStart.y=t,this.lastDelta={x:o,y:a},this.emitter.emit("scroll",{deltaX:o,deltaY:a,event:n})});w(this,"onTouchEnd",n=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:n})});w(this,"onWheel",n=>{let{deltaX:i,deltaY:t,deltaMode:o}=n;const a=o===1?dt:o===2?this.window.width:1,c=o===1?dt:o===2?this.window.height:1;i*=a,t*=c,i*=this.options.wheelMultiplier,t*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:i,deltaY:t,event:n})});w(this,"onWindowResize",()=>{this.window={width:window.innerWidth,height:window.innerHeight}});this.element=n,this.options=i,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,j),this.element.addEventListener("touchstart",this.onTouchStart,j),this.element.addEventListener("touchmove",this.onTouchMove,j),this.element.addEventListener("touchend",this.onTouchEnd,j)}on(n,i){return this.emitter.on(n,i)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,j),this.element.removeEventListener("touchstart",this.onTouchStart,j),this.element.removeEventListener("touchmove",this.onTouchMove,j),this.element.removeEventListener("touchend",this.onTouchEnd,j)}},pt=class{constructor({wrapper:n=window,content:i=document.documentElement,eventsTarget:t=n,smoothWheel:o=!0,syncTouch:a=!1,syncTouchLerp:c=.075,touchInertiaMultiplier:u=35,duration:p,easing:f=A=>Math.min(1,1.001-Math.pow(2,-10*A)),lerp:_=.1,infinite:S=!1,orientation:e="vertical",gestureOrientation:r="vertical",touchMultiplier:s=1,wheelMultiplier:d=1,autoResize:h=!0,prevent:m,virtualScroll:l,overscroll:g=!0,autoRaf:v=!1,__experimental__naiveDimensions:y=!1}={}){w(this,"_isScrolling",!1);w(this,"_isStopped",!1);w(this,"_isLocked",!1);w(this,"_preventNextNativeScrollEvent",!1);w(this,"_resetVelocityTimeout",null);w(this,"__rafID",null);w(this,"isTouching");w(this,"time",0);w(this,"userData",{});w(this,"lastVelocity",0);w(this,"velocity",0);w(this,"direction",0);w(this,"options");w(this,"targetScroll");w(this,"animatedScroll");w(this,"animate",new Vn);w(this,"emitter",new ut);w(this,"dimensions");w(this,"virtualScroll");w(this,"onPointerDown",n=>{n.button===1&&this.reset()});w(this,"onVirtualScroll",n=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(n)===!1)return;const{deltaX:i,deltaY:t,event:o}=n;if(this.emitter.emit("virtual-scroll",{deltaX:i,deltaY:t,event:o}),o.ctrlKey||o.lenisStopPropagation)return;const a=o.type.includes("touch"),c=o.type.includes("wheel");this.isTouching=o.type==="touchstart"||o.type==="touchmove";const u=i===0&&t===0;if(this.options.syncTouch&&a&&o.type==="touchstart"&&u&&!this.isStopped&&!this.isLocked){this.reset();return}const f=this.options.gestureOrientation==="vertical"&&t===0||this.options.gestureOrientation==="horizontal"&&i===0;if(u||f)return;let _=o.composedPath();_=_.slice(0,_.indexOf(this.rootElement));const S=this.options.prevent;if(_.find(m=>{var l,g,v;return m instanceof HTMLElement&&(typeof S=="function"&&(S==null?void 0:S(m))||((l=m.hasAttribute)==null?void 0:l.call(m,"data-lenis-prevent"))||a&&((g=m.hasAttribute)==null?void 0:g.call(m,"data-lenis-prevent-touch"))||c&&((v=m.hasAttribute)==null?void 0:v.call(m,"data-lenis-prevent-wheel")))}))return;if(this.isStopped||this.isLocked){o.preventDefault();return}if(!(this.options.syncTouch&&a||this.options.smoothWheel&&c)){this.isScrolling="native",this.animate.stop(),o.lenisStopPropagation=!0;return}let r=t;this.options.gestureOrientation==="both"?r=Math.abs(t)>Math.abs(i)?t:i:this.options.gestureOrientation==="horizontal"&&(r=i),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&(this.animatedScroll>0&&this.animatedScroll0||this.animatedScroll===this.limit&&t<0))&&(o.lenisStopPropagation=!0),o.preventDefault();const s=a&&this.options.syncTouch,h=a&&o.type==="touchend"&&Math.abs(r)>5;h&&(r=this.velocity*this.options.touchInertiaMultiplier),this.scrollTo(this.targetScroll+r,{programmatic:!1,...s?{lerp:h?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});w(this,"onNativeScroll",()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){const n=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-n,this.direction=Math.sign(this.animatedScroll-n),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}});w(this,"raf",n=>{const i=n-(this.time||n);this.time=n,this.animate.advance(i*.001),this.options.autoRaf&&(this.__rafID=requestAnimationFrame(this.raf))});window.lenisVersion=Dn,(!n||n===document.documentElement||n===document.body)&&(n=window),this.options={wrapper:n,content:i,eventsTarget:t,smoothWheel:o,syncTouch:a,syncTouchLerp:c,touchInertiaMultiplier:u,duration:p,easing:f,lerp:_,infinite:S,gestureOrientation:r,orientation:e,touchMultiplier:s,wheelMultiplier:d,autoResize:h,prevent:m,virtualScroll:l,overscroll:g,autoRaf:v,__experimental__naiveDimensions:y},this.dimensions=new Gn(n,i,{autoResize:h}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new Xn(t,{touchMultiplier:s,wheelMultiplier:d}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoRaf&&(this.__rafID=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this.__rafID&&cancelAnimationFrame(this.__rafID)}on(n,i){return this.emitter.on(n,i)}off(n,i){return this.emitter.off(n,i)}setScroll(n){this.isHorizontal?this.rootElement.scrollLeft=n:this.rootElement.scrollTop=n}resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){this.isStopped&&(this.reset(),this.isStopped=!1)}stop(){this.isStopped||(this.reset(),this.isStopped=!0)}scrollTo(n,{offset:i=0,immediate:t=!1,lock:o=!1,duration:a=this.options.duration,easing:c=this.options.easing,lerp:u=this.options.lerp,onStart:p,onComplete:f,force:_=!1,programmatic:S=!0,userData:e}={}){if(!((this.isStopped||this.isLocked)&&!_)){if(typeof n=="string"&&["top","left","start"].includes(n))n=0;else if(typeof n=="string"&&["bottom","right","end"].includes(n))n=this.limit;else{let r;if(typeof n=="string"?r=document.querySelector(n):n instanceof HTMLElement&&(n!=null&&n.nodeType)&&(r=n),r){if(this.options.wrapper!==window){const d=this.rootElement.getBoundingClientRect();i-=this.isHorizontal?d.left:d.top}const s=r.getBoundingClientRect();n=(this.isHorizontal?s.left:s.top)+this.animatedScroll}}if(typeof n=="number"){if(n+=i,n=Math.round(n),this.options.infinite?S&&(this.targetScroll=this.animatedScroll=this.scroll):n=ct(0,n,this.limit),n===this.targetScroll){p==null||p(this),f==null||f(this);return}if(this.userData=e??{},t){this.animatedScroll=this.targetScroll=n,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),f==null||f(this),this.userData={};return}S||(this.targetScroll=n),this.animate.fromTo(this.animatedScroll,n,{duration:a,easing:c,lerp:u,onStart:()=>{o&&(this.isLocked=!0),this.isScrolling="smooth",p==null||p(this)},onUpdate:(r,s)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=r-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=r,this.setScroll(this.scroll),S&&(this.targetScroll=r),s||this.emit(),s&&(this.reset(),this.emit(),f==null||f(this),this.userData={},this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.__experimental__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 this.options.orientation==="horizontal"}get actualScroll(){return this.isHorizontal?this.rootElement.scrollLeft:this.rootElement.scrollTop}get scroll(){return this.options.infinite?Wn(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(n){this._isScrolling!==n&&(this._isScrolling=n,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(n){this._isStopped!==n&&(this._isStopped=n,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(n){this._isLocked!==n&&(this._isLocked=n,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let n="lenis";return this.isStopped&&(n+=" lenis-stopped"),this.isLocked&&(n+=" lenis-locked"),this.isScrolling&&(n+=" lenis-scrolling"),this.isScrolling==="smooth"&&(n+=" lenis-smooth"),n}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 Un(){if(!(window.isMobileOrTablet||te())&&!window.lenis&&typeof pt=="function"){if(window.lenis=new pt({duration:1.2,easing:o=>Math.min(1,1.001-Math.pow(2,-10*o)),direction:"vertical",gestureDirection:"vertical",smooth:!0,smoothWheel:!0,wheelMultiplier:1,smoothTouch:!1,touchMultiplier:2,infinite:!1,lerp:.02,normalizeWheel:!0}),!window.lenisRafActive){const o=a=>{window.lenis.raf(a),requestAnimationFrame(o)};requestAnimationFrame(o),window.lenisRafActive=!0}typeof ScrollTrigger<"u"&&window.lenis&&(window.lenis.on("scroll",ScrollTrigger.update),gsap.ticker.add(o=>{window.lenis&&window.lenis.raf(o*1e3)}))}function i(){window.isMobileOrTablet&&window.lenis&&(window.lenis.destroy(),window.lenis=null,window.lenisRafActive=!1,document.documentElement.classList.remove("lenis","lenis-smooth","lenis-scrolling"),document.body.classList.remove("lenis","lenis-smooth","lenis-scrolling"),document.documentElement.style.removeProperty("scroll-behavior"),document.body.style.removeProperty("scroll-behavior"),document.documentElement.style.removeProperty("overflow"),document.body.style.removeProperty("overflow"))}new ResizeObserver(Ve(()=>{var o;te(),i(),(o=ScrollTrigger==null?void 0:ScrollTrigger.refresh)==null||o.call(ScrollTrigger)},250)).observe(document.body),i()}const _o="modulepreload",yo=function(n){return"/"+n},vo={},jn=function(i,t,o){let a=Promise.resolve();function c(u){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=u,window.dispatchEvent(p),!p.defaultPrevented)throw u}return a.then(u=>{for(const p of u||[])p.status==="rejected"&&c(p.reason);return i().catch(c)})},G={sceneUrl:"https://prod.spline.design/6Dsvz-KpkE4PS48l/scene.splinecode",containerId:"spline-main-scene",runtimeUrl:"https://unpkg.com/@splinetool/runtime@latest/build/runtime.js",buttonMap:{"button-cascade":"trigger_cascade","button-normal":"trigger_normal","button-uber":"trigger_uber","button-trains":"trigger_trains"},eventToEmit:"keyUp"};let C=null,fe=!1,he=!1,oe=!0,ft=null,Ae=null;function ht(){if(!C||!oe)return;console.log("[🔴 Spline] PAUSING render - scrolled out of view"),oe=!1;const n=document.querySelector(`#${G.containerId} canvas`);n&&(n.style.visibility="hidden"),C.pause&&C.pause(),C.stop&&C.stop()}function Ee(){if(!C||oe)return;console.log("[🟢 Spline] RESUMING render - scrolled into view"),oe=!0;const n=document.querySelector(`#${G.containerId} canvas`);n&&(n.style.visibility="visible"),C.play&&C.play(),C.start&&C.start()}function Kn(){const n=document.getElementById(G.containerId);n&&(console.log("[📊 Spline] Setting up visibility monitoring"),ft=new IntersectionObserver(i=>{i.forEach(t=>{t.isIntersecting?Ee():ht()})},{rootMargin:"50px",threshold:0}),ft.observe(n),document.addEventListener("visibilitychange",()=>{if(document.hidden)console.log("[🔴 Spline] Browser tab hidden - pausing"),ht();else if(C){const i=n.getBoundingClientRect();i.top0&&(console.log("[🟢 Spline] Browser tab visible & in viewport - resuming"),Ee())}}))}function Zn(){return console.log("[📦 Spline] Loading runtime..."),new Promise((n,i)=>{if(window.SplineRuntime){n();return}const t=document.createElement("script");t.type="module",t.textContent=` import { Application } from '${G.runtimeUrl}'; window.SplineRuntime = { Application }; `,t.onerror=()=>i(new Error("Failed to load Spline runtime")),document.head.appendChild(t),setTimeout(()=>{if(window.SplineRuntime)n();else{const o=document.createElement("script");o.src=G.runtimeUrl,o.onload=()=>{setTimeout(n,100)},o.onerror=i,document.head.appendChild(o)}},100)})}async function Qn(){if(he){console.log("[⚠️ Spline] Already initialized, skipping");return}he=!0;try{console.log("[🚀 Spline] STARTING INITIALIZATION - User scrolled to Spline!"),console.log(`[📍 Spline] Time: ${new Date().toLocaleTimeString()}`);const n=document.getElementById(G.containerId);if(!n){console.warn("[❌ Spline] Container not found");return}let i=n.querySelector("canvas");if(i||(console.log("[🎨 Spline] Creating canvas..."),i=document.createElement("canvas"),i.style.width="100%",i.style.height="100%",n.appendChild(i)),await Zn(),!window.SplineRuntime||!window.SplineRuntime.Application){const o=await jn(()=>import("https://unpkg.com/@splinetool/runtime@latest/build/runtime.js"),void 0);window.SplineRuntime={Application:o.Application}}if(!window.SplineRuntime||!window.SplineRuntime.Application)throw new Error("Spline Application class not available");console.log("[🔨 Spline] Creating application...");const{Application:t}=window.SplineRuntime;C=new t(i),console.log("[🌐 Spline] Loading scene..."),await C.load(G.sceneUrl),fe=!0,console.log("[✅ Spline] Scene loaded successfully!"),Jn(),Kn(),window.dispatchEvent(new CustomEvent("splineReady",{detail:{app:C}}))}catch(n){console.error("[❌ Spline] Initialization failed:",n)}}function Jn(){if(!C||!fe){console.warn("[⚠️ Spline] Cannot set up buttons - scene not loaded");return}console.log("[🔘 Spline] Setting up button interactions");for(const[n,i]of Object.entries(G.buttonMap)){const t=document.getElementById(n);t&&(t.removeEventListener("click",t._splineClickHandler),t._splineClickHandler=()=>{if(!C||!fe){console.warn("[⚠️ Spline] Scene not ready");return}oe||Ee(),console.log(`[🔘 Spline] Button "${n}" clicked`);try{C.emitEvent(G.eventToEmit,i)}catch(o){console.error("[❌ Spline] Failed to emit event:",o)}},t.addEventListener("click",t._splineClickHandler))}}function eo(){if(typeof window>"u")return;console.log("[👀 Spline] Setting up LAZY LOAD observer - NOT loading yet!");const n=document.getElementById(G.containerId);if(!n){console.warn("[❌ Spline] Container not found");return}Ae=new IntersectionObserver(i=>{i.forEach(t=>{t.isIntersecting&&!he&&(console.log("[👁️ Spline] Container NOW VISIBLE - Starting load!"),Qn(),Ae.unobserve(t.target))})},{rootMargin:"200px",threshold:0}),Ae.observe(n),console.log("[✅ Spline] Lazy load observer ready - will load when scrolled into view")}window.splineStatus=()=>{console.log("=== SPLINE STATUS ==="),console.log("Initialized:",he),console.log("Loaded:",fe),console.log("Visible:",oe),console.log("App exists:",!!C),console.log("===================")};let Z=null;function to(n){return!n||typeof gsap>"u"?Promise.resolve():new Promise(i=>{if(gsap.killTweensOf(n),!document.getElementById("percent-char-style")){const a=document.createElement("style");a.id="percent-char-style",a.textContent=` .percent-char { display: inline-block; position: relative; will-change: transform, opacity, filter; } `,document.head.appendChild(a)}const t=n.textContent;n.innerHTML="",t.split("").forEach(a=>{const c=document.createElement("span");c.className="percent-char",c.textContent=a,n.appendChild(c)});const o=n.querySelectorAll(".percent-char");gsap.to(o,{x:"-2rem",filter:"blur(5px)",opacity:0,duration:.8,stagger:.1,ease:"power2.in",onComplete:()=>{n.style.visibility="hidden",i()}})})}function no(n){return new Promise(i=>{const t=new XMLHttpRequest;t.open("GET",n,!0),t.responseType="blob",t.onload=()=>i({url:n,success:t.status===200}),t.onerror=()=>i({url:n,success:!1}),t.send()})}async function oo(){const n=Array.from(document.images).filter(o=>o.src&&o.getAttribute("loading")!=="lazy"),i=n.length;let t=0;if(i===0){Q.images=1,ge();return}await Promise.all(n.map(async o=>{await no(o.src),t++,Q.images=t/i,ge()}))}async function io(){const n=document.querySelector(".hero_wrap [data-bunny-background-init]");n&&(console.log("Waiting for hero video to be ready..."),await ro(n)),Q.videos=1,ge()}function ro(n){return new Promise(i=>{let t=0;const o=80,a=()=>{const c=n.getAttribute("data-player-status");c==="ready"||c==="playing"?(console.log("Hero video ready!"),i()):t>=o?(console.warn("Hero video timeout, proceeding anyway"),i()):(t++,setTimeout(a,100))};a()})}function ao(){const n=[Ut,jt,Kt,Zt,Qt,Jt,en,tn,nn,vn,wn,bn,Sn,Tn,kn,Ln,En,xn,zn,Nn,Bn,tt,X,J,zt,Bt,Wt,Rn,Xt,sn,Un];window.isMobileOrTablet||te()||n.push(()=>{window.addEventListener("resize",Ve(ln,150))});let t=0;const o=n.length;function a(){if(t=1&&typeof Z=="function"&&(Z(),Z=null)}function lo(n){const i=n*100;co(i)}function co(n){me&&(typeof gsap<"u"?gsap.to(me,{innerText:Math.round(n),duration:.8,ease:"power2.out",snap:{innerText:1},onUpdate:function(){me.textContent=`${Math.round(this.targets()[0].innerText)}%`}}):me.textContent=`${Math.round(n)}%`)}function uo(){return new Promise(async i=>{Z=i,await Promise.all([oo(),io()]),ao(),setTimeout(()=>{typeof Z=="function"&&(Z(),Z=null)},1e4)})}function mt(){console.log("Button clicked!"),window.buttonClicked=!0,window.dispatchEvent(new Event("loaderButtonClicked")),Vt(),Gt(),Tt(),setTimeout(()=>{const n=document.getElementById("preloader-scroll-blocker");n&&(console.log("Backup: force removing scroll blocker"),n.remove()),document.body.style.overflow="",document.documentElement.style.overflow="",document.body.style.position="",document.body.style.width="",document.documentElement.classList.remove("is-loading"),window.lenis&&typeof window.lenis.start=="function"&&window.lenis.start(),setTimeout(()=>{const i=document.getElementById("preloader-scroll-blocker");i&&(console.error("Scroll still blocked! Force clearing everything"),i.remove(),document.body.style.cssText="",document.documentElement.style.cssText="")},500)},1e3)}function po(){var i,t,o;try{Yt(),vt(),wt();const a=document.querySelector(".loader_percent"),c=gsap.timeline({paused:!0,onComplete:()=>console.log("Main animation timeline complete")});uo().then(()=>{const u=setInterval(()=>{parseInt(a.textContent,10)>=100&&(clearInterval(u),to(a).then(()=>{gt(c)}))},50)})}catch(a){console.error("Preloader error:",a),(i=document.getElementById("preloader-scroll-blocker"))==null||i.remove(),(o=(t=window.lenis)==null?void 0:t.start)==null||o.call(t)}const n=document.querySelector(".btn-wrap.is-loader");n&&(n.removeEventListener("click",mt),n.addEventListener("click",mt))}function fo(){var n,i,t;typeof gsap<"u"?((n=gsap.registerPlugin)==null||n.call(gsap,ScrollTrigger),(i=gsap.registerPlugin)==null||i.call(gsap,SplitText),(t=gsap.registerPlugin)==null||t.call(gsap,CustomEase),CustomEase==null||CustomEase.create("customEase","0.83, 0, 0.17, 1"),CustomEase.create("matteoEase","0.625, 0.05, 0, 1")):console.warn("GSAP not found - preloader will use fallback animations")}"scrollRestoration"in history&&(history.scrollRestoration="manual"),window.scrollTo(0,0),window.location.hash&&(window.location.hash=""),document.addEventListener("DOMContentLoaded",()=>{window.scrollTo(0,0),setTimeout(()=>{console.log("[🎯 Main] Initializing Spline lazy loader"),eo()},100)}),fo(),po()})();