vevet 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/build/cdn/index.js +1 -1
  2. package/build/cjs/app/Application.js +23 -0
  3. package/build/cjs/index.js +2 -0
  4. package/build/cjs/utils/image/index.js +12 -0
  5. package/build/cjs/utils/image/load.js +77 -0
  6. package/build/cjs/utils/image/pathsToProps.js +34 -0
  7. package/build/cjs/utils/image/sizesToSrcSet.js +14 -0
  8. package/build/es/app/Application.js +18 -0
  9. package/build/es/index.js +2 -0
  10. package/build/es/utils/image/index.js +4 -0
  11. package/build/es/utils/image/load.js +60 -0
  12. package/build/es/utils/image/pathsToProps.js +28 -0
  13. package/build/es/utils/image/sizesToSrcSet.js +11 -0
  14. package/build/types/app/Application.d.ts +10 -0
  15. package/build/types/app/Application.d.ts.map +1 -1
  16. package/build/types/index.d.ts +2 -0
  17. package/build/types/index.d.ts.map +1 -1
  18. package/build/types/utils/image/index.d.ts +5 -0
  19. package/build/types/utils/image/index.d.ts.map +1 -0
  20. package/build/types/utils/image/load.d.ts +17 -0
  21. package/build/types/utils/image/load.d.ts.map +1 -0
  22. package/build/types/utils/image/pathsToProps.d.ts +9 -0
  23. package/build/types/utils/image/pathsToProps.d.ts.map +1 -0
  24. package/build/types/utils/image/sizesToSrcSet.d.ts +5 -0
  25. package/build/types/utils/image/sizesToSrcSet.d.ts.map +1 -0
  26. package/build/types/utils/types/general.d.ts +9 -0
  27. package/build/types/utils/types/general.d.ts.map +1 -1
  28. package/package.json +1 -1
  29. package/src/ts/app/Application.ts +30 -0
  30. package/src/ts/index.ts +2 -0
  31. package/src/ts/utils/image/index.ts +9 -0
  32. package/src/ts/utils/image/load.ts +88 -0
  33. package/src/ts/utils/image/pathsToProps.ts +34 -0
  34. package/src/ts/utils/image/sizesToSrcSet.ts +13 -0
  35. package/src/ts/utils/types/general.ts +13 -0
@@ -9,4 +9,4 @@ GitHub Repository: https://github.com/antonbobrov/vevet
9
9
 
10
10
  Powered by Anton Bobrov | https://github.com/antonbobrov
11
11
  */
