1"use strict"; 2 3function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 4 5/*********************************************** 6 * INIT THIRD PARTY SCRIPTS 7 ***********************************************/ 8(function ($) { 9 'use strict'; 10 /** 11 * ImagesLoaded 12 */ 13 14 VLTJS.document.imagesLoaded().done(function () { 15 VLTJS.document.trigger('images.loaded'); 16 }); 17 /** 18 * Preloader 19 */ 20 21 VLTJS.document.on('images.loaded', function () { 22 setTimeout(function () { 23 $('.preloader').fadeOut(150); 24 }, 300); 25 }); 26 /** 27 * Object fit image 28 */ 29 30 if ('undefined' !== typeof window.objectFitImages) { 31 window.objectFitImages(); 32 } 33 /** 34 * Close magnificPopup 35 */ 36 37 38 VLTJS.document.on('keyup', function (e) { 39 if (27 === e.keyCode) { 40 $.magnificPopup.close(); 41 } 42 }); 43 VLTJS.document.on('click', '.popup-modal-dismiss', function (e) { 44 e.preventDefault(); 45 $.magnificPopup.close(); 46 }); 47 $('.image-link').magnificPopup({ 48 type: 'image', 49 mainClass: 'mfp-fade', 50 removalDelay: 160, 51 preloader: false 52 }); 53 $('.video-link').magnificPopup({ 54 disableOn: 700, 55 type: 'iframe', 56 mainClass: 'mfp-fade', 57 removalDelay: 160, 58 preloader: false, 59 fixedContentPos: false 60 }); 61 $('.gallery-wrapper').magnificPopup({ 62 delegate: '.gallery-item', 63 // child items selector, by clicking on it popup will open 64 type: 'image', 65 mainClass: 'mfp-fade', 66 removalDelay: 160, 67 preloader: false, 68 gallery: { 69 enabled: true 70 } 71 }); 72 $('.popup-inline').magnificPopup(_defineProperty({ 73 type: 'inline', 74 mainClass: 'mfp-fade', 75 removalDelay: 160, 76 preloader: false, 77 fixedContentPos: true, 78 fixedBgPos: true, 79 alignTop: true, 80 showCloseBtn: false 81 }, "preloader", false)); 82 /** 83 * Half footer section 84 */ 85 86 function half_footer_section() { 87 $('.half-section-block').each(function () { 88 var $thisSection = $(this), 89 prevSection = $($thisSection.data('prev-id')), 90 nextSection = $($thisSection.data('next-id')), 91 tempPB = parseFloat(prevSection.css('padding-bottom')) || 0, 92 tempPT = parseFloat(nextSection.css('padding-top')) || 0, 93 rect, 94 rectHeight; 95 VLTJS.debounceResize(function () { 96 rect = $thisSection[0].getBoundingClientRect(); 97 rectHeight = rect.height * 0.5; 98 $thisSection[0].style.setProperty('margin-top', -rectHeight + 'px'); 99 100 if (tempPB > 0) { 101 prevSection[0].style.setProperty('padding-bottom', rectHeight + tempPB + 'px', 'important'); 102 } 103 104 if (tempPT > 0) { 105 nextSection[0].style.setProperty('padding-top', rectHeight + tempPT + 'px', 'important'); 106 } 107 108 VLTJS.document.trigger('half.resize'); 109 }); 110 }); 111 } 112 113 half_footer_section(); 114 /** 115 * Add active class to parent menu 116 */ 117 118 $('ul.navbar-nav li.nav-item.active').parents('li.nav-item').addClass('active'); 119 /** 120 * Docs 121 */ 122 123 if ($('.sticky-top').length) { 124 $('.sticky-top').parents('.overflow-hidden').removeClass('overflow-hidden'); 125 } 126 127 VLTJS.document.on('click', '[href]', function (e) { 128 var $this = $(this); 129 130 if ($this.parents('.sticky-left').length) { 131 e.preventDefault(); 132 var linkStr = $this.attr('href'), 133 section = $(linkStr); 134 135 if (linkStr.indexOf('#') !== -1 && section.length) { 136 $('.nav-link').removeClass('active'); 137 $('a[href="' + linkStr + '"]').addClass('active'); 138 $('.tab-content').removeClass('show'); 139 section.addClass('show'); 140 } 141 } 142 }); 143})(jQuery);
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.