function loadStork(){var e=document.querySelector("meta[name='base']").getAttribute("content");"/"==e.slice(-1)&&(e=e.slice(0,-1)),stork.initialize(e+"/stork.wasm").then(()=>{}).catch(e=>{}),stork.register("stork",e+"/stork.st")}(()=>{function r(e){var t=o[e];return void 0!==t||(t=o[e]={exports:{}},n[e].call(t.exports,t,t.exports,r)),t.exports}var n={214:(e,t,r)=>{function o(e){return s[e]}function d(){return n=null!==n&&n.buffer===p.memory.buffer?n:new Uint8Array(p.memory.buffer)}function h(n,r,t){if(void 0===t){let e=l.encode(n),t=r(e.length);return d().subarray(t,t+e.length).set(e),m=e.length,t}let o=n.length,s=r(o);var i=d();let a=0;for(;av,wasm_register_index:()=>function(e,t){try{var n=p.__wbindgen_add_to_stack_pointer(-16),r=h(e,p.__wbindgen_malloc,p.__wbindgen_realloc),o=m,s=(u=t,c=(0,p.__wbindgen_malloc)(+u.length),d().set(u,+c),m=u.length,c),i=m,a=(p.wasm_register_index(n,r,o,s,i),f()[n/4+0]),l=f()[n/4+1];return g(a,l)}finally{p.__wbindgen_add_to_stack_pointer(16),p.__wbindgen_free(a,l)}var u,c},wasm_search:()=>function(e,t){try{var n=p.__wbindgen_add_to_stack_pointer(-16),r=h(e,p.__wbindgen_malloc,p.__wbindgen_realloc),o=m,s=h(t,p.__wbindgen_malloc,p.__wbindgen_realloc),i=m,a=(p.wasm_search(n,r,o,s,i),f()[n/4+0]),l=f()[n/4+1];return g(a,l)}finally{p.__wbindgen_add_to_stack_pointer(16),p.__wbindgen_free(a,l)}},wasm_stork_version:()=>function(){try{var e=p.__wbindgen_add_to_stack_pointer(-16),t=(p.wasm_stork_version(e),f()[e/4+0]),n=f()[e/4+1];return g(t,n)}finally{p.__wbindgen_add_to_stack_pointer(16),p.__wbindgen_free(t,n)}}}),Array(32).fill(void 0)),i=(s.push(void 0,null,!0,!1),s.length),m=0,n=null,l=new TextEncoder("utf-8"),u="function"==typeof l.encodeInto?function(e,t){return l.encodeInto(e,t)}:function(e,t){var n=l.encode(e);return t.set(n),{read:e.length,written:n.length}},a=null,c=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),v=(c.decode(),async function e(t){void 0===t&&(t=new URL("stork_bg.wasm",function(){var e=r.p;let t="";return e&&~e.indexOf("://")||(t+=window.location.protocol+"//"+window.location.host),(t+=e||"/")+"node_modules/stork-search/stork.js"}()));var n={wbg:{}},{instance:t,module:n}=(n.wbg.__wbg_new_693216e109162396=function(){return e=Error(),i===s.length&&s.push(s.length+1),t=i,i=s[t],s[t]=e,t;var e,t},n.wbg.__wbg_stack_0ddaca5d1abfb52f=function(e,t){var t=h(o(t).stack,p.__wbindgen_malloc,p.__wbindgen_realloc),n=m;f()[e/4+1]=n,f()[e/4+0]=t},n.wbg.__wbg_error_09919627ac0992f5=function(e,t){p.__wbindgen_free(e,t)},n.wbg.__wbindgen_object_drop_ref=function(e){o(e),(e=e)<36||(s[e]=i,i=e)},await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t}var n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}(await(t="string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL?fetch(t):t),n));return p=t.exports,e.__wbindgen_wasm_module=n,p})},914:(e,l,t)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.calculateOverriddenConfig=l.defaultConfig=void 0;var u=t(445),c=t(466);l.defaultConfig={showProgress:!0,printIndexInfo:!1,showScores:!1,showCloseButton:!0,minimumQueryLength:3,forceOverwrite:!1,resultNoun:{singular:"file",plural:"files"},onQueryUpdate:void 0,onResultSelected:void 0,onResultsHidden:void 0,onInputCleared:void 0,transformResultUrl:function(e){return e}},l.calculateOverriddenConfig=function(e){var t,n=(0,c.difference)(Object.keys(e),Object.keys(l.defaultConfig));if(0{Object.defineProperty(t,"__esModule",{value:!0}),t.existsBeyondContainerBounds=t.setText=t.clear=t.add=t.create=void 0,t.create=function(e,t){e=document.createElement(e);return t.classNames&&e.setAttribute("class",t.classNames.join(" ")),e},t.add=function(e,t,n){n.insertAdjacentElement(t,e)},t.clear=function(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)},t.setText=function(e,t){t=document.createTextNode(t);e&&e.firstChild?e.replaceChild(t,e.firstChild):e&&e.appendChild(t)},t.existsBeyondContainerBounds=function(e,t){e=e.getBoundingClientRect(),t=t.getBoundingClientRect();return e.bottom>t.bottom||e.top{Object.defineProperty(t,"__esModule",{value:!0}),t.Entity=void 0;var r=n(139),o=n(771),s=n(214),i=n(445);function a(e,t,n){var r=this;this._state="initialized",this.downloadProgress=0,this.results=[],this.totalResultCount=0,this.eventListenerFunctions={},this.highlightedResult=0,this.resultsVisible=!1,this.hoverSelectEnabled=!0,this.setDownloadProgress=function(e){r.state="loading",r.downloadProgress=e,r.config.showProgress&&r.render()},this.name=e,this.url=t,this.config=n}Object.defineProperty(a.prototype,"state",{get:function(){return this._state},set:function(e){this._state=e,this.render()},enumerable:!1,configurable:!0}),a.prototype.getCurrentMessage=function(){var e;return this.domManager?(e=this.domManager.getQuery(),"error"===this.state?"Error! Check the browser console.":"ready"!=this.state?"Loading...":(null==e?void 0:e.length){Object.defineProperty(t,"__esModule",{value:!0}),t.EntityDom=void 0;var a=n(227),i=n(9),o={results:[],resultsVisible:!1,showScores:!1,message:null,showProgress:!1,progress:1,state:"ready"};function r(n,e){var r=this,e=(this.scrollAnchorPoint="end",this.entity=e,[{selector:'input[data-stork="'.concat(n,'"]'),elementName:"input"},{selector:'div[data-stork="'.concat(n,'-output"]'),elementName:"output"}].map(function(e){var t=document.querySelector(e.selector);if(t)return t;throw Error('Could not register search box "'.concat(n,'": ').concat(e.elementName," element not found. Make sure an element matches the query selector `").concat(e.selector,"`"))})),t=e[0],e=e[1];this.elements={input:t,output:e,list:(0,a.create)("ul",{classNames:["stork-results"]}),attribution:(0,a.create)("div",{classNames:["stork-attribution"]}),progress:(0,a.create)("div",{classNames:["stork-progress"]}),message:(0,a.create)("div",{classNames:["stork-message"]}),closeButton:(0,a.create)("button",{classNames:["stork-close-button"]})},this.elements.input.removeEventListener("input",this.entity.eventListenerFunctions.inputInputEvent),this.elements.input.removeEventListener("keydown",this.entity.eventListenerFunctions.inputKeydownEvent),this.entity.eventListenerFunctions={inputInputEvent:function(e){r.handleInputEvent(e)},inputKeydownEvent:function(e){r.handleKeyDownEvent(e)}},this.elements.input.addEventListener("input",this.entity.eventListenerFunctions.inputInputEvent),this.elements.input.addEventListener("keydown",this.entity.eventListenerFunctions.inputKeydownEvent),null!=(t=this.elements.list)&&t.addEventListener("mousemove",function(){r.hoverSelectEnabled=!0}),this.elements.attribution.innerHTML='Powered by Stork',this.elements.closeButton.innerHTML='\n\n\n\n\n\n\n\n',this.entity.config.showProgress&&(0,a.add)(this.elements.progress,"afterend",this.elements.input),null!=(e=this.elements.closeButton)&&e.addEventListener("click",function(){r.elements.input.value="",r.elements.input.focus(),r.render(o);var e=[r.entity.config.onInputCleared,r.entity.config.onResultsHidden],t=e[0],e=e[1];t&&t(),e&&e()})}r.prototype.clearDom=function(){var e;(0,a.clear)(this.elements.output),(0,a.clear)(this.elements.list),null!=(e=this.elements.closeButton)&&e.remove(),this.elements.output.classList.remove("stork-output-visible")},r.prototype.render=function(r){var e,o=this,t=this.elements.input.value;if(this.clearDom(),(this.lastRenderState=r).showProgress&&((e=function(){switch(r.state){case"ready":case"error":return 1;case"initialized":case"loading":return.9*r.progress+.05}}())<1?(this.elements.progress.style.width="".concat(100*e,"%"),this.elements.progress.style.opacity="1"):(this.elements.progress.style.width="100%",this.elements.progress.style.opacity="0")),"error"===r.state&&this.elements.input.classList.add("stork-error"),0{Object.defineProperty(t,"__esModule",{value:!0}),t.loadIndexFromUrl=void 0,t.loadIndexFromUrl=function(e,r){var t=new XMLHttpRequest;t.addEventListener("load",function(e){var t=e.target,n=t.status,t=t.response;0!==n?n<200||299{Object.defineProperty(t,"__esModule",{value:!0}),t.highlight=void 0,t.highlight=function(e,t){function n(e,t,n){return e.substr(0,t)+n+e.substr(t)}for(var r=0,o=0,s=t;o',l="";e=n(e,i.beginning+r,a),r+=30,e=n(e,i.end+r,l),r+=7}return e}},9:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resultToListItem=void 0;var r=n(112);t.resultToListItem=function(e,t){var n=document.createElement("template");return n.innerHTML='\n
  • \n \n
    \n

    ').concat((0,r.highlight)(e.entry.title,e.title_highlight_ranges||[]),"

    \n ").concat(t.showScores?"".concat(e.score,""):"","\n
    \n ").concat(0':"","\n ").concat(e.excerpts.map(function(e){return'

    \n ...'.concat((0,r.highlight)(e.text,e.highlight_ranges||[]),"...\n

    \n ").concat(t.showScores?"".concat(e.score,""):"","\n
    ")}).join(""),"\n ").concat(0":"","\n
    \n
  • "),n.content.firstElementChild}},139:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSearch=void 0;var o=n(214),s=n(445);t.resolveSearch=function(e,t){var n=null,r=null;try{n=(0,o.wasm_search)(e,t),r=JSON.parse(n)}catch(e){throw new s.default("Could not parse data from wasm_search. If you see this, please file a bug: https://jil.im/storkbug "+n)}if(!r)throw new s.default("Data was an empty object");if(r.error)throw new s.default("Could not perform search: the WASM binary failed to return search results.\n You might not be serving your search index properly.\n If you think this is an error, please file a bug: https://jil.im/storkbug\n \n The WASM binary came back with:\n ".concat(r.error));return r}},445:function(e,t){var r,n,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)!{}.hasOwnProperty.call(t,n)||(e[n]=t[n])}))(e,t)},function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+t+" is not a constructor or null");r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=(Object.defineProperty(t,"__esModule",{value:!0}),o(s,n=Error),s);function s(e){e=n.call(this,e)||this;return e.name="StorkError",e}t.default=o},466:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.plural=t.difference=t.htmlToElement=void 0,t.htmlToElement=function(e){var t=document.createElement("template");return e=e.trim(),t.innerHTML=e,t.content.firstChild},t.difference=function(e,t){var n=new Set(t),t=new Set(Array.from(new Set(e)).filter(function(e){return!n.has(e)}));return Array.from(t)},t.plural=function(e,t,n){return 1==e?t:n}},34:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateIndexParams=void 0;var r=n(445);t.validateIndexParams=function(e,t){return"string"!=typeof e?new r.default("Index registration name must be a string."):"string"!=typeof t?new r.default("URL must be a string."):null}},258:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.debug=t.loadWasm=t.runAfterWasmLoaded=void 0;var r=n(214),o=n(445),s=null,i=null,a=[],l=[],u=(t.loadWasm=function(e){var t;return i||(t=(e=void 0===e?null:e)||"https://files.stork-search.net/releases/v1.5.0/stork.wasm",s=t,e=(0,r.default)(t).then(function(){return u(),t}).catch(function(){throw c(),new o.default("Error while loading WASM at ".concat(t))}),i=e)},t.runAfterWasmLoaded=function(e,t){return i?(i.then(function(){return e()}).catch(function(){return t()}),i):(a.push(e),l.push(t),null)},function(){a.forEach(function(e){e()}),a=[]}),c=function(){l.forEach(function(e){e()}),l=[]};t.debug=function(){return{wasmSourceUrl:s,wasmLoadPromise:i,queueLength:a.length}}}},o={};r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("","return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>({}).hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.g.importScripts&&(e=r.g.location+"");var e,t=r.g.document;if(e||!t||(e=t.currentScript?t.currentScript.src:e)||(t=t.getElementsByTagName("script")).length&&(e=t[t.length-1].src),!e)throw Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e;t=r(480);stork=t})();var stork,loaded=!1;window.onload=function(){document.body.contains(document.goSearch)&&(document.goSearch.onsubmit=function(){return goSearchNow()}),document.getElementById("searchinput").onfocus=function(){loaded||(loadStork(),loaded=!0,document.body.contains(document.goSearch)&&(document.goSearch.onsubmit=function(){return goSearchNow()})),document.getElementById("searchinput").onfocus=""}};