PageSourceSearch

https://analytic-edge.com/wp-content/plugins/cookie-law-info/legac…/js/cookie-law-info-public.js?ver=3.4.0

js analytic-edge.com collected 2026-10-01 12:07:20 UTC 34,185 bytes, 1,171 lines download raw bytes

1CLI_ACCEPT_COOKIE_NAME = (typeof CLI_ACCEPT_COOKIE_NAME !== 'undefined' ? CLI_ACCEPT_COOKIE_NAME : 'viewed_cookie_policy');
2CLI_PREFERENCE_COOKIE = (typeof CLI_PREFERENCE_COOKIE !== 'undefined' ? CLI_PREFERENCE_COOKIE : 'CookieLawInfoConsent');
3CLI_ACCEPT_COOKIE_EXPIRE = (typeof CLI_ACCEPT_COOKIE_EXPIRE !== 'undefined' ? CLI_ACCEPT_COOKIE_EXPIRE : 365);
4CLI_COOKIEBAR_AS_POPUP = (typeof CLI_COOKIEBAR_AS_POPUP !== 'undefined' ? CLI_COOKIEBAR_AS_POPUP : false);
5var CLI_Cookie = {
6	set: function (name, value, days) {
7		var secure = "";
8		if (true === Boolean(Cli_Data.secure_cookies)) {
9			secure = ";secure";
10		}
11		if (days) {
12			var date = new Date();
13			date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
14			var expires = "; expires=" + date.toGMTString();
15		} else {
16			var expires = "";
17		}
18		document.cookie = name + "=" + value + secure + expires + "; path=/";
19		if (days < 1) {
20			host_name = window.location.hostname;
21			document.cookie = name + "=" + value + expires + "; path=/; domain=." + host_name + ";";
22			if (host_name.indexOf("www") != 1) {
23				var host_name_withoutwww = host_name.replace('www', '');
24				document.cookie = name + "=" + value + secure + expires + "; path=/; domain=" + host_name_withoutwww + ";";
25			}
26			host_name = host_name.substring(host_name.lastIndexOf(".", host_name.lastIndexOf(".") - 1));
27			document.cookie = name + "=" + value + secure + expires + "; path=/; domain=" + host_name + ";";
28		}
29	},
30	read: function (name) {
31		var nameEQ = name + "=";
32		var ca = document.cookie.split(';');
33		for (var i = 0; i < ca.length; i++) {
34			var c = ca[i];
35			while (c.charAt(0) == ' ') {
36				c = c.substring(1, c.length);
37			}
38			if (c.indexOf(nameEQ) === 0) {
39				return c.substring(nameEQ.length, c.length);
40			}
41		}
42		return null;
43	},
44	erase: function (name) {
45		this.set(name, "", -10);
46	},
47	exists: function (name) {
48		return (this.read(name) !== null);
49	},
50	getallcookies: function () {
51		var pairs = document.cookie.split(";");
52		var cookieslist = {};
53		for (var i = 0; i < pairs.length; i++) {
54			var pair = pairs[i].split("=");
55			cookieslist[(pair[0] + '').trim()] = unescape(pair[1]);
56		}
57		return cookieslist;
58	}
59}
60var CLI =
61{
62	bar_config: {},
63	showagain_config: {},
64	allowedCategories: [],
65	js_blocking_enabled: false,
66	set: function (args) {
67		if (typeof JSON.parse !== "function") {
68			console.log("CookieLawInfo requires JSON.parse but your browser doesn't support it");
69			return;
70		}
71		if (typeof args.settings !== 'object') {
72			this.settings = JSON.parse(args.settings);
73		} else {
74			this.settings = args.settings;
75		}
76		this.js_blocking_enabled = Boolean(Cli_Data.js_blocking);
77		this.settings = args.settings;
78		this.bar_elm = jQuery(this.settings.notify_div_id);
79		this.showagain_elm = jQuery(this.settings.showagain_div_id);
80		this.settingsModal = jQuery('#cliSettingsPopup');
81
82		/* buttons */
83		this.main_button = jQuery('.cli-plugin-main-button');
84		this.main_link = jQuery('.cli-plugin-main-link');
85		this.reject_link = jQuery('.cookie_action_close_header_reject');
86		this.delete_link = jQuery(".cookielawinfo-cookie-delete");
87		this.settings_button = jQuery('.cli_settings_button');
88		this.accept_all_button = jQuery('.wt-cli-accept-all-btn');
89		if (this.settings.cookie_bar_as == 'popup') {
90			CLI_COOKIEBAR_AS_POPUP = true;
91		}
92		this.mayBeSetPreferenceCookie();
93		this.addStyleAttribute();
94		this.configBar();
95		this.toggleBar();
96		this.attachDelete();
97		this.attachEvents();
98		this.configButtons();
99		this.reviewConsent();
100		var cli_hidebar_on_readmore = this.hideBarInReadMoreLink();
101		if (Boolean(this.settings.scroll_close) === true && cli_hidebar_on_readmore === false) {
102			window.addEventListener("scroll", CLI.closeOnScroll, false);
103		}
104
105	},
106	hideBarInReadMoreLink: function () {
107		if (Boolean(CLI.settings.button_2_hidebar) === true && this.main_link.length > 0 && this.main_link.hasClass('cli-minimize-bar')) {
108			this.hideHeader();
109			cliBlocker.cookieBar(false);
110			this.showagain_elm.slideDown(this.settings.animate_speed_show);
111			return true;
112		}
113		return false;
114	},
115	attachEvents: function () {
116		jQuery(document).on(
117			'click',
118			'.wt-cli-privacy-btn',
119			function (e) {
120				e.preventDefault();
121				CLI.accept_close();
122				CLI.settingsPopUpClose();
123			}
124		);
125
126		jQuery('.wt-cli-accept-btn').on(
127			"click",
128			function (e) {
129				e.preventDefault();
130				CLI.acceptRejectCookies(jQuery(this));
131			});
132		jQuery('.wt-cli-accept-all-btn').on(
133			"click",
134			function (e) {
135				e.preventDefault();
136				CLI.acceptRejectCookies(jQuery(this), 'accept');
137			});
138		jQuery('.wt-cli-reject-btn').on(
139			"click",
140			function (e) {
141				e.preventDefault();
142				CLI.acceptRejectCookies(jQuery(this), 'reject');
143			});
144		this.settingsPopUp();
145		this.settingsTabbedAccordion();
146		this.toggleUserPreferenceCheckBox();
147		this.hideCookieBarOnClose();
148		this.cookieLawInfoRunCallBacks();
149
150	},
151	acceptRejectCookies(element, action = 'custom') {
152		var open_link = element[0].hasAttribute("href") && element.attr("href") != '#' ? true : false;
153		var new_window = false;
154		if (action == 'accept') {
155			this.enableAllCookies();
156			this.accept_close();
157			new_window = CLI.settings.button_7_new_win ? true : false;
158
159		} else if (action == 'reject') {
160			this.disableAllCookies();
161			this.reject_close();
162			new_window = Boolean(this.settings.button_3_new_win) ? true : false;
163		} else {
164			this.accept_close();
165			new_window = Boolean(this.settings.button_1_new_win) ? true : false;
166		}
167		if (open_link) {
168			if (new_window) {
169				window.open(element.attr("href"), '_blank');
170			} else {
171				window.location.href = element.attr("href");
172			}
173		}
174	},
175	toggleUserPreferenceCheckBox: function () {
176
177		jQuery('.cli-user-preference-checkbox').each(
178			function () {
179
180				categoryCookie = 'cookielawinfo-' + jQuery(this).attr('data-id');
181				categoryCookieValue = CLI_Cookie.read(categoryCookie);
182				if (categoryCookieValue == null) {
183					if (jQuery(this).is(':checked')) {
184						CLI_Cookie.set(categoryCookie, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
185					} else {
186						CLI_Cookie.set(categoryCookie, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
187					}
188				} else {
189					if (categoryCookieValue == "yes") {
190						jQuery(this).prop("checked", true);
191					} else {
192						jQuery(this).prop("checked", false);
193					}
194
195				}
196
197			}
198		);
199		jQuery('.cli-user-preference-checkbox').on(
200			"click",
201			function (e) {
202				var dataID = jQuery(this).attr('data-id');
203				var currentToggleElm = jQuery('.cli-user-preference-checkbox[data-id=' + dataID + ']');
204				if (jQuery(this).is(':checked')) {
205					CLI_Cookie.set('cookielawinfo-' + dataID, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
206					currentToggleElm.prop('checked', true);
207				} else {
208					CLI_Cookie.set('cookielawinfo-' + dataID, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
209					currentToggleElm.prop('checked', false);
210				}
211				CLI.checkCategories();
212				CLI.generateConsent();
213			}
214		);
215
216	},
217	settingsPopUp: function () {
218		jQuery(document).on(
219			'click',
220			'.cli_settings_button',
221			function (e) {
222				e.preventDefault();
223				CLI.settingsModal.addClass("cli-show").css({ 'opacity': 0 }).animate({ 'opacity': 1 });
224				CLI.settingsModal.removeClass('cli-blowup cli-out').addClass("cli-blowup");
225				jQuery('body').addClass("cli-modal-open");
226				jQuery(".cli-settings-overlay").addClass("cli-show");
227				jQuery("#cookie-law-info-bar").css({ 'opacity': .1 });
228				if (!jQuery('.cli-settings-mobile').is(':visible')) {
229					CLI.settingsModal.find('.cli-nav-link:eq(0)').trigger("click");
230				}
231			}
232		);
233		jQuery('#cliModalClose').on(
234			"click",
235			function (e) {
236				CLI.settingsPopUpClose();
237			}
238		);
239		CLI.settingsModal.on(
240			"click",
241			function (e) {
242				if (!(document.getElementsByClassName('cli-modal-dialog')[0].contains(e.target))) {
243					CLI.settingsPopUpClose();
244				}
245			}
246		);
247		jQuery('.cli_enable_all_btn').on(
248			"click",
249			function (e) {
250				var cli_toggle_btn = jQuery(this);
251				var enable_text = cli_toggle_btn.attr('data-enable-text');
252				var disable_text = cli_toggle_btn.attr('data-disable-text');
253				if (cli_toggle_btn.hasClass('cli-enabled')) {
254					CLI.disableAllCookies();
255					cli_toggle_btn.html(enable_text);
256				} else {
257					CLI.enableAllCookies();
258					cli_toggle_btn.html(disable_text);
259
260				}
261				jQuery(this).toggleClass('cli-enabled');
262			}
263		);
264
265		this.privacyReadmore();
266	},
267	settingsTabbedAccordion: function () {
268		jQuery(".cli-tab-header").on(
269			"click",
270			function (e) {
271				if (!(jQuery(e.target).hasClass('cli-slider') || jQuery(e.target).hasClass('cli-user-preference-checkbox'))) {
272					if (jQuery(this).hasClass("cli-tab-active")) {
273						jQuery(this).removeClass("cli-tab-active");
274						jQuery(this)
275							.siblings(".cli-tab-content")
276							.slideUp(200);
277
278					} else {
279						jQuery(".cli-tab-header").removeClass("cli-tab-active");
280						jQuery(this).addClass("cli-tab-active");
281						jQuery(".cli-tab-content").slideUp(200);
282						jQuery(this)
283							.siblings(".cli-tab-content")
284							.slideDown(200);
285					}
286				}
287			}
288		);
289	},
290	settingsPopUpClose: function () {
291		this.settingsModal.removeClass('cli-show');
292		this.settingsModal.addClass('cli-out');
293		jQuery('body').removeClass("cli-modal-open");
294		jQuery(".cli-settings-overlay").removeClass("cli-show");
295		jQuery("#cookie-law-info-bar").css({ 'opacity': 1 });
296	},
297	privacyReadmore: function () {
298		var el = jQuery('.cli-privacy-content .cli-privacy-content-text');
299		if (el.length > 0) {
300			var clone = el.clone(),
301				originalHtml = clone.html(),
302				originalHeight = el.outerHeight(),
303				Trunc = {
304					addReadmore: function (textBlock) {
305						if (textBlock.html().length > 250) {
306							jQuery('.cli-privacy-readmore').show();
307						} else {
308							jQuery('.cli-privacy-readmore').hide();
309						}
310					},
311					truncateText: function (textBlock) {
312						var strippedText = jQuery('<div />').html(textBlock.html());
313						strippedText.find('table').remove();
314						textBlock.html(strippedText.html());
315						currentText = textBlock.text();
316						if (currentText.trim().length > 250) {
317							var newStr = currentText.substring(0, 250);
318							textBlock.empty().html(newStr).append('...');
319						}
320					},
321					replaceText: function (textBlock, original) {
322						return textBlock.html(original);
323					}
324
325				};
326			Trunc.addReadmore(el);
327			Trunc.truncateText(el);
328			jQuery('a.cli-privacy-readmore').on(
329				"click",
330				function (e) {
331					e.preventDefault();
332					if (jQuery('.cli-privacy-overview').hasClass('cli-collapsed')) {
333						Trunc.truncateText(el);
334						jQuery('.cli-privacy-overview').removeClass('cli-collapsed');
335						el.css('height', '100%');
336					} else {
337						jQuery('.cli-privacy-overview').addClass('cli-collapsed');
338						Trunc.replaceText(el, originalHtml);
339					}
340
341				}
342			);
343		}
344
345	},
346	attachDelete: function () {
347		this.delete_link.on(
348			"click",
349			function (e) {
350				CLI_Cookie.erase(CLI_ACCEPT_COOKIE_NAME);
351				for (var k in Cli_Data.nn_cookie_ids) {
352					CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
353				}
354				CLI.generateConsent();
355				return false;
356			}
357		);
358
359	},
360	configButtons: function () {
361		/*[cookie_button] */
362		this.main_button.css('color', this.settings.button_1_link_colour);
363		if (Boolean(this.settings.button_1_as_button)) {
364			this.main_button.css('background-color', this.settings.button_1_button_colour);
365
366			this.main_button.on(
367				'mouseenter',
368				function () {
369					jQuery(this).css('background-color', CLI.settings.button_1_button_hover);
370				}
371			)
372				.on(
373					'mouseleave',
374					function () {
375						jQuery(this).css('background-color', CLI.settings.button_1_button_colour);
376					}
377				);
378		}
379
380		/* [cookie_link] */
381		this.main_link.css('color', this.settings.button_2_link_colour);
382		if (Boolean(this.settings.button_2_as_button)) {
383			this.main_link.css('background-color', this.settings.button_2_button_colour);
384
385			this.main_link.on(
386				'mouseenter',
387				function () {
388					jQuery(this).css('background-color', CLI.settings.button_2_button_hover);
389				}
390			)
391				.on(
392					'mouseleave',
393					function () {
394						jQuery(this).css('background-color', CLI.settings.button_2_button_colour);
395					}
396				);
397
398		}
399		/* [cookie_reject] */
400		this.reject_link.css('color', this.settings.button_3_link_colour);
401		if (Boolean(this.settings.button_3_as_button)) {
402
403			this.reject_link.css('background-color', this.settings.button_3_button_colour);
404			this.reject_link.on(
405				'mouseenter',
406				function () {
407					jQuery(this).css('background-color', CLI.settings.button_3_button_hover);
408				}
409			)
410				.on(
411					'mouseleave',
412					function () {
413						jQuery(this).css('background-color', CLI.settings.button_3_button_colour);
414					}
415				);
416		}
417		/* [cookie_settings] */
418		this.settings_button.css('color', this.settings.button_4_link_colour);
419		if (Boolean(this.settings.button_4_as_button)) {
420			this.settings_button.css('background-color', this.settings.button_4_button_colour);
421			this.settings_button.on(
422				'mouseenter',
423				function () {
424					jQuery(this).css('background-color', CLI.settings.button_4_button_hover);
425				}
426			)
427				.on(
428					'mouseleave',
429					function () {
430						jQuery(this).css('background-color', CLI.settings.button_4_button_colour);
431					}
432				);
433		}
434		/* [cookie_accept_all] */
435		this.accept_all_button.css('color', this.settings.button_7_link_colour);
436		if (this.settings.button_7_as_button) {
437			this.accept_all_button.css('background-color', this.settings.button_7_button_colour);
438			this.accept_all_button.on(
439				'mouseenter',
440				function () {
441					jQuery(this).css('background-color', CLI.settings.button_7_button_hover);
442				}
443			)
444				.on(
445					'mouseleave',
446					function () {
447						jQuery(this).css('background-color', CLI.settings.button_7_button_colour);
448					}
449				);
450		}
451	},
452	toggleBar: function () {
453		if (CLI_COOKIEBAR_AS_POPUP) {
454			this.barAsPopUp(1);
455		}
456		if (CLI.settings.cookie_bar_as == 'widget') {
457			this.barAsWidget(1);
458		}
459		if (!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) {
460			this.displayHeader();
461		} else {
462			this.hideHeader();
463		}
464		if (Boolean(this.settings.show_once_yn)) {
465			setTimeout(
466				function () {
467					CLI.close_header();
468				},
469				CLI.settings.show_once
470			);
471		}
472		if (CLI.js_blocking_enabled === false) {
473			if (Boolean(Cli_Data.ccpaEnabled) === true) {
474				if (Cli_Data.ccpaType === 'ccpa' && Boolean(Cli_Data.ccpaBarEnabled) === false) {
475					cliBlocker.cookieBar(false);
476				}
477			} else {
478				jQuery('.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element').remove();
479			}
480		}
481
482		this.showagain_elm.on(
483			"click",
484			function (e) {
485				e.preventDefault();
486				CLI.showagain_elm.slideUp(
487					CLI.settings.animate_speed_hide,
488					function () {
489						CLI.bar_elm.slideDown(CLI.settings.animate_speed_show);
490						if (CLI_COOKIEBAR_AS_POPUP) {
491							CLI.showPopupOverlay();
492						}
493					}
494				);
495			}
496		);
497	},
498	configShowAgain: function () {
499		this.showagain_config = {
500			'background-color': this.settings.background,
501			'color': this.l1hs(this.settings.text),
502			'position': 'fixed',
503			'font-family': this.settings.font_family
504		};
505		if (Boolean(this.settings.border_on)) {
506			var border_to_hide = 'border-' + this.settings.notify_position_vertical;
507			this.showagain_config['border'] = '1px solid ' + this.l1hs(this.settings.border);
508			this.showagain_config[border_to_hide] = 'none';
509		}
510		var cli_win = jQuery(window);
511		var cli_winw = cli_win.width();
512		var showagain_x_pos = this.settings.showagain_x_position;
513		if (cli_winw < 300) {
514			showagain_x_pos = 10;
515			this.showagain_config.width = cli_winw - 20;
516		} else {
517			this.showagain_config.width = 'auto';
518		}
519		var cli_defw = cli_winw > 400 ? 500 : cli_winw - 20;
520		if (CLI_COOKIEBAR_AS_POPUP) { /* cookie bar as popup */
521			var sa_pos = this.settings.popup_showagain_position;
522			var sa_pos_arr = sa_pos.split('-');
523			if (sa_pos_arr[1] == 'left') {
524				this.showagain_config.left = showagain_x_pos;
525			} else if (sa_pos_arr[1] == 'right') {
526				this.showagain_config.right = showagain_x_pos;
527			}
528			if (sa_pos_arr[0] == 'top') {
529				this.showagain_config.top = 0;
530
531			} else if (sa_pos_arr[0] == 'bottom') {
532				this.showagain_config.bottom = 0;
533			}
534			this.bar_config['position'] = 'fixed';
535
536		} else if (this.settings.cookie_bar_as == 'widget') {
537			this.showagain_config.bottom = 0;
538			if (this.settings.widget_position == 'left') {
539				this.showagain_config.left = showagain_x_pos;
540			} else if (this.settings.widget_position == 'right') {
541				this.showagain_config.right = showagain_x_pos;
542			}
543		} else {
544			if (this.settings.notify_position_vertical == "top") {
545				this.showagain_config.top = '0';
546			} else if (this.settings.notify_position_vertical == "bottom") {
547				this.bar_config['position'] = 'fixed';
548				this.bar_config['bottom'] = '0';
549				this.showagain_config.bottom = '0';
550			}
551			if (this.settings.notify_position_horizontal == "left") {
552				this.showagain_config.left = showagain_x_pos;
553			} else if (this.settings.notify_position_horizontal == "right") {
554				this.showagain_config.right = showagain_x_pos;
555			}
556		}
557		this.showagain_elm.css(this.showagain_config);
558	},
559	configBar: function () {
560		this.bar_config = {
561			'background-color': this.settings.background,
562			'color': this.settings.text,
563			'font-family': this.settings.font_family
564		};
565		if (this.settings.notify_position_vertical == "top") {
566			this.bar_config['top'] = '0';
567			if (Boolean(this.settings.header_fix) === true) {
568				this.bar_config['position'] = 'fixed';
569			}
570		} else {
571			this.bar_config['bottom'] = '0';
572		}
573		this.configShowAgain();
574		this.bar_elm.css(this.bar_config).hide();
575	},
576	l1hs: function (str) {
577		if (str.charAt(0) == "#") {
578			str = str.substring(1, str.length);
579		} else {
580			return "#" + str;
581		}
582		return this.l1hs(str);
583	},
584	close_header: function () {
585		CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
586		this.hideHeader();
587	},
588	accept_close: function () {
589		this.hidePopupOverlay();
590		this.generateConsent();
591		this.cookieLawInfoRunCallBacks();
592
593		CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
594		if (Boolean(this.settings.notify_animate_hide)) {
595			if (CLI.js_blocking_enabled === true) {
596				this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts);
597			} else {
598				this.bar_elm.slideUp(this.settings.animate_speed_hide);
599			}
600
601		} else {
602			if (CLI.js_blocking_enabled === true) {
603				this.bar_elm.hide(0, cliBlocker.runScripts);
604
605			} else {
606				this.bar_elm.hide();
607			}
608		}
609		if (Boolean(this.settings.showagain_tab)) {
610			this.showagain_elm.slideDown(this.settings.animate_speed_show);
611		}
612		if (Boolean(this.settings.accept_close_reload) === true) {
613			this.reload_current_page();
614		}
615		return false;
616	},
617	reject_close: function () {
618		this.hidePopupOverlay();
619		this.generateConsent();
620		this.cookieLawInfoRunCallBacks();
621		for (var k in Cli_Data.nn_cookie_ids) {
622			CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
623		}
624		CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
625
626		if (Boolean(this.settings.notify_animate_hide)) {
627			if (CLI.js_blocking_enabled === true) {
628
629				this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts);
630
631			} else {
632
633				this.bar_elm.slideUp(this.settings.animate_speed_hide);
634			}
635
636		} else {
637			if (CLI.js_blocking_enabled === true) {
638
639				this.bar_elm.hide(cliBlocker.runScripts);
640
641			} else {
642
643				this.bar_elm.hide();
644
645			}
646
647		}
648		if (Boolean(this.settings.showagain_tab)) {
649			this.showagain_elm.slideDown(this.settings.animate_speed_show);
650		}
651		if (Boolean(this.settings.reject_close_reload) === true) {
652			this.reload_current_page();
653		}
654		return false;
655	},
656	reload_current_page: function () {
657
658		window.location.reload(true);
659	},
660	closeOnScroll: function () {
661		if (window.pageYOffset > 100 && !CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)) {
662			CLI.accept_close();
663			if (Boolean(CLI.settings.scroll_close_reload) === true) {
664				window.location.reload();
665			}
666			window.removeEventListener("scroll", CLI.closeOnScroll, false);
667		}
668	},
669	displayHeader: function () {
670		if (Boolean(this.settings.notify_animate_show)) {
671			this.bar_elm.slideDown(this.settings.animate_speed_show);
672		} else {
673			this.bar_elm.show();
674		}
675		this.showagain_elm.hide();
676		if (CLI_COOKIEBAR_AS_POPUP) {
677			this.showPopupOverlay();
678		}
679	},
680	hideHeader: function () {
681		if (Boolean(this.settings.showagain_tab)) {
682			if (Boolean(this.settings.notify_animate_show)) {
683				this.showagain_elm.slideDown(this.settings.animate_speed_show);
684			} else {
685				this.showagain_elm.show();
686			}
687		} else {
688			this.showagain_elm.hide();
689		}
690		this.bar_elm.slideUp(this.settings.animate_speed_show);
691		this.hidePopupOverlay();
692	},
693	hidePopupOverlay: function () {
694		jQuery('body').removeClass("cli-barmodal-open");
695		jQuery(".cli-popupbar-overlay").removeClass("cli-show");
696	},
697	showPopupOverlay: function () {
698		if (this.bar_elm.length) {
699			if (Boolean(this.settings.popup_overlay)) {
700				jQuery('body').addClass("cli-barmodal-open");
701				jQuery(".cli-popupbar-overlay").addClass("cli-show");
702			}
703		}
704
705	},
706	barAsWidget: function (a) {
707		var cli_elm = this.bar_elm;
708		cli_elm.attr('data-cli-type', 'widget');
709		var cli_win = jQuery(window);
710		var cli_winh = cli_win.height() - 40;
711		var cli_winw = cli_win.width();
712		var cli_defw = cli_winw > 400 ? 300 : cli_winw - 30;
713		cli_elm.css(
714			{
715				'width': cli_defw, 'height': 'auto', 'max-height': cli_winh, 'overflow': 'auto', 'position': 'fixed', 'box-sizing': 'border-box'
716			}
717		);
718		if (this.checkifStyleAttributeExist() === false) {
719			cli_elm.css({ 'padding': '25px 15px' });
720		}
721		if (this.settings.widget_position == 'left') {
722			cli_elm.css(
723				{
724					'left': '15px', 'right': 'auto', 'bottom': '15px', 'top': 'auto'
725				}
726			);
727		} else {
728			cli_elm.css(
729				{
730					'left': 'auto', 'right': '15px', 'bottom': '15px', 'top': 'auto'
731				}
732			);
733		}
734		if (a) {
735			this.setResize();
736		}
737	},
738	barAsPopUp: function (a) {
739		if (typeof cookie_law_info_bar_as_popup === 'function') {
740			return false;
741		}
742		var cli_elm = this.bar_elm;
743		cli_elm.attr('data-cli-type', 'popup');
744		var cli_win = jQuery(window);
745		var cli_winh = cli_win.height() - 40;
746		var cli_winw = cli_win.width();
747		var cli_defw = cli_winw > 700 ? 500 : cli_winw - 20;
748
749		cli_elm.css(
750			{
751				'width': cli_defw, 'height': 'auto', 'max-height': cli_winh, 'bottom': '', 'top': '50%', 'left': '50%', 'margin-left': (cli_defw / 2) * -1, 'margin-top': '-100px', 'overflow': 'auto'
752			}
753		).addClass('cli-bar-popup cli-modal-content');
754		if (this.checkifStyleAttributeExist() === false) {
755			cli_elm.css({ 'padding': '25px 15px' });
756		}
757		cli_h = cli_elm.height();
758		li_h = cli_h < 200 ? 200 : cli_h;
759		cli_elm.css({ 'top': '50%', 'margin-top': ((cli_h / 2) + 30) * -1 });
760		setTimeout(
761			function () {
762				cli_elm.css(
763					{
764						'bottom': ''
765					}
766				);
767			},
768			100
769		);
770		if (a) {
771			this.setResize();
772		}
773	},
774	setResize: function () {
775		var resizeTmr = null;
776		jQuery(window).resize(
777			function () {
778				clearTimeout(resizeTmr);
779				resizeTmr = setTimeout(
780					function () {
781						if (CLI_COOKIEBAR_AS_POPUP) {
782							CLI.barAsPopUp();
783						}
784						if (CLI.settings.cookie_bar_as == 'widget') {
785							CLI.barAsWidget();
786						}
787						CLI.configShowAgain();
788					},
789					500
790				);
791			}
792		);
793	},
794	enableAllCookies: function () {
795
796		jQuery('.cli-user-preference-checkbox').each(
797			function () {
798				var cli_chkbox_elm = jQuery(this);
799				var cli_chkbox_data_id = cli_chkbox_elm.attr('data-id');
800				if (cli_chkbox_data_id != 'checkbox-necessary') {
801					cli_chkbox_elm.prop('checked', true);
802					CLI_Cookie.set('cookielawinfo-' + cli_chkbox_data_id, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
803				}
804			}
805		);
806	},
807	disableAllCookies: function () {
808		jQuery('.cli-user-preference-checkbox').each(
809			function () {
810
811				var cli_chkbox_elm = jQuery(this);
812				var cli_chkbox_data_id = cli_chkbox_elm.attr('data-id');
813				cliCategorySlug = cli_chkbox_data_id.replace('checkbox-', '');
814				if (Cli_Data.strictlyEnabled.indexOf(cliCategorySlug) === -1) {
815					cli_chkbox_elm.prop('checked', false);
816					CLI_Cookie.set('cookielawinfo-' + cli_chkbox_data_id, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
817				}
818			}
819		);
820	},
821	hideCookieBarOnClose: function () {
822		jQuery(document).on(
823			'click',
824			'.cli_cookie_close_button',
825			function (e) {
826				e.preventDefault();
827				var elm = jQuery(this);
828				if (Cli_Data.ccpaType === 'ccpa') {
829					CLI.enableAllCookies();
830				}
831				CLI.accept_close();
832			}
833		);
834	},
835	checkCategories: function () {
836		var cliAllowedCategories = [];
837		var cli_categories = {};
838		jQuery('.cli-user-preference-checkbox').each(
839			function () {
840				var status = false;
841				cli_chkbox_elm = jQuery(this);
842				cli_chkbox_data_id = cli_chkbox_elm.attr('data-id');
843				cli_chkbox_data_id = cli_chkbox_data_id.replace('checkbox-', '');
844				cli_chkbox_data_id_trimmed = cli_chkbox_data_id.replace('-', '_')
845				if (jQuery(cli_chkbox_elm).is(':checked')) {
846					status = true;
847					cliAllowedCategories.push(cli_chkbox_data_id);
848				}
849
850				cli_categories[cli_chkbox_data_id_trimmed] = status;
851			}
852		);
853		CLI.allowedCategories = cliAllowedCategories;
854	},
855	cookieLawInfoRunCallBacks: function () {
856		this.checkCategories();
857		if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == 'yes') {
858			if ("function" == typeof CookieLawInfo_Accept_Callback) {
859				CookieLawInfo_Accept_Callback();
860			}
861		}
862	},
863	generateConsent: function () {
864		var preferenceCookie = CLI_Cookie.read(CLI_PREFERENCE_COOKIE);
865		cliConsent = {};
866		if (preferenceCookie !== null) {
867			cliConsent = window.atob(preferenceCookie);
868			cliConsent = JSON.parse(cliConsent);
869		}
870		cliConsent.ver = Cli_Data.consentVersion;
871		categories = [];
872		jQuery('.cli-user-preference-checkbox').each(
873			function () {
874				categoryVal = '';
875				cli_chkbox_data_id = jQuery(this).attr('data-id');
876				cli_chkbox_data_id = cli_chkbox_data_id.replace('checkbox-', '');
877				if (jQuery(this).is(':checked')) {
878					categoryVal = true;
879				} else {
880					categoryVal = false;
881				}
882				cliConsent[cli_chkbox_data_id] = categoryVal;
883			}
884		);
885		cliConsent = JSON.stringify(cliConsent);
886		cliConsent = window.btoa(cliConsent);
887		CLI_Cookie.set(CLI_PREFERENCE_COOKIE, cliConsent, CLI_ACCEPT_COOKIE_EXPIRE);
888	},
889	addStyleAttribute: function () {
890		var bar = this.bar_elm;
891		var styleClass = '';
892		if (jQuery(bar).find('.cli-bar-container').length > 0) {
893			styleClass = jQuery('.cli-bar-container').attr('class');
894			styleClass = styleClass.replace('cli-bar-container', '');
895			styleClass = styleClass.trim();
896			jQuery(bar).attr('data-cli-style', styleClass);
897		}
898	},
899	getParameterByName: function (name, url) {
900		if (!url) {
901			url = window.location.href;
902		}
903		name = name.replace(/[\[\]]/g, '\\$&');
904		var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
905			results = regex.exec(url);
906		if (!results) {
907			return null;
908		}
909		if (!results[2]) {
910			return '';
911		}
912		return decodeURIComponent(results[2].replace(/\+/g, ' '));
913	},
914	CookieLawInfo_Callback: function (enableBar, enableBlocking) {
915		enableBar = typeof enableBar !== 'undefined' ? enableBar : true;
916		enableBlocking = typeof enableBlocking !== 'undefined' ? enableBlocking : true;
917		if (CLI.js_blocking_enabled === true && Boolean(Cli_Data.custom_integration) === true) {
918			cliBlocker.cookieBar(enableBar);
919			cliBlocker.runScripts(enableBlocking);
920		}
921	},
922	checkifStyleAttributeExist: function () {
923		var exist = false;
924		var attr = this.bar_elm.attr('data-cli-style');
925		if (typeof attr !== typeof undefined && attr !== false) {
926			exist = true;
927		}
928		return exist;
929	},
930	reviewConsent: function () {
931		jQuery(document).on(
932			'click',
933			'.cli_manage_current_consent,.wt-cli-manage-consent-link',
934			function () {
935				CLI.displayHeader();
936			}
937		);
938	},
939	mayBeSetPreferenceCookie: function () {
940		if (CLI.getParameterByName('cli_bypass') === "1") {
941			CLI.generateConsent();
942		}
943	}
944}
945var cliBlocker =
946{
947	blockingStatus: true,
948	scriptsLoaded: false,
949	ccpaEnabled: false,
950	ccpaRegionBased: false,
951	ccpaApplicable: false,
952	ccpaBarEnabled: false,
953	cliShowBar: true,
954	isBypassEnabled: CLI.getParameterByName('cli_bypass'),
955	checkPluginStatus: function (callbackA, callbackB) {
956		this.ccpaEnabled = Boolean(Cli_Data.ccpaEnabled);
957		this.ccpaRegionBased = Boolean(Cli_Data.ccpaRegionBased);
958		this.ccpaBarEnabled = Boolean(Cli_Data.ccpaBarEnabled);
959
960		if (Boolean(Cli_Data.custom_integration) === true) {
961			callbackA(false);
962		} else {
963			if (this.ccpaEnabled === true) {
964				this.ccpaApplicable = true;
965				if (Cli_Data.ccpaType === 'ccpa') {
966					if (this.ccpaBarEnabled !== true) {
967						this.cliShowBar = false;
968						this.blockingStatus = false;
969					}
970				}
971			} else {
972				jQuery('.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element').remove();
973			}
974			if (cliBlocker.isBypassEnabled === "1") {
975				cliBlocker.blockingStatus = false;
976			}
977			callbackA(this.cliShowBar);
978			callbackB(this.blockingStatus);
979		}
980
981	},
982	cookieBar: function (showbar) {
983		showbar = typeof showbar !== 'undefined' ? showbar : true;
984		cliBlocker.cliShowBar = showbar;
985		if (cliBlocker.cliShowBar === false) {
986			CLI.bar_elm.hide();
987			CLI.showagain_elm.hide();
988			CLI.settingsModal.removeClass('cli-blowup cli-out');
989			CLI.hidePopupOverlay();
990			jQuery(".cli-settings-overlay").removeClass("cli-show");
991		} else {
992			if (!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) {
993				CLI.displayHeader();
994			} else {
995				CLI.hideHeader();
996			}
997		}
998	},
999	removeCookieByCategory: function () {
1000
1001		if (cliBlocker.blockingStatus === true) {
1002			if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) !== null) {
1003				var non_necessary_cookies = Cli_Data.non_necessary_cookies;
1004				for (var key in non_necessary_cookies) {
1005					currentCategory = key;
1006					if (CLI.allowedCategories.indexOf(currentCategory) === -1) {
1007						var nonNecessaryCookies = non_necessary_cookies[currentCategory];
1008						for (var i = 0; i < nonNecessaryCookies.length; i++) {
1009							if (CLI_Cookie.read(nonNecessaryCookies[i]) !== null) {
1010								CLI_Cookie.erase(nonNecessaryCookies[i]);
1011							}
1012
1013						}
1014					}
1015				}
1016			}
1017		}
1018	},
1019	runScripts: function (blocking) {
1020		blocking = typeof blocking !== 'undefined' ? blocking : true;
1021		cliBlocker.blockingStatus = blocking;
1022		srcReplaceableElms = ['iframe', 'IFRAME', 'EMBED', 'embed', 'OBJECT', 'object', 'IMG', 'img'];
1023		var genericFuncs =
1024		{
1025
1026			renderByElement: function (callback) {
1027				cliScriptFuncs.renderScripts();
1028				callback();
1029				cliBlocker.scriptsLoaded = true;
1030			},
1031
1032		};
1033		var cliScriptFuncs =
1034		{
1035			// trigger DOMContentLoaded
1036			scriptsDone: function () {
1037				if (typeof Cli_Data.triggerDomRefresh !== 'undefined') {
1038					if (Boolean(Cli_Data.triggerDomRefresh) === true) {
1039						var DOMContentLoadedEvent = document.createEvent('Event')
1040						DOMContentLoadedEvent.initEvent('DOMContentLoaded', true, true)
1041						window.document.dispatchEvent(DOMContentLoadedEvent);
1042					}
1043				}
1044			},
1045			seq: function (arr, callback, index) {
1046				// first call, without an index
1047				if (typeof index === 'undefined') {
1048					index = 0
1049				}
1050
1051				arr[index](
1052					function () {
1053						index++
1054						if (index === arr.length) {
1055							callback()
1056						} else {
1057							cliScriptFuncs.seq(arr, callback, index)
1058						}
1059					}
1060				)
1061			},
1062			/* script runner */
1063			insertScript: function ($script, callback) {
1064				var s = '';
1065				var scriptType = $script.getAttribute('data-cli-script-type');
1066				var elementPosition = $script.getAttribute('data-cli-element-position');
1067				var isBlock = $script.getAttribute('data-cli-block');
1068				var s = document.createElement('script');
1069				var ccpaOptedOut = cliBlocker.ccpaOptedOut();
1070				s.type = 'text/plain';
1071				if ($script.async) {
1072					s.async = $script.async;
1073				}
1074				if ($script.defer) {
1075					s.defer = $script.defer;
1076				}
1077				if ($script.src) {
1078					s.onload = callback
1079					s.onerror = callback
1080					s.src = $script.src
1081				} else {
1082					s.textContent = $script.innerText
1083				}
1084				var attrs = jQuery($script).prop("attributes");
1085				for (var ii = 0; ii < attrs.length; ++ii) {
1086					if (attrs[ii].nodeName !== 'id') {
1087						s.setAttribute(attrs[ii].nodeName, attrs[ii].value);
1088					}
1089				}
1090				if (cliBlocker.blockingStatus === true) {
1091
1092					if ((CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == 'yes' && CLI.allowedCategories.indexOf(scriptType) !== -1)) {
1093						s.setAttribute('data-cli-consent', 'accepted');
1094						s.type = 'text/javascript';
1095					}
1096					if (cliBlocker.ccpaApplicable === true) {
1097						if (ccpaOptedOut === true || CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == null) {
1098							s.type = 'text/plain';
1099						}
1100					}
1101				} else {
1102					s.type = 'text/javascript';
1103				}
1104
1105				if ($script.type != s.type) {
1106					if (elementPosition === 'head') {
1107						document.head.appendChild(s);
1108					} else {
1109						document.body.appendChild(s);
1110					}
1111					if (!$script.src) {
1112						callback()
1113					}
1114					$script.parentNode.removeChild($script);
1115
1116				} else {
1117
1118					callback();
1119				}
1120			},
1121			renderScripts: function () {
1122				var $scripts = document.querySelectorAll('script[data-cli-class="cli-blocker-script"]');
1123				if ($scripts.length > 0) {
1124					var runList = []
1125					var typeAttr
1126					Array.prototype.forEach.call(
1127						$scripts,
1128						function ($script) {
1129							// only run script tags without the type attribute
1130							// or with a javascript mime attribute value
1131							typeAttr = $script.getAttribute('type')
1132							runList.push(
1133								function (callback) {
1134									cliScriptFuncs.insertScript($script, callback)
1135								}
1136							)
1137						}
1138					)
1139					cliScriptFuncs.seq(runList, cliScriptFuncs.scriptsDone);
1140				}
1141			}
1142		};
1143		genericFuncs.renderByElement(cliBlocker.removeCookieByCategory);
1144	},
1145	ccpaOptedOut: function () {
1146		var ccpaOptedOut = false;
1147		var preferenceCookie = CLI_Cookie.read(CLI_PREFERENCE_COOKIE);
1148		if (preferenceCookie !== null) {
1149			cliConsent = window.atob(preferenceCookie);
1150			cliConsent = JSON.parse(cliConsent);
1151			if (typeof cliConsent.ccpaOptout !== 'undefined') {
1152				ccpaOptedOut = cliConsent.ccpaOptout;
1153			}
1154		}
1155		return ccpaOptedOut;
1156	}
1157}
1158jQuery(document).ready(
1159	function () {
1160		if (typeof cli_cookiebar_settings != 'undefined') {
1161			CLI.set(
1162				{
1163					settings: cli_cookiebar_settings
1164				}
1165			);
1166			if (CLI.js_blocking_enabled === true) {
1167				cliBlocker.checkPluginStatus(cliBlocker.cookieBar, cliBlocker.runScripts);
1168			}
1169		}
1170	}
1171);

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.