From c2d72e09747a2a4abe9602e1ba49a1b4649c9d3c Mon Sep 17 00:00:00 2001 From: Jieiku Date: Fri, 14 Aug 2026 15:10:15 -0700 Subject: Update for Zola 0.23.3 --- static/js/search_tinysearch.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static/js/search_tinysearch.min.js') diff --git a/static/js/search_tinysearch.min.js b/static/js/search_tinysearch.min.js index 3ed4113..5abb86a 100644 --- a/static/js/search_tinysearch.min.js +++ b/static/js/search_tinysearch.min.js @@ -1 +1 @@ -window.onload=function(){if(document.body.contains(document.goSearch)){document.goSearch.onsubmit=function(){return goSearchNow()};{function n(){var e=document.querySelector("main"),n=(window.main||(window.main=e.innerHTML),document.getElementById("suggestions")),t=n.cloneNode(!0),o=(t.id="results",document.createElement("div")),r='

'.concat(document.getElementById("searchinput").value,"

");return o.innerHTML=r,t.insertBefore(o,t.firstChild),e.innerHTML=t.outerHTML,n.innerHTML="",document.getElementById("searchinput").value="",document.body.contains(document.closeSearch)&&(document.closeSearch.onsubmit=function(){document.querySelector("main").innerHTML=window.main}),!1}function v(){for(var e=document.getElementById("suggestions");e.firstChild;)e.removeChild(e.firstChild)}function w(){return e=null!==e&&e.buffer===f.memory.buffer?e:new Uint8Array(f.memory.buffer)}async function o(e){var n=document.querySelector("meta[name='base']").getAttribute("content"),n=("/"==n.slice(-1)&&(n=n.slice(0,-1)),void 0===e&&(e=new URL(n+"/tinysearch_engine_bg.wasm")),{wbg:{}}),{instance:e,module:n}=(n.wbg.__wbindgen_json_parse=function(e,n){return e=JSON.parse((e=e,n=n,t.decode(w().subarray(e,e+n)))),h===g.length&&g.push(g.length+1),n=h,h=g[n],g[n]=e,n},await(async(e,n)=>{if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,n)}catch(n){if("application/wasm"==e.headers.get("Content-Type"))throw n}var t=await e.arrayBuffer();return WebAssembly.instantiate(t,n)}return(t=await WebAssembly.instantiate(e,n))instanceof WebAssembly.Instance?{instance:t,module:e}:t})(await(e="string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL?fetch(e):e),n));return f=e.exports,o.__wbindgen_wasm_module=n,f}var a=document.getElementById("searchinput"),r=(document.addEventListener("keydown",function(n){191===n.keyCode&&"INPUT"!==document.activeElement.tagName&&"TEXTAREA"!==document.activeElement.tagName&&(n.preventDefault(),a.focus(),suggestions.classList.remove("d-none")),27===n.keyCode&&(a.blur(),suggestions.classList.add("d-none"),v());var t=suggestions.querySelectorAll("a");if(!suggestions.classList.contains("d-none")&&0!==t.length){var o=[...t],r=o.indexOf(document.activeElement);let e=0;38===n.keyCode?(n.preventDefault(),t[e=0{var e=document.querySelector("meta[name='base']").getAttribute("content");await o((e="/"==e.slice(-1)?e.slice(0,-1):e)+"/tinysearch_engine_bg.wasm")})(),r=!0),document.getElementById("searchinput").onfocus=""};let f,t=(document.getElementById("searchinput").addEventListener("input",function(e){var n=this.value;if(v(),!n)return!1;for(var t,o,r,a=document.getElementById("suggestions"),i=(o=99,t=((t,o,n)=>{if(void 0===n){let e=b.encode(t),n=o(e.length);return w().subarray(n,n+e.length).set(e),y=e.length,n}let r=t.length,a=o(r),i=w(),s=0;for(;s{var n=(e=>g[e])(e);return e<36||(g[e]=h,h=e),n})(f.search(t,r,o))),s=0;s",c=d.querySelector("a"),u=d.querySelector("span:first-child"),l=d.querySelector("span:nth-child(2)"),c.href=m[1]+"?q="+encodeURIComponent(n),u.innerHTML=m[0],l.innerHTML=m[2].replace(RegExp("(^|)("+n+")(|$)","ig"),"$1$2$3"),a.appendChild(d)}}),new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0})),e=(t.decode(),null),g=Array(32).fill(void 0),h=(g.push(void 0,null,!0,!1),g.length),y=0,b=new TextEncoder("utf-8"),p="function"==typeof b.encodeInto?function(e,n){return b.encodeInto(e,n)}:function(e,n){var t=b.encode(e);return n.set(t),{read:e.length,written:t.length}};document.goSearch.onsubmit=n}}}; \ No newline at end of file +window.onload=function(){function m(){var e=document.querySelector("meta[name='base']").getAttribute("content");return(e=e&&"/"==e.slice(-1)?e.slice(0,-1):e)||""}async function e(){var e=m()+"/tinysearch_engine.wasm",n=await fetch(e);if(!n.ok)throw Error("Failed to fetch WASM: "+n.status+" "+n.statusText+" ("+e+")");if(e=await n.arrayBuffer(),n=await WebAssembly.instantiate(e),y=n.instance,g=y.exports.memory,p=y.exports.search,v=y.exports.free_search_result,!p||!v||!g)throw Error("Required WASM exports not found (need search, free_search_result, memory)");w=!0}function n(){var e=document.querySelector("main"),n=(window.main||(window.main=e.innerHTML),document.getElementById("suggestions")),t=n.cloneNode(!0),r=(t.id="results",document.createElement("div")),o='

'.concat(document.getElementById("searchinput").value,"

");return r.innerHTML=o,t.insertBefore(r,t.firstChild),e.innerHTML=t.outerHTML,n.innerHTML="",document.getElementById("searchinput").value="",document.body.contains(document.closeSearch)&&(document.closeSearch.onsubmit=function(){document.querySelector("main").innerHTML=window.main}),!1}function f(){for(;h.firstChild;)h.removeChild(h.firstChild)}var a,h,t,y,g,p,v,w,b,E;document.body.contains(document.goSearch)&&(document.goSearch.onsubmit=function(){return goSearchNow()},a=document.getElementById("searchinput"),h=document.getElementById("suggestions"),document.addEventListener("keydown",function(n){191===n.keyCode&&"INPUT"!==document.activeElement.tagName&&"TEXTAREA"!==document.activeElement.tagName&&(n.preventDefault(),a.focus(),h.classList.remove("d-none")),27===n.keyCode&&(a.blur(),h.classList.add("d-none"),f());var t=h.querySelectorAll("a");if(!h.classList.contains("d-none")&&0!==t.length){var r=[...t],o=r.indexOf(document.activeElement);let e=0;38===n.keyCode?(n.preventDefault(),t[e=0{if(!w||!e)return[];n=n||10;try{var t,r,o=(e=>{var e=b.encode(e+"\0"),n=0;return n=(n=y.exports.__wbindgen_malloc?y.exports.__wbindgen_malloc(e.length):n)||1024,new Uint8Array(g.buffer,n,e.length).set(e),n})(e),a=p(o,n);return(y.exports.__wbindgen_free&&1024{if(!e)return null;for(var n=new Uint8Array(g.buffer),t=0;0!==n[e+t]&&++t<=10485760;);return E.decode(n.subarray(e,e+t))})(a),v(a),t&&Array.isArray(r=JSON.parse(t))?r:[]):[]}catch(e){return[]}})(n,99),r=0;r{if(!e)return"";if("string"==typeof e&&"{"==(e[0]||""))try{var n=JSON.parse(e);return n.meta||n.description||Object.values(n)[0]||""}catch(e){}return e})(c.meta||c.description||"")),u=((i=document.createElement("DIV")).innerHTML="",i.querySelector("a")),s=i.querySelector("span:first-child"),d=i.querySelector("span:nth-child(2)"),l=(n=>{if(!n)return n;var e,t=m();if(!t)return n;try{return"/"==(n[0]||"")?t+n:(e=new URL(n,t),new URL(t).origin+e.pathname+e.search+e.hash)}catch(e){return n}})(a);u.href=l+(~l.indexOf("?")?"&":"?")+"q="+encodeURIComponent(n),s.innerHTML=o||"",d.innerHTML=(u=n,(l=c||"")?(""+l).replace(RegExp("(^|)("+u+")(|$)","ig"),"$1$2$3"):""),h.appendChild(i)}}),document.goSearch.onsubmit=n)}; \ No newline at end of file -- cgit v1.3.1