PageSourceSearch

https://reclaw.co.uk/wp-content/plugins/cookie-law-info/public/js/cookie-law-info-public.js?ver=2.0.4

js reclaw.co.uk collected 2026-10-10 00:18:03 UTC 36,312 bytes, 1,243 lines download raw bytes

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

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.