vendor: 9,565 bytes, lines 1-41
1/*! WOW - v1.1.3 - 2016-05-06 2* Copyright (c) 2016 Matthieu Aussaguel;*/(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a,b){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),null!=a.scrollContainer&&(this.config.scrollContainer=document.querySelector(a.scrollContainer)),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(b){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this); 3if (!Element.prototype.matches) { 4 Element.prototype.matches = 5 Element.prototype.msMatchesSelector || 6 Element.prototype.webkitMatchesSelector; 7} 8 9if (!Element.prototype.closest) { 10 Element.prototype.closest = function(s) { 11 var el = this; 12 13 do { 14 if (Element.prototype.matches.call(el, s)) return el; 15 el = el.parentElement || el.parentNode; 16 } while (el !== null && el.nodeType === 1); 17 return null; 18 }; 19} 20 21 22(function() { 23 const body = document.querySelector("body"), 24 main_container = body.querySelector("#mainContainer"); 25 26 function _scrolled(event) { 27 if (document.viewport.getScrollOffsets().top >= 10) { 28 main_container.classList.add("scrolled"); 29 } else { 30 main_container.classList.remove("scrolled"); 31 } 32 } 33 document.addEventListener("scroll", _scrolled); 34 document.addEventListener("DOMContentLoaded", _scrolled); 35 36 var navigation = (function () { 37 const html = document.querySelector("html"); 38 var logo = document.getElementById("logo") 39 var el = main_container.querySelector("#navigation"); 40 var button = main_container.querySelector("#primary").querySelector("#menu"); 41 var navOpen = false;
42 var open = function () { 43 body.classList.add("navActive"); 44 el.classList.add("active"); 45 button.classList.add("active"); 46 logo.classList.add("shrink"); 47 navOpen = true; 48 }; 49 var close = function () { 50 el.classList.remove("active"); 51 button.classList.remove("active"); 52 logo.classList.remove("shrink"); 53 body.classList.remove("navActive"); 54 navOpen = false; 55 }; 56 var events = (function () { 57 /* button.addEventListener("click", event => { 58 navOpen == false ? open() : close(); 59 }); */ 60 button.addEventListener("click", (event) => { 61 html.classList.toggle("mobile_open"); 62 }); 63 document.addEventListener("keyup", (event) => { 64 if (event.key == "Escape") { 65 html.classList.remove("mobile_open") 66 } 67 }, 68 false, 69 ); 70 71 })(); 72 return { 73 open: open, 74 close: close, 75 }; 76 })(); 77 78 // Need this, but need to non-Prototype it 79 main_container.querySelectorAll("li .subnavOpen").forEach(o => { 80 o.addEventListener("click", event => { 81 event.preventDefault() 82 83 const li = event.target.closest("li") 84 const subnavMaskElement = li.querySelector(".subnavMask") 85 let subnavMask = subnavMaskElement.offsetHeight 86 87 if (subnavMask == 0) { 88 subnavMaskElement.style.height = `${li.querySelector("ul").offsetHeight}px` 89 li.querySelector(".subnavOpen").classList.add("active"); 90 91 } else { 92 subnavMaskElement.style.height = "0px" 93 li.querySelector(".subnavOpen").classList.remove("active"); 94 } 95 96 }) 97 }) 98}()); 99 100window.perpetuaWowLoader = (_element, _class, _delay) => { 101 _element.classList.add("wow", _class) 102 103 if (!!_delay) _element.dataset.wowDelay = _delay 104} 105 106(() => { 107 function lazyLoad() { 108 const lazyloadElements = document.querySelectorAll(".lazy") 109 110 if ("IntersectionObserver" in window) { 111 const _observerOptions = { 112 rootMargin: "2000px 0px 0px 2000px" 113 } 114 const lazyObserver = new IntersectionObserver(function(entries, observer) { 115 entries.forEach(function(entry) { 116 if (entry.isIntersecting) { 117 const element = entry.target; 118 119 if (element.tagName == "VIDEO") { 120 element.querySelectorAll("source").forEach(s => { 121 if (s.dataset.src) { 122 s.src = s.dataset.src 123 } 124 }) 125 element.load() 126 } else if (element.dataset.hasOwnProperty("src")) { 127 element.src = element.dataset.src 128 } else if (element.dataset.hasOwnProperty("href")) { 129 element.href = element.dataset.href 130 } 131 132 element.classList.remove("lazy") 133 // element.dataset.delete("observing") 134 lazyObserver.unobserve(element) 135 } 136 }); 137 }, _observerOptions); 138 139 lazyloadElements.forEach(element => { 140 // if (!element.dataset.hasOwnProperty("observing")) { 141 // element.dataset.observing = ""; 142 // lazyObserver.observe(element); 143 // } 144 lazyObserver.observe(element); 145 }); 146 147 } else { 148 var lazyloadThrottleTimeout; 149 150 function lazyload () { 151 if(lazyloadThrottleTimeout) { 152 clearTimeout(lazyloadThrottleTimeout); 153 } 154 155 lazyloadThrottleTimeout = setTimeout(function() { 156 var scrollTop = window.pageYOffset; 157 lazyloadImages.forEach(function(img) { 158 if(img.offsetTop < (window.innerHeight + scrollTop)) { 159 img.src = img.dataset.src; 160 img.classList.remove('lazy'); 161 } 162 }); 163 if(lazyloadImages.length == 0) { 164 document.removeEventListener("scroll", lazyload); 165 window.removeEventListener("resize", lazyload); 166 window.removeEventListener("orientationChange", lazyload); 167 } 168 }, 20); 169 } 170 171 document.addEventListener("scroll", lazyload); 172 window.addEventListener("resize", lazyload); 173 window.addEventListener("orientationChange", lazyload); 174 } 175 } 176 177 function modals() { 178 const body = document.querySelector("body") 179 const mainContainer = document.getElementById("mainContainer") 180 const modalContainer = document.getElementById("modalContainer") 181 182 if (modalContainer) { 183 const modalBody = modalContainer.querySelector(".modalBody") 184 185 function _showModal(element) { 186 if (!!element) { 187 modalBody.innerHTML = element.innerHTML 188 modalContainer.dataset.modal = element.dataset.modal 189 modalBody.classList.add(element.dataset.modal) 190 body.classList.add("modalActive") 191 } 192 } 193 194 function _hideModal() { 195 body.classList.remove("modalActive") 196 197 setTimeout(() => { 198 modalBody.classList.remove(modalContainer.dataset.modal) 199 modalBody.innerHTML = "" 200 modalContainer.dataset.modal = "" 201 }, 300); 202 } 203 204 modalContainer.addEventListener("click", event => { 205 const element = event.target.closest(".modalClose") 206 207 if (!!element || !event.target.closest(".modalWindow")) { 208 _hideModal() 209 } 210 }) 211 212 document.addEventListener("keyup", (event) => { 213 if (event.key == "Escape") { 214 _hideModal() 215 } 216 }, 217 false, 218 ); 219 220 mainContainer.addEventListener("click", event => {
221 const element = event.target.closest(".modalLauncher") 222 const modalTemplate = document.getElementById(element?.dataset.modal) || document.querySelector(`[data-modal="${element?.dataset.modal}"]`) 223 224 if (element?.classList.contains(element.dataset.modal)) { 225 event.preventDefault() 226 _showModal(element) 227 } else if (modalTemplate) { 228 event.preventDefault() 229 _showModal(modalTemplate) 230 } 231 }) 232 233 if (body.classList.contains("old_redirect")) { 234 const element = document.getElementById("old_redirect") 235 _showModal(element) 236 237 } else if (body.classList.contains("pc_popup")) { 238 const element = document.getElementById("pc_popup") 239 _showModal(element) 240 } 241 } 242 } 243 244 function dividers() { 245 const section_observer = new IntersectionObserver((entries, observer) => { 246 entries.forEach(entry => { 247 if (entry.isIntersecting) { 248 entry.target.classList.add("inView"); 249 } 250 }); 251 }, { threshold: 0.5 }) 252 253 document.querySelectorAll("[class*='divider-'], .divider, .delayed").forEach(marker => { 254 section_observer.observe(marker) 255 }) 256 } 257 258 function arrowButtonText() { 259 function getAllTextNodes(element) { 260 return Array.from(element.childNodes) 261 .filter(node => node.nodeType === 3 && node.textContent.trim().length > 1); 262 } 263 264 document.querySelectorAll('.btn').forEach(element => { 265 const textNodes = getAllTextNodes(element); 266 267 textNodes.forEach(node => { 268 const span = document.createElement('span'); 269 node.after(span); 270 span.appendChild(node); 271 }); 272 }) 273 } 274 275 276 277 function init() { 278 lazyLoad() 279 modals() 280 dividers() 281 arrowButtonText() 282 } 283 284 document.addEventListener("DOMContentLoaded", init); 285})() 286 287if (!perpetuacms) { 288 var perpetuacms = {}; 289} 290 291perpetuacms.parallax = (() => { 292 const body = $$("body")[0]; 293 294 let container = $("mainContainer"); 295 let parallax_elements = []; 296 let parallax_elements_bg = []; 297 298 let scrolled = document.viewport.getScrollOffsets().top; 299 300 const checkContainer = _container => typeof _container !== "undefined" && _container !== null; 301 302 const init = (_container, _options) => { 303 if (checkContainer(_container)) container = $(_container); 304 305 getParallax(); 306 calculate(); 307 } 308 309 const getParallax = () => { 310 if (!checkContainer(container)) return false; 311 312 let _parallax_elements = container.select(".parallax"); 313 let _parallax_elements_bg = container.select(".parallax_bg"); 314 315 if (document.viewport.getWidth() > 768) { 316 body.addClassName("parallaxing"); 317 parallax_elements = _parallax_elements; 318 parallax_elements_bg = _parallax_elements_bg; 319 320 } else { 321 body.removeClassName("parallaxing"); 322 parallax_elements = []; 323 parallax_elements_bg = []; 324 _parallax_elements.invoke("removeAttribute", "style"); 325 326 _parallax_elements_bg.forEach(e => { 327 e.setStyle({ 328 "background-position": "inherit" 329 }); 330 e.style.setProperty('--background-position', `inherit`); 331 }) 332 } 333 }; 334 335 getParallax(); 336 337 Element.prototype.parallax = function(rate,start,stop,orientation,opacity){ 338 if (scrolled >= start && scrolled <= stop && document.viewport.getWidth() > 400){ 339 this.pos = (scrolled * rate).toFixed(2) - (start * rate); 340 if (orientation == "horizontal") { 341 this.transform = "translate(" + this.pos + "px, 0px)"; 342 } else { 343 this.transform = "translate(0px," + this.pos + "px)"; 344 } 345 if (opacity == 1) { 346 this.opacity = (100 - scrolled * (100/(stop - start))) / 100; 347 } else { 348 this.opacity = 1; 349 } 350 this.setStyle({ 351 "transform": this.transform, 352 "opacity": this.opacity, 353 }); 354 } else if (scrolled <= start){ 355 this.pos = start * rate; 356 this.transform = "translate(0px, 0px)"; 357 this.opacity = 1; 358 this.setStyle({ 359 "transform": this.transform, 360 "opacity": this.opacity, 361 }); 362 }; 363 }; 364 Element.prototype.parallax_bg = function(rate,start,stop,offset,opacity){ 365 if (scrolled >= start && scrolled <= stop && document.viewport.getWidth() > 768){ 366 this.travel = (stop - start) * rate; 367 this.offset = offset; 368 this.pos = (scrolled * rate).toFixed(2) - (offset * rate); 369 this.setStyle({ 370 "background-position": "center " + this.pos + "px", 371 }); 372 this.style.setProperty('--background-position', `center ${this.pos}px`); 373 } else if (scrolled <= start){ 374 this.travel = (stop - start) * rate; 375 this.offset = this.travel / 2; 376 this.pos = start; 377 this.setStyle({ 378 "background-position": "center " + this.pos + "px", 379 }); 380 this.style.setProperty('--background-position', `center ${this.pos}px`); 381 }; 382 }; 383 384 const calculate = () => { 385 if (!checkContainer(container)) return false;
386 387 scrolled = document.viewport.getScrollOffsets().top; 388 389 parallax_elements.each(function(section){ 390 var rate = section.dataset.rate || -0.2; 391 var orientation = section.dataset.orientation || "vertical"; 392 var offset = section.cumulativeOffset().top; 393 var top = offset - document.viewport.getHeight(); 394 var bottom = offset + document.viewport.getHeight(); 395 section.parallax(rate,top,bottom,orientation,0); 396 }); 397 parallax_elements_bg.each(function(section){ 398 var rate = section.dataset.rate || -0.2; 399 var offset = section.cumulativeOffset().top; 400 var top = offset - document.viewport.getHeight(); 401 var bottom = offset + document.viewport.getHeight(); 402 section.parallax_bg(rate,top,bottom,offset,0); 403 }); 404 } 405 406 calculate(); 407 408 $(document).on("scroll", calculate); 409 410 window.addEventListener('resize', getParallax, true); 411 412 return { 413 init: init, 414 calculate: calculate 415 } 416})(); 417var Slider = function(p) { 418 //SET DEFAULTS AND FIND USER-DEFINED PARAMETERS 419 var self = this; 420 this.params = p; 421 this.mask = this.params.parent.down(".sliderMask"); 422 this.container = this.params.parent.down(".sliderContainer"); 423 this.slides = this.params.parent.select(".slide"); 424 this.slidesCount = this.slides.length; 425 this.slideOffset = this.params.slideOffset || 0; 426 this.active = this.params.start || 1; 427 this.toDisplay = this.params.toDisplay || 1; 428 this.slideBy = this.params.slideBy || 1; 429 this.touch = this.params.touch || false; 430 this.onInit = this.params.onInit || function(slide) {}; 431 this.onBeforeMove = this.params.onBeforeMove || function(slide) {}; 432 this.onAfterMove = this.params.onAfterMove || function(slide) {}; 433 this.isTransitioning = false; 434 this.disableClones = this.params.disableClones || false; 435 436 //DUPLICATE SLIDES FOR INFINITE SLIDING EFFECT 437 this.cloner = function() { 438 var first_slide = this.slides.first(), 439 last_slide = this.slides.last(); 440 441 function _clone(orig) { 442 return orig.clone(true).addClassName("cloned-slide"); 443 } 444 445 // clone first two slides to append to end 446 this.container.insert(_clone(first_slide)); 447 this.container.insert(_clone(first_slide.next(".slide"))); 448 449 // clone last two slides to prepend to beginning 450 this.container.insert({ 451 top: _clone(last_slide) 452 }); 453 this.container.insert({ 454 top: _clone(last_slide.previous(".slide")) 455 }); 456 }; 457 458 //SIZE SLIDER 459 this.setWidths = function() { 460 var multiplier = this.slidesCount; 461 if (!this.disableClones) { 462 multiplier = this.slidesCount + 4; 463 } 464 465 var hi = 0; 466 this.slides.each(function(el) { 467 var h = el.getHeight(); 468 if (h > hi) { 469 hi = h; 470 } 471 }); 472 this.slideWidth = this.slides[0].getWidth() + (parseInt(this.slides[0].getStyle('margin-left')) + parseInt(this.slides[0].getStyle('margin-right'))); 473 474/* 475 console.log("disableClones", this.disableClones); 476 console.log("slideWidth: ", this.slideWidth); 477 console.log("toDisplay: ", this.toDisplay); 478 console.log("slideCount: ", this.slidesCount); 479 console.log("multiplier: ", multiplier); 480 console.log("mask width (slideWidth * toDisplay: ", (this.slideWidth * this.toDisplay) + "px"); 481 console.log("container width (slideWidth * multiplier): ", (this.slideWidth * multiplier) + "px"); 482*/ 483 484 this.slideHeight = hi; 485 var current = this.container.down(".slide.active"); 486 if (current) { 487 this.slideHeight = current.getHeight(); 488 } 489 this.mask.setStyle({ 490 width: (this.slideWidth * this.toDisplay) + "px", 491 height: this.slideHeight + "px", 492 }); 493 494 this.container.setStyle({ 495 width: (this.slideWidth * multiplier) + "px", 496 height: this.slideHeight + "px", 497 }); 498 if (this.params.prevBtn) { 499 if (this.slidesCount <= this.toDisplay) { 500 this.params.prevBtn.hide(); 501 this.params.nextBtn.hide(); 502 } else { 503 this.params.prevBtn.show(); 504 this.params.nextBtn.show(); 505 } 506 } 507 }; 508 509 //RESET THE SLIDES TO DISPLAY 510 this.toDisplayReset = function(toDisplay) { 511 if (toDisplay >= this.slidesCount) { 512 this.toDisplay = this.slidesCount; 513 } else if (toDisplay > 0) { 514 this.toDisplay = toDisplay; 515 } else { 516 this.toDisplay = 1; 517 } 518 this.slideBy = this.params.slideBy || toDisplay; 519 this.setWidths(); 520 }; 521 522 //SET BASIC SLIDING FUNCTION 523 this.moveTo = function(slide) { 524 this.isTransitioning = true; 525 this.onBeforeMove(slide); 526 527 this.slideBuffer = this.disableClones ? 0 : 2; 528 529 //MOVE SLIDER 530 this.container.setStyle({ 531 left: -((slide + this.slideBuffer - 1 + this.slideOffset) * this.slideWidth) + "px" 532 }); 533 var current = this.container.down(".slide.active"); 534 if (current) { 535 current.removeClassName("active"); 536 } 537 this.container.select(".slide")[slide + 1].addClassName("active"); 538 var mask_height = this.container.down(".slide.active").getHeight(); 539 this.mask.setStyle({
540 "height": mask_height + "px" 541 }); 542 //SET ACTIVE SLIDE 543 this.active = slide; 544 this.onAfterMove(slide); 545 this.isTransitioning = false; 546 }; 547 548 //SET NEXT AND PREVIOUS FUNCTIONS 549 this.next = function() { 550/* 551 console.log(this.active); 552 console.log((this.active + this.slideBy) > this.slidesCount) 553*/ 554 this.container.removeClassName("animate"); 555 if ((this.active + this.slideBy) > this.slidesCount) { 556 this.moveTo(1 - (this.slideBy)); 557 } 558 setTimeout(function() { 559 self.container.addClassName("animate"); 560 self.moveTo(self.active + (self.slideBy)); 561 }, 10); 562 }; 563 this.previous = function() { 564 this.container.removeClassName("animate"); 565 if ((this.active - this.slideBy) <= 0) { 566 this.moveTo(this.slidesCount + (this.slideBy)); 567 } 568 setTimeout(function() { 569 self.container.addClassName("animate"); 570 self.moveTo(self.active - (self.slideBy)); 571 }, 10); 572 }; 573 574 //SET BUTTONS FOR SLIDER 575 if (this.params.prevBtn) { 576 self.params.prevBtn.on("click", function() { 577 self.previous(); 578 if (p.playState == "play") { 579 self.reset(); 580 } 581 }); 582 } 583 if (this.params.nextBtn) { 584 self.params.nextBtn.on("click", function() { 585 self.next(); 586 if (p.playState == "play") { 587 self.reset(); 588 } 589 }); 590 } 591 592 //TOUCH EVENTS 593 if (p.touch === true && typeof Hammer !== "undefined") { 594 var hammertime = new Hammer(this.container, { 595 domEvents: true, 596 velocity: 0.65 597 }); 598 hammertime.on("swipeleft swiperight", function(ev) { 599 if (!this.isTransitioning) { 600 if (ev.type == "swiperight") { 601 self.previous(); 602 if (p.playState == "play") { 603 self.reset(); 604 } 605 } 606 if (ev.type == "swipeleft") { 607 self.next(); 608 if (p.playState == "play") { 609 self.reset(); 610 } 611 } 612 } 613 }); 614 } 615 616 //PLAY STATE ACTIONS 617 var play; 618 this.playTimer = p.playTimer || 5000; 619 this.start = function() { 620 play = setTimeout(function() { 621 self.autoPlay(); 622 }, self.playTimer); 623 }; 624 this.reset = function() { 625 clearTimeout(play); 626 play = setTimeout(function() { 627 self.autoPlay(); 628 }, self.playTimer); 629 }; 630 this.stop = function() { 631 clearTimeout(play); 632 }; 633 this.autoPlay = function() { 634 self.next(); 635 self.reset(); 636 }; 637 if (p.playState == "play") { 638 this.start(); 639 /* 640 this.container.on("mouseover", function(event,element){ 641 self.stop(); 642 }); 643 this.container.on("mouseout", function(event,element){ 644 self.start() 645 }); 646 */ 647 } 648 649 //SET INITALIZATION 650 this.init = function() { 651 if (!this.disableClones) { 652 this.cloner(); 653 } 654 655 this.setWidths(); 656 this.moveTo(this.active); 657 if (!this.params.toDisplay) { 658 this.toDisplayReset(Math.floor(self.params.parent.getWidth() / self.slideWidth)); 659 } 660 661 this.onInit(this.active); 662 }; 663 664 this.resetInit = function() { 665 this.setWidths(); 666 this.moveTo(this.active); 667 if (!this.params.toDisplay) { 668 this.toDisplayReset(Math.floor(self.params.parent.getWidth() / self.slideWidth)); 669 } 670 }; 671 672 this.init(); 673 674 //RE-INITIALIZE ON BROWSER RESIZE (IF RESPONSIVE) 675/* 676 Event.observe(window, "resize", function() { 677 self.resetInit(); 678 }); 679*/ 680 681 window.addEventListener("resize", this.resetInit.bind(this)) 682}; 683 684(function() { 685 if ($("eventSlider") && $("eventSlider").select(".slide").length) { 686 var slider = new Slider({ 687 parent: $("eventSlider"), 688 animation: "0.4s ease-in-out", 689 start: 1, 690 nextBtn: $("slideNext"), 691 prevBtn: $("slidePrev"), 692 slideBy: 1 693 }); 694 } 695}()); 696 697document.addEventListener("DOMContentLoaded", () => { 698 const body = document.querySelector("body") 699 const mainContainer = document.getElementById("mainContainer") 700 701 if (window.matchMedia("(max-width: 768px)").matches) { 702 mainContainer.querySelectorAll("[data-wow-delay]").forEach((e, i) => { 703 e.removeAttribute("data-wow-delay") 704 setTimeout(() => { 705 e.style.animationDelay = `${i * .15}s` 706 }, 100) 707 }) 708 } 709 710 const eventSection = document.getElementById("event-section") 711 712 if (eventSection) { 713 const sectionSlides = eventSection.querySelectorAll(".column") 714 eventSection.addEventListener("click", event => { 715 const navItem = event.target.closest(".section-nav-item") 716 if (!!navItem) { 717 const navId = navItem.dataset.id
718 sectionSlides.forEach(slide => { 719 if (slide.dataset.id == navId) { 720 slide.classList.add("active") 721 } else { 722 slide.classList.remove("active") 723 } 724 }) 725 } 726 }) 727 } 728 729 var wow = new WOW().init(); 730}) 731
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.