1'use strict'; 2 3function animateHeading($scope) { 4 if( $scope.data('settings') && $scope.data('settings')._animation && $scope.data('settings')._animation == 'neuros_heading_animation') { 5 $scope.find('.neuros-heading-content').html($scope.find('.neuros-heading-content').html().replace(/(^|<\/?[^>]+>|\s+)([^\s<]+)/g, '$1<span class="word">$2</span>')); 6 // $scope.find('.neuros-heading-content').contents().each(function() { 7 // if(this.nodeType === 3) { 8 // jQuery(this).wrap('<span></span>'); 9 // } 10 // }); 11 $scope.find('.neuros-heading-content .word').contents().each(function() { 12 if(this.nodeType === 3) { 13 jQuery(this).parent().html(jQuery(this).text().replace(/\S/g, '<span class="letter">$&</span>')); 14 } 15 }); 16 $scope.find('.neuros-heading-content .letter').each(function(index) { 17 jQuery(this).css('animation-delay', index / 50 + 's'); 18 }); 19 } 20} 21 22function initModernProjects($el) { 23 $el.find('.project-modern-listing .project-item-wrapper').first().addClass('active'); 24 $el.find('.project-modern-listing .project-item-modern-header').on('click', function() { 25 var $projectItem = jQuery(this).closest('.project-item-wrapper'); 26 $projectItem.addClass('active'); 27 $projectItem.find('.project-item-modern-content').slideDown(400); 28 $projectItem.siblings().removeClass('active'); 29 $projectItem.siblings().find('.project-item-modern-content').slideUp(400); 30 }); 31} 32 33function playProjectsSliderAudio($el) { 34 $el.find('.project-listing-wrapper.project-slider-listing.content-type-audio').on('click', '.play-audio', function() { 35 jQuery(this).closest('.owl-item').siblings().find('.project-audio-wrapper audio').each(function() { 36 jQuery(this)[0].pause(); 37 jQuery(this)[0].currentTime = 0; 38 jQuery(this).siblings('.play-audio').removeClass('active'); 39 }); 40 var audioElement = jQuery(this).siblings('audio')[0]; 41 if(audioElement.paused) { 42 jQuery(this).addClass('active'); 43 audioElement.play(); 44 } else { 45 audioElement.pause(); 46 audioElement.currentTime = 0; 47 jQuery(this).removeClass('active'); 48 } 49 }); 50} 51 52function playListingAudio($el) { 53 $el.find('.neuros-audio-listing').on('click', '.audio-item', function() { 54 jQuery(this).closest('.audio-item-wrapper').siblings().find('.audio-item').each(function() { 55 jQuery(this).removeClass('active'); 56 jQuery(this).find('audio')[0].pause(); 57 jQuery(this).find('audio')[0].currentTime = 0; 58 }); 59 var audioElement = jQuery(this).find('audio')[0]; 60 if(audioElement.paused) { 61 jQuery(this).addClass('active'); 62 audioElement.play(); 63 } else { 64 audioElement.pause(); 65 audioElement.currentTime = 0; 66 jQuery(this).removeClass('active'); 67 } 68 }); 69} 70 71function handleProjectsExcerptHeight() { 72 jQuery('.project-listing-wrapper.project-slider-listing:not(.content-type-audio) .project-item').each(function() { 73 const item = jQuery(this); 74 const excerpt = jQuery(this).find('.post-excerpt-wrapper'); 75 excerpt.hide(); 76 item.on('mouseenter', function() { 77 excerpt.delay(300).slideDown(300); 78 }); 79 item.on('mouseleave', function() { 80 excerpt.slideUp(300); 81 }); 82 }); 83} 84 85function initCardsProjects($scope) { 86 jQuery('.body-container').css({ 87 overflow: 'clip' 88 }); 89 const { ScrollObserver, valueAtPercentage } = aat; 90 const cardsContainer = $scope.find('.project-cards-listing'); 91 const cards = $scope.find('.project-cards-listing .project-item-wrapper'); 92 cards.each(function(index) { 93 if (index === cards.length - 1) { 94 return; 95 } 96 const card = jQuery(this); 97 const toScale = 1 - (cards.length - 1 - index) * 0.05; 98 const nextCard = cards[index + 1]; 99 const cardInner = card.find('.project-item'); 100 ScrollObserver.Element(nextCard, { 101 offsetTop: 0, 102 offsetBottom: window.innerHeight - card.height() 103 }).onScroll(({ percentageY }) => { 104 const scale = valueAtPercentage({ 105 from: 1, 106 to: toScale, 107 percentage: percentageY 108 }); 109 cardInner.css('scale', scale); 110 const filter = `brightness(${valueAtPercentage({ 111 from: 1, 112 to: 0.6, 113 percentage: percentageY 114 })})`; 115 cardInner.css('filter', filter); 116 // jQuery(nextCard).css('padding-top', ((index + 1) * 20) + 'px'); 117 }); 118 });
119} 120 121function initMovingList($scope) { 122 gsap.defaults({overwrite: "auto"}); 123 gsap.registerPlugin(ScrollTrigger); 124 gsap.config({nullTargetWarn: false}); 125 $scope.find('.neuros-moving-list-widget').each(function(index) { 126 const movingList = jQuery(this).find('.moving-list'); 127 // Calculate the x and xEnd values and divide them by 2 128 const [x, xEnd] = (index % 2) ? 129 [(jQuery(this)[0].offsetWidth - movingList[0].scrollWidth) / 3, 5 / 2] : 130 [5 / 2, (jQuery(this)[0].offsetWidth - movingList[0].scrollWidth) / 3]; 131 gsap.fromTo(movingList[0], { x }, { 132 x: xEnd, 133 scrollTrigger: { 134 trigger: jQuery(this)[0], 135 scrub: 0.5, // Adjust this value to control the speed 136 } 137 }); 138 }); 139} 140 141function initServicesButton($scope) { 142 const items = $scope.find('.service-item'); 143 items.each(function() { 144 const item = jQuery(this); 145 item.on('mouseenter', function() { 146 item.find('.button-container').slideDown(300); 147 }); 148 item.on('mouseleave', function() { 149 item.find('.button-container').slideUp(300); 150 }); 151 }); 152} 153 154jQuery(window).on('elementor/frontend/init', function () { 155 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_audio_listing.default', function ($scope) { 156 playListingAudio($scope); 157 }); 158 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_blog_listing.default', function () { 159 if ( jQuery('body').hasClass('elementor-editor-active') ) { 160 setTimeout(elements_slider_init, 300); 161 setTimeout(fix_responsive_iframe, 600); 162 setTimeout(custom_video_play_button, 800); 163 } 164 }); 165 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_gallery.default', function ($scope) { 166 if ( jQuery('body').hasClass('elementor-editor-active') ) { 167 setTimeout(elements_slider_init, 300); 168 setTimeout(isotope_init, 2500); 169 } 170 if(jQuery('.cursor_drag', $scope).length > 0 && jQuery(window).width() >= 992) { 171 const $slider = $scope.find('.gallery-wrapper'); 172 const cursor = jQuery('.cursor_drag', $scope); 173 function showCustomCursor(event) { 174 cursor.css('left', event.clientX-5).css('top', event.clientY-5); 175 } 176 $slider.mousemove(showCustomCursor); 177 178 $slider.mouseleave(function(e) { 179 if(!jQuery('body').hasClass('elementor-editor-active')) { 180 jQuery('.owl-stage', $scope).css({cursor: 'auto'}); 181 jQuery('.gallery-item-link', $scope).css({cursor: 'auto'}); 182 cursor.removeClass('active'); 183 setTimeout(function() { 184 if(!cursor.hasClass('active')) { 185 cursor.hide(); 186 } 187 }, 300); 188 } 189 }); 190 191 $slider.mouseenter(function(e) { 192 if(!jQuery('body').hasClass('elementor-editor-active')) { 193 jQuery('.owl-stage', $scope).css({cursor: 'none'}); 194 jQuery('.gallery-item-link', $scope).css({cursor: 'none'}); 195 cursor.show(); 196 setTimeout(function() { 197 cursor.addClass('active'); 198 }, 10); 199 } 200 }); 201 } 202 203 }); 204 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_projects_listing.default', function ($scope) { 205 animateHeading($scope); 206 if ( jQuery('body').hasClass('elementor-editor-active') ) { 207 setTimeout(elements_slider_init, 500); 208 setTimeout(isotope_init, 2500); 209 } 210 setTimeout(handleProjectsExcerptHeight, 500); 211 if ( $scope.find('.project-modern-listing').length > 0 ) { 212 var scopeID = $scope.attr('data-id'); 213 initModernProjects($scope); 214 jQuery('body').on('genre_get_posts_success', function(e,
214classes, id) { 215 if(classes.indexOf('project-modern-listing') !== -1 && id === scopeID) { 216 initModernProjects($scope); 217 } 218 }); 219 } 220 if ( $scope.find('.content-type-audio').length > 0 ) { 221 playProjectsSliderAudio($scope); 222 } 223 if( $scope.find('.project-cards-listing').length > 0 ) { 224 initCardsProjects($scope); 225 var scopeID = $scope.attr('data-id'); 226 jQuery('body').on('genre_get_posts_success', function(e, classes, id) { 227 if(classes.indexOf('project-cards-listing') !== -1 && id === scopeID) { 228 initCardsProjects($scope); 229 } 230 }); 231 } 232 }); 233 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_services_listing.default', function ($scope) { 234 if ( jQuery('body').hasClass('elementor-editor-active') ) { 235 setTimeout(elements_slider_init, 500); 236 } 237 animateHeading($scope); 238 initServicesButton($scope); 239 var scopeID = $scope.attr('data-id'); 240 jQuery('body').on('genre_get_posts_success', function(e, classes, id) { 241 if(classes.indexOf('service-grid-listing') !== -1 && id === scopeID) { 242 initServicesButton($scope); 243 } 244 }); 245 }); 246 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_testimonial_carousel.default', function () { 247 if ( jQuery('body').hasClass('elementor-editor-active') ) { 248 setTimeout(elements_slider_init, 500); 249 } 250 }); 251 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_image_carousel.default', function ($scope) { 252 animateHeading($scope); 253 if ( jQuery('body').hasClass('elementor-editor-active') ) { 254 setTimeout(elements_slider_init, 500); 255 } 256 }); 257 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_content_slider.default', function () { 258 if ( jQuery('body').hasClass('elementor-editor-active') ) { 259 setTimeout(elements_slider_init, 500); 260 } 261 }); 262 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_wpforms.default', function () { 263 if ( jQuery('body').hasClass('elementor-editor-active') ) { 264 initFloatPlaceholderInput(); 265 initWPFormsSubmitButton(); 266 } 267 }); 268 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_mailchimp.default', function () { 269 if ( jQuery('body').hasClass('elementor-editor-active') ) { 270 initFloatPlaceholderInput(); 271 initWPFormsSubmitButton(); 272 } 273 }); 274 elementorFrontend.hooks.addAction('frontend/element_ready/section.default', function () { 275 if ( jQuery('body').hasClass('elementor-editor-active') ) { 276 background_image_parallax(jQuery('[data-parallax="scroll"]'), 0.7); 277 } 278 }); 279 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_heading.default', function ($scope) { 280 animateHeading($scope); 281 }); 282 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_step_carousel.default', function ($scope) { 283 animateHeading($scope); 284 if ( jQuery('body').hasClass('elementor-editor-active') ) { 285 setTimeout(elements_slider_init, 500); 286 } 287 }); 288 elementorFrontend.hooks.addAction('frontend/element_ready/image.default', function ($scope) { 289 if ( jQuery(window).width() >= 1025 ) { 290 const cursor = jQuery('.hovered-text', $scope); 291 292 function showCustomCursor(event) { 293 cursor.css('left', event.clientX).css('top', event.clientY); 294 } 295 if ( cursor.length > 0 ) { 296 $scope.mousemove(showCustomCursor); 297 298 $scope.mouseleave(function (e) { 299 if (!jQuery('body').hasClass('elementor-editor-active')) { 300 jQuery('a', $scope).css({cursor: 'auto'}); 301 $scope.css({cursor: 'auto'}); 302 cursor.removeClass('active'); 303 } 304 }); 305 306 $scope.mouseenter(function (e) { 307 if (!jQuery('body').hasClass('elementor-editor-active')) { 308 jQuery('a', $scope).css({cursor: 'none'}); 309 $scope.css({cursor: 'none'}); 310 cursor.addClass('active'); 311 } 312 }); 313 } 314 } 315 if ( $scope.hasClass('elementor-image-scroll-animation-on') ) { 316 const { ScrollObserver, valueAtPercentage } = aat; 317 const image = $scope.find('img'); 318 image.each(function(index) { 319 ScrollObserver.Element(jQuery(this)[0], { 320 offsetTop: 250, 321 offsetBottom: 0 322 }).onScroll(({ percentageY }) => {
323 const transform = `perspective(1200px) rotateX(${valueAtPercentage({ 324 from: 15, 325 to: 0, 326 percentage: percentageY 327 })}deg)`; 328 jQuery(this).css('transform', transform); 329 }); 330 }); 331 } 332 }); 333 elementorFrontend.hooks.addAction("frontend/element_ready/neuros_tabs.default", function (e) { 334 let d = e.find(".neuros_tabs_titles_container"), 335 s = e.find(".neuros_tabs_content_container"); 336 jQuery(d).find(".neuros_tab_title_item").first().addClass("active"); 337 if( jQuery('body').hasClass('elementor-editor-active') ) { 338 return; 339 } 340 var tab_content_first_class = jQuery(d).find(".neuros_tab_title_item").first().attr("data-id"); 341 jQuery(d).find(".neuros_tab_title_item").each(function() { 342 let e = jQuery(this).attr("data-id"); 343 if(e) { 344 jQuery('.elementor #' + e).removeClass("active").addClass("hidden"); 345 } 346 }); 347 if(tab_content_first_class) { 348 jQuery('.elementor #' + tab_content_first_class).addClass("active").removeClass("hidden"); 349 } 350 jQuery(s).find(".neuros_tab_content_item").first().addClass("active"); 351 e.find(".neuros_tab_title_item a").on("click", function () { 352 let e = jQuery(this).parent().attr("data-id"); 353 if(!jQuery(this).parent().is(".active")) { 354 d.find(".active").removeClass("active"); 355 s.find(".active").removeClass("active"); 356 if(e) { 357 var all_ids = []; 358 jQuery(d).find(".neuros_tab_title_item").each(function() { 359 let e = jQuery(this).attr("data-id"); 360 if(e) { 361 all_ids.push('.elementor #' + e); 362 var swiper = jQuery('.elementor #' + e).find('.swiper-container'); 363 if(swiper.length) { 364 setTimeout(function(){ 365 window.dispatchEvent(new Event('resize')); 366 }, 500); 367 } 368 } 369 }); 370 var all_ids_str = all_ids.join(); 371 jQuery(all_ids_str).removeClass("active").addClass("hidden"); 372 } 373 jQuery(this).parent().addClass("active"); 374 if(e) { 375 jQuery('.elementor #' + e).addClass("active").removeClass("hidden"); 376 s.find("#" + e).addClass("active"); 377 } 378 } 379 }); 380 }); 381 382 elementorFrontend.hooks.addAction("frontend/element_ready/neuros_moving_list.default", function (e) { 383 initMovingList(e); 384 }); 385 386 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_case_study_listing.default', function () { 387 if ( jQuery('body').hasClass('elementor-editor-active') ) { 388 setTimeout(elements_slider_init, 500); 389 setTimeout(isotope_init, 500); 390 } 391 }); 392 393 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_navigation_menu.default', function ($scope) { 394 jQuery('.mobile-header-menu-container', $scope).detach().prependTo('body'); 395 jQuery('.alter-menu-wrapper', $scope).detach().prependTo('body'); 396 menu_text_animate($scope); 397 if ( jQuery('body').hasClass('elementor-editor-active') ) { 398 mobile_menu(); 399 alter_menu(); 400 mobile_menu_open(); 401 compact_menu_open(); 402 overlay_close_all(); 403 } 404 }); 405 406 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_slide_sidebar.default', function ($scope) { 407 jQuery('.slide-sidebar-wrapper', $scope).detach().prependTo('body'); 408 if ( jQuery('body').hasClass('elementor-editor-active') ) { 409 side_panel_open(); 410 overlay_close_all(); 411 } 412 });
413 elementorFrontend.hooks.addAction('frontend/element_ready/neuros_search.default', function ($scope) { 414 jQuery('.site-search', $scope).detach().prependTo('body'); 415 if ( jQuery('body').hasClass('elementor-editor-active') ) { 416 search_panel_open(); 417 overlay_close_all(); 418 } 419 }); 420});
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.