1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00
Files
locomotive-boilerplate/www/assets/scripts/app.js
Chauncey McAskill b24014d8b1 Add autoprefixer and postcss
Added:
- autoprefixer v10.3.4
- postcss v8.3.6

Changed:
- Node Sass options to pass source map to PostCSS.
2021-09-18 01:16:44 -04:00

14 lines
66 KiB
JavaScript

(()=>{var Ft=Object.create;var U=Object.defineProperty;var Xt=Object.getOwnPropertyDescriptor;var Kt=Object.getOwnPropertyNames;var $t=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty;var dt=n=>U(n,"__esModule",{value:!0});var ei=typeof require!="undefined"?require:n=>{throw new Error('Dynamic require of "'+n+'" is not supported')};var Zt=(n,s)=>()=>(s||n((s={exports:{}}).exports,s),s.exports),Jt=(n,s)=>{dt(n);for(var t in s)U(n,t,{get:s[t],enumerable:!0})},Qt=(n,s,t)=>{if(s&&typeof s=="object"||typeof s=="function")for(let e of Kt(s))!Gt.call(n,e)&&e!=="default"&&U(n,e,{get:()=>s[e],enumerable:!(t=Xt(s,e))||t.enumerable});return n},te=n=>Qt(dt(U(n!=null?Ft($t(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var Yt=Zt((Ht,Z)=>{(function(n,s){typeof define=="function"&&define.amd?define([],function(){return n.svg4everybody=s()}):typeof Z=="object"&&Z.exports?Z.exports=s():n.svg4everybody=s()})(Ht,function(){function n(i,r,o){if(o){var a=document.createDocumentFragment(),l=!r.hasAttribute("viewBox")&&o.getAttribute("viewBox");l&&r.setAttribute("viewBox",l);for(var c=o.cloneNode(!0);c.childNodes.length;)a.appendChild(c.firstChild);i.appendChild(a)}}function s(i){i.onreadystatechange=function(){if(i.readyState===4){var r=i._cachedDocument;r||(r=i._cachedDocument=document.implementation.createHTMLDocument(""),r.body.innerHTML=i.responseText,i._cachedTarget={}),i._embeds.splice(0).map(function(o){var a=i._cachedTarget[o.id];a||(a=i._cachedTarget[o.id]=r.getElementById(o.id)),n(o.parent,o.svg,a)})}},i.onreadystatechange()}function t(i){function r(){for(var A=0;A<C.length;){var E=C[A],w=E.parentNode,d=e(w),p=E.getAttribute("xlink:href")||E.getAttribute("href");if(!p&&a.attributeName&&(p=E.getAttribute(a.attributeName)),d&&p){if(o)if(!a.validate||a.validate(p,d,E)){w.removeChild(E);var b=p.split("#"),y=b.shift(),T=b.join("#");if(y.length){var g=h[y];g||(g=h[y]=new XMLHttpRequest,g.open("GET",y),g.send(),g._embeds=[]),g._embeds.push({parent:w,svg:d,id:T}),s(g)}else n(w,d,document.getElementById(T))}else++A,++D}else++A}(!C.length||C.length-D>0)&&m(r,67)}var o,a=Object(i),l=/\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/,c=/\bAppleWebKit\/(\d+)\b/,f=/\bEdge\/12\.(\d+)\b/,u=/\bEdge\/.(\d+)\b/,v=window.top!==window.self;o="polyfill"in a?a.polyfill:l.test(navigator.userAgent)||(navigator.userAgent.match(f)||[])[1]<10547||(navigator.userAgent.match(c)||[])[1]<537||u.test(navigator.userAgent)&&v;var h={},m=window.requestAnimationFrame||setTimeout,C=document.getElementsByTagName("use"),D=0;o&&r()}function e(i){for(var r=i;r.nodeName.toLowerCase()!=="svg"&&(r=r.parentNode););return r}return t})});function V(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(s){return typeof s}:V=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},V(n)}function vt(n,s){if(!(n instanceof s))throw new TypeError("Cannot call a class as a function")}function pt(n,s){for(var t=0;t<s.length;t++){var e=s[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}function mt(n,s,t){return s&&pt(n.prototype,s),t&&pt(n,t),n}function yt(n,s,t){return s in n?Object.defineProperty(n,s,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[s]=t,n}function q(n,s){return se(n)||re(n,s)||gt(n,s)||ae()}function ee(n){return ie(n)||ne(n)||gt(n)||oe()}function ie(n){if(Array.isArray(n))return tt(n)}function se(n){if(Array.isArray(n))return n}function ne(n){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(n))return Array.from(n)}function re(n,s){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(n)))){var t=[],e=!0,i=!1,r=void 0;try{for(var o=n[Symbol.iterator](),a;!(e=(a=o.next()).done)&&(t.push(a.value),!(s&&t.length===s));e=!0);}catch(l){i=!0,r=l}finally{try{!e&&o.return!=null&&o.return()}finally{if(i)throw r}}return t}}function gt(n,s){if(!!n){if(typeof n=="string")return tt(n,s);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tt(n,s)}}function tt(n,s){(s==null||s>n.length)&&(s=n.length);for(var t=0,e=new Array(s);t<s;t++)e[t]=n[t];return e}function oe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var F=function(){function n(s){vt(this,n),this.mAttr="data-"+s.dataName,this.mCaptureEvents=["mouseenter","mouseleave"],this.el=s.el}return mt(n,[{key:"mInit",value:function(t){var e=this;this.modules=t,this.mCheckEventTarget=this.mCheckEventTarget.bind(this),this.events&&Object.keys(this.events).forEach(function(i){return e.mAddEvent(i)})}},{key:"mUpdate",value:function(t){this.modules=t}},{key:"mDestroy",value:function(){var t=this;this.events&&Object.keys(this.events).forEach(function(e){return t.mRemoveEvent(e)})}},{key:"mAddEvent",value:function(t){var e=!!this.mCaptureEvents.includes(t);this.el.addEventListener(t,this.mCheckEventTarget,e)}},{key:"mRemoveEvent",value:function(t){var e=!!this.mCaptureEvents.includes(t);this.el.removeEventListener(t,this.mCheckEventTarget,e)}},{key:"mCheckEventTarget",value:function(t){var e=this.events[t.type];if(typeof e=="string")this[e](t);else{var i="["+this.mAttr+"]",r=t.target;if(this.mCaptureEvents.includes(t.type))r.matches(i)&&this.mCallEventMethod(t,e,r);else for(;r&&r!==document&&!(r.matches(i)&&this.mCallEventMethod(t,e,r)!="undefined");)r=r.parentNode}}},{key:"mCallEventMethod",value:function(t,e,i){var r=i.getAttribute(this.mAttr);if(e.hasOwnProperty(r)){var o=e[r];t.hasOwnProperty("currentTarget")||Object.defineProperty(t,"currentTarget",{value:i}),t.hasOwnProperty("curTarget")||Object.defineProperty(t,"curTarget",{value:i}),this[o](t)}}},{key:"$",value:function(t,e){var i=t.indexOf("."),r=t.indexOf("#"),o=t.indexOf("["),a=[i,r,o].filter(function(v){return v!=-1}),l=!1,c=t,f="",u=this.el;return a.length&&(l=Math.min.apply(Math,ee(a)),c=t.slice(0,l),f=t.slice(l)),V(e)=="object"&&(u=e),u.querySelectorAll("["+this.mAttr+"="+c+"]"+f)}},{key:"parent",value:function(t,e){for(var i="["+this.mAttr+"="+t+"]",r=e.parentNode;r&&r!==document;){if(r.matches(i))return r;r=r.parentNode}}},{key:"getData",value:function(t,e){var i=e||this.el;return i.getAttribute(this.mAttr+"-"+t)}},{key:"setData",value:function(t,e,i){var r=i||this.el;return r.setAttribute(this.mAttr+"-"+t,e)}},{key:"call",value:function(t,e,i,r){var o=this;e&&!i&&(i=e,e=!1),this.modules[i]&&(r?this.modules[i][r]&&this.modules[i][r][t](e):Object.keys(this.modules[i]).forEach(function(a){o.modules[i][a][t](e)}))}},{key:"on",value:function(t,e,i,r){var o=this;this.modules[e]&&(r?this.modules[e][r].el.addEventListener(t,function(a){return i(a)}):Object.keys(this.modules[e]).forEach(function(a){o.modules[e][a].el.addEventListener(t,function(l){return i(l)})}))}},{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),n}(),le=function(){function n(s){vt(this,n),this.app,this.modules=s.modules,this.currentModules={},this.activeModules={},this.newModules={},this.moduleId=0}return mt(n,[{key:"init",value:function(t,e){var i=this,r=e||document,o=r.querySelectorAll("*");t&&!this.app&&(this.app=t),this.activeModules.app={app:this.app},o.forEach(function(a){Array.from(a.attributes).forEach(function(l){if(l.name.startsWith("data-module")){var c=!1,f=l.name.split("-").splice(2),u=i.toCamel(f);if(i.modules[u]?c=!0:i.modules[i.toUpper(u)]&&(u=i.toUpper(u),c=!0),c){var v={el:a,name:u,dataName:f.join("-")},h=new i.modules[u](v),m=l.value;m||(i.moduleId++,m="m"+i.moduleId,a.setAttribute(l.name,m)),i.addActiveModule(u,m,h);var C=u+"-"+m;e?i.newModules[C]=h:i.currentModules[C]=h}}})}),Object.entries(this.currentModules).forEach(function(a){var l=q(a,2),c=l[0],f=l[1];if(e){var u=c.split("-"),v=u.shift(),h=u.pop();i.addActiveModule(v,h,f)}else i.initModule(f)})}},{key:"initModule",value:function(t){t.mInit(this.activeModules),t.init()}},{key:"addActiveModule",value:function(t,e,i){this.activeModules[t]?Object.assign(this.activeModules[t],yt({},e,i)):this.activeModules[t]=yt({},e,i)}},{key:"update",value:function(t){var e=this;this.init(this.app,t),Object.entries(this.currentModules).forEach(function(i){var r=q(i,2),o=r[0],a=r[1];a.mUpdate(e.activeModules)}),Object.entries(this.newModules).forEach(function(i){var r=q(i,2),o=r[0],a=r[1];e.initModule(a)}),Object.assign(this.currentModules,this.newModules)}},{key:"destroy",value:function(t){t?this.destroyScope(t):this.destroyModules()}},{key:"destroyScope",value:function(t){var e=this,i=t.querySelectorAll("*");i.forEach(function(r){Array.from(r.attributes).forEach(function(o){if(o.name.startsWith("data-module")){var a=o.value,l=o.name.split("-").splice(2),c=e.toCamel(l)+"-"+a,f=!1;e.currentModules[c]?f=!0:e.currentModules[e.toUpper(c)]&&(c=e.toUpper(c),f=!0),f&&(e.destroyModule(e.currentModules[c]),delete e.currentModules[c])}})}),this.activeModules={},this.newModules={}}},{key:"destroyModules",value:function(){var t=this;Object.entries(this.currentModules).forEach(function(e){var i=q(e,2),r=i[0],o=i[1];t.destroyModule(o)}),this.currentModules=[]}},{key:"destroyModule",value:function(t){t.mDestroy(),t.destroy()}},{key:"toCamel",value:function(t){var e=this;return t.reduce(function(i,r){return i+e.toUpper(r)})}},{key:"toUpper",value:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}}]),n}(),bt=le;var lt={};Jt(lt,{Load:()=>et,Scroll:()=>at});function ce(n,s){if(!(n instanceof s))throw new TypeError("Cannot call a class as a function")}function wt(n,s){for(var t=0;t<s.length;t++){var e=s[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}function he(n,s,t){return s&&wt(n.prototype,s),t&&wt(n,t),n}function ue(n,s){return fe(n)||de(n,s)||ve(n,s)||pe()}function fe(n){if(Array.isArray(n))return n}function de(n,s){var t=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var e=[],i=!0,r=!1,o,a;try{for(t=t.call(n);!(i=(o=t.next()).done)&&(e.push(o.value),!(s&&e.length===s));i=!0);}catch(l){r=!0,a=l}finally{try{!i&&t.return!=null&&t.return()}finally{if(r)throw a}}return e}}function ve(n,s){if(!!n){if(typeof n=="string")return St(n,s);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return St(n,s)}}function St(n,s){(s==null||s>n.length)&&(s=n.length);for(var t=0,e=new Array(s);t<s;t++)e[t]=n[t];return e}function pe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var me=function(){function n(s){ce(this,n),this.defaults={name:"load",loadingClass:"is-loading",loadedClass:"is-loaded",readyClass:"is-ready",transitionsPrefix:"is-",transitionsHistory:!0,enterDelay:0,exitDelay:0,loadedDelay:0,isLoaded:!1,isEntered:!1,isUrl:!1,transitionContainer:null,popstateIgnore:!1},Object.assign(this,this.defaults,s),this.options=s,this.namespace="modular",this.html=document.documentElement,this.href=window.location.href,this.container="data-"+this.name+"-container",this.subContainer=!1,this.prevTransition=null,this.loadAttributes=["src","srcset","style","href"],this.isInserted=!1,this.isLoading=!1,this.enterTimeout=!1,this.controller=new AbortController,this.classContainer=this.html,this.isChrome=navigator.userAgent.indexOf("Chrome")!=-1,this.init()}return he(n,[{key:"init",value:function(){var t=this;window.addEventListener("popstate",function(e){return t.checkState(e)},!1),this.html.addEventListener("click",function(e){return t.checkClick(e)},!1),this.loadEls(document)}},{key:"checkClick",value:function(t){if(!t.ctrlKey&&!t.metaKey)for(var e=t.target;e&&e!==document;){if(e.matches("a")&&e.getAttribute("download")==null){var i=e.getAttribute("href");!i.startsWith("#")&&!i.startsWith("mailto:")&&!i.startsWith("tel:")&&(t.preventDefault(),this.reset(),this.getClickOptions(e));break}e=e.parentNode}}},{key:"checkState",value:function(){typeof this.popstateIgnore=="string"&&window.location.href.indexOf(this.popstateIgnore)>-1||(this.reset(),this.getStateOptions())}},{key:"reset",value:function(){this.isLoading&&(this.controller.abort(),this.isLoading=!1,this.controller=new AbortController),window.clearTimeout(this.enterTimeout),this.isInserted&&this.removeContainer(),this.classContainer=this.html,Object.assign(this,this.defaults,this.options)}},{key:"getClickOptions",value:function(t){this.transition=t.getAttribute("data-"+this.name),this.isUrl=t.getAttribute("data-"+this.name+"-url");var e=t.getAttribute("href"),i=t.getAttribute("target");if(i=="_blank"){window.open(e,"_blank");return}if(this.transition=="false"){window.location=e;return}this.setOptions(e,!0)}},{key:"getStateOptions",value:function(){this.transitionsHistory?this.transition=history.state:this.transition=!1;var t=window.location.href;this.setOptions(t)}},{key:"goTo",value:function(t,e,i){this.reset(),this.transition=e,this.isUrl=i,this.setOptions(t,!0)}},{key:"setOptions",value:function(t,e){var i="["+this.container+"]",r;this.transition&&this.transition!="true"&&(this.transitionContainer="["+this.container+'="'+this.transition+'"]',this.loadingClass=this.transitions[this.transition].loadingClass||this.loadingClass,this.loadedClass=this.transitions[this.transition].loadedClass||this.loadedClass,this.readyClass=this.transitions[this.transition].readyClass||this.readyClass,this.transitionsPrefix=this.transitions[this.transition].transitionsPrefix||this.transitionsPrefix,this.enterDelay=this.transitions[this.transition].enterDelay||this.enterDelay,this.exitDelay=this.transitions[this.transition].exitDelay||this.exitDelay,this.loadedDelay=this.transitions[this.transition].loadedDelay||this.loadedDelay,r=document.querySelector(this.transitionContainer)),r?(i=this.transitionContainer,this.oldContainer=r,this.classContainer=this.oldContainer.parentNode,this.subContainer||history.replaceState(this.transition,null,this.href),this.subContainer=!0):(this.oldContainer=document.querySelector(i),this.subContainer&&history.replaceState(this.prevTransition,null,this.href),this.subContainer=!1),this.href=t,this.parentContainer=this.oldContainer.parentNode,this.isUrl===""||this.isUrl!=null&&this.isUrl!="false"&&this.isUrl!=!1?history.pushState(this.transition,null,t):(this.oldContainer.classList.add("is-old"),this.setLoading(),this.startEnterDelay(),this.loadHref(t,i,e))}},{key:"setLoading",value:function(){this.classContainer.classList.remove(this.loadedClass,this.readyClass),this.classContainer.classList.add(this.loadingClass),this.classContainer.classList.remove(this.transitionsPrefix+this.prevTransition),this.transition&&this.classContainer.classList.add(this.transitionsPrefix+this.transition),this.subContainer||(this.prevTransition=this.transition);var t=new Event(this.namespace+"loading");window.dispatchEvent(t)}},{key:"startEnterDelay",value:function(){var t=this;this.enterTimeout=window.setTimeout(function(){t.isEntered=!0,t.isLoaded&&t.transitionContainers()},this.enterDelay)}},{key:"loadHref",value:function(t,e,i){var r=this;this.isLoading=!0;var o=this.controller.signal;fetch(t,{signal:o}).then(function(a){return a.text()}).then(function(a){i&&history.pushState(r.transition,null,t);var l=new DOMParser;r.data=l.parseFromString(a,"text/html"),r.newContainer=r.data.querySelector(e),r.newContainer.classList.add("is-new"),r.parentNewContainer=r.newContainer.parentNode,r.hideContainer(),r.parentContainer.insertBefore(r.newContainer,r.oldContainer),r.isInserted=!0,r.setSvgs(),r.isLoaded=!0,r.isEntered&&r.transitionContainers(),r.loadEls(r.newContainer),r.isLoading=!1}).catch(function(a){window.location=t})}},{key:"transitionContainers",value:function(){var t=this;this.setAttributes(),this.showContainer(),this.setLoaded(),setTimeout(function(){t.removeContainer(),t.setReady()},this.exitDelay)}},{key:"setSvgs",value:function(){if(this.isChrome){var t=this.newContainer.querySelectorAll("use");t.length&&t.forEach(function(e){var i=e.getAttribute("xlink:href");if(i)e.parentNode.innerHTML='<use xlink:href="'+i+'"></use>';else{var r=e.getAttribute("href");r&&(e.parentNode.innerHTML='<use href="'+r+'"></use>')}})}}},{key:"setAttributes",value:function(){var t=this,e=this.data.getElementsByTagName("title")[0],i=this.data.head.querySelector('meta[name="description"]'),r=document.head.querySelector('meta[name="description"]'),o,a;this.subContainer?(a=this.parentNewContainer,o=document.querySelector(this.transitionContainer).parentNode):(a=this.data.querySelector("html"),o=document.querySelector("html"));var l=Object.assign({},a.dataset);e&&(document.title=e.innerText),r&&i&&r.setAttribute("content",i.getAttribute("content")),l&&Object.entries(l).forEach(function(c){var f=ue(c,2),u=f[0],v=f[1];o.setAttribute("data-"+t.toDash(u),v)})}},{key:"toDash",value:function(t){return t.split(/(?=[A-Z])/).join("-").toLowerCase()}},{key:"hideContainer",value:function(){this.newContainer.style.visibility="hidden",this.newContainer.style.height=0,this.newContainer.style.overflow="hidden"}},{key:"showContainer",value:function(){this.newContainer.style.visibility="",this.newContainer.style.height="",this.newContainer.style.overflow=""}},{key:"loadEls",value:function(t){var e=this,i=[];this.loadAttributes.forEach(function(r){var o="data-"+e.name+"-"+r,a=t.querySelectorAll("["+o+"]");a.length&&a.forEach(function(l){var c=l.getAttribute(o);if(l.setAttribute(r,c),r=="src"||r=="srcset"){var f=new Promise(function(u){l.onload=function(){return u(l)}});i.push(f)}})}),Promise.all(i).then(function(r){var o=new Event(e.namespace+"images");window.dispatchEvent(o)})}},{key:"setLoaded",value:function(){var t=this;this.classContainer.classList.remove(this.loadingClass),setTimeout(function(){t.classContainer.classList.add(t.loadedClass)},this.loadedDelay);var e=new Event(this.namespace+"loaded");window.dispatchEvent(e)}},{key:"removeContainer",value:function(){this.parentContainer.removeChild(this.oldContainer),this.newContainer.classList.remove("is-new"),this.isInserted=!1}},{key:"setReady",value:function(){this.classContainer.classList.add(this.readyClass);var t=new Event(this.namespace+"ready");window.dispatchEvent(t)}},{key:"on",value:function(t,e){var i=this;window.addEventListener(this.namespace+t,function(){switch(t){case"loading":return e(i.transition,i.oldContainer);case"loaded":return e(i.transition,i.oldContainer,i.newContainer);case"ready":return e(i.transition,i.newContainer);default:return e()}},!1)}}]),n}(),kt=me;var et=class extends F{constructor(n){super(n)}init(){new kt({enterDelay:0,transitions:{customTransition:{}}}).on("loaded",(s,t,e)=>{this.call("destroy",t,"app"),this.call("update",e,"app")})}};function X(n,s){if(!(n instanceof s))throw new TypeError("Cannot call a class as a function")}function Et(n,s){for(var t=0;t<s.length;t++){var e=s[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}function K(n,s,t){return s&&Et(n.prototype,s),t&&Et(n,t),n}function ye(n,s,t){return s in n?Object.defineProperty(n,s,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[s]=t,n}function Tt(n,s){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);s&&(e=e.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,e)}return t}function it(n){for(var s=1;s<arguments.length;s++){var t=arguments[s]!=null?arguments[s]:{};s%2?Tt(Object(t),!0).forEach(function(e){ye(n,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Tt(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))})}return n}function At(n,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(s&&s.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),s&&st(n,s)}function L(n){return L=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},L(n)}function st(n,s){return st=Object.setPrototypeOf||function(e,i){return e.__proto__=i,e},st(n,s)}function ge(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(n){return!1}}function Ct(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function be(n,s){return s&&(typeof s=="object"||typeof s=="function")?s:Ct(n)}function _t(n){var s=ge();return function(){var e=L(n),i;if(s){var r=L(this).constructor;i=Reflect.construct(e,arguments,r)}else i=e.apply(this,arguments);return be(this,i)}}function we(n,s){for(;!Object.prototype.hasOwnProperty.call(n,s)&&(n=L(n),n!==null););return n}function I(n,s,t){return typeof Reflect!="undefined"&&Reflect.get?I=Reflect.get:I=function(i,r,o){var a=we(i,r);if(!!a){var l=Object.getOwnPropertyDescriptor(a,r);return l.get?l.get.call(o):l.value}},I(n,s,t||n)}function R(n,s){return Ee(n)||Ae(n,s)||xt(n,s)||_e()}function Se(n){return ke(n)||Te(n)||xt(n)||Ce()}function ke(n){if(Array.isArray(n))return nt(n)}function Ee(n){if(Array.isArray(n))return n}function Te(n){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(n))return Array.from(n)}function Ae(n,s){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(n)))){var t=[],e=!0,i=!1,r=void 0;try{for(var o=n[Symbol.iterator](),a;!(e=(a=o.next()).done)&&(t.push(a.value),!(s&&t.length===s));e=!0);}catch(l){i=!0,r=l}finally{try{!e&&o.return!=null&&o.return()}finally{if(i)throw r}}return t}}function xt(n,s){if(!!n){if(typeof n=="string")return nt(n,s);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nt(n,s)}}function nt(n,s){(s==null||s>n.length)&&(s=n.length);for(var t=0,e=new Array(s);t<s;t++)e[t]=n[t];return e}function Ce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var W={el:document,name:"scroll",offset:[0,0],repeat:!1,smooth:!1,initPosition:{x:0,y:0},direction:"vertical",gestureDirection:"vertical",reloadOnContextChange:!1,lerp:.1,class:"is-inview",scrollbarContainer:!1,scrollbarClass:"c-scrollbar",scrollingClass:"has-scroll-scrolling",draggingClass:"has-scroll-dragging",smoothClass:"has-scroll-smooth",initClass:"has-scroll-init",getSpeed:!1,getDirection:!1,scrollFromAnywhere:!1,multiplier:1,firefoxMultiplier:50,touchMultiplier:2,resetNativeScroll:!0,tablet:{smooth:!1,direction:"vertical",gestureDirection:"vertical",breakpoint:1024},smartphone:{smooth:!1,direction:"vertical",gestureDirection:"vertical"}},Ot=function(){function n(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};X(this,n),Object.assign(this,W,s),this.smartphone=W.smartphone,s.smartphone&&Object.assign(this.smartphone,s.smartphone),this.tablet=W.tablet,s.tablet&&Object.assign(this.tablet,s.tablet),this.namespace="locomotive",this.html=document.documentElement,this.windowHeight=window.innerHeight,this.windowWidth=window.innerWidth,this.windowMiddle={x:this.windowWidth/2,y:this.windowHeight/2},this.els={},this.currentElements={},this.listeners={},this.hasScrollTicking=!1,this.hasCallEventSet=!1,this.checkScroll=this.checkScroll.bind(this),this.checkResize=this.checkResize.bind(this),this.checkEvent=this.checkEvent.bind(this),this.instance={scroll:{x:0,y:0},limit:{x:this.html.offsetWidth,y:this.html.offsetHeight},currentElements:this.currentElements},this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",this.isMobile&&(this.direction=this[this.context].direction),this.direction==="horizontal"?this.directionAxis="x":this.directionAxis="y",this.getDirection&&(this.instance.direction=null),this.getDirection&&(this.instance.speed=0),this.html.classList.add(this.initClass),window.addEventListener("resize",this.checkResize,!1)}return K(n,[{key:"init",value:function(){this.initEvents()}},{key:"checkScroll",value:function(){this.dispatchScroll()}},{key:"checkResize",value:function(){var t=this;this.resizeTick||(this.resizeTick=!0,requestAnimationFrame(function(){t.resize(),t.resizeTick=!1}))}},{key:"resize",value:function(){}},{key:"checkContext",value:function(){if(!!this.reloadOnContextChange){this.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1||this.windowWidth<this.tablet.breakpoint,this.isTablet=this.isMobile&&this.windowWidth>=this.tablet.breakpoint;var t=this.context;if(this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",t!=this.context){var e=t=="desktop"?this.smooth:this[t].smooth,i=this.context=="desktop"?this.smooth:this[this.context].smooth;e!=i&&window.location.reload()}}}},{key:"initEvents",value:function(){var t=this;this.scrollToEls=this.el.querySelectorAll("[data-".concat(this.name,"-to]")),this.setScrollTo=this.setScrollTo.bind(this),this.scrollToEls.forEach(function(e){e.addEventListener("click",t.setScrollTo,!1)})}},{key:"setScrollTo",value:function(t){t.preventDefault(),this.scrollTo(t.currentTarget.getAttribute("data-".concat(this.name,"-href"))||t.currentTarget.getAttribute("href"),{offset:t.currentTarget.getAttribute("data-".concat(this.name,"-offset"))})}},{key:"addElements",value:function(){}},{key:"detectElements",value:function(t){var e=this,i=this.instance.scroll.y,r=i+this.windowHeight,o=this.instance.scroll.x,a=o+this.windowWidth;Object.entries(this.els).forEach(function(l){var c=R(l,2),f=c[0],u=c[1];if(u&&(!u.inView||t)&&(e.direction==="horizontal"?a>=u.left&&o<u.right&&e.setInView(u,f):r>=u.top&&i<u.bottom&&e.setInView(u,f)),u&&u.inView)if(e.direction==="horizontal"){var v=u.right-u.left;u.progress=(e.instance.scroll.x-(u.left-e.windowWidth))/(v+e.windowWidth),(a<u.left||o>u.right)&&e.setOutOfView(u,f)}else{var h=u.bottom-u.top;u.progress=(e.instance.scroll.y-(u.top-e.windowHeight))/(h+e.windowHeight),(r<u.top||i>u.bottom)&&e.setOutOfView(u,f)}}),this.hasScrollTicking=!1}},{key:"setInView",value:function(t,e){this.els[e].inView=!0,t.el.classList.add(t.class),this.currentElements[e]=t,t.call&&this.hasCallEventSet&&(this.dispatchCall(t,"enter"),t.repeat||(this.els[e].call=!1))}},{key:"setOutOfView",value:function(t,e){var i=this;this.els[e].inView=!1,Object.keys(this.currentElements).forEach(function(r){r===e&&delete i.currentElements[r]}),t.call&&this.hasCallEventSet&&this.dispatchCall(t,"exit"),t.repeat&&t.el.classList.remove(t.class)}},{key:"dispatchCall",value:function(t,e){this.callWay=e,this.callValue=t.call.split(",").map(function(r){return r.trim()}),this.callObj=t,this.callValue.length==1&&(this.callValue=this.callValue[0]);var i=new Event(this.namespace+"call");this.el.dispatchEvent(i)}},{key:"dispatchScroll",value:function(){var t=new Event(this.namespace+"scroll");this.el.dispatchEvent(t)}},{key:"setEvents",value:function(t,e){this.listeners[t]||(this.listeners[t]=[]);var i=this.listeners[t];i.push(e),i.length===1&&this.el.addEventListener(this.namespace+t,this.checkEvent,!1),t==="call"&&(this.hasCallEventSet=!0,this.detectElements(!0))}},{key:"unsetEvents",value:function(t,e){if(!!this.listeners[t]){var i=this.listeners[t],r=i.indexOf(e);r<0||(i.splice(r,1),i.index===0&&this.el.removeEventListener(this.namespace+t,this.checkEvent,!1))}}},{key:"checkEvent",value:function(t){var e=this,i=t.type.replace(this.namespace,""),r=this.listeners[i];!r||r.length===0||r.forEach(function(o){switch(i){case"scroll":return o(e.instance);case"call":return o(e.callValue,e.callWay,e.callObj);default:return o()}})}},{key:"startScroll",value:function(){}},{key:"stopScroll",value:function(){}},{key:"setScroll",value:function(t,e){this.instance.scroll={x:0,y:0}}},{key:"destroy",value:function(){var t=this;window.removeEventListener("resize",this.checkResize,!1),Object.keys(this.listeners).forEach(function(e){t.el.removeEventListener(t.namespace+e,t.checkEvent,!1)}),this.listeners={},this.scrollToEls.forEach(function(e){e.removeEventListener("click",t.setScrollTo,!1)}),this.html.classList.remove(this.initClass)}}]),n}(),xe=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Dt(n,s){return s={exports:{}},n(s,s.exports),s.exports}var Lt=Dt(function(n,s){(function(){function t(){var e=window,i=document;if("scrollBehavior"in i.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;var r=e.HTMLElement||e.Element,o=468,a={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},l=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function c(d){var p=["MSIE ","Trident/","Edge/"];return new RegExp(p.join("|")).test(d)}var f=c(e.navigator.userAgent)?1:0;function u(d,p){this.scrollLeft=d,this.scrollTop=p}function v(d){return .5*(1-Math.cos(Math.PI*d))}function h(d){if(d===null||typeof d!="object"||d.behavior===void 0||d.behavior==="auto"||d.behavior==="instant")return!0;if(typeof d=="object"&&d.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+d.behavior+" is not a valid value for enumeration ScrollBehavior.")}function m(d,p){if(p==="Y")return d.clientHeight+f<d.scrollHeight;if(p==="X")return d.clientWidth+f<d.scrollWidth}function C(d,p){var b=e.getComputedStyle(d,null)["overflow"+p];return b==="auto"||b==="scroll"}function D(d){var p=m(d,"Y")&&C(d,"Y"),b=m(d,"X")&&C(d,"X");return p||b}function A(d){for(;d!==i.body&&D(d)===!1;)d=d.parentNode||d.host;return d}function E(d){var p=l(),b,y,T,g=(p-d.startTime)/o;g=g>1?1:g,b=v(g),y=d.startX+(d.x-d.startX)*b,T=d.startY+(d.y-d.startY)*b,d.method.call(d.scrollable,y,T),(y!==d.x||T!==d.y)&&e.requestAnimationFrame(E.bind(e,d))}function w(d,p,b){var y,T,g,S,j=l();d===i.body?(y=e,T=e.scrollX||e.pageXOffset,g=e.scrollY||e.pageYOffset,S=a.scroll):(y=d,T=d.scrollLeft,g=d.scrollTop,S=u),E({scrollable:y,method:S,startTime:j,startX:T,startY:g,x:p,y:b})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){a.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}w.call(e,i.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(h(arguments[0])){a.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}w.call(e,i.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");a.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}var d=arguments[0].left,p=arguments[0].top;w.call(this,this,typeof d=="undefined"?this.scrollLeft:~~d,typeof p=="undefined"?this.scrollTop:~~p)}},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){a.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(h(arguments[0])===!0){a.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}var d=A(this),p=d.getBoundingClientRect(),b=this.getBoundingClientRect();d!==i.body?(w.call(this,d,d.scrollLeft+b.left-p.left,d.scrollTop+b.top-p.top),e.getComputedStyle(d).position!=="fixed"&&e.scrollBy({left:p.left,top:p.top,behavior:"smooth"})):e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})}}n.exports={polyfill:t}})()}),li=Lt.polyfill,Oe=function(n){At(t,n);var s=_t(t);function t(){var e,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return X(this,t),e=s.call(this,i),e.resetNativeScroll&&(history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0)),window.addEventListener("scroll",e.checkScroll,!1),window.smoothscrollPolyfill===void 0&&(window.smoothscrollPolyfill=Lt,window.smoothscrollPolyfill.polyfill()),e}return K(t,[{key:"init",value:function(){this.instance.scroll.y=window.pageYOffset,this.addElements(),this.detectElements(),I(L(t.prototype),"init",this).call(this)}},{key:"checkScroll",value:function(){var i=this;I(L(t.prototype),"checkScroll",this).call(this),this.getDirection&&this.addDirection(),this.getSpeed&&(this.addSpeed(),this.speedTs=Date.now()),this.instance.scroll.y=window.pageYOffset,Object.entries(this.els).length&&(this.hasScrollTicking||(requestAnimationFrame(function(){i.detectElements()}),this.hasScrollTicking=!0))}},{key:"addDirection",value:function(){window.pageYOffset>this.instance.scroll.y?this.instance.direction!=="down"&&(this.instance.direction="down"):window.pageYOffset<this.instance.scroll.y&&this.instance.direction!=="up"&&(this.instance.direction="up")}},{key:"addSpeed",value:function(){window.pageYOffset!=this.instance.scroll.y?this.instance.speed=(window.pageYOffset-this.instance.scroll.y)/Math.max(1,Date.now()-this.speedTs):this.instance.speed=0}},{key:"resize",value:function(){Object.entries(this.els).length&&(this.windowHeight=window.innerHeight,this.updateElements())}},{key:"addElements",value:function(){var i=this;this.els={};var r=this.el.querySelectorAll("[data-"+this.name+"]");r.forEach(function(o,a){var l=o.getBoundingClientRect(),c=o.dataset[i.name+"Class"]||i.class,f=typeof o.dataset[i.name+"Id"]=="string"?o.dataset[i.name+"Id"]:a,u,v,h=typeof o.dataset[i.name+"Offset"]=="string"?o.dataset[i.name+"Offset"].split(","):i.offset,m=o.dataset[i.name+"Repeat"],C=o.dataset[i.name+"Call"],D=o.dataset[i.name+"Target"],A;D!==void 0?A=document.querySelector("".concat(D)):A=o;var E=A.getBoundingClientRect();u=E.top+i.instance.scroll.y,v=E.left+i.instance.scroll.x;var w=u+A.offsetHeight,d=v+A.offsetWidth;m=="false"?m=!1:m!=null?m=!0:m=i.repeat;var p=i.getRelativeOffset(h);u=u+p[0],w=w-p[1];var b={el:o,targetEl:A,id:f,class:c,top:u,bottom:w,left:v,right:d,offset:h,progress:0,repeat:m,inView:!1,call:C};i.els[f]=b,o.classList.contains(c)&&i.setInView(i.els[f],f)})}},{key:"updateElements",value:function(){var i=this;Object.entries(this.els).forEach(function(r){var o=R(r,2),a=o[0],l=o[1],c=l.targetEl.getBoundingClientRect().top+i.instance.scroll.y,f=c+l.targetEl.offsetHeight,u=i.getRelativeOffset(l.offset);i.els[a].top=c+u[0],i.els[a].bottom=f-u[1]}),this.hasScrollTicking=!1}},{key:"getRelativeOffset",value:function(i){var r=[0,0];if(i)for(var o=0;o<i.length;o++)typeof i[o]=="string"?i[o].includes("%")?r[o]=parseInt(i[o].replace("%","")*this.windowHeight/100):r[o]=parseInt(i[o]):r[o]=i[o];return r}},{key:"scrollTo",value:function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=parseInt(r.offset)||0,a=r.callback?r.callback:!1;if(typeof i=="string"){if(i==="top")i=this.html;else if(i==="bottom")i=this.html.offsetHeight-window.innerHeight;else if(i=document.querySelector(i),!i)return}else if(typeof i=="number")i=parseInt(i);else if(!(i&&i.tagName)){console.warn("`target` parameter is not valid");return}typeof i!="number"?o=i.getBoundingClientRect().top+o+this.instance.scroll.y:o=i+o;var l=function(){return parseInt(window.pageYOffset)===parseInt(o)};if(a)if(l()){a();return}else{var c=function f(){l()&&(window.removeEventListener("scroll",f),a())};window.addEventListener("scroll",c)}window.scrollTo({top:o,behavior:"smooth"})}},{key:"update",value:function(){this.addElements(),this.detectElements()}},{key:"destroy",value:function(){I(L(t.prototype),"destroy",this).call(this),window.removeEventListener("scroll",this.checkScroll,!1)}}]),t}(Ot);var Mt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable;function Me(n){if(n==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(n)}function Ie(){try{if(!Object.assign)return!1;var n=new String("abc");if(n[5]="de",Object.getOwnPropertyNames(n)[0]==="5")return!1;for(var s={},t=0;t<10;t++)s["_"+String.fromCharCode(t)]=t;var e=Object.getOwnPropertyNames(s).map(function(r){return s[r]});if(e.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(r){i[r]=r}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch(r){return!1}}var Pe=Ie()?Object.assign:function(n,s){for(var t,e=Me(n),i,r=1;r<arguments.length;r++){t=Object(arguments[r]);for(var o in t)De.call(t,o)&&(e[o]=t[o]);if(Mt){i=Mt(t);for(var a=0;a<i.length;a++)Le.call(t,i[a])&&(e[i[a]]=t[i[a]])}}return e};function It(){}It.prototype={on:function(n,s,t){var e=this.e||(this.e={});return(e[n]||(e[n]=[])).push({fn:s,ctx:t}),this},once:function(n,s,t){var e=this;function i(){e.off(n,i),s.apply(t,arguments)}return i._=s,this.on(n,i,t)},emit:function(n){var s=[].slice.call(arguments,1),t=((this.e||(this.e={}))[n]||[]).slice(),e=0,i=t.length;for(e;e<i;e++)t[e].fn.apply(t[e].ctx,s);return this},off:function(n,s){var t=this.e||(this.e={}),e=t[n],i=[];if(e&&s)for(var r=0,o=e.length;r<o;r++)e[r].fn!==s&&e[r].fn._!==s&&i.push(e[r]);return i.length?t[n]=i:delete t[n],this}};var je=It,Be=Dt(function(n,s){(function(){var t;t=s!==null?s:this,t.Lethargy=function(){function e(i,r,o,a){this.stability=i!=null?Math.abs(i):8,this.sensitivity=r!=null?1+Math.abs(r):100,this.tolerance=o!=null?1+Math.abs(o):1.1,this.delay=a!=null?a:150,this.lastUpDeltas=function(){var l,c,f;for(f=[],l=1,c=this.stability*2;1<=c?l<=c:l>=c;1<=c?l++:l--)f.push(null);return f}.call(this),this.lastDownDeltas=function(){var l,c,f;for(f=[],l=1,c=this.stability*2;1<=c?l<=c:l>=c;1<=c?l++:l--)f.push(null);return f}.call(this),this.deltasTimestamp=function(){var l,c,f;for(f=[],l=1,c=this.stability*2;1<=c?l<=c:l>=c;1<=c?l++:l--)f.push(null);return f}.call(this)}return e.prototype.check=function(i){var r;return i=i.originalEvent||i,i.wheelDelta!=null?r=i.wheelDelta:i.deltaY!=null?r=i.deltaY*-40:(i.detail!=null||i.detail===0)&&(r=i.detail*-40),this.deltasTimestamp.push(Date.now()),this.deltasTimestamp.shift(),r>0?(this.lastUpDeltas.push(r),this.lastUpDeltas.shift(),this.isInertia(1)):(this.lastDownDeltas.push(r),this.lastDownDeltas.shift(),this.isInertia(-1))},e.prototype.isInertia=function(i){var r,o,a,l,c,f,u;return r=i===-1?this.lastDownDeltas:this.lastUpDeltas,r[0]===null?i:this.deltasTimestamp[this.stability*2-2]+this.delay>Date.now()&&r[0]===r[this.stability*2-1]?!1:(a=r.slice(0,this.stability),o=r.slice(this.stability,this.stability*2),u=a.reduce(function(v,h){return v+h}),c=o.reduce(function(v,h){return v+h}),f=u/a.length,l=c/o.length,Math.abs(f)<Math.abs(l*this.tolerance)&&this.sensitivity<Math.abs(l)?i:!1)},e.prototype.showLastUpDeltas=function(){return this.lastUpDeltas},e.prototype.showLastDownDeltas=function(){return this.lastDownDeltas},e}()}).call(xe)}),_=function(){return{hasWheelEvent:"onwheel"in document,hasMouseWheelEvent:"onmousewheel"in document,hasTouch:"ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,hasTouchWin:navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints>1,hasPointer:!!window.navigator.msPointerEnabled,hasKeyDown:"onkeydown"in document,isFirefox:navigator.userAgent.indexOf("Firefox")>-1}}(),Re=Object.prototype.toString,We=Object.prototype.hasOwnProperty,He=function(n){if(!n)return console.warn("bindAll requires at least one argument.");var s=Array.prototype.slice.call(arguments,1);if(s.length===0)for(var t in n)We.call(n,t)&&typeof n[t]=="function"&&Re.call(n[t])=="[object Function]"&&s.push(t);for(var e=0;e<s.length;e++){var i=s[e];n[i]=Ye(n[i],n)}};function Ye(n,s){return function(){return n.apply(s,arguments)}}var ze=Be.Lethargy,B="virtualscroll",Ne=x,H={LEFT:37,UP:38,RIGHT:39,DOWN:40,SPACE:32};function x(n){He(this,"_onWheel","_onMouseWheel","_onTouchStart","_onTouchMove","_onKeyDown"),this.el=window,n&&n.el&&(this.el=n.el,delete n.el),this.options=Pe({mouseMultiplier:1,touchMultiplier:2,firefoxMultiplier:15,keyStep:120,preventTouch:!1,unpreventTouchClass:"vs-touchmove-allowed",limitInertia:!1,useKeyboard:!0,useTouch:!0},n),this.options.limitInertia&&(this._lethargy=new ze),this._emitter=new je,this._event={y:0,x:0,deltaX:0,deltaY:0},this.touchStartX=null,this.touchStartY=null,this.bodyTouchAction=null,this.options.passive!==void 0&&(this.listenerOptions={passive:this.options.passive})}x.prototype._notify=function(n){var s=this._event;s.x+=s.deltaX,s.y+=s.deltaY,this._emitter.emit(B,{x:s.x,y:s.y,deltaX:s.deltaX,deltaY:s.deltaY,originalEvent:n})};x.prototype._onWheel=function(n){var s=this.options;if(!(this._lethargy&&this._lethargy.check(n)===!1)){var t=this._event;t.deltaX=n.wheelDeltaX||n.deltaX*-1,t.deltaY=n.wheelDeltaY||n.deltaY*-1,_.isFirefox&&n.deltaMode==1&&(t.deltaX*=s.firefoxMultiplier,t.deltaY*=s.firefoxMultiplier),t.deltaX*=s.mouseMultiplier,t.deltaY*=s.mouseMultiplier,this._notify(n)}};x.prototype._onMouseWheel=function(n){if(!(this.options.limitInertia&&this._lethargy.check(n)===!1)){var s=this._event;s.deltaX=n.wheelDeltaX?n.wheelDeltaX:0,s.deltaY=n.wheelDeltaY?n.wheelDeltaY:n.wheelDelta,this._notify(n)}};x.prototype._onTouchStart=function(n){var s=n.targetTouches?n.targetTouches[0]:n;this.touchStartX=s.pageX,this.touchStartY=s.pageY};x.prototype._onTouchMove=function(n){var s=this.options;s.preventTouch&&!n.target.classList.contains(s.unpreventTouchClass)&&n.preventDefault();var t=this._event,e=n.targetTouches?n.targetTouches[0]:n;t.deltaX=(e.pageX-this.touchStartX)*s.touchMultiplier,t.deltaY=(e.pageY-this.touchStartY)*s.touchMultiplier,this.touchStartX=e.pageX,this.touchStartY=e.pageY,this._notify(n)};x.prototype._onKeyDown=function(n){var s=this._event;s.deltaX=s.deltaY=0;var t=window.innerHeight-40;switch(n.keyCode){case H.LEFT:case H.UP:s.deltaY=this.options.keyStep;break;case H.RIGHT:case H.DOWN:s.deltaY=-this.options.keyStep;break;case n.shiftKey:s.deltaY=t;break;case H.SPACE:s.deltaY=-t;break;default:return}this._notify(n)};x.prototype._bind=function(){_.hasWheelEvent&&this.el.addEventListener("wheel",this._onWheel,this.listenerOptions),_.hasMouseWheelEvent&&this.el.addEventListener("mousewheel",this._onMouseWheel,this.listenerOptions),_.hasTouch&&this.options.useTouch&&(this.el.addEventListener("touchstart",this._onTouchStart,this.listenerOptions),this.el.addEventListener("touchmove",this._onTouchMove,this.listenerOptions)),_.hasPointer&&_.hasTouchWin&&(this.bodyTouchAction=document.body.style.msTouchAction,document.body.style.msTouchAction="none",this.el.addEventListener("MSPointerDown",this._onTouchStart,!0),this.el.addEventListener("MSPointerMove",this._onTouchMove,!0)),_.hasKeyDown&&this.options.useKeyboard&&document.addEventListener("keydown",this._onKeyDown)};x.prototype._unbind=function(){_.hasWheelEvent&&this.el.removeEventListener("wheel",this._onWheel),_.hasMouseWheelEvent&&this.el.removeEventListener("mousewheel",this._onMouseWheel),_.hasTouch&&(this.el.removeEventListener("touchstart",this._onTouchStart),this.el.removeEventListener("touchmove",this._onTouchMove)),_.hasPointer&&_.hasTouchWin&&(document.body.style.msTouchAction=this.bodyTouchAction,this.el.removeEventListener("MSPointerDown",this._onTouchStart,!0),this.el.removeEventListener("MSPointerMove",this._onTouchMove,!0)),_.hasKeyDown&&this.options.useKeyboard&&document.removeEventListener("keydown",this._onKeyDown)};x.prototype.on=function(n,s){this._emitter.on(B,n,s);var t=this._emitter.e;t&&t[B]&&t[B].length===1&&this._bind()};x.prototype.off=function(n,s){this._emitter.off(B,n,s);var t=this._emitter.e;(!t[B]||t[B].length<=0)&&this._unbind()};x.prototype.reset=function(){var n=this._event;n.x=0,n.y=0};x.prototype.destroy=function(){this._emitter.off(),this._unbind()};function rt(n,s,t){return(1-t)*n+t*s}function O(n){var s={};if(!!window.getComputedStyle){var t=getComputedStyle(n),e=t.transform||t.webkitTransform||t.mozTransform,i=e.match(/^matrix3d\((.+)\)$/);return i?(s.x=i?parseFloat(i[1].split(", ")[12]):0,s.y=i?parseFloat(i[1].split(", ")[13]):0):(i=e.match(/^matrix\((.+)\)$/),s.x=i?parseFloat(i[1].split(", ")[4]):0,s.y=i?parseFloat(i[1].split(", ")[5]):0),s}}function ot(n){for(var s=[];n&&n!==document;n=n.parentNode)s.push(n);return s}var Ue=4,Ve=.001,qe=1e-7,Fe=10,Y=11,$=1/(Y-1),Xe=typeof Float32Array=="function";function Pt(n,s){return 1-3*s+3*n}function jt(n,s){return 3*s-6*n}function Bt(n){return 3*n}function G(n,s,t){return((Pt(s,t)*n+jt(s,t))*n+Bt(s))*n}function Rt(n,s,t){return 3*Pt(s,t)*n*n+2*jt(s,t)*n+Bt(s)}function Ke(n,s,t,e,i){var r,o,a=0;do o=s+(t-s)/2,r=G(o,e,i)-n,r>0?t=o:s=o;while(Math.abs(r)>qe&&++a<Fe);return o}function $e(n,s,t,e){for(var i=0;i<Ue;++i){var r=Rt(s,t,e);if(r===0)return s;var o=G(s,t,e)-n;s-=o/r}return s}function Ge(n){return n}var Ze=function(s,t,e,i){if(!(0<=s&&s<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(s===t&&e===i)return Ge;for(var r=Xe?new Float32Array(Y):new Array(Y),o=0;o<Y;++o)r[o]=G(o*$,s,e);function a(l){for(var c=0,f=1,u=Y-1;f!==u&&r[f]<=l;++f)c+=$;--f;var v=(l-r[f])/(r[f+1]-r[f]),h=c+v*$,m=Rt(h,s,e);return m>=Ve?$e(l,h,s,e):m===0?h:Ke(l,c,c+$,s,e)}return function(c){return c===0?0:c===1?1:G(a(c),t,i)}},P={LEFT:37,UP:38,RIGHT:39,DOWN:40,SPACE:32,TAB:9,PAGEUP:33,PAGEDOWN:34,HOME:36,END:35},Je=function(n){At(t,n);var s=_t(t);function t(){var e,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return X(this,t),history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0),e=s.call(this,i),e.inertia&&(e.lerp=e.inertia*.1),e.isScrolling=!1,e.isDraggingScrollbar=!1,e.isTicking=!1,e.hasScrollTicking=!1,e.parallaxElements={},e.stop=!1,e.scrollbarContainer=i.scrollbarContainer,e.checkKey=e.checkKey.bind(Ct(e)),window.addEventListener("keydown",e.checkKey,!1),e}return K(t,[{key:"init",value:function(){var i=this;this.html.classList.add(this.smoothClass),this.html.setAttribute("data-".concat(this.name,"-direction"),this.direction),this.instance=it({delta:{x:this.initPosition.x,y:this.initPosition.y},scroll:{x:this.initPosition.x,y:this.initPosition.y}},this.instance),this.vs=new Ne({el:this.scrollFromAnywhere?document:this.el,mouseMultiplier:navigator.platform.indexOf("Win")>-1?1:.4,firefoxMultiplier:this.firefoxMultiplier,touchMultiplier:this.touchMultiplier,useKeyboard:!1,passive:!0}),this.vs.on(function(r){i.stop||i.isDraggingScrollbar||requestAnimationFrame(function(){i.updateDelta(r),i.isScrolling||i.startScrolling()})}),this.setScrollLimit(),this.initScrollBar(),this.addSections(),this.addElements(),this.checkScroll(!0),this.transformElements(!0,!0),I(L(t.prototype),"init",this).call(this)}},{key:"setScrollLimit",value:function(){if(this.instance.limit.y=this.el.offsetHeight-this.windowHeight,this.direction==="horizontal"){for(var i=0,r=this.el.children,o=0;o<r.length;o++)i+=r[o].offsetWidth;this.instance.limit.x=i-this.windowWidth}}},{key:"startScrolling",value:function(){this.startScrollTs=Date.now(),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}},{key:"stopScrolling",value:function(){cancelAnimationFrame(this.checkScrollRaf),this.scrollToRaf&&(cancelAnimationFrame(this.scrollToRaf),this.scrollToRaf=null),this.isScrolling=!1,this.instance.scroll.y=Math.round(this.instance.scroll.y),this.html.classList.remove(this.scrollingClass)}},{key:"checkKey",value:function(i){var r=this;if(this.stop){i.keyCode==P.TAB&&requestAnimationFrame(function(){r.html.scrollTop=0,document.body.scrollTop=0,r.html.scrollLeft=0,document.body.scrollLeft=0});return}switch(i.keyCode){case P.TAB:requestAnimationFrame(function(){r.html.scrollTop=0,document.body.scrollTop=0,r.html.scrollLeft=0,document.body.scrollLeft=0,r.scrollTo(document.activeElement,{offset:-window.innerHeight/2})});break;case P.UP:this.instance.delta[this.directionAxis]-=240;break;case P.DOWN:this.instance.delta[this.directionAxis]+=240;break;case P.PAGEUP:this.instance.delta[this.directionAxis]-=window.innerHeight;break;case P.PAGEDOWN:this.instance.delta[this.directionAxis]+=window.innerHeight;break;case P.HOME:this.instance.delta[this.directionAxis]-=this.instance.limit[this.directionAxis];break;case P.END:this.instance.delta[this.directionAxis]+=this.instance.limit[this.directionAxis];break;case P.SPACE:!(document.activeElement instanceof HTMLInputElement)&&!(document.activeElement instanceof HTMLTextAreaElement)&&(i.shiftKey?this.instance.delta[this.directionAxis]-=window.innerHeight:this.instance.delta[this.directionAxis]+=window.innerHeight);break;default:return}this.instance.delta[this.directionAxis]<0&&(this.instance.delta[this.directionAxis]=0),this.instance.delta[this.directionAxis]>this.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis]),this.stopScrolling(),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}},{key:"checkScroll",value:function(){var i=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(r||this.isScrolling||this.isDraggingScrollbar){this.hasScrollTicking||(this.checkScrollRaf=requestAnimationFrame(function(){return i.checkScroll()}),this.hasScrollTicking=!0),this.updateScroll();var o=Math.abs(this.instance.delta[this.directionAxis]-this.instance.scroll[this.directionAxis]),a=Date.now()-this.startScrollTs;if(!this.animatingScroll&&a>100&&(o<.5&&this.instance.delta[this.directionAxis]!=0||o<.5&&this.instance.delta[this.directionAxis]==0)&&this.stopScrolling(),Object.entries(this.sections).forEach(function(c){var f=R(c,2),u=f[0],v=f[1];v.persistent||i.instance.scroll[i.directionAxis]>v.offset[i.directionAxis]&&i.instance.scroll[i.directionAxis]<v.limit[i.directionAxis]?(i.direction==="horizontal"?i.transform(v.el,-i.instance.scroll[i.directionAxis],0):i.transform(v.el,0,-i.instance.scroll[i.directionAxis]),v.inView||(v.inView=!0,v.el.style.opacity=1,v.el.style.pointerEvents="all",v.el.setAttribute("data-".concat(i.name,"-section-inview"),""))):((v.inView||r)&&(v.inView=!1,v.el.style.opacity=0,v.el.style.pointerEvents="none",v.el.removeAttribute("data-".concat(i.name,"-section-inview"))),i.transform(v.el,0,0))}),this.getDirection&&this.addDirection(),this.getSpeed&&(this.addSpeed(),this.speedTs=Date.now()),this.detectElements(),this.transformElements(),this.hasScrollbar){var l=this.instance.scroll[this.directionAxis]/this.instance.limit[this.directionAxis]*this.scrollBarLimit[this.directionAxis];this.direction==="horizontal"?this.transform(this.scrollbarThumb,l,0):this.transform(this.scrollbarThumb,0,l)}I(L(t.prototype),"checkScroll",this).call(this),this.hasScrollTicking=!1}}},{key:"resize",value:function(){this.windowHeight=window.innerHeight,this.windowWidth=window.innerWidth,this.checkContext(),this.windowMiddle={x:this.windowWidth/2,y:this.windowHeight/2},this.update()}},{key:"updateDelta",value:function(i){var r,o=this[this.context]&&this[this.context].gestureDirection?this[this.context].gestureDirection:this.gestureDirection;o==="both"?r=i.deltaX+i.deltaY:o==="vertical"?r=i.deltaY:o==="horizontal"?r=i.deltaX:r=i.deltaY,this.instance.delta[this.directionAxis]-=r*this.multiplier,this.instance.delta[this.directionAxis]<0&&(this.instance.delta[this.directionAxis]=0),this.instance.delta[this.directionAxis]>this.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis])}},{key:"updateScroll",value:function(i){this.isScrolling||this.isDraggingScrollbar?this.instance.scroll[this.directionAxis]=rt(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis],this.lerp):this.instance.scroll[this.directionAxis]>this.instance.limit[this.directionAxis]?this.setScroll(this.instance.scroll[this.directionAxis],this.instance.limit[this.directionAxis]):this.instance.scroll.y<0?this.setScroll(this.instance.scroll[this.directionAxis],0):this.setScroll(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis])}},{key:"addDirection",value:function(){this.instance.delta.y>this.instance.scroll.y?this.instance.direction!=="down"&&(this.instance.direction="down"):this.instance.delta.y<this.instance.scroll.y&&this.instance.direction!=="up"&&(this.instance.direction="up"),this.instance.delta.x>this.instance.scroll.x?this.instance.direction!=="right"&&(this.instance.direction="right"):this.instance.delta.x<this.instance.scroll.x&&this.instance.direction!=="left"&&(this.instance.direction="left")}},{key:"addSpeed",value:function(){this.instance.delta[this.directionAxis]!=this.instance.scroll[this.directionAxis]?this.instance.speed=(this.instance.delta[this.directionAxis]-this.instance.scroll[this.directionAxis])/Math.max(1,Date.now()-this.speedTs):this.instance.speed=0}},{key:"initScrollBar",value:function(){if(this.scrollbar=document.createElement("span"),this.scrollbarThumb=document.createElement("span"),this.scrollbar.classList.add("".concat(this.scrollbarClass)),this.scrollbarThumb.classList.add("".concat(this.scrollbarClass,"_thumb")),this.scrollbar.append(this.scrollbarThumb),this.scrollbarContainer?this.scrollbarContainer.append(this.scrollbar):document.body.append(this.scrollbar),this.getScrollBar=this.getScrollBar.bind(this),this.releaseScrollBar=this.releaseScrollBar.bind(this),this.moveScrollBar=this.moveScrollBar.bind(this),this.scrollbarThumb.addEventListener("mousedown",this.getScrollBar),window.addEventListener("mouseup",this.releaseScrollBar),window.addEventListener("mousemove",this.moveScrollBar),this.hasScrollbar=!1,this.direction=="horizontal"){if(this.instance.limit.x+this.windowWidth<=this.windowWidth)return}else if(this.instance.limit.y+this.windowHeight<=this.windowHeight)return;this.hasScrollbar=!0,this.scrollbarBCR=this.scrollbar.getBoundingClientRect(),this.scrollbarHeight=this.scrollbarBCR.height,this.scrollbarWidth=this.scrollbarBCR.width,this.direction==="horizontal"?this.scrollbarThumb.style.width="".concat(this.scrollbarWidth*this.scrollbarWidth/(this.instance.limit.x+this.scrollbarWidth),"px"):this.scrollbarThumb.style.height="".concat(this.scrollbarHeight*this.scrollbarHeight/(this.instance.limit.y+this.scrollbarHeight),"px"),this.scrollbarThumbBCR=this.scrollbarThumb.getBoundingClientRect(),this.scrollBarLimit={x:this.scrollbarWidth-this.scrollbarThumbBCR.width,y:this.scrollbarHeight-this.scrollbarThumbBCR.height}}},{key:"reinitScrollBar",value:function(){if(this.hasScrollbar=!1,this.direction=="horizontal"){if(this.instance.limit.x+this.windowWidth<=this.windowWidth)return}else if(this.instance.limit.y+this.windowHeight<=this.windowHeight)return;this.hasScrollbar=!0,this.scrollbarBCR=this.scrollbar.getBoundingClientRect(),this.scrollbarHeight=this.scrollbarBCR.height,this.scrollbarWidth=this.scrollbarBCR.width,this.direction==="horizontal"?this.scrollbarThumb.style.width="".concat(this.scrollbarWidth*this.scrollbarWidth/(this.instance.limit.x+this.scrollbarWidth),"px"):this.scrollbarThumb.style.height="".concat(this.scrollbarHeight*this.scrollbarHeight/(this.instance.limit.y+this.scrollbarHeight),"px"),this.scrollbarThumbBCR=this.scrollbarThumb.getBoundingClientRect(),this.scrollBarLimit={x:this.scrollbarWidth-this.scrollbarThumbBCR.width,y:this.scrollbarHeight-this.scrollbarThumbBCR.height}}},{key:"destroyScrollBar",value:function(){this.scrollbarThumb.removeEventListener("mousedown",this.getScrollBar),window.removeEventListener("mouseup",this.releaseScrollBar),window.removeEventListener("mousemove",this.moveScrollBar),this.scrollbar.remove()}},{key:"getScrollBar",value:function(i){this.isDraggingScrollbar=!0,this.checkScroll(),this.html.classList.remove(this.scrollingClass),this.html.classList.add(this.draggingClass)}},{key:"releaseScrollBar",value:function(i){this.isDraggingScrollbar=!1,this.html.classList.add(this.scrollingClass),this.html.classList.remove(this.draggingClass)}},{key:"moveScrollBar",value:function(i){var r=this;this.isDraggingScrollbar&&requestAnimationFrame(function(){var o=(i.clientX-r.scrollbarBCR.left)*100/r.scrollbarWidth*r.instance.limit.x/100,a=(i.clientY-r.scrollbarBCR.top)*100/r.scrollbarHeight*r.instance.limit.y/100;a>0&&a<r.instance.limit.y&&(r.instance.delta.y=a),o>0&&o<r.instance.limit.x&&(r.instance.delta.x=o)})}},{key:"addElements",value:function(){var i=this;this.els={},this.parallaxElements={};var r=this.el.querySelectorAll("[data-".concat(this.name,"]"));r.forEach(function(o,a){var l=ot(o),c=Object.entries(i.sections).map(function(Q){var ft=R(Q,2),ti=ft[0],qt=ft[1];return qt}).find(function(Q){return l.includes(Q.el)}),f=o.dataset[i.name+"Class"]||i.class,u=typeof o.dataset[i.name+"Id"]=="string"?o.dataset[i.name+"Id"]:"el"+a,v,h,m=o.dataset[i.name+"Repeat"],C=o.dataset[i.name+"Call"],D=o.dataset[i.name+"Position"],A=o.dataset[i.name+"Delay"],E=o.dataset[i.name+"Direction"],w=typeof o.dataset[i.name+"Sticky"]=="string",d=o.dataset[i.name+"Speed"]?parseFloat(o.dataset[i.name+"Speed"])/10:!1,p=typeof o.dataset[i.name+"Offset"]=="string"?o.dataset[i.name+"Offset"].split(","):i.offset,b=o.dataset[i.name+"Target"],y;b!==void 0?y=document.querySelector("".concat(b)):y=o;var T=y.getBoundingClientRect();c===null||c.inView?(v=T.top+i.instance.scroll.y-O(y).y,h=T.left+i.instance.scroll.x-O(y).x):(v=T.top-O(c.el).y-O(y).y,h=T.left-O(c.el).x-O(y).x);var g=v+y.offsetHeight,S=h+y.offsetWidth,j={x:(S-h)/2+h,y:(g-v)/2+v};if(w){var J=o.getBoundingClientRect(),N=J.top,ct=J.left,ht={x:ct-h,y:N-v};v+=window.innerHeight,h+=window.innerWidth,g=N+y.offsetHeight-o.offsetHeight-ht[i.directionAxis],S=ct+y.offsetWidth-o.offsetWidth-ht[i.directionAxis],j={x:(S-h)/2+h,y:(g-v)/2+v}}m=="false"?m=!1:m!=null?m=!0:m=i.repeat;var M=[0,0];if(p)if(i.direction==="horizontal"){for(var k=0;k<p.length;k++)typeof p[k]=="string"?p[k].includes("%")?M[k]=parseInt(p[k].replace("%","")*i.windowWidth/100):M[k]=parseInt(p[k]):M[k]=p[k];h=h+M[0],S=S-M[1]}else{for(var k=0;k<p.length;k++)typeof p[k]=="string"?p[k].includes("%")?M[k]=parseInt(p[k].replace("%","")*i.windowHeight/100):M[k]=parseInt(p[k]):M[k]=p[k];v=v+M[0],g=g-M[1]}var ut={el:o,id:u,class:f,section:c,top:v,middle:j,bottom:g,left:h,right:S,offset:p,progress:0,repeat:m,inView:!1,call:C,speed:d,delay:A,position:D,target:y,direction:E,sticky:w};i.els[u]=ut,o.classList.contains(f)&&i.setInView(i.els[u],u),(d!==!1||w)&&(i.parallaxElements[u]=ut)})}},{key:"addSections",value:function(){var i=this;this.sections={};var r=this.el.querySelectorAll("[data-".concat(this.name,"-section]"));r.length===0&&(r=[this.el]),r.forEach(function(o,a){var l=typeof o.dataset[i.name+"Id"]=="string"?o.dataset[i.name+"Id"]:"section"+a,c=o.getBoundingClientRect(),f={x:c.left-window.innerWidth*1.5-O(o).x,y:c.top-window.innerHeight*1.5-O(o).y},u={x:f.x+c.width+window.innerWidth*2,y:f.y+c.height+window.innerHeight*2},v=typeof o.dataset[i.name+"Persistent"]=="string";o.setAttribute("data-scroll-section-id",l);var h={el:o,offset:f,limit:u,inView:!1,persistent:v,id:l};i.sections[l]=h})}},{key:"transform",value:function(i,r,o,a){var l;if(!a)l="matrix3d(1,0,0.00,0,0.00,1,0.00,0,0,0,1,0,".concat(r,",").concat(o,",0,1)");else{var c=O(i),f=rt(c.x,r,a),u=rt(c.y,o,a);l="matrix3d(1,0,0.00,0,0.00,1,0.00,0,0,0,1,0,".concat(f,",").concat(u,",0,1)")}i.style.webkitTransform=l,i.style.msTransform=l,i.style.transform=l}},{key:"transformElements",value:function(i){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.instance.scroll.x+this.windowWidth,l=this.instance.scroll.y+this.windowHeight,c={x:this.instance.scroll.x+this.windowMiddle.x,y:this.instance.scroll.y+this.windowMiddle.y};Object.entries(this.parallaxElements).forEach(function(f){var u=R(f,2),v=u[0],h=u[1],m=!1;if(i&&(m=0),h.inView||o)switch(h.position){case"top":m=r.instance.scroll[r.directionAxis]*-h.speed;break;case"elementTop":m=(l-h.top)*-h.speed;break;case"bottom":m=(r.instance.limit[r.directionAxis]-l+r.windowHeight)*h.speed;break;case"left":m=r.instance.scroll[r.directionAxis]*-h.speed;break;case"elementLeft":m=(a-h.left)*-h.speed;break;case"right":m=(r.instance.limit[r.directionAxis]-a+r.windowHeight)*h.speed;break;default:m=(c[r.directionAxis]-h.middle[r.directionAxis])*-h.speed;break}h.sticky&&(h.inView?r.direction==="horizontal"?m=r.instance.scroll.x-h.left+window.innerWidth:m=r.instance.scroll.y-h.top+window.innerHeight:r.direction==="horizontal"?r.instance.scroll.x<h.left-window.innerWidth&&r.instance.scroll.x<h.left-window.innerWidth/2?m=0:r.instance.scroll.x>h.right&&r.instance.scroll.x>h.right+100?m=h.right-h.left+window.innerWidth:m=!1:r.instance.scroll.y<h.top-window.innerHeight&&r.instance.scroll.y<h.top-window.innerHeight/2?m=0:r.instance.scroll.y>h.bottom&&r.instance.scroll.y>h.bottom+100?m=h.bottom-h.top+window.innerHeight:m=!1),m!==!1&&(h.direction==="horizontal"||r.direction==="horizontal"&&h.direction!=="vertical"?r.transform(h.el,m,0,i?!1:h.delay):r.transform(h.el,0,m,i?!1:h.delay))})}},{key:"scrollTo",value:function(i){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=parseInt(o.offset)||0,l=isNaN(parseInt(o.duration))?1e3:parseInt(o.duration),c=o.easing||[.25,0,.35,1],f=!!o.disableLerp,u=o.callback?o.callback:!1;if(c=Ze.apply(void 0,Se(c)),typeof i=="string"){if(i==="top")i=0;else if(i==="bottom")i=this.instance.limit.y;else if(i==="left")i=0;else if(i==="right")i=this.instance.limit.x;else if(i=document.querySelector(i),!i)return}else if(typeof i=="number")i=parseInt(i);else if(!(i&&i.tagName)){console.warn("`target` parameter is not valid");return}if(typeof i!="number"){var v=ot(i).includes(this.el);if(!v)return;var h=i.getBoundingClientRect(),m=h.top,C=h.left,D=ot(i),A=D.find(function(g){return Object.entries(r.sections).map(function(S){var j=R(S,2),J=j[0],N=j[1];return N}).find(function(S){return S.el==g})}),E=0;A?E=O(A)[this.directionAxis]:E=-this.instance.scroll[this.directionAxis],this.direction==="horizontal"?a=C+a-E:a=m+a-E}else a=i+a;var w=parseFloat(this.instance.delta[this.directionAxis]),d=Math.max(0,Math.min(a,this.instance.limit[this.directionAxis])),p=d-w,b=function(S){f?r.direction==="horizontal"?r.setScroll(w+p*S,r.instance.delta.y):r.setScroll(r.instance.delta.x,w+p*S):r.instance.delta[r.directionAxis]=w+p*S};this.animatingScroll=!0,this.stopScrolling(),this.startScrolling();var y=Date.now(),T=function g(){var S=(Date.now()-y)/l;S>1?(b(1),r.animatingScroll=!1,l==0&&r.update(),u&&u()):(r.scrollToRaf=requestAnimationFrame(g),b(c(S)))};T()}},{key:"update",value:function(){this.setScrollLimit(),this.addSections(),this.addElements(),this.detectElements(),this.updateScroll(),this.transformElements(!0),this.reinitScrollBar(),this.checkScroll(!0)}},{key:"startScroll",value:function(){this.stop=!1}},{key:"stopScroll",value:function(){this.stop=!0}},{key:"setScroll",value:function(i,r){this.instance=it(it({},this.instance),{},{scroll:{x:i,y:r},delta:{x:i,y:r},speed:0})}},{key:"destroy",value:function(){I(L(t.prototype),"destroy",this).call(this),this.stopScrolling(),this.html.classList.remove(this.smoothClass),this.vs.destroy(),this.destroyScrollBar(),window.removeEventListener("keydown",this.checkKey,!1)}}]),t}(Ot),Qe=function(){function n(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};X(this,n),this.options=s,Object.assign(this,W,s),this.smartphone=W.smartphone,s.smartphone&&Object.assign(this.smartphone,s.smartphone),this.tablet=W.tablet,s.tablet&&Object.assign(this.tablet,s.tablet),!this.smooth&&this.direction=="horizontal"&&console.warn("\u{1F6A8} `smooth:false` & `horizontal` direction are not yet compatible"),!this.tablet.smooth&&this.tablet.direction=="horizontal"&&console.warn("\u{1F6A8} `smooth:false` & `horizontal` direction are not yet compatible (tablet)"),!this.smartphone.smooth&&this.smartphone.direction=="horizontal"&&console.warn("\u{1F6A8} `smooth:false` & `horizontal` direction are not yet compatible (smartphone)"),this.init()}return K(n,[{key:"init",value:function(){if(this.options.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1||window.innerWidth<this.tablet.breakpoint,this.options.isTablet=this.options.isMobile&&window.innerWidth>=this.tablet.breakpoint,this.smooth&&!this.options.isMobile||this.tablet.smooth&&this.options.isTablet||this.smartphone.smooth&&this.options.isMobile&&!this.options.isTablet?this.scroll=new Je(this.options):this.scroll=new Oe(this.options),this.scroll.init(),window.location.hash){var t=window.location.hash.slice(1,window.location.hash.length),e=document.getElementById(t);e&&this.scroll.scrollTo(e)}}},{key:"update",value:function(){this.scroll.update()}},{key:"start",value:function(){this.scroll.startScroll()}},{key:"stop",value:function(){this.scroll.stopScroll()}},{key:"scrollTo",value:function(t,e){this.scroll.scrollTo(t,e)}},{key:"setScroll",value:function(t,e){this.scroll.setScroll(t,e)}},{key:"on",value:function(t,e){this.scroll.setEvents(t,e)}},{key:"off",value:function(t,e){this.scroll.unsetEvents(t,e)}},{key:"destroy",value:function(){this.scroll.destroy()}}]),n}();var Wt=Qe;var at=class extends F{constructor(n){super(n)}init(){this.scroll=new Wt({el:this.el,smooth:!0}),this.scroll.on("call",(n,s,t,e)=>{this.call(n[0],{way:s,obj:t},n[1],n[2])}),this.scroll.on("scroll",n=>{})}toggleLazy(n){let s=this.getData("lazy",n.obj.el);s.length&&(n.obj.el.tagName==="IMG"?n.obj.el.src=s:n.obj.el.style.backgroundImage=`url('${s}')`,this.setData("lazy","",n.obj.el))}destroy(){this.scroll.destroy()}};var zt=te(Yt());function Nt(){(0,zt.default)()}var z=document.documentElement,mi=document.body,yi=z.hasAttribute("data-debug");var Ut=new bt({modules:lt});window.onload=n=>{let s=document.getElementById("main-css");s?s.isLoaded?Vt():s.addEventListener("load",t=>{Vt()}):console.warn('The "main-css" stylesheet not found')};function Vt(){Nt(),Ut.init(Ut),z.classList.add("is-loaded"),z.classList.add("is-ready"),z.classList.remove("is-loading")}})();
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*! svg4everybody v2.1.9 | github.com/jonathantneal/svg4everybody */
//# sourceMappingURL=app.js.map