PageSourceSearch

https://app.grasp-ai.com/_next/static/chunks/0qfpj1wetns89.js?dpl=d8de48641177ed4eda95b881703c2fec4b891f49

js grasp-ai.com collected 2026-10-08 01:17:23 UTC 41,100 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,283175,e=>{"use strict";var t=e.i(681307);let n=t.z.string().min(1).max(128).regex(/^[A-Za-z0-9_-]+$/);t.z.object({q:t.z.string().trim().max(200).default(""),recent:t.z.string().max(1032).transform(e=>e.split(",")).pipe(t.z.array(n).max(8)).optional()}),e.s(["MAX_RECENT_SEARCH_IDS",0,8,"recentSearchIdSchema",0,n])},916644,710346,828740,e=>{"use strict";var t=e.i(843476),n=e.i(774438),r=e.i(875266),a=e.i(800158);let i=new Map([...r.countryOptions.map(e=>[e.label.toLowerCase(),e.value]),["turkey","tr"]]);function s({countryCode:e,countryName:r,fallback:o="N/A",showLabel:c=!0}){let l=(e||(r?i.get(r.toLowerCase()):""))?.trim().toUpperCase(),u=r||(l?(0,n.countryCodeToCountry)(l):o);return l&&u&&u!==o?(0,t.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)(a.CountryFlag,{code:l,title:`Flag of ${u}`}),c?(0,t.jsx)("span",{className:"truncate",children:u}):null]}):(0,t.jsx)(t.Fragment,{children:u||o})}e.s(["CountryWithFlag",0,s],710346);var o=e.i(703309),c=e.i(848921),l=e.i(687017),u=e.i(603321);function d(e){try{let t=e.startsWith("http")?e:`https://${e}`;return new URL(t).hostname.replace(/^www\./,"")}catch{return e.replace(/^https?:\/\/(www\.)?/,"").split("/")[0]||e}}e.s(["CompanySearchResultContent",0,function({company:e,connectionIndicator:n}){var r;let a=(r=e.companySize)&&"N/A"!==r?r.replace(" in "," "):null,i=function(e){let t=e?.trim();if(!t||"N/A"===t)return null;let n=/^[a-z][a-z\d+\-.]*:/i.test(t)?t:`https://${t}`;try{let e=new URL(n);return"http:"===e.protocol||"https:"===e.protocol?e.href:null}catch{return null}}(e.url);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"text-workspace-search-icon flex size-4 shrink-0 items-center justify-center",children:e.url?(0,t.jsx)(o.FavIcon,{url:e.url,size:32,className:"size-4 object-contain",fallback:(0,t.jsx)(u.WorkspaceIcon,{name:"company",className:"size-4"})}):(0,t.jsx)(u.WorkspaceIcon,{name:"company",className:"text-workspace-search-icon size-4"})}),(0,t.jsx)(c.Row,{className:"min-w-0 flex-1 items-center gap-4",children:(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)(c.Row,{className:"min-w-0 items-center gap-2",children:[(0,t.jsx)(l.Text,{size:"xs",weight:"medium",className:"truncate leading-[1.4]",children:e.name||"Unnamed company"}),e.country?(0,t.jsx)("span",{className:"shrink-0",children:(0,t.jsx)(s,{countryCode:e.country,fallback:"",showLabel:!1})}):null,n]}),(0,t.jsxs)(c.Row,{className:"text-muted-foreground min-w-0 items-center gap-1.5 text-xs",children:[a?(0,t.jsx)("span",{className:"truncate",children:a}):null,a&&i?(0,t.jsx)("span",{className:"shrink-0",children:"·"}):null,i?(0,t.jsx)("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"no-link-style inline-flex min-w-0 cursor-pointer items-center hover:underline",title:i,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),onKeyDown:e=>{"Enter"===e.key&&e.stopPropagation()},children:(0,t.jsx)("span",{className:"truncate",children:d(i)})}):null,a||i?null:(0,t.jsx)("span",{children:"Company profile"})]})]})})]})},"getWebsiteLabel",0,d],916644);var p=e.i(110943),m=e.i(980539),h=e.i(48296),f=e.i(861411),y=e.i(137950);function g({count:e}){let{firmNetwork:n}=(0,p.useFeatureFlag)();return n&&e?(0,t.jsxs)(y.Badge,{variant:"secondary",size:"sm",className:"shrink-0 gap-1","aria-label":`${e} ${1===e?"connection":"connections"} in Firm Network`,children:[(0,t.jsx)(f.Icon,{name:"Network",className:"size-3","aria-hidden":"true"}),(0,t.jsx)("span",{className:"tabular-nums",children:e}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Firm Network"})]}):null}e.s(["RecentCompanyConnectionsIndicator",0,function({companyId:e}){let n=(0,m.useTeamConnections)(e),r=(0,h.groupTeamConnections)(n.data?.connections.filter(t=>t.companyId===e)??[]);return(0,t.jsx)(g,{count:r.filter(e=>"former"!==e.relationship).length})},"SearchConnectionsIndicator",0,g],828740)},183618,e=>{"use strict";var t=e.i(843476),n=e.i(266027),r=e.i(493801),a=e.i(566595),i=e.i(618566),s=e.i(526732),o=e.i(271645),c=e.i(424814),l=e.i(283175),u=e.i(916644),d=e.i(828740),p=e.i(662877),m=e.i(816558),h=e.i(528859),f=e.i(876617
1),y=e.i(342174),g=e.i(861411),x=e.i(385745),v=e.i(274644),w=e.i(991089),k=e.i(164517),b=e.i(321447),S=e.i(764231),j=e.i(624705),C=e.i(639937),N=e.i(603321),I=e.i(770352),R=e.i(263676),E=e.i(773901),A=e.i(928987);function L(e){return(0,t.jsx)(k.Command,{...e,className:(0,E.cn)("max-w-workspace-search h-auto min-w-0 shrink overflow-visible bg-transparent",e.className)})}let D=(0,o.forwardRef)(({shortcut:e,onClear:n,className:r,...a},i)=>(0,t.jsx)(S.PopoverAnchor,{asChild:!0,children:(0,t.jsxs)("div",{className:"bg-workspace-search-background text-foreground h-workspace-control focus-within:border-ring focus-within:ring-ring/50 flex items-center gap-2 rounded-md border border-transparent px-2 text-sm tracking-[0.012em] focus-within:ring-[3px]",children:[(0,t.jsx)(N.WorkspaceIcon,{name:"search"}),(0,t.jsx)(I.Command.Input,{...a,ref:i,className:(0,E.cn)("placeholder:text-muted-foreground text-workspace-input min-w-0 flex-1 bg-transparent px-0.5 py-px leading-[1.4] font-normal outline-none",r)}),a.value&&(0,t.jsx)("button",{type:"button","aria-label":"Clear search",className:"text-workspace-search-icon flex size-4 shrink-0 items-center justify-center",onMouseDown:e=>e.preventDefault(),onClick:n,children:(0,t.jsx)(R.X,{className:"size-3",strokeWidth:2})}),(0,t.jsx)("kbd",{className:"text-muted-foreground text-2xs font-sans whitespace-nowrap",children:e.replace(/⌘\s*/g,"⌘ ")})]})}));function T(e){return(0,t.jsx)(S.PopoverContent,{align:"start",sideOffset:w.workspaceInteraction.popupOffset,collisionPadding:w.workspaceInteraction.popupViewportInset,...e,className:(0,E.cn)("w-workspace-results shadow-workspace-search flex max-h-(--radix-popover-content-available-height) max-w-(--radix-popover-content-available-width) flex-col overflow-hidden rounded-lg p-0",e.className)})}function K(e){return(0,t.jsx)("div",{...e,className:(0,E.cn)("flex shrink-0 gap-0.5 overflow-x-auto border-b p-2",e.className)})}function P(e){return(0,t.jsx)(A.Button,{size:"sm",...e,className:(0,E.cn)("group h-workspace-control px-workspace-nav-gap text-workspace-caption gap-1","aria-pressed:bg-workspace-search-hover aria-pressed:text-workspace-search-selected",e.className)})}function M(e){return(0,t.jsx)("span",{...e,className:(0,E.cn)("text-muted-foreground group-aria-pressed:text-workspace-search-selected text-2xs tabular-nums",e.className)})}function O(e){return(0,t.jsx)("h2",{...e,className:(0,E.cn)("px-3 pt-3 pb-1.5 text-xs font-medium",e.className)})}function F({inline:e,highlightSelection:n,...r}){return(0,t.jsx)(k.CommandList,{...r,className:(0,E.cn)(e?"max-h-workspace-results-height min-h-0 overflow-y-auto px-1 pb-1 [&_[cmdk-group]]:p-0":"max-h-none min-h-0 flex-1",e&&n&&"[&_[cmdk-item][data-selected=true]]:bg-workspace-search-hover",r.className)})}function $({inline:e,...n}){return(0,t.jsx)(k.CommandItem,{...n,className:(0,E.cn)("hover:bg-workspace-search-hover",!e&&"data-[selected=true]:bg-workspace-search-hover",e&&"min-h-workspace-result rounded-workspace-result py-workspace-result-inset data-[selected=true]:hover:bg-workspace-search-hover gap-2.5 px-2 data-[selected=true]:bg-transparent",n.className)})}function U({title:e,context:n}){return(0,t.jsxs)("div",{className:"gap-workspace-compact-gap flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("div",{className:"truncate text-xs leading-[1.4] font-medium",children:e}),(0,t.jsx)("div",{className:"text-muted-foreground text-workspace-caption truncate leading-[1.4]",children:n})]})}function q(e){return(0,t.jsx)(A.Button,{asChild:!0,variant:"link",size:"sm",className:"text-muted-foreground w-full px-2 py-1 font-normal data-[selected=true]:underline",children:(0,t.jsx)(k.CommandItem,{...e})})}function z(e){return(0,t.jsx)(b.DialogContent,{...e,className:(0,E.cn)("h-workspace-dialog flex flex-col gap-0 overflow-hidden p-0 sm:max-w-2xl",e.className)})}function Q(e){return{id:e.companyId,type:"company",title:e.name?.trim()||e.url?.trim()||"Unnamed company",context:e.url?.trim()||"Company profile",href:`/companies?company=${encodeURIComponent(e.companyId)}&companyTab=overview`,company:e}}D.displayName="WorkspaceSearchInput";let _={chat:{label:"Chats",icon:"MessageSquare"},company:{label:"Companies",icon:"CompanySearch"}},Y=["company","chat"],W=["company","chat"],G=["first","second","third","fourth","fifth","sixth"],V=["first","second"];function B({showGroups:e}){let n=e?V:V.slice(0,1),r=e?G.slice(0,3):G;return(0,t.jsxs)("div",{role:"status","aria-label":"Searching",className:"p-2",children:[(0,t.jsx)("span",{className:"sr-only",children:"Searching…"}),(0,t.jsx)("div",{"aria-hidden":"true",children:n.map((e,n)=>(0,t.jsxs)("div",{className:"px-2 py-1.5",children:[(0,t.jsx)(C.Skeleton,{className:`mb-2 h-3 ${0===n?"w-12":"w-16"}`}),(0,t.jsx)("div",{className:"space-y-1",children:r.map((e,n)=>(0,t.jsxs)("div",{"data-testid":"global-search-skeleton-row",className:"flex items-center gap-3 px-2 py-2",children:[(0,t.jsx)(C.Skeleton,{className:"size-4 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,t.jsx)(C.Skeleton,{className:`h-4 ${n%2==0?"w-2/5":"w-3/5"}`}),(0,t.jsx)(C.Skeleton,{className:`h-3 ${n%2==0?"w-1/4":"w-1/3"}`})]})]},e))})]},e))})]})}
1function H({results:e,selectedType:n,inline:r,recent:a,onSelect:i}){return a?(0,t.jsx)(k.CommandGroup,{heading:r?void 0:"Recents",children:e.map(e=>(0,t.jsx)(J,{result:e,inline:r,onSelect:i},`${e.type}:${e.id}`))}):W.map(a=>{if("all"!==n&&n!==a)return null;let s=e.filter(e=>e.type===a);if(!s.length)return null;let{label:o}=_[a];return(0,t.jsx)(k.CommandGroup,{heading:"all"!==n&&r?void 0:o,children:s.map(e=>(0,t.jsx)(J,{result:e,inline:r,onSelect:i},`${a}:${e.id}`))},a)})}function J({result:e,inline:n,onSelect:r}){let{icon:a}=_[e.type];return(0,t.jsx)($,{inline:n,value:`${e.type}:${e.id}`,onSelect:()=>r(e),children:"company"===e.type&&e.company?(0,t.jsx)(u.CompanySearchResultContent,{company:e.company,connectionIndicator:null==e.teamConnectionCount?(0,t.jsx)(d.RecentCompanyConnectionsIndicator,{companyId:e.id}):(0,t.jsx)(d.SearchConnectionsIndicator,{count:e.teamConnectionCount})}):(0,t.jsxs)(t.Fragment,{children:[n&&"chat"===e.type?(0,t.jsx)(N.WorkspaceIcon,{name:"chat",className:"text-workspace-search-icon size-4"}):(0,t.jsx)(g.Icon,{name:a,className:"text-workspace-search-icon size-4",strokeWidth:w.workspaceInteraction.icon.stroke}),(0,t.jsx)(U,{title:e.title,context:(0,t.jsx)(X,{result:e})}),"company"===e.type&&(0,t.jsx)(d.SearchConnectionsIndicator,{count:e.teamConnectionCount}),"chat"===e.type&&e.pinnedAt&&(0,t.jsxs)("span",{className:"text-muted-foreground/80 shrink-0",children:[(0,t.jsx)(x.PinIcon,{"aria-hidden":"true",size:w.workspaceInteraction.icon.small}),(0,t.jsx)("span",{className:"sr-only",children:"Pinned"})]})]})})}function X({result:e}){if("company"===e.type)return e.context;let n=e.updatedAt?new Date(e.updatedAt):null,a=null!=n&&!Number.isNaN(n.getTime());return(0,t.jsxs)(t.Fragment,{children:[a&&(0,t.jsx)("time",{dateTime:e.updatedAt,title:`Updated ${n.toLocaleString()}`,children:(0,r.formatDistanceToNowStrict)(n,{addSuffix:!0})}),a&&e.projectName&&" · ",e.projectName&&(0,t.jsx)("span",{title:e.projectName,children:e.projectName})]})}async function Z(e,t,n){let r=new URLSearchParams({q:e});!e&&n?.length&&r.set("recent",n.join(","));let a=await fetch(`/api/global-search?${r}`,{signal:t});if(!a.ok)throw Error("Search is unavailable. Please try again.");return a.json()}function ee({onNavigate:e,loadResults:r,defaultQuery:a="",inline:c=!1,open:u=!0,onOpenChange:d}){let g=(0,i.useRouter)(),{data:x}=(0,s.useSession)(),j=(0,o.useRef)(null),C=(0,o.useRef)(null);(0,o.useEffect)(()=>{c&&u&&j.current?.focus()},[c,u]);let[N,I]=(0,o.useState)(a),[R,E]=(0,o.useState)(null),[A,$]=(0,o.useState)(!1),[U,W]=(0,o.useState)([]),[G,V]=(0,o.useState)([]);(0,o.useEffect)(()=>{u&&(V((0,y.getStoredRecentViewedCompanies)()),W((0,f.getRecentSearchSelections)()))},[u]);let J=(0,o.useRef)(null),X=(0,p.useDebounce)(N.trim(),w.workspaceInteraction.searchDebounce),Z=X?[]:U.filter(e=>"chat"===e.type&&l.recentSearchIdSchema.safeParse(e.id).success).slice(0,l.MAX_RECENT_SEARCH_IDS).map(e=>e.id),et=(0,n.useQuery)({queryKey:["global-search",x?.user?.id,x?.user?.orgId,X,Z],enabled:u,gcTime:0,staleTime:0,queryFn:({signal:e})=>Z.length?r(X,e,Z):r(X,e)});(0,o.useEffect)(()=>{if(!X){J.current=null;return}!et.data||et.isFetching||et.isError||J.current===X||(J.current=X,h.default.trackGlobalSearchSearched({queryLength:X.length,totalResultCount:et.data.counts.all}))},[X,et.data,et.isError,et.isFetching]);let en=!N.trim(),er=et.isFetching||N.trim()!==X,ea=er||et.isError||et.data?.counts.company!==0||!(et.data.counts.chat>0)?"company":"chat",ei=en?"all":R??ea,es=(en?(0,f.orderRecentSearchResults)([...G.map(Q),...et.data?.results.filter(e=>"chat"===e.type)??[]],U).slice(0,8):et.data?.results??[]).filter(e=>"all"===ei||e.type===ei),eo=en?[]:Y,ec=(0,t.jsxs)(t.Fragment,{children:[eo.length>0&&(0,t.jsx)(K,{"aria-label":"Result type",children:eo.map(e=>(0,t.jsxs)(P,{ref:"company"===e?C:void 0,variant:ei===e?"secondary":"ghost","aria-pressed":ei===e,onClick:()=>E(e),onKeyDown:t=>{if(c&&"company"===e&&"Tab"===t.key&&t.shiftKey){t.preventDefault(),j.current?.focus();return}(" "===t.key||"Enter"===t.key)&&(t.preventDefault(),t.stopPropagation(),E(e))},children:[_[e].label,!er&&!et.isError&&(0,t.jsx)(M,{children:et.data?.counts[e]})]},e))}),c&&en&&(0,t.jsx)(O,{children:"Recents"}),(0,t.jsxs)(F,{inline:c,highlightSelection:A,"aria-busy":er,children:[er?(0,t.jsx)(B,{showGroups:"all"===ei}):!et.isError||en&&es.length?es.length?(0,t.jsx)(H,{results:es,selectedType:ei,inline:c,recent:en,onSelect:t=>{h.default.trackGlobalSearchResultSelected({resultType:t.type,selectedTab:ei}),"company"===t.type&&t.company?(V((0,y.storeRecentViewedCompany)(t.company)),W((0,f.getRecentSearchSelections)())):W((0,f.recordSearchSelection)(t)),g.push(t.href),e()}}):(0,t.jsx)("div",{role:"status",className:"p-8",children:(0,t.jsx)(v.Placeholder,{variant:"empty",size:"sm",withIcon:!1,title:N.trim()?"No matching results":"No recent activity",description:N.trim()?`No results match “${N.trim()}”.`:"Your recent companies and chats will appear here."})}):(0,t.jsx)("div",{role:"alert",className:"p-8",children:(0,t.jsx)(v.Placeholder,{variant:"error",size:"sm",withIcon:!1,title:"Search unavailable",description:"We couldn’t load results. Please try searching again."})}),!en&&!er&&!et.isError&&et.data?.hasMoreCompanies&&N.trim().length>=3&&("company"===ei||"all"===ei)&&(0,t.jsx)(k.CommandGroup,{className:"border-t",children:(0,t.jsx)(q,{value:"view-all-companies",onSelect:()=>{let t=N.trim();
1h.default.trackQuickSearchViewAllClicked({tab:"companies",query:t}),g.push(`/companies?${new URLSearchParams({q:t,view:"all"})}`),e()},children:"View all companies"})})]}),!c&&!en&&(0,t.jsxs)("div",{className:"text-muted-foreground flex shrink-0 flex-wrap justify-between gap-x-4 gap-y-1 border-t px-4 py-2 text-xs",children:[(0,t.jsxs)("span",{children:[!N&&"Recent companies and chats · ",er?"Searching…":`${es?.length??0} results`]}),(0,t.jsx)("span",{children:"Tab focus · Enter/Space filter · ↑ ↓ navigate · ↵ open result"})]})]});return c?(0,t.jsx)(S.Popover,{open:u,onOpenChange:d,children:(0,t.jsxs)(L,{label:"Search Grasp",shouldFilter:!1,loop:!0,onKeyDownCapture:e=>{"ArrowDown"!==e.key||A||(e.preventDefault(),e.stopPropagation(),$(!0))},onKeyDown:e=>{("ArrowDown"===e.key||"ArrowUp"===e.key)&&$(!0)},children:[(0,t.jsx)(D,{ref:j,"aria-label":"Search Grasp","aria-expanded":u,placeholder:"Search...",value:N,onValueChange:e=>{I(e),E(null),$(!1)},onClear:()=>{I(""),E(null),$(!1),j.current?.focus()},maxLength:200,shortcut:(0,m.getShortcutLabel)("globalSearch"),onFocus:()=>{u||(h.default.trackGlobalSearchOpened({source:"topbar"}),d?.(!0))},onClick:()=>d?.(!0),onKeyDown:e=>{u&&C.current&&"Tab"===e.key&&!e.shiftKey&&(e.preventDefault(),C.current?.focus())}}),(0,t.jsx)(T,{"aria-label":"Global search",onMouseMove:()=>$(!1),onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:e=>e.preventDefault(),onInteractOutside:e=>{e.target===j.current&&e.preventDefault()},children:ec})]})}):(0,t.jsxs)(z,{children:[(0,t.jsx)(b.DialogTitle,{className:"sr-only",children:"Search your workspace"}),(0,t.jsx)(b.DialogDescription,{className:"sr-only",children:"Find companies and chats by name."}),(0,t.jsxs)(k.Command,{shouldFilter:!1,className:"min-h-0",children:[(0,t.jsx)(k.CommandInput,{className:"h-12 pr-10","aria-label":"Search your workspace",placeholder:"Search companies and chats…",value:N,onValueChange:e=>{I(e),E(null)},maxLength:200}),ec]})]})}e.s(["GlobalSearch",0,function({loadResults:e=Z,placement:n="sidebar",defaultOpen:r=!1,defaultQuery:i=""}){let[s,l]=(0,o.useState)(r);return((0,c.useHotkeys)(m.SHORTCUTS.globalSearch.keys??"",()=>{s?l(!1):(h.default.trackGlobalSearchOpened({source:"shortcut"}),l(!0))},{preventDefault:!0,enableOnFormTags:!0,enableOnContentEditable:!0}),"topbar"===n)?(0,t.jsx)(ee,{inline:!0,defaultQuery:i,open:s,onOpenChange:l,loadResults:e,onNavigate:()=>l(!1)}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.SidebarMenuItem,{children:(0,t.jsxs)(j.SidebarMenuButton,{tooltip:"Search companies and chats",onClick:()=>{h.default.trackGlobalSearchOpened({source:"sidebar"}),l(!0)},children:[(0,t.jsx)(a.Search,{}),(0,t.jsx)("span",{children:"Search"}),(0,t.jsx)("span",{className:"text-muted-foreground ml-auto text-xs group-data-[collapsible=icon]:hidden",children:(0,m.getShortcutLabel)("globalSearch")})]})}),(0,t.jsx)(b.Dialog,{open:s,onOpenChange:l,children:s&&(0,t.jsx)(ee,{defaultQuery:i,loadResults:e,onNavigate:()=>l(!1)})})]})}],183618)},781905,e=>{"use strict";var t=e.i(843476),n=e.i(522016),r=e.i(618566),a=e.i(271645),i=e.i(261445),s=e.i(453991),o=e.i(209788);let c=o.NAVIGATION_RECOVERY_TIMEOUT_MS;function l({attemptId:e,appRouterPath:t,clickedAtMs:n,elapsedMs:r,fromPath:a,label:i,toPath:s}){return(0,o.buildNavigationRecoveryDiagnostics)({attemptId:e,appRouterPath:t,elapsedMs:r,fromPath:a,label:i,startedAtMs:n,toPath:s})}let u={currentAttemptId:0};e.s(["SidebarNavigationLink",0,function({download:e,href:d,logLabel:p,onClick:m,onNavigate:h,target:f,timeoutMs:y=c,...g}){let x=(0,r.usePathname)(),v=(0,r.useSearchParams)(),w=(0,a.useMemo)(()=>{let e=v.toString(),t=window.location.hash;return`${x}${e?`?${e}`:""}${t}`},[x,v]),{cancelPendingNavigation:k,startNavigationRecovery:b}=(0,i.useNavigationRecovery)({currentCommittedPath:w,onTimeout:({appRouterPath:e,elapsedMs:t,navigation:n})=>{var r;r={attemptId:n.attemptId,appRouterPath:e,clickedAtMs:n.startedAtMs,elapsedMs:t,fromPath:n.fromPath,label:p,toPath:n.targetPath},(0,s.logFrontendWarningKeepalive)("Sidebar navigation did not commit; forcing hard navigation",l(r)),window.location.replace(n.targetUrl)},scope:u,timeoutMs:y}),S=(0,a.useCallback)(t=>{var n,r;if(m?.(t),!(!t.defaultPrevented&&0===t.button&&!t.metaKey&&!t.altKey&&!t.ctrlKey&&!t.shiftKey)||function({download:e,target:t}){return void 0!==e&&!1!==e||!!(t&&"_self"!==t)}({download:e,target:f}))return;let a=(n=window.location.href,(0,o.getNavigationTarget)(d,n));if(!a)return;let i=Date.now(),c=b({fromPath:w,mode:"replace",startedAtMs:i,target:a});c&&(r={attemptId:c.attemptId,clickedAtMs:i,fromPath:w,label:p,toPath:c.targetPath},(0,s.logFrontendInfo)("Sidebar navigation clicked",l(r)))},[w,e,d,p,m,b,f]),j=(0,a.useCallback)(e=>{let t=!1,n={...e,preventDefault:()=>{t=!0,e.preventDefault()}};h?.(n),t&&k()},[k,h]);return(0,t.jsx)(n.default,{download:e,href:d,onClick:S,onNavigate:j,target:f,...g})}],781905)},339825,e=>{"use strict";var t=e.i(843476),n=e.i(861411),r=e.i(773901),a=e.i(991089),i=e.i(781905);e.s(["SidebarNewChatLink",0,function({className:e,...s}){return(0,t.jsx)(i.SidebarNavigationLink,{"data-sidebar":"menu-action",...s,className:(0,r.cn)("no-link-style text-sidebar-foreground
1/60 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground ring-sidebar-ring relative flex size-6 shrink-0 items-center justify-center rounded-sm outline-hidden after:absolute after:-inset-2 focus-visible:ring-2 md:after:hidden",e),children:(0,t.jsx)(n.Icon,{name:"SquarePen","aria-hidden":"true",size:a.workspaceInteraction.icon.navigation,strokeWidth:a.workspaceInteraction.icon.stroke})})}])},230244,e=>{"use strict";var t=e.i(843476),n=e.i(861411),r=e.i(773901),a=e.i(991089),i=e.i(624705),s=e.i(781905);e.s(["SidebarSectionAction",0,function({children:e,className:n,...a}){return(0,t.jsx)("button",{type:"button",className:(0,r.cn)("text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground ring-sidebar-ring relative flex aspect-square w-6 shrink-0 items-center justify-center rounded-sm outline-hidden focus-visible:ring-2","after:absolute after:-inset-2 md:after:hidden",n),...a,children:e})},"SidebarSectionHeader",0,function({label:e,isExpanded:s,onToggle:o,contentId:c,action:l,showActionOnHover:u=!1}){return(0,t.jsxs)(i.SidebarGroupLabel,{className:"group/section text-muted-foreground/80 h-6 gap-0 px-0 font-normal",children:[(0,t.jsxs)("button",{type:"button",onClick:o,"aria-expanded":s,"aria-controls":s?c:void 0,className:"group/toggle hover:text-sidebar-accent-foreground ring-sidebar-ring flex h-6 min-w-0 flex-1 items-center gap-1.5 rounded-sm px-1.5 text-left outline-hidden focus-visible:ring-2",children:[(0,t.jsx)("span",{className:"truncate",children:e}),(0,t.jsx)(n.Icon,{name:"ChevronDown",size:a.workspaceInteraction.icon.compact,className:(0,r.cn)("shrink-0 transition-[rotate,opacity] duration-200","pointer-fine:opacity-0 pointer-fine:group-hover/section:opacity-100 pointer-fine:group-focus-visible/toggle:opacity-100",!s&&"-rotate-90")})]}),l&&(0,t.jsx)("div",{className:(0,r.cn)("flex shrink-0 items-center",u&&"pointer-fine:opacity-0 pointer-fine:group-hover/section:opacity-100 pointer-fine:has-[:focus-visible]:opacity-100"),children:l})]})},"SidebarSectionLinkAction",0,function({children:e,className:n,...a}){return(0,t.jsx)(s.SidebarNavigationLink,{className:(0,r.cn)("no-link-style text-muted-foreground hover:text-sidebar-foreground focus-visible:text-sidebar-foreground ring-sidebar-ring flex h-5 w-fit shrink-0 items-center rounded-sm px-1.5 text-xs font-normal outline-hidden transition-colors focus-visible:ring-2",n),...a,children:e})}])},816558,e=>{"use strict";var t=e.i(618566),n=e.i(424814),r=e.i(528859),a=e.i(619373);let i={newChat:{keys:"meta+shift+o, ctrl+shift+o",macLabel:"⇧⌘O",winLabel:"Ctrl+Shift+O"},quickSearch:{keys:"meta+k, ctrl+k",macLabel:"⌘K",winLabel:"Ctrl+K"},globalSearch:{keys:"meta+k, ctrl+k",macLabel:"⌘K",winLabel:"Ctrl+K"},reportBug:{keys:"meta+shift+b, ctrl+shift+b",macLabel:"⇧⌘B",winLabel:"Ctrl+Shift+B"}};e.s(["SHORTCUTS",0,i,"getShortcutLabel",0,function(e){let t=!("u"<typeof navigator)&&(navigator.platform?.toUpperCase().includes("MAC")||navigator.userAgent?.toUpperCase().includes("MAC")),n=i[e];return t?n.macLabel:n.winLabel},"useKeyboardShortcuts",0,function(){let e=(0,t.useRouter)(),s=(0,a.useBugReportStore)(e=>e.activate);(0,n.useHotkeys)(i.newChat.keys??"",()=>{r.default.trackShortcutNewChat(),e.push("/conversation")},{preventDefault:!0,enableOnFormTags:!0}),(0,n.useHotkeys)(i.reportBug.keys??"",()=>{s()},{preventDefault:!0,enableOnFormTags:!0})}])},980539,684802,e=>{"use strict";var t=e.i(954616),n=e.i(266027),r=e.i(912598),a=e.i(526732),i=e.i(110943);function s(e,t){let n=function(e){if(!e?.trim())return null;try{let t=new URL(e.includes("://")?e:`https://${e}`);return!["http:","https:"].includes(t.protocol)||t.username||t.password?null:t}catch{return null}}(e);if(!n||!("linkedin.com"===n.hostname||n.hostname.endsWith(".linkedin.com")))return null;let r=n.pathname.split("/").filter(Boolean);if(2!==r.length||r[0]!==t)return null;try{let e=decodeURIComponent(r[1]).normalize("NFC").toLowerCase();if(!e||/[\s/\\?#]/u.test(e)||"."===e||".."===e)return null;return`https://www.linkedin.com/${t}/${encodeURIComponent(e)}`}catch{return null}}e.s(["linkedinUrl",0,s],684802);var o=e.i(336045);async function c(e,t){let n=await fetch(e,{...t,cache:"no-store"}),r=await n.json();if(!n.ok)throw Error(r.error||"Could not load LinkedIn connections");return r}function l(){let e=(0,r.useQueryClient)(),{firmNetwork:t}=(0,i.useFeatureFlag)(),{data:s}=(0,a.useSession)(),c=`${s?.user?.id??""}:${s?.user?.orgId??""}`,l=(0,n.useQuery)({queryKey:o.QUERY_KEYS.linkedinStatus(c),queryFn:async()=>{let t=await fetch("/api/linkedin",{cache:"no-store"});if(403===t.status)return null;if(!t.ok)throw Error("Could not load LinkedIn connection status");let n=await t.json(),r=e.getQueryData(o.QUERY_KEYS.linkedinStatus(c));return r&&n.lastSyncedAt&&n.lastSyncedAt!==r.lastSyncedAt&&(e.invalidateQueries({queryKey:o.QUERY_KEYS.linkedinCounts(c)}
1),e.invalidateQueries({queryKey:["linkedin-network",c,"connections"]}),e.invalidateQueries({queryKey:["linkedin-network",c,"profiles"]})),n},enabled:t&&!!s?.user?.id,staleTime:3e4,refetchInterval:3e4,retry:!1});return{data:t?l.data:void 0,isLoading:t&&l.isLoading,isError:t&&l.isError,refetch:l.refetch,scope:c}}let u=new Map;function d(e,t,n="company"){return new Promise((r,a)=>{let i=`${e}:${n}`,o=u.get(i),l={identifier:t,resolve:r,reject:a};o?o.push(l):(u.set(i,[l]),setTimeout(()=>{let e=u.get(i)??[];u.delete(i);for(let t=0;t<e.length;t+=100){let r=e.slice(t,t+100);c("/api/linkedin/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({["company"===n?"companies":"profiles"]:r.map(e=>e.identifier)})}).then(e=>{let t=new Map;for(let r of e.connections){let e="company"===n?r.companyId:s(r.profileUrl,"in");if(e){let n=t.get(e)??[];n.push(r),t.set(e,n)}}r.forEach(n=>n.resolve({truncated:e.truncatedIdentifiers.includes(n.identifier),connections:t.get(n.identifier)??[]}))}).catch(e=>r.forEach(t=>t.reject(e)))}},20))})}e.s(["networkRequest",0,c,"useContactConnections",0,function(e){let{firmNetwork:t}=(0,i.useFeatureFlag)(),r=l(),a=s(e,"in")??"",c=(0,n.useQuery)({queryKey:o.QUERY_KEYS.linkedinContactConnections(r.scope,a),queryFn:()=>d(r.scope,a,"profile"),enabled:t&&!!(a&&r.data),staleTime:3e4,refetchInterval:6e4,retry:!1});return{...c,data:t&&r.data?c.data:void 0}},"useFirmNetworkCounts",0,function(e){let{firmNetwork:t}=(0,i.useFeatureFlag)(),{data:r}=(0,a.useSession)(),s=`${r?.user?.id??""}:${r?.user?.orgId??""}`,l=(0,n.useQuery)({queryKey:o.QUERY_KEYS.linkedinCounts(s),queryFn:()=>c("/api/linkedin/counts"),enabled:e&&t&&!!r?.user?.id,staleTime:3e5,refetchInterval:3e5,retry:!1});return{...l,data:e&&t&&!l.isError?l.data:void 0}},"useLinkedInMemberPhoto",0,function(){let{firmNetwork:e}=(0,i.useFeatureFlag)(),{data:t}=(0,a.useSession)(),r=`${t?.user?.id??""}:${t?.user?.orgId??""}`,s=(0,n.useQuery)({queryKey:o.QUERY_KEYS.linkedinMemberPhoto(r),queryFn:()=>c("/api/linkedin/photo/status"),enabled:e&&!!t?.user?.id,staleTime:3e5,retry:!1});return{...s,data:e&&!s.isError?s.data:void 0}},"useLinkedInMutation",0,function(){let e=(0,r.useQueryClient)();return(0,t.useMutation)({mutationFn:()=>c("/api/linkedin",{method:"DELETE"}),onSuccess:async()=>{await Promise.all([e.invalidateQueries({queryKey:o.QUERY_KEYS.linkedinNetwork()}),e.invalidateQueries({queryKey:["global-search"]}),e.invalidateQueries({queryKey:["company-profiles-suggestions"]})])}})},"useLinkedInShareMutation",0,function(){let e=(0,r.useQueryClient)();return(0,t.useMutation)({mutationFn:()=>c("/api/linkedin?action=share",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({share:!0})}),onSuccess:async()=>{await Promise.all([e.invalidateQueries({queryKey:o.QUERY_KEYS.linkedinNetwork()}),e.invalidateQueries({queryKey:["global-search"]}),e.invalidateQueries({queryKey:["company-profiles-suggestions"]})])}})},"useLinkedInStatus",0,l,"useTeamConnections",0,function(e){let{firmNetwork:t}=(0,i.useFeatureFlag)(),r=l(),a=(0,n.useQuery)({queryKey:o.QUERY_KEYS.linkedinConnections(r.scope,e),queryFn:()=>d(r.scope,e),enabled:t&&!!(e&&r.data),staleTime:3e4,refetchInterval:6e4,retry:!1});return{...a,data:t&&r.data?a.data:void 0}}],980539)},261445,e=>{"use strict";var t=e.i(271645),n=e.i(209788);e.s(["useNavigationRecovery",0,function({currentCommittedPath:e,onTimeout:r,scope:a,timeoutMs:i=n.NAVIGATION_RECOVERY_TIMEOUT_MS}){let s=(0,t.useRef)(null),o=(0,t.useRef)(null),c=(0,t.useRef)(e),l=(0,t.useRef)(r),u=(0,t.useRef)(0);(0,t.useEffect)(()=>{l.current=r},[r]);let d=(0,t.useCallback)(()=>{let e=o.current;s.current&&(clearTimeout(s.current),s.current=null),o.current=null,e&&(0,n.untrackPendingNavigation)(e),a&&e&&a.currentAttemptId===e.attemptId&&a.cancelCurrentAttempt===d&&(a.cancelCurrentAttempt=void 0)},[a]);(0,t.useEffect)(()=>{c.current=e;let t=o.current;t&&e!==t.fromPath&&d()},[d,e]),(0,t.useEffect)(()=>()=>d(),[d]);let p=(0,t.useCallback)(({fromPath:e,mode:t,startedAtMs:r=Date.now(),target:p})=>{let m;if(e===p.path)return null;if(a){m=a.currentAttemptId+1;let e=a.cancelCurrentAttempt;a.currentAttemptId=m,e?.()}else u.current+=1,m=u.current;let h={attemptId:m,fromPath:e,mode:t,startedAtMs:r,targetPath:p.path,targetUrl:p.url};return d(),o.current=h,(0,n.trackPendingNavigation)(h),a&&(a.cancelCurrentAttempt=d),s.current=setTimeout(()=>{let e=o.current;if(!e||e.attemptId!==m||a&&a.currentAttemptId!==m)return;let t=c.current;if(t&&t!==e.fromPath){o.current=null,(0,n.untrackPendingNavigation)(e);return}l.current({appRouterPath:t,elapsedMs:Date.now()-e.startedAtMs,navigation:e})},i),h},[d,a,i]);return{cancelPendingNavigation:d,startNavigationRecovery:p}}])},48296,e=>{"use strict";var t=e.i(684802);e.s(["groupTeamConnections",0,function(e){let n=new Map;for(let r of e){let e=(0,t.linkedinUrl)(r.profileUrl,"in")||r.profileUrl||r.id,a=n.get(e);if(a){a.colleagues.includes(r.via)||a.colleagues.push(r.via),r.viaPhotoUrl&&(a.colleaguePhotos[r.via]=r.viaPhotoUrl);let t=r.asOf??"",i=a.asOf??"";(t>
1i||t===i&&"former"===a.relationship&&"current"===r.relationship)&&n.set(e,{...r,photoUrl:r.photoUrl||a.photoUrl,colleagues:a.colleagues,colleaguePhotos:a.colleaguePhotos})}else n.set(e,{...r,colleagues:[r.via],colleaguePhotos:{[r.via]:r.viaPhotoUrl??null}})}return[...n.values()]}])},342174,876617,e=>{"use strict";let t="grasp.search.recent-selections";function n(){try{let e=JSON.parse(window.localStorage.getItem(t)??"[]");return Array.isArray(e)?e.filter(e=>null!=e&&"string"==typeof e.id&&["chat","company"].includes(e.type)&&"number"==typeof e.openedAt&&Number.isFinite(e.openedAt)):[]}catch{return[]}}function r(e){let r=n(),a=[{id:e.id,type:e.type,openedAt:Date.now()},...r.filter(t=>t.id!==e.id||t.type!==e.type)].slice(0,50);try{window.localStorage.setItem(t,JSON.stringify(a))}catch{}return a}e.s(["getRecentSearchSelections",0,n,"orderRecentSearchResults",0,function(e,t){let n=new Map(t.map(e=>[`${e.type}:${e.id}`,e.openedAt]));return[...e].sort((e,t)=>(n.get(`${t.type}:${t.id}`)??0)-(n.get(`${e.type}:${e.id}`)??0))},"recordSearchSelection",0,r],876617);let a="grasp.companies.recent-viewed-companies";function i(e){return!!e&&"object"==typeof e&&"string"==typeof e.companyId}function s(){try{let e=window.localStorage.getItem(a),t=e?JSON.parse(e):[];return Array.isArray(t)?t.filter(i).slice(0,8):[]}catch{return[]}}e.s(["getStoredRecentViewedCompanies",0,s,"storeRecentViewedCompany",0,function(e){r({id:e.companyId,type:"company"});let t=[e,...s().filter(t=>t.companyId!==e.companyId)].slice(0,8);try{window.localStorage.setItem(a,JSON.stringify(t))}catch{}return t}],342174)},619373,e=>{"use strict";let t=(0,e.i(768834).create)()((e,t)=>({isActive:!1,stream:null,activate:async()=>{if(t().isActive)return;let n=null;try{n=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},preferCurrentTab:!0})}catch{return}e({isActive:!0,stream:n})},deactivate:()=>{let{stream:n}=t();n?.getTracks().forEach(e=>e.stop()),e({isActive:!1,stream:null})}}));e.s(["useBugReportStore",0,t])},935740,e=>{"use strict";var t=e.i(843476),n=e.i(773901),r=e.i(959603);e.s(["WorkspaceAccountMenuContent",0,function(e){return(0,t.jsx)(r.DropdownMenuContent,{...e,className:(0,n.cn)("w-workspace-account min-w-0",e.className)})},"WorkspaceAccountMenuItem",0,function(e){return(0,t.jsx)(r.DropdownMenuItem,{...e})},"WorkspaceAccountMenuSeparator",0,function(){return(0,t.jsx)(r.DropdownMenuSeparator,{})}])},418196,e=>{"use strict";e.s(["getRoundingMethod",0,function(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return 0===n?0:n}}])},40058,e=>{"use strict";var t=e.i(281092);e.s(["compareAsc",0,function(e,n){let r=(0,t.toDate)(e)-(0,t.toDate)(n);return r<0?-1:r>0?1:r}])},24708,e=>{"use strict";var t=e.i(677241);e.s(["constructNow",0,function(e){return(0,t.constructFrom)(e,Date.now())}])},493801,e=>{"use strict";var t=e.i(24708),n=e.i(55545),r=e.i(455024),a=e.i(418196),i=e.i(99151),s=e.i(845110),o=e.i(40058),c=e.i(234662);e.s(["formatDistanceToNowStrict",0,function(e,l){return function(e,t,l){let u,d=(0,r.getDefaultOptions)(),p=l?.locale??d.locale??n.defaultLocale,m=(0,o.compareAsc)(e,t);if(isNaN(m))throw RangeError("Invalid time value");let h=Object.assign({},l,{addSuffix:l?.addSuffix,comparison:m}),[f,y]=(0,s.normalizeDates)(l?.in,...m>0?[t,e]:[e,t]),g=(0,a.getRoundingMethod)(l?.roundingMethod??"round"),x=y.getTime()-f.getTime(),v=x/c.millisecondsInMinute,w=(x-((0,i.getTimezoneOffsetInMilliseconds)(y)-(0,i.getTimezoneOffsetInMilliseconds)(f)))/c.millisecondsInMinute,k=l?.unit;if("second"===(u=k||(v<1?"second":v<60?"minute":v<c.minutesInDay?"hour":w<c.minutesInMonth?"day":w<c.minutesInYear?"month":"year"))){let e=g(x/1e3);return p.formatDistance("xSeconds",e,h)}if("minute"===u){let e=g(v);return p.formatDistance("xMinutes",e,h)}if("hour"===u){let e=g(v/60);return p.formatDistance("xHours",e,h)}if("day"===u){let e=g(w/c.minutesInDay);return p.formatDistance("xDays",e,h)}if("month"===u){let e=g(w/c.minutesInMonth);return 12===e&&"month"!==k?p.formatDistance("xYears",1,h):p.formatDistance("xMonths",e,h)}else{let e=g(w/c.minutesInYear);return p.formatDistance("xYears",e,h)}}(e,(0,t.constructNow)(e),l)}],493801)},424814,e=>{"use strict";var t=e.i(271645);e.i(843476);var n=["shift","alt","meta","mod","ctrl","control"],r={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OS
1Right:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function a(e){return(r[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function i(e){return n.includes(e)}function s(e,t=","){return e.toLowerCase().split(t)}function o(e,t="+",r=">",i=!1,s,c){let l=[],u=!1;(e=e.trim()).includes(r)?(u=!0,l=e.toLocaleLowerCase().split(r).map(e=>a(e))):l=e.toLocaleLowerCase().split(t).map(e=>a(e));let d={alt:l.includes("alt"),ctrl:l.includes("ctrl")||l.includes("control"),shift:l.includes("shift"),meta:l.includes("meta"),mod:l.includes("mod"),useKey:i},p=l.filter(e=>!n.includes(e));return{...d,keys:p,description:s,isSequence:u,hotkey:e,metadata:c}}"u">typeof document&&(document.addEventListener("keydown",e=>{void 0!==e.code&&u([a(e.code)])}),document.addEventListener("keyup",e=>{void 0!==e.code&&d([a(e.code)])})),"u">typeof window&&(window.addEventListener("blur",()=>{c.clear()}),window.addEventListener("focus",()=>{c.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{c.clear()},0)})),"u">typeof document&&document.addEventListener("visibilitychange",()=>{c.clear()});var c=new Set;function l(e){return Array.isArray(e)}function u(e){let t=Array.isArray(e)?e:[e];c.has("meta")&&c.forEach(e=>{i(e)||c.delete(e.toLowerCase())}),t.forEach(e=>{c.add(e.toLowerCase())})}function d(e){"meta"===e?c.clear():(Array.isArray(e)?e:[e]).forEach(e=>{c.delete(e.toLowerCase())})}var p=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function m(e,t=!1){var n;let{target:r,composed:a}=e,i,s;return(n=r).tagName&&!n.tagName.startsWith("-")&&n.tagName.includes("-")&&a?(i=e.composedPath()[0]&&e.composedPath()[0].tagName,s=e.composedPath()[0]&&e.composedPath()[0].role):(i=r&&r.tagName,s=r&&r.role),l(t)?!!(i&&t?.some(e=>e.toLowerCase()===i.toLowerCase()||e===s)):!!(i&&t&&t)}var h=(0,t.createContext)(void 0),f=(0,t.createContext)({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),y="u">typeof window?t.useLayoutEffect:t.useEffect;e.s(["useHotkeys",0,function(e,n,r,g){var x;let v,[w,k]=(0,t.useState)(null),b=(0,t.useCallback)(e=>(k(e),()=>k(null)),[]),S=(0,t.useRef)(!1),j=Array.isArray(r)?Array.isArray(g)?void 0:g:r,C=l(e)?e.join(j?.delimiter):e,N=Array.isArray(r)?r:Array.isArray(g)?g:void 0,I=(0,t.useCallback)(n,N??[]),R=(0,t.useRef)(I);N?R.current=I:R.current=n;let E=(x=function(e){if(!e)return;let{enabled:t,preventDefault:n,ignoreEventWhen:r,...a}=e;return"function"==typeof t?a:{...a,enabled:t}}(j),function e(t,n){return t&&n&&"object"==typeof t&&"object"==typeof n?Object.keys(t).length===Object.keys(n).length&&Object.keys(t).reduce((r,a)=>r&&e(t[a],n[a]),!0):t===n}((v=(0,t.useRef)(void 0)).current,x)||(v.current=x),v.current),A=(0,t.useRef)(j?.enabled);A.current=j?.enabled;let L=(0,t.useRef)(j?.preventDefault);L.current=j?.preventDefault;let D=(0,t.useRef)(j?.ignoreEventWhen);D.current=j?.ignoreEventWhen;let{activeScopes:T}=(0,t.useContext)(f),K=(0,t.useContext)(h);return y(()=>{var e;if(!1===A.current||(e=E?.scopes,!((0!==T.length||!e)&&(!e||T.some(t=>e.includes(t))||T.includes("*")))))return;let t=[],n,r=(e,r=!1)=>{if(!(m(e,p)&&!m(e,E?.enableOnFormTags))){if(null!==w){let t=w.getRootNode();if((t instanceof Document||t instanceof ShadowRoot)&&t.activeElement!==w&&!w.contains(t.activeElement))return void(e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation())}e.target?.isContentEditable&&!E?.enableOnContentEditable||s(C,E?.delimiter).forEach(s=>{if(s.includes(E?.splitKey??"+")&&s.includes(E?.sequenceSplitKey??">"))return void console.warn(`Hotkey ${s} contains both ${E?.splitKey??"+"} and ${E?.sequenceSplitKey??">"} which is not supported.`);let u=o(s,E?.splitKey,E?.sequenceSplitKey,E?.useKey,E?.description,E?.metadata);if(u.isSequence){n=setTimeout(()=>{t=[]},E?.sequenceTimeoutMs??1e3);let r=u.useKey?e.key:a(e.code);if(i(r.toLowerCase()))return;if(t.push(r),r!==u.keys?.[t.length-1]){t=[],n&&clearTimeout(n);return}t.length===u.keys?.length&&(R.current(e,u),n&&clearTimeout(n),t=[])}else if(((e,t,n=!1)=>{let{alt:r,meta:i,mod:s,shift:o,ctrl:u,keys:d,useKey:p}=t,{code:m,key:h,ctrlKey:f,metaKey:y,shiftKey:g,altKey:x}=e,v=a(m),w="function"==typeof e.getModifierState&&e.getModifierState("AltGraph");if(!p&&!d?.includes(v)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;
1if(!n){if(r!==x&&"alt"!==v||o!==g&&"shift"!==v)return!1;if(s){if(!(typeof navigator>"u")&&/mac/i.test(navigator.userAgent)&&!/iphone|ipad|ipod/i.test(navigator.userAgent)?!y:!f)return!1}else if(i!==y&&"meta"!==v&&"os"!==v||u!==f&&"ctrl"!==v&&"control"!==v)return!1;if(w&&!r&&!u&&!s&&!["alt","ctrl","control"].includes(v))return!1}return!!(p&&d?.length===1&&d.includes(h.toLowerCase())||d&&1===d.length&&d.includes(v))||(d&&d.length>0?!!d.includes(v)&&function(e,t=","){return(l(e)?e:e.split(t)).every(e=>c.has(e.trim().toLowerCase()))}(d):!d||0===d.length)})(e,u,E?.ignoreModifiers)||u.keys?.includes("*")){var d,p;if(D.current?.(e)||r&&S.current||(("function"==typeof(d=L.current)&&d(e,u)||!0===d)&&e.preventDefault(),"function"==typeof(p=A.current)?!p(e,u):!0!==p&&void 0!==p))return;R.current(e,u),r||(S.current=!0)}})}},h=e=>{void 0!==e.code&&(u(a(e.code)),(E?.keydown===void 0&&E?.keyup!==!0||E?.keydown)&&r(e))},f=e=>{void 0!==e.code&&(d(a(e.code)),S.current=!1,E?.keyup&&r(e,!0))},y=w||j?.document||document;return y.addEventListener("keyup",f,j?.eventListenerOptions),y.addEventListener("keydown",h,j?.eventListenerOptions),K&&s(C,E?.delimiter).forEach(e=>{K.addHotkey(o(e,E?.splitKey,E?.sequenceSplitKey,E?.useKey,E?.description,E?.metadata))}),()=>{y.removeEventListener("keyup",f,j?.eventListenerOptions),y.removeEventListener("keydown",h,j?.eventListenerOptions),K&&s(C,E?.delimiter).forEach(e=>{K.removeHotkey(o(e,E?.splitKey,E?.sequenceSplitKey,E?.useKey,E?.description,E?.metadata))}),t=[],n&&clearTimeout(n)}},[w,E,T,C]),b}])},768834,e=>{"use strict";var t=e.i(271645);let n=e=>{let t,n=new Set,r=(e,r)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({}
1,t,a),n.forEach(n=>n(t,e))}},a=()=>t,i={setState:r,getState:a,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e))},s=t=e(r,a,i);return i},r=e=>{let r=e?n(e):n,a=e=>(function(e,n=e=>e){let r=t.default.useSyncExternalStore(e.subscribe,t.default.useCallback(()=>n(e.getState()),[e,n]),t.default.useCallback(()=>n(e.getInitialState()),[e,n]));return t.default.useDebugValue(r),r})(r,e);return Object.assign(a,r),a};e.s(["create",0,e=>e?r(e):r],768834)}]);

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.