mirror of https://github.com/ColorlibHQ/AdminLTE
6 lines
9.4 KiB
JavaScript
6 lines
9.4 KiB
JavaScript
|
/*
|
||
|
Copyright (C) Federico Zivolo 2017
|
||
|
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
|
||
|
*/function a(a,b){if(1!==a.nodeType)return[];var c=getComputedStyle(a,null);return b?c[b]:c}function b(a){return'HTML'===a.nodeName?a:a.parentNode||a.host}function c(d){if(!d)return document.body;switch(d.nodeName){case'HTML':case'BODY':return d.ownerDocument.body;case'#document':return d.body;}var e=a(d),f=e.overflow,g=e.overflowX,h=e.overflowY;return /(auto|scroll)/.test(f+h+g)?d:c(b(d))}function d(b){var c=b&&b.offsetParent,e=c&&c.nodeName;return e&&'BODY'!==e&&'HTML'!==e?-1!==['TD','TABLE'].indexOf(c.nodeName)&&'static'===a(c,'position')?d(c):c:b?b.ownerDocument.documentElement:document.documentElement}function e(a){var b=a.nodeName;return'BODY'!==b&&('HTML'===b||d(a.firstElementChild)===a)}function f(a){return null===a.parentNode?a:f(a.parentNode)}function g(a,b){if(!a||!a.nodeType||!b||!b.nodeType)return document.documentElement;var c=a.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING,h=c?a:b,i=c?b:a,j=document.createRange();j.setStart(h,0),j.setEnd(i,0);var k=j.commonAncestorContainer;if(a!==k&&b!==k||h.contains(i))return e(k)?k:d(k);var l=f(a);return l.host?g(l.host,b):g(a,f(b).host)}function h(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:'top',c='top'===b?'scrollTop':'scrollLeft',d=a.nodeName;if('BODY'===d||'HTML'===d){var e=a.ownerDocument.documentElement,f=a.ownerDocument.scrollingElement||e;return f[c]}return a[c]}function j(a,b){var c=2<arguments.length&&void 0!==arguments[2]&&arguments[2],d=h(b,'top'),e=h(b,'left'),f=c?-1:1;return a.top+=d*f,a.bottom+=d*f,a.left+=e*f,a.right+=e*f,a}function k(a,b){var c='x'===b?'Left':'Top',d='Left'==c?'Right':'Bottom';return parseFloat(a['border'+c+'Width'],10)+parseFloat(a['border'+d+'Width'],10)}var l,m=function(){return void 0==l&&(l=-1!==navigator.appVersion.indexOf('MSIE 10')),l};function n(a,b,c,d){return Math.max(b['offset'+a],b['scroll'+a],c['client'+a],c['offset'+a],c['scroll'+a],m()?c['offset'+a]+d['margin'+('Height'===a?'Top':'Left')]+d['margin'+('Height'===a?'Bottom':'Right')]:0)}function o(){var a=document.body,b=document.documentElement,c=m()&&getComputedStyle(b);return{height:n('Height',a,b,c),width:n('Width',a,b,c)}}var p=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a};function q(a){return p({},a,{right:a.left+a.width,bottom:a.top+a.height})}function r(b){var c={};if(m())try{c=b.getBoundingClientRect();var d=h(b,'top'),e=h(b,'left');c.top+=d,c.left+=e,c.bottom+=d,c.right+=e}catch(a){}else c=b.getBoundingClientRect();var f={left:c.left,top:c.top,width:c.right-c.left,height:c.bottom-c.top},g='HTML'===b.nodeName?o():{},i=g.width||b.clientWidth||f.right-f.left,j=g.height||b.clientHeight||f.bottom-f.top,l=b.offsetWidth-i,n=b.offsetHeight-j;if(l||n){var p=a(b);l-=k(p,'x'),n-=k(p,'y'),f.width-=l,f.height-=n}return q(f)}function s(b,d){var e=m(),f='HTML'===d.nodeName,g=r(b),h=r(d),i=c(b),k=a(d),l=parseFloat(k.borderTopWidth,10),n=parseFloat(k.borderLeftWidth,10),o=q({top:g.top-h.top-l,left:g.left-h.left-n,width:g.width,height:g.height});if(o.marginTop=0,o.marginLeft=0,!e&&f){var p=parseFloat(k.marginTop,10),s=parseFloat(k.marginLeft,10);o.top-=l-p,o.bottom-=l-p,o.left-=n-s,o.right-=n-s,o.marginTop=p,o.marginLeft=s}return(e?d.contains(i):d===i&&'BODY'!==i.nodeName)&&(o=j(o,d)),o}function t(a){var b=Math.max,c=a.ownerDocument.documentElement,d=s(a,c),e=b(c.clientWidth,window.innerWidth||0),f=b(c.clientHeight,window.innerHeight||0),g=h(c),i=h(c,'left'),j={top:g-d.top+d.marginTop,left:i-d.left+d.marginLeft,width:e,height:f};return q(j)}function u(c){var d=c.nodeName;return'BODY'===d||'HTML'===d?!1:!('fixed'!==a(c,'position'))||u(b(c))}function v(a,d,e,f){var h={top:0,left:0},i=g(a,d);if('viewport'===f)h=t(i);else{var j;'scrollParent'===f?(j=c(b(d)),'BODY'===j.nodeName&&(j=a.ownerDocument.documentElement)):'window'===f?j=a.ownerDocument.documentElement:j=f;var k=s(j,i);if('HTML'===j.nodeName&&!u(i)){var l=o(),m=l.height,n=l.width;h.top+=k.top-k.marginTop,h.bottom=m+k.top,h.left+=k.left-k.marginLeft,h.right=n+k.left}else h=k}retur
|
||
|
//# sourceMappingURL=popper-utils.min.js.map
|