1import{s as h,a as y}from"./vendor-database.js";import{g as C,b as D,i as M,c as P}from"./vendor-database.js";import{s as v}from"./vendor-search-dom.js";import{b as z}from"./vendor-search-dom.js";import"./vendor-i18n.js";import"./vendor-storage.js";import"./vendor-worker-client-factory.js";import"./vendor-asset.js";import"./vendor-dom.js";import"./vendor-device.js";import"./vendor-toast.js";import"./vendor-debounce.js";let m=!1,s=null,f=!1,p=0;function S(e){if(!e)return;const a=e.querySelector("[data-child-search]"),t=e.querySelector(".js-search-input"),r=e.querySelector(".js-search-skeleton"),c=e.querySelector("#js-search-close-backdrop");c&&!f&&(c.addEventListener("click",()=>l(e)),f=!0),e.addEventListener("cancel",o=>{o.preventDefault(),l(e)}),e.addEventListener("keydown",o=>{if(o.key==="Tab"){const i=Array.from(e.querySelectorAll('input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])')).filter(u=>!u.hasAttribute("disabled")&&u.offsetParent!==null);if(i.length===0)return;const n=i[0],d=i[i.length-1];o.shiftKey?document.activeElement===n&&(d.focus(),o.preventDefault()):document.activeElement===d&&(n.focus(),o.preventDefault())}}),s=document.activeElement,p=window.scrollY,e.showModal(),requestAnimationFrame(()=>{e.classList.add("is-active")}),m||(a&&v(a),m=!0),r&&r.classList.add("hidden"),setTimeout(()=>{t&&t.focus()},100)}function l(e){e.classList.remove("is-active");const a=e.querySelector("[data-child-search]");h("all",a||void 0);const t=e.querySelector(".js-search-filters");t&&(t.classList.add("hidden"),t.classList.remove("flex"),t.querySelectorAll("[data-filter-type]").forEach((r,c)=>{y(r,c===0)})),setTimeout(()=>{const r=p;e.close(),window.scrollTo({top:r,behavior:"instant"}),s&&typeof s.focus=="function"&&document.body.contains(s)&&s.focus({preventScroll:!0})},250)}export{z as bootChildSearches,l as closeSearchModal,C as getPostByUrlFromWorker,D as getRelatedPostsFromWorker,M as initSearch,S as initSearchModal,P as searchFuzzyFromWorker};
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.