woocommerce/assets/js/flexslider/jquery.flexslider.min.js

1 line
22 KiB
JavaScript
Raw Normal View History

2019-04-16 13:36:37 +00:00
!function(m){var a=!0;m.flexslider=function(g,e){var h=m(g);"undefined"==typeof e.rtl&&"rtl"==m("html").attr("dir")&&(e.rtl=!0),h.vars=m.extend({},m.flexslider.defaults,e);var t,c=h.vars.namespace,S=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,u=("ontouchstart"in window||S||window.DocumentTouch&&document instanceof DocumentTouch)&&h.vars.touch,l="click touchend MSPointerUp keyup",d="",x="vertical"===h.vars.direction,y=h.vars.reverse,b=0<h.vars.itemWidth,w="fade"===h.vars.animation,v=""!==h.vars.asNavFor,p={};m.data(g,"flexslider",h),p={init:function(){h.animating=!1,h.currentSlide=parseInt(h.vars.startAt?h.vars.startAt:0,10),isNaN(h.currentSlide)&&(h.currentSlide=0),h.animatingTo=h.currentSlide,h.atEnd=0===h.currentSlide||h.currentSlide===h.last,h.containerSelector=h.vars.selector.substr(0,h.vars.selector.search(" ")),h.slides=m(h.vars.selector,h),h.container=m(h.containerSelector,h),h.count=h.slides.length,h.syncExists=0<m(h.vars.sync).length,"slide"===h.vars.animation&&(h.vars.animation="swing"),h.prop=x?"top":h.vars.rtl?"marginRight":"marginLeft",h.args={},h.manualPause=!1,h.stopped=!1,h.started=!1,h.startTimeout=null,h.transitions=!h.vars.video&&!w&&h.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var a in t)if(e.style[t[a]]!==undefined)return h.pfx=t[a].replace("Perspective","").toLowerCase(),h.prop="-"+h.pfx+"-transform",!0;return!1}(),h.isFirefox=-1<navigator.userAgent.toLowerCase().indexOf("firefox"),(h.ensureAnimationEnd="")!==h.vars.controlsContainer&&(h.controlsContainer=0<m(h.vars.controlsContainer).length&&m(h.vars.controlsContainer)),""!==h.vars.manualControls&&(h.manualControls=0<m(h.vars.manualControls).length&&m(h.vars.manualControls)),""!==h.vars.customDirectionNav&&(h.customDirectionNav=2===m(h.vars.customDirectionNav).length&&m(h.vars.customDirectionNav)),h.vars.randomize&&(h.slides.sort(function(){return Math.round(Math.random())-.5}),h.container.empty().append(h.slides)),h.doMath(),h.setup("init"),h.vars.controlNav&&p.controlNav.setup(),h.vars.directionNav&&p.directionNav.setup(),h.vars.keyboard&&(1===m(h.containerSelector).length||h.vars.multipleKeyboard)&&m(document).bind("keyup",function(e){var t=e.keyCode;if(!h.animating&&(39===t||37===t)){var a=h.vars.rtl?37===t?h.getTarget("next"):39===t&&h.getTarget("prev"):39===t?h.getTarget("next"):37===t&&h.getTarget("prev");h.flexAnimate(a,h.vars.pauseOnAction)}}),h.vars.mousewheel&&h.bind("mousewheel",function(e,t,a,n){e.preventDefault();var i=t<0?h.getTarget("next"):h.getTarget("prev");h.flexAnimate(i,h.vars.pauseOnAction)}),h.vars.pausePlay&&p.pausePlay.setup(),h.vars.slideshow&&h.vars.pauseInvisible&&p.pauseInvisible.init(),h.vars.slideshow&&(h.vars.pauseOnHover&&h.hover(function(){h.manualPlay||h.manualPause||h.pause()},function(){h.manualPause||h.manualPlay||h.stopped||h.play()}),h.vars.pauseInvisible&&p.pauseInvisible.isHidden()||(0<h.vars.initDelay?h.startTimeout=setTimeout(h.play,h.vars.initDelay):h.play())),v&&p.asNav.setup(),u&&h.vars.touch&&p.touch(),(!w||w&&h.vars.smoothHeight)&&m(window).bind("resize orientationchange focus",p.resize),h.find("img").attr("draggable","false"),setTimeout(function(){h.vars.start(h)},200)},asNav:{setup:function(){h.asNav=!0,h.animatingTo=Math.floor(h.currentSlide/h.move),h.currentItem=h.currentSlide,h.slides.removeClass(c+"active-slide").eq(h.currentItem).addClass(c+"active-slide"),S?(g._slider=h).slides.each(function(){var e=this;e._gesture=new MSGesture,(e._gesture.target=e).addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),e.addEventListener("MSGestureTap",function(e){e.preventDefault();var t=m(this),a=t.index();m(h.vars.asNavFor).data("flexslider").animating||t.hasClass("active")||(h.direction=h.currentItem<a?"next":"prev",h.flexAnimate(a,h.vars.pauseOnAction,!1,!0,!0))})}):h.slides.on(l,function(e){e.preventDefault();var t=m(this),a=t.index();(h.vars.rtl?-1*(t.offset().right-m(h).s