vevet
Version:
Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.
96 lines (78 loc) • 140 kB
JavaScript
"use strict";var Vevet=(()=>{var pn=Object.create;var zt=Object.defineProperty;var un=Object.getOwnPropertyDescriptor;var dn=Object.getOwnPropertyNames;var fn=Object.getPrototypeOf,mn=Object.prototype.hasOwnProperty;var ut=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports),_n=(s,t)=>{for(var e in t)zt(s,e,{get:t[e],enumerable:!0})},Bi=(s,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of dn(t))!mn.call(s,r)&&r!==e&&zt(s,r,{get:()=>t[r],enumerable:!(i=un(t,r))||i.enumerable});return s};var zi=(s,t,e)=>(e=s!=null?pn(fn(s)):{},Bi(t||!s||!s.__esModule?zt(e,"default",{value:s,enumerable:!0}):e,s)),gn=s=>Bi(zt({},"__esModule",{value:!0}),s);var us=ut((ka,ps)=>{var os=!1,ot,Ce,Re,Vt,Ht,as,Ut,De,ke,je,ls,Be,ze,cs,hs;function X(){if(!os){os=!0;var s=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(s),e=/(Mac OS X)|(Windows)|(Linux)/.exec(s);if(Be=/\b(iPhone|iP[ao]d)/.exec(s),ze=/\b(iP[ao]d)/.exec(s),je=/Android/i.exec(s),cs=/FBAN\/\w+;/i.exec(s),hs=/Mobile/i.exec(s),ls=!!/Win64/.exec(s),t){ot=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,ot&&document&&document.documentMode&&(ot=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(s);as=i?parseFloat(i[1])+4:ot,Ce=t[2]?parseFloat(t[2]):NaN,Re=t[3]?parseFloat(t[3]):NaN,Vt=t[4]?parseFloat(t[4]):NaN,Vt?(t=/(?:Chrome\/(\d+\.\d+))/.exec(s),Ht=t&&t[1]?parseFloat(t[1]):NaN):Ht=NaN}else ot=Ce=Re=Ht=Vt=NaN;if(e){if(e[1]){var r=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(s);Ut=r?parseFloat(r[1].replace("_",".")):!0}else Ut=!1;De=!!e[2],ke=!!e[3]}else Ut=De=ke=!1}}var Le={ie:function(){return X()||ot},ieCompatibilityMode:function(){return X()||as>ot},ie64:function(){return Le.ie()&&ls},firefox:function(){return X()||Ce},opera:function(){return X()||Re},webkit:function(){return X()||Vt},safari:function(){return Le.webkit()},chrome:function(){return X()||Ht},windows:function(){return X()||De},osx:function(){return X()||Ut},linux:function(){return X()||ke},iphone:function(){return X()||Be},mobile:function(){return X()||Be||ze||je||hs},nativeApp:function(){return X()||cs},android:function(){return X()||je},ipad:function(){return X()||ze}};ps.exports=Le});var fs=ut((ja,ds)=>{"use strict";var Xt=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Qn={canUseDOM:Xt,canUseWorkers:typeof Worker!="undefined",canUseEventListeners:Xt&&!!(window.addEventListener||window.attachEvent),canUseViewport:Xt&&!!window.screen,isInWorker:!Xt};ds.exports=Qn});var vs=ut((Ba,gs)=>{"use strict";var ms=fs(),_s;ms.canUseDOM&&(_s=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function Kn(s,t){if(!ms.canUseDOM||t&&!("addEventListener"in document))return!1;var e="on"+s,i=e in document;if(!i){var r=document.createElement("div");r.setAttribute(e,"return;"),i=typeof r[e]=="function"}return!i&&_s&&s==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}gs.exports=Kn});var Es=ut((za,Ss)=>{"use strict";var Gn=us(),Jn=vs(),bs=10,ws=40,ys=800;function xs(s){var t=0,e=0,i=0,r=0;return"detail"in s&&(e=s.detail),"wheelDelta"in s&&(e=-s.wheelDelta/120),"wheelDeltaY"in s&&(e=-s.wheelDeltaY/120),"wheelDeltaX"in s&&(t=-s.wheelDeltaX/120),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(t=e,e=0),i=t*bs,r=e*bs,"deltaY"in s&&(r=s.deltaY),"deltaX"in s&&(i=s.deltaX),(i||r)&&s.deltaMode&&(s.deltaMode==1?(i*=ws,r*=ws):(i*=ys,r*=ys)),i&&!t&&(t=i<1?-1:1),r&&!e&&(e=r<1?-1:1),{spinX:t,spinY:e,pixelX:i,pixelY:r}}xs.getEventType=function(){return Gn.firefox()?"DOMMouseScroll":Jn("wheel")?"wheel":"mousewheel"};Ss.exports=xs});var Os=ut((La,Ps)=>{Ps.exports=Es()});var Jr=ut((Bt,Et)=>{var _o=1/0,Lr=9007199254740991,go=4294967295,vo="[object Function]",bo="[object GeneratorFunction]",wo="[object RegExp]",yo="[object Symbol]",xo=/^(?:0|[1-9]\d*)$/,Ri="\\ud800-\\udfff",Nr="\\u0300-\\u036f\\ufe20-\\ufe23",Fr="\\u20d0-\\u20f0",Wr="\\ufe0e\\ufe0f",So="["+Ri+"]",Ai="["+Nr+Fr+"]",Ci="\\ud83c[\\udffb-\\udfff]",Eo="(?:"+Ai+"|"+Ci+")",$r="[^"+Ri+"]",Vr="(?:\\ud83c[\\udde6-\\uddff]){2}",Hr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ur="\\u200d",Xr=Eo+"?",Yr="["+Wr+"]?",Po="(?:"+Ur+"(?:"+[$r,Vr,Hr].join("|")+")"+Yr+Xr+")*",Oo=Yr+Xr+Po,Mo="(?:"+[$r+Ai+"?",Ai,Vr,Hr,So].join("|")+")",To=RegExp(Ci+"(?="+Ci+")|"+Mo+Oo,"g"),Io=RegExp("["+Ur+Ri+Nr+Fr+Wr+"]"),qr=typeof global=="object"&&global&&global.Object===Object&&global,Ao=typeof self=="object"&&self&&self.Object===Object&&self,Co=qr||Ao||Function("return this")(),Qr=typeof Bt=="object"&&Bt&&!Bt.nodeType&&Bt,Cr=Qr&&typeof Et=="object"&&Et&&!Et.nodeType&&Et,Ro=Cr&&Cr.exports===Qr,Rr=Ro&&qr.process,Dr=function(){try{return Rr&&Rr.binding("util")}catch(s){}}(),kr=Dr&&Dr.isRegExp;function Do(s){return s.split("")}function ko(s){return function(t){return s(t)}}function Kr(s){return Io.test(s)}function jo(s){return Kr(s)?Bo(s):Do(s)}function Bo(s){return s.match(To)||[]}var zo=Object.prototype,Di=zo.toString,jr=Co.Symbol,Br=jr?jr.prototype:void 0,zr=Br?Br.toString:void 0;function Lo(s){return ki(s)&&Di.call(s)==wo}function No(s,t,e){var i=-1,r=s.length;t<0&&(t=-t>r?0:r+t),e=e>r?r:e,e<0&&(e+=r),r=t>e?0:e-t>>>0,t>>>=0;for(var n=Array(r);++i<r;)n[i]=s[i+t];return n}function Gr(s){if(typeof s=="string")return s;if(Qo(s))return zr?zr.call(s):"";var t=s+"";return t=="0"&&1/s==-_o?"-0":t}function Fo(s,t,e){var i=s.length;return e=e===void 0?i:e,!t&&e>=i?s:No(s,t,e)}function Wo(s,t){return t=t==null?Lr:t,!!t&&(typeof s=="number"||xo.test(s))&&s>-1&&s%1==0&&s<t}function $o(s,t,e){if(!ki(e))return!1;var i=typeof t;return(i=="number"?Ho(e)&&Wo(t,e.length):i=="string"&&t in e)?Vo(e[t],s):!1}function Vo(s,t){return s===t||s!==s&&t!==t}function Ho(s){return s!=null&&Xo(s.length)&&!Uo(s)}function Uo(s){var t=ki(s)?Di.call(s):"";return t==vo||t==bo}function Xo(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Lr}function ki(s){var t=typeof s;return!!s&&(t=="object"||t=="function")}function Yo(s){return!!s&&typeof s=="object"}var qo=kr?ko(kr):Lo;function Qo(s){return typeof s=="symbol"||Yo(s)&&Di.call(s)==yo}function Ko(s){return s==null?"":Gr(s)}function Go(s,t,e){return e&&typeof e!="number"&&$o(s,t,e)&&(t=e=void 0),e=e===void 0?go:e>>>0,e?(s=Ko(s),s&&(typeof t=="string"||t!=null&&!qo(t))&&(t=Gr(t),!t&&Kr(s))?Fo(jo(s),0,e):s.split(t,e)):[]}Et.exports=Go});var ea={};_n(ea,{Callbacks:()=>U,Canvas:()=>st,CanvasMedia:()=>Mt,Cursor:()=>gt,EaseInBack:()=>We,EaseInBounce:()=>$e,EaseInCirc:()=>Ve,EaseInCubic:()=>He,EaseInElastic:()=>Ue,EaseInExpo:()=>Xe,EaseInOutBack:()=>Ye,EaseInOutBounce:()=>qe,EaseInOutCirc:()=>Qe,EaseInOutCubic:()=>Ke,EaseInOutElastic:()=>Ge,EaseInOutExpo:()=>Je,EaseInOutQuad:()=>Ze,EaseInOutQuart:()=>ti,EaseInOutQuint:()=>ei,EaseInOutSine:()=>ii,EaseInQuad:()=>si,EaseInQuart:()=>ri,EaseInQuint:()=>ni,EaseInSine:()=>oi,EaseOutBack:()=>ai,EaseOutBounce:()=>it,EaseOutCirc:()=>li,EaseOutCubic:()=>lt,EaseOutElastic:()=>ci,EaseOutExpo:()=>hi,EaseOutQuad:()=>pi,EaseOutQuart:()=>ui,EaseOutQuint:()=>di,EaseOutSine:()=>fi,InView:()=>It,Marquee:()=>At,Module:()=>P,Pointers:()=>Ct,Preloader:()=>Rt,ProgressPreloader:()=>Dt,Raf:()=>$,Responsive:()=>Qt,ScrollProgress:()=>ue,Scrollbar:()=>pe,Snap:()=>St,SnapSlide:()=>xt,SplitText:()=>Se,Swipe:()=>ht,Timeline:()=>V,addEventListener:()=>y,app:()=>ta,clamp:()=>x,clampScope:()=>Yt,closest:()=>ft,damp:()=>Fe,easing:()=>mi,inRange:()=>_i,initVevet:()=>w,lerp:()=>I,loop:()=>F,normalizeWheel:()=>Ne,onResize:()=>q,presetCssVars:()=>Cs,scoped:()=>at,toPixels:()=>A,uid:()=>Ae,vevet:()=>ln});var Li=function(s,t,e){if(e||arguments.length===2)for(var i=0,r=t.length,n;i<r;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return s.concat(n||Array.prototype.slice.call(t))},vn=function(){function s(t,e,i){this.name=t,this.version=e,this.os=i,this.type="browser"}return s}();var bn=function(){function s(t){this.version=t,this.type="node",this.name="node",this.os=process.platform}return s}();var wn=function(){function s(t,e,i,r){this.name=t,this.version=e,this.os=i,this.bot=r,this.type="bot-device"}return s}();var yn=function(){function s(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return s}();var xn=function(){function s(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return s}();var Sn=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,En=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Ni=3,Pn=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",Sn]],Fi=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function $i(s){return s?Wi(s):typeof document=="undefined"&&typeof navigator!="undefined"&&navigator.product==="ReactNative"?new xn:typeof navigator!="undefined"?Wi(navigator.userAgent):Tn()}function On(s){return s!==""&&Pn.reduce(function(t,e){var i=e[0],r=e[1];if(t)return t;var n=r.exec(s);return!!n&&[i,n]},!1)}function Wi(s){var t=On(s);if(!t)return null;var e=t[0],i=t[1];if(e==="searchbot")return new yn;var r=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);r?r.length<Ni&&(r=Li(Li([],r,!0),In(Ni-r.length),!0)):r=[];var n=r.join("."),o=Mn(s),a=En.exec(s);return a&&a[1]?new wn(e,n,o,a[1]):new vn(e,n,o)}function Mn(s){for(var t=0,e=Fi.length;t<e;t++){var i=Fi[t],r=i[0],n=i[1],o=n.exec(s);if(o)return r}return null}function Tn(){var s=typeof process!="undefined"&&process.version;return s?new bn(process.version.slice(1)):null}function In(s){for(var t=[],e=0;e<s;e++)t.push("0");return t}var An=Object.defineProperty,Cn=Object.defineProperties,Rn=Object.getOwnPropertyDescriptors,Vi=Object.getOwnPropertySymbols,Dn=Object.prototype.hasOwnProperty,kn=Object.prototype.propertyIsEnumerable,Hi=(s,t,e)=>t in s?An(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,Lt=(s,t)=>{for(var e in t||(t={}))Dn.call(t,e)&&Hi(s,e,t[e]);if(Vi)for(var e of Vi(t))kn.call(t,e)&&Hi(s,e,t[e]);return s},Nt=(s,t)=>Cn(s,Rn(t));var jn="Window is not available and no user agent was provided.",Bn=()=>{var s,t;if(typeof window!="undefined"){let e=((s=window==null?void 0:window.navigator)==null?void 0:s.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.vendor)||(window==null?void 0:window.opera);if(e)return e}return console.error(jn),""},Ft={isInApp:!1,appKey:void 0,appName:void 0,skipped:!1},zn=s=>s.match(/(iPhone|iPad|iPod|Macintosh)/)!==null,Ln=({skip:s,appKey:t,ua:e})=>{if(!s||s.length===0)return!1;let i=zn(e);return s.some(({appKey:r,platform:n})=>t===r&&(!n||i&&n==="apple"||!i&&n==="android"))},ra=new RegExp(/Mozilla\/5\.0 \([^\)]+\) AppleWebKit\/[^\s]+ \(KHTML, like Gecko\) Version\/[^\s]+ (Mobile\/[^\s]+ )?Safari\/[^\s]+$/);var Nn=()=>"TelegramWebview"in window||"TelegramWebviewProxy"in window||"TelegramWebviewProxyProto"in window,Ui={telegram:{name:"Telegram"}},Fn=()=>{if(typeof window!="undefined"&&Nn())return"telegram"},na=Object.keys(Ui),Oe={messenger:{regex:/(\bFB[\w_]+\/(Messenger))|(^(?!.*\buseragents)(?!.*\bIABMV).*(FB_IAB|FBAN).*)/i,name:"Facebook Messenger"},instagram:{regex:/\bInstagram/i,name:"Instagram"},facebook:{regex:/\bFB[\w_]+\/|\bFacebook/i,name:"Facebook"},twitter:{regex:/\bTwitter/i,name:"Twitter"},line:{regex:/\bLine\//i,name:"Line"},wechat:{regex:/\bMicroMessenger\//i,name:"WeChat"},threads:{regex:/\bBarcelona/i,name:"Threads"},tiktok:{regex:/musical_ly|Bytedance/i,name:"TikTok"},snapchat:{regex:/Snapchat/i,name:"Snapchat"},linkedin:{regex:/LinkedInApp/i,name:"LinkedIn"},gsa:{regex:/GSA/i,name:"Google Search App"},whatsapp:{regex:/\b(WAiOS|WA4A)\//i,name:"WhatsApp"}},Wn=Object.keys(Oe),$n=s=>Wn.find(t=>Oe[t].regex.test(s)),Vn=["WebView","(iPhone|iPod|iPad)(?!.*Safari/)","Android.*wv\\)"],Hn=new RegExp(`${Vn.map(s=>`(${s})`).join("|")}`,"i");var Un=(s={})=>{var t,e;let{skip:i,ua:r=""}=s,n=r||Bn();if(!n)return Nt(Lt({},Ft),{ua:n});let o=l=>Ln({skip:i,appKey:l,ua:n}),a=$n(n);if(a||n.match(Hn)!==null)return o(a)?Nt(Lt({},Ft),{ua:n,skipped:!0}):{isInApp:!0,appKey:a,appName:a?Oe[a].name:void 0,ua:n,skipped:!1};let c=Fn();return c?o(c)?Nt(Lt({},Ft),{ua:n,skipped:!0}):{isInApp:!0,appKey:c,appName:(e=(t=Ui)==null?void 0:t[c])==null?void 0:e.name,ua:n,skipped:!1}:Nt(Lt({},Ft),{ua:n})};var Xi=Un;var Me=/iPhone/i,Yi=/iPod/i,qi=/iPad/i,Qi=/\biOS-universal(?:.+)Mac\b/i,Te=/\bAndroid(?:.+)Mobile\b/i,Ki=/Android/i,dt=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Wt=/Silk/i,J=/Windows Phone/i,Gi=/\bWindows(?:.+)ARM\b/i,Ji=/BlackBerry/i,Zi=/BB10/i,ts=/Opera Mini/i,es=/\b(CriOS|Chrome)(?:.+)Mobile/i,is=/Mobile(?:.+)Firefox\b/i,ss=function(s){return typeof s!="undefined"&&s.platform==="MacIntel"&&typeof s.maxTouchPoints=="number"&&s.maxTouchPoints>1&&typeof MSStream=="undefined"};function Xn(s){return function(t){return t.test(s)}}function $t(s){var t={userAgent:"",platform:"",maxTouchPoints:0};!s&&typeof navigator!="undefined"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof s=="string"?t.userAgent=s:s&&s.userAgent&&(t={userAgent:s.userAgent,platform:s.platform,maxTouchPoints:s.maxTouchPoints||0});var e=t.userAgent,i=e.split("[FBAN");typeof i[1]!="undefined"&&(e=i[0]),i=e.split("Twitter"),typeof i[1]!="undefined"&&(e=i[0]);var r=Xn(e),n={apple:{phone:r(Me)&&!r(J),ipod:r(Yi),tablet:!r(Me)&&(r(qi)||ss(t))&&!r(J),universal:r(Qi),device:(r(Me)||r(Yi)||r(qi)||r(Qi)||ss(t))&&!r(J)},amazon:{phone:r(dt),tablet:!r(dt)&&r(Wt),device:r(dt)||r(Wt)},android:{phone:!r(J)&&r(dt)||!r(J)&&r(Te),tablet:!r(J)&&!r(dt)&&!r(Te)&&(r(Wt)||r(Ki)),device:!r(J)&&(r(dt)||r(Wt)||r(Te)||r(Ki))||r(/\bokhttp\b/i)},windows:{phone:r(J),tablet:r(Gi),device:r(J)||r(Gi)},other:{blackberry:r(Ji),blackberry10:r(Zi),opera:r(ts),firefox:r(is),chrome:r(es),device:r(Ji)||r(Zi)||r(ts)||r(is)||r(es)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}function O(s,t){s.classList.add(t)}function G(s,t){t&&s.classList.remove(t)}function B(s,t,e){t&&s.classList.toggle(t,e)}function tt(s,t){return s.classList.contains(t)}var k=typeof window!="undefined",v=k?document:void 0,C=k?v.documentElement:void 0,j=k?v.body:void 0;var rs={version:"5.10.0"};function g(s,t,e){let i=e.value;e.value=function(...n){if(!this._isDestroyed)return i.apply(this,n)}}function Ie(s){try{s()}catch(t){console.error(t)}}function ft(s,t){return!Array.isArray(t)||t.length===0?s:t.reduce((e,i)=>Math.abs(i-s)<Math.abs(e-s)?i:e)}function R(s){return typeof s=="number"}function T(s){return R(s)&&!Number.isNaN(s)&&Number.isFinite(s)}function et(s,t=0){return T(s)?s:t}function A(s){if(!k)return 0;let t=w();if(window.vevet5_toPixelsCache||(window.vevet5_toPixelsCache=new Map,t.onResize("any",()=>{window.vevet5_toPixelsCache.clear()},{name:"toPixels"})),window.vevet5_toPixelsCache.has(s))return window.vevet5_toPixelsCache.get(s);let e=0,i=parseFloat(`${s}`);return R(s)?e=s:Number.isNaN(i)?e=0:s.includes("rem")?e=i*t.rem:s.includes("vw")?e=i*t.vw:s.includes("vh")?e=i*t.vh:s.includes("svh")?e=i*t.svh:s.includes("px")&&(e=i),e=et(e),window.vevet5_toPixelsCache.set(s,e),e}var ns=0;function Ae(s="id"){return ns+=1,`${s}_${ns}`}var Ot=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},qn=function(s,t){var e={};for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&t.indexOf(i)<0&&(e[i]=s[i]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(s);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(s,i[r])&&(e[i[r]]=s[i[r]]);return e},U=class{constructor(t={}){this._props=t,this._isDestroyed=!1,this._list=[]}get list(){return this._list}add(t,e,i={}){let r=Ae("callback");return this._list.push(Object.assign(Object.assign({},i),{id:r,target:t,action:e})),{id:r,remove:()=>this.remove(r)}}on(t,e,i={}){let r=this.add(t,e,i);return()=>{r.remove()}}remove(t){return this._remove(t)}_remove(t,e=!1){return this._list=this._list.filter(r=>!!(r.id!==t||r.protected&&!e)),!this._list.some(({id:r})=>r===t)}_removeAll(){for(;this._list.length>0;)this._remove(this._list[0].id,!0)}_callAction(t,e){var{id:i,timeout:r,action:n}=t,o=qn(t,["id","timeout","action"]);let{ctx:a}=this._props;r?setTimeout(()=>Ie(()=>n(e,a)),r):Ie(()=>n(e,a)),o.once&&this._remove(i,!0)}emit(t,e){this._list.forEach(i=>{i.target===t&&this._callAction(i,e)})}destroy(){this._removeAll(),this._isDestroyed=!0}};Ot([g],U.prototype,"add",null);Ot([g],U.prototype,"on",null);Ot([g],U.prototype,"remove",null);Ot([g],U.prototype,"emit",null);Ot([g],U.prototype,"destroy",null);function y(s,t,e,i){return s.addEventListener(t,e,i),()=>{s.removeEventListener(t,e,i)}}var Ms=zi(Os());function Ne(s){return(0,Ms.default)(s)}function q({callback:s,element:t,viewportTarget:e="width",resizeDebounce:i=0,name:r}){let n=w(),o,a,c,l=h=>{o&&(clearTimeout(o),o=void 0),o=setTimeout(()=>s(),h!=null?h:i)};return t&&(a=new ResizeObserver(()=>{l(n.props.resizeDebounce+i)}),(Array.isArray(t)?t:[t]).forEach(h=>{a==null||a.observe(h)})),e&&(c=n.onResize(e,()=>l(),{name:r})),{remove:()=>{o&&clearTimeout(o),a==null||a.disconnect(),c==null||c()},resize:()=>s(),debounceResize:()=>l()}}function Ts({prefix:s,applyClassNames:t}){let e=new U,i=!1;v.readyState==="complete"?setTimeout(()=>r(),0):y(window,"load",()=>r());function r(){let{body:o}=document;i=!0,t&&(G(C,`${s}loading`),G(o,`${s}loading`),O(C,`${s}loaded`)),e.emit("loaded",void 0)}function n(o){return i?(o(),()=>{}):e.on("loaded",()=>o())}return{onLoad:n,getIsLoaded:()=>i}}function Is({prefix:s,props:t,isMobile:e,isInApp:i,browserName:r}){let n=v.getElementById("vevet_css_preset");n||(n=v.createElement("style"),n.id="vevet_css_preset",j.appendChild(n));let o=v.createElement("div"),{style:a}=o;o.id="vevet_svh_helper",a.position="fixed",a.top="-100svh",a.left="-100px",a.width="1px",a.height="100svh",j.appendChild(o);let c=new U,l={width:0,height:0,sHeight:0,vw:0,vh:0,svh:0,scrollbarWidth:0,rem:16,landscape:!1,portrait:!1,dpr:window.devicePixelRatio,lowerDpr:window.devicePixelRatio};d(),f(),m();let h;function p(){h&&(clearTimeout(h),h=void 0),t.resizeDebounce?h=setTimeout(()=>_(),t.resizeDebounce):_()}y(window,"resize",()=>p());let u=new ResizeObserver(()=>p());u.observe(C),u.observe(j);function _(){let{width:b,height:S}=l;d(),f(),m();let{width:M,height:E}=l;c.emit("trigger",void 0),(M!==b||E!==S)&&c.emit("any",void 0),M!==b&&E===S&&c.emit("onlyWidth",void 0),E!==S&&M===b&&c.emit("onlyHeight",void 0),M!==b&&E!==S&&c.emit("both",void 0),M!==b&&c.emit("width",void 0),E!==S&&c.emit("height",void 0)}function d(){let{width:b}=l,S=window.innerWidth,M=window.innerHeight;l.width=S,l.height=M,l.scrollbarWidth=S-C.clientWidth,l.vw=l.width/100,l.vh=l.height/100;let E=getComputedStyle(C),D=parseFloat(E.fontSize);if(l.rem=T(D)?D:16,l.landscape=l.width>l.height,l.portrait=l.width<l.height,l.dpr=window.devicePixelRatio,l.lowerDpr=e?Math.min(l.dpr,2):1,e&&(i||r.includes("fxios"))){let z=C.clientHeight;(b!==l.width||!l.sHeight||b===l.width&&z<l.sHeight)&&(l.sHeight=z,l.svh=l.sHeight/100)}else l.svh=o.clientHeight/100||C.clientHeight/100,l.sHeight=l.svh*100}function f(){t.applyClassNames&&(B(C,`${s}landscape`,l.landscape),B(C,`${s}portrait`,l.portrait))}function m(){n.innerHTML=`
html {
--vw: ${l.vw}px;
--vh: ${l.vh}px;
--svh: ${l.svh}px;
--scrollbar-width: ${l.scrollbarWidth}px;
}
`}return{data:l,callbacks:c}}function As(s){var t;let i=Object.assign(Object.assign({},{resizeDebounce:0,easing:[.25,.1,.25,1],applyClassNames:!1}),s),r="v-",n=$i(),o=$t(),a=(t=(n==null?void 0:n.os)||"")===null||t===void 0?void 0:t.split(" ")[0].toLowerCase(),c=((n==null?void 0:n.name)||"").toLowerCase(),h=o.phone||o.tablet;h||window.matchMedia("(pointer: fine)").matches||(h=!0);let{isInApp:p,appName:u}=Xi(),_=p?(u||"unknown").toLowerCase():!1,d=Ts({prefix:r,applyClassNames:i.applyClassNames}),f=Is({prefix:r,props:i,isMobile:h,isInApp:p,browserName:c}),m=Object.assign(Object.assign({},f.data),{viewportCallbacks:f.callbacks,version:rs.version,props:i,prefix:r,phone:o.phone,tablet:o.tablet,mobile:h,osName:a,browserName:c,inAppBrowser:_,doc:v,html:C,body:j,loaded:!1,onLoad:d.onLoad,onResize:(...b)=>f.callbacks.on(...b)});return d.onLoad(()=>{m.loaded=!0}),f.callbacks.add("trigger",()=>{Object.keys(f.data).forEach(S=>{m[S]=f.data[S]})},{protected:!0,name:"vevet core"}),function(){i.applyClassNames&&(O(C,`${r}os-${a}`),O(C,`${r}browser-${c}`),B(C,`${r}phone`,m.phone),B(C,`${r}tablet`,m.tablet),B(C,`${r}mobile`,m.mobile))}(),m}function w(){var s;if(!k)return;if(window.vevet5)return window.vevet5;let t=(s=window.VEVET_PROPS)!==null&&s!==void 0?s:{},e=As(t);return window.vevet5=e,window.vevet5}k&&(window.vevet5=w());var Cs=`var presetVevetCss = function update() {
if (window.vevet5) {
return;
}
var doc = document.documentElement;
var styles = document.getElementById('vevet_css_preset');
if (!styles) {
styles = document.createElement('style');
styles.id = 'vevet_css_preset';
document.body.appendChild(styles);
}
var w = window.innerWidth;
var h = window.innerHeight;
var sh = doc.clientHeight;
var scrollbarWidth = window.innerWidth - doc.clientWidth;
styles.innerHTML = 'html { --vw: ' + w / 100 + 'px; --vh: ' + h / 100 + 'px; --svh: ' + sh / 100 + 'px; --scrollbar-width: ' + scrollbarWidth + 'px; }';
};
window.addEventListener('resize', presetVevetCss);
var presetVevetCssObserver = new ResizeObserver(presetVevetCss);
presetVevetCssObserver.observe(document.documentElement);
presetVevetCssObserver.observe(document.body);
presetVevetCss();`;function x(s,t=0,e=1){let i=Math.min(t,e),r=Math.max(t,e);return Math.max(i,Math.min(s,r))}function at(s,t=0,e=1){return(s-t)/(e-t)}function Yt(s,t=[0,1],e=[0,1]){let i=at(s,t[0],t[1]);return x(i,e[0],e[1])}function I(s,t,e,i=0){let r=s+(t-s)*e;return Math.abs(t-r)<=i?t:r}function Fe(s,t,e,i,r=0){return I(s,t,1-Math.exp(-e*60*(i/1e3)),r)}var We=s=>2.70158*s*s*s-1.70158*s*s;var it=s=>s<.36363636363636365?7.5625*s*s:s<.7272727272727273?7.5625*(s-=.5454545454545454)*s+.75:s<.9090909090909091?7.5625*(s-=.8181818181818182)*s+.9375:7.5625*(s-=.9545454545454546)*s+.984375;var $e=s=>1-it(1-s);var Ve=s=>1-Math.sqrt(1-Math.pow(s,2));var He=s=>Math.pow(s,3);var Ue=s=>{let t=2*Math.PI/3;return s===0?0:s===1?1:-Math.pow(2,10*s-10)*Math.sin((s*10-10.75)*t)};var Xe=s=>s===0?0:Math.pow(2,10*s-10);var Ye=s=>{let e=2.5949095;return s<.5?Math.pow(2*s,2)*((e+1)*2*s-e)/2:(Math.pow(2*s-2,2)*((e+1)*(s*2-2)+e)+2)/2};var qe=s=>s<.5?(1-it(1-2*s))/2:(1+it(2*s-1))/2;var Qe=s=>s<.5?(1-Math.sqrt(1-Math.pow(2*s,2)))/2:(Math.sqrt(1-Math.pow(-2*s+2,2))+1)/2;var Ke=s=>s<.5?4*s*s*s:1-Math.pow(-2*s+2,3)/2;var Ge=s=>{let t=2*Math.PI/4.5;return s===0?0:s===1?1:s<.5?-(Math.pow(2,20*s-10)*Math.sin((20*s-11.125)*t))/2:Math.pow(2,-20*s+10)*Math.sin((20*s-11.125)*t)/2+1};var Je=s=>s===0?0:s===1?1:s<.5?Math.pow(2,20*s-10)/2:(2-Math.pow(2,-20*s+10))/2;var Ze=s=>s<.5?2*s*s:1-Math.pow(-2*s+2,2)/2;var ti=s=>s<.5?8*s*s*s*s:1-Math.pow(-2*s+2,4)/2;var ei=s=>s<.5?16*s*s*s*s*s:1-Math.pow(-2*s+2,5)/2;var ii=s=>-(Math.cos(Math.PI*s)-1)/2;var si=s=>Math.pow(s,2);var ri=s=>Math.pow(s,4);var ni=s=>Math.pow(s,5);var oi=s=>1-Math.cos(s*Math.PI/2);var ai=s=>1+2.70158*Math.pow(s-1,3)+1.70158*Math.pow(s-1,2);var li=s=>Math.sqrt(1-Math.pow(s-1,2));var lt=s=>1-Math.pow(1-s,3);var ci=s=>{let t=2*Math.PI/3;return s===0?0:s===1?1:Math.pow(2,-10*s)*Math.sin((s*10-.75)*t)+1};var hi=s=>s===1?1:1-Math.pow(2,-10*s);var pi=s=>1-Math.pow(1-s,2);var ui=s=>1-Math.pow(1-s,4);var di=s=>1-Math.pow(1-s,5);var fi=s=>Math.sin(s*Math.PI/2);function Rs(s,t){let[e,i,r,n]=t;if(e===i&&r===n)return s;let o=[];for(let a=0;a<11;++a)o[a]=qt(a*.1,e,r);return s===0?0:s===1?1:qt(Zn(t,s,o),i,n)}function qt(s,t,e){return((Ds(t,e)*s+ks(t,e))*s+js(t))*s}function Ds(s,t){return 1-3*t+3*s}function ks(s,t){return 3*t-6*s}function js(s){return 3*s}function Zn(s,t,e){let i=s[0],r=s[2],n=0,o=1;for(;o!==10&&e[o]<=t;++o)n+=.1;--o;let a=(t-e[o])/(e[o+1]-e[o]),c=n+a*.1,l=Bs(c,i,r);return l>=.001?to(t,c,i,r):l===0?c:eo(t,n,n+.1,i,r)}function Bs(s,t,e){return 3*Ds(t,e)*s*s+2*ks(t,e)*s+js(t)}function to(s,t,e,i){for(let r=0;r<4;++r){let n=Bs(t,e,i);if(n===0)return t;let o=qt(t,e,i)-s;t-=o/n}return t}function eo(s,t,e,i,r){let n,o,a=0;do o=t+(e-t)/2,n=qt(o,i,r)-s,n>0?e=o:t=o;while(Math.abs(n)>1e-7&&++a<10);return o}function zs(s,t=!1){return Array.isArray(t)?Rs(s,t):typeof t=="function"?t(s):s}var mi=(s,t)=>{var e;return t===void 0&&(t=(e=w().props.easing)!==null&&e!==void 0?e:!1),zs(s,t)};function _i(s,t=0,e=1){let i=Math.min(t,e),r=Math.max(t,e);return s>=i&&s<=r}function F(s,t,e){let i=e-t;return((s-t)%i+i)%i+t}function Ls(s,t){let r=Object.keys(t).filter(n=>t[n]!==void 0).reduce((n,o)=>(n[o]=t[o],n),{});return Object.assign(Object.assign({},s),r)}var gi=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},P=class{_getStatic(){return{__staticProp:!0}}_getMutable(){return{__mutableProp:!0}}get props(){return this._props}get prefix(){return w().prefix}get name(){return this.constructor.name}get isDestroyed(){return this._isDestroyed}get callbacks(){return this._callbacks}constructor(t,e){this._isDestroyed=!1,this._destroyable=[],this._callbacks=new U({ctx:this}),this._props=Ls(Object.assign(Object.assign({},this._getStatic()),this._getMutable()),Object.assign({},t));let i=Object.assign(Object.assign({},t),e);i&&Object.keys(i).filter(n=>n.startsWith("on")&&typeof i[n]=="function").forEach(n=>{let o=n.slice(2);o=o.charAt(0).toLowerCase()+o.slice(1),this._callbacks.on(o,i[n])})}_handleProps(t){this.callbacks.emit("props",t)}updateProps(t){let e=Object.assign({},this._props),i=Object.keys(this.props);this._props=Object.assign(Object.assign({},this._props),t);let r={};i.forEach(n=>{let o=e[n],a=this._props[n];o!==a&&(r[n]=a)}),this._handleProps(r)}onDestroy(t){if(this.isDestroyed){t();return}this._destroyable.push(t)}on(t,e,i={}){return this.callbacks.on(t,e,i)}_cn(...t){return t.map(e=>`${this.prefix}${e}`).join(" ")}_addTempClassName(t,e){tt(t,e)||(O(t,e),this.onDestroy(()=>G(t,e)))}destroy(){this._destroy()}_destroy(){this._callbacks.emit("destroy",void 0),this._callbacks.destroy(),this._destroyable.forEach(t=>t()),this._isDestroyed=!0}};gi([g],P.prototype,"updateProps",null);gi([g],P.prototype,"on",null);gi([g],P.prototype,"destroy",null);var io=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},Qt=class{get props(){return this._props}constructor(t,e,i){this._source=t,this._rules=e,this._onChange=i,this._isDestroyed=!1,this._destructors=[],this._prevBreakpoints="[]";let r=t,n=w(),o=r instanceof P?r.name:"Object";if(this._fetchInitProps(),this._props=Object.assign({},this._initProps),r instanceof P){r.on("destroy",()=>this.destroy(),{name:this.constructor.name,protected:!0});let a=r.updateProps.bind(r);r.updateProps=c=>{a(c),this._initProps=Object.assign(Object.assign({},this._initProps),c)},Object.defineProperty(r,"_$_responseProps",{value:c=>{a(c)}})}this._handleUpdate(),this._destructors.push(n.onResize("any",()=>this._handleUpdate(),{name:`${this.constructor.name} / ${o}`}))}_fetchInitProps(){let t=this._source;if(t instanceof P){this._initProps={},Object.keys(t._getMutable()).forEach(i=>{this._initProps[i]=t.props[i]});return}this._initProps=this._source}_getActiveRules(){let t=w();return this._rules.filter(({at:i})=>i==="tablet"&&t.tablet||i==="phone"&&t.phone||i==="mobile"&&t.mobile||i==="non_mobile"&&!t.mobile||i==="portrait"&&t.portrait||i==="landscape"&&t.landscape?!0:i.startsWith("@media")?window.matchMedia(i.replace("@media","")).matches:!1)}_getResponsiveProps(){let t=this._getActiveRules(),e={};return t.forEach(({props:i})=>{e=Object.assign(Object.assign({},e),i)}),e}_handleUpdate(){var t;let i=this._getActiveRules().map(({at:n})=>n),r=JSON.stringify(i);this._prevBreakpoints!==r&&(this._prevBreakpoints=r,this._props=Object.assign(Object.assign({},this._initProps),this._getResponsiveProps()),this._source instanceof P&&this._source._$_responseProps(this._props),(t=this._onChange)===null||t===void 0||t.call(this,this.props))}destroy(){this._isDestroyed=!0,this._destructors.forEach(t=>t())}};io([g],Qt.prototype,"destroy",null);var Kt={__staticProp:!0,container:null,append:!0,resizeOnInit:!0,resizeOnRuntime:!1,viewportTarget:"any",resizeDebounce:0},Gt={__mutableProp:!0,width:"auto",height:"auto",dpr:"auto"};var Ns=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},st=class extends P{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),Kt)}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),Gt)}constructor(t,e){super(t,e),this._width=0,this._height=0,this._dpr=1;let{container:i}=this.props;this._canvas=v.createElement("canvas");let{style:r}=this._canvas;r.position="absolute",r.top="0",r.left="0",r.width="100%",r.height="100%",this.props.append&&i instanceof HTMLElement&&i.append(this._canvas),this._ctx=this._canvas.getContext("2d"),this._setEvents()}get canvas(){return this._canvas}get ctx(){return this._ctx}get width(){return this._width}get offsetWidth(){return this.width/this.dpr}get height(){return this._height}get offsetHeight(){return this.height/this.dpr}get dpr(){return this._dpr}get canRender(){return this.width>0&&this.height>0}_handleProps(t){super._handleProps(t),this.resize()}_setEvents(){let{props:t}=this,{viewportTarget:e,resizeDebounce:i}=t;if(t.resizeOnInit&&this.resize(),!t.resizeOnRuntime)return;let r=q({callback:()=>this.resize(),element:this.props.container,viewportTarget:e,resizeDebounce:i,name:this.name});this.onDestroy(()=>r.remove())}resize(){let t=w(),{props:e,canvas:i}=this,{container:r}=this.props;this._dpr=R(e.dpr)?e.dpr:t.dpr;let n=0,o=0;e.width==="auto"?n=(r==null?void 0:r.offsetWidth)||t.width:n=e.width,e.height==="auto"?o=(r==null?void 0:r.offsetHeight)||t.height:o=e.height,n*=this._dpr,o*=this._dpr,this._width=n,this._height=o,i.width=n,i.height=o,this.callbacks.emit("resize",void 0)}render(t){this.canRender&&t({ctx:this.ctx,width:this.width,height:this.height,dpr:this.dpr,offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight,canvas:this.canvas})}_destroy(){super._destroy(),this.canvas.remove()}};Ns([g],st.prototype,"resize",null);Ns([g],st.prototype,"render",null);function Jt(s){let t=ro(s),e=so(s),i;return s.rule==="cover"?i=no(s,t,e):s.rule==="contain"?i=oo(s,t,e):s.rule==="top-left"?i=ao(s,e):s.rule==="top-right"?i=lo(s,t,e):s.rule==="bottom-left"?i=co(s,t,e):s.rule==="bottom-right"?i=ho(s,t,e):s.rule==="center"&&(i=po(s,t,e)),Object.assign(i,{sourceWidth:e.width,sourceHeight:e.height})}function W(s){return typeof s.scale!="undefined"?s.scale:1}function so(s){let{source:t}=s;return s.sourceWidth&&s.sourceHeight?{width:s.sourceWidth,height:s.sourceHeight}:t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t instanceof HTMLImageElement?{width:t.naturalWidth,height:t.naturalHeight}:{width:t.width,height:t.height}}function ro(s){return"container"in s?{width:s.container.clientWidth,height:s.container.clientHeight}:{width:s.width,height:s.height}}function no(s,t,e){let i=t.width*W(s),r=e.height*i/e.width;r/W(s)<t.height&&(r=t.height*W(s),i=e.width*r/e.height);let n=(t.width-i)/2,o=(t.height-r)/2;return{width:i,height:r,x:n,y:o}}function oo(s,t,e){let i=0,r=0,n=e.width/e.height;t.width>t.height?(r=t.height,i=r*n,i>t.width&&(i=t.width,r=i/n)):t.height>=t.width&&(i=t.width,r=i/n,r>t.height&&(r=t.height,i=r*n)),i*=W(s),r*=W(s);let o=(t.width-i)/2,a=(t.height-r)/2;return{width:i,height:r,x:o,y:a}}function ao(s,t){let e=t.width*W(s),i=t.height*W(s);return{width:e,height:i,x:0,y:0}}function lo(s,t,e){let i=e.width*W(s),r=e.height*W(s),n=t.width-e.width;return{width:i,height:r,x:n,y:0}}function co(s,t,e){let i=e.width*W(s),r=e.height*W(s),n=t.height-e.height;return{width:i,height:r,x:0,y:n}}function ho(s,t,e){let i=e.width*W(s),r=e.height*W(s),n=t.width-e.width,o=t.height-e.height;return{width:i,height:r,x:n,y:o}}function po(s,t,e){let i=e.width*W(s),r=e.height*W(s),n=(t.width-e.width)/2,o=(t.height-e.height)/2;return{width:i,height:r,x:n,y:o}}var Fs=Object.assign(Object.assign({},Kt),{media:null,autoRenderVideo:!0}),Ws=Object.assign(Object.assign({},Gt),{rule:"cover"});var $s=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},Mt=class extends st{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),Fs)}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),Ws)}constructor(t,e){super(t,e),this._setMediaEvents()}get hasRequestVideoFrameCallback(){return"requestVideoFrameCallback"in this.props.media}_setMediaEvents(){let{autoRenderVideo:t,media:e}=this.props;if(!t||!(e instanceof HTMLVideoElement))return;if(this.hasRequestVideoFrameCallback){this._requestVideoFrame();return}let i=y(e,"timeupdate",()=>{this.render()});this.onDestroy(()=>i())}resize(){super.resize(),this.render()}_requestVideoFrame(){if(this.isDestroyed)return;this.render();let{media:t}=this.props;t instanceof HTMLVideoElement&&t.requestVideoFrameCallback(()=>this._requestVideoFrame())}render(){super.render(t=>this._prerender(t))}_prerender({width:t,height:e,ctx:i}){let{media:r,rule:n}=this.props,o,a,c;r instanceof st?(o=r.canvas,a=r.width,c=r.height):o=r;let l=Jt({source:o,sourceWidth:a,sourceHeight:c,rule:n,scale:1,width:t,height:e});i.clearRect(0,0,t,e),i.drawImage(o,l.x,l.y,l.width,l.height),this.callbacks.emit("render",void 0)}};$s([g],Mt.prototype,"resize",null);$s([g],Mt.prototype,"render",null);function rt(s){return window.getComputedStyle(s).direction}var Vs={__staticProp:!0},Hs={__mutableProp:!0,fps:"auto",enabled:!1,fpsRecalcFrames:10};var Us=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},$=class extends P{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),Vs)}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),Hs)}constructor(t,e){super(t,e),this._isPlaying=!1,this._raf=null,this._lastTimestamp=null,this._timestamp=null,this._index=0,this._fps=60,this._duration=0,this._fps=this.props.fps==="auto"?this._fps:this.props.fps,this.props.enabled&&this._play()}get isPlaying(){return this._isPlaying}get timestamp(){var t;return(t=this._timestamp)!==null&&t!==void 0?t:0}get index(){return this._index}get fps(){return this._fps}get duration(){return this._duration}get fpsFactor(){return 60/this.fps}_handleProps(t){super._handleProps(t),this._lastTimestamp=null,this.props.enabled?this._play():this._pause()}play(){this.props.enabled||this.updateProps({enabled:!0})}_play(){this.isPlaying||(this._isPlaying=!0,this.callbacks.emit("play",void 0),this.callbacks.emit("toggle",void 0),this._raf=window.requestAnimationFrame(this._animate.bind(this)))}pause(){this.props.enabled&&this.updateProps({enabled:!1})}_pause(){this.isPlaying&&(this._raf&&(window.cancelAnimationFrame(this._raf),this._raf=null),this._isPlaying=!1,this.callbacks.emit("pause",void 0),this.callbacks.emit("toggle",void 0))}_animate(){var t,e;if(!this._isPlaying)return;this._raf=window.requestAnimationFrame(this._animate.bind(this));let i=this.props.fps==="auto"?1:1e3/this.props.fps;this._timestamp=performance.now(),(t=this._lastTimestamp)!==null&&t!==void 0||(this._lastTimestamp=this._timestamp);let r=this._timestamp-((e=this._lastTimestamp)!==null&&e!==void 0?e:this._timestamp);r<i||(this._duration=r,this._lastTimestamp=this._timestamp,this._index+=1,this._computeFPS(),this.callbacks.emit("frame",{fps:this.fps,fpsFactor:this.fpsFactor,duration:this.duration,lerpFactor:this.lerpFactor.bind(this)}))}lerpFactor(t){return 1-Math.exp(-t*60*(this.duration/1e3))}_computeFPS(){let{duration:t,index:e,props:i}=this;if(e>10&&e%i.fpsRecalcFrames!==0||t<=0||t>250)return;let o=1e3/60/t;this._fps=Math.round(60*o)||1}_destroy(){this.pause(),super._destroy()}};Us([g],$.prototype,"play",null);Us([g],$.prototype,"pause",null);function mt(s){return typeof s=="string"}var Zt=class{constructor(t,e,i){this._data=t,this._onEnter=e,this._onLeave=i,this._debounce=null,this._isHovered=!1,this._parallaxX={current:0,target:0,prevTarget:null},this._parallaxY={current:0,target:0,prevTarget:null};let{emitter:r}=this;r.matches(":hover")&&this._handleElementEnter(),this._mouseEnter=y(r,"mouseenter",()=>{var n;this._debounce=setTimeout(()=>this._handleElementEnter(),(n=t.hoverDebounce)!==null&&n!==void 0?n:16)}),this._mouseLeave=y(r,"mouseleave",()=>{this._debounce&&clearTimeout(this._debounce),this._handleElementLeave()}),this._mouseMove=y(r,"mousemove",n=>{this._handleElementMove(n)})}get element(){return this._data.element}get emitter(){var t;return(t=this._data.emitter)!==null&&t!==void 0?t:this._data.element}get type(){return this._data.type}get snap(){var t;return(t=this._data.snap)!==null&&t!==void 0?t:!1}get width(){return this._data.width==="auto"?"auto":this._data.width?A(this._data.width):null}get height(){return this._data.height==="auto"?"auto":this._data.height?A(this._data.height):null}get padding(){return this._data.padding?A(this._data.padding):0}get sticky(){var t;return(t=this._data.sticky)!==null&&t!==void 0?t:!1}get stickyLerp(){var t;return(t=this._data.stickyLerp)!==null&&t!==void 0?t:void 0}get stickyFriction(){var t;return(t=this._data.stickyFriction)!==null&&t!==void 0?t:0}get hasStickyFriction(){return T(this.stickyFriction)&&this.stickyFriction>0}getDimensions(){let t,e,i,r,n=0,o=this.element.getBoundingClientRect();return this.snap&&(t=o.left+o.width/2,e=o.top+o.height/2),this.width==="auto"?i=o.width:R(this.width)&&(i=this.width),this.height==="auto"?r=o.height:R(this.height)&&(r=this.height),n=this.padding,{x:t,y:e,width:i,height:r,padding:n}}destroy(){this._mouseEnter(),this._mouseMove(),this._mouseLeave(),this._debounce&&clearTimeout(this._debounce)}_handleElementEnter(){this._isHovered=!0,this._onEnter(this)}_handleElementLeave(){this._isHovered=!1,this._parallaxX.target=0,this._parallaxX.prevTarget=null,this._parallaxY.target=0,this._parallaxY.prevTarget=null,this._onLeave(this)}_handleElementMove(t){if(!this.sticky||!this._isHovered)return;let{element:e,_parallaxX:i,_parallaxY:r}=this,{clientX:n,clientY:o}=t,a=e.getBoundingClientRect(),c=getComputedStyle(e).transform,l=c==="none"?new DOMMatrix:new DOMMatrix(c),{width:h,height:p}=a,u=l.e,_=l.f,d=a.left-u,f=a.top-_,m=d+h/2,b=f+p/2,S=n-m,M=o-b,E=this._getStickyAmplitude(),D=E.x==="auto"?h:Math.abs(E.x),z=E.y==="auto"?p:Math.abs(E.y),Q=x(S,-D,D),N=x(M,-z,z);if(i.prevTarget===null&&(i.prevTarget=Q),r.prevTarget===null&&(r.prevTarget=N),this.hasStickyFriction){let H=Q-i.prevTarget,Pt=N-r.prevTarget;i.target+=H,r.target+=Pt}else i.target=Q,r.target=N;i.prevTarget=Q,r.prevTarget=N}_getStickyAmplitude(){let{stickyAmplitude:t}=this._data,e="auto",i="auto";return t?(R(t)||mt(t)?(e=this._getStickyAmplitudeAxis(t),i=this._getStickyAmplitudeAxis(t)):("x"in t&&(e=this._getStickyAmplitudeAxis(t.x)),"y"in t&&(i=this._getStickyAmplitudeAxis(t.y))),{x:e,y:i}):{x:e,y:i}}_getStickyAmplitudeAxis(t){return R(t)?t:!t||t==="auto"?"auto":A(t)}get isInterpolated(){return this._parallaxX.current===this._parallaxX.target&&this._parallaxY.current===this._parallaxY.target}render(t){let{_parallaxX:e,_parallaxY:i}=this,r=this.element;if(!this.sticky||this.isInterpolated)return;if(this.hasStickyFriction){let o=t(this.stickyFriction);e.target=I(e.target,0,o,1e-4),i.target=I(i.target,0,o,1e-4)}let n=t(this.stickyLerp);e.current=I(e.current,e.target,n,1e-4),i.current=I(i.current,i.target,n,1e-4),r.style.transform=`translate3d(${e.current}px, ${i.current}px, 0)`}};var vi=s=>{let t=`M${s[0].x},${s[0].y}`;for(let e=0;e<s.length-1;e+=1){let i=(s[e].x+s[e+1].x)/2,r=(s[e].y+s[e+1].y)/2;t+=`Q ${s[e].x}, ${s[e].y}, ${i}, ${r}`}return t+=`L ${s[s.length-1].x}, ${s[s.length-1].y}`,t};var te=class{get path(){return this._path}constructor(t){this._isEnabled=t,this._points=[],this._line={current:0,target:0},this._path=document.createElementNS("http://www.w3.org/2000/svg","path");let e=this._path;e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("fill","transparent"),e.setAttribute("stroke","#f00")}addPoint(t,e=!1){if(!this._isEnabled)return;let i=this._points,r=this._path,n=this._line,o={x:t.x,y:t.y,length:0};i.push(o),r.setAttribute("d",vi(i));let a=r.getTotalLength();o.length=a,n.target=a,e&&(n.current=n.target)}minimize(){if(!this._isEnabled)return;let t=this._points,e=this._line;if(t.length<3)return;let i=0,r=0;for(let n=1;n<t.length;n+=1){let o=t[n].x-t[n-1].x,a=t[n].y-t[n-1].y,c=Math.hypot(o,a);if(i+c<e.current)i+=c,r+=1;else break}if(T(r)&&r>0){let n=0;for(let o=1;o<=r;o+=1){let a=t[o].x-t[o-1].x,c=t[o].y-t[o-1].y;n+=Math.hypot(a,c)}t.splice(0,r),e.current=Math.max(0,e.current-n),e.target=Math.max(0,e.target-n),this._path.setAttribute("d",vi(t))}}get isInterpolated(){return this._line.current===this._line.target}lerp(t){let e=this._line;e.current=I(e.current,e.target,t,1e-4)}get coord(){return this._path.getPointAtLength(this._line.current)}};var Xs={__staticProp:!0,container:k?window:null,hideNative:!1,append:!0,behavior:"default",transformModifier:({x:s,y:t})=>`translate(${s}px, ${t}px)`},Ys={__mutableProp:!0,enabled:!0,width:50,height:50,lerp:.2,autoStop:!0};function ee(s){var t;let e=document.querySelector('link[rel="stylesheet"], style');e?(t=e.parentNode)===null||t===void 0||t.insertBefore(s,e):document.head.appendChild(s)}var _t=null;function qs(s){return _t||(_t=v.createElement("style"),ee(_t),_t.innerHTML=`
.${s}-container.${s}-hide-default,
.${s}-container.${s}-hide-default * {
cursor: none;
}
.${s} {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 0;
z-index: 999;
pointer-events: none;
transition: opacity 0.25s;
opacity: 0;
--cursor-w: 50px;
--cursor-h: 50px;
}
.${s}-in-window {
position: fixed;
}
.${s}-visible {
opacity: 1;
}
.${s}-disabled {
opacity: 0;
}
.${s}__inner {
position: relative;
width: var(--cursor-w);
height: var(--cursor-h);
margin-left: calc(var(--cursor-w) / -2);
margin-top: calc(var(--cursor-h) / -2);
background-color: rgba(0, 0, 0, 0.25);
}
.${s}_rtl .${s}__inner {
margin-right: calc(var(--cursor-w) / -2);
}
.${s}__inner > * {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
opacity: 0;
transition: opacity 0.25s linear;
}
.${s}__inner > *.active {
opacity: 1;
}
`,_t)}var bi=function(s,t,e,i){var r=arguments.length,n=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,t,e,i);else for(var a=s.length-1;a>=0;a--)(o=s[a])&&(n=(r<3?o(n):r>3?o(t,e,n):o(t,e))||n);return r>3&&n&&Object.defineProperty(t,e,n),n},gt=class extends P{_getStatic(){return Object.assign(Object.assign({},super._getStatic()),Xs)}_getMutable(){return Object.assign(Object.assign({},super._getMutable()),Ys)}constructor(t,e){super(t,e),this._elements=[],this._activeElements=[],this._isFirstMove=!0;let{enabled:i}=this.props,{initialWidth:r,initialHeight:n}=this;this._coords={x:0,y:0,width:r,height:n,angle:0,velocity:0},this._rawTarget=Object.assign({},this._coords),this._types=[],this._activeTypes=[],this._path=new te(this.hasPath),qs(this.prefix),this._setClassNames(),this._createElements(),this._setEvents(),this._toggle(i)}get prefix(){return`${w().prefix}cursor`}get container(){return this.props.container}get domContainer(){return this.container instanceof Window?j:this.container}get outer(){return this._outer}get inner(){return this._inner}get initialWidth(){return A(this.props.width)}get initialHeight(){return A(this.props.height)}get coords(){return this._coords}get hoveredElement(){let t=this._activeElements;return t[t.length-1]}get targetCoords(){var t,e,i,r;let{hoveredElement:n,initialWidth:o,initialHeight:a}=this,{x:c,y:l}=this._rawTarget,{angle:h,velocity:p}=this._rawTarget,u=o,_=a,d=0;if(n){let f=n.getDimensions();u=(t=f.width)!==null&&t!==void 0?t:o,_=(e=f.height)!==null&&e!==void 0?e:a,c=(i=f.x)!==null&&i!==void 0?i:c,l=(r=f.y)!==null&&r!==void 0?r:l,d=f.padding}return u+=d*2,_+=d*2,{x:c,y:l,width:u,height:_,angle:h,velocity:p}}get path(){return this._path.path}get hasPath(){return this.props.behavior==="path"}_handleProps(t){super._handleProps(t),this._toggle(this.props.enabled)}_setClassNames(){let{domContainer:t}=this;this.props.hideNative&&(t.style.cursor="none",this._addTempClassName(t,this._cn("-hide-default"))),this._addTempClassName(t,this._cn("-container")),t!==j&&(t.style.position="relative"),this.onDestroy(()=>{t.style.cursor=""})}_createElements(){let{container:t,domContainer:e,props:i}=this,r=t instanceof Window,n=this._cn.bind(this),o=v.createElement("div");O(o,n("")),O(o,n(r?"-in-window":"-in-element")),O(o,n("-disabled")),i.append&&e.append(o);let a=rt(o);O(o,n(`_${a}`));let c=v.createElement("div");o.append(c),O(c,n("__inner")),O(c,n("-disabled")),o.append(c),this._outer=o,this._inner=c,this.onDestroy(()=>{c.remove(),o.remove()})}_setEvents(){let{domContainer:t}=this;this._raf=new $({enabled:!1}),this._raf.on("frame",()=>this.render());let e=y(t,"mouseenter",this._handleMouseEnter.bind(this)),i=y(t,"mouseleave",this._handleMouseLeave.bind(this)),r=y(t,"mousemove",this._handleMouseMove.bind(this)),n=y(t,"mousedown",this._handleMouseDown.bind(this)),o=y(t,"mouseup",this._handleMouseUp.bind(this)),a=y(window,"blur",this._handleWindowBlur.bind(this));this.onDestroy(()=>{var c;(c=this._raf)===null||c===void 0||c.destroy(),e(),i(),r(),n(),o(),a()})}_toggle(t){var e;let i=this._cn("-disabled");B(this.outer,i,!t),B(this.inner,i,!t),(e=this._raf)===null||e===void 0||e.updateProps({enabled:t})}_handleMouseEnter(t){if(!this.props.enabled)return;let{clientX:e,clientY:i}=t,r=this._rawTarget;this._coords.x=e,this._coords.y=i,r.x=e,r.y=i,this._path.addPoint(r,!0),O(this.outer,this._cn("-visible"))}_handleMouseLeave(){G(this.outer,this._cn("-visible")