PageSourceSearch

https://www.louplogistics.com/js/main.js

js louplogistics.com collected 2026-10-08 12:11:39 UTC 14,522 bytes, 281 lines download raw bytes

vendor: 6,108 bytes, lines 1-5
1/* :::::::::::::::::::::::::::: MODERNIZR */
2
3/*! modernizr 3.6.0 (Custom Build) | MIT *
4 * https://modernizr.com/download/?-cssgrid_cssgridlegacy-flexbox-flexboxlegacy-flexboxtweener-svg-svgasimg-setclasses !*/
5!function(e,n,t){function r(e,n){return typeof e===n}function o(){var e,n,t,o,s,i,l;for(var a in C)if(C.hasOwnProperty(a)){if(e=[],n=C[a],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(t=0;t<n.options.aliases.length;t++)e.push(n.options.aliases[t].toLowerCase());for(o=r(n.fn,"function")?n.fn():n.fn,s=0;s<e.length;s++)i=e[s],l=i.split("."),1===l.length?Modernizr[l[0]]=o:(!Modernizr[l[0]]||Modernizr[l[0]]instanceof Boolean||(Modernizr[l[0]]=new Boolean(Modernizr[l[0]])),Modernizr[l[0]][l[1]]=o),_.push((o?"":"no-")+l.join("-"))}}function s(e){var n=S.className,t=Modernizr._config.classPrefix||"";if(b&&(n=n.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+t+"no-js(\\s|$)");n=n.replace(r,"$1"+t+"js$2")}Modernizr._config.enableClasses&&(n+=" "+t+e.join(" "+t),b?S.className.baseVal=n:S.className=n)}function i(e,n){return!!~(""+e).indexOf(n)}function l(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):b?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function a(e){return e.replace(/([a-z])-([a-z])/g,function(e,n,t){return n+t.toUpperCase()}).replace(/^-/,"")}function f(e,n){return function(){return e.apply(n,arguments)}}function u(e,n,t){var o;for(var s in e)if(e[s]in n)return t===!1?e[s]:(o=n[e[s]],r(o,"function")?f(o,t||n):o);return!1}function c(e){return e.replace(/([A-Z])/g,function(e,n){return"-"+n.toLowerCase()}).replace(/^ms-/,"-ms-")}function d(n,t,r){var o;if("getComputedStyle"in e){o=getComputedStyle.call(e,n,t);var s=e.console;if(null!==o)r&&(o=o.getPropertyValue(r));else if(s){var i=s.error?"error":"log";s[i].call(s,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else o=!t&&n.currentStyle&&n.currentStyle[r];return o}function p(){var e=n.body;return e||(e=l(b?"svg":"body"),e.fake=!0),e}function g(e,t,r,o){var s,i,a,f,u="modernizr",c=l("div"),d=p();if(parseInt(r,10))for(;r--;)a=l("div"),a.id=o?o[r]:u+(r+1),c.appendChild(a);return s=l("style"),s.type="text/css",s.id="s"+u,(d.fake?d:c).appendChild(s),d.appendChild(c),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(n.createTextNode(e)),c.id=u,d.fake&&(d.style.background="",d.style.overflow="hidden",f=S.style.overflow,S.style.overflow="hidden",S.appendChild(d)),i=t(c,e),d.fake?(d.parentNode.removeChild(d),S.style.overflow=f,S.offsetHeight):c.parentNode.removeChild(c),!!i}function m(n,r){var o=n.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(c(n[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var s=[];o--;)s.push("("+c(n[o])+":"+r+")");return s=s.join(" or "),g("@supports ("+s+") { #modernizr { position: absolute; } }",function(e){return"absolute"==d(e,null,"position")})}return t}function h(e,n,o,s){function f(){c&&(delete z.style,delete z.modElem)}if(s=r(s,"undefined")?!1:s,!r(o,"undefined")){var u=m(e,o);if(!r(u,"undefined"))return u}for(var c,d,p,g,h,v=["modernizr","tspan","samp"];!z.style&&v.length;)c=!0,z.modElem=l(v.shift()),z.style=z.modElem.style;for(p=e.length,d=0;p>d;d++)if(g=e[d],h=z.style[g],i(g,"-")&&(g=a(g)),z.style[g]!==t){if(s||r(o,"undefined"))return f(),"pfx"==n?g:!0;try{z.style[g]=o}catch(y){}if(z.style[g]!=h)return f(),"pfx"==n?g:!0}return f(),!1}function v(e,n,t,o,s){var i=e.charAt(0).toUpperCase()+e.slice(1),l=(e+" "+P.join(i+" ")+i).split(" ");return r(n,"string")||r(n,"undefined")?h(l,n,o,s):(l=(e+" "+E.join(i+" ")+i).split(" "),u(l,n,t))}function y(e,n,r){return v(e,t,t,n,r)}function w(e,n){if("object"==typeof e)for(var t in e)j(e,t)&&w(t,e[t]);else{e=e.toLowerCase();var r=e.split("."),o=Modernizr[r[0]];if(2==r.length&&(o=o[r[1]]),"undefined"!=typeof o)return Modernizr;n="function"==typeof n?n():n,1==r.length?Modernizr[r[0]]=n:(!Modernizr[r[0]]||Modernizr[r[0]]instanceof Boolean||(Modernizr[r[0]]=new Boolean(Modernizr[r[0]])),Modernizr[r[0]][r[1]]=n),s([(n&&0!=n?"":"no-")+r.join("-")]),Modernizr._trigger(e,n)}return Modernizr}var _=[],C=[],x={_version:"3.6.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,n){var t=this;setTimeout(function(){n(t[e])},0)},addTest:function(e,n,t){C.push({name:e,fn:n,options:t})},addAsyncTest:function(e){C.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=x,Modernizr=new Modernizr,Modernizr.addTest("svg",!!n.createElementNS&&!!n.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);var S=n.documentElement,b="svg"===S.nodeName.toLowerCase(),T="Moz O ms Webkit",P=x._config.usePrefixes?T.split(" "):[];x._cssomPrefixes=P;var E=x._config.usePrefixes?T.toLowerCase().split(" "):[];x._domPrefixes=E;var N={elem:l("modernizr")};Modernizr._q.push(function(){delete N.elem});var z={style:N.elem.style};Modernizr._q.unshift(function(){delete z.style}),x.testAllProps=v,x.testAllProps=y,Modernizr.addTest("cssgridlegacy",y("grid-columns","10px",!0)),Modernizr.addTest("cssgrid",y("grid-template-rows","none",!0)),Modernizr.addTest("flexbox",y("flexBasis","1px",!0)),Modernizr.addTest("flexboxlegacy",y("boxDirection","reverse",!0)),Modernizr.addTest("flexboxtweener",y("flexAlign","end",!0));var j;!function(){var e={}.hasOwnProperty;j=r(e,"undefined")||r(e.call,"undefined")?function(e,n){return n in e&&r(e.constructor.prototype[n],"undefined")}:function(n,t){return e.call(n,t)}}(),x._l={},x.on=function(e,n){this._l[e]||(this._l[e]=[]),this._l[e].push(n),Modernizr.hasOwnProperty(e)&&setTimeout(function(){Modernizr._trigger(e,Modernizr[e])},0)},x._trigger=function(e,n){if(this._l[e]){var t=this._l[e];setTimeout(function(){var e,r;for(e=0;e<t.length;e++)(r=t[e])(n)},0),delete this._l[e]}},Modernizr._q.push(function(){x.addTest=w}),Modernizr.addTest("svgasimg",n.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")),o(),s(_),delete x.addTest,delete x.addAsyncTest;for(var A=0;A<Modernizr._q.length;
5A++)Modernizr._q[A]();e.Modernizr=Modernizr}(window,document);
6
7/* :::::::::::::::::::::::::::: CUSTOM STYLES */
8
9/* :::::::::::::: TOGGLE ACTIVE CLASS */
10var windowwidth = $( window ).width();
11var elems = document.querySelectorAll("[data-active]");
12for(var i = 0; i < elems.length; i++){
13    // Add event listeners to each one
14    elems[i].addEventListener("click", function(e){
15
16        // Prevent default action of element
17        e.preventDefault();
18
19        // Grab linked elements
20        var linkedElement = document.querySelectorAll("." + this.getAttribute('data-active'));
21
22        // Toggle linked element if present
23        for(var i = 0; i < linkedElement.length; i++) {
24            linkedElement[i].classList.toggle("is-active");
25        }
26        
27    });    
28}
29/* :::::::::::::: DISPLAY ELEMENT ON CLICK */
30function toggleElment() {
31	var toggleElem = document.querySelectorAll("[data-toggle]");
32	for(var i = 0; i < elems.length; i++){
33		$(toggleElem).bind( "click", function() {
34			event.preventDefault();
35			 var linkedElement = document.querySelectorAll("." + this.getAttribute('data-toggle'));
36			 for(var i = 0; i < linkedElement.length; i++) {
37	            $(linkedElement).slideToggle("fast");
38	        }
39		});
40	}
41} 
42/* :::::::::::::: SCROLL TO TOP */
43function backtotop() {
44    $("html, body").animate({ scrollTop: "0" });
45}
46function scrolltotop() {
47	var windowheight = $( window ).height();
48	var pageheight = $('.page_wrapper').height();
49	var scrolltotopbtn = '<button class="backtotop" onclick="backtotop()">Back to top</button>';
50	if( pageheight > 2000 && $(document).scrollTop() >= windowheight) {
51		if ($('.backtotop').length == 0) { 
52			$('.page_wrapper').append(scrolltotopbtn);
53		}
54	} else {
55		$('.backtotop').remove();
56	}
57}
58/* :::::::::::::: REMOVE NON BREAKING SPACES */
59function removenbsp() {
60	if (windowwidth < 800) {
61		$( ".nbsp" ).each(function( index ) {
62			return $(this).text(' ');
63		});
64	} else {
65		$( ".nbsp" ).each(function( index ) {
66		    var addNBSpace = "";
67		    addNBSpace += "&nbsp;";
68		    $(this).html(addNBSpace);
69		});
70	}
71}
72/* ::::::::::::: FLIP OUT IMAGES FOR THEIR MOBILE VERSIONS */
73function mobileimg() {
74	if (windowwidth < 500) {
75		$( ".js_mobileimg" ).each(function( index ) {
76			var mobileurl = $(this).attr('data-mobileimg');
77			$(this).css('background-image', 'url("' + mobileurl + '")');
78		});
79	}
80}
81
82$(document).ready(function() {
83	mobileimg();
84    toggleElment();
85    removenbsp();
86    
87    /* Replace SVGs with PNGs if not supported */
88    if (Modernizr.svgasimg) {
89		$("img.src").attr("src", function (idx, attr) {
90		    return attr.replace(/\.png$/, ".svg");
91		});   
92	}
93	
94	/* Collapsible Content functionality */
95	if( $('.collapsible_handle').length ) {
96		$(".collapsible_handle").click(function(){
97		    if ( $(this).parent().hasClass("open") ) {
98			    $('.collapsible_item').removeClass("open");
99			} else {
100				$('.collapsible_item').removeClass("open");
101				$(this).parent().addClass("open");
102			}
103		});
104	}
105	
106	/* Mobile menu toggle functionality */
107	$("#openmenu").click(function(){
108	    if ( $('body').hasClass("mobileopen") ) {
109		    $('body').removeClass("mobileopen");
110		} else {
111			$('body').addClass("mobileopen");
112		}
113	});
114	$(document).mouseup(function(e) {
115	    var container = $(".mobileopen header");
116	
117	    // if the target of the click isn't the container nor a descendant of the container
118	    if (!container.is(e.target) && container.has(e.target).length === 0) 
119	    {
120	       $('body').removeClass("mobileopen");
121	    }
122	});
123	
124	
125	/* Dropdown toggle functionality */
126	if( $('.dropdownbtn').length ) {
127		$(".dropdownbtn").click(function(){
128		    if ( $(this).closest("li").hasClass("active") ) {
129			    $('.nav li').removeClass("active");
130			} else {
131				$('.nav li').removeClass("active");
132				$(this).closest("li").addClass("active");
133			}
134		});
135	}
136	/* News filter */
137	$(document).mouseup(function(e) {
138	    var container = $(".news_filter");
139	
140	    // if the target of the click isn't the container nor a descendant of the container
141	    if (!container.is(e.target) && container.has(e.target).length === 0) 
142	    {
143	       $('.news_filter').removeClass("is-active");
144	    }
145	});
146	/* Add focused class for form inputs floating fields */
147	$("input").on('focus blur', function(){
148	     $(this).parent('.field').toggleClass('is_focused');
149	})
150	$('input').blur(function(){
151	    tmpval = $(this).val();
152	    if(tmpval == '') {
153	        $(this).parent('.field').removeClass('filled');
154	    } else {
155	        $(this).parent('.field').addClass('filled');
156	    }
157	});
158	$("textarea").on('focus blur', function(){
159	     $(this).parent('.field').toggleClass('is_focused');
160	})
161	$('textarea').blur(function(){
162	    tmpval = $(this).val();
163	    if(tmpval == '') {
164	        $(this).parent('.field').removeClass('filled');
165	    } else {
166	        $(this).parent('.field').addClass('filled');
167	    }
168	});
169	$('input').each(function() {
170	    if( $(this).val() ) {
171	        $(this).parent('.field').addClass('filled');
172	    }
173	});
174	/* Section navigation functionality */
175	if( $('.section_nav_stick').length ) {
176		var navHeight = $('.section_nav_stick').height();
177		$(".section_nav_text").click(function(){
178		    $(this).parents('.dropdown').toggleClass('open');
179		});
180		$(".section_nav_stick a").click(function(){
181		    $(this).parents('.dropdown').removeClass('open');
182		});	
183	}
184	$(document).mouseup(function(e) {
185	    var container = $(".section_nav_stick .dropdown");
186	    // if the target of the click isn't the container nor a descendant of the container
187	    if (!container.is(e.target) && container.has(e.target).length === 0) {
188	       $(container).removeClass('open');
189	    }
190	});
191	
192	/* Back to top functionality */
193	scrolltotop();
194});
195
196/* In page link functionality */
197var mainnav_height = $('.mainnav').outerHeight();
198var windowwidth = $( window ).width();
199
200$(document).on('click', 'a[href^="#"]', function (event) {
201	event.preventDefault();
202    if ( $(this).hasClass('mobileScrollTo') ) {
203	    if ( windowwidth < 800 ) {
204		    $('html, body').animate({
205	        	scrollTop: $($.attr(this, 'href')).offset().top - mainnav_height
206	    	}, 500);
207	    }
208    } else {
209	    if ( windowwidth < 800 ) {
210		    $('html, body').animate({
211	        	scrollTop: $($.attr(this, 'href')).offset().top - mainnav_height
212	    	}, 500);
213	    } else {
214		    $('html, body').animate({
215		        scrollTop: $($.attr(this, 'href')).offset().top - mainnav_height
216		    }, 500);
217		}
218    }
219});
220
221/* Section navigation functionality */
222if( $('.section_nav').length ) {
223	var sections = $('.section_grouping .section_wrapper'),
224		nav = $('.section_nav_stick'),
225		nav_height = nav.outerHeight(), 
226		mainnav_height = $('.mainnav').outerHeight();
227}
228$(window).scroll(function(){
229	/* Scroll to top */
230	scrolltotop();
231	/* Sticky Navigation Class */
232	if($(window).scrollTop() >= 150){
233		$('.page_wrapper').addClass('stickynav');
234	}
235	else{
236		$('.page_wrapper').removeClass('stickynav');
237	}
238	
239	/* Section navigation functionality */
240	if( $('.section_nav').length ) {
241		var cur_pos = $(this).scrollTop();
242		sections.each(function() {
243			var top = $(this).offset().top - nav_height - mainnav_height,
244			    bottom = top + $(this).outerHeight();
245			
246			if (cur_pos >= top && cur_pos <= bottom) {
247			  nav.find('a').parent('li').removeClass('active');
248			  sections.removeClass('active');
249			
250			  $(this).addClass('active');
251			  nav.find('a[href="#'+$(this).attr('id')+'"]').parent('li').addClass('active');
252			  var sectionname = nav.find('a[href="#'+$(this).attr('id')+'"]').text();
253			  nav.find('.section_nav_text').text(sectionname);
254			  
255			  var sectionID = $(this).attr('id');
256			  var sectionID = sectionID.substr(9);
257			  var iconpath = "/images/iconblock-" + sectionID + '.png';
258			  nav.find('.svg').attr('src', iconpath);
259			}
260		});
261		var navsectiontop = $('.section_grouping').offset().top  - nav_height - mainnav_height,
262			navsectionbottom = navsectiontop + $('.section_grouping').outerHeight();
263		
264		if (cur_pos >= navsectiontop && cur_pos <= navsectionbottom) {
265			$('.section_nav_stick').addClass('fixed');
266		} else {
267			$('.section_nav_stick').removeClass('fixed');
268		}  
269	}
270});
271
272$(window).resize(function(){
273	mobileimg();
274	removenbsp();
275	var mainnav_height = $('.mainnav').outerHeight();
276	/* Section navigation functionality */
277	if( $('.section_nav').length ) {
278		var navHeight = $('.section_nav').height();
279		$('.section_nav').height(navHeight);
280	}
281});

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.