h+this.panelOffset)>t.right?(this._placement="c",this._updateDirection(this._placement,e,i)):(e.left<t.left||e.right>t.right)&&(this._placement=this._flipDirection(this._placement),this._updateDirection(this._placement,e,i))),e.toCSS(this._panel)},_flipDirection:function(t){var e=this.DIRECTIONS.indexOf(t);return e=(e+2)%this.DIRECTIONS.length,this.DIRECTIONS[e]},_getOffset:function(t,e,i,n,s,h){var a=this._containerOffset,o=(s-2*this.boundaryOffset)/2-this._tipSize;return t+a<i?a=i-t:e+a>n&&(a=n-e),Math.mi