/*!----------------------------------------------------------------------------- * Vegas - Fullscreen Backgrounds and Slideshows. * v2.6.0 - built 2024-07-30 * Licensed under the MIT License. * http://vegas.jaysalvat.com/ * ---------------------------------------------------------------------------- * Copyright (C) 2010-2024 Jay Salvat * http://jaysalvat.com/ * --------------------------------------------------------------------------*/ !function(y){"use strict";function t(t,s){this.elmt=t,this.settings=y.extend({},e,y.vegas.defaults,s),this.slide=this.settings.slide,this.total=this.settings.slides.length,this.noshow=this.total<2,this.paused=!this.settings.autoplay||this.noshow,this.ended=!1,this.$elmt=y(t),this.$timer=null,this.$overlay=null,this.$slide=null,this.timeout=null,this.first=!0,this.instance=i++,this.transitions=["fade","fade2","blur","blur2","flash","flash2","negative","negative2","burn","burn2","slideLeft","slideLeft2","slideRight","slideRight2","slideUp","slideUp2","slideDown","slideDown2","zoomIn","zoomIn2","zoomOut","zoomOut2","swirlLeft","swirlLeft2","swirlRight","swirlRight2"],this.animations=["kenburns","kenburnsLeft","kenburnsRight","kenburnsUp","kenburnsUpLeft","kenburnsUpRight","kenburnsDown","kenburnsDownLeft","kenburnsDownRight"],this.settings.transitionRegister instanceof Array||(this.settings.transitionRegister=[this.settings.transitionRegister]),this.settings.animationRegister instanceof Array||(this.settings.animationRegister=[this.settings.animationRegister]),this.transitions=this.transitions.concat(this.settings.transitionRegister),this.animations=this.animations.concat(this.settings.animationRegister),this.support={objectFit:"objectFit"in document.body.style,transition:"transition"in document.body.style||"WebkitTransition"in document.body.style},!0===this.settings.shuffle&&this.shuffle(),this._init()}var e={slide:0,delay:5e3,loop:!0,preload:!1,preloadImage:!1,preloadVideo:!1,timer:!0,overlay:!1,autoplay:!0,shuffle:!1,cover:!0,color:null,align:"center",valign:"center",firstTransition:null,firstTransitionDuration:null,transition:"fade",transitionDuration:1e3,transitionRegister:[],animation:null,animationDuration:"auto",animationRegister:[],slidesToKeep:1,init:function(){},play:function(){},pause:function(){},walk:function(){},slides:[]},n={},i=0;t.prototype={_init:function(){var t,s,i="BODY"===this.elmt.tagName,e=this.settings.timer,n=this.settings.overlay,o=this;this._preload(),i||(s=y('
'),t=y('
').css("overflow",this.$elmt.css("overflow")).css("padding",this.$elmt.css("padding")),this.$elmt.css("padding")||t.css("padding-top",this.$elmt.css("padding-top")).css("padding-bottom",this.$elmt.css("padding-bottom")).css("padding-left",this.$elmt.css("padding-left")).css("padding-right",this.$elmt.css("padding-right")),this.$elmt.css("padding",0),this.$elmt.clone(!0).children().appendTo(t),this.elmt.innerHTML=""),e&&this.support.transition&&(e=y('
'),this.$timer=e,this.$elmt.prepend(e)),n&&(e=y('
'),"string"==typeof n&&e.css("background-image","url("+n+")"),this.$overlay=e,this.$elmt.prepend(e)),this.$elmt.addClass("vegas-container"),i||(this.$elmt.append(s),s.append(t)),setTimeout(function(){o.trigger("init"),o._goto(o.slide),o.settings.autoplay&&o.trigger("play")},1)},_preload:function(){for(var t=0;t
'),this.support.transition&&c&&s.addClass("vegas-transition-"+c),t?((i=t instanceof Array?this._video(t):this._video(t.src)).loop=void 0===t.loop||t.loop,i.muted=void 0===t.muted||t.muted,!1===i.muted?(i.volume=0,this._fadeInSound(i,p)):i.pause(),a=y(i).addClass("vegas-video").css("background-color",d),this.support.objectFit?a.css("object-position",r+" "+h).css("object-fit",l).css("width","100%").css("height","100%"):"contain"===l&&a.css("width","100%").css("height","100%"),s.append(a)):(e=new Image,t=y('
').css("background-image",'url("'+o+'")').css("background-color",d).css("background-position",r+" "+h),"repeat"===l?t.css("background-repeat","repeat"):t.css("background-size",l),this.support.transition&&m&&t.addClass("vegas-animation-"+m).css("animation-duration",f+"ms"),s.append(t)),this.support.transition||s.css("display","none"),u?n.eq(u-1).after(s):this.$elmt.prepend(s),n.css("transition","all 0ms").each(function(){this.className="vegas-slide","VIDEO"===this.tagName&&(this.className+=" vegas-video"),c&&(this.className+=" vegas-transition-"+c,this.className+=" vegas-transition-"+c+"-in")}),g._timer(!1),i?(4===i.readyState&&(i.currentTime=0),i.play(),v()):(e.src=o,e.complete?v():e.onload=v)},_end:function(){this.ended=!this.settings.autoplay,this._timer(!1),this.trigger("end")},shuffle:function(){for(var t,s,i=this.total-1;0this.total-1||t===this.slide||(this.slide=t,this._goto(this.slide))},next:function(){if(this.slide++,this.slide>=this.total){if(!this.settings.loop)return this._end();this.slide=0}this._goto(this.slide)},previous:function(){if(this.slide--,this.slide<0){if(!this.settings.loop)return void this.slide++;this.slide=this.total-1}this._goto(this.slide)},trigger:function(t){var s=[],s="init"===t?[this.settings]:[this.slide,this.settings.slides[this.slide]];this.$elmt.trigger("vegas"+t,s),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,s)},options:function(t,s){var i=this.settings.slides.slice();if("object"==typeof t)this.settings=y.extend({},e,y.vegas.defaults,t);else{if("string"!=typeof t)return this.settings;if(void 0===s)return this.settings[t];this.settings[t]=s}this.settings.slides!==i&&(this.total=this.settings.slides.length,this.noshow=this.total<2,this._preload())},destroy:function(){clearTimeout(this.timeout),this.$elmt.removeClass("vegas-container"),this.$elmt.find("> .vegas-slide").remove(),this.$elmt.find("> .vegas-wrapper").clone(!0).children().appendTo(this.$elmt),this.$elmt.find("> .vegas-wrapper").remove(),this.settings.timer&&this.$timer.remove(),this.settings.overlay&&this.$overlay.remove(),this.elmt._vegas=null}},y.fn.vegas=function(s){var i,e=arguments,n=!1;if(void 0===s||"object"==typeof s)return this.each(function(){this._vegas||(this._vegas=new t(this,s))});if("string"==typeof s){if(this.each(function(){var t=this._vegas;if(!t)throw new Error("No Vegas applied to this element.");"function"==typeof t[s]&&"_"!==s[0]?i=t[s].apply(t,[].slice.call(e,1)):n=!0}),n)throw new Error('No method "'+s+'" in Vegas.');return void 0!==i?i:this}},y.vegas={},y.vegas.defaults=e,y.vegas.isVideoCompatible=function(){return!0}}(window.jQuery||window.Zepto||window.m4q); //# sourceMappingURL=vegas.min.js.map