Your IP : 216.73.216.95


Current Path : /var/test/www/foundation/wp-content/plugins/znpb-tiltbox/elements/tiltbox/js/
Upload File :
Current File : /var/test/www/foundation/wp-content/plugins/znpb-tiltbox/elements/tiltbox/js/app.min.js

!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():t.anime=e()}(this,function(){var t,e={duration:1e3,delay:0,loop:!1,autoplay:!0,direction:"normal",easing:"easeOutElastic",elasticity:400,round:!1,begin:void 0,update:void 0,complete:void 0},n="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY".split(" "),r={arr:function(t){return Array.isArray(t)},obj:function(t){return-1<Object.prototype.toString.call(t).indexOf("Object")},svg:function(t){return t instanceof SVGElement},dom:function(t){return t.nodeType||r.svg(t)},num:function(t){return!isNaN(parseInt(t))},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return"undefined"==typeof t},nul:function(t){return"null"==typeof t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return r.hex(t)||r.rgb(t)||r.hsl(t)}},a=function(){var t={},e={Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t,e){if(0===t||1===t)return t;var n=1-Math.min(e,998)/1e3,r=t/1-1;return-(Math.pow(2,10*r)*Math.sin(2*(r-n/(2*Math.PI)*Math.asin(1))*Math.PI/n))},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}};return["Quad","Cubic","Quart","Quint","Expo"].forEach(function(t,n){e[t]=function(t){return Math.pow(t,n+2)}}),Object.keys(e).forEach(function(n){var r=e[n];t["easeIn"+n]=r,t["easeOut"+n]=function(t,e){return 1-r(1-t,e)},t["easeInOut"+n]=function(t,e){return.5>t?r(2*t,e)/2:1-r(-2*t+2,e)/2},t["easeOutIn"+n]=function(t,e){return.5>t?(1-r(1-2*t,e))/2:(r(2*t-1,e)+1)/2}}),t.linear=function(t){return t},t}(),i=function(t){return r.str(t)?t:t+""},o=function(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},s=function(t){if(r.col(t))return!1;try{return document.querySelectorAll(t)}catch(t){return!1}},u=function(t){return t.reduce(function(t,e){return t.concat(r.arr(e)?u(e):e)},[])},l=function(t){return r.arr(t)?t:(r.str(t)&&(t=s(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])},c=function(t,e){return t.some(function(t){return t===e})},m=function(t,e){var n={};return t.forEach(function(t){var r=JSON.stringify(e.map(function(e){return t[e]}));n[r]=n[r]||[],n[r].push(t)}),Object.keys(n).map(function(t){return n[t]})},f=function(t){return t.filter(function(t,e,n){return n.indexOf(t)===e})},d=function(t){var e,n={};for(e in t)n[e]=t[e];return n},p=function(t,e){for(var n in e)t[n]=r.und(t[n])?e[n]:t[n];return t},v=function(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,n,r){return e+e+n+n+r+r});var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);t=parseInt(e[1],16);var n=parseInt(e[2],16),e=parseInt(e[3],16);return"rgb("+t+","+n+","+e+")"},y=function(t){t=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t);var e=parseInt(t[1])/360,n=parseInt(t[2])/100,r=parseInt(t[3])/100;if(t=function(t,e,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?t+6*(e-t)*n:.5>n?e:n<2/3?t+(e-t)*(2/3-n)*6:t},0==n)n=r=e=r;else var a=.5>r?r*(1+n):r+n-r*n,i=2*r-a,n=t(i,a,e+1/3),r=t(i,a,e),e=t(i,a,e-1/3);return"rgb("+255*n+","+255*r+","+255*e+")"},h=function(t){return/([\+\-]?[0-9|auto\.]+)(%|px|pt|em|rem|in|cm|mm|ex|pc|vw|vh|deg)?/.exec(t)[2]},g=function(t,e,n){return h(e)?e:-1<t.indexOf("translate")?h(n)?e+h(n):e+"px":-1<t.indexOf("rotate")||-1<t.indexOf("skew")?e+"deg":e},x=function(t,e){if(e in t.style)return getComputedStyle(t).getPropertyValue(o(e))||"0"},O=function(t,e){var n=-1<e.indexOf("scale")?1:0,r=t.style.transform;if(!r)return n;for(var a=/(\w+)\((.+?)\)/g,i=[],o=[],s=[];i=a.exec(r);)o.push(i[1]),s.push(i[2]);return r=s.filter(function(t,n){return o[n]===e}),r.length?r[0]:n},b=function(t,e){return r.dom(t)&&c(n,e)?"transform":r.dom(t)&&(t.getAttribute(e)||r.svg(t)&&t[e])?"attribute":r.dom(t)&&"transform"!==e&&x(t,e)?"css":r.nul(t[e])||r.und(t[e])?void 0:"object"},z=function(t,e){switch(b(t,e)){case"transform":return O(t,e);case"css":return x(t,e);case"attribute":return t.getAttribute(e)}return t[e]||0},A=function(t,e,n){return r.col(e)?e=r.rgb(e)?e:r.hex(e)?v(e):r.hsl(e)?y(e):void 0:h(e)?e:(t=h(h(t.to)?t.to:t.from),!t&&n&&(t=h(n)),t?e+t:e)},M=function(t){var e=/-?\d*\.?\d+/g;return{original:t,numbers:i(t).match(e)?i(t).match(e).map(Number):[0],strings:i(t).split(e)}},E=function(t,e,n){return e.reduce(function(e,r,a){return r=r?r:n[a-1],e+t[a-1]+r})},w=function(t){return t=t?u(r.arr(t)?t.map(l):l(t)):[],t.map(function(t,e){return{target:t,id:e}})},D=function(t,e,n,r){return"transform"===n?(n=t+"("+g(t,e.from,e.to)+")",e=t+"("+g(t,e.to)+")"):(t="css"===n?x(r,t):void 0,n=A(e,e.from,t),e=A(e,e.to,t)),{from:M(n),to:M(e)}},T=function(t,e){var n=[];return t.forEach(function(a,i){var o=a.target;return e.forEach(function(e){var s=b(o,e.name);if(s){var u;u=e.name;var c=e.value,c=l(r.fnc(c)?c(o,i):c);u={from:1<c.length?c[0]:z(o,u),to:1<c.length?c[1]:c[0]},c=d(e),c.animatables=a,c.type=s,c.from=D(e.name,u,c.type,o).from,c.to=D(e.name,u,c.type,o).to,c.round=r.col(u.from)||c.round?1:0,c.delay=(r.fnc(c.delay)?c.delay(o,i,t.length):c.delay)/B.speed,c.duration=(r.fnc(c.duration)?c.duration(o,i,t.length):c.duration)/B.speed,n.push(c)}})}),n},_=function(t,e){var n=T(t,e);return m(n,["name","from","to","delay","duration"]).map(function(t){var e=d(t[0]);return e.animatables=t.map(function(t){return t.animatables}),e.totalDuration=e.delay+e.duration,e})},k=function(t,e){t.tweens.forEach(function(n){var r=n.from,a=t.duration-(n.delay+n.duration);n.from=n.to,n.to=r,e&&(n.delay=a)}),t.reversed=!t.reversed},I=function(t){if(t.length)return Math.max.apply(Math,t.map(function(t){return t.totalDuration}))},F=function(t){var e=[],n=[];return t.tweens.forEach(function(t){"css"!==t.type&&"transform"!==t.type||(e.push("css"===t.type?o(t.name):"transform"),t.animatables.forEach(function(t){n.push(t.target)}))}),{properties:f(e).join(", "),elements:f(n)}},Q=function(t){var e=F(t);e.elements.forEach(function(t){t.style.willChange=e.properties})},X=function(t){F(t).elements.forEach(function(t){t.style.removeProperty("will-change")})},Y=function(t,e){var n=t.path,r=t.value*e,a=function(a){return a=a||0,n.getPointAtLength(1<e?t.value+a:r+a)},i=a(),o=a(-1),a=a(1);switch(t.name){case"translateX":return i.x;case"translateY":return i.y;case"rotate":return 180*Math.atan2(a.y-o.y,a.x-o.x)/Math.PI}},L=function(t,e){var n=Math.min(Math.max(e-t.delay,0),t.duration)/t.duration,r=t.to.numbers.map(function(e,r){var i=t.from.numbers[r],o=a[t.easing](n,t.elasticity),i=t.path?Y(t,o):i+o*(e-i);return i=t.round?Math.round(i*t.round)/t.round:i});return E(r,t.to.strings,t.from.strings)},j=function(e,n){var r;e.currentTime=n,e.progress=n/e.duration*100;for(var a=0;a<e.tweens.length;a++){var i=e.tweens[a];i.currentValue=L(i,n);for(var o=i.currentValue,s=0;s<i.animatables.length;s++){var u=i.animatables[s],l=u.id,u=u.target,c=i.name;switch(i.type){case"css":u.style[c]=o;break;case"attribute":u.setAttribute(c,o);break;case"object":u[c]=o;break;case"transform":r||(r={}),r[l]||(r[l]=[]),r[l].push(o)}}}if(r)for(a in t||(t=(x(document.body,"transform")?"":"-webkit-")+"transform"),r)e.animatables[a].target.style[t]=r[a].join(" ");e.settings.update&&e.settings.update(e)},Z=function(t){var n={};n.animatables=w(t.targets),n.settings=p(t,e);var a,i=n.settings,o=[];for(a in t)if(!e.hasOwnProperty(a)&&"targets"!==a){var s=r.obj(t[a])?d(t[a]):{value:t[a]};s.name=a,o.push(p(s,i))}return n.properties=o,n.tweens=_(n.animatables,n.properties),n.duration=I(n.tweens)||t.duration,n.currentTime=0,n.progress=0,n.ended=!1,n},S=[],q=0,C=function(){var t=function(){q=requestAnimationFrame(e)},e=function(e){if(S.length){for(var n=0;n<S.length;n++)S[n].tick(e);t()}else cancelAnimationFrame(q),q=0};return t}(),B=function(t){var e=Z(t),n={};return e.tick=function(t){e.ended=!1,n.start||(n.start=t),n.current=Math.min(Math.max(n.last+t-n.start,0),e.duration),j(e,n.current);var a=e.settings;a.begin&&n.current>=a.delay&&(a.begin(e),a.begin=void 0),n.current>=e.duration&&(a.loop?(n.start=t,"alternate"===a.direction&&k(e,!0),r.num(a.loop)&&a.loop--):(e.ended=!0,e.pause(),a.complete&&a.complete(e)),n.last=0)},e.seek=function(t){j(e,t/100*e.duration)},e.pause=function(){X(e);var t=S.indexOf(e);-1<t&&S.splice(t,1)},e.play=function(t){e.pause(),t&&(e=p(Z(p(t,e.settings)),e)),n.start=0,n.last=e.ended?0:e.currentTime,t=e.settings,"reverse"===t.direction&&k(e),"alternate"!==t.direction||t.loop||(t.loop=1),Q(e),S.push(e),q||C()},e.restart=function(){e.reversed&&k(e),e.pause(),e.seek(0),e.play()},e.settings.autoplay&&e.play(),e};return B.version="1.1.1",B.speed=1,B.list=S,B.remove=function(t){t=u(r.arr(t)?t.map(l):l(t));for(var e=S.length-1;0<=e;e--)for(var n=S[e],a=n.tweens,i=a.length-1;0<=i;i--)for(var o=a[i].animatables,s=o.length-1;0<=s;s--)c(t,o[s].target)&&(o.splice(s,1),o.length||a.splice(i,1),a.length||n.pause())},B.easings=a,B.getValue=z,B.path=function(t){return t=r.str(t)?s(t)[0]:t,{path:t,value:t.getTotalLength()}},B.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},B}),function(t){t(document).ready(function(){var e=function(e){var n=[{movement:{imgWrapper:{translation:{x:10,y:10,z:30},rotation:{x:0,y:-10,z:0},reverseAnimation:{duration:200,easing:"easeOutQuad"}},lines:{translation:{x:10,y:10,z:[0,70]},rotation:{x:0,y:0,z:-2},reverseAnimation:{duration:2e3,easing:"easeOutExpo"}},caption:{rotation:{x:0,y:0,z:2},reverseAnimation:{duration:200,easing:"easeOutQuad"}},overlay:{translation:{x:10,y:-10,z:0},rotation:{x:0,y:0,z:2},reverseAnimation:{duration:2e3,easing:"easeOutExpo"}},shine:{translation:{x:100,y:100,z:0},reverseAnimation:{duration:200,easing:"easeOutQuad"}}}},{movement:{imgWrapper:{rotation:{x:-5,y:10,z:0},reverseAnimation:{duration:900,easing:"easeOutCubic"}},caption:{translation:{x:30,y:30,z:[0,40]},rotation:{x:[0,15],y:0,z:0},reverseAnimation:{duration:1200,easing:"easeOutExpo"}},overlay:{translation:{x:10,y:10,z:[0,20]},reverseAnimation:{duration:1e3,easing:"easeOutExpo"}},shine:{translation:{x:100,y:100,z:0},reverseAnimation:{duration:900,easing:"easeOutCubic"}}}},{movement:{imgWrapper:{rotation:{x:-5,y:10,z:0},reverseAnimation:{duration:50,easing:"easeOutQuad"}},caption:{translation:{x:20,y:20,z:0},reverseAnimation:{duration:200,easing:"easeOutQuad"}},overlay:{translation:{x:5,y:-5,z:0},rotation:{x:0,y:0,z:6},reverseAnimation:{duration:1e3,easing:"easeOutQuad"}},shine:{translation:{x:50,y:50,z:0},reverseAnimation:{duration:50,easing:"easeOutQuad"}}}},{movement:{imgWrapper:{translation:{x:0,y:-8,z:0},rotation:{x:3,y:3,z:0},reverseAnimation:{duration:1200,easing:"easeOutExpo"}},lines:{translation:{x:15,y:15,z:[0,15]},reverseAnimation:{duration:1200,easing:"easeOutExpo"}},overlay:{translation:{x:0,y:8,z:0},reverseAnimation:{duration:600,easing:"easeOutExpo"}},caption:{translation:{x:10,y:-15,z:0},reverseAnimation:{duration:900,easing:"easeOutExpo"}},shine:{translation:{x:50,y:50,z:0},reverseAnimation:{duration:1200,easing:"easeOutExpo"}}}},{movement:{lines:{translation:{x:-5,y:5,z:0},reverseAnimation:{duration:1e3,easing:"easeOutExpo"}},caption:{translation:{x:15,y:15,z:0},rotation:{x:0,y:0,z:3},reverseAnimation:{duration:1500,easing:"easeOutElastic",elasticity:700}},overlay:{translation:{x:15,y:-15,z:0},reverseAnimation:{duration:500,easing:"easeOutExpo"}},shine:{translation:{x:50,y:50,z:0},reverseAnimation:{duration:500,easing:"easeOutExpo"}}}},{movement:{imgWrapper:{translation:{x:5,y:5,z:0},reverseAnimation:{duration:800,easing:"easeOutQuart"}},caption:{translation:{x:10,y:10,z:[0,50]},reverseAnimation:{duration:1e3,easing:"easeOutQuart"}},shine:{translation:{x:50,y:50,z:0},reverseAnimation:{duration:800,easing:"easeOutQuart"}}}},{movement:{lines:{translation:{x:40,y:40,z:0},reverseAnimation:{duration:1500,easing:"easeOutElastic"}},caption:{translation:{x:20,y:20,z:0},rotation:{x:0,y:0,z:-5},reverseAnimation:{duration:1e3,easing:"easeOutExpo"}},overlay:{translation:{x:-30,y:-30,z:0},rotation:{x:0,y:0,z:3},reverseAnimation:{duration:750,easing:"easeOutExpo"}},shine:{translation:{x:100,y:100,z:0},reverseAnimation:{duration:750,easing:"easeOutExpo"}}}}],r=e.find(".znTiltBox-tilter");r&&r.length&&r.each(function(e,r){var a=t(r),i=a.is("[data-movement]")?parseInt(a.attr("data-movement")):1;imagesLoaded(a,function(){new TiltFx(r,n[i])})})};"undefined"!=typeof t.ZnThemeJs&&t.extend(!0,t.ZnThemeJs.prototype.zinit,e(t(document))),t(window).on("ZnNewContent",function(t){e(t.content)})})}(jQuery),function(t){"use strict";function e(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function n(e){var n=0,r=0;if(!e)var e=t.event;return e.pageX||e.pageY?(n=e.pageX,r=e.pageY):(e.clientX||e.clientY)&&(n=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,r=e.clientY+document.body.scrollTop+document.documentElement.scrollTop),{x:n,y:r}}function r(t,n){this.DOM={},this.DOM.el=t,this.options=e({},this.options),e(this.options,n),this._init()}r.prototype.options={movement:{imgWrapper:{translation:{x:0,y:0,z:0},rotation:{x:-5,y:5,z:0},reverseAnimation:{duration:1200,easing:"easeOutElastic",elasticity:600}},lines:{translation:{x:10,y:10,z:[0,10]},reverseAnimation:{duration:1e3,easing:"easeOutExpo",elasticity:600}},caption:{translation:{x:20,y:20,z:0},rotation:{x:0,y:0,z:0},reverseAnimation:{duration:1500,easing:"easeOutElastic",elasticity:600}},overlay:{translation:{x:10,y:10,z:[0,50]},reverseAnimation:{duration:500,easing:"easeOutExpo"}},shine:{translation:{x:50,y:50,z:0},reverseAnimation:{duration:1200,easing:"easeOutElastic",elasticity:600}}}},r.prototype._init=function(){this.DOM.animatable={},this.DOM.animatable.imgWrapper=this.DOM.el.querySelector(".znTiltBox-tilter__figure"),this.DOM.animatable.lines=this.DOM.el.querySelector(".znTiltBox-tilter__deco--lines"),this.DOM.animatable.caption=this.DOM.el.querySelector(".znTiltBox-tilter__caption"),this.DOM.animatable.overlay=this.DOM.el.querySelector(".znTiltBox-tilter__deco--overlay"),this.DOM.animatable.shine=this.DOM.el.querySelector(".znTiltBox-tilter__deco--shine > div"),this._initEvents()},r.prototype._initEvents=function(){var t=this;this.mouseenterFn=function(){for(var e in t.DOM.animatable)anime.remove(t.DOM.animatable[e])},this.mousemoveFn=function(e){requestAnimationFrame(function(){t._layout(e)})},this.mouseleaveFn=function(e){requestAnimationFrame(function(){for(var e in t.DOM.animatable)void 0!=t.options.movement[e]&&anime({targets:t.DOM.animatable[e],duration:void 0!=t.options.movement[e].reverseAnimation?t.options.movement[e].reverseAnimation.duration||0:1,easing:void 0!=t.options.movement[e].reverseAnimation?t.options.movement[e].reverseAnimation.easing||"linear":"linear",elasticity:void 0!=t.options.movement[e].reverseAnimation?t.options.movement[e].reverseAnimation.elasticity||null:null,scaleX:1,scaleY:1,scaleZ:1,translateX:0,translateY:0,translateZ:0,rotateX:0,rotateY:0,rotateZ:0})})},this.DOM.el.addEventListener("mousemove",this.mousemoveFn),this.DOM.el.addEventListener("mouseleave",this.mouseleaveFn),this.DOM.el.addEventListener("mouseenter",this.mouseenterFn)},r.prototype._layout=function(t){var e=n(t),r={left:document.body.scrollLeft+document.documentElement.scrollLeft,top:document.body.scrollTop+document.documentElement.scrollTop},a=this.DOM.el.getBoundingClientRect(),i={x:e.x-a.left-r.left,y:e.y-a.top-r.top};for(var o in this.DOM.animatable)if(void 0!=this.DOM.animatable[o]&&void 0!=this.options.movement[o]){var s=void 0!=this.options.movement[o]?this.options.movement[o].translation||{x:0,y:0,z:0}:{x:0,y:0,z:0},u=void 0!=this.options.movement[o]?this.options.movement[o].rotation||{x:0,y:0,z:0}:{x:0,y:0,z:0},l=function(t){for(var e in t)void 0==t[e]?t[e]=[0,0]:"number"==typeof t[e]&&(t[e]=[-1*t[e],t[e]])};l(s),l(u);var c={translation:{x:(s.x[1]-s.x[0])/a.width*i.x+s.x[0],y:(s.y[1]-s.y[0])/a.height*i.y+s.y[0],z:(s.z[1]-s.z[0])/a.height*i.y+s.z[0]},rotation:{x:(u.x[1]-u.x[0])/a.height*i.y+u.x[0],y:(u.y[1]-u.y[0])/a.width*i.x+u.y[0],z:(u.z[1]-u.z[0])/a.width*i.x+u.z[0]}};this.DOM.animatable[o].style.WebkitTransform=this.DOM.animatable[o].style.transform="translateX("+c.translation.x+"px) translateY("+c.translation.y+"px) translateZ("+c.translation.z+"px) rotateX("+c.rotation.x+"deg) rotateY("+c.rotation.y+"deg) rotateZ("+c.rotation.z+"deg)"}},t.TiltFx=r}(window);