PageSourceSearch

https://www.daybreakgames.com/web-platform/scripts/libs/tarteaucitron/1.24.0/tarteaucitron.js

js daybreakgames.com collected 2026-10-02 04:06:13 UTC 135,992 bytes, 2,586 lines download raw bytes

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

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.