PageSourceSearch

https://www.solid-ui.com/_build/assets/N3GAC5SS-BSVYtPDk.js

js solid-ui.com collected 2026-09-24 10:38:36 UTC 2,542 bytes, 1 lines download raw bytes

1import{c as a}from"./QZDH5R5B-B5gWAUyQ.js";import{c as n}from"./LR7LBJN3-BrEpP08k.js";import{a as r}from"./web-Daoi1TEa.js";import{b as i}from"./R5675YMU-DknHYXiZ.js";var u=class{collection;ref;collator;constructor(e,t,l){this.collection=e,this.ref=t,this.collator=l}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const l=this.collection().getItem(t);if(l&&l.type==="item"&&!l.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const l=this.collection().getItem(t);if(l&&l.type==="item"&&!l.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){const t=this.ref?.();let l=this.getItem(e);if(!t||!l)return;const s=Math.max(0,l.offsetTop+l.offsetHeight-t.offsetHeight);let o=e;for(;o&&l&&l.offsetTop>s;)o=this.getKeyAbove(o),l=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){const t=this.ref?.();let l=this.getItem(e);if(!t||!l)return;const s=Math.min(t.scrollHeight,l.offsetTop-l.offsetHeight+t.offsetHeight);let o=e;for(;o&&l&&l.offsetTop<s;)o=this.getKeyBelow(o),l=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,t){const l=this.collator?.();if(!l)return;let s=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;s!=null;){const o=this.collection().getItem(s);if(o){const c=o.textValue.slice(0,e.length);if(o.textValue&&l.compare(c,e)===0)return s}s=this.getKeyBelow(s)}}};function m(e,t,l){const s=n({usage:"search",sensitivity:"base"}),o=r(()=>{const c=i(e.keyboardDelegate);return c||new u(e.collection,t,s)});return a({selectionManager:()=>i(e.selectionManager),keyboardDelegate:o,autoFocus:()=>i(e.autoFocus),deferAutoFocus:()=>i(e.deferAutoFocus),shouldFocusWrap:()=>i(e.shouldFocusWrap),disallowEmptySelection:()=>i(e.disallowEmptySelection),selectOnFocus:()=>i(e.selectOnFocus),disallowTypeAhead:()=>i(e.disallowTypeAhead),shouldUseVirtualFocus:()=>i(e.shouldUseVirtualFocus),allowsTabNavigation:()=>i(e.allowsTabNavigation),isVirtualized:()=>i(e.isVirtualized),scrollToKey:c=>i(e.scrollToKey)?.(c),orientation:()=>i(e.orientation)},t,l)}export{u as L,m as c};

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.