PageSourceSearch

https://www.saint-genis-des-fontaines.fr/wp-content/plugins/nova-c…/tarteaucitron.js?ver=1.5.12

js saint-genis-des-fontaines.fr collected 2026-10-01 12:25:09 UTC 137,571 bytes, 2,646 lines download raw bytes

vendor: 1,519 bytes, lines 1-25
1/*jslint browser: true, evil: true */
2/* min ready */
3
4var tarteaucitronScriptsDiscover = document.getElementsByTagName('script'),
5    tarteaucitronCurrentScript = document.currentScript instanceof HTMLScriptElement
6        ? document.currentScript
7        : tarteaucitronScriptsDiscover[tarteaucitronScriptsDiscover.length - 1],
8    tarteaucitronPath = tarteaucitronCurrentScript.src.split('?')[0],
9    tarteaucitronForceCDN = (tarteaucitronForceCDN === undefined) ? '' : tarteaucitronForceCDN,
10    tarteaucitronUseMin = (tarteaucitronUseMin === undefined) ? '' : tarteaucitronUseMin,
11    cdn = (tarteaucitronForceCDN === '') ? tarteaucitronPath.split('/').slice(0, -1).join('/') + '/' : tarteaucitronForceCDN,
12    alreadyLaunch = (alreadyLaunch === undefined) ? 0 : alreadyLaunch,
13    tarteaucitronForceLanguage = (tarteaucitronForceLanguage === undefined) ? '' : tarteaucitronForceLanguage,
14    tarteaucitronForceExpire = (tarteaucitronForceExpire === undefined) ? '' : tarteaucitronForceExpire,
15    tarteaucitronCustomText = (tarteaucitronCustomText === undefined) ? '' : tarteaucitronCustomText,
16    // tarteaucitronExpireInDay: true for day(s) value - false for hour(s) value
17    tarteaucitronExpireInDay = (tarteaucitronExpireInDay === undefined || typeof tarteaucitronExpireInDay !== "boolean") ? true : tarteaucitronExpireInDay,
18    timeExpire = 31536000000,
19    tarteaucitronProLoadServices,
20    tarteaucitronNoAdBlocker = false,
21    tarteaucitronIsLoaded = false;
22
23
24var tarteaucitron = {
25    "version": "1.28
vendor: 8,572 bytes, lines 25-230
25.0",
26    "cdn": cdn,
27    "user": {},
28    "lang": {},
29    "services": {},
30    "added": [],
31    "idprocessed": [],
32    "state": {},
33    "launch": [],
34    "parameters": {},
35    "isAjax": false,
36    "reloadThePage": false,
37    "events": {
38        "init": function () {},
39        "load": function () {},
40    },
41    "init": function (params) {
42        "use strict";
43        var origOpen;
44
45        tarteaucitron.parameters = params;
46        if (alreadyLaunch === 0) {
47            alreadyLaunch = 1;
48            if (window.addEventListener) {
49                if( document.readyState === "complete" ) {
50                    tarteaucitron.initEvents.loadEvent(false);
51                } else {
52                    window.addEventListener("load", function () {
53                        tarteaucitron.initEvents.loadEvent(false);
54                    }, false);
55                }
56                window.addEventListener("scroll", function () {
57                    tarteaucitron.initEvents.scrollEvent();
58                }, false);
59
60                window.addEventListener("keydown", function (evt) {
61                    tarteaucitron.initEvents.keydownEvent(false, evt);
62                }, false);
63                window.addEventListener("hashchange", function () {
64                    tarteaucitron.initEvents.hashchangeEvent();
65                }, false);
66                window.addEventListener("resize", function () {
67                    tarteaucitron.initEvents.resizeEvent();
68                }, false);
69            } else {
70                if( document.readyState === "complete" ) {
71                    tarteaucitron.initEvents.loadEvent(true);
72                } else {
73                    window.attachEvent("onload", function () {
74                        tarteaucitron.initEvents.loadEvent(true);
75                    });
76                }
77                window.attachEvent("onscroll", function () {
78                    tarteaucitron.initEvents.scrollEvent();
79                });
80                window.attachEvent("onkeydown", function (evt) {
81                    tarteaucitron.initEvents.keydownEvent(true, evt);
82
83                });
84                window.attachEvent("onhashchange", function () {
85                    tarteaucitron.initEvents.hashchangeEvent();
86                });
87                window.attachEvent("onresize", function () {
88                    tarteaucitron.initEvents.resizeEvent();
89                });
90            }
91
92            if (typeof XMLHttpRequest !== 'undefined') {
93                origOpen = XMLHttpRequest.prototype.open;
94                XMLHttpRequest.prototype.open = function () {
95
96                    if (window.addEventListener) {
97                        this.addEventListener("load", function () {
98                            if (typeof tarteaucitronProLoadServices === 'function') {
99                                tarteaucitronProLoadServices();
100                            }
101                        }, false);
102                    } else if (typeof this.attachEvent !== 'undefined') {
103                        this.attachEvent("onload", function () {
104                            if (typeof tarteaucitronProLoadServices === 'function') {
105                                tarteaucitronProLoadServices();
106                            }
107                        });
108                    } else {
109                        if (typeof tarteaucitronProLoadServices === 'function') {
110                            setTimeout(tarteaucitronProLoadServices, 1000);
111                        }
112                    }
113
114                    try {
115                        origOpen.apply(this, arguments);
116                    } catch (err) {}
117                };
118            }
119        }
120
121        if(tarteaucitron.events.init) {
122            tarteaucitron.events.init();
123        }
124    },
125    "initEvents": {
126        "loadEvent": function (isOldBrowser) {
127            tarteaucitron.load();
128            tarteaucitron.fallback(['tarteaucitronOpenPanel'], function (elem) {
129                if (isOldBrowser) {
130                    elem.attachEvent("onclick", function (event) {
131                        tarteaucitron.userInterface.openPanel();
132                        event.preventDefault();
133                    });
134                } else {
135                    elem.addEventListener("click", function (event) {
136                        tarteaucitron.userInterface.openPanel();
137                        event.preventDefault();
138                    }, false);
139                }
140            }, true);
141        },
142        "keydownEvent": function (isOldBrowser, evt) {
143            if (evt.keyCode === 27) {
144                tarteaucitron.userInterface.closePanel();
145            }
146
147            if (isOldBrowser) {
148                if ( evt.keyCode === 9 && focusableEls.indexOf(evt.target) >= 0) {
149                    if ( evt.shiftKey ) /* shift + tab */ {
150                        if (document.activeElement === firstFocusableEl) {
151                            lastFocusableEl.focus();
152                            evt.preventDefault();
153                        }
154                    } else /* tab */ {
155                        if (document.activeElement === lastFocusableEl) {
156                            firstFocusableEl.focus();
157                            evt.preventDefault();
158                        }
159                    }
160                }
161            }
162        },
163        "hashchangeEvent": function () {
164            if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') {
165                tarteaucitron.userInterface.openPanel();
166            }
167        },
168        "resizeEvent": function () {
169            var tacElem = document.getElementById('tarteaucitron');
170            var tacCookieContainer = document.getElementById('tarteaucitronCookiesListContainer');
171
172            if (tacElem && tacElem.style.display === 'block') {
173                tarteaucitron.userInterface.jsSizing('main');
174            }
175
176            if (tacCookieContainer && tacCookieContainer.style.display === 'block') {
177                tarteaucitron.userInterface.jsSizing('cookie');
178            }
179        },
180        "scrollEvent": function () {
181            var scrollPos = window.pageYOffset || document.documentElement.scrollTop;
182            var heightPosition;
183            var tacPercentage = document.getElementById('tarteaucitronPercentage');
184            var tacAlertBig = document.getElementById('tarteaucitronAlertBig');
185
186            if (tacAlertBig && !tarteaucitron.highPrivacy) {
187                if (tacAlertBig.style.display === 'block') {
188                    heightPosition = tacAlertBig.offsetHeight + 'px';
189
190                    if (scrollPos > (screen.height * 2)) {
191                        tarteaucitron.userInterface.respondAll(true);
192                    } else if (scrollPos > (screen.height / 2)) {
193                        document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '<strong>' + tarteaucitron.lang.alertBigScroll + '</strong> ' + tarteaucitron.lang.alertBig;
194                    }
195
196                    if (tacPercentage) {
197                        if (tarteaucitron.orientation === 'top') {
198                            tacPercentage.style.top = heightPosition;
199                        } else {
200                            tacPercentage.style.bottom = heightPosition;
201                        }
202                        tacPercentage.style.width = ((100 / (screen.height * 2)) * scrollPos) + '%';
203                    }
204                }
205            }
206        },
207    },
208    "load": function () {
209        "use strict";
210
211        if (tarteaucitronIsLoaded === true) {
212            return;
213        }
214
215        var cdn = tarteaucitron.cdn,
216            language = tarteaucitron.getLanguage(),
217            useMinifiedJS = ((new URL(cdn,tarteaucitronPath).host == 'cdn.jsdelivr.net') || (tarteaucitronPath.indexOf('.min.') >= 0) || (tarteaucitronUseMin !== '')),
218            pathToLang = cdn + 'lang/tarteaucitron.' + language + (useMinifiedJS ? '.min' : '') + '.js?v=' + tarteaucitron.version,
219            pathToServices = cdn + 'tarteaucitron.services' + (useMinifiedJS ? '.min' : '') + '.js?v=' + tarteaucitron.version,
220            linkElement = document.createElement('link'),
221            defaults = {
222                "adblocker": false,
223                "hashtag": '#tarteaucitron',
224                "cookieName": 'tarteaucitron',
225                "highPrivacy": true,
226                "orientation": "middle",
227                "bodyPosition": "bottom",
228                "removeCredit": false,
229                "showAlertSmall": false,
230                "show
vendor: 22,173 bytes, lines 230-669
230DetailsOnClick": true,
231                "showIcon": true,
232                "iconPosition": "BottomRight",
233                "cookieslist": false,
234                "cookieslistEmbed": false,
235                "handleBrowserDNTRequest": false,
236                "DenyAllCta": true,
237                "AcceptAllCta" : true,
238                "moreInfoLink": true,
239                "privacyUrl": "",
240                "useExternalCss": false,
241                "useExternalJs": false,
242                "mandatory": true,
243                "mandatoryCta": true,
244                "closePopup": false,
245                "groupServices": false,
246                "serviceDefaultState": 'wait',
247                "googleConsentMode": true,
248                "pianoConsentMode": true,
249                "pianoConsentModeEssential": false,
250                "bingConsentMode": true,
251                "softConsentMode": false,
252                "dataLayer": false,
253                "serverSide": false,
254                "partnersList": false,
255                "alwaysNeedConsent": false
256            },
257            params = tarteaucitron.parameters;
258
259        // flag the tac load
260        tarteaucitronIsLoaded = true;
261
262        // Don't show the middle bar if we are on the privacy policy or more page
263        if (((tarteaucitron.parameters.readmoreLink !== undefined && window.location.href == tarteaucitron.parameters.readmoreLink) || window.location.href == tarteaucitron.parameters.privacyUrl) && tarteaucitron.parameters.orientation == "middle") {
264            tarteaucitron.parameters.orientation = "bottom";
265        }
266
267        // Step -1
268        if (typeof tarteaucitronCustomPremium !== 'undefined') {
269            tarteaucitronCustomPremium();
270        }
271
272        // Step 0: get params
273        if (params !== undefined) {
274
275            for (var k in defaults) {
276                if(!tarteaucitron.parameters.hasOwnProperty(k)) {
277                    tarteaucitron.parameters[k] = defaults[k];
278                }
279            }
280        }
281
282        // global
283        tarteaucitron.orientation = tarteaucitron.parameters.orientation;
284        tarteaucitron.hashtag = tarteaucitron.parameters.hashtag;
285        tarteaucitron.highPrivacy = tarteaucitron.parameters.highPrivacy;
286        tarteaucitron.handleBrowserDNTRequest = tarteaucitron.parameters.handleBrowserDNTRequest;
287        tarteaucitron.customCloserId = tarteaucitron.parameters.customCloserId;
288
289        // update dataLayer when consent is updated
290        if (tarteaucitron.parameters.dataLayer === true) {
291            window.addEventListener('tac.root_available', function() {
292                setTimeout(function() {
293                    window.dataLayer = window.dataLayer || [];
294                    tarteaucitron.job.filter(job => tarteaucitron.state[job] === true).length > 0 &&
295                    window.dataLayer.push({
296                        event: 'tac_consent_update',
297                        tacAuthorizedVendors: tarteaucitron.job.filter(job => tarteaucitron.state[job] === true)
298                    });
299                }, 200);
300            });
301            document.addEventListener('tac.consent_updated', function () {
302                window.dataLayer = window.dataLayer || [];
303                tarteaucitron.job.filter(job => tarteaucitron.state[job] === true).length > 0 &&
304                window.dataLayer.push({
305                    event: 'tac_consent_update',
306                    tacAuthorizedVendors: tarteaucitron.job.filter(job => tarteaucitron.state[job] === true)
307                });
308            });
309        }
310
311        // piano consent mode
312        if (tarteaucitron.parameters.pianoConsentMode === true) {
313            window.pdl = window.pdl || {};
314            window.pdl.requireConsent = "v2";
315
316            if(tarteaucitron.parameters.pianoConsentModeEssential === true) {
317                window.pdl.consent = {
318                    products: ["PA"],
319                    defaultPreset: {
320                        PA: "essential",
321                    },
322                };
323            } else {
324                window.pdl.consent = {
325                    products: ["PA"],
326                    defaultPreset: {
327                        PA: "opt-out",
328                    },
329                };
330            }
331
332            document.addEventListener("pianoanalytics_consentModeOk",function () {
333                window.pdl.consent = {
334                    products: ["PA"],
335                    defaultPreset: {
336                        PA: "opt-in",
337                    },
338                };
339
340                if (window.pa && window.pa.consent && typeof window.pa.consent.setMode === "function") {
341                    window.pa.consent.setMode("opt-in");
342                }
343            }, { once: true });
344            document.addEventListener("pianoanalytics_consentModeKo",function () {
345                window.pdl.consent = {
346                    products: ["PA"],
347                    defaultPreset: {
348                        PA: "opt-out",
349                    },
350                };
351
352                if (window.pa && window.pa.consent && typeof window.pa.consent.setMode === "function") {
353                    window.pa.consent.setMode("opt-out");
354                }
355            }, { once: true });
356
357            if (tarteaucitron.parameters.softConsentMode === false) {
358                window.addEventListener('tac.root_available', function () {
359                    if (typeof tarteaucitron_block !== 'undefined') {
360                        tarteaucitron_block.unblock(/piano-analytics\.js/);
361                    }
362                });
363            }
364        }
365        
366        // bing consent mode
367        if (tarteaucitron.parameters.bingConsentMode === true) {
368            window.uetq = window.uetq || [];
369            window.uetq.push('consent', 'default', {'ad_storage': 'denied'});
370
371            window.clarity = window.clarity || function () {
372                (window.clarity.q = window.clarity.q || []).push(arguments);
373            };
374
375            document.addEventListener('clarity_consentModeOk', function () {
376                window.clarity('consentv2', {
377                    ad_Storage: "granted",
378                    analytics_Storage: "granted"
379                });
380            }, { once: true });
381            document.addEventListener('clarity_consentModeKo', function () {
382                window.clarity('consent', false);
383            }, { once: true });
384            document.addEventListener('bingads_consentModeOk', function () {
385                window.uetq.push('consent', 'update', {'ad_storage': 'granted'});
386            }, { once: true });
387            document.addEventListener('bingads_consentModeKo', function () {
388                window.uetq.push('consent', 'update', {'ad_storage': 'denied'});
389            }, { once: true });
390
391            if (tarteaucitron.parameters.softConsentMode === false) {
392                window.addEventListener('tac.root_available', function () {
393                    if (typeof tarteaucitron_block !== 'undefined') {
394                        tarteaucitron_block.unblock(/clarity\.ms/);
395                        tarteaucitron_block.unblock(/bat\.bing\.com/);
396                    }
397                });
398            }
399        }
400
401        // google consent mode
402        if (tarteaucitron.parameters.googleConsentMode === true) {
403
404            // set the dataLayer and a function to update
405            window.dataLayer = window.dataLayer || [];
406            window.tac_gtag = function tac_gtag() {
407                dataLayer.push(arguments);
408            };
409
410            // default consent to denied
411            window.tac_gtag('consent', 'default', {
412                ad_storage: 'denied',
413                analytics_storage: 'denied',
414                ad_user_data: 'denied',
415                ad_personalization: 'denied',
416                wait_for_update: 800
417            });
418
419            // if google ads, add a service for personalized ads
420            document.addEventListener('googleads_added', function() {
421
422                // skip if already added
423                if (tarteaucitron.added["gcmads"] === true) {
424                    return;
425                }
426
427                // simple service to control gcm with event
428                tarteaucitron.services.gcmads = {
429                    "key": "gcmads",
430                    "type": "ads",
431                    "name": "Google Ads (personalized ads)",
432                    "uri": "https://support.google.com/analytics/answer/9976101",
433                    "needConsent": true,
434                    "cookies": [],
435                    "js": function() {},
436                    "fallback": function() {}
437                };
438                tarteaucitron.job.push('gcmads');
439
440                // fix the event handler on the buttons
441                var i,
442                    allowBtns = document.getElementsByClassName("tarteaucitronAllow"),
443                    denyBtns = document.getElementsByClassName("tarteaucitronDeny");
444                for (i = 0; i < allowBtns.length; i++) {
445                    tarteaucitron.addClickEventToElement(allowBtns[i], function() {
446                        tarteaucitron.userInterface.respond(this, true);
447                    });
448                }
449                for (i = 0; i < denyBtns.length; i++) {
450                    tarteaucitron.addClickEventToElement(denyBtns[i], function() {
451                        tarteaucitron.userInterface.respond(this, false);
452                    });
453                }
454            });
455
456            // when personalized ads are accepted, accept googleads
457            document.addEventListener('gcmads_allowed', function() {
458                tarteaucitron.setConsent('googleads', true);
459            });
460
461            // personalized ads loaded/allowed, set gcm to granted
462            document.addEventListener('gcmads_consentModeOk', function() {
463                window.tac_gtag('consent', 'update', {
464                    ad_user_data: 'granted',
465                    ad_personalization: 'granted'
466                });
467            }, { once: true });
468
469            // personalized ads disallowed, set gcm to denied
470            document.addEventListener('gcmads_consentModeKo', function() {
471                window.tac_gtag('consent', 'update', {
472                    ad_user_data: 'denied',
473                    ad_personalization: 'denied'
474                });
475            }, { once: true });
476
477            // google ads loaded/allowed, set gcm to granted
478            document.addEventListener('googleads_consentModeOk', function() {
479                window.tac_gtag('consent', 'update', {
480                    ad_storage: 'granted'
481                });
482            }, { once: true });
483
484            // google ads disallowed, disable personalized ads and update gcm
485            document.addEventListener('googleads_consentModeKo', function() {
486                tarteaucitron.setConsent('gcmads', false);
487                window.tac_gtag('consent', 'update', {
488                    ad_storage: 'denied'
489                });
490            }, { once: true });
491
492            // ga4 loaded/allowed, set gcm to granted
493            document.addEventListener('gtag_consentModeOk', function() {
494                window.tac_gtag('consent', 'update', {
495                    analytics_storage: 'granted'
496                });
497            }, { once: true });
498
499            // ga4 disallowed, update gcm
500            document.addEventListener('gtag_consentModeKo', function() {
501                window.tac_gtag('consent', 'update', {
502                    analytics_storage: 'denied'
503                });
504            }, { once: true });
505
506            // multiple ga4 loaded/allowed, set gcm to granted
507            document.addEventListener('multiplegtag_consentModeOk', function() {
508                window.tac_gtag('consent', 'update', {
509                    analytics_storage: 'granted'
510                });
511            }, { once: true });
512
513            // multiple ga4 disallowed, update gcm
514            document.addEventListener('multiplegtag_consentModeKo', function() {
515                window.tac_gtag('consent', 'update', {
516                    analytics_storage: 'denied'
517                });
518            }, { once: true });
519
520            // allow gtag/googleads by default if consent mode is on
521            if (tarteaucitron.parameters.softConsentMode === false) {
522                window.addEventListener('tac.root_available', function () {
523                    if (typeof tarteaucitron_block !== 'undefined') {
524                        tarteaucitron_block.unblock(/www\.googletagmanager\.com\/gtag\/js/);
525                        tarteaucitron_block.unblock(/www\.googleadservices\.com\/pagead\/conversion/);
526                        tarteaucitron_block.unblock(/AW-/);
527                        tarteaucitron_block.unblock(/google-analytics\.com\/analytics\.js/);
528                        tarteaucitron_block.unblock(/google-analytics\.com\/ga\.js/);
529                    }
530                });
531            }
532        }
533
534        // Step 1: load css
535        if ( !tarteaucitron.parameters.useExternalCss ) {
536            linkElement.rel = 'stylesheet';
537            linkElement.type = 'text/css';
538            linkElement.href = cdn + 'css/tarteaucitron' + (useMinifiedJS ? '.min' : '') + '.css?v=' + tarteaucitron.version;
539            document.getElementsByTagName('head')[0].appendChild(linkElement);
540        }
541        // Step 2: load language and services
542        tarteaucitron.addInternalScript(pathToLang, '', function () {
543
544            if(tarteaucitronCustomText !== ''){
545                tarteaucitron.lang = tarteaucitron.AddOrUpdate(tarteaucitron.lang, tarteaucitronCustomText);
546            }
547
548            document.documentElement.style.setProperty(
549                "--tacTitleBanner",
550                JSON.stringify(tarteaucitron.lang.middleBarHead)
551            );
552
553            tarteaucitron.addInternalScript(pathToServices, '', function () {
554
555                // disable the expand option if services grouped by category
556                if (tarteaucitron.parameters.groupServices == true) {
557                    tarteaucitron.parameters.showDetailsOnClick = true;
558                }
559                
560                var body = document.body,
561                    div = document.createElement('div'),
562                    html = '',
563                    index,
564                    orientation = 'Top',
565                    modalAttrs = '',
566                    cat = ['ads', 'analytic', 'api', 'comment', 'social', 'support', 'video', 'other', 'google'],
567                    i;
568
569                cat = cat.sort(function (a, b) {
570                    if (tarteaucitron.lang[a].title > tarteaucitron.lang[b].title) { return 1; }
571                    if (tarteaucitron.lang[a].title < tarteaucitron.lang[b].title) { return -1; }
572                    return 0;
573                });
574
575                if(!/^<\s*(p|ul)(\s|>)/i.test(tarteaucitron.lang.disclaimer)) {
576                    tarteaucitron.lang.disclaimer = '<p>'+tarteaucitron.lang.disclaimer+'</p>'
577                }
578
579                // Step 3: prepare the html
580                html += '<div role="heading" aria-level="2" id="tac_title" class="tac_visually-hidden">' + tarteaucitron.lang.title + '</div>';
581                html += '<div id="tarteaucitronPremium"></div>';
582                if (tarteaucitron.reloadThePage) {
583                    html += '<button type="button" id="tarteaucitronBack" aria-label="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')"></button>';
584                } else {
585                    html += '<button type="button" id="tarteaucitronBack" aria-label="' + tarteaucitron.lang.close + '" title="' + tarteaucitron.lang.close + '"></button>';
586                }
587                html += '<div id="tarteaucitron" role="dialog" aria-modal="true" aria-labelledby="dialogTitle" tabindex="-1">';
588                if (tarteaucitron.reloadThePage) {
589                    html += '   <button type="button" id="tarteaucitronClosePanel" aria-describedby="dialogTitle" aria-label="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')">';
590                } else {
591                    html += '   <button type="button" id="tarteaucitronClosePanel" aria-describedby="dialogTitle" >';
592                }
593                html += '       ' + tarteaucitron.lang.close;
594                html += '   </button>';
595                html += '   <div id="tarteaucitronServices">';
596                html += '      <div class="tarteaucitronLine tarteaucitronMainLine" id="tarteaucitronMainLineOffset">';
597                html += '         <span class="tarteaucitronH1" role="heading" aria-level="2" id="dialogTitle">'+ tarteaucitron.lang.title + '</span>';
598                html += '         <div id="tarteaucitronInfo">';
599                html += '         ' + tarteaucitron.lang.disclaimer;
600                if (tarteaucitron.parameters.privacyUrl !== "") {
601                    html += '   <br/><br/>';
602                    html += '   <button type="button" id="tarteaucitronPrivacyUrlDialog" role="link">';
603                    html += '       ' + tarteaucitron.lang.privacyUrl;
604                    html += '   </button>';
605                }
606                html += '         </div>';
607                html += '         <div class="tarteaucitronName">';
608                html += '            <span class="tarteaucitronH2" role="heading" aria-level="3">' + tarteaucitron.lang.all + '</span>';
609                html += '         </div>';
610                html += '         <div class="tarteaucitronAsk" id="tarteaucitronScrollbarAdjust">';
611                html += '            <button aria-label="' + tarteaucitron.lang.icon + ' : ' + tarteaucitron.lang.allowAll + '" type="button" id="tarteaucitronAllAllowed" class="tarteaucitronAllow">';
612                html += '               <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allowAll;
613                html += '            </button> ';
614                html += '            <button aria-label="' + tarteaucitron.lang.icon + ' : ' + tarteaucitron.lang.denyAll + '" type="button" id="tarteaucitronAllDenied" class="tarteaucitronDeny">';
615                html += '               <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.denyAll;
616                html += '            </button>';
617                html += '         </div>';
618                html += '      </div>';
619                html += '      <div class="tarteaucitronBorder">';
620                html += '         <div class="clear"></div><ul>';
621
622
623                if (tarteaucitron.parameters.mandatory == true) {
624                   html += '<li id="tarteaucitronServicesTitle_mandatory">';
625                   html += '<div class="tarteaucitronTitle">';
626                    if(tarteaucitron.parameters.showDetailsOnClick){
627                        html += '   <button type="button" tabindex="-1"><span class="tarteaucitronPlus" aria-hidden="true"></span> ' + tarteaucitron.lang.mandatoryTitle + '</button>';
628                    }else{
629                        html += '   <span class="asCatToggleBtn">' + tarteaucitron.lang.mandatoryTitle + '</span>';
630                    }
631                   html += '</div>';
632                   html += '<ul id="tarteaucitronServices_mandatory">';
633                   html += '<li class="tarteaucitronLine">';
634                   html += '   <div class="tarteaucitronName">';
635                   html += '       <span class="tarteaucitronH3" role="heading" aria-level="4">' + tarteaucitron.lang.mandatoryText + '</span>';
636                   html += '       <span class="tarteaucitronListCookies" aria-hidden="true"></span><br/>';
637                   html += '   </div>';
638                   if (tarteaucitron.parameters.mandatoryCta == true) {
639                       html += '   <div class="tarteaucitronAsk">';
640                       html += '       <button type="button" class="tarteaucitronAllow" tabindex="-1" disabled>';
641                       html += '           <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allow;
642                       html += '       </button> ';
643                       html += '       <button type="button" class="tarteaucitronDeny" tabindex="-1">';
644                       html += '           <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.deny;
645                       html += '       </button> ';
646                       html += '   </div>';
647                   }
648                   html += '</li>';
649                   html += '</ul></li>';
650                }
651
652                if (tarteaucitron.parameters.cookieslist === false && tarteaucitron.parameters.cookieslistEmbed === true) {
653                    setTimeout(function() {
654                        tarteaucitron.addClickEventToId("tarteaucitron-toggle-group-cookies", function () {
655                            tarteaucitron.userInterface.toggle('tarteaucitronServices_cookies');
656                            if (document.getElementById('tarteaucitronServices_cookies').style.display == 'block') {
657                                tarteaucitron.userInterface.addClass('tarteaucitronServicesTitle_cookies', 'tarteaucitronIsExpanded');
658                                document.getElementById('tarteaucitron-toggle-group-cookies').setAttribute('aria-expanded', 'true');
659                            } else {
660                                tarteaucitron.userInterface.removeClass('tarteaucitronServicesTitle_cookies', 'tarteaucitronIsExpanded');
661                                document.getElementById('tarteaucitron-toggle-group-cookies').setAttribute('aria-expanded', 'false');
662                            }
663                        });
664                    }, 800);
665
666                    html += '         <li id="tarteaucitronServicesnoTitle_cookies" class="tarteaucitronHidden" style="display:block">';
667                    html += '            <ul>' +
668                        '<li class="tarteaucitronLine" style="background:transparent">' +
669                        '   <div class="tarteaucitronName">' +
670                        '       <span class="tarteaucitronH3" role="heading" aria-level="3" id="tarteaucitronCookiesNumberBis">0 cookie</span>' +
671                        '      <button type="button" aria-expanded="false" class="tarteaucitron-toggle-group" id="tarteaucitron-toggle-group-cookies">' + tarteaucitron.lang.cookieDetail
vendor: 16,067 bytes, lines 671-843
671 + '</button>' +
672                        '    </div>' +
673                        '</li>' +
674                        '</ul>';
675                    html += '         <ul id="tarteaucitronServices_cookies" style="display:none"><div id="tarteaucitronCookiesList"></div></ul></li>';
676                }
677
678                for (i = 0; i < cat.length; i += 1) {
679                    html += '         <li id="tarteaucitronServicesTitle_' + cat[i] + '" class="tarteaucitronHidden">';
680                    html += '            <div class="tarteaucitronTitle" role="heading" aria-level="3">';
681                    if(tarteaucitron.parameters.showDetailsOnClick)
682                    {
683                        html += '               <button type="button" class="catToggleBtn" aria-expanded="false" data-cat="tarteaucitronDetails' + cat[i] + '"><span class="tarteaucitronPlus" aria-hidden="true"></span> ' + tarteaucitron.lang[cat[i]].title + '</button>';
684                    }else{
685                        html += '               <span class="asCatToggleBtn" data-cat="tarteaucitronInlineDetails' + cat[i] + '">' + tarteaucitron.lang[cat[i]].title + '</span>';
686                    }
687                    html += '            </div>';
688                    html += '            <div id="tarteaucitronDetails' + cat[i] + '" class="tarteaucitronDetails '+ (tarteaucitron.parameters.showDetailsOnClick ? 'tarteaucitronInfoBox' : 'tarteaucitronDetailsInline')+'" role="paragraph">';
689                    html += '               ' + tarteaucitron.lang[cat[i]].details;
690                    html += '            </div>';
691                    html += '         <ul id="tarteaucitronServices_' + cat[i] + '"></ul></li>';
692                }
693                html += '             <li id="tarteaucitronNoServicesTitle" class="tarteaucitronLine">' + tarteaucitron.lang.noServices + '</li>';
694                html += '         </ul>';
695                html += '         <div class="tarteaucitronHidden tarteaucitron-spacer-20" id="tarteaucitronScrollbarChild"></div>';
696                if (tarteaucitron.parameters.removeCredit === false) {
697                    html += '     <a class="tarteaucitronSelfLink" href="https://tarteaucitron.io/" rel="nofollow noreferrer noopener" target="_blank" title="tarteaucitron ' + tarteaucitron.lang.newWindow + '"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHcAAAAeCAYAAAAWwoEYAAADl0lEQVRoge1Y0W3bQAx9CjKARlC+9GVUmqDJBHEmiDyB6wkcTxBngtgTxJ0gzgQW4C/9aYOmE6g4lTQo+k6y3Rb94QOERNQd+cjj8XiGwWAwGAwGg8FgMBgMBoPB8F8RNRXe+whEKe7c36ZCAeCRxC9Rig2PUd8kPgAsoxSfQ3YAzAA8D/HwYYCb05kBKKO0teFkmbC1jlKsAnq/Abjn+QBqAIsoRS30ttwG/HNz1wH/XIxWTicLdvtW7xTAGEAMtP685CNsBTe2d/BLydfXAG57SEnMAST0zgYZSUCPk02bCvkJduIzuJzDLfPolbY+tLKmar+/8+IRePy4qdpE03qHuH8fipFb4N2+XdA3AJ/0vaQxt7s9FvkIS2XvtqnwM0rxpOQfbnE5G2LhTCmUO2fHIngOmcv+KG3HafDchB6ntwjYqenR2PqC7sOZ3E7FXHB0vqxoFyUyLh7OEH7LOGouvhhN3eIBeKXv0n5MsufdHqXcwYR5U2EbpV35lSspVPJmQj4TcgRK7jTg5IzmPUhhwM5a2WHUFCx+NgiDucmgh7idikLovHFlL0pxQ9xzX+IIP9Y6FrJsqhjlQpZRAkFVDCjZfcCHt6bqJDmuh5ylCWx0RVnk3oumaknqTH5sqrY0fBWyULaHUIgAgxb46MxV3DbieAhxOxUxjSuljig9lMQ/Bcfoi9BTEv9aLORSndVxYOH525sUDC6u2gWxcNzBNRxPanyh3ktKinOgy3WoxPbtUM0t6RkbQnzBnFPgi9GCOEubY9UffIryz9iKRe8s/FUfEWosJJGxagp85bpUO3VywQ46lOtAWfNxKwa4JXQ+628+bpxYGXXMzp5rXH401VEyXwIdowXFaKWSMFHvMTVmGnc+P3oXV2QOiBCfgex8QtcQCbcQE/H+eoHzrkFo1KM7zVO4jVVj5s6lRiWF7zyXyfRMc97J3tzj87mYqZ7E2YjzUct9GUi4tjHLR8dVkBLjQcuHFleWvQfRNEhFR7uX7pkctOwvZXsft7sAtyldEUIN2UTeLxnEfxKYswzdi88BdbZ8hifUoSMftQvP+muRwN6+Q3DeqqRExP9QmTtcheiHh0Ot1x2i2km1bP9pbufw5zZdyWsOrh7vQae5OZWbsMv30pi7cd/CKj3coPEVaCP4Zhx4eQWhOZ1Y9MTXGyP8/iGjEyfa1T4fO/4Lea9vBoPBYDAYDAaDwWAwGAwGwz8GgF8siXCCbrSRhgAAAABJRU5ErkJggg==" alt="tarteaucitron.io" /></a>';
698                }
699                html += '       </div>';
700                html += '   </div>';
701                html += '</div>';
702
703                if (tarteaucitron.parameters.orientation === 'bottom') {
704                    orientation = 'Bottom';
705                }
706
707                if (tarteaucitron.parameters.orientation === 'middle' || tarteaucitron.parameters.orientation === 'popup') {
708                    modalAttrs = ' role="dialog" aria-modal="true" aria-labelledby="tac_title"';
709                }
710
711                if (tarteaucitron.parameters.highPrivacy && !tarteaucitron.parameters.AcceptAllCta) {
712                    html += '<div tabindex="-1" id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '"' + modalAttrs + '>';
713                    //html += '<div class="tarteaucitronAlertBigWrapper">';
714                    html += '   <span id="tarteaucitronDisclaimerAlert" role="paragraph">';
715                    html += '       ' + tarteaucitron.lang.alertBigPrivacy;
716                    html += '   </span>';
717                    //html += '   <span class="tarteaucitronAlertBigBtnWrapper">';
718                    html += '   <button type="button" id="tarteaucitronPersonalize" aria-label="' + tarteaucitron.lang.personalize + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.personalize + ' ' + tarteaucitron.lang.modalWindow + '">';
719                    html += '       ' + tarteaucitron.lang.personalize;
720                    html += '   </button>';
721
722                    if (tarteaucitron.parameters.privacyUrl !== "") {
723                        html += '   <button role="link" type="button" id="tarteaucitronPrivacyUrl">';
724                        html += '       ' + tarteaucitron.lang.privacyUrl;
725                        html += '   </button>';
726                    }
727
728                    //html += '   </span>';
729                    //html += '</div>';
730                    html += '</div>';
731                } else {
732                    html += '<div tabindex="-1" id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '"' + modalAttrs + '>';
733                    //html += '<div class="tarteaucitronAlertBigWrapper">';
734                    html += '   <span id="tarteaucitronDisclaimerAlert" role="paragraph">';
735
736                    if (tarteaucitron.parameters.highPrivacy) {
737                        html += '       ' + tarteaucitron.lang.alertBigPrivacy;
738                    } else {
739                        html += '       ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig;
740                    }
741
742                    html += '   </span>';
743                    //html += '   <span class="tarteaucitronAlertBigBtnWrapper">';
744                    html += '   <button aria-label="' + tarteaucitron.lang.icon + ' : ' + tarteaucitron.lang.acceptAll + '" type="button" class="tarteaucitronCTAButton tarteaucitronAllow" id="tarteaucitronPersonalize2" aria-describedby="tarteaucitronDisclaimerAlert" >';
745                    html += '       <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.acceptAll;
746                    html += '   </button>';
747
748
749                    if (tarteaucitron.parameters.DenyAllCta) {
750                        if (tarteaucitron.reloadThePage) {
751                                    html += '   <button type="button" class="tarteaucitronCTAButton tarteaucitronDeny" id="tarteaucitronAllDenied2" aria-describedby="tarteaucitronDisclaimerAlert" aria-label="' + tarteaucitron.lang.icon + ' : ' + tarteaucitron.lang.denyAll + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.denyAll + ' (' + tarteaucitron.lang.reload + ')">';
752                        } else {
753                                    html += '   <button type="button" class="tarteaucitronCTAButton tarteaucitronDeny" id="tarteaucitronAllDenied2" aria-describedby="tarteaucitronDisclaimerAlert" aria-label="' + tarteaucitron.lang.icon + ' : ' + tarteaucitron.lang.denyAll + '">';
754                        }
755                                    html += '       <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.denyAll;
756                                    html += '   </button>';
757                                    //html += '   <br/><br/>';
758                    }
759
760                    html += '   <button type="button" id="tarteaucitronCloseAlert"  aria-describedby="tarteaucitronDisclaimerAlert" aria-label="' + tarteaucitron.lang.personalize + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.personalize + ' ' + tarteaucitron.lang.modalWindow + '">';
761                    html += '       ' + tarteaucitron.lang.personalize;
762                    html += '   </button>';
763
764                    if (tarteaucitron.parameters.privacyUrl !== "") {
765                        html += '   <button type="button" id="tarteaucitronPrivacyUrl" role="link">';
766                        html += '       ' + tarteaucitron.lang.privacyUrl;
767                        html += '   </button>';
768                    }
769
770                    //html += '   </span>';
771                    //html += '</div>';
772                    html += '</div>';
773                    html += '<div id="tarteaucitronPercentage"></div>';
774                }
775
776                if (tarteaucitron.parameters.showIcon === true) {
777                    html += '<div id="tarteaucitronIcon" class="tarteaucitronIcon' + tarteaucitron.parameters.iconPosition + '">';
778                    html += '   <button type="button" id="tarteaucitronManager" aria-label="' + tarteaucitron.lang.icon + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.icon + ' ' + tarteaucitron.lang.modalWindow + '">';
779                    html += '       <img src="' + (tarteaucitron.parameters.iconSrc ? tarteaucitron.parameters.iconSrc : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAGA0lEQVRoge1a207bWBRdBtJwLYZhKDMVmlSK1LxNkPo+ZH6g8B6p5AuALwC+APoFoVLeoT8whPeRSt+CZKmZVu3AiIsRlEtCktGyjy8xzuXYhvahS0JJHJ/4rLP3XnuffcAPfGdQ7mM6jRLSAF4BxqsbewB2lRS2o35mpEQaJcwCyANIdLi1DGBNSWEzqmdHRqRRwjqAJclhtExOSUEP+/xIiDRKhhUWfL7ShTtBuJnqcw+/z4Ql0xNmMEwSSz4kuNIzSgpjSsqYJP/GeE185wYJroedRyiLNEpGLLzzrHSuk+83SgbxvOcyyRaDziWsRVZkSRDinpzPbwVGWIucuohsKynMS47fAQyls/BMSRmKJo3AFhG5wm2N1wF+Zs3zebbFfR0RxrXcJHQlgH+LMW616pR/WiIMEXfW3mtzXyeEGWsjKot8c4TOI98L+iKaR5PS6IUk88RLAO9F8UjrbYoYMOosNavpfmODIiwRXRR/G3ohaWVo1RU/c30jV8ab2mV8qVGzHWBOLyTLZiWs5Rolg/C3ySOi0tXP/k4aEwOwSBKPJs7Rp16ABJTe+p1xVX0It/owqqdDEMRoqd3RFxqDPh20Ig6VEPVC0i5RSCD+6wl6HlW7GksSlUMV11/GrUs5NasFLusDE9ELSVphXemtJwaT/8JyIRvxNNCfBmIiNdR04LII3DSrbe0yjqvyJF/ppptqVlt+MCLCEh/oOkPPP6N38Mb5cnQBGFsEqmXg5j3QMwoMzwGnr4HYbybBq13gZAOom/FO63zdf2qQArCsZrUN2TlJy69eSDKYV+6Q4MpP75ivHzPA53ngaBW4eGuSOt0A/lsGPmXMz0+3TFJcTfFbPfFbfnwlhON+iQhlWmA82CQ4ocQ7c6KcfL3DHuls0yT6Sx4YnLXJDCQOIRRv5yGIJBgP8Sdisj2qubpc5UGJmo+W49ifVmzL8HcpGhQPvZCUKiCliIhEN0tr2OCqHuSA8gwQ/92MkU7gxEmeVqGrTTgpxPXbUrtGWYus0I9thRIraagRQUIDf7Qn4yZhKRiFQIyhfMfUr3yblokVWSJ6k8xSnc7eNN/RjowfCYiFoDUFer1S3gW6JiJ8Nt30EMbEhU+vzSIztuRYjRLsR8IHLjlf7HZ+MrWWEXxNmbvapt4jGSqZRYSkGUetSNTPzHsui5YMQ2ajJUNks6mw4wT54Ok2ShnzzIPCUGshzawCRKy5FqvrTZe0RWzQGvw79m67XZjKmxJrLsICjtZa55gxXy+6F4sYsEtxTqhXdRTLC8ulSDaWoCLsolfN+8YUhOsJV709H7Cudr0LlVEtzqBcN+shEyThdR941OnAbF8pirKJqXyupTRTtQSReiVmXW1j7oBErB0d9xM2WEd5J9ZKYtuR4WKwwBSoORbpGrJ5ZI9lt71irJmGX1px0JYE26uNErawr2zfIcP4OHEKXm66PA3wjpCNEfpJunI4muifPjKvsFCkGjExTq63yxMJsZNMYF/J4HmDC5A3Yq36jy0ClePHVhwuu/b1HSFlEfHD5ZtD1bEK44Qu1mWys6tbWmZyPWckzlPTGiRw/XHCuk+q4Rek+mVrVL/UppwrdDEGNV2kpyuhccgc5Oxm9vWnn+19vJrVpLor0kTUrGacMplb1CfOFyTD4o9uNrHqr2Z+ZMSp1c2XcVSORnh9Q81q3k599ETgkNnjg0nGzi10K7rX+bZpHbrblPcY5A4Zxk2xcjzCvTpd9027Aa0QtouyyrKFRR6D/04DwkFGvHPXM3Qda/Jb4nPgI7hQLVM1q5HIBt2MzQNa57Z1DiiLAGa5Mi+O4Sz3Mpp6laPHO6InII3ITnX1QtI+EOX+m9ZxleOZ/j9PiuKoLi3aqXPuEoSye/Vhkm+LalbLtHhMS0R6zu7aZ3vP2jOjL7QVv4McxhcDnZIelAQibGIbULOapf3PuE1Vs9qeaOTdkVKr00gCQiw4NlBzDvf1Lxx+uP5r3Dgv5KQZRzWn+GRwz8jmDS8itUg7iB6vLuJCF5Uty4A9mVKkFR6MiJDachST/oHvHgD+B4SoUIitpF05AAAAAElFTkSuQmCC') + '" alt="' + tarteaucitron.lang.icon + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.icon + ' ' + tarteaucitron.lang.modalWindow + '">';
780                    html += '   </button>';
781                    html += '</div>';
782                }
783
784                if (tarteaucitron.parameters.showAlertSmall === true) {
785                    html += '<div id="tarteaucitronAlertSmall" class="tarteaucitronAlertSmall' + orientation + '">';
786                    html += '   <button type="button" id="tarteaucitronManager" aria-label="' + tarteaucitron.lang.alertSmall + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.alertSmall + ' ' + tarteaucitron.lang.modalWindow + '">';
787                    html += '       ' + tarteaucitron.lang.alertSmall;
788                    html += '       <span id="tarteaucitronDot">';
789                    html += '           <span id="tarteaucitronDotGreen"></span>';
790                    html += '           <span id="tarteaucitronDotYellow"></span>';
791                    html += '           <span id="tarteaucitronDotRed"></span>';
792                    html += '       </span>';
793                    if (tarteaucitron.parameters.cookieslist === true) {
794                        html += '   </button><!-- @whitespace';
795                        html += '   --><button type="button" id="tarteaucitronCookiesNumber" aria-expanded="false" aria-controls="tarteaucitronCookiesListContainer">0</button>';
796                        html += '   <div id="tarteaucitronCookiesListContainer">';
797                        if (tarteaucitron.reloadThePage) {
798                            html += '       <button type="button" id="tarteaucitronClosePanelCookie" aria-label="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')">';
799                        } else {
800                            html += '       <button type="button" id="tarteaucitronClosePanelCookie">';
801                        }
802                        html += '           ' + tarteaucitron.lang.close;
803                        html += '       </button>';
804                        html += '       <div class="tarteaucitronCookiesListMain" id="tarteaucitronCookiesTitle">';
805                        html += '            <span class="tarteaucitronH2" role="heading" aria-level="3" id="tarteaucitronCookiesNumberBis">0 cookie</span>';
806                        html += '       </div>';
807                        html += '       <div id="tarteaucitronCookiesList"></div>';
808                        html += '    </div>';
809                    } else {
810                        html += '   </div>';
811                    }
812                    html += '</div>';
813                }
814
815                tarteaucitron.addInternalScript(tarteaucitron.cdn + 'advertising' + (useMinifiedJS ? '.min' : '') + '.js', '', function () {
816                    if (tarteaucitronNoAdBlocker === true || tarteaucitron.parameters.adblocker === false) {
817
818                        // create a wrapper container at the same level than tarteaucitron so we can add an aria-hidden when tarteaucitron is opened
819                        /*var wrapper = document.createElement('div');
820                        wrapper.id = "tarteaucitronContentWrapper";
821
822                        while (document.body.firstChild)
823                        {
824                            wrapper.appendChild(document.body.firstChild);
825                        }
826
827                        // Append the wrapper to the body
828                        document.body.appendChild(wrapper);*/
829
830                        div.id = 'tarteaucitronRoot';
831                        if (tarteaucitron.parameters.bodyPosition === 'top') {
832                            // Prepend tarteaucitron: #tarteaucitronRoot first-child of the body for better accessibility
833                            var bodyFirstChild = body.firstChild;
834                            body.insertBefore(div, bodyFirstChild);
835                        }
836                        else {
837                            // Append tarteaucitron: #tarteaucitronRoot last-child of the body
838                            body.appendChild(div, body);
839                        }
840
841                        tarteaucitron.userInterface.addClass("tarteaucitronRoot", "tarteaucitronSize-" + tarteaucitron.parameters.orientation);
842
843                        
vendor: 2,513 bytes, lines 843-893
843div.setAttribute('data-nosnippet', 'true');
844                        div.setAttribute('lang', language);
845                        div.setAttribute('role', 'region');
846                        div.setAttribute('aria-labelledby', 'tac_title');
847
848                        div.innerHTML = html;
849
850                        //ie compatibility
851                        var tacRootAvailableEvent;
852                        if(typeof(Event) === 'function') {
853                            tacRootAvailableEvent = new Event("tac.root_available");
854                        }else if (typeof(document.createEvent) === 'function'){
855                            tacRootAvailableEvent = document.createEvent('Event');
856                            tacRootAvailableEvent.initEvent("tac.root_available", true, true);
857                        }
858                        //end ie compatibility
859
860                        if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacRootAvailableEvent);}
861
862                        if (tarteaucitron.job !== undefined) {
863                            tarteaucitron.job = tarteaucitron.cleanArray(tarteaucitron.job);
864                            for (index = 0; index < tarteaucitron.job.length; index += 1) {
865                                tarteaucitron.addService(tarteaucitron.job[index]);
866                            }
867                        } else {
868                            tarteaucitron.job = [];
869                        }
870
871                        if (tarteaucitron.job.length === 0) {
872                            tarteaucitron.userInterface.closeAlert();
873                        }
874
875                        tarteaucitron.isAjax = true;
876
877                        tarteaucitron.job.push = function (id) {
878
879                            // ie <9 hack
880                            if (typeof tarteaucitron.job.indexOf === 'undefined') {
881                                tarteaucitron.job.indexOf = function (obj, start) {
882                                    var i,
883                                        j = this.length;
884                                    for (i = (start || 0); i < j; i += 1) {
885                                        if (this[i] === obj) { return i; }
886                                    }
887                                    return -1;
888                                };
889                            }
890
891                            if (tarteaucitron.job.indexOf(id) === -1) {
892                                Array.prototype.push.call(this, id);
893                            }
894                            tarteaucitron.launch[id] = false;
895                            tarteaucitron.addService(id);
vendor: 10,684 bytes, lines 895-1049
895
896                        };
897
898                        if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') {
899                            tarteaucitron.userInterface.openPanel();
900                        }
901
902                        tarteaucitron.cookie.number();
903                        setInterval(tarteaucitron.cookie.number, 60000);
904                    }
905                }, tarteaucitron.parameters.adblocker);
906
907                if (tarteaucitron.parameters.adblocker === true) {
908                    setTimeout(function () {
909                        if (tarteaucitronNoAdBlocker === false) {
910                            html = '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + ' tarteaucitron-display-block" role="alert" aria-live="polite">';
911                            html += '   <p id="tarteaucitronDisclaimerAlert">';
912                            html += '       ' + tarteaucitron.lang.adblock + '<br/>';
913                            html += '       <strong>' + tarteaucitron.lang.adblock_call + '</strong>';
914                            html += '   </p>';
915                            html += '   <button type="button" class="tarteaucitronCTAButton" id="tarteaucitronCTAButton">';
916                            html += '       ' + tarteaucitron.lang.reload;
917                            html += '   </button>';
918                            html += '</div>';
919                            html += '<div role="heading" aria-level="2" id="tac_title" class="tac_visually-hidden">' + tarteaucitron.lang.title + '</div>';
920                            html += '<div id="tarteaucitronPremium"></div>';
921
922                            div.id = 'tarteaucitronRoot';
923                            if (tarteaucitron.parameters.bodyPosition === 'top') {
924                                // Prepend tarteaucitron: #tarteaucitronRoot first-child of the body for better accessibility
925                                var bodyFirstChild = body.firstChild;
926                                body.insertBefore(div, bodyFirstChild);
927                            }
928                            else {
929                                // Append tarteaucitron: #tarteaucitronRoot last-child of the body
930                                body.appendChild(div, body);
931                            }
932
933                            div.setAttribute('data-nosnippet', 'true');
934                            div.setAttribute('lang', language);
935                            div.setAttribute('role', 'region');
936                            div.setAttribute('aria-labelledby', 'tac_title');
937
938                            div.innerHTML = html;
939                        }
940                    }, 1500);
941                }
942                if(tarteaucitron.parameters.closePopup === true){
943                    setTimeout(function() {
944                        var closeElement = document.getElementById('tarteaucitronAlertBig'),
945                            closeButton = document.createElement('button');
946                        if (closeElement) {
947                            closeButton.innerHTML = '<span aria-hidden="true">X</span><span class="tac_visually-hidden">' + tarteaucitron.lang.closeBanner + '</span>';
948                            closeButton.setAttribute('id', 'tarteaucitronCloseCross');
949                            closeElement.insertAdjacentElement('beforeend', closeButton);
950                        }
951                    }, 100);
952                }
953
954                if(tarteaucitron.parameters.groupServices === true) {
955                    var tac_group_style = document.createElement('style');
956                    tac_group_style.innerHTML = '.tarteaucitronTitle{display:none}';
957                    document.head.appendChild(tac_group_style);
958                    var cats = document.querySelectorAll('[id^="tarteaucitronServicesTitle_"]')
959                    Array.prototype.forEach.call(cats, function(item) {
960                        var cat = item.getAttribute('id').replace(/^(tarteaucitronServicesTitle_)/, "");
961                        if (cat !== "mandatory") {
962                            var html = '';
963                            html += '<li  class="tarteaucitronLine">';
964                            html += '   <div class="tarteaucitronName">';
965                            html += '       <span class="tarteaucitronH3" role="heading" aria-level="3">'+tarteaucitron.lang[cat].title+'</span>';
966                            html += '       <span>'+tarteaucitron.lang[cat].details+'</span>';
967                            html += '   <button type="button" aria-expanded="false" class="tarteaucitron-toggle-group" id="tarteaucitron-toggle-group-'+cat+'">'+tarteaucitron.lang.alertSmall+' <span id="tarteaucitronCounter-'+cat+'"></span></button>';
968                            html += '   </div>';
969                            html += '   <div class="tarteaucitronAsk" id="tarteaucitron-group-'+cat+'">';
970                            html += '       <button type="button" aria-label="' + tarteaucitron.lang.allow + ' ' + tarteaucitron.lang[cat].title + '" class="tarteaucitronAllow" id="tarteaucitron-accept-group-'+cat+'">';
971                            html += '           <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allow;
972                            html += '       </button> ';
973                            html += '       <button type="button" aria-label="' + tarteaucitron.lang.deny + ' ' + tarteaucitron.lang[cat].title + '" class="tarteaucitronDeny" id="tarteaucitron-reject-group-'+cat+'">';
974                            html += '           <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.deny;
975                            html += '       </button>';
976                            html += '   </div>';
977                            html += '</li>';
978                            var ul = document.createElement('ul');
979                            ul.innerHTML = html;
980                            item.insertBefore(ul, item.querySelector('#tarteaucitronServices_'+cat+''));
981                            document.querySelector('#tarteaucitronServices_' + cat).style.display = 'none';
982                            tarteaucitron.addClickEventToId("tarteaucitron-toggle-group-" + cat, function () {
983                                tarteaucitron.userInterface.toggle('tarteaucitronServices_' + cat);
984                               if (document.getElementById('tarteaucitronServices_' + cat).style.display == 'block') {
985                                    tarteaucitron.userInterface.addClass('tarteaucitronServicesTitle_' + cat, 'tarteaucitronIsExpanded');
986                                    document.getElementById('tarteaucitron-toggle-group-'+cat).setAttribute('aria-expanded', 'true');
987                                } else {
988                                    tarteaucitron.userInterface.removeClass('tarteaucitronServicesTitle_' + cat, 'tarteaucitronIsExpanded');
989                                    document.getElementById('tarteaucitron-toggle-group-'+cat).setAttribute('aria-expanded', 'false');
990                                }
991                                //tarteaucitron.initEvents.resizeEvent();
992                            });
993                            tarteaucitron.addClickEventToId("tarteaucitron-accept-group-" + cat, function () {
994                                tarteaucitron.userInterface.respondAll(true, cat);
995                            });
996                            tarteaucitron.addClickEventToId("tarteaucitron-reject-group-" + cat, function () {
997                                tarteaucitron.userInterface.respondAll(false, cat);
998                            });
999                        }
1000                    });
1001                }
1002
1003                // add info about the services on the main banner
1004                if (tarteaucitron.parameters.partnersList === true && (tarteaucitron.parameters.orientation === "middle" || tarteaucitron.parameters.orientation === "popup")) {
1005                    setTimeout(function() {
1006                        var tacPartnersInfoParent = document.getElementById('tarteaucitronDisclaimerAlert');
1007                        if (tacPartnersInfoParent !== null) {
1008                            tacPartnersInfoParent.insertAdjacentHTML('beforeend', '<div class="tarteaucitronPartnersList"><b>' + tarteaucitron.lang.ourpartners + ' <span id="tarteaucitronCounter-all"></span></b> <ul id="tarteaucitronCounter-list"></ul></div>');
1009                        }
1010                    }, 100);
1011                }
1012
1013                // add a save button
1014                setTimeout(function() {
1015                    var tacSaveButtonParent = document.getElementById('tarteaucitronServices');
1016                    if (tacSaveButtonParent !== null) {
1017                        tacSaveButtonParent.insertAdjacentHTML('beforeend', '<div id="tarteaucitronSave"><button class="tarteaucitronAllow" id="tarteaucitronSaveButton">' + tarteaucitron.lang.save + '</button></div>');
1018                    }
1019                }, 100);
1020
1021                tarteaucitron.userInterface.color("", true);
1022
1023                // add a little timeout to be sure everything is accessible
1024                setTimeout(function () {
1025
1026                    // Setup events
1027                    tarteaucitron.addClickEventToId("tarteaucitronCloseCross", function () {
1028                        tarteaucitron.userInterface.closeAlert();
1029                    });
1030                    tarteaucitron.addClickEventToId("tarteaucitronPersonalize", function () {
1031                        tarteaucitron.userInterface.openPanel();
1032                    });
1033                    tarteaucitron.addClickEventToId("tarteaucitronPersonalize2", function () {
1034                        tarteaucitron.userInterface.respondAll(true);
1035                    });
1036                    tarteaucitron.addClickEventToId("tarteaucitronManager", function () {
1037                        tarteaucitron.userInterface.openPanel();
1038                    });
1039                    tarteaucitron.addClickEventToId("tarteaucitronBack", function () {
1040                        tarteaucitron.userInterface.closePanel();
1041                    });
1042                    tarteaucitron.addClickEventToId("tarteaucitronClosePanel", function () {
1043                        tarteaucitron.userInterface.closePanel();
1044                    });
1045                    tarteaucitron.addClickEventToId("tarteaucitronClosePanelCookie", function () {
1046                        tarteaucitron.userInterface.closePanel();
1047                    });
1048                    tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrl", function () {
1049                        document.location = tarteaucitron.
1049parameters.privacyUrl;
1050                    });
1051                    tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrlDialog", function () {
1052                        document.location = tarteaucitron.parameters.privacyUrl;
1053                    });
1054                    tarteaucitron.addClickEventToId("tarteaucitronCookiesNumber", function () {
1055                        tarteaucitron.userInterface.toggleCookiesList();
1056                    });
1057                    tarteaucitron.addClickEventToId("tarteaucitronAllAllowed", function () {
1058                        tarteaucitron.userInterface.respondAll(true);
1059                    });
1060                    tarteaucitron.addClickEventToId("tarteaucitronAllDenied", function () {
1061                        tarteaucitron.userInterface.respondAll(false);
1062                    });
1063                    tarteaucitron.addClickEventToId("tarteaucitronAllDenied2", function () {
1064                        tarteaucitron.userInterface.respondAll(false, '', true);
1065                        if (tarteaucitron.reloadThePage === true) {
1066                            window.location.reload();
1067                        }
1068                    });
1069                    tarteaucitron.addClickEventToId("tarteaucitronCloseAlert", function () {
vendor: 20,801 bytes, lines 1070-1469
1070                        tarteaucitron.userInterface.openPanel();
1071                    });
1072                    tarteaucitron.addClickEventToId("tarteaucitronCTAButton", function () {
1073                        location.reload();
1074                    });
1075                    tarteaucitron.addClickEventToId("tarteaucitronSaveButton", function () {
1076                        var timeoutSaveButton = 0;
1077                        tarteaucitron.job.forEach(function(id) {
1078                            if (tarteaucitron.state[id] !== true && tarteaucitron.state[id] !== false) {
1079                                timeoutSaveButton = 500;
1080                                tarteaucitron.setConsent(id, false);
1081                            }
1082                        });
1083                        setTimeout(tarteaucitron.userInterface.closePanel, timeoutSaveButton);
1084                    });
1085                    var toggleBtns = document.getElementsByClassName("catToggleBtn"), i;
1086                    for (i = 0; i < toggleBtns.length; i++) {
1087                        toggleBtns[i].dataset.index = i;
1088                        tarteaucitron.addClickEventToElement(toggleBtns[i], function () {
1089                            if(!tarteaucitron.parameters.showDetailsOnClick) return false;
1090                            tarteaucitron.userInterface.toggle('tarteaucitronDetails' + cat[this.dataset.index], 'tarteaucitronInfoBox');
1091                            if (document.getElementById('tarteaucitronDetails' + cat[this.dataset.index]).style.display === 'block') {
1092                                this.setAttribute('aria-expanded', 'true');
1093                            } else {
1094                                this.setAttribute('aria-expanded', 'false');
1095                            }
1096                            return false;
1097                        });
1098                    }
1099
1100                    // accessibility: on click on "Allow" in the site (not in TAC module), move focus to the loaded service's parent 
1101                    var allowBtnsInSite = document.querySelectorAll(".tac_activate .tarteaucitronAllow");
1102                    for (i = 0; i < allowBtnsInSite.length; i++) {
1103                        tarteaucitron.addClickEventToElement(allowBtnsInSite[i], function () {
1104                            if(this.closest('.tac_activate') !== null && this.closest('.tac_activate').parentNode !== null) {
1105                                this.closest('.tac_activate').parentNode.setAttribute("tabindex", "-1");
1106                                this.closest('.tac_activate').parentNode.focus();
1107                            }
1108                        });
1109                    }
1110
1111                    var allowBtns = document.getElementsByClassName("tarteaucitronAllow");
1112                    for (i = 0; i < allowBtns.length; i++) {
1113                        tarteaucitron.addClickEventToElement(allowBtns[i], function () {
1114                            tarteaucitron.userInterface.respond(this, true);
1115                        });
1116                    }
1117                    var denyBtns = document.getElementsByClassName("tarteaucitronDeny");
1118                    for (i = 0; i < denyBtns.length; i++) {
1119                        tarteaucitron.addClickEventToElement(denyBtns[i], function () {
1120                            tarteaucitron.userInterface.respond(this, false);
1121                        });
1122                    }
1123                    if(tarteaucitron.events.load) {
1124                        tarteaucitron.events.load();
1125                    }
1126
1127                }, 500);
1128
1129            });
1130        });
1131    },
1132    "addService": function (serviceId) {
1133        "use strict";
1134        var html = '',
1135            s = tarteaucitron.services,
1136            service = s[serviceId];
1137
1138        if (typeof service === "undefined") {
1139
1140            var serviceToRemoveIndex = tarteaucitron.job.indexOf(serviceId);
1141            if (serviceToRemoveIndex !== -1) {
1142                tarteaucitron.job.splice(serviceToRemoveIndex, 1);
1143            }
1144            return;
1145        }
1146
1147        if (tarteaucitron.parameters.alwaysNeedConsent === true) {
1148            service.needConsent = true;
1149        }
1150
1151        var cookie = tarteaucitron.cookie.read(),
1152            hostname = document.location.hostname,
1153            hostRef = document.referrer.split('/')[2],
1154            isNavigating = (hostRef === hostname && window.location.href !== tarteaucitron.parameters.privacyUrl),
1155            isAutostart = (!service.needConsent),
1156            isWaiting = (cookie.indexOf(service.key + '=wait') >= 0),
1157            isDenied = (cookie.indexOf(service.key + '=false') >= 0),
1158            isAllowed = ((cookie.indexOf(service.key + '=true') >= 0) || (!service.needConsent && cookie.indexOf(service.key + '=false') < 0)),
1159            isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0),
1160            isDNTRequested = (navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1" || window.doNotTrack === "1"),
1161            currentStatus = (isAllowed) ? tarteaucitron.lang.allowed : tarteaucitron.lang.disallowed,
1162            state = (undefined !== service.defaultState) ? service.defaultState :
1163                    (undefined !== tarteaucitron.parameters.serviceDefaultState ? tarteaucitron.parameters.serviceDefaultState : 'wait');
1164
1165
1166        if (tarteaucitron.added[service.key] !== true) {
1167            tarteaucitron.added[service.key] = true;
1168
1169            html += '<li id="' + service.key + 'Line" class="tarteaucitronLine">';
1170            html += '   <div class="tarteaucitronName">';
1171            html += '       <span class="tarteaucitronH3" role="heading" aria-level="4">' + service.name + '</span>';
1172            html += '       <div class="tarteaucitronStatusInfo">';
1173            html += '          <span class="tacCurrentStatus" id="tacCurrentStatus' + service.key + '">'+currentStatus+'</span>';
1174            html += '          <span class="tarteaucitronReadmoreSeparator"> - </span>';
1175            html += '          <span id="tacCL' + service.key + '" class="tarteaucitronListCookies"></span>';
1176            html += '       </div>';
1177            if (tarteaucitron.parameters.moreInfoLink == true) {
1178
1179                var link;
1180                if (tarteaucitron.getLanguage() === 'fr') {
1181                    link = 'https://tarteaucitron.io/service/' + service.key + '/';
1182                } else {
1183                    link = 'https://tarteaucitron.io/en/service-details/' + service.key + '/';
1184                }
1185                if (service.readmoreLink !== undefined && service.readmoreLink !== '') {
1186                    link = service.readmoreLink;
1187                }
1188                if (tarteaucitron.parameters.readmoreLink !== undefined && tarteaucitron.parameters.readmoreLink !== '') {
1189                    link = tarteaucitron.parameters.readmoreLink;
1190                }
1191                html += '       <a href="' + link + '" target="_blank" rel="noreferrer noopener nofollow" title="' + tarteaucitron.lang.more + ' : '+ tarteaucitron.lang.cookieDetail + ' ' + service.name + ' ' + tarteaucitron.lang.ourSite + ' ' + tarteaucitron.lang.newWindow +'" class="tarteaucitronReadmoreInfo">' + tarteaucitron.lang.more + '</a>';
1192                html += '       <span class="tarteaucitronReadmoreSeparator"> - </span>';
1193                html += '       <a href="' + service.uri + '" target="_blank" rel="noreferrer noopener" title="' + tarteaucitron.lang.source + ' ' + service.name + ' ' + tarteaucitron.lang.newWindow + '" class="tarteaucitronReadmoreOfficial">' + tarteaucitron.lang.source + '</a>';
1194            }
1195
1196            html += '   </div>';
1197            html += '   <div class="tarteaucitronAsk">';
1198            html += '       <button type="button" aria-label="' + tarteaucitron.lang.allow + ' ' + service.name + '" id="' + service.key + 'Allowed" class="tarteaucitronAllow">';
1199            html += '           <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allow;
1200            html += '       </button> ';
1201            html += '       <button type="button" aria-label="' + tarteaucitron.lang.deny + ' ' + service.name + '" id="' + service.key + 'Denied" class="tarteaucitronDeny">';
1202            html += '           <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.deny;
1203            html += '       </button>';
1204            html += '   </div>';
1205            html += '</li>';
1206
1207            tarteaucitron.userInterface.css('tarteaucitronServicesTitle_' + service.type, 'display', 'block');
1208
1209            if (document.getElementById('tarteaucitronServices_' + service.type) !== null) {
1210                document.getElementById('tarteaucitronServices_' + service.type).innerHTML += html;
1211            }
1212
1213            tarteaucitron.userInterface.css('tarteaucitronNoServicesTitle', 'display', 'none');
1214
1215            tarteaucitron.userInterface.order(service.type);
1216
1217            tarteaucitron.addClickEventToId(service.key + 'Allowed', function () {
1218                tarteaucitron.userInterface.respond(this, true);
1219            });
1220
1221            tarteaucitron.addClickEventToId(service.key + 'Denied', function () {
1222                tarteaucitron.userInterface.respond(this, false);
1223            });
1224        }
1225
1226        tarteaucitron.pro('!' + service.key + '=' + isAllowed);
1227
1228        // allow by default for non EU
1229        if (isResponded === false && tarteaucitron.user.bypass === true) {
1230            isAllowed = true;
1231            tarteaucitron.cookie.create(service.key, true);
1232        }
1233
1234        if ((!isResponded && (isAutostart || (isNavigating && isWaiting)) && !tarteaucitron.highPrivacy) || isAllowed) {
1235            if (!isAllowed || (!service.needConsent && cookie.indexOf(service.key + '=false') < 0)) {
1236                tarteaucitron.cookie.create(service.key, true);
1237            }
1238            if (tarteaucitron.launch[service.key] !== true) {
1239                tarteaucitron.launch[service.key] = true;
1240                tarteaucitron.sendEvent(service.key + '_consentModeOk');
1241                if ((typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) && tarteaucitron.parameters.serverSide !== true) { service.js(); }
1242                tarteaucitron.sendEvent(service.key + '_loaded');
1243            }
1244            tarteaucitron.state[service.key] = true;
1245            tarteaucitron.userInterface.color(service.key, true);
1246        } else if (isDenied) {
1247            if (typeof service.fallback === 'function') {
1248                if ((typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) && tarteaucitron.parameters.serverSide !== true) { service.fallback(); }
1249            }
1250            tarteaucitron.state[service.key] = false;
1251            tarteaucitron.userInterface.color(service.key, false);
1252        } else if (!isResponded && isDNTRequested && tarteaucitron.handleBrowserDNTRequest) {
1253            tarteaucitron.cookie.create(service.key, 'false');
1254            if (typeof service.fallback === 'function') {
1255                if ((typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) && tarteaucitron.parameters.serverSide !== true) { service.fallback(); }
1256            }
1257            tarteaucitron.state[service.key] = false;
1258            tarteaucitron.userInterface.color(service.key, false);
1259        } else if (!isResponded) {
1260            tarteaucitron.cookie.create(service.key, state);
1261
1262            if (true === state) {
1263                tarteaucitron.sendEvent(service.key + '_consentModeOk');
1264            }
1265
1266            if ((typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) && tarteaucitron.parameters.serverSide !== true) {
1267                if(true === state && typeof service.js === 'function') {
1268                    service.js();
1269                } else if (typeof service.fallback === 'function') {
1270                    service.fallback();
1271                }
1272            }
1273
1274            if (true === state) {
1275                tarteaucitron.sendEvent(service.key + '_loaded');
1276            }
1277
1278            if (true === state || false === state) {
1279                tarteaucitron.state[service.key] = state;
1280            }
1281            tarteaucitron.userInterface.color(service.key, state);
1282
1283            if( 'wait' === state ) {
1284                tarteaucitron.userInterface.openAlert();
1285            }
1286        }
1287
1288        tarteaucitron.cookie.checkCount(service.key);
1289        tarteaucitron.sendEvent(service.key + '_added');
1290    },
1291    "sendEvent" : function(event_key) {
1292        if(event_key !== undefined) {
1293            //ie compatibility
1294            var send_event_item;
1295            if(typeof(Event) === 'function') {
1296                send_event_item = new Event(event_key);
1297            }else if (typeof(document.createEvent) === 'function'){
1298                send_event_item = document.createEvent('Event');
1299                send_event_item.initEvent(event_key, true, true);
1300            }
1301            //end ie compatibility
1302
1303            document.dispatchEvent(send_event_item);
1304        }
1305    },
1306    "cleanArray": function cleanArray(arr) {
1307        "use strict";
1308        var i,
1309            len = arr.length,
1310            out = [],
1311            obj = {},
1312            s = tarteaucitron.services;
1313
1314        for (i = 0; i < len; i += 1) {
1315            if (!obj[arr[i]]) {
1316                obj[arr[i]] = {};
1317                if (tarteaucitron.services[arr[i]] !== undefined) {
1318                    out.push(arr[i]);
1319                }
1320            }
1321        }
1322
1323        out = out.sort(function (a, b) {
1324            if (s[a].type + s[a].key > s[b].type + s[b].key) { return 1; }
1325            if (s[a].type + s[a].key < s[b].type + s[b].key) { return -1; }
1326            return 0;
1327        });
1328
1329        return out;
1330    },
1331    "setConsent": function (id, status) {
1332        if (status === true) {
1333            tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true);
1334        } else if (status === false) {
1335            tarteaucitron.userInterface.respond(document.getElementById(id + 'Denied'), false);
1336        }
1337    },
1338    "userInterface": {
1339        "css": function (id, property, value) {
1340            "use strict";
1341            if (document.getElementById(id) !== null) {
1342
1343                if (property == "display" && value == "none" && (id == "tarteaucitron" || id == "tarteaucitronBack" || id == "tarteaucitronAlertBig")) {
1344                    document.getElementById(id).style["opacity"] = "0";
1345
1346                    /*setTimeout(function() {*/document.getElementById(id).style[property] = value;/*}, 200);*/
1347                } else {
1348
1349                    document.getElementById(id).style[property] = value;
1350
1351                    if (property == "display" && value == "block" && (id == "tarteaucitron" || id == "tarteaucitronAlertBig")) {
1352                        document.getElementById(id).style["opacity"] = "1";
1353                    }
1354
1355                    if (property == "display" && value == "block" && id == "tarteaucitronBack") {
1356                        document.getElementById(id).style["opacity"] = "0.7";
1357                    }
1358
1359                    if (property == "display" && value == "block" && id == "tarteaucitronAlertBig" && (tarteaucitron.parameters.orientation == "middle"|| tarteaucitron.parameters.orientation == "popup")) {
1360                        tarteaucitron.userInterface.focusTrap('tarteaucitronAlertBig');
1361                    }
1362                }
1363            }
1364        },
1365        "addClass": function (id, className) {
1366            "use strict";
1367            if (document.getElementById(id) !== null && document.getElementById(id).classList !== undefined) {
1368                document.getElementById(id).classList.add(className);
1369            }
1370        },
1371        "removeClass": function (id, className) {
1372            "use strict";
1373            if (document.getElementById(id) !== null && document.getElementById(id).classList !== undefined) {
1374                document.getElementById(id).classList.remove(className);
1375            }
1376        },
1377        "respondAll": function (status, type, allowSafeAnalytics) {
1378            "use strict";
1379            var s = tarteaucitron.services,
1380                service,
1381                key,
1382                index = 0;
1383
1384            for (index = 0; index < tarteaucitron.job.length; index += 1) {
1385
1386                if (typeof type !== 'undefined' && type !== '' && s[tarteaucitron.job[index]].type !== type) {
1387                    continue;
1388                }
1389
1390                if (allowSafeAnalytics && typeof s[tarteaucitron.job[index]].safeanalytic !== "undefined" && s[tarteaucitron.job[index]].safeanalytic === true) {
1391                    continue;
1392                }
1393
1394                service = s[tarteaucitron.job[index]];
1395                key = service.key;
1396                if (tarteaucitron.state[key] !== status) {
1397
1398                    if (status == true) {
1399                        tarteaucitron.sendEvent(key + '_consentModeOk');
1400                    } else {
1401                        tarteaucitron.sendEvent(key + '_consentModeKo');
1402                    }
1403
1404                    if (status === false && tarteaucitron.launch[key] === true) {
1405                        tarteaucitron.reloadThePage = true;
1406                        if (tarteaucitron.checkIfExist('tarteaucitronClosePanel')) {
1407                            var ariaCloseValue = document.getElementById('tarteaucitronClosePanel').textContent.trim() + ' (' + tarteaucitron.lang.reload + ')';
1408                            document.getElementById('tarteaucitronClosePanel').setAttribute("aria-label", ariaCloseValue);
1409                            document.getElementById('tarteaucitronClosePanel').setAttribute("title", ariaCloseValue);
1410                        }
1411                    }
1412                    if (tarteaucitron.launch[key] !== true && status === true) {
1413                        tarteaucitron.pro('!' + key + '=engage');
1414
1415                        tarteaucitron.launch[key] = true;
1416                        if ((typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) && tarteaucitron.parameters.serverSide !== true) { tarteaucitron.services[key].js(); }
1417                        tarteaucitron.sendEvent(key + '_loaded');
1418                    }
1419                    var itemStatusElem = document.getElementById('tacCurrentStatus'+key);
1420                    tarteaucitron.state[key] = status;
1421                    tarteaucitron.cookie.create(key, status);
1422                    tarteaucitron.userInterface.color(key, status);
1423                    if (status == true) {
1424                        itemStatusElem.innerHTML = tarteaucitron.lang.allowed;
1425                        tarteaucitron.sendEvent(key + '_allowed');
1426                    } else {
1427                        itemStatusElem.innerHTML = tarteaucitron.lang.disallowed;
1428                        tarteaucitron.sendEvent(key + '_disallowed');
1429                    }
1430                }
1431            }
1432        },
1433        "respond": function (el, status) {
1434            "use strict";
1435            if (el.id === '') {
1436                return;
1437            }
1438            var key = el.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed", "g"), '');
1439
1440            if (key.substring(0, 13) === 'tarteaucitron' || key === '') {return;}
1441
1442            // return if same state
1443            if (tarteaucitron.state[key] === status) {
1444                return;
1445            }
1446
1447            if (status == true) {
1448                tarteaucitron.sendEvent(key + '_consentModeOk');
1449            } else {
1450                tarteaucitron.sendEvent(key + '_consentModeKo');
1451            }
1452
1453            if (status === false && tarteaucitron.launch[key] === true) {
1454                tarteaucitron.reloadThePage = true;
1455                if (tarteaucitron.checkIfExist('tarteaucitronClosePanel')) {
1456                    var ariaCloseValue = document.getElementById('tarteaucitronClosePanel').textContent.trim() + ' (' + tarteaucitron.lang.reload + ')';
1457                    document.getElementById('tarteaucitronClosePanel').setAttribute("aria-label", ariaCloseValue);
1458                    document.getElementById('tarteaucitronClosePanel').setAttribute("title", ariaCloseValue);
1459                }
1460            }
1461
1462            // if not already launched... launch the service
1463            if (status === true) {
1464                if (tarteaucitron.launch[key] !== true) {
1465                    tarteaucitron.pro('!' + key + '=engage');
1466
1467                    tarteaucitron.launch[key] = true;
1468                    tarteaucitron.sendEvent(key + '_consentModeOk');
1469                    if ((typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) && tarteaucitron.parameters.serverSide !== true
vendor: 23,206 bytes, lines 1469-1941
1469) { tarteaucitron.services[key].js(); }
1470                    tarteaucitron.sendEvent(key + '_loaded');
1471                }
1472            }
1473            var itemStatusElem = document.getElementById('tacCurrentStatus'+key);
1474            tarteaucitron.state[key] = status;
1475            tarteaucitron.cookie.create(key, status);
1476            tarteaucitron.userInterface.color(key, status);
1477            if (status == true) {
1478                itemStatusElem.innerHTML = tarteaucitron.lang.allowed;
1479                tarteaucitron.sendEvent(key + '_allowed');
1480            } else {
1481                itemStatusElem.innerHTML = tarteaucitron.lang.disallowed;
1482                tarteaucitron.sendEvent(key + '_disallowed');
1483            }
1484        },
1485        "color": function (key, status) {
1486            "use strict";
1487            var c = 'tarteaucitron',
1488                nbDenied = 0,
1489                nbPending = 0,
1490                nbAllowed = 0,
1491                sum = tarteaucitron.job.length,
1492                index,
1493                s = tarteaucitron.services;
1494
1495            if (key !== "") {
1496
1497                tarteaucitron.cookie.checkCount(key);
1498
1499            if (status === true) {
1500                tarteaucitron.userInterface.addClass(key + 'Line', 'tarteaucitronIsAllowed');
1501                tarteaucitron.userInterface.removeClass(key + 'Line', 'tarteaucitronIsDenied');
1502                document.getElementById(key + 'Allowed').setAttribute('aria-pressed', 'true');
1503                document.getElementById(key + 'Denied').setAttribute('aria-pressed', 'false');
1504            } else if (status === false) {
1505                tarteaucitron.userInterface.removeClass(key + 'Line', 'tarteaucitronIsAllowed');
1506                tarteaucitron.userInterface.addClass(key + 'Line', 'tarteaucitronIsDenied');
1507                document.getElementById(key + 'Allowed').setAttribute('aria-pressed', 'false');
1508                document.getElementById(key + 'Denied').setAttribute('aria-pressed', 'true');
1509            } else {
1510                document.getElementById(key + 'Allowed').setAttribute('aria-pressed', 'false');
1511                document.getElementById(key + 'Denied').setAttribute('aria-pressed', 'false');
1512            }
1513
1514            // check if all services are allowed
1515            var sumToRemove = 0;
1516            for (index = 0; index < sum; index += 1) {
1517
1518                if (typeof s[tarteaucitron.job[index]].safeanalytic !== "undefined" && s[tarteaucitron.job[index]].safeanalytic === true) {
1519                    sumToRemove += 1;
1520                    continue;
1521                }
1522
1523                if (tarteaucitron.state[tarteaucitron.job[index]] === false) {
1524                    nbDenied += 1;
1525                } else if (tarteaucitron.state[tarteaucitron.job[index]] === undefined) {
1526                    nbPending += 1;
1527                } else if (tarteaucitron.state[tarteaucitron.job[index]] === true) {
1528                    nbAllowed += 1;
1529                }
1530            }
1531            sum -= sumToRemove;
1532
1533            const percentages = {
1534                DotGreen: (100 / sum) * nbAllowed,
1535                DotYellow: (100 / sum) * nbPending,
1536                DotRed: (100 / sum) * nbDenied
1537            };
1538
1539            for (const [colorKey, value] of Object.entries(percentages)) {
1540                tarteaucitron.userInterface.css(c + colorKey, 'width', value + '%');
1541            }
1542
1543            if (tarteaucitron.parameters.showAlertSmall === true) {
1544                const percentAllowed = percentages.DotGreen;
1545                const label = tarteaucitron.lang.alertSmall + " - " + percentAllowed + "% " + tarteaucitron.lang.allowed + " " + tarteaucitron.lang.modalWindow;
1546                const managerEl = document.getElementById(c + 'Manager');
1547                managerEl.setAttribute('aria-label', label);
1548                managerEl.setAttribute('title', label);
1549            }
1550
1551            if (nbDenied === 0 && nbPending === 0) {
1552                tarteaucitron.userInterface.removeClass(c + 'AllDenied', c + 'IsSelected');
1553                tarteaucitron.userInterface.addClass(c + 'AllAllowed', c + 'IsSelected');
1554
1555                tarteaucitron.userInterface.addClass(c + 'MainLineOffset', c + 'IsAllowed');
1556                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsDenied');
1557
1558                document.getElementById(c + 'AllDenied').setAttribute('aria-pressed', 'false');
1559                document.getElementById(c + 'AllAllowed').setAttribute('aria-pressed', 'true');
1560
1561            } else if (nbAllowed === 0 && nbPending === 0) {
1562                tarteaucitron.userInterface.removeClass(c + 'AllAllowed', c + 'IsSelected');
1563                tarteaucitron.userInterface.addClass(c + 'AllDenied', c + 'IsSelected');
1564
1565                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsAllowed');
1566                tarteaucitron.userInterface.addClass(c + 'MainLineOffset', c + 'IsDenied');
1567
1568                document.getElementById(c + 'AllDenied').setAttribute('aria-pressed', 'true');
1569                document.getElementById(c + 'AllAllowed').setAttribute('aria-pressed', 'false');
1570
1571            } else {
1572                tarteaucitron.userInterface.removeClass(c + 'AllAllowed', c + 'IsSelected');
1573                tarteaucitron.userInterface.removeClass(c + 'AllDenied', c + 'IsSelected');
1574
1575                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsAllowed');
1576                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsDenied');
1577
1578                document.getElementById(c + 'AllDenied').setAttribute('aria-pressed', 'false');
1579                document.getElementById(c + 'AllAllowed').setAttribute('aria-pressed', 'false');
1580            }
1581
1582            // close the alert if all service have been reviewed
1583            if (nbPending === 0) {
1584                tarteaucitron.userInterface.closeAlert();
1585            }
1586
1587            if (tarteaucitron.services[key].cookies.length > 0 && status === false) {
1588                tarteaucitron.cookie.purge(tarteaucitron.services[key].cookies);
1589            }
1590
1591            if (status === true) {
1592                if (document.getElementById('tacCL' + key) !== null) {
1593                    document.getElementById('tacCL' + key).innerHTML = '...';
1594                }
1595                setTimeout(function () {
1596                    tarteaucitron.cookie.checkCount(key);
1597                }, 2500);
1598            } else {
1599                tarteaucitron.cookie.checkCount(key);
1600            }
1601
1602            }
1603
1604	        // groups
1605            var cats = document.querySelectorAll('[id^="tarteaucitronServicesTitle_"]')
1606            Array.prototype.forEach.call(cats, function(item) {
1607                var cat = item.getAttribute('id').replace(/^(tarteaucitronServicesTitle_)/, ""),
1608                    total = document.getElementById("tarteaucitronServices_"+cat).childElementCount;
1609                var doc = document.getElementById("tarteaucitronServices_"+cat),
1610                    groupdenied = 0,
1611                    groupallowed = 0;
1612                for (var ii = 0; ii < doc.children.length; ii++) {
1613                    if (doc.children[ii].className == "tarteaucitronLine tarteaucitronIsDenied") {
1614                        groupdenied++;
1615                    }
1616                    if (doc.children[ii].className == "tarteaucitronLine tarteaucitronIsAllowed") {
1617                        groupallowed++;
1618                    }
1619                }
1620                if (total === groupallowed) {
1621                    tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat, 'tarteaucitronIsDenied');
1622                    tarteaucitron.userInterface.addClass('tarteaucitron-group-'+cat, 'tarteaucitronIsAllowed');
1623
1624                    if (document.getElementById('tarteaucitron-reject-group-'+cat)) {
1625                        document.getElementById('tarteaucitron-reject-group-'+cat).setAttribute('aria-pressed', 'false');
1626                        document.getElementById('tarteaucitron-accept-group-'+cat).setAttribute('aria-pressed', 'true');
1627                    }
1628                }
1629                if (total === groupdenied) {
1630                    tarteaucitron.userInterface.addClass('tarteaucitron-group-'+cat, 'tarteaucitronIsDenied');
1631                    tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat, 'tarteaucitronIsAllowed');
1632
1633                    if (document.getElementById('tarteaucitron-reject-group-'+cat)) {
1634                        document.getElementById('tarteaucitron-reject-group-'+cat).setAttribute('aria-pressed', 'true');
1635                        document.getElementById('tarteaucitron-accept-group-'+cat).setAttribute('aria-pressed', 'false');
1636                    }
1637                }
1638                if (total !== groupdenied && total !== groupallowed) {
1639                    tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat, 'tarteaucitronIsDenied');
1640                    tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat, 'tarteaucitronIsAllowed');
1641
1642                    if (document.getElementById('tarteaucitron-reject-group-'+cat)) {
1643                        document.getElementById('tarteaucitron-reject-group-'+cat).setAttribute('aria-pressed', 'false');
1644                        document.getElementById('tarteaucitron-accept-group-'+cat).setAttribute('aria-pressed', 'false');
1645                    }
1646                }
1647                groupdenied = 0;
1648                groupallowed = 0;
1649
1650                if (document.getElementById('tarteaucitronCounter-'+cat)) {
1651                    document.getElementById('tarteaucitronCounter-'+cat).innerHTML = '('+document.getElementById("tarteaucitronServices_"+cat).childElementCount+')';
1652                }
1653            });
1654
1655            setTimeout(function() {
1656                if (document.getElementById('tarteaucitronCounter-all')) {
1657                    document.getElementById('tarteaucitronCounter-all').innerHTML = '('+tarteaucitron.job.length+')';
1658                }
1659                if (document.getElementById('tarteaucitronCounter-list')) {
1660
1661                    var liPartners = "";
1662                    var tarteaucitronPartnersCat = [];
1663                    var titles = [];
1664
1665                    tarteaucitron.job.forEach(function (id) {
1666                        if (tarteaucitronPartnersCat[tarteaucitron.services[id].type] === undefined) {
1667                            tarteaucitronPartnersCat[tarteaucitron.services[id].type] = true;
1668                            titles.push(tarteaucitron.lang[tarteaucitron.services[id].type].title);
1669                        }
1670                    });
1671                    titles.sort();
1672                    titles.forEach(function (title) {
1673                        liPartners += "<li>" + title + "</li>";
1674                    });
1675
1676                    document.getElementById('tarteaucitronCounter-list').innerHTML = liPartners;
1677                }
1678            }, 120);
1679        },
1680        "openPanel": function () {
1681            "use strict";
1682
1683            tarteaucitron.userInterface.css('tarteaucitron', 'display', 'block');
1684            tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
1685            tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
1686
1687            document.getElementById('tarteaucitronClosePanel').focus();
1688            if (document.getElementsByTagName('html')[0].classList !== undefined) {
1689                document.getElementsByTagName('html')[0].classList.add('tarteaucitron-modal-open-noscroll');
1690            }
1691            if (document.getElementsByTagName('body')[0].classList !== undefined) {
1692                document.getElementsByTagName('body')[0].classList.add('tarteaucitron-modal-open');
1693            }
1694            tarteaucitron.userInterface.focusTrap('tarteaucitron');
1695            tarteaucitron.userInterface.jsSizing('main');
1696
1697            //ie compatibility
1698            var tacOpenPanelEvent;
1699            if(typeof(Event) === 'function') {
1700                tacOpenPanelEvent = new Event("tac.open_panel");
1701            }else if (typeof(document.createEvent) === 'function'){
1702                tacOpenPanelEvent = document.createEvent('Event');
1703                tacOpenPanelEvent.initEvent("tac.open_panel", true, true);
1704            }
1705            //end ie compatibility
1706
1707            if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacOpenPanelEvent);}
1708        },
1709        "closePanel": function () {
1710            "use strict";
1711
1712            if (document.location.hash === tarteaucitron.hashtag) {
1713                if (window.history) {
1714                    window.history.replaceState('', document.title, window.location.pathname + window.location.search);
1715                } else {
1716                    document.location.hash = '';
1717                }
1718            }
1719            if (tarteaucitron.checkIfExist('tarteaucitron')) {
1720                // accessibility: manage focus on close panel
1721                if (tarteaucitron.checkIfExist('tarteaucitronCloseAlert')) {
1722                    document.getElementById('tarteaucitronCloseAlert').focus();
1723                } else if (tarteaucitron.checkIfExist('tarteaucitronManager')) {
1724                    document.getElementById('tarteaucitronManager').focus();
1725                } else if (tarteaucitron.customCloserId && tarteaucitron.checkIfExist(tarteaucitron.customCloserId)) {
1726                    document.getElementById(tarteaucitron.customCloserId).focus();
1727                }
1728                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1729            }
1730
1731            if (tarteaucitron.checkIfExist('tarteaucitronCookiesListContainer') && tarteaucitron.checkIfExist('tarteaucitronCookiesNumber')) {
1732                // accessibility: manage focus on close cookies list
1733                document.getElementById('tarteaucitronCookiesNumber').focus();
1734                document.getElementById('tarteaucitronCookiesNumber').setAttribute("aria-expanded", "false");
1735                tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
1736            }
1737
1738            tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
1739                elem.style.display = 'none';
1740            }, true);
1741
1742            if (tarteaucitron.reloadThePage === true) {
1743                window.location.reload();
1744            } else {
1745                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
1746            }
1747
1748            if (!(tarteaucitron.parameters.orientation === 'middle' && document.getElementById('tarteaucitronAlertBig').style.display === 'block')) {
1749                if (document.getElementsByTagName('html')[0].classList !== undefined) {
1750                    document.getElementsByTagName('html')[0].classList.remove('tarteaucitron-modal-open-noscroll');
1751                }
1752            }
1753            if (document.getElementsByTagName('body')[0].classList !== undefined) {
1754                document.getElementsByTagName('body')[0].classList.remove('tarteaucitron-modal-open');
1755            }
1756
1757            //ie compatibility
1758            var tacClosePanelEvent;
1759            if(typeof(Event) === 'function') {
1760                tacClosePanelEvent = new Event("tac.close_panel");
1761            }else if (typeof(document.createEvent) === 'function'){
1762                tacClosePanelEvent = document.createEvent('Event');
1763                tacClosePanelEvent.initEvent("tac.close_panel", true, true);
1764            }
1765            //end ie compatibility
1766
1767            if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacClosePanelEvent);}
1768        },
1769        "focusTrap": function(parentElement) {
1770            "use strict";
1771
1772            var focusableEls,
1773                firstFocusableEl,
1774                lastFocusableEl,
1775                filtered;
1776
1777            focusableEls = document.getElementById(parentElement).querySelectorAll('a[href], button');
1778            filtered = [];
1779
1780            // get only visible items
1781            for (var i = 0, max = focusableEls.length; i < max; i++) {
1782                if (focusableEls[i].offsetHeight > 0) {
1783                   filtered.push(focusableEls[i]);
1784                }
1785            }
1786
1787            firstFocusableEl = filtered[0];
1788            lastFocusableEl = filtered[filtered.length - 1];
1789
1790            //loop focus inside tarteaucitron
1791            document.getElementById(parentElement).addEventListener("keydown", function (evt) {
1792
1793                if ( evt.key === 'Tab' || evt.keyCode === 9 ) {
1794
1795                    if ( evt.shiftKey ) /* shift + tab */ {
1796                        if (document.activeElement === firstFocusableEl) {
1797                            lastFocusableEl.focus();
1798                            evt.preventDefault();
1799                        }
1800                    } else /* tab */ {
1801                        if (document.activeElement === lastFocusableEl) {
1802                            firstFocusableEl.focus();
1803                            evt.preventDefault();
1804                        }
1805                    }
1806                }
1807            })
1808        },
1809        "openAlert": function () {
1810            "use strict";
1811            var c = 'tarteaucitron';
1812            tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'block');
1813            tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'none');
1814            tarteaucitron.userInterface.css(c + 'Icon', 'display', 'none');
1815            tarteaucitron.userInterface.css(c + 'AlertBig',   'display', 'block');
1816            tarteaucitron.userInterface.addClass(c + 'Root',   'tarteaucitronBeforeVisible');
1817            tarteaucitron.userInterface.css('tac_title', 'display', 'block');
1818
1819            //ie compatibility
1820            var tacOpenAlertEvent;
1821            if(typeof(Event) === 'function') {
1822                tacOpenAlertEvent = new Event("tac.open_alert");
1823            }else if (typeof(document.createEvent) === 'function'){
1824                tacOpenAlertEvent = document.createEvent('Event');
1825                tacOpenAlertEvent.initEvent("tac.open_alert", true, true);
1826            }
1827            //end ie compatibility
1828
1829            if (document.getElementById('tarteaucitronAlertBig') !== null && tarteaucitron.parameters.orientation === 'middle') {
1830                document.getElementById('tarteaucitronAlertBig').focus();
1831                if (document.getElementsByTagName('html')[0].classList !== undefined) {
1832                    document.getElementsByTagName('html')[0].classList.add('tarteaucitron-modal-open-noscroll');
1833                }
1834            }
1835
1836            if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacOpenAlertEvent);}
1837        },
1838        "closeAlert": function () {
1839            "use strict";
1840            var c = 'tarteaucitron';
1841            tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'none');
1842            tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block');
1843            tarteaucitron.userInterface.css(c + 'Icon', 'display', 'block');
1844            tarteaucitron.userInterface.css(c + 'AlertBig',   'display', 'none');
1845            tarteaucitron.userInterface.removeClass(c + 'Root',   'tarteaucitronBeforeVisible');
1846            tarteaucitron.userInterface.jsSizing('box');
1847
1848            //ie compatibility
1849            var tacCloseAlertEvent;
1850            if(typeof(Event) === 'function') {
1851                tacCloseAlertEvent = new Event("tac.close_alert");
1852            }else if (typeof(document.createEvent) === 'function'){
1853                tacCloseAlertEvent = document.createEvent('Event');
1854                tacCloseAlertEvent.initEvent("tac.close_alert", true, true);
1855            }
1856            //end ie compatibility
1857
1858            if (tarteaucitron.parameters.showAlertSmall === false && tarteaucitron.parameters.showIcon === false) {
1859                tarteaucitron.userInterface.css('tac_title', 'display', 'none');
1860            }
1861
1862            if (document.getElementsByTagName('html')[0].classList !== undefined) {
1863                document.getElementsByTagName('html')[0].classList.remove('tarteaucitron-modal-open-noscroll');
1864            }
1865
1866            if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacCloseAlertEvent);}
1867        },
1868        "toggleCookiesList": function () {
1869            "use strict";
1870            var div = document.getElementById('tarteaucitronCookiesListContainer'),
1871                togglediv = document.getElementById('tarteaucitronCookiesNumber');
1872
1873            if (div === null) {
1874                return;
1875            }
1876
1877            if (div.style.display !== 'block') {
1878                tarteaucitron.cookie.number();
1879                div.style.display = 'block';
1880                togglediv.setAttribute("aria-expanded", "true");
1881                tarteaucitron.userInterface.jsSizing('cookie');
1882                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1883                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
1884                tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
1885                    elem.style.display = 'none';
1886                }, true);
1887            } else {
1888                div.style.display = 'none';
1889                togglediv.setAttribute("aria-expanded", "false");
1890                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1891                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
1892            }
1893        },
1894        "toggle": function (id, closeClass) {
1895            "use strict";
1896            var div = document.getElementById(id);
1897
1898            if (div === null) {
1899                return;
1900            }
1901
1902            if (closeClass !== undefined) {
1903                tarteaucitron.fallback([closeClass], function (elem) {
1904                    if (elem.id !== id) {
1905                        elem.style.display = 'none';
1906                    }
1907                }, true);
1908            }
1909
1910            if (div.style.display !== 'block') {
1911                div.style.display = 'block';
1912            } else {
1913                div.style.display = 'none';
1914            }
1915        },
1916        "order": function (id) {
1917            "use strict";
1918            var main = document.getElementById('tarteaucitronServices_' + id),
1919                allDivs,
1920                store = [],
1921                i;
1922
1923            if (main === null) {
1924                return;
1925            }
1926
1927            allDivs = main.childNodes;
1928
1929            if (typeof Array.prototype.map === 'function' && typeof Enumerable === 'undefined') {
1930                Array.prototype.map.call(main.children, Object).sort(function (a, b) {
1931                //var mainChildren = Array.from(main.children);
1932                //mainChildren.sort(function (a, b) {
1933                    if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; }
1934                    if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; }
1935                    return 0;
1936                }).forEach(function (element) {
1937                    main.appendChild(element);
1938                });
1939            }
1940        },
1941        "
1941jsSizing": function (type) {
1942            "use strict";
1943            var scrollbarMarginRight = 10,
1944                scrollbarWidthParent,
1945                scrollbarWidthChild,
1946                servicesHeight,
1947                e = window,
1948                a = 'inner',
1949                windowInnerHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
1950                mainTop,
1951                mainHeight,
1952                closeButtonHeight,
1953                headerHeight,
1954                cookiesListHeight,
1955                cookiesCloseHeight,
1956                cookiesTitleHeight,
1957                paddingBox,
1958                alertSmallHeight,
1959                cookiesNumberHeight;
1960
1961            if (type === 'box') {
1962                if (document.getElementById('tarteaucitronAlertSmall') !== null && document.getElementById('tarteaucitronCookiesNumber') !== null) {
1963
1964                    // reset
1965                    tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', '0px 10px');
1966
1967                    // calculate
1968                    alertSmallHeight = document.getElementById('tarteaucitronAlertSmall').offsetHeight;
1969                    cookiesNumberHeight = document.getElementById('tarteaucitronCookiesNumber').offsetHeight;
1970                    paddingBox = (alertSmallHeight - cookiesNumberHeight) / 2;
1971
1972                    // apply
1973                    tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', paddingBox + 'px 10px');
1974                }
1975            } else if (type === 'main') {
1976
1977                // get the real window width for media query
1978                if (window.innerWidth === undefined) {
1979                    a = 'client';
1980                    e = document.documentElement || document.body;
1981                }
1982
1983                // height of the services list container
1984                if (document.getElementById('tarteaucitron') !== null && document.getElementById('tarteaucitronClosePanel') !== null && document.getElementById('tarteaucitronMainLineOffset') !== null) {
1985
1986                    // reset
1987                    tarteaucitron.userInterface.css('tarteaucitronServices', 'height', 'auto');
1988
1989                    // calculate
1990                    mainHeight = document.getElementById('tarteaucitron').offsetHeight;
1991                    closeButtonHeight = document.getElementById('tarteaucitronClosePanel').offsetHeight;
1992
1993                    // apply
1994                    servicesHeight = (mainHeight - closeButtonHeight + 4);
1995                    tarteaucitron.userInterface.css('tarteaucitronServices', 'height', servicesHeight + 'px');
1996                    tarteaucitron.userInterface.css('tarteaucitronServices', 'overflow-x', 'auto');
1997                }
1998
1999                // align the main allow/deny button depending on scrollbar width
2000                if (document.getElementById('tarteaucitronServices') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) {
2001
2002                    // media query
2003                    if (e[a + 'Width'] <= 479) {
2004                        //tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginLeft', '11px');
2005                    } else if (e[a + 'Width'] <= 767) {
2006                        scrollbarMarginRight = 12;
2007                    }
2008
2009                    scrollbarWidthParent = document.getElementById('tarteaucitronServices').offsetWidth;
2010                    scrollbarWidthChild = document.getElementById('tarteaucitronScrollbarChild').offsetWidth;
2011                    //tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginRight', ((scrollbarWidthParent - scrollbarWidthChild) + scrollbarMarginRight) + 'px');
2012                }
2013
2014                // center the main panel
2015                if (document.getElementById('tarteaucitron') !== null) {
2016
2017                    // media query
2018                    if (e[a + 'Width'] <= 767) {
2019                        mainTop = 0;
2020                    } else {
2021                        mainTop = ((windowInnerHeight - document.getElementById('tarteaucitron').offsetHeight) / 2) - 21;
2022                    }
2023
2024                    if (document.getElementById('tarteaucitronMainLineOffset') !== null) {
2025                        if (document.getElementById('tarteaucitron').offsetHeight < (windowInnerHeight / 2)) {
2026                            mainTop -= document.getElementById('tarteaucitronMainLineOffset').offsetHeight;
2027                        }
2028                    }
2029
2030                    // correct
2031                    if (mainTop < 0) {
2032                        mainTop = 0;
2033                    }
2034
2035                    // apply
2036                    tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px');
2037                }
2038
2039
2040            } else if (type === 'cookie') {
2041
2042                // put cookies list at bottom
2043                if (document.getElementById('tarteaucitronAlertSmall') !== null) {
2044                    tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (document.getElementById('tarteaucitronAlertSmall').offsetHeight) + 'px');
2045                }
2046
2047                // height of cookies list
2048                if (document.getElementById('tarteaucitronCookiesListContainer') !== null) {
2049
2050                    // reset
2051                    tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', 'auto');
2052
2053                    // calculate
2054                    cookiesListHeight = document.getElementById('tarteaucitronCookiesListContainer').offsetHeight;
2055                    cookiesCloseHeight = document.getElementById('tarteaucitronClosePanelCookie').offsetHeight;
2056                    cookiesTitleHeight = document.getElementById('tarteaucitronCookiesTitle').offsetHeight;
2057
2058                    // apply
2059                    tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', (cookie
vendor: 24,437 bytes, lines 2059-2646
2059sListHeight - cookiesCloseHeight - cookiesTitleHeight - 2) + 'px');
2060                }
2061            }
2062        }
2063    },
2064    "cookie": {
2065        "owner": {},
2066        "create": function (key, status) {
2067            "use strict";
2068
2069            if (tarteaucitronForceExpire !== '') {
2070                // The number of day(s)/hour(s) can't be higher than 1 year
2071                if ((tarteaucitronExpireInDay && tarteaucitronForceExpire < 365) || (!tarteaucitronExpireInDay && tarteaucitronForceExpire < 8760)) {
2072                    if (tarteaucitronExpireInDay) {
2073                        // Multiplication to tranform the number of days to milliseconds
2074                        timeExpire = tarteaucitronForceExpire * 86400000;
2075                    } else {
2076                        // Multiplication to tranform the number of hours to milliseconds
2077                        timeExpire = tarteaucitronForceExpire * 3600000;
2078                    }
2079                }
2080            }
2081
2082            var d = new Date(),
2083                time = d.getTime(),
2084                expireTime = time + timeExpire, // 365 days
2085                regex = new RegExp("!" + key + "=(wait|true|false)", "g"),
2086                cookie = tarteaucitron.cookie.read().replace(regex, ""),
2087                value = tarteaucitron.parameters.cookieName + '=' + cookie + '!' + key + '=' + status,
2088                domain = (tarteaucitron.parameters.cookieDomain !== undefined && tarteaucitron.parameters.cookieDomain !== '') ? '; domain=' + tarteaucitron.parameters.cookieDomain : '',
2089                secure = location.protocol === 'https:' ? '; Secure' : '';
2090
2091            d.setTime(expireTime);
2092            document.cookie = value + '; expires=' + d.toGMTString() + '; path=/' + domain + secure + '; samesite=lax';
2093
2094            tarteaucitron.sendEvent('tac.consent_updated');
2095        },
2096        "read": function () {
2097            "use strict";
2098            var nameEQ = tarteaucitron.parameters.cookieName + "=",
2099                ca = document.cookie.split(';'),
2100                i,
2101                c;
2102
2103            for (i = 0; i < ca.length; i += 1) {
2104                c = ca[i];
2105                while (c.charAt(0) === ' ') {
2106                    c = c.substring(1, c.length);
2107                }
2108                if (c.indexOf(nameEQ) === 0) {
2109                    return c.substring(nameEQ.length, c.length);
2110                }
2111            }
2112            return '';
2113        },
2114        "purge": function (arr) {
2115            "use strict";
2116            var i;
2117
2118            for (i = 0; i < arr.length; i += 1) {
2119
2120                var rgxpCookie = new RegExp("^(.*;)?\\s*" + arr[i] + "\\s*=\\s*[^;]+(.*)?$");
2121                if (document.cookie.match(rgxpCookie)) {
2122                    document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;';
2123                    document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname + ';';
2124                    document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname.split('.').slice(-2).join('.') + ';';
2125                }
2126            }
2127        },
2128        "checkCount": function (key) {
2129            "use strict";
2130            var arr = tarteaucitron.services[key].cookies,
2131                nb = arr.length,
2132                nbCurrent = 0,
2133                html = '',
2134                i,
2135                status = document.cookie.indexOf(key + '=true'),
2136                cookieLabel = "cookie";
2137
2138            if (tarteaucitron.getLanguage() === "de") {
2139                cookieLabel = "Cookie";
2140            }
2141
2142            if (status >= 0 && nb === 0) {
2143                html += tarteaucitron.lang.useNoCookie;
2144            } else if (nb > 0) {
2145                for (i = 0; i < nb; i += 1) {
2146                    if (document.cookie.indexOf(arr[i] + '=') !== -1) {
2147                        nbCurrent += 1;
2148                        if (tarteaucitron.cookie.owner[arr[i]] === undefined) {
2149                            tarteaucitron.cookie.owner[arr[i]] = [];
2150                        }
2151                        if (tarteaucitron.cookie.crossIndexOf(tarteaucitron.cookie.owner[arr[i]], tarteaucitron.services[key].name) === false) {
2152                            tarteaucitron.cookie.owner[arr[i]].push(tarteaucitron.services[key].name);
2153                        }
2154                    }
2155                }
2156
2157                if (nbCurrent > 0) {
2158                    html += tarteaucitron.lang.useCookieCurrent + ' ' + nbCurrent + ' ' + cookieLabel;
2159                    if (nbCurrent > 1) {
2160                        html += 's';
2161                    }
2162                    html += '.';
2163                } else {
2164                    html += tarteaucitron.lang.useNoCookie;
2165                }
2166            } else if (nb === 0) {
2167                html = tarteaucitron.lang.noCookie;
2168            } else {
2169                html += tarteaucitron.lang.useCookie + ' ' + nb + ' ' + cookieLabel;
2170                if (nb > 1) {
2171                    html += 's';
2172                }
2173                html += '.';
2174            }
2175
2176            if (document.getElementById('tacCL' + key) !== null) {
2177                document.getElementById('tacCL' + key).innerHTML = html;
2178            }
2179        },
2180        "crossIndexOf": function (arr, match) {
2181            "use strict";
2182            var i;
2183            for (i = 0; i < arr.length; i += 1) {
2184                if (arr[i] === match) {
2185                    return true;
2186                }
2187            }
2188            return false;
2189        },
2190        "number": function () {
2191            "use strict";
2192            var cookies = document.cookie.split(';'),
2193                nb = (document.cookie !== '') ? cookies.length : 0,
2194                html = '',
2195                i,
2196                name,
2197                namea,
2198                nameb,
2199                c,
2200                d,
2201                s = (nb > 1) ? 's' : '',
2202                savedname,
2203                regex = /^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i,
2204                regexedDomain = (tarteaucitron.cdn.match(regex) !== null) ? tarteaucitron.cdn.match(regex)[1] : tarteaucitron.cdn,
2205                host = (tarteaucitron.domain !== undefined) ? tarteaucitron.domain : regexedDomain;
2206
2207            cookies = cookies.sort(function (a, b) {
2208                namea = a.split('=', 1).toString().replace(/ /g, '');
2209                nameb = b.split('=', 1).toString().replace(/ /g, '');
2210                c = (tarteaucitron.cookie.owner[namea] !== undefined) ? tarteaucitron.cookie.owner[namea] : '0';
2211                d = (tarteaucitron.cookie.owner[nameb] !== undefined) ? tarteaucitron.cookie.owner[nameb] : '0';
2212                if (c + a > d + b) { return 1; }
2213                if (c + a < d + b) { return -1; }
2214                return 0;
2215            });
2216
2217            if (document.cookie !== '') {
2218                for (i = 0; i < nb; i += 1) {
2219                    name = cookies[i].split('=', 1).toString().replace(/ /g, '');
2220                    if (tarteaucitron.cookie.owner[name] !== undefined && tarteaucitron.cookie.owner[name].join(' // ') !== savedname) {
2221                        savedname = tarteaucitron.cookie.owner[name].join(' // ');
2222                        html += '<div class="tarteaucitronHidden">';
2223                        html += '     <span class="tarteaucitronH3" role="heading" aria-level="4">';
2224                        html += '        ' + tarteaucitron.cookie.owner[name].join(' // ');
2225                        html += '    </span>';
2226                        html += '</div><ul class="cookie-list">';
2227                    } else if (tarteaucitron.cookie.owner[name] === undefined && host !== savedname) {
2228                        savedname = host;
2229                        html += '<div class="tarteaucitronHidden">';
2230                        html += '     <span class="tarteaucitronH3" role="heading" aria-level="4">';
2231                        html += '        ' + host;
2232                        html += '    </span>';
2233                        html += '</div><ul class="cookie-list">';
2234                    }
2235                    html += '<li class="tarteaucitronCookiesListMain">';
2236                    html += '    <div class="tarteaucitronCookiesListLeft"><button type="button" class="purgeBtn" data-cookie="' + tarteaucitron.fixSelfXSS(cookies[i].split('=', 1)) + '"><strong>&times;</strong></button> <strong>' + tarteaucitron.fixSelfXSS(name) + '</strong>';
2237                    html += '    </div>';
2238                    html += '    <div class="tarteaucitronCookiesListRight">' + tarteaucitron.cookie.beautify(cookies[i].split('=').slice(1).join('=')) + '</div>';
2239                    html += '</li>';
2240                }
2241                html += '</ul>';
2242            } else {
2243                html += '<div class="tarteaucitronCookiesListMain">';
2244                html += '    <div class="tarteaucitronCookiesListLeft"><strong>-</strong></div>';
2245                html += '    <div class="tarteaucitronCookiesListRight"></div>';
2246                html += '</div>';
2247            }
2248
2249            html += '<div class="tarteaucitronHidden tarteaucitron-spacer-20"></div>';
2250
2251            if (document.getElementById('tarteaucitronCookiesList') !== null) {
2252                document.getElementById('tarteaucitronCookiesList').innerHTML = html;
2253            }
2254
2255            if (document.getElementById('tarteaucitronCookiesNumber') !== null) {
2256                document.getElementById('tarteaucitronCookiesNumber').innerHTML = nb;
2257                document.getElementById('tarteaucitronCookiesNumber').setAttribute("aria-label", nb + ' cookie' + s + " - " + tarteaucitron.lang.toggleInfoBox);
2258                document.getElementById('tarteaucitronCookiesNumber').setAttribute("title", nb + ' cookie' + s + " - " + tarteaucitron.lang.toggleInfoBox);
2259            }
2260
2261            if (document.getElementById('tarteaucitronCookiesNumberBis') !== null) {
2262                document.getElementById('tarteaucitronCookiesNumberBis').innerHTML = nb + ' cookie' + s;
2263            }
2264
2265            var purgeBtns = document.getElementsByClassName("purgeBtn");
2266            for (i = 0; i < purgeBtns.length; i++) {
2267                tarteaucitron.addClickEventToElement(purgeBtns[i], function () {
2268                    tarteaucitron.cookie.purge([this.dataset.cookie]);
2269                    tarteaucitron.cookie.number();
2270                    tarteaucitron.userInterface.jsSizing('cookie');
2271                    return false;
2272                });
2273            }
2274
2275            for (i = 0; i < tarteaucitron.job.length; i += 1) {
2276                tarteaucitron.cookie.checkCount(tarteaucitron.job[i]);
2277            }
2278        },
2279        "beautify": function(v) {
2280            let beautiful = v;
2281            try {
2282                beautiful = decodeURIComponent(decodeURI(v));
2283            } catch {}
2284            return tarteaucitron.fixSelfXSS(beautiful);
2285        }
2286    },
2287    "fixSelfXSS": function(html) {
2288        return html.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
2289    },
2290    "getLanguage": function () {
2291        "use strict";
2292
2293        var availableLanguages = 'ar,bg,ca,cn,cs,da,de,et,el,en,es,fi,fr,hr,hu,it,ja,ko,lb,lt,lv,nl,no,oc,pl,pt,ro,ru,se,sk,sq,sv,tr,uk,vi,zh',
2294            defaultLanguage = 'en';
2295
2296        if (tarteaucitronForceLanguage !== '') {
2297            if (availableLanguages.indexOf(tarteaucitronForceLanguage) !== -1) {
2298                return tarteaucitronForceLanguage;
2299            }
2300        }
2301
2302        // get the html lang
2303        if (document.documentElement.getAttribute("lang") !== undefined && document.documentElement.getAttribute("lang") !== null && document.documentElement.getAttribute("lang") !== "") {
2304            if (availableLanguages.indexOf(document.documentElement.getAttribute("lang").substr(0, 2)) !== -1) {
2305                return document.documentElement.getAttribute("lang").substr(0, 2);
2306            }
2307        }
2308
2309        if (!navigator) { return defaultLanguage; }
2310
2311        var lang = navigator.language || navigator.browserLanguage ||
2312                navigator.systemLanguage || navigator.userLang || null,
2313            userLanguage = lang ? lang.substr(0, 2) : null;
2314
2315        if (availableLanguages.indexOf(userLanguage) !== -1) {
2316            return userLanguage;
2317        }
2318
2319        return defaultLanguage;
2320    },
2321    "getLocale": function () {
2322        "use strict";
2323        if (!navigator) { return 'en_US'; }
2324
2325        var lang = navigator.language || navigator.browserLanguage ||
2326                navigator.systemLanguage || navigator.userLang || null,
2327            userLanguage = lang ? lang.substr(0, 2) : null;
2328
2329        if (userLanguage === 'fr') {
2330            return 'fr_FR';
2331        } else if (userLanguage === 'en') {
2332            return 'en_US';
2333        } else if (userLanguage === 'de') {
2334            return 'de_DE';
2335        } else if (userLanguage === 'es') {
2336            return 'es_ES';
2337        } else if (userLanguage === 'it') {
2338            return 'it_IT';
2339        } else if (userLanguage === 'pt') {
2340            return 'pt_PT';
2341        } else if (userLanguage === 'nl') {
2342            return 'nl_NL';
2343        } else if (userLanguage === 'el') {
2344            return 'el_EL';
2345        } else {
2346            return 'en_US';
2347        }
2348    },
2349    "addScript": function (url, id, callback, execute, attrName, attrVal, internal) {
2350        "use strict";
2351        var script,
2352            done = false;
2353
2354        if (execute === false) {
2355            if (typeof callback === 'function') {
2356                callback();
2357            }
2358        } else {
2359            script = document.createElement('script');
2360            if (id !== undefined && id !== "") {
2361                script.id = id;
2362            }
2363            script.async = true;
2364            script.src = url;
2365
2366            if (attrName !== undefined && attrVal !== undefined) {
2367                script.setAttribute(attrName, attrVal);
2368            }
2369
2370            if (typeof callback === 'function') {
2371                if ( !tarteaucitron.parameters.useExternalJs || !internal ) {
2372                    script.onreadystatechange = script.onload = function () {
2373                        var state = script.readyState;
2374                        if (!done && (!state || /loaded|complete/.test(state))) {
2375                            done = true;
2376                            callback();
2377                        }
2378                    };
2379                } else {
2380                    callback();
2381                }
2382            }
2383
2384            if ( !tarteaucitron.parameters.useExternalJs || !internal ) {
2385                document.getElementsByTagName('head')[0].appendChild(script);
2386            }
2387        }
2388    },
2389    "addInternalScript": function (url, id, callback, execute, attrName, attrVal) {
2390        tarteaucitron.addScript(url, id, callback, execute, attrName, attrVal, true);
2391    },
2392    "checkIfExist": function (elemId) {
2393        "use strict";
2394        return document.getElementById(elemId) !== null && document.getElementById(elemId).offsetWidth !== 0 && document.getElementById(elemId).offsetHeight !== 0;
2395    },
2396    "makeAsync": {
2397        "antiGhost": 0,
2398        "buffer": '',
2399        "init": function (url, id) {
2400            "use strict";
2401            var savedWrite = document.write,
2402                savedWriteln = document.writeln;
2403
2404            document.write = function (content) {
2405                tarteaucitron.makeAsync.buffer += content;
2406            };
2407            document.writeln = function (content) {
2408                tarteaucitron.makeAsync.buffer += content.concat("\n");
2409            };
2410
2411            setTimeout(function () {
2412                document.write = savedWrite;
2413                document.writeln = savedWriteln;
2414            }, 20000);
2415
2416            tarteaucitron.makeAsync.getAndParse(url, id);
2417        },
2418        "getAndParse": function (url, id) {
2419            "use strict";
2420            if (tarteaucitron.makeAsync.antiGhost > 9) {
2421                tarteaucitron.makeAsync.antiGhost = 0;
2422                return;
2423            }
2424            tarteaucitron.makeAsync.antiGhost += 1;
2425            tarteaucitron.addInternalScript(url, '', function () {
2426                if (document.getElementById(id) !== null) {
2427                    document.getElementById(id).innerHTML += "<span class='tarteaucitron-display-none'>&nbsp;</span>" + tarteaucitron.makeAsync.buffer;
2428                    tarteaucitron.makeAsync.buffer = '';
2429                    tarteaucitron.makeAsync.execJS(id);
2430                }
2431            });
2432        },
2433        "execJS": function (id) {
2434            /* not strict because third party scripts may have errors */
2435            var i,
2436                scripts,
2437                childId,
2438                type;
2439
2440            if (document.getElementById(id) === null) {
2441                return;
2442            }
2443
2444            scripts = document.getElementById(id).getElementsByTagName('script');
2445            for (i = 0; i < scripts.length; i += 1) {
2446                type = (scripts[i].getAttribute('type') !== null) ? scripts[i].getAttribute('type') : '';
2447                if (type === '') {
2448                    type = (scripts[i].getAttribute('language') !== null) ? scripts[i].getAttribute('language') : '';
2449                }
2450                if (scripts[i].getAttribute('src') !== null && scripts[i].getAttribute('src') !== '') {
2451                    childId = id + Math.floor(Math.random() * 99999999999);
2452                    document.getElementById(id).innerHTML += '<div id="' + childId + '"></div>';
2453                    tarteaucitron.makeAsync.getAndParse(scripts[i].getAttribute('src'), childId);
2454                } else if (type.indexOf('javascript') !== -1 || type === '') {
2455                    eval(scripts[i].innerHTML);
2456                }
2457            }
2458        }
2459    },
2460    "fallback": function (matchClass, content, noInner) {
2461        "use strict";
2462        var selector = matchClass.map(function(cls) {
2463            return '.' + cls;
2464        }).join(', ');
2465
2466        var elems = document.querySelectorAll(selector);
2467
2468        for (var i = 0; i < elems.length; i++) {
2469            var elem = elems[i];
2470
2471            var width = tarteaucitron.getElemAttr(elem, 'width'),
2472                height = tarteaucitron.getElemAttr(elem, 'height');
2473
2474            if (width !== "") {
2475                elem.style.width = tarteaucitron.getStyleSize(width);
2476            }
2477            if (height !== "") {
2478                elem.style.height = tarteaucitron.getStyleSize(height);
2479            }
2480
2481            if (typeof content === 'function') {
2482                if (noInner === true) {
2483                    content(elem);
2484                } else {
2485                    elem.innerHTML = content(elem);
2486                }
2487            } else {
2488                elem.innerHTML = content;
2489            }
2490        }
2491    },
2492    "engage": function (id) {
2493        "use strict";
2494        var html = '',
2495            r = Math.floor(Math.random() * 100000),
2496            engage = tarteaucitron.services[id].name + ' ' + tarteaucitron.lang.fallback;
2497
2498        if (tarteaucitron.lang['engage-' + id] !== undefined) {
2499            engage = tarteaucitron.lang['engage-' + id];
2500        }
2501
2502        html += '<div class="tac_activate tac_activate_' + id + '">';
2503        html += '   <div class="tac_float">';
2504        html += '      ' + engage;
2505        html += '      <button aria-label="' + tarteaucitron.lang.allow + ' ' + tarteaucitron.services[id].name + '" type="button" class="tarteaucitronAllow" id="Eng' + r + 'ed' + id + '">';
2506        html += '          <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allow;
2507        html += '       </button>';
2508        html += '   </div>';
2509        html += '</div>';
2510
2511        return html;
2512    },
2513    "extend": function (a, b) {
2514        "use strict";
2515        var prop;
2516        for (prop in b) {
2517            if (b.hasOwnProperty(prop)) {
2518                a[prop] = b[prop];
2519            }
2520        }
2521    },
2522    "proTemp": '',
2523    "proTimer": function () {
2524        "use strict";
2525        setTimeout(tarteaucitron.proPing, (Math.floor(Math.random() * (1200 - 500 + 1)) + 500));
2526    },
2527    "pro": function (list) {
2528        "use strict";
2529        tarteaucitron.proTemp += list;
2530        clearTimeout(tarteaucitron.proTimer);
2531        tarteaucitron.proTimer = setTimeout(tarteaucitron.proPing, (Math.floor(Math.random() * (1200 - 500 + 1)) + 500));
2532    },
2533    "proPing": function () {
2534        "use strict";
2535        if (tarteaucitron.uuid !== '' && tarteaucitron.uuid !== undefined && tarteaucitron.proTemp !== '' && tarteaucitronStatsEnabled) {
2536            var div = document.getElementById('tarteaucitronPremium'),
2537                timestamp = new Date().getTime(),
2538                url = 'https://tarteaucitron.io/log/?';
2539
2540            if (div === null) {
2541                return;
2542            }
2543
2544            url += 'account=' + tarteaucitron.uuid + '&';
2545            url += 'domain=' + tarteaucitron.domain + '&';
2546            url += 'status=' + encodeURIComponent(tarteaucitron.proTemp) + '&';
2547            url += '_time=' + timestamp;
2548
2549            div.innerHTML = '<img src="' + url + '" class="tarteaucitron-display-none" alt="" />';
2550
2551            tarteaucitron.proTemp = '';
2552        }
2553
2554        tarteaucitron.cookie.number();
2555    },
2556    "AddOrUpdate" : function(source, custom){
2557        /**
2558         Utility function to Add or update the fields of obj1 with the ones in obj2
2559         */
2560        for(var key in custom){
2561            if (key === "__proto__" || key === "constructor") continue;
2562            if(custom.hasOwnProperty(key)){
2563                if(custom[key] instanceof Object){
2564                    source[key] = tarteaucitron.AddOrUpdate(source[key], custom[key]);
2565                }else{
2566                    source[key] = custom[key];
2567                }
2568            }
2569        }
2570        return source;
2571    },
2572    "getElemWidth": function(elem) {
2573        return tarteaucitron.getElemAttr(elem, 'width') || elem.clientWidth;
2574    },
2575    "getElemHeight": function(elem) {
2576        return tarteaucitron.getElemAttr(elem, 'height') || elem.clientHeight;
2577    },
2578    "getElemAttr": function (elem, attr) {
2579
2580        var attribute = elem.getAttribute('data-' + attr) || elem.getAttribute(attr) || elem.getAttribute(attr.startsWith('data-') ? attr.slice(5) : attr);
2581
2582        // security: only allow real url on the url attr
2583        if ((attr === 'url' || attr === 'data-url' || attr === 'data-src') && !/^https?:\/\/[^\s]+$/.test(elem.getAttribute(attr))) {
2584            return "";
2585        }
2586
2587        // security: disallow data-srcdoc attr to avoid xss
2588        if (attr === 'srcdoc' || attr === 'data-srcdoc') {
2589            attribute = elem.getAttribute('srcdoc');
2590        }
2591
2592        if (typeof attribute === 'string') {
2593            return tarteaucitron.fixSelfXSS(attribute);
2594        }
2595
2596        return "";
2597    },
2598    "getStyleSize": function (value) {
2599        if (value == null) {
2600            return 'auto';
2601        }
2602
2603        value = String(value).trim();
2604
2605        var units = ['px', '%', 'em', 'rem', 'vh', 'vw', 'vmin', 'vmax', 'ch', 'ex', 'pt', 'pc', 'cm', 'mm', 'in', 'q'];
2606        var pattern = new RegExp('^\\d+(\\.\\d+)?(' + units.join('|') + ')$');
2607
2608        if (pattern.test(value)) {
2609            return value;
2610        }
2611
2612        if (/^\d+(\.\d+)?$/.test(value)) {
2613            return value + 'px';
2614        }
2615
2616        return 'auto';
2617    },
2618    "addClickEventToId": function (elemId, func) {
2619        tarteaucitron.addClickEventToElement(document.getElementById(elemId), func);
2620    },
2621    "addClickEventToElement": function (e, func) {
2622        if (e) {
2623            if (e.addEventListener) {
2624                e.addEventListener("click", func);
2625            } else {
2626                e.attachEvent("onclick", func);
2627            }
2628        }
2629    },
2630    "triggerJobsAfterAjaxCall": function() {
2631        tarteaucitron.job.forEach(function(e) { tarteaucitron.job.push(e) });
2632        var i;
2633        var allowBtns = document.getElementsByClassName("tarteaucitronAllow");
2634        for (i = 0; i < allowBtns.length; i++) {
2635            tarteaucitron.addClickEventToElement(allowBtns[i], function () {
2636                tarteaucitron.userInterface.respond(this, true);
2637            });
2638        }
2639        var denyBtns = document.getElementsByClassName("tarteaucitronDeny");
2640        for (i = 0; i < denyBtns.length; i++) {
2641            tarteaucitron.addClickEventToElement(denyBtns[i], function () {
2642                tarteaucitron.userInterface.respond(this, false);
2643            });
2644        }
2645    }
2646};

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.