0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-10 22:24:19 +01:00
Bootstrap/docs/assets/js/vendor/popper.min.js

3 lines
19 KiB
JavaScript
Raw Normal View History

2017-05-24 14:44:16 +02:00
var _Mathfloor=Math.floor,_Mathmin=Math.min,_Mathround=Math.round,_Mathmax=Math.max;(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function o(Ne){return''!==Ne&&!isNaN(parseFloat(Ne))&&isFinite(Ne)}function r(Ne,We){Object.keys(We).forEach(function(Pe){var De='';-1!==['width','height','top','right','bottom','left'].indexOf(Pe)&&o(We[Pe])&&(De='px'),Ne.style[Pe]=We[Pe]+De})}function p(Ne){return Ne&&'[object Function]'==={}.toString.call(Ne)}function s(Ne,We){if(1!==Ne.nodeType)return[];var Pe=window.getComputedStyle(Ne,null);return We?Pe[We]:Pe}function d(Ne){return'HTML'===Ne.nodeName?Ne:Ne.parentNode||Ne.host}function f(Ne){if(!Ne||-1!==['HTML','BODY','#document'].indexOf(Ne.nodeName))return window.document.body;var We=s(Ne),Pe=We.overflow,De=We.overflowX,He=We.overflowY;return /(auto|scroll)/.test(Pe+He+De)?Ne:f(d(Ne))}function l(Ne){var We=Ne.nodeName;return'BODY'!==We&&('HTML'===We||Ne.firstElementChild.offsetParent===Ne)}function m(Ne){return null===Ne.parentNode?Ne:m(Ne.parentNode)}function h(Ne){var We=Ne&&Ne.offsetParent,Pe=We&&We.nodeName;return Pe&&'BODY'!==Pe&&'HTML'!==Pe?We:window.document.documentElement}function c(Ne,We){if(!Ne||!Ne.nodeType||!We||!We.nodeType)return window.document.documentElement;var Pe=Ne.compareDocumentPosition(We)&Node.DOCUMENT_POSITION_FOLLOWING,De=Pe?Ne:We,He=Pe?We:Ne,Be=document.createRange();Be.setStart(De,0),Be.setEnd(He,0);var Me=Be.commonAncestorContainer;if(Ne!==Me&&We!==Me||De.contains(He))return l(Me)?Me:h(Me);var Ie=m(Ne);return Ie.host?c(Ie.host,We):c(Ne,m(We).host)}function u(Ne){var We=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',Pe='top'===We?'scrollTop':'scrollLeft',De=Ne.nodeName;if('BODY'===De||'HTML'===De){var He=window.document.documentElement,Be=window.document.scrollingElement||He;return Be[Pe]}return Ne[Pe]}function g(Ne,We){var Pe=2<arguments.length&&void 0!==arguments[2]&&arguments[2],De=u(We,'top'),He=u(We,'left'),Be=Pe?-1:1;return Ne.top+=De*Be,Ne.bottom+=De*Be,Ne.left+=He*Be,Ne.right+=He*Be,Ne}function w(Ne,We){var Pe='x'===We?'Left':'Top',De='Left'==Pe?'Right':'Bottom';return+Ne['border'+Pe+'Width'].split('px')[0]+ +Ne['border'+De+'Width'].split('px')[0]}function E(Ne,We,Pe,De){return _Mathmax(We['offset'+Ne],Pe['client'+Ne],Pe['offset'+Ne],ye()?Pe['offset'+Ne]+De['margin'+('Height'===Ne?'Top':'Left')]+De['margin'+('Height'===Ne?'Bottom':'Right')]:0)}function v(){var Ne=window.document.body,We=window.document.documentElement,Pe=ye()&&window.getComputedStyle(We);return{height:E('Height',Ne,We,Pe),width:E('Width',Ne,We,Pe)}}function O(Ne){return xe({},Ne,{right:Ne.left+Ne.width,bottom:Ne.top+Ne.height})}function L(Ne){var We={};if(ye())try{We=Ne.getBoundingClientRect();var Pe=u(Ne,'top'),De=u(Ne,'left');We.top+=Pe,We.left+=De,We.bottom+=Pe,We.right+=De}catch(Ye){}else We=Ne.getBoundingClientRect();var He={left:We.left,top:We.top,width:We.right-We.left,height:We.bottom-We.top},Be='HTML'===Ne.nodeName?v():{},Me=Be.width||Ne.clientWidth||He.right-He.left,Ie=Be.height||Ne.clientHeight||He.bottom-He.top,Ae=Ne.offsetWidth-Me,Re=Ne.offsetHeight-Ie;if(Ae||Re){var Ue=s(Ne);Ae-=w(Ue,'x'),Re-=w(Ue,'y'),He.width-=Ae,He.height-=Re}return O(He)}function S(Ne,We){var Pe=ye(),De='HTML'===We.nodeName,He=L(Ne),Be=L(We),Me=f(Ne),Ie=O({top:He.top-Be.top,left:He.left-Be.left,width:He.width,height:He.height});if(De||'BODY'===We.nodeName){var Ae=s(We),Re=Pe&&De?0:+Ae.borderTopWidth.split('px')[0],Ue=Pe&&De?0:+Ae.borderLeftWidth.split('px')[0],Ye=Pe&&De?0:+Ae.marginTop.split('px')[0],Fe=Pe&&De?0:+Ae.marginLeft.split('px')[0];Ie.top-=Re-Ye,Ie.bottom-=Re-Ye,Ie.left-=Ue-Fe,Ie.right-=Ue-Fe,Ie.marginTop=Ye,Ie.marginLeft=Fe}return(Pe?We.contains(Me):We===Me&&'BODY'!==Me.nodeName)&&(Ie=g(Ie,We)),Ie}function C(Ne){var We=window.document.documentElement,Pe=S(Ne,We),De=_Mathmax(We.clientWidth,window.innerWidth||0),He=_Mathmax(We.clientHeight,window.innerHeight||0),Be=u(We),Me=u(We,'left'),Ie={top:Be-Pe.top+Pe.marginTop,left:Me-Pe.left+Pe.marginL
2017-04-06 23:16:07 +02:00
//# sourceMappingURL=popper.min.js.map