You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
8.1 KiB
1 lines
8.1 KiB
(function(){var n,f,i,r,u,t=function(n,t){return function(){return n.apply(t,arguments)}},e=[].indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===n)return t;return-1};f=function(){function n(){}return n.prototype.extend=function(n,t){var i,r;for(i in t)r=t[i],n[i]==null&&(n[i]=r);return n},n.prototype.isMobile=function(n){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(n)},n.prototype.createEvent=function(n,t,i,r){var u;return t==null&&(t=!1),i==null&&(i=!1),r==null&&(r=null),document.createEvent!=null?(u=document.createEvent("CustomEvent"),u.initCustomEvent(n,t,i,r)):document.createEventObject!=null?(u=document.createEventObject(),u.eventType=n):u.eventName=n,u},n.prototype.emitEvent=function(n,t){return n.dispatchEvent!=null?n.dispatchEvent(t):t in(n!=null)?n[t]():"on"+t in(n!=null)?n["on"+t]():void 0},n.prototype.addEvent=function(n,t,i){return n.addEventListener!=null?n.addEventListener(t,i,!1):n.attachEvent!=null?n.attachEvent("on"+t,i):n[t]=i},n.prototype.removeEvent=function(n,t,i){return n.removeEventListener!=null?n.removeEventListener(t,i,!1):n.detachEvent!=null?n.detachEvent("on"+t,i):delete n[t]},n.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},n}();i=this.WeakMap||this.MozWeakMap||(i=function(){function n(){this.keys=[];this.values=[]}return n.prototype.get=function(n){var t,u,i,f,r;for(r=this.keys,t=i=0,f=r.length;i<f;t=++i)if(u=r[t],u===n)return this.values[t]},n.prototype.set=function(n,t){var i,f,r,e,u;for(u=this.keys,i=r=0,e=u.length;r<e;i=++r)if(f=u[i],f===n){this.values[i]=t;return}return this.keys.push(n),this.values.push(t)},n}());n=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(n=function(){function n(){typeof console!="undefined"&&console!==null&&console.warn("MutationObserver is not supported by your browser.");typeof console!="undefined"&&console!==null&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return n.notSupported=!0,n.prototype.observe=function(){},n}());r=this.getComputedStyle||function(n){return this.getPropertyValue=function(t){var i;return t==="float"&&(t="styleFloat"),u.test(t)&&t.replace(u,function(n,t){return t.toUpperCase()}),((i=n.currentStyle)!=null?i[t]:void 0)||null},this};u=/(\-([a-z]){1})/g;this.WOW=function(){function u(n){n==null&&(n={});this.scrollCallback=t(this.scrollCallback,this);this.scrollHandler=t(this.scrollHandler,this);this.resetAnimation=t(this.resetAnimation,this);this.start=t(this.start,this);this.scrolled=!0;this.config=this.util().extend(n,this.defaults);n.scrollContainer!=null&&(this.config.scrollContainer=document.querySelector(n.scrollContainer));this.animationNameCache=new i;this.wowEvent=this.util().createEvent(this.config.boxClass)}return u.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},u.prototype.init=function(){var n;return this.element=window.document.documentElement,(n=document.readyState)==="interactive"||n==="complete"?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},u.prototype.start=function(){var t,i,u,r;if(this.stopped=!1,this.boxes=function(){var n,u,i,r;for(i=this.element.querySelectorAll("."+this.config.boxClass),r=[],n=0,u=i.length;n<u;n++)t=i[n],r.push(t);return r}.call(this),this.all=function(){var n,u,i,r;for(i=this.boxes,r=[],n=0,u=i.length;n<u;n++)t=i[n],r.push(t);return r}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(r=this.boxes,i=0,u=r.length;i<u;i++)t=r[i],this.applyStyle(t,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new n(function(n){return function(t){var i,u,f,e,r;for(r=[],i=0,u=t.length;i<u;i++)e=t[i],r.push(function(){var n,r,t,i;for(t=e.addedNodes||[],i=[],n=0,r=t.length;n<r;n++)f=t[n],i.push(this.doSync(f));return i}.call(n));return r}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},u.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),this.interval!=null?clearInterval(this.interval):void 0},u.prototype.sync=function(){if(n.notSupported)return this.doSync(this.element)},u.prototype.doSync=function(n){var t,i,f,u,r;if(n==null&&(n=this.element),n.nodeType===1){for(n=n.parentNode||n,u=n.querySelectorAll("."+this.config.boxClass),r=[],i=0,f=u.length;i<f;i++)t=u[i],e.call(this.all,t)<0?(this.boxes.push(t),this.all.push(t),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(t,!0),r.push(this.scrolled=!0)):r.push(void 0);return r}},u.prototype.show=function(n){return this.applyStyle(n),n.className=n.className+" "+this.config.animateClass,this.config.callback!=null&&this.config.callback(n),this.util().emitEvent(n,this.wowEvent),this.util().addEvent(n,"animationend",this.resetAnimation),this.util().addEvent(n,"oanimationend",this.resetAnimation),this.util().addEvent(n,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(n,"MSAnimationEnd",this.resetAnimation),n},u.prototype.applyStyle=function(n,t){var i,r,u;return r=n.getAttribute("data-wow-duration"),i=n.getAttribute("data-wow-delay"),u=n.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(n,t,r,i,u)}}(this))},u.prototype.animate=function(){return"requestAnimationFrame"in window?function(n){return window.requestAnimationFrame(n)}:function(n){return n()}}(),u.prototype.resetStyle=function(){var r,n,u,t,i;for(t=this.boxes,i=[],n=0,u=t.length;n<u;n++)r=t[n],i.push(r.style.visibility="visible");return i},u.prototype.resetAnimation=function(n){var t;if(n.type.toLowerCase().indexOf("animationend")>=0)return t=n.target||n.srcElement,t.className=t.className.replace(this.config.animateClass,"").trim()},u.prototype.customStyle=function(n,t,i,r,u){return t&&this.cacheAnimationName(n),n.style.visibility=t?"hidden":"visible",i&&this.vendorSet(n.style,{animationDuration:i}),r&&this.vendorSet(n.style,{animationDelay:r}),u&&this.vendorSet(n.style,{animationIterationCount:u}),this.vendorSet(n.style,{animationName:t?"none":this.cachedAnimationName(n)}),n},u.prototype.vendors=["moz","webkit"],u.prototype.vendorSet=function(n,t){var i,r,u,f;r=[];for(i in t)u=t[i],n[""+i]=u,r.push(function(){var t,o,r,e;for(r=this.vendors,e=[],t=0,o=r.length;t<o;t++)f=r[t],e.push(n[""+f+i.charAt(0).toUpperCase()+i.substr(1)]=u);return e}.call(this));return r},u.prototype.vendorCSS=function(n,t){var i,o,f,u,e,s;for(e=r(n),u=e.getPropertyCSSValue(t),f=this.vendors,i=0,o=f.length;i<o;i++)s=f[i],u=u||e.getPropertyCSSValue("-"+s+"-"+t);return u},u.prototype.animationName=function(n){var t;try{t=this.vendorCSS(n,"animation-name").cssText}catch(i){t=r(n).getPropertyValue("animation-name")}return t==="none"?"":t},u.prototype.cacheAnimationName=function(n){return this.animationNameCache.set(n,this.animationName(n))},u.prototype.cachedAnimationName=function(n){return this.animationNameCache.get(n)},u.prototype.scrollHandler=function(){return this.scrolled=!0},u.prototype.scrollCallback=function(){var n;if(this.scrolled&&(this.scrolled=!1,this.boxes=function(){var t,u,i,r;for(i=this.boxes,r=[],t=0,u=i.length;t<u;t++)if(n=i[t],n){if(this.isVisible(n)){this.show(n);continue}r.push(n)}return r}.call(this),!(this.boxes.length||this.config.live)))return this.stop()},u.prototype.offsetTop=function(n){for(var t;n.offsetTop===void 0;)n=n.parentNode;for(t=n.offsetTop;n=n.offsetParent;)t+=n.offsetTop;return t},u.prototype.isVisible=function(n){var r,u,t,f,i;return u=n.getAttribute("data-wow-offset")||this.config.offset,i=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,f=i+Math.min(this.element.clientHeight,this.util().innerHeight())-u,t=this.offsetTop(n),r=t+n.clientHeight,t<=f&&r>=i},u.prototype.util=function(){return this._util!=null?this._util:this._util=new f},u.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},u}()}).call(this);
|