/*! * Glide.js v3.0.4 * (c) 2013-2018 Jędrzej Chałubek (http://jedrzejchalubek.com/) * Released under the MIT License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Glide=e()}(this,function(){"use strict";var s={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,swipeThreshold:80,dragThreshold:120,perTouch:!1,touchRatio:.5,touchAngle:45,animationDuration:400,rewindDuration:800,animationTimingFunc:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",throttle:10,direction:"ltr",peek:0,breakpoints:{},classes:{direction:{ltr:"glide--ltr",rtl:"glide--rtl"},slider:"glide--slider",carousel:"glide--carousel",swipeable:"glide--swipeable",dragging:"glide--dragging",cloneSlide:"glide__slide--clone",activeNav:"glide__bullet--active",activeSlide:"glide__slide--active",disabledArrow:"glide__arrow--disabled"}};var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function i(t,e){for(var n=0;n":"<","<":">","=":"="},x=[function(e,n){return{modify:function(t){return t+n.Gaps.value*e.index}}},function(t,e){return{modify:function(t){return t+e.Clones.grow/2}}},function(n,i){return{modify:function(t){if(0<=n.settings.focusAt){var e=i.Peek.value;return c(e)?t-e.before:t-e}return t}}},function(o,s){return{modify:function(t){var e=s.Gaps.value,n=s.Sizes.width,i=o.settings.focusAt,r=s.Sizes.slideWidth;return"center"===i?t-(n/2-r/2):t-r*i-e*i}}},function(t,e){return{modify:function(t){return e.Direction.is("rtl")?-t:t}}}],T=["touchstart","mousedown"],A=["touchmove","mousemove"],O=["touchend","touchcancel","mouseup","mouseleave"],M=["mousedown","mousemove","mouseup","mouseleave"];function C(t){return c(t)?(n=t,Object.keys(n).sort().reduce(function(t,e){return t[e]=n[e],t[e],t},{})):{};var n}var z={Html:function(e,t){var n={mount:function(){this.root=e.selector,this.track=this.root.querySelector(_),this.slides=Array.prototype.slice.call(this.wrapper.children).filter(function(t){return!t.classList.contains(e.settings.classes.cloneSlide)})}};return d(n,"root",{get:function(){return n._r},set:function(t){r(t)&&(t=document.querySelector(t)),w(t)&&(n._r=t)}}),d(n,"track",{get:function(){return n._t},set:function(t){w(t)&&(n._t=t)}}),d(n,"wrapper",{get:function(){return n.track.children[0]}}),n},Translate:function(r,o,s){var u={set:function(t){var n,i,e=(n=r,i=o,{mutate:function(t){for(var e=0;e")?(o.Transition.after(function(){s.emit("translate.jump"),u.set(0)}),u.set(i*n+e*n)):u.set(t.movement)}),s.on("destroy",function(){u.remove()}),u},Transition:function(n,e,t){var i=!1,r={compose:function(t){var e=n.settings;return i?t+" 0ms "+e.animationTimingFunc:t+" "+this.duration+"ms "+e.animationTimingFunc},set:function(){var t=0"))&&(e._o=!1,s.emit("run.offset",e.move)),s.emit("run.after",e.move),o.enable()}))},calculate:function(){var t=this.move,e=this.length,n=t.steps,i=t.direction,r="number"==typeof v(n)&&0!==v(n);switch(i){case">":">"===n?o.index=e:this.isEnd()?(this._o=!0,o.index=0,s.emit("run.end",t)):r?o.index+=Math.min(e-o.index,-v(n)):o.index++;break;case"<":"<"===n?o.index=0:this.isStart()?(this._o=!0,o.index=e,s.emit("run.start",t)):r?o.index-=Math.min(o.index,v(n)):o.index--;break;case"=":o.index=n}},isStart:function(){return 0===o.index},isEnd:function(){return o.index===this.length},isOffset:function(t){return this._o&&this.move.direction===t}};return d(t,"move",{get:function(){return this._m},set:function(t){this._m={direction:t.substr(0,1),steps:t.substr(1)?t.substr(1):0}}}),d(t,"length",{get:function(){return n.Html.slides.length-1}}),d(t,"offset",{get:function(){return this._o}}),t},Swipe:function(c,l,f){var e=new k,d=0,h=0,p=0,n=!1,t={mount:function(){this.bindSwipeStart()},start:function(t){if(!n&&!c.disabled){this.disable();var e=this.touches(t);d=null,h=v(e.pageX),p=v(e.pageY),this.bindSwipeMove(),this.bindSwipeEnd(),f.emit("swipe.start")}},move:function(t){if(!c.disabled){var e=c.settings,n=this.touches(t),i=v(n.pageX)-h,r=v(n.pageY)-p,o=Math.abs(i<<2),s=Math.abs(r<<2),u=Math.sqrt(o+s),a=Math.sqrt(s);if(180*(d=Math.asin(a/u))/Math.PI"+s))):l.Move.make(),l.Html.root.classList.remove(e.classes.dragging),this.unbindSwipeMove(),this.unbindSwipeEnd(),f.emit("swipe.end")}},bindSwipeStart:function(){var t=c.settings;t.swipeThreshold&&e.on(T[0],l.Html.wrapper,this.start.bind(this)),t.dragThreshold&&e.on(T[1],l.Html.wrapper,this.start.bind(this))},unbindSwipeStart:function(){e.off(T[0],l.Html.wrapper),e.off(T[1],l.Html.wrapper)},bindSwipeMove:function(){e.on(A,l.Html.wrapper,g(this.move.bind(this),c.settings.throttle))},unbindSwipeMove:function(){e.off(A,l.Html.wrapper)},bindSwipeEnd:function(){e.on(O,l.Html.wrapper,this.end.bind(this))},unbindSwipeEnd:function(){e.off(O,l.Html.wrapper)},touches:function(t){return-1")),37===t.keyCode&&e.Run.make(e.Direction.resolve("<"))}};return n.on(["destroy","update"],function(){r.unbind()}),n.on("update",function(){r.mount()}),n.on("destroy",function(){i.destroy()}),r},Autoplay:function(e,n,t){var i=new k,r={mount:function(){this.start(),e.settings.hoverpause&&this.bind()},start:function(){var t=this;e.settings.autoplay&&o(this._i)&&(this._i=setInterval(function(){t.stop(),n.Run.make(">"),t.start()},this.time))},stop:function(){this._i=clearInterval(this._i)},bind:function(){var t=this;i.on("mouseover",n.Html.root,function(){t.stop()}),i.on("mouseout",n.Html.root,function(){t.start()})},unbind:function(){i.off(["mouseover","mouseout"],n.Html.root)}};return d(r,"time",{get:function(){var t=n.Html.slides[e.index].getAttribute("data-glide-autoplay");return v(t||e.settings.autoplay)}}),t.on(["destroy","update"],function(){r.unbind()}),t.on(["run.before","pause","destroy","swipe.start","update"],function(){r.stop()}),t.on(["run.after","play","swipe.end"],function(){r.start()}),t.on("update",function(){r.mount()}),t.on("destroy",function(){i.destroy()}),r},Breakpoints:function(t,e,n){var i=new k,r=t.settings,o=r.breakpoints;o=C(o);var s=a({},r),u={match:function(t){if(void 0!==window.matchMedia)for(var e in t)if(t.hasOwnProperty(e)&&window.matchMedia("(max-width: "+e+"px)").matches)return t[e];return s}};return a(r,u.match(o)),i.on("resize",window,g(function(){a(r,u.match(o))},t.settings.throttle)),n.on("update",function(){o=C(o),s=a({},r)}),n.on("destroy",function(){i.off("resize",window)}),u}};return function(t){function e(){return u(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,p),i(e,[{key:"mount",value:function(){var t=0