Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@splidejs/splide

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@splidejs/splide - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

4

dist/js/splide.min.js
/*!
* Splide.js
* Version : 1.0.7
* Version : 1.0.8
* License : MIT
* Copyright: 2019 Naotoshi Fujita
*/
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Splide=n():t.Splide=n()}(window,function(){return i={},o.m=e=[function(t,n,e){"use strict";function i(){return(i=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t}).apply(this,arguments)}function r(e,i){Object.keys(e).some(function(t,n){return i(e[t],t,n)})}function s(n){return Object.keys(n).map(function(t){return n[t]})}function o(t){return"object"==typeof t}function a(t,n){var e=i({},t);return o(e)&&o(n)&&r(n,function(t,n){o(t)?(o(e[n])||(e[n]={}),e[n]=a(e[n],t)):e[n]=t}),e}e.r(n);var u="splide",c={active:"is-active",visible:"is-visible",loading:"is-loading"},d={type:"slide",rewind:!1,speed:400,width:0,height:0,fixedWidth:0,fixedHeight:0,heightRatio:0,perPage:1,perMove:0,start:0,focus:!1,gap:0,padding:0,arrows:!0,arrowPath:"",pagination:!0,autoplay:!1,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,lazyLoad:!1,preloadPages:1,easing:"cubic-bezier(.42,.65,.27,.99)",keyboard:!0,drag:!0,flickThreshold:.6,flickPower:600,flickMaxPages:1,direction:"ltr",cover:!0,accessibility:!0,isNavigation:!1,trimSpace:!0,breakpoints:!1,classes:{root:u,track:u+"__track",list:u+"__list",slide:u+"__slide",container:u+"__slide__container",arrows:u+"__arrows",arrow:u+"__arrow",prev:u+"__arrow--prev",next:u+"__arrow--next",pagination:u+"__pagination",page:u+"__pagination__page",clone:u+"__slide--clone",progress:u+"__progress",bar:u+"__progress__bar",autoplay:u+"__autoplay",play:u+"__autoplay__play",pause:u+"__autoplay__pause",spinner:u+"__spinner",sr:u+"__sr"},i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s"}};function f(t,n){return t&&n?t.querySelector(n.split(" ")[0]):null}function l(t,n){if(t){var e=s(t.children);for(var i in e){var o=e[i];if(v(o,n.split(" ")[0]))return o}}return null}function p(t,n){var e=document.createElement(t);return r(n,function(t,n){return y(e,n,t)}),e}function m(e,t){e&&r(t,function(t,n){e.style[n]=t||null})}function h(n){if(n){for(var t=arguments.length,e=new Array(1<t?t-1:0),i=1;i<t;i++)e[i-1]=arguments[i];e.forEach(function(t){t&&n.classList.add(t)})}}function g(t,n){t&&t.classList.remove(n)}function v(t,n){return!!t&&t.classList.contains(n)}function y(t,n,e){t&&t.setAttribute(n,e)}function x(t,n){t&&t.removeAttribute(n)}function b(n,t,e,i){return void 0===i&&(i=!0),n?t.split(" ").map(function(t){return n.addEventListener(t,e,{passive:i}),function(){return n.removeEventListener(t,e)}}):[]}function w(s,u){return{start:function(t,n,e,i){var o=u.Elements.list,r=s.options,a=b(o,"transitionend",function(t){t.target===o&&(i(),a[0]())});m(o,{transition:"transform "+r.speed+"ms "+r.easing,transform:"translate("+e.x+"px,"+e.y+"px)"})}}}function S(i,o){function r(t){var n=o.Slides.getSlide(t),e=i.options;n&&m(n.slide,{transition:"opacity "+e.speed+"ms "+e.easing})}return o.Options.fix({perPage:1,gap:0,padding:0}),o.Drag&&(o.Drag.required=!1),{mount:function(){r(i.index)},start:function(t,n,e,i){r(n),i()}}}var _="loop",k="fade";var P="[SPLIDE]";function C(t){console.error(P+" "+t)}function E(t,n){if(!t)throw new Error(n);return t}function I(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function M(t){var n=t.root.getAttribute("data-splide");if(n)try{t.options=JSON.parse(n)}catch(t){C('"data-splide" must be a valid JSON.')}return{mount:function(){t.index=t.options.start},fix:function(e){var i=a(t.options,e),o=i.breakpoints;o&&r(o,function(t,n){i.breakpoints[n]=a(o[n],e)}),t.options=i}}}function L(e){var i=e.root,o=e.classes;if(!i.id){var t=window[T]||0;window[T]=++t,i.id="splide"+(t<10?"0"+t:t)}var r={mount:function(){var t="was not found.";this.track=l(i,o.track),E(this.track,"A track "+t),this.list=l(this.track,o.list),E(this.list,"A list "+t),this.slides=s(this.list.children),E(this.slides.length,"A slide "+t);var n=a(o.arrows);this.arrows={prev:f(n,"."+o.prev),next:f(n,"."+o.next)};var e=a(o.autoplay);this.bar=f(a(o.progress),"."+o.bar),this.play=f(e,"."+o.play),this.pause=f(e,"."+o.pause),function(){r.track.id||(r.track.id=i.id+"-track");r.list.id||(r.list.id=i.id+"-list")}()},mounted:function(){var t=o.root,n=e.options;h(i,""+t,t+"--"+n.type,t+"--"+n.direction,n.drag?t+"--draggable":"",n.isNavigation?t+"--nav":"")}};function a(t){return l(i,t)||l(r.track,t)}return r}var H=function(){function t(t,n,e){var i=this;void 0===n&&(n={}),void 0===e&&(e={}),this.root=t instanceof HTMLElement?t:f(document,t),E(this.root,"An invalid root element or selector was given."),this.Components={},this.Event=function(){var e={};return{on:function(t,n){t.split(" ").forEach(function(t){e[t]||(e[t]=[]),e[t].push(n)})},off:function(t){t.split(" ").forEach(function(t){return delete e[t]})},emit:function(i){for(var t=arguments.length,o=new Array(1<t?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];r(e,function(t,n){if(n.split(".")[0]===i&&t)for(var e in t)t[e].apply(t,o)})}}}(),this.State=function(t){var n=t;return{set:function(t){n=t},is:function(t){return t===n}}}(1),this._options=a(d,n),this._index=0,this._components=e,this.on("move drag",function(){return i.State.set(3)}).on("moved dragged",function(){return i.State.set(2)})}var n=t.prototype;return n.mount=function(t,n){var i=this;void 0===t&&(t={}),void 0===n&&(n=null),this.Components=function(e,t,n){var i={};return r(t,function(t,n){i[n]=t(e,i,n.toLowerCase())}),n=n||e.is(k)?S:w,i.Transition=n(e,i),i}(this,a(this._components,t),n);try{r(this.Components,function(t,n){var e=t.required;void 0===e||e?t.mount&&t.mount():delete i.Components[n]})}catch(t){return C(t.message),null}return r(this.Components,function(t){t.mounted&&t.mounted()}),this.State.set(2),this.emit("mounted"),this.State.set(2),this.emit("ready"),m(this.root,{visibility:"visible"}),this},n.sync=function(t){return this.sub=t,this},n.on=function(t,n){return this.Event.on(t,n),this},n.off=function(t){return this.Event.off(t),this},n.emit=function(t){for(var n,e=arguments.length,i=new Array(1<e?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];return(n=this.Event).emit.apply(n,[t].concat(i)),this},n.go=function(t,n){void 0===n&&(n=!0),(this.State.is(2)||this.State.is(3)&&!n)&&this.Components.Controller.go(t,!1)},n.is=function(t){return t===this._options.type},function(t,n,e){n&&I(t.prototype,n),e&&I(t,e)}(t,[{key:"index",get:function(){return this._index},set:function(t){this._index=parseInt(t)}},{key:"length",get:function(){return this.Components.Slides.length}},{key:"options",get:function(){return this._options},set:function(t){this._options=a(this._options,t),this.State.is(1)||this.emit("updated",this._options)}},{key:"classes",get:function(){return this._options.classes}},{key:"i18n",get:function(){return this._options.i18n}}]),t}(),T="splideUid";function W(t,n,e){return Math.min(Math.max(t,e<n?e:n),e<n?n:e)}function O(t){for(var n=arguments.length,e=new Array(1<n?n-1:0),i=1;i<n;i++)e[i-1]=arguments[i];var o=0;return t.replace(/%s/g,function(){return e[o++]})}function j(t){var n=typeof t;return"string"==n?t:"number"==n&&0<t?parseFloat(t)+"px":""}function A(r,i){var o,n={mount:function(){o=r.options,r.on("move",function(t){r.index=t}).on("updated",function(t){o=t,r.index=n.rewind(n.trim(r.index))})},go:function(t,n){var e=this.trim(this.parse(t));i.Track.go(e,this.rewind(e),n)},parse:function(t){var n=r.index,e=String(t).match(/([+\-<>])(\d+)?/),i=e&&e[1]||"",o=e?parseInt(e[2]):0;switch(i){case"+":n+=o||1;break;case"-":n-=o||1;break;case">":n=this.pageToIndex(-1<o?o:this.indexToPage(n)+1);break;case"<":n=this.pageToIndex(-1<o?o:this.indexToPage(n)-1);break;default:n=parseInt(t)}return n},pageToIndex:function(t){if(!1!==o.focus)return t;var n=r.length,e=o.perPage,i=t*e;return n-e<=(i-=(this.pageLength*e-n)*q(i/n))&&i<n&&(i=n-e),i},indexToPage:function(t){if(!1!==o.focus)return t;var n=r.length,e=o.perPage;return q(n-e<=t&&t<n?(n-1)/e:t/e)},trim:function(t){return r.is(_)||(t=o.rewind?this.rewind(t):W(t,0,this.edgeIndex)),t},rewind:function(t){var n=this.edgeIndex;if(r.is(_)){for(;n<t;)t-=n+1;for(;t<0;)t+=n+1}else n<t?t=0:t<0&&(t=n);return t},isRtl:function(){return"rtl"===o.direction},get pageLength(){var t=r.length;return!1!==o.focus?t:Math.ceil(t/o.perPage)},get edgeIndex(){var t=r.length;return!1!==o.focus||o.isNavigation||r.is(_)?t-1:t-o.perPage},get prevIndex(){var t=this.parse("-");return(r.is(_)||o.rewind)&&(t=this.rewind(t)),-1<t?t:-1},get nextIndex(){var t=this.parse("+");return(r.is(_)||o.rewind)&&(t=this.rewind(t)),r.index<t&&t<=this.edgeIndex||0===t?t:-1}};return n}var q=Math.floor;function F(o,r){var e=[],a=[];return{mount:function(){for(var t in e=r.Elements.slides)this.register(parseInt(t),-1,e[t])},register:function(t,n,e){var i=function(u,t,o,d){return{slide:o,index:u,realIndex:t,container:f(o,"."+d.classes.container),isClone:-1<t,init:function(){var t=this;if(!o.id&&!this.isClone){var n=u+1;o.id=d.root.id+"-slide"+(n<10?"0"+n:n)}d.on("mounted moved updated",function(){t.update(t.isActive(),!1),t.update(t.isVisible(),!0)})},update:function(t,n){var e=n?"visible":"active",i=c[e];t?(h(o,i),d.emit(e,this)):v(o,i)&&(g(o,i),d.emit(n?"hidden":"inactive",this))},isActive:function(){return d.index===u},isVisible:function(){var t=d.options,n=t.focus,e=t.perPage,i=t.trimSpace,o=d.index,r=d.length,a="center"===n,s=a?e/2:parseInt(n)||0;if(i){if(o<s)return u<e;if(r-(e-s)<=o)return r-e<=u}return o-s+(a&&e%2==0?1:0)<=u&&u<o+e-s},isWithin:function(t,n){var e=Math.abs(t-u);return d.is("slide")||this.isClone||(e=Math.min(e,d.length-e)),e<n}}}(t,n,e,o);i.init(),a.push(i)},getSlide:function(n){return a.filter(function(t){return t.index===n})[0]},getSlides:function(t,n){return n?t?a:a.filter(function(t){return!t.isClone}):t?a.map(function(t){return t.slide}):e},getSlidesByPage:function(t){var e=r.Controller.pageToIndex(t),n=o.options,i=!1!==n.focus?1:n.perPage;return a.filter(function(t){var n=t.index;return e<=n&&n<e+i})},get length(){return e.length},get total(){return a.length}}}function z(a,s){var o,n,u=0,e="ttb"===a.options.direction;return{mount:function(){o=s.Elements.list,n=e?function(r,a){var s=a.Layout;return{translate:function(t,n){m(t,{transform:"translateY("+n+"px)"})},toPosition:function(t){return-(t*s.slideHeight+this.offset)},toIndex:function(t){return Math.round(-(t+this.offset)/s.slideHeight)},trim:function(t){return W(t,-s.slideHeight*(r.length-r.options.perPage),0)},get offset(){var t,n=s.listHeight,e=s.slideHeight,i=s.gap,o=r.options.focus;return t="center"===o?(n-e+i)/2:(parseInt(o)||0)*e,e*a.Clones.length/2-t}}}(a,s):function(r,a){var s=a.Layout;return{translate:function(t,n){m(t,{transform:"translateX("+n+"px)"})},toPosition:function(t){return this.sign*(t*s.slideWidth+this.offset)},toIndex:function(t){return Math.round((this.sign*t-this.offset)/s.slideWidth)},trim:function(t){return W(t,this.sign*(s.listWidth-(s.width+s.gap)),0)},get sign(){return a.Controller.isRtl()?1:-1},get offset(){var t,n=s.width,e=s.slideWidth,i=s.gap,o=r.options.focus;return t="center"===o?(n-e+i)/2:(parseInt(o)||0)*e,e*a.Clones.length/2-t}}}(a,s)},mounted:function(){var t=this;a.is(k)||a.on("mounted resize updated",function(){t.jump(a.index)})},go:function(t,n,e){var i=this,o=this.trim(this.toPosition(t)),r=a.index;e||a.emit("move",n,r,t),1<=Math.abs(o-u)||a.is(k)?s.Transition.start(t,n,this.toCoord(o),function(){i.end(t,n,r,e)}):this.end(t,n,r,e)},end:function(t,n,e,i){m(o,{transition:""}),a.is(k)||this.jump(n),i||a.emit("moved",n,e,t)},jump:function(t){var n=this.trim(this.toPosition(t));this.translate(n)},translate:function(t){u=t,n.translate(o,t)},toPosition:function(t){return n.toPosition(t)},toIndex:function(t){return n.toIndex(t)},trim:function(t){return!a.options.trimSpace||a.is(_)?t:n.trim(t)},toCoord:function(t){return{x:e?0:t,y:e?t:0}},get position(){return u},get offset(){return n.offset}}}function R(l,c){var f=[];function p(t){var n=t.cloneNode(!0);return h(n,l.classes.clone),x(n,"id"),n}return{mount:function(){l.is(_)&&function(){var i=c.Slides,o=c.Elements.list,t=l.options,n=t.perPage,e=t.drag,r=t.flickMaxPages,a=void 0===r?1:r,s=i.length,u=n*(e?a+1:1)+(s<n?n:0),d=i.getSlides(!1,!1);for(;d.length<u;)d=d.concat(d);d.slice(0,u).forEach(function(t,n){var e=p(t);o.appendChild(e),f.push(e),i.register(n+s,n,e)}),d.slice(-u).forEach(function(t,n){var e=p(t);o.insertBefore(e,d[0]),f.push(e),i.register(n-u,n,e)})}()},get clones(){return f},get length(){return f.length}}}function B(i,o){var a,s,u,r=i.root,d="ttb"===i.options.direction,t=o.Elements,l={mount:function(){a=t.list,s=o.Slides.getSlides(!0,!0),function(){var t=function(t,n){var e=null;return function(){e=e||setTimeout(function(){t(),e=null},n)}}(function(){i.emit("resize")},30);b(window,"resize",t),i.on("mounted resize",c).on("updated",n),d||i.on("resize",e)}(),n()},get width(){return u.width},get listWidth(){return u.listWidth},get listHeight(){return u.listHeight},get slideWidth(){return u.getSlideWidth(!0)},get slideHeight(){return u.getSlideHeight(!0)},get gap(){return u.gap},get padding(){return u.padding}};function n(){var t=i.options;for(var n in(u=d?function(t,n,c){var f,p,h,g=n.Elements,v=g.track;return{marginProp:"marginBottom",init:function(){var t=c.padding,n=t.top,e=void 0===n?0:n,i=t.bottom,o=void 0===i?0:i;m(v,{paddingTop:j(e),paddingBottom:j(o)});var r=g.slides[0],a=r.style.position,s=c.fixedWidth,u=c.fixedHeight,d=c.height;if(m(r,{position:"absolute"}),s&&(m(r,{width:j(s)}),f=parseFloat(getComputedStyle(r).width)),u&&(m(r,{height:j(u)}),p=parseFloat(getComputedStyle(r).height)),m(r,{position:a}),d){var l=g.list;m(l,{height:j(d)}),h=parseFloat(getComputedStyle(l).height)}},getSlideWidth:function(){return f||this.width},getSlideHeight:function(t){var n=p||(this.listHeight+this.gap)/c.perPage;return t?n:n-this.gap},get width(){return v.clientWidth},get listWidth(){return this.width},get listHeight(){var t=h||this.width*c.heightRatio;return E(t,'"height" or "heightRatio" must be given in TTB mode.'),t-this.padding.top-this.padding.bottom},get gap(){var t=getComputedStyle(g.slides[0]);return parseFloat(t[this.marginProp])||0},get padding(){var t=getComputedStyle(v);return{top:parseFloat(t.paddingTop)||0,bottom:parseFloat(t.paddingBottom)||0}}}}(0,o,t):function(t,n,d){var l,c,f=n.Elements,p=f.track;return{marginProp:"rtl"===d.direction?"marginLeft":"marginRight",listHeight:0,init:function(){var t=d.padding,n=t.left,e=void 0===n?0:n,i=t.right,o=void 0===i?0:i;m(p,{paddingLeft:j(e),paddingRight:j(o)});var r=f.slides[0],a=d.fixedWidth,s=d.height||d.fixedHeight,u=r.style.position;m(r,{position:"absolute"}),a&&(m(r,{width:j(a)}),l=parseFloat(getComputedStyle(r).width)),s&&(m(r,{height:j(s)}),c=parseFloat(getComputedStyle(r).height)),m(r,{position:u})},getSlideWidth:function(t){if(l)return t?l+this.gap:l;var n=(this.width+this.gap)/d.perPage;return t?n:n-this.gap},getSlideHeight:function(){return c||this.width*d.heightRatio||0},get width(){return p.clientWidth-this.padding.left-this.padding.right},get listWidth(){return this.getSlideWidth(!0)*n.Slides.total},get gap(){var t=getComputedStyle(f.slides[0]);return parseFloat(t[this.marginProp])||0},get padding(){var t=getComputedStyle(p);return{left:parseFloat(t.paddingLeft)||0,right:parseFloat(t.paddingRight)||0}}}}(0,o,t)).init(),m(r,{maxWidth:j(t.width)}),s){var e;m(s[n].slide,((e={})[u.marginProp]=j(t.gap),e))}c()}function c(){m(a,{width:j(l.listWidth),height:j(l.listHeight)});var t=j(u.getSlideWidth(!1)),n=j(u.getSlideHeight(!1));for(var e in s){var i=s[e],o=i.slide,r=i.container;m(r,{height:n}),m(o,{width:t,height:r?"":n})}}function e(){var t=i.options;if(t.fixedWidth){var n=Math.floor((l.width+u.gap)/l.slideWidth)||1;t.perPage!==n&&(i.options={perPage:n})}}return l}function N(u,d){var e,i,o,l=d.Track,c=d.Controller,r=!1,a="ttb"===u.options.direction,f=a?"y":"x",n={required:u.options.drag,disabled:!1,mount:function(){var t=d.Elements.list;b(t,"touchstart mousedown",s),b(t,"touchmove mousemove",p,!1),b(t,"touchend touchcancel mouseleave mouseup dragend",h)}};function s(t){n.disabled||r||!u.State.is(2)||(e=l.toCoord(l.position),i=g(t,{}),o=i)}function p(t){if(i)if(o=g(t,i),r){t.cancelable&&t.preventDefault();var n=e[f]+o.offset[f];l.translate(function(t){if(!u.is(_)){var n=l.trim,e=l.toPosition,i=c.isRtl()?-1:1,o=i*n(e(0)),r=i*n(e(c.edgeIndex));o<(t*=i)?t=5*Math.log(t-o)+o:t<r&&(t=-5*Math.log(r-t)+r),t*=i}return t}(n))}else!function(t){var n=t.offset;if(u.State.is(2)){var e=180*Math.atan(Math.abs(n.y)/Math.abs(n.x))/Math.PI;return a&&(e=90-e),e<30}return!1}(o)||(u.emit("drag",i),r=!0)}function h(){i=null,r&&(u.emit("dragged",o),function(t){var n=t.velocity[f],e=Math.abs(n);if(0<e){var i=d.Layout,o=u.options,r=n<0?-1:1,a=l.position;e>o.flickThreshold&&Math.abs(t.offset[f])<150?a+=r*Math.min(e*o.flickPower,i.width*(o.flickMaxPages||1)):a+=r*i.slideWidth/2;var s=l.toIndex(a);u.is(_)||(s=W(s,0,c.edgeIndex)),c.go(s,o.isNavigation)}}(o),r=!1)}function g(t,n){var e=t.timeStamp,i=t.touches,o=i?i[0]:t,r=o.clientX,a=o.clientY,s=n.to||{},u=s.x,d=void 0===u?r:u,l=s.y,c=void 0===l?a:l,f={x:r-d,y:a-c},p=e-(n.timeStamp||0);return{from:{x:d,y:c},to:{x:r,y:a},offset:f,timeStamp:e,velocity:{x:f.x/p,y:f.y/p}}}return n}function X(o,r,a){var s,e=[],u={required:o.options.autoplay,mount:function(){var t=o.options,n=r.Elements,e=n.slides,i=n.bar;e.length>t.perPage&&(s=function(n,e,i){function o(t){d||(s=(a=t-(r=r||t))/e,e<=a&&(r=0,s=1,n()),i&&i(s),u(o))}var r,a,s,u=window.requestAnimationFrame,d=!0;return{pause:function(){d=!0,r=0},play:function(){r=0,d&&(d=!1,u(o))}}}(function(){o.go(">")},t.interval,function(t){o.emit(a+":playing",t),i&&m(i,{width:100*t+"%"})}),function(){var t=o.options,n=r.Elements,e=o.sub,i=[o.root,e?e.root:null];t.pauseOnHover&&(d(i,"mouseleave",V,!0),d(i,"mouseenter",V,!1));t.pauseOnFocus&&(d(i,"focusout",Y,!0),d(i,"focusin",Y,!1));b(n.play,"click",function(){u.play(Y),u.play(K)}),d([n.pause],"click",K,!1),o.on("move",function(){u.play()})}(),this.play())},play:function(n){void 0===n&&(n=0),(e=e.filter(function(t){return t!==n})).length||(o.emit(a+":play"),s.play())},pause:function(t){void 0===t&&(t=0),s.pause(),-1===e.indexOf(t)&&e.push(t),1===e.length&&o.emit(a+":pause")}};function d(t,n,e,i){for(var o in t)b(t[o],n,function(){u[i?"play":"pause"](e)})}return u}function D(s,u,d){var l,i=s.classes,n=s.root;function o(t){var n=p("button",{class:i.arrow+" "+(t?i.prev:i.next)});return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg"\tviewBox="0 0 20 20"\twidth="20"\theight="20"><path d="'+(s.options.arrowPath||"m7.61 0.807-2.12 2.12 7.11 7.07-7.11 7.1 2.12 2.1 7.09-7.1 2.1-2.1-2.1-2.12-7.09-7.07z")+'" /></svg>',n}return{required:s.options.arrows,mount:function(){var t=u.Elements;(l=t.arrows).prev&&l.next||!s.options.arrows||(l=function(){var t=p("div",{class:i.arrows}),n=o(!0),e=o(!1);return t.appendChild(n),t.appendChild(e),{wrapper:t,prev:n,next:e}}(),n.insertBefore(l.wrapper,t.track)),l&&(function(){var t=s.options.perMove;b(l.prev,"click",function(){s.go(t?"-"+t:"<")}),b(l.next,"click",function(){s.go(t?"+"+t:">")})}(),s.on("mounted move updated",function(){var t=l,n=t.prev,e=t.next,i=u.Controller,o=i.prevIndex,r=i.nextIndex,a=o===r;n.disabled=o<0||a,e.disabled=r<0||a,s.emit(d+":updated",n,e,o,r)})),this.arrows=l},mounted:function(){s.emit(d+":mounted",l.prev,l.next)}}}function G(s,e,o){var r={},a={required:s.options.pagination,mount:function(){r=function(){var n=s.options,o=s.classes,r=p("ul",{class:o.pagination}),a=e.Slides,t=a.getSlides(!1,!0).filter(function(t){return!1!==n.focus||t.index%n.perPage==0}).map(function(t,n){var e=p("li",{}),i=p("button",{class:o.page});return e.appendChild(i),r.appendChild(e),b(i,"click",function(){s.go(">"+n)}),{li:e,button:i,page:n,Slides:a.getSlidesByPage(n)}});return{list:r,items:t}}();var t=s.root;"top"===s.options.pagination?t.insertBefore(r.list,e.Elements.track):t.appendChild(r.list),s.on(U,n).on(Q,function(){a.destroy(),s.options.pagination&&(a.mount(),a.mounted())})},mounted:function(){var t=s.index;s.emit(o+":mounted",r,this.getItem(t)),n(t,-1)},destroy:function(){r&&r.list&&s.root.removeChild(r.list),s.off(U).off(Q),r=null},getItem:function(t){return r.items[e.Controller.indexToPage(t)]},get data(){return r}};function n(t,n){var e=a.getItem(n),i=a.getItem(t);e&&g(e.button,c.active),i&&h(i.button,c.active),s.emit(o+":updated",r,e,i)}return a}function J(s,i){var u,d,l=s.i18n;function n(t,n){y(t,"aria-hidden",!n),y(t,"tabindex",n?0:-1)}function t(t,n){u=f(l.prev),d=f(l.next),t.appendChild(u),n.appendChild(d);var e=i.Elements.track.id;y(t,nt,e),y(n,nt,e)}function e(t,n,e,i){var o=s.index,r=-1<e&&o<e?l.last:l.prev,a=-1<i&&i<o?l.first:l.next;u.innerHTML=r,d.innerHTML=a,y(t,et,r),y(n,et,a)}function o(t,n){n&&y(n.button,tt,!0),t.items.forEach(function(t){var n=s.options,e=O(!1===n.focus&&1<n.perPage?l.pageX:l.slideX,t.page+1),i=f(e),o=t.button,r=[];o.appendChild(i),t.Slides.forEach(function(t){r.push(t.slide.id)}),y(o,nt,r.join(" ")),y(o,et,e)})}function r(t,n,e){n&&x(n.button,tt),e&&y(e.button,tt,!0)}function a(r){i.Slides.getSlides(!0,!0).forEach(function(t){var n=t.slide;"button"!==n.tagName.toLowerCase()&&y(n,"role","button");var e=t.realIndex,i=O(l.slideX,e+1),o=r.Components.Slides.getSlide(e);y(n,et,i),n.appendChild(f(i)),o&&y(n,nt,o.slide.id)})}function c(t,n){var e=t.slide;n?y(e,tt,!0):x(e,tt)}function f(t){var n=p("span",{class:s.classes.sr});return n.textContent=t,n}return{required:s.options.accessibility,mount:function(){s.on("visible",function(t){n(t.slide,!0)}).on("hidden",function(t){n(t.slide,!1)}).on("arrows:mounted",t).on("arrows:updated",e).on("pagination:mounted",o).on("pagination:updated",r),s.options.isNavigation&&s.on("navigation:mounted",a).on("active",function(t){c(t,!0)}).on("inactive",function(t){c(t,!1)})}}}var V=1,Y=2,K=3,U="move.page",Q="updated.page",Z="data-splide-lazy",$={ArrowLeft:"<",ArrowRight:">",Left:"<",Right:">"},tt="aria-current",nt="aria-controls",et="aria-label",it="move.sync",ot=[" ","Enter","Spacebar"],rt={Options:M,Elements:L,Controller:A,Slides:F,Track:z,Clones:R,Layout:B,Drag:N,Autoplay:X,Cover:function(t,n){var e=t.options;function i(t){var n=t.parentElement;n&&(m(n,{background:'center/cover no-repeat url("'+t.src+'")'}),m(t,{display:"none"}))}return{required:e.cover&&(e.height||e.heightRatio||e.fixedHeight),mount:function(){n.Slides.getSlides(!0,!1).forEach(function(t){var n=f(t,"img");n&&n.src&&i(n)}),t.on("lazyload:loaded",function(t){i(t)})}}},Arrows:D,Pagination:G,LazyLoad:function(o,t,r){var n=0,i=[],e=o.options.lazyLoad,a="sequential"===e;function s(n){var e=o.options;(i=i.filter(function(t){return!t.Slide.isWithin(n,e.perPage*(e.preloadPages+1))||(u(t.img,t.Slide),!1)})).length||o.off("moved."+r)}function u(t,n){h(n.slide,c.loading);var e=p("span",{class:o.classes.spinner});t.parentElement.appendChild(e),t.onload=function(){l(t,e,n,!1)},t.onerror=function(){l(t,e,n,!0)},m(t,{visibility:"hidden"}),y(t,"src",t.getAttribute(Z))}function d(){if(n<i.length){var t=i[n];u(t.img,t.Slide)}n++}function l(t,n,e,i){g(e.slide,c.loading),i||(t.parentElement.removeChild(n),m(t,{visibility:"visible"}),o.emit(r+":loaded",t)),a&&d()}return{required:e,mount:function(){t.Slides.getSlides(!0,!0).forEach(function(t){var n=f(t.slide,"["+Z+"]");n&&i.push({img:n,Slide:t})}),i.length&&(a?d():o.on("mounted",function(){s(o.index)}).on("moved."+r,function(t){s(t)}))}}},Keyboard:function(n){var t;return{mount:function(){n.on("mounted updated",function(){t&&(t[0](),t=void 0),n.options.keyboard&&(t=b(n.root,"keydown",function(t){$[t.key]&&n.go($[t.key])}))})}}},Sync:function(i){var o=i.sub;function r(){i.on(it,function(t,n,e){o.off(it).go(o.is(_)?e:t,!1),a()})}function a(){o.on(it,function(t,n,e){i.off(it).go(i.is(_)?e:t,!1),r()})}function e(t){i.State.is(2)&&o.go(t)}return{required:!!o,mount:function(){r(),a(),o.options.isNavigation&&o.Components.Slides.getSlides(!0,!0).forEach(function(n){var t=n.slide;b(t,"mouseup touchend",function(t){t.button&&0!==t.button||e(n.index)}),b(t,"keyup",function(t){-1<ot.indexOf(t.key)&&(t.preventDefault(),e(n.index))},!1)})}}},A11y:J,Breakpoints:function(n){var e,i,o=n.options.breakpoints,r=[];return{required:o&&matchMedia,mount:function(){r=Object.keys(o).sort(function(t,n){return parseInt(t)-parseInt(n)}).map(function(t){return{point:t,mql:matchMedia("(max-width:"+t+"px)")}}),n.on("mounted resize",function(){var t=function(){var t=r.filter(function(t){return t.mql.matches})[0];return t?t.point:-1}();t!==i&&(n.options=o[t]||e,i=t)})},mounted:function(){e=n.options}}}};function at(t,n){return void 0===n&&(n={}),new H(t,n,rt)}e.d(n,"default",function(){return at}),window.splide=at}],o.c=i,o.d=function(t,n,e){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var i in n)o.d(e,i,function(t){return n[t]}.bind(null,i));return e},o.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s=0);function o(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}var e,i});
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Splide=n():t.Splide=n()}(window,function(){return i={},o.m=e=[function(t,n,e){"use strict";function i(){return(i=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t}).apply(this,arguments)}function r(e,i){Object.keys(e).some(function(t,n){return i(e[t],t,n)})}function s(n){return Object.keys(n).map(function(t){return n[t]})}function o(t){return"object"==typeof t}function a(t,n){var e=i({},t);return o(e)&&o(n)&&r(n,function(t,n){o(t)?(o(e[n])||(e[n]={}),e[n]=a(e[n],t)):e[n]=t}),e}e.r(n);var u="splide",l={active:"is-active",visible:"is-visible",loading:"is-loading"},d={type:"slide",rewind:!1,speed:400,width:0,height:0,fixedWidth:0,fixedHeight:0,heightRatio:0,perPage:1,perMove:0,start:0,focus:!1,gap:0,padding:0,arrows:!0,arrowPath:"",pagination:!0,autoplay:!1,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,lazyLoad:!1,preloadPages:1,easing:"cubic-bezier(.42,.65,.27,.99)",keyboard:!0,drag:!0,flickThreshold:.6,flickPower:600,flickMaxPages:1,direction:"ltr",cover:!0,accessibility:!0,isNavigation:!1,trimSpace:!0,breakpoints:!1,classes:{root:u,track:u+"__track",list:u+"__list",slide:u+"__slide",container:u+"__slide__container",arrows:u+"__arrows",arrow:u+"__arrow",prev:u+"__arrow--prev",next:u+"__arrow--next",pagination:u+"__pagination",page:u+"__pagination__page",clone:u+"__slide--clone",progress:u+"__progress",bar:u+"__progress__bar",autoplay:u+"__autoplay",play:u+"__autoplay__play",pause:u+"__autoplay__pause",spinner:u+"__spinner",sr:u+"__sr"},i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s"}};function f(t,n){return t&&n?t.querySelector(n.split(" ")[0]):null}function c(t,n){if(t){var e=s(t.children);for(var i in e){var o=e[i];if(v(o,n.split(" ")[0]))return o}}return null}function p(t,n){var e=document.createElement(t);return r(n,function(t,n){return y(e,n,t)}),e}function m(e,t){e&&r(t,function(t,n){e.style[n]=t||null})}function h(n){if(n){for(var t=arguments.length,e=new Array(1<t?t-1:0),i=1;i<t;i++)e[i-1]=arguments[i];e.forEach(function(t){t&&n.classList.add(t)})}}function g(t,n){t&&t.classList.remove(n)}function v(t,n){return!!t&&t.classList.contains(n)}function y(t,n,e){t&&t.setAttribute(n,e)}function x(t,n){t&&t.removeAttribute(n)}function b(n,t,e,i){return void 0===i&&(i=!0),n?t.split(" ").map(function(t){return n.addEventListener(t,e,{passive:i}),function(){return n.removeEventListener(t,e)}}):[]}function w(s,u){return{start:function(t,n,e,i){var o=u.Elements.list,r=s.options,a=b(o,"transitionend",function(t){t.target===o&&(i(),a[0]())});m(o,{transition:"transform "+r.speed+"ms "+r.easing,transform:"translate("+e.x+"px,"+e.y+"px)"})}}}function S(i,o){function r(t){var n=o.Slides.getSlide(t),e=i.options;n&&m(n.slide,{transition:"opacity "+e.speed+"ms "+e.easing})}return o.Options.fix({perPage:1,gap:0,padding:0}),o.Drag&&(o.Drag.required=!1),{mount:function(){r(i.index)},start:function(t,n,e,i){r(n),i()}}}var _="loop",k="fade";var P="[SPLIDE]";function C(t){console.error(P+" "+t)}function E(t,n){if(!t)throw new Error(n);return t}function I(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function M(t){var n=t.root.getAttribute("data-splide");if(n)try{t.options=JSON.parse(n)}catch(t){C('"data-splide" must be a valid JSON.')}return{mount:function(){t.index=t.options.start},fix:function(e){var i=a(t.options,e),o=i.breakpoints;o&&r(o,function(t,n){i.breakpoints[n]=a(o[n],e)}),t.options=i}}}function L(e){var i=e.root,o=e.classes;if(!i.id){var t=window[T]||0;window[T]=++t,i.id="splide"+(t<10?"0"+t:t)}var r={mount:function(){var t="was not found.";this.track=c(i,o.track),E(this.track,"A track "+t),this.list=c(this.track,o.list),E(this.list,"A list "+t),this.slides=s(this.list.children),E(this.slides.length,"A slide "+t);var n=a(o.arrows);this.arrows={prev:f(n,"."+o.prev),next:f(n,"."+o.next)};var e=a(o.autoplay);this.bar=f(a(o.progress),"."+o.bar),this.play=f(e,"."+o.play),this.pause=f(e,"."+o.pause),function(){r.track.id||(r.track.id=i.id+"-track");r.list.id||(r.list.id=i.id+"-list")}()},mounted:function(){var t=o.root,n=e.options;h(i,""+t,t+"--"+n.type,t+"--"+n.direction,n.drag?t+"--draggable":"",n.isNavigation?t+"--nav":"")}};function a(t){return c(i,t)||c(r.track,t)}return r}var H=function(){function t(t,n,e){var i=this;void 0===n&&(n={}),void 0===e&&(e={}),this.root=t instanceof HTMLElement?t:f(document,t),E(this.root,"An invalid root element or selector was given."),this.Components={},this.Event=function(){var e={};return{on:function(t,n){t.split(" ").forEach(function(t){e[t]||(e[t]=[]),e[t].push(n)})},off:function(t){t.split(" ").forEach(function(t){return delete e[t]})},emit:function(i){for(var t=arguments.length,o=new Array(1<t?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];r(e,function(t,n){if(n.split(".")[0]===i&&t)for(var e in t)t[e].apply(t,o)})}}}(),this.State=function(t){var n=t;return{set:function(t){n=t},is:function(t){return t===n}}}(1),this._options=a(d,n),this._index=0,this._components=e,this.on("move drag",function(){return i.State.set(3)}).on("moved dragged",function(){return i.State.set(2)})}var n=t.prototype;return n.mount=function(t,n){var i=this;void 0===t&&(t={}),void 0===n&&(n=null),this.Components=function(e,t,n){var i={};return r(t,function(t,n){i[n]=t(e,i,n.toLowerCase())}),n=n||e.is(k)?S:w,i.Transition=n(e,i),i}(this,a(this._components,t),n);try{r(this.Components,function(t,n){var e=t.required;void 0===e||e?t.mount&&t.mount():delete i.Components[n]})}catch(t){return C(t.message),null}return r(this.Components,function(t){t.mounted&&t.mounted()}),this.State.set(2),this.emit("mounted"),this.State.set(2),this.emit("ready"),m(this.root,{visibility:"visible"}),this},n.sync=function(t){return this.sub=t,this},n.on=function(t,n){return this.Event.on(t,n),this},n.off=function(t){return this.Event.off(t),this},n.emit=function(t){for(var n,e=arguments.length,i=new Array(1<e?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];return(n=this.Event).emit.apply(n,[t].concat(i)),this},n.go=function(t,n){void 0===n&&(n=!0),(this.State.is(2)||this.State.is(3)&&!n)&&this.Components.Controller.go(t,!1)},n.is=function(t){return t===this._options.type},function(t,n,e){n&&I(t.prototype,n),e&&I(t,e)}(t,[{key:"index",get:function(){return this._index},set:function(t){this._index=parseInt(t)}},{key:"length",get:function(){return this.Components.Slides.length}},{key:"options",get:function(){return this._options},set:function(t){this._options=a(this._options,t),this.State.is(1)||this.emit("updated",this._options)}},{key:"classes",get:function(){return this._options.classes}},{key:"i18n",get:function(){return this._options.i18n}}]),t}(),T="splideUid";function W(t,n,e){return Math.min(Math.max(t,e<n?e:n),e<n?n:e)}function O(t){for(var n=arguments.length,e=new Array(1<n?n-1:0),i=1;i<n;i++)e[i-1]=arguments[i];var o=0;return t.replace(/%s/g,function(){return e[o++]})}function j(t){var n=typeof t;return"string"==n?t:"number"==n&&0<t?parseFloat(t)+"px":""}function A(r,i){var o,n={mount:function(){o=r.options,r.on("move",function(t){r.index=t}).on("updated",function(t){o=t,r.index=n.rewind(n.trim(r.index))})},go:function(t,n){var e=this.trim(this.parse(t));i.Track.go(e,this.rewind(e),n)},parse:function(t){var n=r.index,e=String(t).match(/([+\-<>])(\d+)?/),i=e&&e[1]||"",o=e?parseInt(e[2]):0;switch(i){case"+":n+=o||1;break;case"-":n-=o||1;break;case">":n=this.pageToIndex(-1<o?o:this.indexToPage(n)+1);break;case"<":n=this.pageToIndex(-1<o?o:this.indexToPage(n)-1);break;default:n=parseInt(t)}return n},pageToIndex:function(t){if(!1!==o.focus)return t;var n=r.length,e=o.perPage,i=t*e;return n-e<=(i-=(this.pageLength*e-n)*q(i/n))&&i<n&&(i=n-e),i},indexToPage:function(t){if(!1!==o.focus)return t;var n=r.length,e=o.perPage;return q(n-e<=t&&t<n?(n-1)/e:t/e)},trim:function(t){return r.is(_)||(t=o.rewind?this.rewind(t):W(t,0,this.edgeIndex)),t},rewind:function(t){var n=this.edgeIndex;if(r.is(_)){for(;n<t;)t-=n+1;for(;t<0;)t+=n+1}else n<t?t=0:t<0&&(t=n);return t},isRtl:function(){return"rtl"===o.direction},get pageLength(){var t=r.length;return!1!==o.focus?t:Math.ceil(t/o.perPage)},get edgeIndex(){var t=r.length;return!1!==o.focus||o.isNavigation||r.is(_)?t-1:t-o.perPage},get prevIndex(){var t=this.parse("-");return(r.is(_)||o.rewind)&&(t=this.rewind(t)),-1<t?t:-1},get nextIndex(){var t=this.parse("+");return(r.is(_)||o.rewind)&&(t=this.rewind(t)),r.index<t&&t<=this.edgeIndex||0===t?t:-1}};return n}var q=Math.floor;function F(o,r){var e=[],a=[];return{mount:function(){for(var t in e=r.Elements.slides)this.register(parseInt(t),-1,e[t])},register:function(t,n,e){var i=function(u,t,o,d){return{slide:o,index:u,realIndex:t,container:f(o,"."+d.classes.container),isClone:-1<t,init:function(){var t=this;if(!o.id&&!this.isClone){var n=u+1;o.id=d.root.id+"-slide"+(n<10?"0"+n:n)}d.on("mounted moved updated",function(){t.update(t.isActive(),!1),t.update(t.isVisible(),!0)})},update:function(t,n){var e=n?"visible":"active",i=l[e];t?(h(o,i),d.emit(e,this)):v(o,i)&&(g(o,i),d.emit(n?"hidden":"inactive",this))},isActive:function(){return d.index===u},isVisible:function(){var t=d.options,n=t.focus,e=t.perPage,i=t.trimSpace,o=d.index,r=d.length,a="center"===n,s=a?e/2:parseInt(n)||0;if(i){if(o<s)return u<e;if(r-(e-s)<=o)return r-e<=u}return o-s+(a&&e%2==0?1:0)<=u&&u<o+e-s},isWithin:function(t,n){var e=Math.abs(t-u);return d.is("slide")||this.isClone||(e=Math.min(e,d.length-e)),e<n}}}(t,n,e,o);i.init(),a.push(i)},getSlide:function(n){return a.filter(function(t){return t.index===n})[0]},getSlides:function(t,n){return n?t?a:a.filter(function(t){return!t.isClone}):t?a.map(function(t){return t.slide}):e},getSlidesByPage:function(t){var e=r.Controller.pageToIndex(t),n=o.options,i=!1!==n.focus?1:n.perPage;return a.filter(function(t){var n=t.index;return e<=n&&n<e+i})},get length(){return e.length},get total(){return a.length}}}function z(a,s){var o,n,u=0,e="ttb"===a.options.direction;return{mount:function(){o=s.Elements.list,n=e?function(r,a){var s=a.Layout;return{translate:function(t,n){m(t,{transform:"translateY("+n+"px)"})},toPosition:function(t){return-(t*s.slideHeight+this.offset)},toIndex:function(t){return Math.round(-(t+this.offset)/s.slideHeight)},trim:function(t){return W(t,-s.slideHeight*(r.length-r.options.perPage),0)},get offset(){var t,n=s.listHeight,e=s.slideHeight,i=s.gap,o=r.options.focus;return t="center"===o?(n-e+i)/2:(parseInt(o)||0)*e,e*a.Clones.length/2-t}}}(a,s):function(r,a){var s=a.Layout;return{translate:function(t,n){m(t,{transform:"translateX("+n+"px)"})},toPosition:function(t){return this.sign*(t*s.slideWidth+this.offset)},toIndex:function(t){return Math.round((this.sign*t-this.offset)/s.slideWidth)},trim:function(t){return W(t,this.sign*(s.listWidth-(s.width+s.gap)),0)},get sign(){return a.Controller.isRtl()?1:-1},get offset(){var t,n=s.width,e=s.slideWidth,i=s.gap,o=r.options.focus;return t="center"===o?(n-e+i)/2:(parseInt(o)||0)*e,e*a.Clones.length/2-t}}}(a,s)},mounted:function(){var t=this;a.is(k)||a.on("mounted resize updated",function(){t.jump(a.index)})},go:function(t,n,e){var i=this,o=this.trim(this.toPosition(t)),r=a.index;e||a.emit("move",n,r,t),1<=Math.abs(o-u)||a.is(k)?s.Transition.start(t,n,this.toCoord(o),function(){i.end(t,n,r,e)}):this.end(t,n,r,e)},end:function(t,n,e,i){m(o,{transition:""}),a.is(k)||this.jump(n),i||a.emit("moved",n,e,t)},jump:function(t){var n=this.trim(this.toPosition(t));this.translate(n)},translate:function(t){u=t,n.translate(o,t)},toPosition:function(t){return n.toPosition(t)},toIndex:function(t){return n.toIndex(t)},trim:function(t){return!a.options.trimSpace||a.is(_)?t:n.trim(t)},toCoord:function(t){return{x:e?0:t,y:e?t:0}},get position(){return u},get offset(){return n.offset}}}function R(c,l){var f=[];function p(t){var n=t.cloneNode(!0);return h(n,c.classes.clone),x(n,"id"),n}return{mount:function(){c.is(_)&&function(){var i=l.Slides,o=l.Elements.list,t=c.options,n=t.perPage,e=t.drag,r=t.flickMaxPages,a=void 0===r?1:r,s=i.length,u=n*(e?a+1:1)+(s<n?n:0),d=i.getSlides(!1,!1);for(;d.length<u;)d=d.concat(d);d.slice(0,u).forEach(function(t,n){var e=p(t);o.appendChild(e),f.push(e),i.register(n+s,n,e)}),d.slice(-u).forEach(function(t,n){var e=p(t);o.insertBefore(e,d[0]),f.push(e),i.register(n-u,n,e)})}()},get clones(){return f},get length(){return f.length}}}function B(i,o){var a,s,u,r=i.root,d="ttb"===i.options.direction,t=o.Elements,c={mount:function(){a=t.list,s=o.Slides.getSlides(!0,!0),function(){var t=function(t,n){var e=null;return function(){e=e||setTimeout(function(){t(),e=null},n)}}(function(){i.emit("resize")},30);b(window,"resize",t),i.on("mounted resize",l).on("updated",n),d||i.on("resize",e)}(),n()},get width(){return u.width},get listWidth(){return u.listWidth},get listHeight(){return u.listHeight},get slideWidth(){return u.getSlideWidth(!0)},get slideHeight(){return u.getSlideHeight(!0)},get gap(){return u.gap},get padding(){return u.padding}};function n(){var t=i.options;for(var n in(u=d?function(t,n,l){var f,p,h,g=n.Elements,v=g.track;return{marginProp:"marginBottom",init:function(){var t=l.padding,n=t.top,e=void 0===n?0:n,i=t.bottom,o=void 0===i?0:i;m(v,{paddingTop:j(e),paddingBottom:j(o)});var r=g.slides[0],a=r.style.position||"static",s=l.fixedWidth,u=l.fixedHeight,d=l.height;if(m(r,{position:"absolute"}),s&&(m(r,{width:j(s)}),f=parseFloat(getComputedStyle(r).width)),u&&(m(r,{height:j(u)}),p=parseFloat(getComputedStyle(r).height)),m(r,{position:a}),d){var c=g.list;m(c,{height:j(d)}),h=parseFloat(getComputedStyle(c).height)}},getSlideWidth:function(){return f||this.width},getSlideHeight:function(t){var n=p||(this.listHeight+this.gap)/l.perPage;return t?n:n-this.gap},get width(){return v.clientWidth},get listWidth(){return this.width},get listHeight(){var t=h||this.width*l.heightRatio;return E(t,'"height" or "heightRatio" must be given in TTB mode.'),t-this.padding.top-this.padding.bottom},get gap(){var t=getComputedStyle(g.slides[0]);return parseFloat(t[this.marginProp])||0},get padding(){var t=getComputedStyle(v);return{top:parseFloat(t.paddingTop)||0,bottom:parseFloat(t.paddingBottom)||0}}}}(0,o,t):function(t,n,d){var c,l,f=n.Elements,p=f.track;return{marginProp:"rtl"===d.direction?"marginLeft":"marginRight",listHeight:0,init:function(){var t=d.padding,n=t.left,e=void 0===n?0:n,i=t.right,o=void 0===i?0:i;m(p,{paddingLeft:j(e),paddingRight:j(o)});var r=f.slides[0],a=d.fixedWidth,s=d.height||d.fixedHeight,u=r.style.position||"static";m(r,{position:"absolute"}),a&&(m(r,{width:j(a)}),c=parseFloat(getComputedStyle(r).width)),s&&(m(r,{height:j(s)}),l=parseFloat(getComputedStyle(r).height)),m(r,{position:u})},getSlideWidth:function(t){if(c)return t?c+this.gap:c;var n=(this.width+this.gap)/d.perPage;return t?n:n-this.gap},getSlideHeight:function(){return l||this.width*d.heightRatio||0},get width(){return p.clientWidth-this.padding.left-this.padding.right},get listWidth(){return this.getSlideWidth(!0)*n.Slides.total},get gap(){var t=getComputedStyle(f.slides[0]);return parseFloat(t[this.marginProp])||0},get padding(){var t=getComputedStyle(p);return{left:parseFloat(t.paddingLeft)||0,right:parseFloat(t.paddingRight)||0}}}}(0,o,t)).init(),m(r,{maxWidth:j(t.width)}),s){var e;m(s[n].slide,((e={})[u.marginProp]=j(t.gap),e))}l()}function l(){m(a,{width:j(c.listWidth),height:j(c.listHeight)});var t=j(u.getSlideWidth(!1)),n=j(u.getSlideHeight(!1));for(var e in s){var i=s[e],o=i.slide,r=i.container;m(r,{height:n}),m(o,{width:t,height:r?"":n})}}function e(){var t=i.options;if(t.fixedWidth){var n=Math.floor((c.width+u.gap)/c.slideWidth)||1;t.perPage!==n&&(i.options={perPage:n})}}return c}function N(u,d){var e,i,o,c=d.Track,l=d.Controller,r=!1,a="ttb"===u.options.direction,f=a?"y":"x",n={required:u.options.drag,disabled:!1,mount:function(){var t=d.Elements.list;b(t,"touchstart mousedown",s),b(t,"touchmove mousemove",p,!1),b(t,"touchend touchcancel mouseleave mouseup dragend",h)}};function s(t){n.disabled||r||!u.State.is(2)||(e=c.toCoord(c.position),i=g(t,{}),o=i)}function p(t){if(i)if(o=g(t,i),r){t.cancelable&&t.preventDefault();var n=e[f]+o.offset[f];c.translate(function(t){if(!u.is(_)){var n=c.trim,e=c.toPosition,i=l.isRtl()?-1:1,o=i*n(e(0)),r=i*n(e(l.edgeIndex));o<(t*=i)?t=5*Math.log(t-o)+o:t<r&&(t=-5*Math.log(r-t)+r),t*=i}return t}(n))}else!function(t){var n=t.offset;if(u.State.is(2)){var e=180*Math.atan(Math.abs(n.y)/Math.abs(n.x))/Math.PI;return a&&(e=90-e),e<30}return!1}(o)||(u.emit("drag",i),r=!0)}function h(){i=null,r&&(u.emit("dragged",o),function(t){var n=t.velocity[f],e=Math.abs(n);if(0<e){var i=d.Layout,o=u.options,r=n<0?-1:1,a=c.position;e>o.flickThreshold&&Math.abs(t.offset[f])<150?a+=r*Math.min(e*o.flickPower,i.width*(o.flickMaxPages||1)):a+=r*i.slideWidth/2;var s=c.toIndex(a);u.is(_)||(s=W(s,0,l.edgeIndex)),l.go(s,o.isNavigation)}}(o),r=!1)}function g(t,n){var e=t.timeStamp,i=t.touches,o=i?i[0]:t,r=o.clientX,a=o.clientY,s=n.to||{},u=s.x,d=void 0===u?r:u,c=s.y,l=void 0===c?a:c,f={x:r-d,y:a-l},p=e-(n.timeStamp||0);return{from:{x:d,y:l},to:{x:r,y:a},offset:f,timeStamp:e,velocity:{x:f.x/p,y:f.y/p}}}return n}function X(o,r,a){var s,e=[],u={required:o.options.autoplay,mount:function(){var t=o.options,n=r.Elements,e=n.slides,i=n.bar;e.length>t.perPage&&(s=function(n,e,i){function o(t){d||(s=(a=t-(r=r||t))/e,e<=a&&(r=0,s=1,n()),i&&i(s),u(o))}var r,a,s,u=window.requestAnimationFrame,d=!0;return{pause:function(){d=!0,r=0},play:function(){r=0,d&&(d=!1,u(o))}}}(function(){o.go(">")},t.interval,function(t){o.emit(a+":playing",t),i&&m(i,{width:100*t+"%"})}),function(){var t=o.options,n=r.Elements,e=o.sub,i=[o.root,e?e.root:null];t.pauseOnHover&&(d(i,"mouseleave",V,!0),d(i,"mouseenter",V,!1));t.pauseOnFocus&&(d(i,"focusout",Y,!0),d(i,"focusin",Y,!1));b(n.play,"click",function(){u.play(Y),u.play(K)}),d([n.pause],"click",K,!1),o.on("move",function(){u.play()})}(),this.play())},play:function(n){void 0===n&&(n=0),(e=e.filter(function(t){return t!==n})).length||(o.emit(a+":play"),s.play())},pause:function(t){void 0===t&&(t=0),s.pause(),-1===e.indexOf(t)&&e.push(t),1===e.length&&o.emit(a+":pause")}};function d(t,n,e,i){for(var o in t)b(t[o],n,function(){u[i?"play":"pause"](e)})}return u}function D(s,u,d){var c,i=s.classes,n=s.root;function o(t){var n=p("button",{class:i.arrow+" "+(t?i.prev:i.next)});return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg"\tviewBox="0 0 20 20"\twidth="20"\theight="20"><path d="'+(s.options.arrowPath||"m7.61 0.807-2.12 2.12 7.11 7.07-7.11 7.1 2.12 2.1 7.09-7.1 2.1-2.1-2.1-2.12-7.09-7.07z")+'" /></svg>',n}return{required:s.options.arrows,mount:function(){var t=u.Elements;(c=t.arrows).prev&&c.next||!s.options.arrows||(c=function(){var t=p("div",{class:i.arrows}),n=o(!0),e=o(!1);return t.appendChild(n),t.appendChild(e),{wrapper:t,prev:n,next:e}}(),n.insertBefore(c.wrapper,t.track)),c&&(function(){var t=s.options.perMove;b(c.prev,"click",function(){s.go(t?"-"+t:"<")}),b(c.next,"click",function(){s.go(t?"+"+t:">")})}(),s.on("mounted move updated",function(){var t=c,n=t.prev,e=t.next,i=u.Controller,o=i.prevIndex,r=i.nextIndex,a=o===r;n.disabled=o<0||a,e.disabled=r<0||a,s.emit(d+":updated",n,e,o,r)})),this.arrows=c},mounted:function(){s.emit(d+":mounted",c.prev,c.next)}}}function G(s,e,o){var r={},a={required:s.options.pagination,mount:function(){r=function(){var n=s.options,o=s.classes,r=p("ul",{class:o.pagination}),a=e.Slides,t=a.getSlides(!1,!0).filter(function(t){return!1!==n.focus||t.index%n.perPage==0}).map(function(t,n){var e=p("li",{}),i=p("button",{class:o.page});return e.appendChild(i),r.appendChild(e),b(i,"click",function(){s.go(">"+n)}),{li:e,button:i,page:n,Slides:a.getSlidesByPage(n)}});return{list:r,items:t}}();var t=s.root;"top"===s.options.pagination?t.insertBefore(r.list,e.Elements.track):t.appendChild(r.list),s.on(U,n).on(Q,function(){a.destroy(),s.options.pagination&&(a.mount(),a.mounted())})},mounted:function(){var t=s.index;s.emit(o+":mounted",r,this.getItem(t)),n(t,-1)},destroy:function(){r&&r.list&&s.root.removeChild(r.list),s.off(U).off(Q),r=null},getItem:function(t){return r.items[e.Controller.indexToPage(t)]},get data(){return r}};function n(t,n){var e=a.getItem(n),i=a.getItem(t);e&&g(e.button,l.active),i&&h(i.button,l.active),s.emit(o+":updated",r,e,i)}return a}function J(s,i){var u,d,c=s.i18n;function n(t,n){y(t,"aria-hidden",!n),y(t,"tabindex",n?0:-1)}function t(t,n){u=f(c.prev),d=f(c.next),t.appendChild(u),n.appendChild(d);var e=i.Elements.track.id;y(t,nt,e),y(n,nt,e)}function e(t,n,e,i){var o=s.index,r=-1<e&&o<e?c.last:c.prev,a=-1<i&&i<o?c.first:c.next;u.innerHTML=r,d.innerHTML=a,y(t,et,r),y(n,et,a)}function o(t,n){n&&y(n.button,tt,!0),t.items.forEach(function(t){var n=s.options,e=O(!1===n.focus&&1<n.perPage?c.pageX:c.slideX,t.page+1),i=f(e),o=t.button,r=[];o.appendChild(i),t.Slides.forEach(function(t){r.push(t.slide.id)}),y(o,nt,r.join(" ")),y(o,et,e)})}function r(t,n,e){n&&x(n.button,tt),e&&y(e.button,tt,!0)}function a(r){i.Slides.getSlides(!0,!0).forEach(function(t){var n=t.slide;"button"!==n.tagName.toLowerCase()&&y(n,"role","button");var e=t.realIndex,i=O(c.slideX,e+1),o=r.Components.Slides.getSlide(e);y(n,et,i),n.appendChild(f(i)),o&&y(n,nt,o.slide.id)})}function l(t,n){var e=t.slide;n?y(e,tt,!0):x(e,tt)}function f(t){var n=p("span",{class:s.classes.sr});return n.textContent=t,n}return{required:s.options.accessibility,mount:function(){s.on("visible",function(t){n(t.slide,!0)}).on("hidden",function(t){n(t.slide,!1)}).on("arrows:mounted",t).on("arrows:updated",e).on("pagination:mounted",o).on("pagination:updated",r),s.options.isNavigation&&s.on("navigation:mounted",a).on("active",function(t){l(t,!0)}).on("inactive",function(t){l(t,!1)})}}}var V=1,Y=2,K=3,U="move.page",Q="updated.page",Z="data-splide-lazy",$={ArrowLeft:"<",ArrowRight:">",Left:"<",Right:">"},tt="aria-current",nt="aria-controls",et="aria-label",it="move.sync",ot=[" ","Enter","Spacebar"],rt={Options:M,Elements:L,Controller:A,Slides:F,Track:z,Clones:R,Layout:B,Drag:N,Autoplay:X,Cover:function(t,n){var e=t.options;function i(t){var n=t.parentElement;n&&(m(n,{background:'center/cover no-repeat url("'+t.src+'")'}),m(t,{display:"none"}))}return{required:e.cover&&(e.height||e.heightRatio||e.fixedHeight),mount:function(){n.Slides.getSlides(!0,!1).forEach(function(t){var n=f(t,"img");n&&n.src&&i(n)}),t.on("lazyload:loaded",function(t){i(t)})}}},Arrows:D,Pagination:G,LazyLoad:function(o,t,r){var n=0,i=[],e=o.options.lazyLoad,a="sequential"===e;function s(n){var e=o.options;(i=i.filter(function(t){return!t.Slide.isWithin(n,e.perPage*(e.preloadPages+1))||(u(t.img,t.Slide),!1)})).length||o.off("moved."+r)}function u(t,n){h(n.slide,l.loading);var e=p("span",{class:o.classes.spinner});t.parentElement.appendChild(e),t.onload=function(){c(t,e,n,!1)},t.onerror=function(){c(t,e,n,!0)},m(t,{visibility:"hidden"}),y(t,"src",t.getAttribute(Z))}function d(){if(n<i.length){var t=i[n];u(t.img,t.Slide)}n++}function c(t,n,e,i){g(e.slide,l.loading),i||(t.parentElement.removeChild(n),m(t,{visibility:"visible"}),o.emit(r+":loaded",t)),a&&d()}return{required:e,mount:function(){t.Slides.getSlides(!0,!0).forEach(function(t){var n=f(t.slide,"["+Z+"]");n&&i.push({img:n,Slide:t})}),i.length&&(a?d():o.on("mounted",function(){s(o.index)}).on("moved."+r,function(t){s(t)}))}}},Keyboard:function(n){var t;return{mount:function(){n.on("mounted updated",function(){t&&(t[0](),t=void 0),n.options.keyboard&&(t=b(n.root,"keydown",function(t){$[t.key]&&n.go($[t.key])}))})}}},Sync:function(i){var o=i.sub;function r(){i.on(it,function(t,n,e){o.off(it).go(o.is(_)?e:t,!1),a()})}function a(){o.on(it,function(t,n,e){i.off(it).go(i.is(_)?e:t,!1),r()})}function e(t){i.State.is(2)&&o.go(t)}return{required:!!o,mount:function(){r(),a(),o.options.isNavigation&&o.Components.Slides.getSlides(!0,!0).forEach(function(n){var t=n.slide;b(t,"mouseup touchend",function(t){t.button&&0!==t.button||e(n.index)}),b(t,"keyup",function(t){-1<ot.indexOf(t.key)&&(t.preventDefault(),e(n.index))},!1)})}}},A11y:J,Breakpoints:function(n){var e,i,o=n.options.breakpoints,r=[];return{required:o&&matchMedia,mount:function(){r=Object.keys(o).sort(function(t,n){return parseInt(t)-parseInt(n)}).map(function(t){return{point:t,mql:matchMedia("(max-width:"+t+"px)")}}),n.on("mounted resize",function(){var t=function(){var t=r.filter(function(t){return t.mql.matches})[0];return t?t.point:-1}();t!==i&&(n.options=o[t]||e,i=t)})},mounted:function(){e=n.options}}}};function at(t,n){return void 0===n&&(n={}),new H(t,n,rt)}e.d(n,"default",function(){return at}),window.splide=at}],o.c=i,o.d=function(t,n,e){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var i in n)o.d(e,i,function(t){return n[t]}.bind(null,i));return e},o.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s=0);function o(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}var e,i});
{
"name": "@splidejs/splide",
"version": "1.0.8",
"version": "1.0.9",
"description": "Splide is a lightweight and powerful slider without any dependencies.",

@@ -5,0 +5,0 @@ "author": "Naotoshi Fujita",

@@ -77,3 +77,3 @@ /**

const height = options.height || options.fixedHeight;
const position = firstSlide.style.position;
const position = firstSlide.style.position || 'static';

@@ -80,0 +80,0 @@ applyStyle( firstSlide, { position: 'absolute' } );

@@ -74,3 +74,3 @@ /**

const firstSlide = Elements.slides[ 0 ];
const position = firstSlide.style.position;
const position = firstSlide.style.position || 'static';
const { fixedWidth: fixedW, fixedHeight: fixedH, height } = options;

@@ -77,0 +77,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc