You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
19 KiB

!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Popper=b()}(this,function(){"use strict";function a(a){var b=!1;return function(){b||(b=!0,Promise.resolve().then(function(){b=!1,a()}))}}function b(a){var b=!1;return function(){b||(b=!0,setTimeout(function(){b=!1,a()},ha))}}function c(a){var b={};return a&&"[object Function]"===b.toString.call(a)}function d(a,b){if(1!==a.nodeType)return[];var c=window.getComputedStyle(a,null);return b?c[b]:c}function e(a){return"HTML"===a.nodeName?a:a.parentNode||a.host}function f(a){if(!a)return window.document.body;switch(a.nodeName){case"HTML":case"BODY":return a.ownerDocument.body;case"#document":return a.body}var b=d(a),c=b.overflow,g=b.overflowX,h=b.overflowY;return/(auto|scroll)/.test(c+h+g)?a:f(e(a))}function g(a){var b=a&&a.offsetParent,c=b&&b.nodeName;return c&&"BODY"!==c&&"HTML"!==c?["TD","TABLE"].indexOf(b.nodeName)!==-1&&"static"===d(b,"position")?g(b):b:a?a.ownerDocument.documentElement:window.document.documentElement}function h(a){var b=a.nodeName;return"BODY"!==b&&("HTML"===b||g(a.firstElementChild)===a)}function i(a){return null!==a.parentNode?i(a.parentNode):a}function j(a,b){if(!(a&&a.nodeType&&b&&b.nodeType))return window.document.documentElement;var c=a.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING,d=c?a:b,e=c?b:a,f=document.createRange();f.setStart(d,0),f.setEnd(e,0);var k=f.commonAncestorContainer;if(a!==k&&b!==k||d.contains(e))return h(k)?k:g(k);var l=i(a);return l.host?j(l.host,b):j(a,i(b).host)}function k(a){var b=arguments.length>1&&void 0!==arguments[1]?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 l(a,b){var c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],d=k(b,"top"),e=k(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 m(a,b){var c="x"===b?"Left":"Top",d="Left"===c?"Right":"Bottom";return+a["border"+c+"Width"].split("px")[0]+ +a["border"+d+"Width"].split("px")[0]}function n(a,b,c,d){return Math.max(b["offset"+a],b["scroll"+a],c["client"+a],c["offset"+a],c["scroll"+a],ma()?c["offset"+a]+d["margin"+("Height"===a?"Top":"Left")]+d["margin"+("Height"===a?"Bottom":"Right")]:0)}function o(){var a=window.document.body,b=window.document.documentElement,c=ma()&&window.getComputedStyle(b);return{height:n("Height",a,b,c),width:n("Width",a,b,c)}}function p(a){return qa({},a,{right:a.left+a.width,bottom:a.top+a.height})}function q(a){var b={};if(ma())try{b=a.getBoundingClientRect();var c=k(a,"top"),e=k(a,"left");b.top+=c,b.left+=e,b.bottom+=c,b.right+=e}catch(f){}else b=a.getBoundingClientRect();var g={left:b.left,top:b.top,width:b.right-b.left,height:b.bottom-b.top},h="HTML"===a.nodeName?o():{},i=h.width||a.clientWidth||g.right-g.left,j=h.height||a.clientHeight||g.bottom-g.top,l=a.offsetWidth-i,n=a.offsetHeight-j;if(l||n){var q=d(a);l-=m(q,"x"),n-=m(q,"y"),g.width-=l,g.height-=n}return p(g)}function r(a,b){var c=ma(),e="HTML"===b.nodeName,g=q(a),h=q(b),i=f(a),j=d(b),k=+j.borderTopWidth.split("px")[0],m=+j.borderLeftWidth.split("px")[0],n=p({top:g.top-h.top-k,left:g.left-h.left-m,width:g.width,height:g.height});if(n.marginTop=0,n.marginLeft=0,!c&&e){var o=+j.marginTop.split("px")[0],r=+j.marginLeft.split("px")[0];n.top-=k-o,n.bottom-=k-o,n.left-=m-r,n.right-=m-r,n.marginTop=o,n.marginLeft=r}return(c?b.contains(i):b===i&&"BODY"!==i.nodeName)&&(n=l(n,b)),n}function s(a){var b=a.ownerDocument.documentElement,c=r(a,b),d=Math.max(b.clientWidth,window.innerWidth||0),e=Math.max(b.clientHeight,window.innerHeight||0),f=k(b),g=k(b,"left"),h={top:f-c.top+c.marginTop,left:g-c.left+c.marginLeft,width:d,height:e};return p(h)}function t(a){var b=a.nodeName;return"BODY"!==b&&"HTML"!==b&&("fixed"===d(a,"position")||t(e(a)))}function u(a,b,c,d){var g={top:0,left:0},h=j(a,b);if("viewport"===d)g=s(h);else{var i=void 0;"scrollParent"===d?(i=f(e(a)),"BODY"===i.nodeName&&(i=a.ownerDocument.