(function(n){"use strict";var t=n.fn.popover,i=function(){t.Constructor.apply(this,arguments)};i.prototype=n.extend({},t.Constructor.prototype,{constructor:i,_super:function(){var i=n.makeArray(arguments);t.Constructor.prototype[i.shift()].apply(this,i)},show:function(){var u,e,n,i,r,f,t;if(this.hasContent&&this.enabled){u=this.tip();this.setContent();this.options.animation&&u.addClass("fade");f=typeof this.options.placement=="function"?this.options.placement.call(this,u[0],this.$element[0]):this.options.placement;e=/in/.test(f);u.remove().css({top:0,left:0,display:"block"}).appendTo(e?this.$element:document.body);n=this.getPosition(e);i=u[0].offsetWidth;r=u[0].offsetHeight;switch(e?f.split(" ")[1]:f){case"bottom":t={top:n.top+n.height,left:n.left+n.width/2-i/2};break;case"top":t={top:n.top-r,left:n.left+n.width/2-i/2};break;case"left":t={top:n.top+n.height/2-r/2,left:n.left-i};break;case"right":t={top:n.top+n.height/2-r/2,left:n.left+n.width};break;case"topLeft":t={top:n.top-r,left:n.left+n.width/2-i*.2};break;case"topRight":t={top:n.top-r,left:n.left+n.width/2-i*.8};break;case"rightTop":t={top:n.top+n.height/2-r*.2,left:n.left+n.width};break;case"rightBottom":t={top:n.top+n.height/2-r*.8,left:n.left+n.width};break;case"bottomLeft":t={top:n.top+n.height,left:n.left+n.width/2-i*.2};break;case"bottomRight":t={top:n.top+n.height,left:n.left+n.width/2-i*.8};break;case"leftTop":t={top:n.top+n.height/2-r*.2,left:n.left-i};break;case"leftBottom":t={top:n.top+n.height/2-r*.8,left:n.left-i}}u.css(t).addClass(f).addClass("in")}}});n.fn.popover=n.extend(function(t){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f=typeof t=="object"&&t;r||u.data("bs.popover",r=new i(this,f));typeof t=="string"&&r[t]()})},t)})(jQuery)