1var ocbInitializePlugins = function(){ 2 clearTimeout(ocbInitializeTimer); 3 ocbInitializeTimer = setTimeout(function(){ 4 ocbInitMasonry(); 5 ocbInitBeforeAfter(); 6 ocbInitWaypoints(); 7 ocbInitJarallax(); 8 ocbInitAllMaps(); 9 ocbInitProgressBars(); 10 ocbInitSliders(); 11 ocbInitPosts(); 12 ocbReplaceChildClassAdd(); 13 ocbInitNav(); //MUST BE LAST BECAUSE THE PREVIOUS WILL OVERWRITE 14 jQuery('[data-toggle="tooltip"]').tooltip(); 15 }, 300) 16}; 17 18var ocbReInitializeTimer = null; 19var ocbInitializeTimer = null; 20var ocbReInitializeSubsetTimer = null; 21var ocbReInitializeLazyTimer = null; 22 23/** 24 * 25 * @param topWindow if we're rendering content in the top window, pass true 26 */ 27var ocbReInitializePlugins = function( topWindow ){ 28 if( topWindow == undefined ){ 29 topWindow = false; 30 } 31 32 clearTimeout(ocbReInitializeTimer); 33 ocbReInitializeTimer = setTimeout(function(){ 34 ocbReInitMasonry( topWindow ); 35 ocbInitBeforeAfter(); 36 ocbInitJarallax( topWindow ); 37 ocbInitAllMaps( topWindow ); 38 ocbInitProgressBarsNoWaypoint( topWindow ); 39 ocbReInitSliders( topWindow ); 40 ocbInitPosts( topWindow ); 41 ocbReplaceChildClassAdd( topWindow ); 42 ocbInitNav(); //MUST BE LAST BECAUSE THE PREVIOUS WILL OVERWRITE 43 ocbInitNavVisible(); 44 jQuery('[data-toggle="tooltip"]').tooltip(); 45 }, 500) 46}; 47 48var ocbInitLazy = function( topWindow ){ 49 clearTimeout(ocbReInitializeLazyTimer); 50 ocbReInitializeLazyTimer = setTimeout(function(){ 51 52 if( topWindow == undefined ){ 53 topWindow = false; 54 } 55 56 var theDoc = ocbGetDocument( topWindow ); 57 var theWindow = ocbGetWindow( topWindow ); 58 59 var lazy = theDoc.getElementsByClassName('ocb-lazy'); 60 61 for( var i = 0; i < lazy.length; i++ ){ 62 var dataBg = jQuery(lazy[i]).attr('data-bg'); 63 var dataSrc = jQuery(lazy[i]).attr('data-src'); 64 if( dataBg ){ 65 jQuery(lazy[i]).attr('style', 'background-image: ' + dataBg); 66 } 67 if( dataSrc ){ 68 jQuery(lazy[i]).attr('src', dataSrc); 69 } 70 } 71 72 jQuery('.wow').show(); 73 74 }, 500); 75}; 76 77/** 78 * Especially important for things like parallax with skins where a routine needs to be run on other objects that 79 * may have been affected by the changing of a skin 80 */ 81var ocbReInitializeSubset = function( topWindow ){ 82 if( topWindow == undefined ){ 83 topWindow = false; 84 } 85 86 clearTimeout(ocbReInitializeSubsetTimer); 87 ocbReInitializeSubsetTimer = setTimeout(function(){ 88 ocbInitJarallax(); 89 }, 500) 90}; 91 92var ocbDoNeededInitializePlugins = function( topWindow ){ 93 if( topWindow == undefined ){ 94 topWindow = false; 95 } 96 97 setTimeout(function() { 98 ocbInitJarallax( topWindow ); 99 ocbInitProgressBarsNoWaypoint( topWindow ); 100 ocbInitNavVisible( topWindow ); 101 ocbInitPosts( topWindow ); 102 }, 300); 103}; 104 105var ocbHideShow = function(id){ 106 var theDoc = window.ocbGetDocument(); 107 var element = theDoc.getElementById('module-' + id); 108 if( element == null ) element = theDoc.getElementById('column-' + id); 109 if( element == null ) element = theDoc.getElementById('row-' + id); 110 element.style.display = 'none'; 111 if( ! element.className.includes('animated') ){ 112 element.className += ' animated'; 113 } 114 setTimeout(function(){ 115 element.style.display = 'block'; 116 }, 100); 117}; 118 119var ocbGetDocument = function( topWindow ){ 120 if( topWindow == undefined ){ 121 topWindow = false; 122 } 123 124 if( topWindow ) return document; 125 126 var iframeJS = document.getElementById('ocb-workspace-iframe'); 127 var iframeDocument = null; 128 var theDoc = document; 129 if( iframeJS !== null ){ 130 iframeDocument = iframeJS.contentDocument || iframeJS.contentWindow.document; 131 theDoc = iframeDocument; 132 } 133 134 return theDoc; 135}; 136 137var ocbGetWindow = function( topWindow ){ 138 if( topWindow == undefined ){ 139 topWindow = false;
140 } 141 142 if( topWindow ) return window; 143 144 var iframeJS = document.getElementById('ocb-workspace-iframe'); 145 var theWindow = window; 146 if( iframeJS !== null ){ 147 theWindow = iframeJS.contentWindow; 148 } 149 150 return theWindow; 151}; 152 153/********* OFFSPROUT NAV **********/ 154 155var ocbInitNav = function( topWindow ){ 156 if( topWindow == undefined ){ 157 topWindow = false; 158 } 159 160 var theDoc = ocbGetDocument( topWindow ); 161 var theWindow = ocbGetWindow( topWindow ); 162 163 jQuery('.ocb-menu-desktop').addClass('ocb-menu-visible'); 164 165 jQuery(theDoc).find('.ocb-menu-item, .ocb-menu-item-child').each(function(){ 166 var parser = document.createElement('a'); 167 var href = jQuery(this).attr('href'); 168 if( ! href ) return; 169 if( href.startsWith('#') ) return; 170 parser.href = href; 171 if( theWindow.location.pathname == parser.pathname ){ 172 jQuery(this).addClass('active'); 173 if( jQuery(this).hasClass('ocb-menu-item-child') ){ 174 jQuery(this).closest('.ocb-menu-item-wrap').find('.ocb-menu-item').addClass('active'); 175 } 176 } 177 }); 178}; 179 180var ocbInitNavVisible = function( topWindow ){ 181 if( topWindow == undefined ){ 182 topWindow = false; 183 } 184 185 var theDoc = ocbGetDocument( false ); 186 187 setTimeout(function(){ 188 jQuery(theDoc).find('.ocb-menu-desktop').addClass('ocb-menu-visible'); 189 }, 200); 190}; 191 192/********* OFFSPROUT WAYPOINTS **********/ 193 194var ocbInitWaypoints = function( topWindow ){ 195 if( topWindow == undefined ){ 196 topWindow = false; 197 } 198 199 var theDoc = ocbGetDocument( topWindow ); 200 var theWindow = ocbGetWindow( topWindow ); 201 202 if( theDoc == undefined || theDoc.body == undefined || ! theDoc.body.className.includes('ocb-logged-out') ) return; 203 204 var waypoints = theDoc.getElementsByClassName('ocb-sticky'); 205 206 for( var i = 0; i < waypoints.length; i++ ){ 207 theWindow.ocbInitWaypoint(waypoints[i], waypoints[i].dataset, topWindow); 208 } 209}; 210 211var ocbInitWaypoint = function(element){ 212 if( jQuery(element).closest('.sticky-wrapper').length ) return; 213 214 var width = jQuery(element).innerWidth(); 215 var minStickyWidth = parseInt(jQuery(element).attr('data-ocb-sticky-width')); 216 var outerWidth = parseInt(window.outerWidth) || parseInt(window.innerWidth); 217 218 if( outerWidth < minStickyWidth ) return; 219 220 var stickyStop = jQuery(element).attr('data-ocb-sticky-stop'); 221 var offset = jQuery(element).attr('data-ocb-sticky-offset'); 222 if( offset == undefined || offset == false ) offset = 0; 223 224 var height = 0; //if we want to make this work when logged in, need to figure this out 225 226 jQuery(element).css({width: width + 'px', maxWidth: '100%'}); 227 var sticky = new Waypoint.Sticky({ 228 element: jQuery(element), 229 offset: offset 230 }); 231 232 if( stickyStop ) { 233 jQuery('#row-' + stickyStop).waypoint(function (direction) { 234 if (direction == 'up') { 235 jQuery(element).css('top', ''); 236 } else if (direction == 'down') { 237 var fromTop = jQuery(window).scrollTop() - height; 238 jQuery(element).css({top: fromTop + 'px'}) 239 } 240 jQuery(element).toggleClass('stuck', direction === 'up'); 241 jQuery(element).toggleClass('sticky-surpassed', direction === 'down'); 242 }, { 243 offset: function () { 244 return jQuery(element).outerHeight(); 245 } 246 }); 247 } 248}; 249 250/********* OFFSPROUT POSTS **********/ 251 252var ocbInitPosts = function( topWindow ){ 253 if( topWindow == undefined ){ 254 topWindow = false; 255 } 256 257 var theDoc = ocbGetDocument( topWindow ); 258 var theWindow = ocbGetWindow( topWindow ); 259 var posts = theDoc.getElementsByClassName('ocb-posts'); 260 261 if( theWindow.ocbInitSinglePosts == undefined ) return; 262 263 for( var i = 0; i < posts.length; i++ ){ 264 theWindow.ocbInitSinglePosts(posts[i], posts[i].dataset, topWindow); 265 } 266 267 jQuery('.ocb-post-image').each(function(){ 268 //Remove featured images if no featured image (brittle way to do this) 269 if( jQuery(this).css('background-image') == 'url("' + window.location.href + '")' ){ 270 jQuery(this).closest('.ocb-post-image-wrap').remove(); 271 } 272 }) 273}; 274 275var ocbReInitSinglePosts = function(id){ 276 var theWindow = ocbGetWindow(); 277 278 theWindow.ocbSinglePostsTimeout = setTimeout(function () { 279 var theDoc = ocbGetDocument(); 280 var posts = theDoc.getElementById('ocb-posts-' + id); 281 theWindow.ocbInitSinglePosts(posts, posts.dataset); 282 }, 300); 283}; 284 285var ocbSinglePostsTries = 0; 286var ocbSinglePostsTimeout = null; 287var ocbSinglePostsTriesTimeout = null; 288 289/** 290 * Takes the template post and uses that with whatever posts are found in the OCBPosts object, 291 * replacing {{properties}} with their corresponding values 292 * 293 * @param element 294 * @param data 295 * @param topWindow 296 */ 297var ocbInitSinglePosts = function(element, data, topWindow){ 298 if( topWindow == undefined ){ 299 topWindow = false;
300 } 301 302 var theWindow = ocbGetWindow(); 303 //console.log('ocbInitSinglePosts', theWindow.OCBPosts); 304 var theId = jQuery(element).attr('data-posts-id'); 305 var excerptLength = jQuery(element).attr('data-excerpt-length'); 306 var dateFormat = jQuery(element).attr('data-date-format'); 307 var noPosts = jQuery(element).attr('data-no-posts-message'); 308 var includeSearch = jQuery(element).attr('data-no-posts-search'); 309 clearTimeout( theWindow.ocbSinglePostsTimeout ); 310 311 if( theWindow.OCBPosts == undefined && topWindow == false ){ 312 theWindow.ocbSinglePostsTries++; 313 314 if( theWindow.ocbSinglePostsTries <= 3 ) { 315 316 theWindow.ocbSinglePostsTriesTimeout = setTimeout(function () { 317 theWindow.ocbInitSinglePosts(element, data); 318 }, 500); 319 320 } 321 322 return; 323 } 324 325 clearTimeout( theWindow.ocbSinglePostsTriesTimeout ); 326 327 let thePosts = []; 328 329 if( theWindow.OCBPosts != undefined && theWindow.OCBPosts[theId] != undefined ){ 330 thePosts = theWindow.OCBPosts[theId]; 331 } 332 333 //Use dummy content if template preview 334 if( topWindow ){ 335 if( theWindow.OCBPosts == undefined ) theWindow.OCBPosts = {}; 336 337 const dummyPost = { 338 ID: 657, 339 category: [ 340 { 341 name: "Category", 342 slug: "category" 343 } 344 ], 345 comment_count: 1, 346 comment_status: 'open', 347 filter: 'raw', 348 guid:"http://php.hgv.test/?p=657", 349 menu_order: 0, 350 meta: [ 351 { 352 key: 'ocb_testimonial_config', 353 value: { 354 attribution: 'John Doe', 355 attribution_description: 'CEO of Company' 356 } 357 } 358 ], 359 ocb_author:'<a href="http://php.hgv.test/author/wordpress/">Author Name</a>', 360 ocb_category:'<a href="http://php.hgv.test/category/category/">Category</a>', 361 ocb_date: [ 362 { 363 date: "01-31-2050", 364 format: "m-d-Y" 365 }, 366 { 367 date: "01.31.2050", 368 format: "m.d.Y" 369 }, 370 { 371 date: "31-01-2050", 372 format: "d-m-Y" 373 }, 374 { 375 date: "31.01.2050", 376 format: "d.m.Y" 377 }, 378 { 379 date: "Monday, January 31, 2050", 380 format: "l, F j, Y" 381 }, 382 { 383 date: "January 31, 2050", 384 format: "F j, Y" 385 }, 386 { 387 date: "January 31st, 2050", 388 format: "F jS, Y" 389 }, 390 { 391 date: "January, 2050", 392 format: "F, Y" 393 }, 394 { 395 date: "January 31", 396 format: "F j" 397 }, 398 { 399 date: "January 31st", 400 format: "F jS" 401 }, 402 { 403 date: "2050", 404 format: "Y" 405 } 406 ], 407 ocb_excerpt:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum bibendum quis est ut facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum bibendum quis est ut facilisis.", 408 ocb_featured_image_url:"https://s3-us-west-2.amazonaws.com/s.cdpn.io/142996/slider-2.jpg", 409 ocb_pagination: null, 410 ocb_tag:'<a href="http://php.hgv.test/tag/tag/">Tag</a>', 411 ocb_url:"https://offsprout.com/", 412 ping_status:"open", 413 pinged:"", 414 post_author:"1", 415 post_content:"<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam tellus mauris, laoreet vel quam vitae, dictum molestie mauris. Maecenas eget venenatis quam. Nam non nisi est.</p>", 416 post_content_filtered:"", 417 post_date:"2050-01-31 16:56:49", 418 post_date_gmt:"2050-01-31 16:56:49", 419 post_excerpt:"", 420 post_mime_type:"", 421 post_modified:"2050-01-31 19:25:15", 422 post_modified_gmt:"2050-01-31 19:25:15", 423 post_name:"post-5", 424 post_parent: 0, 425 post_password:"", 426 post_status:"publish", 427 post_tag: { 428 name: 'tag', 429 slug: 'tag' 430 }, 431 post_title:"Post Title", 432 post_type:"post", 433 to_ping:"" 434 }; 435 436 thePosts = [ 437 dummyPost, 438 dummyPost, 439 dummyPost, 440 dummyPost, 441 dummyPost, 442 dummyPost 443 ]; 444 } else { 445 446 } 447 448 var replacements = ['post_title', 'post_content', 'ocb_url', 'ocb_excerpt', 'comment_count', 'ocb_category', 'ocb_tag', 'ocb_author', 'ocb_featured_image_url', 'ocb_date']; 449 var wrap = jQuery(element).find('.ocb-posts-wrap:not(.ocb-posts-wrap-public)'); 450 451 if( thePosts.length && thePosts.search == undefined ){ 452 var template = jQuery(element).find('.ocb-post-template'); 453 var clone = template.clone(); 454 var pagination = jQuery(element).find('.ocb-posts-pagination'); 455 456 clone.removeClass('ocb-post-template'); 457 458 var cloneHtml = clone.html(); 459 wrap.html(''); 460 clone.html(''); 461 pagination.html(''); 462 wrap.append(clone); 463 464 if( cloneHtml == undefined ) return; 465 466 for( var i = 0; i < thePosts.length; i++ ){ 467 468 var newCloneHTML = cloneHtml; 469 470 for( var j = 0; j < replacements.length; j++ ){ 471 let theValue = thePosts[i][replacements[j]]; 472 473 if( theValue != undefined ) { 474 if (replacements[j] == 'ocb_date') { 475 //let theDate = theValue.find(date => date.format == dateFormat); 476 let theDate = ocbAltFind( theValue, function(date){ 477 return date.format == dateFormat; 478 }); 479 let date = theDate != undefined && theDate.date != undefined ? theDate.date : ''; 480 newCloneHTML = newCloneHTML.replaceAll('{{ocb_date}}', date); 481 } else if( replacements[j] == 'ocb_excerpt' && excerptLength ) { 482 newCloneHTML = newCloneHTML.replaceAll( '{{ocb_excerpt}}', theValue.substring(0,excerptLength) + '...' ); 483 } else { 484 newCloneHTML = newCloneHTML.replaceAll( '{{' + replacements[j] + '}}', theValue ); 485 } 486 } else { 487 newCloneHTML = newCloneHTML.replaceAll( '{{' + replacements[j] + '}}', '' ); 488 } 489 490 } 491 492 //Meta replacement 493 if( thePosts[i].meta != undefined && thePosts[i].meta.length ){ 494 for( var k = 0; k < thePosts[i].meta.length; k++ ){ 495 if( typeof thePosts[i].meta[k].value == 'object' ){ 496 497 //For meta values that are arrays, the array key is designated after the | in the postVar 498 for (var key in thePosts[i].meta[k].value) { 499 if (thePosts[i].meta[k].value.hasOwnProperty(key)) { 500 newCloneHTML = newCloneHTML.replaceAll( '{{' + thePosts[i].meta[k].key + '|' + key + '}}', thePosts[i].meta[k].value[key] ); 501 } 502 } 503 } else { 504 505 //For meta values that are strings, use the meta key as the postVar 506 if (thePosts[i].meta[k].value.hasOwnProperty(key)) { 507 newCloneHTML = newCloneHTML.replaceAll( '{{' + thePosts[i].meta[k].key + '}}', thePosts[i].meta[k].value[key] ); 508 } 509 } 510 } 511 } 512 513 //Taxonomy replacement 514 if( thePosts[i].ocb_taxonomies != undefined ){ 515 for( var taxKey in thePosts[i].ocb_taxonomies ){ 516 if (thePosts[i].ocb_taxonomies.hasOwnProperty(taxKey)) { 517 newCloneHTML = newCloneHTML.replaceAll( '{{' + taxKey + '}}', thePosts[i].ocb_taxonomies[taxKey] ); 518 } 519 } 520 } 521 522 //Other replacement 523 if( thePosts[i].ocb_other != undefined ){ 524 for( var otherKey in thePosts[i].ocb_other ){ 525 if (thePosts[i].ocb_other.hasOwnProperty(otherKey)) { 526 newCloneHTML = newCloneHTML.replaceAll( '{{' + otherKey + '}}', thePosts[i].ocb_other[otherKey] ); 527 } 528 } 529 } 530 531 newCloneHTML = newCloneHTML.replace('animated fadeIn'); 532 533 var toInsert = jQuery(newCloneHTML); 534 535 if( thePosts[i].ocb_featured_image_url == false || thePosts[i].ocb_featured_image_url == undefined ){ 536 toInsert.find('.ocb-post-image-wrap').remove(); 537 } 538 539 clone.append(toInsert); 540 } 541 542 wrap.append(clone); 543 544 if( thePosts[0].ocb_pagination != undefined && thePosts[0].ocb_pagination != false ){ 545 pagination.html(thePosts[0].ocb_pagination); 546 } 547 } else { 548 let search = includeSearch == 'yes' ? thePosts.search : ''; 549 wrap.html(search + '<p>' + noPosts + '</p>'); 550 } 551}; 552 553var ocbAltFind = function(arr, callback) { 554 for (var i = 0; i < arr.length; i++) { 555 var match = callback(arr[i]); 556 if (match) { 557 return arr[i]; 558 break; 559 } 560 } 561} 562 563 564/********* OFFSPROUT SLIDER **********/ 565var ocbAllSliders = {}; 566 567var ocbInitSliders = function(){ 568 var theDoc = ocbGetDocument(); 569 var theWindow = ocbGetWindow();
570 var sliders = theDoc.getElementsByClassName('ocb-slider-container'); 571 572 for( var i = 0; i < sliders.length; i++ ){ 573 theWindow.ocbInitSingleSlider(sliders[i], sliders[i].dataset); 574 } 575}; 576 577var ocbReInitSliders = function( topWindow ){ 578 if( topWindow == undefined ){ 579 topWindow = false; 580 } 581 582 var theDoc = ocbGetDocument( topWindow ); 583 var theWindow = ocbGetWindow( topWindow ); 584 var sliders = theDoc.getElementsByClassName('ocb-slider-container'); 585 586 for( var i = 0; i < sliders.length; i++ ){ 587 theWindow.ocbReInitSingleSlider(sliders[i].getAttribute('data-sliderid')); 588 } 589}; 590 591var ocbReInitSingleSlider = function(id){ 592 setTimeout(function(){ 593 var theDoc = ocbGetDocument(); 594 var theWindow = ocbGetWindow(); 595 var slider = theDoc.getElementById('ocb-slider-' + id); 596 if( slider != null ){ 597 theWindow.ocbInitSingleSlider(slider, slider.dataset); 598 } 599 }, 100); 600}; 601 602var ocbSliderNext = function(event){ 603 var active = parseInt(jQuery(event.data.slider).attr('data-activeslide')); 604 var newActive = ocbSliderGetNext(active, jQuery(event.data.slider).attr('data-slidenumber')); 605 ocbSliderNewActive(event, active, newActive); 606}; 607 608var ocbSliderGetNext = function(active, total){ 609 return parseInt(active) == parseInt(total) ? 1 : parseInt(active) + 1; 610}; 611 612var ocbSliderPrev = function(event){ 613 var active = parseInt(jQuery(event.data.slider).attr('data-activeslide')); 614 var newActive = ocbSliderGetPrev(active, jQuery(event.data.slider).attr('data-slidenumber')); 615 ocbSliderNewActive(event, active, newActive); 616}; 617 618var ocbSliderGetPrev = function(active, total){ 619 return parseInt(active) == 1 ? parseInt(total) : parseInt(active) - 1; 620}; 621 622var ocbSliderNav = function(event){ 623 var active = parseInt(jQuery(event.data.slider).attr('data-activeslide')); 624 var newActive = jQuery(this).attr('data-index'); 625 ocbSliderNewActive(event, active, newActive); 626}; 627 628var ocbSliderNewActive = function(event, active, newActive){ 629 if( active == newActive ) return; 630 631 ocbSliderSet(event.data.slider, newActive) 632}; 633 634var ocbSliderSet = function(slider, newActive){ 635 jQuery(slider).find('.ocb-slider-slide').removeClass('prev'); 636 jQuery(slider).find('.ocb-slider-slide').removeClass('next'); 637 jQuery(slider).find('.ocb-slider-slide').removeClass('active'); 638 jQuery(slider).find('.ocb-slider-slide:nth-child(-n+' + ( newActive - 1 ) + ')').addClass('prev'); 639 jQuery(slider).find('.ocb-slider-slide:nth-child(n+' + ( newActive + 1 ) + ')').addClass('next'); 640 jQuery(slider).find('.ocb-slider-slide-' + newActive).addClass('active'); 641 jQuery(slider).attr('data-activeslide', newActive); 642 jQuery(slider).find('.ocb-slider-bullet').removeClass('active'); 643 jQuery(slider).find('.ocb-slider-bullet:nth-child(' + newActive + ')').addClass('active'); 644}; 645 646var ocbSliderPlay = function(options){ 647 clearInterval(ocbSliderInterval[options.id]); 648 var defaults = { 649 autoplay: 1, 650 autoplayStopOnLast: 0, 651 time: 5000 652 }; 653 var newOptions = Object.assign(defaults, options); 654 655 if( newOptions.autoplay ) { 656 ocbSliderInterval[options.id] = setInterval(function () { 657 var total = jQuery(newOptions.event.data.slider).attr('data-slidenumber'); 658 var current = jQuery(newOptions.event.data.slider).attr('data-activeslide'); 659 if( ! ocbSliderPaused && ( ! newOptions.autoplayStopOnLast || current != total ) ){ 660 ocbSliderNext(newOptions.event); 661 } 662 }, newOptions.time); 663 } 664}; 665 666var ocbSliderInterval = []; 667 668var ocbSliderPaused = false; 669 670var ocbInitSingleSlider = function(element, data, slide){ 671 if( data == undefined ){ 672 data = jQuery(element).data(); 673 } 674 if( slide == undefined ){ 675 slide = false; 676 } 677 678 var $element = jQuery(element); 679 680 $element.find('.ocb-slider-control').remove(); 681 682 var id = $element.attr('data-sliderid'); 683 var $slider = jQuery('#ocb-slider-' + id); 684 var autoplay = $element.attr('data-autoplay') == false || $element.attr('data-autoplay') == 'false' ? 0 : parseInt($element.attr('data-autoplay'));
685 var autoplayStopOnLast = $element.attr('data-autoplaystoponlast') == 'false' ? 0 : $element.attr('data-autoplaystoponlast'); 686 var effect = $element.attr('data-effect'); 687 var slidenumber = $slider.find('.ocb-slider-slide').length; 688 var navigation = $element.attr('data-navigation'); 689 var pagination = $element.attr('data-pagination'); 690 var paginationColor = $element.attr('data-paginationcolor'); 691 var navigationColor = $element.attr('data-navigationcolor'); 692 var activeSlide = $element.attr('data-activslide'); 693 var pauseOnHover = $element.attr('data-pauseonhover'); 694 var paginationType = $element.attr('data-paginationtype'); 695 var loop = autoplayStopOnLast ? false : true; 696 697 var $leftNavDom = null; 698 var $rightNavDom = null; 699 var $pagination = null; 700 701 //Add pagination bullets 702 if( pagination == 1 ) { 703 var paginationColorClass = ''; 704 if( paginationColor != 'default' && paginationColor != 'custom' ){ 705 paginationColorClass = paginationColor + '-background'; 706 } 707 var $bullet = jQuery('<div class="ocb-slider-bullet ' + paginationColorClass + '"></div>'); 708 $pagination = jQuery('<div class="ocb-slider-pagination ocb-save-remove-element ocb-slider-control ocb-slider-pagination-type-' + paginationType + '"></div>'); 709 for( var i = 1; i <= slidenumber; i++ ){ 710 var $newBullet = $bullet.clone(); 711 $newBullet.addClass('ocb-slider-bullet-' + i); 712 $newBullet.attr('data-index', i); 713 $pagination.append($newBullet); 714 } 715 } 716 717 if( navigation == 1 ){ 718 var navigationColorClass = ''; 719 if( navigationColor != 'default' && navigationColor != 'custom' ){ 720 navigationColorClass = navigationColor + '-color'; 721 } 722 $leftNavDom = jQuery('<div class="ocb-slider-button-prev ocb-slider-button-navigation ocb-slider-control ocb-save-remove-element ' + navigationColorClass + '"><i class="fa fa-chevron-left" /></div>'); 723 $rightNavDom = jQuery('<div class="ocb-slider-button-next ocb-slider-button-navigation ocb-slider-control ocb-save-remove-element ' + navigationColorClass + '"><i class="fa fa-chevron-right" /></div>'); 724 } 725 726 if( activeSlide == undefined ){ 727 activeSlide = 1; 728 } 729 $slider 730 .append($pagination) 731 .append($leftNavDom) 732 .append($rightNavDom); 733 734 $slider 735 .attr('data-activeslide', activeSlide) 736 .attr('data-slidenumber', slidenumber); 737 738 if( pauseOnHover == 1 ) { 739 $slider 740 .hover(function () { //mouse enter 741 ocbSliderPaused = true; 742 }, function () { //mouse leave 743 ocbSliderPaused = false; 744 }); 745 } 746 747 if( $leftNavDom != null && $rightNavDom != null ){ 748 $leftNavDom.on('click', { slider: $slider }, ocbSliderPrev); 749 $rightNavDom.on('click', { slider: $slider }, ocbSliderNext); 750 } 751 752 if( pagination == 1 && $pagination != null ){ 753 $pagination.on('click', '.ocb-slider-bullet', { slider: $slider }, ocbSliderNav); 754 } 755 756 ocbSliderPlay({ 757 autoplay: autoplay ? 1 : 0, 758 autoplayStopOnLast: autoplayStopOnLast, 759 time: autoplay ? autoplay : 5000, 760 id: id, 761 event: { 762 data: { 763 slider: $slider 764 } 765 } 766 }); 767 768 ocbSliderSet($slider, activeSlide); 769 770 var theWindow = ocbGetWindow(); 771 theWindow.ocbAllSliders[id] = $slider; 772}; 773 774/********* PROGRESS BAR **********/ 775var ocbAllProgressBars = {}; 776var ocbProgressBarTimeout = null; 777 778var ocbInitProgressBars = function(){ 779 var theDoc = ocbGetDocument(); 780 var counters = theDoc.getElementsByClassName('ocb-number-counter'); 781 782 for( var i = 0; i < counters.length; i++ ){ 783 jQuery(counters[i]).waypoint({ 784 handler: function(direction) { 785 ocbInitSingleProgressBar(this.element, this.element.dataset); 786 }, 787 offset: '90%', 788 triggerOnce: true 789 }); 790 } 791}; 792 793var ocbInitProgressBarsNoWaypoint = function( topWindow ){ 794 if( topWindow == undefined ){ 795 topWindow = false;
796 } 797 798 var theDoc = ocbGetDocument( topWindow ); 799 var counters = theDoc.getElementsByClassName('ocb-number-counter'); 800 801 for( var i = 0; i < counters.length; i++ ){ 802 ocbInitSingleProgressBar(counters[i], counters[i].dataset); 803 } 804}; 805 806/** 807 * Called by the settings panel to re-init 808 * @param id 809 */ 810var ocbReInitSingleProgressBar = function(id){ 811 clearTimeout(ocbProgressBarTimeout); 812 ocbProgressBarTimeout = setTimeout(function(){ 813 var theWindow = ocbGetWindow(); 814 var theDocument = ocbGetDocument(); 815 var counterWrap = theDocument.getElementById('module-' + id); 816 var counter = counterWrap.getElementsByClassName('ocb-number-counter'); 817 if( theWindow.ocbAllProgressBars[id] != undefined ){ 818 theWindow.ocbAllProgressBars[id].destroy(); 819 } 820 if( window.ocbAllProgressBars[id] != undefined ){ 821 window.ocbAllProgressBars[id].destroy(); 822 } 823 theWindow.ocbInitSingleProgressBar(counter[0], counter[0].dataset); 824 }, 500); 825}; 826 827var ocbInitSingleProgressBar = function(element, data){ 828 if( data == undefined ){ 829 data = jQuery(element).data(); 830 } 831 832 jQuery(element).html(''); 833 834 var bar = new ProgressBar[data.shape](element, { 835 color: data.startColor, 836 // This has to be the same size as the maximum width to 837 // prevent clipping 838 strokeWidth: parseInt(data.endWidth), 839 trailWidth: parseInt(data.trailWidth), 840 trailColor: data.trailColor, 841 easing: data.easing, 842 duration: parseInt(data.duration), 843 text: { 844 autoStyleContainer: false, 845 style: { 846 color: data.textColor, 847 position: data.shape == 'Line' ? 'relative' : 'absolute', 848 left: data.shape == 'Line' ? 'initial' : '50%', 849 top: data.shape == 'Line' ? 'initial' : '50%', 850 textAlign: data.shape == 'Line' ? data.textAlign : 'center', 851 padding: 0, 852 margin: 0, 853 fontSize: data.fontSize, 854 transform: { 855 prefix: true, 856 value: data.shape == 'Line' ? 'initial' : 'translate(-50%, -50%)' 857 } 858 } 859 }, 860 from: { color: data.startColor, width: parseInt(data.startWidth) }, 861 to: { color: data.endColor, width: parseInt(data.endWidth) }, 862 // Set default step function for all animate calls 863 step: function(state, circle) { 864 circle.path.setAttribute('stroke', state.color); 865 circle.path.setAttribute('stroke-width', state.width); 866 867 var value = Math.round(circle.value() * parseInt(data.max)); 868 if (value === 0) { 869 circle.setText(''); 870 } else { 871 circle.setText(data.textBefore + value + data.textAfter); 872 } 873 874 } 875 }); 876 877 var theWindow = ocbGetWindow(); 878 theWindow.ocbAllProgressBars[data.id] = bar; 879 880 //bar.set(data.progress); 881 bar.animate(parseFloat(data.progress)); // Number from 0.0 to 1.0 882}; 883 884/********* GOOGLE MAPS **********/ 885 886/** 887 * Global with all of the Google maps on the page 888 * @type {Array} 889 */ 890var ocbAllGoogleMaps = []; 891 892/** 893 * Finds and initializes all google maps 894 */ 895var ocbInitAllMaps = function( topWindow ){ 896 if( topWindow == undefined ){ 897 topWindow = false; 898 } 899 900 /*var theDoc = window.ocbGetDocument(); 901 var maps = theDoc.getElementsByClassName('ocb-map'); 902 903 for( var i = 0; i < maps.length; i++ ){ 904 window.ocbInitSingleMap(maps[i]); 905 }*/ 906 var theWindow = ocbGetWindow( topWindow ); 907 jQuery('.ocb-map').each(function(){ 908 theWindow.ocbInitSingleMap(this); 909 }) 910}; 911 912/** 913 * Initializes a single Google map 914 * @param element - the DOM element 915 * @param data - specific data that will be used instead of the data attributes if set 916 */ 917var ocbInitSingleMap = function(element, data){ 918 if( data == undefined ){ 919 data = jQuery(element).data(); 920 } 921 922 if (! OCBGlobalSettings.permissions.has_maps_api){ 923 console.log('Please set your Google Maps API key in Site Settings > API Keys. Then save, and refresh the page to see your map.'); 924 return; 925 } 926 927 var geocoder = new google.maps.Geocoder(); 928 var theDoc = ocbGetDocument; 929 930 geocoder.geocode({ 931 'address': data.center 932 }, function(results, status) { 933 if (status === google.maps.GeocoderStatus.OK) { 934 var map = new google.maps.Map(element, { 935 zoom: parseInt(data.zoom), 936 center: results[0].geometry.location, 937 styles: window.ocbGoogleMapStyles[data.mapSkin], 938 scrollwheel: false 939 }); 940 var mapIconWidth = 70; 941 var mapIconHeight = 96; 942 var mapIconColor = data.markerColor == undefined ? '#000000' : data.markerColor; 943 mapIconColor = mapIconColor.replace('#', ''); 944 var mapIcon = 'data:image/svg+xml,<svg%20xmlns%3D"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg"%20xmlns%3Axlink%3D"http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink"%20width%3D"' + mapIconWidth + '"%20height%3D"' + mapIconHeight + '"%20version%3D"1.1"%20x%3D"0px"%20y%3D"0px"%20viewBox%3D"0%200%20100%20125"%20enable-background%3D"new%200%200%20100%20100"%20xml%3Aspace%3D"preserve"><g><rect%20x%3D"-192"%20width%3D"185"%20height%3D"99"%2F>
944<rect%20y%3D"-36"%20width%3D"100"%20height%3D"30"%2F><line%20fill%3D"%23' + mapIconColor + '"%20stroke%3D"%23FFFFFF"%20stroke-miterlimit%3D"10"%20x1%3D"8"%20y1%3D"-14.5"%20x2%3D"18"%20y2%3D"-14.5"%2F><line%20fill%3D"%23' + mapIconColor + '"%20stroke%3D"%23FFFFFF"%20stroke-miterlimit%3D"10"%20x1%3D"-179"%20y1%3D"16.5"%20x2%3D"-162"%20y2%3D"16.5"%2F><rect%20x%3D"-179"%20y%3D"58"%20fill%3D"none"%20width%3D"35"%20height%3D"32.5"%2F><rect%20x%3D"-136.5"%20y%3D"58"%20fill%3D"none"%20width%3D"35"%20height%3D"32.5"%2F><rect%20x%3D"-94"%20y%3D"58"%20fill%3D"none"%20width%3D"35"%20height%3D"32.5"%2F><rect%20x%3D"-50"%20y%3D"58"%20fill%3D"none"%20width%3D"35"%20height%3D"32.5"%2F><rect%20x%3D"-126.514"%20y%3D"34.815"%20fill%3D"%23' + mapIconColor + '"%20width%3D"10.261"%20height%3D"10.185"%2F><rect%20x%3D"-126.477"%20y%3D"31.766"%20fill%3D"%23' + mapIconColor + '"%20width%3D"0.522"%20height%3D"2.337"%2F><rect%20x%3D"-116.812"%20y%3D"31.766"%20fill%3D"%23' + mapIconColor + '"%20width%3D"0.523"%20height%3D"2.337"%2F><rect%20x%3D"-127"%20y%3D"32.337"%20fill%3D"%23' + mapIconColor + '"%20width%3D"11.233"%20height%3D"0.572"%2F><g><rect%20x%3D"-83.805"%20y%3D"33.844"%20fill%3D"%23' + mapIconColor + '"%20width%3D"10.305"%20height%3D"10.156"%2F><rect%20x%3D"-76.809"%20y%3D"28.707"%20fill%3D"%23' + mapIconColor + '"%20width%3D"3.308"%20height%3D"3.261"%2F><%2Fg><rect%20x%3D"-178.5"%20y%3D"22.5"%20fill%3D"%23' + mapIconColor + '"%20stroke%3D"%23FFFFFF"%20stroke-miterlimit%3D"10"%20width%3D"30"%20height%3D"30"%2F><rect%20x%3D"-136.5"%20y%3D"22.5"%20fill%3D"%23' + mapIconColor + '"%20stroke%3D"%23FFFFFF"%20stroke-miterlimit%3D"10"%20width%3D"30"%20height%3D"30"%2F><rect%20x%3D"-93.5"%20y%3D"22.5"%20fill%3D"%23' + mapIconColor + '"%20stroke%3D"%23FFFFFF"%20stroke-miterlimit%3D"10"%20width%3D"30"%20height%3D"30"%2F><rect%20x%3D"-49.5"%20y%3D"22.5"%20fill%3D"%23' + mapIconColor + '"%20stroke%3D"%23FFFFFF"%20stroke-miterlimit%3D"10"%20width%3D"30"%20height%3D"30"%2F><%2Fg><g><path%20fill%3D"%23' + mapIconColor + '"%20d%3D"M49.898%2C11C35.48%2C11%2C23.795%2C22.688%2C23.795%2C37.105c0%2C4.137%2C0.986%2C8.035%2C2.699%2C11.51L49.898%2C83l23.402-34.385%20%20%20C75.014%2C45.14%2C76%2C41.242%2C76%2C37.105C76%2C22.688%2C64.314%2C11%2C49.898%2C11%20M50.222%2C50.535v0.08c-0.11-0.004-0.215-0.035-0.325-0.043%20%20%20c-0.108%2C0.008-0.213%2C0.039-0.322%2C0.043v-0.08c-6.025-0.484-10.782-5.459-10.782-11.609c0-6.152%2C4.757-11.127%2C10.782-11.611v-0.08%20%20%20c0.109%2C0.004%2C0.214%2C0.035%2C0.322%2C0.043c0.11-0.008%2C0.215-0.039%2C0.325-0.043v0.08c6.026%2C0.484%2C10.783%2C5.459%2C10.783%2C11.611%20%20%20C61.005%2C45.076%2C56.248%2C50.051%2C50.222%2C50.535"%2F><%2Fg><%2Fsvg>'; 945 var titleString = '<h4>' + data.markerTitle + '</h4>'; 946 var contentString = decodeURI(data.markerDescription); 947 var mapDirections = ''; 948 949 if( parseInt(data.mapDirections) ){ 950 mapDirections = '<p><a href="https://maps.google.com?daddr=' + data.center.replace(' ', '+') + '" target="_blank">Get Directions</a>' 951 } 952 953 //put map into a global so that it can be re initialized 954 ocbAllGoogleMaps.concat(map); 955 956 if( data.marker == 'center' ) { 957 var marker = new google.maps.Marker({ 958 position: results[0].geometry.location, 959 map: map, 960 icon: mapIcon 961 }); 962 if( data.markerInfoShow ){ 963 var infowindow = new google.maps.InfoWindow({ 964 content: titleString + contentString + mapDirections 965 }); 966 infowindow.open(map, marker); 967 } else { 968 marker.addListener('click', function() { 969 var infowindow = new google.maps.InfoWindow({ 970 content: titleString + contentString + mapDirections 971 }); 972 infowindow.open(map, marker); 973 }); 974 } 975 } else if( data.marker == 'custom' ){ 976 for( var i = 0; i < data.markers.length; i++ ){ 977 var theMarker = new google.maps.Marker({ 978 position: results[0].geometry.location, 979 map: map, 980 icon: mapIcon 981 }); 982 } 983 } 984 } else { 985 console.log('Geocode was not successful for the following reason: ' + status); 986 } 987 }); 988}; 989 990var ocbReInitSingleMapTimeout = null; 991 992/** 993 * Re-initialize single map - triggered as a callback by the settings panel 994 */ 995var ocbReInitSingleMap = function(id){ 996 //Don't want to be constantly trying to re init 997 clearTimeout(ocbReInitSingleMapTimeout); 998 999 ocbReInitSingleMapTimeout = setTimeout(function(){ 1000 var theWindow = ocbGetWindow(); 1001 var theDocument = ocbGetDocument(); 1002 var theMap = theDocument.getElementById(id + '-map'); 1003 //var theMapClass = theMap.getElementsByClassName('ocb-map')[0]; 1004 jQuery(theMap).html(''); 1005 ocbInitSingleMap(theMap, theMap.dataset); 1006 }, 1000); 1007}; 1008 1009/********* MASONRY **********/ 1010var ocbAllMasonry = {}; 1011 1012var ocbInitMasonry = function(){ 1013 var theDoc = window.ocbGetDocument(); 1014 var masonry = theDoc.getElementsByClassName('ocb-masonry-grid'); 1015 1016 for( var i = 0; i < masonry.length; i++ ){ 1017 window.ocbInitSingleMasonry(masonry[i], masonry[i].dataset); 1018 } 1019}; 1020 1021var ocbReInitMasonry = function( topWindow ){ 1022 if( topWindow == undefined ){ 1023 topWindow = false;
1024 } 1025 1026 var theDoc = ocbGetDocument( topWindow ); 1027 var masonry = theDoc.getElementsByClassName('ocb-masonry-grid'); 1028 1029 for( var i = 0; i < masonry.length; i++ ){ 1030 window.ocbReInitSingleMasonry(masonry[i], masonry[i].dataset, false ); 1031 } 1032}; 1033 1034/** 1035 * 1036 * @param element 1037 * @param data 1038 * @param wait for the imageLoaded progress 1039 */ 1040var ocbInitSingleMasonry = function(element, data, wait){ 1041 if( wait == undefined ){ 1042 wait = true; 1043 } 1044 1045 var $grid = jQuery(element).masonry({ 1046 itemSelector: '.ocb-masonry-item', 1047 percentPosition: true, 1048 columnWidth: '.grid-sizer' 1049 }); 1050 1051 if( wait ) { 1052 $grid.imagesLoaded().progress(function () { 1053 $grid.masonry(); 1054 }); 1055 } else { 1056 $grid.masonry('reloadItems') 1057 } 1058 1059 window.ocbAllMasonry[data.id] = $grid; 1060}; 1061 1062var ocbReInitSingleMasonry = function(id){ 1063 setTimeout(function(){ 1064 var iframeJS = document.getElementById('ocb-workspace-iframe'); 1065 var iframeDocument = iframeJS.contentDocument || iframeJS.contentWindow.document; 1066 var masonryWrap = iframeDocument.getElementById('module-' + id); 1067 if( masonryWrap == null ) return; 1068 var masonry = masonryWrap.getElementsByClassName('ocb-masonry-grid'); 1069 let slideIndex = 0; 1070 if( iframeJS.contentWindow.ocbAllMasonry[id] != undefined ){ 1071 //iframeJS.contentWindow.ocbAllMasonry[id].masonry('destroy'); 1072 } 1073 if( window.ocbAllSliders[id] != undefined ){ 1074 //window.ocbAllSliders[id].masonry('destroy'); 1075 } 1076 iframeJS.contentWindow.ocbInitSingleMasonry(masonry[0], masonry[0].dataset, false); 1077 }, 1000); 1078}; 1079 1080/*var ocbInitializeMasonry = function(){ 1081 var $grid = jQuery('.ocb-masonry-grid').masonry({ 1082 itemSelector: '.ocb-masonry-item', 1083 percentPosition: true, 1084 columnWidth: '.grid-sizer' 1085 }); 1086 // layout Masonry after each image loads 1087 $grid.imagesLoaded().progress( function() { 1088 $grid.masonry(); 1089 }); 1090};*/ 1091 1092var ocbChangeGalleryImage = function(element, previous){ 1093 var id = jQuery(element).data('module-id'); 1094 var index = jQuery(element).data('image-index'); 1095 var $imageView = jQuery(element).closest('.ocb-image-view'); 1096 var $imageGroup = jQuery('body').find('#' + id); 1097 var totalImages = $imageGroup.find('.ocb-gallery-item').length; 1098 var newIndex; 1099 1100 if( previous ){ 1101 newIndex = index - 1; 1102 } else { 1103 newIndex = index + 1; 1104 } 1105 1106 if( newIndex < 0 ) newIndex = 0; 1107 if( newIndex == totalImages ) newIndex = newIndex - 1; 1108 1109 var $newImage = $imageGroup.find('.ocb-gallery-item[data-image-index="' + newIndex + '"]'); 1110 var newImageURL = $newImage.data('image-full'); 1111 1112 var $image = $imageView.find('img'); 1113 $image.attr('src', newImageURL).hide(); 1114 $imageView.imagesLoaded( function() { 1115 $image.fadeIn(); 1116 }); 1117 $imageView.find('.ocb-image-view-navigation').data('image-index', newIndex); 1118}; 1119 1120var ocbReplaceChildClassAdd = function(){ 1121 jQuery('.ocb-child-class-add').each(function(){ 1122 1123 //Classes and child should have equal array lengths 1124 var classes = jQuery(this).data('ocb-classes'); 1125 classes = classes != undefined ? classes.split('|') : []; 1126 1127 var child = jQuery(this).data('ocb-child-target'); 1128 child = child != undefined ? child.split('|') : []; 1129 1130 if( classes.length != child.length ){ 1131 console.log('ocb-child-class-add has unequal array lengths') 1132 } 1133 1134 for( var i = 0; i < classes.length; i++ ){ 1135 var j = 0; 1136 jQuery(this).find(child[i]).each(function(){ 1137 var baseChildClasses = jQuery(this).data('ocb-remaining-class'); 1138 if( baseChildClasses == undefined ) baseChildClasses = ''; 1139 var finalClasses = baseChildClasses + ' ' + classes[i]; 1140 jQuery(this).attr('class', finalClasses); 1141 j++; 1142 }); 1143 } 1144 1145 }); 1146}; 1147/*var ocbInitJarallax = function(){ 1148 var iframeJS = document.getElementById('ocb-workspace-iframe'); 1149 1150 if (iframeJS == null) return; 1151 1152 var iframeDocument = iframeJS.contentDocument || iframeJS.contentWindow.document; 1153 var parallax = iframeDocument.querySelectorAll('.jarallax');
1154 var imageBackgrounds = iframeDocument.querySelectorAll('.ocb-item-background-image'); 1155 var videoBackgrounds = iframeDocument.querySelectorAll('.ocb-item-background-video'); 1156 var gradientBackgrounds = iframeDocument.querySelectorAll('.ocb-item-background-gradient'); 1157 var colorBackgrounds = iframeDocument.querySelectorAll('.ocb-item-background-color'); 1158 1159 if( iframeJS.contentWindow.jarallax == undefined || typeof iframeJS.contentWindow.jarallax != 'function' ) return; 1160 1161 iframeJS.contentWindow.jarallax(parallax, 'destroy'); 1162 iframeJS.contentWindow.jarallax(gradientBackgrounds, 'destroy'); 1163 iframeJS.contentWindow.jarallax(colorBackgrounds, 'destroy'); 1164 iframeJS.contentWindow.jarallax(imageBackgrounds, 'destroy'); 1165 iframeJS.contentWindow.jarallax(videoBackgrounds, 'destroy'); 1166 iframeJS.contentWindow.jarallax(parallax); 1167};*/ 1168var ocbInitJarallax = function( topWindow ){ 1169 if( topWindow == undefined ){ 1170 topWindow = false; 1171 } 1172 1173 var theDoc = ocbGetDocument( topWindow ); 1174 var theWindow = ocbGetWindow( topWindow ); 1175 1176 var parallax = theDoc.querySelectorAll('.jarallax'); 1177 var imageBackgrounds = theDoc.querySelectorAll('.ocb-item-background-image'); 1178 var videoBackgrounds = theDoc.querySelectorAll('.ocb-item-background-video'); 1179 var gradientBackgrounds = theDoc.querySelectorAll('.ocb-item-background-gradient'); 1180 var colorBackgrounds = theDoc.querySelectorAll('.ocb-item-background-color'); 1181 1182 if( theWindow.jarallax == undefined || typeof theWindow.jarallax != 'function' ) return; 1183 1184 theWindow.jarallax(parallax, 'destroy'); 1185 theWindow.jarallax(gradientBackgrounds, 'destroy'); 1186 theWindow.jarallax(colorBackgrounds, 'destroy'); 1187 theWindow.jarallax(imageBackgrounds, 'destroy'); 1188 theWindow.jarallax(videoBackgrounds, 'destroy'); 1189 theWindow.jarallax(parallax); 1190}; 1191var ocbReInitLayerJarallaxTimer = null; 1192var ocbReInitLayerJarallax = function(id){ 1193 clearTimeout(ocbReInitLayerJarallaxTimer); 1194 ocbReInitLayerJarallaxTimer = setTimeout(function(){ 1195 let fullId = 'row-' + id; 1196 if( id.startsWith('mod') ){ 1197 fullId = 'module-' + id; 1198 } else if( id.startsWith('col') ){ 1199 fullId = 'column-' + id; 1200 } 1201 var iframeJS = document.getElementById('ocb-workspace-iframe'); 1202 var iframeDocument = iframeJS.contentDocument || iframeJS.contentWindow.document; 1203 var parallaxWrap = iframeDocument.getElementById(fullId); 1204 1205 if( parallaxWrap == null ) return; 1206 1207 //Since jarallax adds HTML to the dom that is not controlled by React, we need to remove this HTML on save 1208 // Therefore all jarallax has the ocb-save-remove-contents class 1209 var parallax = parallaxWrap.querySelectorAll('.jarallax'); 1210 1211 if( iframeJS.contentWindow.jarallax == undefined || typeof iframeJS.contentWindow.jarallax != 'function' ) return; 1212 1213 //iframeJS.contentWindow.jarallax(parallax, 'destroy'); 1214 iframeJS.contentWindow.jarallax(parallax, 'destroy'); 1215 iframeJS.contentWindow.jarallax(parallax) 1216 }, 500, id) 1217}; 1218var ocbReInitJarallax = function(id){ 1219 console.log('ocbReInitJarallax'); 1220 1221 setTimeout(function(){ 1222 let fullId = 'row-' + id; 1223 if( id.startsWith('mod') ){ 1224 fullId = 'module-' + id; 1225 } else if( id.startsWith('col') ){ 1226 fullId = 'column-' + id; 1227 } 1228 var iframeJS = document.getElementById('ocb-workspace-iframe'); 1229 var iframeDocument = iframeJS.contentDocument || iframeJS.contentWindow.document; 1230 var parallaxWrap = iframeDocument.getElementById(fullId); 1231 1232 if( parallaxWrap == null ) return; 1233 1234 //Since jarallax adds HTML to the dom that is not controlled by React, we need to remove this HTML on save 1235 // Therefore all jarallax has the ocb-save-remove-contents class 1236 var parallax = parallaxWrap.querySelectorAll('.ocb-item-background > .ocb-save-remove-contents'); 1237 1238 //Also need to find .ocb-item-background-image items that are no longer jarallax and destroy those 1239 // so that background image size and positioning work
1240 var imageBackgrounds = parallaxWrap.querySelectorAll('.ocb-item-background-image'); 1241 var videoBackgrounds = parallaxWrap.querySelectorAll('.ocb-item-background-video'); 1242 var gradientBackgrounds = parallaxWrap.querySelectorAll('.ocb-item-background-gradient'); 1243 var colorBackgrounds = parallaxWrap.querySelectorAll('.ocb-item-background-color'); 1244 1245 if( iframeJS.contentWindow.jarallax == undefined || typeof iframeJS.contentWindow.jarallax != 'function' ) return; 1246 1247 //iframeJS.contentWindow.jarallax(parallax, 'destroy'); 1248 iframeJS.contentWindow.jarallax(parallax, 'destroy'); 1249 iframeJS.contentWindow.jarallax(gradientBackgrounds, 'destroy'); 1250 iframeJS.contentWindow.jarallax(colorBackgrounds, 'destroy'); 1251 iframeJS.contentWindow.jarallax(imageBackgrounds, 'destroy'); 1252 iframeJS.contentWindow.jarallax(videoBackgrounds, 'destroy'); 1253 iframeJS.contentWindow.jarallax(parallax) 1254 }, 500, id) 1255}; 1256 1257var ocbUpdateURLParameter = function(url, param, paramVal){ 1258 var TheAnchor = null; 1259 var newAdditionalURL = ""; 1260 var tempArray = url.split("?"); 1261 var baseURL = tempArray[0]; 1262 var additionalURL = tempArray[1]; 1263 var temp = ""; 1264 1265 if (additionalURL) 1266 { 1267 var tmpAnchor = additionalURL.split("#"); 1268 var TheParams = tmpAnchor[0]; 1269 TheAnchor = tmpAnchor[1]; 1270 if(TheAnchor) 1271 additionalURL = TheParams; 1272 1273 tempArray = additionalURL.split("&"); 1274 1275 for (var i=0; i<tempArray.length; i++) 1276 { 1277 if(tempArray[i].split('=')[0] != param) 1278 { 1279 newAdditionalURL += temp + tempArray[i]; 1280 temp = "&"; 1281 } 1282 } 1283 } 1284 else 1285 { 1286 var tmpAnchor = baseURL.split("#"); 1287 var TheParams = tmpAnchor[0]; 1288 TheAnchor = tmpAnchor[1]; 1289 1290 if(TheParams) 1291 baseURL = TheParams; 1292 } 1293 1294 if(TheAnchor) 1295 paramVal += "#" + TheAnchor; 1296 1297 var rows_txt = temp + "" + param + "=" + paramVal; 1298 return baseURL + "?" + newAdditionalURL + rows_txt; 1299}; 1300 1301jQuery( document ).ready(function( $ ) { 1302 var $body = $('body'); 1303 1304 $body.on('click', 'a[href*=\\#]', function() { 1305 if( this.hash.includes('#ftoc') ) { 1306 //Let TOC take care of it 1307 } else if( this.hash.includes('##') ){
1308 var $overlay = jQuery(this.hash.replace('##', '#')); 1309 if ( $overlay.length ) { 1310 $overlay.addClass('active'); 1311 $overlay.find('.ocb-remove-overlay').remove(); 1312 var $remove = jQuery('<div class="ocb-remove-overlay"><i class="fa fa-remove" /></div>'); 1313 $remove.on('click', function(){ 1314 $overlay.removeClass('active'); 1315 jQuery('body').removeClass('ocb-overlay-active'); 1316 }); 1317 $overlay.append($remove); 1318 jQuery('body').addClass('ocb-overlay-active').append($overlay); 1319 return false; 1320 } 1321 } else if (location.hostname == this.hostname) { 1322 var $target = jQuery(this.hash); 1323 if ($target.length) { 1324 var targetOffset = $target.offset().top; 1325 jQuery('html,body').animate({scrollTop: targetOffset}, {duration:1000,easing:'easeInOutQuart'}); 1326 return false; 1327 } 1328 } 1329 1330 }); 1331 1332 //Active Tab 1333 if( window.location.hash ){ 1334 var target = window.location.hash; 1335 var tabsObject = jQuery(window.location.hash).closest('.ocb-module-tabs'); 1336 tabsObject.find('.ocb-tab-content-item').removeClass('active'); 1337 tabsObject.find('.ocb-tab-nav-item').removeClass('active'); 1338 tabsObject.find(target).addClass('active'); 1339 tabsObject.find('.ocb-tab-nav-item[data-target="' + window.location.hash + '"]').addClass('active'); 1340 } 1341 1342 $body.on('click', '.ocb-tab-nav-item', function(){ 1343 var target = $(this).data('target'); 1344 var tabsObject = $(this).closest('.ocb-module-tabs'); 1345 $(this).siblings('.ocb-tab-nav-item').removeClass('active'); 1346 $(this).addClass('active'); 1347 tabsObject.find('.ocb-tab-content-item').removeClass('active'); 1348 tabsObject.find(target).addClass('active'); 1349 }); 1350 1351 $body.on('click', '.ocb-accordion-nav-item', function(){ 1352 var accordionObject = $(this).closest('.ocb-module-accordion'); 1353 var target = $(this).data('target'); 1354 if( $(this).hasClass('active') ){ 1355 accordionObject.find(target).removeClass('active').slideUp(); 1356 $(this).removeClass('active'); 1357 } else { 1358 accordionObject.find('.ocb-accordion-nav-item').removeClass('active'); 1359 $(this).addClass('active'); 1360 accordionObject.find('.ocb-accordion-content-item').removeClass('active').slideUp(); 1361 accordionObject.find(target).addClass('active').slideDown(); 1362 } 1363 }); 1364 1365 $body.on('click', '.ocb-gallery-item', function(){ 1366 var fullImageSrc = jQuery(this).data('image-full'); 1367 var id = jQuery(this).closest('.ocb-the-module').attr('id'); 1368 var index = jQuery(this).data('image-index'); 1369 var selectedImage = jQuery('<div class="ocb-image-view">' + 1370 '<div class="ocb-image-view-close" onclick="jQuery(this).closest(\'.ocb-image-view\').remove()"><i class="fa fa-remove" /></div>' + 1371 '<div class="ocb-image-view-image">' + 1372 '<img src="' + fullImageSrc + '" />' + 1373 '</div>' + 1374 '<div class="ocb-image-view-navigation ocb-image-view-previous" data-image-index="' + index + '" data-module-id="' + id + '" onclick="ocbChangeGalleryImage(this, true)">' + 1375 '<i class="fa fa-chevron-left" />' + 1376 '</div>' + 1377 '<div class="ocb-image-view-navigation ocb-image-view-next" data-image-index="' + index + '" data-module-id="' + id + '" onclick="ocbChangeGalleryImage(this)">' + 1378 '<i class="fa fa-chevron-right" />' + 1379 '</div>' + 1380 '</div>'); 1381 $body.append(selectedImage); 1382 }); 1383 1384 $body.on('click', '.ocb-video-modal-trigger', function(){ 1385 var modal = jQuery(this).closest('.ocb-video-modal-container').find('.ocb-video-modal'); 1386 var videoURL = jQuery(this).data('modal-url'); 1387 var isUpload = jQuery(this).data('modal-upload'); 1388 var modalClone = modal.clone(); 1389 if( isUpload ){ 1390 modalClone.find('.embed-container').append('<video auto
1390play><source src="' + videoURL + '" /></video>'); 1391 } else { 1392 modalClone.find('.embed-container').append('<iframe src="' + videoURL + '" frameBorder="0" allowFullScreen></iframe>'); 1393 } 1394 modalClone.appendTo('body').fadeIn(); 1395 }); 1396 1397 $body.on('click', '.ocb-hide-parent', function(){ 1398 jQuery(this).closest('.ocb-hide-parent-target').hide(); 1399 }); 1400 1401 $body.on('click', '.ocb-remove-parent', function(){ 1402 jQuery(this).closest('.ocb-remove-parent-target').remove(); 1403 }); 1404 1405 var $wooQuantity = jQuery('.ocb-woo-add-to-cart-quantity'); 1406 $wooQuantity.find('.qty').each(function(){ 1407 var $thisWooQuantity = jQuery(this).closest('.ocb-woo-add-to-cart-quantity'); 1408 jQuery(this).change(function(e){ 1409 var newWooVal = e.target.value; 1410 var currentWooLink = $thisWooQuantity.find('a').attr('href'); 1411 var newWooLink = ocbUpdateURLParameter(currentWooLink, 'quantity', newWooVal); 1412 $thisWooQuantity.find('a').attr( 'href', newWooLink ); 1413 }); 1414 }); 1415 1416 ocbReplaceChildClassAdd(); 1417 jQuery('.ocb-menu-desktop').css({opacity:0}).addClass('ocb-menu-visible').animate({opacity:1}); 1418 1419 setTimeout(ocbInitializePlugins,1000); 1420 1421 var myLazyLoad = new LazyLoad({ 1422 elements_selector: ".ocb-lazy:not(.d-none)", 1423 container: document.querySelector('body'), 1424 callback_set: function(el){ 1425 if( jQuery(el).is('video') && jQuery(el).hasClass('loading') ){ 1426 jQuery(el).removeClass('loading'); 1427 jQuery(el).addClass('loaded'); 1428 el.load(); 1429 1430 if( jQuery(el).hasClass('ocb-video-autoplay') ){ 1431 setTimeout(function(){ 1432 var videoPromise = el.play(); 1433 videoPromise.then(function(){ 1434 // Autoplay started! 1435 }).catch(function(error){ 1436 jQuery(el).attr('controls', 1); 1437 }); 1438 }, 100); 1439 } 1440 } 1441 } 1442 }); 1443 1444}); 1445 1446/** 1447 * Regex matchAll from http://cwestblog.com/2013/02/26/javascript-string-prototype-matchall/ 1448 * Used to grab all shortcode instances in text modules 1449 * 1450 * @param regexp 1451 * @returns {*} 1452 */ 1453String.prototype.regexMatchAll = function(regexp) { 1454 var matches = []; 1455 this.replace(regexp, function() { 1456 var arr = ([]).slice.call(arguments, 0); 1457 var extras = arr.splice(-2); 1458 arr.index = extras[0]; 1459 arr.input = extras[1]; 1460 matches.push(arr); 1461 }); 1462 return matches.length ? matches : null; 1463}; 1464 1465/** 1466 * From http://stackoverflow.com/questions/1144783/how-to-replace-all-occurrences-of-a-string-in-javascript 1467 * @param search 1468 * @param replacement 1469 * @returns {string} 1470 */ 1471String.prototype.replaceAll = function (find, replace) { 1472 var str = this; 1473 return str.replace(new RegExp(find.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'g'), replace); 1474}; 1475 1476/** 1477 * https://stackoverflow.com/questions/2332811/capitalize-words-in-string 1478 * @param lower 1479 * @returns {string} 1480 */ 1481String.prototype.capitalize = function(lower) { 1482 return (lower ? this.toLowerCase() : this).replace(/(?:^|\s)\S/g, function(a) { return a.toUpperCase(); }); 1483}; 1484 1485 1486/** 1487 * https://tc39.github.io/ecma262/#sec-array.prototype.find 1488 * polyfill for array.find 1489 */ 1490if (!Array.prototype.find) { 1491 Object.defineProperty(Array.prototype, 'find', { 1492 value: function(predicate) { 1493 // 1. Let O be ? ToObject(this value). 1494 if (this == null) { 1495 throw new TypeError('"this" is null or not defined'); 1496 } 1497 1498 var o = Object(this); 1499 1500 // 2. Let len be ? ToLength(? Get(O, "length")). 1501 var len = o.length >>> 0; 1502 1503 // 3. If IsCallable(predicate) is false, throw a TypeError exception. 1504 if (typeof predicate !== 'function') { 1505 throw new TypeError('predicate must be a function'); 1506 } 1507 1508 // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. 1509 var thisArg = arguments[1]; 1510 1511 // 5. Let k be 0. 1512 var k = 0; 1513 1514 // 6. Repeat, while k < len 1515 while (k < len) { 1516 // a. Let Pk be ! ToString(k). 1517 // b. Let kValue be ? Get(O, Pk). 1518 // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). 1519 // d. If testResult is true, return kValue. 1520 var kValue = o[k]; 1521 if (predicate.call(thisArg, kValue, k, o)) { 1522 return kValue; 1523 } 1524 // e. Increase k by 1. 1525 k++; 1526 } 1527 1528 // 7. Return undefined. 1529 return undefined; 1530 } 1531 }); 1532} 1533 1534var ocbGoogleMapStyles = { 1535 subdued: [{"featureType":"all","elementType":"geometry.fill","stylers":[{"weight":"2.00"}]},{"featureType":"all","elementType":"geometry.stroke","stylers":[{"color":"#9c9c9c"}]},{"featureType":"all","elementType":"labels.text","stylers":[{"visibility":"on"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"landscape","elementType":"geometry.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"landscape.man_made","elementType":"geometry.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},{"featureType":"road","elementType":"geometry.fill","stylers":[{"color":"#eeeeee"}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"color":"#7b7b7b"}]},{"featureType":"road","elementType":"labels.text.stroke","stylers":[{"color":"#ffffff"}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#46bcec"},{"visibility":"on"}]},{"featureType":"water","elementType":"geometry.fill","stylers":[{"color":"#c8d7d4"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"color":"#070707"}]},{"featureType":"water","elementType":"labels.text.stroke","stylers":[{"color":"#ffffff"}]}], 1536 flat: [{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"administrative.country","elementType":"geometry.fill","stylers":[{"visibility":"off"}]},{"featureType":"administrative.country","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"administrative.country","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"administrative.country","elementType":"labels.text.fill","stylers":[{"visibility":"off"}]},{"featureType":"administrative.country","elementType":"labels.text.stroke","stylers":[{"visibility":"off"}]},{"featureType":"administrative.country","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative.province","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"administrative.province","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"administrative.locality","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"poi.business","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},{"featureType":"road","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"road.highway","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"transit.station","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#485b77"},{"visibility":"on"}]}], 1537 ultraLight: [{"featureType":"water","elementType":"geometry","stylers":[{"color":"#e9e9e9"},{"lightness":17}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#f5f5f5"},{"lightness":20}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#ffffff"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#ffffff"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#ffffff"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#ffffff"},{"lightness":16}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#f5f5f5"},{"lightness":21}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#dedede"},{"lightness":21}]},{"elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#ffffff"},{"lightness":16}]},{"elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#333333"},{"lightness":40}]},{"elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#f2f2f2"},{"lightness":19}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#fefefe"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#fefefe"},{"lightness":17},{"weight":1.2}]}], 1538 midnight: [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"color":"#000000"},{"lightness":13}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#144b53"},{"lightness":14},{"weight":1.4}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#08304b"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#0c4152"},{"lightness":5}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#0b434f"},{"lightness":25}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"color":"#0b3d51"},{"lightness":16}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"}]},{"featureType":"transit","elementType":"all","stylers":[{"color":"#146474"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#021019"}]}], 1539 code: [{"featureType":"all","elementType":"all","stylers":[{"visibility":"on"}]},{"featureType":"all","elementType":"labels","stylers":[{"visibility":"off"},{"saturation":"-100"}]},{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40},{"visibility":"off"}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"off"},{"color":"#000000"},{"lightness":16}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"landscape","elementType":"geometry.fill","stylers":[{"color":"#4d6059"}]},{"featureType":"landscape","elementType":"geometry.stroke","stylers":[{"color":"#4d6059"}]},{"featureType":"landscape.natural","elementType":"geometry.fill","stylers":[{"color":"#4d6059"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"lightness":21}]},{"featureType":"poi","elementType":"geometry.fill","stylers":[{"color":"#4d6059"}]},{"featureType":"poi","elementType":"geometry.stroke","stylers":[{"color":"#4d6059"}]},{"featureType":"road","elementType":"geometry","stylers":[{"visibility":"on"},{"color":"#7f8d89"}]},{"featureType":"road","elementType":"geometry.fill","stylers":[{"color":"#7f8d89"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#7f8d89"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#7f8d89"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#7f8d89"}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"color":"#7f8d89"}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"road.local","elementType":"geometry.fill","stylers":[{"color":"#7f8d89"}]},{"featureType":"road.local","elementType":"geometry.stroke","stylers":[{"color":"#7f8d89"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#2b3638"},{"visibility":"on"}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#2b3638"},{"lightness":17}]},{"featureType":"water","elementType":"geometry.fill","stylers":[{"color":"#24282b"}]},{"featureType":"water","elementType":"geometry.stroke","stylers":[{"color":"#24282b"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels.text.stroke","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels.icon","stylers":[{"visibility":"off"}]}], 1540 mutedBlue: [{"featureType":"all","stylers":[{"saturation":0},{"hue":"#e7ecf0"}]},{"featureType":"road","stylers":[{"saturation":-70}]},{"featureType":"transit","stylers":[{"visibility":"off"}]},{"featureType":"poi","stylers":[{"visibility":"off"}]},{"featureType":"water","stylers":[{"visibility":"simplified"},{"saturation":-60}]}], 1541 lightDark: [{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"administrative.land_parcel","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"landscape.natural","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"on"},{"color":"#052366"},{"saturation":"-70"},{"lightness":"85"}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"simplified"},{"lightness":"-53"},{"weight":"1.00"},{"gamma":"0.98"}]},{"featureType":"poi","elementType":"labels.icon","stylers":[{"visibility":"simplified"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45},{"visibility":"on"}]},{"featureType":"road","elementType":"geometry","stylers":[{"saturation":"-18"}]},{"featureType":"road","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"on"}]},{"featureType":"road.arterial","elementType":"all","stylers":[{"visibility":"on"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"road.local","elementType":"all","stylers":[{"visibility":"on"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featu
1541reType":"water","elementType":"all","stylers":[{"color":"#57677a"},{"visibility":"on"}]}] 1542}; 1543 1544/*************************************************** THIRD PARTY PLUGINS ***************************************************************************/ 1545 1546/*! 1547 * Name : Just Another Parallax [Jarallax] 1548 * Version : 1.10.4 1549 * Author : nK <https://nkdev.info> 1550 * GitHub : https://github.com/nk-o/jarallax 1551 */!function(o){var n={};function i(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=o,i.c=n,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=11)}([,,function(e,t,o){"use strict";e.exports=function(e){"complete"===document.readyState||"interactive"===document.readyState?e.call():document.attachEvent?document.attachEvent("onreadystatechange",function(){"interactive"===document.readyState&&e.call()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",e)}},,function(o,e,t){"use strict";(function(e){var t;t="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},o.exports=t}).call(this,t(5))},function(e,t,o){"use strict";var n,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":i(window))&&(n=window)}e.exports=n},,,,,,function(e,t,o){e.exports=o(12)},function(e,t,o){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=l(o(2)),a=o(4),r=l(o(13));function l(e){return e&&e.__esModule?e:{default:e}}var s=a.window.jarallax;if(a.window.jarallax=r.default,a.window.jarallax.noConflict=function(){return a.window.jarallax=s,this},void 0!==a.jQuery){var c=function(){var e=arguments||[];Array.prototype.unshift.call(e,this);var t=r.default.apply(a.window,e);return"object"!==(void 0===t?"undefined":n(t))?t:this};c.constructor=r.default.constructor;var u=a.jQuery.fn.jarallax;a.jQuery.fn.jarallax=c,a.jQuery.fn.jarallax.noConflict=function(){return a.jQuery.fn.jarallax=u,this}}(0,i.default)(function(){(0,r.default)(document.querySelectorAll("[data-jarallax]"))})},function(e,j,S){"use strict";(function(e){Object.defineProperty(j,"__esModule",{value:!0});var d=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var o=[],n=!0,i=!1,a=void 0;try{for(var r,l=e[Symbol.iterator]();!(n=(r=l.next()).done)&&(o.push(r.value),!t||o.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{!n&&l.return&&l.return()}finally{if(i)throw a}}return o}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},t=function(){function n(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}}(),p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=a(S(2)),n=a(S(14)),i=S(4);
1551function a(e){return e&&e.__esModule?e:{default:e}}var s=-1<navigator.userAgent.indexOf("MSIE ")||-1<navigator.userAgent.indexOf("Trident/")||-1<navigator.userAgent.indexOf("Edge/"),r=function(){for(var e="transform WebkitTransform MozTransform".split(" "),t=document.createElement("div"),o=0;o<e.length;o++)if(t&&void 0!==t.style[e[o]])return e[o];return!1}(),b=void 0,v=void 0,l=void 0,c=!1,u=!1;function m(e){b=i.window.innerWidth||document.documentElement.clientWidth,v=i.window.innerHeight||document.documentElement.clientHeight,"object"!==(void 0===e?"undefined":p(e))||"load"!==e.type&&"dom-loaded"!==e.type||(c=!0)}m(),i.window.addEventListener("resize",m),i.window.addEventListener("orientationchange",m),i.window.addEventListener("load",m),(0,o.default)(function(){m({type:"dom-loaded"})});var f=[],y=!1;function g(){if(f.length){l=void 0!==i.window.pageYOffset?i.window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop;var t=c||!y||y.width!==b||y.height!==v,o=u||t||!y||y.y!==l;u=c=!1,(t||o)&&(f.forEach(function(e){t&&e.onResize(),o&&e.onScroll()}),y={width:b,height:v,y:l}),(0,n.default)(g)}}var h=!!e.ResizeObserver&&new e.ResizeObserver(function(e){e&&e.length&&(0,n.default)(function(){e.forEach(function(e){e.target&&e.target.jarallax&&(c||e.target.jarallax.onResize(),u=!0)})})}),x=0,w=function(){function u(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u);var o=this;o.instanceID=x++,o.$item=e,o.defaults={type:"scroll",speed:.5,imgSrc:null,imgElement:".jarallax-img",imgSize:"cover",imgPosition:"50% 50%",imgRepeat:"no-repeat",keepImg:!1,elementInViewport:null,zIndex:-100,disableParallax:!1,disableVideo:!1,automaticResize:!0,videoSrc:null,videoStartTime:0,videoEndTime:0,videoVolume:0,videoPlayOnlyVisible:!0,onScroll:null,onInit:null,onDestroy:null,onCoverImage:null};var n=o.$item.getAttribute("data-jarallax"),i=JSON.parse(n||"{}");n&&console.warn("Detected usage of deprecated data-jarallax JSON options, you should use pure data-attribute options. See info here - https://github.com/nk-o/jarallax/issues/53");var a=o.$item.dataset||{},r={};if(Object.keys(a).forEach(function(e){var t=e.substr(0,1).toLowerCase()+e.substr(1);t&&void 0!==o.defaults[t]&&(r[t]=a[e])}),o.options=o.extend({},o.defaults,i,r,t),o.pureOptions=o.extend({},o.options),Object.keys(o.options).forEach(function(e){"true"===o.options[e]?o.options[e]=!0:"false"===o.options[e]&&(o.options[e]=!1)}),o.options.speed=Math.min(2,Math.max(-1,parseFloat(o.options.speed))),(o.options.noAndroid||o.options.noIos)&&(console.warn("Detected usage of deprecated noAndroid or noIos options, you should use disableParallax option. See info here - https://github.com/nk-o/jarallax/#disable-on-mobile-devices"),o.options.disableParallax||(o.options.noIos&&o.options.noAndroid?o.options.disableParallax=/iPad|iPhone|iPod|Android/:o.options.noIos?o.options.disableParallax=/iPad|iPhone|iPod/:o.options.noAndroid&&(o.options.disableParallax=/Android/))),"string"==typeof o.options.disableParallax&&(o.options.disableParallax=new RegExp(o.options.disableParallax)),o.options.disableParallax instanceof RegExp){var l=o.options.disableParallax;o.options.disableParallax=function(){return l.test(navigator.userAgent)}}if("function"!=typeof o.options.disableParallax&&(o.options.disableParallax=function(){return!1}),"string"==typeof o.options.disableVideo&&(o.options.disableVideo=new RegExp(o.options.disableVideo)),o.options.disableVideo instanceof RegExp){var s=o.options.disableVideo;o.options.disableVideo=function(){return s.test(navigator.userAgent)}}"function"!=typeof o.options.disableVideo&&(o.options.disableVideo=function(){return!1});var c=o.options.elementInViewport;c&&"object"===(void 0===c?"undefined":p(c))&&void 0!==c.length&&(c=d(c,1)[0]);c instanceof Element||(c=null),o.options.elementInViewport=c,o.image={src:o.options.imgSrc||null,$container:null,useImgTag:!1,position:/iPad|iPhone|iPod|Android/.test(navigator.userAgent)?"absolute":"fixed"},o.initImg()&&o.canInitParallax()&&o.init()}return t(u,[{key:"css",value:function(t,o){return"string"==typeof o?i.window.getComputedStyle(t).getPropertyValue(o):(o.transform&&r&&(o[r]=o.transform),Object.keys(o).forEac
1551h(function(e){t.style[e]=o[e]}),t)}},{key:"extend",value:function(o){var n=arguments;return o=o||{},Object.keys(arguments).forEach(function(t){n[t]&&Object.keys(n[t]).forEach(function(e){o[e]=n[t][e]})}),o}},{key:"getWindowData",value:function(){return{width:b,height:v,y:l}}},{key:"initImg",value:function(){var e=this,t=e.options.imgElement;return t&&"string"==typeof t&&(t=e.$item.querySelector(t)),t instanceof Element||(t=null),t&&(e.options.keepImg?e.image.$item=t.cloneNode(!0):(e.image.$item=t,e.image.$itemParent=t.parentNode),e.image.useImgTag=!0),!!e.image.$item||(null===e.image.src&&(e.image.src=e.css(e.$item,"background-image").replace(/^url\(['"]?/g,"").replace(/['"]?\)$/g,"")),!(!e.image.src||"none"===e.image.src))}},{key:"canInitParallax",value:function(){return r&&!this.options.disableParallax()}},{key:"init",value:function(){var e=this,t={position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",pointerEvents:"none"},o={};if(!e.options.keepImg){var n=e.$item.getAttribute("style");if(n&&e.$item.setAttribute("data-jarallax-original-styles",n),e.image.useImgTag){var i=e.image.$item.getAttribute("style");i&&e.image.$item.setAttribute("data-jarallax-original-styles",i)}}if("static"===e.css(e.$item,"position")&&e.css(e.$item,{position:"relative"}),"auto"===e.css(e.$item,"z-index")&&e.css(e.$item,{zIndex:0}),e.image.$container=document.createElement("div"),e.css(e.image.$container,t),e.css(e.image.$container,{"z-index":e.options.zIndex}),s&&e.css(e.image.$container,{opacity:.9999}),e.image.$container.setAttribute("id","jarallax-container-"+e.instanceID),e.$item.appendChild(e.image.$container),e.image.useImgTag?o=e.extend({"object-fit":e.options.imgSize,"object-position":e.options.imgPosition,"font-family":"object-fit: "+e.options.imgSize+"; object-position: "+e.options.imgPosition+";","max-width":"none"},t,o):(e.image.$item=document.createElement("div"),e.image.src&&(o=e.extend({"background-position":e.options.imgPosition,"background-size":e.options.imgSize,"background-repeat":e.options.imgRepeat,"background-image":'url("'+e.image.src+'")'},t,o))),"opacity"!==e.options.type&&"scale"!==e.options.type&&"scale-opacity"!==e.options.type&&1!==e.options.speed||(e.image.position="absolute"),"fixed"===e.image.position)for(var a=0,r=e.$item;null!==r&&r!==document&&0===a;){var l=e.css(r,"-webkit-transform")||e.css(r,"-moz-transform")||e.css(r,"transform");l&&"none"!==l&&(a=1,e.image.position="absolute"),r=r.parentNode}o.position=e.image.position,e.css(e.image.$item,o),e.image.$container.appendChild(e.image.$item),e.onResize(),e.onScroll(!0),e.o
1551ptions.automaticResize&&h&&h.observe(e.$item),e.options.onInit&&e.options.onInit.call(e),"none"!==e.css(e.$item,"background-image")&&e.css(e.$item,{"background-image":"none"}),e.addToParallaxList()}},{key:"addToParallaxList",value:function(){f.push(this),1===f.length&&g()}},{key:"removeFromParallaxList",value:function(){var o=this;f.forEach(function(e,t){e.instanceID===o.instanceID&&f.splice(t,1)})}},{key:"destroy",value:function(){var e=this;e.removeFromParallaxList();var t=e.$item.getAttribute("data-jarallax-original-styles");if(e.$item.removeAttribute("data-jarallax-original-styles"),t?e.$item.setAttribute("style",t):e.$item.removeAttribute("style"),e.image.useImgTag){var o=e.image.$item.getAttribute("data-jarallax-original-styles");e.image.$item.removeAttribute("data-jarallax-original-styles"),o?e.image.$item.setAttribute("style",t):e.image.$item.removeAttribute("style"),e.image.$itemParent&&e.image.$itemParent.appendChild(e.image.$item)}e.$clipStyles&&e.$clipStyles.parentNode.removeChild(e.$clipStyles),e.image.$container&&e.image.$container.parentNode.removeChild(e.image.$container),e.options.onDestroy&&e.options.onDestroy.call(e),delete e.$item.jarallax}},{key:"clipContainer",value:function(){if("fixed"===this.image.position){var e=this,t=e.image.$container.getBoundingClientRect(),o=t.width,n=t.height;if(!e.$clipStyles)e.$clipStyles=document.createElement("style"),e.$clipStyles.setAttribute("type","text/css"),e.$clipStyles.setAttribute("id","jarallax-clip-"+e.instanceID),(document.head||document.getElementsByTagName("head")[0]).appendChild(e.$clipStyles);var i="#jarallax-container-"+e.instanceID+" {\n clip: rect(0 "+o+"px "+n+"px 0);\n clip: rect(0, "+o+"px, "+n+"px, 0);\n }";e.$clipStyles.styleSheet?e.$clipStyles.styleSheet.cssText=i:e.$clipStyles.innerHTML=i}}},{key:"coverImage",value:function(){var e=this,t=e.image.$container.getBoundingClientRect(),o=t.height,n=e.options.speed,i="scroll"===e.options.type||"scroll-opacity"===e.options.type,a=0,r=o,l=0;return i&&(a=n<0?n*Math.max(o,v):n*(o+v),1<n?r=Math.abs(a-v):n<0?r=a/n+Math.abs(a):r+=Math.abs(v-o)*(1-n),a/=2),e.parallaxScrollDistance=a,l=i?(v-r)/2:(o-r)/2,e.css(e.image.$item,{height:r+"px",marginTop:l+"px",left:"fixed"===e.image.position?t.left+"px":"0",width:t.width+"px"}),e.options.onCoverImage&&e.options.onCoverImage.call(e),{image:{height:r,marginTop:l},container:t}}},{key:"isVisible",value:function(){return this.isElementInViewport||!1}},{key:"onScroll",value:function(e){var t=this,o=t.$item.getBoundingClientRect(),n=o.top,i=o.height,a={},r=o;if(t.options.elementInViewport&&(r=t.options.elementInViewport.getBoundingClientRect()),t.isElementInViewport=0<=r.bottom&&0<=r.right&&r.top<=v&&r.left<=b,e||t.isElementInViewport){var l=Math.max(0,n),s=Math.max(0,i+n),c=Math.max(0,-n),u=Math.max(0,n+i-v),d=Math.max(0,i-(n+i-v)),p=Math.max(0,-n+v-i),m=1-2*(v-n)/(v+i),f=1;if(i<v?f=1-(c||u)/i:s<=v?f=s/v:d<=v&&(f=d/v),"opacity"!==t.options.type&&"scale-opacity"!==t.options.type&&"scroll-opacity"!==t.options.type||(a.transform="translate3d(0,0,0)",a.opacity=f),"scale"===t.options.type||"scale-opacity"===t.options.type){var y=1;t.options.speed<0?y-=t.options.speed*f:y+=t.options.speed*(1-f),a.transform="scale("+y+") translate3d(0,0,0)"}if("scroll"===t.options.type||"scroll-opacity"===t.options.type){var g=t.parallaxScrollDistance*m;"absolute"===t.image.position&&(g-=n),a.transform="translate3d(0,"+g+"px,0)"}t.css(t.image.$item,a),t.options.onScroll&&t.options.onScroll.call(t,{section:o,beforeTop:l,beforeTopEnd:s,afterTop:c,beforeBottom:u,beforeBottomEnd:d,afterBottom:p,visiblePercent:f,fromViewportCenter:m})}}},{key:"onResize",value:function(){this.coverImage(),this.clipContainer()}}]),u}(),$=function(e){("object"===("undefined"==typeof HTMLElement?"undefined":p(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":p(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)&&(e=[e]);for(var t=arguments[1],o=Array.prototype.slice.call(arguments,2),n=e.length,i=0,a=void 0;i<n;i++)if("object"===(void 0===t?"undefined":p(t))||void 0===t?e[i].jarallax||(e[i].jarallax=new w(e[i],t)):e[i].jarallax&&(a=e[i].jarallax[t].apply(e[i].jarallax,o)),void 0!==a)return a;return e};$.constructor=w,j.default=$}).call(this,S(5))},function(e,t,o){"use strict";var n=o(4),i=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||function(e){var t=+new Date,o=Math.max(0,16-(t-a)),n=setTimeout(e,o);return a=t,n},a=+new Date;var r=n.cancelAnimationFrame||n.webkitCancelAnimationFrame||n.mozCancelAnimationFrame||clearTimeout;Function.prototype.bind&&(i=i.bind(n),r=r.bind(n)),(e.exports=i).cancel=r}
1551]); 1552//# sourceMappingURL=jarallax.min.js.map 1553 1554 1555/*! 1556 * Name : Video Background Extension for Jarallax 1557 * Version : 1.0.1 1558 * Author : nK <https://nkdev.info> 1559 * GitHub : https://github.com/nk-o/jarallax 1560 */!function(o){var i={};function n(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}n.m=o,n.c=i,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([,,function(e,t,o){"use strict";e.exports=function(e){"complete"===document.readyState||"interactive"===document.readyState?e.call():document.attachEvent?document.attachEvent("onreadystatechange",function(){"interactive"===document.readyState&&e.call()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",e)}},,function(o,e,t){"use strict";(function(e){var t;t="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},o.exports=t}).call(this,t(5))},function(e,t,o){"use strict";var i,n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(i=window)}e.exports=i},function(e,t,o){e.exports=o(7)},function(e,t,o){"use strict";var i=l(o(8)),n=l(o(4)),a=l(o(2)),r=l(o(10));function l(e){return e&&e.__esModule?e:{default:e}}n.default.VideoWorker=n.default.VideoWorker||i.default,(0,r.default)(),(0,a.default)(function(){"undefined"!=typeof jarallax&&jarallax(document.querySelectorAll("[data-jarallax-video]"))})},function(e,t,o){"use strict";e.exports=o(9)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function i(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,o){return t&&i(e.prototype,t),o&&i(e,o),e}}();function i(){this._done=[],this._fail=[]}i.prototype={execute:function(e,t){var o=e.length;for(t=Array.prototype.slice.call(t);o--;)e[o].apply(null,t)},resolve:function(){this.execute(this._done,arguments)},reject:function(){this.execute(this._fail,arguments)},done:function(e){this._done.push(e)},fail:function(e){this._fail.push(e)}};var r=0,l=0,u=0,p=0,s=0,d=new i,y=new i,c=function(){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var o=this;o.url=e,o.options_default={autoplay:!1,loop:!1,mute:!1,volume:100,showContols:!0,startTime:0,endTime:0},o.options=o.extend({},o.options_default,t),o.videoID=o.parseURL(e),o.videoID&&(o.ID=r++,o.loadAPI(),o.init())}return a(i,[{key:"extend",value:function(o){var i=arguments;return o=o||{},Object.keys(arguments).forEach(function(t){i[t]&&Object.keys(i[t]).forEach(function(e){o[e]=i[t][e]})}),o}},{key:"parseURL",value:function(e){var t,o,i,n,a,r=!(!(t=e.match(/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#\&\?]*).*/))||11!==t[1].length)&&t[1],l=!(!(o=e.match(/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/))||!o[3])&&o[3],u=(i=e.split(/,(?=mp4\:|webm\:|ogv\:|ogg\:)/),n={}
1560,a=0,i.forEach(function(e){var t=e.match(/^(mp4|webm|ogv|ogg)\:(.*)/);t&&t[1]&&t[2]&&(n["ogv"===t[1]?"ogg":t[1]]=t[2],a=1)}),!!a&&n);return r?(this.type="youtube",r):l?(this.type="vimeo",l):!!u&&(this.type="local",u)}},{key:"isValid",value:function(){return!!this.videoID}},{key:"on",value:function(e,t){this.userEventsList=this.userEventsList||[],(this.userEventsList[e]||(this.userEventsList[e]=[])).push(t)}},{key:"off",value:function(o,i){var n=this;this.userEventsList&&this.userEventsList[o]&&(i?this.userEventsList[o].forEach(function(e,t){e===i&&(n.userEventsList[o][t]=!1)}):delete this.userEventsList[o])}},{key:"fire",value:function(e){var t=this,o=[].slice.call(arguments,1);this.userEventsList&&void 0!==this.userEventsList[e]&&this.userEventsList[e].forEach(function(e){e&&e.apply(t,o)})}},{key:"play",value:function(e){var t=this;t.player&&("youtube"===t.type&&t.player.playVideo&&(void 0!==e&&t.player.seekTo(e||0),YT.PlayerState.PLAYING!==t.player.getPlayerState()&&t.player.playVideo()),"vimeo"===t.type&&(void 0!==e&&t.player.setCurrentTime(e),t.player.getPaused().then(function(e){e&&t.player.play()})),"local"===t.type&&(void 0!==e&&(t.player.currentTime=e),t.player.paused&&t.player.play()))}},{key:"pause",value:function(){var t=this;t.player&&("youtube"===t.type&&t.player.pauseVideo&&YT.PlayerState.PLAYING===t.player.getPlayerState()&&t.player.pauseVideo(),"vimeo"===t.type&&t.player.getPaused().then(function(e){e||t.player.pause()}),"local"===t.type&&(t.player.paused||t.player.pause()))}},{key:"mute",value:function(){var e=this;e.player&&("youtube"===e.type&&e.player.mute&&e.player.mute(),"vimeo"===e.type&&e.player.setVolume&&e.player.setVolume(0),"local"===e.type&&(e.$video.muted=!0))}},{key:"unmute",value:function(){var e=this;e.player&&("youtube"===e.type&&e.player.mute&&e.player.unMute(),"vimeo"===e.type&&e.player.setVolume&&e.player.setVolume(e.options.volume),"local"===e.type&&(e.$video.muted=!1))}},{key:"setVolume",value:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this;t.player&&e&&("youtube"===t.type&&t.player.setVolume&&t.player.setVolume(e),"vimeo"===t.type&&t.player.setVolume&&t.player.setVolume(e),"local"===t.type&&(t.$video.volume=e/100))}},{key:"getVolume",value:function(t){var e=this;e.player?("youtube"===e.type&&e.player.getVolume&&t(e.player.getVolume()),"vimeo"===e.type&&e.player.getVolume&&e.player.getVolume().then(function(e){t(e)}),"local"===e.type&&t(100*e.$video.volume)):t(!1)}},{key:"getMuted",value:function(t){var e=this;e.player?("youtube"===e.type&&e.player.isMuted&&t(e.player.isMuted()),"vimeo"===e.type&&e.player.getVolume&&e.player.getVolume().then(function(e){t(!!e)}),"local"===e.type&&t(e.$video.muted)):t(null)}},{key:"getImageURL",value:function(t){var o=this;
1560if(o.videoImage)t(o.videoImage);else{if("youtube"===o.type){var e=["maxresdefault","sddefault","hqdefault","0"],i=0,n=new Image;n.onload=function(){120!==(this.naturalWidth||this.width)||i===e.length-1?(o.videoImage="https://img.youtube.com/vi/"+o.videoID+"/"+e[i]+".jpg",t(o.videoImage)):(i++,this.src="https://img.youtube.com/vi/"+o.videoID+"/"+e[i]+".jpg")},n.src="https://img.youtube.com/vi/"+o.videoID+"/"+e[i]+".jpg"}if("vimeo"===o.type){var a=new XMLHttpRequest;a.open("GET","https://vimeo.com/api/v2/video/"+o.videoID+".json",!0),a.onreadystatechange=function(){if(4===this.readyState&&200<=this.status&&this.status<400){var e=JSON.parse(this.responseText);o.videoImage=e[0].thumbnail_large,t(o.videoImage)}},a.send(),a=null}}}},{key:"getIframe",value:function(e){this.getVideo(e)}},{key:"getVideo",value:function(l){var u=this;u.$video?l(u.$video):u.onAPIready(function(){var e=void 0;if(u.$video||((e=document.createElement("div")).style.display="none"),"youtube"===u.type){u.playerOptions={},u.playerOptions.videoId=u.videoID,u.playerOptions.playerVars={autohide:1,rel:0,autoplay:0,playsinline:1},u.options.showContols||(u.playerOptions.playerVars.iv_load_policy=3,u.playerOptions.playerVars.modestbranding=1,u.playerOptions.playerVars.controls=0,u.playerOptions.playerVars.showinfo=0,u.playerOptions.playerVars.disablekb=1);var t=void 0,o=void 0;u.playerOptions.events={onReady:function(t){u.options.mute?t.target.mute():u.options.volume&&t.target.setVolume(u.options.volume),u.options.autoplay&&u.play(u.options.startTime),u.fire("ready",t),setInterval(function(){u.getVolume(function(e){u.options.volume!==e&&(u.options.volume=e,u.fire("volumechange",t))})},150)},onStateChange:function(e){u.options.loop&&e.data===YT.PlayerState.ENDED&&u.play(u.options.startTime),t||e.data!==YT.PlayerState.PLAYING||(t=1,u.fire("started",e)),e.data===YT.PlayerState.PLAYING&&u.fire("play",e),e.data===YT.PlayerState.PAUSED&&u.fire("pause",e),e.data===YT.PlayerState.ENDED&&u.fire("ended",e),e.data===YT.PlayerState.PLAYING?o=setInterval(function(){u.fire("timeupdate",e),u.options.endTime&&u.player.getCurrentTime()>=u.options.endTime&&(u.options.loop?u.play(u.options.startTime):u.pause())},150):clearInterval(o)}};var i=!u.$video;if(i){var n=document.createElement("div");n.setAttribute("id",u.playerID),e.appendChild(n),document.body.appendChild(e)}u.player=u.player||new window.YT.Player(u.playerID,u.playerOptions),i&&(u.$video=document.getElementById(u.playerID),u.videoWidth=parseInt(u.$video.getAttribute("width"),10)||1280,u.videoHeight=parseInt(u.$video.getAttribute("height"),10)||720)}if("vimeo"===u.type){u.playerOptions="",u.playerOptions+="player_id="+u.playerID,u.playerOptions+="&autopause=0",u.playerOptions+="&transparent=0",u.options.showContols||(u.playerOptions+="&badge=0&byline=0&portrait=0&title=0"),u.playerOptions+="&autoplay="+(u.options.autoplay?"1":"0"),u.playerOptions+="&loop="+(u.options.loop?1:0),u.$video||(u.$video=document.createElement("iframe"),u.$video.setAttribute("id",u.playerID),u.$video.setAttribute("src","https://player.vimeo.com/video/"+u.videoID+"?"+u.playerOptions),u.$video.setAttribute("frameborder","0"),e.appendChild(u.$video),document.body.appendChild(e)),u.player=u.player||new Vimeo.Player(u.$video),u.player.getVideoWidth().then(function(e){u.videoWidth=e||1280}),u.player.getVideoHeight().then(function(e){u.videoHeight=e||720}),u.options.startTime&&u.options.autoplay&&u.player.setCurrentTime(u.options.startTime),u.options.mute?u.player.setVolume(0):u.options.volume&&u.player.setVolume(u.options.volume);var a=void 0;u.player.on("timeupdate",function(e){a||(u.fire("started",e),a=1),u.fire("timeupdate",e),u.options.endTime&&u.options.endTime&&e.seconds>=u.options.endTime&&(u.options.loop?u.play(u.options.startTime):u.pause())}),u.player.on("play",function(e){u.fire("play",e),u.options.startTime&&0===e.seconds&&u.play(u.options.startTime)}),u.player.on("pause",function(e){u.fire("pause",e)}),u.player.on("ended",function(e){u.fire("ended",e)}),u.player.on("loaded",function(e){u.fire("ready",e)}),u.player.on("volumechange",function(e){u.fire("volumechange",e)})}if("local"===u.type){u.$video||(u.$video=document.createElement("video"),u.options.showContols&&(u.$video.controls=!0),u.options.mute?u.$video.muted=!0:u.$video.volume&&(u.$video.volume=u.options.volume/100),u.options.loop&&(u.$video.loop=!0),u.$video.setAttribute("playsinline",""),u.$video.setAttribute("webkit-playsinline",""),u.$video.setAttribute("id",u.playerID),e.appendChild(u.$video),document.body.appendChild(e),Object.keys(u.videoID).forEac
1560h(function(e){var t,o,i,n;t=u.$video,o=u.videoID[e],i="video/"+e,(n=document.createElement("source")).src=o,n.type=i,t.appendChild(n)})),u.player=u.player||u.$video;var r=void 0;u.player.addEventListener("playing",function(e){r||u.fire("started",e),r=1}),u.player.addEventListener("timeupdate",function(e){u.fire("timeupdate",e),u.options.endTime&&u.options.endTime&&this.currentTime>=u.options.endTime&&(u.options.loop?u.play(u.options.startTime):u.pause())}),u.player.addEventListener("play",function(e){u.fire("play",e)}),u.player.addEventListener("pause",function(e){u.fire("pause",e)}),u.player.addEventListener("ended",function(e){u.fire("ended",e)}),u.player.addEventListener("loadedmetadata",function(){u.videoWidth=this.videoWidth||1280,u.videoHeight=this.videoHeight||720,u.fire("ready"),u.options.autoplay&&u.play(u.options.startTime)}),u.player.addEventListener("volumechange",function(e){u.getVolume(function(e){u.options.volume=e}),u.fire("volumechange",e)})}l(u.$video)})}},{key:"init",value:function(){this.playerID="VideoWorker-"+this.ID}},{key:"loadAPI",value:function(){if(!l||!u){var e="";if("youtube"!==this.type||l||(l=1,e="https://www.youtube.com/iframe_api"),"vimeo"!==this.type||u||(u=1,e="https://player.vimeo.com/api/player.js"),e){var t=document.createElement("script"),o=document.getElementsByTagName("head")[0];t.src=e,o.appendChild(t),t=o=null}}}},{key:"onAPIready",value:function(e){if("youtube"===this.type&&("undefined"!=typeof YT&&0!==YT.loaded||p?"object"===("undefined"==typeof YT?"undefined":n(YT))&&1===YT.loaded?e():d.done(function(){e()}):(p=1,window.onYouTubeIframeAPIReady=function(){window.onYouTubeIframeAPIReady=null,d.resolve("done"),e()})),"vimeo"===this.type)if("undefined"!=typeof Vimeo||s)"undefined"!=typeof Vimeo?e():y.done(function(){e()});else{s=1;var t=setInterval(function(){"undefined"!=typeof Vimeo&&(clearInterval(t),y.resolve("done"),e())},20)}"local"===this.type&&e()}}]),i}();t.default=c},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:u.default.jarallax;if(void 0===e)return;var t=e.constructor,i=t.prototype.init;t.prototype.init=function(){var o=this;i.apply(o),o.video&&!o.options.disableVideo()&&o.video.getVideo(function(e){var t=e.parentNode;o.css(e,{position:o.image.position,top:"0px",left:"0px",right:"0px",bottom:"0px",width:"100%",height:"100%",maxWidth:"none",maxHeight:"none",margin:0,zIndex:-1}),o.$video=e,o.image.$container.appendChild(e),t.parentNode.removeChild(t)})};var l=t.prototype.coverImage;t.prototype.coverImage=function(){var e=this,t=l.apply(e),o=!!e.image.$item&&e.image.$item.nodeName;
1560if(t&&e.video&&o&&("IFRAME"===o||"VIDEO"===o)){var i=t.image.height,n=i*e.image.width/e.image.height,a=(t.container.width-n)/2,r=t.image.marginTop;t.container.width>n&&(n=t.container.width,i=n*e.image.height/e.image.width,a=0,r+=(t.image.height-i)/2),"IFRAME"===o&&(i+=400,r-=200),e.css(e.$video,{width:n+"px",marginLeft:a+"px",height:i+"px",marginTop:r+"px"})}return t};var o=t.prototype.initImg;t.prototype.initImg=function(){var e=this,t=o.apply(e);return e.options.videoSrc||(e.options.videoSrc=e.$item.getAttribute("data-jarallax-video")||null),e.options.videoSrc?(e.defaultInitImgResult=t,!0):t};var n=t.prototype.canInitParallax;t.prototype.canInitParallax=function(){var o=this,e=n.apply(o);if(!o.options.videoSrc)return e;var t=new r.default(o.options.videoSrc,{autoplay:!0,loop:!0,showContols:!1,startTime:o.options.videoStartTime||0,endTime:o.options.videoEndTime||0,mute:o.options.videoVolume?0:1,volume:o.options.videoVolume||0});if(t.isValid())if(e){if(t.on("ready",function(){if(o.options.videoPlayOnlyVisible){var e=o.onScroll;o.onScroll=function(){e.apply(o),o.isVisible()?t.play():t.pause()}}else t.play()}),t.on("started",function(){o.image.$default_item=o.image.$item,o.image.$item=o.$video,o.image.width=o.video.videoWidth||1280,o.image.height=o.video.videoHeight||720,o.options.imgWidth=o.image.width,o.options.imgHeight=o.image.height,o.coverImage(),o.clipContainer(),o.onScroll(),o.image.$default_item&&(o.image.$default_item.style.display="none")}),o.video=t,!o.defaultInitImgResult)return"local"!==t.type?(t.getImageURL(function(e){o.image.src=e,o.init()}),!1):(o.image.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",!0)}else o.defaultInitImgResult||t.getImageURL(function(e){var t=o.$item.getAttribute("style");t&&o.$item.setAttribute("data-jarallax-original-styles",t),o.css(o.$item,{"background-image":'url("'+e+'")',"background-position":"center","background-size":"cover"})});return e};var a=t.prototype.destroy;t.prototype.destroy=function(){var e=this;e.image.$default_item&&(e.image.$item=e.image.$default_item,delete e.image.$default_item),a.apply(e)}};var r=i(o(8)),u=i(o(4));function i(e){return e&&e.__esModule?e:{default:e}}}]); 1561 1562/*! 1563 * Name : Elements Extension for Jarallax 1564 * Version : 1.0.0 1565 * Author : nK <https://nkdev.info> 1566 * GitHub : https://github.com/nk-o/jarallax 1567 */!function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";var o=r(n(2));function r(t){return t&&t.__esModule?t:{default:t}}(0,r(n(3)).default)(),(0,o.default)(function(){"undefined"!=typeof jarallax&&jarallax(document.querySelectorAll("[data-jarallax-element]"))})},function(t,e,n){"use strict";t.exports=function(t){"complete"===document.readyState||"interactive"===document.readyState?t.call():document.attachEvent?document.attachEvent("onreadystatechange",function(){"interactive"===document.readyState&&t.call()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:i.default.jarallax;if(void 0===t)return;var e=t.constructor;["initImg","canInitParallax","init","destroy","clipContainer","coverImage","isVisible","onScroll","onResize"].forEach(function(p){var f=e.prototype[p];e.prototype[p]=function(){var t=this,e=arguments||[];
1567if("initImg"===p&&null!==t.$item.getAttribute("data-jarallax-element")&&(t.options.type="element",t.pureOptions.speed=t.$item.getAttribute("data-jarallax-element")||t.pureOptions.speed),"element"!==t.options.type)return f.apply(t,e);switch(t.pureOptions.threshold=t.$item.getAttribute("data-threshold")||"",p){case"init":var n=t.pureOptions.speed.split(" ");t.options.speed=t.pureOptions.speed||0,t.options.speedY=n[0]?parseFloat(n[0]):0,t.options.speedX=n[1]?parseFloat(n[1]):0;var o=t.pureOptions.threshold.split(" ");t.options.thresholdY=o[0]?parseFloat(o[0]):null,t.options.thresholdX=o[1]?parseFloat(o[1]):null;break;case"onResize":var r=t.css(t.$item,"transform");t.css(t.$item,{transform:""});var i=t.$item.getBoundingClientRect();t.itemData={width:i.width,height:i.height,y:i.top+t.getWindowData().y,x:i.left},t.css(t.$item,{transform:r});break;case"onScroll":var a=t.getWindowData(),s=(a.y+a.height/2-t.itemData.y-t.itemData.height/2)/(a.height/2),l=s*t.options.speedY,u=s*t.options.speedX,c=l,d=u;null!==t.options.thresholdY&&l>t.options.thresholdY&&(c=0),null!==t.options.thresholdX&&u>t.options.thresholdX&&(d=0),t.css(t.$item,{transform:"translate3d("+d+"px,"+c+"px,0)"});break;case"initImg":case"isVisible":case"clipContainer":case"coverImage":return!0}return f.apply(t,e)}})};var o,r=n(4),i=(o=r)&&o.__esModule?o:{default:o}},function(n,t,e){"use strict";(function(t){var e;e="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},n.exports=e}).call(this,e(5))},function(t,e,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(t){"object"===("undefined"==typeof window?"undefined":r(window))&&(o=window)}t.exports=o}]); 1568//# sourceMappingURL=jarallax-element.min.js.map 1569 1570/*! 1571 * imagesLoaded PACKAGED v4.1.3 1572 * JavaScript is all like "You images are done yet or what?" 1573 * MIT License 1574 */ 1575 1576!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return-1==n.indexOf(t)&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return-1!=n&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=0,o=i[n];t=t||[];for(var r=this._onceEvents&&this._onceEvents[e];o;){var s=r&&r[o];s&&(this.off(e,o),delete r[o]),o.apply(this,t),n+=s?0:1,o=i[n]}return this}},t.allOff=t.removeAllListeners=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){var t=[];if(Array.isArray(e))t=e;else if("number"==typeof e.length)for(var i=0;i<e.length;i++)t.push(e[i]);else t.push(e);return t}function o(e,t,r){return this instanceof o?("string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=n(e),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(function(){this.check()}.bind(this))):new o(e,t,r)}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEac
vendor: 10,558 bytes, lines 1576-1582
1576h(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&d[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var d={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o}); 1577 1578// ProgressBar.js 1.0.1 1579// https://kimmobrunfeldt.github.io/progressbar.js 1580// License: MIT 1581 1582!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.ProgressBar=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(b,c,d){(function(){var b=this||Function("return this")(),e=function(){"use strict";function e(){}function f(a,b){var c;for(c in a)Object.hasOwnProperty.call(a,c)&&b(c)}function g(a,b){return f(b,function(c){a[c]=b[c]}),a}function h(a,b){f(b,function(c){"undefined"==typeof a[c]&&(a[c]=b[c])})}function i(a,b,c,d,e,f,g){var h,i,k,l=f>a?0:(a-f)/e;for(h in b)b.hasOwnProperty(h)&&(i=g[h],k="function"==typeof i?i:o[i],b[h]=j(c[h],d[h],k,l));return b}function j(a,b,c,d){return a+(b-a)*c(d)}function k(a,b){var c=n.prototype.filter,d=a._filterArgs;f(c,function(e){"undefined"!=typeof c[e][b]&&c[e][b].apply(a,d)})}function l(a,b,c,d,e,f,g,h,j,l,m){v=b+c+d,w=Math.min(m||u(),v),x=w>=v,y=d-(v-w),a.isPlaying()&&(x?(j(g,a._attachment,y),a.stop(!0)):(a._scheduleId=l(a._timeoutHandler,s),k(a,"beforeTween"),b+c>w?i(1,e,f,g,1,1,h):i(w,e,f,g,d,b+c,h),k(a,"afterTween"),j(e,a._attachment,y)))}function m(a,b){var c={},d=typeof b;return"string"===d||"function"===d?f(a,function(a){c[a]=b}):f(a,function(a){c[a]||(c[a]=b[a]||q)}),c}function n(a,b){this._currentState=a||{},this._configured=!1,this._scheduleFunction=p,"undefined"!=typeof b&&this.setConfig(b)}var o,p,q="linear",r=500,s=1e3/60,t=Date.now?Date.now:function(){return+new Date},u="undefined"!=typeof SHIFTY_DEBUG_NOW?SHIFTY_DEBUG_NOW:t;p="undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame||setTimeout:setTimeout;var v,w,x,y;return n.prototype.tween=function(a){return this._isTweening?this:(void 0===a&&this._configured||this.setConfig(a),this._timestamp=u(),this._start(this.get(),this._attachment),this.resume())},n.prototype.setConfig=function(a){a=a||{},this._configured=!0,this._attachment=a.attachment,this._pausedAtTime=null,this._scheduleId=null,this._delay=a.delay||0,this._start=a.start||e,this._step=a.step||e,this._finish=a.finish||e,this._duration=a.duration||r,this._currentState=g({},a.from)||this.get(),this._originalState=this.get(),this._targetState=g({},a.to)||this.get();var b=this;this._timeoutHandler=function(){l(b,b._timestamp,b._delay,b._duration,b._currentState,b._originalState,b._targetState,b._easing,b._step,b._scheduleFunction)};var c=this._currentState,d=this._targetState;return h(d,c),this._easing=m(c,a.easing||q),this._filterArgs=[c,this._originalState,d,this._easing],k(this,"tweenCreated"),this},n.prototype.get=function(){return g({},this._currentState)},n.prototype.set=function(a){this._currentState=a},n.prototype.pause=function(){return this._pausedAtTime=u(),this._isPaused=!0,this},n.prototype.resume=function(){return this._isPaused&&(this._timestamp+=u()-this._pausedAtTime),this._isPaused=!1,this._isTweening=!0,this._timeoutHandler(),this},n.prototype.seek=function(a){a=Math.max(a,0);var b=u();return this._timestamp+a===0?this:(this._timestamp=b-a,this.isPlaying()||(this._isTweening=!0,this._isPaused=!1,l(this,this._timestamp,this._delay,this._duration,this._currentState,this._originalState,this._targetState,this._easing,this._step,this._scheduleFunction,b),this.pause()),this)},n.prototype.stop=function(a){return this._isTweening=!1,this._isPaused=!1,this._timeoutHandler=e,(b.cancelAnimationFrame||b.webkitCancelAnimationFrame||b.oCancelAnimationFrame||b.msCancelAnimationFrame||b.mozCancelRequestAnimationFrame||b.clearTimeout)(this._scheduleId),a&&(k(this,"beforeTween"),i(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),k(this,"afterTween"),k(this,"afterTweenEnd"),this._finish.call(this,this._currentState,this._attachment)),this},n.prototype.isPlaying=function(){return this._isTweening&&!this._isPaused},n.prototype.setScheduleFunction=function(a){this._scheduleFunction=a},n.prototype.dispose=function(){var a;for(a in this)this.hasOwnProperty(a)&&delete this[a]},n.prototype.filter={},n.prototype.formula={linear:function(a){return a}},o=n.prototype.formula,g(n,{now:u,each:f,tweenProps:i,tweenProp:j,applyFilter:k,shallowCopy:g,defaults:h,composeEasingObject:m}),"function"==typeof SHIFTY_DEBUG_NOW&&(b.timeoutHandler=l),"object"==typeof d?c.exports=n:"function"==typeof a&&a.amd?a(function(){return n}):"undefined"==typeof b.Tweenable&&(b.Tweenable=n),n}();!function(){e.shallowCopy(e.prototype.formula,{easeInQuad:function(a){return Math.pow(a,2)},easeOutQuad:function(a){return-(Math.pow(a-1,2)-1)},easeInOutQuad:function(a){return(a/=.5)<1?.5*Math.pow(a,2):-.5*((a-=2)*a-2)},easeInCubic:function(a){return Math.pow(a,3)},easeOutCubic:function(a){return Math.pow(a-1,3)+1},easeInOutCubic:function(a){return(a/=.5)<1?.5*Math.pow(a,3):.5*(Math.pow(a-2,3)+2)},easeInQuart:function(a){return Math.pow(a,4)},easeOutQuart:function(a){return-(Math.pow(a-1,4)-1)},easeInOutQuart:function(a){return(a/=.5)<1?.5*Math.pow(a,4):-.5*((a-=2)*Math.pow(a,3)-2)},easeInQuint:function(a){return Math.pow(a,5)},easeOutQuint:function(a){return Math.pow(a-1,5)+1},easeInOutQuint:function(a){return(a/=.5)<1?.5*Math.pow(a,5):.5*(Math.pow(a-2,5)+2)},easeInSine:function(a){return-Math.cos(a*(Math.PI/2))+1},easeOutSine:function(a){return Math.sin(a*(Math.PI/2))},easeInOutSine:function(a){return-.5*(Math.cos(Math.PI*a)-1)},easeInExpo:function(a){return 0===a?0:Math.pow(2,10*(a-1))},easeOutExpo:function(a){return 1===a?1:-Math.pow(2,-10*a)+1},easeInOutExpo:function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return-(Math.sqrt(1-a*a)-1)},easeOutCirc:function(a){return Math.sqrt(1-Math.pow(a-1,2))},easeInOutCirc:function(a){return(a/=.5)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeOutBounce:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},easeInBack:function(a){var b=1.70158;return a*a*((b+1)*a-b)},easeOutBack:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},easeInOutBack:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},elastic:function(a){return-1*Math.pow(4,-8*a)*Math.sin((6*a-1)*(2*Math.PI)/2)+1},swingFromTo:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)}
vendor: 4,147 bytes, line 1582
1582,swingFrom:function(a){var b=1.70158;return a*a*((b+1)*a-b)},swingTo:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},bounce:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},bouncePast:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?2-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?2-(7.5625*(a-=2.25/2.75)*a+.9375):2-(7.5625*(a-=2.625/2.75)*a+.984375)},easeFromTo:function(a){return(a/=.5)<1?.5*Math.pow(a,4):-.5*((a-=2)*Math.pow(a,3)-2)},easeFrom:function(a){return Math.pow(a,4)},easeTo:function(a){return Math.pow(a,.25)}})}(),function(){function a(a,b,c,d,e,f){function g(a){return((n*a+o)*a+p)*a}function h(a){return((q*a+r)*a+s)*a}function i(a){return(3*n*a+2*o)*a+p}function j(a){return 1/(200*a)}function k(a,b){return h(m(a,b))}function l(a){return a>=0?a:0-a}function m(a,b){var c,d,e,f,h,j;for(e=a,j=0;8>j;j++){if(f=g(e)-a,l(f)<b)return e;if(h=i(e),l(h)<1e-6)break;e-=f/h}if(c=0,d=1,e=a,c>e)return c;if(e>d)return d;for(;d>c;){if(f=g(e),l(f-a)<b)return e;a>f?c=e:d=e,e=.5*(d-c)+c}return e}var n=0,o=0,p=0,q=0,r=0,s=0;return p=3*b,o=3*(d-b)-p,n=1-p-o,s=3*c,r=3*(e-c)-s,q=1-s-r,k(a,j(f))}function b(b,c,d,e){return function(f){return a(f,b,c,d,e,1)}}e.setBezierFunction=function(a,c,d,f,g){var h=b(c,d,f,g);return h.displayName=a,h.x1=c,h.y1=d,h.x2=f,h.y2=g,e.prototype.formula[a]=h},e.unsetBezierFunction=function(a){delete e.prototype.formula[a]}}(),function(){function a(a,b,c,d,f,g){return e.tweenProps(d,b,a,c,1,g,f)}var b=new e;b._filterArgs=[],e.interpolate=function(c,d,f,g,h){var i=e.shallowCopy({},c),j=h||0,k=e.composeEasingObject(c,g||"linear");b.set({});var l=b._filterArgs;l.length=0,l[0]=i,l[1]=c,l[2]=d,l[3]=k,e.applyFilter(b,"tweenCreated"),e.applyFilter(b,"beforeTween");var m=a(c,i,d,f,k,j);return e.applyFilter(b,"afterTween"),m}}(),function(a){function b(a,b){var c,d=[],e=a.length;for(c=0;e>c;c++)d.push("_"+b+"_"+c);return d}function c(a){var b=a.match(v);return b?(1===b.length||a[0].match(u))&&b.unshift(""):b=["",""],b.join(A)}function d(b){a.each(b,function(a){var c=b[a];"string"==typeof c&&c.match(z)&&(b[a]=e(c))})}function e(a){return i(z,a,f)}function f(a){var b=g(a);return"rgb("+b[0]+","+b[1]+","+b[2]+")"}function g(a){return a=a.replace(/#/,""),3===a.length&&(a=a.split(""),a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),B[0]=h(a.substr(0,2)),B[1]=h(a.substr(2,2)),B[2]=h(a.substr(4,2)),B}function h(a){return parseInt(a,16)}function i(a,b,c){var d=b.match(a),e=b.replace(a,A);if(d)for(var f,g=d.length,h=0;g>h;h++)f=d.shift(),e=e.replace(A,c(f));return e}function j(a){return i(x,a,k)}function k(a){for(var b=a.match(w),c=b.length,d=a.match(y)[0],e=0;c>e;e++)d+=parseInt(b[e],10)+",";return d=d.slice(0,-1)+")"}function l(d){var e={};return a.each(d,function(a){var f=d[a];if("string"==typeof f){var g=r(f);e[a]={formatString:c(f),chunkNames:b(g,a)}}}),e}function m(b,c){a.each(c,function(a){for(var d=b[a],e=r(d),f=e.length,g=0;f>g;g++)b[c[a].chunkNames[g]]=+e[g];delete b[a]})}function n(b,c){a.each(c,function(a){var d=b[a],e=o(b,c[a].chunkNames),f=p(e,c[a].chunkNames);d=q(c[a].formatString,f),b[a]=j(d)})}function o(a,b){for(var c,d={},e=b.length,f=0;e>f;f++)c=b[f],d[c]=a[c],delete a[c];return d}function p(a,b){C.length=0;for(var c=b.length,d=0;c>d;d++)C.push(a[b[d]]);return C}function q(a,b){for(var c=a,d=b.length,e=0;d>e;e++)c=c.replace(A,+b[e].toFixed(4));return c}function r(a){return a.match(w)}function s(b,c){a.each(c,function(a){var d,e=c[a],f=e.chunkNames,g=f.length,h=b[a];if("string"==typeof h){var i=h.split(" "),j=i[i.length-1];for(d=0;g>d;d++)b[f[d]]=i[d]||j}else for(d=0;g>d;d++)b[f[d]]=h;delete b[a]})}function t(b,c){a.each(c,function(a){var d=c[a],e=d.chunkNames,f=e.length,g=b[e[0]],h=typeof g;if("string"===h){for(var i="",j=0;f>j;j++)i+=" "+b[e[j]],delete b[e[j]];b[a]=i.substr(1)}else b[a]=g})}var u=/(\d|\-|\.)/,v=/([^\-0-9\.]+)/g,w=/[0-9.\-]+/g,x=new RegExp("rgb\\("+w.source+/,\s*/.source+w.source+/,\s*/.source+w.source+"\\)","g"),y=/^.*\(/,z=/#([0-9]|[a-f]){3,6}/gi,A="VAL",B=[],C=[];a.prototype.filter.token={tweenCreated:function(a,b,c,e){d(a),d(b),d(c),this._tokenData=l(a)}
vendor: 4,132 bytes, line 1582
1582,beforeTween:function(a,b,c,d){s(d,this._tokenData),m(a,this._tokenData),m(b,this._tokenData),m(c,this._tokenData)},afterTween:function(a,b,c,d){n(a,this._tokenData),n(b,this._tokenData),n(c,this._tokenData),t(d,this._tokenData)}}}(e)}).call(null)},{}],2:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._pathString=function(a){var b=a.strokeWidth;a.trailWidth&&a.trailWidth>a.strokeWidth&&(b=a.trailWidth);var c=50-b/2;return e.render(this._pathTemplate,{radius:c,"2radius":2*c})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":8}],3:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 0,{center} L 100,{center}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 "+b.strokeWidth),a.setAttribute("preserveAspectRatio","none")},f.prototype._pathString=function(a){return e.render(this._pathTemplate,{center:a.strokeWidth/2})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":8}],4:[function(a,b,c){b.exports={Line:a("./line"),Circle:a("./circle"),SemiCircle:a("./semicircle"),Path:a("./path"),Shape:a("./shape"),utils:a("./utils")}},{"./circle":2,"./line":3,"./path":5,"./semicircle":6,"./shape":7,"./utils":8}],5:[function(a,b,c){var d=a("shifty"),e=a("./utils"),f={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},g=function h(a,b){if(!(this instanceof h))throw new Error("Constructor was called without new keyword");b=e.extend({duration:800,easing:"linear",from:{},to:{},step:function(){}},b);var c;c=e.isString(a)?document.querySelector(a):a,this.path=c,this._opts=b,this._tweenable=null;var d=this.path.getTotalLength();this.path.style.strokeDasharray=d+" "+d,this.set(0)};g.prototype.value=function(){var a=this._getComputedDashOffset(),b=this.path.getTotalLength(),c=1-a/b;return parseFloat(c.toFixed(6),10)},g.prototype.set=function(a){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(a);var b=this._opts.step;if(e.isFunction(b)){var c=this._easing(this._opts.easing),d=this._calculateTo(a,c),f=this._opts.shape||this;b(d,f,this._opts.attachment)}},g.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},g.prototype.animate=function(a,b,c){b=b||{},e.isFunction(b)&&(c=b,b={});var f=e.extend({},b),g=e.extend({},this._opts);b=e.extend(g,b);var h=this._easing(b.easing),i=this._resolveFromAndTo(a,h,f);this.stop(),this.path.getBoundingClientRect();var j=this._getComputedDashOffset(),k=this._progressToOffset(a),l=this;this._tweenable=new d,this._tweenable.tween({from:e.extend({offset:j},i.from),to:e.extend({offset:k},i.to),duration:b.duration,easing:h,step:function(a){l.path.style.strokeDashoffset=a.offset;var c=b.shape||l;b.step(a,c,b.attachment)},finish:function(a){e.isFunction(c)&&c()}})},g.prototype._getComputedDashOffset=function(){var a=window.getComputedStyle(this.path,null);return parseFloat(a.getPropertyValue("stroke-dashoffset"),10)},g.prototype._progressToOffset=function(a){var b=this.path.getTotalLength();return b-a*b},g.prototype._resolveFromAndTo=function(a,b,c){return c.from&&c.to?{from:c.from,to:c.to}:{from:this._calculateFrom(b),to:this._calculateTo(a,b)}},g.prototype._calculateFrom=function(a){return d.interpolate(this._opts.from,this._opts.to,this.value(),a)},g.prototype._calculateTo=function(a,b){return d.interpolate(this._opts.from,this._opts.to,a,b)},g.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},g.prototype._easing=function(a){return f.hasOwnProperty(a)?f[a]:a},b.exports=g},{"./utils":8,shifty:1}],6:[function(a,b,c){var d=a("./shape"),e=a("./circle"),f=a("./utils"),g=function(a,b){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius}
1582 0 1 1 {2radius},0",this.containerAspectRatio=2,d.apply(this,arguments)};g.prototype=new d,g.prototype.constructor=g,g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 50")},g.prototype._initializeTextContainer=function(a,b,c){a.text.style&&(c.style.top="auto",c.style.bottom="0",a.text.alignToBottom?f.setStyle(c,"transform","translate(-50%, 0)"):f.setStyle(c,"transform","translate(-50%, 50%)"))},g.prototype._pathString=e.prototype._pathString,g.prototype._trailString=e.prototype._trailString,b.exports=g},{"./circle":2,"./shape":7,"./utils":8}],7:[function(a,b,c){var d=a("./path"),e=a("./utils"),f="Object is destroyed",g=function h(a,b){if(!(this instanceof h))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=e.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},b,!0),e.isObject(b)&&void 0!==b.svgStyle&&(this._opts.svgStyle=b.svgStyle),e.isObject(b)&&e.isObject(b.text)&&void 0!==b.text.style&&(this._opts.text.style=b.text.style);var c,f=this._createSvgView(this._opts);if(c=e.isString(a)?document.querySelector(a):a,!c)throw new Error("Container does not exist: "+a);this._container=c,this._container.appendChild(f.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&e.setStyles(f.svg,this._opts.svgStyle),this.svg=f.svg,this.path=f.path,this.trail=f.trail,this.text=null;var g=e.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new d(f.path,g),e.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};g.prototype.animate=function(a,b,c){if(null===this._progressPath)throw new Error(f);this._progressPath.animate(a,b,c)},g.prototype.stop=function(){if(null===this._progressPath)throw new Error(f);void 0!==this._progressPath&&this._progressPath.stop()},g.prototype.destroy=function(){if(null===this._progressPath)throw new Error(f);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},g.prototype.set=function(a){if(null===this._progressPath)throw new Error(f);this._progressPath.set(a)},g.prototype.value=function(){if(null===this._progressPath)throw new Error(f);return void 0===this._progressPath?0:this._progressPath.value()},g.prototype.setText=function(a){if(null===this._progressPath)throw new Error(f);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),e.isObject(a)?(e.removeChildren(this.text),this.text.appendChild(a)):this.text.innerHTML=a},g.prototype._createSvgView=function(a){var b=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(b,a);var c=null;(a.trailColor||a.trailWidth)&&(c=this._createTrail(a),b.appendChild(c));var d=this._createPath(a);return b.appendChild(d),{svg:b,path:d,trail:c}},g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 100")},g.prototype._createPath=function(a){var b=this._pathString(a);return this._createPathElement(b,a)},g.prototype._createTrail=function(a){var b=this._trailString(a),c=e.extend({},a);return c.trailColor||(c.trailColor="#eee"),c.trailWidth||(c.trailWidth=c.strokeWidth),c.color=c.trailColor,c.strokeWidth=c.trailWidth,c.fill=null,this._createPathElement(b,c)},g.prototype._createPathElement=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg","path");return c.setAttribute("d",a),c.setAttribute("stroke",b.color),c.setAttribute("stroke-width",b.strokeWidth),b.fill?c.setAttribute("fill",b.fill):c.setAttribute("fill-opacity","0"),c},g.prototype._createTextContainer=function(a,b){var c=document.createElement("div");c.className=a.text.className;var d=a.text.style;return d&&(a.text.autoStyleContainer&&(b.style.position="relative"),e.setStyles(c,d),d.color||(c.style.color=a.color)),this._initializeTextContainer(a,b,c),c},g.prototype._initializeTextContainer=function(a,b,c){},g.prototype._pathString=function(a){throw new Error("Override this function for each progress bar")},g.prototype._trailString=function(a){throw new Error("Override this function for each progress bar")}
1582,g.prototype._warnContainerAspectRatio=function(a){if(this.containerAspectRatio){var b=window.getComputedStyle(a,null),c=parseFloat(b.getPropertyValue("width"),10),d=parseFloat(b.getPropertyValue("height"),10);e.floatEquals(this.containerAspectRatio,c/d)||(console.warn("Incorrect aspect ratio of container","#"+a.id,"detected:",b.getPropertyValue("width")+"(width)","/",b.getPropertyValue("height")+"(height)","=",c/d),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},b.exports=g},{"./path":5,"./utils":8}],8:[function(a,b,c){function d(a,b,c){a=a||{},b=b||{},c=c||!1;for(var e in b)if(b.hasOwnProperty(e)){var f=a[e],g=b[e];c&&l(f)&&l(g)?a[e]=d(f,g,c):a[e]=g}return a}function e(a,b){var c=a;for(var d in b)if(b.hasOwnProperty(d)){var e=b[d],f="\\{"+d+"\\}",g=new RegExp(f,"g");c=c.replace(g,e)}return c}function f(a,b,c){for(var d=a.style,e=0;e<p.length;++e){var f=p[e];d[f+h(b)]=c}d[b]=c}function g(a,b){m(b,function(b,c){null!==b&&void 0!==b&&(l(b)&&b.prefix===!0?f(a,c,b.value):a.style[c]=b)})}function h(a){return a.charAt(0).toUpperCase()+a.slice(1)}function i(a){return"string"==typeof a||a instanceof String}function j(a){return"function"==typeof a}function k(a){return"[object Array]"===Object.prototype.toString.call(a)}function l(a){if(k(a))return!1;var b=typeof a;return"object"===b&&!!a}function m(a,b){for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];b(d,c)}}function n(a,b){return Math.abs(a-b)<q}function o(a){for(;a.firstChild;)a.removeChild(a.firstChild)}var p="Webkit Moz O ms".split(" "),q=.001;b.exports={extend:d,render:e,setStyle:f,setStyles:g,capitalize:h,isString:i,isFunction:j,isObject:l,forEachObject:m,floatEquals:n,removeChildren:o}},{}]},{},[4])(4)}); 1583 1584/*! WOW - v1.1.3 - 2016-05-06 1585 * 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.scrollC
vendor: 5,227 bytes, line 1585
1585ontainer=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.scrollC
vendor: 10,827 bytes, lines 1585-1610
1585ontainer&&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); 1586 1587new WOW({ 1588 offset: 60 1589}).init(); 1590 1591/*! 1592 Waypoints - 4.0.1 1593 Copyright © 2011-2016 Caleb Troughton 1594 Licensed under the MIT license. 1595 https://github.com/imakewebthings/waypoints/blob/master/licenses.txt 1596 */ 1597!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.Context.refreshAll();for(var e in i)i[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s];if(null!==a.triggerPoint){var l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=Math.floor(y+l-f),h=w<s.oldScroll,p=d.triggerPoint>=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}(); 1598 1599/*! 1600 Waypoints Sticky Element Shortcut - 4.0.1 1601 Copyright © 2011-2016 Caleb Troughton 1602 Licensed under the MIT license. 1603 https://github.com/imakewebthings/waypoints/blob/master/licenses.txt 1604 */ 1605!function(){"use strict";function t(s){this.options=e.extend({},i.defaults,t.defaults,s),this.element=this.options.element,this.$element=e(this.element),this.createWrapper(),this.createWaypoint()}var e=window.jQuery,i=window.Waypoint;t.prototype.createWaypoint=function(){var t=this.options.handler;this.waypoint=new i(e.extend({},this.options,{element:this.wrapper,handler:e.proxy(function(e){var i=this.options.direction.indexOf(e)>-1,s=i?this.$element.outerHeight(!0):"";this.$wrapper.height(s),this.$element.toggleClass(this.options.stuckClass,i),t&&t.call(this,e)},this)}))},t.prototype.createWrapper=function(){this.options.wrapper&&this.$element.wrap(this.options.wrapper),this.$wrapper=this.$element.parent(),this.wrapper=this.$wrapper[0]},t.prototype.destroy=function(){this.$element.parent()[0]===this.wrapper&&(this.waypoint.destroy(),this.$element.removeClass(this.options.stuckClass),this.options.wrapper&&this.$element.unwrap())},t.defaults={wrapper:'<div class="sticky-wrapper" />',stuckClass:"stuck",direction:"down right"},i.Sticky=t}(); 1606 1607/* 1608 jQuery Easing 1609 */ 1610!function(n){"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e)}
1610):"object"==typeof module&&"object"==typeof module.exports?exports=n(require("jquery")):n(jQuery)}(function(n){function e(n){var e=7.5625,t=2.75;return n<1/t?e*n*n:n<2/t?e*(n-=1.5/t)*n+.75:n<2.5/t?e*(n-=2.25/t)*n+.9375:e*(n-=2.625/t)*n+.984375}void 0!==n.easing&&(n.easing.jswing=n.easing.swing);var t=Math.pow,u=Math.sqrt,r=Math.sin,i=Math.cos,a=Math.PI,c=1.70158,o=1.525*c,s=2*a/3,f=2*a/4.5;n.extend(n.easing,{def:"easeOutQuad",swing:function(e){return n.easing[n.easing.def](e)},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return 1-(1-n)*(1-n)},easeInOutQuad:function(n){return n<.5?2*n*n:1-t(-2*n+2,2)/2},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return 1-t(1-n,3)},easeInOutCubic:function(n){return n<.5?4*n*n*n:1-t(-2*n+2,3)/2},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return 1-t(1-n,4)},easeInOutQuart:function(n){return n<.5?8*n*n*n*n:1-t(-2*n+2,4)/2},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(n){return 1-t(1-n,5)},easeInOutQuint:function(n){return n<.5?16*n*n*n*n*n:1-t(-2*n+2,5)/2},easeInSine:function(n){return 1-i(n*a/2)},easeOutSine:function(n){return r(n*a/2)},easeInOutSine:function(n){return-(i(a*n)-1)/2},easeInExpo:function(n){return 0===n?0:t(2,10*n-10)},easeOutExpo:function(n){return 1===n?1:1-t(2,-10*n)},easeInOutExpo:function(n){return 0===n?0:1===n?1:n<.5?t(2,20*n-10)/2:(2-t(2,-20*n+10))/2},easeInCirc:function(n){return 1-u(1-t(n,2))},easeOutCirc:function(n){return u(1-t(n-1,2))},easeInOutCirc:function(n){return n<.5?(1-u(1-t(2*n,2)))/2:(u(1-t(-2*n+2,2))+1)/2}
1610,easeInElastic:function(n){return 0===n?0:1===n?1:-t(2,10*n-10)*r((10*n-10.75)*s)},easeOutElastic:function(n){return 0===n?0:1===n?1:t(2,-10*n)*r((10*n-.75)*s)+1},easeInOutElastic:function(n){return 0===n?0:1===n?1:n<.5?-(t(2,20*n-10)*r((20*n-11.125)*f))/2:t(2,-20*n+10)*r((20*n-11.125)*f)/2+1},easeInBack:function(n){return(c+1)*n*n*n-c*n*n},easeOutBack:function(n){return 1+(c+1)*t(n-1,3)+c*t(n-1,2)},easeInOutBack:function(n){return n<.5?t(2*n,2)*(7.189819*n-o)/2:(t(2*n-2,2)*((o+1)*(2*n-2)+o)+2)/2},easeInBounce:function(n){return 1-e(1-n)},easeOutBounce:e,easeInOutBounce:function(n){return n<.5?(1-e(1-2*n))/2:(1+e(2*n-1))/2}})}); 1611 1612/* 1613 https://github.com/verlok/lazyload#api 1614 */ 1615var _extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.LazyLoad=e()}(this,function(){"use strict";function t(t,e,n){var o=e._settings;!n&&i(t)||(C(o.callback_enter,t),R.indexOf(t.tagName)>-1&&(N(t,e),I(t,o.class_loading)),E(t,e),a(t),C(o.callback_set,t))}var e={elements_selector:"img",container:document,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,callback_load:null,callback_error:null,callback_set:null,callback_enter:null,callback_finish:null,to_webp:!1},n=function(t){return _extends({},e,t)},o=function(t,e){return t.getAttribute("data-"+e)},r=function(t,e,n){var o="data-"+e;null!==n?t.setAttribute(o,n):t.removeAttribute(o)},a=function(t){return r(t,"was-processed","true")},i=function(t){return"true"===o(t,"was-processed")},s=function(t,e){return r(t,"ll-timeout",e)},c=function(t){return o(t,"ll-timeout")},l=function(t){return t.filter(function(t){return!i(t)})},u=function(t,e){return t.filter(function(t){return t!==e})},d=function(t,e){var n,o=new t(e);try{n=new CustomEvent("LazyLoad::Initialized",{detail:{instance:o}})}catch(t){(n=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:o})}window.dispatchEvent(n)},f=function(t,e){return e?t.replace(/\.(jpe?g|png)/gi,".webp"):t},_="undefined"!=typeof window,v=_&&!("onscroll"in window)||/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),g=_&&"IntersectionObserver"in window,h=_&&"classList"in document.createElement("p"),b=_&&function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))&&0===t.toDataURL("image/webp").indexOf("data:image/webp")}(),m=function(t,e,n,r){for(var a,i=0;a=t.children[i];i+=1)if("SOURCE"===a.tagName){var s=o(a,n);p(a,e,s,r)}},p=function(t,e,n,o){n&&t.setAttribute(e,f(n,o))},y=function(t,e){var n=b&&e.to_webp,r=o(t,e.data_src),a=o(t,e.data_bg);if(r){var i=f(r,n);t.style.backgroundImage='url("'+i+'")'}if(a){var s=f(a,n);t.style.backgroundImage=s}},w={IMG:function(t,e){var n=b&&e.to_webp,r=e.data_srcset,a=t.parentNode;a&&"PICTURE"===a.tagName&&m(a,"srcset",r,n);var i=o(t,e.data_sizes);p(t,"sizes",i);var s=o(t,r);p(t,"srcset",s,n);var c=o(t,e.data_src);p(t,"src",c,n)},IFRAME:function(t,e){var n=o(t,e.data_src);p(t,"src",n)},VIDEO:function(t,e){var n=e.data_src,r=o(t,n);m(t,"src",n),p(t,"src",r),t.load()}},E=function(t,e){var n=e._settings,o=t.tagName,r=w[o];if(r)return r(t,n),e._updateLoadingCount(1),void(e._elements=u(e._elements,t));y(t,n)},I=function(t,e){h?t.classList.add(e):t.className+=(t.className?" ":"")+e},L=function(t,e){h?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},C=function(t,e){t&&t(e)},O=function(t,e,n){t.addEventListener(e,n)},k=function(t,e,n){t.removeEventListener(e,n)},x=function(t,e,n){O(t,"load",e),O(t,"loadeddata",e),O(t,"error",n)},A=function(t,e,n){k(t,"load",e),k(t,"loadeddata",e),k(t,"error",n)},z=function(t,e,n){var o=n._settings,r=e?o.class_loaded:o.class_error,a=e?o.callback_load:o.callback_error,i=t.target;L(i,o.class_loading),I(i,r),C(a,i),n._updateLoadingCount(-1)},N=function(t,e){var n=function n(r){z(r,!0,e),A(t,n,o)},o=function o(r){z(r,!1,e),A(t,n,o)};x(t,n,o)},R=["IMG","IFRAME","VIDEO"],S=function(e,n,o){t(e,o),n.unobserve(e)},M=function(t){var e=c(t);e&&(clearTimeout(e),s(t,null))},j=function(t,e,n){var o=n._settings.load_delay,r=c(t);r||(r=setTimeout(function(){S(t,e,n),M(t)},o),s(t,r))},D=function(t){return t.isIntersecting||t.intersectionRatio>0},T=function(t){return{root:t.container===document?null:t.container,rootMargin:t.thresholds||t.threshold+"px"}},U=function(t,e){this._settings=n(t),this._setObserver(),this._loadingCount=0,this.update(e)};return U.prototype={_manageIntersection:function(t){var e=this._observer,n=this._settings.load_delay,o=t.target;n?D(t)?j(o,e,this):M(o):D(t)&&S(o,e,this)},_onIntersection:function(t){t.forEach(this._manageIntersection.bind(this))},_setObserver:function(){g&&(this._observer=new IntersectionObserver(this._onIntersection.bind(this),T(this._settings)))},_updateLoadingCount:function(t){this._loadingCount+=t,0===this._elements.length&&0===this._loadingCount&&C(this._settings.callback_finish)},update:function(t){var e=this,n=this._settings,o=t||n.container.querySelectorAll(n.elements_selector);this._elements=l(Array.prototype.slice.call(o)),!v&&this._observer?this._elements.forEac
1615h(function(t){e._observer.observe(t)}):this.loadAll()},destroy:function(){var t=this;this._observer&&(this._elements.forEach(function(e){t._observer.unobserve(e)}),this._observer=null),this._elements=null,this._settings=null},load:function(e,n){t(e,this,n)},loadAll:function(){var t=this;this._elements.forEach(function(e){t.load(e)})}},_&&function(t,e){if(e)if(e.length)for(var n,o=0;n=e[o];o+=1)d(t,n);else d(t,e)}(U,window.lazyLoadOptions),U}); 1616 1617/* 1618 https://www.cssscript.com/touch-friendly-image-comparison-slider-javascript/ 1619 */ 1620var ocbInitBeforeAfter = function() { 1621 1622 var elsH = document.querySelectorAll(".ocb-image-splitter .ocb-image-splitter-mover"); 1623 var i = elsH.length; 1624 while (i--) { 1625 var moverWidth = elsH[i].getBoundingClientRect().width; 1626 var imgLeft = elsH[i].nextElementSibling; 1627 var imgRight = imgLeft.nextElementSibling; 1628 var width = imgRight.getBoundingClientRect().width; 1629 var height = imgRight.getBoundingClientRect().height; 1630 elsH[i].style.left = width / 2 - moverWidth / 2 + 'px'; 1631 //imgLeft.style.clip = "rect(0px, " + width / 2 + "px, " + height + "px, 0px)"; 1632 imgLeft.style.clip = "rect(0px, " + width / 2 + "px, 9999px, 0px)"; 1633 var mouseDownX = 0; 1634 var X; 1635 elsH[i].addEventListener("mousedown", function(e) { 1636 X = e.clientX; 1637 mouseDownX = 1; 1638 }); 1639 elsH[i].addEventListener("mouseup", function(e) { 1640 mouseDownX = 0; 1641 }); 1642 elsH[i].addEventListener("mouseout", function(e) { 1643 mouseDownX = 0; 1644 }); 1645 1646 elsH[i].addEventListener("touchstart", function(e) { 1647 X = e.touches[0].clientX; 1648 mouseDownX = 1; 1649 }); 1650 elsH[i].addEventListener("touchend", function(e) { 1651 mouseDownX = 0; 1652 }); 1653 1654 elsH[i].addEventListener("mousemove", function(e) { 1655 if (mouseDownX) { 1656 this.style.left = parseInt(this.style.left) + (event.clientX - X) + "px"; 1657 X = event.clientX; 1658 this.nextElementSibling.style.clip = "rect(0px, " + (this.getBoundingClientRect().width / 2 + parseInt(this.style.left)) + "px, " + this.getBoundingClientRect().height + "px, 0px)"; 1659 } 1660 }); 1661 1662 elsH[i].addEventListener("touchmove", function(e) { 1663 if (mouseDownX) { 1664 this.style.left = parseInt(this.style.left) + (e.touches[0].clientX - X) + "px"; 1665 X = e.touches[0].clientX; 1666 this.nextElementSibling.style.clip = "rect(0px, " + (this.getBoundingClientRect().width / 2 + parseInt(this.style.left)) + "px, " + this.getBoundingClientRect().height + "px, 0px)"; 1667 } 1668 }); 1669 } 1670 1671 window.addEventListener("resize", function(f) { 1672 var elsHre = document.querySelectorAll(".ocb-image-splitter .ocb-image-splitter-mover"); 1673 var ii = elsHre.length; 1674 while (ii--) { 1675 var moverWidth = elsHre[ii].getBoundingClientRect().width; 1676 var imgLeft = elsHre[ii].nextElementSibling; 1677 var imgRight = imgLeft.nextElementSibling; 1678 var width = imgRight.getBoundingClientRect().width; 1679 var height = imgRight.getBoundingClientRect().height; 1680 elsHre[ii].style.left = width / 2 - moverWidth / 2 + 'px'; 1681 imgLeft.style.clip = "rect(0px, " + width / 2 + "px, " + height + "px, 0px)"; 1682 } 1683 }); 1684 1685};
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.