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