Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 

4 lignes
8.0 KiB

  1. var H=(h,r)=>()=>(r||h((r={exports:{}}).exports,r),r.exports);var P=H((d,b)=>{/*! WOW wow.js - v1.3.0 - 2016-10-04
  2. * https://wowjs.uk
  3. * Copyright (c) 2016 Thomas Grainger; Licensed MIT */(function(h,r){if(typeof define=="function"&&define.amd)define(["module","exports"],r);else if(typeof d<"u")r(b,d);else{var a={exports:{}};r(a,a.exports),h.WOW=a.exports}})(globalThis,function(h,r){function a(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function v(n,e){return e.indexOf(n)>=0}function C(n,e){for(var t in e)if(n[t]==null){var i=e[t];n[t]=i}return n}function S(n){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(n)}function A(n){var e=arguments.length<=1||arguments[1]===void 0?!1:arguments[1],t=arguments.length<=2||arguments[2]===void 0?!1:arguments[2],i=arguments.length<=3||arguments[3]===void 0?null:arguments[3],o=void 0;return document.createEvent!=null?(o=document.createEvent("CustomEvent"),o.initCustomEvent(n,e,t,i)):document.createEventObject!=null?(o=document.createEventObject(),o.eventType=n):o.eventName=n,o}function E(n,e){n.dispatchEvent!=null?n.dispatchEvent(e):e in(n!=null)?n[e]():"on"+e in(n!=null)&&n["on"+e]()}function u(n,e,t){n.addEventListener!=null?n.addEventListener(e,t,!1):n.attachEvent!=null?n.attachEvent("on"+e,t):n[e]=t}function m(n,e,t){n.removeEventListener!=null?n.removeEventListener(e,t,!1):n.detachEvent!=null?n.detachEvent("on"+e,t):delete n[e]}function x(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight}Object.defineProperty(r,"__esModule",{value:!0});var y,p,c=function(){function n(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}}(),N=window.WeakMap||window.MozWeakMap||function(){function n(){a(this,n),this.keys=[],this.values=[]}return c(n,[{key:"get",value:function(e){for(var t=0;t<this.keys.length;t++){var i=this.keys[t];if(i===e)return this.values[t]}}},{key:"set",value:function(e,t){for(var i=0;i<this.keys.length;i++){var o=this.keys[i];if(o===e)return this.values[i]=t,this}return this.keys.push(e),this.values.push(t),this}}]),n}(),g=window.MutationObserver||window.WebkitMutationObserver||window.MozMutationObserver||(p=y=function(){function n(){a(this,n),typeof console<"u"&&console!==null&&(console.warn("MutationObserver is not supported by your browser."),console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content."))}return c(n,[{key:"observe",value:function(){}}]),n}(),y.notSupported=!0,p),w=window.getComputedStyle||function(n){var e=/(\-([a-z]){1})/g;return{getPropertyValue:function(t){t==="float"&&(t="styleFloat"),e.test(t)&&t.replace(e,function(o,s){return s.toUpperCase()});var i=n.currentStyle;return(i!=null?i[t]:void 0)||null}}},O=function(){function n(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];a(this,n),this.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null,resetAnimation:!0},this.animate=function(){return"requestAnimationFrame"in window?function(t){return window.requestAnimationFrame(t)}:function(t){return t()}}(),this.vendors=["moz","webkit"],this.start=this.start.bind(this),this.resetAnimation=this.resetAnimation.bind(this),this.scrollHandler=this.scrollHandler.bind(this),this.scrollCallback=this.scrollCallback.bind(this),this.scrolled=!0,this.config=C(e,this.defaults),e.scrollContainer!=null&&(this.config.scrollContainer=document.querySelector(e.scrollContainer)),this.animationNameCache=new N,this.wowEvent=A(this.config.boxClass)}return c(n,[{key:"init",value:function(){this.element=window.document.documentElement,v(document.readyState,["interactive","complete"])?this.start():u(document,"DOMContentLoaded",this.start),this.finished=[]}},{key:"start",value:function(){var e=this;if(this.stopped=!1,this.boxes=[].slice.call(this.element.querySelectorAll("."+this.config.boxClass)),this.all=this.boxes.slice(0),this.boxes.length)if(this.disabled())this.resetStyle();else for(var t=0;t<this.boxes.length;t++){var i=this.boxes[t];this.applyStyle(i,!0)}if(this.disabled()||(u(this.config.scrollContainer||window,"scroll",this.scrollHandler),u(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live){var o=new g(function(s){for(var l=0;l<s.length;l++)for(var k=s[l],f=0;f<k.addedNodes.length;f++){var M=k.addedNodes[f];e.doSync(M)}});o.observe(document.body,{childList:!0,subtree:!0})}}},{key:"stop",value:function(){this.stopped=!0,m(this.config.scrollContainer||window,"scroll",this.scrollHandler),m(window,"resize",this.scrollHandler),this.interval!=null&&clearInterval(this.interval)}},{key:"sync",value:function(){g.notSupported&&this.doSync(this.element)}},{key:"doSync",value:function(e){if(typeof e<"u"&&e!==null||(e=this.element),e.nodeType===1){e=e.parentNode||e;for(var t=e.querySelectorAll("."+this.config.boxClass),i=0;i<t.length;i++){var o=t[i];v(o,this.all)||(this.boxes.push(o),this.all.push(o),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(o,!0),this.scrolled=!0)}}}},{key:"show",value:function(e){return this.applyStyle(e),e.className=e.className+" "+this.config.animateClass,this.config.callback!=null&&this.config.callback(e),E(e,this.wowEvent),this.config.resetAnimation&&(u(e,"animationend",this.resetAnimation),u(e,"oanimationend",this.resetAnimation),u(e,"webkitAnimationEnd",this.resetAnimation),u(e,"MSAnimationEnd",this.resetAnimation)),e}},{key:"applyStyle",value:function(e,t){var i=this,o=e.getAttribute("data-wow-duration"),s=e.getAttribute("data-wow-delay"),l=e.getAttribute("data-wow-iteration");return this.animate(function(){return i.customStyle(e,t,o,s,l)})}},{key:"resetStyle",value:function(){for(var e=0;e<this.boxes.length;e++){var t=this.boxes[e];t.style.visibility="visible"}}},{key:"resetAnimation",value:function(e){if(e.type.toLowerCase().indexOf("animationend")>=0){var t=e.target||e.srcElement;t.className=t.className.replace(this.config.animateClass,"").trim()}}},{key:"customStyle",value:function(e,t,i,o,s){return t&&this.cacheAnimationName(e),e.style.visibility=t?"hidden":"visible",i&&this.vendorSet(e.style,{animationDuration:i}),o&&this.vendorSet(e.style,{animationDelay:o}),s&&this.vendorSet(e.style,{animationIterationCount:s}),this.vendorSet(e.style,{animationName:t?"none":this.cachedAnimationName(e)}),e}},{key:"vendorSet",value:function(e,t){for(var i in t)if(t.hasOwnProperty(i)){var o=t[i];e[""+i]=o;for(var s=0;s<this.vendors.length;s++){var l=this.vendors[s];e[""+l+i.charAt(0).toUpperCase()+i.substr(1)]=o}}}},{key:"vendorCSS",value:function(e,t){for(var i=w(e),o=i.getPropertyCSSValue(t),s=0;s<this.vendors.length;s++){var l=this.vendors[s];o=o||i.getPropertyCSSValue("-"+l+"-"+t)}return o}},{key:"animationName",value:function(e){var t=void 0;try{t=this.vendorCSS(e,"animation-name").cssText}catch{t=w(e).getPropertyValue("animation-name")}return t==="none"?"":t}},{key:"cacheAnimationName",value:function(e){return this.animationNameCache.set(e,this.animationName(e))}},{key:"cachedAnimationName",value:function(e){return this.animationNameCache.get(e)}},{key:"scrollHandler",value:function(){this.scrolled=!0}},{key:"scrollCallback",value:function(){if(this.scrolled){this.scrolled=!1;for(var e=[],t=0;t<this.boxes.length;t++){var i=this.boxes[t];if(i){if(this.isVisible(i)){this.show(i);continue}e.push(i)}}this.boxes=e,this.boxes.length||this.config.live||this.stop()}}},{key:"offsetTop",value:function(e){for(;e.offsetTop===void 0;)e=e.parentNode;for(var t=e.offsetTop;e.offsetParent;)e=e.offsetParent,t+=e.offsetTop;return t}},{key:"isVisible",value:function(e){var t=e.getAttribute("data-wow-offset")||this.config.offset,i=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,o=i+Math.min(this.element.clientHeight,x())-t,s=this.offsetTop(e),l=s+e.clientHeight;return o>=s&&l>=i}},{key:"disabled",value:function(){return!this.config.mobile&&S(navigator.userAgent)}}]),n}();r.default=O,h.exports=r.default})});export default P();