PageSourceSearch

https://dominik.page/_astro/Search.astro_astro_type_script_index_0_lang.4QEhbHVH.js

js dominik.page collected 2026-09-24 15:09:51 UTC 2,556 bytes, 1 lines download raw bytes

1const f=function(){const e=typeof document<"u"&&document.createElement("link").relList;return e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}(),w=function(r){return"/"+r},u={},g=function(e,n,a){let c=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),t=s?.nonce||s?.getAttribute("nonce");c=Promise.allSettled(n.map(o=>{if(o=w(o),o in u)return;u[o]=!0;const l=o.endsWith(".css"),h=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${h}`))return;const i=document.createElement("link");if(i.rel=l?"stylesheet":f,l||(i.as="script"),i.crossOrigin="",i.href=o,t&&i.setAttribute("nonce",t),document.head.appendChild(i),l)return new Promise((m,p)=>{i.addEventListener("load",m),i.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${o}`)))})}))}function d(s){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=s,window.dispatchEvent(t),!t.defaultPrevented)throw s}return c.then(s=>{for(const t of s||[])t.status==="rejected"&&d(t.reason);return e().catch(d)})};class y extends HTMLElement{openBtn;closeBtn;dialog;dialogFrame;constructor(){super(),this.openBtn=this.querySelector("button[data-open-modal]"),this.closeBtn=this.querySelector("button[data-close-modal]"),this.dialog=this.querySelector("dialog"),this.dialogFrame=this.querySelector(".dialog-frame"),this.openBtn.addEventListener("click",this.openModal),this.openBtn.disabled=!1,this.closeBtn.addEventListener("click",this.closeModal)}connectedCallback(){window.addEventListener("keydown",this.onWindowKeydown),(window.requestIdleCallback||(n=>setTimeout(n,1)))(async()=>{const{PagefindUI:n}=await g(async()=>{const{PagefindUI:a}=await import("./ui-core.CtO1Py4X.js");return{PagefindUI:a}},[]);new n({element:"#cactus__search",baseUrl:"/",bundlePath:"/".replace(/\/$/,"")+"/pagefind/",showImages:!1,showSubResults:!0})})}disconnectedCallback(){window.removeEventListener("keydown",this.onWindowKeydown)}onWindowClick=e=>{("href"in(e.target||{})||document.body.contains(e.target)&&!this.dialogFrame.contains(e.target))&&this.closeModal()};onWindowKeydown=e=>{e.key==="/"&&!this.dialog.open&&(this.openModal(),e.preventDefault())};openModal=e=>{this.dialog.showModal(),this.querySelector("input")?.focus(),e?.stopPropagation(),window.addEventListener("click",this.onWindowClick)};closeModal=()=>{this.dialog.open&&(this.dialog.close(),window.removeEventListener("click",this.onWindowClick))}}customElements.define("site-search",y);export{g as _};

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.