PageSourceSearch

https://www.x2o.nl/assets/floating-ui.react-dom-C-T-wjxu.js

js x2o.nl collected 2026-09-26 04:40:18 UTC 3,228 bytes, 1 lines download raw bytes

vendor: 3,228 bytes, line 1
1import{c as I,o as J,a as L,s as K,f as N,b as Q,h as T,l as U}from"./floating-ui.dom-BytT-Sdm.js";import{r as o}from"./chunk-JZWAC4HX-DDLJKKba.js";import{r as X}from"./index-ChFC1IDb.js";var Y=typeof document<"u",Z=function(){},w=Y?o.useLayoutEffect:Z;function R(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,f;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!R(e[r],t[r]))return!1;return!0}if(f=Object.keys(e),n=f.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,f[r]))return!1;for(r=n;r--!==0;){const p=f[r];if(!(p==="_owner"&&e.$$typeof)&&!R(e[p],t[p]))return!1}return!0}return e!==e&&t!==t}function A(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function z(e,t){const n=A(e);return Math.round(t*n)/n}function E(e){const t=o.useRef(e);return w(()=>{t.current=e}),t}function oe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:f,elements:{reference:p,floating:q}={},transform:k=!0,whileElementsMounted:D,open:x}=e,[i,C]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[M,B]=o.useState(r);R(M,r)||B(r);const[V,W]=o.useState(null),[b,G]=o.useState(null),_=o.useCallback(s=>{s!==a.current&&(a.current=s,W(s))},[]),v=o.useCallback(s=>{s!==d.current&&(d.current=s,G(s))},[]),u=p||V,l=q||b,a=o.useRef(null),d=o.useRef(null),y=o.useRef(i),H=D!=null,P=E(D),S=E(f),F=E(x),g=o.useCallback(()=>{if(!a.current||!d.current)return;const s={placement:t,strategy:n,middleware:M};S.current&&(s.platform=S.current),I(a.current,d.current,s).then(h=>{const m={...h,isPositioned:F.current!==!1};$.current&&!R(y.current,m)&&(y.current=m,X.flushSync(()=>{C(m)}))})},[M,t,n,S,F]);w(()=>{x===!1&&y.current.isPositioned&&(y.current.isPositioned=!1,C(s=>({...s,isPositioned:!1})))},[x]);const $=o.useRef(!1);w(()=>($.current=!0,()=>{$.current=!1}),[]),w(()=>{if(u&&(a.current=u),l&&(d.current=l),u&&l){if(P.current)return P.current(u,l,g);g()}},[u,l,g,P,H]);const O=o.useMemo(()=>({reference:a,floating:d,setReference:_,setFloating:v}),[_,v]),c=o.useMemo(()=>({reference:u,floating:l}),[u,l]),j=o.useMemo(()=>{const s={position:n,left:0,top:0};if(!c.floating)return s;const h=z(c.floating,i.x),m=z(c.floating,i.y);return k?{...s,transform:"translate("+h+"px, "+m+"px)",...A(c.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:h,top:m}},[n,k,c.floating,i.x,i.y]);return o.useMemo(()=>({...i,update:g,refs:O,elements:c,floatingStyles:j}),[i,g,O,c,j])}const ee=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:f}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?L({element:r.current,padding:f}).fn(n):{}:r?L({element:r,padding:f}).fn(n):{}}}},se=(e,t)=>({...J(e),options:[e,t]}),fe=(e,t)=>({...K(e),options:[e,t]}),ie=(e,t)=>({...U(e),options:[e,t]}),ue=(e,t)=>({...N(e),options:[e,t]}),le=(e,t)=>({...Q(e),options:[e,t]}),ce=(e,t)=>({...T(e),options:[e,t]}),ae=(e,t)=>({...ee(e),options:[e,t]});export{ae as a,le as b,ue as f,ce as h,ie as l,se as o,fe as s,oe as u};

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.