window.addEventListener("load",function(){setTimeout(()=>{if(window.location.hash){let t=window.location.hash.substring(1),e=document.getElementById(t);e&&e.scrollIntoView({behavior:"smooth",block:"start"})}},135)}),("ontouchstart"in window||navigator.maxTouchPoints>0)&&window.addEventListener("touchstart",function e(){document.body.classList.add("no-hover"),window.removeEventListener("touchstart",e,!1)},!1),(()=>{let t=document.baseURI,e=document.querySelectorAll("a[href]:not(.eel)"),n=window.location.hostname;for(let o=0,i=e.length;o`;document.querySelectorAll("a[href]").forEach(e=>{const s=e.getAttribute("href");if(e.getAttribute("target")==="_blank"||s.startsWith("#")||s.startsWith("javascript:"))return;const n=document.createElement("div");n.className="link-arrow-container",n.innerHTML=t,e.appendChild(n)}),document.body.addEventListener("click",function(e){const t=e.target.closest("a[href]");if(!t)return;const n=t.getAttribute("href");if(t.getAttribute("target")==="_blank"||n.startsWith("#")||n.startsWith("javascript:"))return;if(e.ctrlKey||e.metaKey||e.shiftKey)return;const s=t.querySelector(".link-arrow-container");if(!s)return;e.preventDefault(),s.classList.add("animate"),setTimeout(()=>{window.location.href=n},100)}),window.addEventListener("pageshow",function(e){e.persisted&&document.querySelectorAll(".link-arrow-container.animate").forEach(e=>{e.classList.remove("animate")})})}),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.quicklink={})}(this,function(e){function a(e){return new Promise(function(t,n,s){(s=new XMLHttpRequest).open("GET",e,s.withCredentials=!0),s.onload=function(){200===s.status?t():n()},s.send()})}var o,l=(o=document.createElement("link")).relList&&o.relList.supports&&o.relList.supports("prefetch")?function(e){return new Promise(function(t,n,s){(s=document.createElement("link")).rel="prefetch",s.href=e,s.onload=t,s.onerror=n,document.head.appendChild(s)})}:a,d=window.requestIdleCallback||function(e){var t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},t=new Set,n=new Set,s=!1;function r(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 i(e,o){var c=r(navigator.connection);return c instanceof Error?Promise.reject(new Error("Cannot prefetch, "+c.message)):(n.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(!t.has(e))return t.add(e),(o?function(e){return window.fetch?fetch(e,{credentials:"include"}):a(e)}:l)(new URL(e,location.href).toString())})))}function c(e){if(c=r(navigator.connection),c instanceof Error)return Promise.reject(new Error("Cannot prerender, "+c.message));if(!HTMLScriptElement.supports("speculationrules"))return i(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 a,c,d,l=0,u=[].concat(e);l0&&!s&&console.warn("[Warning] You are using both prefetching and prerendering on the same document"),d=function(e){var t=document.createElement("script");t.type="speculationrules",t.text='{"prerender":[{"source": "list","urls": ["'+Array.from(e).join('","')+'"]}]}';try{document.head.appendChild(t)}catch(e){return e}return!0}(n),!0===d?Promise.resolve():Promise.reject(d)}e.listen=function(e){if(e||(e={}),window.IntersectionObserver){var r,l=function(e){e=e||1;var t=[],n=0;function s(){n0&&(t.shift()(),n++)}return[function(e){t.push(e)>1||s()},function(){n--,s()}]}(e.throttle||1/0),f=l[0],u=l[1],p=e.limit||1/0,h=e.origins||[location.hostname],g=e.ignores||[],v=e.delay||0,o=[],b=e.timeoutFn||d,a="function"==typeof e.hrefFn&&e.hrefFn,m=e.prerender||!1;return s=e.prerenderAndPrefetch||!1,r=new IntersectionObserver(function(l){l.forEach(function(l){if(l.isIntersecting)o.push((l=l.target).href),function(e,t){t?setTimeout(e,t):e()}(function(){-1!==o.indexOf(l.href)&&(r.unobserve(l),(s||m)&&n.size<1?c(a?a(l):l.href).catch(function(t){if(!e.onError)throw t;e.onError(t)}):t.size-1&&o.splice(d)}})},{threshold:e.threshold||0}),b(function(){(e.el||document).querySelectorAll("a").forEach(function(e){h.length&&!h.includes(e.hostname)||function e(t,n){return Array.isArray(n)?n.some(function(n){return e(t,n)}):(n.test||n).call(n,t.href,t)}(e,g)||r.observe(e)})},{timeout:e.timeout||2e3}),function(){t.clear(),r.disconnect()}}},e.prefetch=i,e.prerender=c}),quicklink.listen({origins:[],ignores:[e=>e.includes("caileb.com")&&e.includes("#"),e=>e.includes("gallery.caileb.com"),e=>e.includes("jellyfin.caileb.com"),e=>e.includes("archive.caileb.com"),e=>e.includes("music.caileb.com"),/\/api\/?/,/^api\./,e=>/\.(zip|tar|7z|rar|js|apk|xapk|woff2|tff|otf|pdf|mp3|mp4|wav|exe|msi|bat|deb|rpm|bin|dmg|iso|csv|log|sql|xml|key|odp|ods|pps|ppt|xls|doc|jpg|jpeg|jpe|jif|jfif|jfi|png|gif|webp|tif|psd|raw|arw|cr2|nrw|k25|bmp|dib|heif|heic|ind|indd|indt|jp2|j2k|jpf|jpx|jpm|mj2|svg|ai|eps)$/i.test(e),e=>/^(http|file|ftp|mailto|tel):/i.test(e)]})