Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.92/designer/js/definition-builder/diagram-builder/util/collisionDetection",["module","exports","require","portal-workflow-kaleo-designer-web$react-flow-renderer"],(function(e,o,r){window;{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var t=r("portal-workflow-kaleo-designer-web$react-flow-renderer");const getCollidingElements=(e,o,r)=>{const n=[];return e.forEach((e=>{(0,t.isNode)(e)&&isOverlapping(e.position,o,r)&&n.push(e.id)})),n},isOverlapping=(e,o,r)=>{if(null!==o){const t={bottomBound:e.y+84,lefBound:e.x-10,rightBound:e.x+264,topBound:e.y-10},{rectangleHeight:n,rectangleWidth:d}=o,i=(r.x>t.lefBound||r.x+d>t.lefBound)&&(r.x<t.rightBound||r.x+d<t.rightBound),l=(r.y>t.topBound||r.y+n>t.topBound)&&(r.y<t.bottomBound||r.y+n<t.bottomBound);return i&&l}return!1};var n=getCollidingElements;o.default=n}}));
//# sourceMappingURL=collisionDetection.js.map