diff --git a/dist/components/index.js b/dist/components/index.js index 5148590..7c2a25f 100644 --- a/dist/components/index.js +++ b/dist/components/index.js @@ -464,7 +464,7 @@ function i18n(locale) { var search_default = ".search {\n min-width: fit-content;\n max-width: 14rem;\n}\n\n@media all and (max-width: 800px) {\n .search {\n flex-grow: 0.3;\n }\n}\n.search > .search-button {\n background-color: transparent;\n border: 1px var(--lightgray) solid;\n border-radius: 4px;\n font-family: inherit;\n font-size: inherit;\n height: 2rem;\n padding: 0 1rem 0 0;\n display: flex;\n align-items: center;\n text-align: inherit;\n cursor: pointer;\n white-space: nowrap;\n width: 100%;\n}\n\n.search > .search-button > p {\n display: inline;\n color: var(--gray);\n text-wrap: unset;\n}\n\n.search > .search-button svg {\n cursor: pointer;\n width: 18px;\n min-width: 18px;\n margin: 0 0.5rem;\n}\n\n.search > .search-button svg .search-path {\n stroke: var(--darkgray);\n stroke-width: 1.5px;\n transition: stroke 0.5s ease;\n}\n\n.search > .search-container {\n position: fixed;\n contain: layout;\n z-index: var(--search-z-index, 999);\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n overflow-y: auto;\n display: none;\n backdrop-filter: blur(4px);\n}\n\n.search > .search-container.active {\n display: inline-block;\n}\n\n.search > .search-container > .search-space {\n width: 65%;\n margin-top: 12vh;\n margin-left: auto;\n margin-right: auto;\n}\n\n@media all and not (min-width: 1200px) {\n .search > .search-container > .search-space {\n width: 90%;\n }\n}\n.search > .search-container > .search-space > *:not(.ghost-text):not(.tag-suggestions) {\n width: 100%;\n border-radius: 7px;\n background: var(--light);\n box-shadow: 0 14px 50px rgba(27, 33, 48, 0.12), 0 10px 30px rgba(27, 33, 48, 0.16);\n margin-bottom: 2em;\n}\n\n.search > .search-container > .search-space > input {\n box-sizing: border-box;\n padding: 0.5em 1em;\n font-family: var(--bodyFont);\n color: var(--dark);\n font-size: 1.1em;\n border: 1px solid var(--lightgray);\n}\n\n.search > .search-container > .search-space > input:focus {\n outline: none;\n}\n\n.search > .search-container > .search-space > .search-layout {\n display: none;\n flex-direction: row;\n border: 1px solid var(--lightgray);\n flex: 0 0 100%;\n box-sizing: border-box;\n}\n\n.search > .search-container > .search-space > .search-layout.display-results {\n display: flex;\n}\n\n.search > .search-container > .search-space > .search-layout[data-preview] > .results-container {\n flex: 0 0 min(30%, 450px);\n}\n\n@media all and not (max-width: 800px) {\n .search > .search-container > .search-space > .search-layout[data-preview] .result-card > p.card-description {\n display: none;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > div:first-child {\n border-right: 1px solid var(--lightgray);\n border-top-right-radius: unset;\n border-bottom-right-radius: unset;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > div:last-child {\n border-top-left-radius: unset;\n border-bottom-left-radius: unset;\n }\n}\n.search > .search-container > .search-space > .search-layout > div {\n height: 63vh;\n border-radius: 5px;\n}\n\n@media all and (max-width: 800px) {\n .search > .search-container > .search-space > .search-layout {\n flex-direction: column;\n }\n .search > .search-container > .search-space > .search-layout > .preview-container {\n display: none !important;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > .results-container {\n width: 100%;\n height: auto;\n max-height: 60vh;\n flex: 0 0 100%;\n }\n}\n.search > .search-container > .search-space > .search-layout .highlight {\n background: color-mix(in srgb, var(--tertiary) 60%, rgba(255, 255, 255, 0));\n border-radius: 5px;\n scroll-margin-top: 2rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container {\n flex-grow: 1;\n display: block;\n overflow: hidden;\n font-family: inherit;\n color: var(--dark);\n line-height: 1.5em;\n font-weight: 400;\n overflow-y: auto;\n padding: 0 2rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container .preview-inner {\n margin: 0 auto;\n width: 100%;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container a[role=anchor] {\n background-color: transparent;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container {\n overflow-y: auto;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card {\n overflow: hidden;\n padding: 1em;\n cursor: pointer;\n transition: background 0.2s ease;\n border-bottom: 1px solid var(--lightgray);\n width: 100%;\n display: block;\n box-sizing: border-box;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n text-transform: none;\n text-align: left;\n outline: none;\n font-weight: inherit;\n text-decoration: none;\n color: var(--dark);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card:hover,\n.search > .search-container > .search-space > .search-layout > .results-container .result-card:focus,\n.search > .search-container > .search-space > .search-layout > .results-container .result-card.focus {\n background: var(--lightgray);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > h3 {\n margin: 0;\n color: var(--secondary);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul.tags {\n margin-top: 0.45rem;\n margin-bottom: 0;\n padding: 0;\n list-style: none;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul.tags > li {\n display: inline-block;\n margin-right: 0.3rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul > li > p {\n border-radius: 8px;\n background-color: var(--highlight);\n padding: 0.2rem 0.4rem;\n margin: 0;\n line-height: 1.4rem;\n font-weight: 700;\n color: var(--secondary);\n font-size: 0.85rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul > li > p.match-tag {\n color: var(--tertiary);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > p {\n margin-bottom: 0;\n margin-top: 0.5em;\n font-size: 0.9em;\n color: var(--gray);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card.no-match {\n cursor: default;\n}\n\n.search > .search-container > .search-space {\n position: relative;\n}\n\n.search > .search-container > .search-space > .ghost-text {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n pointer-events: none;\n box-sizing: border-box;\n padding: 0.5em 1em;\n font-family: var(--bodyFont);\n font-size: 1.1em;\n color: var(--gray);\n opacity: 0.6;\n white-space: pre;\n overflow: hidden;\n height: auto;\n line-height: normal;\n border: 1px solid transparent;\n}\n\n.search > .search-container > .search-space > .tag-suggestions {\n position: absolute;\n top: calc(3.1em + 2px);\n left: 0;\n right: 0;\n z-index: calc(var(--search-z-index, 999) + 1);\n background: var(--light);\n border: 1px solid var(--lightgray);\n border-radius: 5px;\n box-shadow: 0 4px 12px rgba(27, 33, 48, 0.1), 0 2px 6px rgba(27, 33, 48, 0.08);\n max-height: 240px;\n overflow-y: auto;\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item {\n padding: 0.4em 1em;\n cursor: pointer;\n font-family: var(--bodyFont);\n font-size: 0.95em;\n color: var(--dark);\n transition: background 0.15s ease;\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item:hover,\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item.active {\n background: var(--lightgray);\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item.active {\n color: var(--secondary);\n font-weight: 600;\n}\n\n.search-scroll-target {\n background: color-mix(in srgb, var(--tertiary) 40%, rgba(255, 255, 255, 0));\n border-radius: 3px;\n padding: 0.1em 0;\n transition: background 1s ease;\n}\n\n.search-scroll-target.fade-out {\n background: transparent;\n}"; // src/components/scripts/search.inline.ts -var search_inline_default = `var Rn=Object.create;var Ne=Object.defineProperty;var Wn=Object.getOwnPropertyDescriptor;var Nn=Object.getOwnPropertyNames;var zn=Object.getPrototypeOf,On=Object.prototype.hasOwnProperty;var $n=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Kn=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Nn(e))!On.call(t,i)&&i!==n&&Ne(t,i,{get:()=>e[i],enumerable:!(r=Wn(e,i))||r.enumerable});return t};var Un=(t,e,n)=>(n=t!=null?Rn(zn(t)):{},Kn(e||!t||!t.__esModule?Ne(n,"default",{value:t,enumerable:!0}):n,t));var fe=$n(()=>{});var C;function O(t,e,n){let r=typeof n,i=typeof t;if(r!=="undefined"){if(i!=="undefined"){if(n){if(i==="function"&&r===i)return function(o){return t(n(o))};if(e=t.constructor,e===n.constructor){if(e===Array)return n.concat(t);if(e===Map){var s=new Map(n);for(var u of t)s.set(u[0],u[1]);return s}if(e===Set){u=new Set(n);for(s of t.values())u.add(s);return u}}}return t}return n}return i==="undefined"?e:t}function Ct(t,e){return typeof t>"u"?e:t}function R(){return Object.create(null)}function U(t){return typeof t=="string"}function Lt(t){return typeof t=="object"}function Mt(t,e){if(U(e))t=t[e];else for(let n=0;t&&n1?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&>(this),this)};C.addMatcher=function(t,e){return typeof t=="object"?this.addReplacer(t,e):t.length<2&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?"|":"")+t,this.J=null,this.cache&>(this),this)};C.addReplacer=function(t,e){return typeof t=="string"?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&>(this),this)};C.encode=function(t,e){if(this.cache&&t.length<=this.H)if(this.F){if(this.B.has(t))return this.B.get(t)}else this.F=setTimeout(gt,50,this);this.normalize&&(typeof this.normalize=="function"?t=this.normalize(t):t=ze?t.normalize("NFKD").replace(ze,"").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&t.length>3&&(t=t.replace(Xn,"$1 $2").replace(Zn,"$1 $2").replace(Jn,"$1 "));let n=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer),r=[],i=R(),s,u,o=this.split||this.split===""?t.split(this.split):[t];for(let c=0,f,h;cthis.maxlength)){if(e){if(i[f])continue;i[f]=1}else{if(s===f)continue;s=f}if(n)r.push(f);else if(!this.filter||(typeof this.filter=="function"?this.filter(f):!this.filter.has(f))){if(this.cache&&f.length<=this.I)if(this.F){var l=this.D.get(f);if(l||l===""){l&&r.push(l);continue}}else this.F=setTimeout(gt,50,this);if(this.stemmer){this.K||(this.K=new RegExp("(?!^)("+this.A+")$"));let g;for(;g!==f&&f.length>2;)g=f,f=f.replace(this.K,a=>this.stemmer.get(a))}if(f&&(this.mapper||this.dedupe&&f.length>1)){l="";for(let g=0,a="",D,p;g1&&(this.J||(this.J=new RegExp("("+this.h+")","g")),f=f.replace(this.J,g=>this.matcher.get(g))),f&&this.replacer)for(l=0;f&&lthis.L&&(this.D.clear(),this.I=this.I/1.1|0)),f){if(f!==h)if(e){if(i[f])continue;i[f]=1}else{if(u===f)continue;u=f}r.push(f)}}}return this.finalize&&(r=this.finalize(r)||r),this.cache&&t.length<=this.H&&(this.B.set(t,r),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),r};function gt(t){t.F=null,t.B.clear(),t.D.clear()}function Fe(t,e,n){n||(e||typeof t!="object"?typeof e=="object"&&(n=e,e=0):n=t),n&&(t=n.query||t,e=n.limit||e);let r=""+(e||0);n&&(r+=(n.offset||0)+!!n.context+!!n.suggest+(n.resolve!==!1)+(n.resolution||this.resolution)+(n.boost||0)),t=(""+t).toLowerCase(),this.cache||(this.cache=new mt);let i=this.cache.get(t+r);if(!i){let s=n&&n.cache;s&&(n.cache=!1),i=this.search(t,e,n),s&&(n.cache=s),this.cache.set(t+r,i)}return i}function mt(t){this.limit=t&&t!==!0?t:1e3,this.cache=new Map,this.h=""}mt.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)};mt.prototype.get=function(t){let e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e};mt.prototype.remove=function(t){for(let e of this.cache){let n=e[0];e[1].includes(t)&&this.cache.delete(n)}};mt.prototype.clear=function(){this.cache.clear(),this.h=""};var Oe={normalize:!1,numeric:!1,dedupe:!1},Ot={},ae=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),$e=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),Ke=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\\1+/g,"$1"],Ue={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,\\u00DF:2,d:3,t:3,l:4,m:5,n:5,r:6},_e={Exact:Oe,Default:Ot,Normalize:Ot,LatinBalance:{mapper:ae},LatinAdvanced:{mapper:ae,matcher:$e,replacer:Ke},LatinExtra:{mapper:ae,replacer:Ke.concat([/(?!^)[aeo]/g,""]),matcher:$e},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let n=0;n=u.length)e-=u.length;else{e=u[r?"splice":"slice"](e,n);let o=e.length;if(o&&(i=i.length?i.concat(e):e,n-=o,r&&(t.length-=o),!n))break;e=0}return i}function xt(t){if(!this||this.constructor!==xt)return new xt(t);this.index=t?[t]:[],this.length=t?t.length:0;let e=this;return new Proxy([],{get(n,r){if(r==="length")return e.length;if(r==="push")return function(i){e.index[e.index.length-1].push(i),e.length++};if(r==="pop")return function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()};if(r==="indexOf")return function(i){let s=0;for(let u=0,o,l;u=0)return s+l;s+=o.length}return-1};if(r==="includes")return function(i){for(let s=0;s32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}V.prototype.get=function(t){let e=this.index[this.B(t)];return e&&e.get(t)};V.prototype.set=function(t,e){var n=this.B(t);let r=this.index[n];r?(n=r.size,r.set(t,e),(n-=r.size)&&this.size++):(this.index[n]=r=new Map([[t,e]]),this.h.push(r),this.size++)};function J(t=8){if(!this||this.constructor!==J)return new J(t);this.index=R(),this.h=[],this.size=0,t>32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}J.prototype.add=function(t){var e=this.B(t);let n=this.index[e];n?(e=n.size,n.add(t),(e-=n.size)&&this.size++):(this.index[e]=n=new Set([t]),this.h.push(n),this.size++)};C=V.prototype;C.has=J.prototype.has=function(t){let e=this.index[this.B(t)];return e&&e.has(t)};C.delete=J.prototype.delete=function(t){let e=this.index[this.B(t)];e&&e.delete(t)&&this.size--};C.clear=J.prototype.clear=function(){this.index=R(),this.h=[],this.size=0};C.values=J.prototype.values=function*(){for(let t=0;t=this.priority*this.priority*3):(ge=setTimeout(Yn,0),Je=Date.now()),Ut){let s=this;return new Promise(u=>{setTimeout(function(){u(s[t+"Async"].apply(s,e))},0)})}let i=this[t].apply(this,e);return n=i.then?i:new Promise(s=>s(i)),r&&n.then(r),n}}var it=0;function dt(t={},e){function n(o){function l(c){c=c.data||c;let f=c.id,h=f&&s.h[f];h&&(h(c.msg),delete s.h[f])}if(this.worker=o,this.h=R(),this.worker)return i?this.worker.on("message",l):this.worker.onmessage=l,t.config?new Promise(function(c){it>1e9&&(it=0),s.h[++it]=function(){c(s)},s.worker.postMessage({id:it,task:"init",factory:r,options:t})}):(this.priority=t.priority||4,this.encoder=e||null,this.worker.postMessage({task:"init",factory:r,options:t}),this)}if(!this||this.constructor!==dt)return new dt(t);let r=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;r&&(r=r.toString());let i=typeof window>"u",s=this,u=Gn(r,i,t.worker);return u.then?u.then(function(o){return n.call(s,o)}):n.call(this,u)}rt("add");rt("append");rt("search");rt("update");rt("remove");rt("clear");rt("export");rt("import");dt.prototype.searchCache=Fe;ye(dt.prototype);function rt(t){dt.prototype[t]=function(){let e=this,n=[].slice.call(arguments);var r=n[n.length-1];let i;return typeof r=="function"&&(i=r,n.pop()),r=new Promise(function(s){t==="export"&&typeof n[0]=="function"&&(n[0]=null),it>1e9&&(it=0),e.h[++it]=s,e.worker.postMessage({task:t,id:it,args:n})}),i?(r.then(i),this):r}}function Gn(t,e,n){return e?typeof module<"u"?new(fe()).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>Un(fe(),1)).then(function(r){return new r.Worker(import.meta.dirname+"/node/node.mjs")}):t?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Qn.toString()],{type:"text/javascript"}))):new window.Worker(typeof n=="string"?n:import.meta.url.replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js").replace("flexsearch.bundle.module.min.mjs","module/worker/worker.js"),{type:"module"})}Dt.prototype.add=function(t,e,n){if(Lt(t)&&(e=t,t=Mt(e,this.key)),e&&(t||t===0)){if(!n&&this.reg.has(t))return this.update(t,e);for(let o=0,l;oe?t.slice(n,n+e):t,r?wt.call(this,t):t;let i=[];for(let s=0,u,o;s=o){n-=o;continue}u=u.slice(n,n+e),o=u.length,n=0}if(o>e&&(u=u.slice(0,e),o=e),!i.length&&o>=e)return r?wt.call(this,u):u;if(i.push(u),e-=o,!e)break}return i=i.length>1?[].concat.apply([],i):i[0],r?wt.call(this,i):i}function Gt(t,e,n,r){var i=r[0];if(i[0]&&i[0].query)return t[e].apply(t,i);if(!(e!=="and"&&e!=="not"||t.result.length||t.await||i.suggest))return r.length>1&&(i=r[r.length-1]),(r=i.resolve)?t.await||t.result:t;let s=[],u=0,o=0,l,c,f,h,g;for(e=0;e1&&(n=n[e].apply(n,t.slice(1))),n}j.prototype.or=function(){return Gt(this,"or",qn,arguments)};function qn(t,e,n,r,i,s,u){return t.length&&(this.result.length&&t.push(this.result),t.length<2?this.result=t[0]:(this.result=en(t,e,n,!1,this.h),n=0)),i&&(this.await=null),i?this.resolve(e,n,r,u):this}j.prototype.and=function(){return Gt(this,"and",ti,arguments)};function ti(t,e,n,r,i,s,u){if(!s&&!this.result.length)return i?this.result:this;let o;if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{let l=0;for(let c=0,f,h;c1?y.join(" "):y[0];let w;if(y&&B){for(var v=B.length,M=(Q.split?B.replace(Q.split,""):B).length-y.length,T="",W=0,z=0;z-1&&(T=(N?B.substring(0,N):"")+u+B.substring(N,N+P)+o+(N+P=l)break}if(b=ht.length*(s.length-2),a||D||l&&d.length-b>l)if(b=l+b-g*2,k=x-A,a>0&&(k+=a),D>0&&(k+=D),k<=b)F=a?A-(a>0?a:0):A-((b-k)/2|0),m=D?x+(D>0?D:0):F+b,c||(F>0&&d.charAt(F)!==" "&&d.charAt(F-1)!==" "&&(F=d.indexOf(" ",F),F<0&&(F=0)),m=m.length-1){if(I>=m.length){k[w+1]=1,I>=F.length&&(b[w+1]=1);continue}v-=g}if(d=m[I].text,P=D&&y[w])if(P>0){if(d.length>P)if(k[w+1]=1,c)d=d.substring(0,P);else continue;(P-=d.length)||(P=-1),y[w]=P}else{k[w+1]=1;continue}if(v+d.length+1<=l)d=" "+d,x[w]+=d;else if(c)$=l-v-1,$>0&&(d=" "+d.substring(0,$),x[w]+=d),k[w+1]=1;else{k[w+1]=1;continue}}else{if(k[w])continue;if(I-=M,A[I]){v-=g,k[w]=1,b[w]=1;continue}if(I<=0){if(I<0){k[w]=1,b[w]=1;continue}v-=g}if(d=m[I].text,P=a&&B[w])if(P>0){if(d.length>P)if(k[w]=1,c)d=d.substring(d.length-P);else continue;(P-=d.length)||(P=-1),B[w]=P}else{k[w]=1;continue}if(v+d.length+1<=l)d+=" ",x[w]=d+x[w];else if(c)$=d.length+1-(l-v),$>=0&&$=F.length-1||I1?en(l,n,r,u,s):(l=l[0])&&n&&l.length>n||r?l.slice(r,n+r):l;else{if(tn||r)&&(l=l.slice(r,n+r));else{i=[];for(let h=0,g;hr)r-=g.length;else if((n&&g.length>n||r)&&(g=g.slice(r,n+r),n-=g.length,r&&(r-=g.length)),i.push(g),!n)break}l=i}}return l}function en(t,e,n,r,i){let s=[],u=R(),o;var l=t.length;let c;if(r){for(i=l-1;i>=0;i--)if(c=(r=t[i])&&r.length){for(l=0;l=0;f--){h=t[f];for(let a=0;a1?Jt(i,1,0,0,l,c):i[0],B)})}return a?i:new j(i.length>1?Jt(i,1,0,0,l,c):i[0],this)}}a||u||!(h=h||this.field)||(U(h)?u=h:(h.constructor===Array&&h.length===1&&(h=h[0]),u=h.field||h.index)),h&&h.constructor!==Array&&(h=[h])}h||(h=this.field);let b;m=(this.worker||this.db)&&!r&&[];for(let B=0,y,v,M;B"u"&&(this.db?m.push(p=this.index.get(this.field[0]).db.enrich(p)):p=wt.call(this,p)),u)return a?D?Vt(t,p,this.index,u,D):p:new j(p,this);i[F]={field:s[F],result:p}}if(d&&this.db&&m.length){let B=this;return Promise.all(m).then(function(y){for(let v=0;v0&&((n&&e>n||r)&&(t=t.slice(r,r+n)),i&&(t=wt.call(this,t))),t):[]):[]}function wt(t){if(!this||!this.store)return t;if(this.db)return this.index.get(this.field[0]).db.enrich(t);let e=Array(t.length);for(let n=0,r;n1?n:n[0]}C.append=function(t,e){return this.add(t,e,!0)};C.update=function(t,e){return this.remove(t).add(t,e)};C.remove=function(t){Lt(t)&&(t=Mt(t,this.key));for(var e of this.index.values())e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let r of n){e=r[0];let i=r[1],s=i.indexOf(t);s>-1&&(i.length>1?i.splice(s,1):n.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this};C.clear=function(){let t=[];for(let e of this.index.values()){let n=e.clear();n.then&&t.push(n)}if(this.tag)for(let e of this.tag.values())e.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this};C.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)};C.cleanup=function(){for(let t of this.index.values())t.cleanup();return this};C.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then(function(e){return e[0]&&e[0].doc||null}):this.store.get(t)||null};C.set=function(t,e){return typeof t=="object"&&(e=t,t=Mt(e,this.key)),this.store.set(t,e),this};C.searchCache=Fe;C.export=ui;C.import=oi;ye(Dt.prototype);function Ae(t,e=0){let n=[],r=[];e&&(e=25e4/e*5e3|0);for(let i of t.entries())r.push(i),r.length===e&&(n.push(r),r=[]);return r.length&&n.push(r),n}function we(t,e){e||(e=new Map);for(let n=0,r;n2?n[0]:"";if(n=n.length>2?n[2]:n[1],this.worker&&r)return this.index.get(r).import(t);if(e){if(typeof e=="string"&&(e=JSON.parse(e)),r)return this.index.get(r).import(n,e);switch(n){case"reg":this.fastupdate=!1,this.reg=un(e,this.reg);for(let i=0,s;i=0&&i.splice(u,1)}}else jt(this.map,t),this.depth&&jt(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.M&&on(this)),this.cache&&this.cache.remove(t),this};function jt(t,e){let n=0;var r=typeof e>"u";if(t.constructor===Array){for(let i=0,s,u,o;i=0){if(s.length>1)return s.splice(u,1),1;if(delete t[i],n)return 1;o=1}else{if(o)return 1;n++}}}else for(let i of t.entries())r=i[0],jt(i[1],e)?n++:t.delete(r);return n}var li={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};X.prototype.add=function(t,e,n,r){if(e&&(t||t===0)){if(!r&&!n&&this.reg.has(t))return this.update(t,e);r=this.depth,e=this.encoder.encode(e,!r);let c=e.length;if(c){let f=R(),h=R(),g=this.resolution;for(let a=0;a2){for(let p=1,d,F,m,A;p2){for(let p=0,d;pp;s--){u=D.substring(p,s),d=this.rtl?i-1-p:p;var o=this.score?this.score(e,D,a,u,d):Kt(g,c,a,i,d);G(this,h,u,o,t,n)}break}case"bidirectional":case"reverse":if(i>1){for(o=i-1;o>0;o--){u=D[this.rtl?i-1-o:o]+u;var l=this.score?this.score(e,D,a,u,o):Kt(g,c,a,i,o);G(this,h,u,l,t,n)}u=""}case"forward":if(i>1){for(o=0;o1&&au;let p=this.score?this.score(e,u,a,D,o-1):Kt(i+(c/2>i?0:1),c,a,s-1,o-1);G(this,f,l?u:D,p,t,n,l?D:u)}}}}this.fastupdate||this.reg.add(t)}}return this.db&&(this.commit_task.push(n?{ins:t}:{del:t}),this.M&&on(this)),this};function G(t,e,n,r,i,s,u){let o,l;if(!(o=e[n])||u&&!o[u]){if(u?(e=o||(e[n]=R()),e[u]=1,l=t.ctx,(o=l.get(u))?l=o:l.set(u,l=t.keystore?new V(t.keystore):new Map)):(l=t.map,e[n]=1),(o=l.get(n))?l=o:l.set(n,l=o=[]),s){for(let c=0,f;c1?e+(r||0)<=t?n+(i||0):(t-1)/(e+(r||0))*(n+(i||0))+1|0:0}X.prototype.search=function(t,e,n){if(n||(e||typeof t!="object"?typeof e=="object"&&(n=e,e=0):(n=t,t="")),n&&n.cache)return n.cache=!1,t=this.searchCache(t,e,n),n.cache=!0,t;let r=[],i,s,u,o=0,l,c,f,h,g;n&&(t=n.query||t,e=n.limit||e,o=n.offset||0,s=n.context,u=n.suggest,g=(l=n.resolve)&&n.enrich,f=n.boost,h=n.resolution,c=this.db&&n.tag),typeof l>"u"&&(l=this.resolve),s=this.depth&&s!==!1;let a=this.encoder.encode(t,!s);if(i=a.length,e=e||(l?100:0),i===1)return Ye.call(this,a[0],"",e,o,l,g,c);if(i===2&&s&&!u)return Ye.call(this,a[1],a[0],e,o,l,g,c);let D=R(),p=0,d;if(s&&(d=a[0],p=1),h||h===0||(h=d?this.N:this.resolution),this.db){if(this.db.search&&(n=this.db.search(this,a,e,o,u,l,g,c),n!==!1))return n;let F=this;return(async function(){for(let m,A;p1)l=Jt(t,e,n,r,i,s,u);else if(o===1)return u?Ce.call(null,t[0],n,r):new j(t[0],this);return u?l:new j(l,this)}function Ye(t,e,n,r,i,s,u){return t=me(this,t,e,n,r,i,s,u),this.db?t.then(function(o){return i?o||[]:new j(o,this)}):t&&t.length?i?Ce.call(this,t,n,r):new j(t,this):i?[]:new j([],this)}function Ge(t,e,n,r){let i=[];if(t&&t.length){if(t.length<=r){e.push(t);return}for(let s=0,u;sn)&&(l=n,n=e,e=l),t.db?t.db.get(e,n,r,i,s,u,o):(t=n?(t=t.ctx.get(n))&&t.get(e):t.map.get(e),t)}function X(t,e){if(!this||this.constructor!==X)return new X(t);if(t){var n=U(t)?t:t.preset;n&&(t=Object.assign({},li[n],t))}else t={};n=t.context;let r=n===!0?{depth:1}:n||{},i=U(t.encoder)?_e[t.encoder]:t.encode||t.encoder||{};this.encoder=i.encode?i:typeof i=="object"?new vt(i):{encode:i},this.resolution=t.resolution||9,this.tokenize=n=(n=t.tokenize)&&n!=="default"&&n!=="exact"&&n||"strict",this.depth=n==="strict"&&r.depth||0,this.bidirectional=r.bidirectional!==!1,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(n=t.keystore||0)&&(this.keystore=n),this.map=n?new V(n):new Map,this.ctx=n?new V(n):new Map,this.reg=e||(this.fastupdate?n?new V(n):new Map:n?new J(n):new Set),this.N=r.resolution||3,this.rtl=i.rtl||t.rtl||!1,this.cache=(n=t.cache||null)&&new mt(n),this.resolve=t.resolve!==!1,(n=t.db)&&(this.db=this.mount(n)),this.M=t.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}C=X.prototype;C.mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)};C.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)};C.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function on(t){t.commit_timer||(t.commit_timer=setTimeout(function(){t.commit_timer=null,t.db.commit(t)},1))}C.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db?(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[],this.db.clear()):this};C.append=function(t,e){return this.add(t,e,!0)};C.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)};C.update=function(t,e){let n=this,r=this.remove(t);return r&&r.then?r.then(()=>n.add(t,e)):this.add(t,e)};C.cleanup=function(){return this.fastupdate?(jt(this.map),this.depth&&jt(this.ctx),this):this};C.searchCache=Fe;C.export=function(t,e,n=0,r=0){let i,s;switch(r){case 0:i="reg",s=sn(this.reg);break;case 1:i="cfg",s=null;break;case 2:i="map",s=Ae(this.map,this.reg.size);break;case 3:i="ctx",s=nn(this.ctx,this.reg.size);break;default:return}return Zt.call(this,t,e,i,s,n,r)};C.import=function(t,e){if(e)switch(typeof e=="string"&&(e=JSON.parse(e)),t=t.split("."),t[t.length-1]==="json"&&t.pop(),t.length===3&&t.shift(),t=t.length>1?t[1]:t[0],t){case"reg":this.fastupdate=!1,this.reg=un(e,this.reg);break;case"map":this.map=we(e,this.map);break;case"ctx":this.ctx=rn(e,this.ctx)}};C.serialize=function(t=!0){let e="",n="",r="";if(this.reg.size){let s;for(var i of this.reg.keys())s||(s=typeof i),e+=(e?",":"")+(s==="string"?'"'+i+'"':i);e="index.reg=new Set(["+e+"]);",n=Ze(this.map,s),n="index.map=new Map(["+n+"]);";for(let u of this.ctx.entries()){i=u[0];let o=Ze(u[1],s);o="new Map(["+o+"])",o='["'+i+'",'+o+"]",r+=(r?",":"")+o}r="index.ctx=new Map(["+r+"]);"}return t?"function inject(index){"+e+n+r+"}":e+n+r};ye(X.prototype);var ln=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Qt=["map","ctx","tag","reg","cfg"],pt=R();function Yt(t,e={}){if(!this||this.constructor!==Yt)return new Yt(t,e);typeof t=="object"&&(e=t,t=t.name),t||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(t?":"+t.toLowerCase().replace(/[^a-z0-9_\\-]/g,""):""),this.field=e.field?e.field.toLowerCase().replace(/[^a-z0-9_\\-]/g,""):"",this.type=e.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}C=Yt.prototype;C.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())};C.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),pt[t.id]||(pt[t.id]=[]),pt[t.id].push(t.field);let e=ln.open(t.id,1);return e.onupgradeneeded=function(){let n=t.db=this.result;for(let r=0,i;r=f.length){r-=f.length;continue}let h=n?r+Math.min(f.length-r,n):f.length;for(let g=r;g=s.length?[]:!e&&!n?s:(s=s.slice(n,n+e),r?i.enrich(s):s)})};C.enrich=function(t){typeof t!="object"&&(t=[t]);let e=this.db.transaction("reg","readonly").objectStore("reg"),n=[];for(let r=0;r=0)if(i=1,o.length>1)o.splice(c,1);else{r[u]=[];break}s+=o.length}if(n)break}s?i&&t.update(r):t.delete(),t.continue()}C.remove=function(t){return typeof t!="object"&&(t=[t]),Promise.all([this.transaction("map","readwrite",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction("ctx","readwrite",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction("tag","readwrite",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t,!0)}}),this.transaction("reg","readwrite",function(e){for(let n=0;n{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,n(this.result)},t.onerror=t.onblocked=r,t=null})}var hn={Index:X,Charset:_e,Encoder:vt,Document:Dt,Worker:dt,Resolver:j,IndexedDB:Yt,Language:{}};var Ni=Object.hasOwnProperty;var gn,H,dn,hi,ut,cn,Dn,mn,ve,te,It,Fn,Te,Be,ke,ci,_n={},ne=[],fi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,re=Array.isArray;function q(t,e){for(var n in e)t[n]=e[n];return t}function Se(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function xe(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++dn,__i:-1,__u:0};return i==null&&H.vnode!=null&&H.vnode(s),s}function kt(t){return t.children}function ee(t,e){this.props=t,this.context=e}function Bt(t,e){if(e==null)return t.__?Bt(t.__,t.__i+1):null;for(var n;ee&&ut.sort(mn),t=ut.shift(),e=ut.length,ai(t)}finally{ut.length=ie.__r=0}}function Cn(t,e,n,r,i,s,u,o,l,c,f){var h,g,a,D,p,d,F,m=r&&r.__k||ne,A=e.length;for(l=pi(n,e,m,l,A),h=0;h0?u=t.__k[s]=xe(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):t.__k[s]=u,l=s+g,u.__=t,u.__b=t.__b+1,o=null,(c=u.__i=gi(u,n,l,h))!=-1&&(h--,(o=n[c])&&(o.__u|=2)),o==null||o.__v==null?(c==-1&&(i>f?g--:il?g--:g++,u.__u|=4))):t.__k[s]=null;if(h)for(s=0;s(f?1:0)){for(i=n-1,s=n+1;i>=0||s=0?i--:s++])!=null&&(2&c.__u)==0&&o==c.key&&l==c.type)return u}return-1}function an(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||fi.test(e)?n:n+"px"}function qt(t,e,n,r,i){var s,u;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||an(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||an(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(Fn,"$1")),u=e.toLowerCase(),e=u in t||e=="onFocusOut"||e=="onFocusIn"?u.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n[It]=r[It]:(n[It]=Te,t.addEventListener(e,s?ke:Be,s)):t.removeEventListener(e,s?ke:Be,s);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function pn(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[te]==null)e[te]=Te++;else if(e[te]0?t:re(t)?t.map(wn):q({},t)}function Di(t,e,n,r,i,s,u,o,l){var c,f,h,g,a,D,p,d=n.props||_n,F=e.props,m=e.type;if(m=="svg"?i="http://www.w3.org/2000/svg":m=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c"u"?"":document.body?.dataset?.basepath??""}function Me(t,e){let n=e??_i(),r=t.startsWith("/")?t:"/"+t;return n+r}function tt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function xn(t,e){if(!t)return()=>{};let n=i=>{t.classList.contains("active")&&i.target===t&&(i.preventDefault(),i.stopPropagation(),e())},r=i=>{t.classList.contains("active")&&i.key==="Escape"&&(i.preventDefault(),e())};return t.addEventListener("click",n),document.addEventListener("keydown",r),()=>{t.removeEventListener("click",n),document.removeEventListener("keydown",r)}}function Bn(t,e){let n=t.querySelectorAll("[src], [href]");for(let r of Array.from(n)){let i=r.hasAttribute("href")?"href":"src",s=r.getAttribute(i);if(s&&!(s.startsWith("http://")||s.startsWith("https://")||s.startsWith("mailto:")||s.startsWith("tel:")||s.startsWith("#")||s.startsWith("/")||s.startsWith("data:")))try{let u=new URL(s,e).toString();r.setAttribute(i,u)}catch{continue}}}function se(t){return t.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}var je="basic",bt="",kn=8,yi=5,ue=30,Ci=t=>{let e=[],n=-1,r=-1,i=t.toLowerCase(),s=0;for(let u of i){let o=u.codePointAt(0);o>=12352&&o<=12447||o>=12448&&o<=12543||o>=19968&&o<=40959||o>=44032&&o<=55215||o>=131072&&o<=173791?(n!==-1&&(e.push(i.slice(n,r)),n=-1),e.push(u)):o===32||o===9||o===10||o===13?n!==-1&&(e.push(i.slice(n,r)),n=-1):(n===-1&&(n=s),r=s+1),s+=u.length}return n!==-1&&e.push(i.slice(n)),e},le=new hn.Document({encode:Ci,document:{id:"id",tag:"tags",index:[{field:"title",tokenize:"forward"},{field:"content",tokenize:"forward"},{field:"tags",tokenize:"forward"}]}}),Z=null,Ht=[],Pt=[],Ie=new Map;function oe(t){let e=t.split(/\\s+/),n=[],r=[];for(let i of e)i.startsWith("#")&&i.length>1?n.push(i.substring(1)):i!=="#"&&r.push(i);return{tags:n,query:r.join(" ").trim()}}function bn(t){let e=t.split(/\\s+/),n=e[e.length-1];return n&&n.startsWith("#")?n.substring(1):null}var Sn=new DOMParser;async function Ei(t){if(Ie.has(t))return Ie.get(t);let e=new URL(Me(t),window.location.origin).toString();try{let n=await fetch(e);if(!n.ok)return[];let r=await n.text(),i=Sn.parseFromString(r??"","text/html");Bn(i,e);let s=Array.from(i.getElementsByClassName("popover-hint"));return Ie.set(t,s),s}catch{return[]}}var He=[];function Ft(t){He.push(t)}function Ai(){He.forEach(t=>t()),He.length=0}async function wi(){let t=document.querySelectorAll(".search");for(let e of Array.from(t)){let n=e.querySelector(".search-container"),r=e.querySelector(".search-button"),i=e.querySelector(".search-bar"),s=e.querySelector(".search-layout");if(!n||!r||!i||!s)continue;let u=n.closest(".sidebar"),o=s.getAttribute("data-preview")==="true",l=s.getAttribute("data-field-priority"),c=l?JSON.parse(l):["title","content","tags"],f=s.querySelector(".results-container");f||(f=document.createElement("div"),f.className="results-container",f.setAttribute("role","listbox"),f.setAttribute("aria-label","Search results"),s.appendChild(f));let h=s.querySelector(".preview-container");o&&!h&&(h=document.createElement("div"),h.className="preview-container",s.appendChild(h));let g=document.createElement("div");g.className="tag-suggestions",g.setAttribute("role","listbox"),g.setAttribute("aria-label","Tag suggestions"),g.style.display="none";let a=i.parentElement;a.insertBefore(g,i.nextSibling);let D=document.createElement("span");D.className="ghost-text",D.setAttribute("aria-hidden","true"),a.insertBefore(D,i.nextSibling);let p=-1,d=[],F=!1,m=_=>{if(p<0||p>=d.length){D.textContent="";return}let E=d[p];if(!E.toLowerCase().startsWith(_.toLowerCase())){D.textContent="";return}let L=E.substring(_.length);D.innerHTML="";let S=document.createElement("span");S.style.visibility="hidden",S.textContent=i.value,D.appendChild(S),D.appendChild(document.createTextNode(L))},A=()=>{g.querySelectorAll(".tag-suggestion-item").forEach((L,S)=>{L.classList.toggle("active",S===p)});let E=bn(i.value)||"";m(E)},x=()=>{F=!1,p=-1,d=[],g.style.display="none",D.textContent=""},b=_=>{let E=i.value,L=E.lastIndexOf("#");L!==-1&&(i.value=E.substring(0,L)+"#"+_+" "),x(),i.focus(),i.dispatchEvent(new Event("input"))},k=_=>{if(Rt){if(d=_===""?Pt.slice(0,10):Pt.filter(E=>E.toLowerCase().startsWith(_.toLowerCase())).slice(0,10),d.length===0){x();return}p=0,F=!0,tt(g);for(let E=0;E!F||d.length===0?!1:(_==="down"?p=Math.min(p+1,d.length-1):p=Math.max(p-1,0),A(),!0),y=null,v=0,M=null,T=()=>{n.classList.remove("active"),u&&(u.style.zIndex=""),r.setAttribute("aria-expanded","false"),i.value="",tt(f),h&&tt(h),s.classList.remove("display-results"),je="basic",y=null,x(),r.focus()},W=_=>{je=_,u&&(u.style.zIndex="9999"),n.classList.add("active"),r.setAttribute("aria-expanded","true"),i.focus()},z=async _=>{if(tt(f),_.length===0){let E=document.createElement("a");E.className="result-card no-match";let L=document.createElement("h3");L.textContent="No results.";let S=document.createElement("p");S.textContent="Try another search term?",E.appendChild(L),E.appendChild(S),f.appendChild(E),y=null,h&&tt(h)}else for(let E of _){let L=document.createElement("a");L.className="result-card",L.id=E.slug,L.href=Me(E.slug);let S=document.createElement("h3");if(S.className="card-title",S.innerHTML=E.title,L.appendChild(S),E.tags.length>0){let K=document.createElement("ul");K.className="tags",K.innerHTML=E.tags.join(""),L.appendChild(K)}let Y=document.createElement("p");Y.className="card-description",Y.innerHTML=E.content,L.appendChild(Y),f.appendChild(L)}},N=()=>Array.from(f.querySelectorAll(".result-card:not(.no-match)")),P=()=>{let _=oe(bt);return _.query||(_.tags.length>0?_.tags.join(" "):bt)},$=async _=>{if(!h||(tt(h),!_))return;let E=_.id,L=++v,S=await Ei(E);if(L!==v)return;let Y=P(),K=document.createElement("div");K.className="preview-inner";for(let ct of S){let yt=ct.cloneNode(!0);Y.trim()!==""&&(yt.innerHTML=vi(Y,yt)),K.appendChild(yt)}h.appendChild(K),requestAnimationFrame(()=>{let ct=Array.from(h.getElementsByClassName("highlight"));if(ct.length===0)return;ct.sort((he,ce)=>ce.innerHTML.length-he.innerHTML.length);let yt=ct[0],Nt=0,ft=yt;for(;ft&&ft!==h;)Nt+=ft.offsetTop,ft=ft.offsetParent;h.scrollTop=Math.max(0,Nt-50)})},et=_=>{y&&y.classList.remove("focus"),y=_,y&&(y.classList.add("focus"),y.scrollIntoView({block:"nearest"})),M&&clearTimeout(M),M=setTimeout(()=>$(y),150)},Q=_=>{let E=N();if(E.length===0){et(null);return}let L=Math.min(Math.max(_,0),E.length-1);et(E[L]??null)},Wt=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):-1;Q(E+1)},ot=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):_.length;Q(E-1)},nt=async _=>{let E=_.target.value;bt=E;let L=bn(E);L!==null?k(L):x();let S=oe(E),Y=S.query!==""||S.tags.length>0;if(s.classList.toggle("display-results",Y),je=S.tags.length>0&&!S.query?"tags":"basic",!Y){tt(f),h&&tt(h),y=null;return}let K;S.query?K=await le.searchAsync({query:S.query,limit:S.tags.length>0?1e4:kn,index:["title","content"]}):S.tags.length>0?K=await le.searchAsync({query:S.tags[0],limit:1e4,index:["tags"]}):K=[];let ct=at=>{let Tt=K.filter(zt=>zt.field===at);return Tt.length===0?[]:[...Tt[0].result]},Nt=[...new Set(c.flatMap(at=>ct(at)))].filter(at=>{if(S.tags.length===0)return!0;let Tt=Ht[at];if(!Tt)return!1;let zt=Z?.[Tt];if(!zt)return!1;let In=zt.tags||[];return S.tags.every(Hn=>In.some(Pn=>Pn.toLowerCase()===Hn.toLowerCase()))}),ft=S.query||(S.tags.length>0?S.tags.join(" "):E),he=Nt.map(at=>Bi(ft,at));await z(he.slice(0,kn));let ce=N();et(ce[0]??null)},lt=_=>{_.stopPropagation(),W("basic")};r.addEventListener("click",lt),Ft(()=>r.removeEventListener("click",lt)),i.addEventListener("input",nt),Ft(()=>i.removeEventListener("input",nt));let ht=_=>{if(F){if(_.key==="ArrowDown"){_.preventDefault(),B("down");return}if(_.key==="ArrowUp"){_.preventDefault(),B("up");return}if(_.key==="Tab"){_.preventDefault(),p>=0&&p=0&&pi.removeEventListener("keydown",ht));let w=_=>{_.key==="k"&&(_.ctrlKey||_.metaKey)&&!_.shiftKey?(_.preventDefault(),n.classList.contains("active")?T():W("basic")):_.shiftKey&&(_.ctrlKey||_.metaKey)&&_.key.toLowerCase()==="k"&&(_.preventDefault(),W("tags"),i.value="#",i.dispatchEvent(new Event("input")))};document.addEventListener("keydown",w),Ft(()=>document.removeEventListener("keydown",w));let I=()=>{let _=oe(bt),E=_.query||(_.tags.length>0?_.tags.join(" "):bt);E.trim()&&sessionStorage.setItem("search-term",E.trim())},_t=_=>{let E=_.target.closest(".result-card");!E||E.classList.contains("no-match")||_ instanceof MouseEvent&&(_.altKey||_.ctrlKey||_.metaKey||_.shiftKey)||(I(),T())},Pe=_=>{let E=_.target.closest(".result-card");!E||E.classList.contains("no-match")||et(E)};f.addEventListener("click",_t),f.addEventListener("mouseover",Pe),Ft(()=>{f.removeEventListener("click",_t),f.removeEventListener("mouseover",Pe)});let Re=_=>{let E=_.target.closest(".tag-suggestion-item");if(!E)return;let L=E.getAttribute("data-tag");L&&b(L)},We=_=>{let E=_.target.closest(".tag-suggestion-item");if(!E)return;let L=E.getAttribute("data-index");L!==null&&(p=parseInt(L,10),A())};g.addEventListener("click",Re),g.addEventListener("mouseover",We),Ft(()=>{g.removeEventListener("click",Re),g.removeEventListener("mouseover",We)});let jn=xn(n,T);Ft(jn)}}function Ln(t){let e=t.split(/\\s+/).filter(r=>r.trim()!==""),n=e.length;if(n>1)for(let r=1;ri.length-r.length)}function vi(t,e){let n=Ln(t).filter(c=>c.trim()!=="");if(n.length===0)return e.innerHTML;let r=Sn.parseFromString(e.innerHTML,"text/html"),i=n.map(c=>c.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")).join("|");if(i==="")return e.innerHTML;let s=new RegExp(i,"gi"),u=r.createTreeWalker(r.body,NodeFilter.SHOW_TEXT),o=[],l=u.nextNode();for(;l;)o.push(l),l=u.nextNode();for(let c of o){let f=c.nodeValue??"";if(s.lastIndex=0,!s.test(f))continue;s.lastIndex=0;let h=r.createDocumentFragment(),g=0,a;for(;(a=s.exec(f))!==null;){a.index>g&&h.appendChild(r.createTextNode(f.slice(g,a.index)));let D=r.createElement("span");D.className="highlight",D.textContent=a[0],h.appendChild(D),g=a.index+a[0].length}gl!==""),s=0,u=i.length-1;if(n){let l=g=>r.some(a=>g.toLowerCase().startsWith(a.toLowerCase())),c=i.map(l),f=0,h=0;for(let g=0;gp+(d?1:0),0);D>=f&&(f=D,h=g)}s=Math.max(h-ue,0),u=Math.min(s+2*ue,i.length-1),i=i.slice(s,u)}let o=i.map(l=>{let c=l;for(let f of r)if(l.toLowerCase().includes(f.toLowerCase())){let h=new RegExp(f.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&"),"gi");c=l.replace(h,g=>\`\${g}\`);break}return c}).join(" ");return(s===0?"":"...")+o+(u===i.length-1?"":"...")}function xi(t,e){return!e||e.length===0||t.length===0?[]:e.map(n=>{let r=se(n);return t.some(i=>n.toLowerCase().includes(i.toLowerCase()))?\`
  • #\${r}

  • \`:\`
  • #\${r}

  • \`}).slice(0,yi)}function Bi(t,e){let n=Ht[e];if(!n||!Z)return{id:e,slug:"",title:"",content:"",tags:[]};let r=Z[n];if(!r)return{id:e,slug:n,title:"",content:"",tags:[]};let i=oe(bt);return{id:e,slug:n,title:i.tags.length>0&&!i.query?se(r.title):Tn(t,r.title||""),content:Tn(t,r.content||"",!0),tags:xi(i.tags,r.tags)}}async function ki(){if(!Z)return;let t=0,e=[],n=new Set;for(let r of Object.keys(Z)){let i=Z[r];if(i){Ht[t]=r;for(let s of i.tags||[])n.add(s);e.push(le.addAsync(t,{id:t,slug:r,title:i.title||"",content:i.content||"",tags:i.tags||[]})),t++}}await Promise.all(e),Pt=[...n].sort()}async function bi(){return await fetchData}var Rt=!1;async function Ti(){Rt||(Z=await bi(),await ki(),Rt=!0)}async function Si(t){if(!Rt||!Z)return 0;let e=new Set(Pt),n=0;for(let r of Object.keys(t)){if(Z[r])continue;let i=t[r];if(!i)continue;let s=Ht.length;Ht[s]=r,Z[r]=i;for(let u of i.tags||[])e.add(u);await le.addAsync(s,{id:s,slug:r,title:i.title||"",content:i.content||"",tags:i.tags||[]}),n++}return Pt=[...e].sort(),n}document.addEventListener("content-index-updated",t=>{let e=t.detail;if(!Rt||!Z)return;let n=e?.slugs;!Array.isArray(n)||n.length===0||(async()=>{try{let r=await fetchData;if(!r||typeof r!="object")return;let i=r.content&&typeof r.content=="object"?r.content:r,s={};for(let u of n){let o=i[u];o&&typeof o=="object"&&(s[u]=o)}await Si(s)}catch{}})()});function Li(){let t=sessionStorage.getItem("search-term");t&&(sessionStorage.removeItem("search-term"),requestAnimationFrame(()=>{let e=document.querySelectorAll(".popover-hint p, .popover-hint li, .popover-hint h1, .popover-hint h2, .popover-hint h3, .popover-hint h4, .popover-hint h5, .popover-hint h6, .popover-hint td, .popover-hint th, .popover-hint blockquote, article p, article li, article h1, article h2, article h3");for(let n of Array.from(e)){let i=(n.textContent??"").toLowerCase().indexOf(t.toLowerCase());if(i===-1)continue;let s=document.createTreeWalker(n,NodeFilter.SHOW_TEXT),u=0,o,l=null,c=0,f=null,h=0;for(;o=s.nextNode();){let g=o.nodeValue?.length??0;if(!l&&u+g>i&&(l=o,c=i-u),l&&u+g>=i+t.length){f=o,h=i+t.length-u;break}u+=g}if(!(!l||!f)){try{let g=document.createRange();g.setStart(l,c),g.setEnd(f,h);let a=document.createElement("span");a.className="search-scroll-target",g.surroundContents(a),a.scrollIntoView({block:"center",behavior:"smooth"}),setTimeout(()=>{a.classList.add("fade-out"),setTimeout(()=>{let D=a.parentNode;D&&(D.replaceChild(document.createTextNode(a.textContent||""),a),D.normalize())},1e3)},2e3)}catch{n.scrollIntoView({block:"center",behavior:"smooth"})}break}}}))}async function Mn(){Ai(),await Ti(),await wi(),Li()}document.addEventListener("nav",Mn);document.addEventListener("render",Mn); +var search_inline_default = `var Rn=Object.create;var Ne=Object.defineProperty;var Wn=Object.getOwnPropertyDescriptor;var Nn=Object.getOwnPropertyNames;var zn=Object.getPrototypeOf,On=Object.prototype.hasOwnProperty;var $n=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Kn=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Nn(e))!On.call(t,i)&&i!==n&&Ne(t,i,{get:()=>e[i],enumerable:!(r=Wn(e,i))||r.enumerable});return t};var Un=(t,e,n)=>(n=t!=null?Rn(zn(t)):{},Kn(e||!t||!t.__esModule?Ne(n,"default",{value:t,enumerable:!0}):n,t));var fe=$n(()=>{});var C;function O(t,e,n){let r=typeof n,i=typeof t;if(r!=="undefined"){if(i!=="undefined"){if(n){if(i==="function"&&r===i)return function(o){return t(n(o))};if(e=t.constructor,e===n.constructor){if(e===Array)return n.concat(t);if(e===Map){var s=new Map(n);for(var u of t)s.set(u[0],u[1]);return s}if(e===Set){u=new Set(n);for(s of t.values())u.add(s);return u}}}return t}return n}return i==="undefined"?e:t}function Ct(t,e){return typeof t>"u"?e:t}function R(){return Object.create(null)}function U(t){return typeof t=="string"}function Lt(t){return typeof t=="object"}function Mt(t,e){if(U(e))t=t[e];else for(let n=0;t&&n1?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&&dt(this),this)};C.addMatcher=function(t,e){return typeof t=="object"?this.addReplacer(t,e):t.length<2&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?"|":"")+t,this.J=null,this.cache&&dt(this),this)};C.addReplacer=function(t,e){return typeof t=="string"?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&&dt(this),this)};C.encode=function(t,e){if(this.cache&&t.length<=this.H)if(this.F){if(this.B.has(t))return this.B.get(t)}else this.F=setTimeout(dt,50,this);this.normalize&&(typeof this.normalize=="function"?t=this.normalize(t):t=ze?t.normalize("NFKD").replace(ze,"").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&t.length>3&&(t=t.replace(Xn,"$1 $2").replace(Zn,"$1 $2").replace(Jn,"$1 "));let n=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer),r=[],i=R(),s,u,o=this.split||this.split===""?t.split(this.split):[t];for(let c=0,f,h;cthis.maxlength)){if(e){if(i[f])continue;i[f]=1}else{if(s===f)continue;s=f}if(n)r.push(f);else if(!this.filter||(typeof this.filter=="function"?this.filter(f):!this.filter.has(f))){if(this.cache&&f.length<=this.I)if(this.F){var l=this.D.get(f);if(l||l===""){l&&r.push(l);continue}}else this.F=setTimeout(dt,50,this);if(this.stemmer){this.K||(this.K=new RegExp("(?!^)("+this.A+")$"));let g;for(;g!==f&&f.length>2;)g=f,f=f.replace(this.K,a=>this.stemmer.get(a))}if(f&&(this.mapper||this.dedupe&&f.length>1)){l="";for(let g=0,a="",D,p;g1&&(this.J||(this.J=new RegExp("("+this.h+")","g")),f=f.replace(this.J,g=>this.matcher.get(g))),f&&this.replacer)for(l=0;f&&lthis.L&&(this.D.clear(),this.I=this.I/1.1|0)),f){if(f!==h)if(e){if(i[f])continue;i[f]=1}else{if(u===f)continue;u=f}r.push(f)}}}return this.finalize&&(r=this.finalize(r)||r),this.cache&&t.length<=this.H&&(this.B.set(t,r),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),r};function dt(t){t.F=null,t.B.clear(),t.D.clear()}function Fe(t,e,n){n||(e||typeof t!="object"?typeof e=="object"&&(n=e,e=0):n=t),n&&(t=n.query||t,e=n.limit||e);let r=""+(e||0);n&&(r+=(n.offset||0)+!!n.context+!!n.suggest+(n.resolve!==!1)+(n.resolution||this.resolution)+(n.boost||0)),t=(""+t).toLowerCase(),this.cache||(this.cache=new Ft);let i=this.cache.get(t+r);if(!i){let s=n&&n.cache;s&&(n.cache=!1),i=this.search(t,e,n),s&&(n.cache=s),this.cache.set(t+r,i)}return i}function Ft(t){this.limit=t&&t!==!0?t:1e3,this.cache=new Map,this.h=""}Ft.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)};Ft.prototype.get=function(t){let e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e};Ft.prototype.remove=function(t){for(let e of this.cache){let n=e[0];e[1].includes(t)&&this.cache.delete(n)}};Ft.prototype.clear=function(){this.cache.clear(),this.h=""};var Oe={normalize:!1,numeric:!1,dedupe:!1},Ot={},ae=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),$e=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),Ke=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\\1+/g,"$1"],Ue={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,\\u00DF:2,d:3,t:3,l:4,m:5,n:5,r:6},_e={Exact:Oe,Default:Ot,Normalize:Ot,LatinBalance:{mapper:ae},LatinAdvanced:{mapper:ae,matcher:$e,replacer:Ke},LatinExtra:{mapper:ae,replacer:Ke.concat([/(?!^)[aeo]/g,""]),matcher:$e},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let n=0;n=u.length)e-=u.length;else{e=u[r?"splice":"slice"](e,n);let o=e.length;if(o&&(i=i.length?i.concat(e):e,n-=o,r&&(t.length-=o),!n))break;e=0}return i}function xt(t){if(!this||this.constructor!==xt)return new xt(t);this.index=t?[t]:[],this.length=t?t.length:0;let e=this;return new Proxy([],{get(n,r){if(r==="length")return e.length;if(r==="push")return function(i){e.index[e.index.length-1].push(i),e.length++};if(r==="pop")return function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()};if(r==="indexOf")return function(i){let s=0;for(let u=0,o,l;u=0)return s+l;s+=o.length}return-1};if(r==="includes")return function(i){for(let s=0;s32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}V.prototype.get=function(t){let e=this.index[this.B(t)];return e&&e.get(t)};V.prototype.set=function(t,e){var n=this.B(t);let r=this.index[n];r?(n=r.size,r.set(t,e),(n-=r.size)&&this.size++):(this.index[n]=r=new Map([[t,e]]),this.h.push(r),this.size++)};function J(t=8){if(!this||this.constructor!==J)return new J(t);this.index=R(),this.h=[],this.size=0,t>32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}J.prototype.add=function(t){var e=this.B(t);let n=this.index[e];n?(e=n.size,n.add(t),(e-=n.size)&&this.size++):(this.index[e]=n=new Set([t]),this.h.push(n),this.size++)};C=V.prototype;C.has=J.prototype.has=function(t){let e=this.index[this.B(t)];return e&&e.has(t)};C.delete=J.prototype.delete=function(t){let e=this.index[this.B(t)];e&&e.delete(t)&&this.size--};C.clear=J.prototype.clear=function(){this.index=R(),this.h=[],this.size=0};C.values=J.prototype.values=function*(){for(let t=0;t=this.priority*this.priority*3):(ge=setTimeout(Yn,0),Je=Date.now()),Ut){let s=this;return new Promise(u=>{setTimeout(function(){u(s[t+"Async"].apply(s,e))},0)})}let i=this[t].apply(this,e);return n=i.then?i:new Promise(s=>s(i)),r&&n.then(r),n}}var st=0;function Dt(t={},e){function n(o){function l(c){c=c.data||c;let f=c.id,h=f&&s.h[f];h&&(h(c.msg),delete s.h[f])}if(this.worker=o,this.h=R(),this.worker)return i?this.worker.on("message",l):this.worker.onmessage=l,t.config?new Promise(function(c){st>1e9&&(st=0),s.h[++st]=function(){c(s)},s.worker.postMessage({id:st,task:"init",factory:r,options:t})}):(this.priority=t.priority||4,this.encoder=e||null,this.worker.postMessage({task:"init",factory:r,options:t}),this)}if(!this||this.constructor!==Dt)return new Dt(t);let r=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;r&&(r=r.toString());let i=typeof window>"u",s=this,u=Gn(r,i,t.worker);return u.then?u.then(function(o){return n.call(s,o)}):n.call(this,u)}ut("add");ut("append");ut("search");ut("update");ut("remove");ut("clear");ut("export");ut("import");Dt.prototype.searchCache=Fe;ye(Dt.prototype);function ut(t){Dt.prototype[t]=function(){let e=this,n=[].slice.call(arguments);var r=n[n.length-1];let i;return typeof r=="function"&&(i=r,n.pop()),r=new Promise(function(s){t==="export"&&typeof n[0]=="function"&&(n[0]=null),st>1e9&&(st=0),e.h[++st]=s,e.worker.postMessage({task:t,id:st,args:n})}),i?(r.then(i),this):r}}function Gn(t,e,n){return e?typeof module<"u"?new(fe()).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>Un(fe(),1)).then(function(r){return new r.Worker(import.meta.dirname+"/node/node.mjs")}):t?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Qn.toString()],{type:"text/javascript"}))):new window.Worker(typeof n=="string"?n:import.meta.url.replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js").replace("flexsearch.bundle.module.min.mjs","module/worker/worker.js"),{type:"module"})}mt.prototype.add=function(t,e,n){if(Lt(t)&&(e=t,t=Mt(e,this.key)),e&&(t||t===0)){if(!n&&this.reg.has(t))return this.update(t,e);for(let o=0,l;oe?t.slice(n,n+e):t,r?wt.call(this,t):t;let i=[];for(let s=0,u,o;s=o){n-=o;continue}u=u.slice(n,n+e),o=u.length,n=0}if(o>e&&(u=u.slice(0,e),o=e),!i.length&&o>=e)return r?wt.call(this,u):u;if(i.push(u),e-=o,!e)break}return i=i.length>1?[].concat.apply([],i):i[0],r?wt.call(this,i):i}function Gt(t,e,n,r){var i=r[0];if(i[0]&&i[0].query)return t[e].apply(t,i);if(!(e!=="and"&&e!=="not"||t.result.length||t.await||i.suggest))return r.length>1&&(i=r[r.length-1]),(r=i.resolve)?t.await||t.result:t;let s=[],u=0,o=0,l,c,f,h,g;for(e=0;e1&&(n=n[e].apply(n,t.slice(1))),n}j.prototype.or=function(){return Gt(this,"or",qn,arguments)};function qn(t,e,n,r,i,s,u){return t.length&&(this.result.length&&t.push(this.result),t.length<2?this.result=t[0]:(this.result=en(t,e,n,!1,this.h),n=0)),i&&(this.await=null),i?this.resolve(e,n,r,u):this}j.prototype.and=function(){return Gt(this,"and",ti,arguments)};function ti(t,e,n,r,i,s,u){if(!s&&!this.result.length)return i?this.result:this;let o;if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{let l=0;for(let c=0,f,h;c1?y.join(" "):y[0];let w;if(y&&B){for(var v=B.length,M=(Q.split?B.replace(Q.split,""):B).length-y.length,T="",W=0,z=0;z-1&&(T=(N?B.substring(0,N):"")+u+B.substring(N,N+H)+o+(N+H=l)break}if(b=ft.length*(s.length-2),a||D||l&&d.length-b>l)if(b=l+b-g*2,k=x-A,a>0&&(k+=a),D>0&&(k+=D),k<=b)F=a?A-(a>0?a:0):A-((b-k)/2|0),m=D?x+(D>0?D:0):F+b,c||(F>0&&d.charAt(F)!==" "&&d.charAt(F-1)!==" "&&(F=d.indexOf(" ",F),F<0&&(F=0)),m=m.length-1){if(I>=m.length){k[w+1]=1,I>=F.length&&(b[w+1]=1);continue}v-=g}if(d=m[I].text,H=D&&y[w])if(H>0){if(d.length>H)if(k[w+1]=1,c)d=d.substring(0,H);else continue;(H-=d.length)||(H=-1),y[w]=H}else{k[w+1]=1;continue}if(v+d.length+1<=l)d=" "+d,x[w]+=d;else if(c)K=l-v-1,K>0&&(d=" "+d.substring(0,K),x[w]+=d),k[w+1]=1;else{k[w+1]=1;continue}}else{if(k[w])continue;if(I-=M,A[I]){v-=g,k[w]=1,b[w]=1;continue}if(I<=0){if(I<0){k[w]=1,b[w]=1;continue}v-=g}if(d=m[I].text,H=a&&B[w])if(H>0){if(d.length>H)if(k[w]=1,c)d=d.substring(d.length-H);else continue;(H-=d.length)||(H=-1),B[w]=H}else{k[w]=1;continue}if(v+d.length+1<=l)d+=" ",x[w]=d+x[w];else if(c)K=d.length+1-(l-v),K>=0&&K=F.length-1||I1?en(l,n,r,u,s):(l=l[0])&&n&&l.length>n||r?l.slice(r,n+r):l;else{if(tn||r)&&(l=l.slice(r,n+r));else{i=[];for(let h=0,g;hr)r-=g.length;else if((n&&g.length>n||r)&&(g=g.slice(r,n+r),n-=g.length,r&&(r-=g.length)),i.push(g),!n)break}l=i}}return l}function en(t,e,n,r,i){let s=[],u=R(),o;var l=t.length;let c;if(r){for(i=l-1;i>=0;i--)if(c=(r=t[i])&&r.length){for(l=0;l=0;f--){h=t[f];for(let a=0;a1?Jt(i,1,0,0,l,c):i[0],B)})}return a?i:new j(i.length>1?Jt(i,1,0,0,l,c):i[0],this)}}a||u||!(h=h||this.field)||(U(h)?u=h:(h.constructor===Array&&h.length===1&&(h=h[0]),u=h.field||h.index)),h&&h.constructor!==Array&&(h=[h])}h||(h=this.field);let b;m=(this.worker||this.db)&&!r&&[];for(let B=0,y,v,M;B"u"&&(this.db?m.push(p=this.index.get(this.field[0]).db.enrich(p)):p=wt.call(this,p)),u)return a?D?Vt(t,p,this.index,u,D):p:new j(p,this);i[F]={field:s[F],result:p}}if(d&&this.db&&m.length){let B=this;return Promise.all(m).then(function(y){for(let v=0;v0&&((n&&e>n||r)&&(t=t.slice(r,r+n)),i&&(t=wt.call(this,t))),t):[]):[]}function wt(t){if(!this||!this.store)return t;if(this.db)return this.index.get(this.field[0]).db.enrich(t);let e=Array(t.length);for(let n=0,r;n1?n:n[0]}C.append=function(t,e){return this.add(t,e,!0)};C.update=function(t,e){return this.remove(t).add(t,e)};C.remove=function(t){Lt(t)&&(t=Mt(t,this.key));for(var e of this.index.values())e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let r of n){e=r[0];let i=r[1],s=i.indexOf(t);s>-1&&(i.length>1?i.splice(s,1):n.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this};C.clear=function(){let t=[];for(let e of this.index.values()){let n=e.clear();n.then&&t.push(n)}if(this.tag)for(let e of this.tag.values())e.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this};C.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)};C.cleanup=function(){for(let t of this.index.values())t.cleanup();return this};C.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then(function(e){return e[0]&&e[0].doc||null}):this.store.get(t)||null};C.set=function(t,e){return typeof t=="object"&&(e=t,t=Mt(e,this.key)),this.store.set(t,e),this};C.searchCache=Fe;C.export=ui;C.import=oi;ye(mt.prototype);function Ae(t,e=0){let n=[],r=[];e&&(e=25e4/e*5e3|0);for(let i of t.entries())r.push(i),r.length===e&&(n.push(r),r=[]);return r.length&&n.push(r),n}function we(t,e){e||(e=new Map);for(let n=0,r;n2?n[0]:"";if(n=n.length>2?n[2]:n[1],this.worker&&r)return this.index.get(r).import(t);if(e){if(typeof e=="string"&&(e=JSON.parse(e)),r)return this.index.get(r).import(n,e);switch(n){case"reg":this.fastupdate=!1,this.reg=un(e,this.reg);for(let i=0,s;i=0&&i.splice(u,1)}}else jt(this.map,t),this.depth&&jt(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.M&&on(this)),this.cache&&this.cache.remove(t),this};function jt(t,e){let n=0;var r=typeof e>"u";if(t.constructor===Array){for(let i=0,s,u,o;i=0){if(s.length>1)return s.splice(u,1),1;if(delete t[i],n)return 1;o=1}else{if(o)return 1;n++}}}else for(let i of t.entries())r=i[0],jt(i[1],e)?n++:t.delete(r);return n}var li={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};X.prototype.add=function(t,e,n,r){if(e&&(t||t===0)){if(!r&&!n&&this.reg.has(t))return this.update(t,e);r=this.depth,e=this.encoder.encode(e,!r);let c=e.length;if(c){let f=R(),h=R(),g=this.resolution;for(let a=0;a2){for(let p=1,d,F,m,A;p2){for(let p=0,d;pp;s--){u=D.substring(p,s),d=this.rtl?i-1-p:p;var o=this.score?this.score(e,D,a,u,d):Kt(g,c,a,i,d);tt(this,h,u,o,t,n)}break}case"bidirectional":case"reverse":if(i>1){for(o=i-1;o>0;o--){u=D[this.rtl?i-1-o:o]+u;var l=this.score?this.score(e,D,a,u,o):Kt(g,c,a,i,o);tt(this,h,u,l,t,n)}u=""}case"forward":if(i>1){for(o=0;o1&&au;let p=this.score?this.score(e,u,a,D,o-1):Kt(i+(c/2>i?0:1),c,a,s-1,o-1);tt(this,f,l?u:D,p,t,n,l?D:u)}}}}this.fastupdate||this.reg.add(t)}}return this.db&&(this.commit_task.push(n?{ins:t}:{del:t}),this.M&&on(this)),this};function tt(t,e,n,r,i,s,u){let o,l;if(!(o=e[n])||u&&!o[u]){if(u?(e=o||(e[n]=R()),e[u]=1,l=t.ctx,(o=l.get(u))?l=o:l.set(u,l=t.keystore?new V(t.keystore):new Map)):(l=t.map,e[n]=1),(o=l.get(n))?l=o:l.set(n,l=o=[]),s){for(let c=0,f;c1?e+(r||0)<=t?n+(i||0):(t-1)/(e+(r||0))*(n+(i||0))+1|0:0}X.prototype.search=function(t,e,n){if(n||(e||typeof t!="object"?typeof e=="object"&&(n=e,e=0):(n=t,t="")),n&&n.cache)return n.cache=!1,t=this.searchCache(t,e,n),n.cache=!0,t;let r=[],i,s,u,o=0,l,c,f,h,g;n&&(t=n.query||t,e=n.limit||e,o=n.offset||0,s=n.context,u=n.suggest,g=(l=n.resolve)&&n.enrich,f=n.boost,h=n.resolution,c=this.db&&n.tag),typeof l>"u"&&(l=this.resolve),s=this.depth&&s!==!1;let a=this.encoder.encode(t,!s);if(i=a.length,e=e||(l?100:0),i===1)return Ye.call(this,a[0],"",e,o,l,g,c);if(i===2&&s&&!u)return Ye.call(this,a[1],a[0],e,o,l,g,c);let D=R(),p=0,d;if(s&&(d=a[0],p=1),h||h===0||(h=d?this.N:this.resolution),this.db){if(this.db.search&&(n=this.db.search(this,a,e,o,u,l,g,c),n!==!1))return n;let F=this;return(async function(){for(let m,A;p1)l=Jt(t,e,n,r,i,s,u);else if(o===1)return u?Ce.call(null,t[0],n,r):new j(t[0],this);return u?l:new j(l,this)}function Ye(t,e,n,r,i,s,u){return t=me(this,t,e,n,r,i,s,u),this.db?t.then(function(o){return i?o||[]:new j(o,this)}):t&&t.length?i?Ce.call(this,t,n,r):new j(t,this):i?[]:new j([],this)}function Ge(t,e,n,r){let i=[];if(t&&t.length){if(t.length<=r){e.push(t);return}for(let s=0,u;sn)&&(l=n,n=e,e=l),t.db?t.db.get(e,n,r,i,s,u,o):(t=n?(t=t.ctx.get(n))&&t.get(e):t.map.get(e),t)}function X(t,e){if(!this||this.constructor!==X)return new X(t);if(t){var n=U(t)?t:t.preset;n&&(t=Object.assign({},li[n],t))}else t={};n=t.context;let r=n===!0?{depth:1}:n||{},i=U(t.encoder)?_e[t.encoder]:t.encode||t.encoder||{};this.encoder=i.encode?i:typeof i=="object"?new vt(i):{encode:i},this.resolution=t.resolution||9,this.tokenize=n=(n=t.tokenize)&&n!=="default"&&n!=="exact"&&n||"strict",this.depth=n==="strict"&&r.depth||0,this.bidirectional=r.bidirectional!==!1,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(n=t.keystore||0)&&(this.keystore=n),this.map=n?new V(n):new Map,this.ctx=n?new V(n):new Map,this.reg=e||(this.fastupdate?n?new V(n):new Map:n?new J(n):new Set),this.N=r.resolution||3,this.rtl=i.rtl||t.rtl||!1,this.cache=(n=t.cache||null)&&new Ft(n),this.resolve=t.resolve!==!1,(n=t.db)&&(this.db=this.mount(n)),this.M=t.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}C=X.prototype;C.mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)};C.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)};C.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function on(t){t.commit_timer||(t.commit_timer=setTimeout(function(){t.commit_timer=null,t.db.commit(t)},1))}C.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db?(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[],this.db.clear()):this};C.append=function(t,e){return this.add(t,e,!0)};C.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)};C.update=function(t,e){let n=this,r=this.remove(t);return r&&r.then?r.then(()=>n.add(t,e)):this.add(t,e)};C.cleanup=function(){return this.fastupdate?(jt(this.map),this.depth&&jt(this.ctx),this):this};C.searchCache=Fe;C.export=function(t,e,n=0,r=0){let i,s;switch(r){case 0:i="reg",s=sn(this.reg);break;case 1:i="cfg",s=null;break;case 2:i="map",s=Ae(this.map,this.reg.size);break;case 3:i="ctx",s=nn(this.ctx,this.reg.size);break;default:return}return Zt.call(this,t,e,i,s,n,r)};C.import=function(t,e){if(e)switch(typeof e=="string"&&(e=JSON.parse(e)),t=t.split("."),t[t.length-1]==="json"&&t.pop(),t.length===3&&t.shift(),t=t.length>1?t[1]:t[0],t){case"reg":this.fastupdate=!1,this.reg=un(e,this.reg);break;case"map":this.map=we(e,this.map);break;case"ctx":this.ctx=rn(e,this.ctx)}};C.serialize=function(t=!0){let e="",n="",r="";if(this.reg.size){let s;for(var i of this.reg.keys())s||(s=typeof i),e+=(e?",":"")+(s==="string"?'"'+i+'"':i);e="index.reg=new Set(["+e+"]);",n=Ze(this.map,s),n="index.map=new Map(["+n+"]);";for(let u of this.ctx.entries()){i=u[0];let o=Ze(u[1],s);o="new Map(["+o+"])",o='["'+i+'",'+o+"]",r+=(r?",":"")+o}r="index.ctx=new Map(["+r+"]);"}return t?"function inject(index){"+e+n+r+"}":e+n+r};ye(X.prototype);var ln=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Qt=["map","ctx","tag","reg","cfg"],gt=R();function Yt(t,e={}){if(!this||this.constructor!==Yt)return new Yt(t,e);typeof t=="object"&&(e=t,t=t.name),t||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(t?":"+t.toLowerCase().replace(/[^a-z0-9_\\-]/g,""):""),this.field=e.field?e.field.toLowerCase().replace(/[^a-z0-9_\\-]/g,""):"",this.type=e.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}C=Yt.prototype;C.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())};C.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),gt[t.id]||(gt[t.id]=[]),gt[t.id].push(t.field);let e=ln.open(t.id,1);return e.onupgradeneeded=function(){let n=t.db=this.result;for(let r=0,i;r=f.length){r-=f.length;continue}let h=n?r+Math.min(f.length-r,n):f.length;for(let g=r;g=s.length?[]:!e&&!n?s:(s=s.slice(n,n+e),r?i.enrich(s):s)})};C.enrich=function(t){typeof t!="object"&&(t=[t]);let e=this.db.transaction("reg","readonly").objectStore("reg"),n=[];for(let r=0;r=0)if(i=1,o.length>1)o.splice(c,1);else{r[u]=[];break}s+=o.length}if(n)break}s?i&&t.update(r):t.delete(),t.continue()}C.remove=function(t){return typeof t!="object"&&(t=[t]),Promise.all([this.transaction("map","readwrite",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction("ctx","readwrite",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction("tag","readwrite",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t,!0)}}),this.transaction("reg","readwrite",function(e){for(let n=0;n{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,n(this.result)},t.onerror=t.onblocked=r,t=null})}var hn={Index:X,Charset:_e,Encoder:vt,Document:mt,Worker:Dt,Resolver:j,IndexedDB:Yt,Language:{}};var Ni=Object.hasOwnProperty;var gn,P,dn,hi,lt,cn,Dn,mn,ve,te,It,Fn,Te,Be,ke,ci,_n={},ne=[],fi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,re=Array.isArray;function et(t,e){for(var n in e)t[n]=e[n];return t}function Se(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function xe(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++dn,__i:-1,__u:0};return i==null&&P.vnode!=null&&P.vnode(s),s}function kt(t){return t.children}function ee(t,e){this.props=t,this.context=e}function Bt(t,e){if(e==null)return t.__?Bt(t.__,t.__i+1):null;for(var n;ee&<.sort(mn),t=lt.shift(),e=lt.length,ai(t)}finally{lt.length=ie.__r=0}}function Cn(t,e,n,r,i,s,u,o,l,c,f){var h,g,a,D,p,d,F,m=r&&r.__k||ne,A=e.length;for(l=pi(n,e,m,l,A),h=0;h0?u=t.__k[s]=xe(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):t.__k[s]=u,l=s+g,u.__=t,u.__b=t.__b+1,o=null,(c=u.__i=gi(u,n,l,h))!=-1&&(h--,(o=n[c])&&(o.__u|=2)),o==null||o.__v==null?(c==-1&&(i>f?g--:il?g--:g++,u.__u|=4))):t.__k[s]=null;if(h)for(s=0;s(f?1:0)){for(i=n-1,s=n+1;i>=0||s=0?i--:s++])!=null&&(2&c.__u)==0&&o==c.key&&l==c.type)return u}return-1}function an(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||fi.test(e)?n:n+"px"}function qt(t,e,n,r,i){var s,u;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||an(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||an(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(Fn,"$1")),u=e.toLowerCase(),e=u in t||e=="onFocusOut"||e=="onFocusIn"?u.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n[It]=r[It]:(n[It]=Te,t.addEventListener(e,s?ke:Be,s)):t.removeEventListener(e,s?ke:Be,s);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function pn(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[te]==null)e[te]=Te++;else if(e[te]0?t:re(t)?t.map(wn):et({},t)}function Di(t,e,n,r,i,s,u,o,l){var c,f,h,g,a,D,p,d=n.props||_n,F=e.props,m=e.type;if(m=="svg"?i="http://www.w3.org/2000/svg":m=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c"u"?"":document.body?.dataset?.basepath??""}function Me(t,e){let n=e??_i(),r=t.startsWith("/")?t:"/"+t;return n+r}function nt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function xn(t,e){if(!t)return()=>{};let n=i=>{t.classList.contains("active")&&i.target===t&&(i.preventDefault(),i.stopPropagation(),e())},r=i=>{t.classList.contains("active")&&i.key==="Escape"&&(i.preventDefault(),e())};return t.addEventListener("click",n),document.addEventListener("keydown",r),()=>{t.removeEventListener("click",n),document.removeEventListener("keydown",r)}}function Bn(t,e){let n=t.querySelectorAll("[src], [href]");for(let r of Array.from(n)){let i=r.hasAttribute("href")?"href":"src",s=r.getAttribute(i);if(s&&!(s.startsWith("http://")||s.startsWith("https://")||s.startsWith("mailto:")||s.startsWith("tel:")||s.startsWith("#")||s.startsWith("/")||s.startsWith("data:")))try{let u=new URL(s,e).toString();r.setAttribute(i,u)}catch{continue}}}function se(t){return t.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}var je="basic",bt="",kn=8,yi=5,ue=30,Ci=t=>{let e=[],n=-1,r=-1,i=t.toLowerCase(),s=0;for(let u of i){let o=u.codePointAt(0);o>=12352&&o<=12447||o>=12448&&o<=12543||o>=19968&&o<=40959||o>=44032&&o<=55215||o>=131072&&o<=173791?(n!==-1&&(e.push(i.slice(n,r)),n=-1),e.push(u)):o===32||o===9||o===10||o===13?n!==-1&&(e.push(i.slice(n,r)),n=-1):(n===-1&&(n=s),r=s+1),s+=u.length}return n!==-1&&e.push(i.slice(n)),e},le=new hn.Document({encode:Ci,document:{id:"id",tag:"tags",index:[{field:"title",tokenize:"forward"},{field:"content",tokenize:"forward"},{field:"tags",tokenize:"forward"}]}}),Z=null,Pt=[],Ht=[],Ie=new Map;function oe(t){let e=t.split(/\\s+/),n=[],r=[];for(let i of e)i.startsWith("#")&&i.length>1?n.push(i.substring(1)):i!=="#"&&r.push(i);return{tags:n,query:r.join(" ").trim()}}function bn(t){let e=t.split(/\\s+/),n=e[e.length-1];return n&&n.startsWith("#")?n.substring(1):null}var Sn=new DOMParser;async function Ei(t){if(Ie.has(t))return Ie.get(t);let e=new URL(Me(t),window.location.origin).toString();try{let n=await fetch(e);if(!n.ok)return[];let r=await n.text(),i=Sn.parseFromString(r??"","text/html");Bn(i,e);let s=Array.from(i.getElementsByClassName("popover-hint"));return Ie.set(t,s),s}catch{return[]}}var Pe=[];function _t(t){Pe.push(t)}function Ai(){Pe.forEach(t=>t()),Pe.length=0}async function wi(){let t=document.querySelectorAll(".search");for(let e of Array.from(t)){let n=e.querySelector(".search-container"),r=e.querySelector(".search-button"),i=e.querySelector(".search-bar"),s=e.querySelector(".search-layout");if(!n||!r||!i||!s)continue;let u=n.closest(".sidebar"),o=s.getAttribute("data-preview")==="true",l=s.getAttribute("data-field-priority"),c=l?JSON.parse(l):["title","content","tags"],f=s.querySelector(".results-container");f||(f=document.createElement("div"),f.className="results-container",f.setAttribute("role","listbox"),f.setAttribute("aria-label","Search results"),s.appendChild(f));let h=s.querySelector(".preview-container");o&&!h&&(h=document.createElement("div"),h.className="preview-container",s.appendChild(h));let g=document.createElement("div");g.className="tag-suggestions",g.setAttribute("role","listbox"),g.setAttribute("aria-label","Tag suggestions"),g.style.display="none";let a=i.parentElement;a.insertBefore(g,i.nextSibling);let D=document.createElement("span");D.className="ghost-text",D.setAttribute("aria-hidden","true"),a.insertBefore(D,i.nextSibling);let p=-1,d=[],F=!1,m=_=>{if(p<0||p>=d.length){D.textContent="";return}let E=d[p];if(!E.toLowerCase().startsWith(_.toLowerCase())){D.textContent="";return}let L=E.substring(_.length);D.innerHTML="";let S=document.createElement("span");S.style.visibility="hidden",S.textContent=i.value,D.appendChild(S),D.appendChild(document.createTextNode(L))},A=()=>{g.querySelectorAll(".tag-suggestion-item").forEach((L,S)=>{L.classList.toggle("active",S===p)});let E=bn(i.value)||"";m(E)},x=()=>{F=!1,p=-1,d=[],g.style.display="none",D.textContent=""},b=_=>{let E=i.value,L=E.lastIndexOf("#");L!==-1&&(i.value=E.substring(0,L)+"#"+_+" "),x(),i.focus(),i.dispatchEvent(new Event("input"))},k=_=>{if(Rt){if(d=_===""?Ht.slice(0,10):Ht.filter(E=>E.toLowerCase().startsWith(_.toLowerCase())).slice(0,10),d.length===0){x();return}p=0,F=!0,nt(g);for(let E=0;E!F||d.length===0?!1:(_==="down"?p=Math.min(p+1,d.length-1):p=Math.max(p-1,0),A(),!0),y=null,v=0,M=null,T=()=>{n.classList.remove("active"),u&&(u.style.zIndex=""),r.setAttribute("aria-expanded","false"),i.value="",nt(f),h&&nt(h),s.classList.remove("display-results"),je="basic",y=null,x(),r.focus()},W=_=>{je=_,u&&(u.style.zIndex="9999"),n.classList.add("active"),r.setAttribute("aria-expanded","true"),i.focus()},z=async _=>{if(nt(f),_.length===0){let E=document.createElement("a");E.className="result-card no-match";let L=document.createElement("h3");L.textContent="No results.";let S=document.createElement("p");S.textContent="Try another search term?",E.appendChild(L),E.appendChild(S),f.appendChild(E),y=null,h&&nt(h)}else for(let E of _){let L=document.createElement("a");L.className="result-card",L.id=E.slug,L.href=Me(E.slug);let S=document.createElement("h3");if(S.className="card-title",S.textContent=E.title,L.appendChild(S),E.tags.length>0){let $=document.createElement("ul");$.className="tags",$.textContent="";for(let G of E.tags){let q=document.createElement("li");q.textContent=G.replace(/<[^>]*>/g,""),$.appendChild(q)}L.appendChild($)}let Y=document.createElement("p");Y.className="card-description",Y.innerHTML=E.content.replace(/<(?!\\/?mark\\b)[^>]*>/gi,""),L.appendChild(Y),f.appendChild(L)}},N=()=>Array.from(f.querySelectorAll(".result-card:not(.no-match)")),H=()=>{let _=oe(bt);return _.query||(_.tags.length>0?_.tags.join(" "):bt)},K=async _=>{if(!h||(nt(h),!_))return;let E=_.id,L=++v,S=await Ei(E);if(L!==v)return;let Y=H(),$=document.createElement("div");$.className="preview-inner";for(let G of S){let q=G.cloneNode(!0);Y.trim()!==""&&(q.innerHTML=vi(Y,q)),$.appendChild(q)}h.appendChild($),requestAnimationFrame(()=>{let G=Array.from(h.getElementsByClassName("highlight"));if(G.length===0)return;G.sort((he,ce)=>ce.innerHTML.length-he.innerHTML.length);let q=G[0],Nt=0,at=q;for(;at&&at!==h;)Nt+=at.offsetTop,at=at.offsetParent;h.scrollTop=Math.max(0,Nt-50)})},it=_=>{y&&y.classList.remove("focus"),y=_,y&&(y.classList.add("focus"),y.scrollIntoView({block:"nearest"})),M&&clearTimeout(M),M=setTimeout(()=>K(y),150)},Q=_=>{let E=N();if(E.length===0){it(null);return}let L=Math.min(Math.max(_,0),E.length-1);it(E[L]??null)},Wt=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):-1;Q(E+1)},ht=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):_.length;Q(E-1)},rt=async _=>{let E=_.target.value;bt=E;let L=bn(E);L!==null?k(L):x();let S=oe(E),Y=S.query!==""||S.tags.length>0;if(s.classList.toggle("display-results",Y),je=S.tags.length>0&&!S.query?"tags":"basic",!Y){nt(f),h&&nt(h),y=null;return}let $;S.query?$=await le.searchAsync({query:S.query,limit:S.tags.length>0?1e4:kn,index:["title","content"]}):S.tags.length>0?$=await le.searchAsync({query:S.tags[0],limit:1e4,index:["tags"]}):$=[];let G=pt=>{let Tt=$.filter(zt=>zt.field===pt);return Tt.length===0?[]:[...Tt[0].result]},Nt=[...new Set(c.flatMap(pt=>G(pt)))].filter(pt=>{if(S.tags.length===0)return!0;let Tt=Pt[pt];if(!Tt)return!1;let zt=Z?.[Tt];if(!zt)return!1;let In=zt.tags||[];return S.tags.every(Pn=>In.some(Hn=>Hn.toLowerCase()===Pn.toLowerCase()))}),at=S.query||(S.tags.length>0?S.tags.join(" "):E),he=Nt.map(pt=>Bi(at,pt));await z(he.slice(0,kn));let ce=N();it(ce[0]??null)},ct=_=>{_.stopPropagation(),W("basic")};r.addEventListener("click",ct),_t(()=>r.removeEventListener("click",ct)),i.addEventListener("input",rt),_t(()=>i.removeEventListener("input",rt));let ft=_=>{if(F){if(_.key==="ArrowDown"){_.preventDefault(),B("down");return}if(_.key==="ArrowUp"){_.preventDefault(),B("up");return}if(_.key==="Tab"){_.preventDefault(),p>=0&&p=0&&pi.removeEventListener("keydown",ft));let w=_=>{_.key==="k"&&(_.ctrlKey||_.metaKey)&&!_.shiftKey?(_.preventDefault(),n.classList.contains("active")?T():W("basic")):_.shiftKey&&(_.ctrlKey||_.metaKey)&&_.key.toLowerCase()==="k"&&(_.preventDefault(),W("tags"),i.value="#",i.dispatchEvent(new Event("input")))};document.addEventListener("keydown",w),_t(()=>document.removeEventListener("keydown",w));let I=()=>{let _=oe(bt),E=_.query||(_.tags.length>0?_.tags.join(" "):bt);E.trim()&&sessionStorage.setItem("search-term",E.trim())},yt=_=>{let E=_.target.closest(".result-card");!E||E.classList.contains("no-match")||_ instanceof MouseEvent&&(_.altKey||_.ctrlKey||_.metaKey||_.shiftKey)||(I(),T())},He=_=>{let E=_.target.closest(".result-card");!E||E.classList.contains("no-match")||it(E)};f.addEventListener("click",yt),f.addEventListener("mouseover",He),_t(()=>{f.removeEventListener("click",yt),f.removeEventListener("mouseover",He)});let Re=_=>{let E=_.target.closest(".tag-suggestion-item");if(!E)return;let L=E.getAttribute("data-tag");L&&b(L)},We=_=>{let E=_.target.closest(".tag-suggestion-item");if(!E)return;let L=E.getAttribute("data-index");L!==null&&(p=parseInt(L,10),A())};g.addEventListener("click",Re),g.addEventListener("mouseover",We),_t(()=>{g.removeEventListener("click",Re),g.removeEventListener("mouseover",We)});let jn=xn(n,T);_t(jn)}}function Ln(t){let e=t.split(/\\s+/).filter(r=>r.trim()!==""),n=e.length;if(n>1)for(let r=1;ri.length-r.length)}function vi(t,e){let n=Ln(t).filter(c=>c.trim()!=="");if(n.length===0)return e.innerHTML;let r=Sn.parseFromString(e.innerHTML,"text/html"),i=n.map(c=>c.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")).join("|");if(i==="")return e.innerHTML;let s=new RegExp(i,"gi"),u=r.createTreeWalker(r.body,NodeFilter.SHOW_TEXT),o=[],l=u.nextNode();for(;l;)o.push(l),l=u.nextNode();for(let c of o){let f=c.nodeValue??"";if(s.lastIndex=0,!s.test(f))continue;s.lastIndex=0;let h=r.createDocumentFragment(),g=0,a;for(;(a=s.exec(f))!==null;){a.index>g&&h.appendChild(r.createTextNode(f.slice(g,a.index)));let D=r.createElement("span");D.className="highlight",D.textContent=a[0],h.appendChild(D),g=a.index+a[0].length}gl!==""),s=0,u=i.length-1;if(n){let l=g=>r.some(a=>g.toLowerCase().startsWith(a.toLowerCase())),c=i.map(l),f=0,h=0;for(let g=0;gp+(d?1:0),0);D>=f&&(f=D,h=g)}s=Math.max(h-ue,0),u=Math.min(s+2*ue,i.length-1),i=i.slice(s,u)}let o=i.map(l=>{let c=l;for(let f of r)if(l.toLowerCase().includes(f.toLowerCase())){let h=new RegExp(f.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&"),"gi");c=l.replace(h,g=>\`\${g}\`);break}return c}).join(" ");return(s===0?"":"...")+o+(u===i.length-1?"":"...")}function xi(t,e){return!e||e.length===0||t.length===0?[]:e.map(n=>{let r=se(n);return t.some(i=>n.toLowerCase().includes(i.toLowerCase()))?\`
  • #\${r}

  • \`:\`
  • #\${r}

  • \`}).slice(0,yi)}function Bi(t,e){let n=Pt[e];if(!n||!Z)return{id:e,slug:"",title:"",content:"",tags:[]};let r=Z[n];if(!r)return{id:e,slug:n,title:"",content:"",tags:[]};let i=oe(bt);return{id:e,slug:n,title:i.tags.length>0&&!i.query?se(r.title):Tn(t,r.title||""),content:Tn(t,r.content||"",!0),tags:xi(i.tags,r.tags)}}async function ki(){if(!Z)return;let t=0,e=[],n=new Set;for(let r of Object.keys(Z)){let i=Z[r];if(i){Pt[t]=r;for(let s of i.tags||[])n.add(s);e.push(le.addAsync(t,{id:t,slug:r,title:i.title||"",content:i.content||"",tags:i.tags||[]})),t++}}await Promise.all(e),Ht=[...n].sort()}async function bi(){return await fetchData}var Rt=!1;async function Ti(){Rt||(Z=await bi(),await ki(),Rt=!0)}async function Si(t){if(!Rt||!Z)return 0;let e=new Set(Ht),n=0;for(let r of Object.keys(t)){if(Z[r])continue;let i=t[r];if(!i)continue;let s=Pt.length;Pt[s]=r,Z[r]=i;for(let u of i.tags||[])e.add(u);await le.addAsync(s,{id:s,slug:r,title:i.title||"",content:i.content||"",tags:i.tags||[]}),n++}return Ht=[...e].sort(),n}document.addEventListener("content-index-updated",t=>{let e=t.detail;if(!Rt||!Z)return;let n=e?.slugs;!Array.isArray(n)||n.length===0||(async()=>{try{let r=await fetchData;if(!r||typeof r!="object")return;let i=r.content&&typeof r.content=="object"?r.content:r,s={};for(let u of n){let o=i[u];o&&typeof o=="object"&&(s[u]=o)}await Si(s)}catch{}})()});function Li(){let t=sessionStorage.getItem("search-term");t&&(sessionStorage.removeItem("search-term"),requestAnimationFrame(()=>{let e=document.querySelectorAll(".popover-hint p, .popover-hint li, .popover-hint h1, .popover-hint h2, .popover-hint h3, .popover-hint h4, .popover-hint h5, .popover-hint h6, .popover-hint td, .popover-hint th, .popover-hint blockquote, article p, article li, article h1, article h2, article h3");for(let n of Array.from(e)){let i=(n.textContent??"").toLowerCase().indexOf(t.toLowerCase());if(i===-1)continue;let s=document.createTreeWalker(n,NodeFilter.SHOW_TEXT),u=0,o,l=null,c=0,f=null,h=0;for(;o=s.nextNode();){let g=o.nodeValue?.length??0;if(!l&&u+g>i&&(l=o,c=i-u),l&&u+g>=i+t.length){f=o,h=i+t.length-u;break}u+=g}if(!(!l||!f)){try{let g=document.createRange();g.setStart(l,c),g.setEnd(f,h);let a=document.createElement("span");a.className="search-scroll-target",g.surroundContents(a),a.scrollIntoView({block:"center",behavior:"smooth"}),setTimeout(()=>{a.classList.add("fade-out"),setTimeout(()=>{let D=a.parentNode;D&&(D.replaceChild(document.createTextNode(a.textContent||""),a),D.normalize())},1e3)},2e3)}catch{n.scrollIntoView({block:"center",behavior:"smooth"})}break}}}))}async function Mn(){Ai(),await Ti(),await wi(),Li()}document.addEventListener("nav",Mn);document.addEventListener("render",Mn); `; var l; l = { __e: function(n2, l2, u3, t2) { diff --git a/dist/components/index.js.map b/dist/components/index.js.map index cec164e..365dc8c 100644 --- a/dist/components/index.js.map +++ b/dist/components/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../node_modules/@quartz-community/utils/src/lang.ts","../../src/i18n/locales/en-US.ts","../../src/i18n/locales/ar-SA.ts","../../src/i18n/locales/ca-ES.ts","../../src/i18n/locales/cs-CZ.ts","../../src/i18n/locales/de-DE.ts","../../src/i18n/locales/en-GB.ts","../../src/i18n/locales/es-ES.ts","../../src/i18n/locales/fa-IR.ts","../../src/i18n/locales/fi-FI.ts","../../src/i18n/locales/fr-FR.ts","../../src/i18n/locales/he-IL.ts","../../src/i18n/locales/hu-HU.ts","../../src/i18n/locales/id-ID.ts","../../src/i18n/locales/it-IT.ts","../../src/i18n/locales/ja-JP.ts","../../src/i18n/locales/kk-KZ.ts","../../src/i18n/locales/ko-KR.ts","../../src/i18n/locales/lt-LT.ts","../../src/i18n/locales/nb-NO.ts","../../src/i18n/locales/nl-NL.ts","../../src/i18n/locales/pl-PL.ts","../../src/i18n/locales/pt-BR.ts","../../src/i18n/locales/ro-RO.ts","../../src/i18n/locales/ru-RU.ts","../../src/i18n/locales/th-TH.ts","../../src/i18n/locales/tr-TR.ts","../../src/i18n/locales/uk-UA.ts","../../src/i18n/locales/vi-VN.ts","../../src/i18n/locales/zh-CN.ts","../../src/i18n/locales/zh-TW.ts","../../src/i18n/index.ts","../../src/components/styles/search.scss","../../src/components/scripts/search.inline.ts","../../node_modules/preact/src/constants.js","../../node_modules/preact/src/options.js","../../node_modules/preact/src/diff/catch-error.js","../../node_modules/preact/src/component.js","../../node_modules/preact/src/diff/props.js","../../node_modules/preact/src/create-context.js","../../node_modules/preact/jsx-runtime/src/index.js","../../src/components/Search.tsx"],"names":["options","__e","error","vnode","oldVNode","errorInfo","component","ctor","handled","__","__c","constructor","getDerivedStateFromError","setState","__d","componentDidCatch","__E","e","Promise","prototype","then","bind","resolve","setTimeout","Math","random","toString","vnodeId","createVNode","type","props","key","isStaticChildren","__source","__self","ref","i","normalizedProps","__k","__b","__v","__i","__u","defaultProps","u"],"mappings":";AAIO,SAAS,cAAc,OAAA,EAAwD;AACpF,EAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACzC;;;ACNA,IAAO,aAAA,GAAQ;AAAA,EACb,UAAA,EAAY;AAAA,IACV,MA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EACF;AAAA,KAAA,EACF,CAAA;AAAA,EAEJ,CAAA;AAEA,EAAA,MAAA,CAAO,cAAA,GAAiB,qBAAA;AACxB,EAAA,MAAA,CAAO,GAAA,GAAM,cAAA;AAEb,EAAA,OAAO,MAAA;AACT,CAAA","file":"index.js","sourcesContent":["export function capitalize(s: string): string {\n return s.substring(0, 1).toUpperCase() + s.substring(1);\n}\n\nexport function classNames(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n","export default {\n components: {\n search: {\n title: \"Search\",\n searchBarPlaceholder: \"Search for something...\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"بحث\",\n searchBarPlaceholder: \"ابحث عن شيء ما\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Cercar\",\n searchBarPlaceholder: \"Cerca alguna cosa\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Hledat\",\n searchBarPlaceholder: \"Hledejte něco\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Suche\",\n searchBarPlaceholder: \"Suche nach etwas...\",\n noResults: \"Keine Ergebnisse.\",\n noResultsHint: \"Versuchen Sie einen anderen Suchbegriff?\",\n tagFilterHint: \"Nach Tag filtern\",\n noTagsFound: \"Keine passenden Tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Search\",\n searchBarPlaceholder: \"Search for something\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Buscar\",\n searchBarPlaceholder: \"Buscar algo...\",\n noResults: \"Sin resultados.\",\n noResultsHint: \"\\u00bfIntentar con otro t\\u00e9rmino de b\\u00fasqueda?\",\n tagFilterHint: \"Filtrar por etiqueta\",\n noTagsFound: \"No se encontraron etiquetas\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"جستجو\",\n searchBarPlaceholder: \"مطلبی را جستجو کنید\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Haku\",\n searchBarPlaceholder: \"Hae jotain\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Recherche\",\n searchBarPlaceholder: \"Rechercher quelque chose...\",\n noResults: \"Aucun r\\u00e9sultat.\",\n noResultsHint: \"Essayez un autre terme de recherche\\u00a0?\",\n tagFilterHint: \"Filtrer par tag\",\n noTagsFound: \"Aucun tag correspondant\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"חיפוש\",\n searchBarPlaceholder: \"חפשו משהו\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Keresés\",\n searchBarPlaceholder: \"Keress valamire\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Cari\",\n searchBarPlaceholder: \"Cari sesuatu\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Cerca\",\n searchBarPlaceholder: \"Cerca qualcosa\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"\\u691c\\u7d22\",\n searchBarPlaceholder: \"\\u4f55\\u304b\\u3092\\u691c\\u7d22...\",\n noResults: \"\\u7d50\\u679c\\u304c\\u898b\\u3064\\u304b\\u308a\\u307e\\u305b\\u3093\\u3002\",\n noResultsHint:\n \"\\u5225\\u306e\\u691c\\u7d22\\u8a9e\\u3092\\u304a\\u8a66\\u3057\\u304f\\u3060\\u3055\\u3044\\u3002\",\n tagFilterHint: \"\\u30bf\\u30b0\\u3067\\u30d5\\u30a3\\u30eb\\u30bf\\u30fc\",\n noTagsFound: \"\\u4e00\\u81f4\\u3059\\u308b\\u30bf\\u30b0\\u304c\\u3042\\u308a\\u307e\\u305b\\u3093\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Іздеу\",\n searchBarPlaceholder: \"Бірдеңе іздеу\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"검색\",\n searchBarPlaceholder: \"검색어를 입력하세요\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Paieška\",\n searchBarPlaceholder: \"Ieškoti\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Søk\",\n searchBarPlaceholder: \"Søk etter noe\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Zoeken\",\n searchBarPlaceholder: \"Doorzoek de website\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Szukaj\",\n searchBarPlaceholder: \"Wpisz frazę wyszukiwania\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Pesquisar\",\n searchBarPlaceholder: \"Pesquisar por algo\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Căutare\",\n searchBarPlaceholder: \"Introduceți termenul de căutare...\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Поиск\",\n searchBarPlaceholder: \"Найти что-нибудь\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"ค้นหา\",\n searchBarPlaceholder: \"ค้นหาบางอย่าง\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Arama\",\n searchBarPlaceholder: \"Bir şey arayın\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Пошук\",\n searchBarPlaceholder: \"Шукати щось\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Tìm\",\n searchBarPlaceholder: \"Tìm kiếm thông tin\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"\\u641c\\u7d22\",\n searchBarPlaceholder: \"\\u641c\\u7d22\\u5185\\u5bb9...\",\n noResults: \"\\u6ca1\\u6709\\u7ed3\\u679c\\u3002\",\n noResultsHint: \"\\u8bf7\\u5c1d\\u8bd5\\u5176\\u4ed6\\u641c\\u7d22\\u8bcd\\u3002\",\n tagFilterHint: \"\\u6309\\u6807\\u7b7e\\u7b5b\\u9009\",\n noTagsFound: \"\\u6ca1\\u6709\\u5339\\u914d\\u7684\\u6807\\u7b7e\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"搜尋\",\n searchBarPlaceholder: \"搜尋些什麼\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","import enUS from \"./locales/en-US\";\nimport arSA from \"./locales/ar-SA\";\nimport caES from \"./locales/ca-ES\";\nimport csCZ from \"./locales/cs-CZ\";\nimport deDE from \"./locales/de-DE\";\nimport enGB from \"./locales/en-GB\";\nimport esES from \"./locales/es-ES\";\nimport faIR from \"./locales/fa-IR\";\nimport fiFI from \"./locales/fi-FI\";\nimport frFR from \"./locales/fr-FR\";\nimport heIL from \"./locales/he-IL\";\nimport huHU from \"./locales/hu-HU\";\nimport idID from \"./locales/id-ID\";\nimport itIT from \"./locales/it-IT\";\nimport jaJP from \"./locales/ja-JP\";\nimport kkKZ from \"./locales/kk-KZ\";\nimport koKR from \"./locales/ko-KR\";\nimport ltLT from \"./locales/lt-LT\";\nimport nbNO from \"./locales/nb-NO\";\nimport nlNL from \"./locales/nl-NL\";\nimport plPL from \"./locales/pl-PL\";\nimport ptBR from \"./locales/pt-BR\";\nimport roRO from \"./locales/ro-RO\";\nimport ruRU from \"./locales/ru-RU\";\nimport thTH from \"./locales/th-TH\";\nimport trTR from \"./locales/tr-TR\";\nimport ukUA from \"./locales/uk-UA\";\nimport viVN from \"./locales/vi-VN\";\nimport zhCN from \"./locales/zh-CN\";\nimport zhTW from \"./locales/zh-TW\";\n\nconst locales: Record = {\n \"en-US\": enUS,\n \"ar-SA\": arSA,\n \"ca-ES\": caES,\n \"cs-CZ\": csCZ,\n \"de-DE\": deDE,\n \"en-GB\": enGB,\n \"es-ES\": esES,\n \"fa-IR\": faIR,\n \"fi-FI\": fiFI,\n \"fr-FR\": frFR,\n \"he-IL\": heIL,\n \"hu-HU\": huHU,\n \"id-ID\": idID,\n \"it-IT\": itIT,\n \"ja-JP\": jaJP,\n \"kk-KZ\": kkKZ,\n \"ko-KR\": koKR,\n \"lt-LT\": ltLT,\n \"nb-NO\": nbNO,\n \"nl-NL\": nlNL,\n \"pl-PL\": plPL,\n \"pt-BR\": ptBR,\n \"ro-RO\": roRO,\n \"ru-RU\": ruRU,\n \"th-TH\": thTH,\n \"tr-TR\": trTR,\n \"uk-UA\": ukUA,\n \"vi-VN\": viVN,\n \"zh-CN\": zhCN,\n \"zh-TW\": zhTW,\n};\n\nexport function i18n(locale: string) {\n return locales[locale] || enUS;\n}\n",".search {\n min-width: fit-content;\n max-width: 14rem;\n}\n\n@media all and (max-width: 800px) {\n .search {\n flex-grow: 0.3;\n }\n}\n.search > .search-button {\n background-color: transparent;\n border: 1px var(--lightgray) solid;\n border-radius: 4px;\n font-family: inherit;\n font-size: inherit;\n height: 2rem;\n padding: 0 1rem 0 0;\n display: flex;\n align-items: center;\n text-align: inherit;\n cursor: pointer;\n white-space: nowrap;\n width: 100%;\n}\n\n.search > .search-button > p {\n display: inline;\n color: var(--gray);\n text-wrap: unset;\n}\n\n.search > .search-button svg {\n cursor: pointer;\n width: 18px;\n min-width: 18px;\n margin: 0 0.5rem;\n}\n\n.search > .search-button svg .search-path {\n stroke: var(--darkgray);\n stroke-width: 1.5px;\n transition: stroke 0.5s ease;\n}\n\n.search > .search-container {\n position: fixed;\n contain: layout;\n z-index: var(--search-z-index, 999);\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n overflow-y: auto;\n display: none;\n backdrop-filter: blur(4px);\n}\n\n.search > .search-container.active {\n display: inline-block;\n}\n\n.search > .search-container > .search-space {\n width: 65%;\n margin-top: 12vh;\n margin-left: auto;\n margin-right: auto;\n}\n\n@media all and not (min-width: 1200px) {\n .search > .search-container > .search-space {\n width: 90%;\n }\n}\n.search > .search-container > .search-space > *:not(.ghost-text):not(.tag-suggestions) {\n width: 100%;\n border-radius: 7px;\n background: var(--light);\n box-shadow: 0 14px 50px rgba(27, 33, 48, 0.12), 0 10px 30px rgba(27, 33, 48, 0.16);\n margin-bottom: 2em;\n}\n\n.search > .search-container > .search-space > input {\n box-sizing: border-box;\n padding: 0.5em 1em;\n font-family: var(--bodyFont);\n color: var(--dark);\n font-size: 1.1em;\n border: 1px solid var(--lightgray);\n}\n\n.search > .search-container > .search-space > input:focus {\n outline: none;\n}\n\n.search > .search-container > .search-space > .search-layout {\n display: none;\n flex-direction: row;\n border: 1px solid var(--lightgray);\n flex: 0 0 100%;\n box-sizing: border-box;\n}\n\n.search > .search-container > .search-space > .search-layout.display-results {\n display: flex;\n}\n\n.search > .search-container > .search-space > .search-layout[data-preview] > .results-container {\n flex: 0 0 min(30%, 450px);\n}\n\n@media all and not (max-width: 800px) {\n .search > .search-container > .search-space > .search-layout[data-preview] .result-card > p.card-description {\n display: none;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > div:first-child {\n border-right: 1px solid var(--lightgray);\n border-top-right-radius: unset;\n border-bottom-right-radius: unset;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > div:last-child {\n border-top-left-radius: unset;\n border-bottom-left-radius: unset;\n }\n}\n.search > .search-container > .search-space > .search-layout > div {\n height: 63vh;\n border-radius: 5px;\n}\n\n@media all and (max-width: 800px) {\n .search > .search-container > .search-space > .search-layout {\n flex-direction: column;\n }\n .search > .search-container > .search-space > .search-layout > .preview-container {\n display: none !important;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > .results-container {\n width: 100%;\n height: auto;\n max-height: 60vh;\n flex: 0 0 100%;\n }\n}\n.search > .search-container > .search-space > .search-layout .highlight {\n background: color-mix(in srgb, var(--tertiary) 60%, rgba(255, 255, 255, 0));\n border-radius: 5px;\n scroll-margin-top: 2rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container {\n flex-grow: 1;\n display: block;\n overflow: hidden;\n font-family: inherit;\n color: var(--dark);\n line-height: 1.5em;\n font-weight: 400;\n overflow-y: auto;\n padding: 0 2rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container .preview-inner {\n margin: 0 auto;\n width: 100%;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container a[role=anchor] {\n background-color: transparent;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container {\n overflow-y: auto;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card {\n overflow: hidden;\n padding: 1em;\n cursor: pointer;\n transition: background 0.2s ease;\n border-bottom: 1px solid var(--lightgray);\n width: 100%;\n display: block;\n box-sizing: border-box;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n text-transform: none;\n text-align: left;\n outline: none;\n font-weight: inherit;\n text-decoration: none;\n color: var(--dark);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card:hover,\n.search > .search-container > .search-space > .search-layout > .results-container .result-card:focus,\n.search > .search-container > .search-space > .search-layout > .results-container .result-card.focus {\n background: var(--lightgray);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > h3 {\n margin: 0;\n color: var(--secondary);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul.tags {\n margin-top: 0.45rem;\n margin-bottom: 0;\n padding: 0;\n list-style: none;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul.tags > li {\n display: inline-block;\n margin-right: 0.3rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul > li > p {\n border-radius: 8px;\n background-color: var(--highlight);\n padding: 0.2rem 0.4rem;\n margin: 0;\n line-height: 1.4rem;\n font-weight: 700;\n color: var(--secondary);\n font-size: 0.85rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul > li > p.match-tag {\n color: var(--tertiary);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > p {\n margin-bottom: 0;\n margin-top: 0.5em;\n font-size: 0.9em;\n color: var(--gray);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card.no-match {\n cursor: default;\n}\n\n.search > .search-container > .search-space {\n position: relative;\n}\n\n.search > .search-container > .search-space > .ghost-text {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n pointer-events: none;\n box-sizing: border-box;\n padding: 0.5em 1em;\n font-family: var(--bodyFont);\n font-size: 1.1em;\n color: var(--gray);\n opacity: 0.6;\n white-space: pre;\n overflow: hidden;\n height: auto;\n line-height: normal;\n border: 1px solid transparent;\n}\n\n.search > .search-container > .search-space > .tag-suggestions {\n position: absolute;\n top: calc(3.1em + 2px);\n left: 0;\n right: 0;\n z-index: calc(var(--search-z-index, 999) + 1);\n background: var(--light);\n border: 1px solid var(--lightgray);\n border-radius: 5px;\n box-shadow: 0 4px 12px rgba(27, 33, 48, 0.1), 0 2px 6px rgba(27, 33, 48, 0.08);\n max-height: 240px;\n overflow-y: auto;\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item {\n padding: 0.4em 1em;\n cursor: pointer;\n font-family: var(--bodyFont);\n font-size: 0.95em;\n color: var(--dark);\n transition: background 0.15s ease;\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item:hover,\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item.active {\n background: var(--lightgray);\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item.active {\n color: var(--secondary);\n font-weight: 600;\n}\n\n.search-scroll-target {\n background: color-mix(in srgb, var(--tertiary) 40%, rgba(255, 255, 255, 0));\n border-radius: 3px;\n padding: 0.1em 0;\n transition: background 1s ease;\n}\n\n.search-scroll-target.fade-out {\n background: transparent;\n}","var Rn=Object.create;var Ne=Object.defineProperty;var Wn=Object.getOwnPropertyDescriptor;var Nn=Object.getOwnPropertyNames;var zn=Object.getPrototypeOf,On=Object.prototype.hasOwnProperty;var $n=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Kn=(t,e,n,r)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let i of Nn(e))!On.call(t,i)&&i!==n&&Ne(t,i,{get:()=>e[i],enumerable:!(r=Wn(e,i))||r.enumerable});return t};var Un=(t,e,n)=>(n=t!=null?Rn(zn(t)):{},Kn(e||!t||!t.__esModule?Ne(n,\"default\",{value:t,enumerable:!0}):n,t));var fe=$n(()=>{});var C;function O(t,e,n){let r=typeof n,i=typeof t;if(r!==\"undefined\"){if(i!==\"undefined\"){if(n){if(i===\"function\"&&r===i)return function(o){return t(n(o))};if(e=t.constructor,e===n.constructor){if(e===Array)return n.concat(t);if(e===Map){var s=new Map(n);for(var u of t)s.set(u[0],u[1]);return s}if(e===Set){u=new Set(n);for(s of t.values())u.add(s);return u}}}return t}return n}return i===\"undefined\"?e:t}function Ct(t,e){return typeof t>\"u\"?e:t}function R(){return Object.create(null)}function U(t){return typeof t==\"string\"}function Lt(t){return typeof t==\"object\"}function Mt(t,e){if(U(e))t=t[e];else for(let n=0;t&&n1?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&>(this),this)};C.addMatcher=function(t,e){return typeof t==\"object\"?this.addReplacer(t,e):t.length<2&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?\"|\":\"\")+t,this.J=null,this.cache&>(this),this)};C.addReplacer=function(t,e){return typeof t==\"string\"?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&>(this),this)};C.encode=function(t,e){if(this.cache&&t.length<=this.H)if(this.F){if(this.B.has(t))return this.B.get(t)}else this.F=setTimeout(gt,50,this);this.normalize&&(typeof this.normalize==\"function\"?t=this.normalize(t):t=ze?t.normalize(\"NFKD\").replace(ze,\"\").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&t.length>3&&(t=t.replace(Xn,\"$1 $2\").replace(Zn,\"$1 $2\").replace(Jn,\"$1 \"));let n=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer),r=[],i=R(),s,u,o=this.split||this.split===\"\"?t.split(this.split):[t];for(let c=0,f,h;cthis.maxlength)){if(e){if(i[f])continue;i[f]=1}else{if(s===f)continue;s=f}if(n)r.push(f);else if(!this.filter||(typeof this.filter==\"function\"?this.filter(f):!this.filter.has(f))){if(this.cache&&f.length<=this.I)if(this.F){var l=this.D.get(f);if(l||l===\"\"){l&&r.push(l);continue}}else this.F=setTimeout(gt,50,this);if(this.stemmer){this.K||(this.K=new RegExp(\"(?!^)(\"+this.A+\")$\"));let g;for(;g!==f&&f.length>2;)g=f,f=f.replace(this.K,a=>this.stemmer.get(a))}if(f&&(this.mapper||this.dedupe&&f.length>1)){l=\"\";for(let g=0,a=\"\",D,p;g1&&(this.J||(this.J=new RegExp(\"(\"+this.h+\")\",\"g\")),f=f.replace(this.J,g=>this.matcher.get(g))),f&&this.replacer)for(l=0;f&&lthis.L&&(this.D.clear(),this.I=this.I/1.1|0)),f){if(f!==h)if(e){if(i[f])continue;i[f]=1}else{if(u===f)continue;u=f}r.push(f)}}}return this.finalize&&(r=this.finalize(r)||r),this.cache&&t.length<=this.H&&(this.B.set(t,r),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),r};function gt(t){t.F=null,t.B.clear(),t.D.clear()}function Fe(t,e,n){n||(e||typeof t!=\"object\"?typeof e==\"object\"&&(n=e,e=0):n=t),n&&(t=n.query||t,e=n.limit||e);let r=\"\"+(e||0);n&&(r+=(n.offset||0)+!!n.context+!!n.suggest+(n.resolve!==!1)+(n.resolution||this.resolution)+(n.boost||0)),t=(\"\"+t).toLowerCase(),this.cache||(this.cache=new mt);let i=this.cache.get(t+r);if(!i){let s=n&&n.cache;s&&(n.cache=!1),i=this.search(t,e,n),s&&(n.cache=s),this.cache.set(t+r,i)}return i}function mt(t){this.limit=t&&t!==!0?t:1e3,this.cache=new Map,this.h=\"\"}mt.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)};mt.prototype.get=function(t){let e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e};mt.prototype.remove=function(t){for(let e of this.cache){let n=e[0];e[1].includes(t)&&this.cache.delete(n)}};mt.prototype.clear=function(){this.cache.clear(),this.h=\"\"};var Oe={normalize:!1,numeric:!1,dedupe:!1},Ot={},ae=new Map([[\"b\",\"p\"],[\"v\",\"f\"],[\"w\",\"f\"],[\"z\",\"s\"],[\"x\",\"s\"],[\"d\",\"t\"],[\"n\",\"m\"],[\"c\",\"k\"],[\"g\",\"k\"],[\"j\",\"k\"],[\"q\",\"k\"],[\"i\",\"e\"],[\"y\",\"e\"],[\"u\",\"o\"]]),$e=new Map([[\"ae\",\"a\"],[\"oe\",\"o\"],[\"sh\",\"s\"],[\"kh\",\"k\"],[\"th\",\"t\"],[\"ph\",\"f\"],[\"pf\",\"f\"]]),Ke=[/([^aeo])h(.)/g,\"$1$2\",/([aeo])h([^aeo]|$)/g,\"$1$2\",/(.)\\1+/g,\"$1\"],Ue={a:\"\",e:\"\",i:\"\",o:\"\",u:\"\",y:\"\",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,\\u00DF:2,d:3,t:3,l:4,m:5,n:5,r:6},_e={Exact:Oe,Default:Ot,Normalize:Ot,LatinBalance:{mapper:ae},LatinAdvanced:{mapper:ae,matcher:$e,replacer:Ke},LatinExtra:{mapper:ae,replacer:Ke.concat([/(?!^)[aeo]/g,\"\"]),matcher:$e},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let n=0;n=u.length)e-=u.length;else{e=u[r?\"splice\":\"slice\"](e,n);let o=e.length;if(o&&(i=i.length?i.concat(e):e,n-=o,r&&(t.length-=o),!n))break;e=0}return i}function xt(t){if(!this||this.constructor!==xt)return new xt(t);this.index=t?[t]:[],this.length=t?t.length:0;let e=this;return new Proxy([],{get(n,r){if(r===\"length\")return e.length;if(r===\"push\")return function(i){e.index[e.index.length-1].push(i),e.length++};if(r===\"pop\")return function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()};if(r===\"indexOf\")return function(i){let s=0;for(let u=0,o,l;u=0)return s+l;s+=o.length}return-1};if(r===\"includes\")return function(i){for(let s=0;s32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}V.prototype.get=function(t){let e=this.index[this.B(t)];return e&&e.get(t)};V.prototype.set=function(t,e){var n=this.B(t);let r=this.index[n];r?(n=r.size,r.set(t,e),(n-=r.size)&&this.size++):(this.index[n]=r=new Map([[t,e]]),this.h.push(r),this.size++)};function J(t=8){if(!this||this.constructor!==J)return new J(t);this.index=R(),this.h=[],this.size=0,t>32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}J.prototype.add=function(t){var e=this.B(t);let n=this.index[e];n?(e=n.size,n.add(t),(e-=n.size)&&this.size++):(this.index[e]=n=new Set([t]),this.h.push(n),this.size++)};C=V.prototype;C.has=J.prototype.has=function(t){let e=this.index[this.B(t)];return e&&e.has(t)};C.delete=J.prototype.delete=function(t){let e=this.index[this.B(t)];e&&e.delete(t)&&this.size--};C.clear=J.prototype.clear=function(){this.index=R(),this.h=[],this.size=0};C.values=J.prototype.values=function*(){for(let t=0;t=this.priority*this.priority*3):(ge=setTimeout(Yn,0),Je=Date.now()),Ut){let s=this;return new Promise(u=>{setTimeout(function(){u(s[t+\"Async\"].apply(s,e))},0)})}let i=this[t].apply(this,e);return n=i.then?i:new Promise(s=>s(i)),r&&n.then(r),n}}var it=0;function dt(t={},e){function n(o){function l(c){c=c.data||c;let f=c.id,h=f&&s.h[f];h&&(h(c.msg),delete s.h[f])}if(this.worker=o,this.h=R(),this.worker)return i?this.worker.on(\"message\",l):this.worker.onmessage=l,t.config?new Promise(function(c){it>1e9&&(it=0),s.h[++it]=function(){c(s)},s.worker.postMessage({id:it,task:\"init\",factory:r,options:t})}):(this.priority=t.priority||4,this.encoder=e||null,this.worker.postMessage({task:\"init\",factory:r,options:t}),this)}if(!this||this.constructor!==dt)return new dt(t);let r=typeof self<\"u\"?self._factory:typeof window<\"u\"?window._factory:null;r&&(r=r.toString());let i=typeof window>\"u\",s=this,u=Gn(r,i,t.worker);return u.then?u.then(function(o){return n.call(s,o)}):n.call(this,u)}rt(\"add\");rt(\"append\");rt(\"search\");rt(\"update\");rt(\"remove\");rt(\"clear\");rt(\"export\");rt(\"import\");dt.prototype.searchCache=Fe;ye(dt.prototype);function rt(t){dt.prototype[t]=function(){let e=this,n=[].slice.call(arguments);var r=n[n.length-1];let i;return typeof r==\"function\"&&(i=r,n.pop()),r=new Promise(function(s){t===\"export\"&&typeof n[0]==\"function\"&&(n[0]=null),it>1e9&&(it=0),e.h[++it]=s,e.worker.postMessage({task:t,id:it,args:n})}),i?(r.then(i),this):r}}function Gn(t,e,n){return e?typeof module<\"u\"?new(fe()).Worker(__dirname+\"/worker/node.js\"):Promise.resolve().then(()=>Un(fe(),1)).then(function(r){return new r.Worker(import.meta.dirname+\"/node/node.mjs\")}):t?new window.Worker(URL.createObjectURL(new Blob([\"onmessage=\"+Qn.toString()],{type:\"text/javascript\"}))):new window.Worker(typeof n==\"string\"?n:import.meta.url.replace(\"/worker.js\",\"/worker/worker.js\").replace(\"flexsearch.bundle.module.min.js\",\"module/worker/worker.js\").replace(\"flexsearch.bundle.module.min.mjs\",\"module/worker/worker.js\"),{type:\"module\"})}Dt.prototype.add=function(t,e,n){if(Lt(t)&&(e=t,t=Mt(e,this.key)),e&&(t||t===0)){if(!n&&this.reg.has(t))return this.update(t,e);for(let o=0,l;oe?t.slice(n,n+e):t,r?wt.call(this,t):t;let i=[];for(let s=0,u,o;s=o){n-=o;continue}u=u.slice(n,n+e),o=u.length,n=0}if(o>e&&(u=u.slice(0,e),o=e),!i.length&&o>=e)return r?wt.call(this,u):u;if(i.push(u),e-=o,!e)break}return i=i.length>1?[].concat.apply([],i):i[0],r?wt.call(this,i):i}function Gt(t,e,n,r){var i=r[0];if(i[0]&&i[0].query)return t[e].apply(t,i);if(!(e!==\"and\"&&e!==\"not\"||t.result.length||t.await||i.suggest))return r.length>1&&(i=r[r.length-1]),(r=i.resolve)?t.await||t.result:t;let s=[],u=0,o=0,l,c,f,h,g;for(e=0;e1&&(n=n[e].apply(n,t.slice(1))),n}j.prototype.or=function(){return Gt(this,\"or\",qn,arguments)};function qn(t,e,n,r,i,s,u){return t.length&&(this.result.length&&t.push(this.result),t.length<2?this.result=t[0]:(this.result=en(t,e,n,!1,this.h),n=0)),i&&(this.await=null),i?this.resolve(e,n,r,u):this}j.prototype.and=function(){return Gt(this,\"and\",ti,arguments)};function ti(t,e,n,r,i,s,u){if(!s&&!this.result.length)return i?this.result:this;let o;if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{let l=0;for(let c=0,f,h;c1?y.join(\" \"):y[0];let w;if(y&&B){for(var v=B.length,M=(Q.split?B.replace(Q.split,\"\"):B).length-y.length,T=\"\",W=0,z=0;z-1&&(T=(N?B.substring(0,N):\"\")+u+B.substring(N,N+P)+o+(N+P=l)break}if(b=ht.length*(s.length-2),a||D||l&&d.length-b>l)if(b=l+b-g*2,k=x-A,a>0&&(k+=a),D>0&&(k+=D),k<=b)F=a?A-(a>0?a:0):A-((b-k)/2|0),m=D?x+(D>0?D:0):F+b,c||(F>0&&d.charAt(F)!==\" \"&&d.charAt(F-1)!==\" \"&&(F=d.indexOf(\" \",F),F<0&&(F=0)),m=m.length-1){if(I>=m.length){k[w+1]=1,I>=F.length&&(b[w+1]=1);continue}v-=g}if(d=m[I].text,P=D&&y[w])if(P>0){if(d.length>P)if(k[w+1]=1,c)d=d.substring(0,P);else continue;(P-=d.length)||(P=-1),y[w]=P}else{k[w+1]=1;continue}if(v+d.length+1<=l)d=\" \"+d,x[w]+=d;else if(c)$=l-v-1,$>0&&(d=\" \"+d.substring(0,$),x[w]+=d),k[w+1]=1;else{k[w+1]=1;continue}}else{if(k[w])continue;if(I-=M,A[I]){v-=g,k[w]=1,b[w]=1;continue}if(I<=0){if(I<0){k[w]=1,b[w]=1;continue}v-=g}if(d=m[I].text,P=a&&B[w])if(P>0){if(d.length>P)if(k[w]=1,c)d=d.substring(d.length-P);else continue;(P-=d.length)||(P=-1),B[w]=P}else{k[w]=1;continue}if(v+d.length+1<=l)d+=\" \",x[w]=d+x[w];else if(c)$=d.length+1-(l-v),$>=0&&$=F.length-1||I1?en(l,n,r,u,s):(l=l[0])&&n&&l.length>n||r?l.slice(r,n+r):l;else{if(tn||r)&&(l=l.slice(r,n+r));else{i=[];for(let h=0,g;hr)r-=g.length;else if((n&&g.length>n||r)&&(g=g.slice(r,n+r),n-=g.length,r&&(r-=g.length)),i.push(g),!n)break}l=i}}return l}function en(t,e,n,r,i){let s=[],u=R(),o;var l=t.length;let c;if(r){for(i=l-1;i>=0;i--)if(c=(r=t[i])&&r.length){for(l=0;l=0;f--){h=t[f];for(let a=0;a1?Jt(i,1,0,0,l,c):i[0],B)})}return a?i:new j(i.length>1?Jt(i,1,0,0,l,c):i[0],this)}}a||u||!(h=h||this.field)||(U(h)?u=h:(h.constructor===Array&&h.length===1&&(h=h[0]),u=h.field||h.index)),h&&h.constructor!==Array&&(h=[h])}h||(h=this.field);let b;m=(this.worker||this.db)&&!r&&[];for(let B=0,y,v,M;B\"u\"&&(this.db?m.push(p=this.index.get(this.field[0]).db.enrich(p)):p=wt.call(this,p)),u)return a?D?Vt(t,p,this.index,u,D):p:new j(p,this);i[F]={field:s[F],result:p}}if(d&&this.db&&m.length){let B=this;return Promise.all(m).then(function(y){for(let v=0;v0&&((n&&e>n||r)&&(t=t.slice(r,r+n)),i&&(t=wt.call(this,t))),t):[]):[]}function wt(t){if(!this||!this.store)return t;if(this.db)return this.index.get(this.field[0]).db.enrich(t);let e=Array(t.length);for(let n=0,r;n1?n:n[0]}C.append=function(t,e){return this.add(t,e,!0)};C.update=function(t,e){return this.remove(t).add(t,e)};C.remove=function(t){Lt(t)&&(t=Mt(t,this.key));for(var e of this.index.values())e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let r of n){e=r[0];let i=r[1],s=i.indexOf(t);s>-1&&(i.length>1?i.splice(s,1):n.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this};C.clear=function(){let t=[];for(let e of this.index.values()){let n=e.clear();n.then&&t.push(n)}if(this.tag)for(let e of this.tag.values())e.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this};C.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)};C.cleanup=function(){for(let t of this.index.values())t.cleanup();return this};C.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then(function(e){return e[0]&&e[0].doc||null}):this.store.get(t)||null};C.set=function(t,e){return typeof t==\"object\"&&(e=t,t=Mt(e,this.key)),this.store.set(t,e),this};C.searchCache=Fe;C.export=ui;C.import=oi;ye(Dt.prototype);function Ae(t,e=0){let n=[],r=[];e&&(e=25e4/e*5e3|0);for(let i of t.entries())r.push(i),r.length===e&&(n.push(r),r=[]);return r.length&&n.push(r),n}function we(t,e){e||(e=new Map);for(let n=0,r;n2?n[0]:\"\";if(n=n.length>2?n[2]:n[1],this.worker&&r)return this.index.get(r).import(t);if(e){if(typeof e==\"string\"&&(e=JSON.parse(e)),r)return this.index.get(r).import(n,e);switch(n){case\"reg\":this.fastupdate=!1,this.reg=un(e,this.reg);for(let i=0,s;i=0&&i.splice(u,1)}}else jt(this.map,t),this.depth&&jt(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.M&&on(this)),this.cache&&this.cache.remove(t),this};function jt(t,e){let n=0;var r=typeof e>\"u\";if(t.constructor===Array){for(let i=0,s,u,o;i=0){if(s.length>1)return s.splice(u,1),1;if(delete t[i],n)return 1;o=1}else{if(o)return 1;n++}}}else for(let i of t.entries())r=i[0],jt(i[1],e)?n++:t.delete(r);return n}var li={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:\"forward\"},score:{resolution:9,context:{depth:2,resolution:3}}};X.prototype.add=function(t,e,n,r){if(e&&(t||t===0)){if(!r&&!n&&this.reg.has(t))return this.update(t,e);r=this.depth,e=this.encoder.encode(e,!r);let c=e.length;if(c){let f=R(),h=R(),g=this.resolution;for(let a=0;a2){for(let p=1,d,F,m,A;p2){for(let p=0,d;pp;s--){u=D.substring(p,s),d=this.rtl?i-1-p:p;var o=this.score?this.score(e,D,a,u,d):Kt(g,c,a,i,d);G(this,h,u,o,t,n)}break}case\"bidirectional\":case\"reverse\":if(i>1){for(o=i-1;o>0;o--){u=D[this.rtl?i-1-o:o]+u;var l=this.score?this.score(e,D,a,u,o):Kt(g,c,a,i,o);G(this,h,u,l,t,n)}u=\"\"}case\"forward\":if(i>1){for(o=0;o1&&au;let p=this.score?this.score(e,u,a,D,o-1):Kt(i+(c/2>i?0:1),c,a,s-1,o-1);G(this,f,l?u:D,p,t,n,l?D:u)}}}}this.fastupdate||this.reg.add(t)}}return this.db&&(this.commit_task.push(n?{ins:t}:{del:t}),this.M&&on(this)),this};function G(t,e,n,r,i,s,u){let o,l;if(!(o=e[n])||u&&!o[u]){if(u?(e=o||(e[n]=R()),e[u]=1,l=t.ctx,(o=l.get(u))?l=o:l.set(u,l=t.keystore?new V(t.keystore):new Map)):(l=t.map,e[n]=1),(o=l.get(n))?l=o:l.set(n,l=o=[]),s){for(let c=0,f;c1?e+(r||0)<=t?n+(i||0):(t-1)/(e+(r||0))*(n+(i||0))+1|0:0}X.prototype.search=function(t,e,n){if(n||(e||typeof t!=\"object\"?typeof e==\"object\"&&(n=e,e=0):(n=t,t=\"\")),n&&n.cache)return n.cache=!1,t=this.searchCache(t,e,n),n.cache=!0,t;let r=[],i,s,u,o=0,l,c,f,h,g;n&&(t=n.query||t,e=n.limit||e,o=n.offset||0,s=n.context,u=n.suggest,g=(l=n.resolve)&&n.enrich,f=n.boost,h=n.resolution,c=this.db&&n.tag),typeof l>\"u\"&&(l=this.resolve),s=this.depth&&s!==!1;let a=this.encoder.encode(t,!s);if(i=a.length,e=e||(l?100:0),i===1)return Ye.call(this,a[0],\"\",e,o,l,g,c);if(i===2&&s&&!u)return Ye.call(this,a[1],a[0],e,o,l,g,c);let D=R(),p=0,d;if(s&&(d=a[0],p=1),h||h===0||(h=d?this.N:this.resolution),this.db){if(this.db.search&&(n=this.db.search(this,a,e,o,u,l,g,c),n!==!1))return n;let F=this;return(async function(){for(let m,A;p1)l=Jt(t,e,n,r,i,s,u);else if(o===1)return u?Ce.call(null,t[0],n,r):new j(t[0],this);return u?l:new j(l,this)}function Ye(t,e,n,r,i,s,u){return t=me(this,t,e,n,r,i,s,u),this.db?t.then(function(o){return i?o||[]:new j(o,this)}):t&&t.length?i?Ce.call(this,t,n,r):new j(t,this):i?[]:new j([],this)}function Ge(t,e,n,r){let i=[];if(t&&t.length){if(t.length<=r){e.push(t);return}for(let s=0,u;sn)&&(l=n,n=e,e=l),t.db?t.db.get(e,n,r,i,s,u,o):(t=n?(t=t.ctx.get(n))&&t.get(e):t.map.get(e),t)}function X(t,e){if(!this||this.constructor!==X)return new X(t);if(t){var n=U(t)?t:t.preset;n&&(t=Object.assign({},li[n],t))}else t={};n=t.context;let r=n===!0?{depth:1}:n||{},i=U(t.encoder)?_e[t.encoder]:t.encode||t.encoder||{};this.encoder=i.encode?i:typeof i==\"object\"?new vt(i):{encode:i},this.resolution=t.resolution||9,this.tokenize=n=(n=t.tokenize)&&n!==\"default\"&&n!==\"exact\"&&n||\"strict\",this.depth=n===\"strict\"&&r.depth||0,this.bidirectional=r.bidirectional!==!1,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(n=t.keystore||0)&&(this.keystore=n),this.map=n?new V(n):new Map,this.ctx=n?new V(n):new Map,this.reg=e||(this.fastupdate?n?new V(n):new Map:n?new J(n):new Set),this.N=r.resolution||3,this.rtl=i.rtl||t.rtl||!1,this.cache=(n=t.cache||null)&&new mt(n),this.resolve=t.resolve!==!1,(n=t.db)&&(this.db=this.mount(n)),this.M=t.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}C=X.prototype;C.mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)};C.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)};C.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function on(t){t.commit_timer||(t.commit_timer=setTimeout(function(){t.commit_timer=null,t.db.commit(t)},1))}C.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db?(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[],this.db.clear()):this};C.append=function(t,e){return this.add(t,e,!0)};C.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)};C.update=function(t,e){let n=this,r=this.remove(t);return r&&r.then?r.then(()=>n.add(t,e)):this.add(t,e)};C.cleanup=function(){return this.fastupdate?(jt(this.map),this.depth&&jt(this.ctx),this):this};C.searchCache=Fe;C.export=function(t,e,n=0,r=0){let i,s;switch(r){case 0:i=\"reg\",s=sn(this.reg);break;case 1:i=\"cfg\",s=null;break;case 2:i=\"map\",s=Ae(this.map,this.reg.size);break;case 3:i=\"ctx\",s=nn(this.ctx,this.reg.size);break;default:return}return Zt.call(this,t,e,i,s,n,r)};C.import=function(t,e){if(e)switch(typeof e==\"string\"&&(e=JSON.parse(e)),t=t.split(\".\"),t[t.length-1]===\"json\"&&t.pop(),t.length===3&&t.shift(),t=t.length>1?t[1]:t[0],t){case\"reg\":this.fastupdate=!1,this.reg=un(e,this.reg);break;case\"map\":this.map=we(e,this.map);break;case\"ctx\":this.ctx=rn(e,this.ctx)}};C.serialize=function(t=!0){let e=\"\",n=\"\",r=\"\";if(this.reg.size){let s;for(var i of this.reg.keys())s||(s=typeof i),e+=(e?\",\":\"\")+(s===\"string\"?'\"'+i+'\"':i);e=\"index.reg=new Set([\"+e+\"]);\",n=Ze(this.map,s),n=\"index.map=new Map([\"+n+\"]);\";for(let u of this.ctx.entries()){i=u[0];let o=Ze(u[1],s);o=\"new Map([\"+o+\"])\",o='[\"'+i+'\",'+o+\"]\",r+=(r?\",\":\"\")+o}r=\"index.ctx=new Map([\"+r+\"]);\"}return t?\"function inject(index){\"+e+n+r+\"}\":e+n+r};ye(X.prototype);var ln=typeof window<\"u\"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Qt=[\"map\",\"ctx\",\"tag\",\"reg\",\"cfg\"],pt=R();function Yt(t,e={}){if(!this||this.constructor!==Yt)return new Yt(t,e);typeof t==\"object\"&&(e=t,t=t.name),t||console.info(\"Default storage space was used, because a name was not passed.\"),this.id=\"flexsearch\"+(t?\":\"+t.toLowerCase().replace(/[^a-z0-9_\\-]/g,\"\"):\"\"),this.field=e.field?e.field.toLowerCase().replace(/[^a-z0-9_\\-]/g,\"\"):\"\",this.type=e.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}C=Yt.prototype;C.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())};C.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),pt[t.id]||(pt[t.id]=[]),pt[t.id].push(t.field);let e=ln.open(t.id,1);return e.onupgradeneeded=function(){let n=t.db=this.result;for(let r=0,i;r=f.length){r-=f.length;continue}let h=n?r+Math.min(f.length-r,n):f.length;for(let g=r;g=s.length?[]:!e&&!n?s:(s=s.slice(n,n+e),r?i.enrich(s):s)})};C.enrich=function(t){typeof t!=\"object\"&&(t=[t]);let e=this.db.transaction(\"reg\",\"readonly\").objectStore(\"reg\"),n=[];for(let r=0;r=0)if(i=1,o.length>1)o.splice(c,1);else{r[u]=[];break}s+=o.length}if(n)break}s?i&&t.update(r):t.delete(),t.continue()}C.remove=function(t){return typeof t!=\"object\"&&(t=[t]),Promise.all([this.transaction(\"map\",\"readwrite\",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction(\"ctx\",\"readwrite\",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction(\"tag\",\"readwrite\",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t,!0)}}),this.transaction(\"reg\",\"readwrite\",function(e){for(let n=0;n{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,n(this.result)},t.onerror=t.onblocked=r,t=null})}var hn={Index:X,Charset:_e,Encoder:vt,Document:Dt,Worker:dt,Resolver:j,IndexedDB:Yt,Language:{}};var Ni=Object.hasOwnProperty;var gn,H,dn,hi,ut,cn,Dn,mn,ve,te,It,Fn,Te,Be,ke,ci,_n={},ne=[],fi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,re=Array.isArray;function q(t,e){for(var n in e)t[n]=e[n];return t}function Se(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function xe(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++dn,__i:-1,__u:0};return i==null&&H.vnode!=null&&H.vnode(s),s}function kt(t){return t.children}function ee(t,e){this.props=t,this.context=e}function Bt(t,e){if(e==null)return t.__?Bt(t.__,t.__i+1):null;for(var n;ee&&ut.sort(mn),t=ut.shift(),e=ut.length,ai(t)}finally{ut.length=ie.__r=0}}function Cn(t,e,n,r,i,s,u,o,l,c,f){var h,g,a,D,p,d,F,m=r&&r.__k||ne,A=e.length;for(l=pi(n,e,m,l,A),h=0;h0?u=t.__k[s]=xe(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):t.__k[s]=u,l=s+g,u.__=t,u.__b=t.__b+1,o=null,(c=u.__i=gi(u,n,l,h))!=-1&&(h--,(o=n[c])&&(o.__u|=2)),o==null||o.__v==null?(c==-1&&(i>f?g--:il?g--:g++,u.__u|=4))):t.__k[s]=null;if(h)for(s=0;s(f?1:0)){for(i=n-1,s=n+1;i>=0||s=0?i--:s++])!=null&&(2&c.__u)==0&&o==c.key&&l==c.type)return u}return-1}function an(t,e,n){e[0]==\"-\"?t.setProperty(e,n??\"\"):t[e]=n==null?\"\":typeof n!=\"number\"||fi.test(e)?n:n+\"px\"}function qt(t,e,n,r,i){var s,u;t:if(e==\"style\")if(typeof n==\"string\")t.style.cssText=n;else{if(typeof r==\"string\"&&(t.style.cssText=r=\"\"),r)for(e in r)n&&e in n||an(t.style,e,\"\");if(n)for(e in n)r&&n[e]==r[e]||an(t.style,e,n[e])}else if(e[0]==\"o\"&&e[1]==\"n\")s=e!=(e=e.replace(Fn,\"$1\")),u=e.toLowerCase(),e=u in t||e==\"onFocusOut\"||e==\"onFocusIn\"?u.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n[It]=r[It]:(n[It]=Te,t.addEventListener(e,s?ke:Be,s)):t.removeEventListener(e,s?ke:Be,s);else{if(i==\"http://www.w3.org/2000/svg\")e=e.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(e!=\"width\"&&e!=\"height\"&&e!=\"href\"&&e!=\"list\"&&e!=\"form\"&&e!=\"tabIndex\"&&e!=\"download\"&&e!=\"rowSpan\"&&e!=\"colSpan\"&&e!=\"role\"&&e!=\"popover\"&&e in t)try{t[e]=n??\"\";break t}catch{}typeof n==\"function\"||(n==null||n===!1&&e[4]!=\"-\"?t.removeAttribute(e):t.setAttribute(e,e==\"popover\"&&n==1?\"\":n))}}function pn(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[te]==null)e[te]=Te++;else if(e[te]0?t:re(t)?t.map(wn):q({},t)}function Di(t,e,n,r,i,s,u,o,l){var c,f,h,g,a,D,p,d=n.props||_n,F=e.props,m=e.type;if(m==\"svg\"?i=\"http://www.w3.org/2000/svg\":m==\"math\"?i=\"http://www.w3.org/1998/Math/MathML\":i||(i=\"http://www.w3.org/1999/xhtml\"),s!=null){for(c=0;c\"u\"?\"\":document.body?.dataset?.basepath??\"\"}function Me(t,e){let n=e??_i(),r=t.startsWith(\"/\")?t:\"/\"+t;return n+r}function tt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function xn(t,e){if(!t)return()=>{};let n=i=>{t.classList.contains(\"active\")&&i.target===t&&(i.preventDefault(),i.stopPropagation(),e())},r=i=>{t.classList.contains(\"active\")&&i.key===\"Escape\"&&(i.preventDefault(),e())};return t.addEventListener(\"click\",n),document.addEventListener(\"keydown\",r),()=>{t.removeEventListener(\"click\",n),document.removeEventListener(\"keydown\",r)}}function Bn(t,e){let n=t.querySelectorAll(\"[src], [href]\");for(let r of Array.from(n)){let i=r.hasAttribute(\"href\")?\"href\":\"src\",s=r.getAttribute(i);if(s&&!(s.startsWith(\"http://\")||s.startsWith(\"https://\")||s.startsWith(\"mailto:\")||s.startsWith(\"tel:\")||s.startsWith(\"#\")||s.startsWith(\"/\")||s.startsWith(\"data:\")))try{let u=new URL(s,e).toString();r.setAttribute(i,u)}catch{continue}}}function se(t){return t.replaceAll(\"&\",\"&\").replaceAll(\"<\",\"<\").replaceAll(\">\",\">\").replaceAll('\"',\""\").replaceAll(\"'\",\"'\")}var je=\"basic\",bt=\"\",kn=8,yi=5,ue=30,Ci=t=>{let e=[],n=-1,r=-1,i=t.toLowerCase(),s=0;for(let u of i){let o=u.codePointAt(0);o>=12352&&o<=12447||o>=12448&&o<=12543||o>=19968&&o<=40959||o>=44032&&o<=55215||o>=131072&&o<=173791?(n!==-1&&(e.push(i.slice(n,r)),n=-1),e.push(u)):o===32||o===9||o===10||o===13?n!==-1&&(e.push(i.slice(n,r)),n=-1):(n===-1&&(n=s),r=s+1),s+=u.length}return n!==-1&&e.push(i.slice(n)),e},le=new hn.Document({encode:Ci,document:{id:\"id\",tag:\"tags\",index:[{field:\"title\",tokenize:\"forward\"},{field:\"content\",tokenize:\"forward\"},{field:\"tags\",tokenize:\"forward\"}]}}),Z=null,Ht=[],Pt=[],Ie=new Map;function oe(t){let e=t.split(/\\s+/),n=[],r=[];for(let i of e)i.startsWith(\"#\")&&i.length>1?n.push(i.substring(1)):i!==\"#\"&&r.push(i);return{tags:n,query:r.join(\" \").trim()}}function bn(t){let e=t.split(/\\s+/),n=e[e.length-1];return n&&n.startsWith(\"#\")?n.substring(1):null}var Sn=new DOMParser;async function Ei(t){if(Ie.has(t))return Ie.get(t);let e=new URL(Me(t),window.location.origin).toString();try{let n=await fetch(e);if(!n.ok)return[];let r=await n.text(),i=Sn.parseFromString(r??\"\",\"text/html\");Bn(i,e);let s=Array.from(i.getElementsByClassName(\"popover-hint\"));return Ie.set(t,s),s}catch{return[]}}var He=[];function Ft(t){He.push(t)}function Ai(){He.forEach(t=>t()),He.length=0}async function wi(){let t=document.querySelectorAll(\".search\");for(let e of Array.from(t)){let n=e.querySelector(\".search-container\"),r=e.querySelector(\".search-button\"),i=e.querySelector(\".search-bar\"),s=e.querySelector(\".search-layout\");if(!n||!r||!i||!s)continue;let u=n.closest(\".sidebar\"),o=s.getAttribute(\"data-preview\")===\"true\",l=s.getAttribute(\"data-field-priority\"),c=l?JSON.parse(l):[\"title\",\"content\",\"tags\"],f=s.querySelector(\".results-container\");f||(f=document.createElement(\"div\"),f.className=\"results-container\",f.setAttribute(\"role\",\"listbox\"),f.setAttribute(\"aria-label\",\"Search results\"),s.appendChild(f));let h=s.querySelector(\".preview-container\");o&&!h&&(h=document.createElement(\"div\"),h.className=\"preview-container\",s.appendChild(h));let g=document.createElement(\"div\");g.className=\"tag-suggestions\",g.setAttribute(\"role\",\"listbox\"),g.setAttribute(\"aria-label\",\"Tag suggestions\"),g.style.display=\"none\";let a=i.parentElement;a.insertBefore(g,i.nextSibling);let D=document.createElement(\"span\");D.className=\"ghost-text\",D.setAttribute(\"aria-hidden\",\"true\"),a.insertBefore(D,i.nextSibling);let p=-1,d=[],F=!1,m=_=>{if(p<0||p>=d.length){D.textContent=\"\";return}let E=d[p];if(!E.toLowerCase().startsWith(_.toLowerCase())){D.textContent=\"\";return}let L=E.substring(_.length);D.innerHTML=\"\";let S=document.createElement(\"span\");S.style.visibility=\"hidden\",S.textContent=i.value,D.appendChild(S),D.appendChild(document.createTextNode(L))},A=()=>{g.querySelectorAll(\".tag-suggestion-item\").forEach((L,S)=>{L.classList.toggle(\"active\",S===p)});let E=bn(i.value)||\"\";m(E)},x=()=>{F=!1,p=-1,d=[],g.style.display=\"none\",D.textContent=\"\"},b=_=>{let E=i.value,L=E.lastIndexOf(\"#\");L!==-1&&(i.value=E.substring(0,L)+\"#\"+_+\" \"),x(),i.focus(),i.dispatchEvent(new Event(\"input\"))},k=_=>{if(Rt){if(d=_===\"\"?Pt.slice(0,10):Pt.filter(E=>E.toLowerCase().startsWith(_.toLowerCase())).slice(0,10),d.length===0){x();return}p=0,F=!0,tt(g);for(let E=0;E!F||d.length===0?!1:(_===\"down\"?p=Math.min(p+1,d.length-1):p=Math.max(p-1,0),A(),!0),y=null,v=0,M=null,T=()=>{n.classList.remove(\"active\"),u&&(u.style.zIndex=\"\"),r.setAttribute(\"aria-expanded\",\"false\"),i.value=\"\",tt(f),h&&tt(h),s.classList.remove(\"display-results\"),je=\"basic\",y=null,x(),r.focus()},W=_=>{je=_,u&&(u.style.zIndex=\"9999\"),n.classList.add(\"active\"),r.setAttribute(\"aria-expanded\",\"true\"),i.focus()},z=async _=>{if(tt(f),_.length===0){let E=document.createElement(\"a\");E.className=\"result-card no-match\";let L=document.createElement(\"h3\");L.textContent=\"No results.\";let S=document.createElement(\"p\");S.textContent=\"Try another search term?\",E.appendChild(L),E.appendChild(S),f.appendChild(E),y=null,h&&tt(h)}else for(let E of _){let L=document.createElement(\"a\");L.className=\"result-card\",L.id=E.slug,L.href=Me(E.slug);let S=document.createElement(\"h3\");if(S.className=\"card-title\",S.innerHTML=E.title,L.appendChild(S),E.tags.length>0){let K=document.createElement(\"ul\");K.className=\"tags\",K.innerHTML=E.tags.join(\"\"),L.appendChild(K)}let Y=document.createElement(\"p\");Y.className=\"card-description\",Y.innerHTML=E.content,L.appendChild(Y),f.appendChild(L)}},N=()=>Array.from(f.querySelectorAll(\".result-card:not(.no-match)\")),P=()=>{let _=oe(bt);return _.query||(_.tags.length>0?_.tags.join(\" \"):bt)},$=async _=>{if(!h||(tt(h),!_))return;let E=_.id,L=++v,S=await Ei(E);if(L!==v)return;let Y=P(),K=document.createElement(\"div\");K.className=\"preview-inner\";for(let ct of S){let yt=ct.cloneNode(!0);Y.trim()!==\"\"&&(yt.innerHTML=vi(Y,yt)),K.appendChild(yt)}h.appendChild(K),requestAnimationFrame(()=>{let ct=Array.from(h.getElementsByClassName(\"highlight\"));if(ct.length===0)return;ct.sort((he,ce)=>ce.innerHTML.length-he.innerHTML.length);let yt=ct[0],Nt=0,ft=yt;for(;ft&&ft!==h;)Nt+=ft.offsetTop,ft=ft.offsetParent;h.scrollTop=Math.max(0,Nt-50)})},et=_=>{y&&y.classList.remove(\"focus\"),y=_,y&&(y.classList.add(\"focus\"),y.scrollIntoView({block:\"nearest\"})),M&&clearTimeout(M),M=setTimeout(()=>$(y),150)},Q=_=>{let E=N();if(E.length===0){et(null);return}let L=Math.min(Math.max(_,0),E.length-1);et(E[L]??null)},Wt=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):-1;Q(E+1)},ot=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):_.length;Q(E-1)},nt=async _=>{let E=_.target.value;bt=E;let L=bn(E);L!==null?k(L):x();let S=oe(E),Y=S.query!==\"\"||S.tags.length>0;if(s.classList.toggle(\"display-results\",Y),je=S.tags.length>0&&!S.query?\"tags\":\"basic\",!Y){tt(f),h&&tt(h),y=null;return}let K;S.query?K=await le.searchAsync({query:S.query,limit:S.tags.length>0?1e4:kn,index:[\"title\",\"content\"]}):S.tags.length>0?K=await le.searchAsync({query:S.tags[0],limit:1e4,index:[\"tags\"]}):K=[];let ct=at=>{let Tt=K.filter(zt=>zt.field===at);return Tt.length===0?[]:[...Tt[0].result]},Nt=[...new Set(c.flatMap(at=>ct(at)))].filter(at=>{if(S.tags.length===0)return!0;let Tt=Ht[at];if(!Tt)return!1;let zt=Z?.[Tt];if(!zt)return!1;let In=zt.tags||[];return S.tags.every(Hn=>In.some(Pn=>Pn.toLowerCase()===Hn.toLowerCase()))}),ft=S.query||(S.tags.length>0?S.tags.join(\" \"):E),he=Nt.map(at=>Bi(ft,at));await z(he.slice(0,kn));let ce=N();et(ce[0]??null)},lt=_=>{_.stopPropagation(),W(\"basic\")};r.addEventListener(\"click\",lt),Ft(()=>r.removeEventListener(\"click\",lt)),i.addEventListener(\"input\",nt),Ft(()=>i.removeEventListener(\"input\",nt));let ht=_=>{if(F){if(_.key===\"ArrowDown\"){_.preventDefault(),B(\"down\");return}if(_.key===\"ArrowUp\"){_.preventDefault(),B(\"up\");return}if(_.key===\"Tab\"){_.preventDefault(),p>=0&&p=0&&pi.removeEventListener(\"keydown\",ht));let w=_=>{_.key===\"k\"&&(_.ctrlKey||_.metaKey)&&!_.shiftKey?(_.preventDefault(),n.classList.contains(\"active\")?T():W(\"basic\")):_.shiftKey&&(_.ctrlKey||_.metaKey)&&_.key.toLowerCase()===\"k\"&&(_.preventDefault(),W(\"tags\"),i.value=\"#\",i.dispatchEvent(new Event(\"input\")))};document.addEventListener(\"keydown\",w),Ft(()=>document.removeEventListener(\"keydown\",w));let I=()=>{let _=oe(bt),E=_.query||(_.tags.length>0?_.tags.join(\" \"):bt);E.trim()&&sessionStorage.setItem(\"search-term\",E.trim())},_t=_=>{let E=_.target.closest(\".result-card\");!E||E.classList.contains(\"no-match\")||_ instanceof MouseEvent&&(_.altKey||_.ctrlKey||_.metaKey||_.shiftKey)||(I(),T())},Pe=_=>{let E=_.target.closest(\".result-card\");!E||E.classList.contains(\"no-match\")||et(E)};f.addEventListener(\"click\",_t),f.addEventListener(\"mouseover\",Pe),Ft(()=>{f.removeEventListener(\"click\",_t),f.removeEventListener(\"mouseover\",Pe)});let Re=_=>{let E=_.target.closest(\".tag-suggestion-item\");if(!E)return;let L=E.getAttribute(\"data-tag\");L&&b(L)},We=_=>{let E=_.target.closest(\".tag-suggestion-item\");if(!E)return;let L=E.getAttribute(\"data-index\");L!==null&&(p=parseInt(L,10),A())};g.addEventListener(\"click\",Re),g.addEventListener(\"mouseover\",We),Ft(()=>{g.removeEventListener(\"click\",Re),g.removeEventListener(\"mouseover\",We)});let jn=xn(n,T);Ft(jn)}}function Ln(t){let e=t.split(/\\s+/).filter(r=>r.trim()!==\"\"),n=e.length;if(n>1)for(let r=1;ri.length-r.length)}function vi(t,e){let n=Ln(t).filter(c=>c.trim()!==\"\");if(n.length===0)return e.innerHTML;let r=Sn.parseFromString(e.innerHTML,\"text/html\"),i=n.map(c=>c.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")).join(\"|\");if(i===\"\")return e.innerHTML;let s=new RegExp(i,\"gi\"),u=r.createTreeWalker(r.body,NodeFilter.SHOW_TEXT),o=[],l=u.nextNode();for(;l;)o.push(l),l=u.nextNode();for(let c of o){let f=c.nodeValue??\"\";if(s.lastIndex=0,!s.test(f))continue;s.lastIndex=0;let h=r.createDocumentFragment(),g=0,a;for(;(a=s.exec(f))!==null;){a.index>g&&h.appendChild(r.createTextNode(f.slice(g,a.index)));let D=r.createElement(\"span\");D.className=\"highlight\",D.textContent=a[0],h.appendChild(D),g=a.index+a[0].length}gl!==\"\"),s=0,u=i.length-1;if(n){let l=g=>r.some(a=>g.toLowerCase().startsWith(a.toLowerCase())),c=i.map(l),f=0,h=0;for(let g=0;gp+(d?1:0),0);D>=f&&(f=D,h=g)}s=Math.max(h-ue,0),u=Math.min(s+2*ue,i.length-1),i=i.slice(s,u)}let o=i.map(l=>{let c=l;for(let f of r)if(l.toLowerCase().includes(f.toLowerCase())){let h=new RegExp(f.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\"),\"gi\");c=l.replace(h,g=>`${g}`);break}return c}).join(\" \");return(s===0?\"\":\"...\")+o+(u===i.length-1?\"\":\"...\")}function xi(t,e){return!e||e.length===0||t.length===0?[]:e.map(n=>{let r=se(n);return t.some(i=>n.toLowerCase().includes(i.toLowerCase()))?`
  • #${r}

  • `:`
  • #${r}

  • `}).slice(0,yi)}function Bi(t,e){let n=Ht[e];if(!n||!Z)return{id:e,slug:\"\",title:\"\",content:\"\",tags:[]};let r=Z[n];if(!r)return{id:e,slug:n,title:\"\",content:\"\",tags:[]};let i=oe(bt);return{id:e,slug:n,title:i.tags.length>0&&!i.query?se(r.title):Tn(t,r.title||\"\"),content:Tn(t,r.content||\"\",!0),tags:xi(i.tags,r.tags)}}async function ki(){if(!Z)return;let t=0,e=[],n=new Set;for(let r of Object.keys(Z)){let i=Z[r];if(i){Ht[t]=r;for(let s of i.tags||[])n.add(s);e.push(le.addAsync(t,{id:t,slug:r,title:i.title||\"\",content:i.content||\"\",tags:i.tags||[]})),t++}}await Promise.all(e),Pt=[...n].sort()}async function bi(){return await fetchData}var Rt=!1;async function Ti(){Rt||(Z=await bi(),await ki(),Rt=!0)}async function Si(t){if(!Rt||!Z)return 0;let e=new Set(Pt),n=0;for(let r of Object.keys(t)){if(Z[r])continue;let i=t[r];if(!i)continue;let s=Ht.length;Ht[s]=r,Z[r]=i;for(let u of i.tags||[])e.add(u);await le.addAsync(s,{id:s,slug:r,title:i.title||\"\",content:i.content||\"\",tags:i.tags||[]}),n++}return Pt=[...e].sort(),n}document.addEventListener(\"content-index-updated\",t=>{let e=t.detail;if(!Rt||!Z)return;let n=e?.slugs;!Array.isArray(n)||n.length===0||(async()=>{try{let r=await fetchData;if(!r||typeof r!=\"object\")return;let i=r.content&&typeof r.content==\"object\"?r.content:r,s={};for(let u of n){let o=i[u];o&&typeof o==\"object\"&&(s[u]=o)}await Si(s)}catch{}})()});function Li(){let t=sessionStorage.getItem(\"search-term\");t&&(sessionStorage.removeItem(\"search-term\"),requestAnimationFrame(()=>{let e=document.querySelectorAll(\".popover-hint p, .popover-hint li, .popover-hint h1, .popover-hint h2, .popover-hint h3, .popover-hint h4, .popover-hint h5, .popover-hint h6, .popover-hint td, .popover-hint th, .popover-hint blockquote, article p, article li, article h1, article h2, article h3\");for(let n of Array.from(e)){let i=(n.textContent??\"\").toLowerCase().indexOf(t.toLowerCase());if(i===-1)continue;let s=document.createTreeWalker(n,NodeFilter.SHOW_TEXT),u=0,o,l=null,c=0,f=null,h=0;for(;o=s.nextNode();){let g=o.nodeValue?.length??0;if(!l&&u+g>i&&(l=o,c=i-u),l&&u+g>=i+t.length){f=o,h=i+t.length-u;break}u+=g}if(!(!l||!f)){try{let g=document.createRange();g.setStart(l,c),g.setEnd(f,h);let a=document.createElement(\"span\");a.className=\"search-scroll-target\",g.surroundContents(a),a.scrollIntoView({block:\"center\",behavior:\"smooth\"}),setTimeout(()=>{a.classList.add(\"fade-out\"),setTimeout(()=>{let D=a.parentNode;D&&(D.replaceChild(document.createTextNode(a.textContent||\"\"),a),D.normalize())},1e3)},2e3)}catch{n.scrollIntoView({block:\"center\",behavior:\"smooth\"})}break}}}))}async function Mn(){Ai(),await Ti(),await wi(),Li()}document.addEventListener(\"nav\",Mn);document.addEventListener(\"render\",Mn);\n","/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { NULL } from '../constants';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw the error that was caught (except\n * for unmounting when this parameter is the highest parent that was being\n * unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component,\n\t\t/** @type {import('../internal').ComponentType} */\n\t\tctor,\n\t\t/** @type {boolean} */\n\t\thandled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != NULL) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != NULL) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { MODE_HYDRATE, NULL } from './constants';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function BaseComponent(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nBaseComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != NULL && this._nextState != this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == NULL) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nBaseComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](https://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {ComponentChildren | void}\n */\nBaseComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == NULL) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._index + 1)\n\t\t\t: NULL;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != NULL && sibling._dom != NULL) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : NULL;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tif (component._parentDom && component._dirty) {\n\t\tlet oldVNode = component._vnode,\n\t\t\toldDom = oldVNode._dom,\n\t\t\tcommitQueue = [],\n\t\t\trefQueue = [],\n\t\t\tnewVNode = assign({}, oldVNode);\n\t\tnewVNode._original = oldVNode._original + 1;\n\t\tif (options.vnode) options.vnode(newVNode);\n\n\t\tdiff(\n\t\t\tcomponent._parentDom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tcomponent._parentDom.namespaceURI,\n\t\t\toldVNode._flags & MODE_HYDRATE ? [oldDom] : NULL,\n\t\t\tcommitQueue,\n\t\t\toldDom == NULL ? getDomSibling(oldVNode) : oldDom,\n\t\t\t!!(oldVNode._flags & MODE_HYDRATE),\n\t\t\trefQueue\n\t\t);\n\n\t\tnewVNode._original = oldVNode._original;\n\t\tnewVNode._parent._children[newVNode._index] = newVNode;\n\t\tcommitRoot(commitQueue, newVNode, refQueue);\n\t\toldVNode._dom = oldVNode._parent = null;\n\n\t\tif (newVNode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(newVNode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != NULL && vnode._component != NULL) {\n\t\tvnode._dom = vnode._component.base = NULL;\n\t\tvnode._children.some(child => {\n\t\t\tif (child != NULL && child._dom != NULL) {\n\t\t\t\treturn (vnode._dom = vnode._component.base = child._dom);\n\t\t\t}\n\t\t});\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce != options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\ttry {\n\t\tlet c,\n\t\t\tl = 1;\n\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\twhile (rerenderQueue.length) {\n\t\t\t// Keep the rerender queue sorted by (depth, insertion order). The queue\n\t\t\t// will initially be sorted on the first iteration only if it has more than 1 item.\n\t\t\t//\n\t\t\t// New items can be added to the queue e.g. when rerendering a provider, so we want to\n\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t// single pass\n\t\t\tif (rerenderQueue.length > l) {\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\n\t\t\tc = rerenderQueue.shift();\n\t\t\tl = rerenderQueue.length;\n\n\t\t\trenderComponent(c);\n\t\t}\n\t} finally {\n\t\trerenderQueue.length = process._rerenderCount = 0;\n\t}\n}\n\nprocess._rerenderCount = 0;\n","import { IS_NON_DIMENSIONAL, NULL, SVG_NAMESPACE } from '../constants';\nimport options from '../options';\n\n// Per-instance unique key for event clock stamps. Each Preact copy on the page\n// gets its own random suffix so that `_dispatched` / `_attached` properties on\n// shared event objects and handler functions cannot collide across instances.\n// ~1 in 60M collision odds - if you have that many praect versions on the page,\n// you deserve some weird bugs.\n// In 11 we can replace this with a\n// Symbol\nlet _id = Math.random().toString(8),\n\tEVENT_DISPATCHED = '__d' + _id,\n\tEVENT_ATTACHED = '__a' + _id;\n\nfunction setStyle(style, key, value) {\n\tif (key[0] == '-') {\n\t\tstyle.setProperty(key, value == NULL ? '' : value);\n\t} else if (value == NULL) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\nconst CAPTURE_REGEX = /(PointerCapture)$|Capture$/i;\n\n// A logical clock to solve issues like https://github.com/preactjs/preact/issues/3927.\n// When the DOM performs an event it leaves micro-ticks in between bubbling up which means that\n// an event can trigger on a newly reated DOM-node while the event bubbles up.\n//\n// Originally inspired by Vue\n// (https://github.com/vuejs/core/blob/caeb8a68811a1b0f79/packages/runtime-dom/src/modules/events.ts#L90-L101),\n// but modified to use a logical clock instead of Date.now() in case event handlers get attached\n// and events get dispatched during the same millisecond.\n//\n// The clock is incremented after each new event dispatch. This allows 1 000 000 new events\n// per second for over 280 years before the value reaches Number.MAX_SAFE_INTEGER (2**53 - 1).\nlet eventClock = 0;\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {string} namespace Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, namespace) {\n\tlet useCapture;\n\n\to: if (name == 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] != oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] == 'o' && name[1] == 'n') {\n\t\tuseCapture = name != (name = name.replace(CAPTURE_REGEX, '$1'));\n\t\tconst lowerCaseName = name.toLowerCase();\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (lowerCaseName in dom || name == 'onFocusOut' || name == 'onFocusIn')\n\t\t\tname = lowerCaseName.slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue[EVENT_ATTACHED] = eventClock;\n\t\t\t\tdom.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\t\tuseCapture\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvalue[EVENT_ATTACHED] = oldValue[EVENT_ATTACHED];\n\t\t\t}\n\t\t} else {\n\t\t\tdom.removeEventListener(\n\t\t\t\tname,\n\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\tuseCapture\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (namespace == SVG_NAMESPACE) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname != 'width' &&\n\t\t\tname != 'height' &&\n\t\t\tname != 'href' &&\n\t\t\tname != 'list' &&\n\t\t\tname != 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname != 'tabIndex' &&\n\t\t\tname != 'download' &&\n\t\t\tname != 'rowSpan' &&\n\t\t\tname != 'colSpan' &&\n\t\t\tname != 'role' &&\n\t\t\tname != 'popover' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == NULL ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value == 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != NULL && (value !== false || name[4] == '-')) {\n\t\t\tdom.setAttribute(name, name == 'popover' && value == true ? '' : value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Create an event proxy function.\n * @param {boolean} useCapture Is the event handler for the capture phase.\n * @private\n */\nfunction createEventProxy(useCapture) {\n\t/**\n\t * Proxy an event to hooked event handlers\n\t * @param {import('../internal').PreactEvent} e The event object from the browser\n\t * @private\n\t */\n\treturn function (e) {\n\t\tif (this._listeners) {\n\t\t\tconst eventHandler = this._listeners[e.type + useCapture];\n\t\t\tif (e[EVENT_DISPATCHED] == NULL) {\n\t\t\t\te[EVENT_DISPATCHED] = eventClock++;\n\n\t\t\t\t// When `e[EVENT_DISPATCHED]` is smaller than the time when the targeted event\n\t\t\t\t// handler was attached we know we have bubbled up to an element that was added\n\t\t\t\t// during patching the DOM.\n\t\t\t} else if (e[EVENT_DISPATCHED] < eventHandler[EVENT_ATTACHED]) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn eventHandler(options.event ? options.event(e) : e);\n\t\t}\n\t};\n}\n\nconst eventProxy = createEventProxy(false);\nconst eventProxyCapture = createEventProxy(true);\n","import { enqueueRender } from './component';\nimport { NULL } from './constants';\n\nexport let i = 0;\n\nexport function createContext(defaultValue) {\n\tfunction Context(props) {\n\t\tif (!this.getChildContext) {\n\t\t\t/** @type {Set | null} */\n\t\t\tlet subs = new Set();\n\t\t\tlet ctx = {};\n\t\t\tctx[Context._id] = this;\n\n\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\tthis.componentWillUnmount = () => {\n\t\t\t\tsubs = NULL;\n\t\t\t};\n\n\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t// @ts-expect-error even\n\t\t\t\tif (this.props.value != _props.value) {\n\t\t\t\t\tsubs.forEach(c => {\n\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.sub = c => {\n\t\t\t\tsubs.add(c);\n\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\tif (subs) {\n\t\t\t\t\t\tsubs.delete(c);\n\t\t\t\t\t}\n\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\treturn props.children;\n\t}\n\n\tContext._id = '__cC' + i++;\n\tContext._defaultValue = defaultValue;\n\n\t/** @type {import('./internal').FunctionComponent} */\n\tContext.Consumer = (props, contextValue) => {\n\t\treturn props.children(contextValue);\n\t};\n\n\t// we could also get rid of _contextRef entirely\n\tContext.Provider =\n\t\tContext._contextRef =\n\t\tContext.Consumer.contextType =\n\t\t\tContext;\n\n\treturn Context;\n}\n","import { options, Fragment } from 'preact';\nimport { encodeEntities } from './utils';\nimport { IS_NON_DIMENSIONAL } from '../../src/constants';\n\nlet vnodeId = 0;\n\nconst isArray = Array.isArray;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {unknown} [isStaticChildren]\n * @param {unknown} [__source]\n * @param {unknown} [__self]\n */\nfunction createVNode(type, props, key, isStaticChildren, __source, __self) {\n\tif (!props) props = {};\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = props,\n\t\tref,\n\t\ti;\n\n\tif ('ref' in normalizedProps) {\n\t\tnormalizedProps = {};\n\t\tfor (i in props) {\n\t\t\tif (i == 'ref') {\n\t\t\t\tref = props[i];\n\t\t\t} else {\n\t\t\t\tnormalizedProps[i] = props[i];\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @type {VNode & { __source: any; __self: any }} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_component: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t_index: -1,\n\t\t_flags: 0,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\n/**\n * Create a template vnode. This function is not expected to be\n * used directly, but rather through a precompile JSX transform\n * @param {string[]} templates\n * @param {Array} exprs\n * @returns {VNode}\n */\nfunction jsxTemplate(templates, ...exprs) {\n\tconst vnode = createVNode(Fragment, { tpl: templates, exprs });\n\t// Bypass render to string top level Fragment optimization\n\tvnode.key = vnode._vnode;\n\treturn vnode;\n}\n\nconst JS_TO_CSS = {};\nconst CSS_REGEX = /[A-Z]/g;\n\n/**\n * Unwrap potential signals.\n * @param {*} value\n * @returns {*}\n */\nfunction normalizeAttrValue(value) {\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.valueOf === 'function'\n\t\t? value.valueOf()\n\t\t: value;\n}\n\n/**\n * Serialize an HTML attribute to a string. This function is not\n * expected to be used directly, but rather through a precompile\n * JSX transform\n * @param {string} name The attribute name\n * @param {*} value The attribute value\n * @returns {string}\n */\nfunction jsxAttr(name, value) {\n\tif (options.attr) {\n\t\tconst result = options.attr(name, value);\n\t\tif (typeof result === 'string') return result;\n\t}\n\n\tvalue = normalizeAttrValue(value);\n\n\tif (name === 'ref' || name === 'key') return '';\n\tif (name === 'style' && typeof value === 'object') {\n\t\tlet str = '';\n\t\tfor (let prop in value) {\n\t\t\tlet val = value[prop];\n\t\t\tif (val != null && val !== '') {\n\t\t\t\tconst name =\n\t\t\t\t\tprop[0] == '-'\n\t\t\t\t\t\t? prop\n\t\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t\t\t(JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());\n\n\t\t\t\tlet suffix = ';';\n\t\t\t\tif (\n\t\t\t\t\ttypeof val === 'number' &&\n\t\t\t\t\t// Exclude custom-attributes\n\t\t\t\t\t!name.startsWith('--') &&\n\t\t\t\t\t!IS_NON_DIMENSIONAL.test(name)\n\t\t\t\t) {\n\t\t\t\t\tsuffix = 'px;';\n\t\t\t\t}\n\t\t\t\tstr = str + name + ':' + val + suffix;\n\t\t\t}\n\t\t}\n\t\treturn name + '=\"' + encodeEntities(str) + '\"';\n\t}\n\n\tif (\n\t\tvalue == null ||\n\t\tvalue === false ||\n\t\ttypeof value === 'function' ||\n\t\ttypeof value === 'object'\n\t) {\n\t\treturn '';\n\t} else if (value === true) return name;\n\n\treturn name + '=\"' + encodeEntities('' + value) + '\"';\n}\n\n/**\n * Escape a dynamic child passed to `jsxTemplate`. This function\n * is not expected to be used directly, but rather through a\n * precompile JSX transform\n * @param {*} value\n * @returns {string | null | VNode | Array}\n */\nfunction jsxEscape(value) {\n\tif (\n\t\tvalue == null ||\n\t\ttypeof value === 'boolean' ||\n\t\ttypeof value === 'function'\n\t) {\n\t\treturn null;\n\t}\n\n\tif (typeof value === 'object') {\n\t\t// Check for VNode\n\t\tif (value.constructor === undefined) return value;\n\n\t\tif (isArray(value)) {\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tvalue[i] = jsxEscape(value[i]);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}\n\n\treturn encodeEntities('' + value);\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment,\n\t// precompiled JSX transform\n\tjsxTemplate,\n\tjsxAttr,\n\tjsxEscape\n};\n","import type {\n QuartzComponent,\n QuartzComponentProps,\n QuartzComponentConstructor,\n} from \"@quartz-community/types\";\nimport { classNames } from \"../util/lang\";\nimport { i18n } from \"../i18n\";\nimport style from \"./styles/search.scss\";\n// @ts-expect-error - inline script imported as string by esbuild loader\nimport script from \"./scripts/search.inline.ts\";\n\nexport type SearchField = \"title\" | \"content\" | \"tags\";\n\nexport interface SearchOptions {\n enablePreview: boolean;\n fieldPriority: SearchField[];\n}\n\nconst defaultOptions: SearchOptions = {\n enablePreview: true,\n fieldPriority: [\"title\", \"content\", \"tags\"],\n};\n\nexport default ((userOpts?: Partial) => {\n const Search: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {\n const opts = { ...defaultOptions, ...userOpts };\n const locale = cfg.locale ?? \"en-US\";\n const searchPlaceholder = i18n(locale).components.search.searchBarPlaceholder;\n\n return (\n
    \n \n \n Search\n \n \n \n \n \n

    {i18n(locale).components.search.title}

    \n \n
    \n
    \n \n
    \n
    \n
    \n \n );\n };\n\n Search.afterDOMLoaded = script;\n Search.css = style;\n\n return Search;\n}) satisfies QuartzComponentConstructor;\n"]} \ No newline at end of file +{"version":3,"sources":["../../node_modules/@quartz-community/utils/src/lang.ts","../../src/i18n/locales/en-US.ts","../../src/i18n/locales/ar-SA.ts","../../src/i18n/locales/ca-ES.ts","../../src/i18n/locales/cs-CZ.ts","../../src/i18n/locales/de-DE.ts","../../src/i18n/locales/en-GB.ts","../../src/i18n/locales/es-ES.ts","../../src/i18n/locales/fa-IR.ts","../../src/i18n/locales/fi-FI.ts","../../src/i18n/locales/fr-FR.ts","../../src/i18n/locales/he-IL.ts","../../src/i18n/locales/hu-HU.ts","../../src/i18n/locales/id-ID.ts","../../src/i18n/locales/it-IT.ts","../../src/i18n/locales/ja-JP.ts","../../src/i18n/locales/kk-KZ.ts","../../src/i18n/locales/ko-KR.ts","../../src/i18n/locales/lt-LT.ts","../../src/i18n/locales/nb-NO.ts","../../src/i18n/locales/nl-NL.ts","../../src/i18n/locales/pl-PL.ts","../../src/i18n/locales/pt-BR.ts","../../src/i18n/locales/ro-RO.ts","../../src/i18n/locales/ru-RU.ts","../../src/i18n/locales/th-TH.ts","../../src/i18n/locales/tr-TR.ts","../../src/i18n/locales/uk-UA.ts","../../src/i18n/locales/vi-VN.ts","../../src/i18n/locales/zh-CN.ts","../../src/i18n/locales/zh-TW.ts","../../src/i18n/index.ts","../../src/components/styles/search.scss","../../src/components/scripts/search.inline.ts","../../node_modules/preact/src/constants.js","../../node_modules/preact/src/options.js","../../node_modules/preact/src/diff/catch-error.js","../../node_modules/preact/src/component.js","../../node_modules/preact/src/diff/props.js","../../node_modules/preact/src/create-context.js","../../node_modules/preact/jsx-runtime/src/index.js","../../src/components/Search.tsx"],"names":["options","__e","error","vnode","oldVNode","errorInfo","component","ctor","handled","__","__c","constructor","getDerivedStateFromError","setState","__d","componentDidCatch","__E","e","Promise","prototype","then","bind","resolve","setTimeout","Math","random","toString","vnodeId","createVNode","type","props","key","isStaticChildren","__source","__self","ref","i","normalizedProps","__k","__b","__v","__i","__u","defaultProps","u"],"mappings":";AAIO,SAAS,cAAc,OAAA,EAAwD;AACpF,EAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACzC;;;ACNA,IAAO,aAAA,GAAQ;AAAA,EACb,UAAA,EAAY;AAAA,IACV,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO,QAAA;AAAA,MACP,oBAAA,EAAsB,yBAAA;AAAA,MACtB,SAAA,EAAW,aAAA;AAAA,MACX,aAAA,EAAe,0BAAA;AAAA,MACf,aAAA,EAAe,eAAA;AAAA,MACf,WAAA,EAAa;AAAA;AACf;AAEJ,CAAA;;;ACXA,IAAO,aAAA,GAAQ;AAAA,EACb,UAAA,EAAY;AAAA,IACV,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO,oBAAA;AAAA,MACP,oBAAA,EAAsB,uEAAA;AAAA,MACtB,SAAA,EAAW,aAAA;AAAA,MACX,aAAA,EAAe,0BAAA;AAAA,MACf,aAAA,EAAe,eAAA;AAAA,MACf,WAAA,EAAa;AAAA;AACf;AAEJ,CAAA;;;ACXA,IAAO,aAAA,GAAQ;AAAA,EACb,UAAA,EAAY;AAAA,IACV,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO,QAAA;AAAA,MACP,oBAAA,EAAsB,mBAAA;AAAA,MACtB,SAAA,EAAW,aAAA;AAAA,MACX,aAAA,EAAe,0BAAA;AAAA,MACf,a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BACT,QAAA,kBAAAA,EAAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,cAAA,EACT,QAAA,EAAA;AAAA,wBAAAA,EAAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,YAAA,EAAa,KAAA;AAAA,YACb,KAAA,EAAM,YAAA;AAAA,YACN,IAAA,EAAK,QAAA;AAAA,YACL,IAAA,EAAK,MAAA;AAAA,YACL,YAAA,EAAY,iBAAA;AAAA,YACZ,WAAA,EAAa;AAAA;AAAA,SACf;AAAA,wBACAA,EAAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,eAAA;AAAA,YACN,gBAAc,IAAA,CAAK,aAAA;AAAA,YACnB,qBAAA,EAAqB,IAAA,CAAK,SAAA,CAAU,IAAA,CAAK,aAAa;AAAA;AAAA;AACvD,OAAA,EACH,CAAA,EACF;AAAA,KAAA,EACF,CAAA;AAAA,EAEJ,CAAA;AAEA,EAAA,MAAA,CAAO,cAAA,GAAiB,qBAAA;AACxB,EAAA,MAAA,CAAO,GAAA,GAAM,cAAA;AAEb,EAAA,OAAO,MAAA;AACT,CAAA","file":"index.js","sourcesContent":["export function capitalize(s: string): string {\n return s.substring(0, 1).toUpperCase() + s.substring(1);\n}\n\nexport function classNames(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n","export default {\n components: {\n search: {\n title: \"Search\",\n searchBarPlaceholder: \"Search for something...\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"بحث\",\n searchBarPlaceholder: \"ابحث عن شيء ما\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Cercar\",\n searchBarPlaceholder: \"Cerca alguna cosa\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Hledat\",\n searchBarPlaceholder: \"Hledejte něco\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Suche\",\n searchBarPlaceholder: \"Suche nach etwas...\",\n noResults: \"Keine Ergebnisse.\",\n noResultsHint: \"Versuchen Sie einen anderen Suchbegriff?\",\n tagFilterHint: \"Nach Tag filtern\",\n noTagsFound: \"Keine passenden Tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Search\",\n searchBarPlaceholder: \"Search for something\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Buscar\",\n searchBarPlaceholder: \"Buscar algo...\",\n noResults: \"Sin resultados.\",\n noResultsHint: \"\\u00bfIntentar con otro t\\u00e9rmino de b\\u00fasqueda?\",\n tagFilterHint: \"Filtrar por etiqueta\",\n noTagsFound: \"No se encontraron etiquetas\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"جستجو\",\n searchBarPlaceholder: \"مطلبی را جستجو کنید\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Haku\",\n searchBarPlaceholder: \"Hae jotain\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Recherche\",\n searchBarPlaceholder: \"Rechercher quelque chose...\",\n noResults: \"Aucun r\\u00e9sultat.\",\n noResultsHint: \"Essayez un autre terme de recherche\\u00a0?\",\n tagFilterHint: \"Filtrer par tag\",\n noTagsFound: \"Aucun tag correspondant\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"חיפוש\",\n searchBarPlaceholder: \"חפשו משהו\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Keresés\",\n searchBarPlaceholder: \"Keress valamire\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Cari\",\n searchBarPlaceholder: \"Cari sesuatu\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Cerca\",\n searchBarPlaceholder: \"Cerca qualcosa\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"\\u691c\\u7d22\",\n searchBarPlaceholder: \"\\u4f55\\u304b\\u3092\\u691c\\u7d22...\",\n noResults: \"\\u7d50\\u679c\\u304c\\u898b\\u3064\\u304b\\u308a\\u307e\\u305b\\u3093\\u3002\",\n noResultsHint:\n \"\\u5225\\u306e\\u691c\\u7d22\\u8a9e\\u3092\\u304a\\u8a66\\u3057\\u304f\\u3060\\u3055\\u3044\\u3002\",\n tagFilterHint: \"\\u30bf\\u30b0\\u3067\\u30d5\\u30a3\\u30eb\\u30bf\\u30fc\",\n noTagsFound: \"\\u4e00\\u81f4\\u3059\\u308b\\u30bf\\u30b0\\u304c\\u3042\\u308a\\u307e\\u305b\\u3093\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Іздеу\",\n searchBarPlaceholder: \"Бірдеңе іздеу\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"검색\",\n searchBarPlaceholder: \"검색어를 입력하세요\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Paieška\",\n searchBarPlaceholder: \"Ieškoti\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Søk\",\n searchBarPlaceholder: \"Søk etter noe\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Zoeken\",\n searchBarPlaceholder: \"Doorzoek de website\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Szukaj\",\n searchBarPlaceholder: \"Wpisz frazę wyszukiwania\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Pesquisar\",\n searchBarPlaceholder: \"Pesquisar por algo\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Căutare\",\n searchBarPlaceholder: \"Introduceți termenul de căutare...\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Поиск\",\n searchBarPlaceholder: \"Найти что-нибудь\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"ค้นหา\",\n searchBarPlaceholder: \"ค้นหาบางอย่าง\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Arama\",\n searchBarPlaceholder: \"Bir şey arayın\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Пошук\",\n searchBarPlaceholder: \"Шукати щось\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Tìm\",\n searchBarPlaceholder: \"Tìm kiếm thông tin\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"\\u641c\\u7d22\",\n searchBarPlaceholder: \"\\u641c\\u7d22\\u5185\\u5bb9...\",\n noResults: \"\\u6ca1\\u6709\\u7ed3\\u679c\\u3002\",\n noResultsHint: \"\\u8bf7\\u5c1d\\u8bd5\\u5176\\u4ed6\\u641c\\u7d22\\u8bcd\\u3002\",\n tagFilterHint: \"\\u6309\\u6807\\u7b7e\\u7b5b\\u9009\",\n noTagsFound: \"\\u6ca1\\u6709\\u5339\\u914d\\u7684\\u6807\\u7b7e\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"搜尋\",\n searchBarPlaceholder: \"搜尋些什麼\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","import enUS from \"./locales/en-US\";\nimport arSA from \"./locales/ar-SA\";\nimport caES from \"./locales/ca-ES\";\nimport csCZ from \"./locales/cs-CZ\";\nimport deDE from \"./locales/de-DE\";\nimport enGB from \"./locales/en-GB\";\nimport esES from \"./locales/es-ES\";\nimport faIR from \"./locales/fa-IR\";\nimport fiFI from \"./locales/fi-FI\";\nimport frFR from \"./locales/fr-FR\";\nimport heIL from \"./locales/he-IL\";\nimport huHU from \"./locales/hu-HU\";\nimport idID from \"./locales/id-ID\";\nimport itIT from \"./locales/it-IT\";\nimport jaJP from \"./locales/ja-JP\";\nimport kkKZ from \"./locales/kk-KZ\";\nimport koKR from \"./locales/ko-KR\";\nimport ltLT from \"./locales/lt-LT\";\nimport nbNO from \"./locales/nb-NO\";\nimport nlNL from \"./locales/nl-NL\";\nimport plPL from \"./locales/pl-PL\";\nimport ptBR from \"./locales/pt-BR\";\nimport roRO from \"./locales/ro-RO\";\nimport ruRU from \"./locales/ru-RU\";\nimport thTH from \"./locales/th-TH\";\nimport trTR from \"./locales/tr-TR\";\nimport ukUA from \"./locales/uk-UA\";\nimport viVN from \"./locales/vi-VN\";\nimport zhCN from \"./locales/zh-CN\";\nimport zhTW from \"./locales/zh-TW\";\n\nconst locales: Record = {\n \"en-US\": enUS,\n \"ar-SA\": arSA,\n \"ca-ES\": caES,\n \"cs-CZ\": csCZ,\n \"de-DE\": deDE,\n \"en-GB\": enGB,\n \"es-ES\": esES,\n \"fa-IR\": faIR,\n \"fi-FI\": fiFI,\n \"fr-FR\": frFR,\n \"he-IL\": heIL,\n \"hu-HU\": huHU,\n \"id-ID\": idID,\n \"it-IT\": itIT,\n \"ja-JP\": jaJP,\n \"kk-KZ\": kkKZ,\n \"ko-KR\": koKR,\n \"lt-LT\": ltLT,\n \"nb-NO\": nbNO,\n \"nl-NL\": nlNL,\n \"pl-PL\": plPL,\n \"pt-BR\": ptBR,\n \"ro-RO\": roRO,\n \"ru-RU\": ruRU,\n \"th-TH\": thTH,\n \"tr-TR\": trTR,\n \"uk-UA\": ukUA,\n \"vi-VN\": viVN,\n \"zh-CN\": zhCN,\n \"zh-TW\": zhTW,\n};\n\nexport function i18n(locale: string) {\n return locales[locale] || enUS;\n}\n",".search {\n min-width: fit-content;\n max-width: 14rem;\n}\n\n@media all and (max-width: 800px) {\n .search {\n flex-grow: 0.3;\n }\n}\n.search > .search-button {\n background-color: transparent;\n border: 1px var(--lightgray) solid;\n border-radius: 4px;\n font-family: inherit;\n font-size: inherit;\n height: 2rem;\n padding: 0 1rem 0 0;\n display: flex;\n align-items: center;\n text-align: inherit;\n cursor: pointer;\n white-space: nowrap;\n width: 100%;\n}\n\n.search > .search-button > p {\n display: inline;\n color: var(--gray);\n text-wrap: unset;\n}\n\n.search > .search-button svg {\n cursor: pointer;\n width: 18px;\n min-width: 18px;\n margin: 0 0.5rem;\n}\n\n.search > .search-button svg .search-path {\n stroke: var(--darkgray);\n stroke-width: 1.5px;\n transition: stroke 0.5s ease;\n}\n\n.search > .search-container {\n position: fixed;\n contain: layout;\n z-index: var(--search-z-index, 999);\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n overflow-y: auto;\n display: none;\n backdrop-filter: blur(4px);\n}\n\n.search > .search-container.active {\n display: inline-block;\n}\n\n.search > .search-container > .search-space {\n width: 65%;\n margin-top: 12vh;\n margin-left: auto;\n margin-right: auto;\n}\n\n@media all and not (min-width: 1200px) {\n .search > .search-container > .search-space {\n width: 90%;\n }\n}\n.search > .search-container > .search-space > *:not(.ghost-text):not(.tag-suggestions) {\n width: 100%;\n border-radius: 7px;\n background: var(--light);\n box-shadow: 0 14px 50px rgba(27, 33, 48, 0.12), 0 10px 30px rgba(27, 33, 48, 0.16);\n margin-bottom: 2em;\n}\n\n.search > .search-container > .search-space > input {\n box-sizing: border-box;\n padding: 0.5em 1em;\n font-family: var(--bodyFont);\n color: var(--dark);\n font-size: 1.1em;\n border: 1px solid var(--lightgray);\n}\n\n.search > .search-container > .search-space > input:focus {\n outline: none;\n}\n\n.search > .search-container > .search-space > .search-layout {\n display: none;\n flex-direction: row;\n border: 1px solid var(--lightgray);\n flex: 0 0 100%;\n box-sizing: border-box;\n}\n\n.search > .search-container > .search-space > .search-layout.display-results {\n display: flex;\n}\n\n.search > .search-container > .search-space > .search-layout[data-preview] > .results-container {\n flex: 0 0 min(30%, 450px);\n}\n\n@media all and not (max-width: 800px) {\n .search > .search-container > .search-space > .search-layout[data-preview] .result-card > p.card-description {\n display: none;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > div:first-child {\n border-right: 1px solid var(--lightgray);\n border-top-right-radius: unset;\n border-bottom-right-radius: unset;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > div:last-child {\n border-top-left-radius: unset;\n border-bottom-left-radius: unset;\n }\n}\n.search > .search-container > .search-space > .search-layout > div {\n height: 63vh;\n border-radius: 5px;\n}\n\n@media all and (max-width: 800px) {\n .search > .search-container > .search-space > .search-layout {\n flex-direction: column;\n }\n .search > .search-container > .search-space > .search-layout > .preview-container {\n display: none !important;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > .results-container {\n width: 100%;\n height: auto;\n max-height: 60vh;\n flex: 0 0 100%;\n }\n}\n.search > .search-container > .search-space > .search-layout .highlight {\n background: color-mix(in srgb, var(--tertiary) 60%, rgba(255, 255, 255, 0));\n border-radius: 5px;\n scroll-margin-top: 2rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container {\n flex-grow: 1;\n display: block;\n overflow: hidden;\n font-family: inherit;\n color: var(--dark);\n line-height: 1.5em;\n font-weight: 400;\n overflow-y: auto;\n padding: 0 2rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container .preview-inner {\n margin: 0 auto;\n width: 100%;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container a[role=anchor] {\n background-color: transparent;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container {\n overflow-y: auto;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card {\n overflow: hidden;\n padding: 1em;\n cursor: pointer;\n transition: background 0.2s ease;\n border-bottom: 1px solid var(--lightgray);\n width: 100%;\n display: block;\n box-sizing: border-box;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n text-transform: none;\n text-align: left;\n outline: none;\n font-weight: inherit;\n text-decoration: none;\n color: var(--dark);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card:hover,\n.search > .search-container > .search-space > .search-layout > .results-container .result-card:focus,\n.search > .search-container > .search-space > .search-layout > .results-container .result-card.focus {\n background: var(--lightgray);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > h3 {\n margin: 0;\n color: var(--secondary);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul.tags {\n margin-top: 0.45rem;\n margin-bottom: 0;\n padding: 0;\n list-style: none;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul.tags > li {\n display: inline-block;\n margin-right: 0.3rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul > li > p {\n border-radius: 8px;\n background-color: var(--highlight);\n padding: 0.2rem 0.4rem;\n margin: 0;\n line-height: 1.4rem;\n font-weight: 700;\n color: var(--secondary);\n font-size: 0.85rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul > li > p.match-tag {\n color: var(--tertiary);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > p {\n margin-bottom: 0;\n margin-top: 0.5em;\n font-size: 0.9em;\n color: var(--gray);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card.no-match {\n cursor: default;\n}\n\n.search > .search-container > .search-space {\n position: relative;\n}\n\n.search > .search-container > .search-space > .ghost-text {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n pointer-events: none;\n box-sizing: border-box;\n padding: 0.5em 1em;\n font-family: var(--bodyFont);\n font-size: 1.1em;\n color: var(--gray);\n opacity: 0.6;\n white-space: pre;\n overflow: hidden;\n height: auto;\n line-height: normal;\n border: 1px solid transparent;\n}\n\n.search > .search-container > .search-space > .tag-suggestions {\n position: absolute;\n top: calc(3.1em + 2px);\n left: 0;\n right: 0;\n z-index: calc(var(--search-z-index, 999) + 1);\n background: var(--light);\n border: 1px solid var(--lightgray);\n border-radius: 5px;\n box-shadow: 0 4px 12px rgba(27, 33, 48, 0.1), 0 2px 6px rgba(27, 33, 48, 0.08);\n max-height: 240px;\n overflow-y: auto;\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item {\n padding: 0.4em 1em;\n cursor: pointer;\n font-family: var(--bodyFont);\n font-size: 0.95em;\n color: var(--dark);\n transition: background 0.15s ease;\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item:hover,\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item.active {\n background: var(--lightgray);\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item.active {\n color: var(--secondary);\n font-weight: 600;\n}\n\n.search-scroll-target {\n background: color-mix(in srgb, var(--tertiary) 40%, rgba(255, 255, 255, 0));\n border-radius: 3px;\n padding: 0.1em 0;\n transition: background 1s ease;\n}\n\n.search-scroll-target.fade-out {\n background: transparent;\n}","var Rn=Object.create;var Ne=Object.defineProperty;var Wn=Object.getOwnPropertyDescriptor;var Nn=Object.getOwnPropertyNames;var zn=Object.getPrototypeOf,On=Object.prototype.hasOwnProperty;var $n=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Kn=(t,e,n,r)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let i of Nn(e))!On.call(t,i)&&i!==n&&Ne(t,i,{get:()=>e[i],enumerable:!(r=Wn(e,i))||r.enumerable});return t};var Un=(t,e,n)=>(n=t!=null?Rn(zn(t)):{},Kn(e||!t||!t.__esModule?Ne(n,\"default\",{value:t,enumerable:!0}):n,t));var fe=$n(()=>{});var C;function O(t,e,n){let r=typeof n,i=typeof t;if(r!==\"undefined\"){if(i!==\"undefined\"){if(n){if(i===\"function\"&&r===i)return function(o){return t(n(o))};if(e=t.constructor,e===n.constructor){if(e===Array)return n.concat(t);if(e===Map){var s=new Map(n);for(var u of t)s.set(u[0],u[1]);return s}if(e===Set){u=new Set(n);for(s of t.values())u.add(s);return u}}}return t}return n}return i===\"undefined\"?e:t}function Ct(t,e){return typeof t>\"u\"?e:t}function R(){return Object.create(null)}function U(t){return typeof t==\"string\"}function Lt(t){return typeof t==\"object\"}function Mt(t,e){if(U(e))t=t[e];else for(let n=0;t&&n1?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&&dt(this),this)};C.addMatcher=function(t,e){return typeof t==\"object\"?this.addReplacer(t,e):t.length<2&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?\"|\":\"\")+t,this.J=null,this.cache&&dt(this),this)};C.addReplacer=function(t,e){return typeof t==\"string\"?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&&dt(this),this)};C.encode=function(t,e){if(this.cache&&t.length<=this.H)if(this.F){if(this.B.has(t))return this.B.get(t)}else this.F=setTimeout(dt,50,this);this.normalize&&(typeof this.normalize==\"function\"?t=this.normalize(t):t=ze?t.normalize(\"NFKD\").replace(ze,\"\").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&t.length>3&&(t=t.replace(Xn,\"$1 $2\").replace(Zn,\"$1 $2\").replace(Jn,\"$1 \"));let n=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer),r=[],i=R(),s,u,o=this.split||this.split===\"\"?t.split(this.split):[t];for(let c=0,f,h;cthis.maxlength)){if(e){if(i[f])continue;i[f]=1}else{if(s===f)continue;s=f}if(n)r.push(f);else if(!this.filter||(typeof this.filter==\"function\"?this.filter(f):!this.filter.has(f))){if(this.cache&&f.length<=this.I)if(this.F){var l=this.D.get(f);if(l||l===\"\"){l&&r.push(l);continue}}else this.F=setTimeout(dt,50,this);if(this.stemmer){this.K||(this.K=new RegExp(\"(?!^)(\"+this.A+\")$\"));let g;for(;g!==f&&f.length>2;)g=f,f=f.replace(this.K,a=>this.stemmer.get(a))}if(f&&(this.mapper||this.dedupe&&f.length>1)){l=\"\";for(let g=0,a=\"\",D,p;g1&&(this.J||(this.J=new RegExp(\"(\"+this.h+\")\",\"g\")),f=f.replace(this.J,g=>this.matcher.get(g))),f&&this.replacer)for(l=0;f&&lthis.L&&(this.D.clear(),this.I=this.I/1.1|0)),f){if(f!==h)if(e){if(i[f])continue;i[f]=1}else{if(u===f)continue;u=f}r.push(f)}}}return this.finalize&&(r=this.finalize(r)||r),this.cache&&t.length<=this.H&&(this.B.set(t,r),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),r};function dt(t){t.F=null,t.B.clear(),t.D.clear()}function Fe(t,e,n){n||(e||typeof t!=\"object\"?typeof e==\"object\"&&(n=e,e=0):n=t),n&&(t=n.query||t,e=n.limit||e);let r=\"\"+(e||0);n&&(r+=(n.offset||0)+!!n.context+!!n.suggest+(n.resolve!==!1)+(n.resolution||this.resolution)+(n.boost||0)),t=(\"\"+t).toLowerCase(),this.cache||(this.cache=new Ft);let i=this.cache.get(t+r);if(!i){let s=n&&n.cache;s&&(n.cache=!1),i=this.search(t,e,n),s&&(n.cache=s),this.cache.set(t+r,i)}return i}function Ft(t){this.limit=t&&t!==!0?t:1e3,this.cache=new Map,this.h=\"\"}Ft.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)};Ft.prototype.get=function(t){let e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e};Ft.prototype.remove=function(t){for(let e of this.cache){let n=e[0];e[1].includes(t)&&this.cache.delete(n)}};Ft.prototype.clear=function(){this.cache.clear(),this.h=\"\"};var Oe={normalize:!1,numeric:!1,dedupe:!1},Ot={},ae=new Map([[\"b\",\"p\"],[\"v\",\"f\"],[\"w\",\"f\"],[\"z\",\"s\"],[\"x\",\"s\"],[\"d\",\"t\"],[\"n\",\"m\"],[\"c\",\"k\"],[\"g\",\"k\"],[\"j\",\"k\"],[\"q\",\"k\"],[\"i\",\"e\"],[\"y\",\"e\"],[\"u\",\"o\"]]),$e=new Map([[\"ae\",\"a\"],[\"oe\",\"o\"],[\"sh\",\"s\"],[\"kh\",\"k\"],[\"th\",\"t\"],[\"ph\",\"f\"],[\"pf\",\"f\"]]),Ke=[/([^aeo])h(.)/g,\"$1$2\",/([aeo])h([^aeo]|$)/g,\"$1$2\",/(.)\\1+/g,\"$1\"],Ue={a:\"\",e:\"\",i:\"\",o:\"\",u:\"\",y:\"\",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,\\u00DF:2,d:3,t:3,l:4,m:5,n:5,r:6},_e={Exact:Oe,Default:Ot,Normalize:Ot,LatinBalance:{mapper:ae},LatinAdvanced:{mapper:ae,matcher:$e,replacer:Ke},LatinExtra:{mapper:ae,replacer:Ke.concat([/(?!^)[aeo]/g,\"\"]),matcher:$e},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let n=0;n=u.length)e-=u.length;else{e=u[r?\"splice\":\"slice\"](e,n);let o=e.length;if(o&&(i=i.length?i.concat(e):e,n-=o,r&&(t.length-=o),!n))break;e=0}return i}function xt(t){if(!this||this.constructor!==xt)return new xt(t);this.index=t?[t]:[],this.length=t?t.length:0;let e=this;return new Proxy([],{get(n,r){if(r===\"length\")return e.length;if(r===\"push\")return function(i){e.index[e.index.length-1].push(i),e.length++};if(r===\"pop\")return function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()};if(r===\"indexOf\")return function(i){let s=0;for(let u=0,o,l;u=0)return s+l;s+=o.length}return-1};if(r===\"includes\")return function(i){for(let s=0;s32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}V.prototype.get=function(t){let e=this.index[this.B(t)];return e&&e.get(t)};V.prototype.set=function(t,e){var n=this.B(t);let r=this.index[n];r?(n=r.size,r.set(t,e),(n-=r.size)&&this.size++):(this.index[n]=r=new Map([[t,e]]),this.h.push(r),this.size++)};function J(t=8){if(!this||this.constructor!==J)return new J(t);this.index=R(),this.h=[],this.size=0,t>32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}J.prototype.add=function(t){var e=this.B(t);let n=this.index[e];n?(e=n.size,n.add(t),(e-=n.size)&&this.size++):(this.index[e]=n=new Set([t]),this.h.push(n),this.size++)};C=V.prototype;C.has=J.prototype.has=function(t){let e=this.index[this.B(t)];return e&&e.has(t)};C.delete=J.prototype.delete=function(t){let e=this.index[this.B(t)];e&&e.delete(t)&&this.size--};C.clear=J.prototype.clear=function(){this.index=R(),this.h=[],this.size=0};C.values=J.prototype.values=function*(){for(let t=0;t=this.priority*this.priority*3):(ge=setTimeout(Yn,0),Je=Date.now()),Ut){let s=this;return new Promise(u=>{setTimeout(function(){u(s[t+\"Async\"].apply(s,e))},0)})}let i=this[t].apply(this,e);return n=i.then?i:new Promise(s=>s(i)),r&&n.then(r),n}}var st=0;function Dt(t={},e){function n(o){function l(c){c=c.data||c;let f=c.id,h=f&&s.h[f];h&&(h(c.msg),delete s.h[f])}if(this.worker=o,this.h=R(),this.worker)return i?this.worker.on(\"message\",l):this.worker.onmessage=l,t.config?new Promise(function(c){st>1e9&&(st=0),s.h[++st]=function(){c(s)},s.worker.postMessage({id:st,task:\"init\",factory:r,options:t})}):(this.priority=t.priority||4,this.encoder=e||null,this.worker.postMessage({task:\"init\",factory:r,options:t}),this)}if(!this||this.constructor!==Dt)return new Dt(t);let r=typeof self<\"u\"?self._factory:typeof window<\"u\"?window._factory:null;r&&(r=r.toString());let i=typeof window>\"u\",s=this,u=Gn(r,i,t.worker);return u.then?u.then(function(o){return n.call(s,o)}):n.call(this,u)}ut(\"add\");ut(\"append\");ut(\"search\");ut(\"update\");ut(\"remove\");ut(\"clear\");ut(\"export\");ut(\"import\");Dt.prototype.searchCache=Fe;ye(Dt.prototype);function ut(t){Dt.prototype[t]=function(){let e=this,n=[].slice.call(arguments);var r=n[n.length-1];let i;return typeof r==\"function\"&&(i=r,n.pop()),r=new Promise(function(s){t===\"export\"&&typeof n[0]==\"function\"&&(n[0]=null),st>1e9&&(st=0),e.h[++st]=s,e.worker.postMessage({task:t,id:st,args:n})}),i?(r.then(i),this):r}}function Gn(t,e,n){return e?typeof module<\"u\"?new(fe()).Worker(__dirname+\"/worker/node.js\"):Promise.resolve().then(()=>Un(fe(),1)).then(function(r){return new r.Worker(import.meta.dirname+\"/node/node.mjs\")}):t?new window.Worker(URL.createObjectURL(new Blob([\"onmessage=\"+Qn.toString()],{type:\"text/javascript\"}))):new window.Worker(typeof n==\"string\"?n:import.meta.url.replace(\"/worker.js\",\"/worker/worker.js\").replace(\"flexsearch.bundle.module.min.js\",\"module/worker/worker.js\").replace(\"flexsearch.bundle.module.min.mjs\",\"module/worker/worker.js\"),{type:\"module\"})}mt.prototype.add=function(t,e,n){if(Lt(t)&&(e=t,t=Mt(e,this.key)),e&&(t||t===0)){if(!n&&this.reg.has(t))return this.update(t,e);for(let o=0,l;oe?t.slice(n,n+e):t,r?wt.call(this,t):t;let i=[];for(let s=0,u,o;s=o){n-=o;continue}u=u.slice(n,n+e),o=u.length,n=0}if(o>e&&(u=u.slice(0,e),o=e),!i.length&&o>=e)return r?wt.call(this,u):u;if(i.push(u),e-=o,!e)break}return i=i.length>1?[].concat.apply([],i):i[0],r?wt.call(this,i):i}function Gt(t,e,n,r){var i=r[0];if(i[0]&&i[0].query)return t[e].apply(t,i);if(!(e!==\"and\"&&e!==\"not\"||t.result.length||t.await||i.suggest))return r.length>1&&(i=r[r.length-1]),(r=i.resolve)?t.await||t.result:t;let s=[],u=0,o=0,l,c,f,h,g;for(e=0;e1&&(n=n[e].apply(n,t.slice(1))),n}j.prototype.or=function(){return Gt(this,\"or\",qn,arguments)};function qn(t,e,n,r,i,s,u){return t.length&&(this.result.length&&t.push(this.result),t.length<2?this.result=t[0]:(this.result=en(t,e,n,!1,this.h),n=0)),i&&(this.await=null),i?this.resolve(e,n,r,u):this}j.prototype.and=function(){return Gt(this,\"and\",ti,arguments)};function ti(t,e,n,r,i,s,u){if(!s&&!this.result.length)return i?this.result:this;let o;if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{let l=0;for(let c=0,f,h;c1?y.join(\" \"):y[0];let w;if(y&&B){for(var v=B.length,M=(Q.split?B.replace(Q.split,\"\"):B).length-y.length,T=\"\",W=0,z=0;z-1&&(T=(N?B.substring(0,N):\"\")+u+B.substring(N,N+H)+o+(N+H=l)break}if(b=ft.length*(s.length-2),a||D||l&&d.length-b>l)if(b=l+b-g*2,k=x-A,a>0&&(k+=a),D>0&&(k+=D),k<=b)F=a?A-(a>0?a:0):A-((b-k)/2|0),m=D?x+(D>0?D:0):F+b,c||(F>0&&d.charAt(F)!==\" \"&&d.charAt(F-1)!==\" \"&&(F=d.indexOf(\" \",F),F<0&&(F=0)),m=m.length-1){if(I>=m.length){k[w+1]=1,I>=F.length&&(b[w+1]=1);continue}v-=g}if(d=m[I].text,H=D&&y[w])if(H>0){if(d.length>H)if(k[w+1]=1,c)d=d.substring(0,H);else continue;(H-=d.length)||(H=-1),y[w]=H}else{k[w+1]=1;continue}if(v+d.length+1<=l)d=\" \"+d,x[w]+=d;else if(c)K=l-v-1,K>0&&(d=\" \"+d.substring(0,K),x[w]+=d),k[w+1]=1;else{k[w+1]=1;continue}}else{if(k[w])continue;if(I-=M,A[I]){v-=g,k[w]=1,b[w]=1;continue}if(I<=0){if(I<0){k[w]=1,b[w]=1;continue}v-=g}if(d=m[I].text,H=a&&B[w])if(H>0){if(d.length>H)if(k[w]=1,c)d=d.substring(d.length-H);else continue;(H-=d.length)||(H=-1),B[w]=H}else{k[w]=1;continue}if(v+d.length+1<=l)d+=\" \",x[w]=d+x[w];else if(c)K=d.length+1-(l-v),K>=0&&K=F.length-1||I1?en(l,n,r,u,s):(l=l[0])&&n&&l.length>n||r?l.slice(r,n+r):l;else{if(tn||r)&&(l=l.slice(r,n+r));else{i=[];for(let h=0,g;hr)r-=g.length;else if((n&&g.length>n||r)&&(g=g.slice(r,n+r),n-=g.length,r&&(r-=g.length)),i.push(g),!n)break}l=i}}return l}function en(t,e,n,r,i){let s=[],u=R(),o;var l=t.length;let c;if(r){for(i=l-1;i>=0;i--)if(c=(r=t[i])&&r.length){for(l=0;l=0;f--){h=t[f];for(let a=0;a1?Jt(i,1,0,0,l,c):i[0],B)})}return a?i:new j(i.length>1?Jt(i,1,0,0,l,c):i[0],this)}}a||u||!(h=h||this.field)||(U(h)?u=h:(h.constructor===Array&&h.length===1&&(h=h[0]),u=h.field||h.index)),h&&h.constructor!==Array&&(h=[h])}h||(h=this.field);let b;m=(this.worker||this.db)&&!r&&[];for(let B=0,y,v,M;B\"u\"&&(this.db?m.push(p=this.index.get(this.field[0]).db.enrich(p)):p=wt.call(this,p)),u)return a?D?Vt(t,p,this.index,u,D):p:new j(p,this);i[F]={field:s[F],result:p}}if(d&&this.db&&m.length){let B=this;return Promise.all(m).then(function(y){for(let v=0;v0&&((n&&e>n||r)&&(t=t.slice(r,r+n)),i&&(t=wt.call(this,t))),t):[]):[]}function wt(t){if(!this||!this.store)return t;if(this.db)return this.index.get(this.field[0]).db.enrich(t);let e=Array(t.length);for(let n=0,r;n1?n:n[0]}C.append=function(t,e){return this.add(t,e,!0)};C.update=function(t,e){return this.remove(t).add(t,e)};C.remove=function(t){Lt(t)&&(t=Mt(t,this.key));for(var e of this.index.values())e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let r of n){e=r[0];let i=r[1],s=i.indexOf(t);s>-1&&(i.length>1?i.splice(s,1):n.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this};C.clear=function(){let t=[];for(let e of this.index.values()){let n=e.clear();n.then&&t.push(n)}if(this.tag)for(let e of this.tag.values())e.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this};C.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)};C.cleanup=function(){for(let t of this.index.values())t.cleanup();return this};C.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then(function(e){return e[0]&&e[0].doc||null}):this.store.get(t)||null};C.set=function(t,e){return typeof t==\"object\"&&(e=t,t=Mt(e,this.key)),this.store.set(t,e),this};C.searchCache=Fe;C.export=ui;C.import=oi;ye(mt.prototype);function Ae(t,e=0){let n=[],r=[];e&&(e=25e4/e*5e3|0);for(let i of t.entries())r.push(i),r.length===e&&(n.push(r),r=[]);return r.length&&n.push(r),n}function we(t,e){e||(e=new Map);for(let n=0,r;n2?n[0]:\"\";if(n=n.length>2?n[2]:n[1],this.worker&&r)return this.index.get(r).import(t);if(e){if(typeof e==\"string\"&&(e=JSON.parse(e)),r)return this.index.get(r).import(n,e);switch(n){case\"reg\":this.fastupdate=!1,this.reg=un(e,this.reg);for(let i=0,s;i=0&&i.splice(u,1)}}else jt(this.map,t),this.depth&&jt(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.M&&on(this)),this.cache&&this.cache.remove(t),this};function jt(t,e){let n=0;var r=typeof e>\"u\";if(t.constructor===Array){for(let i=0,s,u,o;i=0){if(s.length>1)return s.splice(u,1),1;if(delete t[i],n)return 1;o=1}else{if(o)return 1;n++}}}else for(let i of t.entries())r=i[0],jt(i[1],e)?n++:t.delete(r);return n}var li={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:\"forward\"},score:{resolution:9,context:{depth:2,resolution:3}}};X.prototype.add=function(t,e,n,r){if(e&&(t||t===0)){if(!r&&!n&&this.reg.has(t))return this.update(t,e);r=this.depth,e=this.encoder.encode(e,!r);let c=e.length;if(c){let f=R(),h=R(),g=this.resolution;for(let a=0;a2){for(let p=1,d,F,m,A;p2){for(let p=0,d;pp;s--){u=D.substring(p,s),d=this.rtl?i-1-p:p;var o=this.score?this.score(e,D,a,u,d):Kt(g,c,a,i,d);tt(this,h,u,o,t,n)}break}case\"bidirectional\":case\"reverse\":if(i>1){for(o=i-1;o>0;o--){u=D[this.rtl?i-1-o:o]+u;var l=this.score?this.score(e,D,a,u,o):Kt(g,c,a,i,o);tt(this,h,u,l,t,n)}u=\"\"}case\"forward\":if(i>1){for(o=0;o1&&au;let p=this.score?this.score(e,u,a,D,o-1):Kt(i+(c/2>i?0:1),c,a,s-1,o-1);tt(this,f,l?u:D,p,t,n,l?D:u)}}}}this.fastupdate||this.reg.add(t)}}return this.db&&(this.commit_task.push(n?{ins:t}:{del:t}),this.M&&on(this)),this};function tt(t,e,n,r,i,s,u){let o,l;if(!(o=e[n])||u&&!o[u]){if(u?(e=o||(e[n]=R()),e[u]=1,l=t.ctx,(o=l.get(u))?l=o:l.set(u,l=t.keystore?new V(t.keystore):new Map)):(l=t.map,e[n]=1),(o=l.get(n))?l=o:l.set(n,l=o=[]),s){for(let c=0,f;c1?e+(r||0)<=t?n+(i||0):(t-1)/(e+(r||0))*(n+(i||0))+1|0:0}X.prototype.search=function(t,e,n){if(n||(e||typeof t!=\"object\"?typeof e==\"object\"&&(n=e,e=0):(n=t,t=\"\")),n&&n.cache)return n.cache=!1,t=this.searchCache(t,e,n),n.cache=!0,t;let r=[],i,s,u,o=0,l,c,f,h,g;n&&(t=n.query||t,e=n.limit||e,o=n.offset||0,s=n.context,u=n.suggest,g=(l=n.resolve)&&n.enrich,f=n.boost,h=n.resolution,c=this.db&&n.tag),typeof l>\"u\"&&(l=this.resolve),s=this.depth&&s!==!1;let a=this.encoder.encode(t,!s);if(i=a.length,e=e||(l?100:0),i===1)return Ye.call(this,a[0],\"\",e,o,l,g,c);if(i===2&&s&&!u)return Ye.call(this,a[1],a[0],e,o,l,g,c);let D=R(),p=0,d;if(s&&(d=a[0],p=1),h||h===0||(h=d?this.N:this.resolution),this.db){if(this.db.search&&(n=this.db.search(this,a,e,o,u,l,g,c),n!==!1))return n;let F=this;return(async function(){for(let m,A;p1)l=Jt(t,e,n,r,i,s,u);else if(o===1)return u?Ce.call(null,t[0],n,r):new j(t[0],this);return u?l:new j(l,this)}function Ye(t,e,n,r,i,s,u){return t=me(this,t,e,n,r,i,s,u),this.db?t.then(function(o){return i?o||[]:new j(o,this)}):t&&t.length?i?Ce.call(this,t,n,r):new j(t,this):i?[]:new j([],this)}function Ge(t,e,n,r){let i=[];if(t&&t.length){if(t.length<=r){e.push(t);return}for(let s=0,u;sn)&&(l=n,n=e,e=l),t.db?t.db.get(e,n,r,i,s,u,o):(t=n?(t=t.ctx.get(n))&&t.get(e):t.map.get(e),t)}function X(t,e){if(!this||this.constructor!==X)return new X(t);if(t){var n=U(t)?t:t.preset;n&&(t=Object.assign({},li[n],t))}else t={};n=t.context;let r=n===!0?{depth:1}:n||{},i=U(t.encoder)?_e[t.encoder]:t.encode||t.encoder||{};this.encoder=i.encode?i:typeof i==\"object\"?new vt(i):{encode:i},this.resolution=t.resolution||9,this.tokenize=n=(n=t.tokenize)&&n!==\"default\"&&n!==\"exact\"&&n||\"strict\",this.depth=n===\"strict\"&&r.depth||0,this.bidirectional=r.bidirectional!==!1,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(n=t.keystore||0)&&(this.keystore=n),this.map=n?new V(n):new Map,this.ctx=n?new V(n):new Map,this.reg=e||(this.fastupdate?n?new V(n):new Map:n?new J(n):new Set),this.N=r.resolution||3,this.rtl=i.rtl||t.rtl||!1,this.cache=(n=t.cache||null)&&new Ft(n),this.resolve=t.resolve!==!1,(n=t.db)&&(this.db=this.mount(n)),this.M=t.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}C=X.prototype;C.mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)};C.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)};C.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function on(t){t.commit_timer||(t.commit_timer=setTimeout(function(){t.commit_timer=null,t.db.commit(t)},1))}C.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db?(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[],this.db.clear()):this};C.append=function(t,e){return this.add(t,e,!0)};C.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)};C.update=function(t,e){let n=this,r=this.remove(t);return r&&r.then?r.then(()=>n.add(t,e)):this.add(t,e)};C.cleanup=function(){return this.fastupdate?(jt(this.map),this.depth&&jt(this.ctx),this):this};C.searchCache=Fe;C.export=function(t,e,n=0,r=0){let i,s;switch(r){case 0:i=\"reg\",s=sn(this.reg);break;case 1:i=\"cfg\",s=null;break;case 2:i=\"map\",s=Ae(this.map,this.reg.size);break;case 3:i=\"ctx\",s=nn(this.ctx,this.reg.size);break;default:return}return Zt.call(this,t,e,i,s,n,r)};C.import=function(t,e){if(e)switch(typeof e==\"string\"&&(e=JSON.parse(e)),t=t.split(\".\"),t[t.length-1]===\"json\"&&t.pop(),t.length===3&&t.shift(),t=t.length>1?t[1]:t[0],t){case\"reg\":this.fastupdate=!1,this.reg=un(e,this.reg);break;case\"map\":this.map=we(e,this.map);break;case\"ctx\":this.ctx=rn(e,this.ctx)}};C.serialize=function(t=!0){let e=\"\",n=\"\",r=\"\";if(this.reg.size){let s;for(var i of this.reg.keys())s||(s=typeof i),e+=(e?\",\":\"\")+(s===\"string\"?'\"'+i+'\"':i);e=\"index.reg=new Set([\"+e+\"]);\",n=Ze(this.map,s),n=\"index.map=new Map([\"+n+\"]);\";for(let u of this.ctx.entries()){i=u[0];let o=Ze(u[1],s);o=\"new Map([\"+o+\"])\",o='[\"'+i+'\",'+o+\"]\",r+=(r?\",\":\"\")+o}r=\"index.ctx=new Map([\"+r+\"]);\"}return t?\"function inject(index){\"+e+n+r+\"}\":e+n+r};ye(X.prototype);var ln=typeof window<\"u\"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Qt=[\"map\",\"ctx\",\"tag\",\"reg\",\"cfg\"],gt=R();function Yt(t,e={}){if(!this||this.constructor!==Yt)return new Yt(t,e);typeof t==\"object\"&&(e=t,t=t.name),t||console.info(\"Default storage space was used, because a name was not passed.\"),this.id=\"flexsearch\"+(t?\":\"+t.toLowerCase().replace(/[^a-z0-9_\\-]/g,\"\"):\"\"),this.field=e.field?e.field.toLowerCase().replace(/[^a-z0-9_\\-]/g,\"\"):\"\",this.type=e.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}C=Yt.prototype;C.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())};C.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),gt[t.id]||(gt[t.id]=[]),gt[t.id].push(t.field);let e=ln.open(t.id,1);return e.onupgradeneeded=function(){let n=t.db=this.result;for(let r=0,i;r=f.length){r-=f.length;continue}let h=n?r+Math.min(f.length-r,n):f.length;for(let g=r;g=s.length?[]:!e&&!n?s:(s=s.slice(n,n+e),r?i.enrich(s):s)})};C.enrich=function(t){typeof t!=\"object\"&&(t=[t]);let e=this.db.transaction(\"reg\",\"readonly\").objectStore(\"reg\"),n=[];for(let r=0;r=0)if(i=1,o.length>1)o.splice(c,1);else{r[u]=[];break}s+=o.length}if(n)break}s?i&&t.update(r):t.delete(),t.continue()}C.remove=function(t){return typeof t!=\"object\"&&(t=[t]),Promise.all([this.transaction(\"map\",\"readwrite\",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction(\"ctx\",\"readwrite\",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction(\"tag\",\"readwrite\",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t,!0)}}),this.transaction(\"reg\",\"readwrite\",function(e){for(let n=0;n{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,n(this.result)},t.onerror=t.onblocked=r,t=null})}var hn={Index:X,Charset:_e,Encoder:vt,Document:mt,Worker:Dt,Resolver:j,IndexedDB:Yt,Language:{}};var Ni=Object.hasOwnProperty;var gn,P,dn,hi,lt,cn,Dn,mn,ve,te,It,Fn,Te,Be,ke,ci,_n={},ne=[],fi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,re=Array.isArray;function et(t,e){for(var n in e)t[n]=e[n];return t}function Se(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function xe(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++dn,__i:-1,__u:0};return i==null&&P.vnode!=null&&P.vnode(s),s}function kt(t){return t.children}function ee(t,e){this.props=t,this.context=e}function Bt(t,e){if(e==null)return t.__?Bt(t.__,t.__i+1):null;for(var n;ee&<.sort(mn),t=lt.shift(),e=lt.length,ai(t)}finally{lt.length=ie.__r=0}}function Cn(t,e,n,r,i,s,u,o,l,c,f){var h,g,a,D,p,d,F,m=r&&r.__k||ne,A=e.length;for(l=pi(n,e,m,l,A),h=0;h0?u=t.__k[s]=xe(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):t.__k[s]=u,l=s+g,u.__=t,u.__b=t.__b+1,o=null,(c=u.__i=gi(u,n,l,h))!=-1&&(h--,(o=n[c])&&(o.__u|=2)),o==null||o.__v==null?(c==-1&&(i>f?g--:il?g--:g++,u.__u|=4))):t.__k[s]=null;if(h)for(s=0;s(f?1:0)){for(i=n-1,s=n+1;i>=0||s=0?i--:s++])!=null&&(2&c.__u)==0&&o==c.key&&l==c.type)return u}return-1}function an(t,e,n){e[0]==\"-\"?t.setProperty(e,n??\"\"):t[e]=n==null?\"\":typeof n!=\"number\"||fi.test(e)?n:n+\"px\"}function qt(t,e,n,r,i){var s,u;t:if(e==\"style\")if(typeof n==\"string\")t.style.cssText=n;else{if(typeof r==\"string\"&&(t.style.cssText=r=\"\"),r)for(e in r)n&&e in n||an(t.style,e,\"\");if(n)for(e in n)r&&n[e]==r[e]||an(t.style,e,n[e])}else if(e[0]==\"o\"&&e[1]==\"n\")s=e!=(e=e.replace(Fn,\"$1\")),u=e.toLowerCase(),e=u in t||e==\"onFocusOut\"||e==\"onFocusIn\"?u.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n[It]=r[It]:(n[It]=Te,t.addEventListener(e,s?ke:Be,s)):t.removeEventListener(e,s?ke:Be,s);else{if(i==\"http://www.w3.org/2000/svg\")e=e.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(e!=\"width\"&&e!=\"height\"&&e!=\"href\"&&e!=\"list\"&&e!=\"form\"&&e!=\"tabIndex\"&&e!=\"download\"&&e!=\"rowSpan\"&&e!=\"colSpan\"&&e!=\"role\"&&e!=\"popover\"&&e in t)try{t[e]=n??\"\";break t}catch{}typeof n==\"function\"||(n==null||n===!1&&e[4]!=\"-\"?t.removeAttribute(e):t.setAttribute(e,e==\"popover\"&&n==1?\"\":n))}}function pn(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[te]==null)e[te]=Te++;else if(e[te]0?t:re(t)?t.map(wn):et({},t)}function Di(t,e,n,r,i,s,u,o,l){var c,f,h,g,a,D,p,d=n.props||_n,F=e.props,m=e.type;if(m==\"svg\"?i=\"http://www.w3.org/2000/svg\":m==\"math\"?i=\"http://www.w3.org/1998/Math/MathML\":i||(i=\"http://www.w3.org/1999/xhtml\"),s!=null){for(c=0;c\"u\"?\"\":document.body?.dataset?.basepath??\"\"}function Me(t,e){let n=e??_i(),r=t.startsWith(\"/\")?t:\"/\"+t;return n+r}function nt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function xn(t,e){if(!t)return()=>{};let n=i=>{t.classList.contains(\"active\")&&i.target===t&&(i.preventDefault(),i.stopPropagation(),e())},r=i=>{t.classList.contains(\"active\")&&i.key===\"Escape\"&&(i.preventDefault(),e())};return t.addEventListener(\"click\",n),document.addEventListener(\"keydown\",r),()=>{t.removeEventListener(\"click\",n),document.removeEventListener(\"keydown\",r)}}function Bn(t,e){let n=t.querySelectorAll(\"[src], [href]\");for(let r of Array.from(n)){let i=r.hasAttribute(\"href\")?\"href\":\"src\",s=r.getAttribute(i);if(s&&!(s.startsWith(\"http://\")||s.startsWith(\"https://\")||s.startsWith(\"mailto:\")||s.startsWith(\"tel:\")||s.startsWith(\"#\")||s.startsWith(\"/\")||s.startsWith(\"data:\")))try{let u=new URL(s,e).toString();r.setAttribute(i,u)}catch{continue}}}function se(t){return t.replaceAll(\"&\",\"&\").replaceAll(\"<\",\"<\").replaceAll(\">\",\">\").replaceAll('\"',\""\").replaceAll(\"'\",\"'\")}var je=\"basic\",bt=\"\",kn=8,yi=5,ue=30,Ci=t=>{let e=[],n=-1,r=-1,i=t.toLowerCase(),s=0;for(let u of i){let o=u.codePointAt(0);o>=12352&&o<=12447||o>=12448&&o<=12543||o>=19968&&o<=40959||o>=44032&&o<=55215||o>=131072&&o<=173791?(n!==-1&&(e.push(i.slice(n,r)),n=-1),e.push(u)):o===32||o===9||o===10||o===13?n!==-1&&(e.push(i.slice(n,r)),n=-1):(n===-1&&(n=s),r=s+1),s+=u.length}return n!==-1&&e.push(i.slice(n)),e},le=new hn.Document({encode:Ci,document:{id:\"id\",tag:\"tags\",index:[{field:\"title\",tokenize:\"forward\"},{field:\"content\",tokenize:\"forward\"},{field:\"tags\",tokenize:\"forward\"}]}}),Z=null,Pt=[],Ht=[],Ie=new Map;function oe(t){let e=t.split(/\\s+/),n=[],r=[];for(let i of e)i.startsWith(\"#\")&&i.length>1?n.push(i.substring(1)):i!==\"#\"&&r.push(i);return{tags:n,query:r.join(\" \").trim()}}function bn(t){let e=t.split(/\\s+/),n=e[e.length-1];return n&&n.startsWith(\"#\")?n.substring(1):null}var Sn=new DOMParser;async function Ei(t){if(Ie.has(t))return Ie.get(t);let e=new URL(Me(t),window.location.origin).toString();try{let n=await fetch(e);if(!n.ok)return[];let r=await n.text(),i=Sn.parseFromString(r??\"\",\"text/html\");Bn(i,e);let s=Array.from(i.getElementsByClassName(\"popover-hint\"));return Ie.set(t,s),s}catch{return[]}}var Pe=[];function _t(t){Pe.push(t)}function Ai(){Pe.forEach(t=>t()),Pe.length=0}async function wi(){let t=document.querySelectorAll(\".search\");for(let e of Array.from(t)){let n=e.querySelector(\".search-container\"),r=e.querySelector(\".search-button\"),i=e.querySelector(\".search-bar\"),s=e.querySelector(\".search-layout\");if(!n||!r||!i||!s)continue;let u=n.closest(\".sidebar\"),o=s.getAttribute(\"data-preview\")===\"true\",l=s.getAttribute(\"data-field-priority\"),c=l?JSON.parse(l):[\"title\",\"content\",\"tags\"],f=s.querySelector(\".results-container\");f||(f=document.createElement(\"div\"),f.className=\"results-container\",f.setAttribute(\"role\",\"listbox\"),f.setAttribute(\"aria-label\",\"Search results\"),s.appendChild(f));let h=s.querySelector(\".preview-container\");o&&!h&&(h=document.createElement(\"div\"),h.className=\"preview-container\",s.appendChild(h));let g=document.createElement(\"div\");g.className=\"tag-suggestions\",g.setAttribute(\"role\",\"listbox\"),g.setAttribute(\"aria-label\",\"Tag suggestions\"),g.style.display=\"none\";let a=i.parentElement;a.insertBefore(g,i.nextSibling);let D=document.createElement(\"span\");D.className=\"ghost-text\",D.setAttribute(\"aria-hidden\",\"true\"),a.insertBefore(D,i.nextSibling);let p=-1,d=[],F=!1,m=_=>{if(p<0||p>=d.length){D.textContent=\"\";return}let E=d[p];if(!E.toLowerCase().startsWith(_.toLowerCase())){D.textContent=\"\";return}let L=E.substring(_.length);D.innerHTML=\"\";let S=document.createElement(\"span\");S.style.visibility=\"hidden\",S.textContent=i.value,D.appendChild(S),D.appendChild(document.createTextNode(L))},A=()=>{g.querySelectorAll(\".tag-suggestion-item\").forEach((L,S)=>{L.classList.toggle(\"active\",S===p)});let E=bn(i.value)||\"\";m(E)},x=()=>{F=!1,p=-1,d=[],g.style.display=\"none\",D.textContent=\"\"},b=_=>{let E=i.value,L=E.lastIndexOf(\"#\");L!==-1&&(i.value=E.substring(0,L)+\"#\"+_+\" \"),x(),i.focus(),i.dispatchEvent(new Event(\"input\"))},k=_=>{if(Rt){if(d=_===\"\"?Ht.slice(0,10):Ht.filter(E=>E.toLowerCase().startsWith(_.toLowerCase())).slice(0,10),d.length===0){x();return}p=0,F=!0,nt(g);for(let E=0;E!F||d.length===0?!1:(_===\"down\"?p=Math.min(p+1,d.length-1):p=Math.max(p-1,0),A(),!0),y=null,v=0,M=null,T=()=>{n.classList.remove(\"active\"),u&&(u.style.zIndex=\"\"),r.setAttribute(\"aria-expanded\",\"false\"),i.value=\"\",nt(f),h&&nt(h),s.classList.remove(\"display-results\"),je=\"basic\",y=null,x(),r.focus()},W=_=>{je=_,u&&(u.style.zIndex=\"9999\"),n.classList.add(\"active\"),r.setAttribute(\"aria-expanded\",\"true\"),i.focus()},z=async _=>{if(nt(f),_.length===0){let E=document.createElement(\"a\");E.className=\"result-card no-match\";let L=document.createElement(\"h3\");L.textContent=\"No results.\";let S=document.createElement(\"p\");S.textContent=\"Try another search term?\",E.appendChild(L),E.appendChild(S),f.appendChild(E),y=null,h&&nt(h)}else for(let E of _){let L=document.createElement(\"a\");L.className=\"result-card\",L.id=E.slug,L.href=Me(E.slug);let S=document.createElement(\"h3\");if(S.className=\"card-title\",S.textContent=E.title,L.appendChild(S),E.tags.length>0){let $=document.createElement(\"ul\");$.className=\"tags\",$.textContent=\"\";for(let G of E.tags){let q=document.createElement(\"li\");q.textContent=G.replace(/<[^>]*>/g,\"\"),$.appendChild(q)}L.appendChild($)}let Y=document.createElement(\"p\");Y.className=\"card-description\",Y.innerHTML=E.content.replace(/<(?!\\/?mark\\b)[^>]*>/gi,\"\"),L.appendChild(Y),f.appendChild(L)}},N=()=>Array.from(f.querySelectorAll(\".result-card:not(.no-match)\")),H=()=>{let _=oe(bt);return _.query||(_.tags.length>0?_.tags.join(\" \"):bt)},K=async _=>{if(!h||(nt(h),!_))return;let E=_.id,L=++v,S=await Ei(E);if(L!==v)return;let Y=H(),$=document.createElement(\"div\");$.className=\"preview-inner\";for(let G of S){let q=G.cloneNode(!0);Y.trim()!==\"\"&&(q.innerHTML=vi(Y,q)),$.appendChild(q)}h.appendChild($),requestAnimationFrame(()=>{let G=Array.from(h.getElementsByClassName(\"highlight\"));if(G.length===0)return;G.sort((he,ce)=>ce.innerHTML.length-he.innerHTML.length);let q=G[0],Nt=0,at=q;for(;at&&at!==h;)Nt+=at.offsetTop,at=at.offsetParent;h.scrollTop=Math.max(0,Nt-50)})},it=_=>{y&&y.classList.remove(\"focus\"),y=_,y&&(y.classList.add(\"focus\"),y.scrollIntoView({block:\"nearest\"})),M&&clearTimeout(M),M=setTimeout(()=>K(y),150)},Q=_=>{let E=N();if(E.length===0){it(null);return}let L=Math.min(Math.max(_,0),E.length-1);it(E[L]??null)},Wt=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):-1;Q(E+1)},ht=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):_.length;Q(E-1)},rt=async _=>{let E=_.target.value;bt=E;let L=bn(E);L!==null?k(L):x();let S=oe(E),Y=S.query!==\"\"||S.tags.length>0;if(s.classList.toggle(\"display-results\",Y),je=S.tags.length>0&&!S.query?\"tags\":\"basic\",!Y){nt(f),h&&nt(h),y=null;return}let $;S.query?$=await le.searchAsync({query:S.query,limit:S.tags.length>0?1e4:kn,index:[\"title\",\"content\"]}):S.tags.length>0?$=await le.searchAsync({query:S.tags[0],limit:1e4,index:[\"tags\"]}):$=[];let G=pt=>{let Tt=$.filter(zt=>zt.field===pt);return Tt.length===0?[]:[...Tt[0].result]},Nt=[...new Set(c.flatMap(pt=>G(pt)))].filter(pt=>{if(S.tags.length===0)return!0;let Tt=Pt[pt];if(!Tt)return!1;let zt=Z?.[Tt];if(!zt)return!1;let In=zt.tags||[];return S.tags.every(Pn=>In.some(Hn=>Hn.toLowerCase()===Pn.toLowerCase()))}),at=S.query||(S.tags.length>0?S.tags.join(\" \"):E),he=Nt.map(pt=>Bi(at,pt));await z(he.slice(0,kn));let ce=N();it(ce[0]??null)},ct=_=>{_.stopPropagation(),W(\"basic\")};r.addEventListener(\"click\",ct),_t(()=>r.removeEventListener(\"click\",ct)),i.addEventListener(\"input\",rt),_t(()=>i.removeEventListener(\"input\",rt));let ft=_=>{if(F){if(_.key===\"ArrowDown\"){_.preventDefault(),B(\"down\");return}if(_.key===\"ArrowUp\"){_.preventDefault(),B(\"up\");return}if(_.key===\"Tab\"){_.preventDefault(),p>=0&&p=0&&pi.removeEventListener(\"keydown\",ft));let w=_=>{_.key===\"k\"&&(_.ctrlKey||_.metaKey)&&!_.shiftKey?(_.preventDefault(),n.classList.contains(\"active\")?T():W(\"basic\")):_.shiftKey&&(_.ctrlKey||_.metaKey)&&_.key.toLowerCase()===\"k\"&&(_.preventDefault(),W(\"tags\"),i.value=\"#\",i.dispatchEvent(new Event(\"input\")))};document.addEventListener(\"keydown\",w),_t(()=>document.removeEventListener(\"keydown\",w));let I=()=>{let _=oe(bt),E=_.query||(_.tags.length>0?_.tags.join(\" \"):bt);E.trim()&&sessionStorage.setItem(\"search-term\",E.trim())},yt=_=>{let E=_.target.closest(\".result-card\");!E||E.classList.contains(\"no-match\")||_ instanceof MouseEvent&&(_.altKey||_.ctrlKey||_.metaKey||_.shiftKey)||(I(),T())},He=_=>{let E=_.target.closest(\".result-card\");!E||E.classList.contains(\"no-match\")||it(E)};f.addEventListener(\"click\",yt),f.addEventListener(\"mouseover\",He),_t(()=>{f.removeEventListener(\"click\",yt),f.removeEventListener(\"mouseover\",He)});let Re=_=>{let E=_.target.closest(\".tag-suggestion-item\");if(!E)return;let L=E.getAttribute(\"data-tag\");L&&b(L)},We=_=>{let E=_.target.closest(\".tag-suggestion-item\");if(!E)return;let L=E.getAttribute(\"data-index\");L!==null&&(p=parseInt(L,10),A())};g.addEventListener(\"click\",Re),g.addEventListener(\"mouseover\",We),_t(()=>{g.removeEventListener(\"click\",Re),g.removeEventListener(\"mouseover\",We)});let jn=xn(n,T);_t(jn)}}function Ln(t){let e=t.split(/\\s+/).filter(r=>r.trim()!==\"\"),n=e.length;if(n>1)for(let r=1;ri.length-r.length)}function vi(t,e){let n=Ln(t).filter(c=>c.trim()!==\"\");if(n.length===0)return e.innerHTML;let r=Sn.parseFromString(e.innerHTML,\"text/html\"),i=n.map(c=>c.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")).join(\"|\");if(i===\"\")return e.innerHTML;let s=new RegExp(i,\"gi\"),u=r.createTreeWalker(r.body,NodeFilter.SHOW_TEXT),o=[],l=u.nextNode();for(;l;)o.push(l),l=u.nextNode();for(let c of o){let f=c.nodeValue??\"\";if(s.lastIndex=0,!s.test(f))continue;s.lastIndex=0;let h=r.createDocumentFragment(),g=0,a;for(;(a=s.exec(f))!==null;){a.index>g&&h.appendChild(r.createTextNode(f.slice(g,a.index)));let D=r.createElement(\"span\");D.className=\"highlight\",D.textContent=a[0],h.appendChild(D),g=a.index+a[0].length}gl!==\"\"),s=0,u=i.length-1;if(n){let l=g=>r.some(a=>g.toLowerCase().startsWith(a.toLowerCase())),c=i.map(l),f=0,h=0;for(let g=0;gp+(d?1:0),0);D>=f&&(f=D,h=g)}s=Math.max(h-ue,0),u=Math.min(s+2*ue,i.length-1),i=i.slice(s,u)}let o=i.map(l=>{let c=l;for(let f of r)if(l.toLowerCase().includes(f.toLowerCase())){let h=new RegExp(f.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\"),\"gi\");c=l.replace(h,g=>`${g}`);break}return c}).join(\" \");return(s===0?\"\":\"...\")+o+(u===i.length-1?\"\":\"...\")}function xi(t,e){return!e||e.length===0||t.length===0?[]:e.map(n=>{let r=se(n);return t.some(i=>n.toLowerCase().includes(i.toLowerCase()))?`
  • #${r}

  • `:`
  • #${r}

  • `}).slice(0,yi)}function Bi(t,e){let n=Pt[e];if(!n||!Z)return{id:e,slug:\"\",title:\"\",content:\"\",tags:[]};let r=Z[n];if(!r)return{id:e,slug:n,title:\"\",content:\"\",tags:[]};let i=oe(bt);return{id:e,slug:n,title:i.tags.length>0&&!i.query?se(r.title):Tn(t,r.title||\"\"),content:Tn(t,r.content||\"\",!0),tags:xi(i.tags,r.tags)}}async function ki(){if(!Z)return;let t=0,e=[],n=new Set;for(let r of Object.keys(Z)){let i=Z[r];if(i){Pt[t]=r;for(let s of i.tags||[])n.add(s);e.push(le.addAsync(t,{id:t,slug:r,title:i.title||\"\",content:i.content||\"\",tags:i.tags||[]})),t++}}await Promise.all(e),Ht=[...n].sort()}async function bi(){return await fetchData}var Rt=!1;async function Ti(){Rt||(Z=await bi(),await ki(),Rt=!0)}async function Si(t){if(!Rt||!Z)return 0;let e=new Set(Ht),n=0;for(let r of Object.keys(t)){if(Z[r])continue;let i=t[r];if(!i)continue;let s=Pt.length;Pt[s]=r,Z[r]=i;for(let u of i.tags||[])e.add(u);await le.addAsync(s,{id:s,slug:r,title:i.title||\"\",content:i.content||\"\",tags:i.tags||[]}),n++}return Ht=[...e].sort(),n}document.addEventListener(\"content-index-updated\",t=>{let e=t.detail;if(!Rt||!Z)return;let n=e?.slugs;!Array.isArray(n)||n.length===0||(async()=>{try{let r=await fetchData;if(!r||typeof r!=\"object\")return;let i=r.content&&typeof r.content==\"object\"?r.content:r,s={};for(let u of n){let o=i[u];o&&typeof o==\"object\"&&(s[u]=o)}await Si(s)}catch{}})()});function Li(){let t=sessionStorage.getItem(\"search-term\");t&&(sessionStorage.removeItem(\"search-term\"),requestAnimationFrame(()=>{let e=document.querySelectorAll(\".popover-hint p, .popover-hint li, .popover-hint h1, .popover-hint h2, .popover-hint h3, .popover-hint h4, .popover-hint h5, .popover-hint h6, .popover-hint td, .popover-hint th, .popover-hint blockquote, article p, article li, article h1, article h2, article h3\");for(let n of Array.from(e)){let i=(n.textContent??\"\").toLowerCase().indexOf(t.toLowerCase());if(i===-1)continue;let s=document.createTreeWalker(n,NodeFilter.SHOW_TEXT),u=0,o,l=null,c=0,f=null,h=0;for(;o=s.nextNode();){let g=o.nodeValue?.length??0;if(!l&&u+g>i&&(l=o,c=i-u),l&&u+g>=i+t.length){f=o,h=i+t.length-u;break}u+=g}if(!(!l||!f)){try{let g=document.createRange();g.setStart(l,c),g.setEnd(f,h);let a=document.createElement(\"span\");a.className=\"search-scroll-target\",g.surroundContents(a),a.scrollIntoView({block:\"center\",behavior:\"smooth\"}),setTimeout(()=>{a.classList.add(\"fade-out\"),setTimeout(()=>{let D=a.parentNode;D&&(D.replaceChild(document.createTextNode(a.textContent||\"\"),a),D.normalize())},1e3)},2e3)}catch{n.scrollIntoView({block:\"center\",behavior:\"smooth\"})}break}}}))}async function Mn(){Ai(),await Ti(),await wi(),Li()}document.addEventListener(\"nav\",Mn);document.addEventListener(\"render\",Mn);\n","/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { NULL } from '../constants';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw the error that was caught (except\n * for unmounting when this parameter is the highest parent that was being\n * unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component,\n\t\t/** @type {import('../internal').ComponentType} */\n\t\tctor,\n\t\t/** @type {boolean} */\n\t\thandled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != NULL) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != NULL) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { MODE_HYDRATE, NULL } from './constants';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function BaseComponent(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nBaseComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != NULL && this._nextState != this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == NULL) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nBaseComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](https://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {ComponentChildren | void}\n */\nBaseComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == NULL) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._index + 1)\n\t\t\t: NULL;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != NULL && sibling._dom != NULL) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : NULL;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tif (component._parentDom && component._dirty) {\n\t\tlet oldVNode = component._vnode,\n\t\t\toldDom = oldVNode._dom,\n\t\t\tcommitQueue = [],\n\t\t\trefQueue = [],\n\t\t\tnewVNode = assign({}, oldVNode);\n\t\tnewVNode._original = oldVNode._original + 1;\n\t\tif (options.vnode) options.vnode(newVNode);\n\n\t\tdiff(\n\t\t\tcomponent._parentDom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tcomponent._parentDom.namespaceURI,\n\t\t\toldVNode._flags & MODE_HYDRATE ? [oldDom] : NULL,\n\t\t\tcommitQueue,\n\t\t\toldDom == NULL ? getDomSibling(oldVNode) : oldDom,\n\t\t\t!!(oldVNode._flags & MODE_HYDRATE),\n\t\t\trefQueue\n\t\t);\n\n\t\tnewVNode._original = oldVNode._original;\n\t\tnewVNode._parent._children[newVNode._index] = newVNode;\n\t\tcommitRoot(commitQueue, newVNode, refQueue);\n\t\toldVNode._dom = oldVNode._parent = null;\n\n\t\tif (newVNode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(newVNode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != NULL && vnode._component != NULL) {\n\t\tvnode._dom = vnode._component.base = NULL;\n\t\tvnode._children.some(child => {\n\t\t\tif (child != NULL && child._dom != NULL) {\n\t\t\t\treturn (vnode._dom = vnode._component.base = child._dom);\n\t\t\t}\n\t\t});\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce != options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\ttry {\n\t\tlet c,\n\t\t\tl = 1;\n\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\twhile (rerenderQueue.length) {\n\t\t\t// Keep the rerender queue sorted by (depth, insertion order). The queue\n\t\t\t// will initially be sorted on the first iteration only if it has more than 1 item.\n\t\t\t//\n\t\t\t// New items can be added to the queue e.g. when rerendering a provider, so we want to\n\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t// single pass\n\t\t\tif (rerenderQueue.length > l) {\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\n\t\t\tc = rerenderQueue.shift();\n\t\t\tl = rerenderQueue.length;\n\n\t\t\trenderComponent(c);\n\t\t}\n\t} finally {\n\t\trerenderQueue.length = process._rerenderCount = 0;\n\t}\n}\n\nprocess._rerenderCount = 0;\n","import { IS_NON_DIMENSIONAL, NULL, SVG_NAMESPACE } from '../constants';\nimport options from '../options';\n\n// Per-instance unique key for event clock stamps. Each Preact copy on the page\n// gets its own random suffix so that `_dispatched` / `_attached` properties on\n// shared event objects and handler functions cannot collide across instances.\n// ~1 in 60M collision odds - if you have that many praect versions on the page,\n// you deserve some weird bugs.\n// In 11 we can replace this with a\n// Symbol\nlet _id = Math.random().toString(8),\n\tEVENT_DISPATCHED = '__d' + _id,\n\tEVENT_ATTACHED = '__a' + _id;\n\nfunction setStyle(style, key, value) {\n\tif (key[0] == '-') {\n\t\tstyle.setProperty(key, value == NULL ? '' : value);\n\t} else if (value == NULL) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\nconst CAPTURE_REGEX = /(PointerCapture)$|Capture$/i;\n\n// A logical clock to solve issues like https://github.com/preactjs/preact/issues/3927.\n// When the DOM performs an event it leaves micro-ticks in between bubbling up which means that\n// an event can trigger on a newly reated DOM-node while the event bubbles up.\n//\n// Originally inspired by Vue\n// (https://github.com/vuejs/core/blob/caeb8a68811a1b0f79/packages/runtime-dom/src/modules/events.ts#L90-L101),\n// but modified to use a logical clock instead of Date.now() in case event handlers get attached\n// and events get dispatched during the same millisecond.\n//\n// The clock is incremented after each new event dispatch. This allows 1 000 000 new events\n// per second for over 280 years before the value reaches Number.MAX_SAFE_INTEGER (2**53 - 1).\nlet eventClock = 0;\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {string} namespace Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, namespace) {\n\tlet useCapture;\n\n\to: if (name == 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] != oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] == 'o' && name[1] == 'n') {\n\t\tuseCapture = name != (name = name.replace(CAPTURE_REGEX, '$1'));\n\t\tconst lowerCaseName = name.toLowerCase();\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (lowerCaseName in dom || name == 'onFocusOut' || name == 'onFocusIn')\n\t\t\tname = lowerCaseName.slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue[EVENT_ATTACHED] = eventClock;\n\t\t\t\tdom.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\t\tuseCapture\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvalue[EVENT_ATTACHED] = oldValue[EVENT_ATTACHED];\n\t\t\t}\n\t\t} else {\n\t\t\tdom.removeEventListener(\n\t\t\t\tname,\n\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\tuseCapture\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (namespace == SVG_NAMESPACE) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname != 'width' &&\n\t\t\tname != 'height' &&\n\t\t\tname != 'href' &&\n\t\t\tname != 'list' &&\n\t\t\tname != 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname != 'tabIndex' &&\n\t\t\tname != 'download' &&\n\t\t\tname != 'rowSpan' &&\n\t\t\tname != 'colSpan' &&\n\t\t\tname != 'role' &&\n\t\t\tname != 'popover' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == NULL ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value == 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != NULL && (value !== false || name[4] == '-')) {\n\t\t\tdom.setAttribute(name, name == 'popover' && value == true ? '' : value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Create an event proxy function.\n * @param {boolean} useCapture Is the event handler for the capture phase.\n * @private\n */\nfunction createEventProxy(useCapture) {\n\t/**\n\t * Proxy an event to hooked event handlers\n\t * @param {import('../internal').PreactEvent} e The event object from the browser\n\t * @private\n\t */\n\treturn function (e) {\n\t\tif (this._listeners) {\n\t\t\tconst eventHandler = this._listeners[e.type + useCapture];\n\t\t\tif (e[EVENT_DISPATCHED] == NULL) {\n\t\t\t\te[EVENT_DISPATCHED] = eventClock++;\n\n\t\t\t\t// When `e[EVENT_DISPATCHED]` is smaller than the time when the targeted event\n\t\t\t\t// handler was attached we know we have bubbled up to an element that was added\n\t\t\t\t// during patching the DOM.\n\t\t\t} else if (e[EVENT_DISPATCHED] < eventHandler[EVENT_ATTACHED]) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn eventHandler(options.event ? options.event(e) : e);\n\t\t}\n\t};\n}\n\nconst eventProxy = createEventProxy(false);\nconst eventProxyCapture = createEventProxy(true);\n","import { enqueueRender } from './component';\nimport { NULL } from './constants';\n\nexport let i = 0;\n\nexport function createContext(defaultValue) {\n\tfunction Context(props) {\n\t\tif (!this.getChildContext) {\n\t\t\t/** @type {Set | null} */\n\t\t\tlet subs = new Set();\n\t\t\tlet ctx = {};\n\t\t\tctx[Context._id] = this;\n\n\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\tthis.componentWillUnmount = () => {\n\t\t\t\tsubs = NULL;\n\t\t\t};\n\n\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t// @ts-expect-error even\n\t\t\t\tif (this.props.value != _props.value) {\n\t\t\t\t\tsubs.forEach(c => {\n\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.sub = c => {\n\t\t\t\tsubs.add(c);\n\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\tif (subs) {\n\t\t\t\t\t\tsubs.delete(c);\n\t\t\t\t\t}\n\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\treturn props.children;\n\t}\n\n\tContext._id = '__cC' + i++;\n\tContext._defaultValue = defaultValue;\n\n\t/** @type {import('./internal').FunctionComponent} */\n\tContext.Consumer = (props, contextValue) => {\n\t\treturn props.children(contextValue);\n\t};\n\n\t// we could also get rid of _contextRef entirely\n\tContext.Provider =\n\t\tContext._contextRef =\n\t\tContext.Consumer.contextType =\n\t\t\tContext;\n\n\treturn Context;\n}\n","import { options, Fragment } from 'preact';\nimport { encodeEntities } from './utils';\nimport { IS_NON_DIMENSIONAL } from '../../src/constants';\n\nlet vnodeId = 0;\n\nconst isArray = Array.isArray;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {unknown} [isStaticChildren]\n * @param {unknown} [__source]\n * @param {unknown} [__self]\n */\nfunction createVNode(type, props, key, isStaticChildren, __source, __self) {\n\tif (!props) props = {};\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = props,\n\t\tref,\n\t\ti;\n\n\tif ('ref' in normalizedProps) {\n\t\tnormalizedProps = {};\n\t\tfor (i in props) {\n\t\t\tif (i == 'ref') {\n\t\t\t\tref = props[i];\n\t\t\t} else {\n\t\t\t\tnormalizedProps[i] = props[i];\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @type {VNode & { __source: any; __self: any }} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_component: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t_index: -1,\n\t\t_flags: 0,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\n/**\n * Create a template vnode. This function is not expected to be\n * used directly, but rather through a precompile JSX transform\n * @param {string[]} templates\n * @param {Array} exprs\n * @returns {VNode}\n */\nfunction jsxTemplate(templates, ...exprs) {\n\tconst vnode = createVNode(Fragment, { tpl: templates, exprs });\n\t// Bypass render to string top level Fragment optimization\n\tvnode.key = vnode._vnode;\n\treturn vnode;\n}\n\nconst JS_TO_CSS = {};\nconst CSS_REGEX = /[A-Z]/g;\n\n/**\n * Unwrap potential signals.\n * @param {*} value\n * @returns {*}\n */\nfunction normalizeAttrValue(value) {\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.valueOf === 'function'\n\t\t? value.valueOf()\n\t\t: value;\n}\n\n/**\n * Serialize an HTML attribute to a string. This function is not\n * expected to be used directly, but rather through a precompile\n * JSX transform\n * @param {string} name The attribute name\n * @param {*} value The attribute value\n * @returns {string}\n */\nfunction jsxAttr(name, value) {\n\tif (options.attr) {\n\t\tconst result = options.attr(name, value);\n\t\tif (typeof result === 'string') return result;\n\t}\n\n\tvalue = normalizeAttrValue(value);\n\n\tif (name === 'ref' || name === 'key') return '';\n\tif (name === 'style' && typeof value === 'object') {\n\t\tlet str = '';\n\t\tfor (let prop in value) {\n\t\t\tlet val = value[prop];\n\t\t\tif (val != null && val !== '') {\n\t\t\t\tconst name =\n\t\t\t\t\tprop[0] == '-'\n\t\t\t\t\t\t? prop\n\t\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t\t\t(JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());\n\n\t\t\t\tlet suffix = ';';\n\t\t\t\tif (\n\t\t\t\t\ttypeof val === 'number' &&\n\t\t\t\t\t// Exclude custom-attributes\n\t\t\t\t\t!name.startsWith('--') &&\n\t\t\t\t\t!IS_NON_DIMENSIONAL.test(name)\n\t\t\t\t) {\n\t\t\t\t\tsuffix = 'px;';\n\t\t\t\t}\n\t\t\t\tstr = str + name + ':' + val + suffix;\n\t\t\t}\n\t\t}\n\t\treturn name + '=\"' + encodeEntities(str) + '\"';\n\t}\n\n\tif (\n\t\tvalue == null ||\n\t\tvalue === false ||\n\t\ttypeof value === 'function' ||\n\t\ttypeof value === 'object'\n\t) {\n\t\treturn '';\n\t} else if (value === true) return name;\n\n\treturn name + '=\"' + encodeEntities('' + value) + '\"';\n}\n\n/**\n * Escape a dynamic child passed to `jsxTemplate`. This function\n * is not expected to be used directly, but rather through a\n * precompile JSX transform\n * @param {*} value\n * @returns {string | null | VNode | Array}\n */\nfunction jsxEscape(value) {\n\tif (\n\t\tvalue == null ||\n\t\ttypeof value === 'boolean' ||\n\t\ttypeof value === 'function'\n\t) {\n\t\treturn null;\n\t}\n\n\tif (typeof value === 'object') {\n\t\t// Check for VNode\n\t\tif (value.constructor === undefined) return value;\n\n\t\tif (isArray(value)) {\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tvalue[i] = jsxEscape(value[i]);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}\n\n\treturn encodeEntities('' + value);\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment,\n\t// precompiled JSX transform\n\tjsxTemplate,\n\tjsxAttr,\n\tjsxEscape\n};\n","import type {\n QuartzComponent,\n QuartzComponentProps,\n QuartzComponentConstructor,\n} from \"@quartz-community/types\";\nimport { classNames } from \"../util/lang\";\nimport { i18n } from \"../i18n\";\nimport style from \"./styles/search.scss\";\n// @ts-expect-error - inline script imported as string by esbuild loader\nimport script from \"./scripts/search.inline.ts\";\n\nexport type SearchField = \"title\" | \"content\" | \"tags\";\n\nexport interface SearchOptions {\n enablePreview: boolean;\n fieldPriority: SearchField[];\n}\n\nconst defaultOptions: SearchOptions = {\n enablePreview: true,\n fieldPriority: [\"title\", \"content\", \"tags\"],\n};\n\nexport default ((userOpts?: Partial) => {\n const Search: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {\n const opts = { ...defaultOptions, ...userOpts };\n const locale = cfg.locale ?? \"en-US\";\n const searchPlaceholder = i18n(locale).components.search.searchBarPlaceholder;\n\n return (\n
    \n \n \n Search\n \n \n \n \n \n

    {i18n(locale).components.search.title}

    \n \n
    \n
    \n \n
    \n
    \n
    \n \n );\n };\n\n Search.afterDOMLoaded = script;\n Search.css = style;\n\n return Search;\n}) satisfies QuartzComponentConstructor;\n"]} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 5148590..7c2a25f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -464,7 +464,7 @@ function i18n(locale) { var search_default = ".search {\n min-width: fit-content;\n max-width: 14rem;\n}\n\n@media all and (max-width: 800px) {\n .search {\n flex-grow: 0.3;\n }\n}\n.search > .search-button {\n background-color: transparent;\n border: 1px var(--lightgray) solid;\n border-radius: 4px;\n font-family: inherit;\n font-size: inherit;\n height: 2rem;\n padding: 0 1rem 0 0;\n display: flex;\n align-items: center;\n text-align: inherit;\n cursor: pointer;\n white-space: nowrap;\n width: 100%;\n}\n\n.search > .search-button > p {\n display: inline;\n color: var(--gray);\n text-wrap: unset;\n}\n\n.search > .search-button svg {\n cursor: pointer;\n width: 18px;\n min-width: 18px;\n margin: 0 0.5rem;\n}\n\n.search > .search-button svg .search-path {\n stroke: var(--darkgray);\n stroke-width: 1.5px;\n transition: stroke 0.5s ease;\n}\n\n.search > .search-container {\n position: fixed;\n contain: layout;\n z-index: var(--search-z-index, 999);\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n overflow-y: auto;\n display: none;\n backdrop-filter: blur(4px);\n}\n\n.search > .search-container.active {\n display: inline-block;\n}\n\n.search > .search-container > .search-space {\n width: 65%;\n margin-top: 12vh;\n margin-left: auto;\n margin-right: auto;\n}\n\n@media all and not (min-width: 1200px) {\n .search > .search-container > .search-space {\n width: 90%;\n }\n}\n.search > .search-container > .search-space > *:not(.ghost-text):not(.tag-suggestions) {\n width: 100%;\n border-radius: 7px;\n background: var(--light);\n box-shadow: 0 14px 50px rgba(27, 33, 48, 0.12), 0 10px 30px rgba(27, 33, 48, 0.16);\n margin-bottom: 2em;\n}\n\n.search > .search-container > .search-space > input {\n box-sizing: border-box;\n padding: 0.5em 1em;\n font-family: var(--bodyFont);\n color: var(--dark);\n font-size: 1.1em;\n border: 1px solid var(--lightgray);\n}\n\n.search > .search-container > .search-space > input:focus {\n outline: none;\n}\n\n.search > .search-container > .search-space > .search-layout {\n display: none;\n flex-direction: row;\n border: 1px solid var(--lightgray);\n flex: 0 0 100%;\n box-sizing: border-box;\n}\n\n.search > .search-container > .search-space > .search-layout.display-results {\n display: flex;\n}\n\n.search > .search-container > .search-space > .search-layout[data-preview] > .results-container {\n flex: 0 0 min(30%, 450px);\n}\n\n@media all and not (max-width: 800px) {\n .search > .search-container > .search-space > .search-layout[data-preview] .result-card > p.card-description {\n display: none;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > div:first-child {\n border-right: 1px solid var(--lightgray);\n border-top-right-radius: unset;\n border-bottom-right-radius: unset;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > div:last-child {\n border-top-left-radius: unset;\n border-bottom-left-radius: unset;\n }\n}\n.search > .search-container > .search-space > .search-layout > div {\n height: 63vh;\n border-radius: 5px;\n}\n\n@media all and (max-width: 800px) {\n .search > .search-container > .search-space > .search-layout {\n flex-direction: column;\n }\n .search > .search-container > .search-space > .search-layout > .preview-container {\n display: none !important;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > .results-container {\n width: 100%;\n height: auto;\n max-height: 60vh;\n flex: 0 0 100%;\n }\n}\n.search > .search-container > .search-space > .search-layout .highlight {\n background: color-mix(in srgb, var(--tertiary) 60%, rgba(255, 255, 255, 0));\n border-radius: 5px;\n scroll-margin-top: 2rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container {\n flex-grow: 1;\n display: block;\n overflow: hidden;\n font-family: inherit;\n color: var(--dark);\n line-height: 1.5em;\n font-weight: 400;\n overflow-y: auto;\n padding: 0 2rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container .preview-inner {\n margin: 0 auto;\n width: 100%;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container a[role=anchor] {\n background-color: transparent;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container {\n overflow-y: auto;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card {\n overflow: hidden;\n padding: 1em;\n cursor: pointer;\n transition: background 0.2s ease;\n border-bottom: 1px solid var(--lightgray);\n width: 100%;\n display: block;\n box-sizing: border-box;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n text-transform: none;\n text-align: left;\n outline: none;\n font-weight: inherit;\n text-decoration: none;\n color: var(--dark);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card:hover,\n.search > .search-container > .search-space > .search-layout > .results-container .result-card:focus,\n.search > .search-container > .search-space > .search-layout > .results-container .result-card.focus {\n background: var(--lightgray);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > h3 {\n margin: 0;\n color: var(--secondary);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul.tags {\n margin-top: 0.45rem;\n margin-bottom: 0;\n padding: 0;\n list-style: none;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul.tags > li {\n display: inline-block;\n margin-right: 0.3rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul > li > p {\n border-radius: 8px;\n background-color: var(--highlight);\n padding: 0.2rem 0.4rem;\n margin: 0;\n line-height: 1.4rem;\n font-weight: 700;\n color: var(--secondary);\n font-size: 0.85rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul > li > p.match-tag {\n color: var(--tertiary);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > p {\n margin-bottom: 0;\n margin-top: 0.5em;\n font-size: 0.9em;\n color: var(--gray);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card.no-match {\n cursor: default;\n}\n\n.search > .search-container > .search-space {\n position: relative;\n}\n\n.search > .search-container > .search-space > .ghost-text {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n pointer-events: none;\n box-sizing: border-box;\n padding: 0.5em 1em;\n font-family: var(--bodyFont);\n font-size: 1.1em;\n color: var(--gray);\n opacity: 0.6;\n white-space: pre;\n overflow: hidden;\n height: auto;\n line-height: normal;\n border: 1px solid transparent;\n}\n\n.search > .search-container > .search-space > .tag-suggestions {\n position: absolute;\n top: calc(3.1em + 2px);\n left: 0;\n right: 0;\n z-index: calc(var(--search-z-index, 999) + 1);\n background: var(--light);\n border: 1px solid var(--lightgray);\n border-radius: 5px;\n box-shadow: 0 4px 12px rgba(27, 33, 48, 0.1), 0 2px 6px rgba(27, 33, 48, 0.08);\n max-height: 240px;\n overflow-y: auto;\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item {\n padding: 0.4em 1em;\n cursor: pointer;\n font-family: var(--bodyFont);\n font-size: 0.95em;\n color: var(--dark);\n transition: background 0.15s ease;\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item:hover,\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item.active {\n background: var(--lightgray);\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item.active {\n color: var(--secondary);\n font-weight: 600;\n}\n\n.search-scroll-target {\n background: color-mix(in srgb, var(--tertiary) 40%, rgba(255, 255, 255, 0));\n border-radius: 3px;\n padding: 0.1em 0;\n transition: background 1s ease;\n}\n\n.search-scroll-target.fade-out {\n background: transparent;\n}"; // src/components/scripts/search.inline.ts -var search_inline_default = `var Rn=Object.create;var Ne=Object.defineProperty;var Wn=Object.getOwnPropertyDescriptor;var Nn=Object.getOwnPropertyNames;var zn=Object.getPrototypeOf,On=Object.prototype.hasOwnProperty;var $n=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Kn=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Nn(e))!On.call(t,i)&&i!==n&&Ne(t,i,{get:()=>e[i],enumerable:!(r=Wn(e,i))||r.enumerable});return t};var Un=(t,e,n)=>(n=t!=null?Rn(zn(t)):{},Kn(e||!t||!t.__esModule?Ne(n,"default",{value:t,enumerable:!0}):n,t));var fe=$n(()=>{});var C;function O(t,e,n){let r=typeof n,i=typeof t;if(r!=="undefined"){if(i!=="undefined"){if(n){if(i==="function"&&r===i)return function(o){return t(n(o))};if(e=t.constructor,e===n.constructor){if(e===Array)return n.concat(t);if(e===Map){var s=new Map(n);for(var u of t)s.set(u[0],u[1]);return s}if(e===Set){u=new Set(n);for(s of t.values())u.add(s);return u}}}return t}return n}return i==="undefined"?e:t}function Ct(t,e){return typeof t>"u"?e:t}function R(){return Object.create(null)}function U(t){return typeof t=="string"}function Lt(t){return typeof t=="object"}function Mt(t,e){if(U(e))t=t[e];else for(let n=0;t&&n1?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&>(this),this)};C.addMatcher=function(t,e){return typeof t=="object"?this.addReplacer(t,e):t.length<2&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?"|":"")+t,this.J=null,this.cache&>(this),this)};C.addReplacer=function(t,e){return typeof t=="string"?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&>(this),this)};C.encode=function(t,e){if(this.cache&&t.length<=this.H)if(this.F){if(this.B.has(t))return this.B.get(t)}else this.F=setTimeout(gt,50,this);this.normalize&&(typeof this.normalize=="function"?t=this.normalize(t):t=ze?t.normalize("NFKD").replace(ze,"").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&t.length>3&&(t=t.replace(Xn,"$1 $2").replace(Zn,"$1 $2").replace(Jn,"$1 "));let n=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer),r=[],i=R(),s,u,o=this.split||this.split===""?t.split(this.split):[t];for(let c=0,f,h;cthis.maxlength)){if(e){if(i[f])continue;i[f]=1}else{if(s===f)continue;s=f}if(n)r.push(f);else if(!this.filter||(typeof this.filter=="function"?this.filter(f):!this.filter.has(f))){if(this.cache&&f.length<=this.I)if(this.F){var l=this.D.get(f);if(l||l===""){l&&r.push(l);continue}}else this.F=setTimeout(gt,50,this);if(this.stemmer){this.K||(this.K=new RegExp("(?!^)("+this.A+")$"));let g;for(;g!==f&&f.length>2;)g=f,f=f.replace(this.K,a=>this.stemmer.get(a))}if(f&&(this.mapper||this.dedupe&&f.length>1)){l="";for(let g=0,a="",D,p;g1&&(this.J||(this.J=new RegExp("("+this.h+")","g")),f=f.replace(this.J,g=>this.matcher.get(g))),f&&this.replacer)for(l=0;f&&lthis.L&&(this.D.clear(),this.I=this.I/1.1|0)),f){if(f!==h)if(e){if(i[f])continue;i[f]=1}else{if(u===f)continue;u=f}r.push(f)}}}return this.finalize&&(r=this.finalize(r)||r),this.cache&&t.length<=this.H&&(this.B.set(t,r),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),r};function gt(t){t.F=null,t.B.clear(),t.D.clear()}function Fe(t,e,n){n||(e||typeof t!="object"?typeof e=="object"&&(n=e,e=0):n=t),n&&(t=n.query||t,e=n.limit||e);let r=""+(e||0);n&&(r+=(n.offset||0)+!!n.context+!!n.suggest+(n.resolve!==!1)+(n.resolution||this.resolution)+(n.boost||0)),t=(""+t).toLowerCase(),this.cache||(this.cache=new mt);let i=this.cache.get(t+r);if(!i){let s=n&&n.cache;s&&(n.cache=!1),i=this.search(t,e,n),s&&(n.cache=s),this.cache.set(t+r,i)}return i}function mt(t){this.limit=t&&t!==!0?t:1e3,this.cache=new Map,this.h=""}mt.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)};mt.prototype.get=function(t){let e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e};mt.prototype.remove=function(t){for(let e of this.cache){let n=e[0];e[1].includes(t)&&this.cache.delete(n)}};mt.prototype.clear=function(){this.cache.clear(),this.h=""};var Oe={normalize:!1,numeric:!1,dedupe:!1},Ot={},ae=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),$e=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),Ke=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\\1+/g,"$1"],Ue={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,\\u00DF:2,d:3,t:3,l:4,m:5,n:5,r:6},_e={Exact:Oe,Default:Ot,Normalize:Ot,LatinBalance:{mapper:ae},LatinAdvanced:{mapper:ae,matcher:$e,replacer:Ke},LatinExtra:{mapper:ae,replacer:Ke.concat([/(?!^)[aeo]/g,""]),matcher:$e},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let n=0;n=u.length)e-=u.length;else{e=u[r?"splice":"slice"](e,n);let o=e.length;if(o&&(i=i.length?i.concat(e):e,n-=o,r&&(t.length-=o),!n))break;e=0}return i}function xt(t){if(!this||this.constructor!==xt)return new xt(t);this.index=t?[t]:[],this.length=t?t.length:0;let e=this;return new Proxy([],{get(n,r){if(r==="length")return e.length;if(r==="push")return function(i){e.index[e.index.length-1].push(i),e.length++};if(r==="pop")return function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()};if(r==="indexOf")return function(i){let s=0;for(let u=0,o,l;u=0)return s+l;s+=o.length}return-1};if(r==="includes")return function(i){for(let s=0;s32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}V.prototype.get=function(t){let e=this.index[this.B(t)];return e&&e.get(t)};V.prototype.set=function(t,e){var n=this.B(t);let r=this.index[n];r?(n=r.size,r.set(t,e),(n-=r.size)&&this.size++):(this.index[n]=r=new Map([[t,e]]),this.h.push(r),this.size++)};function J(t=8){if(!this||this.constructor!==J)return new J(t);this.index=R(),this.h=[],this.size=0,t>32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}J.prototype.add=function(t){var e=this.B(t);let n=this.index[e];n?(e=n.size,n.add(t),(e-=n.size)&&this.size++):(this.index[e]=n=new Set([t]),this.h.push(n),this.size++)};C=V.prototype;C.has=J.prototype.has=function(t){let e=this.index[this.B(t)];return e&&e.has(t)};C.delete=J.prototype.delete=function(t){let e=this.index[this.B(t)];e&&e.delete(t)&&this.size--};C.clear=J.prototype.clear=function(){this.index=R(),this.h=[],this.size=0};C.values=J.prototype.values=function*(){for(let t=0;t=this.priority*this.priority*3):(ge=setTimeout(Yn,0),Je=Date.now()),Ut){let s=this;return new Promise(u=>{setTimeout(function(){u(s[t+"Async"].apply(s,e))},0)})}let i=this[t].apply(this,e);return n=i.then?i:new Promise(s=>s(i)),r&&n.then(r),n}}var it=0;function dt(t={},e){function n(o){function l(c){c=c.data||c;let f=c.id,h=f&&s.h[f];h&&(h(c.msg),delete s.h[f])}if(this.worker=o,this.h=R(),this.worker)return i?this.worker.on("message",l):this.worker.onmessage=l,t.config?new Promise(function(c){it>1e9&&(it=0),s.h[++it]=function(){c(s)},s.worker.postMessage({id:it,task:"init",factory:r,options:t})}):(this.priority=t.priority||4,this.encoder=e||null,this.worker.postMessage({task:"init",factory:r,options:t}),this)}if(!this||this.constructor!==dt)return new dt(t);let r=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;r&&(r=r.toString());let i=typeof window>"u",s=this,u=Gn(r,i,t.worker);return u.then?u.then(function(o){return n.call(s,o)}):n.call(this,u)}rt("add");rt("append");rt("search");rt("update");rt("remove");rt("clear");rt("export");rt("import");dt.prototype.searchCache=Fe;ye(dt.prototype);function rt(t){dt.prototype[t]=function(){let e=this,n=[].slice.call(arguments);var r=n[n.length-1];let i;return typeof r=="function"&&(i=r,n.pop()),r=new Promise(function(s){t==="export"&&typeof n[0]=="function"&&(n[0]=null),it>1e9&&(it=0),e.h[++it]=s,e.worker.postMessage({task:t,id:it,args:n})}),i?(r.then(i),this):r}}function Gn(t,e,n){return e?typeof module<"u"?new(fe()).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>Un(fe(),1)).then(function(r){return new r.Worker(import.meta.dirname+"/node/node.mjs")}):t?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Qn.toString()],{type:"text/javascript"}))):new window.Worker(typeof n=="string"?n:import.meta.url.replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js").replace("flexsearch.bundle.module.min.mjs","module/worker/worker.js"),{type:"module"})}Dt.prototype.add=function(t,e,n){if(Lt(t)&&(e=t,t=Mt(e,this.key)),e&&(t||t===0)){if(!n&&this.reg.has(t))return this.update(t,e);for(let o=0,l;oe?t.slice(n,n+e):t,r?wt.call(this,t):t;let i=[];for(let s=0,u,o;s=o){n-=o;continue}u=u.slice(n,n+e),o=u.length,n=0}if(o>e&&(u=u.slice(0,e),o=e),!i.length&&o>=e)return r?wt.call(this,u):u;if(i.push(u),e-=o,!e)break}return i=i.length>1?[].concat.apply([],i):i[0],r?wt.call(this,i):i}function Gt(t,e,n,r){var i=r[0];if(i[0]&&i[0].query)return t[e].apply(t,i);if(!(e!=="and"&&e!=="not"||t.result.length||t.await||i.suggest))return r.length>1&&(i=r[r.length-1]),(r=i.resolve)?t.await||t.result:t;let s=[],u=0,o=0,l,c,f,h,g;for(e=0;e1&&(n=n[e].apply(n,t.slice(1))),n}j.prototype.or=function(){return Gt(this,"or",qn,arguments)};function qn(t,e,n,r,i,s,u){return t.length&&(this.result.length&&t.push(this.result),t.length<2?this.result=t[0]:(this.result=en(t,e,n,!1,this.h),n=0)),i&&(this.await=null),i?this.resolve(e,n,r,u):this}j.prototype.and=function(){return Gt(this,"and",ti,arguments)};function ti(t,e,n,r,i,s,u){if(!s&&!this.result.length)return i?this.result:this;let o;if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{let l=0;for(let c=0,f,h;c1?y.join(" "):y[0];let w;if(y&&B){for(var v=B.length,M=(Q.split?B.replace(Q.split,""):B).length-y.length,T="",W=0,z=0;z-1&&(T=(N?B.substring(0,N):"")+u+B.substring(N,N+P)+o+(N+P=l)break}if(b=ht.length*(s.length-2),a||D||l&&d.length-b>l)if(b=l+b-g*2,k=x-A,a>0&&(k+=a),D>0&&(k+=D),k<=b)F=a?A-(a>0?a:0):A-((b-k)/2|0),m=D?x+(D>0?D:0):F+b,c||(F>0&&d.charAt(F)!==" "&&d.charAt(F-1)!==" "&&(F=d.indexOf(" ",F),F<0&&(F=0)),m=m.length-1){if(I>=m.length){k[w+1]=1,I>=F.length&&(b[w+1]=1);continue}v-=g}if(d=m[I].text,P=D&&y[w])if(P>0){if(d.length>P)if(k[w+1]=1,c)d=d.substring(0,P);else continue;(P-=d.length)||(P=-1),y[w]=P}else{k[w+1]=1;continue}if(v+d.length+1<=l)d=" "+d,x[w]+=d;else if(c)$=l-v-1,$>0&&(d=" "+d.substring(0,$),x[w]+=d),k[w+1]=1;else{k[w+1]=1;continue}}else{if(k[w])continue;if(I-=M,A[I]){v-=g,k[w]=1,b[w]=1;continue}if(I<=0){if(I<0){k[w]=1,b[w]=1;continue}v-=g}if(d=m[I].text,P=a&&B[w])if(P>0){if(d.length>P)if(k[w]=1,c)d=d.substring(d.length-P);else continue;(P-=d.length)||(P=-1),B[w]=P}else{k[w]=1;continue}if(v+d.length+1<=l)d+=" ",x[w]=d+x[w];else if(c)$=d.length+1-(l-v),$>=0&&$=F.length-1||I1?en(l,n,r,u,s):(l=l[0])&&n&&l.length>n||r?l.slice(r,n+r):l;else{if(tn||r)&&(l=l.slice(r,n+r));else{i=[];for(let h=0,g;hr)r-=g.length;else if((n&&g.length>n||r)&&(g=g.slice(r,n+r),n-=g.length,r&&(r-=g.length)),i.push(g),!n)break}l=i}}return l}function en(t,e,n,r,i){let s=[],u=R(),o;var l=t.length;let c;if(r){for(i=l-1;i>=0;i--)if(c=(r=t[i])&&r.length){for(l=0;l=0;f--){h=t[f];for(let a=0;a1?Jt(i,1,0,0,l,c):i[0],B)})}return a?i:new j(i.length>1?Jt(i,1,0,0,l,c):i[0],this)}}a||u||!(h=h||this.field)||(U(h)?u=h:(h.constructor===Array&&h.length===1&&(h=h[0]),u=h.field||h.index)),h&&h.constructor!==Array&&(h=[h])}h||(h=this.field);let b;m=(this.worker||this.db)&&!r&&[];for(let B=0,y,v,M;B"u"&&(this.db?m.push(p=this.index.get(this.field[0]).db.enrich(p)):p=wt.call(this,p)),u)return a?D?Vt(t,p,this.index,u,D):p:new j(p,this);i[F]={field:s[F],result:p}}if(d&&this.db&&m.length){let B=this;return Promise.all(m).then(function(y){for(let v=0;v0&&((n&&e>n||r)&&(t=t.slice(r,r+n)),i&&(t=wt.call(this,t))),t):[]):[]}function wt(t){if(!this||!this.store)return t;if(this.db)return this.index.get(this.field[0]).db.enrich(t);let e=Array(t.length);for(let n=0,r;n1?n:n[0]}C.append=function(t,e){return this.add(t,e,!0)};C.update=function(t,e){return this.remove(t).add(t,e)};C.remove=function(t){Lt(t)&&(t=Mt(t,this.key));for(var e of this.index.values())e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let r of n){e=r[0];let i=r[1],s=i.indexOf(t);s>-1&&(i.length>1?i.splice(s,1):n.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this};C.clear=function(){let t=[];for(let e of this.index.values()){let n=e.clear();n.then&&t.push(n)}if(this.tag)for(let e of this.tag.values())e.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this};C.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)};C.cleanup=function(){for(let t of this.index.values())t.cleanup();return this};C.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then(function(e){return e[0]&&e[0].doc||null}):this.store.get(t)||null};C.set=function(t,e){return typeof t=="object"&&(e=t,t=Mt(e,this.key)),this.store.set(t,e),this};C.searchCache=Fe;C.export=ui;C.import=oi;ye(Dt.prototype);function Ae(t,e=0){let n=[],r=[];e&&(e=25e4/e*5e3|0);for(let i of t.entries())r.push(i),r.length===e&&(n.push(r),r=[]);return r.length&&n.push(r),n}function we(t,e){e||(e=new Map);for(let n=0,r;n2?n[0]:"";if(n=n.length>2?n[2]:n[1],this.worker&&r)return this.index.get(r).import(t);if(e){if(typeof e=="string"&&(e=JSON.parse(e)),r)return this.index.get(r).import(n,e);switch(n){case"reg":this.fastupdate=!1,this.reg=un(e,this.reg);for(let i=0,s;i=0&&i.splice(u,1)}}else jt(this.map,t),this.depth&&jt(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.M&&on(this)),this.cache&&this.cache.remove(t),this};function jt(t,e){let n=0;var r=typeof e>"u";if(t.constructor===Array){for(let i=0,s,u,o;i=0){if(s.length>1)return s.splice(u,1),1;if(delete t[i],n)return 1;o=1}else{if(o)return 1;n++}}}else for(let i of t.entries())r=i[0],jt(i[1],e)?n++:t.delete(r);return n}var li={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};X.prototype.add=function(t,e,n,r){if(e&&(t||t===0)){if(!r&&!n&&this.reg.has(t))return this.update(t,e);r=this.depth,e=this.encoder.encode(e,!r);let c=e.length;if(c){let f=R(),h=R(),g=this.resolution;for(let a=0;a2){for(let p=1,d,F,m,A;p2){for(let p=0,d;pp;s--){u=D.substring(p,s),d=this.rtl?i-1-p:p;var o=this.score?this.score(e,D,a,u,d):Kt(g,c,a,i,d);G(this,h,u,o,t,n)}break}case"bidirectional":case"reverse":if(i>1){for(o=i-1;o>0;o--){u=D[this.rtl?i-1-o:o]+u;var l=this.score?this.score(e,D,a,u,o):Kt(g,c,a,i,o);G(this,h,u,l,t,n)}u=""}case"forward":if(i>1){for(o=0;o1&&au;let p=this.score?this.score(e,u,a,D,o-1):Kt(i+(c/2>i?0:1),c,a,s-1,o-1);G(this,f,l?u:D,p,t,n,l?D:u)}}}}this.fastupdate||this.reg.add(t)}}return this.db&&(this.commit_task.push(n?{ins:t}:{del:t}),this.M&&on(this)),this};function G(t,e,n,r,i,s,u){let o,l;if(!(o=e[n])||u&&!o[u]){if(u?(e=o||(e[n]=R()),e[u]=1,l=t.ctx,(o=l.get(u))?l=o:l.set(u,l=t.keystore?new V(t.keystore):new Map)):(l=t.map,e[n]=1),(o=l.get(n))?l=o:l.set(n,l=o=[]),s){for(let c=0,f;c1?e+(r||0)<=t?n+(i||0):(t-1)/(e+(r||0))*(n+(i||0))+1|0:0}X.prototype.search=function(t,e,n){if(n||(e||typeof t!="object"?typeof e=="object"&&(n=e,e=0):(n=t,t="")),n&&n.cache)return n.cache=!1,t=this.searchCache(t,e,n),n.cache=!0,t;let r=[],i,s,u,o=0,l,c,f,h,g;n&&(t=n.query||t,e=n.limit||e,o=n.offset||0,s=n.context,u=n.suggest,g=(l=n.resolve)&&n.enrich,f=n.boost,h=n.resolution,c=this.db&&n.tag),typeof l>"u"&&(l=this.resolve),s=this.depth&&s!==!1;let a=this.encoder.encode(t,!s);if(i=a.length,e=e||(l?100:0),i===1)return Ye.call(this,a[0],"",e,o,l,g,c);if(i===2&&s&&!u)return Ye.call(this,a[1],a[0],e,o,l,g,c);let D=R(),p=0,d;if(s&&(d=a[0],p=1),h||h===0||(h=d?this.N:this.resolution),this.db){if(this.db.search&&(n=this.db.search(this,a,e,o,u,l,g,c),n!==!1))return n;let F=this;return(async function(){for(let m,A;p1)l=Jt(t,e,n,r,i,s,u);else if(o===1)return u?Ce.call(null,t[0],n,r):new j(t[0],this);return u?l:new j(l,this)}function Ye(t,e,n,r,i,s,u){return t=me(this,t,e,n,r,i,s,u),this.db?t.then(function(o){return i?o||[]:new j(o,this)}):t&&t.length?i?Ce.call(this,t,n,r):new j(t,this):i?[]:new j([],this)}function Ge(t,e,n,r){let i=[];if(t&&t.length){if(t.length<=r){e.push(t);return}for(let s=0,u;sn)&&(l=n,n=e,e=l),t.db?t.db.get(e,n,r,i,s,u,o):(t=n?(t=t.ctx.get(n))&&t.get(e):t.map.get(e),t)}function X(t,e){if(!this||this.constructor!==X)return new X(t);if(t){var n=U(t)?t:t.preset;n&&(t=Object.assign({},li[n],t))}else t={};n=t.context;let r=n===!0?{depth:1}:n||{},i=U(t.encoder)?_e[t.encoder]:t.encode||t.encoder||{};this.encoder=i.encode?i:typeof i=="object"?new vt(i):{encode:i},this.resolution=t.resolution||9,this.tokenize=n=(n=t.tokenize)&&n!=="default"&&n!=="exact"&&n||"strict",this.depth=n==="strict"&&r.depth||0,this.bidirectional=r.bidirectional!==!1,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(n=t.keystore||0)&&(this.keystore=n),this.map=n?new V(n):new Map,this.ctx=n?new V(n):new Map,this.reg=e||(this.fastupdate?n?new V(n):new Map:n?new J(n):new Set),this.N=r.resolution||3,this.rtl=i.rtl||t.rtl||!1,this.cache=(n=t.cache||null)&&new mt(n),this.resolve=t.resolve!==!1,(n=t.db)&&(this.db=this.mount(n)),this.M=t.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}C=X.prototype;C.mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)};C.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)};C.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function on(t){t.commit_timer||(t.commit_timer=setTimeout(function(){t.commit_timer=null,t.db.commit(t)},1))}C.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db?(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[],this.db.clear()):this};C.append=function(t,e){return this.add(t,e,!0)};C.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)};C.update=function(t,e){let n=this,r=this.remove(t);return r&&r.then?r.then(()=>n.add(t,e)):this.add(t,e)};C.cleanup=function(){return this.fastupdate?(jt(this.map),this.depth&&jt(this.ctx),this):this};C.searchCache=Fe;C.export=function(t,e,n=0,r=0){let i,s;switch(r){case 0:i="reg",s=sn(this.reg);break;case 1:i="cfg",s=null;break;case 2:i="map",s=Ae(this.map,this.reg.size);break;case 3:i="ctx",s=nn(this.ctx,this.reg.size);break;default:return}return Zt.call(this,t,e,i,s,n,r)};C.import=function(t,e){if(e)switch(typeof e=="string"&&(e=JSON.parse(e)),t=t.split("."),t[t.length-1]==="json"&&t.pop(),t.length===3&&t.shift(),t=t.length>1?t[1]:t[0],t){case"reg":this.fastupdate=!1,this.reg=un(e,this.reg);break;case"map":this.map=we(e,this.map);break;case"ctx":this.ctx=rn(e,this.ctx)}};C.serialize=function(t=!0){let e="",n="",r="";if(this.reg.size){let s;for(var i of this.reg.keys())s||(s=typeof i),e+=(e?",":"")+(s==="string"?'"'+i+'"':i);e="index.reg=new Set(["+e+"]);",n=Ze(this.map,s),n="index.map=new Map(["+n+"]);";for(let u of this.ctx.entries()){i=u[0];let o=Ze(u[1],s);o="new Map(["+o+"])",o='["'+i+'",'+o+"]",r+=(r?",":"")+o}r="index.ctx=new Map(["+r+"]);"}return t?"function inject(index){"+e+n+r+"}":e+n+r};ye(X.prototype);var ln=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Qt=["map","ctx","tag","reg","cfg"],pt=R();function Yt(t,e={}){if(!this||this.constructor!==Yt)return new Yt(t,e);typeof t=="object"&&(e=t,t=t.name),t||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(t?":"+t.toLowerCase().replace(/[^a-z0-9_\\-]/g,""):""),this.field=e.field?e.field.toLowerCase().replace(/[^a-z0-9_\\-]/g,""):"",this.type=e.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}C=Yt.prototype;C.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())};C.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),pt[t.id]||(pt[t.id]=[]),pt[t.id].push(t.field);let e=ln.open(t.id,1);return e.onupgradeneeded=function(){let n=t.db=this.result;for(let r=0,i;r=f.length){r-=f.length;continue}let h=n?r+Math.min(f.length-r,n):f.length;for(let g=r;g=s.length?[]:!e&&!n?s:(s=s.slice(n,n+e),r?i.enrich(s):s)})};C.enrich=function(t){typeof t!="object"&&(t=[t]);let e=this.db.transaction("reg","readonly").objectStore("reg"),n=[];for(let r=0;r=0)if(i=1,o.length>1)o.splice(c,1);else{r[u]=[];break}s+=o.length}if(n)break}s?i&&t.update(r):t.delete(),t.continue()}C.remove=function(t){return typeof t!="object"&&(t=[t]),Promise.all([this.transaction("map","readwrite",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction("ctx","readwrite",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction("tag","readwrite",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t,!0)}}),this.transaction("reg","readwrite",function(e){for(let n=0;n{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,n(this.result)},t.onerror=t.onblocked=r,t=null})}var hn={Index:X,Charset:_e,Encoder:vt,Document:Dt,Worker:dt,Resolver:j,IndexedDB:Yt,Language:{}};var Ni=Object.hasOwnProperty;var gn,H,dn,hi,ut,cn,Dn,mn,ve,te,It,Fn,Te,Be,ke,ci,_n={},ne=[],fi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,re=Array.isArray;function q(t,e){for(var n in e)t[n]=e[n];return t}function Se(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function xe(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++dn,__i:-1,__u:0};return i==null&&H.vnode!=null&&H.vnode(s),s}function kt(t){return t.children}function ee(t,e){this.props=t,this.context=e}function Bt(t,e){if(e==null)return t.__?Bt(t.__,t.__i+1):null;for(var n;ee&&ut.sort(mn),t=ut.shift(),e=ut.length,ai(t)}finally{ut.length=ie.__r=0}}function Cn(t,e,n,r,i,s,u,o,l,c,f){var h,g,a,D,p,d,F,m=r&&r.__k||ne,A=e.length;for(l=pi(n,e,m,l,A),h=0;h0?u=t.__k[s]=xe(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):t.__k[s]=u,l=s+g,u.__=t,u.__b=t.__b+1,o=null,(c=u.__i=gi(u,n,l,h))!=-1&&(h--,(o=n[c])&&(o.__u|=2)),o==null||o.__v==null?(c==-1&&(i>f?g--:il?g--:g++,u.__u|=4))):t.__k[s]=null;if(h)for(s=0;s(f?1:0)){for(i=n-1,s=n+1;i>=0||s=0?i--:s++])!=null&&(2&c.__u)==0&&o==c.key&&l==c.type)return u}return-1}function an(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||fi.test(e)?n:n+"px"}function qt(t,e,n,r,i){var s,u;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||an(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||an(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(Fn,"$1")),u=e.toLowerCase(),e=u in t||e=="onFocusOut"||e=="onFocusIn"?u.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n[It]=r[It]:(n[It]=Te,t.addEventListener(e,s?ke:Be,s)):t.removeEventListener(e,s?ke:Be,s);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function pn(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[te]==null)e[te]=Te++;else if(e[te]0?t:re(t)?t.map(wn):q({},t)}function Di(t,e,n,r,i,s,u,o,l){var c,f,h,g,a,D,p,d=n.props||_n,F=e.props,m=e.type;if(m=="svg"?i="http://www.w3.org/2000/svg":m=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c"u"?"":document.body?.dataset?.basepath??""}function Me(t,e){let n=e??_i(),r=t.startsWith("/")?t:"/"+t;return n+r}function tt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function xn(t,e){if(!t)return()=>{};let n=i=>{t.classList.contains("active")&&i.target===t&&(i.preventDefault(),i.stopPropagation(),e())},r=i=>{t.classList.contains("active")&&i.key==="Escape"&&(i.preventDefault(),e())};return t.addEventListener("click",n),document.addEventListener("keydown",r),()=>{t.removeEventListener("click",n),document.removeEventListener("keydown",r)}}function Bn(t,e){let n=t.querySelectorAll("[src], [href]");for(let r of Array.from(n)){let i=r.hasAttribute("href")?"href":"src",s=r.getAttribute(i);if(s&&!(s.startsWith("http://")||s.startsWith("https://")||s.startsWith("mailto:")||s.startsWith("tel:")||s.startsWith("#")||s.startsWith("/")||s.startsWith("data:")))try{let u=new URL(s,e).toString();r.setAttribute(i,u)}catch{continue}}}function se(t){return t.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}var je="basic",bt="",kn=8,yi=5,ue=30,Ci=t=>{let e=[],n=-1,r=-1,i=t.toLowerCase(),s=0;for(let u of i){let o=u.codePointAt(0);o>=12352&&o<=12447||o>=12448&&o<=12543||o>=19968&&o<=40959||o>=44032&&o<=55215||o>=131072&&o<=173791?(n!==-1&&(e.push(i.slice(n,r)),n=-1),e.push(u)):o===32||o===9||o===10||o===13?n!==-1&&(e.push(i.slice(n,r)),n=-1):(n===-1&&(n=s),r=s+1),s+=u.length}return n!==-1&&e.push(i.slice(n)),e},le=new hn.Document({encode:Ci,document:{id:"id",tag:"tags",index:[{field:"title",tokenize:"forward"},{field:"content",tokenize:"forward"},{field:"tags",tokenize:"forward"}]}}),Z=null,Ht=[],Pt=[],Ie=new Map;function oe(t){let e=t.split(/\\s+/),n=[],r=[];for(let i of e)i.startsWith("#")&&i.length>1?n.push(i.substring(1)):i!=="#"&&r.push(i);return{tags:n,query:r.join(" ").trim()}}function bn(t){let e=t.split(/\\s+/),n=e[e.length-1];return n&&n.startsWith("#")?n.substring(1):null}var Sn=new DOMParser;async function Ei(t){if(Ie.has(t))return Ie.get(t);let e=new URL(Me(t),window.location.origin).toString();try{let n=await fetch(e);if(!n.ok)return[];let r=await n.text(),i=Sn.parseFromString(r??"","text/html");Bn(i,e);let s=Array.from(i.getElementsByClassName("popover-hint"));return Ie.set(t,s),s}catch{return[]}}var He=[];function Ft(t){He.push(t)}function Ai(){He.forEach(t=>t()),He.length=0}async function wi(){let t=document.querySelectorAll(".search");for(let e of Array.from(t)){let n=e.querySelector(".search-container"),r=e.querySelector(".search-button"),i=e.querySelector(".search-bar"),s=e.querySelector(".search-layout");if(!n||!r||!i||!s)continue;let u=n.closest(".sidebar"),o=s.getAttribute("data-preview")==="true",l=s.getAttribute("data-field-priority"),c=l?JSON.parse(l):["title","content","tags"],f=s.querySelector(".results-container");f||(f=document.createElement("div"),f.className="results-container",f.setAttribute("role","listbox"),f.setAttribute("aria-label","Search results"),s.appendChild(f));let h=s.querySelector(".preview-container");o&&!h&&(h=document.createElement("div"),h.className="preview-container",s.appendChild(h));let g=document.createElement("div");g.className="tag-suggestions",g.setAttribute("role","listbox"),g.setAttribute("aria-label","Tag suggestions"),g.style.display="none";let a=i.parentElement;a.insertBefore(g,i.nextSibling);let D=document.createElement("span");D.className="ghost-text",D.setAttribute("aria-hidden","true"),a.insertBefore(D,i.nextSibling);let p=-1,d=[],F=!1,m=_=>{if(p<0||p>=d.length){D.textContent="";return}let E=d[p];if(!E.toLowerCase().startsWith(_.toLowerCase())){D.textContent="";return}let L=E.substring(_.length);D.innerHTML="";let S=document.createElement("span");S.style.visibility="hidden",S.textContent=i.value,D.appendChild(S),D.appendChild(document.createTextNode(L))},A=()=>{g.querySelectorAll(".tag-suggestion-item").forEach((L,S)=>{L.classList.toggle("active",S===p)});let E=bn(i.value)||"";m(E)},x=()=>{F=!1,p=-1,d=[],g.style.display="none",D.textContent=""},b=_=>{let E=i.value,L=E.lastIndexOf("#");L!==-1&&(i.value=E.substring(0,L)+"#"+_+" "),x(),i.focus(),i.dispatchEvent(new Event("input"))},k=_=>{if(Rt){if(d=_===""?Pt.slice(0,10):Pt.filter(E=>E.toLowerCase().startsWith(_.toLowerCase())).slice(0,10),d.length===0){x();return}p=0,F=!0,tt(g);for(let E=0;E!F||d.length===0?!1:(_==="down"?p=Math.min(p+1,d.length-1):p=Math.max(p-1,0),A(),!0),y=null,v=0,M=null,T=()=>{n.classList.remove("active"),u&&(u.style.zIndex=""),r.setAttribute("aria-expanded","false"),i.value="",tt(f),h&&tt(h),s.classList.remove("display-results"),je="basic",y=null,x(),r.focus()},W=_=>{je=_,u&&(u.style.zIndex="9999"),n.classList.add("active"),r.setAttribute("aria-expanded","true"),i.focus()},z=async _=>{if(tt(f),_.length===0){let E=document.createElement("a");E.className="result-card no-match";let L=document.createElement("h3");L.textContent="No results.";let S=document.createElement("p");S.textContent="Try another search term?",E.appendChild(L),E.appendChild(S),f.appendChild(E),y=null,h&&tt(h)}else for(let E of _){let L=document.createElement("a");L.className="result-card",L.id=E.slug,L.href=Me(E.slug);let S=document.createElement("h3");if(S.className="card-title",S.innerHTML=E.title,L.appendChild(S),E.tags.length>0){let K=document.createElement("ul");K.className="tags",K.innerHTML=E.tags.join(""),L.appendChild(K)}let Y=document.createElement("p");Y.className="card-description",Y.innerHTML=E.content,L.appendChild(Y),f.appendChild(L)}},N=()=>Array.from(f.querySelectorAll(".result-card:not(.no-match)")),P=()=>{let _=oe(bt);return _.query||(_.tags.length>0?_.tags.join(" "):bt)},$=async _=>{if(!h||(tt(h),!_))return;let E=_.id,L=++v,S=await Ei(E);if(L!==v)return;let Y=P(),K=document.createElement("div");K.className="preview-inner";for(let ct of S){let yt=ct.cloneNode(!0);Y.trim()!==""&&(yt.innerHTML=vi(Y,yt)),K.appendChild(yt)}h.appendChild(K),requestAnimationFrame(()=>{let ct=Array.from(h.getElementsByClassName("highlight"));if(ct.length===0)return;ct.sort((he,ce)=>ce.innerHTML.length-he.innerHTML.length);let yt=ct[0],Nt=0,ft=yt;for(;ft&&ft!==h;)Nt+=ft.offsetTop,ft=ft.offsetParent;h.scrollTop=Math.max(0,Nt-50)})},et=_=>{y&&y.classList.remove("focus"),y=_,y&&(y.classList.add("focus"),y.scrollIntoView({block:"nearest"})),M&&clearTimeout(M),M=setTimeout(()=>$(y),150)},Q=_=>{let E=N();if(E.length===0){et(null);return}let L=Math.min(Math.max(_,0),E.length-1);et(E[L]??null)},Wt=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):-1;Q(E+1)},ot=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):_.length;Q(E-1)},nt=async _=>{let E=_.target.value;bt=E;let L=bn(E);L!==null?k(L):x();let S=oe(E),Y=S.query!==""||S.tags.length>0;if(s.classList.toggle("display-results",Y),je=S.tags.length>0&&!S.query?"tags":"basic",!Y){tt(f),h&&tt(h),y=null;return}let K;S.query?K=await le.searchAsync({query:S.query,limit:S.tags.length>0?1e4:kn,index:["title","content"]}):S.tags.length>0?K=await le.searchAsync({query:S.tags[0],limit:1e4,index:["tags"]}):K=[];let ct=at=>{let Tt=K.filter(zt=>zt.field===at);return Tt.length===0?[]:[...Tt[0].result]},Nt=[...new Set(c.flatMap(at=>ct(at)))].filter(at=>{if(S.tags.length===0)return!0;let Tt=Ht[at];if(!Tt)return!1;let zt=Z?.[Tt];if(!zt)return!1;let In=zt.tags||[];return S.tags.every(Hn=>In.some(Pn=>Pn.toLowerCase()===Hn.toLowerCase()))}),ft=S.query||(S.tags.length>0?S.tags.join(" "):E),he=Nt.map(at=>Bi(ft,at));await z(he.slice(0,kn));let ce=N();et(ce[0]??null)},lt=_=>{_.stopPropagation(),W("basic")};r.addEventListener("click",lt),Ft(()=>r.removeEventListener("click",lt)),i.addEventListener("input",nt),Ft(()=>i.removeEventListener("input",nt));let ht=_=>{if(F){if(_.key==="ArrowDown"){_.preventDefault(),B("down");return}if(_.key==="ArrowUp"){_.preventDefault(),B("up");return}if(_.key==="Tab"){_.preventDefault(),p>=0&&p=0&&pi.removeEventListener("keydown",ht));let w=_=>{_.key==="k"&&(_.ctrlKey||_.metaKey)&&!_.shiftKey?(_.preventDefault(),n.classList.contains("active")?T():W("basic")):_.shiftKey&&(_.ctrlKey||_.metaKey)&&_.key.toLowerCase()==="k"&&(_.preventDefault(),W("tags"),i.value="#",i.dispatchEvent(new Event("input")))};document.addEventListener("keydown",w),Ft(()=>document.removeEventListener("keydown",w));let I=()=>{let _=oe(bt),E=_.query||(_.tags.length>0?_.tags.join(" "):bt);E.trim()&&sessionStorage.setItem("search-term",E.trim())},_t=_=>{let E=_.target.closest(".result-card");!E||E.classList.contains("no-match")||_ instanceof MouseEvent&&(_.altKey||_.ctrlKey||_.metaKey||_.shiftKey)||(I(),T())},Pe=_=>{let E=_.target.closest(".result-card");!E||E.classList.contains("no-match")||et(E)};f.addEventListener("click",_t),f.addEventListener("mouseover",Pe),Ft(()=>{f.removeEventListener("click",_t),f.removeEventListener("mouseover",Pe)});let Re=_=>{let E=_.target.closest(".tag-suggestion-item");if(!E)return;let L=E.getAttribute("data-tag");L&&b(L)},We=_=>{let E=_.target.closest(".tag-suggestion-item");if(!E)return;let L=E.getAttribute("data-index");L!==null&&(p=parseInt(L,10),A())};g.addEventListener("click",Re),g.addEventListener("mouseover",We),Ft(()=>{g.removeEventListener("click",Re),g.removeEventListener("mouseover",We)});let jn=xn(n,T);Ft(jn)}}function Ln(t){let e=t.split(/\\s+/).filter(r=>r.trim()!==""),n=e.length;if(n>1)for(let r=1;ri.length-r.length)}function vi(t,e){let n=Ln(t).filter(c=>c.trim()!=="");if(n.length===0)return e.innerHTML;let r=Sn.parseFromString(e.innerHTML,"text/html"),i=n.map(c=>c.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")).join("|");if(i==="")return e.innerHTML;let s=new RegExp(i,"gi"),u=r.createTreeWalker(r.body,NodeFilter.SHOW_TEXT),o=[],l=u.nextNode();for(;l;)o.push(l),l=u.nextNode();for(let c of o){let f=c.nodeValue??"";if(s.lastIndex=0,!s.test(f))continue;s.lastIndex=0;let h=r.createDocumentFragment(),g=0,a;for(;(a=s.exec(f))!==null;){a.index>g&&h.appendChild(r.createTextNode(f.slice(g,a.index)));let D=r.createElement("span");D.className="highlight",D.textContent=a[0],h.appendChild(D),g=a.index+a[0].length}gl!==""),s=0,u=i.length-1;if(n){let l=g=>r.some(a=>g.toLowerCase().startsWith(a.toLowerCase())),c=i.map(l),f=0,h=0;for(let g=0;gp+(d?1:0),0);D>=f&&(f=D,h=g)}s=Math.max(h-ue,0),u=Math.min(s+2*ue,i.length-1),i=i.slice(s,u)}let o=i.map(l=>{let c=l;for(let f of r)if(l.toLowerCase().includes(f.toLowerCase())){let h=new RegExp(f.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&"),"gi");c=l.replace(h,g=>\`\${g}\`);break}return c}).join(" ");return(s===0?"":"...")+o+(u===i.length-1?"":"...")}function xi(t,e){return!e||e.length===0||t.length===0?[]:e.map(n=>{let r=se(n);return t.some(i=>n.toLowerCase().includes(i.toLowerCase()))?\`
  • #\${r}

  • \`:\`
  • #\${r}

  • \`}).slice(0,yi)}function Bi(t,e){let n=Ht[e];if(!n||!Z)return{id:e,slug:"",title:"",content:"",tags:[]};let r=Z[n];if(!r)return{id:e,slug:n,title:"",content:"",tags:[]};let i=oe(bt);return{id:e,slug:n,title:i.tags.length>0&&!i.query?se(r.title):Tn(t,r.title||""),content:Tn(t,r.content||"",!0),tags:xi(i.tags,r.tags)}}async function ki(){if(!Z)return;let t=0,e=[],n=new Set;for(let r of Object.keys(Z)){let i=Z[r];if(i){Ht[t]=r;for(let s of i.tags||[])n.add(s);e.push(le.addAsync(t,{id:t,slug:r,title:i.title||"",content:i.content||"",tags:i.tags||[]})),t++}}await Promise.all(e),Pt=[...n].sort()}async function bi(){return await fetchData}var Rt=!1;async function Ti(){Rt||(Z=await bi(),await ki(),Rt=!0)}async function Si(t){if(!Rt||!Z)return 0;let e=new Set(Pt),n=0;for(let r of Object.keys(t)){if(Z[r])continue;let i=t[r];if(!i)continue;let s=Ht.length;Ht[s]=r,Z[r]=i;for(let u of i.tags||[])e.add(u);await le.addAsync(s,{id:s,slug:r,title:i.title||"",content:i.content||"",tags:i.tags||[]}),n++}return Pt=[...e].sort(),n}document.addEventListener("content-index-updated",t=>{let e=t.detail;if(!Rt||!Z)return;let n=e?.slugs;!Array.isArray(n)||n.length===0||(async()=>{try{let r=await fetchData;if(!r||typeof r!="object")return;let i=r.content&&typeof r.content=="object"?r.content:r,s={};for(let u of n){let o=i[u];o&&typeof o=="object"&&(s[u]=o)}await Si(s)}catch{}})()});function Li(){let t=sessionStorage.getItem("search-term");t&&(sessionStorage.removeItem("search-term"),requestAnimationFrame(()=>{let e=document.querySelectorAll(".popover-hint p, .popover-hint li, .popover-hint h1, .popover-hint h2, .popover-hint h3, .popover-hint h4, .popover-hint h5, .popover-hint h6, .popover-hint td, .popover-hint th, .popover-hint blockquote, article p, article li, article h1, article h2, article h3");for(let n of Array.from(e)){let i=(n.textContent??"").toLowerCase().indexOf(t.toLowerCase());if(i===-1)continue;let s=document.createTreeWalker(n,NodeFilter.SHOW_TEXT),u=0,o,l=null,c=0,f=null,h=0;for(;o=s.nextNode();){let g=o.nodeValue?.length??0;if(!l&&u+g>i&&(l=o,c=i-u),l&&u+g>=i+t.length){f=o,h=i+t.length-u;break}u+=g}if(!(!l||!f)){try{let g=document.createRange();g.setStart(l,c),g.setEnd(f,h);let a=document.createElement("span");a.className="search-scroll-target",g.surroundContents(a),a.scrollIntoView({block:"center",behavior:"smooth"}),setTimeout(()=>{a.classList.add("fade-out"),setTimeout(()=>{let D=a.parentNode;D&&(D.replaceChild(document.createTextNode(a.textContent||""),a),D.normalize())},1e3)},2e3)}catch{n.scrollIntoView({block:"center",behavior:"smooth"})}break}}}))}async function Mn(){Ai(),await Ti(),await wi(),Li()}document.addEventListener("nav",Mn);document.addEventListener("render",Mn); +var search_inline_default = `var Rn=Object.create;var Ne=Object.defineProperty;var Wn=Object.getOwnPropertyDescriptor;var Nn=Object.getOwnPropertyNames;var zn=Object.getPrototypeOf,On=Object.prototype.hasOwnProperty;var $n=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Kn=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Nn(e))!On.call(t,i)&&i!==n&&Ne(t,i,{get:()=>e[i],enumerable:!(r=Wn(e,i))||r.enumerable});return t};var Un=(t,e,n)=>(n=t!=null?Rn(zn(t)):{},Kn(e||!t||!t.__esModule?Ne(n,"default",{value:t,enumerable:!0}):n,t));var fe=$n(()=>{});var C;function O(t,e,n){let r=typeof n,i=typeof t;if(r!=="undefined"){if(i!=="undefined"){if(n){if(i==="function"&&r===i)return function(o){return t(n(o))};if(e=t.constructor,e===n.constructor){if(e===Array)return n.concat(t);if(e===Map){var s=new Map(n);for(var u of t)s.set(u[0],u[1]);return s}if(e===Set){u=new Set(n);for(s of t.values())u.add(s);return u}}}return t}return n}return i==="undefined"?e:t}function Ct(t,e){return typeof t>"u"?e:t}function R(){return Object.create(null)}function U(t){return typeof t=="string"}function Lt(t){return typeof t=="object"}function Mt(t,e){if(U(e))t=t[e];else for(let n=0;t&&n1?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&&dt(this),this)};C.addMatcher=function(t,e){return typeof t=="object"?this.addReplacer(t,e):t.length<2&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?"|":"")+t,this.J=null,this.cache&&dt(this),this)};C.addReplacer=function(t,e){return typeof t=="string"?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&&dt(this),this)};C.encode=function(t,e){if(this.cache&&t.length<=this.H)if(this.F){if(this.B.has(t))return this.B.get(t)}else this.F=setTimeout(dt,50,this);this.normalize&&(typeof this.normalize=="function"?t=this.normalize(t):t=ze?t.normalize("NFKD").replace(ze,"").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&t.length>3&&(t=t.replace(Xn,"$1 $2").replace(Zn,"$1 $2").replace(Jn,"$1 "));let n=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer),r=[],i=R(),s,u,o=this.split||this.split===""?t.split(this.split):[t];for(let c=0,f,h;cthis.maxlength)){if(e){if(i[f])continue;i[f]=1}else{if(s===f)continue;s=f}if(n)r.push(f);else if(!this.filter||(typeof this.filter=="function"?this.filter(f):!this.filter.has(f))){if(this.cache&&f.length<=this.I)if(this.F){var l=this.D.get(f);if(l||l===""){l&&r.push(l);continue}}else this.F=setTimeout(dt,50,this);if(this.stemmer){this.K||(this.K=new RegExp("(?!^)("+this.A+")$"));let g;for(;g!==f&&f.length>2;)g=f,f=f.replace(this.K,a=>this.stemmer.get(a))}if(f&&(this.mapper||this.dedupe&&f.length>1)){l="";for(let g=0,a="",D,p;g1&&(this.J||(this.J=new RegExp("("+this.h+")","g")),f=f.replace(this.J,g=>this.matcher.get(g))),f&&this.replacer)for(l=0;f&&lthis.L&&(this.D.clear(),this.I=this.I/1.1|0)),f){if(f!==h)if(e){if(i[f])continue;i[f]=1}else{if(u===f)continue;u=f}r.push(f)}}}return this.finalize&&(r=this.finalize(r)||r),this.cache&&t.length<=this.H&&(this.B.set(t,r),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),r};function dt(t){t.F=null,t.B.clear(),t.D.clear()}function Fe(t,e,n){n||(e||typeof t!="object"?typeof e=="object"&&(n=e,e=0):n=t),n&&(t=n.query||t,e=n.limit||e);let r=""+(e||0);n&&(r+=(n.offset||0)+!!n.context+!!n.suggest+(n.resolve!==!1)+(n.resolution||this.resolution)+(n.boost||0)),t=(""+t).toLowerCase(),this.cache||(this.cache=new Ft);let i=this.cache.get(t+r);if(!i){let s=n&&n.cache;s&&(n.cache=!1),i=this.search(t,e,n),s&&(n.cache=s),this.cache.set(t+r,i)}return i}function Ft(t){this.limit=t&&t!==!0?t:1e3,this.cache=new Map,this.h=""}Ft.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)};Ft.prototype.get=function(t){let e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e};Ft.prototype.remove=function(t){for(let e of this.cache){let n=e[0];e[1].includes(t)&&this.cache.delete(n)}};Ft.prototype.clear=function(){this.cache.clear(),this.h=""};var Oe={normalize:!1,numeric:!1,dedupe:!1},Ot={},ae=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),$e=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),Ke=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\\1+/g,"$1"],Ue={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,\\u00DF:2,d:3,t:3,l:4,m:5,n:5,r:6},_e={Exact:Oe,Default:Ot,Normalize:Ot,LatinBalance:{mapper:ae},LatinAdvanced:{mapper:ae,matcher:$e,replacer:Ke},LatinExtra:{mapper:ae,replacer:Ke.concat([/(?!^)[aeo]/g,""]),matcher:$e},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let n=0;n=u.length)e-=u.length;else{e=u[r?"splice":"slice"](e,n);let o=e.length;if(o&&(i=i.length?i.concat(e):e,n-=o,r&&(t.length-=o),!n))break;e=0}return i}function xt(t){if(!this||this.constructor!==xt)return new xt(t);this.index=t?[t]:[],this.length=t?t.length:0;let e=this;return new Proxy([],{get(n,r){if(r==="length")return e.length;if(r==="push")return function(i){e.index[e.index.length-1].push(i),e.length++};if(r==="pop")return function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()};if(r==="indexOf")return function(i){let s=0;for(let u=0,o,l;u=0)return s+l;s+=o.length}return-1};if(r==="includes")return function(i){for(let s=0;s32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}V.prototype.get=function(t){let e=this.index[this.B(t)];return e&&e.get(t)};V.prototype.set=function(t,e){var n=this.B(t);let r=this.index[n];r?(n=r.size,r.set(t,e),(n-=r.size)&&this.size++):(this.index[n]=r=new Map([[t,e]]),this.h.push(r),this.size++)};function J(t=8){if(!this||this.constructor!==J)return new J(t);this.index=R(),this.h=[],this.size=0,t>32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}J.prototype.add=function(t){var e=this.B(t);let n=this.index[e];n?(e=n.size,n.add(t),(e-=n.size)&&this.size++):(this.index[e]=n=new Set([t]),this.h.push(n),this.size++)};C=V.prototype;C.has=J.prototype.has=function(t){let e=this.index[this.B(t)];return e&&e.has(t)};C.delete=J.prototype.delete=function(t){let e=this.index[this.B(t)];e&&e.delete(t)&&this.size--};C.clear=J.prototype.clear=function(){this.index=R(),this.h=[],this.size=0};C.values=J.prototype.values=function*(){for(let t=0;t=this.priority*this.priority*3):(ge=setTimeout(Yn,0),Je=Date.now()),Ut){let s=this;return new Promise(u=>{setTimeout(function(){u(s[t+"Async"].apply(s,e))},0)})}let i=this[t].apply(this,e);return n=i.then?i:new Promise(s=>s(i)),r&&n.then(r),n}}var st=0;function Dt(t={},e){function n(o){function l(c){c=c.data||c;let f=c.id,h=f&&s.h[f];h&&(h(c.msg),delete s.h[f])}if(this.worker=o,this.h=R(),this.worker)return i?this.worker.on("message",l):this.worker.onmessage=l,t.config?new Promise(function(c){st>1e9&&(st=0),s.h[++st]=function(){c(s)},s.worker.postMessage({id:st,task:"init",factory:r,options:t})}):(this.priority=t.priority||4,this.encoder=e||null,this.worker.postMessage({task:"init",factory:r,options:t}),this)}if(!this||this.constructor!==Dt)return new Dt(t);let r=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;r&&(r=r.toString());let i=typeof window>"u",s=this,u=Gn(r,i,t.worker);return u.then?u.then(function(o){return n.call(s,o)}):n.call(this,u)}ut("add");ut("append");ut("search");ut("update");ut("remove");ut("clear");ut("export");ut("import");Dt.prototype.searchCache=Fe;ye(Dt.prototype);function ut(t){Dt.prototype[t]=function(){let e=this,n=[].slice.call(arguments);var r=n[n.length-1];let i;return typeof r=="function"&&(i=r,n.pop()),r=new Promise(function(s){t==="export"&&typeof n[0]=="function"&&(n[0]=null),st>1e9&&(st=0),e.h[++st]=s,e.worker.postMessage({task:t,id:st,args:n})}),i?(r.then(i),this):r}}function Gn(t,e,n){return e?typeof module<"u"?new(fe()).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>Un(fe(),1)).then(function(r){return new r.Worker(import.meta.dirname+"/node/node.mjs")}):t?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Qn.toString()],{type:"text/javascript"}))):new window.Worker(typeof n=="string"?n:import.meta.url.replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js").replace("flexsearch.bundle.module.min.mjs","module/worker/worker.js"),{type:"module"})}mt.prototype.add=function(t,e,n){if(Lt(t)&&(e=t,t=Mt(e,this.key)),e&&(t||t===0)){if(!n&&this.reg.has(t))return this.update(t,e);for(let o=0,l;oe?t.slice(n,n+e):t,r?wt.call(this,t):t;let i=[];for(let s=0,u,o;s=o){n-=o;continue}u=u.slice(n,n+e),o=u.length,n=0}if(o>e&&(u=u.slice(0,e),o=e),!i.length&&o>=e)return r?wt.call(this,u):u;if(i.push(u),e-=o,!e)break}return i=i.length>1?[].concat.apply([],i):i[0],r?wt.call(this,i):i}function Gt(t,e,n,r){var i=r[0];if(i[0]&&i[0].query)return t[e].apply(t,i);if(!(e!=="and"&&e!=="not"||t.result.length||t.await||i.suggest))return r.length>1&&(i=r[r.length-1]),(r=i.resolve)?t.await||t.result:t;let s=[],u=0,o=0,l,c,f,h,g;for(e=0;e1&&(n=n[e].apply(n,t.slice(1))),n}j.prototype.or=function(){return Gt(this,"or",qn,arguments)};function qn(t,e,n,r,i,s,u){return t.length&&(this.result.length&&t.push(this.result),t.length<2?this.result=t[0]:(this.result=en(t,e,n,!1,this.h),n=0)),i&&(this.await=null),i?this.resolve(e,n,r,u):this}j.prototype.and=function(){return Gt(this,"and",ti,arguments)};function ti(t,e,n,r,i,s,u){if(!s&&!this.result.length)return i?this.result:this;let o;if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{let l=0;for(let c=0,f,h;c1?y.join(" "):y[0];let w;if(y&&B){for(var v=B.length,M=(Q.split?B.replace(Q.split,""):B).length-y.length,T="",W=0,z=0;z-1&&(T=(N?B.substring(0,N):"")+u+B.substring(N,N+H)+o+(N+H=l)break}if(b=ft.length*(s.length-2),a||D||l&&d.length-b>l)if(b=l+b-g*2,k=x-A,a>0&&(k+=a),D>0&&(k+=D),k<=b)F=a?A-(a>0?a:0):A-((b-k)/2|0),m=D?x+(D>0?D:0):F+b,c||(F>0&&d.charAt(F)!==" "&&d.charAt(F-1)!==" "&&(F=d.indexOf(" ",F),F<0&&(F=0)),m=m.length-1){if(I>=m.length){k[w+1]=1,I>=F.length&&(b[w+1]=1);continue}v-=g}if(d=m[I].text,H=D&&y[w])if(H>0){if(d.length>H)if(k[w+1]=1,c)d=d.substring(0,H);else continue;(H-=d.length)||(H=-1),y[w]=H}else{k[w+1]=1;continue}if(v+d.length+1<=l)d=" "+d,x[w]+=d;else if(c)K=l-v-1,K>0&&(d=" "+d.substring(0,K),x[w]+=d),k[w+1]=1;else{k[w+1]=1;continue}}else{if(k[w])continue;if(I-=M,A[I]){v-=g,k[w]=1,b[w]=1;continue}if(I<=0){if(I<0){k[w]=1,b[w]=1;continue}v-=g}if(d=m[I].text,H=a&&B[w])if(H>0){if(d.length>H)if(k[w]=1,c)d=d.substring(d.length-H);else continue;(H-=d.length)||(H=-1),B[w]=H}else{k[w]=1;continue}if(v+d.length+1<=l)d+=" ",x[w]=d+x[w];else if(c)K=d.length+1-(l-v),K>=0&&K=F.length-1||I1?en(l,n,r,u,s):(l=l[0])&&n&&l.length>n||r?l.slice(r,n+r):l;else{if(tn||r)&&(l=l.slice(r,n+r));else{i=[];for(let h=0,g;hr)r-=g.length;else if((n&&g.length>n||r)&&(g=g.slice(r,n+r),n-=g.length,r&&(r-=g.length)),i.push(g),!n)break}l=i}}return l}function en(t,e,n,r,i){let s=[],u=R(),o;var l=t.length;let c;if(r){for(i=l-1;i>=0;i--)if(c=(r=t[i])&&r.length){for(l=0;l=0;f--){h=t[f];for(let a=0;a1?Jt(i,1,0,0,l,c):i[0],B)})}return a?i:new j(i.length>1?Jt(i,1,0,0,l,c):i[0],this)}}a||u||!(h=h||this.field)||(U(h)?u=h:(h.constructor===Array&&h.length===1&&(h=h[0]),u=h.field||h.index)),h&&h.constructor!==Array&&(h=[h])}h||(h=this.field);let b;m=(this.worker||this.db)&&!r&&[];for(let B=0,y,v,M;B"u"&&(this.db?m.push(p=this.index.get(this.field[0]).db.enrich(p)):p=wt.call(this,p)),u)return a?D?Vt(t,p,this.index,u,D):p:new j(p,this);i[F]={field:s[F],result:p}}if(d&&this.db&&m.length){let B=this;return Promise.all(m).then(function(y){for(let v=0;v0&&((n&&e>n||r)&&(t=t.slice(r,r+n)),i&&(t=wt.call(this,t))),t):[]):[]}function wt(t){if(!this||!this.store)return t;if(this.db)return this.index.get(this.field[0]).db.enrich(t);let e=Array(t.length);for(let n=0,r;n1?n:n[0]}C.append=function(t,e){return this.add(t,e,!0)};C.update=function(t,e){return this.remove(t).add(t,e)};C.remove=function(t){Lt(t)&&(t=Mt(t,this.key));for(var e of this.index.values())e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let r of n){e=r[0];let i=r[1],s=i.indexOf(t);s>-1&&(i.length>1?i.splice(s,1):n.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this};C.clear=function(){let t=[];for(let e of this.index.values()){let n=e.clear();n.then&&t.push(n)}if(this.tag)for(let e of this.tag.values())e.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this};C.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)};C.cleanup=function(){for(let t of this.index.values())t.cleanup();return this};C.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then(function(e){return e[0]&&e[0].doc||null}):this.store.get(t)||null};C.set=function(t,e){return typeof t=="object"&&(e=t,t=Mt(e,this.key)),this.store.set(t,e),this};C.searchCache=Fe;C.export=ui;C.import=oi;ye(mt.prototype);function Ae(t,e=0){let n=[],r=[];e&&(e=25e4/e*5e3|0);for(let i of t.entries())r.push(i),r.length===e&&(n.push(r),r=[]);return r.length&&n.push(r),n}function we(t,e){e||(e=new Map);for(let n=0,r;n2?n[0]:"";if(n=n.length>2?n[2]:n[1],this.worker&&r)return this.index.get(r).import(t);if(e){if(typeof e=="string"&&(e=JSON.parse(e)),r)return this.index.get(r).import(n,e);switch(n){case"reg":this.fastupdate=!1,this.reg=un(e,this.reg);for(let i=0,s;i=0&&i.splice(u,1)}}else jt(this.map,t),this.depth&&jt(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.M&&on(this)),this.cache&&this.cache.remove(t),this};function jt(t,e){let n=0;var r=typeof e>"u";if(t.constructor===Array){for(let i=0,s,u,o;i=0){if(s.length>1)return s.splice(u,1),1;if(delete t[i],n)return 1;o=1}else{if(o)return 1;n++}}}else for(let i of t.entries())r=i[0],jt(i[1],e)?n++:t.delete(r);return n}var li={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};X.prototype.add=function(t,e,n,r){if(e&&(t||t===0)){if(!r&&!n&&this.reg.has(t))return this.update(t,e);r=this.depth,e=this.encoder.encode(e,!r);let c=e.length;if(c){let f=R(),h=R(),g=this.resolution;for(let a=0;a2){for(let p=1,d,F,m,A;p2){for(let p=0,d;pp;s--){u=D.substring(p,s),d=this.rtl?i-1-p:p;var o=this.score?this.score(e,D,a,u,d):Kt(g,c,a,i,d);tt(this,h,u,o,t,n)}break}case"bidirectional":case"reverse":if(i>1){for(o=i-1;o>0;o--){u=D[this.rtl?i-1-o:o]+u;var l=this.score?this.score(e,D,a,u,o):Kt(g,c,a,i,o);tt(this,h,u,l,t,n)}u=""}case"forward":if(i>1){for(o=0;o1&&au;let p=this.score?this.score(e,u,a,D,o-1):Kt(i+(c/2>i?0:1),c,a,s-1,o-1);tt(this,f,l?u:D,p,t,n,l?D:u)}}}}this.fastupdate||this.reg.add(t)}}return this.db&&(this.commit_task.push(n?{ins:t}:{del:t}),this.M&&on(this)),this};function tt(t,e,n,r,i,s,u){let o,l;if(!(o=e[n])||u&&!o[u]){if(u?(e=o||(e[n]=R()),e[u]=1,l=t.ctx,(o=l.get(u))?l=o:l.set(u,l=t.keystore?new V(t.keystore):new Map)):(l=t.map,e[n]=1),(o=l.get(n))?l=o:l.set(n,l=o=[]),s){for(let c=0,f;c1?e+(r||0)<=t?n+(i||0):(t-1)/(e+(r||0))*(n+(i||0))+1|0:0}X.prototype.search=function(t,e,n){if(n||(e||typeof t!="object"?typeof e=="object"&&(n=e,e=0):(n=t,t="")),n&&n.cache)return n.cache=!1,t=this.searchCache(t,e,n),n.cache=!0,t;let r=[],i,s,u,o=0,l,c,f,h,g;n&&(t=n.query||t,e=n.limit||e,o=n.offset||0,s=n.context,u=n.suggest,g=(l=n.resolve)&&n.enrich,f=n.boost,h=n.resolution,c=this.db&&n.tag),typeof l>"u"&&(l=this.resolve),s=this.depth&&s!==!1;let a=this.encoder.encode(t,!s);if(i=a.length,e=e||(l?100:0),i===1)return Ye.call(this,a[0],"",e,o,l,g,c);if(i===2&&s&&!u)return Ye.call(this,a[1],a[0],e,o,l,g,c);let D=R(),p=0,d;if(s&&(d=a[0],p=1),h||h===0||(h=d?this.N:this.resolution),this.db){if(this.db.search&&(n=this.db.search(this,a,e,o,u,l,g,c),n!==!1))return n;let F=this;return(async function(){for(let m,A;p1)l=Jt(t,e,n,r,i,s,u);else if(o===1)return u?Ce.call(null,t[0],n,r):new j(t[0],this);return u?l:new j(l,this)}function Ye(t,e,n,r,i,s,u){return t=me(this,t,e,n,r,i,s,u),this.db?t.then(function(o){return i?o||[]:new j(o,this)}):t&&t.length?i?Ce.call(this,t,n,r):new j(t,this):i?[]:new j([],this)}function Ge(t,e,n,r){let i=[];if(t&&t.length){if(t.length<=r){e.push(t);return}for(let s=0,u;sn)&&(l=n,n=e,e=l),t.db?t.db.get(e,n,r,i,s,u,o):(t=n?(t=t.ctx.get(n))&&t.get(e):t.map.get(e),t)}function X(t,e){if(!this||this.constructor!==X)return new X(t);if(t){var n=U(t)?t:t.preset;n&&(t=Object.assign({},li[n],t))}else t={};n=t.context;let r=n===!0?{depth:1}:n||{},i=U(t.encoder)?_e[t.encoder]:t.encode||t.encoder||{};this.encoder=i.encode?i:typeof i=="object"?new vt(i):{encode:i},this.resolution=t.resolution||9,this.tokenize=n=(n=t.tokenize)&&n!=="default"&&n!=="exact"&&n||"strict",this.depth=n==="strict"&&r.depth||0,this.bidirectional=r.bidirectional!==!1,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(n=t.keystore||0)&&(this.keystore=n),this.map=n?new V(n):new Map,this.ctx=n?new V(n):new Map,this.reg=e||(this.fastupdate?n?new V(n):new Map:n?new J(n):new Set),this.N=r.resolution||3,this.rtl=i.rtl||t.rtl||!1,this.cache=(n=t.cache||null)&&new Ft(n),this.resolve=t.resolve!==!1,(n=t.db)&&(this.db=this.mount(n)),this.M=t.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}C=X.prototype;C.mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)};C.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)};C.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function on(t){t.commit_timer||(t.commit_timer=setTimeout(function(){t.commit_timer=null,t.db.commit(t)},1))}C.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db?(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[],this.db.clear()):this};C.append=function(t,e){return this.add(t,e,!0)};C.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)};C.update=function(t,e){let n=this,r=this.remove(t);return r&&r.then?r.then(()=>n.add(t,e)):this.add(t,e)};C.cleanup=function(){return this.fastupdate?(jt(this.map),this.depth&&jt(this.ctx),this):this};C.searchCache=Fe;C.export=function(t,e,n=0,r=0){let i,s;switch(r){case 0:i="reg",s=sn(this.reg);break;case 1:i="cfg",s=null;break;case 2:i="map",s=Ae(this.map,this.reg.size);break;case 3:i="ctx",s=nn(this.ctx,this.reg.size);break;default:return}return Zt.call(this,t,e,i,s,n,r)};C.import=function(t,e){if(e)switch(typeof e=="string"&&(e=JSON.parse(e)),t=t.split("."),t[t.length-1]==="json"&&t.pop(),t.length===3&&t.shift(),t=t.length>1?t[1]:t[0],t){case"reg":this.fastupdate=!1,this.reg=un(e,this.reg);break;case"map":this.map=we(e,this.map);break;case"ctx":this.ctx=rn(e,this.ctx)}};C.serialize=function(t=!0){let e="",n="",r="";if(this.reg.size){let s;for(var i of this.reg.keys())s||(s=typeof i),e+=(e?",":"")+(s==="string"?'"'+i+'"':i);e="index.reg=new Set(["+e+"]);",n=Ze(this.map,s),n="index.map=new Map(["+n+"]);";for(let u of this.ctx.entries()){i=u[0];let o=Ze(u[1],s);o="new Map(["+o+"])",o='["'+i+'",'+o+"]",r+=(r?",":"")+o}r="index.ctx=new Map(["+r+"]);"}return t?"function inject(index){"+e+n+r+"}":e+n+r};ye(X.prototype);var ln=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Qt=["map","ctx","tag","reg","cfg"],gt=R();function Yt(t,e={}){if(!this||this.constructor!==Yt)return new Yt(t,e);typeof t=="object"&&(e=t,t=t.name),t||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(t?":"+t.toLowerCase().replace(/[^a-z0-9_\\-]/g,""):""),this.field=e.field?e.field.toLowerCase().replace(/[^a-z0-9_\\-]/g,""):"",this.type=e.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}C=Yt.prototype;C.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())};C.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),gt[t.id]||(gt[t.id]=[]),gt[t.id].push(t.field);let e=ln.open(t.id,1);return e.onupgradeneeded=function(){let n=t.db=this.result;for(let r=0,i;r=f.length){r-=f.length;continue}let h=n?r+Math.min(f.length-r,n):f.length;for(let g=r;g=s.length?[]:!e&&!n?s:(s=s.slice(n,n+e),r?i.enrich(s):s)})};C.enrich=function(t){typeof t!="object"&&(t=[t]);let e=this.db.transaction("reg","readonly").objectStore("reg"),n=[];for(let r=0;r=0)if(i=1,o.length>1)o.splice(c,1);else{r[u]=[];break}s+=o.length}if(n)break}s?i&&t.update(r):t.delete(),t.continue()}C.remove=function(t){return typeof t!="object"&&(t=[t]),Promise.all([this.transaction("map","readwrite",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction("ctx","readwrite",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction("tag","readwrite",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t,!0)}}),this.transaction("reg","readwrite",function(e){for(let n=0;n{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,n(this.result)},t.onerror=t.onblocked=r,t=null})}var hn={Index:X,Charset:_e,Encoder:vt,Document:mt,Worker:Dt,Resolver:j,IndexedDB:Yt,Language:{}};var Ni=Object.hasOwnProperty;var gn,P,dn,hi,lt,cn,Dn,mn,ve,te,It,Fn,Te,Be,ke,ci,_n={},ne=[],fi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,re=Array.isArray;function et(t,e){for(var n in e)t[n]=e[n];return t}function Se(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function xe(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++dn,__i:-1,__u:0};return i==null&&P.vnode!=null&&P.vnode(s),s}function kt(t){return t.children}function ee(t,e){this.props=t,this.context=e}function Bt(t,e){if(e==null)return t.__?Bt(t.__,t.__i+1):null;for(var n;ee&<.sort(mn),t=lt.shift(),e=lt.length,ai(t)}finally{lt.length=ie.__r=0}}function Cn(t,e,n,r,i,s,u,o,l,c,f){var h,g,a,D,p,d,F,m=r&&r.__k||ne,A=e.length;for(l=pi(n,e,m,l,A),h=0;h0?u=t.__k[s]=xe(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):t.__k[s]=u,l=s+g,u.__=t,u.__b=t.__b+1,o=null,(c=u.__i=gi(u,n,l,h))!=-1&&(h--,(o=n[c])&&(o.__u|=2)),o==null||o.__v==null?(c==-1&&(i>f?g--:il?g--:g++,u.__u|=4))):t.__k[s]=null;if(h)for(s=0;s(f?1:0)){for(i=n-1,s=n+1;i>=0||s=0?i--:s++])!=null&&(2&c.__u)==0&&o==c.key&&l==c.type)return u}return-1}function an(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||fi.test(e)?n:n+"px"}function qt(t,e,n,r,i){var s,u;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||an(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||an(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(Fn,"$1")),u=e.toLowerCase(),e=u in t||e=="onFocusOut"||e=="onFocusIn"?u.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n[It]=r[It]:(n[It]=Te,t.addEventListener(e,s?ke:Be,s)):t.removeEventListener(e,s?ke:Be,s);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function pn(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[te]==null)e[te]=Te++;else if(e[te]0?t:re(t)?t.map(wn):et({},t)}function Di(t,e,n,r,i,s,u,o,l){var c,f,h,g,a,D,p,d=n.props||_n,F=e.props,m=e.type;if(m=="svg"?i="http://www.w3.org/2000/svg":m=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c"u"?"":document.body?.dataset?.basepath??""}function Me(t,e){let n=e??_i(),r=t.startsWith("/")?t:"/"+t;return n+r}function nt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function xn(t,e){if(!t)return()=>{};let n=i=>{t.classList.contains("active")&&i.target===t&&(i.preventDefault(),i.stopPropagation(),e())},r=i=>{t.classList.contains("active")&&i.key==="Escape"&&(i.preventDefault(),e())};return t.addEventListener("click",n),document.addEventListener("keydown",r),()=>{t.removeEventListener("click",n),document.removeEventListener("keydown",r)}}function Bn(t,e){let n=t.querySelectorAll("[src], [href]");for(let r of Array.from(n)){let i=r.hasAttribute("href")?"href":"src",s=r.getAttribute(i);if(s&&!(s.startsWith("http://")||s.startsWith("https://")||s.startsWith("mailto:")||s.startsWith("tel:")||s.startsWith("#")||s.startsWith("/")||s.startsWith("data:")))try{let u=new URL(s,e).toString();r.setAttribute(i,u)}catch{continue}}}function se(t){return t.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}var je="basic",bt="",kn=8,yi=5,ue=30,Ci=t=>{let e=[],n=-1,r=-1,i=t.toLowerCase(),s=0;for(let u of i){let o=u.codePointAt(0);o>=12352&&o<=12447||o>=12448&&o<=12543||o>=19968&&o<=40959||o>=44032&&o<=55215||o>=131072&&o<=173791?(n!==-1&&(e.push(i.slice(n,r)),n=-1),e.push(u)):o===32||o===9||o===10||o===13?n!==-1&&(e.push(i.slice(n,r)),n=-1):(n===-1&&(n=s),r=s+1),s+=u.length}return n!==-1&&e.push(i.slice(n)),e},le=new hn.Document({encode:Ci,document:{id:"id",tag:"tags",index:[{field:"title",tokenize:"forward"},{field:"content",tokenize:"forward"},{field:"tags",tokenize:"forward"}]}}),Z=null,Pt=[],Ht=[],Ie=new Map;function oe(t){let e=t.split(/\\s+/),n=[],r=[];for(let i of e)i.startsWith("#")&&i.length>1?n.push(i.substring(1)):i!=="#"&&r.push(i);return{tags:n,query:r.join(" ").trim()}}function bn(t){let e=t.split(/\\s+/),n=e[e.length-1];return n&&n.startsWith("#")?n.substring(1):null}var Sn=new DOMParser;async function Ei(t){if(Ie.has(t))return Ie.get(t);let e=new URL(Me(t),window.location.origin).toString();try{let n=await fetch(e);if(!n.ok)return[];let r=await n.text(),i=Sn.parseFromString(r??"","text/html");Bn(i,e);let s=Array.from(i.getElementsByClassName("popover-hint"));return Ie.set(t,s),s}catch{return[]}}var Pe=[];function _t(t){Pe.push(t)}function Ai(){Pe.forEach(t=>t()),Pe.length=0}async function wi(){let t=document.querySelectorAll(".search");for(let e of Array.from(t)){let n=e.querySelector(".search-container"),r=e.querySelector(".search-button"),i=e.querySelector(".search-bar"),s=e.querySelector(".search-layout");if(!n||!r||!i||!s)continue;let u=n.closest(".sidebar"),o=s.getAttribute("data-preview")==="true",l=s.getAttribute("data-field-priority"),c=l?JSON.parse(l):["title","content","tags"],f=s.querySelector(".results-container");f||(f=document.createElement("div"),f.className="results-container",f.setAttribute("role","listbox"),f.setAttribute("aria-label","Search results"),s.appendChild(f));let h=s.querySelector(".preview-container");o&&!h&&(h=document.createElement("div"),h.className="preview-container",s.appendChild(h));let g=document.createElement("div");g.className="tag-suggestions",g.setAttribute("role","listbox"),g.setAttribute("aria-label","Tag suggestions"),g.style.display="none";let a=i.parentElement;a.insertBefore(g,i.nextSibling);let D=document.createElement("span");D.className="ghost-text",D.setAttribute("aria-hidden","true"),a.insertBefore(D,i.nextSibling);let p=-1,d=[],F=!1,m=_=>{if(p<0||p>=d.length){D.textContent="";return}let E=d[p];if(!E.toLowerCase().startsWith(_.toLowerCase())){D.textContent="";return}let L=E.substring(_.length);D.innerHTML="";let S=document.createElement("span");S.style.visibility="hidden",S.textContent=i.value,D.appendChild(S),D.appendChild(document.createTextNode(L))},A=()=>{g.querySelectorAll(".tag-suggestion-item").forEach((L,S)=>{L.classList.toggle("active",S===p)});let E=bn(i.value)||"";m(E)},x=()=>{F=!1,p=-1,d=[],g.style.display="none",D.textContent=""},b=_=>{let E=i.value,L=E.lastIndexOf("#");L!==-1&&(i.value=E.substring(0,L)+"#"+_+" "),x(),i.focus(),i.dispatchEvent(new Event("input"))},k=_=>{if(Rt){if(d=_===""?Ht.slice(0,10):Ht.filter(E=>E.toLowerCase().startsWith(_.toLowerCase())).slice(0,10),d.length===0){x();return}p=0,F=!0,nt(g);for(let E=0;E!F||d.length===0?!1:(_==="down"?p=Math.min(p+1,d.length-1):p=Math.max(p-1,0),A(),!0),y=null,v=0,M=null,T=()=>{n.classList.remove("active"),u&&(u.style.zIndex=""),r.setAttribute("aria-expanded","false"),i.value="",nt(f),h&&nt(h),s.classList.remove("display-results"),je="basic",y=null,x(),r.focus()},W=_=>{je=_,u&&(u.style.zIndex="9999"),n.classList.add("active"),r.setAttribute("aria-expanded","true"),i.focus()},z=async _=>{if(nt(f),_.length===0){let E=document.createElement("a");E.className="result-card no-match";let L=document.createElement("h3");L.textContent="No results.";let S=document.createElement("p");S.textContent="Try another search term?",E.appendChild(L),E.appendChild(S),f.appendChild(E),y=null,h&&nt(h)}else for(let E of _){let L=document.createElement("a");L.className="result-card",L.id=E.slug,L.href=Me(E.slug);let S=document.createElement("h3");if(S.className="card-title",S.textContent=E.title,L.appendChild(S),E.tags.length>0){let $=document.createElement("ul");$.className="tags",$.textContent="";for(let G of E.tags){let q=document.createElement("li");q.textContent=G.replace(/<[^>]*>/g,""),$.appendChild(q)}L.appendChild($)}let Y=document.createElement("p");Y.className="card-description",Y.innerHTML=E.content.replace(/<(?!\\/?mark\\b)[^>]*>/gi,""),L.appendChild(Y),f.appendChild(L)}},N=()=>Array.from(f.querySelectorAll(".result-card:not(.no-match)")),H=()=>{let _=oe(bt);return _.query||(_.tags.length>0?_.tags.join(" "):bt)},K=async _=>{if(!h||(nt(h),!_))return;let E=_.id,L=++v,S=await Ei(E);if(L!==v)return;let Y=H(),$=document.createElement("div");$.className="preview-inner";for(let G of S){let q=G.cloneNode(!0);Y.trim()!==""&&(q.innerHTML=vi(Y,q)),$.appendChild(q)}h.appendChild($),requestAnimationFrame(()=>{let G=Array.from(h.getElementsByClassName("highlight"));if(G.length===0)return;G.sort((he,ce)=>ce.innerHTML.length-he.innerHTML.length);let q=G[0],Nt=0,at=q;for(;at&&at!==h;)Nt+=at.offsetTop,at=at.offsetParent;h.scrollTop=Math.max(0,Nt-50)})},it=_=>{y&&y.classList.remove("focus"),y=_,y&&(y.classList.add("focus"),y.scrollIntoView({block:"nearest"})),M&&clearTimeout(M),M=setTimeout(()=>K(y),150)},Q=_=>{let E=N();if(E.length===0){it(null);return}let L=Math.min(Math.max(_,0),E.length-1);it(E[L]??null)},Wt=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):-1;Q(E+1)},ht=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):_.length;Q(E-1)},rt=async _=>{let E=_.target.value;bt=E;let L=bn(E);L!==null?k(L):x();let S=oe(E),Y=S.query!==""||S.tags.length>0;if(s.classList.toggle("display-results",Y),je=S.tags.length>0&&!S.query?"tags":"basic",!Y){nt(f),h&&nt(h),y=null;return}let $;S.query?$=await le.searchAsync({query:S.query,limit:S.tags.length>0?1e4:kn,index:["title","content"]}):S.tags.length>0?$=await le.searchAsync({query:S.tags[0],limit:1e4,index:["tags"]}):$=[];let G=pt=>{let Tt=$.filter(zt=>zt.field===pt);return Tt.length===0?[]:[...Tt[0].result]},Nt=[...new Set(c.flatMap(pt=>G(pt)))].filter(pt=>{if(S.tags.length===0)return!0;let Tt=Pt[pt];if(!Tt)return!1;let zt=Z?.[Tt];if(!zt)return!1;let In=zt.tags||[];return S.tags.every(Pn=>In.some(Hn=>Hn.toLowerCase()===Pn.toLowerCase()))}),at=S.query||(S.tags.length>0?S.tags.join(" "):E),he=Nt.map(pt=>Bi(at,pt));await z(he.slice(0,kn));let ce=N();it(ce[0]??null)},ct=_=>{_.stopPropagation(),W("basic")};r.addEventListener("click",ct),_t(()=>r.removeEventListener("click",ct)),i.addEventListener("input",rt),_t(()=>i.removeEventListener("input",rt));let ft=_=>{if(F){if(_.key==="ArrowDown"){_.preventDefault(),B("down");return}if(_.key==="ArrowUp"){_.preventDefault(),B("up");return}if(_.key==="Tab"){_.preventDefault(),p>=0&&p=0&&pi.removeEventListener("keydown",ft));let w=_=>{_.key==="k"&&(_.ctrlKey||_.metaKey)&&!_.shiftKey?(_.preventDefault(),n.classList.contains("active")?T():W("basic")):_.shiftKey&&(_.ctrlKey||_.metaKey)&&_.key.toLowerCase()==="k"&&(_.preventDefault(),W("tags"),i.value="#",i.dispatchEvent(new Event("input")))};document.addEventListener("keydown",w),_t(()=>document.removeEventListener("keydown",w));let I=()=>{let _=oe(bt),E=_.query||(_.tags.length>0?_.tags.join(" "):bt);E.trim()&&sessionStorage.setItem("search-term",E.trim())},yt=_=>{let E=_.target.closest(".result-card");!E||E.classList.contains("no-match")||_ instanceof MouseEvent&&(_.altKey||_.ctrlKey||_.metaKey||_.shiftKey)||(I(),T())},He=_=>{let E=_.target.closest(".result-card");!E||E.classList.contains("no-match")||it(E)};f.addEventListener("click",yt),f.addEventListener("mouseover",He),_t(()=>{f.removeEventListener("click",yt),f.removeEventListener("mouseover",He)});let Re=_=>{let E=_.target.closest(".tag-suggestion-item");if(!E)return;let L=E.getAttribute("data-tag");L&&b(L)},We=_=>{let E=_.target.closest(".tag-suggestion-item");if(!E)return;let L=E.getAttribute("data-index");L!==null&&(p=parseInt(L,10),A())};g.addEventListener("click",Re),g.addEventListener("mouseover",We),_t(()=>{g.removeEventListener("click",Re),g.removeEventListener("mouseover",We)});let jn=xn(n,T);_t(jn)}}function Ln(t){let e=t.split(/\\s+/).filter(r=>r.trim()!==""),n=e.length;if(n>1)for(let r=1;ri.length-r.length)}function vi(t,e){let n=Ln(t).filter(c=>c.trim()!=="");if(n.length===0)return e.innerHTML;let r=Sn.parseFromString(e.innerHTML,"text/html"),i=n.map(c=>c.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")).join("|");if(i==="")return e.innerHTML;let s=new RegExp(i,"gi"),u=r.createTreeWalker(r.body,NodeFilter.SHOW_TEXT),o=[],l=u.nextNode();for(;l;)o.push(l),l=u.nextNode();for(let c of o){let f=c.nodeValue??"";if(s.lastIndex=0,!s.test(f))continue;s.lastIndex=0;let h=r.createDocumentFragment(),g=0,a;for(;(a=s.exec(f))!==null;){a.index>g&&h.appendChild(r.createTextNode(f.slice(g,a.index)));let D=r.createElement("span");D.className="highlight",D.textContent=a[0],h.appendChild(D),g=a.index+a[0].length}gl!==""),s=0,u=i.length-1;if(n){let l=g=>r.some(a=>g.toLowerCase().startsWith(a.toLowerCase())),c=i.map(l),f=0,h=0;for(let g=0;gp+(d?1:0),0);D>=f&&(f=D,h=g)}s=Math.max(h-ue,0),u=Math.min(s+2*ue,i.length-1),i=i.slice(s,u)}let o=i.map(l=>{let c=l;for(let f of r)if(l.toLowerCase().includes(f.toLowerCase())){let h=new RegExp(f.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&"),"gi");c=l.replace(h,g=>\`\${g}\`);break}return c}).join(" ");return(s===0?"":"...")+o+(u===i.length-1?"":"...")}function xi(t,e){return!e||e.length===0||t.length===0?[]:e.map(n=>{let r=se(n);return t.some(i=>n.toLowerCase().includes(i.toLowerCase()))?\`
  • #\${r}

  • \`:\`
  • #\${r}

  • \`}).slice(0,yi)}function Bi(t,e){let n=Pt[e];if(!n||!Z)return{id:e,slug:"",title:"",content:"",tags:[]};let r=Z[n];if(!r)return{id:e,slug:n,title:"",content:"",tags:[]};let i=oe(bt);return{id:e,slug:n,title:i.tags.length>0&&!i.query?se(r.title):Tn(t,r.title||""),content:Tn(t,r.content||"",!0),tags:xi(i.tags,r.tags)}}async function ki(){if(!Z)return;let t=0,e=[],n=new Set;for(let r of Object.keys(Z)){let i=Z[r];if(i){Pt[t]=r;for(let s of i.tags||[])n.add(s);e.push(le.addAsync(t,{id:t,slug:r,title:i.title||"",content:i.content||"",tags:i.tags||[]})),t++}}await Promise.all(e),Ht=[...n].sort()}async function bi(){return await fetchData}var Rt=!1;async function Ti(){Rt||(Z=await bi(),await ki(),Rt=!0)}async function Si(t){if(!Rt||!Z)return 0;let e=new Set(Ht),n=0;for(let r of Object.keys(t)){if(Z[r])continue;let i=t[r];if(!i)continue;let s=Pt.length;Pt[s]=r,Z[r]=i;for(let u of i.tags||[])e.add(u);await le.addAsync(s,{id:s,slug:r,title:i.title||"",content:i.content||"",tags:i.tags||[]}),n++}return Ht=[...e].sort(),n}document.addEventListener("content-index-updated",t=>{let e=t.detail;if(!Rt||!Z)return;let n=e?.slugs;!Array.isArray(n)||n.length===0||(async()=>{try{let r=await fetchData;if(!r||typeof r!="object")return;let i=r.content&&typeof r.content=="object"?r.content:r,s={};for(let u of n){let o=i[u];o&&typeof o=="object"&&(s[u]=o)}await Si(s)}catch{}})()});function Li(){let t=sessionStorage.getItem("search-term");t&&(sessionStorage.removeItem("search-term"),requestAnimationFrame(()=>{let e=document.querySelectorAll(".popover-hint p, .popover-hint li, .popover-hint h1, .popover-hint h2, .popover-hint h3, .popover-hint h4, .popover-hint h5, .popover-hint h6, .popover-hint td, .popover-hint th, .popover-hint blockquote, article p, article li, article h1, article h2, article h3");for(let n of Array.from(e)){let i=(n.textContent??"").toLowerCase().indexOf(t.toLowerCase());if(i===-1)continue;let s=document.createTreeWalker(n,NodeFilter.SHOW_TEXT),u=0,o,l=null,c=0,f=null,h=0;for(;o=s.nextNode();){let g=o.nodeValue?.length??0;if(!l&&u+g>i&&(l=o,c=i-u),l&&u+g>=i+t.length){f=o,h=i+t.length-u;break}u+=g}if(!(!l||!f)){try{let g=document.createRange();g.setStart(l,c),g.setEnd(f,h);let a=document.createElement("span");a.className="search-scroll-target",g.surroundContents(a),a.scrollIntoView({block:"center",behavior:"smooth"}),setTimeout(()=>{a.classList.add("fade-out"),setTimeout(()=>{let D=a.parentNode;D&&(D.replaceChild(document.createTextNode(a.textContent||""),a),D.normalize())},1e3)},2e3)}catch{n.scrollIntoView({block:"center",behavior:"smooth"})}break}}}))}async function Mn(){Ai(),await Ti(),await wi(),Li()}document.addEventListener("nav",Mn);document.addEventListener("render",Mn); `; var l; l = { __e: function(n2, l2, u3, t2) { diff --git a/dist/index.js.map b/dist/index.js.map index 4b6f96e..0aa3216 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../node_modules/@quartz-community/utils/src/lang.ts","../src/i18n/locales/en-US.ts","../src/i18n/locales/ar-SA.ts","../src/i18n/locales/ca-ES.ts","../src/i18n/locales/cs-CZ.ts","../src/i18n/locales/de-DE.ts","../src/i18n/locales/en-GB.ts","../src/i18n/locales/es-ES.ts","../src/i18n/locales/fa-IR.ts","../src/i18n/locales/fi-FI.ts","../src/i18n/locales/fr-FR.ts","../src/i18n/locales/he-IL.ts","../src/i18n/locales/hu-HU.ts","../src/i18n/locales/id-ID.ts","../src/i18n/locales/it-IT.ts","../src/i18n/locales/ja-JP.ts","../src/i18n/locales/kk-KZ.ts","../src/i18n/locales/ko-KR.ts","../src/i18n/locales/lt-LT.ts","../src/i18n/locales/nb-NO.ts","../src/i18n/locales/nl-NL.ts","../src/i18n/locales/pl-PL.ts","../src/i18n/locales/pt-BR.ts","../src/i18n/locales/ro-RO.ts","../src/i18n/locales/ru-RU.ts","../src/i18n/locales/th-TH.ts","../src/i18n/locales/tr-TR.ts","../src/i18n/locales/uk-UA.ts","../src/i18n/locales/vi-VN.ts","../src/i18n/locales/zh-CN.ts","../src/i18n/locales/zh-TW.ts","../src/i18n/index.ts","../src/components/styles/search.scss","../src/components/scripts/search.inline.ts","../node_modules/preact/src/constants.js","../node_modules/preact/src/options.js","../node_modules/preact/src/diff/catch-error.js","../node_modules/preact/src/component.js","../node_modules/preact/src/diff/props.js","../node_modules/preact/src/create-context.js","../node_modules/preact/jsx-runtime/src/index.js","../src/components/Search.tsx"],"names":["options","__e","error","vnode","oldVNode","errorInfo","component","ctor","handled","__","__c","constructor","getDerivedStateFromError","setState","__d","componentDidCatch","__E","e","Promise","prototype","then","bind","resolve","setTimeout","Math","random","toString","vnodeId","createVNode","type","props","key","isStaticChildren","__source","__self","ref","i","normalizedProps","__k","__b","__v","__i","__u","defaultProps","u"],"mappings":";AAIO,SAAS,cAAc,OAAA,EAAwD;AACpF,EAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACzC;;;ACNA,IAAO,aAAA,GAAQ;AAAA,EACb,UAAA,EAAY;AAAA,IACV,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO,QAAA;AAAA,MACP,oBAAA,EAAsB,yBAAA;AAAA,MACtB,SAAA,EAAW,aAAA;AAAA,MACX,aAAA,EAAe,0BAAA;AAAA,MACf,aAAA,EAAe,eAAA;AAAA,MACf,WAAA,EAAa;AAAA;AACf;AAEJ,CAAA;;;ACXA,IAAO,aAAA,GAAQ;AAAA,EACb,UAAA,EAAY;AAAA,IACV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AA,gCAAAA,EAAAA,CAAC,MAAA,EAAA,EAAK,gBAAA,EAAe,QAAA,EAAS,GAAE,qBAAA,EAAsB,CAAA;AAAA,gCACtDA,GAAC,QAAA,EAAA,EAAO,EAAA,EAAG,KAAI,EAAA,EAAG,GAAA,EAAI,GAAE,GAAA,EAAI;AAAA,eAAA,EAC9B;AAAA,aAAA,EACF,CAAA;AAAA,4BACAA,GAAC,GAAA,EAAA,EAAG,QAAA,EAAA,IAAA,CAAK,MAAM,CAAA,CAAE,UAAA,CAAW,OAAO,KAAA,EAAM;AAAA;AAAA;AAAA,OAC3C;AAAA,sBACAA,GAAC,KAAA,EAAA,EAAI,KAAA,EAAM,oBACT,QAAA,kBAAAA,EAAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,cAAA,EACT,QAAA,EAAA;AAAA,wBAAAA,EAAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,YAAA,EAAa,KAAA;AAAA,YACb,KAAA,EAAM,YAAA;AAAA,YACN,IAAA,EAAK,QAAA;AAAA,YACL,IAAA,EAAK,MAAA;AAAA,YACL,YAAA,EAAY,iBAAA;AAAA,YACZ,WAAA,EAAa;AAAA;AAAA,SACf;AAAA,wBACAA,EAAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,eAAA;AAAA,YACN,gBAAc,IAAA,CAAK,aAAA;AAAA,YACnB,qBAAA,EAAqB,IAAA,CAAK,SAAA,CAAU,IAAA,CAAK,aAAa;AAAA;AAAA;AACvD,OAAA,EACH,CAAA,EACF;AAAA,KAAA,EACF,CAAA;AAAA,EAEJ,CAAA;AAEA,EAAA,MAAA,CAAO,cAAA,GAAiB,qBAAA;AACxB,EAAA,MAAA,CAAO,GAAA,GAAM,cAAA;AAEb,EAAA,OAAO,MAAA;AACT,CAAA","file":"index.js","sourcesContent":["export function capitalize(s: string): string {\n return s.substring(0, 1).toUpperCase() + s.substring(1);\n}\n\nexport function classNames(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n","export default {\n components: {\n search: {\n title: \"Search\",\n searchBarPlaceholder: \"Search for something...\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"بحث\",\n searchBarPlaceholder: \"ابحث عن شيء ما\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Cercar\",\n searchBarPlaceholder: \"Cerca alguna cosa\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Hledat\",\n searchBarPlaceholder: \"Hledejte něco\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Suche\",\n searchBarPlaceholder: \"Suche nach etwas...\",\n noResults: \"Keine Ergebnisse.\",\n noResultsHint: \"Versuchen Sie einen anderen Suchbegriff?\",\n tagFilterHint: \"Nach Tag filtern\",\n noTagsFound: \"Keine passenden Tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Search\",\n searchBarPlaceholder: \"Search for something\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Buscar\",\n searchBarPlaceholder: \"Buscar algo...\",\n noResults: \"Sin resultados.\",\n noResultsHint: \"\\u00bfIntentar con otro t\\u00e9rmino de b\\u00fasqueda?\",\n tagFilterHint: \"Filtrar por etiqueta\",\n noTagsFound: \"No se encontraron etiquetas\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"جستجو\",\n searchBarPlaceholder: \"مطلبی را جستجو کنید\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Haku\",\n searchBarPlaceholder: \"Hae jotain\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Recherche\",\n searchBarPlaceholder: \"Rechercher quelque chose...\",\n noResults: \"Aucun r\\u00e9sultat.\",\n noResultsHint: \"Essayez un autre terme de recherche\\u00a0?\",\n tagFilterHint: \"Filtrer par tag\",\n noTagsFound: \"Aucun tag correspondant\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"חיפוש\",\n searchBarPlaceholder: \"חפשו משהו\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Keresés\",\n searchBarPlaceholder: \"Keress valamire\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Cari\",\n searchBarPlaceholder: \"Cari sesuatu\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Cerca\",\n searchBarPlaceholder: \"Cerca qualcosa\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"\\u691c\\u7d22\",\n searchBarPlaceholder: \"\\u4f55\\u304b\\u3092\\u691c\\u7d22...\",\n noResults: \"\\u7d50\\u679c\\u304c\\u898b\\u3064\\u304b\\u308a\\u307e\\u305b\\u3093\\u3002\",\n noResultsHint:\n \"\\u5225\\u306e\\u691c\\u7d22\\u8a9e\\u3092\\u304a\\u8a66\\u3057\\u304f\\u3060\\u3055\\u3044\\u3002\",\n tagFilterHint: \"\\u30bf\\u30b0\\u3067\\u30d5\\u30a3\\u30eb\\u30bf\\u30fc\",\n noTagsFound: \"\\u4e00\\u81f4\\u3059\\u308b\\u30bf\\u30b0\\u304c\\u3042\\u308a\\u307e\\u305b\\u3093\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Іздеу\",\n searchBarPlaceholder: \"Бірдеңе іздеу\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"검색\",\n searchBarPlaceholder: \"검색어를 입력하세요\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Paieška\",\n searchBarPlaceholder: \"Ieškoti\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Søk\",\n searchBarPlaceholder: \"Søk etter noe\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Zoeken\",\n searchBarPlaceholder: \"Doorzoek de website\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Szukaj\",\n searchBarPlaceholder: \"Wpisz frazę wyszukiwania\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Pesquisar\",\n searchBarPlaceholder: \"Pesquisar por algo\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Căutare\",\n searchBarPlaceholder: \"Introduceți termenul de căutare...\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Поиск\",\n searchBarPlaceholder: \"Найти что-нибудь\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"ค้นหา\",\n searchBarPlaceholder: \"ค้นหาบางอย่าง\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Arama\",\n searchBarPlaceholder: \"Bir şey arayın\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Пошук\",\n searchBarPlaceholder: \"Шукати щось\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Tìm\",\n searchBarPlaceholder: \"Tìm kiếm thông tin\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"\\u641c\\u7d22\",\n searchBarPlaceholder: \"\\u641c\\u7d22\\u5185\\u5bb9...\",\n noResults: \"\\u6ca1\\u6709\\u7ed3\\u679c\\u3002\",\n noResultsHint: \"\\u8bf7\\u5c1d\\u8bd5\\u5176\\u4ed6\\u641c\\u7d22\\u8bcd\\u3002\",\n tagFilterHint: \"\\u6309\\u6807\\u7b7e\\u7b5b\\u9009\",\n noTagsFound: \"\\u6ca1\\u6709\\u5339\\u914d\\u7684\\u6807\\u7b7e\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"搜尋\",\n searchBarPlaceholder: \"搜尋些什麼\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","import enUS from \"./locales/en-US\";\nimport arSA from \"./locales/ar-SA\";\nimport caES from \"./locales/ca-ES\";\nimport csCZ from \"./locales/cs-CZ\";\nimport deDE from \"./locales/de-DE\";\nimport enGB from \"./locales/en-GB\";\nimport esES from \"./locales/es-ES\";\nimport faIR from \"./locales/fa-IR\";\nimport fiFI from \"./locales/fi-FI\";\nimport frFR from \"./locales/fr-FR\";\nimport heIL from \"./locales/he-IL\";\nimport huHU from \"./locales/hu-HU\";\nimport idID from \"./locales/id-ID\";\nimport itIT from \"./locales/it-IT\";\nimport jaJP from \"./locales/ja-JP\";\nimport kkKZ from \"./locales/kk-KZ\";\nimport koKR from \"./locales/ko-KR\";\nimport ltLT from \"./locales/lt-LT\";\nimport nbNO from \"./locales/nb-NO\";\nimport nlNL from \"./locales/nl-NL\";\nimport plPL from \"./locales/pl-PL\";\nimport ptBR from \"./locales/pt-BR\";\nimport roRO from \"./locales/ro-RO\";\nimport ruRU from \"./locales/ru-RU\";\nimport thTH from \"./locales/th-TH\";\nimport trTR from \"./locales/tr-TR\";\nimport ukUA from \"./locales/uk-UA\";\nimport viVN from \"./locales/vi-VN\";\nimport zhCN from \"./locales/zh-CN\";\nimport zhTW from \"./locales/zh-TW\";\n\nconst locales: Record = {\n \"en-US\": enUS,\n \"ar-SA\": arSA,\n \"ca-ES\": caES,\n \"cs-CZ\": csCZ,\n \"de-DE\": deDE,\n \"en-GB\": enGB,\n \"es-ES\": esES,\n \"fa-IR\": faIR,\n \"fi-FI\": fiFI,\n \"fr-FR\": frFR,\n \"he-IL\": heIL,\n \"hu-HU\": huHU,\n \"id-ID\": idID,\n \"it-IT\": itIT,\n \"ja-JP\": jaJP,\n \"kk-KZ\": kkKZ,\n \"ko-KR\": koKR,\n \"lt-LT\": ltLT,\n \"nb-NO\": nbNO,\n \"nl-NL\": nlNL,\n \"pl-PL\": plPL,\n \"pt-BR\": ptBR,\n \"ro-RO\": roRO,\n \"ru-RU\": ruRU,\n \"th-TH\": thTH,\n \"tr-TR\": trTR,\n \"uk-UA\": ukUA,\n \"vi-VN\": viVN,\n \"zh-CN\": zhCN,\n \"zh-TW\": zhTW,\n};\n\nexport function i18n(locale: string) {\n return locales[locale] || enUS;\n}\n",".search {\n min-width: fit-content;\n max-width: 14rem;\n}\n\n@media all and (max-width: 800px) {\n .search {\n flex-grow: 0.3;\n }\n}\n.search > .search-button {\n background-color: transparent;\n border: 1px var(--lightgray) solid;\n border-radius: 4px;\n font-family: inherit;\n font-size: inherit;\n height: 2rem;\n padding: 0 1rem 0 0;\n display: flex;\n align-items: center;\n text-align: inherit;\n cursor: pointer;\n white-space: nowrap;\n width: 100%;\n}\n\n.search > .search-button > p {\n display: inline;\n color: var(--gray);\n text-wrap: unset;\n}\n\n.search > .search-button svg {\n cursor: pointer;\n width: 18px;\n min-width: 18px;\n margin: 0 0.5rem;\n}\n\n.search > .search-button svg .search-path {\n stroke: var(--darkgray);\n stroke-width: 1.5px;\n transition: stroke 0.5s ease;\n}\n\n.search > .search-container {\n position: fixed;\n contain: layout;\n z-index: var(--search-z-index, 999);\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n overflow-y: auto;\n display: none;\n backdrop-filter: blur(4px);\n}\n\n.search > .search-container.active {\n display: inline-block;\n}\n\n.search > .search-container > .search-space {\n width: 65%;\n margin-top: 12vh;\n margin-left: auto;\n margin-right: auto;\n}\n\n@media all and not (min-width: 1200px) {\n .search > .search-container > .search-space {\n width: 90%;\n }\n}\n.search > .search-container > .search-space > *:not(.ghost-text):not(.tag-suggestions) {\n width: 100%;\n border-radius: 7px;\n background: var(--light);\n box-shadow: 0 14px 50px rgba(27, 33, 48, 0.12), 0 10px 30px rgba(27, 33, 48, 0.16);\n margin-bottom: 2em;\n}\n\n.search > .search-container > .search-space > input {\n box-sizing: border-box;\n padding: 0.5em 1em;\n font-family: var(--bodyFont);\n color: var(--dark);\n font-size: 1.1em;\n border: 1px solid var(--lightgray);\n}\n\n.search > .search-container > .search-space > input:focus {\n outline: none;\n}\n\n.search > .search-container > .search-space > .search-layout {\n display: none;\n flex-direction: row;\n border: 1px solid var(--lightgray);\n flex: 0 0 100%;\n box-sizing: border-box;\n}\n\n.search > .search-container > .search-space > .search-layout.display-results {\n display: flex;\n}\n\n.search > .search-container > .search-space > .search-layout[data-preview] > .results-container {\n flex: 0 0 min(30%, 450px);\n}\n\n@media all and not (max-width: 800px) {\n .search > .search-container > .search-space > .search-layout[data-preview] .result-card > p.card-description {\n display: none;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > div:first-child {\n border-right: 1px solid var(--lightgray);\n border-top-right-radius: unset;\n border-bottom-right-radius: unset;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > div:last-child {\n border-top-left-radius: unset;\n border-bottom-left-radius: unset;\n }\n}\n.search > .search-container > .search-space > .search-layout > div {\n height: 63vh;\n border-radius: 5px;\n}\n\n@media all and (max-width: 800px) {\n .search > .search-container > .search-space > .search-layout {\n flex-direction: column;\n }\n .search > .search-container > .search-space > .search-layout > .preview-container {\n display: none !important;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > .results-container {\n width: 100%;\n height: auto;\n max-height: 60vh;\n flex: 0 0 100%;\n }\n}\n.search > .search-container > .search-space > .search-layout .highlight {\n background: color-mix(in srgb, var(--tertiary) 60%, rgba(255, 255, 255, 0));\n border-radius: 5px;\n scroll-margin-top: 2rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container {\n flex-grow: 1;\n display: block;\n overflow: hidden;\n font-family: inherit;\n color: var(--dark);\n line-height: 1.5em;\n font-weight: 400;\n overflow-y: auto;\n padding: 0 2rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container .preview-inner {\n margin: 0 auto;\n width: 100%;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container a[role=anchor] {\n background-color: transparent;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container {\n overflow-y: auto;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card {\n overflow: hidden;\n padding: 1em;\n cursor: pointer;\n transition: background 0.2s ease;\n border-bottom: 1px solid var(--lightgray);\n width: 100%;\n display: block;\n box-sizing: border-box;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n text-transform: none;\n text-align: left;\n outline: none;\n font-weight: inherit;\n text-decoration: none;\n color: var(--dark);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card:hover,\n.search > .search-container > .search-space > .search-layout > .results-container .result-card:focus,\n.search > .search-container > .search-space > .search-layout > .results-container .result-card.focus {\n background: var(--lightgray);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > h3 {\n margin: 0;\n color: var(--secondary);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul.tags {\n margin-top: 0.45rem;\n margin-bottom: 0;\n padding: 0;\n list-style: none;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul.tags > li {\n display: inline-block;\n margin-right: 0.3rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul > li > p {\n border-radius: 8px;\n background-color: var(--highlight);\n padding: 0.2rem 0.4rem;\n margin: 0;\n line-height: 1.4rem;\n font-weight: 700;\n color: var(--secondary);\n font-size: 0.85rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul > li > p.match-tag {\n color: var(--tertiary);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > p {\n margin-bottom: 0;\n margin-top: 0.5em;\n font-size: 0.9em;\n color: var(--gray);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card.no-match {\n cursor: default;\n}\n\n.search > .search-container > .search-space {\n position: relative;\n}\n\n.search > .search-container > .search-space > .ghost-text {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n pointer-events: none;\n box-sizing: border-box;\n padding: 0.5em 1em;\n font-family: var(--bodyFont);\n font-size: 1.1em;\n color: var(--gray);\n opacity: 0.6;\n white-space: pre;\n overflow: hidden;\n height: auto;\n line-height: normal;\n border: 1px solid transparent;\n}\n\n.search > .search-container > .search-space > .tag-suggestions {\n position: absolute;\n top: calc(3.1em + 2px);\n left: 0;\n right: 0;\n z-index: calc(var(--search-z-index, 999) + 1);\n background: var(--light);\n border: 1px solid var(--lightgray);\n border-radius: 5px;\n box-shadow: 0 4px 12px rgba(27, 33, 48, 0.1), 0 2px 6px rgba(27, 33, 48, 0.08);\n max-height: 240px;\n overflow-y: auto;\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item {\n padding: 0.4em 1em;\n cursor: pointer;\n font-family: var(--bodyFont);\n font-size: 0.95em;\n color: var(--dark);\n transition: background 0.15s ease;\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item:hover,\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item.active {\n background: var(--lightgray);\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item.active {\n color: var(--secondary);\n font-weight: 600;\n}\n\n.search-scroll-target {\n background: color-mix(in srgb, var(--tertiary) 40%, rgba(255, 255, 255, 0));\n border-radius: 3px;\n padding: 0.1em 0;\n transition: background 1s ease;\n}\n\n.search-scroll-target.fade-out {\n background: transparent;\n}","var Rn=Object.create;var Ne=Object.defineProperty;var Wn=Object.getOwnPropertyDescriptor;var Nn=Object.getOwnPropertyNames;var zn=Object.getPrototypeOf,On=Object.prototype.hasOwnProperty;var $n=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Kn=(t,e,n,r)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let i of Nn(e))!On.call(t,i)&&i!==n&&Ne(t,i,{get:()=>e[i],enumerable:!(r=Wn(e,i))||r.enumerable});return t};var Un=(t,e,n)=>(n=t!=null?Rn(zn(t)):{},Kn(e||!t||!t.__esModule?Ne(n,\"default\",{value:t,enumerable:!0}):n,t));var fe=$n(()=>{});var C;function O(t,e,n){let r=typeof n,i=typeof t;if(r!==\"undefined\"){if(i!==\"undefined\"){if(n){if(i===\"function\"&&r===i)return function(o){return t(n(o))};if(e=t.constructor,e===n.constructor){if(e===Array)return n.concat(t);if(e===Map){var s=new Map(n);for(var u of t)s.set(u[0],u[1]);return s}if(e===Set){u=new Set(n);for(s of t.values())u.add(s);return u}}}return t}return n}return i===\"undefined\"?e:t}function Ct(t,e){return typeof t>\"u\"?e:t}function R(){return Object.create(null)}function U(t){return typeof t==\"string\"}function Lt(t){return typeof t==\"object\"}function Mt(t,e){if(U(e))t=t[e];else for(let n=0;t&&n1?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&>(this),this)};C.addMatcher=function(t,e){return typeof t==\"object\"?this.addReplacer(t,e):t.length<2&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?\"|\":\"\")+t,this.J=null,this.cache&>(this),this)};C.addReplacer=function(t,e){return typeof t==\"string\"?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&>(this),this)};C.encode=function(t,e){if(this.cache&&t.length<=this.H)if(this.F){if(this.B.has(t))return this.B.get(t)}else this.F=setTimeout(gt,50,this);this.normalize&&(typeof this.normalize==\"function\"?t=this.normalize(t):t=ze?t.normalize(\"NFKD\").replace(ze,\"\").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&t.length>3&&(t=t.replace(Xn,\"$1 $2\").replace(Zn,\"$1 $2\").replace(Jn,\"$1 \"));let n=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer),r=[],i=R(),s,u,o=this.split||this.split===\"\"?t.split(this.split):[t];for(let c=0,f,h;cthis.maxlength)){if(e){if(i[f])continue;i[f]=1}else{if(s===f)continue;s=f}if(n)r.push(f);else if(!this.filter||(typeof this.filter==\"function\"?this.filter(f):!this.filter.has(f))){if(this.cache&&f.length<=this.I)if(this.F){var l=this.D.get(f);if(l||l===\"\"){l&&r.push(l);continue}}else this.F=setTimeout(gt,50,this);if(this.stemmer){this.K||(this.K=new RegExp(\"(?!^)(\"+this.A+\")$\"));let g;for(;g!==f&&f.length>2;)g=f,f=f.replace(this.K,a=>this.stemmer.get(a))}if(f&&(this.mapper||this.dedupe&&f.length>1)){l=\"\";for(let g=0,a=\"\",D,p;g1&&(this.J||(this.J=new RegExp(\"(\"+this.h+\")\",\"g\")),f=f.replace(this.J,g=>this.matcher.get(g))),f&&this.replacer)for(l=0;f&&lthis.L&&(this.D.clear(),this.I=this.I/1.1|0)),f){if(f!==h)if(e){if(i[f])continue;i[f]=1}else{if(u===f)continue;u=f}r.push(f)}}}return this.finalize&&(r=this.finalize(r)||r),this.cache&&t.length<=this.H&&(this.B.set(t,r),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),r};function gt(t){t.F=null,t.B.clear(),t.D.clear()}function Fe(t,e,n){n||(e||typeof t!=\"object\"?typeof e==\"object\"&&(n=e,e=0):n=t),n&&(t=n.query||t,e=n.limit||e);let r=\"\"+(e||0);n&&(r+=(n.offset||0)+!!n.context+!!n.suggest+(n.resolve!==!1)+(n.resolution||this.resolution)+(n.boost||0)),t=(\"\"+t).toLowerCase(),this.cache||(this.cache=new mt);let i=this.cache.get(t+r);if(!i){let s=n&&n.cache;s&&(n.cache=!1),i=this.search(t,e,n),s&&(n.cache=s),this.cache.set(t+r,i)}return i}function mt(t){this.limit=t&&t!==!0?t:1e3,this.cache=new Map,this.h=\"\"}mt.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)};mt.prototype.get=function(t){let e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e};mt.prototype.remove=function(t){for(let e of this.cache){let n=e[0];e[1].includes(t)&&this.cache.delete(n)}};mt.prototype.clear=function(){this.cache.clear(),this.h=\"\"};var Oe={normalize:!1,numeric:!1,dedupe:!1},Ot={},ae=new Map([[\"b\",\"p\"],[\"v\",\"f\"],[\"w\",\"f\"],[\"z\",\"s\"],[\"x\",\"s\"],[\"d\",\"t\"],[\"n\",\"m\"],[\"c\",\"k\"],[\"g\",\"k\"],[\"j\",\"k\"],[\"q\",\"k\"],[\"i\",\"e\"],[\"y\",\"e\"],[\"u\",\"o\"]]),$e=new Map([[\"ae\",\"a\"],[\"oe\",\"o\"],[\"sh\",\"s\"],[\"kh\",\"k\"],[\"th\",\"t\"],[\"ph\",\"f\"],[\"pf\",\"f\"]]),Ke=[/([^aeo])h(.)/g,\"$1$2\",/([aeo])h([^aeo]|$)/g,\"$1$2\",/(.)\\1+/g,\"$1\"],Ue={a:\"\",e:\"\",i:\"\",o:\"\",u:\"\",y:\"\",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,\\u00DF:2,d:3,t:3,l:4,m:5,n:5,r:6},_e={Exact:Oe,Default:Ot,Normalize:Ot,LatinBalance:{mapper:ae},LatinAdvanced:{mapper:ae,matcher:$e,replacer:Ke},LatinExtra:{mapper:ae,replacer:Ke.concat([/(?!^)[aeo]/g,\"\"]),matcher:$e},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let n=0;n=u.length)e-=u.length;else{e=u[r?\"splice\":\"slice\"](e,n);let o=e.length;if(o&&(i=i.length?i.concat(e):e,n-=o,r&&(t.length-=o),!n))break;e=0}return i}function xt(t){if(!this||this.constructor!==xt)return new xt(t);this.index=t?[t]:[],this.length=t?t.length:0;let e=this;return new Proxy([],{get(n,r){if(r===\"length\")return e.length;if(r===\"push\")return function(i){e.index[e.index.length-1].push(i),e.length++};if(r===\"pop\")return function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()};if(r===\"indexOf\")return function(i){let s=0;for(let u=0,o,l;u=0)return s+l;s+=o.length}return-1};if(r===\"includes\")return function(i){for(let s=0;s32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}V.prototype.get=function(t){let e=this.index[this.B(t)];return e&&e.get(t)};V.prototype.set=function(t,e){var n=this.B(t);let r=this.index[n];r?(n=r.size,r.set(t,e),(n-=r.size)&&this.size++):(this.index[n]=r=new Map([[t,e]]),this.h.push(r),this.size++)};function J(t=8){if(!this||this.constructor!==J)return new J(t);this.index=R(),this.h=[],this.size=0,t>32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}J.prototype.add=function(t){var e=this.B(t);let n=this.index[e];n?(e=n.size,n.add(t),(e-=n.size)&&this.size++):(this.index[e]=n=new Set([t]),this.h.push(n),this.size++)};C=V.prototype;C.has=J.prototype.has=function(t){let e=this.index[this.B(t)];return e&&e.has(t)};C.delete=J.prototype.delete=function(t){let e=this.index[this.B(t)];e&&e.delete(t)&&this.size--};C.clear=J.prototype.clear=function(){this.index=R(),this.h=[],this.size=0};C.values=J.prototype.values=function*(){for(let t=0;t=this.priority*this.priority*3):(ge=setTimeout(Yn,0),Je=Date.now()),Ut){let s=this;return new Promise(u=>{setTimeout(function(){u(s[t+\"Async\"].apply(s,e))},0)})}let i=this[t].apply(this,e);return n=i.then?i:new Promise(s=>s(i)),r&&n.then(r),n}}var it=0;function dt(t={},e){function n(o){function l(c){c=c.data||c;let f=c.id,h=f&&s.h[f];h&&(h(c.msg),delete s.h[f])}if(this.worker=o,this.h=R(),this.worker)return i?this.worker.on(\"message\",l):this.worker.onmessage=l,t.config?new Promise(function(c){it>1e9&&(it=0),s.h[++it]=function(){c(s)},s.worker.postMessage({id:it,task:\"init\",factory:r,options:t})}):(this.priority=t.priority||4,this.encoder=e||null,this.worker.postMessage({task:\"init\",factory:r,options:t}),this)}if(!this||this.constructor!==dt)return new dt(t);let r=typeof self<\"u\"?self._factory:typeof window<\"u\"?window._factory:null;r&&(r=r.toString());let i=typeof window>\"u\",s=this,u=Gn(r,i,t.worker);return u.then?u.then(function(o){return n.call(s,o)}):n.call(this,u)}rt(\"add\");rt(\"append\");rt(\"search\");rt(\"update\");rt(\"remove\");rt(\"clear\");rt(\"export\");rt(\"import\");dt.prototype.searchCache=Fe;ye(dt.prototype);function rt(t){dt.prototype[t]=function(){let e=this,n=[].slice.call(arguments);var r=n[n.length-1];let i;return typeof r==\"function\"&&(i=r,n.pop()),r=new Promise(function(s){t===\"export\"&&typeof n[0]==\"function\"&&(n[0]=null),it>1e9&&(it=0),e.h[++it]=s,e.worker.postMessage({task:t,id:it,args:n})}),i?(r.then(i),this):r}}function Gn(t,e,n){return e?typeof module<\"u\"?new(fe()).Worker(__dirname+\"/worker/node.js\"):Promise.resolve().then(()=>Un(fe(),1)).then(function(r){return new r.Worker(import.meta.dirname+\"/node/node.mjs\")}):t?new window.Worker(URL.createObjectURL(new Blob([\"onmessage=\"+Qn.toString()],{type:\"text/javascript\"}))):new window.Worker(typeof n==\"string\"?n:import.meta.url.replace(\"/worker.js\",\"/worker/worker.js\").replace(\"flexsearch.bundle.module.min.js\",\"module/worker/worker.js\").replace(\"flexsearch.bundle.module.min.mjs\",\"module/worker/worker.js\"),{type:\"module\"})}Dt.prototype.add=function(t,e,n){if(Lt(t)&&(e=t,t=Mt(e,this.key)),e&&(t||t===0)){if(!n&&this.reg.has(t))return this.update(t,e);for(let o=0,l;oe?t.slice(n,n+e):t,r?wt.call(this,t):t;let i=[];for(let s=0,u,o;s=o){n-=o;continue}u=u.slice(n,n+e),o=u.length,n=0}if(o>e&&(u=u.slice(0,e),o=e),!i.length&&o>=e)return r?wt.call(this,u):u;if(i.push(u),e-=o,!e)break}return i=i.length>1?[].concat.apply([],i):i[0],r?wt.call(this,i):i}function Gt(t,e,n,r){var i=r[0];if(i[0]&&i[0].query)return t[e].apply(t,i);if(!(e!==\"and\"&&e!==\"not\"||t.result.length||t.await||i.suggest))return r.length>1&&(i=r[r.length-1]),(r=i.resolve)?t.await||t.result:t;let s=[],u=0,o=0,l,c,f,h,g;for(e=0;e1&&(n=n[e].apply(n,t.slice(1))),n}j.prototype.or=function(){return Gt(this,\"or\",qn,arguments)};function qn(t,e,n,r,i,s,u){return t.length&&(this.result.length&&t.push(this.result),t.length<2?this.result=t[0]:(this.result=en(t,e,n,!1,this.h),n=0)),i&&(this.await=null),i?this.resolve(e,n,r,u):this}j.prototype.and=function(){return Gt(this,\"and\",ti,arguments)};function ti(t,e,n,r,i,s,u){if(!s&&!this.result.length)return i?this.result:this;let o;if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{let l=0;for(let c=0,f,h;c1?y.join(\" \"):y[0];let w;if(y&&B){for(var v=B.length,M=(Q.split?B.replace(Q.split,\"\"):B).length-y.length,T=\"\",W=0,z=0;z-1&&(T=(N?B.substring(0,N):\"\")+u+B.substring(N,N+P)+o+(N+P=l)break}if(b=ht.length*(s.length-2),a||D||l&&d.length-b>l)if(b=l+b-g*2,k=x-A,a>0&&(k+=a),D>0&&(k+=D),k<=b)F=a?A-(a>0?a:0):A-((b-k)/2|0),m=D?x+(D>0?D:0):F+b,c||(F>0&&d.charAt(F)!==\" \"&&d.charAt(F-1)!==\" \"&&(F=d.indexOf(\" \",F),F<0&&(F=0)),m=m.length-1){if(I>=m.length){k[w+1]=1,I>=F.length&&(b[w+1]=1);continue}v-=g}if(d=m[I].text,P=D&&y[w])if(P>0){if(d.length>P)if(k[w+1]=1,c)d=d.substring(0,P);else continue;(P-=d.length)||(P=-1),y[w]=P}else{k[w+1]=1;continue}if(v+d.length+1<=l)d=\" \"+d,x[w]+=d;else if(c)$=l-v-1,$>0&&(d=\" \"+d.substring(0,$),x[w]+=d),k[w+1]=1;else{k[w+1]=1;continue}}else{if(k[w])continue;if(I-=M,A[I]){v-=g,k[w]=1,b[w]=1;continue}if(I<=0){if(I<0){k[w]=1,b[w]=1;continue}v-=g}if(d=m[I].text,P=a&&B[w])if(P>0){if(d.length>P)if(k[w]=1,c)d=d.substring(d.length-P);else continue;(P-=d.length)||(P=-1),B[w]=P}else{k[w]=1;continue}if(v+d.length+1<=l)d+=\" \",x[w]=d+x[w];else if(c)$=d.length+1-(l-v),$>=0&&$=F.length-1||I1?en(l,n,r,u,s):(l=l[0])&&n&&l.length>n||r?l.slice(r,n+r):l;else{if(tn||r)&&(l=l.slice(r,n+r));else{i=[];for(let h=0,g;hr)r-=g.length;else if((n&&g.length>n||r)&&(g=g.slice(r,n+r),n-=g.length,r&&(r-=g.length)),i.push(g),!n)break}l=i}}return l}function en(t,e,n,r,i){let s=[],u=R(),o;var l=t.length;let c;if(r){for(i=l-1;i>=0;i--)if(c=(r=t[i])&&r.length){for(l=0;l=0;f--){h=t[f];for(let a=0;a1?Jt(i,1,0,0,l,c):i[0],B)})}return a?i:new j(i.length>1?Jt(i,1,0,0,l,c):i[0],this)}}a||u||!(h=h||this.field)||(U(h)?u=h:(h.constructor===Array&&h.length===1&&(h=h[0]),u=h.field||h.index)),h&&h.constructor!==Array&&(h=[h])}h||(h=this.field);let b;m=(this.worker||this.db)&&!r&&[];for(let B=0,y,v,M;B\"u\"&&(this.db?m.push(p=this.index.get(this.field[0]).db.enrich(p)):p=wt.call(this,p)),u)return a?D?Vt(t,p,this.index,u,D):p:new j(p,this);i[F]={field:s[F],result:p}}if(d&&this.db&&m.length){let B=this;return Promise.all(m).then(function(y){for(let v=0;v0&&((n&&e>n||r)&&(t=t.slice(r,r+n)),i&&(t=wt.call(this,t))),t):[]):[]}function wt(t){if(!this||!this.store)return t;if(this.db)return this.index.get(this.field[0]).db.enrich(t);let e=Array(t.length);for(let n=0,r;n1?n:n[0]}C.append=function(t,e){return this.add(t,e,!0)};C.update=function(t,e){return this.remove(t).add(t,e)};C.remove=function(t){Lt(t)&&(t=Mt(t,this.key));for(var e of this.index.values())e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let r of n){e=r[0];let i=r[1],s=i.indexOf(t);s>-1&&(i.length>1?i.splice(s,1):n.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this};C.clear=function(){let t=[];for(let e of this.index.values()){let n=e.clear();n.then&&t.push(n)}if(this.tag)for(let e of this.tag.values())e.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this};C.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)};C.cleanup=function(){for(let t of this.index.values())t.cleanup();return this};C.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then(function(e){return e[0]&&e[0].doc||null}):this.store.get(t)||null};C.set=function(t,e){return typeof t==\"object\"&&(e=t,t=Mt(e,this.key)),this.store.set(t,e),this};C.searchCache=Fe;C.export=ui;C.import=oi;ye(Dt.prototype);function Ae(t,e=0){let n=[],r=[];e&&(e=25e4/e*5e3|0);for(let i of t.entries())r.push(i),r.length===e&&(n.push(r),r=[]);return r.length&&n.push(r),n}function we(t,e){e||(e=new Map);for(let n=0,r;n2?n[0]:\"\";if(n=n.length>2?n[2]:n[1],this.worker&&r)return this.index.get(r).import(t);if(e){if(typeof e==\"string\"&&(e=JSON.parse(e)),r)return this.index.get(r).import(n,e);switch(n){case\"reg\":this.fastupdate=!1,this.reg=un(e,this.reg);for(let i=0,s;i=0&&i.splice(u,1)}}else jt(this.map,t),this.depth&&jt(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.M&&on(this)),this.cache&&this.cache.remove(t),this};function jt(t,e){let n=0;var r=typeof e>\"u\";if(t.constructor===Array){for(let i=0,s,u,o;i=0){if(s.length>1)return s.splice(u,1),1;if(delete t[i],n)return 1;o=1}else{if(o)return 1;n++}}}else for(let i of t.entries())r=i[0],jt(i[1],e)?n++:t.delete(r);return n}var li={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:\"forward\"},score:{resolution:9,context:{depth:2,resolution:3}}};X.prototype.add=function(t,e,n,r){if(e&&(t||t===0)){if(!r&&!n&&this.reg.has(t))return this.update(t,e);r=this.depth,e=this.encoder.encode(e,!r);let c=e.length;if(c){let f=R(),h=R(),g=this.resolution;for(let a=0;a2){for(let p=1,d,F,m,A;p2){for(let p=0,d;pp;s--){u=D.substring(p,s),d=this.rtl?i-1-p:p;var o=this.score?this.score(e,D,a,u,d):Kt(g,c,a,i,d);G(this,h,u,o,t,n)}break}case\"bidirectional\":case\"reverse\":if(i>1){for(o=i-1;o>0;o--){u=D[this.rtl?i-1-o:o]+u;var l=this.score?this.score(e,D,a,u,o):Kt(g,c,a,i,o);G(this,h,u,l,t,n)}u=\"\"}case\"forward\":if(i>1){for(o=0;o1&&au;let p=this.score?this.score(e,u,a,D,o-1):Kt(i+(c/2>i?0:1),c,a,s-1,o-1);G(this,f,l?u:D,p,t,n,l?D:u)}}}}this.fastupdate||this.reg.add(t)}}return this.db&&(this.commit_task.push(n?{ins:t}:{del:t}),this.M&&on(this)),this};function G(t,e,n,r,i,s,u){let o,l;if(!(o=e[n])||u&&!o[u]){if(u?(e=o||(e[n]=R()),e[u]=1,l=t.ctx,(o=l.get(u))?l=o:l.set(u,l=t.keystore?new V(t.keystore):new Map)):(l=t.map,e[n]=1),(o=l.get(n))?l=o:l.set(n,l=o=[]),s){for(let c=0,f;c1?e+(r||0)<=t?n+(i||0):(t-1)/(e+(r||0))*(n+(i||0))+1|0:0}X.prototype.search=function(t,e,n){if(n||(e||typeof t!=\"object\"?typeof e==\"object\"&&(n=e,e=0):(n=t,t=\"\")),n&&n.cache)return n.cache=!1,t=this.searchCache(t,e,n),n.cache=!0,t;let r=[],i,s,u,o=0,l,c,f,h,g;n&&(t=n.query||t,e=n.limit||e,o=n.offset||0,s=n.context,u=n.suggest,g=(l=n.resolve)&&n.enrich,f=n.boost,h=n.resolution,c=this.db&&n.tag),typeof l>\"u\"&&(l=this.resolve),s=this.depth&&s!==!1;let a=this.encoder.encode(t,!s);if(i=a.length,e=e||(l?100:0),i===1)return Ye.call(this,a[0],\"\",e,o,l,g,c);if(i===2&&s&&!u)return Ye.call(this,a[1],a[0],e,o,l,g,c);let D=R(),p=0,d;if(s&&(d=a[0],p=1),h||h===0||(h=d?this.N:this.resolution),this.db){if(this.db.search&&(n=this.db.search(this,a,e,o,u,l,g,c),n!==!1))return n;let F=this;return(async function(){for(let m,A;p1)l=Jt(t,e,n,r,i,s,u);else if(o===1)return u?Ce.call(null,t[0],n,r):new j(t[0],this);return u?l:new j(l,this)}function Ye(t,e,n,r,i,s,u){return t=me(this,t,e,n,r,i,s,u),this.db?t.then(function(o){return i?o||[]:new j(o,this)}):t&&t.length?i?Ce.call(this,t,n,r):new j(t,this):i?[]:new j([],this)}function Ge(t,e,n,r){let i=[];if(t&&t.length){if(t.length<=r){e.push(t);return}for(let s=0,u;sn)&&(l=n,n=e,e=l),t.db?t.db.get(e,n,r,i,s,u,o):(t=n?(t=t.ctx.get(n))&&t.get(e):t.map.get(e),t)}function X(t,e){if(!this||this.constructor!==X)return new X(t);if(t){var n=U(t)?t:t.preset;n&&(t=Object.assign({},li[n],t))}else t={};n=t.context;let r=n===!0?{depth:1}:n||{},i=U(t.encoder)?_e[t.encoder]:t.encode||t.encoder||{};this.encoder=i.encode?i:typeof i==\"object\"?new vt(i):{encode:i},this.resolution=t.resolution||9,this.tokenize=n=(n=t.tokenize)&&n!==\"default\"&&n!==\"exact\"&&n||\"strict\",this.depth=n===\"strict\"&&r.depth||0,this.bidirectional=r.bidirectional!==!1,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(n=t.keystore||0)&&(this.keystore=n),this.map=n?new V(n):new Map,this.ctx=n?new V(n):new Map,this.reg=e||(this.fastupdate?n?new V(n):new Map:n?new J(n):new Set),this.N=r.resolution||3,this.rtl=i.rtl||t.rtl||!1,this.cache=(n=t.cache||null)&&new mt(n),this.resolve=t.resolve!==!1,(n=t.db)&&(this.db=this.mount(n)),this.M=t.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}C=X.prototype;C.mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)};C.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)};C.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function on(t){t.commit_timer||(t.commit_timer=setTimeout(function(){t.commit_timer=null,t.db.commit(t)},1))}C.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db?(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[],this.db.clear()):this};C.append=function(t,e){return this.add(t,e,!0)};C.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)};C.update=function(t,e){let n=this,r=this.remove(t);return r&&r.then?r.then(()=>n.add(t,e)):this.add(t,e)};C.cleanup=function(){return this.fastupdate?(jt(this.map),this.depth&&jt(this.ctx),this):this};C.searchCache=Fe;C.export=function(t,e,n=0,r=0){let i,s;switch(r){case 0:i=\"reg\",s=sn(this.reg);break;case 1:i=\"cfg\",s=null;break;case 2:i=\"map\",s=Ae(this.map,this.reg.size);break;case 3:i=\"ctx\",s=nn(this.ctx,this.reg.size);break;default:return}return Zt.call(this,t,e,i,s,n,r)};C.import=function(t,e){if(e)switch(typeof e==\"string\"&&(e=JSON.parse(e)),t=t.split(\".\"),t[t.length-1]===\"json\"&&t.pop(),t.length===3&&t.shift(),t=t.length>1?t[1]:t[0],t){case\"reg\":this.fastupdate=!1,this.reg=un(e,this.reg);break;case\"map\":this.map=we(e,this.map);break;case\"ctx\":this.ctx=rn(e,this.ctx)}};C.serialize=function(t=!0){let e=\"\",n=\"\",r=\"\";if(this.reg.size){let s;for(var i of this.reg.keys())s||(s=typeof i),e+=(e?\",\":\"\")+(s===\"string\"?'\"'+i+'\"':i);e=\"index.reg=new Set([\"+e+\"]);\",n=Ze(this.map,s),n=\"index.map=new Map([\"+n+\"]);\";for(let u of this.ctx.entries()){i=u[0];let o=Ze(u[1],s);o=\"new Map([\"+o+\"])\",o='[\"'+i+'\",'+o+\"]\",r+=(r?\",\":\"\")+o}r=\"index.ctx=new Map([\"+r+\"]);\"}return t?\"function inject(index){\"+e+n+r+\"}\":e+n+r};ye(X.prototype);var ln=typeof window<\"u\"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Qt=[\"map\",\"ctx\",\"tag\",\"reg\",\"cfg\"],pt=R();function Yt(t,e={}){if(!this||this.constructor!==Yt)return new Yt(t,e);typeof t==\"object\"&&(e=t,t=t.name),t||console.info(\"Default storage space was used, because a name was not passed.\"),this.id=\"flexsearch\"+(t?\":\"+t.toLowerCase().replace(/[^a-z0-9_\\-]/g,\"\"):\"\"),this.field=e.field?e.field.toLowerCase().replace(/[^a-z0-9_\\-]/g,\"\"):\"\",this.type=e.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}C=Yt.prototype;C.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())};C.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),pt[t.id]||(pt[t.id]=[]),pt[t.id].push(t.field);let e=ln.open(t.id,1);return e.onupgradeneeded=function(){let n=t.db=this.result;for(let r=0,i;r=f.length){r-=f.length;continue}let h=n?r+Math.min(f.length-r,n):f.length;for(let g=r;g=s.length?[]:!e&&!n?s:(s=s.slice(n,n+e),r?i.enrich(s):s)})};C.enrich=function(t){typeof t!=\"object\"&&(t=[t]);let e=this.db.transaction(\"reg\",\"readonly\").objectStore(\"reg\"),n=[];for(let r=0;r=0)if(i=1,o.length>1)o.splice(c,1);else{r[u]=[];break}s+=o.length}if(n)break}s?i&&t.update(r):t.delete(),t.continue()}C.remove=function(t){return typeof t!=\"object\"&&(t=[t]),Promise.all([this.transaction(\"map\",\"readwrite\",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction(\"ctx\",\"readwrite\",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction(\"tag\",\"readwrite\",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t,!0)}}),this.transaction(\"reg\",\"readwrite\",function(e){for(let n=0;n{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,n(this.result)},t.onerror=t.onblocked=r,t=null})}var hn={Index:X,Charset:_e,Encoder:vt,Document:Dt,Worker:dt,Resolver:j,IndexedDB:Yt,Language:{}};var Ni=Object.hasOwnProperty;var gn,H,dn,hi,ut,cn,Dn,mn,ve,te,It,Fn,Te,Be,ke,ci,_n={},ne=[],fi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,re=Array.isArray;function q(t,e){for(var n in e)t[n]=e[n];return t}function Se(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function xe(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++dn,__i:-1,__u:0};return i==null&&H.vnode!=null&&H.vnode(s),s}function kt(t){return t.children}function ee(t,e){this.props=t,this.context=e}function Bt(t,e){if(e==null)return t.__?Bt(t.__,t.__i+1):null;for(var n;ee&&ut.sort(mn),t=ut.shift(),e=ut.length,ai(t)}finally{ut.length=ie.__r=0}}function Cn(t,e,n,r,i,s,u,o,l,c,f){var h,g,a,D,p,d,F,m=r&&r.__k||ne,A=e.length;for(l=pi(n,e,m,l,A),h=0;h0?u=t.__k[s]=xe(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):t.__k[s]=u,l=s+g,u.__=t,u.__b=t.__b+1,o=null,(c=u.__i=gi(u,n,l,h))!=-1&&(h--,(o=n[c])&&(o.__u|=2)),o==null||o.__v==null?(c==-1&&(i>f?g--:il?g--:g++,u.__u|=4))):t.__k[s]=null;if(h)for(s=0;s(f?1:0)){for(i=n-1,s=n+1;i>=0||s=0?i--:s++])!=null&&(2&c.__u)==0&&o==c.key&&l==c.type)return u}return-1}function an(t,e,n){e[0]==\"-\"?t.setProperty(e,n??\"\"):t[e]=n==null?\"\":typeof n!=\"number\"||fi.test(e)?n:n+\"px\"}function qt(t,e,n,r,i){var s,u;t:if(e==\"style\")if(typeof n==\"string\")t.style.cssText=n;else{if(typeof r==\"string\"&&(t.style.cssText=r=\"\"),r)for(e in r)n&&e in n||an(t.style,e,\"\");if(n)for(e in n)r&&n[e]==r[e]||an(t.style,e,n[e])}else if(e[0]==\"o\"&&e[1]==\"n\")s=e!=(e=e.replace(Fn,\"$1\")),u=e.toLowerCase(),e=u in t||e==\"onFocusOut\"||e==\"onFocusIn\"?u.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n[It]=r[It]:(n[It]=Te,t.addEventListener(e,s?ke:Be,s)):t.removeEventListener(e,s?ke:Be,s);else{if(i==\"http://www.w3.org/2000/svg\")e=e.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(e!=\"width\"&&e!=\"height\"&&e!=\"href\"&&e!=\"list\"&&e!=\"form\"&&e!=\"tabIndex\"&&e!=\"download\"&&e!=\"rowSpan\"&&e!=\"colSpan\"&&e!=\"role\"&&e!=\"popover\"&&e in t)try{t[e]=n??\"\";break t}catch{}typeof n==\"function\"||(n==null||n===!1&&e[4]!=\"-\"?t.removeAttribute(e):t.setAttribute(e,e==\"popover\"&&n==1?\"\":n))}}function pn(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[te]==null)e[te]=Te++;else if(e[te]0?t:re(t)?t.map(wn):q({},t)}function Di(t,e,n,r,i,s,u,o,l){var c,f,h,g,a,D,p,d=n.props||_n,F=e.props,m=e.type;if(m==\"svg\"?i=\"http://www.w3.org/2000/svg\":m==\"math\"?i=\"http://www.w3.org/1998/Math/MathML\":i||(i=\"http://www.w3.org/1999/xhtml\"),s!=null){for(c=0;c\"u\"?\"\":document.body?.dataset?.basepath??\"\"}function Me(t,e){let n=e??_i(),r=t.startsWith(\"/\")?t:\"/\"+t;return n+r}function tt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function xn(t,e){if(!t)return()=>{};let n=i=>{t.classList.contains(\"active\")&&i.target===t&&(i.preventDefault(),i.stopPropagation(),e())},r=i=>{t.classList.contains(\"active\")&&i.key===\"Escape\"&&(i.preventDefault(),e())};return t.addEventListener(\"click\",n),document.addEventListener(\"keydown\",r),()=>{t.removeEventListener(\"click\",n),document.removeEventListener(\"keydown\",r)}}function Bn(t,e){let n=t.querySelectorAll(\"[src], [href]\");for(let r of Array.from(n)){let i=r.hasAttribute(\"href\")?\"href\":\"src\",s=r.getAttribute(i);if(s&&!(s.startsWith(\"http://\")||s.startsWith(\"https://\")||s.startsWith(\"mailto:\")||s.startsWith(\"tel:\")||s.startsWith(\"#\")||s.startsWith(\"/\")||s.startsWith(\"data:\")))try{let u=new URL(s,e).toString();r.setAttribute(i,u)}catch{continue}}}function se(t){return t.replaceAll(\"&\",\"&\").replaceAll(\"<\",\"<\").replaceAll(\">\",\">\").replaceAll('\"',\""\").replaceAll(\"'\",\"'\")}var je=\"basic\",bt=\"\",kn=8,yi=5,ue=30,Ci=t=>{let e=[],n=-1,r=-1,i=t.toLowerCase(),s=0;for(let u of i){let o=u.codePointAt(0);o>=12352&&o<=12447||o>=12448&&o<=12543||o>=19968&&o<=40959||o>=44032&&o<=55215||o>=131072&&o<=173791?(n!==-1&&(e.push(i.slice(n,r)),n=-1),e.push(u)):o===32||o===9||o===10||o===13?n!==-1&&(e.push(i.slice(n,r)),n=-1):(n===-1&&(n=s),r=s+1),s+=u.length}return n!==-1&&e.push(i.slice(n)),e},le=new hn.Document({encode:Ci,document:{id:\"id\",tag:\"tags\",index:[{field:\"title\",tokenize:\"forward\"},{field:\"content\",tokenize:\"forward\"},{field:\"tags\",tokenize:\"forward\"}]}}),Z=null,Ht=[],Pt=[],Ie=new Map;function oe(t){let e=t.split(/\\s+/),n=[],r=[];for(let i of e)i.startsWith(\"#\")&&i.length>1?n.push(i.substring(1)):i!==\"#\"&&r.push(i);return{tags:n,query:r.join(\" \").trim()}}function bn(t){let e=t.split(/\\s+/),n=e[e.length-1];return n&&n.startsWith(\"#\")?n.substring(1):null}var Sn=new DOMParser;async function Ei(t){if(Ie.has(t))return Ie.get(t);let e=new URL(Me(t),window.location.origin).toString();try{let n=await fetch(e);if(!n.ok)return[];let r=await n.text(),i=Sn.parseFromString(r??\"\",\"text/html\");Bn(i,e);let s=Array.from(i.getElementsByClassName(\"popover-hint\"));return Ie.set(t,s),s}catch{return[]}}var He=[];function Ft(t){He.push(t)}function Ai(){He.forEach(t=>t()),He.length=0}async function wi(){let t=document.querySelectorAll(\".search\");for(let e of Array.from(t)){let n=e.querySelector(\".search-container\"),r=e.querySelector(\".search-button\"),i=e.querySelector(\".search-bar\"),s=e.querySelector(\".search-layout\");if(!n||!r||!i||!s)continue;let u=n.closest(\".sidebar\"),o=s.getAttribute(\"data-preview\")===\"true\",l=s.getAttribute(\"data-field-priority\"),c=l?JSON.parse(l):[\"title\",\"content\",\"tags\"],f=s.querySelector(\".results-container\");f||(f=document.createElement(\"div\"),f.className=\"results-container\",f.setAttribute(\"role\",\"listbox\"),f.setAttribute(\"aria-label\",\"Search results\"),s.appendChild(f));let h=s.querySelector(\".preview-container\");o&&!h&&(h=document.createElement(\"div\"),h.className=\"preview-container\",s.appendChild(h));let g=document.createElement(\"div\");g.className=\"tag-suggestions\",g.setAttribute(\"role\",\"listbox\"),g.setAttribute(\"aria-label\",\"Tag suggestions\"),g.style.display=\"none\";let a=i.parentElement;a.insertBefore(g,i.nextSibling);let D=document.createElement(\"span\");D.className=\"ghost-text\",D.setAttribute(\"aria-hidden\",\"true\"),a.insertBefore(D,i.nextSibling);let p=-1,d=[],F=!1,m=_=>{if(p<0||p>=d.length){D.textContent=\"\";return}let E=d[p];if(!E.toLowerCase().startsWith(_.toLowerCase())){D.textContent=\"\";return}let L=E.substring(_.length);D.innerHTML=\"\";let S=document.createElement(\"span\");S.style.visibility=\"hidden\",S.textContent=i.value,D.appendChild(S),D.appendChild(document.createTextNode(L))},A=()=>{g.querySelectorAll(\".tag-suggestion-item\").forEach((L,S)=>{L.classList.toggle(\"active\",S===p)});let E=bn(i.value)||\"\";m(E)},x=()=>{F=!1,p=-1,d=[],g.style.display=\"none\",D.textContent=\"\"},b=_=>{let E=i.value,L=E.lastIndexOf(\"#\");L!==-1&&(i.value=E.substring(0,L)+\"#\"+_+\" \"),x(),i.focus(),i.dispatchEvent(new Event(\"input\"))},k=_=>{if(Rt){if(d=_===\"\"?Pt.slice(0,10):Pt.filter(E=>E.toLowerCase().startsWith(_.toLowerCase())).slice(0,10),d.length===0){x();return}p=0,F=!0,tt(g);for(let E=0;E!F||d.length===0?!1:(_===\"down\"?p=Math.min(p+1,d.length-1):p=Math.max(p-1,0),A(),!0),y=null,v=0,M=null,T=()=>{n.classList.remove(\"active\"),u&&(u.style.zIndex=\"\"),r.setAttribute(\"aria-expanded\",\"false\"),i.value=\"\",tt(f),h&&tt(h),s.classList.remove(\"display-results\"),je=\"basic\",y=null,x(),r.focus()},W=_=>{je=_,u&&(u.style.zIndex=\"9999\"),n.classList.add(\"active\"),r.setAttribute(\"aria-expanded\",\"true\"),i.focus()},z=async _=>{if(tt(f),_.length===0){let E=document.createElement(\"a\");E.className=\"result-card no-match\";let L=document.createElement(\"h3\");L.textContent=\"No results.\";let S=document.createElement(\"p\");S.textContent=\"Try another search term?\",E.appendChild(L),E.appendChild(S),f.appendChild(E),y=null,h&&tt(h)}else for(let E of _){let L=document.createElement(\"a\");L.className=\"result-card\",L.id=E.slug,L.href=Me(E.slug);let S=document.createElement(\"h3\");if(S.className=\"card-title\",S.innerHTML=E.title,L.appendChild(S),E.tags.length>0){let K=document.createElement(\"ul\");K.className=\"tags\",K.innerHTML=E.tags.join(\"\"),L.appendChild(K)}let Y=document.createElement(\"p\");Y.className=\"card-description\",Y.innerHTML=E.content,L.appendChild(Y),f.appendChild(L)}},N=()=>Array.from(f.querySelectorAll(\".result-card:not(.no-match)\")),P=()=>{let _=oe(bt);return _.query||(_.tags.length>0?_.tags.join(\" \"):bt)},$=async _=>{if(!h||(tt(h),!_))return;let E=_.id,L=++v,S=await Ei(E);if(L!==v)return;let Y=P(),K=document.createElement(\"div\");K.className=\"preview-inner\";for(let ct of S){let yt=ct.cloneNode(!0);Y.trim()!==\"\"&&(yt.innerHTML=vi(Y,yt)),K.appendChild(yt)}h.appendChild(K),requestAnimationFrame(()=>{let ct=Array.from(h.getElementsByClassName(\"highlight\"));if(ct.length===0)return;ct.sort((he,ce)=>ce.innerHTML.length-he.innerHTML.length);let yt=ct[0],Nt=0,ft=yt;for(;ft&&ft!==h;)Nt+=ft.offsetTop,ft=ft.offsetParent;h.scrollTop=Math.max(0,Nt-50)})},et=_=>{y&&y.classList.remove(\"focus\"),y=_,y&&(y.classList.add(\"focus\"),y.scrollIntoView({block:\"nearest\"})),M&&clearTimeout(M),M=setTimeout(()=>$(y),150)},Q=_=>{let E=N();if(E.length===0){et(null);return}let L=Math.min(Math.max(_,0),E.length-1);et(E[L]??null)},Wt=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):-1;Q(E+1)},ot=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):_.length;Q(E-1)},nt=async _=>{let E=_.target.value;bt=E;let L=bn(E);L!==null?k(L):x();let S=oe(E),Y=S.query!==\"\"||S.tags.length>0;if(s.classList.toggle(\"display-results\",Y),je=S.tags.length>0&&!S.query?\"tags\":\"basic\",!Y){tt(f),h&&tt(h),y=null;return}let K;S.query?K=await le.searchAsync({query:S.query,limit:S.tags.length>0?1e4:kn,index:[\"title\",\"content\"]}):S.tags.length>0?K=await le.searchAsync({query:S.tags[0],limit:1e4,index:[\"tags\"]}):K=[];let ct=at=>{let Tt=K.filter(zt=>zt.field===at);return Tt.length===0?[]:[...Tt[0].result]},Nt=[...new Set(c.flatMap(at=>ct(at)))].filter(at=>{if(S.tags.length===0)return!0;let Tt=Ht[at];if(!Tt)return!1;let zt=Z?.[Tt];if(!zt)return!1;let In=zt.tags||[];return S.tags.every(Hn=>In.some(Pn=>Pn.toLowerCase()===Hn.toLowerCase()))}),ft=S.query||(S.tags.length>0?S.tags.join(\" \"):E),he=Nt.map(at=>Bi(ft,at));await z(he.slice(0,kn));let ce=N();et(ce[0]??null)},lt=_=>{_.stopPropagation(),W(\"basic\")};r.addEventListener(\"click\",lt),Ft(()=>r.removeEventListener(\"click\",lt)),i.addEventListener(\"input\",nt),Ft(()=>i.removeEventListener(\"input\",nt));let ht=_=>{if(F){if(_.key===\"ArrowDown\"){_.preventDefault(),B(\"down\");return}if(_.key===\"ArrowUp\"){_.preventDefault(),B(\"up\");return}if(_.key===\"Tab\"){_.preventDefault(),p>=0&&p=0&&pi.removeEventListener(\"keydown\",ht));let w=_=>{_.key===\"k\"&&(_.ctrlKey||_.metaKey)&&!_.shiftKey?(_.preventDefault(),n.classList.contains(\"active\")?T():W(\"basic\")):_.shiftKey&&(_.ctrlKey||_.metaKey)&&_.key.toLowerCase()===\"k\"&&(_.preventDefault(),W(\"tags\"),i.value=\"#\",i.dispatchEvent(new Event(\"input\")))};document.addEventListener(\"keydown\",w),Ft(()=>document.removeEventListener(\"keydown\",w));let I=()=>{let _=oe(bt),E=_.query||(_.tags.length>0?_.tags.join(\" \"):bt);E.trim()&&sessionStorage.setItem(\"search-term\",E.trim())},_t=_=>{let E=_.target.closest(\".result-card\");!E||E.classList.contains(\"no-match\")||_ instanceof MouseEvent&&(_.altKey||_.ctrlKey||_.metaKey||_.shiftKey)||(I(),T())},Pe=_=>{let E=_.target.closest(\".result-card\");!E||E.classList.contains(\"no-match\")||et(E)};f.addEventListener(\"click\",_t),f.addEventListener(\"mouseover\",Pe),Ft(()=>{f.removeEventListener(\"click\",_t),f.removeEventListener(\"mouseover\",Pe)});let Re=_=>{let E=_.target.closest(\".tag-suggestion-item\");if(!E)return;let L=E.getAttribute(\"data-tag\");L&&b(L)},We=_=>{let E=_.target.closest(\".tag-suggestion-item\");if(!E)return;let L=E.getAttribute(\"data-index\");L!==null&&(p=parseInt(L,10),A())};g.addEventListener(\"click\",Re),g.addEventListener(\"mouseover\",We),Ft(()=>{g.removeEventListener(\"click\",Re),g.removeEventListener(\"mouseover\",We)});let jn=xn(n,T);Ft(jn)}}function Ln(t){let e=t.split(/\\s+/).filter(r=>r.trim()!==\"\"),n=e.length;if(n>1)for(let r=1;ri.length-r.length)}function vi(t,e){let n=Ln(t).filter(c=>c.trim()!==\"\");if(n.length===0)return e.innerHTML;let r=Sn.parseFromString(e.innerHTML,\"text/html\"),i=n.map(c=>c.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")).join(\"|\");if(i===\"\")return e.innerHTML;let s=new RegExp(i,\"gi\"),u=r.createTreeWalker(r.body,NodeFilter.SHOW_TEXT),o=[],l=u.nextNode();for(;l;)o.push(l),l=u.nextNode();for(let c of o){let f=c.nodeValue??\"\";if(s.lastIndex=0,!s.test(f))continue;s.lastIndex=0;let h=r.createDocumentFragment(),g=0,a;for(;(a=s.exec(f))!==null;){a.index>g&&h.appendChild(r.createTextNode(f.slice(g,a.index)));let D=r.createElement(\"span\");D.className=\"highlight\",D.textContent=a[0],h.appendChild(D),g=a.index+a[0].length}gl!==\"\"),s=0,u=i.length-1;if(n){let l=g=>r.some(a=>g.toLowerCase().startsWith(a.toLowerCase())),c=i.map(l),f=0,h=0;for(let g=0;gp+(d?1:0),0);D>=f&&(f=D,h=g)}s=Math.max(h-ue,0),u=Math.min(s+2*ue,i.length-1),i=i.slice(s,u)}let o=i.map(l=>{let c=l;for(let f of r)if(l.toLowerCase().includes(f.toLowerCase())){let h=new RegExp(f.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\"),\"gi\");c=l.replace(h,g=>`${g}`);break}return c}).join(\" \");return(s===0?\"\":\"...\")+o+(u===i.length-1?\"\":\"...\")}function xi(t,e){return!e||e.length===0||t.length===0?[]:e.map(n=>{let r=se(n);return t.some(i=>n.toLowerCase().includes(i.toLowerCase()))?`
  • #${r}

  • `:`
  • #${r}

  • `}).slice(0,yi)}function Bi(t,e){let n=Ht[e];if(!n||!Z)return{id:e,slug:\"\",title:\"\",content:\"\",tags:[]};let r=Z[n];if(!r)return{id:e,slug:n,title:\"\",content:\"\",tags:[]};let i=oe(bt);return{id:e,slug:n,title:i.tags.length>0&&!i.query?se(r.title):Tn(t,r.title||\"\"),content:Tn(t,r.content||\"\",!0),tags:xi(i.tags,r.tags)}}async function ki(){if(!Z)return;let t=0,e=[],n=new Set;for(let r of Object.keys(Z)){let i=Z[r];if(i){Ht[t]=r;for(let s of i.tags||[])n.add(s);e.push(le.addAsync(t,{id:t,slug:r,title:i.title||\"\",content:i.content||\"\",tags:i.tags||[]})),t++}}await Promise.all(e),Pt=[...n].sort()}async function bi(){return await fetchData}var Rt=!1;async function Ti(){Rt||(Z=await bi(),await ki(),Rt=!0)}async function Si(t){if(!Rt||!Z)return 0;let e=new Set(Pt),n=0;for(let r of Object.keys(t)){if(Z[r])continue;let i=t[r];if(!i)continue;let s=Ht.length;Ht[s]=r,Z[r]=i;for(let u of i.tags||[])e.add(u);await le.addAsync(s,{id:s,slug:r,title:i.title||\"\",content:i.content||\"\",tags:i.tags||[]}),n++}return Pt=[...e].sort(),n}document.addEventListener(\"content-index-updated\",t=>{let e=t.detail;if(!Rt||!Z)return;let n=e?.slugs;!Array.isArray(n)||n.length===0||(async()=>{try{let r=await fetchData;if(!r||typeof r!=\"object\")return;let i=r.content&&typeof r.content==\"object\"?r.content:r,s={};for(let u of n){let o=i[u];o&&typeof o==\"object\"&&(s[u]=o)}await Si(s)}catch{}})()});function Li(){let t=sessionStorage.getItem(\"search-term\");t&&(sessionStorage.removeItem(\"search-term\"),requestAnimationFrame(()=>{let e=document.querySelectorAll(\".popover-hint p, .popover-hint li, .popover-hint h1, .popover-hint h2, .popover-hint h3, .popover-hint h4, .popover-hint h5, .popover-hint h6, .popover-hint td, .popover-hint th, .popover-hint blockquote, article p, article li, article h1, article h2, article h3\");for(let n of Array.from(e)){let i=(n.textContent??\"\").toLowerCase().indexOf(t.toLowerCase());if(i===-1)continue;let s=document.createTreeWalker(n,NodeFilter.SHOW_TEXT),u=0,o,l=null,c=0,f=null,h=0;for(;o=s.nextNode();){let g=o.nodeValue?.length??0;if(!l&&u+g>i&&(l=o,c=i-u),l&&u+g>=i+t.length){f=o,h=i+t.length-u;break}u+=g}if(!(!l||!f)){try{let g=document.createRange();g.setStart(l,c),g.setEnd(f,h);let a=document.createElement(\"span\");a.className=\"search-scroll-target\",g.surroundContents(a),a.scrollIntoView({block:\"center\",behavior:\"smooth\"}),setTimeout(()=>{a.classList.add(\"fade-out\"),setTimeout(()=>{let D=a.parentNode;D&&(D.replaceChild(document.createTextNode(a.textContent||\"\"),a),D.normalize())},1e3)},2e3)}catch{n.scrollIntoView({block:\"center\",behavior:\"smooth\"})}break}}}))}async function Mn(){Ai(),await Ti(),await wi(),Li()}document.addEventListener(\"nav\",Mn);document.addEventListener(\"render\",Mn);\n","/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { NULL } from '../constants';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw the error that was caught (except\n * for unmounting when this parameter is the highest parent that was being\n * unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component,\n\t\t/** @type {import('../internal').ComponentType} */\n\t\tctor,\n\t\t/** @type {boolean} */\n\t\thandled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != NULL) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != NULL) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { MODE_HYDRATE, NULL } from './constants';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function BaseComponent(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nBaseComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != NULL && this._nextState != this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == NULL) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nBaseComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](https://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {ComponentChildren | void}\n */\nBaseComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == NULL) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._index + 1)\n\t\t\t: NULL;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != NULL && sibling._dom != NULL) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : NULL;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tif (component._parentDom && component._dirty) {\n\t\tlet oldVNode = component._vnode,\n\t\t\toldDom = oldVNode._dom,\n\t\t\tcommitQueue = [],\n\t\t\trefQueue = [],\n\t\t\tnewVNode = assign({}, oldVNode);\n\t\tnewVNode._original = oldVNode._original + 1;\n\t\tif (options.vnode) options.vnode(newVNode);\n\n\t\tdiff(\n\t\t\tcomponent._parentDom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tcomponent._parentDom.namespaceURI,\n\t\t\toldVNode._flags & MODE_HYDRATE ? [oldDom] : NULL,\n\t\t\tcommitQueue,\n\t\t\toldDom == NULL ? getDomSibling(oldVNode) : oldDom,\n\t\t\t!!(oldVNode._flags & MODE_HYDRATE),\n\t\t\trefQueue\n\t\t);\n\n\t\tnewVNode._original = oldVNode._original;\n\t\tnewVNode._parent._children[newVNode._index] = newVNode;\n\t\tcommitRoot(commitQueue, newVNode, refQueue);\n\t\toldVNode._dom = oldVNode._parent = null;\n\n\t\tif (newVNode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(newVNode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != NULL && vnode._component != NULL) {\n\t\tvnode._dom = vnode._component.base = NULL;\n\t\tvnode._children.some(child => {\n\t\t\tif (child != NULL && child._dom != NULL) {\n\t\t\t\treturn (vnode._dom = vnode._component.base = child._dom);\n\t\t\t}\n\t\t});\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce != options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\ttry {\n\t\tlet c,\n\t\t\tl = 1;\n\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\twhile (rerenderQueue.length) {\n\t\t\t// Keep the rerender queue sorted by (depth, insertion order). The queue\n\t\t\t// will initially be sorted on the first iteration only if it has more than 1 item.\n\t\t\t//\n\t\t\t// New items can be added to the queue e.g. when rerendering a provider, so we want to\n\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t// single pass\n\t\t\tif (rerenderQueue.length > l) {\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\n\t\t\tc = rerenderQueue.shift();\n\t\t\tl = rerenderQueue.length;\n\n\t\t\trenderComponent(c);\n\t\t}\n\t} finally {\n\t\trerenderQueue.length = process._rerenderCount = 0;\n\t}\n}\n\nprocess._rerenderCount = 0;\n","import { IS_NON_DIMENSIONAL, NULL, SVG_NAMESPACE } from '../constants';\nimport options from '../options';\n\n// Per-instance unique key for event clock stamps. Each Preact copy on the page\n// gets its own random suffix so that `_dispatched` / `_attached` properties on\n// shared event objects and handler functions cannot collide across instances.\n// ~1 in 60M collision odds - if you have that many praect versions on the page,\n// you deserve some weird bugs.\n// In 11 we can replace this with a\n// Symbol\nlet _id = Math.random().toString(8),\n\tEVENT_DISPATCHED = '__d' + _id,\n\tEVENT_ATTACHED = '__a' + _id;\n\nfunction setStyle(style, key, value) {\n\tif (key[0] == '-') {\n\t\tstyle.setProperty(key, value == NULL ? '' : value);\n\t} else if (value == NULL) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\nconst CAPTURE_REGEX = /(PointerCapture)$|Capture$/i;\n\n// A logical clock to solve issues like https://github.com/preactjs/preact/issues/3927.\n// When the DOM performs an event it leaves micro-ticks in between bubbling up which means that\n// an event can trigger on a newly reated DOM-node while the event bubbles up.\n//\n// Originally inspired by Vue\n// (https://github.com/vuejs/core/blob/caeb8a68811a1b0f79/packages/runtime-dom/src/modules/events.ts#L90-L101),\n// but modified to use a logical clock instead of Date.now() in case event handlers get attached\n// and events get dispatched during the same millisecond.\n//\n// The clock is incremented after each new event dispatch. This allows 1 000 000 new events\n// per second for over 280 years before the value reaches Number.MAX_SAFE_INTEGER (2**53 - 1).\nlet eventClock = 0;\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {string} namespace Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, namespace) {\n\tlet useCapture;\n\n\to: if (name == 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] != oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] == 'o' && name[1] == 'n') {\n\t\tuseCapture = name != (name = name.replace(CAPTURE_REGEX, '$1'));\n\t\tconst lowerCaseName = name.toLowerCase();\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (lowerCaseName in dom || name == 'onFocusOut' || name == 'onFocusIn')\n\t\t\tname = lowerCaseName.slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue[EVENT_ATTACHED] = eventClock;\n\t\t\t\tdom.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\t\tuseCapture\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvalue[EVENT_ATTACHED] = oldValue[EVENT_ATTACHED];\n\t\t\t}\n\t\t} else {\n\t\t\tdom.removeEventListener(\n\t\t\t\tname,\n\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\tuseCapture\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (namespace == SVG_NAMESPACE) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname != 'width' &&\n\t\t\tname != 'height' &&\n\t\t\tname != 'href' &&\n\t\t\tname != 'list' &&\n\t\t\tname != 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname != 'tabIndex' &&\n\t\t\tname != 'download' &&\n\t\t\tname != 'rowSpan' &&\n\t\t\tname != 'colSpan' &&\n\t\t\tname != 'role' &&\n\t\t\tname != 'popover' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == NULL ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value == 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != NULL && (value !== false || name[4] == '-')) {\n\t\t\tdom.setAttribute(name, name == 'popover' && value == true ? '' : value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Create an event proxy function.\n * @param {boolean} useCapture Is the event handler for the capture phase.\n * @private\n */\nfunction createEventProxy(useCapture) {\n\t/**\n\t * Proxy an event to hooked event handlers\n\t * @param {import('../internal').PreactEvent} e The event object from the browser\n\t * @private\n\t */\n\treturn function (e) {\n\t\tif (this._listeners) {\n\t\t\tconst eventHandler = this._listeners[e.type + useCapture];\n\t\t\tif (e[EVENT_DISPATCHED] == NULL) {\n\t\t\t\te[EVENT_DISPATCHED] = eventClock++;\n\n\t\t\t\t// When `e[EVENT_DISPATCHED]` is smaller than the time when the targeted event\n\t\t\t\t// handler was attached we know we have bubbled up to an element that was added\n\t\t\t\t// during patching the DOM.\n\t\t\t} else if (e[EVENT_DISPATCHED] < eventHandler[EVENT_ATTACHED]) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn eventHandler(options.event ? options.event(e) : e);\n\t\t}\n\t};\n}\n\nconst eventProxy = createEventProxy(false);\nconst eventProxyCapture = createEventProxy(true);\n","import { enqueueRender } from './component';\nimport { NULL } from './constants';\n\nexport let i = 0;\n\nexport function createContext(defaultValue) {\n\tfunction Context(props) {\n\t\tif (!this.getChildContext) {\n\t\t\t/** @type {Set | null} */\n\t\t\tlet subs = new Set();\n\t\t\tlet ctx = {};\n\t\t\tctx[Context._id] = this;\n\n\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\tthis.componentWillUnmount = () => {\n\t\t\t\tsubs = NULL;\n\t\t\t};\n\n\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t// @ts-expect-error even\n\t\t\t\tif (this.props.value != _props.value) {\n\t\t\t\t\tsubs.forEach(c => {\n\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.sub = c => {\n\t\t\t\tsubs.add(c);\n\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\tif (subs) {\n\t\t\t\t\t\tsubs.delete(c);\n\t\t\t\t\t}\n\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\treturn props.children;\n\t}\n\n\tContext._id = '__cC' + i++;\n\tContext._defaultValue = defaultValue;\n\n\t/** @type {import('./internal').FunctionComponent} */\n\tContext.Consumer = (props, contextValue) => {\n\t\treturn props.children(contextValue);\n\t};\n\n\t// we could also get rid of _contextRef entirely\n\tContext.Provider =\n\t\tContext._contextRef =\n\t\tContext.Consumer.contextType =\n\t\t\tContext;\n\n\treturn Context;\n}\n","import { options, Fragment } from 'preact';\nimport { encodeEntities } from './utils';\nimport { IS_NON_DIMENSIONAL } from '../../src/constants';\n\nlet vnodeId = 0;\n\nconst isArray = Array.isArray;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {unknown} [isStaticChildren]\n * @param {unknown} [__source]\n * @param {unknown} [__self]\n */\nfunction createVNode(type, props, key, isStaticChildren, __source, __self) {\n\tif (!props) props = {};\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = props,\n\t\tref,\n\t\ti;\n\n\tif ('ref' in normalizedProps) {\n\t\tnormalizedProps = {};\n\t\tfor (i in props) {\n\t\t\tif (i == 'ref') {\n\t\t\t\tref = props[i];\n\t\t\t} else {\n\t\t\t\tnormalizedProps[i] = props[i];\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @type {VNode & { __source: any; __self: any }} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_component: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t_index: -1,\n\t\t_flags: 0,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\n/**\n * Create a template vnode. This function is not expected to be\n * used directly, but rather through a precompile JSX transform\n * @param {string[]} templates\n * @param {Array} exprs\n * @returns {VNode}\n */\nfunction jsxTemplate(templates, ...exprs) {\n\tconst vnode = createVNode(Fragment, { tpl: templates, exprs });\n\t// Bypass render to string top level Fragment optimization\n\tvnode.key = vnode._vnode;\n\treturn vnode;\n}\n\nconst JS_TO_CSS = {};\nconst CSS_REGEX = /[A-Z]/g;\n\n/**\n * Unwrap potential signals.\n * @param {*} value\n * @returns {*}\n */\nfunction normalizeAttrValue(value) {\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.valueOf === 'function'\n\t\t? value.valueOf()\n\t\t: value;\n}\n\n/**\n * Serialize an HTML attribute to a string. This function is not\n * expected to be used directly, but rather through a precompile\n * JSX transform\n * @param {string} name The attribute name\n * @param {*} value The attribute value\n * @returns {string}\n */\nfunction jsxAttr(name, value) {\n\tif (options.attr) {\n\t\tconst result = options.attr(name, value);\n\t\tif (typeof result === 'string') return result;\n\t}\n\n\tvalue = normalizeAttrValue(value);\n\n\tif (name === 'ref' || name === 'key') return '';\n\tif (name === 'style' && typeof value === 'object') {\n\t\tlet str = '';\n\t\tfor (let prop in value) {\n\t\t\tlet val = value[prop];\n\t\t\tif (val != null && val !== '') {\n\t\t\t\tconst name =\n\t\t\t\t\tprop[0] == '-'\n\t\t\t\t\t\t? prop\n\t\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t\t\t(JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());\n\n\t\t\t\tlet suffix = ';';\n\t\t\t\tif (\n\t\t\t\t\ttypeof val === 'number' &&\n\t\t\t\t\t// Exclude custom-attributes\n\t\t\t\t\t!name.startsWith('--') &&\n\t\t\t\t\t!IS_NON_DIMENSIONAL.test(name)\n\t\t\t\t) {\n\t\t\t\t\tsuffix = 'px;';\n\t\t\t\t}\n\t\t\t\tstr = str + name + ':' + val + suffix;\n\t\t\t}\n\t\t}\n\t\treturn name + '=\"' + encodeEntities(str) + '\"';\n\t}\n\n\tif (\n\t\tvalue == null ||\n\t\tvalue === false ||\n\t\ttypeof value === 'function' ||\n\t\ttypeof value === 'object'\n\t) {\n\t\treturn '';\n\t} else if (value === true) return name;\n\n\treturn name + '=\"' + encodeEntities('' + value) + '\"';\n}\n\n/**\n * Escape a dynamic child passed to `jsxTemplate`. This function\n * is not expected to be used directly, but rather through a\n * precompile JSX transform\n * @param {*} value\n * @returns {string | null | VNode | Array}\n */\nfunction jsxEscape(value) {\n\tif (\n\t\tvalue == null ||\n\t\ttypeof value === 'boolean' ||\n\t\ttypeof value === 'function'\n\t) {\n\t\treturn null;\n\t}\n\n\tif (typeof value === 'object') {\n\t\t// Check for VNode\n\t\tif (value.constructor === undefined) return value;\n\n\t\tif (isArray(value)) {\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tvalue[i] = jsxEscape(value[i]);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}\n\n\treturn encodeEntities('' + value);\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment,\n\t// precompiled JSX transform\n\tjsxTemplate,\n\tjsxAttr,\n\tjsxEscape\n};\n","import type {\n QuartzComponent,\n QuartzComponentProps,\n QuartzComponentConstructor,\n} from \"@quartz-community/types\";\nimport { classNames } from \"../util/lang\";\nimport { i18n } from \"../i18n\";\nimport style from \"./styles/search.scss\";\n// @ts-expect-error - inline script imported as string by esbuild loader\nimport script from \"./scripts/search.inline.ts\";\n\nexport type SearchField = \"title\" | \"content\" | \"tags\";\n\nexport interface SearchOptions {\n enablePreview: boolean;\n fieldPriority: SearchField[];\n}\n\nconst defaultOptions: SearchOptions = {\n enablePreview: true,\n fieldPriority: [\"title\", \"content\", \"tags\"],\n};\n\nexport default ((userOpts?: Partial) => {\n const Search: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {\n const opts = { ...defaultOptions, ...userOpts };\n const locale = cfg.locale ?? \"en-US\";\n const searchPlaceholder = i18n(locale).components.search.searchBarPlaceholder;\n\n return (\n
    \n \n \n Search\n \n \n \n \n \n

    {i18n(locale).components.search.title}

    \n \n
    \n
    \n \n
    \n
    \n
    \n \n );\n };\n\n Search.afterDOMLoaded = script;\n Search.css = style;\n\n return Search;\n}) satisfies QuartzComponentConstructor;\n"]} \ No newline at end of file +{"version":3,"sources":["../node_modules/@quartz-community/utils/src/lang.ts","../src/i18n/locales/en-US.ts","../src/i18n/locales/ar-SA.ts","../src/i18n/locales/ca-ES.ts","../src/i18n/locales/cs-CZ.ts","../src/i18n/locales/de-DE.ts","../src/i18n/locales/en-GB.ts","../src/i18n/locales/es-ES.ts","../src/i18n/locales/fa-IR.ts","../src/i18n/locales/fi-FI.ts","../src/i18n/locales/fr-FR.ts","../src/i18n/locales/he-IL.ts","../src/i18n/locales/hu-HU.ts","../src/i18n/locales/id-ID.ts","../src/i18n/locales/it-IT.ts","../src/i18n/locales/ja-JP.ts","../src/i18n/locales/kk-KZ.ts","../src/i18n/locales/ko-KR.ts","../src/i18n/locales/lt-LT.ts","../src/i18n/locales/nb-NO.ts","../src/i18n/locales/nl-NL.ts","../src/i18n/locales/pl-PL.ts","../src/i18n/locales/pt-BR.ts","../src/i18n/locales/ro-RO.ts","../src/i18n/locales/ru-RU.ts","../src/i18n/locales/th-TH.ts","../src/i18n/locales/tr-TR.ts","../src/i18n/locales/uk-UA.ts","../src/i18n/locales/vi-VN.ts","../src/i18n/locales/zh-CN.ts","../src/i18n/locales/zh-TW.ts","../src/i18n/index.ts","../src/components/styles/search.scss","../src/components/scripts/search.inline.ts","../node_modules/preact/src/constants.js","../node_modules/preact/src/options.js","../node_modules/preact/src/diff/catch-error.js","../node_modules/preact/src/component.js","../node_modules/preact/src/diff/props.js","../node_modules/preact/src/create-context.js","../node_modules/preact/jsx-runtime/src/index.js","../src/components/Search.tsx"],"names":["options","__e","error","vnode","oldVNode","errorInfo","component","ctor","handled","__","__c","constructor","getDerivedStateFromError","setState","__d","componentDidCatch","__E","e","Promise","prototype","then","bind","resolve","setTimeout","Math","random","toString","vnodeId","createVNode","type","props","key","isStaticChildren","__source","__self","ref","i","norm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SACf;AAAA,wBACAA,EAAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,eAAA;AAAA,YACN,gBAAc,IAAA,CAAK,aAAA;AAAA,YACnB,qBAAA,EAAqB,IAAA,CAAK,SAAA,CAAU,IAAA,CAAK,aAAa;AAAA;AAAA;AACvD,OAAA,EACH,CAAA,EACF;AAAA,KAAA,EACF,CAAA;AAAA,EAEJ,CAAA;AAEA,EAAA,MAAA,CAAO,cAAA,GAAiB,qBAAA;AACxB,EAAA,MAAA,CAAO,GAAA,GAAM,cAAA;AAEb,EAAA,OAAO,MAAA;AACT,CAAA","file":"index.js","sourcesContent":["export function capitalize(s: string): string {\n return s.substring(0, 1).toUpperCase() + s.substring(1);\n}\n\nexport function classNames(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n","export default {\n components: {\n search: {\n title: \"Search\",\n searchBarPlaceholder: \"Search for something...\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"بحث\",\n searchBarPlaceholder: \"ابحث عن شيء ما\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Cercar\",\n searchBarPlaceholder: \"Cerca alguna cosa\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Hledat\",\n searchBarPlaceholder: \"Hledejte něco\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Suche\",\n searchBarPlaceholder: \"Suche nach etwas...\",\n noResults: \"Keine Ergebnisse.\",\n noResultsHint: \"Versuchen Sie einen anderen Suchbegriff?\",\n tagFilterHint: \"Nach Tag filtern\",\n noTagsFound: \"Keine passenden Tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Search\",\n searchBarPlaceholder: \"Search for something\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Buscar\",\n searchBarPlaceholder: \"Buscar algo...\",\n noResults: \"Sin resultados.\",\n noResultsHint: \"\\u00bfIntentar con otro t\\u00e9rmino de b\\u00fasqueda?\",\n tagFilterHint: \"Filtrar por etiqueta\",\n noTagsFound: \"No se encontraron etiquetas\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"جستجو\",\n searchBarPlaceholder: \"مطلبی را جستجو کنید\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Haku\",\n searchBarPlaceholder: \"Hae jotain\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Recherche\",\n searchBarPlaceholder: \"Rechercher quelque chose...\",\n noResults: \"Aucun r\\u00e9sultat.\",\n noResultsHint: \"Essayez un autre terme de recherche\\u00a0?\",\n tagFilterHint: \"Filtrer par tag\",\n noTagsFound: \"Aucun tag correspondant\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"חיפוש\",\n searchBarPlaceholder: \"חפשו משהו\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Keresés\",\n searchBarPlaceholder: \"Keress valamire\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Cari\",\n searchBarPlaceholder: \"Cari sesuatu\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Cerca\",\n searchBarPlaceholder: \"Cerca qualcosa\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"\\u691c\\u7d22\",\n searchBarPlaceholder: \"\\u4f55\\u304b\\u3092\\u691c\\u7d22...\",\n noResults: \"\\u7d50\\u679c\\u304c\\u898b\\u3064\\u304b\\u308a\\u307e\\u305b\\u3093\\u3002\",\n noResultsHint:\n \"\\u5225\\u306e\\u691c\\u7d22\\u8a9e\\u3092\\u304a\\u8a66\\u3057\\u304f\\u3060\\u3055\\u3044\\u3002\",\n tagFilterHint: \"\\u30bf\\u30b0\\u3067\\u30d5\\u30a3\\u30eb\\u30bf\\u30fc\",\n noTagsFound: \"\\u4e00\\u81f4\\u3059\\u308b\\u30bf\\u30b0\\u304c\\u3042\\u308a\\u307e\\u305b\\u3093\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Іздеу\",\n searchBarPlaceholder: \"Бірдеңе іздеу\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"검색\",\n searchBarPlaceholder: \"검색어를 입력하세요\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Paieška\",\n searchBarPlaceholder: \"Ieškoti\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Søk\",\n searchBarPlaceholder: \"Søk etter noe\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Zoeken\",\n searchBarPlaceholder: \"Doorzoek de website\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Szukaj\",\n searchBarPlaceholder: \"Wpisz frazę wyszukiwania\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Pesquisar\",\n searchBarPlaceholder: \"Pesquisar por algo\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Căutare\",\n searchBarPlaceholder: \"Introduceți termenul de căutare...\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Поиск\",\n searchBarPlaceholder: \"Найти что-нибудь\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"ค้นหา\",\n searchBarPlaceholder: \"ค้นหาบางอย่าง\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Arama\",\n searchBarPlaceholder: \"Bir şey arayın\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Пошук\",\n searchBarPlaceholder: \"Шукати щось\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"Tìm\",\n searchBarPlaceholder: \"Tìm kiếm thông tin\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"\\u641c\\u7d22\",\n searchBarPlaceholder: \"\\u641c\\u7d22\\u5185\\u5bb9...\",\n noResults: \"\\u6ca1\\u6709\\u7ed3\\u679c\\u3002\",\n noResultsHint: \"\\u8bf7\\u5c1d\\u8bd5\\u5176\\u4ed6\\u641c\\u7d22\\u8bcd\\u3002\",\n tagFilterHint: \"\\u6309\\u6807\\u7b7e\\u7b5b\\u9009\",\n noTagsFound: \"\\u6ca1\\u6709\\u5339\\u914d\\u7684\\u6807\\u7b7e\",\n },\n },\n};\n","export default {\n components: {\n search: {\n title: \"搜尋\",\n searchBarPlaceholder: \"搜尋些什麼\",\n noResults: \"No results.\",\n noResultsHint: \"Try another search term?\",\n tagFilterHint: \"Filter by tag\",\n noTagsFound: \"No matching tags\",\n },\n },\n};\n","import enUS from \"./locales/en-US\";\nimport arSA from \"./locales/ar-SA\";\nimport caES from \"./locales/ca-ES\";\nimport csCZ from \"./locales/cs-CZ\";\nimport deDE from \"./locales/de-DE\";\nimport enGB from \"./locales/en-GB\";\nimport esES from \"./locales/es-ES\";\nimport faIR from \"./locales/fa-IR\";\nimport fiFI from \"./locales/fi-FI\";\nimport frFR from \"./locales/fr-FR\";\nimport heIL from \"./locales/he-IL\";\nimport huHU from \"./locales/hu-HU\";\nimport idID from \"./locales/id-ID\";\nimport itIT from \"./locales/it-IT\";\nimport jaJP from \"./locales/ja-JP\";\nimport kkKZ from \"./locales/kk-KZ\";\nimport koKR from \"./locales/ko-KR\";\nimport ltLT from \"./locales/lt-LT\";\nimport nbNO from \"./locales/nb-NO\";\nimport nlNL from \"./locales/nl-NL\";\nimport plPL from \"./locales/pl-PL\";\nimport ptBR from \"./locales/pt-BR\";\nimport roRO from \"./locales/ro-RO\";\nimport ruRU from \"./locales/ru-RU\";\nimport thTH from \"./locales/th-TH\";\nimport trTR from \"./locales/tr-TR\";\nimport ukUA from \"./locales/uk-UA\";\nimport viVN from \"./locales/vi-VN\";\nimport zhCN from \"./locales/zh-CN\";\nimport zhTW from \"./locales/zh-TW\";\n\nconst locales: Record = {\n \"en-US\": enUS,\n \"ar-SA\": arSA,\n \"ca-ES\": caES,\n \"cs-CZ\": csCZ,\n \"de-DE\": deDE,\n \"en-GB\": enGB,\n \"es-ES\": esES,\n \"fa-IR\": faIR,\n \"fi-FI\": fiFI,\n \"fr-FR\": frFR,\n \"he-IL\": heIL,\n \"hu-HU\": huHU,\n \"id-ID\": idID,\n \"it-IT\": itIT,\n \"ja-JP\": jaJP,\n \"kk-KZ\": kkKZ,\n \"ko-KR\": koKR,\n \"lt-LT\": ltLT,\n \"nb-NO\": nbNO,\n \"nl-NL\": nlNL,\n \"pl-PL\": plPL,\n \"pt-BR\": ptBR,\n \"ro-RO\": roRO,\n \"ru-RU\": ruRU,\n \"th-TH\": thTH,\n \"tr-TR\": trTR,\n \"uk-UA\": ukUA,\n \"vi-VN\": viVN,\n \"zh-CN\": zhCN,\n \"zh-TW\": zhTW,\n};\n\nexport function i18n(locale: string) {\n return locales[locale] || enUS;\n}\n",".search {\n min-width: fit-content;\n max-width: 14rem;\n}\n\n@media all and (max-width: 800px) {\n .search {\n flex-grow: 0.3;\n }\n}\n.search > .search-button {\n background-color: transparent;\n border: 1px var(--lightgray) solid;\n border-radius: 4px;\n font-family: inherit;\n font-size: inherit;\n height: 2rem;\n padding: 0 1rem 0 0;\n display: flex;\n align-items: center;\n text-align: inherit;\n cursor: pointer;\n white-space: nowrap;\n width: 100%;\n}\n\n.search > .search-button > p {\n display: inline;\n color: var(--gray);\n text-wrap: unset;\n}\n\n.search > .search-button svg {\n cursor: pointer;\n width: 18px;\n min-width: 18px;\n margin: 0 0.5rem;\n}\n\n.search > .search-button svg .search-path {\n stroke: var(--darkgray);\n stroke-width: 1.5px;\n transition: stroke 0.5s ease;\n}\n\n.search > .search-container {\n position: fixed;\n contain: layout;\n z-index: var(--search-z-index, 999);\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n overflow-y: auto;\n display: none;\n backdrop-filter: blur(4px);\n}\n\n.search > .search-container.active {\n display: inline-block;\n}\n\n.search > .search-container > .search-space {\n width: 65%;\n margin-top: 12vh;\n margin-left: auto;\n margin-right: auto;\n}\n\n@media all and not (min-width: 1200px) {\n .search > .search-container > .search-space {\n width: 90%;\n }\n}\n.search > .search-container > .search-space > *:not(.ghost-text):not(.tag-suggestions) {\n width: 100%;\n border-radius: 7px;\n background: var(--light);\n box-shadow: 0 14px 50px rgba(27, 33, 48, 0.12), 0 10px 30px rgba(27, 33, 48, 0.16);\n margin-bottom: 2em;\n}\n\n.search > .search-container > .search-space > input {\n box-sizing: border-box;\n padding: 0.5em 1em;\n font-family: var(--bodyFont);\n color: var(--dark);\n font-size: 1.1em;\n border: 1px solid var(--lightgray);\n}\n\n.search > .search-container > .search-space > input:focus {\n outline: none;\n}\n\n.search > .search-container > .search-space > .search-layout {\n display: none;\n flex-direction: row;\n border: 1px solid var(--lightgray);\n flex: 0 0 100%;\n box-sizing: border-box;\n}\n\n.search > .search-container > .search-space > .search-layout.display-results {\n display: flex;\n}\n\n.search > .search-container > .search-space > .search-layout[data-preview] > .results-container {\n flex: 0 0 min(30%, 450px);\n}\n\n@media all and not (max-width: 800px) {\n .search > .search-container > .search-space > .search-layout[data-preview] .result-card > p.card-description {\n display: none;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > div:first-child {\n border-right: 1px solid var(--lightgray);\n border-top-right-radius: unset;\n border-bottom-right-radius: unset;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > div:last-child {\n border-top-left-radius: unset;\n border-bottom-left-radius: unset;\n }\n}\n.search > .search-container > .search-space > .search-layout > div {\n height: 63vh;\n border-radius: 5px;\n}\n\n@media all and (max-width: 800px) {\n .search > .search-container > .search-space > .search-layout {\n flex-direction: column;\n }\n .search > .search-container > .search-space > .search-layout > .preview-container {\n display: none !important;\n }\n .search > .search-container > .search-space > .search-layout[data-preview] > .results-container {\n width: 100%;\n height: auto;\n max-height: 60vh;\n flex: 0 0 100%;\n }\n}\n.search > .search-container > .search-space > .search-layout .highlight {\n background: color-mix(in srgb, var(--tertiary) 60%, rgba(255, 255, 255, 0));\n border-radius: 5px;\n scroll-margin-top: 2rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container {\n flex-grow: 1;\n display: block;\n overflow: hidden;\n font-family: inherit;\n color: var(--dark);\n line-height: 1.5em;\n font-weight: 400;\n overflow-y: auto;\n padding: 0 2rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container .preview-inner {\n margin: 0 auto;\n width: 100%;\n}\n\n.search > .search-container > .search-space > .search-layout > .preview-container a[role=anchor] {\n background-color: transparent;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container {\n overflow-y: auto;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card {\n overflow: hidden;\n padding: 1em;\n cursor: pointer;\n transition: background 0.2s ease;\n border-bottom: 1px solid var(--lightgray);\n width: 100%;\n display: block;\n box-sizing: border-box;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n text-transform: none;\n text-align: left;\n outline: none;\n font-weight: inherit;\n text-decoration: none;\n color: var(--dark);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card:hover,\n.search > .search-container > .search-space > .search-layout > .results-container .result-card:focus,\n.search > .search-container > .search-space > .search-layout > .results-container .result-card.focus {\n background: var(--lightgray);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > h3 {\n margin: 0;\n color: var(--secondary);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul.tags {\n margin-top: 0.45rem;\n margin-bottom: 0;\n padding: 0;\n list-style: none;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul.tags > li {\n display: inline-block;\n margin-right: 0.3rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul > li > p {\n border-radius: 8px;\n background-color: var(--highlight);\n padding: 0.2rem 0.4rem;\n margin: 0;\n line-height: 1.4rem;\n font-weight: 700;\n color: var(--secondary);\n font-size: 0.85rem;\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > ul > li > p.match-tag {\n color: var(--tertiary);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card > p {\n margin-bottom: 0;\n margin-top: 0.5em;\n font-size: 0.9em;\n color: var(--gray);\n}\n\n.search > .search-container > .search-space > .search-layout > .results-container .result-card.no-match {\n cursor: default;\n}\n\n.search > .search-container > .search-space {\n position: relative;\n}\n\n.search > .search-container > .search-space > .ghost-text {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n pointer-events: none;\n box-sizing: border-box;\n padding: 0.5em 1em;\n font-family: var(--bodyFont);\n font-size: 1.1em;\n color: var(--gray);\n opacity: 0.6;\n white-space: pre;\n overflow: hidden;\n height: auto;\n line-height: normal;\n border: 1px solid transparent;\n}\n\n.search > .search-container > .search-space > .tag-suggestions {\n position: absolute;\n top: calc(3.1em + 2px);\n left: 0;\n right: 0;\n z-index: calc(var(--search-z-index, 999) + 1);\n background: var(--light);\n border: 1px solid var(--lightgray);\n border-radius: 5px;\n box-shadow: 0 4px 12px rgba(27, 33, 48, 0.1), 0 2px 6px rgba(27, 33, 48, 0.08);\n max-height: 240px;\n overflow-y: auto;\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item {\n padding: 0.4em 1em;\n cursor: pointer;\n font-family: var(--bodyFont);\n font-size: 0.95em;\n color: var(--dark);\n transition: background 0.15s ease;\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item:hover,\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item.active {\n background: var(--lightgray);\n}\n\n.search > .search-container > .search-space > .tag-suggestions > .tag-suggestion-item.active {\n color: var(--secondary);\n font-weight: 600;\n}\n\n.search-scroll-target {\n background: color-mix(in srgb, var(--tertiary) 40%, rgba(255, 255, 255, 0));\n border-radius: 3px;\n padding: 0.1em 0;\n transition: background 1s ease;\n}\n\n.search-scroll-target.fade-out {\n background: transparent;\n}","var Rn=Object.create;var Ne=Object.defineProperty;var Wn=Object.getOwnPropertyDescriptor;var Nn=Object.getOwnPropertyNames;var zn=Object.getPrototypeOf,On=Object.prototype.hasOwnProperty;var $n=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Kn=(t,e,n,r)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let i of Nn(e))!On.call(t,i)&&i!==n&&Ne(t,i,{get:()=>e[i],enumerable:!(r=Wn(e,i))||r.enumerable});return t};var Un=(t,e,n)=>(n=t!=null?Rn(zn(t)):{},Kn(e||!t||!t.__esModule?Ne(n,\"default\",{value:t,enumerable:!0}):n,t));var fe=$n(()=>{});var C;function O(t,e,n){let r=typeof n,i=typeof t;if(r!==\"undefined\"){if(i!==\"undefined\"){if(n){if(i===\"function\"&&r===i)return function(o){return t(n(o))};if(e=t.constructor,e===n.constructor){if(e===Array)return n.concat(t);if(e===Map){var s=new Map(n);for(var u of t)s.set(u[0],u[1]);return s}if(e===Set){u=new Set(n);for(s of t.values())u.add(s);return u}}}return t}return n}return i===\"undefined\"?e:t}function Ct(t,e){return typeof t>\"u\"?e:t}function R(){return Object.create(null)}function U(t){return typeof t==\"string\"}function Lt(t){return typeof t==\"object\"}function Mt(t,e){if(U(e))t=t[e];else for(let n=0;t&&n1?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&&dt(this),this)};C.addMatcher=function(t,e){return typeof t==\"object\"?this.addReplacer(t,e):t.length<2&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?\"|\":\"\")+t,this.J=null,this.cache&&dt(this),this)};C.addReplacer=function(t,e){return typeof t==\"string\"?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&&dt(this),this)};C.encode=function(t,e){if(this.cache&&t.length<=this.H)if(this.F){if(this.B.has(t))return this.B.get(t)}else this.F=setTimeout(dt,50,this);this.normalize&&(typeof this.normalize==\"function\"?t=this.normalize(t):t=ze?t.normalize(\"NFKD\").replace(ze,\"\").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&t.length>3&&(t=t.replace(Xn,\"$1 $2\").replace(Zn,\"$1 $2\").replace(Jn,\"$1 \"));let n=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer),r=[],i=R(),s,u,o=this.split||this.split===\"\"?t.split(this.split):[t];for(let c=0,f,h;cthis.maxlength)){if(e){if(i[f])continue;i[f]=1}else{if(s===f)continue;s=f}if(n)r.push(f);else if(!this.filter||(typeof this.filter==\"function\"?this.filter(f):!this.filter.has(f))){if(this.cache&&f.length<=this.I)if(this.F){var l=this.D.get(f);if(l||l===\"\"){l&&r.push(l);continue}}else this.F=setTimeout(dt,50,this);if(this.stemmer){this.K||(this.K=new RegExp(\"(?!^)(\"+this.A+\")$\"));let g;for(;g!==f&&f.length>2;)g=f,f=f.replace(this.K,a=>this.stemmer.get(a))}if(f&&(this.mapper||this.dedupe&&f.length>1)){l=\"\";for(let g=0,a=\"\",D,p;g1&&(this.J||(this.J=new RegExp(\"(\"+this.h+\")\",\"g\")),f=f.replace(this.J,g=>this.matcher.get(g))),f&&this.replacer)for(l=0;f&&lthis.L&&(this.D.clear(),this.I=this.I/1.1|0)),f){if(f!==h)if(e){if(i[f])continue;i[f]=1}else{if(u===f)continue;u=f}r.push(f)}}}return this.finalize&&(r=this.finalize(r)||r),this.cache&&t.length<=this.H&&(this.B.set(t,r),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),r};function dt(t){t.F=null,t.B.clear(),t.D.clear()}function Fe(t,e,n){n||(e||typeof t!=\"object\"?typeof e==\"object\"&&(n=e,e=0):n=t),n&&(t=n.query||t,e=n.limit||e);let r=\"\"+(e||0);n&&(r+=(n.offset||0)+!!n.context+!!n.suggest+(n.resolve!==!1)+(n.resolution||this.resolution)+(n.boost||0)),t=(\"\"+t).toLowerCase(),this.cache||(this.cache=new Ft);let i=this.cache.get(t+r);if(!i){let s=n&&n.cache;s&&(n.cache=!1),i=this.search(t,e,n),s&&(n.cache=s),this.cache.set(t+r,i)}return i}function Ft(t){this.limit=t&&t!==!0?t:1e3,this.cache=new Map,this.h=\"\"}Ft.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)};Ft.prototype.get=function(t){let e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e};Ft.prototype.remove=function(t){for(let e of this.cache){let n=e[0];e[1].includes(t)&&this.cache.delete(n)}};Ft.prototype.clear=function(){this.cache.clear(),this.h=\"\"};var Oe={normalize:!1,numeric:!1,dedupe:!1},Ot={},ae=new Map([[\"b\",\"p\"],[\"v\",\"f\"],[\"w\",\"f\"],[\"z\",\"s\"],[\"x\",\"s\"],[\"d\",\"t\"],[\"n\",\"m\"],[\"c\",\"k\"],[\"g\",\"k\"],[\"j\",\"k\"],[\"q\",\"k\"],[\"i\",\"e\"],[\"y\",\"e\"],[\"u\",\"o\"]]),$e=new Map([[\"ae\",\"a\"],[\"oe\",\"o\"],[\"sh\",\"s\"],[\"kh\",\"k\"],[\"th\",\"t\"],[\"ph\",\"f\"],[\"pf\",\"f\"]]),Ke=[/([^aeo])h(.)/g,\"$1$2\",/([aeo])h([^aeo]|$)/g,\"$1$2\",/(.)\\1+/g,\"$1\"],Ue={a:\"\",e:\"\",i:\"\",o:\"\",u:\"\",y:\"\",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,\\u00DF:2,d:3,t:3,l:4,m:5,n:5,r:6},_e={Exact:Oe,Default:Ot,Normalize:Ot,LatinBalance:{mapper:ae},LatinAdvanced:{mapper:ae,matcher:$e,replacer:Ke},LatinExtra:{mapper:ae,replacer:Ke.concat([/(?!^)[aeo]/g,\"\"]),matcher:$e},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let n=0;n=u.length)e-=u.length;else{e=u[r?\"splice\":\"slice\"](e,n);let o=e.length;if(o&&(i=i.length?i.concat(e):e,n-=o,r&&(t.length-=o),!n))break;e=0}return i}function xt(t){if(!this||this.constructor!==xt)return new xt(t);this.index=t?[t]:[],this.length=t?t.length:0;let e=this;return new Proxy([],{get(n,r){if(r===\"length\")return e.length;if(r===\"push\")return function(i){e.index[e.index.length-1].push(i),e.length++};if(r===\"pop\")return function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()};if(r===\"indexOf\")return function(i){let s=0;for(let u=0,o,l;u=0)return s+l;s+=o.length}return-1};if(r===\"includes\")return function(i){for(let s=0;s32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}V.prototype.get=function(t){let e=this.index[this.B(t)];return e&&e.get(t)};V.prototype.set=function(t,e){var n=this.B(t);let r=this.index[n];r?(n=r.size,r.set(t,e),(n-=r.size)&&this.size++):(this.index[n]=r=new Map([[t,e]]),this.h.push(r),this.size++)};function J(t=8){if(!this||this.constructor!==J)return new J(t);this.index=R(),this.h=[],this.size=0,t>32?(this.B=tn,this.A=BigInt(t)):(this.B=qe,this.A=t)}J.prototype.add=function(t){var e=this.B(t);let n=this.index[e];n?(e=n.size,n.add(t),(e-=n.size)&&this.size++):(this.index[e]=n=new Set([t]),this.h.push(n),this.size++)};C=V.prototype;C.has=J.prototype.has=function(t){let e=this.index[this.B(t)];return e&&e.has(t)};C.delete=J.prototype.delete=function(t){let e=this.index[this.B(t)];e&&e.delete(t)&&this.size--};C.clear=J.prototype.clear=function(){this.index=R(),this.h=[],this.size=0};C.values=J.prototype.values=function*(){for(let t=0;t=this.priority*this.priority*3):(ge=setTimeout(Yn,0),Je=Date.now()),Ut){let s=this;return new Promise(u=>{setTimeout(function(){u(s[t+\"Async\"].apply(s,e))},0)})}let i=this[t].apply(this,e);return n=i.then?i:new Promise(s=>s(i)),r&&n.then(r),n}}var st=0;function Dt(t={},e){function n(o){function l(c){c=c.data||c;let f=c.id,h=f&&s.h[f];h&&(h(c.msg),delete s.h[f])}if(this.worker=o,this.h=R(),this.worker)return i?this.worker.on(\"message\",l):this.worker.onmessage=l,t.config?new Promise(function(c){st>1e9&&(st=0),s.h[++st]=function(){c(s)},s.worker.postMessage({id:st,task:\"init\",factory:r,options:t})}):(this.priority=t.priority||4,this.encoder=e||null,this.worker.postMessage({task:\"init\",factory:r,options:t}),this)}if(!this||this.constructor!==Dt)return new Dt(t);let r=typeof self<\"u\"?self._factory:typeof window<\"u\"?window._factory:null;r&&(r=r.toString());let i=typeof window>\"u\",s=this,u=Gn(r,i,t.worker);return u.then?u.then(function(o){return n.call(s,o)}):n.call(this,u)}ut(\"add\");ut(\"append\");ut(\"search\");ut(\"update\");ut(\"remove\");ut(\"clear\");ut(\"export\");ut(\"import\");Dt.prototype.searchCache=Fe;ye(Dt.prototype);function ut(t){Dt.prototype[t]=function(){let e=this,n=[].slice.call(arguments);var r=n[n.length-1];let i;return typeof r==\"function\"&&(i=r,n.pop()),r=new Promise(function(s){t===\"export\"&&typeof n[0]==\"function\"&&(n[0]=null),st>1e9&&(st=0),e.h[++st]=s,e.worker.postMessage({task:t,id:st,args:n})}),i?(r.then(i),this):r}}function Gn(t,e,n){return e?typeof module<\"u\"?new(fe()).Worker(__dirname+\"/worker/node.js\"):Promise.resolve().then(()=>Un(fe(),1)).then(function(r){return new r.Worker(import.meta.dirname+\"/node/node.mjs\")}):t?new window.Worker(URL.createObjectURL(new Blob([\"onmessage=\"+Qn.toString()],{type:\"text/javascript\"}))):new window.Worker(typeof n==\"string\"?n:import.meta.url.replace(\"/worker.js\",\"/worker/worker.js\").replace(\"flexsearch.bundle.module.min.js\",\"module/worker/worker.js\").replace(\"flexsearch.bundle.module.min.mjs\",\"module/worker/worker.js\"),{type:\"module\"})}mt.prototype.add=function(t,e,n){if(Lt(t)&&(e=t,t=Mt(e,this.key)),e&&(t||t===0)){if(!n&&this.reg.has(t))return this.update(t,e);for(let o=0,l;oe?t.slice(n,n+e):t,r?wt.call(this,t):t;let i=[];for(let s=0,u,o;s=o){n-=o;continue}u=u.slice(n,n+e),o=u.length,n=0}if(o>e&&(u=u.slice(0,e),o=e),!i.length&&o>=e)return r?wt.call(this,u):u;if(i.push(u),e-=o,!e)break}return i=i.length>1?[].concat.apply([],i):i[0],r?wt.call(this,i):i}function Gt(t,e,n,r){var i=r[0];if(i[0]&&i[0].query)return t[e].apply(t,i);if(!(e!==\"and\"&&e!==\"not\"||t.result.length||t.await||i.suggest))return r.length>1&&(i=r[r.length-1]),(r=i.resolve)?t.await||t.result:t;let s=[],u=0,o=0,l,c,f,h,g;for(e=0;e1&&(n=n[e].apply(n,t.slice(1))),n}j.prototype.or=function(){return Gt(this,\"or\",qn,arguments)};function qn(t,e,n,r,i,s,u){return t.length&&(this.result.length&&t.push(this.result),t.length<2?this.result=t[0]:(this.result=en(t,e,n,!1,this.h),n=0)),i&&(this.await=null),i?this.resolve(e,n,r,u):this}j.prototype.and=function(){return Gt(this,\"and\",ti,arguments)};function ti(t,e,n,r,i,s,u){if(!s&&!this.result.length)return i?this.result:this;let o;if(t.length)if(this.result.length&&t.unshift(this.result),t.length<2)this.result=t[0];else{let l=0;for(let c=0,f,h;c1?y.join(\" \"):y[0];let w;if(y&&B){for(var v=B.length,M=(Q.split?B.replace(Q.split,\"\"):B).length-y.length,T=\"\",W=0,z=0;z-1&&(T=(N?B.substring(0,N):\"\")+u+B.substring(N,N+H)+o+(N+H=l)break}if(b=ft.length*(s.length-2),a||D||l&&d.length-b>l)if(b=l+b-g*2,k=x-A,a>0&&(k+=a),D>0&&(k+=D),k<=b)F=a?A-(a>0?a:0):A-((b-k)/2|0),m=D?x+(D>0?D:0):F+b,c||(F>0&&d.charAt(F)!==\" \"&&d.charAt(F-1)!==\" \"&&(F=d.indexOf(\" \",F),F<0&&(F=0)),m=m.length-1){if(I>=m.length){k[w+1]=1,I>=F.length&&(b[w+1]=1);continue}v-=g}if(d=m[I].text,H=D&&y[w])if(H>0){if(d.length>H)if(k[w+1]=1,c)d=d.substring(0,H);else continue;(H-=d.length)||(H=-1),y[w]=H}else{k[w+1]=1;continue}if(v+d.length+1<=l)d=\" \"+d,x[w]+=d;else if(c)K=l-v-1,K>0&&(d=\" \"+d.substring(0,K),x[w]+=d),k[w+1]=1;else{k[w+1]=1;continue}}else{if(k[w])continue;if(I-=M,A[I]){v-=g,k[w]=1,b[w]=1;continue}if(I<=0){if(I<0){k[w]=1,b[w]=1;continue}v-=g}if(d=m[I].text,H=a&&B[w])if(H>0){if(d.length>H)if(k[w]=1,c)d=d.substring(d.length-H);else continue;(H-=d.length)||(H=-1),B[w]=H}else{k[w]=1;continue}if(v+d.length+1<=l)d+=\" \",x[w]=d+x[w];else if(c)K=d.length+1-(l-v),K>=0&&K=F.length-1||I1?en(l,n,r,u,s):(l=l[0])&&n&&l.length>n||r?l.slice(r,n+r):l;else{if(tn||r)&&(l=l.slice(r,n+r));else{i=[];for(let h=0,g;hr)r-=g.length;else if((n&&g.length>n||r)&&(g=g.slice(r,n+r),n-=g.length,r&&(r-=g.length)),i.push(g),!n)break}l=i}}return l}function en(t,e,n,r,i){let s=[],u=R(),o;var l=t.length;let c;if(r){for(i=l-1;i>=0;i--)if(c=(r=t[i])&&r.length){for(l=0;l=0;f--){h=t[f];for(let a=0;a1?Jt(i,1,0,0,l,c):i[0],B)})}return a?i:new j(i.length>1?Jt(i,1,0,0,l,c):i[0],this)}}a||u||!(h=h||this.field)||(U(h)?u=h:(h.constructor===Array&&h.length===1&&(h=h[0]),u=h.field||h.index)),h&&h.constructor!==Array&&(h=[h])}h||(h=this.field);let b;m=(this.worker||this.db)&&!r&&[];for(let B=0,y,v,M;B\"u\"&&(this.db?m.push(p=this.index.get(this.field[0]).db.enrich(p)):p=wt.call(this,p)),u)return a?D?Vt(t,p,this.index,u,D):p:new j(p,this);i[F]={field:s[F],result:p}}if(d&&this.db&&m.length){let B=this;return Promise.all(m).then(function(y){for(let v=0;v0&&((n&&e>n||r)&&(t=t.slice(r,r+n)),i&&(t=wt.call(this,t))),t):[]):[]}function wt(t){if(!this||!this.store)return t;if(this.db)return this.index.get(this.field[0]).db.enrich(t);let e=Array(t.length);for(let n=0,r;n1?n:n[0]}C.append=function(t,e){return this.add(t,e,!0)};C.update=function(t,e){return this.remove(t).add(t,e)};C.remove=function(t){Lt(t)&&(t=Mt(t,this.key));for(var e of this.index.values())e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let r of n){e=r[0];let i=r[1],s=i.indexOf(t);s>-1&&(i.length>1?i.splice(s,1):n.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this};C.clear=function(){let t=[];for(let e of this.index.values()){let n=e.clear();n.then&&t.push(n)}if(this.tag)for(let e of this.tag.values())e.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this};C.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)};C.cleanup=function(){for(let t of this.index.values())t.cleanup();return this};C.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then(function(e){return e[0]&&e[0].doc||null}):this.store.get(t)||null};C.set=function(t,e){return typeof t==\"object\"&&(e=t,t=Mt(e,this.key)),this.store.set(t,e),this};C.searchCache=Fe;C.export=ui;C.import=oi;ye(mt.prototype);function Ae(t,e=0){let n=[],r=[];e&&(e=25e4/e*5e3|0);for(let i of t.entries())r.push(i),r.length===e&&(n.push(r),r=[]);return r.length&&n.push(r),n}function we(t,e){e||(e=new Map);for(let n=0,r;n2?n[0]:\"\";if(n=n.length>2?n[2]:n[1],this.worker&&r)return this.index.get(r).import(t);if(e){if(typeof e==\"string\"&&(e=JSON.parse(e)),r)return this.index.get(r).import(n,e);switch(n){case\"reg\":this.fastupdate=!1,this.reg=un(e,this.reg);for(let i=0,s;i=0&&i.splice(u,1)}}else jt(this.map,t),this.depth&&jt(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.M&&on(this)),this.cache&&this.cache.remove(t),this};function jt(t,e){let n=0;var r=typeof e>\"u\";if(t.constructor===Array){for(let i=0,s,u,o;i=0){if(s.length>1)return s.splice(u,1),1;if(delete t[i],n)return 1;o=1}else{if(o)return 1;n++}}}else for(let i of t.entries())r=i[0],jt(i[1],e)?n++:t.delete(r);return n}var li={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:\"forward\"},score:{resolution:9,context:{depth:2,resolution:3}}};X.prototype.add=function(t,e,n,r){if(e&&(t||t===0)){if(!r&&!n&&this.reg.has(t))return this.update(t,e);r=this.depth,e=this.encoder.encode(e,!r);let c=e.length;if(c){let f=R(),h=R(),g=this.resolution;for(let a=0;a2){for(let p=1,d,F,m,A;p2){for(let p=0,d;pp;s--){u=D.substring(p,s),d=this.rtl?i-1-p:p;var o=this.score?this.score(e,D,a,u,d):Kt(g,c,a,i,d);tt(this,h,u,o,t,n)}break}case\"bidirectional\":case\"reverse\":if(i>1){for(o=i-1;o>0;o--){u=D[this.rtl?i-1-o:o]+u;var l=this.score?this.score(e,D,a,u,o):Kt(g,c,a,i,o);tt(this,h,u,l,t,n)}u=\"\"}case\"forward\":if(i>1){for(o=0;o1&&au;let p=this.score?this.score(e,u,a,D,o-1):Kt(i+(c/2>i?0:1),c,a,s-1,o-1);tt(this,f,l?u:D,p,t,n,l?D:u)}}}}this.fastupdate||this.reg.add(t)}}return this.db&&(this.commit_task.push(n?{ins:t}:{del:t}),this.M&&on(this)),this};function tt(t,e,n,r,i,s,u){let o,l;if(!(o=e[n])||u&&!o[u]){if(u?(e=o||(e[n]=R()),e[u]=1,l=t.ctx,(o=l.get(u))?l=o:l.set(u,l=t.keystore?new V(t.keystore):new Map)):(l=t.map,e[n]=1),(o=l.get(n))?l=o:l.set(n,l=o=[]),s){for(let c=0,f;c1?e+(r||0)<=t?n+(i||0):(t-1)/(e+(r||0))*(n+(i||0))+1|0:0}X.prototype.search=function(t,e,n){if(n||(e||typeof t!=\"object\"?typeof e==\"object\"&&(n=e,e=0):(n=t,t=\"\")),n&&n.cache)return n.cache=!1,t=this.searchCache(t,e,n),n.cache=!0,t;let r=[],i,s,u,o=0,l,c,f,h,g;n&&(t=n.query||t,e=n.limit||e,o=n.offset||0,s=n.context,u=n.suggest,g=(l=n.resolve)&&n.enrich,f=n.boost,h=n.resolution,c=this.db&&n.tag),typeof l>\"u\"&&(l=this.resolve),s=this.depth&&s!==!1;let a=this.encoder.encode(t,!s);if(i=a.length,e=e||(l?100:0),i===1)return Ye.call(this,a[0],\"\",e,o,l,g,c);if(i===2&&s&&!u)return Ye.call(this,a[1],a[0],e,o,l,g,c);let D=R(),p=0,d;if(s&&(d=a[0],p=1),h||h===0||(h=d?this.N:this.resolution),this.db){if(this.db.search&&(n=this.db.search(this,a,e,o,u,l,g,c),n!==!1))return n;let F=this;return(async function(){for(let m,A;p1)l=Jt(t,e,n,r,i,s,u);else if(o===1)return u?Ce.call(null,t[0],n,r):new j(t[0],this);return u?l:new j(l,this)}function Ye(t,e,n,r,i,s,u){return t=me(this,t,e,n,r,i,s,u),this.db?t.then(function(o){return i?o||[]:new j(o,this)}):t&&t.length?i?Ce.call(this,t,n,r):new j(t,this):i?[]:new j([],this)}function Ge(t,e,n,r){let i=[];if(t&&t.length){if(t.length<=r){e.push(t);return}for(let s=0,u;sn)&&(l=n,n=e,e=l),t.db?t.db.get(e,n,r,i,s,u,o):(t=n?(t=t.ctx.get(n))&&t.get(e):t.map.get(e),t)}function X(t,e){if(!this||this.constructor!==X)return new X(t);if(t){var n=U(t)?t:t.preset;n&&(t=Object.assign({},li[n],t))}else t={};n=t.context;let r=n===!0?{depth:1}:n||{},i=U(t.encoder)?_e[t.encoder]:t.encode||t.encoder||{};this.encoder=i.encode?i:typeof i==\"object\"?new vt(i):{encode:i},this.resolution=t.resolution||9,this.tokenize=n=(n=t.tokenize)&&n!==\"default\"&&n!==\"exact\"&&n||\"strict\",this.depth=n===\"strict\"&&r.depth||0,this.bidirectional=r.bidirectional!==!1,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(n=t.keystore||0)&&(this.keystore=n),this.map=n?new V(n):new Map,this.ctx=n?new V(n):new Map,this.reg=e||(this.fastupdate?n?new V(n):new Map:n?new J(n):new Set),this.N=r.resolution||3,this.rtl=i.rtl||t.rtl||!1,this.cache=(n=t.cache||null)&&new Ft(n),this.resolve=t.resolve!==!1,(n=t.db)&&(this.db=this.mount(n)),this.M=t.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}C=X.prototype;C.mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)};C.commit=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)};C.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function on(t){t.commit_timer||(t.commit_timer=setTimeout(function(){t.commit_timer=null,t.db.commit(t)},1))}C.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db?(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[],this.db.clear()):this};C.append=function(t,e){return this.add(t,e,!0)};C.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)};C.update=function(t,e){let n=this,r=this.remove(t);return r&&r.then?r.then(()=>n.add(t,e)):this.add(t,e)};C.cleanup=function(){return this.fastupdate?(jt(this.map),this.depth&&jt(this.ctx),this):this};C.searchCache=Fe;C.export=function(t,e,n=0,r=0){let i,s;switch(r){case 0:i=\"reg\",s=sn(this.reg);break;case 1:i=\"cfg\",s=null;break;case 2:i=\"map\",s=Ae(this.map,this.reg.size);break;case 3:i=\"ctx\",s=nn(this.ctx,this.reg.size);break;default:return}return Zt.call(this,t,e,i,s,n,r)};C.import=function(t,e){if(e)switch(typeof e==\"string\"&&(e=JSON.parse(e)),t=t.split(\".\"),t[t.length-1]===\"json\"&&t.pop(),t.length===3&&t.shift(),t=t.length>1?t[1]:t[0],t){case\"reg\":this.fastupdate=!1,this.reg=un(e,this.reg);break;case\"map\":this.map=we(e,this.map);break;case\"ctx\":this.ctx=rn(e,this.ctx)}};C.serialize=function(t=!0){let e=\"\",n=\"\",r=\"\";if(this.reg.size){let s;for(var i of this.reg.keys())s||(s=typeof i),e+=(e?\",\":\"\")+(s===\"string\"?'\"'+i+'\"':i);e=\"index.reg=new Set([\"+e+\"]);\",n=Ze(this.map,s),n=\"index.map=new Map([\"+n+\"]);\";for(let u of this.ctx.entries()){i=u[0];let o=Ze(u[1],s);o=\"new Map([\"+o+\"])\",o='[\"'+i+'\",'+o+\"]\",r+=(r?\",\":\"\")+o}r=\"index.ctx=new Map([\"+r+\"]);\"}return t?\"function inject(index){\"+e+n+r+\"}\":e+n+r};ye(X.prototype);var ln=typeof window<\"u\"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Qt=[\"map\",\"ctx\",\"tag\",\"reg\",\"cfg\"],gt=R();function Yt(t,e={}){if(!this||this.constructor!==Yt)return new Yt(t,e);typeof t==\"object\"&&(e=t,t=t.name),t||console.info(\"Default storage space was used, because a name was not passed.\"),this.id=\"flexsearch\"+(t?\":\"+t.toLowerCase().replace(/[^a-z0-9_\\-]/g,\"\"):\"\"),this.field=e.field?e.field.toLowerCase().replace(/[^a-z0-9_\\-]/g,\"\"):\"\",this.type=e.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}C=Yt.prototype;C.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())};C.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),gt[t.id]||(gt[t.id]=[]),gt[t.id].push(t.field);let e=ln.open(t.id,1);return e.onupgradeneeded=function(){let n=t.db=this.result;for(let r=0,i;r=f.length){r-=f.length;continue}let h=n?r+Math.min(f.length-r,n):f.length;for(let g=r;g=s.length?[]:!e&&!n?s:(s=s.slice(n,n+e),r?i.enrich(s):s)})};C.enrich=function(t){typeof t!=\"object\"&&(t=[t]);let e=this.db.transaction(\"reg\",\"readonly\").objectStore(\"reg\"),n=[];for(let r=0;r=0)if(i=1,o.length>1)o.splice(c,1);else{r[u]=[];break}s+=o.length}if(n)break}s?i&&t.update(r):t.delete(),t.continue()}C.remove=function(t){return typeof t!=\"object\"&&(t=[t]),Promise.all([this.transaction(\"map\",\"readwrite\",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction(\"ctx\",\"readwrite\",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t)}}),this.transaction(\"tag\",\"readwrite\",function(e){e.openCursor().onsuccess=function(){let n=this.result;n&&pe(n,t,!0)}}),this.transaction(\"reg\",\"readwrite\",function(e){for(let n=0;n{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,n(this.result)},t.onerror=t.onblocked=r,t=null})}var hn={Index:X,Charset:_e,Encoder:vt,Document:mt,Worker:Dt,Resolver:j,IndexedDB:Yt,Language:{}};var Ni=Object.hasOwnProperty;var gn,P,dn,hi,lt,cn,Dn,mn,ve,te,It,Fn,Te,Be,ke,ci,_n={},ne=[],fi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,re=Array.isArray;function et(t,e){for(var n in e)t[n]=e[n];return t}function Se(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function xe(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++dn,__i:-1,__u:0};return i==null&&P.vnode!=null&&P.vnode(s),s}function kt(t){return t.children}function ee(t,e){this.props=t,this.context=e}function Bt(t,e){if(e==null)return t.__?Bt(t.__,t.__i+1):null;for(var n;ee&<.sort(mn),t=lt.shift(),e=lt.length,ai(t)}finally{lt.length=ie.__r=0}}function Cn(t,e,n,r,i,s,u,o,l,c,f){var h,g,a,D,p,d,F,m=r&&r.__k||ne,A=e.length;for(l=pi(n,e,m,l,A),h=0;h0?u=t.__k[s]=xe(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):t.__k[s]=u,l=s+g,u.__=t,u.__b=t.__b+1,o=null,(c=u.__i=gi(u,n,l,h))!=-1&&(h--,(o=n[c])&&(o.__u|=2)),o==null||o.__v==null?(c==-1&&(i>f?g--:il?g--:g++,u.__u|=4))):t.__k[s]=null;if(h)for(s=0;s(f?1:0)){for(i=n-1,s=n+1;i>=0||s=0?i--:s++])!=null&&(2&c.__u)==0&&o==c.key&&l==c.type)return u}return-1}function an(t,e,n){e[0]==\"-\"?t.setProperty(e,n??\"\"):t[e]=n==null?\"\":typeof n!=\"number\"||fi.test(e)?n:n+\"px\"}function qt(t,e,n,r,i){var s,u;t:if(e==\"style\")if(typeof n==\"string\")t.style.cssText=n;else{if(typeof r==\"string\"&&(t.style.cssText=r=\"\"),r)for(e in r)n&&e in n||an(t.style,e,\"\");if(n)for(e in n)r&&n[e]==r[e]||an(t.style,e,n[e])}else if(e[0]==\"o\"&&e[1]==\"n\")s=e!=(e=e.replace(Fn,\"$1\")),u=e.toLowerCase(),e=u in t||e==\"onFocusOut\"||e==\"onFocusIn\"?u.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n[It]=r[It]:(n[It]=Te,t.addEventListener(e,s?ke:Be,s)):t.removeEventListener(e,s?ke:Be,s);else{if(i==\"http://www.w3.org/2000/svg\")e=e.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(e!=\"width\"&&e!=\"height\"&&e!=\"href\"&&e!=\"list\"&&e!=\"form\"&&e!=\"tabIndex\"&&e!=\"download\"&&e!=\"rowSpan\"&&e!=\"colSpan\"&&e!=\"role\"&&e!=\"popover\"&&e in t)try{t[e]=n??\"\";break t}catch{}typeof n==\"function\"||(n==null||n===!1&&e[4]!=\"-\"?t.removeAttribute(e):t.setAttribute(e,e==\"popover\"&&n==1?\"\":n))}}function pn(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[te]==null)e[te]=Te++;else if(e[te]0?t:re(t)?t.map(wn):et({},t)}function Di(t,e,n,r,i,s,u,o,l){var c,f,h,g,a,D,p,d=n.props||_n,F=e.props,m=e.type;if(m==\"svg\"?i=\"http://www.w3.org/2000/svg\":m==\"math\"?i=\"http://www.w3.org/1998/Math/MathML\":i||(i=\"http://www.w3.org/1999/xhtml\"),s!=null){for(c=0;c\"u\"?\"\":document.body?.dataset?.basepath??\"\"}function Me(t,e){let n=e??_i(),r=t.startsWith(\"/\")?t:\"/\"+t;return n+r}function nt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function xn(t,e){if(!t)return()=>{};let n=i=>{t.classList.contains(\"active\")&&i.target===t&&(i.preventDefault(),i.stopPropagation(),e())},r=i=>{t.classList.contains(\"active\")&&i.key===\"Escape\"&&(i.preventDefault(),e())};return t.addEventListener(\"click\",n),document.addEventListener(\"keydown\",r),()=>{t.removeEventListener(\"click\",n),document.removeEventListener(\"keydown\",r)}}function Bn(t,e){let n=t.querySelectorAll(\"[src], [href]\");for(let r of Array.from(n)){let i=r.hasAttribute(\"href\")?\"href\":\"src\",s=r.getAttribute(i);if(s&&!(s.startsWith(\"http://\")||s.startsWith(\"https://\")||s.startsWith(\"mailto:\")||s.startsWith(\"tel:\")||s.startsWith(\"#\")||s.startsWith(\"/\")||s.startsWith(\"data:\")))try{let u=new URL(s,e).toString();r.setAttribute(i,u)}catch{continue}}}function se(t){return t.replaceAll(\"&\",\"&\").replaceAll(\"<\",\"<\").replaceAll(\">\",\">\").replaceAll('\"',\""\").replaceAll(\"'\",\"'\")}var je=\"basic\",bt=\"\",kn=8,yi=5,ue=30,Ci=t=>{let e=[],n=-1,r=-1,i=t.toLowerCase(),s=0;for(let u of i){let o=u.codePointAt(0);o>=12352&&o<=12447||o>=12448&&o<=12543||o>=19968&&o<=40959||o>=44032&&o<=55215||o>=131072&&o<=173791?(n!==-1&&(e.push(i.slice(n,r)),n=-1),e.push(u)):o===32||o===9||o===10||o===13?n!==-1&&(e.push(i.slice(n,r)),n=-1):(n===-1&&(n=s),r=s+1),s+=u.length}return n!==-1&&e.push(i.slice(n)),e},le=new hn.Document({encode:Ci,document:{id:\"id\",tag:\"tags\",index:[{field:\"title\",tokenize:\"forward\"},{field:\"content\",tokenize:\"forward\"},{field:\"tags\",tokenize:\"forward\"}]}}),Z=null,Pt=[],Ht=[],Ie=new Map;function oe(t){let e=t.split(/\\s+/),n=[],r=[];for(let i of e)i.startsWith(\"#\")&&i.length>1?n.push(i.substring(1)):i!==\"#\"&&r.push(i);return{tags:n,query:r.join(\" \").trim()}}function bn(t){let e=t.split(/\\s+/),n=e[e.length-1];return n&&n.startsWith(\"#\")?n.substring(1):null}var Sn=new DOMParser;async function Ei(t){if(Ie.has(t))return Ie.get(t);let e=new URL(Me(t),window.location.origin).toString();try{let n=await fetch(e);if(!n.ok)return[];let r=await n.text(),i=Sn.parseFromString(r??\"\",\"text/html\");Bn(i,e);let s=Array.from(i.getElementsByClassName(\"popover-hint\"));return Ie.set(t,s),s}catch{return[]}}var Pe=[];function _t(t){Pe.push(t)}function Ai(){Pe.forEach(t=>t()),Pe.length=0}async function wi(){let t=document.querySelectorAll(\".search\");for(let e of Array.from(t)){let n=e.querySelector(\".search-container\"),r=e.querySelector(\".search-button\"),i=e.querySelector(\".search-bar\"),s=e.querySelector(\".search-layout\");if(!n||!r||!i||!s)continue;let u=n.closest(\".sidebar\"),o=s.getAttribute(\"data-preview\")===\"true\",l=s.getAttribute(\"data-field-priority\"),c=l?JSON.parse(l):[\"title\",\"content\",\"tags\"],f=s.querySelector(\".results-container\");f||(f=document.createElement(\"div\"),f.className=\"results-container\",f.setAttribute(\"role\",\"listbox\"),f.setAttribute(\"aria-label\",\"Search results\"),s.appendChild(f));let h=s.querySelector(\".preview-container\");o&&!h&&(h=document.createElement(\"div\"),h.className=\"preview-container\",s.appendChild(h));let g=document.createElement(\"div\");g.className=\"tag-suggestions\",g.setAttribute(\"role\",\"listbox\"),g.setAttribute(\"aria-label\",\"Tag suggestions\"),g.style.display=\"none\";let a=i.parentElement;a.insertBefore(g,i.nextSibling);let D=document.createElement(\"span\");D.className=\"ghost-text\",D.setAttribute(\"aria-hidden\",\"true\"),a.insertBefore(D,i.nextSibling);let p=-1,d=[],F=!1,m=_=>{if(p<0||p>=d.length){D.textContent=\"\";return}let E=d[p];if(!E.toLowerCase().startsWith(_.toLowerCase())){D.textContent=\"\";return}let L=E.substring(_.length);D.innerHTML=\"\";let S=document.createElement(\"span\");S.style.visibility=\"hidden\",S.textContent=i.value,D.appendChild(S),D.appendChild(document.createTextNode(L))},A=()=>{g.querySelectorAll(\".tag-suggestion-item\").forEach((L,S)=>{L.classList.toggle(\"active\",S===p)});let E=bn(i.value)||\"\";m(E)},x=()=>{F=!1,p=-1,d=[],g.style.display=\"none\",D.textContent=\"\"},b=_=>{let E=i.value,L=E.lastIndexOf(\"#\");L!==-1&&(i.value=E.substring(0,L)+\"#\"+_+\" \"),x(),i.focus(),i.dispatchEvent(new Event(\"input\"))},k=_=>{if(Rt){if(d=_===\"\"?Ht.slice(0,10):Ht.filter(E=>E.toLowerCase().startsWith(_.toLowerCase())).slice(0,10),d.length===0){x();return}p=0,F=!0,nt(g);for(let E=0;E!F||d.length===0?!1:(_===\"down\"?p=Math.min(p+1,d.length-1):p=Math.max(p-1,0),A(),!0),y=null,v=0,M=null,T=()=>{n.classList.remove(\"active\"),u&&(u.style.zIndex=\"\"),r.setAttribute(\"aria-expanded\",\"false\"),i.value=\"\",nt(f),h&&nt(h),s.classList.remove(\"display-results\"),je=\"basic\",y=null,x(),r.focus()},W=_=>{je=_,u&&(u.style.zIndex=\"9999\"),n.classList.add(\"active\"),r.setAttribute(\"aria-expanded\",\"true\"),i.focus()},z=async _=>{if(nt(f),_.length===0){let E=document.createElement(\"a\");E.className=\"result-card no-match\";let L=document.createElement(\"h3\");L.textContent=\"No results.\";let S=document.createElement(\"p\");S.textContent=\"Try another search term?\",E.appendChild(L),E.appendChild(S),f.appendChild(E),y=null,h&&nt(h)}else for(let E of _){let L=document.createElement(\"a\");L.className=\"result-card\",L.id=E.slug,L.href=Me(E.slug);let S=document.createElement(\"h3\");if(S.className=\"card-title\",S.textContent=E.title,L.appendChild(S),E.tags.length>0){let $=document.createElement(\"ul\");$.className=\"tags\",$.textContent=\"\";for(let G of E.tags){let q=document.createElement(\"li\");q.textContent=G.replace(/<[^>]*>/g,\"\"),$.appendChild(q)}L.appendChild($)}let Y=document.createElement(\"p\");Y.className=\"card-description\",Y.innerHTML=E.content.replace(/<(?!\\/?mark\\b)[^>]*>/gi,\"\"),L.appendChild(Y),f.appendChild(L)}},N=()=>Array.from(f.querySelectorAll(\".result-card:not(.no-match)\")),H=()=>{let _=oe(bt);return _.query||(_.tags.length>0?_.tags.join(\" \"):bt)},K=async _=>{if(!h||(nt(h),!_))return;let E=_.id,L=++v,S=await Ei(E);if(L!==v)return;let Y=H(),$=document.createElement(\"div\");$.className=\"preview-inner\";for(let G of S){let q=G.cloneNode(!0);Y.trim()!==\"\"&&(q.innerHTML=vi(Y,q)),$.appendChild(q)}h.appendChild($),requestAnimationFrame(()=>{let G=Array.from(h.getElementsByClassName(\"highlight\"));if(G.length===0)return;G.sort((he,ce)=>ce.innerHTML.length-he.innerHTML.length);let q=G[0],Nt=0,at=q;for(;at&&at!==h;)Nt+=at.offsetTop,at=at.offsetParent;h.scrollTop=Math.max(0,Nt-50)})},it=_=>{y&&y.classList.remove(\"focus\"),y=_,y&&(y.classList.add(\"focus\"),y.scrollIntoView({block:\"nearest\"})),M&&clearTimeout(M),M=setTimeout(()=>K(y),150)},Q=_=>{let E=N();if(E.length===0){it(null);return}let L=Math.min(Math.max(_,0),E.length-1);it(E[L]??null)},Wt=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):-1;Q(E+1)},ht=()=>{let _=N();if(_.length===0)return;let E=y?_.indexOf(y):_.length;Q(E-1)},rt=async _=>{let E=_.target.value;bt=E;let L=bn(E);L!==null?k(L):x();let S=oe(E),Y=S.query!==\"\"||S.tags.length>0;if(s.classList.toggle(\"display-results\",Y),je=S.tags.length>0&&!S.query?\"tags\":\"basic\",!Y){nt(f),h&&nt(h),y=null;return}let $;S.query?$=await le.searchAsync({query:S.query,limit:S.tags.length>0?1e4:kn,index:[\"title\",\"content\"]}):S.tags.length>0?$=await le.searchAsync({query:S.tags[0],limit:1e4,index:[\"tags\"]}):$=[];let G=pt=>{let Tt=$.filter(zt=>zt.field===pt);return Tt.length===0?[]:[...Tt[0].result]},Nt=[...new Set(c.flatMap(pt=>G(pt)))].filter(pt=>{if(S.tags.length===0)return!0;let Tt=Pt[pt];if(!Tt)return!1;let zt=Z?.[Tt];if(!zt)return!1;let In=zt.tags||[];return S.tags.every(Pn=>In.some(Hn=>Hn.toLowerCase()===Pn.toLowerCase()))}),at=S.query||(S.tags.length>0?S.tags.join(\" \"):E),he=Nt.map(pt=>Bi(at,pt));await z(he.slice(0,kn));let ce=N();it(ce[0]??null)},ct=_=>{_.stopPropagation(),W(\"basic\")};r.addEventListener(\"click\",ct),_t(()=>r.removeEventListener(\"click\",ct)),i.addEventListener(\"input\",rt),_t(()=>i.removeEventListener(\"input\",rt));let ft=_=>{if(F){if(_.key===\"ArrowDown\"){_.preventDefault(),B(\"down\");return}if(_.key===\"ArrowUp\"){_.preventDefault(),B(\"up\");return}if(_.key===\"Tab\"){_.preventDefault(),p>=0&&p=0&&pi.removeEventListener(\"keydown\",ft));let w=_=>{_.key===\"k\"&&(_.ctrlKey||_.metaKey)&&!_.shiftKey?(_.preventDefault(),n.classList.contains(\"active\")?T():W(\"basic\")):_.shiftKey&&(_.ctrlKey||_.metaKey)&&_.key.toLowerCase()===\"k\"&&(_.preventDefault(),W(\"tags\"),i.value=\"#\",i.dispatchEvent(new Event(\"input\")))};document.addEventListener(\"keydown\",w),_t(()=>document.removeEventListener(\"keydown\",w));let I=()=>{let _=oe(bt),E=_.query||(_.tags.length>0?_.tags.join(\" \"):bt);E.trim()&&sessionStorage.setItem(\"search-term\",E.trim())},yt=_=>{let E=_.target.closest(\".result-card\");!E||E.classList.contains(\"no-match\")||_ instanceof MouseEvent&&(_.altKey||_.ctrlKey||_.metaKey||_.shiftKey)||(I(),T())},He=_=>{let E=_.target.closest(\".result-card\");!E||E.classList.contains(\"no-match\")||it(E)};f.addEventListener(\"click\",yt),f.addEventListener(\"mouseover\",He),_t(()=>{f.removeEventListener(\"click\",yt),f.removeEventListener(\"mouseover\",He)});let Re=_=>{let E=_.target.closest(\".tag-suggestion-item\");if(!E)return;let L=E.getAttribute(\"data-tag\");L&&b(L)},We=_=>{let E=_.target.closest(\".tag-suggestion-item\");if(!E)return;let L=E.getAttribute(\"data-index\");L!==null&&(p=parseInt(L,10),A())};g.addEventListener(\"click\",Re),g.addEventListener(\"mouseover\",We),_t(()=>{g.removeEventListener(\"click\",Re),g.removeEventListener(\"mouseover\",We)});let jn=xn(n,T);_t(jn)}}function Ln(t){let e=t.split(/\\s+/).filter(r=>r.trim()!==\"\"),n=e.length;if(n>1)for(let r=1;ri.length-r.length)}function vi(t,e){let n=Ln(t).filter(c=>c.trim()!==\"\");if(n.length===0)return e.innerHTML;let r=Sn.parseFromString(e.innerHTML,\"text/html\"),i=n.map(c=>c.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")).join(\"|\");if(i===\"\")return e.innerHTML;let s=new RegExp(i,\"gi\"),u=r.createTreeWalker(r.body,NodeFilter.SHOW_TEXT),o=[],l=u.nextNode();for(;l;)o.push(l),l=u.nextNode();for(let c of o){let f=c.nodeValue??\"\";if(s.lastIndex=0,!s.test(f))continue;s.lastIndex=0;let h=r.createDocumentFragment(),g=0,a;for(;(a=s.exec(f))!==null;){a.index>g&&h.appendChild(r.createTextNode(f.slice(g,a.index)));let D=r.createElement(\"span\");D.className=\"highlight\",D.textContent=a[0],h.appendChild(D),g=a.index+a[0].length}gl!==\"\"),s=0,u=i.length-1;if(n){let l=g=>r.some(a=>g.toLowerCase().startsWith(a.toLowerCase())),c=i.map(l),f=0,h=0;for(let g=0;gp+(d?1:0),0);D>=f&&(f=D,h=g)}s=Math.max(h-ue,0),u=Math.min(s+2*ue,i.length-1),i=i.slice(s,u)}let o=i.map(l=>{let c=l;for(let f of r)if(l.toLowerCase().includes(f.toLowerCase())){let h=new RegExp(f.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\"),\"gi\");c=l.replace(h,g=>`${g}`);break}return c}).join(\" \");return(s===0?\"\":\"...\")+o+(u===i.length-1?\"\":\"...\")}function xi(t,e){return!e||e.length===0||t.length===0?[]:e.map(n=>{let r=se(n);return t.some(i=>n.toLowerCase().includes(i.toLowerCase()))?`
  • #${r}

  • `:`
  • #${r}

  • `}).slice(0,yi)}function Bi(t,e){let n=Pt[e];if(!n||!Z)return{id:e,slug:\"\",title:\"\",content:\"\",tags:[]};let r=Z[n];if(!r)return{id:e,slug:n,title:\"\",content:\"\",tags:[]};let i=oe(bt);return{id:e,slug:n,title:i.tags.length>0&&!i.query?se(r.title):Tn(t,r.title||\"\"),content:Tn(t,r.content||\"\",!0),tags:xi(i.tags,r.tags)}}async function ki(){if(!Z)return;let t=0,e=[],n=new Set;for(let r of Object.keys(Z)){let i=Z[r];if(i){Pt[t]=r;for(let s of i.tags||[])n.add(s);e.push(le.addAsync(t,{id:t,slug:r,title:i.title||\"\",content:i.content||\"\",tags:i.tags||[]})),t++}}await Promise.all(e),Ht=[...n].sort()}async function bi(){return await fetchData}var Rt=!1;async function Ti(){Rt||(Z=await bi(),await ki(),Rt=!0)}async function Si(t){if(!Rt||!Z)return 0;let e=new Set(Ht),n=0;for(let r of Object.keys(t)){if(Z[r])continue;let i=t[r];if(!i)continue;let s=Pt.length;Pt[s]=r,Z[r]=i;for(let u of i.tags||[])e.add(u);await le.addAsync(s,{id:s,slug:r,title:i.title||\"\",content:i.content||\"\",tags:i.tags||[]}),n++}return Ht=[...e].sort(),n}document.addEventListener(\"content-index-updated\",t=>{let e=t.detail;if(!Rt||!Z)return;let n=e?.slugs;!Array.isArray(n)||n.length===0||(async()=>{try{let r=await fetchData;if(!r||typeof r!=\"object\")return;let i=r.content&&typeof r.content==\"object\"?r.content:r,s={};for(let u of n){let o=i[u];o&&typeof o==\"object\"&&(s[u]=o)}await Si(s)}catch{}})()});function Li(){let t=sessionStorage.getItem(\"search-term\");t&&(sessionStorage.removeItem(\"search-term\"),requestAnimationFrame(()=>{let e=document.querySelectorAll(\".popover-hint p, .popover-hint li, .popover-hint h1, .popover-hint h2, .popover-hint h3, .popover-hint h4, .popover-hint h5, .popover-hint h6, .popover-hint td, .popover-hint th, .popover-hint blockquote, article p, article li, article h1, article h2, article h3\");for(let n of Array.from(e)){let i=(n.textContent??\"\").toLowerCase().indexOf(t.toLowerCase());if(i===-1)continue;let s=document.createTreeWalker(n,NodeFilter.SHOW_TEXT),u=0,o,l=null,c=0,f=null,h=0;for(;o=s.nextNode();){let g=o.nodeValue?.length??0;if(!l&&u+g>i&&(l=o,c=i-u),l&&u+g>=i+t.length){f=o,h=i+t.length-u;break}u+=g}if(!(!l||!f)){try{let g=document.createRange();g.setStart(l,c),g.setEnd(f,h);let a=document.createElement(\"span\");a.className=\"search-scroll-target\",g.surroundContents(a),a.scrollIntoView({block:\"center\",behavior:\"smooth\"}),setTimeout(()=>{a.classList.add(\"fade-out\"),setTimeout(()=>{let D=a.parentNode;D&&(D.replaceChild(document.createTextNode(a.textContent||\"\"),a),D.normalize())},1e3)},2e3)}catch{n.scrollIntoView({block:\"center\",behavior:\"smooth\"})}break}}}))}async function Mn(){Ai(),await Ti(),await wi(),Li()}document.addEventListener(\"nav\",Mn);document.addEventListener(\"render\",Mn);\n","/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { NULL } from '../constants';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw the error that was caught (except\n * for unmounting when this parameter is the highest parent that was being\n * unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component,\n\t\t/** @type {import('../internal').ComponentType} */\n\t\tctor,\n\t\t/** @type {boolean} */\n\t\thandled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != NULL) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != NULL) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { MODE_HYDRATE, NULL } from './constants';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function BaseComponent(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nBaseComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != NULL && this._nextState != this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == NULL) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nBaseComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](https://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {ComponentChildren | void}\n */\nBaseComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == NULL) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._index + 1)\n\t\t\t: NULL;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != NULL && sibling._dom != NULL) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : NULL;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tif (component._parentDom && component._dirty) {\n\t\tlet oldVNode = component._vnode,\n\t\t\toldDom = oldVNode._dom,\n\t\t\tcommitQueue = [],\n\t\t\trefQueue = [],\n\t\t\tnewVNode = assign({}, oldVNode);\n\t\tnewVNode._original = oldVNode._original + 1;\n\t\tif (options.vnode) options.vnode(newVNode);\n\n\t\tdiff(\n\t\t\tcomponent._parentDom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tcomponent._parentDom.namespaceURI,\n\t\t\toldVNode._flags & MODE_HYDRATE ? [oldDom] : NULL,\n\t\t\tcommitQueue,\n\t\t\toldDom == NULL ? getDomSibling(oldVNode) : oldDom,\n\t\t\t!!(oldVNode._flags & MODE_HYDRATE),\n\t\t\trefQueue\n\t\t);\n\n\t\tnewVNode._original = oldVNode._original;\n\t\tnewVNode._parent._children[newVNode._index] = newVNode;\n\t\tcommitRoot(commitQueue, newVNode, refQueue);\n\t\toldVNode._dom = oldVNode._parent = null;\n\n\t\tif (newVNode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(newVNode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != NULL && vnode._component != NULL) {\n\t\tvnode._dom = vnode._component.base = NULL;\n\t\tvnode._children.some(child => {\n\t\t\tif (child != NULL && child._dom != NULL) {\n\t\t\t\treturn (vnode._dom = vnode._component.base = child._dom);\n\t\t\t}\n\t\t});\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce != options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\ttry {\n\t\tlet c,\n\t\t\tl = 1;\n\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\twhile (rerenderQueue.length) {\n\t\t\t// Keep the rerender queue sorted by (depth, insertion order). The queue\n\t\t\t// will initially be sorted on the first iteration only if it has more than 1 item.\n\t\t\t//\n\t\t\t// New items can be added to the queue e.g. when rerendering a provider, so we want to\n\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t// single pass\n\t\t\tif (rerenderQueue.length > l) {\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\n\t\t\tc = rerenderQueue.shift();\n\t\t\tl = rerenderQueue.length;\n\n\t\t\trenderComponent(c);\n\t\t}\n\t} finally {\n\t\trerenderQueue.length = process._rerenderCount = 0;\n\t}\n}\n\nprocess._rerenderCount = 0;\n","import { IS_NON_DIMENSIONAL, NULL, SVG_NAMESPACE } from '../constants';\nimport options from '../options';\n\n// Per-instance unique key for event clock stamps. Each Preact copy on the page\n// gets its own random suffix so that `_dispatched` / `_attached` properties on\n// shared event objects and handler functions cannot collide across instances.\n// ~1 in 60M collision odds - if you have that many praect versions on the page,\n// you deserve some weird bugs.\n// In 11 we can replace this with a\n// Symbol\nlet _id = Math.random().toString(8),\n\tEVENT_DISPATCHED = '__d' + _id,\n\tEVENT_ATTACHED = '__a' + _id;\n\nfunction setStyle(style, key, value) {\n\tif (key[0] == '-') {\n\t\tstyle.setProperty(key, value == NULL ? '' : value);\n\t} else if (value == NULL) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\nconst CAPTURE_REGEX = /(PointerCapture)$|Capture$/i;\n\n// A logical clock to solve issues like https://github.com/preactjs/preact/issues/3927.\n// When the DOM performs an event it leaves micro-ticks in between bubbling up which means that\n// an event can trigger on a newly reated DOM-node while the event bubbles up.\n//\n// Originally inspired by Vue\n// (https://github.com/vuejs/core/blob/caeb8a68811a1b0f79/packages/runtime-dom/src/modules/events.ts#L90-L101),\n// but modified to use a logical clock instead of Date.now() in case event handlers get attached\n// and events get dispatched during the same millisecond.\n//\n// The clock is incremented after each new event dispatch. This allows 1 000 000 new events\n// per second for over 280 years before the value reaches Number.MAX_SAFE_INTEGER (2**53 - 1).\nlet eventClock = 0;\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {string} namespace Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, namespace) {\n\tlet useCapture;\n\n\to: if (name == 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] != oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] == 'o' && name[1] == 'n') {\n\t\tuseCapture = name != (name = name.replace(CAPTURE_REGEX, '$1'));\n\t\tconst lowerCaseName = name.toLowerCase();\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (lowerCaseName in dom || name == 'onFocusOut' || name == 'onFocusIn')\n\t\t\tname = lowerCaseName.slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue[EVENT_ATTACHED] = eventClock;\n\t\t\t\tdom.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\t\tuseCapture\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvalue[EVENT_ATTACHED] = oldValue[EVENT_ATTACHED];\n\t\t\t}\n\t\t} else {\n\t\t\tdom.removeEventListener(\n\t\t\t\tname,\n\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\tuseCapture\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (namespace == SVG_NAMESPACE) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname != 'width' &&\n\t\t\tname != 'height' &&\n\t\t\tname != 'href' &&\n\t\t\tname != 'list' &&\n\t\t\tname != 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname != 'tabIndex' &&\n\t\t\tname != 'download' &&\n\t\t\tname != 'rowSpan' &&\n\t\t\tname != 'colSpan' &&\n\t\t\tname != 'role' &&\n\t\t\tname != 'popover' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == NULL ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value == 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != NULL && (value !== false || name[4] == '-')) {\n\t\t\tdom.setAttribute(name, name == 'popover' && value == true ? '' : value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Create an event proxy function.\n * @param {boolean} useCapture Is the event handler for the capture phase.\n * @private\n */\nfunction createEventProxy(useCapture) {\n\t/**\n\t * Proxy an event to hooked event handlers\n\t * @param {import('../internal').PreactEvent} e The event object from the browser\n\t * @private\n\t */\n\treturn function (e) {\n\t\tif (this._listeners) {\n\t\t\tconst eventHandler = this._listeners[e.type + useCapture];\n\t\t\tif (e[EVENT_DISPATCHED] == NULL) {\n\t\t\t\te[EVENT_DISPATCHED] = eventClock++;\n\n\t\t\t\t// When `e[EVENT_DISPATCHED]` is smaller than the time when the targeted event\n\t\t\t\t// handler was attached we know we have bubbled up to an element that was added\n\t\t\t\t// during patching the DOM.\n\t\t\t} else if (e[EVENT_DISPATCHED] < eventHandler[EVENT_ATTACHED]) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn eventHandler(options.event ? options.event(e) : e);\n\t\t}\n\t};\n}\n\nconst eventProxy = createEventProxy(false);\nconst eventProxyCapture = createEventProxy(true);\n","import { enqueueRender } from './component';\nimport { NULL } from './constants';\n\nexport let i = 0;\n\nexport function createContext(defaultValue) {\n\tfunction Context(props) {\n\t\tif (!this.getChildContext) {\n\t\t\t/** @type {Set | null} */\n\t\t\tlet subs = new Set();\n\t\t\tlet ctx = {};\n\t\t\tctx[Context._id] = this;\n\n\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\tthis.componentWillUnmount = () => {\n\t\t\t\tsubs = NULL;\n\t\t\t};\n\n\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t// @ts-expect-error even\n\t\t\t\tif (this.props.value != _props.value) {\n\t\t\t\t\tsubs.forEach(c => {\n\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.sub = c => {\n\t\t\t\tsubs.add(c);\n\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\tif (subs) {\n\t\t\t\t\t\tsubs.delete(c);\n\t\t\t\t\t}\n\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\treturn props.children;\n\t}\n\n\tContext._id = '__cC' + i++;\n\tContext._defaultValue = defaultValue;\n\n\t/** @type {import('./internal').FunctionComponent} */\n\tContext.Consumer = (props, contextValue) => {\n\t\treturn props.children(contextValue);\n\t};\n\n\t// we could also get rid of _contextRef entirely\n\tContext.Provider =\n\t\tContext._contextRef =\n\t\tContext.Consumer.contextType =\n\t\t\tContext;\n\n\treturn Context;\n}\n","import { options, Fragment } from 'preact';\nimport { encodeEntities } from './utils';\nimport { IS_NON_DIMENSIONAL } from '../../src/constants';\n\nlet vnodeId = 0;\n\nconst isArray = Array.isArray;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {unknown} [isStaticChildren]\n * @param {unknown} [__source]\n * @param {unknown} [__self]\n */\nfunction createVNode(type, props, key, isStaticChildren, __source, __self) {\n\tif (!props) props = {};\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = props,\n\t\tref,\n\t\ti;\n\n\tif ('ref' in normalizedProps) {\n\t\tnormalizedProps = {};\n\t\tfor (i in props) {\n\t\t\tif (i == 'ref') {\n\t\t\t\tref = props[i];\n\t\t\t} else {\n\t\t\t\tnormalizedProps[i] = props[i];\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @type {VNode & { __source: any; __self: any }} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_component: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t_index: -1,\n\t\t_flags: 0,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\n/**\n * Create a template vnode. This function is not expected to be\n * used directly, but rather through a precompile JSX transform\n * @param {string[]} templates\n * @param {Array} exprs\n * @returns {VNode}\n */\nfunction jsxTemplate(templates, ...exprs) {\n\tconst vnode = createVNode(Fragment, { tpl: templates, exprs });\n\t// Bypass render to string top level Fragment optimization\n\tvnode.key = vnode._vnode;\n\treturn vnode;\n}\n\nconst JS_TO_CSS = {};\nconst CSS_REGEX = /[A-Z]/g;\n\n/**\n * Unwrap potential signals.\n * @param {*} value\n * @returns {*}\n */\nfunction normalizeAttrValue(value) {\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.valueOf === 'function'\n\t\t? value.valueOf()\n\t\t: value;\n}\n\n/**\n * Serialize an HTML attribute to a string. This function is not\n * expected to be used directly, but rather through a precompile\n * JSX transform\n * @param {string} name The attribute name\n * @param {*} value The attribute value\n * @returns {string}\n */\nfunction jsxAttr(name, value) {\n\tif (options.attr) {\n\t\tconst result = options.attr(name, value);\n\t\tif (typeof result === 'string') return result;\n\t}\n\n\tvalue = normalizeAttrValue(value);\n\n\tif (name === 'ref' || name === 'key') return '';\n\tif (name === 'style' && typeof value === 'object') {\n\t\tlet str = '';\n\t\tfor (let prop in value) {\n\t\t\tlet val = value[prop];\n\t\t\tif (val != null && val !== '') {\n\t\t\t\tconst name =\n\t\t\t\t\tprop[0] == '-'\n\t\t\t\t\t\t? prop\n\t\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t\t\t(JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());\n\n\t\t\t\tlet suffix = ';';\n\t\t\t\tif (\n\t\t\t\t\ttypeof val === 'number' &&\n\t\t\t\t\t// Exclude custom-attributes\n\t\t\t\t\t!name.startsWith('--') &&\n\t\t\t\t\t!IS_NON_DIMENSIONAL.test(name)\n\t\t\t\t) {\n\t\t\t\t\tsuffix = 'px;';\n\t\t\t\t}\n\t\t\t\tstr = str + name + ':' + val + suffix;\n\t\t\t}\n\t\t}\n\t\treturn name + '=\"' + encodeEntities(str) + '\"';\n\t}\n\n\tif (\n\t\tvalue == null ||\n\t\tvalue === false ||\n\t\ttypeof value === 'function' ||\n\t\ttypeof value === 'object'\n\t) {\n\t\treturn '';\n\t} else if (value === true) return name;\n\n\treturn name + '=\"' + encodeEntities('' + value) + '\"';\n}\n\n/**\n * Escape a dynamic child passed to `jsxTemplate`. This function\n * is not expected to be used directly, but rather through a\n * precompile JSX transform\n * @param {*} value\n * @returns {string | null | VNode | Array}\n */\nfunction jsxEscape(value) {\n\tif (\n\t\tvalue == null ||\n\t\ttypeof value === 'boolean' ||\n\t\ttypeof value === 'function'\n\t) {\n\t\treturn null;\n\t}\n\n\tif (typeof value === 'object') {\n\t\t// Check for VNode\n\t\tif (value.constructor === undefined) return value;\n\n\t\tif (isArray(value)) {\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tvalue[i] = jsxEscape(value[i]);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}\n\n\treturn encodeEntities('' + value);\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment,\n\t// precompiled JSX transform\n\tjsxTemplate,\n\tjsxAttr,\n\tjsxEscape\n};\n","import type {\n QuartzComponent,\n QuartzComponentProps,\n QuartzComponentConstructor,\n} from \"@quartz-community/types\";\nimport { classNames } from \"../util/lang\";\nimport { i18n } from \"../i18n\";\nimport style from \"./styles/search.scss\";\n// @ts-expect-error - inline script imported as string by esbuild loader\nimport script from \"./scripts/search.inline.ts\";\n\nexport type SearchField = \"title\" | \"content\" | \"tags\";\n\nexport interface SearchOptions {\n enablePreview: boolean;\n fieldPriority: SearchField[];\n}\n\nconst defaultOptions: SearchOptions = {\n enablePreview: true,\n fieldPriority: [\"title\", \"content\", \"tags\"],\n};\n\nexport default ((userOpts?: Partial) => {\n const Search: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {\n const opts = { ...defaultOptions, ...userOpts };\n const locale = cfg.locale ?? \"en-US\";\n const searchPlaceholder = i18n(locale).components.search.searchBarPlaceholder;\n\n return (\n
    \n \n \n Search\n \n \n \n \n \n

    {i18n(locale).components.search.title}

    \n \n
    \n
    \n \n
    \n
    \n
    \n \n );\n };\n\n Search.afterDOMLoaded = script;\n Search.css = style;\n\n return Search;\n}) satisfies QuartzComponentConstructor;\n"]} \ No newline at end of file diff --git a/src/components/scripts/search.inline.ts b/src/components/scripts/search.inline.ts index b5a6e46..eaad3ea 100644 --- a/src/components/scripts/search.inline.ts +++ b/src/components/scripts/search.inline.ts @@ -325,19 +325,25 @@ async function setupSearch() { const titleEl = document.createElement("h3"); titleEl.className = "card-title"; - titleEl.innerHTML = item.title; + titleEl.textContent = item.title; itemTile.appendChild(titleEl); if (item.tags.length > 0) { const tagList = document.createElement("ul"); tagList.className = "tags"; - tagList.innerHTML = item.tags.join(""); + tagList.textContent = ""; + for (const tag of item.tags) { + const li = document.createElement("li"); + li.textContent = tag.replace(/<[^>]*>/g, ""); + tagList.appendChild(li); + } itemTile.appendChild(tagList); } const descEl = document.createElement("p"); descEl.className = "card-description"; - descEl.innerHTML = item.content; + // Sanitize content but preserve tags from search highlighting + descEl.innerHTML = item.content.replace(/<(?!\/?mark\b)[^>]*>/gi, ""); itemTile.appendChild(descEl); results.appendChild(itemTile);