PageSourceSearch

https://harpercollins.co.uk/cdn/shop/t/9/assets/URLSearchParams.js?v=64431872808599660561597692775

js harpercollins.co.uk collected 2026-09-24 08:34:54 UTC 5,107 bytes, 2 lines download raw bytes

1(function(self){"use strict";var nativeURLSearchParams=(function(){try{if(self.URLSearchParams&&new self.URLSearchParams("foo=bar").get("foo")==="bar")return self.URLSearchParams}catch(e){}return null})(),isSupportObjectConstructor=nativeURLSearchParams&&new nativeURLSearchParams({a:1}).toString()==="a=1",decodesPlusesCorrectly=nativeURLSearchParams&&new nativeURLSearchParams("s=%2B").get("s")==="+",__URLSearchParams__="__URLSearchParams__",encodesAmpersandsCorrectly=nativeURLSearchParams?(function(){var ampersandTest=new nativeURLSearchParams;return ampersandTest.append("s"," &"),ampersandTest.toString()==="s=+%26"})():!0,prototype=URLSearchParamsPolyfill.prototype,iterable=!!(self.Symbol&&self.Symbol.iterator);if(nativeURLSearchParams&&isSupportObjectConstructor&&decodesPlusesCorrectly&&encodesAmpersandsCorrectly)return;function URLSearchParamsPolyfill(search){search=search||"",(search instanceof URLSearchParams||search instanceof URLSearchParamsPolyfill)&&(search=search.toString()),this[__URLSearchParams__]=parseToDict(search)}prototype.append=function(name,value){appendTo(this[__URLSearchParams__],name,value)},prototype.delete=function(name){delete this[__URLSearchParams__][name]},prototype.get=function(name){var dict=this[__URLSearchParams__];return this.has(name)?dict[name][0]:null},prototype.getAll=function(name){var dict=this[__URLSearchParams__];return this.has(name)?dict[name].slice(0):[]},prototype.has=function(name){return hasOwnProperty(this[__URLSearchParams__],name)},prototype.set=function(name,value){this[__URLSearchParams__][name]=[""+value]},prototype.toString=function(){var dict=this[__URLSearchParams__],query=[],i,key,name,value;for(key in dict)for(name=encode(key),i=0,value=dict[key];i<value.length;i++)query.push(name+"="+encode(value[i]));return query.join("&")};var forSureUsePolyfill=!decodesPlusesCorrectly,useProxy=!forSureUsePolyfill&&nativeURLSearchParams&&!isSupportObjectConstructor&&self.Proxy;Object.defineProperty(self,"URLSearchParams",{value:useProxy?new Proxy(nativeURLSearchParams,{construct:function(target,args){return new target(new URLSearchParamsPolyfill(args[0]).toString())}}):URLSearchParamsPolyfill});var USPProto=self.URLSearchParams.prototype;USPProto.polyfill=!0,USPProto.forEach=USPProto.forEach||function(callback,thisArg){var dict=parseToDict(this.toString());Object.getOwnPropertyNames(dict).forEach(function(name){dict[name].forEach(function(value){callback.call(thisArg,value,name,this)},this)},this)},USPProto.sort=USPProto.sort||function(){var dict=parseToDict(this.toString()),keys=[],k,i,j;for(k in dict)keys.push(k);for(keys.sort(),i=0;i<keys.length;i++)this.delete(keys[i]);for(i=0;i<keys.length;i++){var key=keys[i],values=dict[key];for(j=0;j<values.length;j++)this.append(key,values[j])}},USPProto.keys=USPProto.keys||function(){var items=[];return this.forEach(function(item,name){items.push(name)}),makeIterator(items)},USPProto.values=USPProto.values||function(){var items=[];return this.forEach(function(item){items.push(item)}),makeIterator(items)},USPProto.entries=USPProto.entries||function(){var items=[];return this.forEach(function(item,name){items.push([name,item])}),makeIterator(items)},iterable&&(USPProto[self.Symbol.iterator]=USPProto[self.Symbol.iterator]||USPProto.entries);function encode(str){var replace={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(str).replace(/[!'\(\)~]|%20|%00/g,function(match){return replace[match]})}function decode(str){return str.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/ig,function(match){return decodeURIComponent(match)})}function makeIterator(arr){var iterator={next:function(){var value=arr.shift();return{done:value===void 0,value:value}}};return iterable&&(iterator[self.Symbol.iterator]=function(){return iterator}),iterator}function parseToDict(search){var dict={};if(typeof search=="object")if(isArray(search))for(var i=0;i<search.length;i++){var item=search[i];if(isArray(item)&&item.length===2)appendTo(dict,item[0],item[1]);else throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var key in search)search.hasOwnProperty(key)&&appendTo(dict,key,search[key]);else{search.indexOf("?")===0&&(search=search.slice(1));for(var pairs=search.split("&"),j=0;j<pairs.length;j++){var value=pairs[j],index=value.indexOf("=");-1<index?appendTo(dict,decode(value.slice(0,index)),decode(value.slice(index+1))):value&&appendTo(dict,decode(value),"")}}return dict}function appendTo(dict,name,value){var val=typeof value=="string"?value:value!=null&&typeof value.toString=="function"?value.toString():JSON.stringify(value);
1hasOwnProperty(dict,name)?dict[name].push(val):dict[name]=[val]}function isArray(val){return!!val&&Object.prototype.toString.call(val)==="[object Array]"}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}})(typeof global!="undefined"?global:typeof window!="undefined"?window:this);
2//# sourceMappingURL=/cdn/shop/t/9/assets/URLSearchParams.js.map?v=64431872808599660561597692775

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.