1import{d as e,m as t}from"./jsx-runtime-CPHOs-8T.js";import{c as n,f as r,h as i,n as a,r as o,t as s,u as c}from"./utils-_kwqN-rm.js";import{n as l,t as u}from"./useGlobalListeners-Dicuytxy.js";var d=t(e(),1);function f(e){let{isDisabled:t,onBlurWithin:l,onFocusWithin:f,onFocusWithinChange:p}=e,m=(0,d.useRef)({isFocusWithin:!1}),{addGlobalListener:h,removeAllGlobalListeners:g}=u(),_=(0,d.useCallback)(e=>{n(e.currentTarget,r(e))&&m.current.isFocusWithin&&!n(e.currentTarget,e.relatedTarget)&&(m.current.isFocusWithin=!1,g(),l&&l(e),p&&p(!1))},[l,p,m,g]),v=a(_),y=(0,d.useCallback)(e=>{if(!n(e.currentTarget,r(e)))return;let t=r(e),a=i(t),l=c(a);if(!m.current.isFocusWithin&&l===t){f&&f(e),p&&p(!0),m.current.isFocusWithin=!0,v(e);let t=e.currentTarget;h(a,`focus`,e=>{let i=r(e);if(m.current.isFocusWithin&&!n(t,i)){let e=new a.defaultView.FocusEvent(`blur`,{relatedTarget:i});o(e,t);let n=s(e);_(n)}},{capture:!0})}},[f,p,v,h,_]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:y,onBlur:_}}}var p={border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`};function m(e={}){let{style:t,isFocusable:n}=e,[r,i]=(0,d.useState)(!1),{focusWithinProps:a}=f({isDisabled:!n,onFocusWithinChange:e=>i(e)}),o=(0,d.useMemo)(()=>r?t:t?{...p,...t}:p,[r]);return{visuallyHiddenProps:{...a,style:o}}}function h(e){let{children:t,elementType:n=`div`,isFocusable:r,style:i,...a}=e,{visuallyHiddenProps:o}=m(e);return d.createElement(n,l(a,o),t)}export{m as n,f as r,h as t};
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.