1/*! 2 query-string 3 Parse and stringify URL query strings 4 https://github.com/sindresorhus/query-string 5 by Sindre Sorhus 6 MIT License 7 */ 8VRP.queryString = (function () { 9 10 return { 11 "parse": function (str) { 12 if (typeof str !== 'string') { 13 return {}; 14 } 15 16 str = str.trim().replace(/^(\?|#)/, ''); 17 18 if (!str) { 19 return {}; 20 } 21 22 return str.trim().split('&').reduce(function (ret, param) { 23 var parts = param.replace(/\+/g, ' ').split('='); 24 var key = parts[0]; 25 var val = parts[1]; 26 27 key = decodeURIComponent(key); 28 // missing `=` should be `null`: 29 // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters 30 val = val === undefined ? null : decodeURIComponent(val); 31 32 if (!ret.hasOwnProperty(key)) { 33 ret[key] = val; 34 } else if (Array.isArray(ret[key])) { 35 ret[key].push(val); 36 } else { 37 ret[key] = [ret[key], val]; 38 } 39 40 return ret; 41 }, {}); 42 }, 43 "stringify": function (obj) { 44 return obj ? Object.keys(obj).map(function (key) { 45 var val = obj[key]; 46 47 if (Array.isArray(val)) { 48 return val.map(function (val2) { 49 return encodeURIComponent(key) + '=' + encodeURIComponent(val2); 50 }).join('&'); 51 } 52 53 return encodeURIComponent(key) + '=' + encodeURIComponent(val); 54 }).join('&') : ''; 55 }, 56 "formatQueryString": function(newQueryStringParams) { 57 58 var currentParsed = this.parse(location.search); 59 var parsed = this.parse(newQueryStringParams); 60 var combined = Object.assign(currentParsed, parsed); 61 62 return this.stringify(combined); 63 64 } 65 } 66})();
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.