export class Utilities{static getCenter(t){return{x:t.left+t.width/2,y:t.top+t.height/2}}static isPointInsideBox(t,e,i){return t>i.x&&t<i.x+i.width&&e>i.y&&e<i.y+i.height}static isBoxInsideBox(t,e){let i=e.x-t.x,s=e.y-t.y;return t.x>=e.x&&t.width-i<=e.width&&t.y>=e.y&&t.height-s<=e.height}static humanLike(t){let e=(t=t.replace(/_+/gm," "))[0].toUpperCase();for(let i=1;i<t.length;i++){let s=t[i];s.match("[A-z]")&&s===s.toUpperCase()&&0!==t[i-1].trim().length&&(e+=" "),e+=s.toLowerCase()}return e}static ellipsis(t,e=15,i="..."){return t&&e&&i?i.length>e?(console.warn("Invalid ellipsis parameters: given ellipsis is longer than the max length"),t):t.length<e?t:t?t.length>8?t.substr(0,e-i.length)+i:t:"":t}}