PageSourceSearch

https://connectmebetter.com/assets/connectmebetter.com/wp-content/…/assets/lib/vegas/vegas-59493daa95.js

js connectmebetter.com collected 2026-10-08 16:31:47 UTC 25,197 bytes, 780 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opener = _____WB$wombat$assign$function_____("opener");
10/*!-----------------------------------------------------------------------------
11 * Vegas - Fullscreen Backgrounds and Slideshows.
12 * v2.4.0 - built 2017-01-04
13 * Licensed under the MIT License.
14 * https://vegas.jaysalvat.com/
15 * ----------------------------------------------------------------------------
16 * Copyright (C) 2010-2017 Jay Salvat
17 * https://jaysalvat.com/
18 * --------------------------------------------------------------------------*/
19
20(function ($) {
21    'use strict';
22
23    var defaults = {
24        slide:                   0,
25        delay:                   5000,
26        loop:                    true,
27        preload:                 false,
28        preloadImage:            false,
29        preloadVideo:            false,
30        timer:                   true,
31        overlay:                 false,
32        autoplay:                true,
33        shuffle:                 false,
34        cover:                   true,
35        color:                   null,
36        align:                   'center',
37        valign:                  'center',
38        firstTransition:         null,
39        firstTransitionDuration: null,
40        transition:              'fade',
41        transitionDuration:      1000,
42        transitionRegister:      [],
43        animation:               null,
44        animationDuration:       'auto',
45        animationRegister:       [],
46        slidesToKeep:            1,
47        init:  function () {},
48        play:  function () {},
49        pause: function () {},
50        walk:  function () {},
51        slides: [
52            // {
53            //  src:                null,
54            //  color:              null,
55            //  delay:              null,
56            //  align:              null,
57            //  valign:             null,
58            //  transition:         null,
59            //  transitionDuration: null,
60            //  animation:          null,
61            //  animationDuration:  null,
62            //  cover:              true,
63            //  video: {
64            //      src: [],
65            //      mute: true,
66            //      loop: true
67            // }
68            // ...
69        ]
70    };
71
72    var videoCache = {};
73
74    var Vegas = function (elmt, options) {
75        this.elmt         = elmt;
76        this.settings     = $.extend({}, defaults, $.vegas.defaults, options);
77        this.slide        = this.settings.slide;
78        this.total        = this.settings.slides.length;
79        this.noshow       = this.total < 2;
80        this.paused       = !this.settings.autoplay || this.noshow;
81        this.ended        = false;
82        this.$elmt        = $(elmt);
83        this.$timer       = null;
84        this.$overlay     = null;
85        this.$slide       = null;
86        this.timeout      = null;
87        this.first        = true;
88
89        this.transitions = [
90            'fade', 'fade2',
91            'blur', 'blur2',
92            'flash', 'flash2',
93            'negative', 'negative2',
94            'burn', 'burn2',
95            'slideLeft', 'slideLeft2',
96            'slideRight', 'slideRight2',
97            'slideUp', 'slideUp2',
98            'slideDown', 'slideDown2',
99            'zoomIn', 'zoomIn2',
100            'zoomOut', 'zoomOut2',
101            'swirlLeft', 'swirlLeft2',
102            'swirlRight', 'swirlRight2'
103        ];
104
105        this.animations = [
106            'kenburns',
107            'kenburnsLeft', 'kenburnsRight',
108            'kenburnsUp', 'kenburnsUpLeft', 'kenburnsUpRight',
109            'kenburnsDown', 'kenburnsDownLeft', 'kenburnsDownRight'
110        ];
111
112        if (this.settings.transitionRegister instanceof Array === false) {
113            this.settings.transitionRegister = [ this.settings.transitionRegister ];
114        }
115
116        if (this.settings.animationRegister instanceof Array === false) {
117            this.settings.animationRegister = [ this.settings.animationRegister ];
118        }
119
120        this.transitions = this.transitions.concat(this.settings.transitionRegister);
121        this.animations  = this.animations.concat(this.settings.animationRegister);
122
123        this.support = {
124            objectFit:  'objectFit'  in document.body.style,
125            transition: 'transition' in document.body.style || 'WebkitTransition' in document.body.style,
126            video:      $.vegas.isVideoCompatible()
127        };
128
129        if (this.settings.shuffle === true) {
130            this.shuffle();
131        }
132
133        this._init();
134    };
135
136    Vegas.prototype = {
137        _init: function () {
138            var $wrapper,
139                $overlay,
140                $timer,
141                isBody  = this.elmt.tagName === 'BODY',
142                timer   = this.settings.timer,
143                overlay = this.settings.overlay,
144                self    = this;
145
146            // Preloading
147            this._preload();
148
149            // Wrapper with content
150            if (!isBody) {
151                this.$elmt.css('height', this.$elmt.css('height'));
152
153                $wrapper = $('<div class="vegas-wrapper">')
154                    .css('overflow', this.$elmt.css('overflow'))
155                    .css('padding',  this.$elmt.css('padding'));
156
157                // Some browsers don't compute padding shorthand
158                if (!this.$elmt.css('padding')) {
159                    $wrapper
160                        .css('padding-top',    this.$elmt.css('padding-top'))
161                        .css('padding-bottom', this.$elmt.css('padding-bottom'))
162                        .css('padding-left',   this.$elmt.css('padding-left'))
163                        .css('padding-right',  this.$elmt.css('padding-right'));
164                }
165
166                this.$elmt.clone(true).children().appendTo($wrapper);
167                this.elmt.innerHTML = '';
168            }
169
170            // Timer
171            if (timer && this.support.transition) {
172                $timer = $('<div class="vegas-timer"><div class="vegas-timer-progress">');
173                this.$timer = $timer;
174                this.$elmt.prepend($timer);
175            }
176
177            // Overlay
178            if (overlay) {
179                $overlay = $('<div class="vegas-overlay">');
180
181                if (typeof overlay === 'string') {
182                    $overlay.css('background-image', 'url(' + overlay + ')');
183                }
184
185                this.$overlay = $overlay;
186                this.$elmt.prepend($overlay);
187            }
188
189            // Container
190            this.$elmt.addClass('vegas-container');
191
192            if (!isBody) {
193                this.$elmt.append($wrapper);
194            }
195
196            setTimeout(function () {
197                self.trigger('init');
198                self._goto(self.slide);
199
200                if (self.settings.autoplay) {
201                    self.trigger('play');
202                }
203            }, 1);
204        },
205
206        _preload: function () {
207            var img, i;
208
209            for (i = 0; i < this.settings.slides.length; i++) {
210                if (this.settings.preload || this.settings.preloadImages) {
211                    if (this.settings.slides[i].src) {
212                        img = new Image();
213                        img.src = this.settings.slides[i].src;
214                    }
215                }
216
217                if (this.settings.preload || this.settings.preloadVideos) {
218                    if (this.support.video && this.settings.slides[i].video) {
219                        if (this.settings.slides[i].video instanceof Array) {
220                            this._video(this.settings.slides[i].video);
221                        } else {
222                            this._video(this.settings.slides[i].video.src);
223                        }
224                    }
225                }
226            }
227        },
228
229        _random: function (array) {
230            return array[Math.floor(Math.random() * array.length)];
231        },
232
233        _slideShow: function () {
234            var self = this;
235
236            if (this.total > 1 && !this.ended && !this.paused && !this.noshow) {
237                this.timeout = setTimeout(function () {
238                    self.next();
239                }, this._options('delay'));
240            }
241        },
242
243        _timer: function (state) {
244            var self = this;
245
246            clearTimeout(this.timeout);
247
248            if (!this.$timer) {
249                return;
250            }
251
252            this.$timer
253                .removeClass('vegas-timer-running')
254                    .find('div')
255                        .css('transition-duration', '0ms');
256
257            if (this.ended || this.paused || this.noshow) {
258                return;
259            }
260
261            if (state) {
262                setTimeout(function () {
263                   self.$timer
264                    .addClass('vegas-timer-running')
265                        .find('div')
266                            .css('transition-duration', self._options('delay') - 100 + 'ms');
267                }, 100);
268            }
269        },
270
271        _video: function (srcs) {
272            var video,
273                source,
274                cacheKey = srcs.toString();
275
276            if (videoCache[cacheKey]) {
277                return videoCache[cacheKey];
278            }
279
280            if (srcs instanceof Array === false) {
281                srcs = [ srcs ];
282            }
283
284            video = document.createElement('video');
285            video.preload = true;
286
287            srcs.forEach(function (src) {
288                source = document.createElement('source');
289                source.src = src;
290                video.appendChild(source);
291            });
292
293            videoCache[cacheKey] = video;
294
295            return video;
296        },
297
298        _fadeOutSound: function (video, duration) {
299            var self   = this,
300                delay  = duration / 10,
301                volume = video.volume - 0.09;
302
303            if (volume > 0) {
304                video.volume = volume;
305
306                setTimeout(function () {
307                    self._fadeOutSound(video, duration);
308                }, delay);
309            } else {
310                video.pause();
311            }
312        },
313
314        _fadeInSound: function (video, duration) {
315            var self   = this,
316                delay  = duration / 10,
317                volume = video.volume + 0.09;
318
319            if (volume < 1) {
320                video.volume = volume;
321
322                setTimeout(function () {
323                    self._fadeInSound(video, duration);
324                }, delay);
325            }
326        },
327
328        _options: function (key, i) {
329            if (i === undefined) {
330                i = this.slide;
331            }
332
333            if (this.settings.slides[i][key] !== undefined) {
334                return this.settings.slides[i][key];
335            }
336
337            return this.settings[key];
338        },
339
340        _goto: function (nb) {
341            if (typeof this.settings.slides[nb] === 'undefined') {
342                nb = 0;
343            }
344
345            this.slide = nb;
346
347            var $slide,
348                $inner,
349                $video,
350                $slides       = this.$elmt.children('.vegas-slide'),
351                src           = this.settings.slides[nb].src,
352                videoSettings = this.settings.slides[nb].video,
353                delay         = this._options('delay'),
354                align         = this._options('align'),
355                valign        = this._options('valign'),
356                cover         = this._options('cover'),
357                color         = this._options('color') || this.$elmt.css('background-color'),
358                self          = this,
359                total         = $slides.length,
360                video,
361                img;
362
363            var transition         = this._options('transition'),
364                transitionDuration = this._options('transitionDuration'),
365                animation          = this._options('animation'),
366                animationDuration  = this._options('animationDuration');
367
368            if (this.settings.firstTransition && this.first) {
369                transition = this.settings.firstTransition || transition;
370            }
371
372            if (this.settings.firstTransitionDuration && this.first) {
373                transitionDuration = this.settings.firstTransitionDuration || transitionDuration;
374            }
375
376            if (this.first) {
377                this.first = false;
378            }
379
380            if (cover !== 'repeat') {
381                if (cover === true) {
382                    cover = 'cover';
383                } else if (cover === false) {
384                    cover = 'contain';
385                }
386            }
387
388            if (transition === 'random' || transition instanceof Array) {
389                if (transition instanceof Array) {
390                    transition = this._random(transition);
391                } else {
392                    transition = this._random(this.transitions);
393                }
394            }
395
396            if (animation === 'random' || animation instanceof Array) {
397                if (animation instanceof Array) {
398                    animation = this._random(animation);
399                } else {
400                    animation = this._random(this.animations);
401                }
402            }
403
404            if (transitionDuration === 'auto' || transitionDuration > delay) {
405                transitionDuration = delay;
406            }
407
408            if (animationDuration === 'auto') {
409                animationDuration = delay;
410            }
411
412            $slide = $('<div class="vegas-slide"></div>');
413
414            if (this.support.transition && transition) {
415                $slide.addClass('vegas-transition-' + transition);
416            }
417
418            // Video
419
420            if (this.support.video && videoSettings) {
421                if (videoSettings instanceof Array) {
422                    video = this._video(videoSettings);
423                } else {
424                    video = this._video(videoSettings.src);
425                }
426
427                video.loop  = videoSettings.loop !== undefined ? videoSettings.loop : true;
428                video.muted = videoSettings.mute !== undefined ? videoSettings.mute : true;
429
430                if (video.muted === false) {
431                    video.volume = 0;
432                    this._fadeInSound(video, transitionDuration);
433                } else {
434                    video.pause();
435                }
436
437                $video = $(video)
438                    .addClass('vegas-video')
439                    .css('background-color', color);
440
441                if (this.support.objectFit) {
442                    $video
443                        .css('object-position', align + ' ' + valign)
444                        .css('object-fit', cover)
445                        .css('width',  '100%')
446                        .css('height', '100%');
447                } else if (cover === 'contain') {
448                    $video
449                        .css('width',  '100%')
450                        .css('height', '100%');
451                }
452
453                $slide.append($video);
454
455            // Image
456
457            } else {
458                img = new Image();
459
460                $inner = $('<div class="vegas-slide-inner"></div>')
461                    .css('background-image',    'url("' + src + '")')
462                    .css('background-color',    color)
463                    .css('background-position', align + ' ' + valign);
464
465                if (cover === 'repeat') {
466                    $inner.css('background-repeat', 'repeat');
467                } else {
468                    $inner.css('background-size', cover);
469                }
470
471                if (this.support.transition && animation) {
472                    $inner
473                        .addClass('vegas-animation-' + animation)
474                        .css('animation-duration',  animationDuration + 'ms');
475                }
476
477                $slide.append($inner);
478            }
479
480            if (!this.support.transition) {
481                $slide.css('display', 'none');
482            }
483
484            if (total) {
485                $slides.eq(total - 1).after($slide);
486            } else {
487                this.$elmt.prepend($slide);
488            }
489
490            $slides
491                .css('transition', 'all 0ms')
492                .each(function () {
493                    this.className  = 'vegas-slide';
494
495                    if (this.tagName === 'VIDEO') {
496                        this.className += ' vegas-video';    
497                    }
498
499                    if (transition) {
500                        this.className += ' vegas-transition-' + transition;
501                        this.className += ' vegas-transition-' + transition + '-in';
502                    }
503                }
504            );
505
506            self._timer(false);
507
508            function go () {
509                self._timer(true);
510
511                setTimeout(function () {
512                    if (transition) {
513                        if (self.support.transition) {
514                            $slides
515                                .css('transition', 'all ' + transitionDuration + 'ms')
516                                .addClass('vegas-transition-' + transition + '-out');
517
518                            $slides.each(function () {
519                                var video = $slides.find('video').get(0);
520
521                                if (video) {
522                                    video.volume = 1;
523                                    self._fadeOutSound(video, transitionDuration);
524                                }
525                            });
526
527                            $slide
528                                .css('transition', 'all ' + transitionDuration + 'ms')
529                                .addClass('vegas-transition-' + transition + '-in');
530                        } else {
531                            $slide.fadeIn(transitionDuration);
532                        }
533                    }
534
535                    for (var i = 0; i < $slides.length - self.settings.slidesToKeep; i++) {
536                         $slides.eq(i).remove();
537                    }
538
539                    self.trigger('walk');
540                    self._slideShow();
541                }, 100);
542            }
543            if (video) {
544                if (video.readyState === 4) {
545                    video.currentTime = 0;
546                }
547
548                video.play();
549                go();
550            } else {
551                img.src = src;
552
553                if (img.complete) {
554                    go();
555                } else {
556                    img.onload = go;
557                }
558            }
559        },
560
561        _end: function () {
562            this.ended = true;
563            this._timer(false);
564            this.trigger('end');
565        },
566
567        shuffle: function () {
568            var temp,
569                rand;
570
571            for (var i = this.total - 1; i > 0; i--) {
572                rand = Math.floor(Math.random() * (i + 1));
573                temp = this.settings.slides[i];
574
575                this.settings.slides[i] = this.settings.slides[rand];
576                this.settings.slides[rand] = temp;
577            }
578        },
579
580        play: function () {
581            if (this.paused) {
582                this.paused = false;
583                this.next();
584                this.trigger('play');
585            }
586        },
587
588        pause: function () {
589            this._timer(false);
590            this.paused = true;
591            this.trigger('pause');
592        },
593
594        toggle: function () {
595            if (this.paused) {
596                this.play();
597            } else {
598                this.pause();
599            }
600        },
601
602        playing: function () {
603            return !this.paused && !this.noshow;
604        },
605
606        current: function (advanced) {
607            if (advanced) {
608                return {
609                    slide: this.slide,
610                    data:  this.settings.slides[this.slide]
611                };
612            }
613            return this.slide;
614        },
615
616        jump: function (nb) {
617            if (nb < 0 || nb > this.total - 1 || nb === this.slide) {
618                return;
619            }
620
621            this.slide = nb;
622            this._goto(this.slide);
623        },
624
625        next: function () {
626            this.slide++;
627
628            if (this.slide >= this.total) {
629                if (!this.settings.loop) {
630                    return this._end();
631                }
632
633                this.slide = 0;
634            }
635
636            this._goto(this.slide);
637        },
638
639        previous: function () {
640            this.slide--;
641
642            if (this.slide < 0) {
643                if (!this.settings.loop) {
644                    this.slide++;
645                    return;
646                } else {
647                    this.slide = this.total - 1;
648                }
649            }
650
651            this._goto(this.slide);
652        },
653
654        trigger: function (fn) {
655            var params = [];
656
657            if (fn === 'init') {
658                params = [ this.settings ];
659            } else {
660                params = [
661                    this.slide,
662                    this.settings.slides[this.slide]
663                ];
664            }
665
666            this.$elmt.trigger('vegas' + fn, params);
667
668            if (typeof this.settings[fn] === 'function') {
669                this.settings[fn].apply(this.$elmt, params);
670            }
671        },
672
673        options: function (key, value) {
674            var oldSlides = this.settings.slides.slice();
675
676            if (typeof key === 'object') {
677                this.settings = $.extend({}, defaults, $.vegas.defaults, key);
678            } else if (typeof key === 'string') {
679                if (value === undefined) {
680                    return this.settings[key];
681                }
682                this.settings[key] = value;
683            } else {
684                return this.settings;
685            }
686
687            // In case slides have changed
688            if (this.settings.slides !== oldSlides) {
689                this.total  = this.settings.slides.length;
690                this.noshow = this.total < 2;
691                this._preload();
692            }
693        },
694
695        destroy: function () {
696            clearTimeout(this.timeout);
697
698            this.$elmt.removeClass('vegas-container');
699            this.$elmt.find('> .vegas-slide').remove();
700            this.$elmt.find('> .vegas-wrapper').clone(true).children().appendTo(this.$elmt);
701            this.$elmt.find('> .vegas-wrapper').remove();
702
703            if (this.settings.timer) {
704                this.$timer.remove();
705            }
706
707            if (this.settings.overlay) {
708                this.$overlay.remove();
709            }
710
711            this.elmt._vegas = null;
712        }
713    };
714
715    $.fn.vegas = function(options) {
716        var args = arguments,
717            error = false,
718            returns;
719
720        if (options === undefined || typeof options === 'object') {
721            return this.each(function () {
722                if (!this._vegas) {
723                    this._vegas = new Vegas(this, options);
724                }
725            });
726        } else if (typeof options === 'string') {
727            this.each(function () {
728                var instance = this._vegas;
729
730                if (!instance) {
731                    throw new Error('No Vegas applied to this element.');
732                }
733
734                if (typeof instance[options] === 'function' && options[0] !== '_') {
735                    returns = instance[options].apply(instance, [].slice.call(args, 1));
736                } else {
737                    error = true;
738                }
739            });
740
741            if (error) {
742                throw new Error('No method "' + options + '" in Vegas.');
743            }
744
745            return returns !== undefined ? returns : this;
746        }
747    };
748
749    $.vegas = {};
750    $.vegas.defaults = defaults;
751
752    $.vegas.isVideoCompatible = function () {
753        return !/(Android|webOS|Phone|iPad|iPod|BlackBerry|Windows Phone)/i.test(navigator.userAgent);
754    };
755
756})(window.jQuery || window.Zepto);
757
758}
759
760/*
761     FILE ARCHIVED ON 06:38:44 Jul 11, 2025 AND RETRIEVED FROM THE
762     INTERNET ARCHIVE ON 09:04:42 Aug 06, 2026.
763     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
764
765     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
766     SECTION 108(a)(3)).
767*/
768/*
769playback timings (ms):
770  captures_list: 0.992
771  exclusion.robots: 0.164
772  exclusion.robots.policy: 0.148
773  esindex: 0.015
774  cdx.remote: 12.435
775  LoadShardBlock: 175.592 (3)
776  PetaboxLoader3.datanode: 145.489 (5)
777  PetaboxLoader3.resolve: 109.248 (2)
778  load_resource: 220.389
779  loaddict: 100.094
780*/

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.