PageSourceSearch

https://feedback.org/wp-content/themes/fractal/assets/tarteaucitron/tarteaucitron.js?ver=1.20.2

js feedback.org collected 2026-10-02 03:02:16 UTC 132,562 bytes, 2,517 lines download raw bytes

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

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.