diff --git a/build/core/jquery.cycle2.autoheight.min.js b/build/core/jquery.cycle2.autoheight.min.js index e342753..afd7bd0 100644 --- a/build/core/jquery.cycle2.autoheight.min.js +++ b/build/core/jquery.cycle2.autoheight.min.js @@ -1,3 +1,3 @@ -/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20200917 */ +/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20210125 */ -!function(s){"use strict";function l(e,i){var t,n,o,c,a,l=i.autoHeight;if("container"==l)n=s(i.slides[i.currSlide]).outerHeight(),i.container.height(n);else if(i._autoHeightRatio)i.container.height(i.container.width()/i._autoHeightRatio);else if("calc"===l||"number"==s.type(l)&&0<=l){if((o="calc"===l?(c=0,a=-1,i.slides.each(function(e){var i=s(this).height();a=i.slides.length?0:l)==i._sentinelIndex)return;i._sentinelIndex=o,i._sentinel&&i._sentinel.remove(),(t=s(i.slides[o].cloneNode(!0))).removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel"),t.css({position:"static",visibility:"hidden",display:"block"}).prependTo(i.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active"),t.find("*").css("visibility","hidden"),i._sentinel=t}}function d(e,i,t,n,o){var c=s(n).outerHeight();i.container.animate({height:c},i.autoHeightSpeed,i.autoHeightEasing)}function r(e,i){i._autoHeightOnResize&&(s(window).off("resize orientationchange",i._autoHeightOnResize),i._autoHeightOnResize=null),i.container.off("cycle-slide-added cycle-slide-removed",l),i.container.off("cycle-destroyed",r),i.container.off("cycle-before",d),i._sentinel&&(i._sentinel.remove(),i._sentinel=null)}s.extend(s.fn.cycle.defaults,{autoHeight:0,autoHeightSpeed:250,autoHeightEasing:null}),s(document).on("cycle-initialized",function(e,i){var t,n=i.autoHeight,o=s.type(n),c=null;function a(){l(0,i)}"string"!==o&&"number"!==o||(i.container.on("cycle-slide-added cycle-slide-removed",l),i.container.on("cycle-destroyed",r),"container"==n?i.container.on("cycle-before",d):"string"===o&&/\d+\:\d+/.test(n)&&(t=(t=n.match(/(\d+)\:(\d+)/))[1]/t[2],i._autoHeightRatio=t),"number"!==o&&(i._autoHeightOnResize=function(){clearTimeout(c),c=setTimeout(a,50)},s(window).on("resize orientationchange",i._autoHeightOnResize)),setTimeout(a,30))})}(jQuery); \ No newline at end of file +!function(l){"use strict";function a(e,i){var n,t,o,c,a=i.autoHeight;"container"==a?(n=l(i.slides[i.currSlide]).outerHeight(),i.container.height(n)):i._autoHeightRatio?i.container.height(i.container.width()/i._autoHeightRatio):("calc"===a||"number"==l.fn.cycle.varType(a)&&0<=a)&&(t="calc"===a?(o=0,c=-1,i.slides.each(function(e){var i=l(this).height();c=i.slides.length?0:a)!=i._sentinelIndex&&(i._sentinelIndex=t,i._sentinel&&i._sentinel.remove(),(t=l(i.slides[t].cloneNode(!0))).removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel"),t.css({position:"static",visibility:"hidden",display:"block"}).prependTo(i.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active"),t.find("*").css("visibility","hidden"),i._sentinel=t)}function s(e,i,n,t,o){t=l(t).outerHeight();i.container.animate({height:t},i.autoHeightSpeed,i.autoHeightEasing)}function d(e,i){i._autoHeightOnResize&&(l(window).off("resize orientationchange",i._autoHeightOnResize),i._autoHeightOnResize=null),i.container.off("cycle-slide-added cycle-slide-removed",a),i.container.off("cycle-destroyed",d),i.container.off("cycle-before",s),i._sentinel&&(i._sentinel.remove(),i._sentinel=null)}l.extend(l.fn.cycle.defaults,{autoHeight:0,autoHeightSpeed:250,autoHeightEasing:null}),l(document).on("cycle-initialized",function(e,i){var n=i.autoHeight,t=l.fn.cycle.varType(n),o=null;function c(){a(0,i)}"string"!==t&&"number"!==t||(i.container.on("cycle-slide-added cycle-slide-removed",a),i.container.on("cycle-destroyed",d),"container"==n?i.container.on("cycle-before",s):"string"===t&&/\d+\:\d+/.test(n)&&(n=(n=n.match(/(\d+)\:(\d+)/))[1]/n[2],i._autoHeightRatio=n),"number"!==t&&(i._autoHeightOnResize=function(){clearTimeout(o),o=setTimeout(c,50)},l(window).on("resize orientationchange",i._autoHeightOnResize)),setTimeout(c,30))})}(jQuery); \ No newline at end of file diff --git a/build/core/jquery.cycle2.caption.min.js b/build/core/jquery.cycle2.caption.min.js index fdc322b..de3fe28 100644 --- a/build/core/jquery.cycle2.caption.min.js +++ b/build/core/jquery.cycle2.caption.min.js @@ -1,3 +1,3 @@ -/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20200917 */ +/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20210125 */ !function(i){"use strict";i.extend(i.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"
{{title}}
{{desc}}
",captionModule:"caption"}),i(document).on("cycle-update-view",function(e,o,n,c){"caption"===o.captionModule&&i.each(["caption","overlay"],function(){var e=n[this+"Template"],t=o.API.getComponent(this);t.length&&e?(t.html(o.API.tmpl(e,n,o,c)),t.show()):t.hide()})}),i(document).on("cycle-destroyed",function(e,t){i.each(["caption","overlay"],function(){var e=t[this+"Template"];t[this]&&e&&t.API.getComponent("caption").empty()})})}(jQuery); \ No newline at end of file diff --git a/build/core/jquery.cycle2.command.min.js b/build/core/jquery.cycle2.command.min.js index 6140e25..7d4f74d 100644 --- a/build/core/jquery.cycle2.command.min.js +++ b/build/core/jquery.cycle2.command.min.js @@ -1,3 +1,3 @@ -/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20200917 */ +/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20210125 */ -!function(l){"use strict";var c=l.fn.cycle;l.fn.cycle=function(t){var i,r,o,s=l.makeArray(arguments);return"number"==l.type(t)?this.cycle("goto",t):"string"==l.type(t)?this.each(function(){var e;return i=t,void 0!==(o=l(this).data("cycle.opts"))?(i="goto"==i?"jump":i,r=o.API[i],l.isFunction(r)?((e=l.makeArray(s)).shift(),r.apply(o.API,e)):void c.log("unknown command: ",i)):void c.log('slideshow must be initialized before sending commands; "'+i+'" ignored')}):c.apply(this,arguments)},l.extend(l.fn.cycle,c),l.extend(c.API,{next:function(){var e,t=this.opts();t.busy&&!t.manualTrump||(e=t.reverse?-1:1,!1===t.allowWrap&&t.currSlide+e>=t.slideCount||(t.API.advanceSlide(e),t.API.trigger("cycle-next",[t]).log("cycle-next")))},prev:function(){var e,t=this.opts();t.busy&&!t.manualTrump||(e=t.reverse?1:-1,!1===t.allowWrap&&t.currSlide+e<0||(t.API.advanceSlide(e),t.API.trigger("cycle-prev",[t]).log("cycle-prev")))},destroy:function(){this.stop();var t=this.opts(),i=l.isFunction(l._data)?l._data:l.noop;clearTimeout(t.timeoutId),t.timeoutId=0,t.API.stop(),t.API.trigger("cycle-destroyed",[t]).log("cycle-destroyed"),t.container.removeData(),i(t.container[0],"parsedAttrs",!1),t.retainStylesOnDestroy||(t.container.removeAttr("style"),t.slides.removeAttr("style"),t.slides.removeClass(t.slideActiveClass)),t.slides.each(function(){var e=l(this);e.removeData(),e.removeClass(t.slideClass),i(this,"parsedAttrs",!1)})},jump:function(e,t){var i,r,o=this.opts();o.busy&&!o.manualTrump||(r=parseInt(e,10),isNaN(r)||r<0||r>=o.slides.length?o.API.log("goto: invalid slide index: "+r):r!=o.currSlide?(o.nextSlide=r,clearTimeout(o.timeoutId),o.timeoutId=0,o.API.log("goto: ",r," (zero-index)"),i=o.currSlide=t.slideCount||(t.API.advanceSlide(e),t.API.trigger("cycle-next",[t]).log("cycle-next")))},prev:function(){var e,t=this.opts();t.busy&&!t.manualTrump||(e=t.reverse?1:-1,!1===t.allowWrap&&t.currSlide+e<0||(t.API.advanceSlide(e),t.API.trigger("cycle-prev",[t]).log("cycle-prev")))},destroy:function(){this.stop();var t=this.opts(),r="function"===this.varType(l._data)?l._data:l.noop;clearTimeout(t.timeoutId),t.timeoutId=0,t.API.stop(),t.API.trigger("cycle-destroyed",[t]).log("cycle-destroyed"),t.container.removeData(),r(t.container[0],"parsedAttrs",!1),t.retainStylesOnDestroy||(t.container.removeAttr("style"),t.slides.removeAttr("style"),t.slides.removeClass(t.slideActiveClass)),t.slides.each(function(){var e=l(this);e.removeData(),e.removeClass(t.slideClass),r(this,"parsedAttrs",!1)})},jump:function(e,t){var r,i=this.opts();i.busy&&!i.manualTrump||(r=parseInt(e,10),isNaN(r)||r<0||r>=i.slides.length?i.API.log("goto: invalid slide index: "+r):r!=i.currSlide?(i.nextSlide=r,clearTimeout(i.timeoutId),i.timeoutId=0,i.API.log("goto: ",r," (zero-index)"),e=i.currSlide=i.slides.length||e<0)&&(e=0),i.currSlide=e,i.reverse?(i.nextSlide=e-1,i.nextSlide<0&&(i.nextSlide=i.slides.length-1)):(i.nextSlide=e+1,i.nextSlide==i.slides.length&&(i.nextSlide=0))},calcNextSlide:function(){var e,i=this.opts();i.reverse?(e=i.nextSlide-1<0,i.nextSlide=e?i.slideCount-1:i.nextSlide-1,i.currSlide=e?0:i.nextSlide+1):(e=i.nextSlide+1==i.slides.length,i.nextSlide=e?0:i.nextSlide+1,i.currSlide=e?i.slides.length-1:i.nextSlide-1)},calcTx:function(e,i){var t,s=e;return s._tempFx?t=r.fn.cycle.transitions[s._tempFx]:i&&s.manualFx&&(t=r.fn.cycle.transitions[s.manualFx]),t=t||r.fn.cycle.transitions[s.fx],s._tempFx=null,this.opts()._tempFx=null,t||(t=r.fn.cycle.transitions.fade,s.API.log('Transition "'+s.fx+'" not found. Using fade.')),t},prepareTx:function(e,i){var t,s,n,l,o,d=this.opts();d.slideCount<2?d.timeoutId=0:(!e||d.busy&&!d.manualTrump||(d.API.stopTransition(),d.busy=!1,clearTimeout(d.timeoutId),d.timeoutId=0),d.busy||0===d.timeoutId&&!e||(s=d.slides[d.currSlide],n=d.slides[d.nextSlide],l=d.API.getSlideOpts(d.nextSlide),o=d.API.calcTx(l,e),d._tx=o,e&&void 0!==l.manualSpeed&&(l.speed=l.manualSpeed),d.nextSlide!=d.currSlide&&(e||!d.paused&&!d.hoverPaused&&d.timeout)?(d.API.trigger("cycle-before",[l,s,n,i]),o.before&&o.before(l,s,n,i),t=function(){d.busy=!1,d.container.data("cycle.opts")&&(o.after&&o.after(l,s,n,i),d.API.trigger("cycle-after",[l,s,n,i]),d.API.queueTransition(l),d.API.updateView(!0))},d.busy=!0,o.transition?o.transition(l,s,n,i,t):d.API.doTransition(l,s,n,i,t),d.API.calcNextSlide(),d.API.updateView()):d.API.queueTransition(l)))},doTransition:function(e,i,t,s,n){function l(){a.animate(o.animIn||{opacity:1},o.speed,o.easeIn||o.easing,n)}var o=e,d=r(i),a=r(t);a.css(o.cssBefore||{}),d.animate(o.animOut||{},o.speed,o.easeOut||o.easing,function(){d.css(o.cssAfter||{}),o.sync||l()}),o.sync&&l()},queueTransition:function(e,i){var t=this.opts(),s=void 0!==i?i:e.timeout;return 0===t.nextSlide&&0==--t.loop?(t.API.log("terminating; loop=0"),t.timeout=0,s?setTimeout(function(){t.API.trigger("cycle-finished",[t])},s):t.API.trigger("cycle-finished",[t]),void(t.nextSlide=t.currSlide)):void 0!==t.continueAuto&&(!1===t.continueAuto||r.isFunction(t.continueAuto)&&!1===t.continueAuto())?(t.API.log("terminating automatic transitions"),t.timeout=0,void(t.timeoutId&&clearTimeout(t.timeoutId))):void(s&&(t._lastQueue=r.now(),void 0===i&&(t._remainingTimeout=e.timeout),t.paused||t.hoverPaused||(t.timeoutId=setTimeout(function(){t.API.prepareTx(!1,!t.reverse)},s))))},stopTransition:function(){var e=this.opts();e.slides.filter(":animated").length&&(e.slides.stop(!1,!0),e.API.trigger("cycle-transition-stopped",[e])),e._tx&&e._tx.stopTransition&&e._tx.stopTransition(e)},advanceSlide:function(e){var i=this.opts();return clearTimeout(i.timeoutId),i.timeoutId=0,i.nextSlide=i.currSlide+e,i.nextSlide<0?i.nextSlide=i.slides.length-1:i.nextSlide>=i.slides.length&&(i.nextSlide=0),i.API.prepareTx(!0,0<=e),!1},buildSlideOpts:function(e){var i,t,s,n=this.opts(),l=e.data()||{};for(s in l)l.hasOwnProperty(s)&&/^cycle[A-Z]+/.test(s)&&(i=l[s],t=s.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,a),n.API.log("["+(n.slideCount-1)+"]",t+":",i,"("+typeof i+")"),l[t]=i);(l=r.extend({},r.fn.cycle.defaults,n,l)).slideNum=n.slideCount;try{delete l.API,delete l.slideCount,delete l.currSlide,delete l.nextSlide,delete l.slides}catch(e){}return l},getSlideOpts:function(e){var i=this.opts();void 0===e&&(e=i.currSlide);var t=i.slides[e],s=r(t).data("cycle.opts");return r.extend({},i,s)},initSlide:function(e,i,t){var s=this.opts();i.css(e.slideCss||{}),0|\+|~]/.test(t)?i.container.find(t):r(t):t.jquery?t:r(t)},stackSlides:function(e,i,t){var s,n=this.opts();e||(e=n.slides[n.currSlide],i=n.slides[n.nextSlide],t=!n.reverse),r(e).css("zIndex",n.maxZ);var l=n.maxZ-2,o=n.slideCount;if(t){for(s=n.currSlide+1;sn.currSlide;s--)r(n.slides[s]).css("zIndex",l--)}r(i).css("zIndex",n.maxZ-1)},getSlideIndex:function(e){return this.opts().slides.index(e)}},r.fn.cycle.log=function(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))},r.fn.cycle.version=function(){return"Cycle2: 2.1.6b"},r.fn.cycle.transitions={custom:{},none:{before:function(e,i,t,s){e.API.stackSlides(t,i,s),e.cssBefore={opacity:1,visibility:"visible",display:"block"}}},fade:{before:function(e,i,t,s){var n=e.API.getSlideOpts(e.nextSlide).slideCss||{};e.API.stackSlides(i,t,s),e.cssBefore=r.extend(n,{opacity:0,visibility:"visible",display:"block"}),e.animIn={opacity:1},e.animOut={opacity:0}}},fadeout:{before:function(e,i,t,s){var n=e.API.getSlideOpts(e.nextSlide).slideCss||{};e.API.stackSlides(i,t,s),e.cssBefore=r.extend(n,{opacity:1,visibility:"visible",display:"block"}),e.animOut={opacity:0}}},scrollHorz:{before:function(e,i,t,s){e.API.stackSlides(i,t,s);var n=e.container.css("overflow","hidden").width();e.cssBefore={left:s?n:-n,top:0,opacity:1,visibility:"visible",display:"block"},e.cssAfter={zIndex:e._maxZ-2,left:0},e.animIn={left:0},e.animOut={left:s?-n:n}}}},r.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow[data-cycle-auto-init!=false]",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:void 0,manualSpeed:void 0,manualTrump:!0,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3,updateView:0},r(document).ready(function(){r(r.fn.cycle.defaults.autoSelector).cycle()})}(jQuery); \ No newline at end of file +!function(a){"use strict";function r(e){return(e||"").toLowerCase()}a.fn.cycle=function(d){var e;return 0!==this.length||a.isReady?this.each(function(){var e,t,i,s,n=a(this),l=a.fn.cycle.log;if(!n.data("cycle.opts")){for(var o in(l=!1===n.data("cycle-log")||d&&!1===d.log||t&&!1===t.log?a.noop:l)("--c2 init--"),e=n.data())e.hasOwnProperty(o)&&/^cycle[A-Z]+/.test(o)&&(s=e[o],l((i=o.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,r))+":",s,"("+typeof s+")"),e[i]=s);(t=a.extend({},a.fn.cycle.defaults,e,d||{})).timeoutId=0,t.paused=t.paused||!1,t.container=n,t._maxZ=t.maxZ,t.API=a.extend({_container:n},a.fn.cycle.API),t.API.log=l,t.API.trigger=function(e,i){return t.container.trigger(e,i),t.API},n.data("cycle.opts",t),n.data("cycle.API",t.API),t.API.trigger("cycle-bootstrap",[t,t.API]),t.API.addInitialSlides(),t.API.preInitSlideshow(),t.slides.length&&t.API.initSlideshow()}}):(e={s:this.selector,c:this.context},a.fn.cycle.log("requeuing slideshow (dom not ready)"),a(function(){a(e.s,e.c).cycle(d)}),this)},a.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var e=this.opts(),i=e.slides;e.slideCount=0,e.slides=a(),i=i.jquery?i:e.container.find(i),e.random&&(i=function(e){for(var i,t,s=e.length;0<--s;)t=e[i=~~(Math.random()*(s+1))],e[i]=e[s],e[s]=t;return e}(i)),e.API.add(i)},preInitSlideshow:function(){var e=this.opts();e.API.trigger("cycle-pre-initialize",[e]);var i=a.fn.cycle.transitions[e.fx];i&&"function"===a.fn.cycle.varType(i.preInit)&&i.preInit(e),e._preInitialized=!0},postInitSlideshow:function(){var e=this.opts();e.API.trigger("cycle-post-initialize",[e]);var i=a.fn.cycle.transitions[e.fx];i&&"function"===a.fn.cycle.varType(i.postInit)&&i.postInit(e)},initSlideshow:function(){var e=this.opts(),i=e.container;e.API.calcFirstSlide(),"static"==e.container.css("position")&&e.container.css("position","relative"),a(e.slides[e.currSlide]).css({opacity:1,display:"block",visibility:"visible"}),e.API.stackSlides(e.slides[e.currSlide],e.slides[e.nextSlide],!e.reverse),e.pauseOnHover&&(i=!0!==e.pauseOnHover?a(e.pauseOnHover):i).hover(function(){e.API.pause(!0)},function(){e.API.resume(!0)}),e.timeout&&(i=e.API.getSlideOpts(e.currSlide),e.API.queueTransition(i,i.timeout+e.delay)),e._initialized=!0,e.API.updateView(!0),e.API.trigger("cycle-initialized",[e]),e.API.postInitSlideshow()},pause:function(e){var i=this.opts(),t=i.API.getSlideOpts(),s=i.hoverPaused||i.paused;e?i.hoverPaused=!0:i.paused=!0,s||(i.container.addClass("cycle-paused"),i.API.trigger("cycle-paused",[i]).log("cycle-paused"),t.timeout&&(clearTimeout(i.timeoutId),i.timeoutId=0,i._remainingTimeout-=a.now()-i._lastQueue,(i._remainingTimeout<0||isNaN(i._remainingTimeout))&&(i._remainingTimeout=void 0)))},resume:function(e){var i=this.opts(),t=!i.hoverPaused&&!i.paused;e?i.hoverPaused=!1:i.paused=!1,t||(i.container.removeClass("cycle-paused"),0===i.slides.filter(":animated").length&&i.API.queueTransition(i.API.getSlideOpts(),i._remainingTimeout),i.API.trigger("cycle-resumed",[i,i._remainingTimeout]).log("cycle-resumed"))},add:function(e,s){var n=this.opts(),i=n.slideCount;"string"==a.fn.cycle.varType(e)&&(e=e.trim()),a(e).each(function(e){var i,t=a(this);s?n.container.prepend(t):n.container.append(t),n.slideCount++,i=n.API.buildSlideOpts(t),n.slides=s?a(t).add(n.slides):n.slides.add(t),n.API.initSlide(i,t,--n._maxZ),t.data("cycle.opts",i),n.API.trigger("cycle-slide-added",[n,i,t])}),n.API.updateView(!0),n._preInitialized&&i<2&&1<=n.slideCount&&(n._initialized?n.timeout&&(i=n.slides.length,n.nextSlide=n.reverse?i-1:1,n.timeoutId||n.API.queueTransition(n)):n.API.initSlideshow())},calcFirstSlide:function(){var e,i=this.opts();"string"==typeof i.startingSlide&&"random"===i.startingSlide?e=Math.floor(Math.random()*i.slides.length):((e=parseInt(i.startingSlide||0,10))>=i.slides.length||e<0)&&(e=0),i.currSlide=e,i.reverse?(i.nextSlide=e-1,i.nextSlide<0&&(i.nextSlide=i.slides.length-1)):(i.nextSlide=e+1,i.nextSlide==i.slides.length&&(i.nextSlide=0))},calcNextSlide:function(){var e,i=this.opts();i.reverse?(e=i.nextSlide-1<0,i.nextSlide=e?i.slideCount-1:i.nextSlide-1,i.currSlide=e?0:i.nextSlide+1):(e=i.nextSlide+1==i.slides.length,i.nextSlide=e?0:i.nextSlide+1,i.currSlide=e?i.slides.length-1:i.nextSlide-1)},calcTx:function(e,i){var t,e=e;return e._tempFx?t=a.fn.cycle.transitions[e._tempFx]:i&&e.manualFx&&(t=a.fn.cycle.transitions[e.manualFx]),t=t||a.fn.cycle.transitions[e.fx],e._tempFx=null,this.opts()._tempFx=null,t||(t=a.fn.cycle.transitions.fade,e.API.log('Transition "'+e.fx+'" not found. Using fade.')),t},prepareTx:function(e,i){var t,s,n,l,o=this.opts();o.slideCount<2?o.timeoutId=0:(!e||o.busy&&!o.manualTrump||(o.API.stopTransition(),o.busy=!1,clearTimeout(o.timeoutId),o.timeoutId=0),o.busy||0===o.timeoutId&&!e||(t=o.slides[o.currSlide],s=o.slides[o.nextSlide],n=o.API.getSlideOpts(o.nextSlide),l=o.API.calcTx(n,e),o._tx=l,e&&void 0!==n.manualSpeed&&(n.speed=n.manualSpeed),o.nextSlide!=o.currSlide&&(e||!o.paused&&!o.hoverPaused&&o.timeout)?(o.API.trigger("cycle-before",[n,t,s,i]),l.before&&l.before(n,t,s,i),e=function(){o.busy=!1,o.container.data("cycle.opts")&&(l.after&&l.after(n,t,s,i),o.API.trigger("cycle-after",[n,t,s,i]),o.API.queueTransition(n),o.API.updateView(!0))},o.busy=!0,l.transition?l.transition(n,t,s,i,e):o.API.doTransition(n,t,s,i,e),o.API.calcNextSlide(),o.API.updateView()):o.API.queueTransition(n)))},doTransition:function(e,i,t,s,n){function l(){r.animate(o.animIn||{opacity:1},o.speed,o.easeIn||o.easing,n)}var o=e,d=a(i),r=a(t);r.css(o.cssBefore||{}),d.animate(o.animOut||{},o.speed,o.easeOut||o.easing,function(){d.css(o.cssAfter||{}),o.sync||l()}),o.sync&&l()},queueTransition:function(e,i){var t=this.opts(),s=void 0!==i?i:e.timeout;return 0===t.nextSlide&&0==--t.loop?(t.API.log("terminating; loop=0"),t.timeout=0,s?setTimeout(function(){t.API.trigger("cycle-finished",[t])},s):t.API.trigger("cycle-finished",[t]),void(t.nextSlide=t.currSlide)):void 0!==t.continueAuto&&(!1===t.continueAuto||"function"===a.fn.cycle.varType(t.continueAuto)&&!1===t.continueAuto())?(t.API.log("terminating automatic transitions"),t.timeout=0,void(t.timeoutId&&clearTimeout(t.timeoutId))):void(s&&(t._lastQueue=a.now(),void 0===i&&(t._remainingTimeout=e.timeout),t.paused||t.hoverPaused||(t.timeoutId=setTimeout(function(){t.API.prepareTx(!1,!t.reverse)},s))))},stopTransition:function(){var e=this.opts();e.slides.filter(":animated").length&&(e.slides.stop(!1,!0),e.API.trigger("cycle-transition-stopped",[e])),e._tx&&e._tx.stopTransition&&e._tx.stopTransition(e)},advanceSlide:function(e){var i=this.opts();return clearTimeout(i.timeoutId),i.timeoutId=0,i.nextSlide=i.currSlide+e,i.nextSlide<0?i.nextSlide=i.slides.length-1:i.nextSlide>=i.slides.length&&(i.nextSlide=0),i.API.prepareTx(!0,0<=e),!1},buildSlideOpts:function(e){var i,t,s,n=this.opts(),l=e.data()||{};for(s in l)l.hasOwnProperty(s)&&/^cycle[A-Z]+/.test(s)&&(i=l[s],t=s.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,r),n.API.log("["+(n.slideCount-1)+"]",t+":",i,"("+typeof i+")"),l[t]=i);(l=a.extend({},a.fn.cycle.defaults,n,l)).slideNum=n.slideCount;try{delete l.API,delete l.slideCount,delete l.currSlide,delete l.nextSlide,delete l.slides}catch(e){}return l},getSlideOpts:function(e){var i=this.opts();void 0===e&&(e=i.currSlide);e=i.slides[e],e=a(e).data("cycle.opts");return a.extend({},i,e)},initSlide:function(e,i,t){var s=this.opts();i.css(e.slideCss||{}),0|\+|~]/.test(e)?i.container.find(e):a(e):e.jquery?e:a(e)},stackSlides:function(e,i,t){var s,n=this.opts();e||(e=n.slides[n.currSlide],i=n.slides[n.nextSlide],t=!n.reverse),a(e).css("zIndex",n.maxZ);var l=n.maxZ-2,o=n.slideCount;if(t){for(s=n.currSlide+1;sn.currSlide;s--)a(n.slides[s]).css("zIndex",l--)}a(i).css("zIndex",n.maxZ-1)},getSlideIndex:function(e){return this.opts().slides.index(e)}},a.fn.cycle.log=function(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))},a.fn.cycle.version=function(){return"Cycle2: 2.1.6c"},a.fn.cycle.varType=function(e,i){if(i)return null===e?"[object Null]":Object.prototype.toString.call(e);if(null==e)return(e+"").toLowerCase();i=Object.prototype.toString.call(e).slice(8,-1).toLowerCase();return"generatorfunction"===i?"function":i.match(/^(array|bigint|date|error|function|generator|regexp|symbol)$/)?i:"object"==typeof e||"function"==typeof e?"object":typeof e},a.fn.cycle.transitions={custom:{},none:{before:function(e,i,t,s){e.API.stackSlides(t,i,s),e.cssBefore={opacity:1,visibility:"visible",display:"block"}}},fade:{before:function(e,i,t,s){var n=e.API.getSlideOpts(e.nextSlide).slideCss||{};e.API.stackSlides(i,t,s),e.cssBefore=a.extend(n,{opacity:0,visibility:"visible",display:"block"}),e.animIn={opacity:1},e.animOut={opacity:0}}},fadeout:{before:function(e,i,t,s){var n=e.API.getSlideOpts(e.nextSlide).slideCss||{};e.API.stackSlides(i,t,s),e.cssBefore=a.extend(n,{opacity:1,visibility:"visible",display:"block"}),e.animOut={opacity:0}}},scrollHorz:{before:function(e,i,t,s){e.API.stackSlides(i,t,s);t=e.container.css("overflow","hidden").width();e.cssBefore={left:s?t:-t,top:0,opacity:1,visibility:"visible",display:"block"},e.cssAfter={zIndex:e._maxZ-2,left:0},e.animIn={left:0},e.animOut={left:s?-t:t}}}},a.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow[data-cycle-auto-init!=false]",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:void 0,manualSpeed:void 0,manualTrump:!0,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3,updateView:0},a(document).ready(function(){a(a.fn.cycle.defaults.autoSelector).cycle()})}(jQuery); \ No newline at end of file diff --git a/build/core/jquery.cycle2.hash.min.js b/build/core/jquery.cycle2.hash.min.js index fa7bf72..15bea08 100644 --- a/build/core/jquery.cycle2.hash.min.js +++ b/build/core/jquery.cycle2.hash.min.js @@ -1,3 +1,3 @@ -/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20200917 */ +/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20210125 */ !function(c){"use strict";function h(h,a){var o;h._hashFence?h._hashFence=!1:(o=window.location.hash.substring(1),h.slides.each(function(n){var e;if(c(this).data("cycle-hash")==o)return!0===a?h.startingSlide=n:(e=h.currSlide .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerEventBubble:void 0,pagerTemplate:""}),r(document).on("cycle-bootstrap",function(e,n,t){t.buildPagerLink=a}),r(document).on("cycle-slide-added",function(e,n,t,a){n.pager&&(n.API.buildPagerLink(n,t,a),n.API.page=c)}),r(document).on("cycle-slide-removed",function(e,n,t,a){n.pager&&n.API.getComponent("pager").each(function(){var e=r(this);r(e.children()[t]).remove()})}),r(document).on("cycle-update-view",function(e,n,t){n.pager&&n.API.getComponent("pager").each(function(){r(this).children().removeClass(n.pagerActiveClass).eq(n.currSlide).addClass(n.pagerActiveClass)})}),r(document).on("cycle-destroyed",function(e,n){var t=n.API.getComponent("pager");t&&(t.children().off(n.pagerEvent),n.pagerTemplate&&t.empty())})}(jQuery); \ No newline at end of file diff --git a/build/core/jquery.cycle2.prevnext.min.js b/build/core/jquery.cycle2.prevnext.min.js index 3d2748e..4824478 100644 --- a/build/core/jquery.cycle2.prevnext.min.js +++ b/build/core/jquery.cycle2.prevnext.min.js @@ -1,3 +1,3 @@ -/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20200917 */ +/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20210125 */ !function(e){"use strict";e.extend(e.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),e(document).on("cycle-initialized",function(e,n){var t,c;n.API.getComponent("next").on(n.nextEvent,function(e){e.preventDefault(),n.API.next()}),n.API.getComponent("prev").on(n.prevEvent,function(e){e.preventDefault(),n.API.prev()}),n.swipe&&(t=n.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",c=n.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle",n.container.on(t,function(e){n._tempFx=n.swipeFx,n.API.next()}),n.container.on(c,function(){n._tempFx=n.swipeFx,n.API.prev()}))}),e(document).on("cycle-update-view",function(e,n,t,c){var i,o,p,l,s;n.allowWrap||(i=n.disabledClass,o=n.API.getComponent("next"),p=n.API.getComponent("prev"),l=n._prevBoundry||0,s=void 0!==n._nextBoundry?n._nextBoundry:n.slideCount-1,n.currSlide==s?o.addClass(i).prop("disabled",!0):o.removeClass(i).prop("disabled",!1),n.currSlide===l?p.addClass(i).prop("disabled",!0):p.removeClass(i).prop("disabled",!1))}),e(document).on("cycle-destroyed",function(e,n){n.API.getComponent("prev").off(n.nextEvent),n.API.getComponent("next").off(n.prevEvent),n.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery); \ No newline at end of file diff --git a/build/core/jquery.cycle2.progressive.min.js b/build/core/jquery.cycle2.progressive.min.js index fa58f85..9b5266d 100644 --- a/build/core/jquery.cycle2.progressive.min.js +++ b/build/core/jquery.cycle2.progressive.min.js @@ -1,3 +1,3 @@ -/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20200917 */ +/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20210125 */ -!function(d){"use strict";d.extend(d.fn.cycle.defaults,{progressive:!1}),d(document).on("cycle-pre-initialize",function(e,c){if(c.progressive){var l,i,n=c.API,r=n.next,t=n.prev,s=n.prepareTx,a=d.type(c.progressive);if("array"==a)l=c.progressive;else if(d.isFunction(c.progressive))l=c.progressive(c);else if("string"==a){if(i=d(c.progressive),!(l=i.html().trim()))return;if(/^(\[)/.test(l))try{l=d.parseJSON(l)}catch(e){return void n.log("error parsing progressive slides",e)}else(l=l.split(new RegExp(i.data("cycle-split")||"\n")))[l.length-1]||l.pop()}s&&(n.prepareTx=function(e,i){var n,r;e||0===l.length?s.apply(c.API,[e,i]):i&&c.currSlide==c.slideCount-1?(r=l[0],l=l.slice(1),c.container.one("cycle-slide-added",function(e,i){setTimeout(function(){i.API.advanceSlide(1)},50)}),c.API.add(r)):i||0!==c.currSlide?s.apply(c.API,[e,i]):(n=l.length-1,r=l[n],l=l.slice(0,n),c.container.one("cycle-slide-added",function(e,i){setTimeout(function(){i.currSlide=1,i.API.advanceSlide(-1)},50)}),c.API.add(r,!0))}),r&&(n.next=function(){var e,i=this.opts();l.length&&i.currSlide==i.slideCount-1?(e=l[0],l=l.slice(1),i.container.one("cycle-slide-added",function(e,i){r.apply(i.API),i.container.removeClass("cycle-loading")}),i.container.addClass("cycle-loading"),i.API.add(e)):r.apply(i.API)}),t&&(n.prev=function(){var e,i,n=this.opts();l.length&&0===n.currSlide?(e=l.length-1,i=l[e],l=l.slice(0,e),n.container.one("cycle-slide-added",function(e,i){i.currSlide=1,i.API.advanceSlide(-1),i.container.removeClass("cycle-loading")}),n.container.addClass("cycle-loading"),n.API.add(i,!0)):t.apply(n.API)})}})}(jQuery); \ No newline at end of file +!function(s){"use strict";s.extend(s.fn.cycle.defaults,{progressive:!1}),s(document).on("cycle-pre-initialize",function(e,r){if(r.progressive){var c,n=r.API,i=n.next,l=n.prev,t=n.prepareTx,a=s.fn.cycle.varType(r.progressive);if("array"==a)c=r.progressive;else if("function"===s.fn.cycle.varType(r.progressive))c=r.progressive(r);else if("string"==a){if(a=s(r.progressive),!(c=a.html().trim()))return;if(/^(\[)/.test(c))try{c=s.parseJSON(c)}catch(e){return void n.log("error parsing progressive slides",e)}else(c=c.split(new RegExp(a.data("cycle-split")||"\n")))[c.length-1]||c.pop()}t&&(n.prepareTx=function(e,n){var i;e||0===c.length?t.apply(r.API,[e,n]):n&&r.currSlide==r.slideCount-1?(i=c[0],c=c.slice(1),r.container.one("cycle-slide-added",function(e,n){setTimeout(function(){n.API.advanceSlide(1)},50)}),r.API.add(i)):n||0!==r.currSlide?t.apply(r.API,[e,n]):(n=c.length-1,i=c[n],c=c.slice(0,n),r.container.one("cycle-slide-added",function(e,n){setTimeout(function(){n.currSlide=1,n.API.advanceSlide(-1)},50)}),r.API.add(i,!0))}),i&&(n.next=function(){var e,n=this.opts();c.length&&n.currSlide==n.slideCount-1?(e=c[0],c=c.slice(1),n.container.one("cycle-slide-added",function(e,n){i.apply(n.API),n.container.removeClass("cycle-loading")}),n.container.addClass("cycle-loading"),n.API.add(e)):i.apply(n.API)}),l&&(n.prev=function(){var e,n,i=this.opts();c.length&&0===i.currSlide?(e=c.length-1,n=c[e],c=c.slice(0,e),i.container.one("cycle-slide-added",function(e,n){n.currSlide=1,n.API.advanceSlide(-1),n.container.removeClass("cycle-loading")}),i.container.addClass("cycle-loading"),i.API.add(n,!0)):l.apply(i.API)})}})}(jQuery); \ No newline at end of file diff --git a/build/core/jquery.cycle2.tmpl.min.js b/build/core/jquery.cycle2.tmpl.min.js index 195ac79..3cec32f 100644 --- a/build/core/jquery.cycle2.tmpl.min.js +++ b/build/core/jquery.cycle2.tmpl.min.js @@ -1,3 +1,3 @@ -/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20200917 */ +/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20210125 */ -!function(i){"use strict";i.extend(i.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),i.extend(i.fn.cycle.API,{tmpl:function(e,t){var n=new RegExp(t.tmplRegex||i.fn.cycle.defaults.tmplRegex,"g"),c=i.makeArray(arguments);return c.shift(),e.replace(n,function(e,t){for(var n,l,r,f=t.split("."),u=0;u element (Chrome <=57, Firefox <=52), etc. + // String.prototype.match is universally supported. + + return deepType.match(/^(array|bigint|date|error|function|generator|regexp|symbol)$/) ? deepType : + (typeof obj === 'object' || typeof obj === 'function') ? 'object' : typeof obj; +}; + // helper functions function lowerCase(s) { return (s || '').toLowerCase(); } + + + // expose transition object $.fn.cycle.transitions = { custom: { @@ -725,7 +748,7 @@ $.extend($.fn.cycle.defaults, { $(document).on( 'cycle-initialized', function( e, opts ) { var autoHeight = opts.autoHeight; - var t = $.type( autoHeight ); + var t = $.fn.cycle.varType( autoHeight ); var resizeThrottle = null; var ratio; @@ -776,7 +799,7 @@ function initAutoHeight( e, opts ) { else if ( opts._autoHeightRatio ) { opts.container.height( opts.container.width() / opts._autoHeightRatio ); } - else if ( autoHeight === 'calc' || ( $.type( autoHeight ) == 'number' && autoHeight >= 0 ) ) { + else if ( autoHeight === 'calc' || ( $.fn.cycle.varType( autoHeight ) == 'number' && autoHeight >= 0 ) ) { if ( autoHeight === 'calc' ) sentinelIndex = calcSentinelIndex( e, opts ); else if ( autoHeight >= opts.slides.length ) @@ -898,11 +921,11 @@ $.fn.cycle = function( options ) { var cmd, cmdFn, opts; var args = $.makeArray( arguments ); - if ( $.type( options ) == 'number' ) { + if ( c2.varType( options ) == 'number' ) { return this.cycle( 'goto', options ); } - if ( $.type( options ) == 'string' ) { + if ( c2.varType( options ) == 'string' ) { return this.each(function() { var cmdArgs; cmd = options; @@ -915,7 +938,7 @@ $.fn.cycle = function( options ) { else { cmd = cmd == 'goto' ? 'jump' : cmd; // issue #3; change 'goto' to 'jump' internally cmdFn = opts.API[ cmd ]; - if ( $.isFunction( cmdFn )) { + if ( $.fn.cycle.varType( cmdFn )==='function') { cmdArgs = $.makeArray( args ); cmdArgs.shift(); return cmdFn.apply( opts.API, cmdArgs ); @@ -964,7 +987,7 @@ $.extend( c2.API, { this.stop(); //#204 var opts = this.opts(); - var clean = $.isFunction( $._data ) ? $._data : $.noop; // hack for #184 and #201 + var clean = (this.varType( $._data ) ==='function') ? $._data : $.noop; // hack for #184 and #201 clearTimeout(opts.timeoutId); opts.timeoutId = 0; opts.API.stop(); @@ -1148,14 +1171,14 @@ $(document).on( 'cycle-bootstrap', function( e, opts ) { function add( slides, prepend ) { var slideArr = []; - if ( $.type( slides ) == 'string' ) + if ( $.fn.cycle.varType( slides ) == 'string' ) // FIX: $.trim DEPRECATED in JQUERY 3.5+ // slides = $.trim( slides ); slides = slides.trim(); - else if ( $.type( slides) === 'array' ) { + else if ( $.fn.cycle.varType( slides) === 'array' ) { for (var i=0; i < slides.length; i++ ) slides[i] = $(slides[i])[0]; } @@ -1422,13 +1445,13 @@ $(document).on( 'cycle-pre-initialize', function( e, opts ) { var nextFn = API.next; var prevFn = API.prev; var prepareTxFn = API.prepareTx; - var type = $.type( opts.progressive ); + var type = $.fn.cycle.varType( opts.progressive ); var slides, scriptEl; if ( type == 'array' ) { slides = opts.progressive; } - else if ($.isFunction( opts.progressive ) ) { + else if ($.fn.cycle.varType( opts.progressive ) === 'function' ) { slides = opts.progressive( opts ); } else if ( type == 'string' ) { @@ -1573,7 +1596,7 @@ $.extend($.fn.cycle.API, { prop = obj[str]; } - if ($.isFunction(prop)) + if ($.fn.cycle.varType(prop) ==='function') return prop.apply(obj, args); if (prop !== undefined && prop !== null && prop != str) return prop; diff --git a/build/jquery.cycle2.min.js b/build/jquery.cycle2.min.js index db9e999..7718c91 100644 --- a/build/jquery.cycle2.min.js +++ b/build/jquery.cycle2.min.js @@ -1,2 +1,2 @@ -!function(r){"use strict";function a(e){return(e||"").toLowerCase()}r.fn.cycle=function(l){var e;return 0!==this.length||r.isReady?this.each(function(){var e,i,t,n,s=r(this),o=r.fn.cycle.log;if(!s.data("cycle.opts")){for(var c in(!1===s.data("cycle-log")||l&&!1===l.log||i&&!1===i.log)&&(o=r.noop),o("--c2 init--"),e=s.data())e.hasOwnProperty(c)&&/^cycle[A-Z]+/.test(c)&&(n=e[c],o((t=c.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,a))+":",n,"("+typeof n+")"),e[t]=n);(i=r.extend({},r.fn.cycle.defaults,e,l||{})).timeoutId=0,i.paused=i.paused||!1,i.container=s,i._maxZ=i.maxZ,i.API=r.extend({_container:s},r.fn.cycle.API),i.API.log=o,i.API.trigger=function(e,t){return i.container.trigger(e,t),i.API},s.data("cycle.opts",i),s.data("cycle.API",i.API),i.API.trigger("cycle-bootstrap",[i,i.API]),i.API.addInitialSlides(),i.API.preInitSlideshow(),i.slides.length&&i.API.initSlideshow()}}):(e={s:this.selector,c:this.context},r.fn.cycle.log("requeuing slideshow (dom not ready)"),r(function(){r(e.s,e.c).cycle(l)}),this)},r.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var e=this.opts(),t=e.slides;e.slideCount=0,e.slides=r(),t=t.jquery?t:e.container.find(t),e.random&&(t=function(e){for(var t,i,n=e.length;0<--n;)i=e[t=~~(Math.random()*(n+1))],e[t]=e[n],e[n]=i;return e}(t)),e.API.add(t)},preInitSlideshow:function(){var e=this.opts();e.API.trigger("cycle-pre-initialize",[e]);var t=r.fn.cycle.transitions[e.fx];t&&r.isFunction(t.preInit)&&t.preInit(e),e._preInitialized=!0},postInitSlideshow:function(){var e=this.opts();e.API.trigger("cycle-post-initialize",[e]);var t=r.fn.cycle.transitions[e.fx];t&&r.isFunction(t.postInit)&&t.postInit(e)},initSlideshow:function(){var e,t=this.opts(),i=t.container;t.API.calcFirstSlide(),"static"==t.container.css("position")&&t.container.css("position","relative"),r(t.slides[t.currSlide]).css({opacity:1,display:"block",visibility:"visible"}),t.API.stackSlides(t.slides[t.currSlide],t.slides[t.nextSlide],!t.reverse),t.pauseOnHover&&(!0!==t.pauseOnHover&&(i=r(t.pauseOnHover)),i.hover(function(){t.API.pause(!0)},function(){t.API.resume(!0)})),t.timeout&&(e=t.API.getSlideOpts(t.currSlide),t.API.queueTransition(e,e.timeout+t.delay)),t._initialized=!0,t.API.updateView(!0),t.API.trigger("cycle-initialized",[t]),t.API.postInitSlideshow()},pause:function(e){var t=this.opts(),i=t.API.getSlideOpts(),n=t.hoverPaused||t.paused;e?t.hoverPaused=!0:t.paused=!0,n||(t.container.addClass("cycle-paused"),t.API.trigger("cycle-paused",[t]).log("cycle-paused"),i.timeout&&(clearTimeout(t.timeoutId),t.timeoutId=0,t._remainingTimeout-=r.now()-t._lastQueue,(t._remainingTimeout<0||isNaN(t._remainingTimeout))&&(t._remainingTimeout=void 0)))},resume:function(e){var t=this.opts(),i=!t.hoverPaused&&!t.paused;e?t.hoverPaused=!1:t.paused=!1,i||(t.container.removeClass("cycle-paused"),0===t.slides.filter(":animated").length&&t.API.queueTransition(t.API.getSlideOpts(),t._remainingTimeout),t.API.trigger("cycle-resumed",[t,t._remainingTimeout]).log("cycle-resumed"))},add:function(e,n){var t,s=this.opts(),i=s.slideCount;"string"==r.type(e)&&(e=e.trim()),r(e).each(function(e){var t,i=r(this);n?s.container.prepend(i):s.container.append(i),s.slideCount++,t=s.API.buildSlideOpts(i),s.slides=n?r(i).add(s.slides):s.slides.add(i),s.API.initSlide(t,i,--s._maxZ),i.data("cycle.opts",t),s.API.trigger("cycle-slide-added",[s,t,i])}),s.API.updateView(!0),s._preInitialized&&i<2&&1<=s.slideCount&&(s._initialized?s.timeout&&(t=s.slides.length,s.nextSlide=s.reverse?t-1:1,s.timeoutId||s.API.queueTransition(s)):s.API.initSlideshow())},calcFirstSlide:function(){var e,t=this.opts();"string"==typeof t.startingSlide&&"random"===t.startingSlide?e=Math.floor(Math.random()*t.slides.length):((e=parseInt(t.startingSlide||0,10))>=t.slides.length||e<0)&&(e=0),t.currSlide=e,t.reverse?(t.nextSlide=e-1,t.nextSlide<0&&(t.nextSlide=t.slides.length-1)):(t.nextSlide=e+1,t.nextSlide==t.slides.length&&(t.nextSlide=0))},calcNextSlide:function(){var e,t=this.opts();t.reverse?(e=t.nextSlide-1<0,t.nextSlide=e?t.slideCount-1:t.nextSlide-1,t.currSlide=e?0:t.nextSlide+1):(e=t.nextSlide+1==t.slides.length,t.nextSlide=e?0:t.nextSlide+1,t.currSlide=e?t.slides.length-1:t.nextSlide-1)},calcTx:function(e,t){var i,n=e;return n._tempFx?i=r.fn.cycle.transitions[n._tempFx]:t&&n.manualFx&&(i=r.fn.cycle.transitions[n.manualFx]),i=i||r.fn.cycle.transitions[n.fx],n._tempFx=null,this.opts()._tempFx=null,i||(i=r.fn.cycle.transitions.fade,n.API.log('Transition "'+n.fx+'" not found. Using fade.')),i},prepareTx:function(e,t){var i,n,s,o,c,l=this.opts();l.slideCount<2?l.timeoutId=0:(!e||l.busy&&!l.manualTrump||(l.API.stopTransition(),l.busy=!1,clearTimeout(l.timeoutId),l.timeoutId=0),l.busy||0===l.timeoutId&&!e||(n=l.slides[l.currSlide],s=l.slides[l.nextSlide],o=l.API.getSlideOpts(l.nextSlide),c=l.API.calcTx(o,e),l._tx=c,e&&void 0!==o.manualSpeed&&(o.speed=o.manualSpeed),l.nextSlide!=l.currSlide&&(e||!l.paused&&!l.hoverPaused&&l.timeout)?(l.API.trigger("cycle-before",[o,n,s,t]),c.before&&c.before(o,n,s,t),i=function(){l.busy=!1,l.container.data("cycle.opts")&&(c.after&&c.after(o,n,s,t),l.API.trigger("cycle-after",[o,n,s,t]),l.API.queueTransition(o),l.API.updateView(!0))},l.busy=!0,c.transition?c.transition(o,n,s,t,i):l.API.doTransition(o,n,s,t,i),l.API.calcNextSlide(),l.API.updateView()):l.API.queueTransition(o)))},doTransition:function(e,t,i,n,s){function o(){a.animate(c.animIn||{opacity:1},c.speed,c.easeIn||c.easing,s)}var c=e,l=r(t),a=r(i);a.css(c.cssBefore||{}),l.animate(c.animOut||{},c.speed,c.easeOut||c.easing,function(){l.css(c.cssAfter||{}),c.sync||o()}),c.sync&&o()},queueTransition:function(e,t){var i=this.opts(),n=void 0!==t?t:e.timeout;return 0===i.nextSlide&&0==--i.loop?(i.API.log("terminating; loop=0"),i.timeout=0,n?setTimeout(function(){i.API.trigger("cycle-finished",[i])},n):i.API.trigger("cycle-finished",[i]),void(i.nextSlide=i.currSlide)):void 0!==i.continueAuto&&(!1===i.continueAuto||r.isFunction(i.continueAuto)&&!1===i.continueAuto())?(i.API.log("terminating automatic transitions"),i.timeout=0,void(i.timeoutId&&clearTimeout(i.timeoutId))):void(n&&(i._lastQueue=r.now(),void 0===t&&(i._remainingTimeout=e.timeout),i.paused||i.hoverPaused||(i.timeoutId=setTimeout(function(){i.API.prepareTx(!1,!i.reverse)},n))))},stopTransition:function(){var e=this.opts();e.slides.filter(":animated").length&&(e.slides.stop(!1,!0),e.API.trigger("cycle-transition-stopped",[e])),e._tx&&e._tx.stopTransition&&e._tx.stopTransition(e)},advanceSlide:function(e){var t=this.opts();return clearTimeout(t.timeoutId),t.timeoutId=0,t.nextSlide=t.currSlide+e,t.nextSlide<0?t.nextSlide=t.slides.length-1:t.nextSlide>=t.slides.length&&(t.nextSlide=0),t.API.prepareTx(!0,0<=e),!1},buildSlideOpts:function(e){var t,i,n,s=this.opts(),o=e.data()||{};for(n in o)o.hasOwnProperty(n)&&/^cycle[A-Z]+/.test(n)&&(t=o[n],i=n.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,a),s.API.log("["+(s.slideCount-1)+"]",i+":",t,"("+typeof t+")"),o[i]=t);(o=r.extend({},r.fn.cycle.defaults,s,o)).slideNum=s.slideCount;try{delete o.API,delete o.slideCount,delete o.currSlide,delete o.nextSlide,delete o.slides}catch(e){}return o},getSlideOpts:function(e){var t=this.opts();void 0===e&&(e=t.currSlide);var i=t.slides[e],n=r(i).data("cycle.opts");return r.extend({},t,n)},initSlide:function(e,t,i){var n=this.opts();t.css(e.slideCss||{}),0|\+|~]/.test(i)?t.container.find(i):r(i):i.jquery?i:r(i)},stackSlides:function(e,t,i){var n,s=this.opts();e||(e=s.slides[s.currSlide],t=s.slides[s.nextSlide],i=!s.reverse),r(e).css("zIndex",s.maxZ);var o=s.maxZ-2,c=s.slideCount;if(i){for(n=s.currSlide+1;ns.currSlide;n--)r(s.slides[n]).css("zIndex",o--)}r(t).css("zIndex",s.maxZ-1)},getSlideIndex:function(e){return this.opts().slides.index(e)}},r.fn.cycle.log=function(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))},r.fn.cycle.version=function(){return"Cycle2: 2.1.6b"},r.fn.cycle.transitions={custom:{},none:{before:function(e,t,i,n){e.API.stackSlides(i,t,n),e.cssBefore={opacity:1,visibility:"visible",display:"block"}}},fade:{before:function(e,t,i,n){var s=e.API.getSlideOpts(e.nextSlide).slideCss||{};e.API.stackSlides(t,i,n),e.cssBefore=r.extend(s,{opacity:0,visibility:"visible",display:"block"}),e.animIn={opacity:1},e.animOut={opacity:0}}},fadeout:{before:function(e,t,i,n){var s=e.API.getSlideOpts(e.nextSlide).slideCss||{};e.API.stackSlides(t,i,n),e.cssBefore=r.extend(s,{opacity:1,visibility:"visible",display:"block"}),e.animOut={opacity:0}}},scrollHorz:{before:function(e,t,i,n){e.API.stackSlides(t,i,n);var s=e.container.css("overflow","hidden").width();e.cssBefore={left:n?s:-s,top:0,opacity:1,visibility:"visible",display:"block"},e.cssAfter={zIndex:e._maxZ-2,left:0},e.animIn={left:0},e.animOut={left:n?-s:s}}}},r.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow[data-cycle-auto-init!=false]",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:void 0,manualSpeed:void 0,manualTrump:!0,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3,updateView:0},r(document).ready(function(){r(r.fn.cycle.defaults.autoSelector).cycle()})}(jQuery),function(a){"use strict";function l(e,t){var i,n,s,o,c,l=t.autoHeight;if("container"==l)n=a(t.slides[t.currSlide]).outerHeight(),t.container.height(n);else if(t._autoHeightRatio)t.container.height(t.container.width()/t._autoHeightRatio);else if("calc"===l||"number"==a.type(l)&&0<=l){if((s="calc"===l?(o=0,c=-1,t.slides.each(function(e){var t=a(this).height();c=t.slides.length?0:l)==t._sentinelIndex)return;t._sentinelIndex=s,t._sentinel&&t._sentinel.remove(),(i=a(t.slides[s].cloneNode(!0))).removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel"),i.css({position:"static",visibility:"hidden",display:"block"}).prependTo(t.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active"),i.find("*").css("visibility","hidden"),t._sentinel=i}}function r(e,t,i,n,s){var o=a(n).outerHeight();t.container.animate({height:o},t.autoHeightSpeed,t.autoHeightEasing)}function d(e,t){t._autoHeightOnResize&&(a(window).off("resize orientationchange",t._autoHeightOnResize),t._autoHeightOnResize=null),t.container.off("cycle-slide-added cycle-slide-removed",l),t.container.off("cycle-destroyed",d),t.container.off("cycle-before",r),t._sentinel&&(t._sentinel.remove(),t._sentinel=null)}a.extend(a.fn.cycle.defaults,{autoHeight:0,autoHeightSpeed:250,autoHeightEasing:null}),a(document).on("cycle-initialized",function(e,t){var i,n=t.autoHeight,s=a.type(n),o=null;function c(){l(0,t)}"string"!==s&&"number"!==s||(t.container.on("cycle-slide-added cycle-slide-removed",l),t.container.on("cycle-destroyed",d),"container"==n?t.container.on("cycle-before",r):"string"===s&&/\d+\:\d+/.test(n)&&(i=(i=n.match(/(\d+)\:(\d+)/))[1]/i[2],t._autoHeightRatio=i),"number"!==s&&(t._autoHeightOnResize=function(){clearTimeout(o),o=setTimeout(c,50)},a(window).on("resize orientationchange",t._autoHeightOnResize)),setTimeout(c,30))})}(jQuery),function(o){"use strict";o.extend(o.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"
{{title}}
{{desc}}
",captionModule:"caption"}),o(document).on("cycle-update-view",function(e,i,n,s){"caption"===i.captionModule&&o.each(["caption","overlay"],function(){var e=n[this+"Template"],t=i.API.getComponent(this);t.length&&e?(t.html(i.API.tmpl(e,n,i,s)),t.show()):t.hide()})}),o(document).on("cycle-destroyed",function(e,t){o.each(["caption","overlay"],function(){var e=t[this+"Template"];t[this]&&e&&t.API.getComponent("caption").empty()})})}(jQuery),function(l){"use strict";var c=l.fn.cycle;l.fn.cycle=function(t){var i,n,s,o=l.makeArray(arguments);return"number"==l.type(t)?this.cycle("goto",t):"string"==l.type(t)?this.each(function(){var e;return i=t,void 0!==(s=l(this).data("cycle.opts"))?(i="goto"==i?"jump":i,n=s.API[i],l.isFunction(n)?((e=l.makeArray(o)).shift(),n.apply(s.API,e)):void c.log("unknown command: ",i)):void c.log('slideshow must be initialized before sending commands; "'+i+'" ignored')}):c.apply(this,arguments)},l.extend(l.fn.cycle,c),l.extend(c.API,{next:function(){var e,t=this.opts();t.busy&&!t.manualTrump||(e=t.reverse?-1:1,!1===t.allowWrap&&t.currSlide+e>=t.slideCount||(t.API.advanceSlide(e),t.API.trigger("cycle-next",[t]).log("cycle-next")))},prev:function(){var e,t=this.opts();t.busy&&!t.manualTrump||(e=t.reverse?1:-1,!1===t.allowWrap&&t.currSlide+e<0||(t.API.advanceSlide(e),t.API.trigger("cycle-prev",[t]).log("cycle-prev")))},destroy:function(){this.stop();var t=this.opts(),i=l.isFunction(l._data)?l._data:l.noop;clearTimeout(t.timeoutId),t.timeoutId=0,t.API.stop(),t.API.trigger("cycle-destroyed",[t]).log("cycle-destroyed"),t.container.removeData(),i(t.container[0],"parsedAttrs",!1),t.retainStylesOnDestroy||(t.container.removeAttr("style"),t.slides.removeAttr("style"),t.slides.removeClass(t.slideActiveClass)),t.slides.each(function(){var e=l(this);e.removeData(),e.removeClass(t.slideClass),i(this,"parsedAttrs",!1)})},jump:function(e,t){var i,n,s=this.opts();s.busy&&!s.manualTrump||(n=parseInt(e,10),isNaN(n)||n<0||n>=s.slides.length?s.API.log("goto: invalid slide index: "+n):n!=s.currSlide?(s.nextSlide=n,clearTimeout(s.timeoutId),s.timeoutId=0,s.API.log("goto: ",n," (zero-index)"),i=s.currSlide .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerEventBubble:void 0,pagerTemplate:""}),o(document).on("cycle-bootstrap",function(e,t,i){i.buildPagerLink=n}),o(document).on("cycle-slide-added",function(e,t,i,n){t.pager&&(t.API.buildPagerLink(t,i,n),t.API.page=s)}),o(document).on("cycle-slide-removed",function(e,t,i,n){t.pager&&t.API.getComponent("pager").each(function(){var e=o(this);o(e.children()[i]).remove()})}),o(document).on("cycle-update-view",function(e,t,i){t.pager&&t.API.getComponent("pager").each(function(){o(this).children().removeClass(t.pagerActiveClass).eq(t.currSlide).addClass(t.pagerActiveClass)})}),o(document).on("cycle-destroyed",function(e,t){var i=t.API.getComponent("pager");i&&(i.children().off(t.pagerEvent),t.pagerTemplate&&i.empty())})}(jQuery),function(e){"use strict";e.extend(e.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),e(document).on("cycle-initialized",function(e,t){var i,n;t.API.getComponent("next").on(t.nextEvent,function(e){e.preventDefault(),t.API.next()}),t.API.getComponent("prev").on(t.prevEvent,function(e){e.preventDefault(),t.API.prev()}),t.swipe&&(i=t.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",n=t.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle",t.container.on(i,function(e){t._tempFx=t.swipeFx,t.API.next()}),t.container.on(n,function(){t._tempFx=t.swipeFx,t.API.prev()}))}),e(document).on("cycle-update-view",function(e,t,i,n){var s,o,c,l,a;t.allowWrap||(s=t.disabledClass,o=t.API.getComponent("next"),c=t.API.getComponent("prev"),l=t._prevBoundry||0,a=void 0!==t._nextBoundry?t._nextBoundry:t.slideCount-1,t.currSlide==a?o.addClass(s).prop("disabled",!0):o.removeClass(s).prop("disabled",!1),t.currSlide===l?c.addClass(s).prop("disabled",!0):c.removeClass(s).prop("disabled",!1))}),e(document).on("cycle-destroyed",function(e,t){t.API.getComponent("prev").off(t.nextEvent),t.API.getComponent("next").off(t.prevEvent),t.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),function(r){"use strict";r.extend(r.fn.cycle.defaults,{progressive:!1}),r(document).on("cycle-pre-initialize",function(e,s){if(s.progressive){var o,t,i=s.API,n=i.next,c=i.prev,l=i.prepareTx,a=r.type(s.progressive);if("array"==a)o=s.progressive;else if(r.isFunction(s.progressive))o=s.progressive(s);else if("string"==a){if(t=r(s.progressive),!(o=t.html().trim()))return;if(/^(\[)/.test(o))try{o=r.parseJSON(o)}catch(e){return void i.log("error parsing progressive slides",e)}else(o=o.split(new RegExp(t.data("cycle-split")||"\n")))[o.length-1]||o.pop()}l&&(i.prepareTx=function(e,t){var i,n;e||0===o.length?l.apply(s.API,[e,t]):t&&s.currSlide==s.slideCount-1?(n=o[0],o=o.slice(1),s.container.one("cycle-slide-added",function(e,t){setTimeout(function(){t.API.advanceSlide(1)},50)}),s.API.add(n)):t||0!==s.currSlide?l.apply(s.API,[e,t]):(i=o.length-1,n=o[i],o=o.slice(0,i),s.container.one("cycle-slide-added",function(e,t){setTimeout(function(){t.currSlide=1,t.API.advanceSlide(-1)},50)}),s.API.add(n,!0))}),n&&(i.next=function(){var e,t=this.opts();o.length&&t.currSlide==t.slideCount-1?(e=o[0],o=o.slice(1),t.container.one("cycle-slide-added",function(e,t){n.apply(t.API),t.container.removeClass("cycle-loading")}),t.container.addClass("cycle-loading"),t.API.add(e)):n.apply(t.API)}),c&&(i.prev=function(){var e,t,i=this.opts();o.length&&0===i.currSlide?(e=o.length-1,t=o[e],o=o.slice(0,e),i.container.one("cycle-slide-added",function(e,t){t.currSlide=1,t.API.advanceSlide(-1),t.container.removeClass("cycle-loading")}),i.container.addClass("cycle-loading"),i.API.add(t,!0)):c.apply(i.API)})}})}(jQuery),function(a){"use strict";a.extend(a.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),a.extend(a.fn.cycle.API,{tmpl:function(e,t){var i=new RegExp(t.tmplRegex||a.fn.cycle.defaults.tmplRegex,"g"),l=a.makeArray(arguments);return l.shift(),e.replace(i,function(e,t){for(var i,n,s,o=t.split("."),c=0;c=t.slides.length||e<0)&&(e=0),t.currSlide=e,t.reverse?(t.nextSlide=e-1,t.nextSlide<0&&(t.nextSlide=t.slides.length-1)):(t.nextSlide=e+1,t.nextSlide==t.slides.length&&(t.nextSlide=0))},calcNextSlide:function(){var e,t=this.opts();t.reverse?(e=t.nextSlide-1<0,t.nextSlide=e?t.slideCount-1:t.nextSlide-1,t.currSlide=e?0:t.nextSlide+1):(e=t.nextSlide+1==t.slides.length,t.nextSlide=e?0:t.nextSlide+1,t.currSlide=e?t.slides.length-1:t.nextSlide-1)},calcTx:function(e,t){var i,e=e;return e._tempFx?i=a.fn.cycle.transitions[e._tempFx]:t&&e.manualFx&&(i=a.fn.cycle.transitions[e.manualFx]),i=i||a.fn.cycle.transitions[e.fx],e._tempFx=null,this.opts()._tempFx=null,i||(i=a.fn.cycle.transitions.fade,e.API.log('Transition "'+e.fx+'" not found. Using fade.')),i},prepareTx:function(e,t){var i,n,o,s,c=this.opts();c.slideCount<2?c.timeoutId=0:(!e||c.busy&&!c.manualTrump||(c.API.stopTransition(),c.busy=!1,clearTimeout(c.timeoutId),c.timeoutId=0),c.busy||0===c.timeoutId&&!e||(i=c.slides[c.currSlide],n=c.slides[c.nextSlide],o=c.API.getSlideOpts(c.nextSlide),s=c.API.calcTx(o,e),c._tx=s,e&&void 0!==o.manualSpeed&&(o.speed=o.manualSpeed),c.nextSlide!=c.currSlide&&(e||!c.paused&&!c.hoverPaused&&c.timeout)?(c.API.trigger("cycle-before",[o,i,n,t]),s.before&&s.before(o,i,n,t),e=function(){c.busy=!1,c.container.data("cycle.opts")&&(s.after&&s.after(o,i,n,t),c.API.trigger("cycle-after",[o,i,n,t]),c.API.queueTransition(o),c.API.updateView(!0))},c.busy=!0,s.transition?s.transition(o,i,n,t,e):c.API.doTransition(o,i,n,t,e),c.API.calcNextSlide(),c.API.updateView()):c.API.queueTransition(o)))},doTransition:function(e,t,i,n,o){function s(){r.animate(c.animIn||{opacity:1},c.speed,c.easeIn||c.easing,o)}var c=e,l=a(t),r=a(i);r.css(c.cssBefore||{}),l.animate(c.animOut||{},c.speed,c.easeOut||c.easing,function(){l.css(c.cssAfter||{}),c.sync||s()}),c.sync&&s()},queueTransition:function(e,t){var i=this.opts(),n=void 0!==t?t:e.timeout;return 0===i.nextSlide&&0==--i.loop?(i.API.log("terminating; loop=0"),i.timeout=0,n?setTimeout(function(){i.API.trigger("cycle-finished",[i])},n):i.API.trigger("cycle-finished",[i]),void(i.nextSlide=i.currSlide)):void 0!==i.continueAuto&&(!1===i.continueAuto||"function"===a.fn.cycle.varType(i.continueAuto)&&!1===i.continueAuto())?(i.API.log("terminating automatic transitions"),i.timeout=0,void(i.timeoutId&&clearTimeout(i.timeoutId))):void(n&&(i._lastQueue=a.now(),void 0===t&&(i._remainingTimeout=e.timeout),i.paused||i.hoverPaused||(i.timeoutId=setTimeout(function(){i.API.prepareTx(!1,!i.reverse)},n))))},stopTransition:function(){var e=this.opts();e.slides.filter(":animated").length&&(e.slides.stop(!1,!0),e.API.trigger("cycle-transition-stopped",[e])),e._tx&&e._tx.stopTransition&&e._tx.stopTransition(e)},advanceSlide:function(e){var t=this.opts();return clearTimeout(t.timeoutId),t.timeoutId=0,t.nextSlide=t.currSlide+e,t.nextSlide<0?t.nextSlide=t.slides.length-1:t.nextSlide>=t.slides.length&&(t.nextSlide=0),t.API.prepareTx(!0,0<=e),!1},buildSlideOpts:function(e){var t,i,n,o=this.opts(),s=e.data()||{};for(n in s)s.hasOwnProperty(n)&&/^cycle[A-Z]+/.test(n)&&(t=s[n],i=n.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,r),o.API.log("["+(o.slideCount-1)+"]",i+":",t,"("+typeof t+")"),s[i]=t);(s=a.extend({},a.fn.cycle.defaults,o,s)).slideNum=o.slideCount;try{delete s.API,delete s.slideCount,delete s.currSlide,delete s.nextSlide,delete s.slides}catch(e){}return s},getSlideOpts:function(e){var t=this.opts();void 0===e&&(e=t.currSlide);e=t.slides[e],e=a(e).data("cycle.opts");return a.extend({},t,e)},initSlide:function(e,t,i){var n=this.opts();t.css(e.slideCss||{}),0|\+|~]/.test(e)?t.container.find(e):a(e):e.jquery?e:a(e)},stackSlides:function(e,t,i){var n,o=this.opts();e||(e=o.slides[o.currSlide],t=o.slides[o.nextSlide],i=!o.reverse),a(e).css("zIndex",o.maxZ);var s=o.maxZ-2,c=o.slideCount;if(i){for(n=o.currSlide+1;no.currSlide;n--)a(o.slides[n]).css("zIndex",s--)}a(t).css("zIndex",o.maxZ-1)},getSlideIndex:function(e){return this.opts().slides.index(e)}},a.fn.cycle.log=function(){window.console&&console.log&&console.log("[cycle2] "+Array.prototype.join.call(arguments," "))},a.fn.cycle.version=function(){return"Cycle2: 2.1.6c"},a.fn.cycle.varType=function(e,t){if(t)return null===e?"[object Null]":Object.prototype.toString.call(e);if(null==e)return(e+"").toLowerCase();t=Object.prototype.toString.call(e).slice(8,-1).toLowerCase();return"generatorfunction"===t?"function":t.match(/^(array|bigint|date|error|function|generator|regexp|symbol)$/)?t:"object"==typeof e||"function"==typeof e?"object":typeof e},a.fn.cycle.transitions={custom:{},none:{before:function(e,t,i,n){e.API.stackSlides(i,t,n),e.cssBefore={opacity:1,visibility:"visible",display:"block"}}},fade:{before:function(e,t,i,n){var o=e.API.getSlideOpts(e.nextSlide).slideCss||{};e.API.stackSlides(t,i,n),e.cssBefore=a.extend(o,{opacity:0,visibility:"visible",display:"block"}),e.animIn={opacity:1},e.animOut={opacity:0}}},fadeout:{before:function(e,t,i,n){var o=e.API.getSlideOpts(e.nextSlide).slideCss||{};e.API.stackSlides(t,i,n),e.cssBefore=a.extend(o,{opacity:1,visibility:"visible",display:"block"}),e.animOut={opacity:0}}},scrollHorz:{before:function(e,t,i,n){e.API.stackSlides(t,i,n);i=e.container.css("overflow","hidden").width();e.cssBefore={left:n?i:-i,top:0,opacity:1,visibility:"visible",display:"block"},e.cssAfter={zIndex:e._maxZ-2,left:0},e.animIn={left:0},e.animOut={left:n?-i:i}}}},a.fn.cycle.defaults={allowWrap:!0,autoSelector:".cycle-slideshow[data-cycle-auto-init!=false]",delay:0,easing:null,fx:"fade",hideNonActive:!0,loop:0,manualFx:void 0,manualSpeed:void 0,manualTrump:!0,maxZ:100,pauseOnHover:!1,reverse:!1,slideActiveClass:"cycle-slide-active",slideClass:"cycle-slide",slideCss:{position:"absolute",top:0,left:0},slides:"> img",speed:500,startingSlide:0,sync:!0,timeout:4e3,updateView:0},a(document).ready(function(){a(a.fn.cycle.defaults.autoSelector).cycle()})}(jQuery),function(l){"use strict";function c(e,t){var i,n,o,s,c=t.autoHeight;"container"==c?(i=l(t.slides[t.currSlide]).outerHeight(),t.container.height(i)):t._autoHeightRatio?t.container.height(t.container.width()/t._autoHeightRatio):("calc"===c||"number"==l.fn.cycle.varType(c)&&0<=c)&&(n="calc"===c?(o=0,s=-1,t.slides.each(function(e){var t=l(this).height();s=t.slides.length?0:c)!=t._sentinelIndex&&(t._sentinelIndex=n,t._sentinel&&t._sentinel.remove(),(n=l(t.slides[n].cloneNode(!0))).removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel"),n.css({position:"static",visibility:"hidden",display:"block"}).prependTo(t.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active"),n.find("*").css("visibility","hidden"),t._sentinel=n)}function r(e,t,i,n,o){n=l(n).outerHeight();t.container.animate({height:n},t.autoHeightSpeed,t.autoHeightEasing)}function a(e,t){t._autoHeightOnResize&&(l(window).off("resize orientationchange",t._autoHeightOnResize),t._autoHeightOnResize=null),t.container.off("cycle-slide-added cycle-slide-removed",c),t.container.off("cycle-destroyed",a),t.container.off("cycle-before",r),t._sentinel&&(t._sentinel.remove(),t._sentinel=null)}l.extend(l.fn.cycle.defaults,{autoHeight:0,autoHeightSpeed:250,autoHeightEasing:null}),l(document).on("cycle-initialized",function(e,t){var i=t.autoHeight,n=l.fn.cycle.varType(i),o=null;function s(){c(0,t)}"string"!==n&&"number"!==n||(t.container.on("cycle-slide-added cycle-slide-removed",c),t.container.on("cycle-destroyed",a),"container"==i?t.container.on("cycle-before",r):"string"===n&&/\d+\:\d+/.test(i)&&(i=(i=i.match(/(\d+)\:(\d+)/))[1]/i[2],t._autoHeightRatio=i),"number"!==n&&(t._autoHeightOnResize=function(){clearTimeout(o),o=setTimeout(s,50)},l(window).on("resize orientationchange",t._autoHeightOnResize)),setTimeout(s,30))})}(jQuery),function(s){"use strict";s.extend(s.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"
{{title}}
{{desc}}
",captionModule:"caption"}),s(document).on("cycle-update-view",function(e,i,n,o){"caption"===i.captionModule&&s.each(["caption","overlay"],function(){var e=n[this+"Template"],t=i.API.getComponent(this);t.length&&e?(t.html(i.API.tmpl(e,n,i,o)),t.show()):t.hide()})}),s(document).on("cycle-destroyed",function(e,t){s.each(["caption","overlay"],function(){var e=t[this+"Template"];t[this]&&e&&t.API.getComponent("caption").empty()})})}(jQuery),function(l){"use strict";var c=l.fn.cycle;l.fn.cycle=function(t){var i,n,o,s=l.makeArray(arguments);return"number"==c.varType(t)?this.cycle("goto",t):"string"==c.varType(t)?this.each(function(){var e;if(i=t,void 0===(o=l(this).data("cycle.opts")))c.log('slideshow must be initialized before sending commands; "'+i+'" ignored');else{if(i="goto"==i?"jump":i,n=o.API[i],"function"===l.fn.cycle.varType(n))return(e=l.makeArray(s)).shift(),n.apply(o.API,e);c.log("unknown command: ",i)}}):c.apply(this,arguments)},l.extend(l.fn.cycle,c),l.extend(c.API,{next:function(){var e,t=this.opts();t.busy&&!t.manualTrump||(e=t.reverse?-1:1,!1===t.allowWrap&&t.currSlide+e>=t.slideCount||(t.API.advanceSlide(e),t.API.trigger("cycle-next",[t]).log("cycle-next")))},prev:function(){var e,t=this.opts();t.busy&&!t.manualTrump||(e=t.reverse?1:-1,!1===t.allowWrap&&t.currSlide+e<0||(t.API.advanceSlide(e),t.API.trigger("cycle-prev",[t]).log("cycle-prev")))},destroy:function(){this.stop();var t=this.opts(),i="function"===this.varType(l._data)?l._data:l.noop;clearTimeout(t.timeoutId),t.timeoutId=0,t.API.stop(),t.API.trigger("cycle-destroyed",[t]).log("cycle-destroyed"),t.container.removeData(),i(t.container[0],"parsedAttrs",!1),t.retainStylesOnDestroy||(t.container.removeAttr("style"),t.slides.removeAttr("style"),t.slides.removeClass(t.slideActiveClass)),t.slides.each(function(){var e=l(this);e.removeData(),e.removeClass(t.slideClass),i(this,"parsedAttrs",!1)})},jump:function(e,t){var i,n=this.opts();n.busy&&!n.manualTrump||(i=parseInt(e,10),isNaN(i)||i<0||i>=n.slides.length?n.API.log("goto: invalid slide index: "+i):i!=n.currSlide?(n.nextSlide=i,clearTimeout(n.timeoutId),n.timeoutId=0,n.API.log("goto: ",i," (zero-index)"),e=n.currSlide .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerEventBubble:void 0,pagerTemplate:""}),s(document).on("cycle-bootstrap",function(e,t,i){i.buildPagerLink=n}),s(document).on("cycle-slide-added",function(e,t,i,n){t.pager&&(t.API.buildPagerLink(t,i,n),t.API.page=o)}),s(document).on("cycle-slide-removed",function(e,t,i,n){t.pager&&t.API.getComponent("pager").each(function(){var e=s(this);s(e.children()[i]).remove()})}),s(document).on("cycle-update-view",function(e,t,i){t.pager&&t.API.getComponent("pager").each(function(){s(this).children().removeClass(t.pagerActiveClass).eq(t.currSlide).addClass(t.pagerActiveClass)})}),s(document).on("cycle-destroyed",function(e,t){var i=t.API.getComponent("pager");i&&(i.children().off(t.pagerEvent),t.pagerTemplate&&i.empty())})}(jQuery),function(e){"use strict";e.extend(e.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),e(document).on("cycle-initialized",function(e,t){var i,n;t.API.getComponent("next").on(t.nextEvent,function(e){e.preventDefault(),t.API.next()}),t.API.getComponent("prev").on(t.prevEvent,function(e){e.preventDefault(),t.API.prev()}),t.swipe&&(i=t.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",n=t.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle",t.container.on(i,function(e){t._tempFx=t.swipeFx,t.API.next()}),t.container.on(n,function(){t._tempFx=t.swipeFx,t.API.prev()}))}),e(document).on("cycle-update-view",function(e,t,i,n){var o,s,c,l,r;t.allowWrap||(o=t.disabledClass,s=t.API.getComponent("next"),c=t.API.getComponent("prev"),l=t._prevBoundry||0,r=void 0!==t._nextBoundry?t._nextBoundry:t.slideCount-1,t.currSlide==r?s.addClass(o).prop("disabled",!0):s.removeClass(o).prop("disabled",!1),t.currSlide===l?c.addClass(o).prop("disabled",!0):c.removeClass(o).prop("disabled",!1))}),e(document).on("cycle-destroyed",function(e,t){t.API.getComponent("prev").off(t.nextEvent),t.API.getComponent("next").off(t.prevEvent),t.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),function(r){"use strict";r.extend(r.fn.cycle.defaults,{progressive:!1}),r(document).on("cycle-pre-initialize",function(e,n){if(n.progressive){var o,t=n.API,i=t.next,s=t.prev,c=t.prepareTx,l=r.fn.cycle.varType(n.progressive);if("array"==l)o=n.progressive;else if("function"===r.fn.cycle.varType(n.progressive))o=n.progressive(n);else if("string"==l){if(l=r(n.progressive),!(o=l.html().trim()))return;if(/^(\[)/.test(o))try{o=r.parseJSON(o)}catch(e){return void t.log("error parsing progressive slides",e)}else(o=o.split(new RegExp(l.data("cycle-split")||"\n")))[o.length-1]||o.pop()}c&&(t.prepareTx=function(e,t){var i;e||0===o.length?c.apply(n.API,[e,t]):t&&n.currSlide==n.slideCount-1?(i=o[0],o=o.slice(1),n.container.one("cycle-slide-added",function(e,t){setTimeout(function(){t.API.advanceSlide(1)},50)}),n.API.add(i)):t||0!==n.currSlide?c.apply(n.API,[e,t]):(t=o.length-1,i=o[t],o=o.slice(0,t),n.container.one("cycle-slide-added",function(e,t){setTimeout(function(){t.currSlide=1,t.API.advanceSlide(-1)},50)}),n.API.add(i,!0))}),i&&(t.next=function(){var e,t=this.opts();o.length&&t.currSlide==t.slideCount-1?(e=o[0],o=o.slice(1),t.container.one("cycle-slide-added",function(e,t){i.apply(t.API),t.container.removeClass("cycle-loading")}),t.container.addClass("cycle-loading"),t.API.add(e)):i.apply(t.API)}),s&&(t.prev=function(){var e,t,i=this.opts();o.length&&0===i.currSlide?(e=o.length-1,t=o[e],o=o.slice(0,e),i.container.one("cycle-slide-added",function(e,t){t.currSlide=1,t.API.advanceSlide(-1),t.container.removeClass("cycle-loading")}),i.container.addClass("cycle-loading"),i.API.add(t,!0)):s.apply(i.API)})}})}(jQuery),function(r){"use strict";r.extend(r.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),r.extend(r.fn.cycle.API,{tmpl:function(e,t){var t=new RegExp(t.tmplRegex||r.fn.cycle.defaults.tmplRegex,"g"),l=r.makeArray(arguments);return l.shift(),e.replace(t,function(e,t){for(var i,n,o,s=t.split("."),c=0;ci.slideCount-i.carouselVisible||(i.API.advanceSlide(e),i.API.trigger("cycle-next",[i]).log("cycle-next"))})}),p.fn.cycle.transitions.carousel={preInit:function(e){e.hideNonActive=!1,e.container.on("cycle-destroyed",p.proxy(this.onDestroy,e.API)),e.API.stopTransition=this.stopTransition;for(var i=0;ie.slideCount&&(e.carouselVisible=e.slideCount-1);var o=e.carouselVisible||e.slides.length,n={display:r?"block":"inline-block",position:"static"};if(e.container.css({position:"relative",overflow:"hidden"}),e.slides.css(n),e._currSlide=e.currSlide,t=p('').prependTo(e.container).css({margin:0,padding:0,top:0,left:0,position:"absolute"}).append(e.slides),e._carouselWrap=t,r||t.css("white-space","nowrap"),!1!==e.allowWrap){for(s=0;s<(void 0===e.carouselVisible?2:1);s++){for(i=0;in&&o==n?a=0:0n?a=e.nextSlide-o-(e.nextSlide-n):a<0&&e.currSlide>n&&e.nextSlide>n?a=0:a<0&&e.currSlide>n?a+=e.currSlide-n:o=e.currSlide,r=this.getScroll(e,d,o,a),e.API.opts()._currSlide=e.nextSlide>n?n:e.nextSlide):(!l||0!==e.nextSlide)&&(l||e.nextSlide!=e.slideCount-1)?r=this.getScroll(e,d,e.currSlide,a):(r=this.getDim(e,e.currSlide,d),t=this.genCallback(e,l,d,t)),c[d?"top":"left"]=l?"-="+r:"+="+r,e.throttleSpeed&&(u=r/p(e.slides[0])[d?"height":"width"]()*e.speed),e._carouselWrap.animate(c,u,e.easing,t)},getDim:function(e,i,s){return p(e.slides[i])[s?"outerHeight":"outerWidth"](!0)},getScroll:function(e,i,s,l){var t,r=0;if(0i.slideCount-i.carouselVisible||(i.API.advanceSlide(e),i.API.trigger("cycle-next",[i]).log("cycle-next"))})}),u.fn.cycle.transitions.carousel={preInit:function(e){e.hideNonActive=!1,e.container.on("cycle-destroyed",u.proxy(this.onDestroy,e.API)),e.API.stopTransition=this.stopTransition;for(var i=0;ie.slideCount&&(e.carouselVisible=e.slideCount-1);var r=e.carouselVisible||e.slides.length,o={display:t?"block":"inline-block",position:"static"};if(e.container.css({position:"relative",overflow:"hidden"}),e.slides.css(o),e._currSlide=e.currSlide,l=u('').prependTo(e.container).css({margin:0,padding:0,top:0,left:0,position:"absolute"}).append(e.slides),e._carouselWrap=l,t||l.css("white-space","nowrap"),!1!==e.allowWrap){for(s=0;s<(void 0===e.carouselVisible?2:1);s++){for(i=0;io&&r==o?c=0:0o?c=e.nextSlide-r-(e.nextSlide-o):c<0&&e.currSlide>o&&e.nextSlide>o?c=0:c<0&&e.currSlide>o?c+=e.currSlide-o:r=e.currSlide,r=this.getScroll(e,a,r,c),e.API.opts()._currSlide=e.nextSlide>o?o:e.nextSlide):(!l||0!==e.nextSlide)&&(l||e.nextSlide!=e.slideCount-1)?r=this.getScroll(e,a,e.currSlide,c):(r=this.getDim(e,e.currSlide,a),t=this.genCallback(e,l,a,t)),n[a?"top":"left"]=l?"-="+r:"+="+r,e.throttleSpeed&&(d=r/u(e.slides[0])[a?"height":"width"]()*e.speed),e._carouselWrap.animate(n,d,e.easing,t)},getDim:function(e,i,s){return u(e.slides[i])[s?"outerHeight":"outerWidth"](!0)},getScroll:function(e,i,s,l){var t,r=0;if(0e.nextSlide;f--)d(e.slides[f]).css("zIndex",n++);d(i).css("zIndex",e.maxZ),d(s).css("zIndex",e.maxZ-1)}}}}(jQuery); \ No newline at end of file diff --git a/build/plugin/jquery.cycle2.swipe.min.js b/build/plugin/jquery.cycle2.swipe.min.js index ce13214..699afc2 100644 --- a/build/plugin/jquery.cycle2.swipe.min.js +++ b/build/plugin/jquery.cycle2.swipe.min.js @@ -1,3 +1,3 @@ -/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20200917 */ +/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20210125 */ -!function(r){"use strict";0 in document;r.event.special.swipe=r.event.special.swipe||{scrollSupressionThreshold:10,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var n=r(this);n.bind("touchstart",function(e){var t,i=e.originalEvent.touches?e.originalEvent.touches[0]:e,s={time:(new Date).getTime(),coords:[i.pageX,i.pageY],origin:r(e.target)};function o(e){var i;s&&(i=e.originalEvent.touches?e.originalEvent.touches[0]:e,t={time:(new Date).getTime(),coords:[i.pageX,i.pageY]},Math.abs(s.coords[0]-t.coords[0])>r.event.special.swipe.scrollSupressionThreshold&&e.preventDefault())}n.bind("touchmove",o).one("touchend",function(e){n.unbind("touchmove",o),s&&t&&t.time-s.timer.event.special.swipe.horizontalDistanceThreshold&&Math.abs(s.coords[1]-t.coords[1])t.coords[0]?"swipeleft":"swiperight"),s=t=void 0})})}},r.event.special.swipeleft=r.event.special.swipeleft||{setup:function(){r(this).bind("swipe",r.noop)}},r.event.special.swiperight=r.event.special.swiperight||r.event.special.swipeleft}(jQuery); \ No newline at end of file +!function(r){"use strict";0 in document,r.event.special.swipe=r.event.special.swipe||{scrollSupressionThreshold:10,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var n=r(this);n.bind("touchstart",function(e){var t,i=e.originalEvent.touches?e.originalEvent.touches[0]:e,s={time:(new Date).getTime(),coords:[i.pageX,i.pageY],origin:r(e.target)};function o(e){var i;s&&(i=e.originalEvent.touches?e.originalEvent.touches[0]:e,t={time:(new Date).getTime(),coords:[i.pageX,i.pageY]},Math.abs(s.coords[0]-t.coords[0])>r.event.special.swipe.scrollSupressionThreshold&&e.preventDefault())}n.bind("touchmove",o).one("touchend",function(e){n.unbind("touchmove",o),s&&t&&t.time-s.timer.event.special.swipe.horizontalDistanceThreshold&&Math.abs(s.coords[1]-t.coords[1])t.coords[0]?"swipeleft":"swiperight"),s=t=void 0})})}},r.event.special.swipeleft=r.event.special.swipeleft||{setup:function(){r(this).bind("swipe",r.noop)}},r.event.special.swiperight=r.event.special.swiperight||r.event.special.swipeleft}(jQuery); \ No newline at end of file diff --git a/build/plugin/jquery.cycle2.tile.min.js b/build/plugin/jquery.cycle2.tile.min.js index f39b2cc..c6d1181 100644 --- a/build/plugin/jquery.cycle2.tile.min.js +++ b/build/plugin/jquery.cycle2.tile.min.js @@ -1,3 +1,3 @@ -/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20200917 */ +/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20210125 */ -!function(w){"use strict";w.fn.cycle.transitions.tileSlide=w.fn.cycle.transitions.tileBlind={before:function(i,e,t,n){i.API.stackSlides(e,t,n),w(e).css({display:"block",visibility:"visible"}),i.container.css("overflow","hidden"),i.tileDelay=i.tileDelay||"tileSlide"==i.fx?100:125,i.tileCount=i.tileCount||7,i.tileVertical=!1!==i.tileVertical,i.container.data("cycleTileInitialized")||(i.container.on("cycle-destroyed",w.proxy(this.onDestroy,i.API)),i.container.data("cycleTileInitialized",!0))},transition:function(t,i,e,n,l){t.slides.not(i).not(e).css("visibility","hidden");var o,s,a,c,d,r=w(),f=w(i),y=w(e),p=t.tileCount,v=t.tileVertical,h=t.container.height(),b=t.container.width();v?(c=b-(s=Math.floor(b/p))*(p-1),a=d=h):(s=c=b,d=h-(a=Math.floor(h/p))*(p-1)),t.container.find(".cycle-tiles-container").remove();var u={left:0,top:0,overflow:"hidden",position:"absolute",margin:0,padding:0},g=v?"tileSlide"==t.fx?{top:h}:{width:0}:"tileSlide"==t.fx?{left:b}:{height:0},m=w('
');m.css({zIndex:f.css("z-index"),overflow:"visible",position:"absolute",top:0,left:0,direction:"ltr"}),m.insertBefore(e);for(var k=0;k").css(u).css({width:p-1===k?c:s,height:p-1===k?d:a,marginLeft:v?k*s:0,marginTop:v?0:k*a}).append(f.clone().css({position:"relative",maxWidth:"none",width:f.width(),margin:0,padding:0,marginLeft:v?-k*s:0,marginTop:v?0:-k*a})),r=r.add(o);m.append(r),f.css("visibility","hidden"),y.css({opacity:1,display:"block",visibility:"visible"}),function i(e){r.eq(e).animate(g,{duration:t.speed,easing:t.easing,complete:function(){(n?p-1===e:0===e)&&t._tileAniCallback()}});setTimeout(function(){(n?p-1!==e:0!==e)&&i(n?e+1:e-1)},t.tileDelay)}(n?0:p-1),t._tileAniCallback=function(){y.css({display:"block",visibility:"visible"}),f.css("visibility","hidden"),m.remove(),l()}},stopTransition:function(i){i.container.find("*").stop(!0,!0),i._tileAniCallback&&i._tileAniCallback()},onDestroy:function(i){this.opts().container.find(".cycle-tiles-container").remove()}}}(jQuery); \ No newline at end of file +!function(k){"use strict";k.fn.cycle.transitions.tileSlide=k.fn.cycle.transitions.tileBlind={before:function(i,e,t,n){i.API.stackSlides(e,t,n),k(e).css({display:"block",visibility:"visible"}),i.container.css("overflow","hidden"),i.tileDelay=i.tileDelay||"tileSlide"==i.fx?100:125,i.tileCount=i.tileCount||7,i.tileVertical=!1!==i.tileVertical,i.container.data("cycleTileInitialized")||(i.container.on("cycle-destroyed",k.proxy(this.onDestroy,i.API)),i.container.data("cycleTileInitialized",!0))},transition:function(t,i,e,n,l){t.slides.not(i).not(e).css("visibility","hidden");var o,s,a,c,d,r=k(),f=k(i),y=k(e),p=t.tileCount,v=t.tileVertical,h=t.container.height(),i=t.container.width();v?(c=i-(s=Math.floor(i/p))*(p-1),a=d=h):(s=c=i,d=h-(a=Math.floor(h/p))*(p-1)),t.container.find(".cycle-tiles-container").remove();var b={left:0,top:0,overflow:"hidden",position:"absolute",margin:0,padding:0},u=v?"tileSlide"==t.fx?{top:h}:{width:0}:"tileSlide"==t.fx?{left:i}:{height:0},g=k('
');g.css({zIndex:f.css("z-index"),overflow:"visible",position:"absolute",top:0,left:0,direction:"ltr"}),g.insertBefore(e);for(var m=0;m").css(b).css({width:p-1===m?c:s,height:p-1===m?d:a,marginLeft:v?m*s:0,marginTop:v?0:m*a}).append(f.clone().css({position:"relative",maxWidth:"none",width:f.width(),margin:0,padding:0,marginLeft:v?-m*s:0,marginTop:v?0:-m*a})),r=r.add(o);g.append(r),f.css("visibility","hidden"),y.css({opacity:1,display:"block",visibility:"visible"}),function i(e){r.eq(e).animate(u,{duration:t.speed,easing:t.easing,complete:function(){(n?p-1===e:0===e)&&t._tileAniCallback()}});setTimeout(function(){(n?p-1!==e:0!==e)&&i(n?e+1:e-1)},t.tileDelay)}(n?0:p-1),t._tileAniCallback=function(){y.css({display:"block",visibility:"visible"}),f.css("visibility","hidden"),g.remove(),l()}},stopTransition:function(i){i.container.find("*").stop(!0,!0),i._tileAniCallback&&i._tileAniCallback()},onDestroy:function(i){this.opts().container.find(".cycle-tiles-container").remove()}}}(jQuery); \ No newline at end of file diff --git a/build/plugin/jquery.cycle2.video.min.js b/build/plugin/jquery.cycle2.video.min.js index bc069ca..e2faca6 100644 --- a/build/plugin/jquery.cycle2.video.min.js +++ b/build/plugin/jquery.cycle2.video.min.js @@ -1,3 +1,3 @@ -/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20200917 */ +/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20210125 */ -!function(u){"use strict";function l(){try{this.playVideo()}catch(e){}}function a(){try{this.pauseVideo()}catch(e){}}u.extend(u.fn.cycle.defaults,{youtubeAllowFullScreen:!0,youtubeAutostart:!1,youtubeAutostop:!0}),u(document).on("cycle-bootstrap",function(e,o){o.youtube&&(o.hideNonActive=!1,o.container.find(o.slides).each(function(e){var t,a,l,c;void 0!==u(this).attr("href")&&(l=(a=u(this)).attr("href"),c=o.youtubeAllowFullScreen?"true":"false",l+=(/\?/.test(l)?"&":"?")+"enablejsapi=1",o.youtubeAutostart&&o.startingSlide===e&&(l+="&autoplay=1"),t=o.API.tmpl('
',{url:l,allowFullScreen:c}),a.replaceWith(t))}),o.slides=o.slides.replace(/(\b>?a\b)/,"div.cycle-youtube"),o.youtubeAutostart&&o.container.on("cycle-initialized cycle-after",function(e,t){var a="cycle-initialized"==e.type?t.currSlide:t.nextSlide;u(t.slides[a]).find("object,embed").each(l)}),o.youtubeAutostop&&o.container.on("cycle-before",function(e,t){u(t.slides[t.currSlide]).find("object,embed").each(a)}))})}(jQuery); \ No newline at end of file +!function(o){"use strict";function a(){try{this.playVideo()}catch(e){}}function l(){try{this.pauseVideo()}catch(e){}}o.extend(o.fn.cycle.defaults,{youtubeAllowFullScreen:!0,youtubeAutostart:!1,youtubeAutostop:!0}),o(document).on("cycle-bootstrap",function(e,c){c.youtube&&(c.hideNonActive=!1,c.container.find(c.slides).each(function(e){var t,a,l;void 0!==o(this).attr("href")&&(a=(t=o(this)).attr("href"),l=c.youtubeAllowFullScreen?"true":"false",a+=(/\?/.test(a)?"&":"?")+"enablejsapi=1",c.youtubeAutostart&&c.startingSlide===e&&(a+="&autoplay=1"),l=c.API.tmpl('
',{url:a,allowFullScreen:l}),t.replaceWith(l))}),c.slides=c.slides.replace(/(\b>?a\b)/,"div.cycle-youtube"),c.youtubeAutostart&&c.container.on("cycle-initialized cycle-after",function(e,t){e="cycle-initialized"==e.type?t.currSlide:t.nextSlide;o(t.slides[e]).find("object,embed").each(a)}),c.youtubeAutostop&&c.container.on("cycle-before",function(e,t){o(t.slides[t.currSlide]).find("object,embed").each(l)}))})}(jQuery); \ No newline at end of file diff --git a/build/tcycle/jquery.tcycle.min.js b/build/tcycle/jquery.tcycle.min.js index d7924a2..bac0472 100644 --- a/build/tcycle/jquery.tcycle.min.js +++ b/build/tcycle/jquery.tcycle.min.js @@ -1,3 +1,3 @@ -/* tCycle; (c) 2012 M. Alsup; MIT/GPL; v20200917 */ +/* tCycle; (c) 2012 M. Alsup; MIT/GPL; v20210125 */ -!function(p){"use strict";p.fn.tcycle=function(){return this.each(function(){var n=0,c=p(this),o=c.children(),e=p.extend({speed:500,timeout:4e3},c.data()),l="scroll"!=e.fx,d=o.length,t=c.width(),f=e.speed,i=e.timeout,s={overflow:"hidden"},u="position",a=function(){setTimeout(r,i)},h=p.extend({position:"absolute",top:0},l?{left:0}:{left:t},e.scss);function r(){var e=n==d-1?0:n+1,t=c.width(),i=p(o[n]),s=p(o[e]);l?(i.fadeOut(f),s.fadeIn(f,a)):(i.animate({left:-t},f,function(){i.hide()}),s.css({left:t,display:"block"}).animate({left:0},f,a)),n=n==d-1?0:n+1}"static"==c.css(u)&&(s[u]="relative"),c.prepend(p(o[0]).clone().css("visibility","hidden")).css(s),o.css(h),l?o.hide().eq(0).show():o.eq(0).css("left",0),setTimeout(r,i)})},p(function(){p(".tcycle").tcycle()})}(jQuery); \ No newline at end of file +!function(r){"use strict";r.fn.tcycle=function(){return this.each(function(){var s=0,n=r(this),c=n.children(),e=r.extend({speed:500,timeout:4e3},n.data()),o="scroll"!=e.fx,l=c.length,t=n.width(),d=e.speed,i=e.timeout,f={overflow:"hidden"},u="position",a=function(){setTimeout(h,i)},e=r.extend({position:"absolute",top:0},o?{left:0}:{left:t},e.scss);function h(){var e=s==l-1?0:s+1,t=n.width(),i=r(c[s]),e=r(c[e]);o?(i.fadeOut(d),e.fadeIn(d,a)):(i.animate({left:-t},d,function(){i.hide()}),e.css({left:t,display:"block"}).animate({left:0},d,a)),s=s==l-1?0:s+1}"static"==n.css(u)&&(f[u]="relative"),n.prepend(r(c[0]).clone().css("visibility","hidden")).css(f),c.css(e),o?c.hide().eq(0).show():c.eq(0).css("left",0),setTimeout(h,i)})},r(function(){r(".tcycle").tcycle()})}(jQuery); \ No newline at end of file diff --git a/cycle2.jquery.json b/cycle2.jquery.json index dfff968..da440bf 100644 --- a/cycle2.jquery.json +++ b/cycle2.jquery.json @@ -7,7 +7,7 @@ "carousel", "slider" ], - "version": "2.1.6b", + "version": "2.1.6c", "author": { "name": "M. Alsup", "url": "http://jquery.malsup.com" diff --git a/package.json b/package.json index c28eb8c..961033c 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "jquery-cycle2", - "version": "2.1.6b", + "version": "2.1.6c", "homepage": "http://jquery.malsup.com/cycle2", "engines": { "node": ">= 0.6.0" }, "dependencies": { - "jquery": ">=1.7" + "jquery": ">=2.24" }, "devDependencies": { "grunt": "^1.0.4", diff --git a/src/jquery.cycle2.autoheight.js b/src/jquery.cycle2.autoheight.js index 56cb209..b642adb 100644 --- a/src/jquery.cycle2.autoheight.js +++ b/src/jquery.cycle2.autoheight.js @@ -10,7 +10,7 @@ $.extend($.fn.cycle.defaults, { $(document).on( 'cycle-initialized', function( e, opts ) { var autoHeight = opts.autoHeight; - var t = $.type( autoHeight ); + var t = $.fn.cycle.varType( autoHeight ); var resizeThrottle = null; var ratio; @@ -61,7 +61,7 @@ function initAutoHeight( e, opts ) { else if ( opts._autoHeightRatio ) { opts.container.height( opts.container.width() / opts._autoHeightRatio ); } - else if ( autoHeight === 'calc' || ( $.type( autoHeight ) == 'number' && autoHeight >= 0 ) ) { + else if ( autoHeight === 'calc' || ( $.fn.cycle.varType( autoHeight ) == 'number' && autoHeight >= 0 ) ) { if ( autoHeight === 'calc' ) sentinelIndex = calcSentinelIndex( e, opts ); else if ( autoHeight >= opts.slides.length ) diff --git a/src/jquery.cycle2.command.js b/src/jquery.cycle2.command.js index 5fb2a89..f7ebb41 100644 --- a/src/jquery.cycle2.command.js +++ b/src/jquery.cycle2.command.js @@ -8,11 +8,11 @@ $.fn.cycle = function( options ) { var cmd, cmdFn, opts; var args = $.makeArray( arguments ); - if ( $.type( options ) == 'number' ) { + if ( c2.varType( options ) == 'number' ) { return this.cycle( 'goto', options ); } - if ( $.type( options ) == 'string' ) { + if ( c2.varType( options ) == 'string' ) { return this.each(function() { var cmdArgs; cmd = options; @@ -25,7 +25,7 @@ $.fn.cycle = function( options ) { else { cmd = cmd == 'goto' ? 'jump' : cmd; // issue #3; change 'goto' to 'jump' internally cmdFn = opts.API[ cmd ]; - if ( $.isFunction( cmdFn )) { + if ( $.fn.cycle.varType( cmdFn )==='function') { cmdArgs = $.makeArray( args ); cmdArgs.shift(); return cmdFn.apply( opts.API, cmdArgs ); @@ -74,7 +74,7 @@ $.extend( c2.API, { this.stop(); //#204 var opts = this.opts(); - var clean = $.isFunction( $._data ) ? $._data : $.noop; // hack for #184 and #201 + var clean = (this.varType( $._data ) ==='function') ? $._data : $.noop; // hack for #184 and #201 clearTimeout(opts.timeoutId); opts.timeoutId = 0; opts.API.stop(); diff --git a/src/jquery.cycle2.core.js b/src/jquery.cycle2.core.js index 8f6a6bc..01873e5 100755 --- a/src/jquery.cycle2.core.js +++ b/src/jquery.cycle2.core.js @@ -2,7 +2,7 @@ ;(function($) { "use strict"; -var version = '2.1.6b'; +var version = '2.1.6c'; $.fn.cycle = function( options ) { // fix mistakes with the ready state @@ -107,7 +107,7 @@ $.fn.cycle.API = { var opts = this.opts(); opts.API.trigger('cycle-pre-initialize', [ opts ]); var tx = $.fn.cycle.transitions[opts.fx]; - if (tx && $.isFunction(tx.preInit)) + if (tx && $.fn.cycle.varType(tx.preInit) ==='function') tx.preInit( opts ); opts._preInitialized = true; }, @@ -116,7 +116,7 @@ $.fn.cycle.API = { var opts = this.opts(); opts.API.trigger('cycle-post-initialize', [ opts ]); var tx = $.fn.cycle.transitions[opts.fx]; - if (tx && $.isFunction(tx.postInit)) + if (tx && $.fn.cycle.varType(tx.postInit) ==='function') tx.postInit( opts ); }, @@ -212,7 +212,7 @@ $.fn.cycle.API = { var startSlideshow = false; var len; - if ( $.type(slides) == 'string') + if ( $.fn.cycle.varType(slides) == 'string') // FIX: $.trim DEPRECATED in JQUERY 3.5+ // slides = $.trim( slides ); @@ -432,7 +432,7 @@ $.fn.cycle.API = { } if ( opts.continueAuto !== undefined ) { if ( opts.continueAuto === false || - ($.isFunction(opts.continueAuto) && opts.continueAuto() === false )) { + ($.fn.cycle.varType(opts.continueAuto) ==='function' && opts.continueAuto() === false )) { opts.API.log('terminating automatic transitions'); opts.timeout = 0; if ( opts.timeoutId ) @@ -628,12 +628,35 @@ $.fn.cycle.log = function log() { $.fn.cycle.version = function() { return 'Cycle2: ' + version; }; +$.fn.cycle.varType = function(obj, fullClass) { + + // get toPrototypeString() of obj (handles all types) + // Early JS environments return '[object Object]' for null, so it's best to directly check for it. + if (fullClass) { + return (obj === null) ? '[object Null]' : Object.prototype.toString.call(obj); + } + if (obj == null) { return (obj + '').toLowerCase(); } // implicit toString() conversion + + var deepType = Object.prototype.toString.call(obj).slice(8,-1).toLowerCase(); + if (deepType === 'generatorfunction') { return 'function'; } + + // Prevent overspecificity (for example, [object HTMLDivElement], etc). + // Account for functionish Regexp (Android <=2.3), functionish element (Chrome <=57, Firefox <=52), etc. + // String.prototype.match is universally supported. + + return deepType.match(/^(array|bigint|date|error|function|generator|regexp|symbol)$/) ? deepType : + (typeof obj === 'object' || typeof obj === 'function') ? 'object' : typeof obj; +}; + // helper functions function lowerCase(s) { return (s || '').toLowerCase(); } + + + // expose transition object $.fn.cycle.transitions = { custom: { diff --git a/src/jquery.cycle2.loader.js b/src/jquery.cycle2.loader.js index 489d88e..7d5cdeb 100644 --- a/src/jquery.cycle2.loader.js +++ b/src/jquery.cycle2.loader.js @@ -18,14 +18,14 @@ $(document).on( 'cycle-bootstrap', function( e, opts ) { function add( slides, prepend ) { var slideArr = []; - if ( $.type( slides ) == 'string' ) + if ( $.fn.cycle.varType( slides ) == 'string' ) // FIX: $.trim DEPRECATED in JQUERY 3.5+ // slides = $.trim( slides ); slides = slides.trim(); - else if ( $.type( slides) === 'array' ) { + else if ( $.fn.cycle.varType( slides) === 'array' ) { for (var i=0; i < slides.length; i++ ) slides[i] = $(slides[i])[0]; } diff --git a/src/jquery.cycle2.progressive.js b/src/jquery.cycle2.progressive.js index 6cb9eda..aba588b 100644 --- a/src/jquery.cycle2.progressive.js +++ b/src/jquery.cycle2.progressive.js @@ -14,13 +14,13 @@ $(document).on( 'cycle-pre-initialize', function( e, opts ) { var nextFn = API.next; var prevFn = API.prev; var prepareTxFn = API.prepareTx; - var type = $.type( opts.progressive ); + var type = $.fn.cycle.varType( opts.progressive ); var slides, scriptEl; if ( type == 'array' ) { slides = opts.progressive; } - else if ($.isFunction( opts.progressive ) ) { + else if ($.fn.cycle.varType( opts.progressive ) === 'function' ) { slides = opts.progressive( opts ); } else if ( type == 'string' ) { diff --git a/src/jquery.cycle2.tmpl.js b/src/jquery.cycle2.tmpl.js index 4e1baa3..84be568 100644 --- a/src/jquery.cycle2.tmpl.js +++ b/src/jquery.cycle2.tmpl.js @@ -27,7 +27,7 @@ $.extend($.fn.cycle.API, { prop = obj[str]; } - if ($.isFunction(prop)) + if ($.fn.cycle.varType(prop) ==='function') return prop.apply(obj, args); if (prop !== undefined && prop !== null && prop != str) return prop;