PageSourceSearch

https://www.agglo-moulins.fr/fileadmin/templates/agglo/js/tarteaucitron/tarteaucitron.js

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

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.