12
- (()=>{var t={554:(t,e,r)=>{t=r.nmd(t);var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[i]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l[s]=l["[object Map]"]=l["[object Number]"]=l[c]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;var f="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,p="object"==typeof self&&self&&self.Object===Object&&self,h=f||p||Function("return this")(),d=e&&!e.nodeType&&e,y=d&&t&&!t.nodeType&&t,v=y&&y.exports===d,b=v&&f.process,_=function(){try{var t=y&&y.require&&y.require("util").types;return t||b&&b.binding&&b.binding("util")}catch(e){}}(),g=_&&_.isTypedArray;function m(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var w,O,P,k=Array.prototype,j=Function.prototype,E=Object.prototype,S=h["__core-js_shared__"],T=j.toString,x=E.hasOwnProperty,R=(w=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",L=E.toString,D=T.call(Object),C=RegExp("^"+T.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=v?h.Buffer:void 0,W=h.Symbol,I=h.Uint8Array,B=M?M.allocUnsafe:void 0,F=(O=Object.getPrototypeOf,P=Object,function(t){return O(P(t))}),z=Object.create,A=E.propertyIsEnumerable,H=k.splice,N=W?W.toStringTag:void 0,V=function(){try{var t=yt(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),X=M?M.isBuffer:void 0,Q=Math.max,$=Date.now,U=yt(h,"Map"),Y=yt(Object,"create"),q=function(){function t(){}return function(e){if(!St(e))return{};if(z)return z(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function K(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function J(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function G(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Z(t){var e=this.__data__=new J(t);this.size=e.size}function tt(t,e){var r=Ot(t),n=!r&&wt(t),o=!r&&!n&&kt(t),i=!r&&!n&&!o&&xt(t),s=r||n||o||i,c=s?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],a=c.length;for(var u in t)!e&&!x.call(t,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||vt(u,a))||c.push(u);return c}function et(t,e,r){(void 0!==r&&!mt(t[e],r)||void 0===r&&!(e in t))&&ot(t,e,r)}function rt(t,e,r){var n=t[e];x.call(t,e)&&mt(n,r)&&(void 0!==r||e in t)||ot(t,e,r)}function nt(t,e){for(var r=t.length;r--;)if(mt(t[r][0],e))return r;return-1}function ot(t,e,r){"__proto__"==e&&V?V(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}K.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},K.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},K.prototype.get=function(t){var e=this.__data__;if(Y){var r=e[t];return r===n?void 0:r}return x.call(e,t)?e[t]:void 0},K.prototype.has=function(t){var e=this.__data__;return Y?void 0!==e[t]:x.call(e,t)},K.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Y&&void 0===e?n:e,this},J.prototype.clear=function(){this.__data__=[],this.size=0},J.prototype.delete=function(t){var e=this.__data__,r=nt(e,t);return!(r<0)&&(r==e.length-1?e.pop():H.call(e,r,1),--this.size,!0)},J.prototype.get=function(t){var e=this.__data__,r=nt(e,t);return r<0?void 0:e[r][1]},J.prototype.has=function(t){return nt(this.__data__,t)>-1},J.prototype.set=function(t,e){var r=this.__data__,n=nt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},G.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(U||J),string:new K}},G.prototype.delete=function(t){var e=dt(this,t).delete(t);return this.size-=e?1:0,e},G.prototype.get=function(t){return dt(this,t).get(t)},G.prototype.has=function(t){return dt(this,t).has(t)},G.prototype.set=function(t,e){var r=dt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Z.prototype.clear=function(){this.__data__=new J,this.size=0},Z.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Z.prototype.get=function(t){return this.__data__.get(t)},Z.prototype.has=function(t){return this.__data__.has(t)},Z.prototype.set=function(t,e){var r=this.__data__;if(r instanceof J){var n=r.__data__;if(!U||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new G(n)}return r.set(t,e),this.size=r.size,this};var it,st=function(t,e,r){for(var n=-1,o=Object(t),i=r(t),s=i.length;s--;){var c=i[it?s:++n];if(!1===e(o[c],c,o))break}return t};function ct(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":N&&N in Object(t)?function(t){var e=x.call(t,N),r=t[N];try{t[N]=void 0;var n=!0}catch(i){}var o=L.call(t);n&&(e?t[N]=r:delete t[N]);return o}(t):function(t){return L.call(t)}(t)}function at(t){return Tt(t)&&ct(t)==i}function ut(t){return!(!St(t)||function(t){return!!R&&R in t}(t))&&(jt(t)?C:a).test(function(t){if(null!=t){try{return T.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t))}function lt(t){if(!St(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=bt(t),r=[];for(var n in t)("constructor"!=n||!e&&x.call(t,n))&&r.push(n);return r}function ft(t,e,r,n,o){t!==e&&st(e,(function(i,s){if(o||(o=new Z),St(i))!function(t,e,r,n,o,i,s){var a=_t(t,r),u=_t(e,r),l=s.get(u);if(l)return void et(t,r,l);var f=i?i(a,u,r+"",t,e,s):void 0,p=void 0===f;if(p){var h=Ot(u),d=!h&&kt(u),y=!h&&!d&&xt(u);f=u,h||d||y?Ot(a)?f=a:Tt(m=a)&&Pt(m)?f=function(t,e){var r=-1,n=t.length;e||(e=Array(n));for(;++r<n;)e[r]=t[r];return e}(a):d?(p=!1,f=function(t,e){if(e)return t.slice();var r=t.length,n=B?B(r):new t.constructor(r);return t.copy(n),n}(u,!0)):y?(p=!1,v=u,b=!0?(_=v.buffer,g=new _.constructor(_.byteLength),new I(g).set(new I(_)),g):v.buffer,f=new v.constructor(b,v.byteOffset,v.length)):f=[]:function(t){if(!Tt(t)||ct(t)!=c)return!1;var e=F(t);if(null===e)return!0;var r=x.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&T.call(r)==D}(u)||wt(u)?(f=a,wt(a)?f=function(t){return function(t,e,r,n){var o=!r;r||(r={});var i=-1,s=e.length;for(;++i<s;){var c=e[i],a=n?n(r[c],t[c],c,r,t):void 0;void 0===a&&(a=t[c]),o?ot(r,c,a):rt(r,c,a)}return r}(t,Rt(t))}(a):St(a)&&!jt(a)||(f=function(t){return"function"!=typeof t.constructor||bt(t)?{}:q(F(t))}(u))):p=!1}var v,b,_,g;var m;p&&(s.set(u,f),o(f,u,n,i,s),s.delete(u));et(t,r,f)}(t,e,s,r,ft,n,o);else{var a=n?n(_t(t,s),i,s+"",t,e,o):void 0;void 0===a&&(a=i),et(t,s,a)}}),Rt)}function pt(t,e){return gt(function(t,e,r){return e=Q(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=Q(n.length-e,0),s=Array(i);++o<i;)s[o]=n[e+o];o=-1;for(var c=Array(e+1);++o<e;)c[o]=n[o];return c[e]=r(s),m(t,this,c)}}(t,e,Ct),t+"")}var ht=V?function(t,e){return V(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:Ct;function dt(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function yt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return ut(r)?r:void 0}function vt(t,e){var r=typeof t;return!!(e=null==e?o:e)&&("number"==r||"symbol"!=r&&u.test(t))&&t>-1&&t%1==0&&t<e}function bt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||E)}function _t(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var gt=function(t){var e=0,r=0;return function(){var n=$(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ht);function mt(t,e){return t===e||t!=t&&e!=e}var wt=at(function(){return arguments}())?at:function(t){return Tt(t)&&x.call(t,"callee")&&!A.call(t,"callee")},Ot=Array.isArray;function Pt(t){return null!=t&&Et(t.length)&&!jt(t)}var kt=X||function(){return!1};function jt(t){if(!St(t))return!1;var e=ct(t);return e==s||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Et(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}function St(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Tt(t){return null!=t&&"object"==typeof t}var xt=g?function(t){return function(e){return t(e)}}(g):function(t){return Tt(t)&&Et(t.length)&&!!l[ct(t)]};function Rt(t){return Pt(t)?tt(t,!0):lt(t)}var Lt,Dt=(Lt=function(t,e,r,n){ft(t,e,r,n)},pt((function(t,e){var r=-1,n=e.length,o=n>1?e[n-1]:void 0,i=n>2?e[2]:void 0;for(o=Lt.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,e,r){if(!St(r))return!1;var n=typeof e;return!!("number"==n?Pt(r)&&vt(e,r.length):"string"==n&&e in r)&&mt(r[e],t)}(e[0],e[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++r<n;){var s=e[r];s&&Lt(t,s,r,o)}return t})));function Ct(t){return t}t.exports=Dt},796:(t,e,r)=>{t.exports=r(643)},264:t=>{"use strict";var e=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:e,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:e&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:e&&!!window.screen,isInWorker:!e};t.exports=r},518:t=>{var e,r,n,o,i,s,c,a,u,l,f,p,h,d,y,v=!1;function b(){if(!v){v=!0;var t=navigator.userAgent,b=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),_=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(p=/\b(iPhone|iP[ao]d)/.exec(t),h=/\b(iP[ao]d)/.exec(t),l=/Android/i.exec(t),d=/FBAN\/\w+;/i.exec(t),y=/Mobile/i.exec(t),f=!!/Win64/.exec(t),b){(e=b[1]?parseFloat(b[1]):b[5]?parseFloat(b[5]):NaN)&&document&&document.documentMode&&(e=document.documentMode);var g=/(?:Trident\/(\d+.\d+))/.exec(t);s=g?parseFloat(g[1])+4:e,r=b[2]?parseFloat(b[2]):NaN,n=b[3]?parseFloat(b[3]):NaN,(o=b[4]?parseFloat(b[4]):NaN)?(b=/(?:Chrome\/(\d+\.\d+))/.exec(t),i=b&&b[1]?parseFloat(b[1]):NaN):i=NaN}else e=r=n=i=o=NaN;if(_){if(_[1]){var m=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);c=!m||parseFloat(m[1].replace("_","."))}else c=!1;a=!!_[2],u=!!_[3]}else c=a=u=!1}}var _={ie:function(){return b()||e},ieCompatibilityMode:function(){return b()||s>e},ie64:function(){return _.ie()&&f},firefox:function(){return b()||r},opera:function(){return b()||n},webkit:function(){return b()||o},safari:function(){return _.webkit()},chrome:function(){return b()||i},windows:function(){return b()||a},osx:function(){return b()||c},linux:function(){return b()||u},iphone:function(){return b()||p},mobile:function(){return b()||p||h||l||y},nativeApp:function(){return b()||d},android:function(){return b()||l},ipad:function(){return b()||h}};t.exports=_},534:(t,e,r)=>{"use strict";var n,o=r(264);o.canUseDOM&&(n=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),t.exports=function(t,e){if(!o.canUseDOM||e&&!("addEventListener"in document))return!1;var r="on"+t,i=r in document;if(!i){var s=document.createElement("div");s.setAttribute(r,"return;"),i="function"==typeof s[r]}return!i&&n&&"wheel"===t&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},643:(t,e,r)=>{"use strict";var n=r(518),o=r(534);function i(t){var e=0,r=0,n=0,o=0;return"detail"in t&&(r=t.detail),"wheelDelta"in t&&(r=-t.wheelDelta/120),"wheelDeltaY"in t&&(r=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=r,r=0),n=10*e,o=10*r,"deltaY"in t&&(o=t.deltaY),"deltaX"in t&&(n=t.deltaX),(n||o)&&t.deltaMode&&(1==t.deltaMode?(n*=40,o*=40):(n*=800,o*=800)),n&&!e&&(e=n<1?-1:1),o&&!r&&(r=o<1?-1:1),{spinX:e,spinY:r,pixelX:n,pixelY:o}}i.getEventType=function(){return n.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},t.exports=i}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,loaded:!1,exports:{}};return t[n](i,i.exports,r),i.loaded=!0,i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";var t={};r.r(t),r.d(t,{mergeWithoutArrays:()=>l,randID:()=>c,timeoutCallback:()=>f});var e={};r.r(e),r.d(e,{clamp:()=>tt,clampScope:()=>it,inScope:()=>ot,lerp:()=>et,scoped:()=>rt,spreadScope:()=>nt,wrap:()=>st});var n={};r.r(n),r.d(n,{intersectionObserverSupported:()=>Ft,onScroll:()=>Bt});var o={};r.r(o),r.d(o,{getValues:()=>zt,to:()=>Oe,toElement:()=>Pe});var i={};r.r(i);var s={};function c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id",e="".concat(+new Date,"_").concat(Math.round(1e3*Math.random()));return"".concat(t,"_").concat(e)}r.r(s),r.d(s,{AnimationFrame:()=>mt,Application:()=>Sr,Callbacks:()=>R,Component:()=>Z,Ctx2D:()=>Fo,Ctx2DPrerender:()=>Zo,CustomCursor:()=>oc,Dragger:()=>to,DraggerDirection:()=>ko,DraggerMove:()=>lo,GeneralTypes:()=>i,Module:()=>H,MutableProp:()=>M,Page:()=>Jr,PageLoad:()=>wr,Plugin:()=>Br,Preloader:()=>En,ProgressPreloader:()=>An,ScrollBar:()=>vi,ScrollEventsBase:()=>Ri,ScrollSectionProgress:()=>Rs,ScrollView:()=>$i,SmoothScroll:()=>Wt,SmoothScrollDragPlugin:()=>vs,SmoothScrollKeyboardPlugin:()=>rs,SplitText:()=>Xs,StaticTimeline:()=>ce,Timeline:()=>we,Viewport:()=>hr,WheelHandler:()=>pn,utils:()=>ic});var a=r(554),u=r.n(a);function l(t,e){return u()(t,e,(function(t,e){if(Array.isArray(t))return e}))}function f(t,e){var r;return 0===e?t():r=setTimeout((function(){t()}),e),{clear:function(){r&&clearTimeout(r)}}}function p(t,e){return h(t,e)}function h(t,e){return t===e||null!==t&&h(t.parentNode,e)}function d(t){return t instanceof HTMLElement||t instanceof Element}function y(t){return t instanceof Window}function v(t,e){if(y(t))return t;if(d(t))return t;if(void 0!==e){const r=v(e);if(r)return r.querySelector(t)}return document.querySelector(t)}function b(t,e){if(t instanceof NodeList)return t;if(d(t))return[t];if(Array.isArray(t))return t;if(void 0!==e){const r=v(e);if(r)return r.querySelectorAll(t)}return document.querySelectorAll(t)}function _(t,e,r){const n=e.split(" ");for(let o=0;o<n.length;o++)void 0===r?t.classList.toggle(n[o]):r?t.classList.add(n[o]):t.classList.remove(n[o])}function g(t,e={}){const r=document.createElement(t);if(e.class&&function(t,e){if(t instanceof Element)_(t,e,!0);else for(let r=0;r<t.length;r++)_(t[r],e,!0)}(r,e.class),e.id&&r.setAttribute("id",e.id),e.attr)for(let n=0,o=e.attr.length;n<o;n++){const t=e.attr[n];r.setAttribute(t[0],t[1])}if(e.parent&&e.parent.appendChild(r),e.html&&(r.innerHTML=e.html),e.children)for(let n=0,o=e.children.length;n<o;n++)r.appendChild(e.children[n]);return r}const m=[];function w(t,e,r,n){if(void 0!==n){const o={passive:!1,once:!1};n.once&&(o.once=!0),n.passive&&(o.passive=!0),t.addEventListener(e,r,o)}else t.addEventListener(e,r);const o=`${Math.random()}-${+new Date}`;return m.push({id:o,el:t,target:e,callback:r}),{id:o,remove:O.bind(this,o)}}function O(t){const e=[];for(let r=0,n=m.length;r<n;r++){const n=m[r];n.id===t?n.el.removeEventListener(n.target,n.callback):e.push(n)}}var P=r(796),k=r.n(P);function j(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function E(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?j(Object(r),!0).forEach((function(e){x(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function x(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var R=function(){function t(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];S(this,t),x(this,"_app",void 0),x(this,"_callbacks",void 0),this._app=window.vevetApp,this._callbacks=[],e&&this._init()}var e,r,n;return e=t,r=[{key:"callbacks",get:function(){return this._callbacks}},{key:"_init",value:function(){this._constructor(),this._setEvents()}},{key:"_constructor",value:function(){}},{key:"_setEvents",value:function(){}},{key:"add",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=c("callback"),o={id:n,on:!0,data:E({target:t,do:e},r)};return this._callbacks.push(o),this._onAdd(n),{id:n,remove:this.remove.bind(this,n)}}},{key:"_onAdd",value:function(t){}},{key:"remove",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!1,o=this._callbacks.filter((function(o){return o.id!==t||!(!o.data.protected||r)||(e._onRemove(t),n=!0,!1)}));return this._callbacks=o,n}},{key:"_onRemove",value:function(t){}},{key:"removeAll",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._callbacks.length>0;)this.remove(this._callbacks[0].id,t)}},{key:"turn",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.get(t);return!!r&&(r.on=e,this._onTurn(t),!0)}},{key:"_onTurn",value:function(t){}},{key:"get",value:function(t){var e=this._callbacks.filter((function(e){return e.id===t}));return e.length>0&&e[0]}},{key:"_trigger",value:function(t,e){if(t.on){var r=t.data,n=r.timeout,o=r.once,i=t.data.do;n?f(e?this._triggerFunc.bind(this,i,e):this._triggerFunc.bind(this,i,!1),n):e?this._triggerFunc(i,e):this._triggerFunc(i,!1),o&&this.remove(t.id)}}},{key:"_triggerFunc",value:function(t,e){e?t(e):t()}},{key:"tbt",value:function(t,e){var r=this;this._callbacks.forEach((function(n){n.data.target===t&&r._trigger(n,e)}))}},{key:"destroy",value:function(){this.removeAll(!0)}}],r&&T(e.prototype,r),n&&T(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function L(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function D(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function C(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var M=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Responsive Prop";L(this,t),C(this,"_initProp",void 0),C(this,"_onResponsive",void 0),C(this,"_onChange",void 0),C(this,"_name",void 0),C(this,"_app",void 0),C(this,"_refProp",void 0),C(this,"_prop",void 0),C(this,"_responsiveRules",[]),C(this,"_viewportCallback",void 0),this._initProp=e,this._onResponsive=r,this._onChange=n,this._name=o,this._app=window.vevetApp,this._refProp=l({},e),this._prop=l({},e)}var e,r,n;return e=t,r=[{key:"prop",get:function(){return this._prop}},{key:"addResponsiveProp",value:function(t){this._responsiveRules.push(t),void 0===this._viewportCallback&&(this._viewportCallback=this._app.viewport.add("w",this._responseProp.bind(this,!0),{name:this._name})),this._responseProp()}},{key:"_responseProp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._responsiveRules,r=this._app,n=r.viewport,o=n.width,i=!1,s=l({},this._refProp);e.forEach((function(t){var e=t.settings,c=t.breakpoint;if("number"==typeof c)o<=t.breakpoint&&(i=l(s,e));else if("string"==typeof c){var a=c.toLowerCase();("d"===a&&n.isDesktop||"t"===a&&n.isTablet||"p"===a&&n.isPhone)&&(i=l(s,e)),("phone"===a&&r.isPhone||"tablet"===a&&r.isTablet||"mobile"===a&&r.isMobile)&&(i=l(s,e))}})),this._prop=l(this._prop,i||this._refProp),t&&this._onResponsive()}},{key:"changeProp",value:function(t){this._prop=l(this._prop,t),this._refProp=l(this._refProp,t),this._onChange(t)}},{key:"destroy",value:function(){this._viewportCallback&&this._viewportCallback.remove()}}],r&&D(e.prototype,r),n&&D(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function W(){throw new Error('Vevet.Application does not exist yet. \nCall "new Vevet.Application()" before using all the stuff')}function I(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function B(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?I(Object(r),!0).forEach((function(e){A(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function A(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var H=function(){function t(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];F(this,t),A(this,"_mutableProp",void 0),A(this,"_callbacks",void 0),A(this,"_listeners",void 0),A(this,"_app",void 0),A(this,"_inited",!1),A(this,"_destroyed",void 0),A(this,"_viewportCallbacks",[]),window.vevetApp?this._app=window.vevetApp:W(),this._destroyed=!1,this._listeners=[],this._callbacks=new R;var n=l(this._getDefaultProp(),e||{});this._mutableProp=new M(n,this._onPropResponsive.bind(this),this._onPropChange.bind(this),this.name),r&&this.init()}var e,r,n;return e=t,r=[{key:"_getDefaultProp",value:function(){return{parent:!1}}},{key:"prop",get:function(){return this._mutableProp.prop}},{key:"callbacks",get:function(){return this._callbacks}},{key:"prefix",get:function(){return""}},{key:"name",get:function(){return this.constructor.name}},{key:"inited",get:function(){return this._inited}},{key:"destroyed",get:function(){return this._destroyed}},{key:"addResponsiveProp",value:function(t){if(this._inited)throw new Error("Responsive properties cannot be added because the class instance is already initialized");this._mutableProp.addResponsiveProp(t)}},{key:"changeProp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._mutableProp.changeProp(t),this._callbacks.tbt("changeProp",!1)}},{key:"_onPropResponsive",value:function(){this._onPropMutate()}},{key:"_onPropChange",value:function(t){this._onPropMutate()}},{key:"_onPropMutate",value:function(){}},{key:"init",value:function(){var t=this;this._inited||(this._inited=!0,this._constructor(),this._setEvents(),this.prop.parent&&this.prop.parent.addCallback("destroy",(function(){t.destroy()})))}},{key:"_constructor",value:function(){}},{key:"_setEvents",value:function(){}},{key:"addViewportCallback",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this._app.viewport.add(t,e,B(B({},r),{},{name:this.constructor.name}));return this._viewportCallbacks.push(n),n}},{key:"addCallback",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.callbacks.add(t,e,r);return n}},{key:"addEventListeners",value:function(t,e,r,n){var o=w(t,e,r,n);return this._listeners.push(o),o}},{key:"destroy",value:function(){this.destroyed||this._destroy()}},{key:"_destroy",value:function(){this._callbacks.tbt("destroy",!1),this._callbacks.destroy(),this._mutableProp.destroy(),this._viewportCallbacks.forEach((function(t){t.remove()})),this._listeners.forEach((function(t){t.remove()})),this._destroyed=!0}}],r&&z(e.prototype,r),n&&z(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function V(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Q(){return Q="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=$(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Q.apply(this,arguments)}function $(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=J(t)););return t}function U(t,e){return U=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},U(t,e)}function Y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=J(t);if(e){var o=J(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return q(this,r)}}function q(t,e){if(e&&("object"===N(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return K(t)}function K(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function J(t){return J=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},J(t)}function G(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Z=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&U(t,e)}(i,t);var e,r,n,o=Y(i);function i(){var t;V(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return G(K(t=o.call.apply(o,[this].concat(r))),"_plugins",void 0),t}return e=i,(r=[{key:"addPlugin",value:function(t){void 0===this._plugins&&(this._plugins=[]),this._plugins.push(t),t.inited||t.initPlugin(this)}},{key:"_destroyPlugins",value:function(){this._plugins&&this._plugins.forEach((function(t){t.destroy()}))}},{key:"_destroy",value:function(){Q(J(i.prototype),"_destroy",this).call(this),this._destroyPlugins()}}])&&X(e.prototype,r),n&&X(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(H);function tt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1];return t<e[0]?e[0]:t>e[1]?e[1]:t}function et(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001,o=t*(1-r)+e*r,i=Math.abs(e-o);return i<=n?e:o}function rt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1],r=(t-e[0])/(e[1]-e[0]);return r}function nt(t,e){for(var r=[],n=1/(t-e*(t-1)),o=0;o<t;o+=1){var i=n*(1-e)*o,s=i+n;r.push([i,s])}return r}function ot(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1];return t>=e[0]&&t<=e[1]}function it(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,1];return tt(rt(t,e),r)}function st(t,e,r){var n=e-t;return function(t,e){return t||0===t?e(t):e}(r,(function(e){return(n+(e-t)%n)%n+t}))}function ct(t){return ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(t)}function at(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ut(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?at(Object(r),!0).forEach((function(e){gt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function lt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ft(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function pt(){return pt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ht(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},pt.apply(this,arguments)}function ht(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_t(t)););return t}function dt(t,e){return dt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},dt(t,e)}function yt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=_t(t);if(e){var o=_t(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vt(this,r)}}function vt(t,e){if(e&&("object"===ct(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return bt(t)}function bt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _t(t){return _t=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_t(t)}function gt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var mt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dt(t,e)}(i,t);var e,r,n,o=yt(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return lt(this,i),gt(bt(e=o.call(this,t,!1)),"_isPlaying",void 0),gt(bt(e),"_frame",void 0),gt(bt(e),"_frameIndex",void 0),gt(bt(e),"_timeStamp",void 0),gt(bt(e),"_prevFrameTime",void 0),e._isPlaying=!1,e._frame=null,e._frameIndex=-1,e._timeStamp=null,e._prevFrameTime=null,r&&e.init(),e}return e=i,(r=[{key:"isPlaying",get:function(){return this._isPlaying}},{key:"_getDefaultProp",value:function(){return ut(ut({},pt(_t(i.prototype),"_getDefaultProp",this).call(this)),{},{fps:140,run:!1})}},{key:"_constructor",value:function(){pt(_t(i.prototype),"_constructor",this).call(this),this._create()}},{key:"_create",value:function(){this.prop.run&&this.play()}},{key:"_onPropMutate",value:function(){this._frameIndex=-1,this._timeStamp=null,this._prevFrameTime=null,this.prop.run?this._play():this._pause()}},{key:"play",value:function(){this.destroyed||this.prop.run||this.changeProp({run:!0})}},{key:"_play",value:function(){this.isPlaying||(this._isPlaying=!0,this._frame=window.requestAnimationFrame(this._animate.bind(this)))}},{key:"pause",value:function(){this.prop.run&&this.changeProp({run:!1})}},{key:"_pause",value:function(){this.isPlaying&&(this._frame&&(window.cancelAnimationFrame(this._frame),this._frame=null),this._isPlaying=!1)}},{key:"_animate",value:function(t){if(this._isPlaying){this._frame=window.requestAnimationFrame(this._animate.bind(this));var e=+new Date;null==this._timeStamp&&(this._timeStamp=t),null==this._prevFrameTime&&(this._prevFrameTime=e);var r=Math.floor((t-this._timeStamp)/(1e3/this.prop.fps));if(!(r<=this._frameIndex)){this._frameIndex=r;var n=e-this._prevFrameTime,o=tt(0===n?1e3/60:Math.floor(1e3/n),[1,1/0]);this.callbacks.tbt("frame",{fps:this.prop.fps,realFPS:o,prevFrameDuration:e-this._prevFrameTime}),this._prevFrameTime=+new Date}}}},{key:"_destroy",value:function(){this.pause(),pt(_t(i.prototype),"_destroy",this).call(this)}}])&&ft(e.prototype,r),n&&ft(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Z);function wt(t){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(t)}function Ot(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Pt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ot(Object(r),!0).forEach((function(e){Ct(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ot(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Et(){return Et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=St(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Et.apply(this,arguments)}function St(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Dt(t)););return t}function Tt(t,e){return Tt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Tt(t,e)}function xt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Dt(t);if(e){var o=Dt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Rt(this,r)}}function Rt(t,e){if(e&&("object"===wt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Lt(t)}function Lt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Dt(t){return Dt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Dt(t)}function Ct(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Mt,Wt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tt(t,e)}(i,t);var e,r,n,o=xt(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];kt(this,i),Ct(Lt(e=o.call(this,t,!1)),"_outer",void 0),Ct(Lt(e),"_container",void 0),Ct(Lt(e),"_containerExists",void 0),Ct(Lt(e),"_elements",void 0),Ct(Lt(e),"_elementsLength",void 0),Ct(Lt(e),"_targetLeft",void 0),Ct(Lt(e),"_targetTop",void 0),Ct(Lt(e),"_scrollLeft",void 0),Ct(Lt(e),"_scrollTop",void 0),Ct(Lt(e),"_scrollWidth",void 0),Ct(Lt(e),"_scrollHeight",void 0),Ct(Lt(e),"_clientWidth",void 0),Ct(Lt(e),"_clientHeight",void 0),Ct(Lt(e),"_instant",void 0),Ct(Lt(e),"_animationFrame",void 0),Ct(Lt(e),"_outerAnimationFrameEvent",void 0),Ct(Lt(e),"_currentFPS",void 0);var n=e.prop.selectors;if(e._targetLeft=0,e._targetTop=0,e._scrollLeft=0,e._scrollTop=0,e._scrollWidth=0,e._scrollHeight=0,e._clientWidth=0,e._clientHeight=0,e._instant=!1,e._animationFrame=void 0,e._outerAnimationFrameEvent=void 0,e._currentFPS=60,e._outer=v(n.outer),!(e._outer instanceof HTMLElement))throw new Error("".concat(n.outer," is not a HTMLElement"));e._outer.classList.add(e.prefix);var s=v(".".concat(e.prefix,"__container"),e.outer);return d(s)?(e._container=s,e._containerExists=!0):(e._container=g("div",{class:"".concat(e.prefix,"__container"),parent:e.outer,children:Array.from(e.outer.children)}),e._containerExists=!1),n.elements?e._elements=Array.from(b(n.elements,e._outer)):e._elements=[e._container],e._elementsLength=e._elements.length,e.prop.useWillChange&&e._elements.forEach((function(t){t.style.willChange="transform"})),r&&e.init(),e}return e=i,r=[{key:"prefix",get:function(){return"".concat(this._app.prefix,"smooth-scroll")}},{key:"outer",get:function(){return this._outer}},{key:"container",get:function(){return this._container}},{key:"elements",get:function(){return this._elements}},{key:"targetLeft",get:function(){return this._targetLeft},set:function(t){this.targetLeftBound=t,this._enable()}},{key:"targetLeftBound",get:function(){return this._targetLeft},set:function(t){var e=this.prop.overscroll&&this.prop.isHorizontal?-this.prop.overscroll.max:0,r=this.maxScrollableWidth+(this.prop.overscroll&&this.prop.isHorizontal?this.prop.overscroll.max:0);this._targetLeft=tt(t,[e,r])}},{key:"targetTop",get:function(){return this._targetTop},set:function(t){this.targetTopBound=t,this._enable()}},{key:"targetTopBound",get:function(){return this._targetTop},set:function(t){var e=this.prop.overscroll&&!this.prop.isHorizontal?-this.prop.overscroll.max:0,r=this.maxScrollableHeight+(this.prop.overscroll&&!this.prop.isHorizontal?this.prop.overscroll.max:0);this._targetTop=tt(t,[e,r])}},{key:"scrollLeft",get:function(){return this._scrollLeft},set:function(t){this.targetLeftBound=t,this._scrollLeft=this._targetLeft,this._enable()}},{key:"scrollTop",get:function(){return this._scrollTop},set:function(t){this.targetTopBound=t,this._scrollTop=this._targetTop,this._enable()}},{key:"scrollWidth",get:function(){return this._scrollWidth}},{key:"scrollHeight",get:function(){return this._scrollHeight}},{key:"clientWidth",get:function(){return this._clientWidth}},{key:"clientHeight",get:function(){return this._clientHeight}},{key:"maxScrollableWidth",get:function(){return this.scrollWidth-this.clientWidth}},{key:"maxScrollableHeight",get:function(){return this.scrollHeight-this.clientHeight}},{key:"_getDefaultProp",value:function(){return Pt(Pt({},Et(Dt(i.prototype),"_getDefaultProp",this).call(this)),{},{selectors:{outer:"#".concat(this.prefix),elements:!1},enabled:!0,animationFrame:!1,recalculateSizes:!0,resizeTimeout:0,useWheel:!0,autoStop:!0,isHorizontal:!1,stopPropagation:!0,useWillChange:!0,render:{lerp:.1,lerpToFixed:2,approximation:.1,normalizeLerp:!1},overscroll:{friction:.5,max:250}})}},{key:"_constructor",value:function(){Et(Dt(i.prototype),"_constructor",this).call(this),this._toggle()}},{key:"_setEvents",value:function(){var t=this;this.resize(),this.addViewportCallback("",(function(){t.resize(!0)}),{timeout:this.prop.resizeTimeout}),this.addEventListeners(this.outer,"wheel",(function(e){t._handleWheel(e)})),this.addEventListeners(this.outer,"scroll",(function(){t.outer.scrollTop=0,t.outer.scrollLeft=0}))}},{key:"_onPropMutate",value:function(){Et(Dt(i.prototype),"_onPropMutate",this).call(this),this.resize(),this._toggle()}},{key:"resize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.container,r=this.outer;this._clientWidth=r.clientWidth,this._clientHeight=r.clientHeight,this._scrollWidth=tt(e.clientWidth,[this.clientWidth,1/0]),this._scrollHeight=tt(e.clientHeight,[this.clientHeight,1/0]),t&&(this._instant=!0),t&&(this.targetLeft=parseInt(this.targetLeft.toFixed(0),10),this.targetTop=parseInt(this.targetTop.toFixed(0),10));var n=this.maxScrollableHeight>0||this.maxScrollableWidth>0;r.classList.toggle("has-scroll",n),r.classList.toggle("no-scroll",!n),this._updateElementsProp(),this.callbacks.tbt("resize",!1)}},{key:"_recalculateSizes",value:function(){var t=this.container,e=t.clientHeight,r=t.clientWidth;e===this.scrollHeight&&r===this.scrollWidth||this.resize()}},{key:"_updateElementsProp",value:function(){for(var t=0;t<this._elementsLength;t+=1){var e=this._elements[t];e.smoothScrollLeft=this.scrollLeft,e.smoothScrollTop=this.scrollTop;var r=e.getAttribute("".concat(this.prefix,"-ease"));if(r)try{e.smoothScrollLerpEase=parseFloat(r)}catch(n){}}}},{key:"_handleWheel",value:function(t){var e=this.prop;if(e.enabled&&e.useWheel){(e.stopPropagation||!e.stopPropagation&&(this.scrollLeft>0&&this.scrollLeft<this.maxScrollableWidth||this.scrollTop>0&&this.scrollTop<this.maxScrollableHeight))&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());var r=k()(t);this.targetLeftBound+=e.isHorizontal?r.pixelY:r.pixelX,this.targetTopBound+=e.isHorizontal?r.pixelX:r.pixelY,this._enable(),this.callbacks.tbt("wheel",t)}}},{key:"_toggle",value:function(){this.prop.enabled?this._enable():this._disable()}},{key:"_enable",value:function(){var t=this;this.prop.enabled&&(this.prop.animationFrame&&!this._outerAnimationFrameEvent?this._outerAnimationFrameEvent=this.prop.animationFrame.addCallback("frame",(function(e){t._currentFPS=e.realFPS,t.render()})):(this._animationFrame||(this._animationFrame=new mt,this._animationFrame.addCallback("frame",(function(e){t._currentFPS=e.realFPS,t.render()}))),this._animationFrame.play()))}},{key:"_disable",value:function(){this._outerAnimationFrameEvent&&this.prop.animationFrame&&this._outerAnimationFrameEvent.remove(),this._animationFrame&&this._animationFrame.pause()}},{key:"render",value:function(){var t=this.prop;t.recalculateSizes&&this._recalculateSizes(),this._calcScroll(),this._calcElements(),this._renderElements(),this._instant&&(this._instant=!1),this.callbacks.tbt("scroll",!1);var e=Math.abs(this.targetTop-this.scrollTop);0===Math.abs(this.targetLeft-this.scrollLeft)&&0===e&&t.autoStop&&(this._disable(),this.callbacks.tbt("approximate",!1))}},{key:"_calcScroll",value:function(){var t=this.prop.overscroll;t&&(this.targetLeft<0?this.targetLeftBound=this._lerp(this.targetLeftBound,0,t.friction):this.targetLeft>this.maxScrollableWidth&&(this.targetLeftBound=this._lerp(this.targetLeftBound,this.maxScrollableWidth,t.friction)),this.targetTop<0?this.targetTopBound=this._lerp(this.targetTopBound,0,t.friction):this.targetTop>this.maxScrollableHeight&&(this.targetTopBound=this._lerp(this.targetTopBound,this.maxScrollableHeight,t.friction))),this._scrollLeft=this._lerp(this.scrollLeft,this.targetLeft),this._scrollTop=this._lerp(this.scrollTop,this.targetTop)}},{key:"_calcElements",value:function(){for(var t=this._getLerpEase(),e=0;e<this._elementsLength;e+=1){var r=this._elements[e],n=this._getLerpEase(r);n===t?(r.smoothScrollLeft=this._scrollLeft,r.smoothScrollTop=this._scrollTop):(r.smoothScrollLeft=this._lerp(r.smoothScrollLeft,this._targetLeft,n),r.smoothScrollTop=this._lerp(r.smoothScrollTop,this._targetTop,n))}}},{key:"_lerp",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._getLerpEase(),n=this.prop.render,o=n.lerpToFixed,i=n.approximation,s=this._instant?1:r,c=et(t,e,s,i);if("number"==typeof o){var a=Math.round(Math.abs(o));return parseFloat(c.toFixed(a))}return c}},{key:"_getLerpEase",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.prop.render,r=e.lerp,n=e.normalizeLerp,o=n?60/this._currentFPS:1;return t&&t.smoothScrollLerpEase||r*o}},{key:"_renderElements",value:function(){for(var t=0;t<this._elementsLength;t+=1){var e=this._elements[t],r=-e.smoothScrollLeft,n=-e.smoothScrollTop;e.style.transform="matrix3d(1,0,0.00,0,0.00,1,0.00,0,0,0,1,0, ".concat(r,", ").concat(n,", 0,1)")}}},{key:"scrollTo",value:function(){var t=arguments;if(1===t.length&&"object"===wt(t[0])){var e=t[0],r=e.top,n=e.left,o=e.behavior;void 0!==n&&("smooth"===o?this.targetLeftBound=n:this.scrollLeft=n),void 0!==r&&("smooth"===o?this.targetTopBound=r:this.scrollTop=r),"smooth"===o&&this._enable()}"number"!=typeof t[0]&&"number"!=typeof t[1]||("number"==typeof t[0]&&(this.scrollLeft=t[0]),"number"==typeof t[1]&&(this.scrollTop=t[1]))}},{key:"_destroy",value:function(){if(Et(Dt(i.prototype),"_destroy",this).call(this),this._disable(),this._animationFrame&&this._animationFrame.destroy(),!this._containerExists){for(;this._container.firstChild;)this._outer.appendChild(this._container.firstChild);this._container.remove()}this._outer.classList.remove(this.prefix),this._elements.forEach((function(t){t.style.transform="",t.style.willChange=""}))}}],r&&jt(e.prototype,r),n&&jt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Z),It=[];function Bt(t){var e=t.container,r=t.callback,n=t.isPassive,o=void 0!==n&&n,i=It.find((function(t){return t.container===e&&t.isPassive===o})),s=c("scroll-event");if(i)i.callbacks.push({id:s,callback:r});else{i={id:c("scroll-event-instance"),container:e,callbacks:[{id:s,callback:r}],isPassive:o,listeners:[]},It.push(i);var a=i.listeners;if(e instanceof Wt)a.push(e.addCallback("scroll",(function(){for(var t=e.scrollTop,r=e.scrollLeft,n=0;n<i.callbacks.length;n+=1)i.callbacks[n].callback({scrollTop:t,scrollLeft:r})})));else{var u=e instanceof Window,l=v(e);a.push(w(l,"scroll",(function(){for(var t=u?l.pageYOffset:l.scrollTop,e=u?l.pageXOffset:l.scrollLeft,r=0;r<i.callbacks.length;r+=1)i.callbacks[r].callback({scrollTop:t,scrollLeft:e})}),{passive:o}))}}return{remove:function(){var t=i.callbacks.filter((function(t){return t.id!==s}));i.callbacks=t,0===t.length&&(i.listeners.forEach((function(t){t.remove()})),It=It.filter((function(t){return t.id!==i.id})))}}}function Ft(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype}function zt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if(t){var e=t instanceof Window?t.pageYOffset:t.scrollTop,r=t instanceof Window?t.pageXOffset:t.scrollLeft;return{scrollTop:e,scrollLeft:r}}}function At(t,e){const[r,n,o,i]=e;if(r===n&&o===i)return t;const s=[];for(let c=0;c<11;++c)s[c]=Ht(.1*c,r,o);return 0===t?0:1===t?1:Ht(function(t,e,r){const n=t[0],o=t[2];let i=0,s=1;for(;10!==s&&r[s]<=e;++s)i+=.1;--s;const c=(e-r[s])/(r[s+1]-r[s]),a=i+.1*c,u=Qt(a,n,o);if(u>=.001)return function(t,e,r,n){for(let o=0;o<4;++o){const o=Qt(e,r,n);if(0===o)return e;e-=(Ht(e,r,n)-t)/o}return e}(e,a,n,o);if(0===u)return a;return function(t,e,r,n,o){let i,s,c=0;do{s=e+(r-e)/2,i=Ht(s,n,o)-t,i>0?r=s:e=s}while(Math.abs(i)>1e-7&&++c<10);return s}(e,i,i+.1,n,o)}(e,t,s),n,i)}function Ht(t,e,r){return((Nt(e,r)*t+Vt(e,r))*t+Xt(e))*t}function Nt(t,e){return 1-3*e+3*t}function Vt(t,e){return 3*e-6*t}function Xt(t){return 3*t}function Qt(t,e,r){return 3*Nt(e,r)*t*t+2*Vt(e,r)*t+Xt(e)}function $t(t){const e=7.5625,r=2.75;return t<1/r?e*t*t:t<2/r?e*(t-=1.5/r)*t+.75:t<2.5/r?e*(t-=2.25/r)*t+.9375:e*(t-=2.625/r)*t+.984375}function Ut(t,e){switch(e){case Mt.easeInSine:return r=t,1-Math.cos(r*Math.PI/2);case Mt.easeOutSine:return function(t){return Math.sin(t*Math.PI/2)}(t);case Mt.easeInOutSine:return function(t){return-(Math.cos(Math.PI*t)-1)/2}(t);case Mt.easeInQuad:return function(t){return Math.pow(t,2)}(t);case Mt.easeOutQuad:return function(t){return 1-Math.pow(1-t,2)}(t);case Mt.easeInOutQuad:return function(t){return t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2}(t);case Mt.easeInCubic:return function(t){return Math.pow(t,3)}(t);case Mt.easeOutCubic:return function(t){return 1-Math.pow(1-t,3)}(t);case Mt.easeInOutCubic:return function(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}(t);case Mt.easeInQuart:return function(t){return Math.pow(t,4)}(t);case Mt.easeOutQuart:return function(t){return 1-Math.pow(1-t,4)}(t);case Mt.easeInOutQuart:return function(t){return t<.5?8*t*t*t*t:1-Math.pow(-2*t+2,4)/2}(t);case Mt.easeInQuint:return function(t){return Math.pow(t,5)}(t);case Mt.easeOutQuint:return function(t){return 1-Math.pow(1-t,5)}(t);case Mt.easeInOutQuint:return function(t){return t<.5?16*t*t*t*t*t:1-Math.pow(-2*t+2,5)/2}(t);case Mt.easeInExpo:return function(t){return 0===t?0:Math.pow(2,10*t-10)}(t);case Mt.easeOutExpo:return function(t){return 1===t?1:1-Math.pow(2,-10*t)}(t);case Mt.easeInOutExpo:return function(t){return 0===t?0:1===t?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2}(t);case Mt.easeInCirc:return function(t){return 1-Math.sqrt(1-Math.pow(t,2))}(t);case Mt.easeOutCirc:return function(t){return Math.sqrt(1-Math.pow(t-1,2))}(t);case Mt.easeInOutCirc:return function(t){return t<.5?(1-Math.sqrt(1-Math.pow(2*t,2)))/2:(Math.sqrt(1-Math.pow(-2*t+2,2))+1)/2}(t);case Mt.easeInBack:return function(t){return 2.70158*t*t*t-1.70158*t*t}(t);case Mt.easeOutBack:return function(t){const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}(t);case Mt.easeInOutBack:return function(t){const e=2.5949095;return t<.5?Math.pow(2*t,2)*(7.189819*t-e)/2:(Math.pow(2*t-2,2)*((e+1)*(2*t-2)+e)+2)/2}(t);case Mt.easeInElastic:return function(t){const e=2*Math.PI/3;return 0===t?0:1===t?1:-Math.pow(2,10*t-10)*Math.sin((10*t-10.75)*e)}(t);case Mt.easeOutElastic:return function(t){const e=2*Math.PI/3;return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin((10*t-.75)*e)+1}(t);case Mt.easeInOutElastic:return function(t){const e=2*Math.PI/4.5;return 0===t?0:1===t?1:t<.5?-Math.pow(2,20*t-10)*Math.sin((20*t-11.125)*e)/2:Math.pow(2,-20*t+10)*Math.sin((20*t-11.125)*e)/2+1}(t);case Mt.easeInBounce:return function(t){return 1-$t(1-t)}(t);case Mt.easeOutBounce:return $t(t);case Mt.easeInOutBounce:return function(t){return t<.5?(1-$t(1-2*t))/2:(1+$t(2*t-1))/2}(t);default:return t}var r}function Yt(t){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(t)}function qt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Kt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qt(Object(r),!0).forEach((function(e){se(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Jt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Zt(t,e){return Zt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Zt(t,e)}function te(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ie(t);if(e){var o=ie(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ee(this,r)}}function ee(t,e){if(e&&("object"===Yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return re(t)}function re(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ne(){return ne="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=oe(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ne.apply(this,arguments)}function oe(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ie(t)););return t}function ie(t){return ie=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ie(t)}function se(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t.easeInSine="easeInSine",t.easeOutSine="easeOutSine",t.easeInOutSine="easeInOutSine",t.easeInQuad="easeInQuad",t.easeOutQuad="easeOutQuad",t.easeInOutQuad="easeInOutQuad",t.easeInCubic="easeInCubic",t.easeOutCubic="easeOutCubic",t.easeInOutCubic="easeInOutCubic",t.easeInQuart="easeInQuart",t.easeOutQuart="easeOutQuart",t.easeInOutQuart="easeInOutQuart",t.easeInQuint="easeInQuint",t.easeOutQuint="easeOutQuint",t.easeInOutQuint="easeInOutQuint",t.easeInExpo="easeInExpo",t.easeOutExpo="easeOutExpo",t.easeInOutExpo="easeInOutExpo",t.easeInCirc="easeInCirc",t.easeOutCirc="easeOutCirc",t.easeInOutCirc="easeInOutCirc",t.easeInBack="easeInBack",t.easeOutBack="easeOutBack",t.easeInOutBack="easeInOutBack",t.easeInElastic="easeInElastic",t.easeOutElastic="easeOutElastic",t.easeInOutElastic="easeInOutElastic",t.easeInBounce="easeInBounce",t.easeOutBounce="easeOutBounce",t.easeInOutBounce="easeInOutBounce"}(Mt||(Mt={}));var ce=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zt(t,e)}(i,t);var e,r,n,o=te(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Jt(this,i),se(re(e=o.call(this,t,!1)),"_progress",void 0),se(re(e),"_easing",void 0),se(re(e),"_nestedTimelines",void 0),e._progress=0,e._easing=0,e._nestedTimelines=[],r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return Kt(Kt({},ne(ie(i.prototype),"_getDefaultProp",this).call(this)),{},{easing:this._app.prop.easing,scope:[0,1],useNestedEasingProgress:!1})}},{key:"progress",get:function(){return this._progress},set:function(t){this._progress=t,this._handleProgress()}},{key:"easing",get:function(){return this._easing}},{key:"addNestedTimeline",value:function(t){this._nestedTimelines.push(t)}},{key:"_handleProgress",value:function(){this._easing=function(t,e=!1){return e?Array.isArray(e)?At(t,e):"function"==typeof e?e(t):Ut(t,e):t}(this._progress,this.prop.easing),this._callbacks.tbt("progress",{progress:this._progress,easing:this._easing}),this._renderNestedTimelines()}},{key:"_renderNestedTimelines",value:function(){var t=this._nestedTimelines.length;if(0!==t)for(var e=this.prop.useNestedEasingProgress?this.easing:this.progress,r=0,n=t;r<n;r+=1){var o=this._nestedTimelines[r],i=tt(rt(e,o.prop.nestedScope),[0,1]);o.progress=i}}},{key:"_destroy",value:function(){ne(ie(i.prototype),"_destroy",this).call(this),this._nestedTimelines.forEach((function(t){t.destroy()}))}}])&&Gt(e.prototype,r),n&&Gt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Z);function ae(t){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ae(t)}function ue(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function le(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ue(Object(r),!0).forEach((function(e){me(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function fe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function he(t,e){return he=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},he(t,e)}function de(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ge(t);if(e){var o=ge(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ye(this,r)}}function ye(t,e){if(e&&("object"===ae(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ve(t)}function ve(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function be(){return be="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=_e(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},be.apply(this,arguments)}function _e(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ge(t)););return t}function ge(t){return ge=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ge(t)}function me(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var we=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&he(t,e)}(i,t);var e,r,n,o=de(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return fe(this,i),me(ve(e=o.call(this,t,!1)),"_isPlaying",void 0),me(ve(e),"_isReversed",void 0),me(ve(e),"_isPaused",void 0),me(ve(e),"_animationFrame",void 0),me(ve(e),"_animationFrameLastTime",void 0),e._isPlaying=!1,e._isReversed=!1,e._isPaused=!1,e._animationFrame=void 0,e._animationFrameLastTime=0,r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return le(le({},be(ge(i.prototype),"_getDefaultProp",this).call(this)),{},{duration:1e3,reset:!1,destroyOnEnd:!1})}},{key:"isPlaying",get:function(){return void 0!==this._animationFrame}},{key:"isReversed",get:function(){return this._isReversed}},{key:"isPaused",get:function(){return this._isPaused}},{key:"play",value:function(){this._destroyed||(this.prop.reset&&1===this.progress&&(this._progress=0),this._isReversed=!1,this._isPaused=!1,this.isPlaying||(this._animationFrameLastTime=+new Date,this._animate()))}},{key:"reverse",value:function(){this._destroyed||(this.prop.reset&&0===this.progress&&(this._progress=1),this._isReversed=!0,this._isPaused=!1,this.isPlaying||(this._animationFrameLastTime=+new Date,this._animate()))}},{key:"pause",value:function(){this._destroyed||(this._isPaused=!0,this._animationFrame&&window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}},{key:"_animate",value:function(){if(!this._isPaused){var t=this.isReversed,e=+new Date,r=Math.abs(this._animationFrameLastTime-e);this._animationFrameLastTime=e;var n=r/this.prop.duration/(t?-1:1),o=tt(this.progress+n,[0,1]);if(this.progress=o,1===o&&!t||0===o&&t)return this._isReversed=!1,this._isPaused=!1,void(this._animationFrame=void 0);this._animationFrame=window.requestAnimationFrame(this._animate.bind(this))}}},{key:"_handleProgress",value:function(){be(ge(i.prototype),"_handleProgress",this).call(this);var t=this._progress;0===t?this.callbacks.tbt("start",!1):1===t&&(this.callbacks.tbt("end",!1),this.prop.destroyOnEnd&&this.destroy())}},{key:"_destroy",value:function(){this.pause(),be(ge(i.prototype),"_destroy",this).call(this)}}])&&pe(e.prototype,r),n&&pe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ce);function Oe(t){var e=t.container,r=void 0===e?window:e,n=t.top,o=void 0===n?0:n,i=t.left,s=void 0===i?0:i,c=t.duration,a=void 0===c?250:c;return new Promise((function(t,e){var n=zt(r);if(n){var i=new we({duration:a});return i.addCallback("progress",(function(t){r&&r.scrollTo({top:n.scrollTop+(o-n.scrollTop)*t.easing,left:n.scrollLeft+(s-n.scrollLeft)*t.easing,behavior:"auto"})})),i.addCallback("end",(function(){t()})),void i.play()}e()}))}function Pe(t){var e=t.container,r=void 0===e?window:e,n=t.el,o=t.top,i=void 0===o?0:o,s=t.left,c=void 0===s?0:s,a=t.duration,u=void 0===a?250:a;return new Promise((function(t,e){var o=zt(r);if(o){var s=v(n);if(s){var a=s.getBoundingClientRect(),l=tt(a.top+o.scrollTop-i,[0,1/0]),f=tt(a.left+o.scrollLeft-c,[0,1/0]);Oe({container:r,top:l,left:f,duration:u}).then((function(){t()})).catch((function(){e()}))}}else e()}))}var ke=/iPhone/i,je=/iPod/i,Ee=/iPad/i,Se=/\biOS-universal(?:.+)Mac\b/i,Te=/\bAndroid(?:.+)Mobile\b/i,xe=/Android/i,Re=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Le=/Silk/i,De=/Windows Phone/i,Ce=/\bWindows(?:.+)ARM\b/i,Me=/BlackBerry/i,We=/BB10/i,Ie=/Opera Mini/i,Be=/\b(CriOS|Chrome)(?:.+)Mobile/i,Fe=/Mobile(?:.+)Firefox\b/i,ze=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};function Ae(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var r=e.userAgent,n=r.split("[FBAN");void 0!==n[1]&&(r=n[0]),void 0!==(n=r.split("Twitter"))[1]&&(r=n[0]);var o=function(t){return function(e){return e.test(t)}}(r),i={apple:{phone:o(ke)&&!o(De),ipod:o(je),tablet:!o(ke)&&(o(Ee)||ze(e))&&!o(De),universal:o(Se),device:(o(ke)||o(je)||o(Ee)||o(Se)||ze(e))&&!o(De)},amazon:{phone:o(Re),tablet:!o(Re)&&o(Le),device:o(Re)||o(Le)},android:{phone:!o(De)&&o(Re)||!o(De)&&o(Te),tablet:!o(De)&&!o(Re)&&!o(Te)&&(o(Le)||o(xe)),device:!o(De)&&(o(Re)||o(Le)||o(Te)||o(xe))||o(/\bokhttp\b/i)},windows:{phone:o(De),tablet:o(Ce),device:o(De)||o(Ce)},other:{blackberry:o(Me),blackberry10:o(We),opera:o(Ie),firefox:o(Fe),chrome:o(Be),device:o(Me)||o(We)||o(Ie)||o(Fe)||o(Be)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var He,Ne,Ve=function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},Xe=function(t,e,r){this.name=t,this.version=e,this.os=r,this.type="browser"},Qe=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},$e=function(t,e,r,n){this.name=t,this.version=e,this.os=r,this.bot=n,this.type="bot-device"},Ue=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},Ye=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},qe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Ke=[["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",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],Je=[["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 Ge(t){return t?tr(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new Ye:"undefined"!=typeof navigator?tr(navigator.userAgent):"undefined"!=typeof process&&process.version?new Qe(process.version.slice(1)):null}function Ze(t){return""!==t&&Ke.reduce((function(e,r){var n=r[0],o=r[1];if(e)return e;var i=o.exec(t);return!!i&&[n,i]}),!1)}function tr(t){var e=Ze(t);if(!e)return null;var r=e[0],n=e[1];if("searchbot"===r)return new Ue;var o=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);o?o.length<3&&(o=Ve(Ve([],o,!0),function(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}(3-o.length),!0)):o=[];var i=o.join("."),s=function(t){for(var e=0,r=Je.length;e<r;e++){var n=Je[e],o=n[0];if(n[1].exec(t))return o}return null}(t),c=qe.exec(t);return c&&c[1]?new $e(r,i,s,c[1]):new Xe(r,i,s)}class er extends Error{constructor(t){super(t||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}}class rr{static fn(t){return(...e)=>new rr(((r,n,o)=>{e.push(o),t(...e).then(r,n)}))}constructor(t){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise(((e,r)=>{this._reject=r;const n=t=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(t)};Object.defineProperties(n,{shouldReject:{get:()=>this._rejectOnCancel,set:t=>{this._rejectOnCancel=t}}}),t((t=>{this._isCanceled&&n.shouldReject||(this._isPending=!1,e(t))}),(t=>{this._isPending=!1,r(t)}),n)}))}then(t,e){return this._promise.then(t,e)}catch(t){return this._promise.catch(t)}finally(t){return this._promise.finally(t)}cancel(t){if(this._isPending&&!this._isCanceled){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(const t of this._cancelHandlers)t()}catch(e){return void this._reject(e)}this._rejectOnCancel&&this._reject(new er(t))}}get isCanceled(){return this._isCanceled}}function nr(t){return nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nr(t)}function or(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ir(){return ir="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=sr(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ir.apply(this,arguments)}function sr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=fr(t)););return t}function cr(t,e){return cr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},cr(t,e)}function ar(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=fr(t);if(e){var o=fr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ur(this,r)}}function ur(t,e){if(e&&("object"===nr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return lr(t)}function lr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fr(t){return fr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},fr(t)}function pr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Object.setPrototypeOf(rr.prototype,Promise.prototype),function(t){t.Desktop="desktop",t.Tablet="tablet",t.Phone="phone"}(He||(He={})),function(t){t.Landscape="landscape",t.Portrait="portrait"}(Ne||(Ne={}));var hr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cr(t,e)}(i,t);var e,r,n,o=ar(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),pr(lr(t=o.call(this,!1)),"_width",void 0),pr(lr(t),"_height",void 0),pr(lr(t),"_prevSize",void 0),pr(lr(t),"_isDesktop",void 0),pr(lr(t),"_isTablet",void 0),pr(lr(t),"_isPhone",void 0),pr(lr(t),"_resizeTimeout",void 0),t._width=0,t._height=0,t._prevSize={w:0,h:0},t._isDesktop=!1,t._isTablet=!1,t._isPhone=!1,t._init(),t}return e=i,r=[{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"vw",get:function(){return this.width/100}},{key:"vh",get:function(){return this.height/100}},{key:"prevSize",get:function(){return this._prevSize}},{key:"isLandscape",get:function(){return this.width>this.height}},{key:"isPortrait",get:function(){return this.width<this.height}},{key:"isDesktop",get:function(){return this._isDesktop}},{key:"isTablet",get:function(){return this._isTablet}},{key:"isPhone",get:function(){return this._isPhone}},{key:"dpr",get:function(){return void 0!==window.devicePixelRatio?window.devicePixelRatio:1}},{key:"lowerDesktopDPR",get:function(){return this._app.isDesktop?1:this.dpr}},{key:"_constructor",value:function(){ir(fr(i.prototype),"_constructor",this).call(this),this._setValues()}},{key:"_setEvents",value:function(){var t=this;window.addEventListener("resize",(function(){t._resizeTimeout&&t._resizeTimeout.clear(),t._resizeTimeout=f((function(){t._onResize()}),t._app.prop.viewportResizeTimeout)}))}},{key:"_setValues",value:function(){var t=this._app,e=t.html,r=t.prop;this._width=e.clientWidth,this._height=e.clientHeight,this._prevSize={w:this._width,h:this._height};var n=this.width;this._isDesktop=n>=r.tablet,this._isTablet=n<=r.tablet&&n>r.phone,this._isPhone=n<=r.phone,this._updateClasses(),this._updateCSSVars()}},{key:"_updateClasses",value:function(){var t=[He.Desktop,He.Tablet,He.Phone];this.isDesktop?this._updateBreakpointClasses(He.Desktop,t):this.isTablet?this._updateBreakpointClasses(He.Tablet,t):this._updateBreakpointClasses(He.Phone,t);var e=[Ne.Landscape,Ne.Portrait];this.isLandscape?this._updateBreakpointClasses(Ne.Landscape,e):this.isPortrait?this._updateBreakpointClasses(Ne.Portrait,e):this._updateBreakpointClasses("",e)}},{key:"_updateBreakpointClasses",value:function(t,e){var r=this._app.html,n=this._app.prefix;e.forEach((function(e){e===t?r.classList.add("".concat(n,"viewport-").concat(e)):r.classList.remove("".concat(n,"viewport-").concat(e))}))}},{key:"_updateCSSVars",value:function(){var t=this._app.html;t.style.setProperty("--vw","".concat(this.vw,"px")),t.style.setProperty("--vh","".concat(this.vh,"px"))}},{key:"_onResize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._prevSize.w,r=this._prevSize.h;this._setValues();var n=this.width,o=this.height,i={widthChanged:n!==e,heightChanged:o!==r,orientationChanged:n>o!=e>r};(t||n!==e&&o===r)&&this.tbt("w_",i),(t||o!==r&&n===e)&&this.tbt("h_",i),(t||n!==e&&o!==r)&&(this.tbt("wh",i),this.tbt("hw",i)),(t||n!==e)&&this.tbt("w",i),(t||o!==r)&&this.tbt("h",i),this.tbt("",i)}},{key:"forceResize",value:function(){this._onResize(!0)}}],r&&or(e.prototype,r),n&&or(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(R);function dr(t){return dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dr(t)}function yr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vr(t,e){return vr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},vr(t,e)}function br(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=mr(t);if(e){var o=mr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _r(this,r)}}function _r(t,e){if(e&&("object"===dr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return gr(t)}function gr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mr(t){return mr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},mr(t)}var wr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vr(t,e)}(i,t);var e,r,n,o=br(i);function i(){var t,e,r,n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t=o.call(this,!1),e=gr(t),n=void 0,(r="_loaded")in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,t._loaded=!1,t._init(),t}return e=i,(r=[{key:"loaded",get:function(){return this._loaded}},{key:"_setEvents",value:function(){var t=this;"complete"===document.readyState?this._handleLoaded():window.addEventListener("load",(function(){t._handleLoaded()}))}},{key:"_handleLoaded",value:function(){var t=this._app,e=t.prefix;this._loaded=!0,t.html.classList.remove("".concat(e,"loading")),t.body.classList.remove("".concat(e,"loading")),t.html.classList.add("".concat(e,"loaded")),this.tbt("",!1)}},{key:"onLoaded",value:function(t){if(!this.loaded)return this.add("",t.bind(this));t()}}])&&yr(e.prototype,r),n&&yr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(R);function Or(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Pr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Or(Object(r),!0).forEach((function(e){Er(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Or(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Er(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Sr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(kr(this,t),Er(this,"_prop",void 0),Er(this,"_prefix",void 0),Er(this,"_isPhone",void 0),Er(this,"_isTablet",void 0),Er(this,"_isMobile",void 0),Er(this,"_isDesktop",void 0),Er(this,"_osName",void 0),Er(this,"_browserName",void 0),Er(this,"_pages",[]),Er(this,"_page",!1),Er(this,"_pageLoad",void 0),Er(this,"_viewport",void 0),window.vevetApp)throw new Error("Vevet Application already exists!");this._prop=Pr(Pr({},this.defaultProp),e),this._prefix=this.prop.prefix,this._sayHi(),window.vevetApp=this;var r=Ae();this._isPhone=r.phone,this.html.classList.toggle("".concat(this.prefix,"phone"),this._isPhone),this._isTablet=r.tablet,this.html.classList.toggle("".concat(this.prefix,"tablet"),this._isTablet),this._isMobile=r.phone||r.tablet,this.html.classList.toggle("".concat(this.prefix,"mobile"),this._isMobile),this._isDesktop=!this._isMobile,this.html.classList.toggle("".concat(this.prefix,"desktop"),this._isDesktop);var n=Ge();if(null!=n&&n.os){var o=n.os.split(" ")[0].toLowerCase();this.html.classList.add("".concat(this.prefix,"os-").concat(o)),this._osName=o}else this._osName="";if(null!=n&&n.name){var i=n.name.toLowerCase();this.html.classList.add("".concat(this.prefix,"browser-").concat(i)),this._browserName=i}else this._browserName="";this._pageLoad=new wr,this._viewport=new hr}var e,r,n;return e=t,(r=[{key:"prop",get:function(){return this._prop}},{key:"defaultProp",get:function(){return{sayHi:!0,tablet:1199,phone:899,prefix:"v-",easing:[.25,.1,.25,1],viewportResizeTimeout:0}}},{key:"prefix",get:function(){return this._prefix}},{key:"isPhone",get:function(){return this._isPhone}},{key:"isTablet",get:function(){return this._isTablet}},{key:"isMobile",get:function(){return this._isMobile}},{key:"isDesktop",get:function(){return this._isDesktop}},{key:"osName",get:function(){return this._osName}},{key:"browserName",get:function(){return this._browserName}},{key:"doc",get:function(){return document}},{key:"html",get:function(){return document.documentElement}},{key:"body",get:function(){return document.body}},{key:"pages",get:function(){return this._pages}},{key:"page",get:function(){return this._page},set:function(t){this._page=t}},{key:"onPageCreated",value:function(){var t=this;return new rr((function(e){t._page?t._page.onCreate().then((function(){e(t.page)})):setTimeout((function(){t.onPageCreated().then((function(){e(t.page)}))}),30)}))}},{key:"onPageShown",value:function(){var t=this;return new rr((function(e){t.onPageCreated().then((function(){t._page&&t._page.onShow().then((function(){e(t.page)}))}))}))}},{key:"pageLoad",get:function(){return this._pageLoad}},{key:"onPageLoaded",value:function(){var t=this;return new rr((function(e){t._pageLoad.onLoaded((function(){e()}))}))}},{key:"viewport",get:function(){return this._viewport}},{key:"_sayHi",value:function(){if(this.prop.sayHi){var t=["padding: 1rem 1.5rem;","background: #5F2580;","font: 1rem/1 Arial;","color: #ffffff;"].join("");console.log("%c%s",t,"Vevet")}}}])&&jr(e.prototype,r),n&&jr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Tr(t){return Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tr(t)}function xr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Rr(){return Rr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Lr(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Rr.apply(this,arguments)}function Lr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ir(t)););return t}function Dr(t,e){return Dr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Dr(t,e)}function Cr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ir(t);if(e){var o=Ir(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mr(this,r)}}function Mr(t,e){if(e&&("object"===Tr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wr(t)}function Wr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ir(t){return Ir=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ir(t)}var Br=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dr(t,e)}(i,t);var e,r,n,o=Cr(i);function i(t){var e,r,n,s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t,!1),r=Wr(e),s=void 0,(n="_component")in r?Object.defineProperty(r,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[n]=s,e}return e=i,(r=[{key:"component",get:function(){return this._component}},{key:"init",value:function(){if(!this._component)throw new Error("Component is not set. Be sure that initlugin is called before.");Rr(Ir(i.prototype),"init",this).call(this)}},{key:"initPlugin",value:function(t){this._inited||(this._component=t,this.init())}}])&&xr(e.prototype,r),n&&xr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(H);function Fr(t){return Fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fr(t)}function zr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ar(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zr(Object(r),!0).forEach((function(e){Kr(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Hr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Vr(){return Vr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Xr(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Vr.apply(this,arguments)}function Xr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=qr(t)););return t}function Qr(t,e){return Qr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Qr(t,e)}function $r(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=qr(t);if(e){var o=qr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ur(this,r)}}function Ur(t,e){if(e&&("object"===Fr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Yr(t)}function Yr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qr(t){return qr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qr(t)}function Kr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Jr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qr(t,e)}(i,t);var e,r,n,o=$r(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Hr(this,i),Kr(Yr(e=o.call(this,t,!1)),"_blocked",void 0),Kr(Yr(e),"_created",void 0),Kr(Yr(e),"_shown",void 0),Kr(Yr(e),"_hidden",void 0),Kr(Yr(e),"_viaAJAX",void 0),e._blocked=!1,e._created=!1,e._shown=!1,e._hidden=!1,e._destroyed=!1,e._viaAJAX=!1,r&&e.init(),e}return e=i,r=[{key:"blocked",get:function(){return this._blocked}},{key:"created",get:function(){return this._created}},{key:"shown",get:function(){return this._shown}},{key:"hidden",get:function(){return this._hidden}},{key:"viaAJAX",get:function(){return this._viaAJAX}},{key:"pageClassName",get:function(){return"".concat(this._app.prefix,"page-").concat(this.prop.name)}},{key:"_getDefaultProp",value:function(){return Ar(Ar({},Vr(qr(i.prototype),"_getDefaultProp",this).call(this)),{},{name:"home"})}},{key:"create",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(r,n){t.canCreate().then((function(){t.created||t.blocked?n():(t._blocked=!0,t._shown=!1,t._hidden=!1,t._destroyed=!1,t._viaAJAX=e,t._app.page=t,t._app.html.classList.add(t.pageClassName),t._create().then((function(){t.callbacks.tbt("create",!1),t._blocked=!1,t._created=!0,r()})).catch((function(){n()})))})).catch((function(){n()}))}))}},{key:"_create",value:function(){return new Promise((function(t){t()}))}},{key:"canCreate",value:function(){var t=this;return new Promise((function(e,r){t.created?r():e()}))}},{key:"show",value:function(){var t=this;return new Promise((function(e,r){t.canShow().then((function(){t.shown||t.blocked?r():(t._blocked=!0,t._created=!0,t._hidden=!1,t._destroyed=!1,t._show().then((function(){t.callbacks.tbt("show",!1),t._blocked=!1,t._shown=!0,e()})).catch((function(){r()})))})).catch((function(){r()}))}))}},{key:"_show",value:function(){return new Promise((function(t){t()}))}},{key:"canShow",value:function(){var t=this;return new Promise((function(e,r){!t.created||t.shown?r():e()}))}},{key:"hide",value:function(){var t=this;return new Promise((function(e,r){t.canHide().then((function(){t.hidden||t.blocked?r():(t._blocked=!0,t._created=!0,t._shown=!1,t._destroyed=!1,t._hide().then((function(){t.callbacks.tbt("hide",!1),t._blocked=!1,t._hidden=!0,e()})).catch((function(){r()})))})).catch((function(){r()}))}))}},{key:"_hide",value:function(){return new Promise((function(t){t()}))}},{key:"canHide",value:function(){var t=this;return new Promise((function(e,r){t.created&&t.shown&&!t.hidden?e():r()}))}},{key:"destroy",value:function(){var t=this;return new Promise((function(e,r){t.canDestroy().then((function(){t.destroyed||t.blocked?r():(t._blocked=!0,t._created=!1,t._shown=!1,t._hidden=!0,t._app.page=!1,t._app.html.classList.remove(t.pageClassName),t._destroy().then((function(){t._blocked=!1,t._destroyed=!0,e()})).catch((function(){r()})))})).catch((function(){r()}))}))}},{key:"_destroy",value:function(){var t=this;return new Promise((function(e){Vr(qr(i.prototype),"_destroy",t).call(t),e()}))}},{key:"canDestroy",value:function(){var t=this;return new Promise((function(e,r){t.created&&t.hidden&&!t.destroyed?e():r()}))}},{key:"onCreate",value:function(){var t=this;return new rr((function(e){t.created?e():t.addCallback("create",(function(){e()}),{once:!0})}))}},{key:"onShow",value:function(){var t=this;return new rr((function(e){t.shown?e():t.addCallback("show",(function(){e()}),{once:!0})}))}},{key:"onHide",value:function(){var t=this;return new rr((function(e){t.hidden?e():t.addCallback("hide",(function(){e()}),{once:!0})}))}}],r&&Nr(e.prototype,r),n&&Nr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Z);function Gr(t){return Gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gr(t)}function Zr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function tn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zr(Object(r),!0).forEach((function(e){fn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function en(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function nn(t,e){return nn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},nn(t,e)}function on(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ln(t);if(e){var o=ln(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return sn(this,r)}}function sn(t,e){if(e&&("object"===Gr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return cn(t)}function cn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function an(){return an="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=un(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},an.apply(this,arguments)}function un(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ln(t)););return t}function ln(t){return ln=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ln(t)}function fn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nn(t,e)}(i,t);var e,r,n,o=on(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return en(this,i),fn(cn(e=o.call(this,t,!1)),"_wheelListener",void 0),fn(cn(e),"_lockWheel",void 0),fn(cn(e),"_lockWheelTimeout",void 0),e._wheelListener=void 0,e._lockWheel=!1,r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return tn(tn({},an(ln(i.prototype),"_getDefaultProp",this).call(this)),{},{container:!1,enabled:!0,stopPropagation:!1,threshold:20})}},{key:"container",get:function(){return this.prop.container?this.prop.container:window}},{key:"_setEvents",value:function(){an(ln(i.prototype),"_setEvents",this).call(this),this.container instanceof Window?this._toggleWheelEvent():(this._listeners.push(w(this.container,"mouseenter",this._handleMouseEnter.bind(this))),this._listeners.push(w(this.container,"mouseleave",this._handleMouseLeave.bind(this))))}},{key:"_onPropMutate",value:function(){an(ln(i.prototype),"_onPropMutate",this).call(this),this._toggleWheelEvent()}},{key:"_handleMouseEnter",value:function(){this.prop.enabled&&this._createWheelEvent()}},{key:"_handleMouseLeave",value:function(){this._destroyWheelEvent()}},{key:"_toggleWheelEvent",value:function(){this.prop.enabled?this._createWheelEvent():this._destroyWheelEvent()}},{key:"_createWheelEvent",value:function(){this._wheelListener||(this._lockWheel=!1,this._lockWheelTimeout&&clearTimeout(this._lockWheelTimeout),this._wheelListener=w(this.container,"wheel",this._handleWheel.bind(this)))}},{key:"_destroyWheelEvent",value:function(){this._wheelListener&&(this._wheelListener.remove(),this._wheelListener=void 0)}},{key:"_handleWheel",value:function(t){var e=this;if(this._wheelListener){if(this.prop.stopPropagation&&(t.preventDefault(),t.stopPropagation()),this._lockWheel)return this._lockWheelTimeout&&clearTimeout(this._lockWheelTimeout),void(this._lockWheelTimeout=setTimeout((function(){e._lockWheel=!1}),300));var r=k()(t),n=this.prop.threshold,o=!1;r.pixelY>n?(this._callbacks.tbt("down",!1),o=!0):r.pixelY<-1*n&&(this._callbacks.tbt("up",!1),o=!0),r.pixelX>n?(this._callbacks.tbt("right",!1),o=!0):r.pixelX<-1*n&&(this._callbacks.tbt("left",!1),o=!0),o&&(this._lockWheel=!0)}}},{key:"_destroy",value:function(){an(ln(i.prototype),"_destroy",this).call(this),this._destroyWheelEvent()}}])&&rn(e.prototype,r),n&&rn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(H);function hn(t){return hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hn(t)}function dn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function yn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?dn(Object(r),!0).forEach((function(e){jn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function vn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _n(t,e){return _n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},_n(t,e)}function gn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=kn(t);if(e){var o=kn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mn(this,r)}}function mn(t,e){if(e&&("object"===hn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return wn(t)}function wn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function On(){return On="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Pn(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},On.apply(this,arguments)}function Pn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kn(t)););return t}function kn(t){return kn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},kn(t)}function jn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var En=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_n(t,e)}(i,t);var e,r,n,o=gn(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(vn(this,i),jn(wn(e=o.call(this,t,!1)),"_container",void 0),jn(wn(e),"_startTime",void 0),jn(wn(e),"_endTime",void 0),jn(wn(e),"_toBeHidden",void 0),jn(wn(e),"_isHidden",void 0),jn(wn(e),"_pageLoadEvent",void 0),e.prop.container){var n=v(e.prop.container);n instanceof HTMLElement&&(e._container=n)}return e._container&&e._container.classList.add(e.prefix),e._startTime=+new Date,e._endTime=1/0,e._toBeHidden=!1,e._isHidden=!1,r&&e.init(),e}return e=i,r=[{key:"_getDefaultProp",value:function(){return yn(yn({},On(kn(i.prototype),"_getDefaultProp",this).call(this)),{},{container:"#".concat(this.prefix),hide:250})}},{key:"prefix",get:function(){return"".concat(this._app.prefix,"preloader")}},{key:"container",get:function(){return this._container}},{key:"startTime",get:function(){return this._startTime}},{key:"endTime",get:function(){return this._endTime}},{key:"totalTime",get:function(){return this._endTime-this._startTime}},{key:"isHidden",get:function(){return this._isHidden}},{key:"_setEvents",value:function(){var t=this;On(kn(i.prototype),"_setEvents",this).call(this),this._onLoaded().then((function(){t._endTime=+new Date,t._handleLoaded()}))}},{key:"_onLoaded",value:function(){var t=this;return new rr((function(e){t._app.pageLoad.loaded?e():t._pageLoadEvent=t._app.pageLoad.add("",(function(){e()}))}))}},{key:"_handleLoaded",value:function(){this.callbacks.tbt("loaded",!1),"boolean"!=typeof this.prop.hide&&this.hideContainer()}},{key:"hideContainer",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"boolean"!=typeof this.prop.hide?this.prop.hide:250;return this.callbacks.tbt("hide",!1),this._toBeHidden=!0,new rr((function(r){var n=t._container;if(!n)return t._handleHidden(),void r();n.style.transition="opacity ".concat(e,"ms, visibility ").concat(e,"ms"),n.style.opacity="0",n.style.visibility="hidden",f((function(){n.style.display="none",t._handleHidden(),r()}),e)}))}},{key:"_handleHidden",value:function(){this._isHidden=!0,this.callbacks.tbt("hidden",!1)}},{key:"onHide",value:function(t){if(!this._toBeHidden)return this.callbacks.add("hide",(function(){t()}));t()}},{key:"onHidden",value:function(t){if(!this._isHidden)return this.callbacks.add("hidden",(function(){t()}));t()}},{key:"_destroy",value:function(){var t;On(kn(i.prototype),"_destroy",this).call(this),null===(t=this._pageLoadEvent)||void 0===t||t.remove()}}],r&&bn(e.prototype,r),n&&bn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Z);function Sn(t){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sn(t)}function Tn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function xn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Tn(Object(r),!0).forEach((function(e){zn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Rn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ln(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Dn(t,e){return Dn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Dn(t,e)}function Cn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Fn(t);if(e){var o=Fn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mn(this,r)}}function Mn(t,e){if(e&&("object"===Sn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wn(t)}function Wn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function In(){return In="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Bn(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},In.apply(this,arguments)}function Bn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Fn(t)););return t}function Fn(t){return Fn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Fn(t)}function zn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var An=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dn(t,e)}(i,t);var e,r,n,o=Cn(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Rn(this,i),zn(Wn(e=o.call(this,t,!1)),"_imgs",void 0),zn(Wn(e),"_videos",void 0),zn(Wn(e),"_customResources",void 0),zn(Wn(e),"_resourcesTotal",void 0),zn(Wn(e),"_resourcesLoaded",void 0),zn(Wn(e),"_progress",void 0),zn(Wn(e),"_animationFrame",void 0),zn(Wn(e),"_endTimeline",void 0),e._imgs=[],e._videos=[],e._customResources=[],e._resourcesTotal=1+e.prop.resources,e._resourcesLoaded=0,e._progress=0,r&&e.init(),e}return e=i,r=[{key:"_getDefaultProp",value:function(){return xn(xn({},In(Fn(i.prototype),"_getDefaultProp",this).call(this)),{},{resources:0,loaders:{img:!0,video:!0,custom:".js-preload",ignoreClassName:"js-preload-ignore"},calc:{lerp:.1,forceEnd:500}})}},{key:"imgs",get:function(){return this._imgs}},{key:"videos",get:function(){return this._videos}},{key:"customResources",get:function(){return this._customResources}},{key:"resourcesTotal",get:function(){return this._resourcesTotal}},{key:"resourcesLoaded",get:function(){return this._resourcesLoaded}},{key:"loadProgress",get:function(){return this.resourcesLoaded/this.resourcesTotal}},{key:"progress",get:function(){return this._progress},set:function(t){this._progress=t,this._handleProgress()}},{key:"_constructor",value:function(){In(Fn(i.prototype),"_constructor",this).call(this),this._getResources()}},{key:"_setEvents",value:function(){var t=this;In(Fn(i.prototype),"_setEvents",this).call(this);var e=this.prop.calc.lerp;"number"==typeof e&&(this._animationFrame=new mt,this._animationFrame.addCallback("frame",(function(){t.progress=et(t.progress,t.loadProgress,e)})),this._animationFrame.play()),this._preloadResources(),this._app.onPageLoaded().then((function(){t._handleLoadedResource()}))}},{key:"_onLoaded",value:function(){var t=this;return new rr((function(e){var r=!1;t.callbacks.add("progress",(function(t){t.progress>=1&&!r&&(e(),r=!0)}),{protected:!0})}))}},{key:"_getResources",value:function(){var t=this,e=this.prop.loaders;e.img&&b("img").forEach((function(r){r.classList.contains(e.ignoreClassName)||(t._imgs.push(r),t._resourcesTotal+=1)})),e.video&&b("video").forEach((function(r){r.classList.contains(e.ignoreClassName)||(t._videos.push(r),t._resourcesTotal+=1)})),e.custom&&(Array.from(b(e.custom)).forEach((function(e){var r=parseInt(e.getAttribute("data-load-count")||"1",10);r=Number.isNaN(r)?1:tt(r,[1,1/0]);for(var n=1;n<=r;n+=1){var o=n/r;t._customResources.push({el:e,targetProgress:o})}})),this._resourcesTotal+=this._customResources.length)}},{key:"_preloadResources",value:function(){var t=this;0===this._resourcesTotal&&(this._resourcesTotal=1,this._handleLoadedResource()),this._imgs.forEach((function(e){if(e.complete)t._handleLoadedResource();else{var r=new Image;e.addEventListener("load",(function(){t._handleLoadedResource()})),e.addEventListener("error",(function(){t._handleLoadedResource()})),r.src=e.currentSrc||e.src}})),this._videos.forEach((function(e){if(e.readyState>0)t._handleLoadedResource();else{if("none"===e.preload)return void t._handleLoadedResource();e.addEventListener("error",(function(){t._handleLoadedResource()})),e.addEventListener("loadedmetadata",(function(){t._handleLoadedResource()}))}})),this._customResources.forEach((function(e){t._seekCustomResourceLoaded(e).then((function(){t._handleLoadedResource()}))}))}},{key:"_seekCustomResourceLoaded",value:function(t){var e=this;return new Promise((function(r){var n=t.el,o=t.targetProgress,i=0;if(void 0!==n.isComplete?"boolean"==typeof n.isComplete?n.isComplete&&(i=o):"number"==typeof n.isComplete&&(i=n.isComplete):void 0!==n.isLoaded&&("boolean"==typeof n.isLoaded?n.isLoaded&&(i=o):"number"==typeof n.isLoaded&&(i=n.isLoaded)),0===i){var s=n.getAttribute("data-is-loaded");if(null!==s&&""!==s){var c=parseFloat(s);i=Number.isNaN(c)?o:c}}i>=o?r():setTimeout((function(){e.destroyed||e._seekCustomResourceLoaded(t).then((function(){r()}))}),50)}))}},{key:"addResourcesLoaded",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=0;e<t;e+=1)this._handleLoadedResource()}},{key:"addResourcesTotal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this._resourcesTotal+=t}},{key:"_handleLoadedResource",value:function(){this.loadProgress>=1||(this._resourcesLoaded+=1,this.callbacks.tbt("resourceLoad",!1),this._animationFrame||(this.progress=this.loadProgress))}},{key:"_handleProgress",value:function(){var t=this;if(this.callbacks.tbt("progress",{progress:this._progress}),this.progress>=1)this._animationFrame&&(this._animationFrame.destroy(),this._animationFrame=void 0);else if("number"==typeof this.prop.calc.forceEnd&&this.loadProgress>=1&&!this._endTimeline){this._animationFrame&&(this._animationFrame.destroy(),this._animationFrame=void 0),this._endTimeline=new we({duration:this.prop.calc.forceEnd});var e=this.progress;this._endTimeline.addCallback("progress",(function(r){var n=1-e;t.progress=e+n*r.progress})),this._endTimeline.play()}}},{key:"_destroy",value:function(){In(Fn(i.prototype),"_destroy",this).call(this),this._animationFrame&&this._animationFrame.destroy()}}],r&&Ln(e.prototype,r),n&&Ln(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(En);function Hn(t){return Hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hn(t)}function Nn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Vn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nn(Object(r),!0).forEach((function(e){Zn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $n(t,e){return $n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},$n(t,e)}function Un(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Gn(t);if(e){var o=Gn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Yn(this,r)}}function Yn(t,e){if(e&&("object"===Hn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return qn(t)}function qn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Kn(){return Kn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Jn(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Kn.apply(this,arguments)}function Jn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Gn(t)););return t}function Gn(t){return Gn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Gn(t)}function Zn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var to=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$n(t,e)}(i,t);var e,r,n,o=Un(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(Xn(this,i),Zn(qn(e=o.call(this,t,!1)),"_container",void 0),Zn(qn(e),"_runtimeEvents",void 0),Zn(qn(e),"_isDragging",void 0),Zn(qn(e),"_pointerID",void 0),Zn(qn(e),"_coords",void 0),Zn(qn(e),"_prevCoords",void 0),Zn(qn(e),"_startCoords",void 0),e._container=v(e.prop.container),!d(e._container)&&!y(e._container))throw new Error("No container");return e._runtimeEvents=[],e._isDragging=!1,e._pointerID=null,e._coords={x:0,y:0},e._prevCoords={x:0,y:0},e._startCoords={x:0,y:0},r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return Vn(Vn({},Kn(Gn(i.prototype),"_getDefaultProp",this).call(this)),{},{container:"#".concat(this.prefix),usePassive:!1,enabled:!0})}},{key:"prefix",get:function(){return"".concat(this._app.prefix,"dragger")}},{key:"container",get:function(){return this._container}},{key:"isDragging",get:function(){return this._isDragging}},{key:"coords",get:function(){return this._coords}},{key:"startCoords",get:function(){return this._startCoords}},{key:"_setEvents",value:function(){var t=this.container,e=this.prop.usePassive;this.addEventListeners(t,"mousedown",this._handleStart.bind(this),{passive:e}),this.addEventListeners(t,"touchstart",this._handleStart.bind(this),{passive:e})}},{key:"_addRuntimeEvents",value:function(){var t=this.prop.usePassive;this._runtimeEvents.push(w(window,"mouseup",this._handleEnd.bind(this),{passive:t})),this._runtimeEvents.push(w(window,"touchend",this._handleEnd.bind(this),{passive:t})),this._runtimeEvents.push(w(window,"touchcancel",this.cancel.bind(this),{passive:t})),this._runtimeEvents.push(w(window,"blur",this.cancel.bind(this),{passive:t}))}},{key:"_removeRuntimeEvents",value:function(){this._runtimeEvents.forEach((function(t){t.remove()})),this._runtimeEvents=[]}},{key:"_normalizeEvent",value:function(t){if(t.type.includes("touch")){var e=t,r=e.targetTouches[0]||e.changedTouches[0];return{x:r.clientX,y:r.clientY,id:r.identifier}}var n=t;return{x:n.clientX,y:n.clientY,id:null}}},{key:"_handleStart",value:function(t){if(!this.prop.enabled)return!1;if(this.isDragging)return!1;var e=this._normalizeEvent(t);if("mousedown"===t.type){if(1!==t.which)return!1;t.stopPropagation()}return this._isDragging=!0,this._pointerID=e.id,this._coords={x:e.x,y:e.y},this._prevCoords={x:e.x,y:e.y},this._startCoords={x:e.x,y:e.y},this._addRuntimeEvents(),this.callbacks.tbt("start",{evt:t}),!0}},{key:"_handleEnd",value:function(t){var e=this._normalizeEvent(t);return!(!this.isDragging||e.id!==this._pointerID||(this.cancel(),0))}},{key:"cancel",value:function(){this._removeRuntimeEvents(),this._isDragging=!1,this.callbacks.tbt("end",!1)}},{key:"_destroy",value:function(){Kn(Gn(i.prototype),"_destroy",this).call(this),this._removeRuntimeEvents()}}])&&Qn(e.prototype,r),n&&Qn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Z);function eo(t){return eo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eo(t)}function ro(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function no(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function oo(){return oo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=io(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},oo.apply(this,arguments)}function io(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=uo(t)););return t}function so(t,e){return so=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},so(t,e)}function co(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=uo(t);if(e){var o=uo(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ao(this,r)}}function ao(t,e){if(e&&("object"===eo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function uo(t){return uo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},uo(t)}var lo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&so(t,e)}(i,t);var e,r,n,o=co(i);function i(){return ro(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"stepCoords",get:function(){return{x:this._coords.x-this._prevCoords.x,y:this._coords.y-this._prevCoords.y}}},{key:"_addRuntimeEvents",value:function(){oo(uo(i.prototype),"_addRuntimeEvents",this).call(this);var t=this.prop.usePassive;this._runtimeEvents.push(w(window,"mousemove",this._handleMove.bind(this),{passive:t})),this._runtimeEvents.push(w(window,"touchmove",this._handleMove.bind(this),{passive:t}))}},{key:"_handleMove",value:function(t){var e=this._normalizeEvent(t);return!(!this.isDragging||e.id!==this._pointerID||(this._prevCoords={x:this._coords.x,y:this._coords.y},this._coords={x:e.x,y:e.y},this.callbacks.tbt("move",{evt:t,start:this.startCoords,coords:this.coords,step:this.stepCoords}),0))}},{key:"_destroy",value:function(){oo(uo(i.prototype),"_destroy",this).call(this)}}])&&no(e.prototype,r),n&&no(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(to);function fo(t){return fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fo(t)}function po(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ho(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?po(Object(r),!0).forEach((function(e){yo(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):po(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function yo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _o(){return _o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=go(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},_o.apply(this,arguments)}function go(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Po(t)););return t}function mo(t,e){return mo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},mo(t,e)}function wo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Po(t);if(e){var o=Po(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Oo(this,r)}}function Oo(t,e){if(e&&("object"===fo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Po(t){return Po=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Po(t)}var ko=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mo(t,e)}(i,t);var e,r,n,o=wo(i);function i(){return vo(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"_getDefaultProp",value:function(){return ho(ho({},_o(Po(i.prototype),"_getDefaultProp",this).call(this)),{},{min:75})}},{key:"_handleEnd",value:function(t){var e=_o(Po(i.prototype),"_handleEnd",this).call(this,t);if(!e)return e;var r=this._normalizeEvent(t),n=this.startCoords,o=Math.abs(this.prop.min);return n.y>r.y&&Math.abs(r.y-n.y)>=o&&this.callbacks.tbt("up",!1),n.y<r.y&&Math.abs(r.y-n.y)>=o&&this.callbacks.tbt("down",!1),n.x>r.x&&Math.abs(r.x-n.x)>=o&&this.callbacks.tbt("left",!1),n.x<r.x&&Math.abs(r.x-n.x)>=o&&this.callbacks.tbt("right",!1),!0}}])&&bo(e.prototype,r),n&&bo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(to);function jo(t){return jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jo(t)}function Eo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function So(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Eo(Object(r),!0).forEach((function(e){Bo(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Eo(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function To(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ro(){return Ro="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Lo(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ro.apply(this,arguments)}function Lo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Io(t)););return t}function Do(t,e){return Do=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Do(t,e)}function Co(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Io(t);if(e){var o=Io(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mo(this,r)}}function Mo(t,e){if(e&&("object"===jo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wo(t)}function Wo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Io(t){return Io=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Io(t)}function Bo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Fo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Do(t,e)}(i,t);var e,r,n,o=Co(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];To(this,i),Bo(Wo(e=o.call(this,t,!1)),"_canvas",void 0),Bo(Wo(e),"_ctx",void 0),Bo(Wo(e),"_width",void 0),Bo(Wo(e),"_height",void 0),Bo(Wo(e),"_dpr",void 0),e._width=0,e._height=0,e._dpr=1;var n=e.prop,s=n.append,c=n.container,a=s&&c?c:void 0;return e._canvas=g("canvas",{parent:a}),e._ctx=e._canvas.getContext("2d"),e.prop.initialResize&&e.resize(),r&&e.init(),e}return e=i,(r=[{key:"container",get:function(){return this.prop.container}},{key:"canvas",get:function(){return this._canvas}},{key:"ctx",get:function(){return this._ctx}},{key:"width",get:function(){return this._width}},{key:"nonDPRWidth",get:function(){return this.width/this.dpr}},{key:"clientWidth",get:function(){return this.width/this.dpr}},{key:"height",get:function(){return this._height}},{key:"nonDPRHeight",get:function(){return this.height/this.dpr}},{key:"clientHeight",get:function(){return this.height/this.dpr}},{key:"dpr",get:function(){return this._dpr}},{key:"canRender",get:function(){return this.width>0&&this.height>0}},{key:"_getDefaultProp",value:function(){return So(So({},Ro(Io(i.prototype),"_getDefaultProp",this).call(this)),{},{container:!1,append:!0,updateOnResize:!1,initialResize:!0,resizeTimeout:0,width:!1,height:!1,dpr:!1})}},{key:"_setEvents",value:function(){var t=this;if(Ro(Io(i.prototype),"_setEvents",this).call(this),!1!==this.prop.updateOnResize){var e="boolean"==typeof this.prop.updateOnResize?"":this.prop.updateOnResize;this.addViewportCallback(e,(function(){t.resize()}),{timeout:this.prop.resizeTimeout}),this.resize()}}},{key:"_onPropMutate",value:function(){Ro(Io(i.prototype),"_onPropMutate",this).call(this),this.resize()}},{key:"resize",value:function(){var t=this.prop,e=this.canvas;if(e){var r=this._app.viewport;"number"==typeof t.dpr?this._dpr=t.dpr:this._dpr=r.dpr;var n=this._dpr,o=0,i=0;"number"==typeof t.width&&"number"==typeof t.height?(o=t.width,i=t.height):this.container?(o=this.container.clientWidth,i=this.container.clientHeight):(o=r.width,i=r.height),o*=n,i*=n,this._width=o,this._height=i,e.width=o,e.height=i,this.callbacks.tbt("resize",!1)}}},{key:"_destroy",value:function(){Ro(Io(i.prototype),"_destroy",this).call(this),this.canvas&&this.canvas.remove()}}])&&xo(e.prototype,r),n&&xo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Z);function zo(t){const e=function(t){if("container"in t)return{width:t.container.clientWidth,height:t.container.clientHeight};return{width:t.width,height:t.height}}(t),r=function(t){const{source:e}=t;if(t.sourceWidth&&t.sourceHeight)return{width:t.sourceWidth,height:t.sourceHeight};if(e instanceof HTMLVideoElement)return{width:e.videoWidth,height:e.videoHeight};if(e instanceof HTMLImageElement)return{width:e.naturalWidth,height:e.naturalHeight};return{width:e.width,height:e.height}}(t);let n;return"cover"===t.rule?n=function(t,e,r){let n=e.width*Ao(t),o=r.height*n/r.width;o/Ao(t)<e.height&&(o=e.height*Ao(t),n=r.width*o/r.height);const i=(e.width-n)/2,s=(e.height-o)/2;return{width:n,height:o,x:i,y:s}}(t,e,r):"contain"===t.rule?n=function(t,e,r){let n=0,o=0;const i=r.width/r.height;e.width>e.height?(o=e.height,n=o*i,n>e.width&&(n=e.width,o=n/i)):e.height>=e.width&&(n=e.width,o=n/i,o>e.height&&(o=e.height,n=o*i));n*=Ao(t),o*=Ao(t);const s=(e.width-n)/2,c=(e.height-o)/2;return{width:n,height:o,x:s,y:c}}(t,e,r):"top-left"===t.rule?n=function(t,e){const r=e.width*Ao(t),n=e.height*Ao(t);return{width:r,height:n,x:0,y:0}}(t,r):"top-right"===t.rule?n=function(t,e,r){const n=r.width*Ao(t),o=r.height*Ao(t),i=e.width-r.width;return{width:n,height:o,x:i,y:0}}(t,e,r):"bottom-left"===t.rule?n=function(t,e,r){const n=r.width*Ao(t),o=r.height*Ao(t),i=e.height-r.height;return{width:n,height:o,x:0,y:i}}(t,e,r):"bottom-right"===t.rule?n=function(t,e,r){const n=r.width*Ao(t),o=r.height*Ao(t),i=e.width-r.width,s=e.height-r.height;return{width:n,height:o,x:i,y:s}}(t,e,r):"center"===t.rule&&(n=function(t,e,r){const n=r.width*Ao(t),o=r.height*Ao(t),i=(e.width-r.width)/2,s=(e.height-r.height)/2;return{width:n,height:o,x:i,y:s}}(t,e,r)),Object.assign(n,{sourceWidth:r.width,sourceHeight:r.height})}function Ao(t){return void 0!==t.scale?t.scale:1}function Ho(t){return Ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ho(t)}function No(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Vo(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?No(Object(r),!0).forEach((function(e){Xo(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):No(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Uo(){return Uo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Yo(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Uo.apply(this,arguments)}function Yo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Go(t)););return t}function qo(t,e){return qo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},qo(t,e)}function Ko(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Go(t);if(e){var o=Go(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jo(this,r)}}function Jo(t,e){if(e&&("object"===Ho(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Go(t){return Go=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Go(t)}var Zo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qo(t,e)}(i,t);var e,r,n,o=Ko(i);function i(){return Qo(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"_getDefaultProp",value:function(){return Vo(Vo({},Uo(Go(i.prototype),"_getDefaultProp",this).call(this)),{},{media:!1,posRule:"cover"})}},{key:"resize",value:function(){Uo(Go(i.prototype),"resize",this).call(this),this._prerender()}},{key:"_prerender",value:function(){if(0!==this.width&&0!==this.height){var t=this.prop.media;if(t){var e,r,n;t instanceof Fo?(e=t.canvas,r=t.width,n=t.height):e=t;var o=zo({source:e,sourceWidth:r,sourceHeight:n,rule:this.prop.posRule,scale:1,width:this.width,height:this.height});this._ctx.clearRect(0,0,this.width,this.height),this._ctx.drawImage(e,o.x,o.y,o.width,o.height),this.callbacks.tbt("prerender",!1)}}}}])&&$o(e.prototype,r),n&&$o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Fo);function ti(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ei(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ri=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ei(this,"_prop",void 0),ei(this,"_outer",void 0),ei(this,"_thumb",void 0),ei(this,"_outerHeight",void 0),ei(this,"_outerWidth",void 0),ei(this,"_thumbHeight",void 0),ei(this,"_thumbWidth",void 0),ei(this,"_scrollVal",void 0),ei(this,"_coordsAtDragStart",void 0),ei(this,"_listeners",void 0),ei(this,"_scrollEvent",void 0),ei(this,"_actionTimeout",void 0),ei(this,"_dragger",void 0),this._prop=e;var r=e.prefix,n=e.dir,o=e.domParent,i=e.container,s=e.autoHide;this._outerHeight=0,this._outerWidth=0,this._thumbHeight=0,this._thumbWidth=0,this._scrollVal=0,this._coordsAtDragStart={left:0,top:0},this._scrollEvent=void 0,this._actionTimeout=void 0,this._dragger=void 0;var c="".concat(r," ").concat(r,"_").concat(n);i instanceof Window&&(c+=" in-window"),this._outer=g("div",{parent:o,class:c}),this._thumb=g("div",{parent:this._outer,class:"".concat(r,"__thumb ").concat(r,"__thumb_").concat(n)}),s&&this.outer.classList.add("auto-hide"),this._listeners=[],this._setEvents()}var e,r,n;return e=t,(r=[{key:"outer",get:function(){return this._outer}},{key:"thumb",get:function(){return this._thumb}},{key:"prefix",get:function(){return this._prop.prefix}},{key:"isX",get:function(){return"x"===this.prop.dir}},{key:"isY",get:function(){return!this.isX}},{key:"scrollElement",get:function(){return this.prop.container instanceof Window?document.documentElement:this.prop.container}},{key:"scrollLine",get:function(){var t=this.scrollElement;return this.isX?t.scrollWidth-t.clientWidth:t.scrollHeight-t.clientHeight}},{key:"scrollWidth",get:function(){return this.scrollElement.scrollWidth}},{key:"scrollHeight",get:function(){return this.scrollElement.scrollHeight}},{key:"prop",get:function(){return this._prop}},{key:"scrollValues",get:function(){var t=this.prop.container,e=0,r=0;return t instanceof Window?(e=t.pageYOffset,r=t.pageXOffset):t instanceof Wt?(e=t.targetTop,r=t.targetLeft):(e=t.scrollTop,r=t.scrollLeft),{left:r,top:e}}},{key:"_setEvents",value:function(){var t=this;this._listeners.push(w(this.outer,"mouseenter",this._handleHover.bind(this,!0))),this._listeners.push(w(this.outer,"mouseleave",this._handleHover.bind(this,!1))),this._scrollEvent=Bt({container:this.prop.container,callback:function(e){t._handleScroll(e)}}),this.prop.isDraggable&&(this._dragger=new lo({container:this.thumb}),this._dragger.addCallback("start",(function(){t.thumb.classList.add("in-action"),t._disableScrollBehaviour(!0),t._coordsAtDragStart=t.scrollValues})),this._dragger.addCallback("move",(function(e){t._handleThumbDrag(e)})),this._dragger.addCallback("end",(function(){t.thumb.classList.remove("in-action"),t._disableScrollBehaviour(!1)})))}},{key:"_disableScrollBehaviour",value:function(t){var e=t?"auto":"unset";(this.prop.container instanceof Window||this.prop.container instanceof HTMLElement)&&(document.documentElement.style.scrollBehavior=e)}},{key:"_handleHover",value:function(t){this.outer.classList.toggle("is-hovered",t)}},{key:"_handleScroll",value:function(t){var e=this;this.prop.optimizeCalculations||this.resize();var r=!1;this.isX?(r=t.scrollLeft!==this._scrollVal,this._scrollVal=t.scrollLeft):(r=t.scrollTop!==this._scrollVal,this._scrollVal=t.scrollTop),r&&(this.prop.autoHide&&r&&(this.outer.classList.add("in-action"),this._actionTimeout&&(clearTimeout(this._actionTimeout),this._actionTimeout=void 0),this._actionTimeout=setTimeout((function(){e.outer.classList.remove("in-action")}),500)),this.prop.optimizeCalculations&&this._renderThumb())}},{key:"_handleThumbDrag",value:function(t){t.evt.preventDefault();var e=this.prop.container,r=(t.coords.x-t.start.x)/(this._outerWidth-this._thumbWidth)*this.scrollLine,n=(t.coords.y-t.start.y)/(this._outerHeight-this._thumbHeight)*this.scrollLine,o=this._coordsAtDragStart,i=o.left,s=o.top;this.isX?i+=r:s+=n,e.scrollTo({top:s,left:i,behavior:e instanceof Wt?this.prop.draggableScrollBehavior:"auto"})}},{key:"_renderThumb",value:function(){var t=tt(this._scrollVal/this.scrollLine,[0,1]),e=this.isX?(this._outerWidth-this._thumbWidth)*t:0,r=this.isY?(this._outerHeight-this._thumbHeight)*t:0;this._thumb.style.transform="translate(".concat(e,"px, ").concat(r,"px)")}},{key:"resize",value:function(){var t=this.outer,e=this.thumb,r=this.scrollLine,n=this.prop.minSize;if(this._outerHeight=t.clientHeight,this._outerWidth=t.clientWidth,this.prop.autoSize)if(this.isX){var o=tt(this._outerWidth/(this.scrollWidth/(this.scrollWidth-r)),[n,1/0]);e.style.width="".concat(o,"px")}else{var i=tt(this._outerHeight/(this.scrollHeight/(this.scrollHeight-r)),[n,1/0]);e.style.height="".concat(i,"px")}this._thumbHeight=e.clientHeight,this._thumbWidth=e.clientWidth,t.classList.toggle("is-empty",0===r),this._renderThumb()}},{key:"destroy",value:function(){this._listeners.forEach((function(t){t.remove()})),this._scrollEvent&&this._scrollEvent.remove(),this._actionTimeout&&clearTimeout(this._actionTimeout),this._dragger&&this._dragger.destroy(),this._outer.remove()}}])&&ti(e.prototype,r),n&&ti(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ni(t){return ni="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ni(t)}function oi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ii(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?oi(Object(r),!0).forEach((function(e){yi(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oi(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function si(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ci(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ai(t,e){return ai=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ai(t,e)}function ui(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=di(t);if(e){var o=di(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return li(this,r)}}function li(t,e){if(e&&("object"===ni(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fi(t)}function fi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pi(){return pi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=hi(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},pi.apply(this,arguments)}function hi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=di(t)););return t}function di(t){return di=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},di(t)}function yi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var vi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ai(t,e)}(i,t);var e,r,n,o=ui(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];si(this,i),yi(fi(e=o.call(this,t,!1)),"_container",void 0),yi(fi(e),"_scrollWrapper",void 0),yi(fi(e),"_xBar",void 0),yi(fi(e),"_yBar",void 0);var n=e.prop,s=n.autoHide,c=n.autoSize,a=n.minSize,u=n.optimizeCalculations,l=n.isDraggable,f=n.draggableScrollBehavior;if("string"==typeof e.prop.container){var p=v(e.prop.container);if(!p)throw new Error("No scroll container");e._container=p}else e._container=e.prop.container;if(e.container instanceof Element){var h=e.container.parentElement;h&&(e._scrollWrapper=g("div"),e._scrollWrapper.style.position="relative",e._scrollWrapper.style.display="inline-block",h.insertBefore(e._scrollWrapper,e.container),e._scrollWrapper.appendChild(e.container),e._scrollWrapper.classList.add("".concat(e.prefix,"-wrapper")))}var d={container:e.container,domParent:e.domParent,autoHide:s,autoSize:c,minSize:a,optimizeCalculations:u,prefix:e.prefix,isDraggable:l,draggableScrollBehavior:f};return e._xBar=new ri(ii({dir:"x"},d)),e._yBar=new ri(ii({dir:"y"},d)),e.scrollableElement.classList.add("".concat(e.prefix,"-parent")),r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return ii(ii({},pi(di(i.prototype),"_getDefaultProp",this).call(this)),{},{container:window,domParent:!1,draggable:!0,autoSize:!0,autoHide:!0,minSize:50,optimizeCalculations:!1,resizeTimeout:0,isDraggable:!0,draggableScrollBehavior:"smooth"})}},{key:"prefix",get:function(){return"".concat(this._app.prefix,"scrollbar")}},{key:"container",get:function(){return this._container}},{key:"scrollableElement",get:function(){var t=this.container;return t instanceof Window?this._app.body:t instanceof Element?t:t.outer}},{key:"domParent",get:function(){var t=this.prop.domParent,e=this.container;return t||(this._scrollWrapper?this._scrollWrapper:e instanceof Window?this._app.body:e instanceof Element?e:e.outer)}},{key:"_setEvents",value:function(){var t=this;pi(di(i.prototype),"_setEvents",this).call(this);var e=this.container;e instanceof Wt?e.addCallback("resize",(function(){t.resize()}),{name:this.name}):this.addViewportCallback("",(function(){t.resize()}),{timeout:this.prop.resizeTimeout}),this.resize()}},{key:"_onPropMutate",value:function(){pi(di(i.prototype),"_onPropMutate",this).call(this),this.resize()}},{key:"resize",value:function(){this._xBar.resize(),this._yBar.resize()}},{key:"_destroy",value:function(){if(pi(di(i.prototype),"_destroy",this).call(this),this._xBar.destroy(),this._yBar.destroy(),this._scrollWrapper&&this.container instanceof Element){var t=this._scrollWrapper.parentElement;t&&t.insertBefore(this.container,this._scrollWrapper),this._scrollWrapper.remove()}this.scrollableElement.classList.remove("".concat(this.prefix,"-parent"))}}])&&ci(e.prototype,r),n&&ci(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Z);function bi(t){return bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bi(t)}function _i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function gi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_i(Object(r),!0).forEach((function(e){xi(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function mi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Oi(t,e){return Oi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Oi(t,e)}function Pi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ti(t);if(e){var o=Ti(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ki(this,r)}}function ki(t,e){if(e&&("object"===bi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ji(t)}function ji(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ei(){return Ei="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Si(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ei.apply(this,arguments)}function Si(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ti(t)););return t}function Ti(t){return Ti=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ti(t)}function xi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ri=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oi(t,e)}(i,t);var e,r,n,o=Pi(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return mi(this,i),xi(ji(e=o.call(this,t,!1)),"_scrollContainer",void 0),"string"==typeof e.prop.container?e._scrollContainer=v(e.prop.container):e._scrollContainer=e.prop.container,r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return gi(gi({},Ei(Ti(i.prototype),"_getDefaultProp",this).call(this)),{},{container:window})}},{key:"scrollContainer",get:function(){return this._scrollContainer}},{key:"scrollableElement",get:function(){return this._scrollContainer instanceof Window?this._app.html:this._scrollContainer}},{key:"domParent",get:function(){var t=this.scrollContainer;return t instanceof Window?this._app.body:t instanceof Element?t:t.outer}},{key:"intersectionRoot",get:function(){var t=this.scrollContainer;return t instanceof Window?null:t instanceof Element?t:t.outer}},{key:"scrollContainerBounding",get:function(){if(this.intersectionRoot){var t=this.intersectionRoot.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}return{top:0,left:0,width:this._app.viewport.width,height:this._app.viewport.height}}}])&&wi(e.prototype,r),n&&wi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Z);function Li(t){return Li="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Li(t)}function Di(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ci(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Di(Object(r),!0).forEach((function(e){Qi(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Di(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Mi(t){return function(t){if(Array.isArray(t))return Wi(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Wi(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wi(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ii(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Fi(t,e){return Fi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fi(t,e)}function zi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xi(t);if(e){var o=Xi(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ai(this,r)}}function Ai(t,e){if(e&&("object"===Li(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Hi(t)}function Hi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ni(){return Ni="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Vi(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ni.apply(this,arguments)}function Vi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Xi(t)););return t}function Xi(t){return Xi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Xi(t)}function Qi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var $i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fi(t,e)}(i,t);var e,r,n,o=zi(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Ii(this,i),Qi(Hi(e=o.call(this,t,!1)),"_scrollEvent",void 0),Qi(Hi(e),"_intersectionObserverIn",void 0),Qi(Hi(e),"_intersectionObserverOut",void 0),Qi(Hi(e),"_firstStart",void 0),Qi(Hi(e),"_elements",void 0),e._scrollEvent=void 0,e._intersectionObserverIn=void 0,e._intersectionObserverOut=void 0,e._firstStart=!0,e._elements=Mi(e.prop.elements),r&&e.init(),e}return e=i,r=[{key:"prefix",get:function(){return"".concat(this._app.prefix,"scroll-view")}},{key:"_getDefaultProp",value:function(){return Ci(Ci({},Ni(Xi(i.prototype),"_getDefaultProp",this).call(this)),{},{enabled:!0,container:window,elements:[],threshold:.9,states:"in",classToToggle:"viewed",useDelay:!1,useIntersectionObserver:!0,viewportTarget:"",resizeTimeout:0})}},{key:"elements",get:function(){return this._elements}},{key:"init",value:function(){Ni(Xi(i.prototype),"init",this).call(this)}},{key:"_setEvents",value:function(){var t=this;Ni(Xi(i.prototype),"_setEvents",this).call(this),this.resize(),this.addViewportCallback(this.prop.viewportTarget,(function(){t.resize()}),{timeout:this.prop.resizeTimeout})}},{key:"_onPropMutate",value:function(){Ni(Xi(i.prototype),"_onPropMutate",this).call(this),this.resize()}},{key:"resize",value:function(){this._removeViewEvents(),this.prop.enabled&&(this._setViewEvents(),this.seekBounding())}},{key:"_setViewEvents",value:function(){var t=this;if(Ft()&&this.prop.useIntersectionObserver){var e=this.scrollContainerBounding,r=this._firstStart?0:e.width*(1-this.prop.threshold)*-1,n=this._firstStart?0:e.height*(1-this.prop.threshold)*-1;this._intersectionObserverIn=new IntersectionObserver(this._handleIntersectionObserverIn.bind(this),{root:this.intersectionRoot,threshold:0,rootMargin:"0px ".concat(r,"px ").concat(n,"px 0px")}),this.elements.forEach((function(e){var r;null===(r=t._intersectionObserverIn)||void 0===r||r.observe(e)})),"inout"===this.prop.states&&(this._intersectionObserverOut=new IntersectionObserver(this._handleIntersectionObserverOut.bind(this),{root:this.intersectionRoot,threshold:0,rootMargin:"0px 0px 0px 0px"}),this.elements.forEach((function(e){var r;null===(r=t._intersectionObserverOut)||void 0===r||r.observe(e)})))}else this._scrollEvent=Bt({container:this.prop.container,callback:this._handleScroll.bind(this)})}},{key:"_removeViewEvents",value:function(){var t,e;this._scrollEvent&&(this._scrollEvent.remove(),this._scrollEvent=void 0),null===(t=this._intersectionObserverIn)||void 0===t||t.disconnect(),this._intersectionObserverIn=void 0,null===(e=this._intersectionObserverOut)||void 0===e||e.disconnect(),this._intersectionObserverOut=void 0}},{key:"_handleIntersectionObserverIn",value:function(t){for(var e=!!this._firstStart&&this.scrollContainerBounding,r=0;r<t.length;r+=1){var n=t[r],o=0;this._firstStart&&e&&n.isIntersecting&&(o=this._elementInViewportData(n.target,e).delay),n.isIntersecting&&this._handleInOut(n.target,n.isIntersecting,o)}this._processUnusedElements(),this._firstStart&&(this._firstStart=!1,this.resize())}},{key:"_handleIntersectionObserverOut",value:function(t){for(var e=0;e<t.length;e+=1){var r=t[e];r.isIntersecting||this._handleInOut(r.target,r.isIntersecting,0)}}},{key:"_handleScroll",value:function(){this.seekBounding()}},{key:"seekBounding",value:function(){if(!Ft()||!this.prop.useIntersectionObserver){for(var t=this.scrollContainerBounding,e=0;e<this.elements.length;e+=1){var r=this.elements[e],n=this._elementInViewportData(r,t),o=n.isIntersecting?n.delay:0;"boolean"==typeof n.isIntersecting&&this._handleInOut(r,n.isIntersecting,o)}this._processUnusedElements(),this._firstStart&&(this._firstStart=!1)}}},{key:"_elementInViewportData",value:function(t,e){var r,n=this.prop,o=n.threshold,i=n.states,s=n.useDelay,c=this._firstStart?1:o,a=t.getBoundingClientRect();a.top<e.top+e.height*c&&a.left<e.left+e.width*c?r="in"===i||!(a.right<e.left*c||a.bottom<e.top*c):(a.top>e.top+e.height||a.left>e.left+e.width)&&(r=!1);var u=0;return s&&this._firstStart&&(u=tt("x"===s.dir?(a.left-e.left)/e.width:(a.top-e.top)/e.height,[0,1])*s.max),{isIntersecting:r,delay:u}}},{key:"_handleInOut",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.prop.states;t.scrollViewIn&&e||!t.scrollViewIn&&!e||(t.scrollViewIn=e,this.prop.classToToggle&&f((function(){t.classList.toggle(r.prop.classToToggle,e)}),n),!e||"in"!==o&&"inout"!==o?e||"inout"!==o||f((function(){r.callbacks.tbt("out",t)}),n):f((function(){r.callbacks.tbt("in",t)}),n))}},{key:"_processUnusedElements",value:function(){var t=this;"in"===this.prop.states&&(this._elements.filter((function(t){return t.scrollViewIn})).forEach((function(e){var r,n;null===(r=t._intersectionObserverIn)||void 0===r||r.unobserve(e),null===(n=t._intersectionObserverOut)||void 0===n||n.unobserve(e)})),this._elements=this._elements.filter((function(t){return!t.scrollViewIn})))}},{key:"addElement",value:function(t){var e,r,n=this;return t.scrollViewIn=void 0,this._elements.push(t),null===(e=this._intersectionObserverIn)||void 0===e||e.observe(t),null===(r=this._intersectionObserverOut)||void 0===r||r.observe(t),this.prop.enabled&&this.seekBounding(),{remove:function(){n.removeElement(t)}}}},{key:"removeElement",value:function(t){var e,r;t.scrollViewIn=void 0,this._elements=this._elements.filter((function(e){return e!==t})),null===(e=this._intersectionObserverIn)||void 0===e||e.unobserve(t),null===(r=this._intersectionObserverOut)||void 0===r||r.unobserve(t)}},{key:"removeElements",value:function(){var t=this;this._elements.forEach((function(e){t.removeElement(e)})),this._elements=[]}},{key:"_destroy",value:function(){Ni(Xi(i.prototype),"_destroy",this).call(this),this._removeViewEvents()}}],r&&Bi(e.prototype,r),n&&Bi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Ri);function Ui(t){return Ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ui(t)}function Yi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ki(){return Ki="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ji(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ki.apply(this,arguments)}function Ji(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=es(t)););return t}function Gi(t,e){return Gi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Gi(t,e)}function Zi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=es(t);if(e){var o=es(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ts(this,r)}}function ts(t,e){if(e&&("object"===Ui(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function es(t){return es=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},es(t)}var rs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gi(t,e)}(i,t);var e,r,n,o=Zi(i);function i(){return Yi(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"_setEvents",value:function(){var t=this;Ki(es(i.prototype),"_setEvents",this).call(this),this.addEventListeners(window,"keydown",(function(e){t._handleKeydown(e)}))}},{key:"_handleKeydown",value:function(t){var e=this._component;if(e.prop.enabled)if(9!==t.keyCode){var r=document.activeElement;if(!r||!(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement)){var n=this._app.viewport,o=e.outer.getBoundingClientRect();if(o.left<n.width&&o.right>0&&o.top<n.height&&o.bottom>0){var i=40;switch(t.keyCode){case 38:e.targetTop-=i;break;case 40:e.targetTop+=i;break;case 39:e.targetLeft+=i;break;case 37:e.targetLeft-=i;break;case 34:e.targetTop+=400;break;case 33:e.targetTop-=400;break;case 36:e.targetTop=0,e.targetLeft=0;break;case 35:e.targetTop=e.scrollHeight,e.targetLeft=e.scrollWidth;break;case 32:e.targetTop+=200}}}}else this._handleTab()}},{key:"_handleTab",value:function(){var t=this;f((function(){var e=t._component,r=document.activeElement;if(r instanceof HTMLElement&&p(r,e.outer)){var n=e.outer.getBoundingClientRect(),o=r.getBoundingClientRect(),i=e.scrollTop+(o.top-n.top)-(e.clientHeight/2-o.height/2),s=e.scrollLeft+(o.left-n.left)-(e.clientWidth/2-o.width/2);e.targetTop=i,e.targetLeft=s}}),120)}}])&&qi(e.prototype,r),n&&qi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Br);function ns(t){return ns="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ns(t)}function os(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function is(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?os(Object(r),!0).forEach((function(e){ds(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):os(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ss(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function cs(t,e){return cs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},cs(t,e)}function as(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=hs(t);if(e){var o=hs(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return us(this,r)}}function us(t,e){if(e&&("object"===ns(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ls(t)}function ls(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fs(){return fs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ps(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},fs.apply(this,arguments)}function ps(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=hs(t)););return t}function hs(t){return hs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},hs(t)}function ds(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ys="is-dragging",vs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cs(t,e)}(i,t);var e,r,n,o=as(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),ds(ls(e=o.call(this,t)),"_dragger",void 0),ds(ls(e),"_componentEvents",void 0),ds(ls(e),"_currentLerp",void 0),e._dragger=void 0,e._componentEvents=[],e._currentLerp=!1,e}return e=i,r=[{key:"_getDefaultProp",value:function(){return is(is({},fs(hs(i.prototype),"_getDefaultProp",this).call(this)),{},{enabled:!0,speed:1,lerp:!1,reverseDir:!1,stopPropagation:!1})}},{key:"isDragging",get:function(){return!!this._dragger&&this._dragger.isDragging}},{key:"_constructor",value:function(){fs(hs(i.prototype),"_constructor",this).call(this),this._toggleDragger()}},{key:"_onPropMutate",value:function(){fs(hs(i.prototype),"_onPropMutate",this).call(this),this._toggleDragger()}},{key:"_toggleDragger",value:function(){this.prop.enabled?this._addDragger():this._removeDragger()}},{key:"_addDragger",value:function(){var t=this;if(!this._dragger){var e=this.component;this._dragger=new lo({container:e.outer}),this._dragger.addCallback("start",this._handleDragStart.bind(this)),this._dragger.addCallback("move",(function(e){t._handleDragMove(e)})),this._dragger.addCallback("end",this._handleDragEnd.bind(this)),this._componentEvents.push(e.addCallback("wheel",(function(){var e;null===(e=t._dragger)||void 0===e||e.cancel()})))}}},{key:"_removeDragger",value:function(){this._dragger&&(this._dragger.destroy(),this._dragger=void 0,this._componentEvents.forEach((function(t){t.remove()})),this._componentEvents=[])}},{key:"_handleDragStart",value:function(){var t=this.component;if(t.prop.enabled&&!(t.maxScrollableWidth<=0&&t.maxScrollableHeight<=0)){var e=this.prop.lerp;"boolean"!=typeof e&&(this._currentLerp=t.prop.render.lerp,t.changeProp({render:{lerp:e}})),this._callbacks.tbt("start",!1)}}},{key:"_handleDragMove",value:function(t){var e=this.component;if(e.prop.enabled&&!(e.maxScrollableWidth<=0&&e.maxScrollableHeight<=0)){var r=t.evt,n=this.prop.stopPropagation;if(n){if(!r.cancelable)return;var o=Math.abs(t.coords.x-t.start.x),i=Math.abs(t.coords.y-t.start.y);(o>n.threshold&&"x"===n.dir||i>n.threshold&&"y"===n.dir)&&r.cancelable&&(r.preventDefault(),r.stopPropagation())}var s=this.prop,c=s.speed,a=s.reverseDir,u=t.step.x*c,l=t.step.y*c;e.targetLeft-=a?l:u,e.targetTop-=a?u:l,e.outer.classList.add(ys),e.container.classList.add(ys),this._callbacks.tbt("move",!1)}}},{key:"_handleDragEnd",value:function(){var t=this.component;t.outer.classList.remove(ys),t.container.classList.remove(ys),"boolean"!=typeof this._currentLerp&&(t.changeProp({render:{lerp:this._currentLerp}}),this._currentLerp=!1),this._callbacks.tbt("end",!1)}},{key:"_destroy",value:function(){fs(hs(i.prototype),"_destroy",this).call(this),this._removeDragger()}}],r&&ss(e.prototype,r),n&&ss(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Br);function bs(t){return bs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bs(t)}function _s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function gs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_s(Object(r),!0).forEach((function(e){xs(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ms(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ws(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Os(t,e){return Os=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Os(t,e)}function Ps(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ts(t);if(e){var o=Ts(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ks(this,r)}}function ks(t,e){if(e&&("object"===bs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return js(t)}function js(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Es(){return Es="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ss(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Es.apply(this,arguments)}function Ss(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ts(t)););return t}function Ts(t){return Ts=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ts(t)}function xs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Rs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Os(t,e)}(i,t);var e,r,n,o=Ps(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return ms(this,i),xs(js(e=o.call(this,t,!1)),"_scrollContainer",void 0),xs(js(e),"_section",void 0),xs(js(e),"_scrollEvent",void 0),xs(js(e),"_loadedEvent",void 0),xs(js(e),"_scopeScroll",void 0),xs(js(e),"_scopeIn",void 0),xs(js(e),"_scopeMove",void 0),xs(js(e),"_scopeOut",void 0),xs(js(e),"_progress",void 0),"string"==typeof e.prop.container?e._scrollContainer=v(e.prop.container):e._scrollContainer=e.prop.container,"string"==typeof e.prop.section?e._section=v(e.prop.section):e._section=e.prop.section,e._progress=-.001,e._scopeScroll=[0,0],e._scopeIn=[0,0],e._scopeMove=[0,0],e._scopeOut=[0,0],r&&e.init(),e}return e=i,r=[{key:"_getDefaultProp",value:function(){return gs(gs({},Es(Ts(i.prototype),"_getDefaultProp",this).call(this)),{},{container:window,viewportTarget:"",resizeTimeout:0})}},{key:"scrollContainer",get:function(){return this._scrollContainer}},{key:"section",get:function(){return this._section}},{key:"scopeScroll",get:function(){return this._scopeScroll}},{key:"scopeIn",get:function(){return this._scopeIn}},{key:"scopeMove",get:function(){return this._scopeMove}},{key:"scopeOut",get:function(){return this._scopeOut}},{key:"progress",get:function(){return this._progress},set:function(t){this._progress=t}},{key:"init",value:function(){Es(Ts(i.prototype),"init",this).call(this)}},{key:"_setEvents",value:function(){var t=this;Es(Ts(i.prototype),"_setEvents",this).call(this),this.addViewportCallback(this.prop.viewportTarget,(function(){t.resize()}),{timeout:this.prop.resizeTimeout}),this._loadedEvent=this._app.onPageLoaded(),this._loadedEvent.then((function(){t.resize()})).catch((function(){})),this._scrollEvent=Bt({container:this.prop.container,callback:this._handleScroll.bind(this)})}},{key:"_onPropMutate",value:function(){Es(Ts(i.prototype),"_onPropMutate",this).call(this),this.resize()}},{key:"progressIn",get:function(){return it(this.progress,this.scopeIn)||0}},{key:"progressOut",get:function(){return it(this.progress,this.scopeOut)||0}},{key:"progressMove",get:function(){return it(this.progress,this.scopeMove)||0}},{key:"_handleScroll",value:function(){var t=zt(this.scrollContainer);t&&this._render(t)}},{key:"resize",value:function(){var t=zt(this.scrollContainer);if(t){var e=this.section.getBoundingClientRect(),r=this._app.viewport.height,n=t.scrollTop+e.top-r,o=t.scrollTop+e.top+e.height,i=o-n;this._scopeScroll=[n,o],this._scopeIn=[0,r/i],this._scopeOut=[1-r/i,1],this._scopeMove=[this._scopeIn[1],this._scopeOut[0]],this.callbacks.tbt("resize",!1),this._render(t,!0)}}},{key:"_render",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this._canRender(t,e);r&&this.callbacks.tbt("render",!1)}},{key:"_canRender",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return!1;var r=t.scrollTop,n=this.progress,o=it(r,[this._scopeScroll[0],this._scopeScroll[1]])||0;return this.progress=o,e||o!==n}},{key:"_destroy",value:function(){var t,e;Es(Ts(i.prototype),"_destroy",this).call(this),null===(t=this._scrollEvent)||void 0===t||t.remove(),null===(e=this._loadedEvent)||void 0===e||e.cancel()}}],r&&ws(e.prototype,r),n&&ws(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Z);function Ls(t){return Ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ls(t)}function Ds(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Cs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ds(Object(r),!0).forEach((function(e){Vs(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ds(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ms(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ws(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Is(t,e){return Is=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Is(t,e)}function Bs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ns(t);if(e){var o=Ns(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Fs(this,r)}}function Fs(t,e){if(e&&("object"===Ls(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return zs(t)}function zs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function As(){return As="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Hs(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},As.apply(this,arguments)}function Hs(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ns(t)););return t}function Ns(t){return Ns=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ns(t)}function Vs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Xs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Is(t,e)}(i,t);var e,r,n,o=Bs(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(Ms(this,i),Vs(zs(e=o.call(this,t,!1)),"_initText",void 0),Vs(zs(e),"_initHTML",void 0),Vs(zs(e),"_isPrimarySplit",void 0),Vs(zs(e),"_container",void 0),Vs(zs(e),"_letters",void 0),Vs(zs(e),"_words",void 0),Vs(zs(e),"_lines",void 0),e.prop.container){var n=v(e.prop.container);n instanceof HTMLElement&&(e._container=n)}e._container.translate=!1,e._container&&e._container.classList.add(e.prefix),e._initHTML=e._container.innerHTML;var s=e._container[e.prop.textSource].trim();return e._initText=s||"no rendered text",e._initText=e._initText.replace(/\s+\n/gm,"\n"),e._initText=e._initText.replace(/<br>/gm,String.fromCharCode(10)),e._initText=e._initText.replace(/<br\/>/gm,String.fromCharCode(10)),e._initText=e._initText.replace(/<br \/>/gm,String.fromCharCode(10)),e._container.ariaLabel=e._initText,e._isPrimarySplit=!1,e._letters=[],e._words=[],e._lines=[],r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return Cs(Cs({},As(Ns(i.prototype),"_getDefaultProp",this).call(this)),{},{container:"#".concat(this.prefix),textSource:"innerText",appendLetters:!0,appendLines:!1,viewportTarget:"",resizeTimeout:0})}},{key:"prefix",get:function(){return"".concat(this._app.prefix,"split-text")}},{key:"container",get:function(){return this._container}},{key:"letters",get:function(){return this._letters}},{key:"words",get:function(){return this._words}},{key:"lines",get:function(){return this._lines}},{key:"_setEvents",value:function(){var t=this;As(Ns(i.prototype),"_setEvents",this).call(this),this.splitText(),this.prop.appendLines&&this.addViewportCallback(this.prop.viewportTarget,(function(){t.splitText()}),{timeout:this.prop.resizeTimeout})}},{key:"splitText",value:function(){this._isPrimarySplit||(this.container.innerHTML="",this._splitIntoWords(),this._splitIntoLetters(),this._appendWords(),this._isPrimarySplit=!0),this.prop.appendLines&&this._splitIntoLines(),this.callbacks.tbt("split",!1)}},{key:"_splitIntoWords",value:function(){var t,e=this,r=this._initText.split(""),n=0;r.forEach((function(t){var r=e._words[n]||{content:"",hasNewLine:!1,el:g("span",{class:"".concat(e.prefix,"__word"),attr:[["aria-hidden","true"]]}),letters:[]};r.el.style.display="inline-block",e._words[n]=r;var o=t.charCodeAt(0),i=32===o||160===o,s=[45,8208,8211,8212,8722].includes(o),c=10===o;i&&(r.whitespace=document.createTextNode(" ")),c&&(r.br=g("br")),r.hasNewLine=c,i||c?n+=1:(r.content+=t,e.prop.appendLetters||(r.el.innerHTML=r.content),s&&(n+=1))})),this._words=this._words.filter((function(t,r){return 0!==t.content.length||(r>0&&(e._words[r-1].whitespace=t.whitespace,e._words[r-1].br=t.br),!1)})),this._words.forEach((function(e){t&&t.whitespace&&e.el.classList.add("pre-whitespace"),e.whitespace&&e.el.classList.add("has-whitespace"),t=e}))}},{key:"_appendWords",value:function(){var t=this;this._words.forEach((function(e){t.container.appendChild(e.el),e.whitespace&&t.container.appendChild(e.whitespace),e.br&&t.container.appendChild(e.br)}))}},{key:"_removeWords",value:function(){this._words.forEach((function(t){t.el.remove(),t.whitespace&&t.whitespace.remove(),t.br&&t.br.remove()}))}},{key:"_splitIntoLetters",value:function(){var t=this;this.prop.appendLetters&&(this._words.forEach((function(e){var r=e.content.split(""),n=[];r.forEach((function(r){var o={el:g("span",{class:"".concat(t.prefix,"__letter"),html:r,attr:[["aria-hidden","true"]]}),content:r,word:e};o.el.style.display="inline-block",t._letters.push(o),n.push(o)})),e.letters=n})),this._letters.forEach((function(t){t.word.el.appendChild(t.el)})))}},{key:"_splitIntoLines",value:function(){var t=this;this._removeLines();var e=!1,r=1/0,n=!1;this.words.forEach((function(o){var i=!1,s=o.el.offsetTop;i=!(!n||!n.br)||s!==r,n=o,r=s,i&&((e={el:g("span",{class:"".concat(t.prefix,"__line"),attr:[["aria-hidden","true"]]}),content:"",words:[]}).el.style.display="block",t._lines.push(e)),e&&e.words.push(o)})),this._lines.forEach((function(t){t.content=t.words.map((function(t){return t.content})).join(" ")})),this._lines.forEach((function(e){e.words.forEach((function(t){e.el.appendChild(t.el),t.br&&t.br.remove(),t.whitespace&&e.el.appendChild(t.whitespace)})),t.container.appendChild(e.el)}))}},{key:"_removeLines",value:function(){this._lines.forEach((function(t){t.el.remove()})),this._lines=[],this._appendWords()}},{key:"_destroy",value:function(){As(Ns(i.prototype),"_destroy",this).call(this),this._lines=[],this._words=[],this._letters=[],this._container.innerHTML=this._initHTML}}])&&Ws(e.prototype,r),n&&Ws(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Z);function Qs(t){return Qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qs(t)}function $s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Us(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$s(Object(r),!0).forEach((function(e){nc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ys(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ks(t,e){return Ks=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ks(t,e)}function Js(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rc(t);if(e){var o=rc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Gs(this,r)}}function Gs(t,e){if(e&&("object"===Qs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Zs(t)}function Zs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tc(){return tc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ec(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},tc.apply(this,arguments)}function ec(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=rc(t)););return t}function rc(t){return rc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},rc(t)}function nc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var oc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ks(t,e)}(i,t);var e,r,n,o=Js(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Ys(this,i),nc(Zs(e=o.call(this,t,!1)),"_container",void 0),nc(Zs(e),"_containerIsWindow",void 0),nc(Zs(e),"_outerCursor",void 0),nc(Zs(e),"_innerCursor",void 0),nc(Zs(e),"_animationFrame",void 0),nc(Zs(e),"_currentFPS",void 0),nc(Zs(e),"_canPlay",void 0),nc(Zs(e),"_x",void 0),nc(Zs(e),"_xTarget",void 0),nc(Zs(e),"_y",void 0),nc(Zs(e),"_yTarget",void 0);var n=v(e.prop.container);if(!n)throw new Error("No cursor container for ".concat(e.prop.container));return e._container=n,e._containerIsWindow=n instanceof Window,e._x=0,e._xTarget=0,e._y=0,e._yTarget=0,e._currentFPS=60,e._canPlay=e.prop.run,r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return Us(Us({},tc(rc(i.prototype),"_getDefaultProp",this).call(this)),{},{container:window,run:!0,hideNativeCursor:!1,render:{lerp:.2,lerpToFixed:2,normalizeLerp:!1},autoStop:!0})}},{key:"prefix",get:function(){return"".concat(this._app.prefix,"custom-cursor")}},{key:"container",get:function(){return this._container}},{key:"eventsContainer",get:function(){return this._container}},{key:"domContainer",get:function(){return this.container instanceof Window?this._app.html:this.container}},{key:"outerCursor",get:function(){return this._outerCursor}},{key:"innerCursor",get:function(){return this._innerCursor}},{key:"x",get:function(){return this._x}},{key:"y",get:function(){return this._y}},{key:"_constructor",value:function(){tc(rc(i.prototype),"_constructor",this).call(this),this._createCursor()}},{key:"_setEvents",value:function(){var t=this;tc(rc(i.prototype),"_setEvents",this).call(this);var e=this.domContainer;this._animationFrame=new mt,this._animationFrame.addCallback("frame",(function(e){t._currentFPS=e.realFPS,t.render()})),this._canPlay&&this.enable(),this.addEventListeners(e,"mouseenter",this._handleMouseEnter.bind(this)),this.addEventListeners(e,"mouseleave",this._handleMouseLeave.bind(this)),this.addEventListeners(e,"mousemove",this._handleMouseMove.bind(this)),this.addEventListeners(e,"mousedown",this._handleMouseDown.bind(this)),this.addEventListeners(e,"mouseup",this._handleMouseUp.bind(this)),this.addEventListeners(window,"blur",this._handleWindowBlur.bind(this))}},{key:"_createCursor",value:function(){var t=this.prefix,e=this.container,r=this.domContainer;this.prop.hideNativeCursor&&(r.style.cursor="none",r.classList.add("hide-defaut-cursor")),r.classList.add("".concat(t,"-container")),this._outerCursor=g("div",{class:"".concat(t," ").concat(e instanceof Window?"in-window":"in-element"," disabled"),parent:r}),this._innerCursor=g("div",{class:"".concat(t,"__inner disabled"),parent:this._outerCursor}),this.callbacks.tbt("create",{outerCursor:this.outerCursor,innerCursor:this.innerCursor})}},{key:"_destroyCursor",value:function(){var t=this.prefix,e=this.domContainer;e.style.cursor="",e.classList.remove("hide-defaut-cursor"),e.classList.remove("".concat(t,"-container")),this._outerCursor.remove(),this._innerCursor.remove()}},{key:"_handleMouseEnter",value:function(t){this._xTarget=t.clientX,this._x=this._xTarget,this._yTarget=t.clientY,this._y=this._yTarget,this.outerCursor.classList.add("in-action")}},{key:"_handleMouseLeave",value:function(){this.outerCursor.classList.remove("in-action")}},{key:"_handleMouseMove",value:function(t){this._xTarget=t.clientX,this._yTarget=t.clientY,this.outerCursor.classList.add("in-action"),this._canPlay&&this._animationFrame.play()}},{key:"_handleMouseDown",value:function(t){1===t.which&&(this.outerCursor.classList.add("click"),this.innerCursor.classList.add("click"))}},{key:"_handleMouseUp",value:function(){this.outerCursor.classList.remove("click"),this.innerCursor.classList.remove("click")}},{key:"_handleWindowBlur",value:function(){this._handleMouseUp()}},{key:"render",value:function(){var t=this.prop,e=this.domContainer,r=t.render,n=r.normalizeLerp,o=r.lerp,i=r.lerpToFixed,s=n?60/this._currentFPS:1;if(this._x=et(this._x,this._xTarget,o*s,.02),this._y=et(this._y,this._yTarget,o*s,.02),"number"==typeof i){var c=Math.round(Math.abs(i));this._x=parseFloat(this._x.toFixed(c)),this._y=parseFloat(this._y.toFixed(c))}var a=this._x,u=this._y;if(!this._containerIsWindow){var l=e.getBoundingClientRect();a-=l.left,u-=l.top}this.outerCursor.style.transform="translate(".concat(a,"px, ").concat(u,"px)"),t.autoStop&&this._x===this._xTarget&&this._y===this._yTarget&&this._animationFrame.pause(),this._callbacks.tbt("render",{x:a,y:u})}},{key:"enable",value:function(){this._canPlay=!0,this._animationFrame.isPlaying||(this.outerCursor.classList.remove("disabled"),this.innerCursor.classList.remove("disabled"),this._animationFrame.play())}},{key:"disable",value:function(){this._canPlay=!1,this._animationFrame.isPlaying&&(this.outerCursor.classList.add("disabled"),this.innerCursor.classList.add("disabled"),this._animationFrame.pause())}},{key:"_destroy",value:function(){tc(rc(i.prototype),"_destroy",this).call(this),this._destroyCursor(),this._animationFrame.destroy()}}])&&qs(e.prototype,r),n&&qs(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Z),ic={common:t,listeners:n,math:e,scroll:o};window.Vevet=s})()})();
12
+ (()=>{var t={554:(t,e,r)=>{t=r.nmd(t);var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[i]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l[s]=l["[object Map]"]=l["[object Number]"]=l[c]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;var f="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,p="object"==typeof self&&self&&self.Object===Object&&self,h=f||p||Function("return this")(),d=e&&!e.nodeType&&e,y=d&&t&&!t.nodeType&&t,v=y&&y.exports===d,b=v&&f.process,_=function(){try{var t=y&&y.require&&y.require("util").types;return t||b&&b.binding&&b.binding("util")}catch(e){}}(),g=_&&_.isTypedArray;function m(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var w,O,P,k=Array.prototype,j=Function.prototype,E=Object.prototype,S=h["__core-js_shared__"],T=j.toString,x=E.hasOwnProperty,R=(w=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",L=E.toString,D=T.call(Object),C=RegExp("^"+T.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=v?h.Buffer:void 0,W=h.Symbol,I=h.Uint8Array,B=M?M.allocUnsafe:void 0,A=(O=Object.getPrototypeOf,P=Object,function(t){return O(P(t))}),z=Object.create,F=E.propertyIsEnumerable,H=k.splice,N=W?W.toStringTag:void 0,V=function(){try{var t=yt(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),X=M?M.isBuffer:void 0,Q=Math.max,U=Date.now,$=yt(h,"Map"),Y=yt(Object,"create"),q=function(){function t(){}return function(e){if(!St(e))return{};if(z)return z(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function K(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function J(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function G(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Z(t){var e=this.__data__=new J(t);this.size=e.size}function tt(t,e){var r=Ot(t),n=!r&&wt(t),o=!r&&!n&&kt(t),i=!r&&!n&&!o&&xt(t),s=r||n||o||i,c=s?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],a=c.length;for(var u in t)!e&&!x.call(t,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||vt(u,a))||c.push(u);return c}function et(t,e,r){(void 0!==r&&!mt(t[e],r)||void 0===r&&!(e in t))&&ot(t,e,r)}function rt(t,e,r){var n=t[e];x.call(t,e)&&mt(n,r)&&(void 0!==r||e in t)||ot(t,e,r)}function nt(t,e){for(var r=t.length;r--;)if(mt(t[r][0],e))return r;return-1}function ot(t,e,r){"__proto__"==e&&V?V(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}K.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},K.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},K.prototype.get=function(t){var e=this.__data__;if(Y){var r=e[t];return r===n?void 0:r}return x.call(e,t)?e[t]:void 0},K.prototype.has=function(t){var e=this.__data__;return Y?void 0!==e[t]:x.call(e,t)},K.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Y&&void 0===e?n:e,this},J.prototype.clear=function(){this.__data__=[],this.size=0},J.prototype.delete=function(t){var e=this.__data__,r=nt(e,t);return!(r<0)&&(r==e.length-1?e.pop():H.call(e,r,1),--this.size,!0)},J.prototype.get=function(t){var e=this.__data__,r=nt(e,t);return r<0?void 0:e[r][1]},J.prototype.has=function(t){return nt(this.__data__,t)>-1},J.prototype.set=function(t,e){var r=this.__data__,n=nt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},G.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new($||J),string:new K}},G.prototype.delete=function(t){var e=dt(this,t).delete(t);return this.size-=e?1:0,e},G.prototype.get=function(t){return dt(this,t).get(t)},G.prototype.has=function(t){return dt(this,t).has(t)},G.prototype.set=function(t,e){var r=dt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Z.prototype.clear=function(){this.__data__=new J,this.size=0},Z.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Z.prototype.get=function(t){return this.__data__.get(t)},Z.prototype.has=function(t){return this.__data__.has(t)},Z.prototype.set=function(t,e){var r=this.__data__;if(r instanceof J){var n=r.__data__;if(!$||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new G(n)}return r.set(t,e),this.size=r.size,this};var it,st=function(t,e,r){for(var n=-1,o=Object(t),i=r(t),s=i.length;s--;){var c=i[it?s:++n];if(!1===e(o[c],c,o))break}return t};function ct(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":N&&N in Object(t)?function(t){var e=x.call(t,N),r=t[N];try{t[N]=void 0;var n=!0}catch(i){}var o=L.call(t);n&&(e?t[N]=r:delete t[N]);return o}(t):function(t){return L.call(t)}(t)}function at(t){return Tt(t)&&ct(t)==i}function ut(t){return!(!St(t)||function(t){return!!R&&R in t}(t))&&(jt(t)?C:a).test(function(t){if(null!=t){try{return T.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t))}function lt(t){if(!St(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=bt(t),r=[];for(var n in t)("constructor"!=n||!e&&x.call(t,n))&&r.push(n);return r}function ft(t,e,r,n,o){t!==e&&st(e,(function(i,s){if(o||(o=new Z),St(i))!function(t,e,r,n,o,i,s){var a=_t(t,r),u=_t(e,r),l=s.get(u);if(l)return void et(t,r,l);var f=i?i(a,u,r+"",t,e,s):void 0,p=void 0===f;if(p){var h=Ot(u),d=!h&&kt(u),y=!h&&!d&&xt(u);f=u,h||d||y?Ot(a)?f=a:Tt(m=a)&&Pt(m)?f=function(t,e){var r=-1,n=t.length;e||(e=Array(n));for(;++r<n;)e[r]=t[r];return e}(a):d?(p=!1,f=function(t,e){if(e)return t.slice();var r=t.length,n=B?B(r):new t.constructor(r);return t.copy(n),n}(u,!0)):y?(p=!1,v=u,b=!0?(_=v.buffer,g=new _.constructor(_.byteLength),new I(g).set(new I(_)),g):v.buffer,f=new v.constructor(b,v.byteOffset,v.length)):f=[]:function(t){if(!Tt(t)||ct(t)!=c)return!1;var e=A(t);if(null===e)return!0;var r=x.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&T.call(r)==D}(u)||wt(u)?(f=a,wt(a)?f=function(t){return function(t,e,r,n){var o=!r;r||(r={});var i=-1,s=e.length;for(;++i<s;){var c=e[i],a=n?n(r[c],t[c],c,r,t):void 0;void 0===a&&(a=t[c]),o?ot(r,c,a):rt(r,c,a)}return r}(t,Rt(t))}(a):St(a)&&!jt(a)||(f=function(t){return"function"!=typeof t.constructor||bt(t)?{}:q(A(t))}(u))):p=!1}var v,b,_,g;var m;p&&(s.set(u,f),o(f,u,n,i,s),s.delete(u));et(t,r,f)}(t,e,s,r,ft,n,o);else{var a=n?n(_t(t,s),i,s+"",t,e,o):void 0;void 0===a&&(a=i),et(t,s,a)}}),Rt)}function pt(t,e){return gt(function(t,e,r){return e=Q(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=Q(n.length-e,0),s=Array(i);++o<i;)s[o]=n[e+o];o=-1;for(var c=Array(e+1);++o<e;)c[o]=n[o];return c[e]=r(s),m(t,this,c)}}(t,e,Ct),t+"")}var ht=V?function(t,e){return V(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:Ct;function dt(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function yt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return ut(r)?r:void 0}function vt(t,e){var r=typeof t;return!!(e=null==e?o:e)&&("number"==r||"symbol"!=r&&u.test(t))&&t>-1&&t%1==0&&t<e}function bt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||E)}function _t(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var gt=function(t){var e=0,r=0;return function(){var n=U(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ht);function mt(t,e){return t===e||t!=t&&e!=e}var wt=at(function(){return arguments}())?at:function(t){return Tt(t)&&x.call(t,"callee")&&!F.call(t,"callee")},Ot=Array.isArray;function Pt(t){return null!=t&&Et(t.length)&&!jt(t)}var kt=X||function(){return!1};function jt(t){if(!St(t))return!1;var e=ct(t);return e==s||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Et(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}function St(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Tt(t){return null!=t&&"object"==typeof t}var xt=g?function(t){return function(e){return t(e)}}(g):function(t){return Tt(t)&&Et(t.length)&&!!l[ct(t)]};function Rt(t){return Pt(t)?tt(t,!0):lt(t)}var Lt,Dt=(Lt=function(t,e,r,n){ft(t,e,r,n)},pt((function(t,e){var r=-1,n=e.length,o=n>1?e[n-1]:void 0,i=n>2?e[2]:void 0;for(o=Lt.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,e,r){if(!St(r))return!1;var n=typeof e;return!!("number"==n?Pt(r)&&vt(e,r.length):"string"==n&&e in r)&&mt(r[e],t)}(e[0],e[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++r<n;){var s=e[r];s&&Lt(t,s,r,o)}return t})));function Ct(t){return t}t.exports=Dt},796:(t,e,r)=>{t.exports=r(643)},264:t=>{"use strict";var e=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:e,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:e&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:e&&!!window.screen,isInWorker:!e};t.exports=r},518:t=>{var e,r,n,o,i,s,c,a,u,l,f,p,h,d,y,v=!1;function b(){if(!v){v=!0;var t=navigator.userAgent,b=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),_=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(p=/\b(iPhone|iP[ao]d)/.exec(t),h=/\b(iP[ao]d)/.exec(t),l=/Android/i.exec(t),d=/FBAN\/\w+;/i.exec(t),y=/Mobile/i.exec(t),f=!!/Win64/.exec(t),b){(e=b[1]?parseFloat(b[1]):b[5]?parseFloat(b[5]):NaN)&&document&&document.documentMode&&(e=document.documentMode);var g=/(?:Trident\/(\d+.\d+))/.exec(t);s=g?parseFloat(g[1])+4:e,r=b[2]?parseFloat(b[2]):NaN,n=b[3]?parseFloat(b[3]):NaN,(o=b[4]?parseFloat(b[4]):NaN)?(b=/(?:Chrome\/(\d+\.\d+))/.exec(t),i=b&&b[1]?parseFloat(b[1]):NaN):i=NaN}else e=r=n=i=o=NaN;if(_){if(_[1]){var m=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);c=!m||parseFloat(m[1].replace("_","."))}else c=!1;a=!!_[2],u=!!_[3]}else c=a=u=!1}}var _={ie:function(){return b()||e},ieCompatibilityMode:function(){return b()||s>e},ie64:function(){return _.ie()&&f},firefox:function(){return b()||r},opera:function(){return b()||n},webkit:function(){return b()||o},safari:function(){return _.webkit()},chrome:function(){return b()||i},windows:function(){return b()||a},osx:function(){return b()||c},linux:function(){return b()||u},iphone:function(){return b()||p},mobile:function(){return b()||p||h||l||y},nativeApp:function(){return b()||d},android:function(){return b()||l},ipad:function(){return b()||h}};t.exports=_},534:(t,e,r)=>{"use strict";var n,o=r(264);o.canUseDOM&&(n=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),t.exports=function(t,e){if(!o.canUseDOM||e&&!("addEventListener"in document))return!1;var r="on"+t,i=r in document;if(!i){var s=document.createElement("div");s.setAttribute(r,"return;"),i="function"==typeof s[r]}return!i&&n&&"wheel"===t&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},643:(t,e,r)=>{"use strict";var n=r(518),o=r(534);function i(t){var e=0,r=0,n=0,o=0;return"detail"in t&&(r=t.detail),"wheelDelta"in t&&(r=-t.wheelDelta/120),"wheelDeltaY"in t&&(r=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=r,r=0),n=10*e,o=10*r,"deltaY"in t&&(o=t.deltaY),"deltaX"in t&&(n=t.deltaX),(n||o)&&t.deltaMode&&(1==t.deltaMode?(n*=40,o*=40):(n*=800,o*=800)),n&&!e&&(e=n<1?-1:1),o&&!r&&(r=o<1?-1:1),{spinX:e,spinY:r,pixelX:n,pixelY:o}}i.getEventType=function(){return n.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},t.exports=i}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,loaded:!1,exports:{}};return t[n](i,i.exports,r),i.loaded=!0,i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";var t={};r.r(t),r.d(t,{mergeWithoutArrays:()=>f,randID:()=>a,timeoutCallback:()=>p});var e={};r.r(e),r.d(e,{clamp:()=>et,clampScope:()=>st,inScope:()=>it,lerp:()=>rt,scoped:()=>nt,spreadScope:()=>ot,wrap:()=>ct});var n={};r.r(n),r.d(n,{intersectionObserverSupported:()=>zt,onScroll:()=>At});var o={};r.r(o),r.d(o,{getValues:()=>Ft,to:()=>Pe,toElement:()=>ke});var i={};r.r(i),r.d(i,{load:()=>Le,pathsToProps:()=>Ce,sizesToSrcSet:()=>De});var s={};r.r(s);var c={};function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id",e="".concat(+new Date,"_").concat(Math.round(1e3*Math.random()));return"".concat(t,"_").concat(e)}r.r(c),r.d(c,{AnimationFrame:()=>wt,Application:()=>Wr,Callbacks:()=>L,Component:()=>tt,Ctx2D:()=>Uo,Ctx2DPrerender:()=>ci,CustomCursor:()=>pc,Dragger:()=>ao,DraggerDirection:()=>Do,DraggerMove:()=>go,GeneralTypes:()=>s,Module:()=>N,MutableProp:()=>W,Page:()=>sn,PageLoad:()=>xr,Plugin:()=>Qr,Preloader:()=>Mn,ProgressPreloader:()=>Yn,ScrollBar:()=>ki,ScrollEventsBase:()=>Ai,ScrollSectionProgress:()=>As,ScrollView:()=>ts,SmoothScroll:()=>It,SmoothScrollDragPlugin:()=>ks,SmoothScrollKeyboardPlugin:()=>ls,SplitText:()=>Gs,StaticTimeline:()=>ae,Timeline:()=>Oe,Viewport:()=>wr,WheelHandler:()=>mn,utils:()=>hc});var u=r(554),l=r.n(u);function f(t,e){return l()(t,e,(function(t,e){if(Array.isArray(t))return e}))}function p(t,e){var r;return 0===e?t():r=setTimeout((function(){t()}),e),{clear:function(){r&&clearTimeout(r)}}}function h(t,e){return d(t,e)}function d(t,e){return t===e||null!==t&&d(t.parentNode,e)}function y(t){return t instanceof HTMLElement||t instanceof Element}function v(t){return t instanceof Window}function b(t,e){if(v(t))return t;if(y(t))return t;if(void 0!==e){const r=b(e);if(r)return r.querySelector(t)}return document.querySelector(t)}function _(t,e){if(t instanceof NodeList)return t;if(y(t))return[t];if(Array.isArray(t))return t;if(void 0!==e){const r=b(e);if(r)return r.querySelectorAll(t)}return document.querySelectorAll(t)}function g(t,e,r){const n=e.split(" ");for(let o=0;o<n.length;o++)void 0===r?t.classList.toggle(n[o]):r?t.classList.add(n[o]):t.classList.remove(n[o])}function m(t,e={}){const r=document.createElement(t);if(e.class&&function(t,e){if(t instanceof Element)g(t,e,!0);else for(let r=0;r<t.length;r++)g(t[r],e,!0)}(r,e.class),e.id&&r.setAttribute("id",e.id),e.attr)for(let n=0,o=e.attr.length;n<o;n++){const t=e.attr[n];r.setAttribute(t[0],t[1])}if(e.parent&&e.parent.appendChild(r),e.html&&(r.innerHTML=e.html),e.children)for(let n=0,o=e.children.length;n<o;n++)r.appendChild(e.children[n]);return r}const w=[];function O(t,e,r,n){if(void 0!==n){const o={passive:!1,once:!1};n.once&&(o.once=!0),n.passive&&(o.passive=!0),t.addEventListener(e,r,o)}else t.addEventListener(e,r);const o=`${Math.random()}-${+new Date}`;return w.push({id:o,el:t,target:e,callback:r}),{id:o,remove:P.bind(this,o)}}function P(t){const e=[];for(let r=0,n=w.length;r<n;r++){const n=w[r];n.id===t?n.el.removeEventListener(n.target,n.callback):e.push(n)}}var k=r(796),j=r.n(k);function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){R(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function T(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function R(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var L=function(){function t(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];T(this,t),R(this,"_app",void 0),R(this,"_callbacks",void 0),this._app=window.vevetApp,this._callbacks=[],e&&this._init()}var e,r,n;return e=t,r=[{key:"callbacks",get:function(){return this._callbacks}},{key:"_init",value:function(){this._constructor(),this._setEvents()}},{key:"_constructor",value:function(){}},{key:"_setEvents",value:function(){}},{key:"add",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=a("callback"),o={id:n,on:!0,data:S({target:t,do:e},r)};return this._callbacks.push(o),this._onAdd(n),{id:n,remove:this.remove.bind(this,n)}}},{key:"_onAdd",value:function(t){}},{key:"remove",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!1,o=this._callbacks.filter((function(o){return o.id!==t||!(!o.data.protected||r)||(e._onRemove(t),n=!0,!1)}));return this._callbacks=o,n}},{key:"_onRemove",value:function(t){}},{key:"removeAll",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._callbacks.length>0;)this.remove(this._callbacks[0].id,t)}},{key:"turn",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.get(t);return!!r&&(r.on=e,this._onTurn(t),!0)}},{key:"_onTurn",value:function(t){}},{key:"get",value:function(t){var e=this._callbacks.filter((function(e){return e.id===t}));return e.length>0&&e[0]}},{key:"_trigger",value:function(t,e){if(t.on){var r=t.data,n=r.timeout,o=r.once,i=t.data.do;n?p(e?this._triggerFunc.bind(this,i,e):this._triggerFunc.bind(this,i,!1),n):e?this._triggerFunc(i,e):this._triggerFunc(i,!1),o&&this.remove(t.id)}}},{key:"_triggerFunc",value:function(t,e){e?t(e):t()}},{key:"tbt",value:function(t,e){var r=this;this._callbacks.forEach((function(n){n.data.target===t&&r._trigger(n,e)}))}},{key:"destroy",value:function(){this.removeAll(!0)}}],r&&x(e.prototype,r),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function D(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function M(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var W=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Responsive Prop";D(this,t),M(this,"_initProp",void 0),M(this,"_onResponsive",void 0),M(this,"_onChange",void 0),M(this,"_name",void 0),M(this,"_app",void 0),M(this,"_refProp",void 0),M(this,"_prop",void 0),M(this,"_responsiveRules",[]),M(this,"_viewportCallback",void 0),this._initProp=e,this._onResponsive=r,this._onChange=n,this._name=o,this._app=window.vevetApp,this._refProp=f({},e),this._prop=f({},e)}var e,r,n;return e=t,r=[{key:"prop",get:function(){return this._prop}},{key:"addResponsiveProp",value:function(t){this._responsiveRules.push(t),void 0===this._viewportCallback&&(this._viewportCallback=this._app.viewport.add("w",this._responseProp.bind(this,!0),{name:this._name})),this._responseProp()}},{key:"_responseProp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._responsiveRules,r=this._app,n=r.viewport,o=n.width,i=!1,s=f({},this._refProp);e.forEach((function(t){var e=t.settings,c=t.breakpoint;if("number"==typeof c)o<=t.breakpoint&&(i=f(s,e));else if("string"==typeof c){var a=c.toLowerCase();("d"===a&&n.isDesktop||"t"===a&&n.isTablet||"p"===a&&n.isPhone)&&(i=f(s,e)),("phone"===a&&r.isPhone||"tablet"===a&&r.isTablet||"mobile"===a&&r.isMobile)&&(i=f(s,e))}})),this._prop=f(this._prop,i||this._refProp),t&&this._onResponsive()}},{key:"changeProp",value:function(t){this._prop=f(this._prop,t),this._refProp=f(this._refProp,t),this._onChange(t)}},{key:"destroy",value:function(){this._viewportCallback&&this._viewportCallback.remove()}}],r&&C(e.prototype,r),n&&C(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function I(){throw new Error('Vevet.Application does not exist yet. \nCall "new Vevet.Application()" before using all the stuff')}function B(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function A(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?B(Object(r),!0).forEach((function(e){H(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):B(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function H(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var N=function(){function t(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];z(this,t),H(this,"_mutableProp",void 0),H(this,"_callbacks",void 0),H(this,"_listeners",void 0),H(this,"_app",void 0),H(this,"_inited",!1),H(this,"_destroyed",void 0),H(this,"_viewportCallbacks",[]),window.vevetApp?this._app=window.vevetApp:I(),this._destroyed=!1,this._listeners=[],this._callbacks=new L;var n=f(this._getDefaultProp(),e||{});this._mutableProp=new W(n,this._onPropResponsive.bind(this),this._onPropChange.bind(this),this.name),r&&this.init()}var e,r,n;return e=t,r=[{key:"_getDefaultProp",value:function(){return{parent:!1}}},{key:"prop",get:function(){return this._mutableProp.prop}},{key:"callbacks",get:function(){return this._callbacks}},{key:"prefix",get:function(){return""}},{key:"name",get:function(){return this.constructor.name}},{key:"inited",get:function(){return this._inited}},{key:"destroyed",get:function(){return this._destroyed}},{key:"addResponsiveProp",value:function(t){if(this._inited)throw new Error("Responsive properties cannot be added because the class instance is already initialized");this._mutableProp.addResponsiveProp(t)}},{key:"changeProp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._mutableProp.changeProp(t),this._callbacks.tbt("changeProp",!1)}},{key:"_onPropResponsive",value:function(){this._onPropMutate()}},{key:"_onPropChange",value:function(t){this._onPropMutate()}},{key:"_onPropMutate",value:function(){}},{key:"init",value:function(){var t=this;this._inited||(this._inited=!0,this._constructor(),this._setEvents(),this.prop.parent&&this.prop.parent.addCallback("destroy",(function(){t.destroy()})))}},{key:"_constructor",value:function(){}},{key:"_setEvents",value:function(){}},{key:"addViewportCallback",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this._app.viewport.add(t,e,A(A({},r),{},{name:this.constructor.name}));return this._viewportCallbacks.push(n),n}},{key:"addCallback",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.callbacks.add(t,e,r);return n}},{key:"addEventListeners",value:function(t,e,r,n){var o=O(t,e,r,n);return this._listeners.push(o),o}},{key:"destroy",value:function(){this.destroyed||this._destroy()}},{key:"_destroy",value:function(){this._callbacks.tbt("destroy",!1),this._callbacks.destroy(),this._mutableProp.destroy(),this._viewportCallbacks.forEach((function(t){t.remove()})),this._listeners.forEach((function(t){t.remove()})),this._destroyed=!0}}],r&&F(e.prototype,r),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function V(t){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V(t)}function X(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function U(){return U="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=$(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},U.apply(this,arguments)}function $(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=G(t)););return t}function Y(t,e){return Y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Y(t,e)}function q(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=G(t);if(e){var o=G(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return K(this,r)}}function K(t,e){if(e&&("object"===V(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return J(t)}function J(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function G(t){return G=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},G(t)}function Z(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var tt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Y(t,e)}(i,t);var e,r,n,o=q(i);function i(){var t;X(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Z(J(t=o.call.apply(o,[this].concat(r))),"_plugins",void 0),t}return e=i,(r=[{key:"addPlugin",value:function(t){void 0===this._plugins&&(this._plugins=[]),this._plugins.push(t),t.inited||t.initPlugin(this)}},{key:"_destroyPlugins",value:function(){this._plugins&&this._plugins.forEach((function(t){t.destroy()}))}},{key:"_destroy",value:function(){U(G(i.prototype),"_destroy",this).call(this),this._destroyPlugins()}}])&&Q(e.prototype,r),n&&Q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(N);function et(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1];return t<e[0]?e[0]:t>e[1]?e[1]:t}function rt(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001,o=t*(1-r)+e*r,i=Math.abs(e-o);return i<=n?e:o}function nt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1],r=(t-e[0])/(e[1]-e[0]);return r}function ot(t,e){for(var r=[],n=1/(t-e*(t-1)),o=0;o<t;o+=1){var i=n*(1-e)*o,s=i+n;r.push([i,s])}return r}function it(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1];return t>=e[0]&&t<=e[1]}function st(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,1];return et(nt(t,e),r)}function ct(t,e,r){var n=e-t;return function(t,e){return t||0===t?e(t):e}(r,(function(e){return(n+(e-t)%n)%n+t}))}function at(t){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},at(t)}function ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function lt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(r),!0).forEach((function(e){mt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ft(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ht(){return ht="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=dt(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ht.apply(this,arguments)}function dt(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=gt(t)););return t}function yt(t,e){return yt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},yt(t,e)}function vt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=gt(t);if(e){var o=gt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bt(this,r)}}function bt(t,e){if(e&&("object"===at(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _t(t)}function _t(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gt(t){return gt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},gt(t)}function mt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var wt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yt(t,e)}(i,t);var e,r,n,o=vt(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return ft(this,i),mt(_t(e=o.call(this,t,!1)),"_isPlaying",void 0),mt(_t(e),"_frame",void 0),mt(_t(e),"_frameIndex",void 0),mt(_t(e),"_timeStamp",void 0),mt(_t(e),"_prevFrameTime",void 0),e._isPlaying=!1,e._frame=null,e._frameIndex=-1,e._timeStamp=null,e._prevFrameTime=null,r&&e.init(),e}return e=i,(r=[{key:"isPlaying",get:function(){return this._isPlaying}},{key:"_getDefaultProp",value:function(){return lt(lt({},ht(gt(i.prototype),"_getDefaultProp",this).call(this)),{},{fps:140,run:!1})}},{key:"_constructor",value:function(){ht(gt(i.prototype),"_constructor",this).call(this),this._create()}},{key:"_create",value:function(){this.prop.run&&this.play()}},{key:"_onPropMutate",value:function(){this._frameIndex=-1,this._timeStamp=null,this._prevFrameTime=null,this.prop.run?this._play():this._pause()}},{key:"play",value:function(){this.destroyed||this.prop.run||this.changeProp({run:!0})}},{key:"_play",value:function(){this.isPlaying||(this._isPlaying=!0,this._frame=window.requestAnimationFrame(this._animate.bind(this)))}},{key:"pause",value:function(){this.prop.run&&this.changeProp({run:!1})}},{key:"_pause",value:function(){this.isPlaying&&(this._frame&&(window.cancelAnimationFrame(this._frame),this._frame=null),this._isPlaying=!1)}},{key:"_animate",value:function(t){if(this._isPlaying){this._frame=window.requestAnimationFrame(this._animate.bind(this));var e=+new Date;null==this._timeStamp&&(this._timeStamp=t),null==this._prevFrameTime&&(this._prevFrameTime=e);var r=Math.floor((t-this._timeStamp)/(1e3/this.prop.fps));if(!(r<=this._frameIndex)){this._frameIndex=r;var n=e-this._prevFrameTime,o=et(0===n?1e3/60:Math.floor(1e3/n),[1,1/0]);this.callbacks.tbt("frame",{fps:this.prop.fps,realFPS:o,prevFrameDuration:e-this._prevFrameTime}),this._prevFrameTime=+new Date}}}},{key:"_destroy",value:function(){this.pause(),ht(gt(i.prototype),"_destroy",this).call(this)}}])&&pt(e.prototype,r),n&&pt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt);function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function Pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function kt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(r),!0).forEach((function(e){Mt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function jt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Et(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function St(){return St="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Tt(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},St.apply(this,arguments)}function Tt(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ct(t)););return t}function xt(t,e){return xt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},xt(t,e)}function Rt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ct(t);if(e){var o=Ct(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Lt(this,r)}}function Lt(t,e){if(e&&("object"===Ot(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Dt(t)}function Dt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ct(t){return Ct=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ct(t)}function Mt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Wt,It=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xt(t,e)}(i,t);var e,r,n,o=Rt(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];jt(this,i),Mt(Dt(e=o.call(this,t,!1)),"_outer",void 0),Mt(Dt(e),"_container",void 0),Mt(Dt(e),"_containerExists",void 0),Mt(Dt(e),"_elements",void 0),Mt(Dt(e),"_elementsLength",void 0),Mt(Dt(e),"_targetLeft",void 0),Mt(Dt(e),"_targetTop",void 0),Mt(Dt(e),"_scrollLeft",void 0),Mt(Dt(e),"_scrollTop",void 0),Mt(Dt(e),"_scrollWidth",void 0),Mt(Dt(e),"_scrollHeight",void 0),Mt(Dt(e),"_clientWidth",void 0),Mt(Dt(e),"_clientHeight",void 0),Mt(Dt(e),"_instant",void 0),Mt(Dt(e),"_animationFrame",void 0),Mt(Dt(e),"_outerAnimationFrameEvent",void 0),Mt(Dt(e),"_currentFPS",void 0);var n=e.prop.selectors;if(e._targetLeft=0,e._targetTop=0,e._scrollLeft=0,e._scrollTop=0,e._scrollWidth=0,e._scrollHeight=0,e._clientWidth=0,e._clientHeight=0,e._instant=!1,e._animationFrame=void 0,e._outerAnimationFrameEvent=void 0,e._currentFPS=60,e._outer=b(n.outer),!(e._outer instanceof HTMLElement))throw new Error("".concat(n.outer," is not a HTMLElement"));e._outer.classList.add(e.prefix);var s=b(".".concat(e.prefix,"__container"),e.outer);return y(s)?(e._container=s,e._containerExists=!0):(e._container=m("div",{class:"".concat(e.prefix,"__container"),parent:e.outer,children:Array.from(e.outer.children)}),e._containerExists=!1),n.elements?e._elements=Array.from(_(n.elements,e._outer)):e._elements=[e._container],e._elementsLength=e._elements.length,e.prop.useWillChange&&e._elements.forEach((function(t){t.style.willChange="transform"})),r&&e.init(),e}return e=i,r=[{key:"prefix",get:function(){return"".concat(this._app.prefix,"smooth-scroll")}},{key:"outer",get:function(){return this._outer}},{key:"container",get:function(){return this._container}},{key:"elements",get:function(){return this._elements}},{key:"targetLeft",get:function(){return this._targetLeft},set:function(t){this.targetLeftBound=t,this._enable()}},{key:"targetLeftBound",get:function(){return this._targetLeft},set:function(t){var e=this.prop.overscroll&&this.prop.isHorizontal?-this.prop.overscroll.max:0,r=this.maxScrollableWidth+(this.prop.overscroll&&this.prop.isHorizontal?this.prop.overscroll.max:0);this._targetLeft=et(t,[e,r])}},{key:"targetTop",get:function(){return this._targetTop},set:function(t){this.targetTopBound=t,this._enable()}},{key:"targetTopBound",get:function(){return this._targetTop},set:function(t){var e=this.prop.overscroll&&!this.prop.isHorizontal?-this.prop.overscroll.max:0,r=this.maxScrollableHeight+(this.prop.overscroll&&!this.prop.isHorizontal?this.prop.overscroll.max:0);this._targetTop=et(t,[e,r])}},{key:"scrollLeft",get:function(){return this._scrollLeft},set:function(t){this.targetLeftBound=t,this._scrollLeft=this._targetLeft,this._enable()}},{key:"scrollTop",get:function(){return this._scrollTop},set:function(t){this.targetTopBound=t,this._scrollTop=this._targetTop,this._enable()}},{key:"scrollWidth",get:function(){return this._scrollWidth}},{key:"scrollHeight",get:function(){return this._scrollHeight}},{key:"clientWidth",get:function(){return this._clientWidth}},{key:"clientHeight",get:function(){return this._clientHeight}},{key:"maxScrollableWidth",get:function(){return this.scrollWidth-this.clientWidth}},{key:"maxScrollableHeight",get:function(){return this.scrollHeight-this.clientHeight}},{key:"_getDefaultProp",value:function(){return kt(kt({},St(Ct(i.prototype),"_getDefaultProp",this).call(this)),{},{selectors:{outer:"#".concat(this.prefix),elements:!1},enabled:!0,animationFrame:!1,recalculateSizes:!0,resizeTimeout:0,useWheel:!0,autoStop:!0,isHorizontal:!1,stopPropagation:!0,useWillChange:!0,render:{lerp:.1,lerpToFixed:2,approximation:.1,normalizeLerp:!1},overscroll:{friction:.5,max:250}})}},{key:"_constructor",value:function(){St(Ct(i.prototype),"_constructor",this).call(this),this._toggle()}},{key:"_setEvents",value:function(){var t=this;this.resize(),this.addViewportCallback("",(function(){t.resize(!0)}),{timeout:this.prop.resizeTimeout}),this.addEventListeners(this.outer,"wheel",(function(e){t._handleWheel(e)})),this.addEventListeners(this.outer,"scroll",(function(){t.outer.scrollTop=0,t.outer.scrollLeft=0}))}},{key:"_onPropMutate",value:function(){St(Ct(i.prototype),"_onPropMutate",this).call(this),this.resize(),this._toggle()}},{key:"resize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.container,r=this.outer;this._clientWidth=r.clientWidth,this._clientHeight=r.clientHeight,this._scrollWidth=et(e.clientWidth,[this.clientWidth,1/0]),this._scrollHeight=et(e.clientHeight,[this.clientHeight,1/0]),t&&(this._instant=!0),t&&(this.targetLeft=parseInt(this.targetLeft.toFixed(0),10),this.targetTop=parseInt(this.targetTop.toFixed(0),10));var n=this.maxScrollableHeight>0||this.maxScrollableWidth>0;r.classList.toggle("has-scroll",n),r.classList.toggle("no-scroll",!n),this._updateElementsProp(),this.callbacks.tbt("resize",!1)}},{key:"_recalculateSizes",value:function(){var t=this.container,e=t.clientHeight,r=t.clientWidth;e===this.scrollHeight&&r===this.scrollWidth||this.resize()}},{key:"_updateElementsProp",value:function(){for(var t=0;t<this._elementsLength;t+=1){var e=this._elements[t];e.smoothScrollLeft=this.scrollLeft,e.smoothScrollTop=this.scrollTop;var r=e.getAttribute("".concat(this.prefix,"-ease"));if(r)try{e.smoothScrollLerpEase=parseFloat(r)}catch(n){}}}},{key:"_handleWheel",value:function(t){var e=this.prop;if(e.enabled&&e.useWheel){(e.stopPropagation||!e.stopPropagation&&(this.scrollLeft>0&&this.scrollLeft<this.maxScrollableWidth||this.scrollTop>0&&this.scrollTop<this.maxScrollableHeight))&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault());var r=j()(t);this.targetLeftBound+=e.isHorizontal?r.pixelY:r.pixelX,this.targetTopBound+=e.isHorizontal?r.pixelX:r.pixelY,this._enable(),this.callbacks.tbt("wheel",t)}}},{key:"_toggle",value:function(){this.prop.enabled?this._enable():this._disable()}},{key:"_enable",value:function(){var t=this;this.prop.enabled&&(this.prop.animationFrame&&!this._outerAnimationFrameEvent?this._outerAnimationFrameEvent=this.prop.animationFrame.addCallback("frame",(function(e){t._currentFPS=e.realFPS,t.render()})):(this._animationFrame||(this._animationFrame=new wt,this._animationFrame.addCallback("frame",(function(e){t._currentFPS=e.realFPS,t.render()}))),this._animationFrame.play()))}},{key:"_disable",value:function(){this._outerAnimationFrameEvent&&this.prop.animationFrame&&this._outerAnimationFrameEvent.remove(),this._animationFrame&&this._animationFrame.pause()}},{key:"render",value:function(){var t=this.prop;t.recalculateSizes&&this._recalculateSizes(),this._calcScroll(),this._calcElements(),this._renderElements(),this._instant&&(this._instant=!1),this.callbacks.tbt("scroll",!1);var e=Math.abs(this.targetTop-this.scrollTop);0===Math.abs(this.targetLeft-this.scrollLeft)&&0===e&&t.autoStop&&(this._disable(),this.callbacks.tbt("approximate",!1))}},{key:"_calcScroll",value:function(){var t=this.prop.overscroll;t&&(this.targetLeft<0?this.targetLeftBound=this._lerp(this.targetLeftBound,0,t.friction):this.targetLeft>this.maxScrollableWidth&&(this.targetLeftBound=this._lerp(this.targetLeftBound,this.maxScrollableWidth,t.friction)),this.targetTop<0?this.targetTopBound=this._lerp(this.targetTopBound,0,t.friction):this.targetTop>this.maxScrollableHeight&&(this.targetTopBound=this._lerp(this.targetTopBound,this.maxScrollableHeight,t.friction))),this._scrollLeft=this._lerp(this.scrollLeft,this.targetLeft),this._scrollTop=this._lerp(this.scrollTop,this.targetTop)}},{key:"_calcElements",value:function(){for(var t=this._getLerpEase(),e=0;e<this._elementsLength;e+=1){var r=this._elements[e],n=this._getLerpEase(r);n===t?(r.smoothScrollLeft=this._scrollLeft,r.smoothScrollTop=this._scrollTop):(r.smoothScrollLeft=this._lerp(r.smoothScrollLeft,this._targetLeft,n),r.smoothScrollTop=this._lerp(r.smoothScrollTop,this._targetTop,n))}}},{key:"_lerp",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._getLerpEase(),n=this.prop.render,o=n.lerpToFixed,i=n.approximation,s=this._instant?1:r,c=rt(t,e,s,i);if("number"==typeof o){var a=Math.round(Math.abs(o));return parseFloat(c.toFixed(a))}return c}},{key:"_getLerpEase",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.prop.render,r=e.lerp,n=e.normalizeLerp,o=n?60/this._currentFPS:1;return t&&t.smoothScrollLerpEase||r*o}},{key:"_renderElements",value:function(){for(var t=0;t<this._elementsLength;t+=1){var e=this._elements[t],r=-e.smoothScrollLeft,n=-e.smoothScrollTop;e.style.transform="matrix3d(1,0,0.00,0,0.00,1,0.00,0,0,0,1,0, ".concat(r,", ").concat(n,", 0,1)")}}},{key:"scrollTo",value:function(){var t=arguments;if(1===t.length&&"object"===Ot(t[0])){var e=t[0],r=e.top,n=e.left,o=e.behavior;void 0!==n&&("smooth"===o?this.targetLeftBound=n:this.scrollLeft=n),void 0!==r&&("smooth"===o?this.targetTopBound=r:this.scrollTop=r),"smooth"===o&&this._enable()}"number"!=typeof t[0]&&"number"!=typeof t[1]||("number"==typeof t[0]&&(this.scrollLeft=t[0]),"number"==typeof t[1]&&(this.scrollTop=t[1]))}},{key:"_destroy",value:function(){if(St(Ct(i.prototype),"_destroy",this).call(this),this._disable(),this._animationFrame&&this._animationFrame.destroy(),!this._containerExists){for(;this._container.firstChild;)this._outer.appendChild(this._container.firstChild);this._container.remove()}this._outer.classList.remove(this.prefix),this._elements.forEach((function(t){t.style.transform="",t.style.willChange=""}))}}],r&&Et(e.prototype,r),n&&Et(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt),Bt=[];function At(t){var e=t.container,r=t.callback,n=t.isPassive,o=void 0!==n&&n,i=Bt.find((function(t){return t.container===e&&t.isPassive===o})),s=a("scroll-event");if(i)i.callbacks.push({id:s,callback:r});else{i={id:a("scroll-event-instance"),container:e,callbacks:[{id:s,callback:r}],isPassive:o,listeners:[]},Bt.push(i);var c=i.listeners;if(e instanceof It)c.push(e.addCallback("scroll",(function(){for(var t=e.scrollTop,r=e.scrollLeft,n=0;n<i.callbacks.length;n+=1)i.callbacks[n].callback({scrollTop:t,scrollLeft:r})})));else{var u=e instanceof Window,l=b(e);c.push(O(l,"scroll",(function(){for(var t=u?l.pageYOffset:l.scrollTop,e=u?l.pageXOffset:l.scrollLeft,r=0;r<i.callbacks.length;r+=1)i.callbacks[r].callback({scrollTop:t,scrollLeft:e})}),{passive:o}))}}return{remove:function(){var t=i.callbacks.filter((function(t){return t.id!==s}));i.callbacks=t,0===t.length&&(i.listeners.forEach((function(t){t.remove()})),Bt=Bt.filter((function(t){return t.id!==i.id})))}}}function zt(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype}function Ft(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if(t){var e=t instanceof Window?t.pageYOffset:t.scrollTop,r=t instanceof Window?t.pageXOffset:t.scrollLeft;return{scrollTop:e,scrollLeft:r}}}function Ht(t,e){const[r,n,o,i]=e;if(r===n&&o===i)return t;const s=[];for(let c=0;c<11;++c)s[c]=Nt(.1*c,r,o);return 0===t?0:1===t?1:Nt(function(t,e,r){const n=t[0],o=t[2];let i=0,s=1;for(;10!==s&&r[s]<=e;++s)i+=.1;--s;const c=(e-r[s])/(r[s+1]-r[s]),a=i+.1*c,u=Ut(a,n,o);if(u>=.001)return function(t,e,r,n){for(let o=0;o<4;++o){const o=Ut(e,r,n);if(0===o)return e;e-=(Nt(e,r,n)-t)/o}return e}(e,a,n,o);if(0===u)return a;return function(t,e,r,n,o){let i,s,c=0;do{s=e+(r-e)/2,i=Nt(s,n,o)-t,i>0?r=s:e=s}while(Math.abs(i)>1e-7&&++c<10);return s}(e,i,i+.1,n,o)}(e,t,s),n,i)}function Nt(t,e,r){return((Vt(e,r)*t+Xt(e,r))*t+Qt(e))*t}function Vt(t,e){return 1-3*e+3*t}function Xt(t,e){return 3*e-6*t}function Qt(t){return 3*t}function Ut(t,e,r){return 3*Vt(e,r)*t*t+2*Xt(e,r)*t+Qt(e)}function $t(t){const e=7.5625,r=2.75;return t<1/r?e*t*t:t<2/r?e*(t-=1.5/r)*t+.75:t<2.5/r?e*(t-=2.25/r)*t+.9375:e*(t-=2.625/r)*t+.984375}function Yt(t,e){switch(e){case Wt.easeInSine:return r=t,1-Math.cos(r*Math.PI/2);case Wt.easeOutSine:return function(t){return Math.sin(t*Math.PI/2)}(t);case Wt.easeInOutSine:return function(t){return-(Math.cos(Math.PI*t)-1)/2}(t);case Wt.easeInQuad:return function(t){return Math.pow(t,2)}(t);case Wt.easeOutQuad:return function(t){return 1-Math.pow(1-t,2)}(t);case Wt.easeInOutQuad:return function(t){return t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2}(t);case Wt.easeInCubic:return function(t){return Math.pow(t,3)}(t);case Wt.easeOutCubic:return function(t){return 1-Math.pow(1-t,3)}(t);case Wt.easeInOutCubic:return function(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}(t);case Wt.easeInQuart:return function(t){return Math.pow(t,4)}(t);case Wt.easeOutQuart:return function(t){return 1-Math.pow(1-t,4)}(t);case Wt.easeInOutQuart:return function(t){return t<.5?8*t*t*t*t:1-Math.pow(-2*t+2,4)/2}(t);case Wt.easeInQuint:return function(t){return Math.pow(t,5)}(t);case Wt.easeOutQuint:return function(t){return 1-Math.pow(1-t,5)}(t);case Wt.easeInOutQuint:return function(t){return t<.5?16*t*t*t*t*t:1-Math.pow(-2*t+2,5)/2}(t);case Wt.easeInExpo:return function(t){return 0===t?0:Math.pow(2,10*t-10)}(t);case Wt.easeOutExpo:return function(t){return 1===t?1:1-Math.pow(2,-10*t)}(t);case Wt.easeInOutExpo:return function(t){return 0===t?0:1===t?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2}(t);case Wt.easeInCirc:return function(t){return 1-Math.sqrt(1-Math.pow(t,2))}(t);case Wt.easeOutCirc:return function(t){return Math.sqrt(1-Math.pow(t-1,2))}(t);case Wt.easeInOutCirc:return function(t){return t<.5?(1-Math.sqrt(1-Math.pow(2*t,2)))/2:(Math.sqrt(1-Math.pow(-2*t+2,2))+1)/2}(t);case Wt.easeInBack:return function(t){return 2.70158*t*t*t-1.70158*t*t}(t);case Wt.easeOutBack:return function(t){const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}(t);case Wt.easeInOutBack:return function(t){const e=2.5949095;return t<.5?Math.pow(2*t,2)*(7.189819*t-e)/2:(Math.pow(2*t-2,2)*((e+1)*(2*t-2)+e)+2)/2}(t);case Wt.easeInElastic:return function(t){const e=2*Math.PI/3;return 0===t?0:1===t?1:-Math.pow(2,10*t-10)*Math.sin((10*t-10.75)*e)}(t);case Wt.easeOutElastic:return function(t){const e=2*Math.PI/3;return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin((10*t-.75)*e)+1}(t);case Wt.easeInOutElastic:return function(t){const e=2*Math.PI/4.5;return 0===t?0:1===t?1:t<.5?-Math.pow(2,20*t-10)*Math.sin((20*t-11.125)*e)/2:Math.pow(2,-20*t+10)*Math.sin((20*t-11.125)*e)/2+1}(t);case Wt.easeInBounce:return function(t){return 1-$t(1-t)}(t);case Wt.easeOutBounce:return $t(t);case Wt.easeInOutBounce:return function(t){return t<.5?(1-$t(1-2*t))/2:(1+$t(2*t-1))/2}(t);default:return t}var r}function qt(t){return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qt(t)}function Kt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Jt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Kt(Object(r),!0).forEach((function(e){ce(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function te(t,e){return te=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},te(t,e)}function ee(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=se(t);if(e){var o=se(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return re(this,r)}}function re(t,e){if(e&&("object"===qt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ne(t)}function ne(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oe(){return oe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ie(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},oe.apply(this,arguments)}function ie(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=se(t)););return t}function se(t){return se=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},se(t)}function ce(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t.easeInSine="easeInSine",t.easeOutSine="easeOutSine",t.easeInOutSine="easeInOutSine",t.easeInQuad="easeInQuad",t.easeOutQuad="easeOutQuad",t.easeInOutQuad="easeInOutQuad",t.easeInCubic="easeInCubic",t.easeOutCubic="easeOutCubic",t.easeInOutCubic="easeInOutCubic",t.easeInQuart="easeInQuart",t.easeOutQuart="easeOutQuart",t.easeInOutQuart="easeInOutQuart",t.easeInQuint="easeInQuint",t.easeOutQuint="easeOutQuint",t.easeInOutQuint="easeInOutQuint",t.easeInExpo="easeInExpo",t.easeOutExpo="easeOutExpo",t.easeInOutExpo="easeInOutExpo",t.easeInCirc="easeInCirc",t.easeOutCirc="easeOutCirc",t.easeInOutCirc="easeInOutCirc",t.easeInBack="easeInBack",t.easeOutBack="easeOutBack",t.easeInOutBack="easeInOutBack",t.easeInElastic="easeInElastic",t.easeOutElastic="easeOutElastic",t.easeInOutElastic="easeInOutElastic",t.easeInBounce="easeInBounce",t.easeOutBounce="easeOutBounce",t.easeInOutBounce="easeInOutBounce"}(Wt||(Wt={}));var ae=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&te(t,e)}(i,t);var e,r,n,o=ee(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Gt(this,i),ce(ne(e=o.call(this,t,!1)),"_progress",void 0),ce(ne(e),"_easing",void 0),ce(ne(e),"_nestedTimelines",void 0),e._progress=0,e._easing=0,e._nestedTimelines=[],r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return Jt(Jt({},oe(se(i.prototype),"_getDefaultProp",this).call(this)),{},{easing:this._app.prop.easing,scope:[0,1],useNestedEasingProgress:!1})}},{key:"progress",get:function(){return this._progress},set:function(t){this._progress=t,this._handleProgress()}},{key:"easing",get:function(){return this._easing}},{key:"addNestedTimeline",value:function(t){this._nestedTimelines.push(t)}},{key:"_handleProgress",value:function(){this._easing=function(t,e=!1){return e?Array.isArray(e)?Ht(t,e):"function"==typeof e?e(t):Yt(t,e):t}(this._progress,this.prop.easing),this._callbacks.tbt("progress",{progress:this._progress,easing:this._easing}),this._renderNestedTimelines()}},{key:"_renderNestedTimelines",value:function(){var t=this._nestedTimelines.length;if(0!==t)for(var e=this.prop.useNestedEasingProgress?this.easing:this.progress,r=0,n=t;r<n;r+=1){var o=this._nestedTimelines[r],i=et(nt(e,o.prop.nestedScope),[0,1]);o.progress=i}}},{key:"_destroy",value:function(){oe(se(i.prototype),"_destroy",this).call(this),this._nestedTimelines.forEach((function(t){t.destroy()}))}}])&&Zt(e.prototype,r),n&&Zt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt);function ue(t){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ue(t)}function le(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fe(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?le(Object(r),!0).forEach((function(e){we(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function pe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function he(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function de(t,e){return de=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},de(t,e)}function ye(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=me(t);if(e){var o=me(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ve(this,r)}}function ve(t,e){if(e&&("object"===ue(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return be(t)}function be(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _e(){return _e="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ge(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},_e.apply(this,arguments)}function ge(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=me(t)););return t}function me(t){return me=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},me(t)}function we(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Oe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&de(t,e)}(i,t);var e,r,n,o=ye(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return pe(this,i),we(be(e=o.call(this,t,!1)),"_isPlaying",void 0),we(be(e),"_isReversed",void 0),we(be(e),"_isPaused",void 0),we(be(e),"_animationFrame",void 0),we(be(e),"_animationFrameLastTime",void 0),e._isPlaying=!1,e._isReversed=!1,e._isPaused=!1,e._animationFrame=void 0,e._animationFrameLastTime=0,r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return fe(fe({},_e(me(i.prototype),"_getDefaultProp",this).call(this)),{},{duration:1e3,reset:!1,destroyOnEnd:!1})}},{key:"isPlaying",get:function(){return void 0!==this._animationFrame}},{key:"isReversed",get:function(){return this._isReversed}},{key:"isPaused",get:function(){return this._isPaused}},{key:"play",value:function(){this._destroyed||(this.prop.reset&&1===this.progress&&(this._progress=0),this._isReversed=!1,this._isPaused=!1,this.isPlaying||(this._animationFrameLastTime=+new Date,this._animate()))}},{key:"reverse",value:function(){this._destroyed||(this.prop.reset&&0===this.progress&&(this._progress=1),this._isReversed=!0,this._isPaused=!1,this.isPlaying||(this._animationFrameLastTime=+new Date,this._animate()))}},{key:"pause",value:function(){this._destroyed||(this._isPaused=!0,this._animationFrame&&window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}},{key:"_animate",value:function(){if(!this._isPaused){var t=this.isReversed,e=+new Date,r=Math.abs(this._animationFrameLastTime-e);this._animationFrameLastTime=e;var n=r/this.prop.duration/(t?-1:1),o=et(this.progress+n,[0,1]);if(this.progress=o,1===o&&!t||0===o&&t)return this._isReversed=!1,this._isPaused=!1,void(this._animationFrame=void 0);this._animationFrame=window.requestAnimationFrame(this._animate.bind(this))}}},{key:"_handleProgress",value:function(){_e(me(i.prototype),"_handleProgress",this).call(this);var t=this._progress;0===t?this.callbacks.tbt("start",!1):1===t&&(this.callbacks.tbt("end",!1),this.prop.destroyOnEnd&&this.destroy())}},{key:"_destroy",value:function(){this.pause(),_e(me(i.prototype),"_destroy",this).call(this)}}])&&he(e.prototype,r),n&&he(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ae);function Pe(t){var e=t.container,r=void 0===e?window:e,n=t.top,o=void 0===n?0:n,i=t.left,s=void 0===i?0:i,c=t.duration,a=void 0===c?250:c;return new Promise((function(t,e){var n=Ft(r);if(n){var i=new Oe({duration:a});return i.addCallback("progress",(function(t){r&&r.scrollTo({top:n.scrollTop+(o-n.scrollTop)*t.easing,left:n.scrollLeft+(s-n.scrollLeft)*t.easing,behavior:"auto"})})),i.addCallback("end",(function(){t()})),void i.play()}e()}))}function ke(t){var e=t.container,r=void 0===e?window:e,n=t.el,o=t.top,i=void 0===o?0:o,s=t.left,c=void 0===s?0:s,a=t.duration,u=void 0===a?250:a;return new Promise((function(t,e){var o=Ft(r);if(o){var s=b(n);if(s){var a=s.getBoundingClientRect(),l=et(a.top+o.scrollTop-i,[0,1/0]),f=et(a.left+o.scrollLeft-c,[0,1/0]);Pe({container:r,top:l,left:f,duration:u}).then((function(){t()})).catch((function(){e()}))}}else e()}))}class je extends Error{constructor(t){super(t||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}}class Ee{static fn(t){return(...e)=>new Ee(((r,n,o)=>{e.push(o),t(...e).then(r,n)}))}constructor(t){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise(((e,r)=>{this._reject=r;const n=t=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(t)};Object.defineProperties(n,{shouldReject:{get:()=>this._rejectOnCancel,set:t=>{this._rejectOnCancel=t}}}),t((t=>{this._isCanceled&&n.shouldReject||(this._isPending=!1,e(t))}),(t=>{this._isPending=!1,r(t)}),n)}))}then(t,e){return this._promise.then(t,e)}catch(t){return this._promise.catch(t)}finally(t){return this._promise.finally(t)}cancel(t){if(this._isPending&&!this._isCanceled){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(const t of this._cancelHandlers)t()}catch(e){return void this._reject(e)}this._rejectOnCancel&&this._reject(new je(t))}}get isCanceled(){return this._isCanceled}}function Se(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Te(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Se(Object(r),!0).forEach((function(e){xe(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function xe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Object.setPrototypeOf(Ee.prototype,Promise.prototype);var Re=[];function Le(t,e){var r=Te(Te({},{crossOrigin:null,useCache:!1}),e),n="string"==typeof t?t:t.src;return new Ee((function(e,o){var i=r.useCache&&Re.find((function(t){return t.src===n}));if(i)e(i.image);else{if("string"==typeof t){var s=new Image;return s.crossOrigin=r.crossOrigin,s.onload=function(){r.useCache&&Re.push({src:n,image:s}),e(s)},s.onerror=function(){o()},void(s.src=t)}t instanceof HTMLImageElement&&(t.complete?e(t):(t.addEventListener("load",(function(){r.useCache&&Re.push({src:n,image:t}),e(t)})),t.addEventListener("error",(function(){o()}))))}}))}function De(t){return Object.keys(t).map((function(e){var r=t[e];return"".concat(r," ").concat(e,"w")})).join(", ")}function Ce(t){var e=window.vevetApp,r=t.original;t.thumb&&(r=t.thumb),e&&e.supportsWebp&&t.thumbWebp&&(r=t.thumbWebp);var n="";return e&&e.supportsWebp&&"sizesWebp"in t&&t.sizesWebp?n=De(t.sizesWebp):"sizes"in t&&t.sizes&&(n=De(t.sizes)),{src:r,srcSet:n}}var Me=/iPhone/i,We=/iPod/i,Ie=/iPad/i,Be=/\biOS-universal(?:.+)Mac\b/i,Ae=/\bAndroid(?:.+)Mobile\b/i,ze=/Android/i,Fe=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,He=/Silk/i,Ne=/Windows Phone/i,Ve=/\bWindows(?:.+)ARM\b/i,Xe=/BlackBerry/i,Qe=/BB10/i,Ue=/Opera Mini/i,$e=/\b(CriOS|Chrome)(?:.+)Mobile/i,Ye=/Mobile(?:.+)Firefox\b/i,qe=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};function Ke(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var r=e.userAgent,n=r.split("[FBAN");void 0!==n[1]&&(r=n[0]),void 0!==(n=r.split("Twitter"))[1]&&(r=n[0]);var o=function(t){return function(e){return e.test(t)}}(r),i={apple:{phone:o(Me)&&!o(Ne),ipod:o(We),tablet:!o(Me)&&(o(Ie)||qe(e))&&!o(Ne),universal:o(Be),device:(o(Me)||o(We)||o(Ie)||o(Be)||qe(e))&&!o(Ne)},amazon:{phone:o(Fe),tablet:!o(Fe)&&o(He),device:o(Fe)||o(He)},android:{phone:!o(Ne)&&o(Fe)||!o(Ne)&&o(Ae),tablet:!o(Ne)&&!o(Fe)&&!o(Ae)&&(o(He)||o(ze)),device:!o(Ne)&&(o(Fe)||o(He)||o(Ae)||o(ze))||o(/\bokhttp\b/i)},windows:{phone:o(Ne),tablet:o(Ve),device:o(Ne)||o(Ve)},other:{blackberry:o(Xe),blackberry10:o(Qe),opera:o(Ue),firefox:o(Ye),chrome:o($e),device:o(Xe)||o(Qe)||o(Ue)||o(Ye)||o($e)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var Je,Ge,Ze=function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},tr=function(t,e,r){this.name=t,this.version=e,this.os=r,this.type="browser"},er=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},rr=function(t,e,r,n){this.name=t,this.version=e,this.os=r,this.bot=n,this.type="bot-device"},nr=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},or=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},ir=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,sr=[["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",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],cr=[["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 ar(t){return t?lr(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new or:"undefined"!=typeof navigator?lr(navigator.userAgent):"undefined"!=typeof process&&process.version?new er(process.version.slice(1)):null}function ur(t){return""!==t&&sr.reduce((function(e,r){var n=r[0],o=r[1];if(e)return e;var i=o.exec(t);return!!i&&[n,i]}),!1)}function lr(t){var e=ur(t);if(!e)return null;var r=e[0],n=e[1];if("searchbot"===r)return new nr;var o=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);o?o.length<3&&(o=Ze(Ze([],o,!0),function(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}(3-o.length),!0)):o=[];var i=o.join("."),s=function(t){for(var e=0,r=cr.length;e<r;e++){var n=cr[e],o=n[0];if(n[1].exec(t))return o}return null}(t),c=ir.exec(t);return c&&c[1]?new rr(r,i,s,c[1]):new tr(r,i,s)}function fr(t){return fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fr(t)}function pr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function hr(){return hr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=dr(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},hr.apply(this,arguments)}function dr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=gr(t)););return t}function yr(t,e){return yr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},yr(t,e)}function vr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=gr(t);if(e){var o=gr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return br(this,r)}}function br(t,e){if(e&&("object"===fr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _r(t)}function _r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gr(t){return gr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},gr(t)}function mr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t.Desktop="desktop",t.Tablet="tablet",t.Phone="phone"}(Je||(Je={})),function(t){t.Landscape="landscape",t.Portrait="portrait"}(Ge||(Ge={}));var wr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yr(t,e)}(i,t);var e,r,n,o=vr(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),mr(_r(t=o.call(this,!1)),"_width",void 0),mr(_r(t),"_height",void 0),mr(_r(t),"_prevSize",void 0),mr(_r(t),"_isDesktop",void 0),mr(_r(t),"_isTablet",void 0),mr(_r(t),"_isPhone",void 0),mr(_r(t),"_resizeTimeout",void 0),t._width=0,t._height=0,t._prevSize={w:0,h:0},t._isDesktop=!1,t._isTablet=!1,t._isPhone=!1,t._init(),t}return e=i,r=[{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"vw",get:function(){return this.width/100}},{key:"vh",get:function(){return this.height/100}},{key:"prevSize",get:function(){return this._prevSize}},{key:"isLandscape",get:function(){return this.width>this.height}},{key:"isPortrait",get:function(){return this.width<this.height}},{key:"isDesktop",get:function(){return this._isDesktop}},{key:"isTablet",get:function(){return this._isTablet}},{key:"isPhone",get:function(){return this._isPhone}},{key:"dpr",get:function(){return void 0!==window.devicePixelRatio?window.devicePixelRatio:1}},{key:"lowerDesktopDPR",get:function(){return this._app.isDesktop?1:this.dpr}},{key:"_constructor",value:function(){hr(gr(i.prototype),"_constructor",this).call(this),this._setValues()}},{key:"_setEvents",value:function(){var t=this;window.addEventListener("resize",(function(){t._resizeTimeout&&t._resizeTimeout.clear(),t._resizeTimeout=p((function(){t._onResize()}),t._app.prop.viewportResizeTimeout)}))}},{key:"_setValues",value:function(){var t=this._app,e=t.html,r=t.prop;this._width=e.clientWidth,this._height=e.clientHeight,this._prevSize={w:this._width,h:this._height};var n=this.width;this._isDesktop=n>=r.tablet,this._isTablet=n<=r.tablet&&n>r.phone,this._isPhone=n<=r.phone,this._updateClasses(),this._updateCSSVars()}},{key:"_updateClasses",value:function(){var t=[Je.Desktop,Je.Tablet,Je.Phone];this.isDesktop?this._updateBreakpointClasses(Je.Desktop,t):this.isTablet?this._updateBreakpointClasses(Je.Tablet,t):this._updateBreakpointClasses(Je.Phone,t);var e=[Ge.Landscape,Ge.Portrait];this.isLandscape?this._updateBreakpointClasses(Ge.Landscape,e):this.isPortrait?this._updateBreakpointClasses(Ge.Portrait,e):this._updateBreakpointClasses("",e)}},{key:"_updateBreakpointClasses",value:function(t,e){var r=this._app.html,n=this._app.prefix;e.forEach((function(e){e===t?r.classList.add("".concat(n,"viewport-").concat(e)):r.classList.remove("".concat(n,"viewport-").concat(e))}))}},{key:"_updateCSSVars",value:function(){var t=this._app.html;t.style.setProperty("--vw","".concat(this.vw,"px")),t.style.setProperty("--vh","".concat(this.vh,"px"))}},{key:"_onResize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._prevSize.w,r=this._prevSize.h;this._setValues();var n=this.width,o=this.height,i={widthChanged:n!==e,heightChanged:o!==r,orientationChanged:n>o!=e>r};(t||n!==e&&o===r)&&this.tbt("w_",i),(t||o!==r&&n===e)&&this.tbt("h_",i),(t||n!==e&&o!==r)&&(this.tbt("wh",i),this.tbt("hw",i)),(t||n!==e)&&this.tbt("w",i),(t||o!==r)&&this.tbt("h",i),this.tbt("",i)}},{key:"forceResize",value:function(){this._onResize(!0)}}],r&&pr(e.prototype,r),n&&pr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(L);function Or(t){return Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Or(t)}function Pr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function kr(t,e){return kr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},kr(t,e)}function jr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Tr(t);if(e){var o=Tr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Er(this,r)}}function Er(t,e){if(e&&("object"===Or(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Sr(t)}function Sr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tr(t){return Tr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Tr(t)}var xr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kr(t,e)}(i,t);var e,r,n,o=jr(i);function i(){var t,e,r,n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t=o.call(this,!1),e=Sr(t),n=void 0,(r="_loaded")in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,t._loaded=!1,t._init(),t}return e=i,(r=[{key:"loaded",get:function(){return this._loaded}},{key:"_setEvents",value:function(){var t=this;"complete"===document.readyState?this._handleLoaded():window.addEventListener("load",(function(){t._handleLoaded()}))}},{key:"_handleLoaded",value:function(){var t=this._app,e=t.prefix;this._loaded=!0,t.html.classList.remove("".concat(e,"loading")),t.body.classList.remove("".concat(e,"loading")),t.html.classList.add("".concat(e,"loaded")),this.tbt("",!1)}},{key:"onLoaded",value:function(t){if(!this.loaded)return this.add("",t.bind(this));t()}}])&&Pr(e.prototype,r),n&&Pr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(L);function Rr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Lr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Rr(Object(r),!0).forEach((function(e){Mr(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Dr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Mr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Wr=function(){function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Dr(this,t),Mr(this,"_prop",void 0),Mr(this,"_prefix",void 0),Mr(this,"_isPhone",void 0),Mr(this,"_isTablet",void 0),Mr(this,"_isMobile",void 0),Mr(this,"_isDesktop",void 0),Mr(this,"_osName",void 0),Mr(this,"_browserName",void 0),Mr(this,"_supportsWebp",void 0),Mr(this,"_pages",[]),Mr(this,"_page",!1),Mr(this,"_pageLoad",void 0),Mr(this,"_viewport",void 0),window.vevetApp)throw new Error("Vevet Application already exists!");this._prop=Lr(Lr({},this.defaultProp),r),this._prefix=this.prop.prefix,this._sayHi(),window.vevetApp=this;var n=Ke();this._isPhone=n.phone,this.html.classList.toggle("".concat(this.prefix,"phone"),this._isPhone),this._isTablet=n.tablet,this.html.classList.toggle("".concat(this.prefix,"tablet"),this._isTablet),this._isMobile=n.phone||n.tablet,this.html.classList.toggle("".concat(this.prefix,"mobile"),this._isMobile),this._isDesktop=!this._isMobile,this.html.classList.toggle("".concat(this.prefix,"desktop"),this._isDesktop);var o=ar();if(null!=o&&o.os){var i=o.os.split(" ")[0].toLowerCase();this.html.classList.add("".concat(this.prefix,"os-").concat(i)),this._osName=i}else this._osName="";if(null!=o&&o.name){var s=o.name.toLowerCase();this.html.classList.add("".concat(this.prefix,"browser-").concat(s)),this._browserName=s}else this._browserName="";if(this._pageLoad=new xr,this._viewport=new wr,this.prop.webpSupport){var c=new Image;c.onload=function(){e._supportsWebp=1===c.width},c.onerror=function(){e._supportsWebp=!1},c.src="data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA="}else this._supportsWebp=!1}var e,r,n;return e=t,(r=[{key:"prop",get:function(){return this._prop}},{key:"defaultProp",get:function(){return{sayHi:!0,tablet:1199,phone:899,prefix:"v-",easing:[.25,.1,.25,1],viewportResizeTimeout:0,webpSupport:!1}}},{key:"prefix",get:function(){return this._prefix}},{key:"isPhone",get:function(){return this._isPhone}},{key:"isTablet",get:function(){return this._isTablet}},{key:"isMobile",get:function(){return this._isMobile}},{key:"isDesktop",get:function(){return this._isDesktop}},{key:"osName",get:function(){return this._osName}},{key:"browserName",get:function(){return this._browserName}},{key:"supportsWebp",get:function(){return this._supportsWebp}},{key:"doc",get:function(){return document}},{key:"html",get:function(){return document.documentElement}},{key:"body",get:function(){return document.body}},{key:"pages",get:function(){return this._pages}},{key:"page",get:function(){return this._page},set:function(t){this._page=t}},{key:"onPageCreated",value:function(){var t=this;return new Ee((function(e){t._page?t._page.onCreate().then((function(){e(t.page)})):setTimeout((function(){t.onPageCreated().then((function(){e(t.page)}))}),30)}))}},{key:"onPageShown",value:function(){var t=this;return new Ee((function(e){t.onPageCreated().then((function(){t._page&&t._page.onShow().then((function(){e(t.page)}))}))}))}},{key:"pageLoad",get:function(){return this._pageLoad}},{key:"onPageLoaded",value:function(){var t=this;return new Ee((function(e){t._pageLoad.onLoaded((function(){e()}))}))}},{key:"viewport",get:function(){return this._viewport}},{key:"_sayHi",value:function(){if(this.prop.sayHi){var t=["padding: 1rem 1.5rem;","background: #5F2580;","font: 1rem/1 Arial;","color: #ffffff;"].join("");console.log("%c%s",t,"Vevet")}}}])&&Cr(e.prototype,r),n&&Cr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ir(t){return Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ir(t)}function Br(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ar(){return Ar="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=zr(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ar.apply(this,arguments)}function zr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Xr(t)););return t}function Fr(t,e){return Fr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fr(t,e)}function Hr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xr(t);if(e){var o=Xr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Nr(this,r)}}function Nr(t,e){if(e&&("object"===Ir(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vr(t)}function Vr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xr(t){return Xr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Xr(t)}var Qr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fr(t,e)}(i,t);var e,r,n,o=Hr(i);function i(t){var e,r,n,s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t,!1),r=Vr(e),s=void 0,(n="_component")in r?Object.defineProperty(r,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[n]=s,e}return e=i,(r=[{key:"component",get:function(){return this._component}},{key:"init",value:function(){if(!this._component)throw new Error("Component is not set. Be sure that initlugin is called before.");Ar(Xr(i.prototype),"init",this).call(this)}},{key:"initPlugin",value:function(t){this._inited||(this._component=t,this.init())}}])&&Br(e.prototype,r),n&&Br(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(N);function Ur(t){return Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ur(t)}function $r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Yr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$r(Object(r),!0).forEach((function(e){on(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$r(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function qr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Jr(){return Jr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Gr(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Jr.apply(this,arguments)}function Gr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=nn(t)););return t}function Zr(t,e){return Zr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Zr(t,e)}function tn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=nn(t);if(e){var o=nn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return en(this,r)}}function en(t,e){if(e&&("object"===Ur(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return rn(t)}function rn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nn(t){return nn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},nn(t)}function on(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var sn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zr(t,e)}(i,t);var e,r,n,o=tn(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return qr(this,i),on(rn(e=o.call(this,t,!1)),"_blocked",void 0),on(rn(e),"_created",void 0),on(rn(e),"_shown",void 0),on(rn(e),"_hidden",void 0),on(rn(e),"_viaAJAX",void 0),e._blocked=!1,e._created=!1,e._shown=!1,e._hidden=!1,e._destroyed=!1,e._viaAJAX=!1,r&&e.init(),e}return e=i,r=[{key:"blocked",get:function(){return this._blocked}},{key:"created",get:function(){return this._created}},{key:"shown",get:function(){return this._shown}},{key:"hidden",get:function(){return this._hidden}},{key:"viaAJAX",get:function(){return this._viaAJAX}},{key:"pageClassName",get:function(){return"".concat(this._app.prefix,"page-").concat(this.prop.name)}},{key:"_getDefaultProp",value:function(){return Yr(Yr({},Jr(nn(i.prototype),"_getDefaultProp",this).call(this)),{},{name:"home"})}},{key:"create",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(r,n){t.canCreate().then((function(){t.created||t.blocked?n():(t._blocked=!0,t._shown=!1,t._hidden=!1,t._destroyed=!1,t._viaAJAX=e,t._app.page=t,t._app.html.classList.add(t.pageClassName),t._create().then((function(){t.callbacks.tbt("create",!1),t._blocked=!1,t._created=!0,r()})).catch((function(){n()})))})).catch((function(){n()}))}))}},{key:"_create",value:function(){return new Promise((function(t){t()}))}},{key:"canCreate",value:function(){var t=this;return new Promise((function(e,r){t.created?r():e()}))}},{key:"show",value:function(){var t=this;return new Promise((function(e,r){t.canShow().then((function(){t.shown||t.blocked?r():(t._blocked=!0,t._created=!0,t._hidden=!1,t._destroyed=!1,t._show().then((function(){t.callbacks.tbt("show",!1),t._blocked=!1,t._shown=!0,e()})).catch((function(){r()})))})).catch((function(){r()}))}))}},{key:"_show",value:function(){return new Promise((function(t){t()}))}},{key:"canShow",value:function(){var t=this;return new Promise((function(e,r){!t.created||t.shown?r():e()}))}},{key:"hide",value:function(){var t=this;return new Promise((function(e,r){t.canHide().then((function(){t.hidden||t.blocked?r():(t._blocked=!0,t._created=!0,t._shown=!1,t._destroyed=!1,t._hide().then((function(){t.callbacks.tbt("hide",!1),t._blocked=!1,t._hidden=!0,e()})).catch((function(){r()})))})).catch((function(){r()}))}))}},{key:"_hide",value:function(){return new Promise((function(t){t()}))}},{key:"canHide",value:function(){var t=this;return new Promise((function(e,r){t.created&&t.shown&&!t.hidden?e():r()}))}},{key:"destroy",value:function(){var t=this;return new Promise((function(e,r){t.canDestroy().then((function(){t.destroyed||t.blocked?r():(t._blocked=!0,t._created=!1,t._shown=!1,t._hidden=!0,t._app.page=!1,t._app.html.classList.remove(t.pageClassName),t._destroy().then((function(){t._blocked=!1,t._destroyed=!0,e()})).catch((function(){r()})))})).catch((function(){r()}))}))}},{key:"_destroy",value:function(){var t=this;return new Promise((function(e){Jr(nn(i.prototype),"_destroy",t).call(t),e()}))}},{key:"canDestroy",value:function(){var t=this;return new Promise((function(e,r){t.created&&t.hidden&&!t.destroyed?e():r()}))}},{key:"onCreate",value:function(){var t=this;return new Ee((function(e){t.created?e():t.addCallback("create",(function(){e()}),{once:!0})}))}},{key:"onShow",value:function(){var t=this;return new Ee((function(e){t.shown?e():t.addCallback("show",(function(){e()}),{once:!0})}))}},{key:"onHide",value:function(){var t=this;return new Ee((function(e){t.hidden?e():t.addCallback("hide",(function(){e()}),{once:!0})}))}}],r&&Kr(e.prototype,r),n&&Kr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt);function cn(t){return cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cn(t)}function an(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function un(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?an(Object(r),!0).forEach((function(e){gn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):an(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ln(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function pn(t,e){return pn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},pn(t,e)}function hn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=_n(t);if(e){var o=_n(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return dn(this,r)}}function dn(t,e){if(e&&("object"===cn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return yn(t)}function yn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vn(){return vn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=bn(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},vn.apply(this,arguments)}function bn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_n(t)););return t}function _n(t){return _n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_n(t)}function gn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var mn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pn(t,e)}(i,t);var e,r,n,o=hn(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return ln(this,i),gn(yn(e=o.call(this,t,!1)),"_wheelListener",void 0),gn(yn(e),"_lockWheel",void 0),gn(yn(e),"_lockWheelTimeout",void 0),e._wheelListener=void 0,e._lockWheel=!1,r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return un(un({},vn(_n(i.prototype),"_getDefaultProp",this).call(this)),{},{container:!1,enabled:!0,stopPropagation:!1,threshold:20})}},{key:"container",get:function(){return this.prop.container?this.prop.container:window}},{key:"_setEvents",value:function(){vn(_n(i.prototype),"_setEvents",this).call(this),this.container instanceof Window?this._toggleWheelEvent():(this._listeners.push(O(this.container,"mouseenter",this._handleMouseEnter.bind(this))),this._listeners.push(O(this.container,"mouseleave",this._handleMouseLeave.bind(this))))}},{key:"_onPropMutate",value:function(){vn(_n(i.prototype),"_onPropMutate",this).call(this),this._toggleWheelEvent()}},{key:"_handleMouseEnter",value:function(){this.prop.enabled&&this._createWheelEvent()}},{key:"_handleMouseLeave",value:function(){this._destroyWheelEvent()}},{key:"_toggleWheelEvent",value:function(){this.prop.enabled?this._createWheelEvent():this._destroyWheelEvent()}},{key:"_createWheelEvent",value:function(){this._wheelListener||(this._lockWheel=!1,this._lockWheelTimeout&&clearTimeout(this._lockWheelTimeout),this._wheelListener=O(this.container,"wheel",this._handleWheel.bind(this)))}},{key:"_destroyWheelEvent",value:function(){this._wheelListener&&(this._wheelListener.remove(),this._wheelListener=void 0)}},{key:"_handleWheel",value:function(t){var e=this;if(this._wheelListener){if(this.prop.stopPropagation&&(t.preventDefault(),t.stopPropagation()),this._lockWheel)return this._lockWheelTimeout&&clearTimeout(this._lockWheelTimeout),void(this._lockWheelTimeout=setTimeout((function(){e._lockWheel=!1}),300));var r=j()(t),n=this.prop.threshold,o=!1;r.pixelY>n?(this._callbacks.tbt("down",!1),o=!0):r.pixelY<-1*n&&(this._callbacks.tbt("up",!1),o=!0),r.pixelX>n?(this._callbacks.tbt("right",!1),o=!0):r.pixelX<-1*n&&(this._callbacks.tbt("left",!1),o=!0),o&&(this._lockWheel=!0)}}},{key:"_destroy",value:function(){vn(_n(i.prototype),"_destroy",this).call(this),this._destroyWheelEvent()}}])&&fn(e.prototype,r),n&&fn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(N);function wn(t){return wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wn(t)}function On(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Pn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?On(Object(r),!0).forEach((function(e){Cn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):On(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function En(t,e){return En=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},En(t,e)}function Sn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Dn(t);if(e){var o=Dn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tn(this,r)}}function Tn(t,e){if(e&&("object"===wn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return xn(t)}function xn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Rn(){return Rn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ln(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Rn.apply(this,arguments)}function Ln(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Dn(t)););return t}function Dn(t){return Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Dn(t)}function Cn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Mn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&En(t,e)}(i,t);var e,r,n,o=Sn(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(kn(this,i),Cn(xn(e=o.call(this,t,!1)),"_container",void 0),Cn(xn(e),"_startTime",void 0),Cn(xn(e),"_endTime",void 0),Cn(xn(e),"_toBeHidden",void 0),Cn(xn(e),"_isHidden",void 0),Cn(xn(e),"_pageLoadEvent",void 0),e.prop.container){var n=b(e.prop.container);n instanceof HTMLElement&&(e._container=n)}return e._container&&e._container.classList.add(e.prefix),e._startTime=+new Date,e._endTime=1/0,e._toBeHidden=!1,e._isHidden=!1,r&&e.init(),e}return e=i,r=[{key:"_getDefaultProp",value:function(){return Pn(Pn({},Rn(Dn(i.prototype),"_getDefaultProp",this).call(this)),{},{container:"#".concat(this.prefix),hide:250})}},{key:"prefix",get:function(){return"".concat(this._app.prefix,"preloader")}},{key:"container",get:function(){return this._container}},{key:"startTime",get:function(){return this._startTime}},{key:"endTime",get:function(){return this._endTime}},{key:"totalTime",get:function(){return this._endTime-this._startTime}},{key:"isHidden",get:function(){return this._isHidden}},{key:"_setEvents",value:function(){var t=this;Rn(Dn(i.prototype),"_setEvents",this).call(this),this._onLoaded().then((function(){t._endTime=+new Date,t._handleLoaded()}))}},{key:"_onLoaded",value:function(){var t=this;return new Ee((function(e){t._app.pageLoad.loaded?e():t._pageLoadEvent=t._app.pageLoad.add("",(function(){e()}))}))}},{key:"_handleLoaded",value:function(){this.callbacks.tbt("loaded",!1),"boolean"!=typeof this.prop.hide&&this.hideContainer()}},{key:"hideContainer",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"boolean"!=typeof this.prop.hide?this.prop.hide:250;return this.callbacks.tbt("hide",!1),this._toBeHidden=!0,new Ee((function(r){var n=t._container;if(!n)return t._handleHidden(),void r();n.style.transition="opacity ".concat(e,"ms, visibility ").concat(e,"ms"),n.style.opacity="0",n.style.visibility="hidden",p((function(){n.style.display="none",t._handleHidden(),r()}),e)}))}},{key:"_handleHidden",value:function(){this._isHidden=!0,this.callbacks.tbt("hidden",!1)}},{key:"onHide",value:function(t){if(!this._toBeHidden)return this.callbacks.add("hide",(function(){t()}));t()}},{key:"onHidden",value:function(t){if(!this._isHidden)return this.callbacks.add("hidden",(function(){t()}));t()}},{key:"_destroy",value:function(){var t;Rn(Dn(i.prototype),"_destroy",this).call(this),null===(t=this._pageLoadEvent)||void 0===t||t.remove()}}],r&&jn(e.prototype,r),n&&jn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt);function Wn(t){return Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(t)}function In(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?In(Object(r),!0).forEach((function(e){$n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):In(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function An(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Fn(t,e){return Fn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fn(t,e)}function Hn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Un(t);if(e){var o=Un(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Nn(this,r)}}function Nn(t,e){if(e&&("object"===Wn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vn(t)}function Vn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xn(){return Xn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Qn(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Xn.apply(this,arguments)}function Qn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Un(t)););return t}function Un(t){return Un=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Un(t)}function $n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Yn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fn(t,e)}(i,t);var e,r,n,o=Hn(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return An(this,i),$n(Vn(e=o.call(this,t,!1)),"_imgs",void 0),$n(Vn(e),"_videos",void 0),$n(Vn(e),"_customResources",void 0),$n(Vn(e),"_resourcesTotal",void 0),$n(Vn(e),"_resourcesLoaded",void 0),$n(Vn(e),"_progress",void 0),$n(Vn(e),"_animationFrame",void 0),$n(Vn(e),"_endTimeline",void 0),e._imgs=[],e._videos=[],e._customResources=[],e._resourcesTotal=1+e.prop.resources,e._resourcesLoaded=0,e._progress=0,r&&e.init(),e}return e=i,r=[{key:"_getDefaultProp",value:function(){return Bn(Bn({},Xn(Un(i.prototype),"_getDefaultProp",this).call(this)),{},{resources:0,loaders:{img:!0,video:!0,custom:".js-preload",ignoreClassName:"js-preload-ignore"},calc:{lerp:.1,forceEnd:500}})}},{key:"imgs",get:function(){return this._imgs}},{key:"videos",get:function(){return this._videos}},{key:"customResources",get:function(){return this._customResources}},{key:"resourcesTotal",get:function(){return this._resourcesTotal}},{key:"resourcesLoaded",get:function(){return this._resourcesLoaded}},{key:"loadProgress",get:function(){return this.resourcesLoaded/this.resourcesTotal}},{key:"progress",get:function(){return this._progress},set:function(t){this._progress=t,this._handleProgress()}},{key:"_constructor",value:function(){Xn(Un(i.prototype),"_constructor",this).call(this),this._getResources()}},{key:"_setEvents",value:function(){var t=this;Xn(Un(i.prototype),"_setEvents",this).call(this);var e=this.prop.calc.lerp;"number"==typeof e&&(this._animationFrame=new wt,this._animationFrame.addCallback("frame",(function(){t.progress=rt(t.progress,t.loadProgress,e)})),this._animationFrame.play()),this._preloadResources(),this._app.onPageLoaded().then((function(){t._handleLoadedResource()}))}},{key:"_onLoaded",value:function(){var t=this;return new Ee((function(e){var r=!1;t.callbacks.add("progress",(function(t){t.progress>=1&&!r&&(e(),r=!0)}),{protected:!0})}))}},{key:"_getResources",value:function(){var t=this,e=this.prop.loaders;e.img&&_("img").forEach((function(r){r.classList.contains(e.ignoreClassName)||(t._imgs.push(r),t._resourcesTotal+=1)})),e.video&&_("video").forEach((function(r){r.classList.contains(e.ignoreClassName)||(t._videos.push(r),t._resourcesTotal+=1)})),e.custom&&(Array.from(_(e.custom)).forEach((function(e){var r=parseInt(e.getAttribute("data-load-count")||"1",10);r=Number.isNaN(r)?1:et(r,[1,1/0]);for(var n=1;n<=r;n+=1){var o=n/r;t._customResources.push({el:e,targetProgress:o})}})),this._resourcesTotal+=this._customResources.length)}},{key:"_preloadResources",value:function(){var t=this;0===this._resourcesTotal&&(this._resourcesTotal=1,this._handleLoadedResource()),this._imgs.forEach((function(e){if(e.complete)t._handleLoadedResource();else{var r=new Image;e.addEventListener("load",(function(){t._handleLoadedResource()})),e.addEventListener("error",(function(){t._handleLoadedResource()})),r.src=e.currentSrc||e.src}})),this._videos.forEach((function(e){if(e.readyState>0)t._handleLoadedResource();else{if("none"===e.preload)return void t._handleLoadedResource();e.addEventListener("error",(function(){t._handleLoadedResource()})),e.addEventListener("loadedmetadata",(function(){t._handleLoadedResource()}))}})),this._customResources.forEach((function(e){t._seekCustomResourceLoaded(e).then((function(){t._handleLoadedResource()}))}))}},{key:"_seekCustomResourceLoaded",value:function(t){var e=this;return new Promise((function(r){var n=t.el,o=t.targetProgress,i=0;if(void 0!==n.isComplete?"boolean"==typeof n.isComplete?n.isComplete&&(i=o):"number"==typeof n.isComplete&&(i=n.isComplete):void 0!==n.isLoaded&&("boolean"==typeof n.isLoaded?n.isLoaded&&(i=o):"number"==typeof n.isLoaded&&(i=n.isLoaded)),0===i){var s=n.getAttribute("data-is-loaded");if(null!==s&&""!==s){var c=parseFloat(s);i=Number.isNaN(c)?o:c}}i>=o?r():setTimeout((function(){e.destroyed||e._seekCustomResourceLoaded(t).then((function(){r()}))}),50)}))}},{key:"addResourcesLoaded",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=0;e<t;e+=1)this._handleLoadedResource()}},{key:"addResourcesTotal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this._resourcesTotal+=t}},{key:"_handleLoadedResource",value:function(){this.loadProgress>=1||(this._resourcesLoaded+=1,this.callbacks.tbt("resourceLoad",!1),this._animationFrame||(this.progress=this.loadProgress))}},{key:"_handleProgress",value:function(){var t=this;if(this.callbacks.tbt("progress",{progress:this._progress}),this.progress>=1)this._animationFrame&&(this._animationFrame.destroy(),this._animationFrame=void 0);else if("number"==typeof this.prop.calc.forceEnd&&this.loadProgress>=1&&!this._endTimeline){this._animationFrame&&(this._animationFrame.destroy(),this._animationFrame=void 0),this._endTimeline=new Oe({duration:this.prop.calc.forceEnd});var e=this.progress;this._endTimeline.addCallback("progress",(function(r){var n=1-e;t.progress=e+n*r.progress})),this._endTimeline.play()}}},{key:"_destroy",value:function(){Xn(Un(i.prototype),"_destroy",this).call(this),this._animationFrame&&this._animationFrame.destroy()}}],r&&zn(e.prototype,r),n&&zn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Mn);function qn(t){return qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qn(t)}function Kn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Jn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Kn(Object(r),!0).forEach((function(e){co(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function to(t,e){return to=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},to(t,e)}function eo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=so(t);if(e){var o=so(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ro(this,r)}}function ro(t,e){if(e&&("object"===qn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return no(t)}function no(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oo(){return oo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=io(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},oo.apply(this,arguments)}function io(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=so(t)););return t}function so(t){return so=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},so(t)}function co(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ao=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&to(t,e)}(i,t);var e,r,n,o=eo(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(Gn(this,i),co(no(e=o.call(this,t,!1)),"_container",void 0),co(no(e),"_runtimeEvents",void 0),co(no(e),"_isDragging",void 0),co(no(e),"_pointerID",void 0),co(no(e),"_coords",void 0),co(no(e),"_prevCoords",void 0),co(no(e),"_startCoords",void 0),e._container=b(e.prop.container),!y(e._container)&&!v(e._container))throw new Error("No container");return e._runtimeEvents=[],e._isDragging=!1,e._pointerID=null,e._coords={x:0,y:0},e._prevCoords={x:0,y:0},e._startCoords={x:0,y:0},r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return Jn(Jn({},oo(so(i.prototype),"_getDefaultProp",this).call(this)),{},{container:"#".concat(this.prefix),usePassive:!1,enabled:!0})}},{key:"prefix",get:function(){return"".concat(this._app.prefix,"dragger")}},{key:"container",get:function(){return this._container}},{key:"isDragging",get:function(){return this._isDragging}},{key:"coords",get:function(){return this._coords}},{key:"startCoords",get:function(){return this._startCoords}},{key:"_setEvents",value:function(){var t=this.container,e=this.prop.usePassive;this.addEventListeners(t,"mousedown",this._handleStart.bind(this),{passive:e}),this.addEventListeners(t,"touchstart",this._handleStart.bind(this),{passive:e})}},{key:"_addRuntimeEvents",value:function(){var t=this.prop.usePassive;this._runtimeEvents.push(O(window,"mouseup",this._handleEnd.bind(this),{passive:t})),this._runtimeEvents.push(O(window,"touchend",this._handleEnd.bind(this),{passive:t})),this._runtimeEvents.push(O(window,"touchcancel",this.cancel.bind(this),{passive:t})),this._runtimeEvents.push(O(window,"blur",this.cancel.bind(this),{passive:t}))}},{key:"_removeRuntimeEvents",value:function(){this._runtimeEvents.forEach((function(t){t.remove()})),this._runtimeEvents=[]}},{key:"_normalizeEvent",value:function(t){if(t.type.includes("touch")){var e=t,r=e.targetTouches[0]||e.changedTouches[0];return{x:r.clientX,y:r.clientY,id:r.identifier}}var n=t;return{x:n.clientX,y:n.clientY,id:null}}},{key:"_handleStart",value:function(t){if(!this.prop.enabled)return!1;if(this.isDragging)return!1;var e=this._normalizeEvent(t);if("mousedown"===t.type){if(1!==t.which)return!1;t.stopPropagation()}return this._isDragging=!0,this._pointerID=e.id,this._coords={x:e.x,y:e.y},this._prevCoords={x:e.x,y:e.y},this._startCoords={x:e.x,y:e.y},this._addRuntimeEvents(),this.callbacks.tbt("start",{evt:t}),!0}},{key:"_handleEnd",value:function(t){var e=this._normalizeEvent(t);return!(!this.isDragging||e.id!==this._pointerID||(this.cancel(),0))}},{key:"cancel",value:function(){this._removeRuntimeEvents(),this._isDragging=!1,this.callbacks.tbt("end",!1)}},{key:"_destroy",value:function(){oo(so(i.prototype),"_destroy",this).call(this),this._removeRuntimeEvents()}}])&&Zn(e.prototype,r),n&&Zn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt);function uo(t){return uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uo(t)}function lo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function po(){return po="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ho(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},po.apply(this,arguments)}function ho(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_o(t)););return t}function yo(t,e){return yo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},yo(t,e)}function vo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=_o(t);if(e){var o=_o(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bo(this,r)}}function bo(t,e){if(e&&("object"===uo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _o(t){return _o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_o(t)}var go=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yo(t,e)}(i,t);var e,r,n,o=vo(i);function i(){return lo(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"stepCoords",get:function(){return{x:this._coords.x-this._prevCoords.x,y:this._coords.y-this._prevCoords.y}}},{key:"_addRuntimeEvents",value:function(){po(_o(i.prototype),"_addRuntimeEvents",this).call(this);var t=this.prop.usePassive;this._runtimeEvents.push(O(window,"mousemove",this._handleMove.bind(this),{passive:t})),this._runtimeEvents.push(O(window,"touchmove",this._handleMove.bind(this),{passive:t}))}},{key:"_handleMove",value:function(t){var e=this._normalizeEvent(t);return!(!this.isDragging||e.id!==this._pointerID||(this._prevCoords={x:this._coords.x,y:this._coords.y},this._coords={x:e.x,y:e.y},this.callbacks.tbt("move",{evt:t,start:this.startCoords,coords:this.coords,step:this.stepCoords}),0))}},{key:"_destroy",value:function(){po(_o(i.prototype),"_destroy",this).call(this)}}])&&fo(e.prototype,r),n&&fo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ao);function mo(t){return mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mo(t)}function wo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Oo(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wo(Object(r),!0).forEach((function(e){Po(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wo(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Po(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ko(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Eo(){return Eo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=So(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Eo.apply(this,arguments)}function So(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Lo(t)););return t}function To(t,e){return To=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},To(t,e)}function xo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Lo(t);if(e){var o=Lo(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ro(this,r)}}function Ro(t,e){if(e&&("object"===mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Lo(t){return Lo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Lo(t)}var Do=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&To(t,e)}(i,t);var e,r,n,o=xo(i);function i(){return ko(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"_getDefaultProp",value:function(){return Oo(Oo({},Eo(Lo(i.prototype),"_getDefaultProp",this).call(this)),{},{min:75})}},{key:"_handleEnd",value:function(t){var e=Eo(Lo(i.prototype),"_handleEnd",this).call(this,t);if(!e)return e;var r=this._normalizeEvent(t),n=this.startCoords,o=Math.abs(this.prop.min);return n.y>r.y&&Math.abs(r.y-n.y)>=o&&this.callbacks.tbt("up",!1),n.y<r.y&&Math.abs(r.y-n.y)>=o&&this.callbacks.tbt("down",!1),n.x>r.x&&Math.abs(r.x-n.x)>=o&&this.callbacks.tbt("left",!1),n.x<r.x&&Math.abs(r.x-n.x)>=o&&this.callbacks.tbt("right",!1),!0}}])&&jo(e.prototype,r),n&&jo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ao);function Co(t){return Co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Co(t)}function Mo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Wo(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Mo(Object(r),!0).forEach((function(e){Qo(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mo(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Io(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ao(){return Ao="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=zo(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ao.apply(this,arguments)}function zo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Xo(t)););return t}function Fo(t,e){return Fo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fo(t,e)}function Ho(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xo(t);if(e){var o=Xo(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return No(this,r)}}function No(t,e){if(e&&("object"===Co(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vo(t)}function Vo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xo(t){return Xo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Xo(t)}function Qo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Uo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fo(t,e)}(i,t);var e,r,n,o=Ho(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Io(this,i),Qo(Vo(e=o.call(this,t,!1)),"_canvas",void 0),Qo(Vo(e),"_ctx",void 0),Qo(Vo(e),"_width",void 0),Qo(Vo(e),"_height",void 0),Qo(Vo(e),"_dpr",void 0),e._width=0,e._height=0,e._dpr=1;var n=e.prop,s=n.append,c=n.container,a=s&&c?c:void 0;return e._canvas=m("canvas",{parent:a}),e._ctx=e._canvas.getContext("2d"),e.prop.initialResize&&e.resize(),r&&e.init(),e}return e=i,(r=[{key:"container",get:function(){return this.prop.container}},{key:"canvas",get:function(){return this._canvas}},{key:"ctx",get:function(){return this._ctx}},{key:"width",get:function(){return this._width}},{key:"nonDPRWidth",get:function(){return this.width/this.dpr}},{key:"clientWidth",get:function(){return this.width/this.dpr}},{key:"height",get:function(){return this._height}},{key:"nonDPRHeight",get:function(){return this.height/this.dpr}},{key:"clientHeight",get:function(){return this.height/this.dpr}},{key:"dpr",get:function(){return this._dpr}},{key:"canRender",get:function(){return this.width>0&&this.height>0}},{key:"_getDefaultProp",value:function(){return Wo(Wo({},Ao(Xo(i.prototype),"_getDefaultProp",this).call(this)),{},{container:!1,append:!0,updateOnResize:!1,initialResize:!0,resizeTimeout:0,width:!1,height:!1,dpr:!1})}},{key:"_setEvents",value:function(){var t=this;if(Ao(Xo(i.prototype),"_setEvents",this).call(this),!1!==this.prop.updateOnResize){var e="boolean"==typeof this.prop.updateOnResize?"":this.prop.updateOnResize;this.addViewportCallback(e,(function(){t.resize()}),{timeout:this.prop.resizeTimeout}),this.resize()}}},{key:"_onPropMutate",value:function(){Ao(Xo(i.prototype),"_onPropMutate",this).call(this),this.resize()}},{key:"resize",value:function(){var t=this.prop,e=this.canvas;if(e){var r=this._app.viewport;"number"==typeof t.dpr?this._dpr=t.dpr:this._dpr=r.dpr;var n=this._dpr,o=0,i=0;"number"==typeof t.width&&"number"==typeof t.height?(o=t.width,i=t.height):this.container?(o=this.container.clientWidth,i=this.container.clientHeight):(o=r.width,i=r.height),o*=n,i*=n,this._width=o,this._height=i,e.width=o,e.height=i,this.callbacks.tbt("resize",!1)}}},{key:"_destroy",value:function(){Ao(Xo(i.prototype),"_destroy",this).call(this),this.canvas&&this.canvas.remove()}}])&&Bo(e.prototype,r),n&&Bo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt);function $o(t){const e=function(t){if("container"in t)return{width:t.container.clientWidth,height:t.container.clientHeight};return{width:t.width,height:t.height}}(t),r=function(t){const{source:e}=t;if(t.sourceWidth&&t.sourceHeight)return{width:t.sourceWidth,height:t.sourceHeight};if(e instanceof HTMLVideoElement)return{width:e.videoWidth,height:e.videoHeight};if(e instanceof HTMLImageElement)return{width:e.naturalWidth,height:e.naturalHeight};return{width:e.width,height:e.height}}(t);let n;return"cover"===t.rule?n=function(t,e,r){let n=e.width*Yo(t),o=r.height*n/r.width;o/Yo(t)<e.height&&(o=e.height*Yo(t),n=r.width*o/r.height);const i=(e.width-n)/2,s=(e.height-o)/2;return{width:n,height:o,x:i,y:s}}(t,e,r):"contain"===t.rule?n=function(t,e,r){let n=0,o=0;const i=r.width/r.height;e.width>e.height?(o=e.height,n=o*i,n>e.width&&(n=e.width,o=n/i)):e.height>=e.width&&(n=e.width,o=n/i,o>e.height&&(o=e.height,n=o*i));n*=Yo(t),o*=Yo(t);const s=(e.width-n)/2,c=(e.height-o)/2;return{width:n,height:o,x:s,y:c}}(t,e,r):"top-left"===t.rule?n=function(t,e){const r=e.width*Yo(t),n=e.height*Yo(t);return{width:r,height:n,x:0,y:0}}(t,r):"top-right"===t.rule?n=function(t,e,r){const n=r.width*Yo(t),o=r.height*Yo(t),i=e.width-r.width;return{width:n,height:o,x:i,y:0}}(t,e,r):"bottom-left"===t.rule?n=function(t,e,r){const n=r.width*Yo(t),o=r.height*Yo(t),i=e.height-r.height;return{width:n,height:o,x:0,y:i}}(t,e,r):"bottom-right"===t.rule?n=function(t,e,r){const n=r.width*Yo(t),o=r.height*Yo(t),i=e.width-r.width,s=e.height-r.height;return{width:n,height:o,x:i,y:s}}(t,e,r):"center"===t.rule&&(n=function(t,e,r){const n=r.width*Yo(t),o=r.height*Yo(t),i=(e.width-r.width)/2,s=(e.height-r.height)/2;return{width:n,height:o,x:i,y:s}}(t,e,r)),Object.assign(n,{sourceWidth:r.width,sourceHeight:r.height})}function Yo(t){return void 0!==t.scale?t.scale:1}function qo(t){return qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qo(t)}function Ko(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Jo(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ko(Object(r),!0).forEach((function(e){Go(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ko(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Go(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ti(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ei(){return ei="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ri(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ei.apply(this,arguments)}function ri(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=si(t)););return t}function ni(t,e){return ni=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ni(t,e)}function oi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=si(t);if(e){var o=si(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ii(this,r)}}function ii(t,e){if(e&&("object"===qo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function si(t){return si=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},si(t)}var ci=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ni(t,e)}(i,t);var e,r,n,o=oi(i);function i(){return Zo(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"_getDefaultProp",value:function(){return Jo(Jo({},ei(si(i.prototype),"_getDefaultProp",this).call(this)),{},{media:!1,posRule:"cover"})}},{key:"resize",value:function(){ei(si(i.prototype),"resize",this).call(this),this._prerender()}},{key:"_prerender",value:function(){if(0!==this.width&&0!==this.height){var t=this.prop.media;if(t){var e,r,n;t instanceof Uo?(e=t.canvas,r=t.width,n=t.height):e=t;var o=$o({source:e,sourceWidth:r,sourceHeight:n,rule:this.prop.posRule,scale:1,width:this.width,height:this.height});this._ctx.clearRect(0,0,this.width,this.height),this._ctx.drawImage(e,o.x,o.y,o.width,o.height),this.callbacks.tbt("prerender",!1)}}}}])&&ti(e.prototype,r),n&&ti(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Uo);function ai(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ui(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var li=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ui(this,"_prop",void 0),ui(this,"_outer",void 0),ui(this,"_thumb",void 0),ui(this,"_outerHeight",void 0),ui(this,"_outerWidth",void 0),ui(this,"_thumbHeight",void 0),ui(this,"_thumbWidth",void 0),ui(this,"_scrollVal",void 0),ui(this,"_coordsAtDragStart",void 0),ui(this,"_listeners",void 0),ui(this,"_scrollEvent",void 0),ui(this,"_actionTimeout",void 0),ui(this,"_dragger",void 0),this._prop=e;var r=e.prefix,n=e.dir,o=e.domParent,i=e.container,s=e.autoHide;this._outerHeight=0,this._outerWidth=0,this._thumbHeight=0,this._thumbWidth=0,this._scrollVal=0,this._coordsAtDragStart={left:0,top:0},this._scrollEvent=void 0,this._actionTimeout=void 0,this._dragger=void 0;var c="".concat(r," ").concat(r,"_").concat(n);i instanceof Window&&(c+=" in-window"),this._outer=m("div",{parent:o,class:c}),this._thumb=m("div",{parent:this._outer,class:"".concat(r,"__thumb ").concat(r,"__thumb_").concat(n)}),s&&this.outer.classList.add("auto-hide"),this._listeners=[],this._setEvents()}var e,r,n;return e=t,(r=[{key:"outer",get:function(){return this._outer}},{key:"thumb",get:function(){return this._thumb}},{key:"prefix",get:function(){return this._prop.prefix}},{key:"isX",get:function(){return"x"===this.prop.dir}},{key:"isY",get:function(){return!this.isX}},{key:"scrollElement",get:function(){return this.prop.container instanceof Window?document.documentElement:this.prop.container}},{key:"scrollLine",get:function(){var t=this.scrollElement;return this.isX?t.scrollWidth-t.clientWidth:t.scrollHeight-t.clientHeight}},{key:"scrollWidth",get:function(){return this.scrollElement.scrollWidth}},{key:"scrollHeight",get:function(){return this.scrollElement.scrollHeight}},{key:"prop",get:function(){return this._prop}},{key:"scrollValues",get:function(){var t=this.prop.container,e=0,r=0;return t instanceof Window?(e=t.pageYOffset,r=t.pageXOffset):t instanceof It?(e=t.targetTop,r=t.targetLeft):(e=t.scrollTop,r=t.scrollLeft),{left:r,top:e}}},{key:"_setEvents",value:function(){var t=this;this._listeners.push(O(this.outer,"mouseenter",this._handleHover.bind(this,!0))),this._listeners.push(O(this.outer,"mouseleave",this._handleHover.bind(this,!1))),this._scrollEvent=At({container:this.prop.container,callback:function(e){t._handleScroll(e)}}),this.prop.isDraggable&&(this._dragger=new go({container:this.thumb}),this._dragger.addCallback("start",(function(){t.thumb.classList.add("in-action"),t._disableScrollBehaviour(!0),t._coordsAtDragStart=t.scrollValues})),this._dragger.addCallback("move",(function(e){t._handleThumbDrag(e)})),this._dragger.addCallback("end",(function(){t.thumb.classList.remove("in-action"),t._disableScrollBehaviour(!1)})))}},{key:"_disableScrollBehaviour",value:function(t){var e=t?"auto":"unset";(this.prop.container instanceof Window||this.prop.container instanceof HTMLElement)&&(document.documentElement.style.scrollBehavior=e)}},{key:"_handleHover",value:function(t){this.outer.classList.toggle("is-hovered",t)}},{key:"_handleScroll",value:function(t){var e=this;this.prop.optimizeCalculations||this.resize();var r=!1;this.isX?(r=t.scrollLeft!==this._scrollVal,this._scrollVal=t.scrollLeft):(r=t.scrollTop!==this._scrollVal,this._scrollVal=t.scrollTop),r&&(this.prop.autoHide&&r&&(this.outer.classList.add("in-action"),this._actionTimeout&&(clearTimeout(this._actionTimeout),this._actionTimeout=void 0),this._actionTimeout=setTimeout((function(){e.outer.classList.remove("in-action")}),500)),this.prop.optimizeCalculations&&this._renderThumb())}},{key:"_handleThumbDrag",value:function(t){t.evt.preventDefault();var e=this.prop.container,r=(t.coords.x-t.start.x)/(this._outerWidth-this._thumbWidth)*this.scrollLine,n=(t.coords.y-t.start.y)/(this._outerHeight-this._thumbHeight)*this.scrollLine,o=this._coordsAtDragStart,i=o.left,s=o.top;this.isX?i+=r:s+=n,e.scrollTo({top:s,left:i,behavior:e instanceof It?this.prop.draggableScrollBehavior:"auto"})}},{key:"_renderThumb",value:function(){var t=et(this._scrollVal/this.scrollLine,[0,1]),e=this.isX?(this._outerWidth-this._thumbWidth)*t:0,r=this.isY?(this._outerHeight-this._thumbHeight)*t:0;this._thumb.style.transform="translate(".concat(e,"px, ").concat(r,"px)")}},{key:"resize",value:function(){var t=this.outer,e=this.thumb,r=this.scrollLine,n=this.prop.minSize;if(this._outerHeight=t.clientHeight,this._outerWidth=t.clientWidth,this.prop.autoSize)if(this.isX){var o=et(this._outerWidth/(this.scrollWidth/(this.scrollWidth-r)),[n,1/0]);e.style.width="".concat(o,"px")}else{var i=et(this._outerHeight/(this.scrollHeight/(this.scrollHeight-r)),[n,1/0]);e.style.height="".concat(i,"px")}this._thumbHeight=e.clientHeight,this._thumbWidth=e.clientWidth,t.classList.toggle("is-empty",0===r),this._renderThumb()}},{key:"destroy",value:function(){this._listeners.forEach((function(t){t.remove()})),this._scrollEvent&&this._scrollEvent.remove(),this._actionTimeout&&clearTimeout(this._actionTimeout),this._dragger&&this._dragger.destroy(),this._outer.remove()}}])&&ai(e.prototype,r),n&&ai(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function fi(t){return fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(t)}function pi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function hi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pi(Object(r),!0).forEach((function(e){Pi(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pi(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function di(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vi(t,e){return vi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},vi(t,e)}function bi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Oi(t);if(e){var o=Oi(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _i(this,r)}}function _i(t,e){if(e&&("object"===fi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return gi(t)}function gi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mi(){return mi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=wi(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},mi.apply(this,arguments)}function wi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Oi(t)););return t}function Oi(t){return Oi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Oi(t)}function Pi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ki=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vi(t,e)}(i,t);var e,r,n,o=bi(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];di(this,i),Pi(gi(e=o.call(this,t,!1)),"_container",void 0),Pi(gi(e),"_scrollWrapper",void 0),Pi(gi(e),"_xBar",void 0),Pi(gi(e),"_yBar",void 0);var n=e.prop,s=n.autoHide,c=n.autoSize,a=n.minSize,u=n.optimizeCalculations,l=n.isDraggable,f=n.draggableScrollBehavior;if("string"==typeof e.prop.container){var p=b(e.prop.container);if(!p)throw new Error("No scroll container");e._container=p}else e._container=e.prop.container;if(e.container instanceof Element){var h=e.container.parentElement;h&&(e._scrollWrapper=m("div"),e._scrollWrapper.style.position="relative",e._scrollWrapper.style.display="inline-block",h.insertBefore(e._scrollWrapper,e.container),e._scrollWrapper.appendChild(e.container),e._scrollWrapper.classList.add("".concat(e.prefix,"-wrapper")))}var d={container:e.container,domParent:e.domParent,autoHide:s,autoSize:c,minSize:a,optimizeCalculations:u,prefix:e.prefix,isDraggable:l,draggableScrollBehavior:f};return e._xBar=new li(hi({dir:"x"},d)),e._yBar=new li(hi({dir:"y"},d)),e.scrollableElement.classList.add("".concat(e.prefix,"-parent")),r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return hi(hi({},mi(Oi(i.prototype),"_getDefaultProp",this).call(this)),{},{container:window,domParent:!1,draggable:!0,autoSize:!0,autoHide:!0,minSize:50,optimizeCalculations:!1,resizeTimeout:0,isDraggable:!0,draggableScrollBehavior:"smooth"})}},{key:"prefix",get:function(){return"".concat(this._app.prefix,"scrollbar")}},{key:"container",get:function(){return this._container}},{key:"scrollableElement",get:function(){var t=this.container;return t instanceof Window?this._app.body:t instanceof Element?t:t.outer}},{key:"domParent",get:function(){var t=this.prop.domParent,e=this.container;return t||(this._scrollWrapper?this._scrollWrapper:e instanceof Window?this._app.body:e instanceof Element?e:e.outer)}},{key:"_setEvents",value:function(){var t=this;mi(Oi(i.prototype),"_setEvents",this).call(this);var e=this.container;e instanceof It?e.addCallback("resize",(function(){t.resize()}),{name:this.name}):this.addViewportCallback("",(function(){t.resize()}),{timeout:this.prop.resizeTimeout}),this.resize()}},{key:"_onPropMutate",value:function(){mi(Oi(i.prototype),"_onPropMutate",this).call(this),this.resize()}},{key:"resize",value:function(){this._xBar.resize(),this._yBar.resize()}},{key:"_destroy",value:function(){if(mi(Oi(i.prototype),"_destroy",this).call(this),this._xBar.destroy(),this._yBar.destroy(),this._scrollWrapper&&this.container instanceof Element){var t=this._scrollWrapper.parentElement;t&&t.insertBefore(this.container,this._scrollWrapper),this._scrollWrapper.remove()}this.scrollableElement.classList.remove("".concat(this.prefix,"-parent"))}}])&&yi(e.prototype,r),n&&yi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt);function ji(t){return ji="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ji(t)}function Ei(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Si(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ei(Object(r),!0).forEach((function(e){Bi(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ei(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ti(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ri(t,e){return Ri=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ri(t,e)}function Li(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ii(t);if(e){var o=Ii(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Di(this,r)}}function Di(t,e){if(e&&("object"===ji(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ci(t)}function Ci(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Mi(){return Mi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Wi(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Mi.apply(this,arguments)}function Wi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ii(t)););return t}function Ii(t){return Ii=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ii(t)}function Bi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ai=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ri(t,e)}(i,t);var e,r,n,o=Li(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Ti(this,i),Bi(Ci(e=o.call(this,t,!1)),"_scrollContainer",void 0),"string"==typeof e.prop.container?e._scrollContainer=b(e.prop.container):e._scrollContainer=e.prop.container,r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return Si(Si({},Mi(Ii(i.prototype),"_getDefaultProp",this).call(this)),{},{container:window})}},{key:"scrollContainer",get:function(){return this._scrollContainer}},{key:"scrollableElement",get:function(){return this._scrollContainer instanceof Window?this._app.html:this._scrollContainer}},{key:"domParent",get:function(){var t=this.scrollContainer;return t instanceof Window?this._app.body:t instanceof Element?t:t.outer}},{key:"intersectionRoot",get:function(){var t=this.scrollContainer;return t instanceof Window?null:t instanceof Element?t:t.outer}},{key:"scrollContainerBounding",get:function(){if(this.intersectionRoot){var t=this.intersectionRoot.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}return{top:0,left:0,width:this._app.viewport.width,height:this._app.viewport.height}}}])&&xi(e.prototype,r),n&&xi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt);function zi(t){return zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(t)}function Fi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Hi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Fi(Object(r),!0).forEach((function(e){Zi(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fi(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ni(t){return function(t){if(Array.isArray(t))return Vi(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Vi(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vi(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Xi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ui(t,e){return Ui=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ui(t,e)}function $i(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Gi(t);if(e){var o=Gi(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Yi(this,r)}}function Yi(t,e){if(e&&("object"===zi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return qi(t)}function qi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ki(){return Ki="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ji(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ki.apply(this,arguments)}function Ji(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Gi(t)););return t}function Gi(t){return Gi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Gi(t)}function Zi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ts=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ui(t,e)}(i,t);var e,r,n,o=$i(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Xi(this,i),Zi(qi(e=o.call(this,t,!1)),"_scrollEvent",void 0),Zi(qi(e),"_intersectionObserverIn",void 0),Zi(qi(e),"_intersectionObserverOut",void 0),Zi(qi(e),"_firstStart",void 0),Zi(qi(e),"_elements",void 0),e._scrollEvent=void 0,e._intersectionObserverIn=void 0,e._intersectionObserverOut=void 0,e._firstStart=!0,e._elements=Ni(e.prop.elements),r&&e.init(),e}return e=i,r=[{key:"prefix",get:function(){return"".concat(this._app.prefix,"scroll-view")}},{key:"_getDefaultProp",value:function(){return Hi(Hi({},Ki(Gi(i.prototype),"_getDefaultProp",this).call(this)),{},{enabled:!0,container:window,elements:[],threshold:.9,states:"in",classToToggle:"viewed",useDelay:!1,useIntersectionObserver:!0,viewportTarget:"",resizeTimeout:0})}},{key:"elements",get:function(){return this._elements}},{key:"init",value:function(){Ki(Gi(i.prototype),"init",this).call(this)}},{key:"_setEvents",value:function(){var t=this;Ki(Gi(i.prototype),"_setEvents",this).call(this),this.resize(),this.addViewportCallback(this.prop.viewportTarget,(function(){t.resize()}),{timeout:this.prop.resizeTimeout})}},{key:"_onPropMutate",value:function(){Ki(Gi(i.prototype),"_onPropMutate",this).call(this),this.resize()}},{key:"resize",value:function(){this._removeViewEvents(),this.prop.enabled&&(this._setViewEvents(),this.seekBounding())}},{key:"_setViewEvents",value:function(){var t=this;if(zt()&&this.prop.useIntersectionObserver){var e=this.scrollContainerBounding,r=this._firstStart?0:e.width*(1-this.prop.threshold)*-1,n=this._firstStart?0:e.height*(1-this.prop.threshold)*-1;this._intersectionObserverIn=new IntersectionObserver(this._handleIntersectionObserverIn.bind(this),{root:this.intersectionRoot,threshold:0,rootMargin:"0px ".concat(r,"px ").concat(n,"px 0px")}),this.elements.forEach((function(e){var r;null===(r=t._intersectionObserverIn)||void 0===r||r.observe(e)})),"inout"===this.prop.states&&(this._intersectionObserverOut=new IntersectionObserver(this._handleIntersectionObserverOut.bind(this),{root:this.intersectionRoot,threshold:0,rootMargin:"0px 0px 0px 0px"}),this.elements.forEach((function(e){var r;null===(r=t._intersectionObserverOut)||void 0===r||r.observe(e)})))}else this._scrollEvent=At({container:this.prop.container,callback:this._handleScroll.bind(this)})}},{key:"_removeViewEvents",value:function(){var t,e;this._scrollEvent&&(this._scrollEvent.remove(),this._scrollEvent=void 0),null===(t=this._intersectionObserverIn)||void 0===t||t.disconnect(),this._intersectionObserverIn=void 0,null===(e=this._intersectionObserverOut)||void 0===e||e.disconnect(),this._intersectionObserverOut=void 0}},{key:"_handleIntersectionObserverIn",value:function(t){for(var e=!!this._firstStart&&this.scrollContainerBounding,r=0;r<t.length;r+=1){var n=t[r],o=0;this._firstStart&&e&&n.isIntersecting&&(o=this._elementInViewportData(n.target,e).delay),n.isIntersecting&&this._handleInOut(n.target,n.isIntersecting,o)}this._processUnusedElements(),this._firstStart&&(this._firstStart=!1,this.resize())}},{key:"_handleIntersectionObserverOut",value:function(t){for(var e=0;e<t.length;e+=1){var r=t[e];r.isIntersecting||this._handleInOut(r.target,r.isIntersecting,0)}}},{key:"_handleScroll",value:function(){this.seekBounding()}},{key:"seekBounding",value:function(){if(!zt()||!this.prop.useIntersectionObserver){for(var t=this.scrollContainerBounding,e=0;e<this.elements.length;e+=1){var r=this.elements[e],n=this._elementInViewportData(r,t),o=n.isIntersecting?n.delay:0;"boolean"==typeof n.isIntersecting&&this._handleInOut(r,n.isIntersecting,o)}this._processUnusedElements(),this._firstStart&&(this._firstStart=!1)}}},{key:"_elementInViewportData",value:function(t,e){var r,n=this.prop,o=n.threshold,i=n.states,s=n.useDelay,c=this._firstStart?1:o,a=t.getBoundingClientRect();a.top<e.top+e.height*c&&a.left<e.left+e.width*c?r="in"===i||!(a.right<e.left*c||a.bottom<e.top*c):(a.top>e.top+e.height||a.left>e.left+e.width)&&(r=!1);var u=0;return s&&this._firstStart&&(u=et("x"===s.dir?(a.left-e.left)/e.width:(a.top-e.top)/e.height,[0,1])*s.max),{isIntersecting:r,delay:u}}},{key:"_handleInOut",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.prop.states;t.scrollViewIn&&e||!t.scrollViewIn&&!e||(t.scrollViewIn=e,this.prop.classToToggle&&p((function(){t.classList.toggle(r.prop.classToToggle,e)}),n),!e||"in"!==o&&"inout"!==o?e||"inout"!==o||p((function(){r.callbacks.tbt("out",t)}),n):p((function(){r.callbacks.tbt("in",t)}),n))}},{key:"_processUnusedElements",value:function(){var t=this;"in"===this.prop.states&&(this._elements.filter((function(t){return t.scrollViewIn})).forEach((function(e){var r,n;null===(r=t._intersectionObserverIn)||void 0===r||r.unobserve(e),null===(n=t._intersectionObserverOut)||void 0===n||n.unobserve(e)})),this._elements=this._elements.filter((function(t){return!t.scrollViewIn})))}},{key:"addElement",value:function(t){var e,r,n=this;return t.scrollViewIn=void 0,this._elements.push(t),null===(e=this._intersectionObserverIn)||void 0===e||e.observe(t),null===(r=this._intersectionObserverOut)||void 0===r||r.observe(t),this.prop.enabled&&this.seekBounding(),{remove:function(){n.removeElement(t)}}}},{key:"removeElement",value:function(t){var e,r;t.scrollViewIn=void 0,this._elements=this._elements.filter((function(e){return e!==t})),null===(e=this._intersectionObserverIn)||void 0===e||e.unobserve(t),null===(r=this._intersectionObserverOut)||void 0===r||r.unobserve(t)}},{key:"removeElements",value:function(){var t=this;this._elements.forEach((function(e){t.removeElement(e)})),this._elements=[]}},{key:"_destroy",value:function(){Ki(Gi(i.prototype),"_destroy",this).call(this),this._removeViewEvents()}}],r&&Qi(e.prototype,r),n&&Qi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Ai);function es(t){return es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},es(t)}function rs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ns(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function os(){return os="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=is(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},os.apply(this,arguments)}function is(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=us(t)););return t}function ss(t,e){return ss=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ss(t,e)}function cs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=us(t);if(e){var o=us(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return as(this,r)}}function as(t,e){if(e&&("object"===es(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function us(t){return us=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},us(t)}var ls=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ss(t,e)}(i,t);var e,r,n,o=cs(i);function i(){return rs(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"_setEvents",value:function(){var t=this;os(us(i.prototype),"_setEvents",this).call(this),this.addEventListeners(window,"keydown",(function(e){t._handleKeydown(e)}))}},{key:"_handleKeydown",value:function(t){var e=this._component;if(e.prop.enabled)if(9!==t.keyCode){var r=document.activeElement;if(!r||!(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement)){var n=this._app.viewport,o=e.outer.getBoundingClientRect();if(o.left<n.width&&o.right>0&&o.top<n.height&&o.bottom>0){var i=40;switch(t.keyCode){case 38:e.targetTop-=i;break;case 40:e.targetTop+=i;break;case 39:e.targetLeft+=i;break;case 37:e.targetLeft-=i;break;case 34:e.targetTop+=400;break;case 33:e.targetTop-=400;break;case 36:e.targetTop=0,e.targetLeft=0;break;case 35:e.targetTop=e.scrollHeight,e.targetLeft=e.scrollWidth;break;case 32:e.targetTop+=200}}}}else this._handleTab()}},{key:"_handleTab",value:function(){var t=this;p((function(){var e=t._component,r=document.activeElement;if(r instanceof HTMLElement&&h(r,e.outer)){var n=e.outer.getBoundingClientRect(),o=r.getBoundingClientRect(),i=e.scrollTop+(o.top-n.top)-(e.clientHeight/2-o.height/2),s=e.scrollLeft+(o.left-n.left)-(e.clientWidth/2-o.width/2);e.targetTop=i,e.targetLeft=s}}),120)}}])&&ns(e.prototype,r),n&&ns(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Qr);function fs(t){return fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fs(t)}function ps(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function hs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ps(Object(r),!0).forEach((function(e){Os(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ps(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ds(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ys(t,e){return ys=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ys(t,e)}function vs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ws(t);if(e){var o=ws(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bs(this,r)}}function bs(t,e){if(e&&("object"===fs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _s(t)}function _s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gs(){return gs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ms(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},gs.apply(this,arguments)}function ms(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ws(t)););return t}function ws(t){return ws=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ws(t)}function Os(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ps="is-dragging",ks=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ys(t,e)}(i,t);var e,r,n,o=vs(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Os(_s(e=o.call(this,t)),"_dragger",void 0),Os(_s(e),"_componentEvents",void 0),Os(_s(e),"_currentLerp",void 0),e._dragger=void 0,e._componentEvents=[],e._currentLerp=!1,e}return e=i,r=[{key:"_getDefaultProp",value:function(){return hs(hs({},gs(ws(i.prototype),"_getDefaultProp",this).call(this)),{},{enabled:!0,speed:1,lerp:!1,reverseDir:!1,stopPropagation:!1})}},{key:"isDragging",get:function(){return!!this._dragger&&this._dragger.isDragging}},{key:"_constructor",value:function(){gs(ws(i.prototype),"_constructor",this).call(this),this._toggleDragger()}},{key:"_onPropMutate",value:function(){gs(ws(i.prototype),"_onPropMutate",this).call(this),this._toggleDragger()}},{key:"_toggleDragger",value:function(){this.prop.enabled?this._addDragger():this._removeDragger()}},{key:"_addDragger",value:function(){var t=this;if(!this._dragger){var e=this.component;this._dragger=new go({container:e.outer}),this._dragger.addCallback("start",this._handleDragStart.bind(this)),this._dragger.addCallback("move",(function(e){t._handleDragMove(e)})),this._dragger.addCallback("end",this._handleDragEnd.bind(this)),this._componentEvents.push(e.addCallback("wheel",(function(){var e;null===(e=t._dragger)||void 0===e||e.cancel()})))}}},{key:"_removeDragger",value:function(){this._dragger&&(this._dragger.destroy(),this._dragger=void 0,this._componentEvents.forEach((function(t){t.remove()})),this._componentEvents=[])}},{key:"_handleDragStart",value:function(){var t=this.component;if(t.prop.enabled&&!(t.maxScrollableWidth<=0&&t.maxScrollableHeight<=0)){var e=this.prop.lerp;"boolean"!=typeof e&&(this._currentLerp=t.prop.render.lerp,t.changeProp({render:{lerp:e}})),this._callbacks.tbt("start",!1)}}},{key:"_handleDragMove",value:function(t){var e=this.component;if(e.prop.enabled&&!(e.maxScrollableWidth<=0&&e.maxScrollableHeight<=0)){var r=t.evt,n=this.prop.stopPropagation;if(n){if(!r.cancelable)return;var o=Math.abs(t.coords.x-t.start.x),i=Math.abs(t.coords.y-t.start.y);(o>n.threshold&&"x"===n.dir||i>n.threshold&&"y"===n.dir)&&r.cancelable&&(r.preventDefault(),r.stopPropagation())}var s=this.prop,c=s.speed,a=s.reverseDir,u=t.step.x*c,l=t.step.y*c;e.targetLeft-=a?l:u,e.targetTop-=a?u:l,e.outer.classList.add(Ps),e.container.classList.add(Ps),this._callbacks.tbt("move",!1)}}},{key:"_handleDragEnd",value:function(){var t=this.component;t.outer.classList.remove(Ps),t.container.classList.remove(Ps),"boolean"!=typeof this._currentLerp&&(t.changeProp({render:{lerp:this._currentLerp}}),this._currentLerp=!1),this._callbacks.tbt("end",!1)}},{key:"_destroy",value:function(){gs(ws(i.prototype),"_destroy",this).call(this),this._removeDragger()}}],r&&ds(e.prototype,r),n&&ds(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Qr);function js(t){return js="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},js(t)}function Es(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ss(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Es(Object(r),!0).forEach((function(e){Bs(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Es(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ts(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Rs(t,e){return Rs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Rs(t,e)}function Ls(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Is(t);if(e){var o=Is(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ds(this,r)}}function Ds(t,e){if(e&&("object"===js(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Cs(t)}function Cs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ms(){return Ms="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ws(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ms.apply(this,arguments)}function Ws(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Is(t)););return t}function Is(t){return Is=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Is(t)}function Bs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var As=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rs(t,e)}(i,t);var e,r,n,o=Ls(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Ts(this,i),Bs(Cs(e=o.call(this,t,!1)),"_scrollContainer",void 0),Bs(Cs(e),"_section",void 0),Bs(Cs(e),"_scrollEvent",void 0),Bs(Cs(e),"_loadedEvent",void 0),Bs(Cs(e),"_scopeScroll",void 0),Bs(Cs(e),"_scopeIn",void 0),Bs(Cs(e),"_scopeMove",void 0),Bs(Cs(e),"_scopeOut",void 0),Bs(Cs(e),"_progress",void 0),"string"==typeof e.prop.container?e._scrollContainer=b(e.prop.container):e._scrollContainer=e.prop.container,"string"==typeof e.prop.section?e._section=b(e.prop.section):e._section=e.prop.section,e._progress=-.001,e._scopeScroll=[0,0],e._scopeIn=[0,0],e._scopeMove=[0,0],e._scopeOut=[0,0],r&&e.init(),e}return e=i,r=[{key:"_getDefaultProp",value:function(){return Ss(Ss({},Ms(Is(i.prototype),"_getDefaultProp",this).call(this)),{},{container:window,viewportTarget:"",resizeTimeout:0})}},{key:"scrollContainer",get:function(){return this._scrollContainer}},{key:"section",get:function(){return this._section}},{key:"scopeScroll",get:function(){return this._scopeScroll}},{key:"scopeIn",get:function(){return this._scopeIn}},{key:"scopeMove",get:function(){return this._scopeMove}},{key:"scopeOut",get:function(){return this._scopeOut}},{key:"progress",get:function(){return this._progress},set:function(t){this._progress=t}},{key:"init",value:function(){Ms(Is(i.prototype),"init",this).call(this)}},{key:"_setEvents",value:function(){var t=this;Ms(Is(i.prototype),"_setEvents",this).call(this),this.addViewportCallback(this.prop.viewportTarget,(function(){t.resize()}),{timeout:this.prop.resizeTimeout}),this._loadedEvent=this._app.onPageLoaded(),this._loadedEvent.then((function(){t.resize()})).catch((function(){})),this._scrollEvent=At({container:this.prop.container,callback:this._handleScroll.bind(this)})}},{key:"_onPropMutate",value:function(){Ms(Is(i.prototype),"_onPropMutate",this).call(this),this.resize()}},{key:"progressIn",get:function(){return st(this.progress,this.scopeIn)||0}},{key:"progressOut",get:function(){return st(this.progress,this.scopeOut)||0}},{key:"progressMove",get:function(){return st(this.progress,this.scopeMove)||0}},{key:"_handleScroll",value:function(){var t=Ft(this.scrollContainer);t&&this._render(t)}},{key:"resize",value:function(){var t=Ft(this.scrollContainer);if(t){var e=this.section.getBoundingClientRect(),r=this._app.viewport.height,n=t.scrollTop+e.top-r,o=t.scrollTop+e.top+e.height,i=o-n;this._scopeScroll=[n,o],this._scopeIn=[0,r/i],this._scopeOut=[1-r/i,1],this._scopeMove=[this._scopeIn[1],this._scopeOut[0]],this.callbacks.tbt("resize",!1),this._render(t,!0)}}},{key:"_render",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this._canRender(t,e);r&&this.callbacks.tbt("render",!1)}},{key:"_canRender",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return!1;var r=t.scrollTop,n=this.progress,o=st(r,[this._scopeScroll[0],this._scopeScroll[1]])||0;return this.progress=o,e||o!==n}},{key:"_destroy",value:function(){var t,e;Ms(Is(i.prototype),"_destroy",this).call(this),null===(t=this._scrollEvent)||void 0===t||t.remove(),null===(e=this._loadedEvent)||void 0===e||e.cancel()}}],r&&xs(e.prototype,r),n&&xs(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt);function zs(t){return zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zs(t)}function Fs(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Hs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Fs(Object(r),!0).forEach((function(e){Js(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fs(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ns(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Xs(t,e){return Xs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Xs(t,e)}function Qs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ks(t);if(e){var o=Ks(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Us(this,r)}}function Us(t,e){if(e&&("object"===zs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return $s(t)}function $s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ys(){return Ys="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=qs(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ys.apply(this,arguments)}function qs(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ks(t)););return t}function Ks(t){return Ks=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ks(t)}function Js(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Gs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xs(t,e)}(i,t);var e,r,n,o=Qs(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(Ns(this,i),Js($s(e=o.call(this,t,!1)),"_initText",void 0),Js($s(e),"_initHTML",void 0),Js($s(e),"_isPrimarySplit",void 0),Js($s(e),"_container",void 0),Js($s(e),"_letters",void 0),Js($s(e),"_words",void 0),Js($s(e),"_lines",void 0),e.prop.container){var n=b(e.prop.container);n instanceof HTMLElement&&(e._container=n)}e._container.translate=!1,e._container&&e._container.classList.add(e.prefix),e._initHTML=e._container.innerHTML;var s=e._container[e.prop.textSource].trim();return e._initText=s||"no rendered text",e._initText=e._initText.replace(/\s+\n/gm,"\n"),e._initText=e._initText.replace(/<br>/gm,String.fromCharCode(10)),e._initText=e._initText.replace(/<br\/>/gm,String.fromCharCode(10)),e._initText=e._initText.replace(/<br \/>/gm,String.fromCharCode(10)),e._container.ariaLabel=e._initText,e._isPrimarySplit=!1,e._letters=[],e._words=[],e._lines=[],r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return Hs(Hs({},Ys(Ks(i.prototype),"_getDefaultProp",this).call(this)),{},{container:"#".concat(this.prefix),textSource:"innerText",appendLetters:!0,appendLines:!1,viewportTarget:"",resizeTimeout:0})}},{key:"prefix",get:function(){return"".concat(this._app.prefix,"split-text")}},{key:"container",get:function(){return this._container}},{key:"letters",get:function(){return this._letters}},{key:"words",get:function(){return this._words}},{key:"lines",get:function(){return this._lines}},{key:"_setEvents",value:function(){var t=this;Ys(Ks(i.prototype),"_setEvents",this).call(this),this.splitText(),this.prop.appendLines&&this.addViewportCallback(this.prop.viewportTarget,(function(){t.splitText()}),{timeout:this.prop.resizeTimeout})}},{key:"splitText",value:function(){this._isPrimarySplit||(this.container.innerHTML="",this._splitIntoWords(),this._splitIntoLetters(),this._appendWords(),this._isPrimarySplit=!0),this.prop.appendLines&&this._splitIntoLines(),this.callbacks.tbt("split",!1)}},{key:"_splitIntoWords",value:function(){var t,e=this,r=this._initText.split(""),n=0;r.forEach((function(t){var r=e._words[n]||{content:"",hasNewLine:!1,el:m("span",{class:"".concat(e.prefix,"__word"),attr:[["aria-hidden","true"]]}),letters:[]};r.el.style.display="inline-block",e._words[n]=r;var o=t.charCodeAt(0),i=32===o||160===o,s=[45,8208,8211,8212,8722].includes(o),c=10===o;i&&(r.whitespace=document.createTextNode(" ")),c&&(r.br=m("br")),r.hasNewLine=c,i||c?n+=1:(r.content+=t,e.prop.appendLetters||(r.el.innerHTML=r.content),s&&(n+=1))})),this._words=this._words.filter((function(t,r){return 0!==t.content.length||(r>0&&(e._words[r-1].whitespace=t.whitespace,e._words[r-1].br=t.br),!1)})),this._words.forEach((function(e){t&&t.whitespace&&e.el.classList.add("pre-whitespace"),e.whitespace&&e.el.classList.add("has-whitespace"),t=e}))}},{key:"_appendWords",value:function(){var t=this;this._words.forEach((function(e){t.container.appendChild(e.el),e.whitespace&&t.container.appendChild(e.whitespace),e.br&&t.container.appendChild(e.br)}))}},{key:"_removeWords",value:function(){this._words.forEach((function(t){t.el.remove(),t.whitespace&&t.whitespace.remove(),t.br&&t.br.remove()}))}},{key:"_splitIntoLetters",value:function(){var t=this;this.prop.appendLetters&&(this._words.forEach((function(e){var r=e.content.split(""),n=[];r.forEach((function(r){var o={el:m("span",{class:"".concat(t.prefix,"__letter"),html:r,attr:[["aria-hidden","true"]]}),content:r,word:e};o.el.style.display="inline-block",t._letters.push(o),n.push(o)})),e.letters=n})),this._letters.forEach((function(t){t.word.el.appendChild(t.el)})))}},{key:"_splitIntoLines",value:function(){var t=this;this._removeLines();var e=!1,r=1/0,n=!1;this.words.forEach((function(o){var i=!1,s=o.el.offsetTop;i=!(!n||!n.br)||s!==r,n=o,r=s,i&&((e={el:m("span",{class:"".concat(t.prefix,"__line"),attr:[["aria-hidden","true"]]}),content:"",words:[]}).el.style.display="block",t._lines.push(e)),e&&e.words.push(o)})),this._lines.forEach((function(t){t.content=t.words.map((function(t){return t.content})).join(" ")})),this._lines.forEach((function(e){e.words.forEach((function(t){e.el.appendChild(t.el),t.br&&t.br.remove(),t.whitespace&&e.el.appendChild(t.whitespace)})),t.container.appendChild(e.el)}))}},{key:"_removeLines",value:function(){this._lines.forEach((function(t){t.el.remove()})),this._lines=[],this._appendWords()}},{key:"_destroy",value:function(){Ys(Ks(i.prototype),"_destroy",this).call(this),this._lines=[],this._words=[],this._letters=[],this._container.innerHTML=this._initHTML}}])&&Vs(e.prototype,r),n&&Vs(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt);function Zs(t){return Zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zs(t)}function tc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ec(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tc(Object(r),!0).forEach((function(e){fc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function rc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function oc(t,e){return oc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},oc(t,e)}function ic(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=lc(t);if(e){var o=lc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return sc(this,r)}}function sc(t,e){if(e&&("object"===Zs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return cc(t)}function cc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ac(){return ac="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=uc(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ac.apply(this,arguments)}function uc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=lc(t)););return t}function lc(t){return lc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},lc(t)}function fc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oc(t,e)}(i,t);var e,r,n,o=ic(i);function i(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];rc(this,i),fc(cc(e=o.call(this,t,!1)),"_container",void 0),fc(cc(e),"_containerIsWindow",void 0),fc(cc(e),"_outerCursor",void 0),fc(cc(e),"_innerCursor",void 0),fc(cc(e),"_animationFrame",void 0),fc(cc(e),"_currentFPS",void 0),fc(cc(e),"_canPlay",void 0),fc(cc(e),"_x",void 0),fc(cc(e),"_xTarget",void 0),fc(cc(e),"_y",void 0),fc(cc(e),"_yTarget",void 0);var n=b(e.prop.container);if(!n)throw new Error("No cursor container for ".concat(e.prop.container));return e._container=n,e._containerIsWindow=n instanceof Window,e._x=0,e._xTarget=0,e._y=0,e._yTarget=0,e._currentFPS=60,e._canPlay=e.prop.run,r&&e.init(),e}return e=i,(r=[{key:"_getDefaultProp",value:function(){return ec(ec({},ac(lc(i.prototype),"_getDefaultProp",this).call(this)),{},{container:window,run:!0,hideNativeCursor:!1,render:{lerp:.2,lerpToFixed:2,normalizeLerp:!1},autoStop:!0})}},{key:"prefix",get:function(){return"".concat(this._app.prefix,"custom-cursor")}},{key:"container",get:function(){return this._container}},{key:"eventsContainer",get:function(){return this._container}},{key:"domContainer",get:function(){return this.container instanceof Window?this._app.html:this.container}},{key:"outerCursor",get:function(){return this._outerCursor}},{key:"innerCursor",get:function(){return this._innerCursor}},{key:"x",get:function(){return this._x}},{key:"y",get:function(){return this._y}},{key:"_constructor",value:function(){ac(lc(i.prototype),"_constructor",this).call(this),this._createCursor()}},{key:"_setEvents",value:function(){var t=this;ac(lc(i.prototype),"_setEvents",this).call(this);var e=this.domContainer;this._animationFrame=new wt,this._animationFrame.addCallback("frame",(function(e){t._currentFPS=e.realFPS,t.render()})),this._canPlay&&this.enable(),this.addEventListeners(e,"mouseenter",this._handleMouseEnter.bind(this)),this.addEventListeners(e,"mouseleave",this._handleMouseLeave.bind(this)),this.addEventListeners(e,"mousemove",this._handleMouseMove.bind(this)),this.addEventListeners(e,"mousedown",this._handleMouseDown.bind(this)),this.addEventListeners(e,"mouseup",this._handleMouseUp.bind(this)),this.addEventListeners(window,"blur",this._handleWindowBlur.bind(this))}},{key:"_createCursor",value:function(){var t=this.prefix,e=this.container,r=this.domContainer;this.prop.hideNativeCursor&&(r.style.cursor="none",r.classList.add("hide-defaut-cursor")),r.classList.add("".concat(t,"-container")),this._outerCursor=m("div",{class:"".concat(t," ").concat(e instanceof Window?"in-window":"in-element"," disabled"),parent:r}),this._innerCursor=m("div",{class:"".concat(t,"__inner disabled"),parent:this._outerCursor}),this.callbacks.tbt("create",{outerCursor:this.outerCursor,innerCursor:this.innerCursor})}},{key:"_destroyCursor",value:function(){var t=this.prefix,e=this.domContainer;e.style.cursor="",e.classList.remove("hide-defaut-cursor"),e.classList.remove("".concat(t,"-container")),this._outerCursor.remove(),this._innerCursor.remove()}},{key:"_handleMouseEnter",value:function(t){this._xTarget=t.clientX,this._x=this._xTarget,this._yTarget=t.clientY,this._y=this._yTarget,this.outerCursor.classList.add("in-action")}},{key:"_handleMouseLeave",value:function(){this.outerCursor.classList.remove("in-action")}},{key:"_handleMouseMove",value:function(t){this._xTarget=t.clientX,this._yTarget=t.clientY,this.outerCursor.classList.add("in-action"),this._canPlay&&this._animationFrame.play()}},{key:"_handleMouseDown",value:function(t){1===t.which&&(this.outerCursor.classList.add("click"),this.innerCursor.classList.add("click"))}},{key:"_handleMouseUp",value:function(){this.outerCursor.classList.remove("click"),this.innerCursor.classList.remove("click")}},{key:"_handleWindowBlur",value:function(){this._handleMouseUp()}},{key:"render",value:function(){var t=this.prop,e=this.domContainer,r=t.render,n=r.normalizeLerp,o=r.lerp,i=r.lerpToFixed,s=n?60/this._currentFPS:1;if(this._x=rt(this._x,this._xTarget,o*s,.02),this._y=rt(this._y,this._yTarget,o*s,.02),"number"==typeof i){var c=Math.round(Math.abs(i));this._x=parseFloat(this._x.toFixed(c)),this._y=parseFloat(this._y.toFixed(c))}var a=this._x,u=this._y;if(!this._containerIsWindow){var l=e.getBoundingClientRect();a-=l.left,u-=l.top}this.outerCursor.style.transform="translate(".concat(a,"px, ").concat(u,"px)"),t.autoStop&&this._x===this._xTarget&&this._y===this._yTarget&&this._animationFrame.pause(),this._callbacks.tbt("render",{x:a,y:u})}},{key:"enable",value:function(){this._canPlay=!0,this._animationFrame.isPlaying||(this.outerCursor.classList.remove("disabled"),this.innerCursor.classList.remove("disabled"),this._animationFrame.play())}},{key:"disable",value:function(){this._canPlay=!1,this._animationFrame.isPlaying&&(this.outerCursor.classList.add("disabled"),this.innerCursor.classList.add("disabled"),this._animationFrame.pause())}},{key:"_destroy",value:function(){ac(lc(i.prototype),"_destroy",this).call(this),this._destroyCursor(),this._animationFrame.destroy()}}])&&nc(e.prototype,r),n&&nc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tt),hc={common:t,listeners:n,math:e,scroll:o,image:i};window.Vevet=c})()})();