No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

3 líneas
8.3 KiB

  1. /*! WOW - v1.1.3 - 2016-05-06
  2. * Copyright (c) 2016 Matthieu Aussaguel;*/(function(){var c,g,f,v,m,d=function(o,t){return function(){return o.apply(t,arguments)}},S=[].indexOf||function(o){for(var t=0,e=this.length;e>t;t++)if(t in this&&this[t]===o)return t;return-1};g=function(){function o(){}return o.prototype.extend=function(t,e){var n,r;for(n in e)r=e[n],t[n]==null&&(t[n]=r);return t},o.prototype.isMobile=function(t){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t)},o.prototype.createEvent=function(t,e,n,r){var i;return e==null&&(e=!1),n==null&&(n=!1),r==null&&(r=null),document.createEvent!=null?(i=document.createEvent("CustomEvent")).initCustomEvent(t,e,n,r):document.createEventObject!=null?(i=document.createEventObject(),i.eventType=t):i.eventName=t,i},o.prototype.emitEvent=function(t,e){return t.dispatchEvent!=null?t.dispatchEvent(e):e in(t!=null)?t[e]():"on"+e in(t!=null)?t["on"+e]():void 0},o.prototype.addEvent=function(t,e,n){return t.addEventListener!=null?t.addEventListener(e,n,!1):t.attachEvent!=null?t.attachEvent("on"+e,n):t[e]=n},o.prototype.removeEvent=function(t,e,n){return t.removeEventListener!=null?t.removeEventListener(e,n,!1):t.detachEvent!=null?t.detachEvent("on"+e,n):delete t[e]},o.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},o}(),f=this.WeakMap||this.MozWeakMap||(f=function(){function o(){this.keys=[],this.values=[]}return o.prototype.get=function(t){var e,n,r,i;for(e=n=0,r=(i=this.keys).length;r>n;e=++n)if(i[e]===t)return this.values[e]},o.prototype.set=function(t,e){var n,r,i,s;for(n=r=0,i=(s=this.keys).length;i>r;n=++r)if(s[n]===t)return void(this.values[n]=e);return this.keys.push(t),this.values.push(e)},o}()),c=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(c=function(){function o(){typeof console<"u"&&console!==null&&console.warn("MutationObserver is not supported by your browser."),typeof console<"u"&&console!==null&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return o.notSupported=!0,o.prototype.observe=function(){},o}()),v=this.getComputedStyle||function(o,t){return this.getPropertyValue=function(e){var n;return e==="float"&&(e="styleFloat"),m.test(e)&&e.replace(m,function(r,i){return i.toUpperCase()}),((n=o.currentStyle)!=null?n[e]:void 0)||null},this},m=/(\-([a-z]){1})/g,this.WOW=function(){function o(t){t==null&&(t={}),this.scrollCallback=d(this.scrollCallback,this),this.scrollHandler=d(this.scrollHandler,this),this.resetAnimation=d(this.resetAnimation,this),this.start=d(this.start,this),this.scrolled=!0,this.config=this.util().extend(t,this.defaults),t.scrollContainer!=null&&(this.config.scrollContainer=document.querySelector(t.scrollContainer)),this.animationNameCache=new f,this.wowEvent=this.util().createEvent(this.config.boxClass)}return o.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},o.prototype.init=function(){var t;return this.element=window.document.documentElement,(t=document.readyState)==="interactive"||t==="complete"?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},o.prototype.start=function(){var t,e,n,r;if(this.stopped=!1,this.boxes=(function(){var i,s,l,a;for(a=[],i=0,s=(l=this.element.querySelectorAll("."+this.config.boxClass)).length;s>i;i++)t=l[i],a.push(t);return a}).call(this),this.all=(function(){var i,s,l,a;for(a=[],i=0,s=(l=this.boxes).length;s>i;i++)t=l[i],a.push(t);return a}).call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(r=this.boxes,e=0,n=r.length;n>e;e++)t=r[e],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 c(function(i){return function(s){var l,a,h,u,y;for(y=[],l=0,a=s.length;a>l;l++)u=s[l],y.push((function(){var p,w,E,b;for(b=[],p=0,w=(E=u.addedNodes||[]).length;w>p;p++)h=E[p],b.push(this.doSync(h));return b}).call(i));return y}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},o.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},o.prototype.sync=function(t){return c.notSupported?this.doSync(this.element):void 0},o.prototype.doSync=function(t){var e,n,r,i,s;if(t==null&&(t=this.element),t.nodeType===1){for(s=[],n=0,r=(i=(t=t.parentNode||t).querySelectorAll("."+this.config.boxClass)).length;r>n;n++)e=i[n],S.call(this.all,e)<0?(this.boxes.push(e),this.all.push(e),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(e,!0),s.push(this.scrolled=!0)):s.push(void 0);return s}},o.prototype.show=function(t){return this.applyStyle(t),t.className=t.className+" "+this.config.animateClass,this.config.callback!=null&&this.config.callback(t),this.util().emitEvent(t,this.wowEvent),this.util().addEvent(t,"animationend",this.resetAnimation),this.util().addEvent(t,"oanimationend",this.resetAnimation),this.util().addEvent(t,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(t,"MSAnimationEnd",this.resetAnimation),t},o.prototype.applyStyle=function(t,e){var n,r,i;return r=t.getAttribute("data-wow-duration"),n=t.getAttribute("data-wow-delay"),i=t.getAttribute("data-wow-iteration"),this.animate(function(s){return function(){return s.customStyle(t,e,r,n,i)}}(this))},o.prototype.animate="requestAnimationFrame"in window?function(t){return window.requestAnimationFrame(t)}:function(t){return t()},o.prototype.resetStyle=function(){var t,e,n,r,i;for(i=[],e=0,n=(r=this.boxes).length;n>e;e++)t=r[e],i.push(t.style.visibility="visible");return i},o.prototype.resetAnimation=function(t){var e;return t.type.toLowerCase().indexOf("animationend")>=0?(e=t.target||t.srcElement,e.className=e.className.replace(this.config.animateClass,"").trim()):void 0},o.prototype.customStyle=function(t,e,n,r,i){return e&&this.cacheAnimationName(t),t.style.visibility=e?"hidden":"visible",n&&this.vendorSet(t.style,{animationDuration:n}),r&&this.vendorSet(t.style,{animationDelay:r}),i&&this.vendorSet(t.style,{animationIterationCount:i}),this.vendorSet(t.style,{animationName:e?"none":this.cachedAnimationName(t)}),t},o.prototype.vendors=["moz","webkit"],o.prototype.vendorSet=function(t,e){var n,r,i,s;r=[];for(n in e)i=e[n],t[""+n]=i,r.push((function(){var l,a,h,u;for(u=[],l=0,a=(h=this.vendors).length;a>l;l++)s=h[l],u.push(t[""+s+n.charAt(0).toUpperCase()+n.substr(1)]=i);return u}).call(this));return r},o.prototype.vendorCSS=function(t,e){var n,r,i,s,l,a;for(s=(l=v(t)).getPropertyCSSValue(e),n=0,r=(i=this.vendors).length;r>n;n++)a=i[n],s=s||l.getPropertyCSSValue("-"+a+"-"+e);return s},o.prototype.animationName=function(t){var e;try{e=this.vendorCSS(t,"animation-name").cssText}catch{e=v(t).getPropertyValue("animation-name")}return e==="none"?"":e},o.prototype.cacheAnimationName=function(t){return this.animationNameCache.set(t,this.animationName(t))},o.prototype.cachedAnimationName=function(t){return this.animationNameCache.get(t)},o.prototype.scrollHandler=function(){return this.scrolled=!0},o.prototype.scrollCallback=function(){var t;return!this.scrolled||(this.scrolled=!1,this.boxes=(function(){var e,n,r,i;for(i=[],e=0,n=(r=this.boxes).length;n>e;e++)(t=r[e])&&(this.isVisible(t)?this.show(t):i.push(t));return i}).call(this),this.boxes.length||this.config.live)?void 0:this.stop()},o.prototype.offsetTop=function(t){for(var e;t.offsetTop===void 0;)t=t.parentNode;for(e=t.offsetTop;t=t.offsetParent;)e+=t.offsetTop;return e},o.prototype.isVisible=function(t){var e,n,r,i,s;return n=t.getAttribute("data-wow-offset")||this.config.offset,s=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,i=s+Math.min(this.element.clientHeight,this.util().innerHeight())-n,r=this.offsetTop(t),e=r+t.clientHeight,i>=r&&e>=s},o.prototype.util=function(){return this._util!=null?this._util:this._util=new g},o.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},o.prototype.removeBox=function(t){var e=this.boxes.indexOf(t);e>-1&&this.boxes.splice(e,1)},o}()}).call(globalThis);