1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="65407e93-0ec7-b489-5ec7-4b443d4ef1ed")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,868774,984822,15421,e=>{"use strict";e.i(238779);let t={current:null},r={current:!1};e.s(["hasReducedMotionListener",0,r,"prefersReducedMotion",0,t],984822);let s="u">typeof window;function n(){if(r.current=!0,s)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),r=()=>t.current=e.matches;e.addEventListener("change",r),r()}else t.current=!1}e.s(["initPrefersReducedMotion",0,n],15421);var a=e.i(38078);e.s(["useReducedMotion",0,function(){r.current||n();let[e]=(0,a.useState)(t.current);return e}],868774)},85665,e=>{"use strict";var t=e.i(48496),r=e.i(868774),s=e.i(38078);e.s(["AnimatedImage",0,function({poster:e,motionUrl:n,alt:a,fill:o,width:i,height:l,sizes:c,priority:u,className:d,style:m}){let p=(0,r.useReducedMotion)(),f=(0,s.useRef)(null),[h,g]=(0,s.useState)(!1);(0,s.useEffect)(()=>{if(!1!==p)return;let e=f.current;if(!e)return;if("u"<typeof IntersectionObserver)return void g(!0);let t=new IntersectionObserver(e=>{for(let r of e)if(r.isIntersecting){g(!0),t.disconnect();break}},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[p]);let x=h&&!1===p,b=o?{position:"absolute",inset:0,height:"100%",width:"100%",...m}:m;return(0,t.jsx)("img",{ref:f,src:x?n:e.url,srcSet:x?void 0:e.srcset||void 0,sizes:x?void 0:c,width:o?void 0:i,height:o?void 0:l,alt:a,loading:u?"eager":"lazy",fetchPriority:u?"high":"auto",decoding:"async",onError:x||!1!==p?void 0:()=>g(!0),className:d,style:b})}])},242620,e=>{"use strict";let t={person:"/index/people",work:"/index/works",organization:"/index/orgs",event:"/index/events"},r={concept:"/index/concepts",place:"/index/places"};e.s(["graphEntityHref",0,function(e){let s=(e.subtype?t[e.subtype]:void 0)??(e.node_kind?r[e.node_kind]:void 0);if(!s)return null;let n=`${s}/${e.node_pk}`;return e.slug?`${n}/${e.slug}`:n}])},981266,e=>{"use strict";let t="[deleted]";function r(e){return e&&(e.display_name||e.displayName||e.username)||t}e.s(["DELETED_AUTHOR_LABEL",0,t,"authorDisplayLabel",0,r,"conversationAuthorLabel",0,function(e){let t=e.subject_kind??"topic";return"article"===t?"Article discussion":"topic"!==t?"Index discussion":r(e.author)}])},567277,e=>{"use strict";e.s(["conversationHref",0,function(e){let t=e.cosmetic_slug??e.slug;return`/post/${e.id}/${t}`}])},950216,e=>{"use strict";var t=e.i(48496),r=e.i(466549),s=e.i(647163);e.s(["Spinner",0,function({className:e,...n}
2){return(0,t.jsx)(r.Loader2Icon,{role:"status","aria-label":"Loading",className:(0,s.cn)("size-4 animate-spin",e),...n})}])},638083,e=>{"use strict";var t=e.i(48496),r=e.i(38078),s=e.i(96923);e.s(["SearchTelemetry",0,function({snapshot:e,children:n}){let a=(0,r.useRef)(null),o=(0,r.useContext)(s.AnalyticsCaptureContext);return(0,r.useEffect)(()=>{if(!o)return;let t=JSON.stringify(e);if(a.current===t||(a.current=t,!e.query))return;let r=e.counts.articles+e.counts.forum+e.counts.members+e.counts.comments+e.counts.index;(0,s.captureEvent)("search_results_rendered",{query:e.query,tab:e.tab,page:e.page,articles_count:e.counts.articles,forum_count:e.counts.forum,members_count:e.counts.members,comments_count:e.counts.comments,graph_count:e.counts.index,total:r});let n="all"===e.tab?r:"articles"===e.tab?e.counts.articles:"forum"===e.tab?e.counts.forum:"members"===e.tab?e.counts.members:"comments"===e.tab?e.counts.comments:e.counts.index,i=!!e.errors.articles||!!e.errors.forum||!!e.errors.members||!!e.errors.comments||!!e.errors.index,l="all"===e.tab?i:!!e.errors[e.tab];for(let t of(0!==n||l||(0,s.captureEvent)("search_zero_results",{query:e.query,tab:e.tab}),["articles","forum","members","comments","index"])){e.errors[t]&&(0,s.captureEvent)("search_source_error",{source:t,query:e.query,tab:e.tab});let r=e.latencyMs[t];"number"==typeof r&&(0,s.captureEvent)("search_source_latency",{source:t,ms:r,query:e.query})}},[e,o]),(0,t.jsx)("div",{onClick:t=>{if(!(t.target instanceof Element))return;let r=t.target,n=r.closest("[data-search-tab]");if(n){let t=n.dataset.searchTab;t&&t!==e.tab&&(0,s.captureEvent)("search_tab_clicked",{from_tab:e.tab,to_tab:t,query:e.query});return}let a=r.closest("[data-search-result]");if(a){let t=r.closest("a");if(a!==t){let e=a.dataset.searchResultHref,r=t instanceof HTMLAnchorElement?t.pathname:null;if(!e||e!==r)return}let n=a.dataset.searchResult,o=Number.parseInt(a.dataset.searchResultPosition??"0",10),i=a.dataset.searchResultTarget??null;(0,s.captureEvent)("search_result_clicked",{source:n,query:e.query,tab:e.tab,position:Number.isFinite(o)?o:0,target_id:i})}},children:n})}])},563357,e=>{"use strict";var t=e.i(48496),r=e.i(207231),s=e.i(495065),n=e.i(900090),a=e.i(38078),o=e.i(96923),i=e.i(292676),l=e.i(950216),c=e.i(242620),u=e.i(647163),d=e.i(567277),m=e.i(981266),p=e.i(347102);function f({value:e,onChange:r,onSubmit:s,onFocus:n,onBlur:i,placeholder:l="Search",ariaLabel:c="Search",className:d,containerClassName:m,iconClassName:h}){let[g,x]=(0,a.useState)(!1);return(0,t.jsx)("form",{onSubmit:t=>{t.preventDefault(),e.trim()&&(0,o.captureEvent)("search_submitted",{query:e.trim()}),s?.(e)},className:(0,u.cn)("relative",d),children:(0,t.jsxs)("div",{className:(0,u.cn)("group flex items-center gap-2.5 rounded-full border bg-card px-4 py-2",g?"border-foreground
2/35":"border-border",m),children:[(0,t.jsx)(p.IconSearch,{className:(0,u.cn)("h-3.5 w-3.5 shrink-0 text-muted-foreground transition-colors group-hover:text-foreground/80",h)}),(0,t.jsx)("input",{type:"text",name:"q","aria-label":c,value:e,onChange:e=>r(e.target.value),onFocus:()=>{x(!0),n?.()},onBlur:()=>{x(!1),i?.()},placeholder:l,autoComplete:"off",className:"flex-1 bg-transparent text-sm text-muted-foreground placeholder:text-muted-foreground focus:text-foreground focus:outline-none hover:text-foreground/85"})]})})}let h={articles:[],forumTopics:[],entities:[]};function g({label:e,children:r}){return(0,t.jsxs)("section",{className:"border-b border-border last:border-b-0",children:[(0,t.jsx)("h3",{className:"px-4 pt-3 pb-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:e}),(0,t.jsx)("ul",{className:"pb-2",children:r})]})}e.s(["SearchWrapper",0,function({className:e,placeholder:p="Search",dropdownClassName:x,inputContainerClassName:b,inputIconClassName:y,variant:v="compact"}){let N=(0,n.useRouter)(),j=(0,n.usePathname)(),w=(0,n.useSearchParams)(),E=(0,a.useRef)(null),_=(0,a.useRef)(null),[S,k]=(0,a.useState)(""),[T,C]=(0,a.useState)(null),[A,R]=(0,a.useState)(h),[q,L]=(0,a.useState)(!1),[P,$]=(0,a.useState)(!1),[I,z]=(0,a.useState)(!1),[F,H]=(0,a.useTransition)(),M=(0,a.useContext)(o.AnalyticsCaptureContext),D=(0,a.useRef)("");(0,a.useEffect)(()=>{j.startsWith("/search")&&(k(w.get("q")?.trim()??""),$(!1))},[j,w]),(0,a.useEffect)(()=>{"page"===v&&_.current?.focus({preventScroll:!0})},[v]),(0,a.useEffect)(()=>{if("page"!==v)return;let e=e=>{if("/"!==e.key||e.defaultPrevented||e.metaKey||e.ctrlKey||e.altKey||e.isComposing)return;let t=e.target;t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||t.isContentEditable)||document.activeElement!==_.current&&(e.preventDefault(),_.current?.focus({preventScroll:!0}))};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[v]),(0,a.useEffect)(()=>{let e=e=>{E.current?.contains(e.target)||$(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,a.useEffect)(()=>{let e=S.trim();if(!e){R(h),L(!1),z(!1);return}if(!P)return;let t=new AbortController,r=window.setTimeout(async()=>{L(!0);try{let r=await fetch(`/api/search/suggestions?q=${encodeURIComponent(e)}`,{signal:t.signal});if(!r.ok)throw Error("Failed to fetch suggestions");let s=await r.json(),n={articles:Array.isArray(s.articles)?s.articles:[],forumTopics:Array.isArray(s.forumTopics)?s.forumTopics:[],entities:Array.isArray(s.entities)?s.entities:[]};if(R(n),z(!0),D.current=e,M)for(let[t,s]of((0,o.captureEvent)("search_typeahead_rendered",{query:e,articles_count:n.articles.length,forum_count:n.forumTopics.length,graph_count:n.entities.length}),[["articles","x-search-articles-ms"],["forum","x-search-forum-ms"],["index","x-search-entities-ms"]])){let n=Number.parseInt(r.headers.get(s)??"",10);Number.isFinite(n)&&(0,o.captureEvent)("search_typeahead_latency",{source:t,ms:n,query:e})}}catch(t){if(t instanceof Error&&"AbortError"===t.name)return;R(h),z(!0),D.current=e}finally{L(!1)}},180);return()=>{t.abort(),window.clearTimeout(r)}},[S,M,P]);let B=e=>{let t=e.trim();if(!t)return void C("Please enter a search query.");C(null),$(!1);let r=new URLSearchParams({q:t});H(()=>{N.push(`/search?${r.toString()}`)})},O=S.trim(),U=A.articles.length+A.forumTopics.length+A.entities.length,K=D.current===O&&O.length>0,W=P&&O.length>0&&(q||K&&(U>0||I))?(0,t.jsx)("div",{onClick:e=>{if(!M||!(e.target instanceof Element))return void $(!1);let t=e.target.closest("[data-typeahead-row]");if(t){let e=t.dataset.typeaheadRow,r=Number.parseInt(t.dataset.typeaheadPosition??"0",10),s=t.dataset.typeaheadTarget??null;(0,o.captureEvent)("search_typeahead_clicked",{source:e,query:O,position:Number.isFinite(r)?r:0,target_id:s})}$(!1)},className:(0,u.cn)("absolute left-0 top-full z-30 mt-2 w-full max-w-[calc(100vw-2rem)] overflow-hidden rounded-md border border-border bg-card",x),children:q?(0,t.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"Searching..."}):(0,t.jsxs)(t.Fragment,{children:[A.entities.length>0?(0,t.jsx)(g,{label:"Index",children:A.entities.map((e,r)=>{let n=(0,c.graphEntityHref)({subtype:e.subtype,node_pk:e.nodePk,slug:e.slug});return n?(0,t.jsx)("li",{children:(0,t.jsxs)(s.default,{href:n,"data-typeahead-row":"index","data-typeahead-position":r,"data-typeahead-target":`${e.subtype}:${e.nodePk}`,className:"group flex items-baseline justify-between gap-3 px-4 py-2 transition-colors hover:bg-accent/40",children:[(0,t.jsxs)("span",{className:(0,u.cn)("min-w-0 truncate text-sm text-foreground transition-colors group-hover:text-brand","exact"===e.tier?"font-semibold":"fuzzy"===e.tier?"italic text-muted-foreground":"font-medium"),children:["fuzzy"===e.tier?"~ ":null,e.displayName]}),(0,t.jsxs)("span",{className:"shrink-0 text-[11px] uppercase tracking-wide text-muted-foreground",children:[e.subtype,"alias"===e.via?" · alias":null]})]})},`${e.subtype}:${e.nodePk}`):null}
2).filter(Boolean)}):null,A.articles.length>0?(0,t.jsx)(g,{label:"Articles",children:A.articles.map((e,r)=>(0,t.jsx)("li",{children:(0,t.jsxs)(s.default,{href:`/article/${e.slug}`,"data-typeahead-row":"articles","data-typeahead-position":r,"data-typeahead-target":String(e.id),className:"group block px-4 py-2 transition-colors hover:bg-accent/40",children:[(0,t.jsx)("p",{className:"line-clamp-1 text-sm font-medium text-foreground transition-colors group-hover:text-brand",children:(0,u.stripHtml)(e.title)}),e.authorName?(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.authorName}):null]})},e.id))}):null,A.forumTopics.length>0?(0,t.jsx)(g,{label:"Forum topics",children:A.forumTopics.map((e,r)=>(0,t.jsx)("li",{children:(0,t.jsxs)(s.default,{href:(0,d.conversationHref)({id:e.id,slug:e.slug,cosmetic_slug:e.cosmeticSlug}),"data-typeahead-row":"forum","data-typeahead-position":r,"data-typeahead-target":String(e.id),className:"group block px-4 py-2 transition-colors hover:bg-accent/40",children:[(0,t.jsx)("p",{className:"line-clamp-1 text-sm font-medium text-foreground transition-colors group-hover:text-brand",children:(0,u.stripHtml)(e.title)}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.byline?`@${e.byline}`:m.DELETED_AUTHOR_LABEL})]})},e.id))}):null,0===U?(0,t.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:"No matching suggestions."}):null,(0,t.jsxs)("button",{type:"button",onClick:()=>B(S),"data-typeahead-row":"all-results","data-typeahead-position":0,className:"group block w-full border-t border-border px-4 py-2.5 text-left text-xs uppercase tracking-wide text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground",children:["Search all results for â",O,"â"," ",(0,t.jsx)("span",{"aria-hidden":"true",className:"inline-block transition-transform group-hover:translate-x-0.5",children:"â"})]})]})}):null;return(0,t.jsxs)("div",{ref:E,className:(0,u.cn)("space-y-2",e),children:[(0,t.jsx)("div",{className:"relative",children:"page"===v?(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=S.trim();t&&(0,o.captureEvent)("search_submitted",{query:t}),B(S)},"aria-busy":F,className:"flex w-full items-center gap-2",children:[(0,t.jsxs)("div",{className:"relative flex-1",children:[F?(0,t.jsx)(l.Spinner,{className:"pointer-events-none absolute top-1/2 left-4 h-4 w-4 -translate-y-1/2 text-muted-foreground"}):(0,t.jsx)(r.Search,{className:"pointer-events-none absolute left-4 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)("input",{ref:_,type:"search",name:"q","aria-label":"Search",autoComplete:"off",value:S,onChange:e=>{k(e.target.value),$(!0),T&&C(null)},onFocus:()=>{S.trim()&&$(!0)},placeholder:p,className:"h-14 w-full rounded-md border border-border bg-background pl-11 pr-11 text-base text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-foreground"}),(0,t.jsx)(i.SearchClearButton,{visible:S.length>0,size:"md",className:"right-4",onClear:()=>{k(""),$(!1),T&&C(null)}}),W]}),(0,t.jsx)("button",{type:"submit",className:"h-14 rounded-md border border-border bg-card px-6 text-sm font-medium uppercase tracking-wide transition-colors hover:bg-accent/40",children:"Search"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f,{value:S,onChange:e=>{k(e),$(!0),T&&C(null)},onFocus:()=>{S.trim()&&$(!0)},onSubmit:B,placeholder:p,ariaLabel:"Search",containerClassName:b,iconClassName:y}),W]})}),T?(0,t.jsx)("p",{className:"text-xs text-destructive",children:T}):null]})}],563357)}]); 3 4//# debugId=65407e93-0ec7-b489-5ec7-4b443d4ef1ed
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.