PageSourceSearch

https://bataitools.com/assets/get-floating-position-CB4MN0yb.js

js bataitools.com collected 2026-10-06 22:45:50 UTC 2,049 bytes, 1 lines download raw bytes

1import{R as l,r as h}from"./fallback-DfOEyDwd.js";import{j as b}from"./layout-CZ7ZP5-6.js";import{u as R}from"./floating-ui.react-BMVDfz3m.js";function F(t){var r;const o=l.version;return typeof l.version!="string"||o.startsWith("18.")?t==null?void 0:t.ref:(r=t==null?void 0:t.props)==null?void 0:r.ref}function c(t,o,r,n){return t==="center"||n==="center"?{top:o}:t==="end"?{bottom:r}:t==="start"?{top:r}:{}}function g(t,o,r,n,i){return t==="center"||n==="center"?{left:o}:t==="end"?{[i==="ltr"?"right":"left"]:r}:t==="start"?{[i==="ltr"?"left":"right"]:r}:{}}const y={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function C({position:t,arrowSize:o,arrowOffset:r,arrowRadius:n,arrowPosition:i,arrowX:p,arrowY:f,dir:d}){const[e,s="center"]=t.split("-"),a={width:o,height:o,transform:"rotate(45deg)",position:"absolute",[y[e]]:n},u=-o/2;return e==="left"?{...a,...c(s,f,r,i),right:u,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:e==="right"?{...a,...c(s,f,r,i),left:u,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:e==="top"?{...a,...g(s,p,r,i,d),bottom:u,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:e==="bottom"?{...a,...g(s,p,r,i,d),top:u,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const v=h.forwardRef(({position:t,arrowSize:o,arrowOffset:r,arrowRadius:n,arrowPosition:i,visible:p,arrowX:f,arrowY:d,style:e,...s},a)=>{const{dir:u}=R();return p?b.jsx("div",{...s,ref:a,style:{...e,...C({position:t,arrowSize:o,arrowOffset:r,arrowRadius:n,arrowPosition:i,dir:u,arrowX:f,arrowY:d})}}):null});v.displayName="@mantine/core/FloatingArrow";function L(t,o){if(t==="rtl"&&(o.includes("right")||o.includes("left"))){const[r,n]=o.split("-"),i=r==="right"?"left":"right";return n===void 0?i:`${i}-${n}`}return o}export{v as F,L as a,F as g};

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.