PageSourceSearch

https://www.baton.com/assets/portal-DiHwUaSL.js

js baton.com collected 2026-10-04 09:58:03 UTC 2,128 bytes, 1 lines download raw bytes

1import{j as s}from"./jsx-runtime-Cf6-t1yd.js";import{r as d}from"./index-DqurfyrX.js";import{r as h}from"./index-BhhZPp53.js";import{c as y}from"./context-CI8ksuZw.js";import{u as p}from"./use-safe-layout-effect-BJOnoihr.js";try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="0e4c49aa-9579-4d83-88f1-5964995d70e8",e._sentryDebugIdIdentifier="sentry-dbid-0e4c49aa-9579-4d83-88f1-5964995d70e8")})()}catch{}const[b,v]=y({strict:!1,name:"PortalManagerContext"});function E(e){const{children:r,zIndex:o}=e;return s.jsx(b,{value:{zIndex:o},children:r})}E.displayName="PortalManager";const[g,I]=y({strict:!1,name:"PortalContext"}),m="chakra-portal",j=".chakra-portal",N=e=>s.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),w=e=>{const{appendToParentPortal:r,children:o}=e,[a,i]=d.useState(null),t=d.useRef(null),[,n]=d.useState({});d.useEffect(()=>n({}),[]);const f=I(),c=v();p(()=>{if(!a)return;const l=a.ownerDocument,u=r?f??l.body:l.body;if(!u)return;t.current=l.createElement("div"),t.current.className=m,u.appendChild(t.current),n({});const x=t.current;return()=>{u.contains(x)&&u.removeChild(x)}},[a]);const C=c?.zIndex?s.jsx(N,{zIndex:c?.zIndex,children:o}):o;return t.current?h.createPortal(s.jsx(g,{value:t.current,children:C}),t.current):s.jsx("span",{ref:l=>{l&&i(l)}})},T=e=>{const{children:r,containerRef:o,appendToParentPortal:a}=e,i=o.current,t=i??(typeof window<"u"?document.body:void 0),n=d.useMemo(()=>{const c=i?.ownerDocument.createElement("div");return c&&(c.className=m),c},[i]),[,f]=d.useState({});return p(()=>f({}),[]),p(()=>
1{if(!(!n||!t))return t.appendChild(n),()=>{t.removeChild(n)}},[n,t]),t&&n?h.createPortal(s.jsx(g,{value:a?n:null,children:r}),n):null};function P(e){const r={appendToParentPortal:!0,...e},{containerRef:o,...a}=r;return o?s.jsx(T,{containerRef:o,...a}):s.jsx(w,{...a})}P.className=m;P.selector=j;P.displayName="Portal";export{P,E as a};

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.