PageSourceSearch

https://www.aquarium-tropical.fr/modules/custom/epppd_rgpd/js/tarteaucitron/tarteaucitron.js?tm8hn7

js aquarium-tropical.fr collected 2026-10-02 07:34:59 UTC 111,034 bytes, 2,077 lines download raw bytes

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

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.