From d25ced3a0c5c2df5c2ba36ef97f5d4a8bb8eeb35 Mon Sep 17 00:00:00 2001 From: mmonkey Date: Mon, 7 Jun 2021 09:51:05 -0500 Subject: [PATCH] Updated npm packages --- LICENSE.md | 2 +- dist/jquery.fireSlider.min.js | 2 +- dist/jquery.fireSlider.velocity.js | 2 +- package-lock.json | 52 +++++++++++++++--------------- package.json | 2 +- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index a2c348b..51c5f60 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 mmonkey +Copyright (c) 2021 CJ O'Hara Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/dist/jquery.fireSlider.min.js b/dist/jquery.fireSlider.min.js index 86db795..a490475 100644 --- a/dist/jquery.fireSlider.min.js +++ b/dist/jquery.fireSlider.min.js @@ -1 +1 @@ -/*! fireSlider (v1.6.3) (C) 2014 - 2021 CJ O'Hara and Tyler Fowle. MIT @license: en.wikipedia.org/wiki/MIT_License */(function(){'use strict';(function(a,b){var d=Math.abs,e=Math.ceil;function c(b,c){this.$el=a(b),this._attributes=this.getData(this.$el.data()),this.options=a.extend({},f,c,this._attributes),this.options.breakpoints="string"===a.type(this.options.breakpoints)?a.parseJson(this.options.breakpoints):this.options.breakpoints,this.preInit()}var f={active:1,activePagerClass:"fire-pager-active",activeSlideClass:"fire-slider-active",breakpoints:[],delay:5e3,direction:"forward",disableLinks:!0,easing:"swing",effect:"slideInOut",hoverPause:!1,pagerTemplate:"",show:1,singleSlide:!1,slide:"li",slideOffset:100,speed:500,swipe:!0};c.prototype={preInit:function(){var c=this;c.initialized=c.init(),c.initialized?(c.build(),c.run()):a(b).resize(function(){c.initialized||(c.initialized=c.init(),c.initialized&&(c.build(),c.run()))})},init:function(){var b=this;return!!b.$el.is(":visible")&&!(1>b.options.show||1>b.$el.outerWidth()||1>b.$el.width())&&("undefined"===a.type(a.Velocity)?(console.log("%cWARNING: fireSlider requires velocity.js to run correctly.","background: #E82C0C; color: white; padding: 0 12px;"),!1):(b.initSlides(),b.initFunctions(),b.backup=b.slides.clone(),!(2>b.slides.length))&&(b.initState(),b.initBreakpoints(),!0))},initSlides:function(){var a=this;a.slides=a.$el.children(a.options.slide)},initFunctions:function(){var a=this;a.prev=function(){a.$el.trigger("fireSlider:prev")},a.next=function(){a.$el.trigger("fireSlider:next")},a.pause=function(){a.$el.trigger("fireSlider:pause")},a.play=function(){a.$el.trigger("fireSlider:play",a.state.direction)},a.reverse=function(){a.$el.trigger("fireSlider:reverse")},a.slide=function(b){a.$el.trigger("fireSlider:slide",b)},a.destroy=function(){a.$el.trigger("fireSlider:destroy")}},initState:function(){var a=this;a.state={active:a.options.active,currentSlide:0,direction:a.options.direction,isPaused:!1,maxX:0,minX:0,sliderWidth:a.$el.outerWidth(),slideWidth:a.$el.outerWidth()/a.options.show,slideWidthPercent:100*(1/a.options.show),show:a.options.show,totalSlides:a.slides.length,windowWidth:b.innerWidth}},initBreakpoints:function(){var b=this;if(b.state.show=b.options.show,b.state.active=b.options.active,0d&&(c=a,d=e.breakpoint)}),-1!==c&&(b.options.breakpoints[c].show&&(b.state.show=b.options.breakpoints[c].show),b.options.breakpoints[c].active&&(b.state.active=b.options.breakpoints[c].active))}b.state.slideWidthPercent=100*(1/b.state.show),b.state.slideWidth=b.state.sliderWidth/b.state.show},build:function(){var a=this;a.options.pager instanceof jQuery&&a.buildPager(),a.buildSlider(),a.state.currentSlide=0,a.slides.eq(a.state.currentSlide).addClass(a.options.activeSlideClass),a.slides=a.$el.children(a.options.slide),a.positionSlides()},buildPager:function(){var a=this;"clone"===a.options.pagerTemplate.toLowerCase()?a.createClonedPager():""===a.options.pagerTemplate?a.createDefaultPager():a.createCustomPager(),a.pages=a.options.pager.children(),a.pages.first().addClass(a.options.activePagerClass)},destroyPager:function(){var a=this;a.options.pager instanceof jQuery&&a.pages.remove()},buildSlider:function(){var a=this,b=a.state.totalSlides*a.calculateMultiplier()-a.slides.length;if(0b)for(var e=a.slides.length-1;e>=a.slides.length+b;e--)a.$el.children(a.options.slide).eq(e).remove();return b},createClonedPager:function(){var b=this;a.each(b.slides,function(c,d){b.options.pager.append(a(d).clone()).children.eq(c)})},createCustomPager:function(){var b=this;a.each(b.slides,function(a,c){var d=b.parsePagerTemplate(c,b.options.pagerTemplate,a);b.options.pager.append(d).children().eq(a)})},createDefaultPager:function(){var b=this;a.each(b.slides,function(a){b.options.pager.append("").children().eq(a)})},parsePagerTemplate:function(b,c,d){var e=this,f=c,g=e.getTemplateTagRegex("num");-1!==f.search(g)&&(f=f.replace(g,(d+1).toString()));var h=e.getTemplateTagRegex("src");if(-1!==f.search(h)){var i=b.querySelectorAll("img")[0],j="undefined"==typeof i?"":i.src;f=f.replace(h,j)}var k=e.getTemplateTagRegex("description");if(-1!==f.search(k)){var l="undefined"===a(b).data().firesliderPagerDescription?"":a(b).data().firesliderPagerDescription;f=f.replace(k,l)}return f},getTemplateTagRegex:function(a){return new RegExp("{{\\s*"+a+"\\s*}}","g")},calculateMultiplier:function(){var a=this,c=1,d=0,f=60;return a.state.windowWidth=b.innerWidth,0f?f-a.state.totalSlides:d,0e)for(var g=0;ge&&c.positions[b]<=c.state.minX+j||0=c.state.maxX-j,direction:c.state.direction})}),c.slides.dequeue(c.options.effect),c.state.currentSlide=(c.state.currentSlide+e)%c.slides.length,c.slides.eq(c.state.currentSlide).addClass(c.options.activeSlideClass),c.pages instanceof jQuery&&c.pages.eq(c.state.currentSlide%c.state.totalSlides).addClass(c.options.activePagerClass),c.startTimer(c.state.direction),c.$el.trigger("fireSlider:transition:after")}},updateCurrentSlide:function(a){var b=this;b.state.currentSlide="prev"===a||"backward"===a.toLowerCase()||"down"===a.toLowerCase()?0===b.state.currentSlide?b.slides.length-1:b.state.currentSlide-=1:b.state.currentSlide===b.slides.length-1?0:b.state.currentSlide+=1},cyclePositions:function(a){var b=this;if("prev"===a||"backward"===a.toLowerCase()||"down"===a.toLowerCase()){var c=b.positions.shift();b.positions.push(c)}else{var d=b.positions.pop();b.positions.unshift(d)}},prevButtonClicked:function(a){var b=this;a.preventDefault(),b.$el.trigger("fireSlider:button:prev"),b.$el.trigger("fireSlider:prev")},nextButtonClicked:function(a){var b=this;a.preventDefault(),b.$el.trigger("fireSlider:button:next"),b.$el.trigger("fireSlider:next")},getData:function(b){return a.each(b,function(c){a.each(["fireslider","fire-slider"],function(a,d){if(-1a.options.show||1>a.$el.outerWidth()||1>a.$el.width)return!1;if(a.initBreakpoints(),a.slides.length!==a.calculateMultiplier()*a.state.totalSlides){a.slides.eq(a.state.currentSlide).removeClass(a.options.activeSlideClass);var c=a.buildSlider(a.slides);a.initSlides(),a.positionSlides(a.slides),a.state.currentSlide>a.slides.length&&(a.state.currentSlide%=a.slides.length,a.calculatePositions(d(c)),a.slides.dequeue(a.options.effect)),a.slides.eq(a.state.currentSlide).addClass(a.options.activeSlideClass)}else a.positionSlides(),a.calculatePositions(a.state.currentSlide),a.slides.dequeue(a.options.effect)}},c.prototype.Effects={transitions:{slideInOut:"slideInOut",fadeInOut:"fadeInOut"},register:function(a,b){this.transitions[a]=a,this[a]=b},slideInOut:function(a,b){var c=b.snapping?0:b.speed;("forward"===b.direction||"backward"===b.direction)&&a.velocity({translateX:[b.nextPos+"%",b.currPos+"%"]},{duration:c,queue:b.effect,easing:b.easing}),("up"===b.direction||"down"===b.direction)&&a.velocity({translateY:[b.nextPos+"%",b.currPos+"%"]},{duration:c,queue:b.effect,easing:b.easing})},fadeInOut:function(a,b){var c=a.clone();a.parent().append(c),a.velocity({translateX:[b.nextPos+"%",b.nextPos+"%"]},{duration:b.speed,queue:b.effect,begin:function(){c.velocity({opacity:[0,1],zIndex:[1,1]},{duration:b.speed,easing:b.easing})},complete:function(){c.remove()}})},route:function(a,b){var c=b.effect;"undefined"!=typeof this.transitions[c]&&"function"==typeof this[c]&&this[c](a,b)}},a.fn.fireSlider=function(b){return this.each(function(){a.data(this,"fireSlider")&&(a(this).data("fireSlider").destroy(),a(this).removeData("fireSlider")),a.data(this,"fireSlider",new c(this,b))})},b.fireSlider=c})(jQuery,window)})(); +/*! fireSlider (v1.6.4) (C) 2014 - 2021 CJ O'Hara and Tyler Fowle. MIT @license: en.wikipedia.org/wiki/MIT_License */(function(){'use strict';(function(a,b){var d=Math.abs,e=Math.ceil;function c(b,c){this.$el=a(b),this._attributes=this.getData(this.$el.data()),this.options=a.extend({},f,c,this._attributes),this.options.breakpoints="string"===a.type(this.options.breakpoints)?a.parseJson(this.options.breakpoints):this.options.breakpoints,this.preInit()}var f={active:1,activePagerClass:"fire-pager-active",activeSlideClass:"fire-slider-active",breakpoints:[],delay:5e3,direction:"forward",disableLinks:!0,easing:"swing",effect:"slideInOut",hoverPause:!1,pagerTemplate:"",show:1,singleSlide:!1,slide:"li",slideOffset:100,speed:500,swipe:!0};c.prototype={preInit:function(){var c=this;c.initialized=c.init(),c.initialized?(c.build(),c.run()):a(b).resize(function(){c.initialized||(c.initialized=c.init(),c.initialized&&(c.build(),c.run()))})},init:function(){var b=this;return!!b.$el.is(":visible")&&!(1>b.options.show||1>b.$el.outerWidth()||1>b.$el.width())&&("undefined"===a.type(a.Velocity)?(console.log("%cWARNING: fireSlider requires velocity.js to run correctly.","background: #E82C0C; color: white; padding: 0 12px;"),!1):(b.initSlides(),b.initFunctions(),b.backup=b.slides.clone(),!(2>b.slides.length))&&(b.initState(),b.initBreakpoints(),!0))},initSlides:function(){var a=this;a.slides=a.$el.children(a.options.slide)},initFunctions:function(){var a=this;a.prev=function(){a.$el.trigger("fireSlider:prev")},a.next=function(){a.$el.trigger("fireSlider:next")},a.pause=function(){a.$el.trigger("fireSlider:pause")},a.play=function(){a.$el.trigger("fireSlider:play",a.state.direction)},a.reverse=function(){a.$el.trigger("fireSlider:reverse")},a.slide=function(b){a.$el.trigger("fireSlider:slide",b)},a.destroy=function(){a.$el.trigger("fireSlider:destroy")}},initState:function(){var a=this;a.state={active:a.options.active,currentSlide:0,direction:a.options.direction,isPaused:!1,maxX:0,minX:0,sliderWidth:a.$el.outerWidth(),slideWidth:a.$el.outerWidth()/a.options.show,slideWidthPercent:100*(1/a.options.show),show:a.options.show,totalSlides:a.slides.length,windowWidth:b.innerWidth}},initBreakpoints:function(){var b=this;if(b.state.show=b.options.show,b.state.active=b.options.active,0d&&(c=a,d=e.breakpoint)}),-1!==c&&(b.options.breakpoints[c].show&&(b.state.show=b.options.breakpoints[c].show),b.options.breakpoints[c].active&&(b.state.active=b.options.breakpoints[c].active))}b.state.slideWidthPercent=100*(1/b.state.show),b.state.slideWidth=b.state.sliderWidth/b.state.show},build:function(){var a=this;a.options.pager instanceof jQuery&&a.buildPager(),a.buildSlider(),a.state.currentSlide=0,a.slides.eq(a.state.currentSlide).addClass(a.options.activeSlideClass),a.slides=a.$el.children(a.options.slide),a.positionSlides()},buildPager:function(){var a=this;"clone"===a.options.pagerTemplate.toLowerCase()?a.createClonedPager():""===a.options.pagerTemplate?a.createDefaultPager():a.createCustomPager(),a.pages=a.options.pager.children(),a.pages.first().addClass(a.options.activePagerClass)},destroyPager:function(){var a=this;a.options.pager instanceof jQuery&&a.pages.remove()},buildSlider:function(){var a=this,b=a.state.totalSlides*a.calculateMultiplier()-a.slides.length;if(0b)for(var e=a.slides.length-1;e>=a.slides.length+b;e--)a.$el.children(a.options.slide).eq(e).remove();return b},createClonedPager:function(){var b=this;a.each(b.slides,function(c,d){b.options.pager.append(a(d).clone()).children.eq(c)})},createCustomPager:function(){var b=this;a.each(b.slides,function(a,c){var d=b.parsePagerTemplate(c,b.options.pagerTemplate,a);b.options.pager.append(d).children().eq(a)})},createDefaultPager:function(){var b=this;a.each(b.slides,function(a){b.options.pager.append("").children().eq(a)})},parsePagerTemplate:function(b,c,d){var e=this,f=c,g=e.getTemplateTagRegex("num");-1!==f.search(g)&&(f=f.replace(g,(d+1).toString()));var h=e.getTemplateTagRegex("src");if(-1!==f.search(h)){var i=b.querySelectorAll("img")[0],j="undefined"==typeof i?"":i.src;f=f.replace(h,j)}var k=e.getTemplateTagRegex("description");if(-1!==f.search(k)){var l="undefined"===a(b).data().firesliderPagerDescription?"":a(b).data().firesliderPagerDescription;f=f.replace(k,l)}return f},getTemplateTagRegex:function(a){return new RegExp("{{\\s*"+a+"\\s*}}","g")},calculateMultiplier:function(){var a=this,c=1,d=0,f=60;return a.state.windowWidth=b.innerWidth,0f?f-a.state.totalSlides:d,0e)for(var g=0;ge&&c.positions[b]<=c.state.minX+j||0=c.state.maxX-j,direction:c.state.direction})}),c.slides.dequeue(c.options.effect),c.state.currentSlide=(c.state.currentSlide+e)%c.slides.length,c.slides.eq(c.state.currentSlide).addClass(c.options.activeSlideClass),c.pages instanceof jQuery&&c.pages.eq(c.state.currentSlide%c.state.totalSlides).addClass(c.options.activePagerClass),c.startTimer(c.state.direction),c.$el.trigger("fireSlider:transition:after")}},updateCurrentSlide:function(a){var b=this;b.state.currentSlide="prev"===a||"backward"===a.toLowerCase()||"down"===a.toLowerCase()?0===b.state.currentSlide?b.slides.length-1:b.state.currentSlide-=1:b.state.currentSlide===b.slides.length-1?0:b.state.currentSlide+=1},cyclePositions:function(a){var b=this;if("prev"===a||"backward"===a.toLowerCase()||"down"===a.toLowerCase()){var c=b.positions.shift();b.positions.push(c)}else{var d=b.positions.pop();b.positions.unshift(d)}},prevButtonClicked:function(a){var b=this;a.preventDefault(),b.$el.trigger("fireSlider:button:prev"),b.$el.trigger("fireSlider:prev")},nextButtonClicked:function(a){var b=this;a.preventDefault(),b.$el.trigger("fireSlider:button:next"),b.$el.trigger("fireSlider:next")},getData:function(b){return a.each(b,function(c){a.each(["fireslider","fire-slider"],function(a,d){if(-1a.options.show||1>a.$el.outerWidth()||1>a.$el.width)return!1;if(a.initBreakpoints(),a.slides.length!==a.calculateMultiplier()*a.state.totalSlides){a.slides.eq(a.state.currentSlide).removeClass(a.options.activeSlideClass);var c=a.buildSlider(a.slides);a.initSlides(),a.positionSlides(a.slides),a.state.currentSlide>a.slides.length&&(a.state.currentSlide%=a.slides.length,a.calculatePositions(d(c)),a.slides.dequeue(a.options.effect)),a.slides.eq(a.state.currentSlide).addClass(a.options.activeSlideClass)}else a.positionSlides(),a.calculatePositions(a.state.currentSlide),a.slides.dequeue(a.options.effect)}},c.prototype.Effects={transitions:{slideInOut:"slideInOut",fadeInOut:"fadeInOut"},register:function(a,b){this.transitions[a]=a,this[a]=b},slideInOut:function(a,b){var c=b.snapping?0:b.speed;("forward"===b.direction||"backward"===b.direction)&&a.velocity({translateX:[b.nextPos+"%",b.currPos+"%"]},{duration:c,queue:b.effect,easing:b.easing}),("up"===b.direction||"down"===b.direction)&&a.velocity({translateY:[b.nextPos+"%",b.currPos+"%"]},{duration:c,queue:b.effect,easing:b.easing})},fadeInOut:function(a,b){var c=a.clone();a.parent().append(c),a.velocity({translateX:[b.nextPos+"%",b.nextPos+"%"]},{duration:b.speed,queue:b.effect,begin:function(){c.velocity({opacity:[0,1],zIndex:[1,1]},{duration:b.speed,easing:b.easing})},complete:function(){c.remove()}})},route:function(a,b){var c=b.effect;"undefined"!=typeof this.transitions[c]&&"function"==typeof this[c]&&this[c](a,b)}},a.fn.fireSlider=function(b){return this.each(function(){a.data(this,"fireSlider")&&(a(this).data("fireSlider").destroy(),a(this).removeData("fireSlider")),a.data(this,"fireSlider",new c(this,b))})},b.fireSlider=c})(jQuery,window)})(); diff --git a/dist/jquery.fireSlider.velocity.js b/dist/jquery.fireSlider.velocity.js index 02892e4..926e226 100644 --- a/dist/jquery.fireSlider.velocity.js +++ b/dist/jquery.fireSlider.velocity.js @@ -2,7 +2,7 @@ const Velocity = require('velocity-animate/velocity.min'); require('../../dist/jquery.fireSlider.min'); },{"../../dist/jquery.fireSlider.min":2,"velocity-animate/velocity.min":3}],2:[function(require,module,exports){ -/*! fireSlider (v1.6.3) (C) 2014 - 2021 CJ O'Hara and Tyler Fowle. MIT @license: en.wikipedia.org/wiki/MIT_License */(function(){'use strict';(function(a,b){var d=Math.abs,e=Math.ceil;function c(b,c){this.$el=a(b),this._attributes=this.getData(this.$el.data()),this.options=a.extend({},f,c,this._attributes),this.options.breakpoints="string"===a.type(this.options.breakpoints)?a.parseJson(this.options.breakpoints):this.options.breakpoints,this.preInit()}var f={active:1,activePagerClass:"fire-pager-active",activeSlideClass:"fire-slider-active",breakpoints:[],delay:5e3,direction:"forward",disableLinks:!0,easing:"swing",effect:"slideInOut",hoverPause:!1,pagerTemplate:"",show:1,singleSlide:!1,slide:"li",slideOffset:100,speed:500,swipe:!0};c.prototype={preInit:function(){var c=this;c.initialized=c.init(),c.initialized?(c.build(),c.run()):a(b).resize(function(){c.initialized||(c.initialized=c.init(),c.initialized&&(c.build(),c.run()))})},init:function(){var b=this;return!!b.$el.is(":visible")&&!(1>b.options.show||1>b.$el.outerWidth()||1>b.$el.width())&&("undefined"===a.type(a.Velocity)?(console.log("%cWARNING: fireSlider requires velocity.js to run correctly.","background: #E82C0C; color: white; padding: 0 12px;"),!1):(b.initSlides(),b.initFunctions(),b.backup=b.slides.clone(),!(2>b.slides.length))&&(b.initState(),b.initBreakpoints(),!0))},initSlides:function(){var a=this;a.slides=a.$el.children(a.options.slide)},initFunctions:function(){var a=this;a.prev=function(){a.$el.trigger("fireSlider:prev")},a.next=function(){a.$el.trigger("fireSlider:next")},a.pause=function(){a.$el.trigger("fireSlider:pause")},a.play=function(){a.$el.trigger("fireSlider:play",a.state.direction)},a.reverse=function(){a.$el.trigger("fireSlider:reverse")},a.slide=function(b){a.$el.trigger("fireSlider:slide",b)},a.destroy=function(){a.$el.trigger("fireSlider:destroy")}},initState:function(){var a=this;a.state={active:a.options.active,currentSlide:0,direction:a.options.direction,isPaused:!1,maxX:0,minX:0,sliderWidth:a.$el.outerWidth(),slideWidth:a.$el.outerWidth()/a.options.show,slideWidthPercent:100*(1/a.options.show),show:a.options.show,totalSlides:a.slides.length,windowWidth:b.innerWidth}},initBreakpoints:function(){var b=this;if(b.state.show=b.options.show,b.state.active=b.options.active,0d&&(c=a,d=e.breakpoint)}),-1!==c&&(b.options.breakpoints[c].show&&(b.state.show=b.options.breakpoints[c].show),b.options.breakpoints[c].active&&(b.state.active=b.options.breakpoints[c].active))}b.state.slideWidthPercent=100*(1/b.state.show),b.state.slideWidth=b.state.sliderWidth/b.state.show},build:function(){var a=this;a.options.pager instanceof jQuery&&a.buildPager(),a.buildSlider(),a.state.currentSlide=0,a.slides.eq(a.state.currentSlide).addClass(a.options.activeSlideClass),a.slides=a.$el.children(a.options.slide),a.positionSlides()},buildPager:function(){var a=this;"clone"===a.options.pagerTemplate.toLowerCase()?a.createClonedPager():""===a.options.pagerTemplate?a.createDefaultPager():a.createCustomPager(),a.pages=a.options.pager.children(),a.pages.first().addClass(a.options.activePagerClass)},destroyPager:function(){var a=this;a.options.pager instanceof jQuery&&a.pages.remove()},buildSlider:function(){var a=this,b=a.state.totalSlides*a.calculateMultiplier()-a.slides.length;if(0b)for(var e=a.slides.length-1;e>=a.slides.length+b;e--)a.$el.children(a.options.slide).eq(e).remove();return b},createClonedPager:function(){var b=this;a.each(b.slides,function(c,d){b.options.pager.append(a(d).clone()).children.eq(c)})},createCustomPager:function(){var b=this;a.each(b.slides,function(a,c){var d=b.parsePagerTemplate(c,b.options.pagerTemplate,a);b.options.pager.append(d).children().eq(a)})},createDefaultPager:function(){var b=this;a.each(b.slides,function(a){b.options.pager.append("").children().eq(a)})},parsePagerTemplate:function(b,c,d){var e=this,f=c,g=e.getTemplateTagRegex("num");-1!==f.search(g)&&(f=f.replace(g,(d+1).toString()));var h=e.getTemplateTagRegex("src");if(-1!==f.search(h)){var i=b.querySelectorAll("img")[0],j="undefined"==typeof i?"":i.src;f=f.replace(h,j)}var k=e.getTemplateTagRegex("description");if(-1!==f.search(k)){var l="undefined"===a(b).data().firesliderPagerDescription?"":a(b).data().firesliderPagerDescription;f=f.replace(k,l)}return f},getTemplateTagRegex:function(a){return new RegExp("{{\\s*"+a+"\\s*}}","g")},calculateMultiplier:function(){var a=this,c=1,d=0,f=60;return a.state.windowWidth=b.innerWidth,0f?f-a.state.totalSlides:d,0e)for(var g=0;ge&&c.positions[b]<=c.state.minX+j||0=c.state.maxX-j,direction:c.state.direction})}),c.slides.dequeue(c.options.effect),c.state.currentSlide=(c.state.currentSlide+e)%c.slides.length,c.slides.eq(c.state.currentSlide).addClass(c.options.activeSlideClass),c.pages instanceof jQuery&&c.pages.eq(c.state.currentSlide%c.state.totalSlides).addClass(c.options.activePagerClass),c.startTimer(c.state.direction),c.$el.trigger("fireSlider:transition:after")}},updateCurrentSlide:function(a){var b=this;b.state.currentSlide="prev"===a||"backward"===a.toLowerCase()||"down"===a.toLowerCase()?0===b.state.currentSlide?b.slides.length-1:b.state.currentSlide-=1:b.state.currentSlide===b.slides.length-1?0:b.state.currentSlide+=1},cyclePositions:function(a){var b=this;if("prev"===a||"backward"===a.toLowerCase()||"down"===a.toLowerCase()){var c=b.positions.shift();b.positions.push(c)}else{var d=b.positions.pop();b.positions.unshift(d)}},prevButtonClicked:function(a){var b=this;a.preventDefault(),b.$el.trigger("fireSlider:button:prev"),b.$el.trigger("fireSlider:prev")},nextButtonClicked:function(a){var b=this;a.preventDefault(),b.$el.trigger("fireSlider:button:next"),b.$el.trigger("fireSlider:next")},getData:function(b){return a.each(b,function(c){a.each(["fireslider","fire-slider"],function(a,d){if(-1a.options.show||1>a.$el.outerWidth()||1>a.$el.width)return!1;if(a.initBreakpoints(),a.slides.length!==a.calculateMultiplier()*a.state.totalSlides){a.slides.eq(a.state.currentSlide).removeClass(a.options.activeSlideClass);var c=a.buildSlider(a.slides);a.initSlides(),a.positionSlides(a.slides),a.state.currentSlide>a.slides.length&&(a.state.currentSlide%=a.slides.length,a.calculatePositions(d(c)),a.slides.dequeue(a.options.effect)),a.slides.eq(a.state.currentSlide).addClass(a.options.activeSlideClass)}else a.positionSlides(),a.calculatePositions(a.state.currentSlide),a.slides.dequeue(a.options.effect)}},c.prototype.Effects={transitions:{slideInOut:"slideInOut",fadeInOut:"fadeInOut"},register:function(a,b){this.transitions[a]=a,this[a]=b},slideInOut:function(a,b){var c=b.snapping?0:b.speed;("forward"===b.direction||"backward"===b.direction)&&a.velocity({translateX:[b.nextPos+"%",b.currPos+"%"]},{duration:c,queue:b.effect,easing:b.easing}),("up"===b.direction||"down"===b.direction)&&a.velocity({translateY:[b.nextPos+"%",b.currPos+"%"]},{duration:c,queue:b.effect,easing:b.easing})},fadeInOut:function(a,b){var c=a.clone();a.parent().append(c),a.velocity({translateX:[b.nextPos+"%",b.nextPos+"%"]},{duration:b.speed,queue:b.effect,begin:function(){c.velocity({opacity:[0,1],zIndex:[1,1]},{duration:b.speed,easing:b.easing})},complete:function(){c.remove()}})},route:function(a,b){var c=b.effect;"undefined"!=typeof this.transitions[c]&&"function"==typeof this[c]&&this[c](a,b)}},a.fn.fireSlider=function(b){return this.each(function(){a.data(this,"fireSlider")&&(a(this).data("fireSlider").destroy(),a(this).removeData("fireSlider")),a.data(this,"fireSlider",new c(this,b))})},b.fireSlider=c})(jQuery,window)})(); +/*! fireSlider (v1.6.4) (C) 2014 - 2021 CJ O'Hara and Tyler Fowle. MIT @license: en.wikipedia.org/wiki/MIT_License */(function(){'use strict';(function(a,b){var d=Math.abs,e=Math.ceil;function c(b,c){this.$el=a(b),this._attributes=this.getData(this.$el.data()),this.options=a.extend({},f,c,this._attributes),this.options.breakpoints="string"===a.type(this.options.breakpoints)?a.parseJson(this.options.breakpoints):this.options.breakpoints,this.preInit()}var f={active:1,activePagerClass:"fire-pager-active",activeSlideClass:"fire-slider-active",breakpoints:[],delay:5e3,direction:"forward",disableLinks:!0,easing:"swing",effect:"slideInOut",hoverPause:!1,pagerTemplate:"",show:1,singleSlide:!1,slide:"li",slideOffset:100,speed:500,swipe:!0};c.prototype={preInit:function(){var c=this;c.initialized=c.init(),c.initialized?(c.build(),c.run()):a(b).resize(function(){c.initialized||(c.initialized=c.init(),c.initialized&&(c.build(),c.run()))})},init:function(){var b=this;return!!b.$el.is(":visible")&&!(1>b.options.show||1>b.$el.outerWidth()||1>b.$el.width())&&("undefined"===a.type(a.Velocity)?(console.log("%cWARNING: fireSlider requires velocity.js to run correctly.","background: #E82C0C; color: white; padding: 0 12px;"),!1):(b.initSlides(),b.initFunctions(),b.backup=b.slides.clone(),!(2>b.slides.length))&&(b.initState(),b.initBreakpoints(),!0))},initSlides:function(){var a=this;a.slides=a.$el.children(a.options.slide)},initFunctions:function(){var a=this;a.prev=function(){a.$el.trigger("fireSlider:prev")},a.next=function(){a.$el.trigger("fireSlider:next")},a.pause=function(){a.$el.trigger("fireSlider:pause")},a.play=function(){a.$el.trigger("fireSlider:play",a.state.direction)},a.reverse=function(){a.$el.trigger("fireSlider:reverse")},a.slide=function(b){a.$el.trigger("fireSlider:slide",b)},a.destroy=function(){a.$el.trigger("fireSlider:destroy")}},initState:function(){var a=this;a.state={active:a.options.active,currentSlide:0,direction:a.options.direction,isPaused:!1,maxX:0,minX:0,sliderWidth:a.$el.outerWidth(),slideWidth:a.$el.outerWidth()/a.options.show,slideWidthPercent:100*(1/a.options.show),show:a.options.show,totalSlides:a.slides.length,windowWidth:b.innerWidth}},initBreakpoints:function(){var b=this;if(b.state.show=b.options.show,b.state.active=b.options.active,0d&&(c=a,d=e.breakpoint)}),-1!==c&&(b.options.breakpoints[c].show&&(b.state.show=b.options.breakpoints[c].show),b.options.breakpoints[c].active&&(b.state.active=b.options.breakpoints[c].active))}b.state.slideWidthPercent=100*(1/b.state.show),b.state.slideWidth=b.state.sliderWidth/b.state.show},build:function(){var a=this;a.options.pager instanceof jQuery&&a.buildPager(),a.buildSlider(),a.state.currentSlide=0,a.slides.eq(a.state.currentSlide).addClass(a.options.activeSlideClass),a.slides=a.$el.children(a.options.slide),a.positionSlides()},buildPager:function(){var a=this;"clone"===a.options.pagerTemplate.toLowerCase()?a.createClonedPager():""===a.options.pagerTemplate?a.createDefaultPager():a.createCustomPager(),a.pages=a.options.pager.children(),a.pages.first().addClass(a.options.activePagerClass)},destroyPager:function(){var a=this;a.options.pager instanceof jQuery&&a.pages.remove()},buildSlider:function(){var a=this,b=a.state.totalSlides*a.calculateMultiplier()-a.slides.length;if(0b)for(var e=a.slides.length-1;e>=a.slides.length+b;e--)a.$el.children(a.options.slide).eq(e).remove();return b},createClonedPager:function(){var b=this;a.each(b.slides,function(c,d){b.options.pager.append(a(d).clone()).children.eq(c)})},createCustomPager:function(){var b=this;a.each(b.slides,function(a,c){var d=b.parsePagerTemplate(c,b.options.pagerTemplate,a);b.options.pager.append(d).children().eq(a)})},createDefaultPager:function(){var b=this;a.each(b.slides,function(a){b.options.pager.append("").children().eq(a)})},parsePagerTemplate:function(b,c,d){var e=this,f=c,g=e.getTemplateTagRegex("num");-1!==f.search(g)&&(f=f.replace(g,(d+1).toString()));var h=e.getTemplateTagRegex("src");if(-1!==f.search(h)){var i=b.querySelectorAll("img")[0],j="undefined"==typeof i?"":i.src;f=f.replace(h,j)}var k=e.getTemplateTagRegex("description");if(-1!==f.search(k)){var l="undefined"===a(b).data().firesliderPagerDescription?"":a(b).data().firesliderPagerDescription;f=f.replace(k,l)}return f},getTemplateTagRegex:function(a){return new RegExp("{{\\s*"+a+"\\s*}}","g")},calculateMultiplier:function(){var a=this,c=1,d=0,f=60;return a.state.windowWidth=b.innerWidth,0f?f-a.state.totalSlides:d,0e)for(var g=0;ge&&c.positions[b]<=c.state.minX+j||0=c.state.maxX-j,direction:c.state.direction})}),c.slides.dequeue(c.options.effect),c.state.currentSlide=(c.state.currentSlide+e)%c.slides.length,c.slides.eq(c.state.currentSlide).addClass(c.options.activeSlideClass),c.pages instanceof jQuery&&c.pages.eq(c.state.currentSlide%c.state.totalSlides).addClass(c.options.activePagerClass),c.startTimer(c.state.direction),c.$el.trigger("fireSlider:transition:after")}},updateCurrentSlide:function(a){var b=this;b.state.currentSlide="prev"===a||"backward"===a.toLowerCase()||"down"===a.toLowerCase()?0===b.state.currentSlide?b.slides.length-1:b.state.currentSlide-=1:b.state.currentSlide===b.slides.length-1?0:b.state.currentSlide+=1},cyclePositions:function(a){var b=this;if("prev"===a||"backward"===a.toLowerCase()||"down"===a.toLowerCase()){var c=b.positions.shift();b.positions.push(c)}else{var d=b.positions.pop();b.positions.unshift(d)}},prevButtonClicked:function(a){var b=this;a.preventDefault(),b.$el.trigger("fireSlider:button:prev"),b.$el.trigger("fireSlider:prev")},nextButtonClicked:function(a){var b=this;a.preventDefault(),b.$el.trigger("fireSlider:button:next"),b.$el.trigger("fireSlider:next")},getData:function(b){return a.each(b,function(c){a.each(["fireslider","fire-slider"],function(a,d){if(-1a.options.show||1>a.$el.outerWidth()||1>a.$el.width)return!1;if(a.initBreakpoints(),a.slides.length!==a.calculateMultiplier()*a.state.totalSlides){a.slides.eq(a.state.currentSlide).removeClass(a.options.activeSlideClass);var c=a.buildSlider(a.slides);a.initSlides(),a.positionSlides(a.slides),a.state.currentSlide>a.slides.length&&(a.state.currentSlide%=a.slides.length,a.calculatePositions(d(c)),a.slides.dequeue(a.options.effect)),a.slides.eq(a.state.currentSlide).addClass(a.options.activeSlideClass)}else a.positionSlides(),a.calculatePositions(a.state.currentSlide),a.slides.dequeue(a.options.effect)}},c.prototype.Effects={transitions:{slideInOut:"slideInOut",fadeInOut:"fadeInOut"},register:function(a,b){this.transitions[a]=a,this[a]=b},slideInOut:function(a,b){var c=b.snapping?0:b.speed;("forward"===b.direction||"backward"===b.direction)&&a.velocity({translateX:[b.nextPos+"%",b.currPos+"%"]},{duration:c,queue:b.effect,easing:b.easing}),("up"===b.direction||"down"===b.direction)&&a.velocity({translateY:[b.nextPos+"%",b.currPos+"%"]},{duration:c,queue:b.effect,easing:b.easing})},fadeInOut:function(a,b){var c=a.clone();a.parent().append(c),a.velocity({translateX:[b.nextPos+"%",b.nextPos+"%"]},{duration:b.speed,queue:b.effect,begin:function(){c.velocity({opacity:[0,1],zIndex:[1,1]},{duration:b.speed,easing:b.easing})},complete:function(){c.remove()}})},route:function(a,b){var c=b.effect;"undefined"!=typeof this.transitions[c]&&"function"==typeof this[c]&&this[c](a,b)}},a.fn.fireSlider=function(b){return this.each(function(){a.data(this,"fireSlider")&&(a(this).data("fireSlider").destroy(),a(this).removeData("fireSlider")),a.data(this,"fireSlider",new c(this,b))})},b.fireSlider=c})(jQuery,window)})(); },{}],3:[function(require,module,exports){ /*! VelocityJS.org (1.5.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ diff --git a/package-lock.json b/package-lock.json index 33f1ab6..d516974 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "fireSlider", - "version": "v1.6.2", + "version": "v1.6.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -45,9 +45,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "ms": { @@ -72,9 +72,9 @@ }, "dependencies": { "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true } } @@ -220,9 +220,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "ms": { @@ -245,9 +245,9 @@ }, "dependencies": { "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true } } @@ -2025,9 +2025,9 @@ } }, "engine.io-client": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.1.tgz", - "integrity": "sha512-oVu9kBkGbcggulyVF0kz6BV3ganqUeqXvD79WOFKa+11oK692w1NyFkuEj4xrkFRpZhn92QOqTk4RQq5LiBXbQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.2.tgz", + "integrity": "sha512-QEqIp+gJ/kMHeUun7f5Vv3bteRHppHH/FMBQX/esFj/fuYfjyUKWGMo3VCvIP/V8bE9KcjHmRZrhIz2Z9oNsDA==", "dev": true, "requires": { "component-emitter": "~1.3.0", @@ -2039,7 +2039,7 @@ "parseqs": "0.0.6", "parseuri": "0.0.6", "ws": "~7.4.2", - "xmlhttprequest-ssl": "~1.5.4", + "xmlhttprequest-ssl": "~1.6.2", "yeast": "0.1.2" }, "dependencies": { @@ -2599,9 +2599,9 @@ } }, "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "htmlescape": { @@ -5306,15 +5306,15 @@ "dev": true }, "ws": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.4.tgz", - "integrity": "sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw==", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", "dev": true }, "xmlhttprequest-ssl": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", - "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.6.3.tgz", + "integrity": "sha512-3XfeQE/wNkvrIktn2Kf0869fC0BN6UpydVasGIeSm2B1Llihf7/0UfZM+eCkOw3P7bP4+qPgqhm7ZoxuJtFU0Q==", "dev": true }, "xtend": { diff --git a/package.json b/package.json index 438a0a5..58e246b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fireSlider", - "version": "v1.6.3", + "version": "v1.6.4", "description": "A responsive javascript slider and carousel plugin, with breakpoints", "repository": { "type": "git",