Can you make the following script less redundant and more performant? "!function(){"use strict";var e={d:function(r,n){for(var t in n)e.o(n,t)&&!e.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:n[t]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};function n(e){return new Promise((function(r,n,t){(t=new XMLHttpRequest).open("GET",e,t.withCredentials=!0),t.onload=function(){200===t.status?r():n()},t.send()}))}e.r(r),e.d(r,{listen:function(){return l},prefetch:function(){return f},prerender:function(){return d}});var t,o=(t=document.createElement("link")).relList&&t.relList.supports&&t.relList.supports("preload")?function(e){return new Promise((function(r,n,t){(t=document.createElement("link")).rel="preload",t.href=e,t.onload=r,t.onerror=n,document.head.appendChild(t)}))}:n,i=window.requestIdleCallback||function(e){var r=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-r))}})}),1)},u=new Set,c=new Set,s=!1;function a(e){if(e){if(e.saveData)return new Error("Save-Data is enabled");if(/2g/.test(e.effectiveType))return new Error("network conditions are poor")}return!0}function l(e){if(e||(e={}),window.IntersectionObserver){var r=function(e){e=e||1;var r=[],n=0;function t(){n<e&&r.length>0&&(r.shift()(),n++)}return[function(e){r.push(e)>1||t()},function(){n--,t()}]}(e.throttle||1/0),n=r[0],t=r[1],o=e.limit||1/0,a=e.origins||[location.hostname],l=e.ignores||[],p=e.delay||0,h=[],m=e.timeoutFn||i,w="function"==typeof e.hrefFn&&e.hrefFn,g=e.prerender||!1;s=e.prerenderAndPrefetch||!1;var y=new IntersectionObserver((function(r){r.forEach((function(r){if(r.isIntersecting)h.push((r=r.target).href),function(e,r){r?setTimeout(e,r):e()}((function(){-1!==h.indexOf(r.href)&&(y.unobserve(r),(s||g)&&c.size<1?d(w?w(r):r.href).catch((function(r){if(!e.onError)throw r;e.onError(r)})):u.size<o&&!g&&n((function(){f(w?w(r):r.href,e.priority).then(t).catch((function(r){t(),e.onError&&e.onError(r)}))})))}),p);else{var i=h.indexOf((r=r.target).href);i>-1&&h.splice(i)}}))}),{threshold:e.threshold||0});return m((function(){(e.el||document).querySelectorAll("a").forEach((function(e){a.length&&!a.includes(e.hostname)||function e(r,n){return Array.isArray(n)?n.some((function(n){return e(r,n)})):(n.test||n).call(n,r.href,r)}(e,l)||y.observe(e)}))}),{timeout:e.timeout||2e3}),function(){u.clear(),y.disconnect()}}}function f(e,r,t){var i=a(navigator.connection);return i instanceof Error?Promise.reject(new Error("Cannot prefetch, "+i.message)):(c.size>0&&!s&&console.warn("[Warning] You are using both prefetching and prerendering on the same document"),Promise.all([].concat(e).map((function(e){if(!u.has(e))return u.add(e),(r?function(e){return window.fetch?fetch(e,{credentials:"include"}):n(e)}:o)(new URL(e,location.href).toString())}))))}function d(e,r){var n=a(navigator.connection);if(n instanceof Error)return Promise.reject(new Error("Cannot prerender, "+n.message));if(!HTMLScriptElement.supports("speculationrules"))return f(e),Promise.reject(new Error("This browser does not support the speculation rules API. Falling back to prefetch."));if(document.querySelector('script[type="speculationrules"]'))return Promise.reject(new Error("Speculation Rules is already defined and cannot be altered."));for(var t=0,o=[].concat(e);t<o.length;t+=1){var i=o[t];if(window.location.origin!==new URL(i,window.location.href).origin)return Promise.reject(new Error("Only same origin URLs are allowed: "+i));c.add(i)}u.size>0&&!s&&console.warn("[Warning] You are using both prefetching and prerendering on the same document");var l=function(e){var r=document.createElement("script");r.type="speculationrules",r.text='{"prerender":[{"source": "list","urls": ["'+Array.from(e).join('","')+'"]}]}';try{document.head.appendChild(r)}catch(e){return e}return!0}(c);return!0===l?Promise.resolve():Promise.reject(l)}window.quicklink=r,e.g.addEventListener("load",(()=>{const e=window.quicklinkOptions||{},r={};if("string"==typeof e.el&&e.el&&(r.el=document.querySelector(e.el)),"number"==typeof e.timeout&&(r.timeout=e.timeout),"number"==typeof e.limit&&e.limit>0&&(r.limit=e.limit),"number"==typeof e.throttle&&e.throttle>0&&(r.throttle=e.throttle),"string"==typeof e.timeoutFn&&"requestIdleCallback"!==e.timeoutFn&&"string"===window[e.timeoutFn]){const n=window[e.timeoutFn];r.timeoutFn=function(){return n.apply(window,arguments)}}if("string"==typeof e.onError&&"string"===window[e.onError]){const n=window[e.onError];r.onError=function(){return n.apply(window,arguments)}}"boolean"==typeof e.priority&&(r.priority=e.priority),Array.isArray(e.origins)&&0<e.origins.length&&(r.origins=e.origins),Array.isArray(e.ignores)&&0<e.ignores.length&&(r.ignores=e.ignores.map((e=>new RegExp(e)))),l(r),Array.isArray(e.urls)&&0<e.urls.length&&f(e.urls)}))}();"