PageSourceSearch

https://ratatoskr.space/assets/index-BKOq_wUT.js

js ratatoskr.space collected 2026-09-25 21:59:37 UTC 6,100 bytes, 1 lines download raw bytes

1(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function o(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();const b="modulepreload",L=function(e){return"/"+e},m={},P=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),i=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));r=Promise.allSettled(n.map(s=>{if(s=L(s),s in m)return;m[s]=!0;const l=s.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${u}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":b,l||(d.as="script"),d.crossOrigin="",d.href=s,i&&d.setAttribute("nonce",i),document.head.appendChild(d),l)return new Promise((E,C)=>{d.addEventListener("load",E),d.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${s}`)))})}))}function a(c){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=c,window.dispatchEvent(i),!i.defaultPrevented)throw c}return r.then(c=>{for(const i of c||[])i.status==="rejected"&&a(i.reason);return t().catch(a)})},f=".pk.ygg",h=64,I=2,p=/^[0-9a-f]{64}$/;function v(e){return e.trim().toLowerCase().replace(/^\[/,"").replace(/\]$/,"")}function S(e){if(!e.includes(":"))return!1;const t=e.split(":")[0];if(!/^[0-9a-f]{1,4}$/.test(t))return!1;const n=Number.parseInt(t,16);return n>=512&&n<=1023}function _(e){if(!e.endsWith(f))return null;const t=e.slice(0,-f.length),n=t.slice(t.lastIndexOf(".")+1);return p.test(n)?n:null}function q(e){if(e.length!==h||!p.test(e))return null;const t=new Uint8Array(h/2);for(let n=0;n<t.length;n+=1)t[n]=Number.parseInt(e.slice(n*2,n*2+2),16);return t}function Y(e){if(e.length!==h/2)return null;const t=new Uint8Array(e.length);for(let s=0;s<e.length;s+=1)t[s]=~e[s]&255;const n=new Uint8Array(16);n[0]=I;let o=0,r=!1,a=0,c=0,i=2;for(let s=0;s<t.length*8&&i<n.length;s+=1){const u=(t[Math.floor(s/8)]&128>>s%8)>>7-s%8;if(!r&&u!==0){o=o+1&255;continue}if(!r){r=!0;continue}a=a<<1|u,c+=1,c===8&&(n[i]=a,i+=1,a=0,c=0)}return n[1]=o,n}function x(e){const t=Array.from({length:8},(i,s)=>e[s*2]<<8|e[s*2+1]);let n=-1,o=0,r=-1;for(let i=0;i<=t.length;i+=1){if(i<t.length&&t[i]===0){r<0&&(r=i);continue}if(r>=0){const s=i-r;s>o&&s>=2&&(n=r,o=s),r=-1}}if(n===0&&o===t.length)return"::";const a=[];for(let i=0;i<t.length;i+=1){if(i===n){a.push(""),i+=o-1;continue}a.push(t[i].toString(16))}let c=a.join(":");return n===0&&(c=`:${c}`),n+o===t.length&&(c=`${c}:`),c}function A(e){const t=v(e);return t.endsWith(f)||S(t)}function H(e){const t=v(e),n=_(t);if(n){const o=q(n),r=o?Y(o):null;return r?x(r):null}return S(t)?t:null}function U(e){const t=H(e);return t?`http://[${t}]/`:null}const w="rt-theme";function $(){const e=document.querySelector("[data-year]");e&&(e.textContent=String(new Date().getFullYear()))}async function B(){try{const e=await fetch("/build-info.json",{cache:"no-cache"});if(!e.ok)return;const t=await e.json(),n=document.querySelector("[data-build-version]");n&&(n.textContent=`v${t.version}`);const o=document.querySelector("[data-build-commit]");o&&(o.textContent=t.commitShort)}catch{}}function g(e){const t=document.documentElement;e==="auto"?t.removeAttribute("data-theme"):t.setAttribute("data-theme",e)}function k(){try{const e=localStorage.getItem(w);if(e==="light"||e==="dark"||e==="auto")return e}catch{}return"auto"}function F(){const e=k();g(e);const t=Array.from(document.querySelectorAll('input[name="rt-theme"]')),n=t.find(o=>o.value===e);n&&(n.checked=!0);for(const o of t)o.addEventListener("change",()=>{if(!o.checked)return;const r=o.value;g(r);try{localStorage.setItem(w,r)}catch{}})}async function O(){try{const e=await fetch("/info",{cache:"no-cache"});return e.ok?await e.json():null}catch{return null}}function T(e){const t=document.querySelector("[data-netbadge]");t&&(e?(t.textContent="Connected via Yggdrasil",t.classList.add("rt-badge--ygg")):(t.textContent="Connected via regular web",t.classList.add("rt-badge--web")))}function y(e,t,n){t.textContent=n,e.hidden=!1,e.setAttribute("aria-label",`Copy ${n}`),e.addEventListener("click",()=>{R(n),e.classList.add("is-copied"),t.textContent="Copied",window.setTimeout(()=>{e.classList.remove("is-copied"),t.textContent=n},1400)})}async function R(e){try{await navigator.clipboard.writeText(e)}catch{}}async function N(e,t){try{const{qrSvg:n}=await P(async()=>{const{qrSvg:r}=await import("./qr-CA7ikJPd.js");return{qrSvg:r}},[]),o=document.createElement("img");o.alt="QR code for the Yggdrasil mesh URL",o.decoding="async",o.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n(t))}`,e.replaceChildren(o),e.hidden=!1}catch{e.hidden=!0}}function K(e,t){const n=document.getElementById("share");if(!n)return;const o=n.querySelector("[data-share-title]"),r=n.querySelector("[data-share-lead]"),a=n.querySelector("[data-copy]"),c=n.querySelector("[data-copy-value]"),i=n.querySelector("[data-qr]"),s=(t==null?void 0:t.ygg_host)??"",l=(t==null?void 0:t.domain)||location.host;if(e){o&&(o.textContent="You're on the Yggdrasil mesh"),r&&(r.textContent="This site is also on the regular web at:"),a&&c&&l&&y(a,c,`https://${l}/`),i&&(i.hidden=!0),n.hidden=!1;return}if(!s){n.hidden=!0;return}const u=U(s);if(!u){n.hidden=!0;return}o&&(o.textContent="Also on the Yggdrasil mesh"),r&&(r.textContent="Open this page from a Yggdrasil-connected browser:"),a&&c&&y(a,c,u),i&&N(i,u),n.hidden=!1}async function j(){const e=A(location.hostname);T(e);const t=await O();K(e,t)}F();$();B();j();

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.