import{top as e,right as t,bottom as r,left as p}from"../enums.js";import n from"../utils/detectOverflow.js";function i(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function o(n){return[e,t,r,p].some((function(e){return n[e]>=0}))}var s={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,p=t.rects.reference,s=t.rects.popper,a=t.modifiersData.preventOverflow,f=n(t,{elementContext:"reference"}),d=n(t,{altBoundary:!0}),c=i(f,p),m=i(d,s,a),u=o(c),h=o(m);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:m,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":u,"data-popper-escaped":h})}};export default s;
//# sourceMappingURL=hide.js.map
