import{V as e}from"./useSize--KU1gilk.js";function t(e){let{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,a=i,o=r*1/Math.sqrt(2),s=i-r*(1-1/Math.sqrt(2)),c=i-1/Math.sqrt(2)*n,l=r*(Math.sqrt(2)-1)+1/Math.sqrt(2)*n,u=2*i-c,d=l,f=2*i-o,p=s,m=2*i-0,h=a,g=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),_=r*(Math.sqrt(2)-1),v=`polygon(${_}px 100%, 50% ${_}px, ${2*i-_}px 100%, ${_}px 100%)`;return{arrowShadowWidth:g,arrowPath:`path('M 0 ${a} A ${r} ${r} 0 0 0 ${o} ${s} L ${c} ${l} A ${n} ${n} 0 0 1 ${u} ${d} L ${f} ${p} A ${r} ${r} 0 0 0 ${m} ${h} Z')`,arrowPolygon:v}}var n=(t,n,r)=>{let{sizePopupArrow:i,arrowPolygon:a,arrowPath:o,arrowShadowWidth:s,borderRadiusXS:c,calc:l}=t,u={content:`""`,position:`absolute`,width:s,height:s,bottom:0,insetInline:0,margin:`auto`,borderRadius:{_skip_check_:!0,value:`0 0 ${e(c)} 0`},transform:`translateY(50%) rotate(-135deg)`,zIndex:0,background:`transparent`};return r&&(u.boxShadow=r),{pointerEvents:`none`,width:i,height:i,overflow:`hidden`,"&::before":{position:`absolute`,bottom:0,insetInlineStart:0,width:i,height:l(i).div(2).equal(),background:n,clipPath:{_multi_value_:!0,value:[a,o]},content:`""`},"&::after":u}};export{t as n,n as t};