1(function(){"use strict";var t,n,o,i,a,e=document.querySelector("[data-surprise-modal]"),s=document.querySelector("[data-surprise-open]");if(!e||!s)return;a=e.querySelector("[data-surprise-category]"),o=e.querySelector("[data-surprise-go]"),i=e.querySelector("[data-surprise-message]"),t=window.TGE_FEATURE_DATA&&Array.isArray(window.TGE_FEATURE_DATA.surprise)?window.TGE_FEATURE_DATA.surprise:[],t=t.map(function(e){return{title:String(e.title||""),url:String(e.url||""),category:String(e.category||""),categoryLabel:String(e.categoryLabel||"").replace(/&/gi,"&")}}),n={},t.forEach(function(e){e.category&&e.categoryLabel&&(n[e.category]=e.categoryLabel)}),Object.keys(n).sort(function(e,t){return n[e].localeCompare(n[t])}).forEach(function(e){var t=document.createElement("option");t.value=e,t.textContent=n[e],a.appendChild(t)});function c(){e.hidden=!1,document.body.classList.add("has-surprise-modal"),s.setAttribute("aria-expanded","true"),i.textContent="",setTimeout(function(){a.focus()},0)}function r(){e.hidden=!0,document.body.classList.remove("has-surprise-modal"),s.setAttribute("aria-expanded","false"),s.focus()}function l(e){if(e&&(e.preventDefault(),e.stopPropagation()),o.dataset.surpriseOpening==="1")return;o.dataset.surpriseOpening="1",window.setTimeout(function(){delete o.dataset.surpriseOpening},1e3);var n,s,c=a.value,r=c?t.filter(function(e){return e.category===c}):t;if(!r.length){i.textContent="No entries found in that category.";return}if(s=r[Math.floor(Math.random()*r.length)],i.textContent="Opening â"+s.title+"ââ¦",!/^https?:\/\//i.test(s.url)){i.textContent="That entry does not have a valid web link.";return}n=document.createElement("a"),n.href=s.url,n.target="_blank",n.rel="noopener noreferrer",n.style.display="none",document.body.appendChild(n),n.click(),n.remove()}s.addEventListener("click",c),e.querySelectorAll("[data-surprise-close]").forEach(function(e){e.addEventListener("click",r)}),o.addEventListener("click",l),document.addEventListener("keydown",function(t){t.key==="Escape"&&!e.hidden&&r()})})()
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.