File "js-7bee238a.js.transient"
Full Path: /var/www/html/wordpress/wp-content/cache/wpo-minify/tmp/js-7bee238a.js.transient
File size: 10.92 KB
MIME-type: application/json
Charset: utf-8
{"request":{"hurl":"https:\/\/bsd-devlabs.one\/wp-content\/themes\/agencygrove\/assets\/js\/wow.js","inline":"","enable_minification":true,"type":"js","handle":"agencygrove-wow-script","version":false},"log":{"url":"\/wp-content\/themes\/agencygrove\/assets\/js\/wow.js","success":true},"code":"(function(global,factory){if(typeof define===\"function\"&&define.amd){define(['module','exports'],factory)}else if(typeof exports!==\"undefined\"){factory(module,exports)}else{var mod={exports:{}};factory(mod,mod.exports);global.WOW=mod.exports}})(this,function(module,exports){'use strict';Object.defineProperty(exports,\"__esModule\",{value:!0});var _class,_temp;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\")}}\nvar _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1;descriptor.configurable=!0;if(\"value\" in descriptor)descriptor.writable=!0;Object.defineProperty(target,descriptor.key,descriptor)}}\nreturn function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();function isIn(needle,haystack){return haystack.indexOf(needle)>=0}\nfunction extend(custom,defaults){for(var key in defaults){if(custom[key]==null){var value=defaults[key];custom[key]=value}}\nreturn custom}\nfunction isMobile(agent){return(\/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini\/i.test(agent))}\nfunction createEvent(event){var bubble=arguments.length<=1||arguments[1]===undefined?!1:arguments[1];var cancel=arguments.length<=2||arguments[2]===undefined?!1:arguments[2];var detail=arguments.length<=3||arguments[3]===undefined?null:arguments[3];var customEvent=void 0;if(document.createEvent!=null){customEvent=document.createEvent('CustomEvent');customEvent.initCustomEvent(event,bubble,cancel,detail)}else if(document.createEventObject!=null){customEvent=document.createEventObject();customEvent.eventType=event}else{customEvent.eventName=event}\nreturn customEvent}\nfunction emitEvent(elem,event){if(elem.dispatchEvent!=null){elem.dispatchEvent(event)}else if(event in(elem!=null)){elem[event]()}else if('on'+event in(elem!=null)){elem['on'+event]()}}\nfunction addEvent(elem,event,fn){if(elem.addEventListener!=null){elem.addEventListener(event,fn,!1)}else if(elem.attachEvent!=null){elem.attachEvent('on'+event,fn)}else{elem[event]=fn}}\nfunction removeEvent(elem,event,fn){if(elem.removeEventListener!=null){elem.removeEventListener(event,fn,!1)}else if(elem.detachEvent!=null){elem.detachEvent('on'+event,fn)}else{delete elem[event]}}\nfunction getInnerHeight(){if('innerHeight' in window){return window.innerHeight}\nreturn document.documentElement.clientHeight}\nvar WeakMap=window.WeakMap||window.MozWeakMap||function(){function WeakMap(){_classCallCheck(this,WeakMap);this.keys=[];this.values=[]}\n_createClass(WeakMap,[{key:'get',value:function get(key){for(var i=0;i<this.keys.length;i++){var item=this.keys[i];if(item===key){return this.values[i]}}\nreturn undefined}},{key:'set',value:function set(key,value){for(var i=0;i<this.keys.length;i++){var item=this.keys[i];if(item===key){this.values[i]=value;return this}}\nthis.keys.push(key);this.values.push(value);return this}}]);return WeakMap}();var MutationObserver=window.MutationObserver||window.WebkitMutationObserver||window.MozMutationObserver||(_temp=_class=function(){function MutationObserver(){_classCallCheck(this,MutationObserver);if(typeof console!=='undefined'&&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.')}}\n_createClass(MutationObserver,[{key:'observe',value:function observe(){}}]);return MutationObserver}(),_class.notSupported=!0,_temp);var getComputedStyle=window.getComputedStyle||function getComputedStyle(el){var getComputedStyleRX=\/(\\-([a-z]){1})\/g;return{getPropertyValue:function getPropertyValue(prop){if(prop==='float'){prop='styleFloat'}\nif(getComputedStyleRX.test(prop)){prop.replace(getComputedStyleRX,function(_,_char){return _char.toUpperCase()})}\nvar currentStyle=el.currentStyle;return(currentStyle!=null?currentStyle[prop]:void 0)||null}}};var WOW=function(){function WOW(){var options=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];_classCallCheck(this,WOW);this.defaults={boxClass:'wow',animateClass:'animated',offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null,resetAnimation:!0};this.animate=function animateFactory(){if('requestAnimationFrame' in window){return function(callback){return window.requestAnimationFrame(callback)}}\nreturn function(callback){return callback()}}();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=extend(options,this.defaults);if(options.scrollContainer!=null){this.config.scrollContainer=document.querySelector(options.scrollContainer)}\nthis.animationNameCache=new WeakMap();this.wowEvent=createEvent(this.config.boxClass)}\n_createClass(WOW,[{key:'init',value:function init(){this.element=window.document.documentElement;if(isIn(document.readyState,['interactive','complete'])){this.start()}else{addEvent(document,'DOMContentLoaded',this.start)}\nthis.finished=[]}},{key:'start',value:function start(){var _this=this;this.stopped=!1;this.boxes=[].slice.call(this.element.querySelectorAll('.'+this.config.boxClass));this.all=this.boxes.slice(0);if(this.boxes.length){if(this.disabled()){this.resetStyle()}else{for(var i=0;i<this.boxes.length;i++){var box=this.boxes[i];this.applyStyle(box,!0)}}}\nif(!this.disabled()){addEvent(this.config.scrollContainer||window,'scroll',this.scrollHandler);addEvent(window,'resize',this.scrollHandler);this.interval=setInterval(this.scrollCallback,50)}\nif(this.config.live){var mut=new MutationObserver(function(records){for(var j=0;j<records.length;j++){var record=records[j];for(var k=0;k<record.addedNodes.length;k++){var node=record.addedNodes[k];_this.doSync(node)}}\nreturn undefined});mut.observe(document.body,{childList:!0,subtree:!0})}}},{key:'stop',value:function stop(){this.stopped=!0;removeEvent(this.config.scrollContainer||window,'scroll',this.scrollHandler);removeEvent(window,'resize',this.scrollHandler);if(this.interval!=null){clearInterval(this.interval)}}},{key:'sync',value:function sync(){if(MutationObserver.notSupported){this.doSync(this.element)}}},{key:'doSync',value:function doSync(element){if(typeof element==='undefined'||element===null){element=this.element}\nif(element.nodeType!==1){return}\nelement=element.parentNode||element;var iterable=element.querySelectorAll('.'+this.config.boxClass);for(var i=0;i<iterable.length;i++){var box=iterable[i];if(!isIn(box,this.all)){this.boxes.push(box);this.all.push(box);if(this.stopped||this.disabled()){this.resetStyle()}else{this.applyStyle(box,!0)}\nthis.scrolled=!0}}}},{key:'show',value:function show(box){this.applyStyle(box);box.className=box.className+' '+this.config.animateClass;if(this.config.callback!=null){this.config.callback(box)}\nemitEvent(box,this.wowEvent);if(this.config.resetAnimation){addEvent(box,'animationend',this.resetAnimation);addEvent(box,'oanimationend',this.resetAnimation);addEvent(box,'webkitAnimationEnd',this.resetAnimation);addEvent(box,'MSAnimationEnd',this.resetAnimation)}\nreturn box}},{key:'applyStyle',value:function applyStyle(box,hidden){var _this2=this;var duration=box.getAttribute('data-wow-duration');var delay=box.getAttribute('data-wow-delay');var iteration=box.getAttribute('data-wow-iteration');return this.animate(function(){return _this2.customStyle(box,hidden,duration,delay,iteration)})}},{key:'resetStyle',value:function resetStyle(){for(var i=0;i<this.boxes.length;i++){var box=this.boxes[i];box.style.visibility='visible'}\nreturn undefined}},{key:'resetAnimation',value:function resetAnimation(event){if(event.type.toLowerCase().indexOf('animationend')>=0){var target=event.target||event.srcElement;target.className=target.className.replace(this.config.animateClass,'').trim()}}},{key:'customStyle',value:function customStyle(box,hidden,duration,delay,iteration){if(hidden){this.cacheAnimationName(box)}\nbox.style.visibility=hidden?'hidden':'visible';if(duration){this.vendorSet(box.style,{animationDuration:duration})}\nif(delay){this.vendorSet(box.style,{animationDelay:delay})}\nif(iteration){this.vendorSet(box.style,{animationIterationCount:iteration})}\nthis.vendorSet(box.style,{animationName:hidden?'none':this.cachedAnimationName(box)});return box}},{key:'vendorSet',value:function vendorSet(elem,properties){for(var name in properties){if(properties.hasOwnProperty(name)){var value=properties[name];elem[''+name]=value;for(var i=0;i<this.vendors.length;i++){var vendor=this.vendors[i];elem[''+vendor+name.charAt(0).toUpperCase()+name.substr(1)]=value}}}}},{key:'vendorCSS',value:function vendorCSS(elem,property){var style=getComputedStyle(elem);var result=style.getPropertyCSSValue(property);for(var i=0;i<this.vendors.length;i++){var vendor=this.vendors[i];result=result||style.getPropertyCSSValue('-'+vendor+'-'+property)}\nreturn result}},{key:'animationName',value:function animationName(box){var aName=void 0;try{aName=this.vendorCSS(box,'animation-name').cssText}catch(error){aName=getComputedStyle(box).getPropertyValue('animation-name')}\nif(aName==='none'){return''}\nreturn aName}},{key:'cacheAnimationName',value:function cacheAnimationName(box){return this.animationNameCache.set(box,this.animationName(box))}},{key:'cachedAnimationName',value:function cachedAnimationName(box){return this.animationNameCache.get(box)}},{key:'scrollHandler',value:function scrollHandler(){this.scrolled=!0}},{key:'scrollCallback',value:function scrollCallback(){if(this.scrolled){this.scrolled=!1;var results=[];for(var i=0;i<this.boxes.length;i++){var box=this.boxes[i];if(box){if(this.isVisible(box)){this.show(box);continue}\nresults.push(box)}}\nthis.boxes=results;if(!this.boxes.length&&!this.config.live){this.stop()}}}},{key:'offsetTop',value:function offsetTop(element){while(element.offsetTop===undefined){element=element.parentNode}\nvar top=element.offsetTop;while(element.offsetParent){element=element.offsetParent;top+=element.offsetTop}\nreturn top}},{key:'isVisible',value:function isVisible(box){var offset=box.getAttribute('data-wow-offset')||this.config.offset;var viewTop=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset;var viewBottom=viewTop+Math.min(this.element.clientHeight,getInnerHeight())-offset;var top=this.offsetTop(box);var bottom=top+box.clientHeight;return top<=viewBottom&&bottom>=viewTop}},{key:'disabled',value:function disabled(){return!this.config.mobile&&isMobile(navigator.userAgent)}}]);return WOW}();exports.default=WOW;module.exports=exports['default']});\n","status":true}