1var e;function t(e,t,n){if(e.querySelector(n))return;let r=document.getElementById(t);r instanceof HTMLTemplateElement&&e.appendChild(r.content.cloneNode(!0))}var n=class{dialog;input=null;targets=[];activeIndex=-1;wired=!1;suppressFocusinSync=!1;keydownHandler;focusinHandler;dialogStateHandler;resultsContainerId=`aspire-search-results`;targetSelector=`.pagefind-ui__result-link, .pagefind-ui__button, a[data-api-search-link]`;constructor(e){this.dialog=e,this.keydownHandler=e=>this.handleKey(e),this.focusinHandler=e=>this.handleFocusIn(e),this.dialogStateHandler=()=>{this.input?.setAttribute(`aria-expanded`,this.dialog.open?`true`:`false`)}}refresh(){let e=this.dialog.querySelector(`.pagefind-ui__search-input`);e&&!this.wired&&(this.input=e,e.setAttribute(`role`,`combobox`),e.setAttribute(`aria-autocomplete`,`list`),e.setAttribute(`aria-controls`,this.resultsContainerId),e.setAttribute(`aria-expanded`,`false`),this.dialog.addEventListener(`keydown`,this.keydownHandler,!0),this.dialog.addEventListener(`focusin`,this.focusinHandler),this.dialog.addEventListener(`close`,this.dialogStateHandler),this.wired=!0),this.input?.setAttribute(`aria-expanded`,this.dialog.open?`true`:`false`);let t=this.dialog.querySelector(`.pagefind-ui__results`);t&&(t.id=this.resultsContainerId,t.setAttribute(`role`,`listbox`));let n=Array.from(this.dialog.querySelectorAll(this.targetSelector));if(n.forEach((e,t)=>{e.id||=`aspire-search-target-${t}`,e.classList.contains(`pagefind-ui__result-link`)&&e.setAttribute(`role`,`option`)}),n.length===this.targets.length&&n.every((e,t)=>e===this.targets[t]))return;let r=this.activeIndex>=0&&this.targets[this.activeIndex]instanceof HTMLAnchorElement&&this.targets[this.activeIndex]?.classList.contains(`pagefind-ui__result-link`)?this.targets[this.activeIndex]:null,i=new Set(n);for(let e of this.targets)i.has(e)||(e.removeAttribute(`data-search-active`),e.getAttribute(`role`)===`option`&&e.setAttribute(`aria-selected`,`false`));if(this.targets=n,this.targets.length===0){this.activeIndex=-1,this.input?.removeAttribute(`aria-activedescendant`);return}let a=this.targets.findIndex(e=>e instanceof HTMLAnchorElement&&e.classList.contains(`pagefind-ui__result-link`)),o=-1;if(r&&(o=this.targets.indexOf(r),o<0)){let e=r.href;o=this.targets.findIndex(t=>t instanceof HTMLAnchorElement&&t.classList.contains(`pagefind-ui__result-link`)&&t.href===e)}o>=0?this.setActive(o,!1,!1):a>=0?this.setActive(a,!1,!1):(this.activeIndex=-1,this.input?.removeAttribute(`aria-activedescendant`))}setActive(e,t=!1,n=!0){if(this.activeIndex>=0&&this.targets[this.activeIndex]){let e=this.targets[this.activeIndex];e.removeAttribute(`data-search-active`),e.getAttribute(`role`)===`option`&&e.setAttribute(`aria-selected`,`false`)}if(this.activeIndex=e,e<0||!this.targets[e]){this.input?.removeAttribute(`aria-activedescendant`);return}let r=this.targets[e];if(r.setAttribute(`data-search-active`,`true`),r.getAttribute(`role`)===`option`?(r.setAttribute(`aria-selected`,`true`),this.input?.setAttribute(`aria-activedescendant`,r.id)):this.input?.removeAttribute(`aria-activedescendant`),t&&document.activeElement!==r&&(this.suppressFocusinSync=!0,r.focus({preventScroll:!0}),this.suppressFocusinSync=!1),n){let e=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;r.scrollIntoView({block:`nearest`,behavior:e?`auto`:`smooth`})}}handleKey(e){if(e.key===`ArrowDown`){if(this.targets.length===0)return;e.preventDefault();let t=this.activeIndex<0?0:(this.activeIndex+1)%this.targets.length;this.setActive(t,!0)}else if(e.key===`ArrowUp`){if(this.targets.length===0)return;e.preventDefault();let t=this.activeIndex<=0?this.targets.length-1:this.activeIndex-1;this.setActive(t,!0)}else e.key===`Home`&&this.targets.length>0&&e.target!==this.input?(e.preventDefault(),this.setActive(0,!0)):e.key===`End`&&this.targets.length>0&&e.target!==this.input?(e.preventDefault(),this.setActive(this.targets.length-1,!0)):e.key===`Enter`&&this.activeIndex>=0&&this.targets[this.activeIndex]&&e.target===this.input&&(e.preventDefault(),this.targets[this.activeIndex].click())}handleFocusIn(e){if(this.suppressFocusinSync)return;let t=e.target;if(!(t instanceof HTMLElement))return;let n=this.targets.indexOf(t);n>=0&&n!==this.activeIndex&&this.setActive(n,!1,!1)}
1destroy(){this.dialog.removeEventListener(`keydown`,this.keydownHandler,!0),this.dialog.removeEventListener(`focusin`,this.focusinHandler),this.dialog.removeEventListener(`close`,this.dialogStateHandler)}},r=class{dialog;input=null;buttons=[];wired=!1;inputHandler;clickHandler;constructor(e){this.dialog=e,this.inputHandler=()=>this.update(),this.clickHandler=()=>this.update()}refresh(){if(!this.wired){let e=this.dialog.querySelector(`.pagefind-ui__search-input`);e&&(this.input=e,e.addEventListener(`input`,this.inputHandler),this.wired=!0)}let e=Array.from(this.dialog.querySelectorAll(`a[data-api-search-link]`));if(!(e.length===this.buttons.length&&e.every((e,t)=>e===this.buttons[t])&&this.buttons.length>0)){for(let e of this.buttons)e.removeEventListener(`mousedown`,this.clickHandler);this.buttons=e;for(let e of this.buttons)e.addEventListener(`mousedown`,this.clickHandler);this.update()}}update(){let e=(this.input?.value??``).trim();for(let t of this.buttons){let n=t.dataset.apiBaseHref??t.href.split(`?`)[0];t.href=e?`${n}?q=${encodeURIComponent(e)}`:n}}destroy(){this.input?.removeEventListener(`input`,this.inputHandler);for(let e of this.buttons)e.removeEventListener(`mousedown`,this.clickHandler)}};function i(){e?.(),e=void 0;let i=document.querySelector(`site-search`);if(!i)return;let a=i.querySelector(`dialog`),o=a?.querySelector(`.dialog-frame`);if(!a||!o)return;let s=new n(a),c=new r(a),l=()=>{t(o,`api-search-notice-tpl`,`.api-search-notice`),t(o,`search-keyboard-footer-tpl`,`.search-keyboard-footer`),s.refresh(),c.refresh()};l();let u=null,d=new MutationObserver(()=>{u===null&&(u=requestAnimationFrame(()=>{u=null,l()}))});d.observe(i,{childList:!0,subtree:!0}),e=()=>{u!==null&&cancelAnimationFrame(u),d.disconnect(),s.destroy(),c.destroy()}}i(),document.addEventListener(`astro:after-swap`,i);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.