1/** 2 * Digital Summit theme JS 3 */ 4 5// Reamaze support code 6var _support = _support || { 'ui': {}, 'user': {} }; 7_support['account'] = 'startup-valencia'; 8_support['ui']['contactMode'] = 'traditional'; 9_support['ui']['enableKb'] = 'true'; 10_support['ui']['styles'] = { 11 widgetColor: 'rgb(76, 9, 243)', 12 gradient: true, 13}; 14_support['ui']['shoutboxFacesMode'] = 'default'; 15_support['ui']['shoutboxHeaderLogo'] = false; 16_support['apps'] = { 17 faq: {"enabled":true}, 18 recentConversations: {}, 19 orders: {} 20}; 21 22(function ($) { 23 "use strict"; 24 25 $( function () { 26 27 // Home image selector 28 var $imageSelectorWrapper = $('.home-image-selector-wrapper'), 29 $imageSelector = $('#home-image-selector'); 30 31 $imageSelectorWrapper.on('click', '.btn-container a', function (evt) { 32 33 evt.preventDefault(); 34 35 var $button = $(this), 36 rel = $button.attr('rel'); 37 38 $button.parent().parent().find('a.active').removeClass('active'); 39 $button.addClass('active'); 40 41 $imageSelector.find('div').each(function (index, elem) { 42 43 var $imgDiv = $(elem); 44 45 if ($imgDiv.attr('id') === rel) { 46 $imgDiv.css('transform', 'translateY(' + (-100 * index) + '%)'); 47 } 48 else { 49 $imgDiv.css('transform', 'none'); 50 } 51 52 }); 53 54 }); 55 56 // Put the focus on the first link. 57 $imageSelectorWrapper.find('a').first().addClass('active'); 58 59 // Scroll to the top tabs when clicking the "View Afternoon" and "View Morning" buttons. 60 $('.btn[href="#afternoon"], .btn[href="#morning"]').click(function () { 61 $('.nav-tabs').get(0).scrollIntoView({block: 'end', behavior: 'smooth'}); 62 }); 63 64 // Fix Uncode's menu height issue on some pages. 65 window.dispatchEvent(new Event('lateral_resize')); 66 67 /** 68 * Marquee JS 69 */ 70 $('.br-marquee-js').each(function (index, elem) { 71 72 const $elem = $(elem), 73 $children = $elem.children(), 74 firstChild = $elem.children().get(0), 75 speed = 0.2; 76 77 // Clone the children x2. 78 $elem.append($children.clone()); 79 $elem.append($children.clone()); 80 81 let i = 0; 82 83 setInterval(function () { 84 firstChild.style.marginLeft = `-${i}px`; 85 if (i > firstChild.clientWidth) { 86 i = 0; 87 } 88 i = i + speed; 89 }, 0); 90 91 }); 92 93 /** 94 * Async vimeo background videos. 95 */ 96 const resizeVideo = function ($videoWrapper) { 97 98 var width = $videoWrapper.outerWidth(), 99 pWidth, // player width, to be defined 100 height = $videoWrapper.outerHeight(), 101 pHeight, // player height, tbd 102 $tubularPlayer = $videoWrapper.find('iframe'), 103 ratio = $videoWrapper.data('ratio'), 104 heightOffset = 80, 105 widthOffset = heightOffset * ratio; 106 107 // When screen aspect ratio differs from video, video must center and underlay one dimension 108 if ($tubularPlayer.length) { 109 if (width / ratio < height) { // if new video height < window height (gap underneath) 110 pWidth = Math.ceil((height + heightOffset) * ratio); // get new player width 111 $tubularPlayer.css('width', pWidth + widthOffset + 'px'); 112 $tubularPlayer.css('height', height + heightOffset + 'px'); 113 $tubularPlayer.css('left', ((width - pWidth) / 2) - (widthOffset / 2) + 'px'); 114 $tubularPlayer.css('top', '-' + (heightOffset / 2) + 'px'); 115 $tubularPlayer.css('position', 'absolute'); 116 } 117 // new video width < window width (gap to right) 118 else { 119 pHeight = Math.ceil(width / ratio); // get new player height 120 $tubularPlayer.css('width', width + widthOffset + 'px'); 121 $tubularPlayer.css('height', pHeight + heightOffset + 'px'); 122 $tubularPlayer.css('left', '-' + (widthOffset / 2) + 'px'); 123 $tubularPlayer.css('top', ((height - pHeight) / 2) - (heightOffset / 2) + 'px'); 124 $tubularPlayer.css('position', 'absolute'); 125 } 126 } 127 128 }; 129 130 /*$( '[id^="row-bg-vimeo"]' ).each( function( index, elem ) { 131 132 const $row = $(elem), 133 vimeoId = parseInt( $row.attr('id').replace('row-bg-vimeo-', '') ), 134 $bgWrapper = $row.find( '.row-background .background-wrapper' ), 135 $bgImageContainer = $bgWrapper.find( '.background-inner' ), 136 $videoWrapper = $( `
137 <lite-vimeo videoid="${ vimeoId }" autoload autoplay style="background-image: url('https://i.vimeocdn.com/video/${ vimeoId }.webp?mw=1280&mh=720&q=70');"></lite-vimeo> 138 `); 139 140 if ( !isNaN( vimeoId ) ) { 141 $bgWrapper.prepend( $videoWrapper ); 142 $bgImageContainer.remove(); 143 } 144 145 } );*/ 146 147 $('[id^="row-bg-vimeo"]').each(function (index, elem) { 148 149 const $row = $(elem), 150 vimeoId = parseInt($row.attr('id').replace('row-bg-vimeo-', '')), 151 $bgWrapper = $row.find('.row-background .background-wrapper'), 152 $bgImageContainer = $bgWrapper.find('.background-inner'), 153 $videoWrapper = $(` 154 <div class="background-inner video uncode-video-container uncode-kburns" 155 data-ignore="" data-ratio="1.7758985200846" data-provider="vimeo" 156 data-video="https://vimeo.com/${vimeoId}" data-id="${vimeoId}" 157 style="background-repeat: no-repeat; background-position: center center; background-attachment: scroll; background-size: cover; opacity: 1;" 158 > 159 <iframe 160 data-src="//player.vimeo.com/video/${vimeoId}?background=1&api=1&title=0&byline=0&portrait=0&playbar=0&loop=1&autoplay=1&player_id=okplayer-${vimeoId}" 161 frameborder="0" id="okplayer-${vimeoId}" 162 style="visibility: visible; min-width: 100vw; height: 100vh; position: absolute; opacity: 1;" 163 class="vimeo-background" webkitallowfullscreen="" mozallowfullscreen="" 164 allowfullscreen="" src="//player.vimeo.com/video/${vimeoId}?background=1&api=1&title=0&byline=0&portrait=0&playbar=0&loop=1&autoplay=1&player_id=okplayer-${vimeoId}" 165 data-ready="true" 166 ></iframe> 167 </div> 168 `); 169 170 if (!isNaN(vimeoId)) { 171 172 // Add 3s delay to load the video. 173 setTimeout(function () { 174 175 $bgWrapper.prepend($videoWrapper); 176 177 const $iframe = $videoWrapper.find('iframe'); 178 179 if (typeof Vimeo !== 'undefined') { 180 const player = new Vimeo.Player($iframe.get(0)); 181 182 // Remove the bg image once the video is loaded. 183 player.on('play', function () { 184 $bgImageContainer.remove(); 185 }); 186 187 } 188 189 // Resize the video. 190 resizeVideo($videoWrapper); 191 192 }, 3000); 193 194 } 195 196 $(window).on('resize', function () { 197 const $videoWrapper = $('.background-inner.uncode-video-container'); 198 199 if ($videoWrapper.length) { 200 resizeVideo($videoWrapper); 201 } 202 }); 203 204 }); 205 206 207 /** 208 * Spline 3d animation 209 */ 210 setTimeout(function () { 211 212 const $splineContainer = $('.br-3d-container'); 213 if ($splineContainer.length && !$splineContainer.find('iframe').length) { 214 $splineContainer.append(` 215 <div class="br-3d"> 216 <iframe src="https://my.spline.design/vdssymbol-3aa32c5e5bb944548525ce7de4e3dff9/" frameborder="0" width="160px" height="160px"></iframe> 217 </div> 218 `); 219 } 220 221 }, 2000); 222 223 /** 224 * VDS Speaker 2024 loop functionality 225 */ 226 227 // Prepend the "Show All" filter to the speakers filters. 228 const prependShowAll = () => { 229 230 const $speakersContainer = $('#vds-speakers'); 231 232 if ( $speakersContainer.length ) { 233 234 const $filtersContainer = $speakersContainer.find('.term-filters .term-filters-list'); 235 236 $filtersContainer.find( '.term-filter' ).each( ( index, element ) => { 237 const $el = $(element); 238 $el.addClass( 'term-' + slugify( $el.find('.swatch-type-label').text())); 239 }); 240 241 if ($filtersContainer.length && !$filtersContainer.find('.term-show-all').length) { 242 243 const termActive = $filtersContainer.find('.term-filter-link--active').length ? '' : ' term-filter-link--active'; 244 245 $filtersContainer.prepend(`<li class="term-filter no-evts li-hover term-show-all"> 246 <a href="${location.pathname}" class="term-filter-link${termActive}" title=""> 247 <div class="swatch swatch--single swatch-type-label">Show All</div> 248 </a></li>`); 249 250 } 251 252 $filtersContainer.css( 'opacity', 1 ); 253 254 } 255 } 256 257 // After loading a speakers filter, add the params to all the single speaker links. 258 const addParamsToLinks = () => { 259 260 const $speakersContainer = $('#vds-speakers'); 261 262 if ( $speakersContainer.length && window.location.search ) { 263 $speakersContainer.find( '.tmb' ).each( ( index, elem ) => { 264 265 const $link = $(elem).find( 'a' ), 266 href = $link.attr( 'href' ); 267 268 $link.attr( 'href', href + window.location.search ); 269 270 } ); 271 } 272 } 273 274 prependShowAll(); 275 addParamsToLinks(); 276 277 $(window).on('uncode-ajax-pre-filtered', () => { 278 prependShowAll(); 279 addParamsToLinks(); 280 }); 281 282 }); 283 284 // Support back history 285 const baseURL = document.location.protocol + '//' + document.location.hostname + '/support/'; 286 287 if ( document.location.href === baseURL ) { 288 window.navigation.addEventListener("navigate", (event) => { 289 290 if ( event.destination.url === baseURL ) { 291 $('.vds-support-back').hide(); 292 } 293 else { 294 $('.vds-support-back').show(); 295 } 296 297 }) 298 } 299 300 /** 301 * Converts a string in a slug 302 * @param str 303 * @returns {string} 304 */ 305 function slugify(str) { 306 str = str.replace(/^\s+|\s+$/g, ''); // trim leading/trailing white space 307 str = str.toLowerCase(); // convert string to lowercase 308 str = str.replace(/[^a-z0-9 -]/g, '') // remove any non-alphanumeric characters 309 .replace(/\s+/g, '-') // replace spaces with hyphens 310 .replace(/-+/g, '-'); // remove consecutive hyphens 311 return str; 312 } 313 314})(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.