PageSourceSearch

https://thefutur.com/assets/dist-DgLl-R8b.js

js thefutur.com collected 2026-09-24 17:18:08 UTC 5,917 bytes, 1 lines download raw bytes

1import{b as e,nt as t,st as n}from"./router-compat-7Q_62N33.js";import{i as r}from"./dist-DtD3m8z0.js";import{a as i}from"./utils-D2N1gzpq.js";import{n as a,t as o}from"./dist-BQ5DPk8q.js";var s=n(t(),1),c=Object.defineProperty,l=(e,t)=>c(e,`name`,{value:t,configurable:!0});function u(e){let t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>((...e)=>t.current?.(...e)),[])}l(u,`useCallbackRef`);var d=e(),f=Object.defineProperty,p=(e,t)=>f(e,`name`,{value:t,configurable:!0}),m=`dismissableLayer.update`,h=`dismissableLayer.pointerDownOutside`,g=`dismissableLayer.focusOutside`,_,v=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),y=s.forwardRef(p(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:h,onDismiss:g,...y}=e,b=s.useContext(v),[x,S]=s.useState(null),E=x?.ownerDocument??globalThis?.document,[,D]=s.useState({}),O=i(t,S),k=Array.from(b.layers),[A]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),j=A?k.indexOf(A):-1,M=x?k.indexOf(x):-1,N=b.layersWithOutsidePointerEventsDisabled.size>0,P=M>=j,F=s.useRef(!1),I=C(e=>{l?.(e),h?.(e),e.defaultPrevented||g?.()},{ownerDocument:E,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:F,dismissableSurfaces:b.dismissableSurfaces,shouldHandlePointerDownOutside:s.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...b.branches].some(t=>t.contains(e));return P&&!t},[b.branches,P])}),L=w(e=>{if(a&&F.current)return;let t=e.target;[...b.branches].some(e=>e.contains(t))||(f?.(e),h?.(e),e.defaultPrevented||g?.())},E),R=x?M===k.length-1:!1,z=u(e=>{e.key===`Escape`&&(c?.(e),!e.defaultPrevented&&g&&(e.preventDefault(),g()))});return s.useEffect(()=>{if(R)return E.addEventListener(`keydown`,z,{capture:!0}),()=>E.removeEventListener(`keydown`,z,{capture:!0})},[E,R,z]),s.useEffect(()=>{if(x)return n&&(b.layersWithOutsidePointerEventsDisabled.size===0&&(_=E.body.style.pointerEvents,E.body.style.pointerEvents=`none`),b.layersWithOutsidePointerEventsDisabled.add(x)),b.layers.add(x),T(),()=>{n&&(b.layersWithOutsidePointerEventsDisabled.delete(x),b.layersWithOutsidePointerEventsDisabled.size===0&&(E.body.style.pointerEvents=_))}},[x,E,n,b]),s.useEffect(()=>()=>{x&&(b.layers.delete(x),b.layersWithOutsidePointerEventsDisabled.delete(x),T())},[x,b]),s.useEffect(()=>{let e=p(()=>D({}),`handleUpdate`);return document.addEventListener(m,e),()=>document.removeEventListener(m,e)},[]),(0,d.jsx)(o.div,{...y,ref:O,style:{pointerEvents:N?P?`auto`:`none`:void 0,...e.style},onFocusCapture:r(e.onFocusCapture,L.onFocusCapture),onBlurCapture:r(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:r(e.onPointerDownCapture,I.onPointerDownCapture)})},`DismissableLayer`)),b=s.forwardRef(p(function(e,t){let n=s.useContext(v),r=s.useRef(null),a=i(t,r);return s.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,d.jsx)(o.div,{...e,ref:a})},`DismissableLayerBranch`));function x(){let e=s.useContext(v),[t,n]=s.useState(null);return s.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}p(x,`useDismissableLayerSurface`);var S=p(()=>!0,`IS_TRUE`);function C(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=S}=t,c=u(e),l=s.useRef(!1),d=s.useRef(!1),f=s.useRef(new Map),m=s.useRef(()=>{});return s.useEffect(()=>{function e(){d.current=!1,i.current=!1,f.current.clear()}p(e,`resetOutsideInteraction`);function t(){return Array.from(f.current.values()).some(Boolean)}p(t,`isOutsideInteractionIntercepted`);function s(e){if(!d.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||f.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{d.current&&m.current()},0)}p(s,`handleInteractionCapture`);function u(e){d.current&&f.current.set(e.type,!1)}p(u,`handleInteractionBubble`);let g=p(a=>{if(a.target&&!l.current){let s=function(){n.removeEventListener(`click`,m.current);let r=t();e(),r||E(h,c,u,{discrete:!0})};if(p(s,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,m.current),e(
1),l.current=!1;return}let u={originalEvent:a};d.current=!0,i.current=r&&a.button===0,f.current.clear(),!r||a.button!==0?s():(n.removeEventListener(`click`,m.current),m.current=s,n.addEventListener(`click`,m.current,{once:!0}))}else n.removeEventListener(`click`,m.current),e();l.current=!1},`handlePointerDown`),_=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of _)n.addEventListener(e,s,!0),n.addEventListener(e,u);let v=window.setTimeout(()=>{n.addEventListener(`pointerdown`,g)},0);return()=>{window.clearTimeout(v),n.removeEventListener(`pointerdown`,g),n.removeEventListener(`click`,m.current);for(let e of _)n.removeEventListener(e,s,!0),n.removeEventListener(e,u)}},[n,c,r,i,a,o]),{onPointerDownCapture:p(()=>l.current=!0,`onPointerDownCapture`)}}p(C,`usePointerDownOutside`);function w(e,t=globalThis?.document){let n=u(e),r=s.useRef(!1);return s.useEffect(()=>{let e=p(e=>{e.target&&!r.current&&E(g,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:p(()=>r.current=!0,`onFocusCapture`),onBlurCapture:p(()=>r.current=!1,`onBlurCapture`)}}p(w,`useFocusOutside`);function T(){let e=new CustomEvent(m);document.dispatchEvent(e)}p(T,`dispatchUpdate`);function E(e,t,n,{discrete:r}){let i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?a(i,o):i.dispatchEvent(o)}p(E,`handleAndDispatchCustomEvent`);var D=y,O=b;export{u as a,x as i,y as n,D as r,O 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.