1 2// Google Tag Manager
vendor: 340 bytes, lines 2-7
2 3(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 4 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 5 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 6 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 7})(window,document,'script','dataLayer','
7GTM-TKTGGX9
vendor: 4 bytes, line 7
7');
8// End Google Tag Manager 9 10document.addEventListener("DOMContentLoaded", function () { 11 // Formulaire du filtre 12 $('.form-filters').each(function (){ 13 // Selectionner les elements des filtres 14 const form = $(this); 15 const lieuxInput = form.find("input[name='lieux']"); 16 const latitudeInput = form.find("input[name='lat']"); 17 const longitudeInput = form.find("input[name='lng']"); 18 const filterButtons = form.find(".filter-button"); 19 20 function toggleActive(button) { 21 const value = button.text(); 22 const carouselUid = $(button).data("carouseluid"); 23 // Remove active class from all buttons and set it on the clicked button 24 filterButtons.removeClass("active"); 25 button.addClass("active"); 26 27 // Remove all forms values 28 lieuxInput.val(''); 29 latitudeInput.val(''); 30 longitudeInput.val(''); 31 32 // Button all 33 if (button.attr('id') && button.attr('id').includes('all-events')) { 34 $('#filtered-events-' + carouselUid).hide(); 35 $('#all-events-' + carouselUid).show(); 36 // Recalcul de la hauteur des cartes "Voir tout" 37 adjustHeight(); 38 // Button around me 39 } else if (button.attr('id') && button.attr('id').includes('around-me')) { 40 if (navigator.geolocation) { 41 navigator.geolocation.getCurrentPosition(function (position) { 42 var coordinates = position.coords; 43 // Update hidden input 44 latitudeInput.val(coordinates.latitude); 45 longitudeInput.val(coordinates.longitude); 46 submitFilters(carouselUid); 47 }, 48 function (error) { 49 console.warn('ERROR(' + error.code + '): ' + error.message); 50 }, 51 {
52 enableHighAccuracy: false, 53 timeout: 2000, 54 maximumAge: 30000 55 }); 56 } 57 // Other buttons (filter by place) 58 } else { 59 // Update hidden input 60 lieuxInput.val(value); 61 submitFilters(carouselUid); 62 } 63 } 64 65 filterButtons.each(function (){ 66 this.addEventListener("click", function (event) { 67 event.preventDefault(); 68 toggleActive($(this)); 69 }); 70 }); 71 72 // Envoi du formulaire via AJAX 73 function submitFilters(carouselUid) { 74 var defaultCarousel = $('#all-events-' + carouselUid).children('.owl-carousel'); 75 var carouselDesktopCardsNumber = defaultCarousel.data("desktop-cards-number"); 76 $.ajax({ 77 url: ajaxRechercheEvenementsUrl.replace(/&/g, "&"), 78 async: true, 79 type: 'POST', 80 cache: false, 81 data: { 82 form: form.serialize(), 83 carouselDesktopCardsNumber: carouselDesktopCardsNumber 84 }, 85 dataType: 'json', 86 success: function (data, textStatus, jqXHR) { 87 var filteredEventsCarouselContainer = $('#filtered-events-' + carouselUid); 88 filteredEventsCarouselContainer.html(data.contenu); 89 90 // Conversion des nouveaux svg (images par défaut) 91 grunticon.embedIcons(grunticon.getIcons(grunticon.getCSS(grunticon.href))); 92 93 var newCarousel = filteredEventsCarouselContainer.children('.owl-carousel'); 94 95 var defaultCardsNumber = 6; 96 if(newCarousel.parents('.frame-content').length) { 97 defaultCardsNumber = 4; 98 } 99 100 $('#all-events-' + carouselUid).hide(); 101 filteredEventsCarouselContainer.show(); 102 103 initCMSCarousels(defaultCardsNumber, newCarousel); 104 105 // Affichage d'un message si une redirection a eu lieu 106 if (data.redirection) { 107 filterButtons.removeClass("active"); 108 } 109 // Recalcul de la hauteur des cartes "Voir tout" 110 adjustHeight(); 111 }, 112 error: function (jqXHR, textStatus, errorThrown) { 113 console.log('[error] ' + textStatus + " - " + errorThrown); 114 } 115 }); 116 117 } 118 119 // Event listener pour effacer les filtres 120 $(document).on("click", '.other-reset-filters', function (event) { 121 event.preventDefault(); 122 const ids = $(this).closest("[id]").attr("id").split("-"); 123 const allEventsBtn = $('#all-events-btn-' + ids[ids.length - 1]); 124 toggleActive(allEventsBtn); 125 }); 126 }); 127 128 /** 129 * Fonction permettant d'ajuster la hauteur de la carte "Voir tout" 130 * En fonction de la hauteur des cartes événements 131 * Fix non idéal, mais la hauteur des cartes événements varie en fonction de la largeur de la fenêtre 132 */ 133 function adjustHeight() { 134 $('.static-card:visible').each(function () { 135 var $staticCard = $(this); 136 var $eventCard = $staticCard.parent().prev('.owl-item').find('.event-card'); 137 138 if ($eventCard.length) { 139 $staticCard.outerHeight($eventCard.outerHeight()); 140 } 141 }); 142 } 143 144 $(document).ready(adjustHeight); 145 146 $(window).on('resize', function () { 147 clearTimeout(window.resizing); 148 window.resizing = setTimeout(adjustHeight, 100); 149 }); 150}); 151
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.