]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix unit tests + Update Popper to 1.6.0
authorJohann-S <johann.servoire@gmail.com>
Fri, 14 Apr 2017 11:30:55 +0000 (13:30 +0200)
committerJohann-S <johann.servoire@gmail.com>
Sun, 14 May 2017 09:41:19 +0000 (11:41 +0200)
docs/assets/js/vendor/popper.min.js
js/src/dropdown.js
js/src/tooltip.js
js/tests/unit/dropdown.js
js/tests/unit/popover.js
js/tests/unit/tooltip.js
js/tests/visual/tooltip.html
scss/_dropdown.scss

index 22ac698abe7096d59cede83fb9dcb30dab67ea0c..fffdb1d1bf789fdda1337a1b973e334a2c9b164b 100644 (file)
@@ -1,3 +1,3 @@
-(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 e(he){const ce=he.offsetParent,ue=ce&&ce.nodeName;return ue&&'BODY'!==ue&&'HTML'!==ue?ce:window.document.documentElement}function t(he,ce){if(1!==he.nodeType)return[];const ue=window.getComputedStyle(he,null);return ce?ue[ce]:ue}function o(he){return'HTML'===he.nodeName?he:he.parentNode||he.host}function r(he){if(!he||-1!==['HTML','BODY','#document'].indexOf(he.nodeName))return window.document.body;const{overflow:ce,overflowX:ue,overflowY:ge}=t(he);return /(auto|scroll)/.test(ce+ge+ue)?he:r(o(he))}function s(he){const ce=he.nodeName;return'BODY'===ce||'HTML'===ce?!1:'fixed'===t(he,'position')||s(o(he))}function p(he){const ce=e(he),ue=s(ce);return ue?'fixed':'absolute'}function f(he,ce){const ue='x'===ce?'Left':'Top',ge='Left'==ue?'Right':'Bottom';return+he[`border${ue}Width`].split('px')[0]+ +he[`border${ge}Width`].split('px')[0]}function d(he){const ce=-1!==navigator.appVersion.indexOf('MSIE 10');let ue;if(ce)try{ue=he.getBoundingClientRect()}catch(xe){ue={}}else ue=he.getBoundingClientRect();const ge={left:ue.left,top:ue.top,right:ue.right,bottom:ue.bottom,width:ue.right-ue.left,height:ue.bottom-ue.top};if('HTML'===he.nodeName&&ce){const{scrollTop:xe,scrollLeft:ye}=window.document.documentElement;ge.top-=xe,ge.bottom-=xe,ge.left-=ye,ge.right-=ye}let be=ue.width-(he.clientWidth||ue.right-ue.left),we=ue.height-(he.clientHeight||ue.bottom-ue.top);if(be||we){const xe=t(he);be-=f(xe,'x'),we-=f(xe,'y')}return ge.right-=be,ge.width-=be,ge.bottom-=we,ge.height-=we,ge}function l(he,ce='top'){const ue='top'===ce?'scrollTop':'scrollLeft',ge=he.nodeName;if('BODY'===ge||'HTML'===ge){const be=window.document.documentElement,we=window.document.scrollingElement||be;return we[ue]}return he[ue]}function m(he,ce,ue=!1){const ge=l(ce,'top'),be=l(ce,'left'),we=ue?-1:1;return he.top+=ge*we,he.bottom+=ge*we,he.left+=be*we,he.right+=be*we,he}function h(he,ce,ue=!1,ge=!1){const be=r(ce),we=d(he),xe=d(ce);let ye={top:we.top-xe.top,left:we.left-xe.left,bottom:we.top-xe.top+we.height,right:we.left-xe.left+we.width,width:we.width,height:we.height};ue&&!ge?ye=m(ye,be,!0):e(he).contains(be)&&'BODY'!==be.nodeName&&(ye=m(ye,ce));const ve=t(ce),Oe=+ve.borderTopWidth.split('px')[0],Ee=+ve.borderLeftWidth.split('px')[0];return ye.top-=Oe,ye.bottom-=Oe,ye.left-=Ee,ye.right-=Ee,ye}function c(){const he=window.document.body,ce=window.document.documentElement;return{height:Math.max(he.scrollHeight,he.offsetHeight,ce.clientHeight,ce.scrollHeight,ce.offsetHeight),width:Math.max(he.scrollWidth,he.offsetWidth,ce.clientWidth,ce.scrollWidth,ce.offsetWidth)}}function u(he){let ce;if('HTML'===he.nodeName){const{width:ue,height:ge}=c();ce={width:ue,height:ge,left:0,top:0}}else ce={width:he.offsetWidth,height:he.offsetHeight,left:he.offsetLeft,top:he.offsetTop};return ce.right=ce.left+ce.width,ce.bottom=ce.top+ce.height,ce}function g(he){const ce=u(he);if('HTML'!==he.nodeName){const ue=e(he),ge=g(ue),be={width:ce.offsetWidth,height:ce.offsetHeight,left:ce.left+ge.left,top:ce.top+ge.top,right:ce.right-ge.right,bottom:ce.bottom-ge.bottom};return be}return ce}function w(he,ce='top'){const ue=r(he),ge=l(ue,ce);return-1===['BODY','HTML'].indexOf(ue.nodeName)?ge+w(o(ue),ce):ge}function v(he,ce,ue){let ge={top:0,left:0};const be=e(he);if('viewport'===ue){const{left:we,top:xe}=g(be),{clientWidth:ye,clientHeight:ve}=window.document.documentElement;if('fixed'===p(he))ge.right=ye,ge.bottom=ve;else{const Oe=w(he,'left'),Ee=w(he,'top');ge={top:0-xe,right:ye-we+Oe,bottom:ve-xe+Ee,left:0-we}}}else{let we;if(we='scrollParent'===ue?r(o(he)):'window'===ue?window.document.body:ue,'BODY'===we.nodeName){const{height:xe,width:ye}=c();ge.right=ye,ge.bottom=xe}else ge=h(we,be,s(he))}return ge.left+=ce,ge.top+=ce,ge.right-=ce,ge.bottom-=ce,ge}function O(he,ce,ue){if(-1===he.indexOf('auto'))return he;const ge=v(ue,0,'scrollParent'),be={top:ce.top-ge.top,right:ge.right-ce.right,bottom:ge.bottom-ce.bottom,left:ce.left-ge.left},we=Object.keys(be).sort((ye,ve)=>be[ve]-be[ye])[0],xe=he.split('-')[1];return we+(xe?`-${xe}`:'')}function N(he,ce){return Array.prototype.find?he.find(ce):he.filter(ce)[0]}function L(he,ce,ue){if(Array.prototype.findIndex)return he.findIndex((be)=>be[ce]===ue);const ge=N(he,(be)=>be[ce]===ue);return he.indexOf(ge)}function T(he){return fe({},he,{right:he.left+he.width,bottom:he.top+he.height})}function P(he){const ce=window.getComputedStyle(he),ue=parseFloat(ce.marginTop)+parseFloat(ce.marginBottom),ge=parseFloat(ce.marginLeft)+parseFloat(ce.marginRight),be={width:he.offsetWidth+ge,height:he.offsetHeight+ue};return be}function B(he){const ce={left:'right',right:'left',bottom:'top',top:'bottom'};return he.replace(/left|right|bottom|top/g,(ue)=>ce[ue])}function H(he,ce,ue,ge){ge=ge.split('-')[0];const be=P(ce),we={position:he,width:be.width,height:be.height},xe=-1!==['right','left'].indexOf(ge),ye=xe?'top':'left',ve=xe?'left':'top',Oe=xe?'height':'width',Ee=xe?'width':'height';return we[ye]=ue[ye]+ue[Oe]/2-be[Oe]/2,we[ve]=ge===ve?ue[ve]-be[Ee]:ue[B(ve)],we}function W(he,ce,ue){const ge='fixed'===he.position,be=he.isParentTransformed,we=e(ge&&be?ue:ce);return h(ue,we,ge,be)}function D(he){const ce=[!1,'ms','webkit','moz','o'],ue=he.charAt(0).toUpperCase()+he.slice(1);for(let ge=0;ge<ce.length-1;ge++){const be=ce[ge],we=be?`${be}${ue}`:he;if('undefined'!=typeof window.document.body.style[we])return we}return null}function C(he){return he&&'[object Function]'==={}.toString.call(he)}function M(he,ce){return he.some(({name:ue,enabled:ge})=>ge&&ue===ce)}function R(he,ce,ue){const ge=N(he,({name:be})=>be===ce);return!!ge&&he.some((be)=>{return be.name===ue&&be.enabled&&be.order<ge.order})}function A(he){return''!==he&&!isNaN(parseFloat(he))&&isFinite(he)}function k(he){return'BODY'!==he.nodeName&&('none'!==t(he,'transform')||(o(he)?k(o(he)):he))}function Y(he,ce){return window.removeEventListener('resize',ce.updateBound),ce.scrollParents.forEach((ue)=>{ue.removeEventListener('scroll',ce.updateBound)}),ce.updateBound=null,ce.scrollParents=[],ce.scrollElement=null,ce.eventsEnabled=!1,ce}function I(he,ce,ue){const ge=void 0===ue?he:he.slice(0,L(he,'name',ue));return ge.forEach((be)=>{be.enabled&&C(be.function)&&(ce=be.function(ce,be))}),ce}function U(he,ce){Object.keys(ce).forEach(function(ue){const ge=ce[ue];!1===ge?he.removeAttribute(ue):he.setAttribute(ue,ce[ue])})}function q(he,ce){Object.keys(ce).forEach((ue)=>{let ge='';-1!==['width','height','top','right','bottom','left'].indexOf(ue)&&A(ce[ue])&&(ge='px'),he.style[ue]=ce[ue]+ge})}function z(he,ce,ue,ge){const be='BODY'===he.nodeName,we=be?window:he;we.addEventListener(ce,ue,{passive:!0}),be||z(r(we.parentNode),ce,ue,ge),ge.push(we)}function F(he,ce,ue,ge){ue.updateBound=ge,window.addEventListener('resize',ue.updateBound,{passive:!0});const be=r(he);return z(be,'scroll',ue.updateBound,ue.scrollParents),ue.scrollElement=be,ue.eventsEnabled=!0,ue}function X(he){return'end'===he?'start':'start'===he?'end':he}const te=['native code','[object MutationObserverConstructor]'];var oe=(he)=>te.some((ce)=>-1<(he||'').toString().indexOf(ce));const ie='undefined'!=typeof window,re=['Edge','Trident','Firefox'];let ne=0;for(let he=0;he<re.length;he+=1)if(ie&&0<=navigator.userAgent.indexOf(re[he])){ne=1;break}const se=ie&&oe(window.MutationObserver);var pe=se?function(he){let ce=!1,ue=0;const ge=document.createElement('span'),be=new MutationObserver(()=>{he(),ce=!1});return be.observe(ge,{attributes:!0}),()=>{ce||(ce=!0,ge.setAttribute('x-index',ue),++ue)}}:function(he){let ce=!1;return()=>{ce||(ce=!0,setTimeout(()=>{ce=!1,he()},ne))}},fe=Object.assign||function(he){for(var ue,ce=1;ce<arguments.length;ce++)for(var ge in ue=arguments[ce],ue)Object.prototype.hasOwnProperty.call(ue,ge)&&(he[ge]=ue[ge]);return he};class me{constructor(he,ce,ue={}){this.scheduleUpdate=()=>requestAnimationFrame(this.update),this.update=pe(this.update.bind(this)),this.options=fe({},me.Defaults,ue),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=he.jquery?he[0]:he,this.popper=ce.jquery?ce[0]:ce,this.modifiers=Object.keys(me.Defaults.modifiers).map((be)=>fe({name:be},me.Defaults.modifiers[be])),this.modifiers=this.modifiers.map((be)=>{const we=ue.modifiers&&ue.modifiers[be.name]||{};return fe({},be,we)}),ue.modifiers&&(this.options.modifiers=fe({},me.Defaults.modifiers,ue.modifiers),Object.keys(ue.modifiers).forEach((be)=>{if(void 0===me.Defaults.modifiers[be]){const we=ue.modifiers[be];we.name=be,this.modifiers.push(we)}})),this.state.position=p(this.reference),this.modifiers=this.modifiers.sort((be,we)=>be.order-we.order),this.modifiers.forEach((be)=>{be.enabled&&C(be.onLoad)&&be.onLoad(this.reference,this.popper,this.options,be,this.state)}),this.state.isParentTransformed=k(this.popper.parentNode),this.update();const ge=this.options.eventsEnabled;ge&&this.enableEventListeners(),this.state.eventsEnabled=ge}update(){if(!this.state.isDestroyed){let he={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};this.state.position=p(this.reference),q(this.popper,{position:this.state.position}),he.offsets.reference=W(this.state,this.popper,this.reference),he.placement=O(this.options.placement,he.offsets.reference,this.popper),he.originalPlacement=this.options.placement,he.offsets.popper=H(this.state,this.popper,he.offsets.reference,he.placement),he=I(this.modifiers,he),this.state.isCreated?this.options.onUpdate(he):(this.state.isCreated=!0,this.options.onCreate(he))}}destroy(){return this.state.isDestroyed=!0,M(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.left='',this.popper.style.position='',this.popper.style.top='',this.popper.style[D('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}enableEventListeners(){this.state.eventsEnabled||(this.state=F(this.reference,this.options,this.state,this.scheduleUpdate))}disableEventListeners(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=Y(this.reference,this.state))}}return me.Utils={computeAutoPlacement:O,debounce:pe,findIndex:L,getBordersSize:f,getBoundaries:v,getBoundingClientRect:d,getClientRect:T,getOffsetParent:e,getOffsetRect:u,getOffsetRectRelativeToCustomParent:h,getOuterSizes:P,getParentNode:o,getPopperOffsets:H,getPosition:p,getReferenceOffsets:W,getScroll:l,getScrollParent:r,getStyleComputedProperty:t,getSupportedPropertyName:D,getTotalScroll:w,getWindowSizes:c,includeScroll:m,isFixed:s,isFunction:C,isModifierEnabled:M,isModifierRequired:R,isNative:oe,isNumeric:A,isTransformed:k,removeEventListeners:Y,runModifiers:I,setAttributes:U,setStyles:q,setupEventListeners:F},me.placements=['auto','auto-start','auto-end','top','top-start','top-end','right','right-start','right-end','bottom','bottom-start','bottom-end','left','left-start','left-end'],me.Defaults={placement:'bottom',eventsEnabled:!0,onCreate:()=>{},onUpdate:()=>{},modifiers:{shift:{order:100,enabled:!0,function:function(he){const ce=he.placement,ue=ce.split('-')[0],ge=ce.split('-')[1];if(ge){const be=he.offsets.reference,we=T(he.offsets.popper),xe=-1!==['bottom','top'].indexOf(ue),ye=xe?'left':'top',ve=xe?'width':'height',Oe={start:{[ye]:be[ye]},end:{[ye]:be[ye]+be[ve]-we[ve]}};he.offsets.popper=fe({},we,Oe[ge])}return he}},offset:{order:200,enabled:!0,function:function(he,ce){const ue=he.placement,ge=he.offsets.popper;let be;return A(ce.offset)?be=[ce.offset,0]:(be=ce.offset.split(' '),be=be.map((we,xe)=>{const ye=we.match(/(\d*\.?\d*)(.*)/),ve=+ye[1],Oe=ye[2];let Ee=-1!==ue.indexOf('right')||-1!==ue.indexOf('left');1===xe&&(Ee=!Ee);const Se=Ee?'height':'width';if(0===Oe.indexOf('%')){let Ne;switch(Oe){case'%p':Ne=he.offsets.popper;break;case'%':case'$r':default:Ne=he.offsets.reference;}const Le=T(Ne),Te=Le[Se];return Te/100*ve}if('vh'===Oe||'vw'===Oe){let Ne;return Ne='vh'===Oe?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0),Ne/100*ve}return'px'===Oe?+ve:+we})),-1===he.placement.indexOf('left')?-1===he.placement.indexOf('right')?-1===he.placement.indexOf('top')?-1!==he.placement.indexOf('bottom')&&(ge.left+=be[0],ge.top+=be[1]||0):(ge.left+=be[0],ge.top-=be[1]||0):(ge.top+=be[0],ge.left+=be[1]||0):(ge.top+=be[0],ge.left-=be[1]||0),he},offset:0},preventOverflow:{order:300,enabled:!0,function:function(he,ce){const ue=ce.boundariesElement||e(he.instance.popper),ge=v(he.instance.popper,ce.padding,ue);ce.boundaries=ge;const be=ce.priority;let we=T(he.offsets.popper);const xe={primary(ye){let ve=we[ye];return we[ye]<ge[ye]&&!ce.escapeWithReference&&(ve=Math.max(we[ye],ge[ye])),{[ye]:ve}},secondary(ye){const ve='right'===ye?'left':'top';let Oe=we[ve];return we[ye]>ge[ye]&&!ce.escapeWithReference&&(Oe=Math.min(we[ve],ge[ye]-('right'===ye?we.width:we.height))),{[ve]:Oe}}};return be.forEach((ye)=>{const ve=-1===['left','top'].indexOf(ye)?'secondary':'primary';we=fe({},we,xe[ve](ye))}),he.offsets.popper=we,he},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,function:function(he){const ce=T(he.offsets.popper),ue=he.offsets.reference,ge=he.placement.split('-')[0],be=Math.floor,we=-1!==['top','bottom'].indexOf(ge),xe=we?'right':'bottom',ye=we?'left':'top',ve=we?'width':'height';return ce[xe]<be(ue[ye])&&(he.offsets.popper[ye]=be(ue[ye])-ce[ve]),ce[ye]>be(ue[xe])&&(he.offsets.popper[ye]=be(ue[xe])),he}},arrow:{order:500,enabled:!0,function:function(he,ce){if(!R(he.instance.modifiers,'arrow','keepTogether'))return console.warn('WARNING: `keepTogether` modifier is required by arrow modifier in order to work, be sure to include it before `arrow`!'),he;let ue=ce.element;if('string'==typeof ue){if(ue=he.instance.popper.querySelector(ue),!ue)return he;}else if(!he.instance.popper.contains(ue))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),he;const ge=he.placement.split('-')[0],be=T(he.offsets.popper),we=he.offsets.reference,xe=-1!==['left','right'].indexOf(ge),ye=xe?'height':'width',ve=xe?'top':'left',Oe=xe?'left':'top',Ee=xe?'bottom':'right',Se=P(ue)[ye];we[Ee]-Se<be[ve]&&(he.offsets.popper[ve]-=be[ve]-(we[Ee]-Se)),we[ve]+Se>be[Ee]&&(he.offsets.popper[ve]+=we[ve]+Se-be[Ee]);const Ne=we[ve]+we[ye]/2-Se/2;let Le=Ne-T(he.offsets.popper)[ve];return Le=Math.max(Math.min(be[ye]-Se,Le),0),he.arrowElement=ue,he.offsets.arrow={},he.offsets.arrow[ve]=Le,he.offsets.arrow[Oe]='',he},element:'[x-arrow]'},flip:{order:600,enabled:!0,function:function(he,ce){if(M(he.instance.modifiers,'inner'))return he;if(he.flipped&&he.placement===he.originalPlacement)return he;const ue=v(he.instance.popper,ce.padding,ce.boundariesElement);let ge=he.placement.split('-')[0],be=B(ge),we=he.placement.split('-')[1]||'',xe=[];return xe='flip'===ce.behavior?[ge,be]:ce.behavior,xe.forEach((ye,ve)=>{if(ge!==ye||xe.length===ve+1)return he;ge=he.placement.split('-')[0],be=B(ge);const Oe=T(he.offsets.popper),Ee=he.offsets.reference,Se=Math.floor,Ne='left'===ge&&Se(Oe.right)>Se(Ee.left)||'right'===ge&&Se(Oe.left)<Se(Ee.right)||'top'===ge&&Se(Oe.bottom)>Se(Ee.top)||'bottom'===ge&&Se(Oe.top)<Se(Ee.bottom),Le=Se(Oe.left)<Se(ue.left),Te=Se(Oe.right)>Se(ue.right),Pe=Se(Oe.top)<Se(ue.top),Be=Se(Oe.bottom)>Se(ue.bottom),He='left'===ge&&Le||'right'===ge&&Te||'top'===ge&&Pe||'bottom'===ge&&Be,We=-1!==['top','bottom'].indexOf(ge),De=!!ce.flipVariations&&(We&&'start'===we&&Le||We&&'end'===we&&Te||!We&&'start'===we&&Pe||!We&&'end'===we&&Be);(Ne||He||De)&&(he.flipped=!0,(Ne||He)&&(ge=xe[ve+1]),De&&(we=X(we)),he.placement=ge+(we?'-'+we:''),he.offsets.popper=H(he.instance.state.position,he.instance.popper,he.offsets.reference,he.placement),he=I(he.instance.modifiers,he,'flip'))}),he},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,function:function(he){const ce=he.placement,ue=ce.split('-')[0],ge=T(he.offsets.popper),be=T(he.offsets.reference),we=-1!==['left','right'].indexOf(ue),xe=-1===['top','left'].indexOf(ue);return ge[we?'left':'top']=be[ce]-(xe?ge[we?'width':'height']:0),he.placement=B(ce),he.offsets.popper=T(ge),he}},hide:{order:800,enabled:!0,function:function(he){if(!R(he.instance.modifiers,'hide','preventOverflow'))return console.warn('WARNING: preventOverflow modifier is required by hide modifier in order to work, be sure to include it before hide!'),he;const ce=he.offsets.reference,ue=N(he.instance.modifiers,(ge)=>'preventOverflow'===ge.name).boundaries;if(ce.bottom<ue.top||ce.left>ue.right||ce.top>ue.bottom||ce.right<ue.left){if(!0===he.hide)return he;he.hide=!0,he.attributes['x-out-of-boundaries']=''}else{if(!1===he.hide)return he;he.hide=!1,he.attributes['x-out-of-boundaries']=!1}return he}},applyStyle:{order:900,enabled:!0,gpuAcceleration:!0,function:function(he,ce){const ue={position:he.offsets.popper.position},ge={'x-placement':he.placement},be=Math.round(he.offsets.popper.left),we=Math.round(he.offsets.popper.top),xe=D('transform');return ce.gpuAcceleration&&xe?(ue[xe]='translate3d('+be+'px, '+we+'px, 0)',ue.top=0,ue.left=0,ue.willChange='transform'):(ue.left=be,ue.top=we,ue.willChange='top, left'),q(he.instance.popper,fe({},ue,he.styles)),U(he.instance.popper,fe({},ge,he.attributes)),he.offsets.arrow&&q(he.arrowElement,he.offsets.arrow),he},onLoad:function(he,ce,ue,ge,be){const we=W(be,ce,he);return ue.placement=O(ue.placement,we,ce),ce.setAttribute('x-placement',ue.placement),ue}}}},me});
+var _Mathfloor=Math.floor,_Mathmin=Math.min,_Mathround=Math.round,_Mathmax=Math.max,_typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&'function'==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?'symbol':typeof e};(function(e,t){'object'===('undefined'==typeof exports?'undefined':_typeof(exports))&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(ye,we){if(1!==ye.nodeType)return[];var xe=window.getComputedStyle(ye,null);return we?xe[we]:xe}function t(ye){return'HTML'===ye.nodeName?ye:ye.parentNode||ye.host}function o(ye){if(!ye||-1!==['HTML','BODY','#document'].indexOf(ye.nodeName))return window.document.body;var we=e(ye),xe=we.overflow,ve=we.overflowX,Oe=we.overflowY;return /(auto|scroll)/.test(xe+Oe+ve)?ye:o(t(ye))}function r(ye){return'HTML'===ye.nodeName||ye.firstElementChild.offsetParent===ye}function s(ye){return null===ye.parentNode?ye:s(ye.parentNode)}function p(ye){var we=ye&&ye.offsetParent,xe=we&&we.nodeName;return xe&&'BODY'!==xe&&'HTML'!==xe?we:window.document.documentElement}function f(ye,we){if(!ye||!ye.nodeType||!we||!we.nodeType)return window.document.documentElement;var xe=ye.compareDocumentPosition(we)&Node.DOCUMENT_POSITION_FOLLOWING,ve=xe?ye:we,Oe=xe?we:ye,Ee=document.createRange();Ee.setStart(ve,0),Ee.setEnd(Oe,0);var Se=Ee.commonAncestorContainer;if(ye!==Se&&we!==Se)return r(Se)?Se:p(Se);var Le=s(ye);return Le.host?f(Le.host,we):f(ye,s(we).host)}function d(ye){var we=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',xe='top'===we?'scrollTop':'scrollLeft',ve=ye.nodeName;if('BODY'===ve||'HTML'===ve){var Oe=window.document.documentElement,Ee=window.document.scrollingElement||Oe;return Ee[xe]}return ye[xe]}function l(ye,we){var xe=2<arguments.length&&void 0!==arguments[2]&&arguments[2],ve=d(we,'top'),Oe=d(we,'left'),Ee=xe?-1:1;return ye.top+=ve*Ee,ye.bottom+=ve*Ee,ye.left+=Oe*Ee,ye.right+=Oe*Ee,ye}function m(ye,we){var xe='x'===we?'Left':'Top',ve='Left'==xe?'Right':'Bottom';return+ye['border'+xe+'Width'].split('px')[0]+ +ye['border'+ve+'Width'].split('px')[0]}function c(){var ye=window.document.body,we=window.document.documentElement;return{height:_Mathmax(ye.scrollHeight,ye.offsetHeight,we.clientHeight,we.scrollHeight,we.offsetHeight),width:_Mathmax(ye.scrollWidth,ye.offsetWidth,we.clientWidth,we.scrollWidth,we.offsetWidth)}}function h(ye){return re({},ye,{right:ye.left+ye.width,bottom:ye.top+ye.height})}function u(ye){var we=-1!==navigator.appVersion.indexOf('MSIE 10'),xe={};if(we){try{xe=ye.getBoundingClientRect()}catch(He){}var ve=d(ye,'top'),Oe=d(ye,'left');xe.top+=ve,xe.left+=Oe}else xe=ye.getBoundingClientRect();var Se,Le,Ee={left:xe.left,top:xe.top,width:xe.right-xe.left,height:xe.bottom-xe.top};if('HTML'===ye.nodeName){var Ne=c();Se=Ne.width,Le=Ne.height}else Se=ye.clientWidth||Ee.right-Ee.left,Le=ye.clientHeight||Ee.bottom-Ee.top;var Te=ye.offsetWidth-Se,Pe=ye.offsetHeight-Le;if(Te||Pe){var We=e(ye);Te-=m(We,'x'),Pe-=m(We,'y'),Ee.width-=Te,Ee.height-=Pe}return h(Ee)}function g(ye,we){var xe=-1!==navigator.appVersion.indexOf('MSIE 10'),ve=u(ye),Oe=u(we),Ee=o(ye),Se={top:ve.top-Oe.top,left:ve.left-Oe.left,bottom:ve.top-Oe.top+ve.height,right:ve.left-Oe.left+ve.width,width:ve.width,height:ve.height},Le='HTML'===we.nodeName;if(Le||'BODY'===we.nodeName){var Ne=e(we),Te=xe&&Le?0:+Ne.borderTopWidth.split('px')[0],Pe=xe&&Le?0:+Ne.borderLeftWidth.split('px')[0],We=xe&&Le?0:+Ne.marginTop.split('px')[0],He=xe&&Le?0:+Ne.marginLeft.split('px')[0];Se.top-=Te-We,Se.bottom-=Te-We,Se.left-=Pe-He,Se.right-=Pe-He,Se.marginTop=We,Se.marginLeft=He}return we.contains(Ee)&&(xe||'BODY'!==Ee.nodeName)&&(Se=l(Se,we)),Se}function w(ye){var we=window.document.documentElement,xe=g(ye,we),ve=_Mathmax(we.clientWidth,window.innerWidth||0),Oe=_Mathmax(we.clientHeight,window.innerHeight||0),Ee=d(we),Se=d(we,'left'),Le={top:Ee-xe.top+xe.marginTop,left:Se-xe.left+xe.marginLeft,width:ve,height:Oe};return h(Le)}function v(ye){var we=ye.nodeName;return'BODY'===we||'HTML'===we?!1:'fixed'===e(ye,'position')||v(t(ye))}function O(ye,we,xe,ve){var Oe={top:0,left:0},Ee=f(ye,we);if('viewport'===ve)Oe=w(Ee);else{var Se;'scrollParent'===ve?(Se=o(t(ye)),'BODY'===Se.nodeName&&(Se=window.document.documentElement)):'window'===ve?Se=window.document.documentElement:Se=ve;var Le=g(Se,Ee);if('HTML'===Se.nodeName&&!v(Ee)){var Ne=c(),Te=Ne.height,Pe=Ne.width;Oe.top+=Le.top-Le.marginTop,Oe.bottom=Te+Le.top,Oe.left+=Le.left-Le.marginLeft,Oe.right=Pe+Le.left}else Oe=Le}return Oe.left+=xe,Oe.top+=xe,Oe.right-=xe,Oe.bottom-=xe,Oe}function E(ye,we,xe,ve){if(-1===ye.indexOf('auto'))return ye;var Oe=O(xe,ve,0,'scrollParent'),Ee={top:we.top-Oe.top,right:Oe.right-we.right,bottom:Oe.bottom-we.bottom,left:we.left-Oe.left},Se=Object.keys(Ee).sort(function(Ne,Te){return Ee[Te]-Ee[Ne]})[0],Le=ye.split('-')[1];return Se+(Le?'-'+Le:'')}function N(ye,we){return Array.prototype.find?ye.find(we):ye.filter(we)[0]}function T(ye,we,xe){if(Array.prototype.findIndex)return ye.findIndex(function(Oe){return Oe[we]===xe});var ve=N(ye,function(Oe){return Oe[we]===xe});return ye.indexOf(ve)}function W(ye){var we=window.getComputedStyle(ye),xe=parseFloat(we.marginTop)+parseFloat(we.marginBottom),ve=parseFloat(we.marginLeft)+parseFloat(we.marginRight),Oe={width:ye.offsetWidth+ve,height:ye.offsetHeight+xe};return Oe}function H(ye){var we={left:'right',right:'left',bottom:'top',top:'bottom'};return ye.replace(/left|right|bottom|top/g,function(xe){return we[xe]})}function B(ye,we,xe,ve){ve=ve.split('-')[0];var Oe=W(we),Ee={position:ye,width:Oe.width,height:Oe.height},Se=-1!==['right','left'].indexOf(ve),Le=Se?'top':'left',Ne=Se?'left':'top',Te=Se?'height':'width',Pe=Se?'width':'height';return Ee[Le]=xe[Le]+xe[Te]/2-Oe[Te]/2,Ee[Ne]=ve===Ne?xe[Ne]-Oe[Pe]:xe[H(Ne)],Ee}function C(ye,we,xe){var ve=f(we,xe);return g(xe,ve)}function D(ye){for(var we=[!1,'ms','webkit','moz','o'],xe=ye.charAt(0).toUpperCase()+ye.slice(1),ve=0;ve<we.length-1;ve++){var Oe=we[ve],Ee=Oe?''+Oe+xe:ye;if('undefined'!=typeof window.document.body.style[Ee])return Ee}return null}function M(ye,we){var xe=2<arguments.length&&void 0!==arguments[2]?arguments[2]:'top',ve=o(ye),Oe=0,Ee=v(we);return r('BODY'===ve.nodeName?window.document.documentElement:ve)&&(we.contains(ve)&&Ee||!Ee)&&(Oe=d(ve,xe)),we===ve||-1===['BODY','HTML'].indexOf(ve.nodeName)?Oe+M(t(ve),we,xe):Oe}function k(ye){return ye&&'[object Function]'==={}.toString.call(ye)}function A(ye,we){return ye.some(function(xe){var ve=xe.name,Oe=xe.enabled;return Oe&&ve===we})}function R(ye,we,xe){var ve=N(ye,function(Oe){var Ee=Oe.name;return Ee===we});return!!ve&&ye.some(function(Oe){return Oe.name===xe&&Oe.enabled&&Oe.order<ve.order})}function Y(ye){return''!==ye&&!isNaN(parseFloat(ye))&&isFinite(ye)}function I(ye,we){return window.removeEventListener('resize',we.updateBound),we.scrollParents.forEach(function(xe){xe.removeEventListener('scroll',we.updateBound)}),we.updateBound=null,we.scrollParents=[],we.scrollElement=null,we.eventsEnabled=!1,we}function U(ye,we,xe){var ve=void 0===xe?ye:ye.slice(0,T(ye,'name',xe));return ve.forEach(function(Oe){Oe.enabled&&k(Oe.function)&&(we=Oe.function(we,Oe))}),we}function z(ye,we){Object.keys(we).forEach(function(xe){var ve=we[xe];!1===ve?ye.removeAttribute(xe):ye.setAttribute(xe,we[xe])})}function F(ye,we){Object.keys(we).forEach(function(xe){var ve='';-1!==['width','height','top','right','bottom','left'].indexOf(xe)&&Y(we[xe])&&(ve='px'),ye.style[xe]=we[xe]+ve})}function q(ye,we,xe,ve){var Oe='BODY'===ye.nodeName,Ee=Oe?window:ye;Ee.addEventListener(we,xe,{passive:!0}),Oe||q(o(Ee.parentNode),we,xe,ve),ve.push(Ee)}function j(ye,we,xe,ve){xe.updateBound=ve,window.addEventListener('resize',xe.updateBound,{passive:!0});var Oe=o(ye);return q(Oe,'scroll',xe.updateBound,xe.scrollParents),xe.scrollElement=Oe,xe.eventsEnabled=!0,xe}function X(ye){return'end'===ye?'start':'start'===ye?'end':ye}for(var oe=function classCallCheck(ye,we){if(!(ye instanceof we))throw new TypeError('Cannot call a class as a function')},ie=function(){function ye(we,xe){for(var Oe,ve=0;ve<xe.length;ve++)Oe=xe[ve],Oe.enumerable=Oe.enumerable||!1,Oe.configurable=!0,('value'in Oe)&&(Oe.writable=!0),Object.defineProperty(we,Oe.key,Oe)}return function(we,xe,ve){return xe&&ye(we.prototype,xe),ve&&ye(we,ve),we}}(),ne=function defineProperty(ye,we,xe){return(we in ye)?Object.defineProperty(ye,we,{value:xe,enumerable:!0,configurable:!0,writable:!0}):ye[we]=xe,ye},re=Object.assign||function(ye){for(var xe,we=1;we<arguments.length;we++)for(var ve in xe=arguments[we],xe)Object.prototype.hasOwnProperty.call(xe,ve)&&(ye[ve]=xe[ve]);return ye},se=['native code','[object MutationObserverConstructor]'],pe=function isNative(ye){return se.some(function(we){return-1<(ye||'').toString().indexOf(we)})},fe='undefined'!=typeof window,de=['Edge','Trident','Firefox'],ae=0,le=0;le<de.length;le+=1)if(fe&&0<=navigator.userAgent.indexOf(de[le])){ae=1;break}var me=fe&&pe(window.MutationObserver),ce=me?function(ye){var we=!1,xe=0,ve=document.createElement('span'),Oe=new MutationObserver(function(){ye(),we=!1});return Oe.observe(ve,{attributes:!0}),function(){we||(we=!0,ve.setAttribute('x-index',xe),++xe)}}:function(ye){var we=!1;return function(){we||(we=!0,setTimeout(function(){we=!1,ye()},ae))}},be=function(){function ye(we,xe){var ve=this,Oe=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};oe(this,ye),this.scheduleUpdate=function(){return requestAnimationFrame(ve.update)},this.update=ce(this.update.bind(this)),this.options=re({},ye.Defaults,Oe),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=we.jquery?we[0]:we,this.popper=xe.jquery?xe[0]:xe,F(this.popper,{position:'absolute'}),this.modifiers=Object.keys(ye.Defaults.modifiers).map(function(Se){return re({name:Se},ye.Defaults.modifiers[Se])}),this.modifiers=this.modifiers.map(function(Se){var Le=Oe.modifiers&&Oe.modifiers[Se.name]||{};return re({},Se,Le)}),Oe.modifiers&&(this.options.modifiers=re({},ye.Defaults.modifiers,Oe.modifiers),Object.keys(Oe.modifiers).forEach(function(Se){if(void 0===ye.Defaults.modifiers[Se]){var Le=Oe.modifiers[Se];Le.name=Se,ve.modifiers.push(Le)}})),this.modifiers=this.modifiers.sort(function(Se,Le){return Se.order-Le.order}),this.modifiers.forEach(function(Se){Se.enabled&&k(Se.onLoad)&&Se.onLoad(ve.reference,ve.popper,ve.options,Se,ve.state)}),this.update();var Ee=this.options.eventsEnabled;Ee&&this.enableEventListeners(),this.state.eventsEnabled=Ee}return ie(ye,[{key:'update',value:function(){if(!this.state.isDestroyed){var xe={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};xe.offsets.reference=C(this.state,this.popper,this.reference),xe.placement=E(this.options.placement,xe.offsets.reference,this.popper,this.reference),xe.originalPlacement=this.options.placement,xe.offsets.popper=B(this.state,this.popper,xe.offsets.reference,xe.placement),xe=U(this.modifiers,xe),this.state.isCreated?this.options.onUpdate(xe):(this.state.isCreated=!0,this.options.onCreate(xe))}}},{key:'destroy',value:function(){return this.state.isDestroyed=!0,A(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.left='',this.popper.style.position='',this.popper.style.top='',this.popper.style[D('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}},{key:'enableEventListeners',value:function(){this.state.eventsEnabled||(this.state=j(this.reference,this.options,this.state,this.scheduleUpdate))}},{key:'disableEventListeners',value:function(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=I(this.reference,this.state))}}]),ye}();return be.Utils={computeAutoPlacement:E,debounce:ce,findIndex:T,getBordersSize:m,getBoundaries:O,getBoundingClientRect:u,getClientRect:h,getOffsetParent:p,getOffsetRect:function(ye){var we;if('HTML'===ye.nodeName){var xe=c(),ve=xe.width,Oe=xe.height;we={width:ve,height:Oe,left:0,top:0}}else we={width:ye.offsetWidth,height:ye.offsetHeight,left:ye.offsetLeft,top:ye.offsetTop};return h(we)},getOffsetRectRelativeToArbitraryNode:g,getOuterSizes:W,getParentNode:t,getPopperOffsets:B,getReferenceOffsets:C,getScroll:d,getScrollParent:o,getStyleComputedProperty:e,getSupportedPropertyName:D,getTotalScroll:M,getWindowSizes:c,isFixed:v,isFunction:k,isModifierEnabled:A,isModifierRequired:R,isNative:pe,isNumeric:Y,removeEventListeners:I,runModifiers:U,setAttributes:z,setStyles:F,setupEventListeners:j},be.placements=['auto','auto-start','auto-end','top','top-start','top-end','right','right-start','right-end','bottom','bottom-start','bottom-end','left','left-start','left-end'],be.Defaults={placement:'bottom',eventsEnabled:!0,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,function:function(ye){var we=ye.placement,xe=we.split('-')[0],ve=we.split('-')[1];if(ve){var Oe=ye.offsets.reference,Ee=h(ye.offsets.popper),Se=-1!==['bottom','top'].indexOf(xe),Le=Se?'left':'top',Ne=Se?'width':'height',Te={start:ne({},Le,Oe[Le]),end:ne({},Le,Oe[Le]+Oe[Ne]-Ee[Ne])};ye.offsets.popper=re({},Ee,Te[ve])}return ye}},offset:{order:200,enabled:!0,function:function(ye,we){var Oe,xe=ye.placement,ve=ye.offsets.popper;return Y(we.offset)?Oe=[we.offset,0]:(Oe=we.offset.split(' '),Oe=Oe.map(function(Ee,Se){var Le=Ee.match(/(\d*\.?\d*)(.*)/),Ne=+Le[1],Te=Le[2],Pe=-1!==xe.indexOf('right')||-1!==xe.indexOf('left');1===Se&&(Pe=!Pe);var We=Pe?'height':'width';if(0===Te.indexOf('%')){var He;switch(Te){case'%p':He=ye.offsets.popper;break;case'%':case'$r':default:He=ye.offsets.reference;}var Be=h(He),Ce=Be[We];return Ce/100*Ne}if('vh'===Te||'vw'===Te){var De;return De='vh'===Te?_Mathmax(document.documentElement.clientHeight,window.innerHeight||0):_Mathmax(document.documentElement.clientWidth,window.innerWidth||0),De/100*Ne}return'px'===Te?+Ne:+Ee})),-1===ye.placement.indexOf('left')?-1===ye.placement.indexOf('right')?-1===ye.placement.indexOf('top')?-1!==ye.placement.indexOf('bottom')&&(ve.left+=Oe[0],ve.top+=Oe[1]||0):(ve.left+=Oe[0],ve.top-=Oe[1]||0):(ve.top+=Oe[0],ve.left+=Oe[1]||0):(ve.top+=Oe[0],ve.left-=Oe[1]||0),ye},offset:0},preventOverflow:{order:300,enabled:!0,function:function(ye,we){var xe=we.boundariesElement||p(ye.instance.popper),ve=O(ye.instance.popper,ye.instance.reference,we.padding,xe);we.boundaries=ve;var Oe=we.priority,Ee=h(ye.offsets.popper),Se={primary:function(Ne){var Te=Ee[Ne];return Ee[Ne]<ve[Ne]&&!we.escapeWithReference&&(Te=_Mathmax(Ee[Ne],ve[Ne])),ne({},Ne,Te)},secondary:function(Ne){var Te='right'===Ne?'left':'top',Pe=Ee[Te];return Ee[Ne]>ve[Ne]&&!we.escapeWithReference&&(Pe=_Mathmin(Ee[Te],ve[Ne]-('right'===Ne?Ee.width:Ee.height))),ne({},Te,Pe)}};return Oe.forEach(function(Le){var Ne=-1===['left','top'].indexOf(Le)?'secondary':'primary';Ee=re({},Ee,Se[Ne](Le))}),ye.offsets.popper=Ee,ye},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,function:function(ye){var we=h(ye.offsets.popper),xe=ye.offsets.reference,ve=ye.placement.split('-')[0],Oe=_Mathfloor,Ee=-1!==['top','bottom'].indexOf(ve),Se=Ee?'right':'bottom',Le=Ee?'left':'top',Ne=Ee?'width':'height';return we[Se]<Oe(xe[Le])&&(ye.offsets.popper[Le]=Oe(xe[Le])-we[Ne]),we[Le]>Oe(xe[Se])&&(ye.offsets.popper[Le]=Oe(xe[Se])),ye}},arrow:{order:500,enabled:!0,function:function(ye,we){if(!R(ye.instance.modifiers,'arrow','keepTogether'))return console.warn('WARNING: `keepTogether` modifier is required by arrow modifier in order to work, be sure to include it before `arrow`!'),ye;var xe=we.element;if('string'==typeof xe){if(xe=ye.instance.popper.querySelector(xe),!xe)return ye;}else if(!ye.instance.popper.contains(xe))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),ye;var ve=ye.placement.split('-')[0],Oe=h(ye.offsets.popper),Ee=ye.offsets.reference,Se=-1!==['left','right'].indexOf(ve),Le=Se?'height':'width',Ne=Se?'top':'left',Te=Se?'left':'top',Pe=Se?'bottom':'right',We=W(xe)[Le];Ee[Pe]-We<Oe[Ne]&&(ye.offsets.popper[Ne]-=Oe[Ne]-(Ee[Pe]-We)),Ee[Ne]+We>Oe[Pe]&&(ye.offsets.popper[Ne]+=Ee[Ne]+We-Oe[Pe]);var He=Ee[Ne]+Ee[Le]/2-We/2,Be=He-h(ye.offsets.popper)[Ne];return Be=_Mathmax(_Mathmin(Oe[Le]-We,Be),0),ye.arrowElement=xe,ye.offsets.arrow={},ye.offsets.arrow[Ne]=Be,ye.offsets.arrow[Te]='',ye},element:'[x-arrow]'},flip:{order:600,enabled:!0,function:function(ye,we){if(A(ye.instance.modifiers,'inner'))return ye;if(ye.flipped&&ye.placement===ye.originalPlacement)return ye;var xe=O(ye.instance.popper,ye.instance.reference,we.padding,we.boundariesElement),ve=ye.placement.split('-')[0],Oe=H(ve),Ee=ye.placement.split('-')[1]||'',Se=[];return Se='flip'===we.behavior?[ve,Oe]:we.behavior,Se.forEach(function(Le,Ne){if(ve!==Le||Se.length===Ne+1)return ye;ve=ye.placement.split('-')[0],Oe=H(ve);var Te=h(ye.offsets.popper),Pe=ye.offsets.reference,We=_Mathfloor,He='left'===ve&&We(Te.right)>We(Pe.left)||'right'===ve&&We(Te.left)<We(Pe.right)||'top'===ve&&We(Te.bottom)>We(Pe.top)||'bottom'===ve&&We(Te.top)<We(Pe.bottom),Be=We(Te.left)<We(xe.left),Ce=We(Te.right)>We(xe.right),De=We(Te.top)<We(xe.top),Me=We(Te.bottom)>We(xe.bottom),ke='left'===ve&&Be||'right'===ve&&Ce||'top'===ve&&De||'bottom'===ve&&Me,Ae=-1!==['top','bottom'].indexOf(ve),Re=!!we.flipVariations&&(Ae&&'start'===Ee&&Be||Ae&&'end'===Ee&&Ce||!Ae&&'start'===Ee&&De||!Ae&&'end'===Ee&&Me);(He||ke||Re)&&(ye.flipped=!0,(He||ke)&&(ve=Se[Ne+1]),Re&&(Ee=X(Ee)),ye.placement=ve+(Ee?'-'+Ee:''),ye.offsets.popper=B(ye.instance.state.position,ye.instance.popper,ye.offsets.reference,ye.placement),ye=U(ye.instance.modifiers,ye,'flip'))}),ye},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,function:function(ye){var we=ye.placement,xe=we.split('-')[0],ve=h(ye.offsets.popper),Oe=h(ye.offsets.reference),Ee=-1!==['left','right'].indexOf(xe),Se=-1===['top','left'].indexOf(xe);return ve[Ee?'left':'top']=Oe[we]-(Se?ve[Ee?'width':'height']:0),ye.placement=H(we),ye.offsets.popper=h(ve),ye}},hide:{order:800,enabled:!0,function:function(ye){if(!R(ye.instance.modifiers,'hide','preventOverflow'))return console.warn('WARNING: preventOverflow modifier is required by hide modifier in order to work, be sure to include it before hide!'),ye;var we=ye.offsets.reference,xe=N(ye.instance.modifiers,function(ve){return'preventOverflow'===ve.name}).boundaries;if(we.bottom<xe.top||we.left>xe.right||we.top>xe.bottom||we.right<xe.left){if(!0===ye.hide)return ye;ye.hide=!0,ye.attributes['x-out-of-boundaries']=''}else{if(!1===ye.hide)return ye;ye.hide=!1,ye.attributes['x-out-of-boundaries']=!1}return ye}},applyStyle:{order:900,enabled:!0,gpuAcceleration:!0,function:function(ye,we){var xe={position:ye.offsets.popper.position},ve={'x-placement':ye.placement},Oe=_Mathround(ye.offsets.popper.left),Ee=_Mathround(ye.offsets.popper.top),Se=D('transform');return we.gpuAcceleration&&Se?(xe[Se]='translate3d('+Oe+'px, '+Ee+'px, 0)',xe.top=0,xe.left=0,xe.willChange='transform'):(xe.left=Oe,xe.top=Ee,xe.willChange='top, left'),F(ye.instance.popper,re({},xe,ye.styles)),z(ye.instance.popper,re({},ve,ye.attributes)),ye.offsets.arrow&&F(ye.arrowElement,ye.offsets.arrow),ye},onLoad:function(ye,we,xe,ve,Oe){var Ee=C(Oe,we,ye);return xe.placement=E(xe.placement,Ee,we,ye),we.setAttribute('x-placement',xe.placement),xe}}}},be});
 
-//# sourceMappingURL=popper.min.js.map
\ No newline at end of file
+//# sourceMappingURL=popper.es5.min.js.map
\ No newline at end of file
index ad5ee8d9fcf0154d39134e273df739beb0055c41..ce25e9671144fb6cc10dd9299c4038e3573718b7 100644 (file)
@@ -1,3 +1,5 @@
+/* global Popper */
+
 import Util from './util'
 
 
@@ -64,7 +66,7 @@ const Dropdown = (($) => {
 
   const Default = {
     placement   : 'bottom',
-    offset      : {}
+    offset      : 0
   }
 
   const DefaultType = {
@@ -143,7 +145,7 @@ const Dropdown = (($) => {
         placement : context._config.placement,
         modifiers : {
           offset : {
-            offset : this.config.offset
+            offset : context._config.offset
           }
         }
       })
@@ -204,7 +206,7 @@ const Dropdown = (($) => {
 
     _getMenuElement() {
       if (!this._menu) {
-        let parent = Dropdown._getParentFromElement(this._element)
+        const parent = Dropdown._getParentFromElement(this._element)
         this._menu = $(parent).find(Selector.MENU)[0]
       }
       return this._menu
@@ -215,7 +217,7 @@ const Dropdown = (($) => {
     static _jQueryInterface(config) {
       return this.each(function () {
         let data = $(this).data(DATA_KEY)
-        let _config = typeof config === 'object' ? config : null
+        const _config = typeof config === 'object' ? config : null
 
         if (!data) {
           data = new Dropdown(this, _config)
@@ -240,7 +242,7 @@ const Dropdown = (($) => {
       const toggles = $.makeArray($(Selector.DATA_TOGGLE))
       for (let i = 0; i < toggles.length; i++) {
         const parent        = Dropdown._getParentFromElement(toggles[i])
-        let context         = $(toggles[i]).data(DATA_KEY)
+        const context         = $(toggles[i]).data(DATA_KEY)
         const relatedTarget = {
           relatedTarget : toggles[i]
         }
@@ -249,7 +251,7 @@ const Dropdown = (($) => {
           continue
         }
 
-        let dropdownMenu = context._menu
+        const dropdownMenu = context._menu
         if (!$(parent).hasClass(ClassName.SHOW)) {
           continue
         }
index 5f5e3d7bcbe1d33813e30fe6c29d88fc4ee7bc23..9995cede748060f348dcb0c3ac581e69dd5d3bb7 100644 (file)
@@ -47,7 +47,7 @@ const Tooltip = (($) => {
     html        : false,
     selector    : false,
     placement   : 'top',
-    offset      : {},
+    offset      : 0,
     container   : false
   }
 
index a15eb52450d66ac83634ce682ee2e79e8259db35..1dd675b0b685270a747a26f1d714b24a1ffe52eb 100644 (file)
@@ -275,20 +275,20 @@ $(function () {
     $first.parent('.dropdown')
     .on('shown.bs.dropdown', function () {
       assert.strictEqual($first.parents('.show').length, 1, '"show" class added on click')
-      assert.strictEqual($('#qunit-fixture .show').length, 1, 'only one dropdown is shown')
+      assert.strictEqual($('#qunit-fixture .dropdown-menu.show').length, 1, 'only one dropdown is shown')
       $(document.body).trigger('click')
     }).on('hidden.bs.dropdown', function () {
-      assert.strictEqual($('#qunit-fixture .show').length, 0, '"show" class removed')
+      assert.strictEqual($('#qunit-fixture .dropdown-menu.show').length, 0, '"show" class removed')
       $last.trigger('click')
     })
 
     $last.parent('.btn-group')
     .on('shown.bs.dropdown', function () {
       assert.strictEqual($last.parent('.show').length, 1, '"show" class added on click')
-      assert.strictEqual($('#qunit-fixture .show').length, 1, 'only one dropdown is shown')
+      assert.strictEqual($('#qunit-fixture .dropdown-menu.show').length, 1, 'only one dropdown is shown')
       $(document.body).trigger('click')
     }).on('hidden.bs.dropdown', function () {
-      assert.strictEqual($('#qunit-fixture .show').length, 0, '"show" class removed')
+      assert.strictEqual($('#qunit-fixture .dropdown-menu.show').length, 0, '"show" class removed')
       done()
     })
     $first.trigger('click')
@@ -321,24 +321,24 @@ $(function () {
     $first.parent('.dropdown')
     .on('shown.bs.dropdown', function () {
       assert.strictEqual($first.parents('.show').length, 1, '"show" class added on click')
-      assert.strictEqual($('#qunit-fixture .show').length, 1, 'only one dropdown is shown')
+      assert.strictEqual($('#qunit-fixture .dropdown-menu.show').length, 1, 'only one dropdown is shown')
       var e = $.Event('keyup')
       e.which = 9 // Tab
       $(document.body).trigger(e)
     }).on('hidden.bs.dropdown', function () {
-      assert.strictEqual($('#qunit-fixture .show').length, 0, '"show" class removed')
+      assert.strictEqual($('#qunit-fixture .dropdown-menu.show').length, 0, '"show" class removed')
       $last.trigger('click')
     })
 
     $last.parent('.btn-group')
     .on('shown.bs.dropdown', function () {
       assert.strictEqual($last.parent('.show').length, 1, '"show" class added on click')
-      assert.strictEqual($('#qunit-fixture .show').length, 1, 'only one dropdown is shown')
+      assert.strictEqual($('#qunit-fixture .dropdown-menu.show').length, 1, 'only one dropdown is shown')
       var e = $.Event('keyup')
       e.which = 9 // Tab
       $(document.body).trigger(e)
     }).on('hidden.bs.dropdown', function () {
-      assert.strictEqual($('#qunit-fixture .show').length, 0, '"show" class removed')
+      assert.strictEqual($('#qunit-fixture .dropdown-menu.show').length, 0, '"show" class removed')
       done()
     })
     $first.trigger('click')
@@ -552,7 +552,7 @@ $(function () {
   })
 
   QUnit.test('should not close the dropdown if the user clicks on a text field', function (assert) {
-    assert.expect(1)
+    assert.expect(2)
     var done = assert.async()
     var dropdownHTML = '<div class="dropdown">'
         + '<button type="button" data-toggle="dropdown">Dropdown</button>'
@@ -565,23 +565,23 @@ $(function () {
       .find('[data-toggle="dropdown"]')
       .bootstrapDropdown()
 
+    var $textfield = $('#textField')
+    $textfield.on('click', function () {
+      assert.ok($dropdown.parent('.dropdown').hasClass('show'), 'dropdown menu is shown')
+      done()
+    })
+
     $dropdown
       .parent('.dropdown')
       .on('shown.bs.dropdown', function () {
-        $('#textField').trigger('click')
-        assert.ok($dropdown.parent('.dropdown').hasClass('show'), 'dropdown menu is shown')
-        setTimeout(function () {
-          done()
-        }, 300)
-      })
-      .on('hidden.bs.dropdown', function () {
         assert.ok($dropdown.parent('.dropdown').hasClass('show'), 'dropdown menu is shown')
+        $textfield.trigger($.Event('click'))
       })
     $dropdown.trigger('click')
   })
 
   QUnit.test('should not close the dropdown if the user clicks on a textarea', function (assert) {
-    assert.expect(1)
+    assert.expect(2)
     var done = assert.async()
     var dropdownHTML = '<div class="dropdown">'
         + '<button type="button" data-toggle="dropdown">Dropdown</button>'
@@ -594,17 +594,17 @@ $(function () {
       .find('[data-toggle="dropdown"]')
       .bootstrapDropdown()
 
+    var $textarea = $('#textArea')
+    $textarea.on('click', function () {
+      assert.ok($dropdown.parent('.dropdown').hasClass('show'), 'dropdown menu is shown')
+      done()
+    })
+
     $dropdown
       .parent('.dropdown')
       .on('shown.bs.dropdown', function () {
-        $('#textArea').trigger('click')
-        assert.ok($dropdown.parent('.dropdown').hasClass('show'), 'dropdown menu is shown')
-        setTimeout(function () {
-          done()
-        }, 300)
-      })
-      .on('hidden.bs.dropdown', function () {
         assert.ok($dropdown.parent('.dropdown').hasClass('show'), 'dropdown menu is shown')
+        $textarea.trigger($.Event('click'))
       })
     $dropdown.trigger('click')
   })
index eaa9fa0c0d08089dcf5f948dbdf22f51548e7fe1..a7762bfaba70e7a40e7ac15758c813fdc11a2aec 100644 (file)
@@ -47,13 +47,18 @@ $(function () {
 
   QUnit.test('should render popover element', function (assert) {
     assert.expect(2)
-    var $popover = $('<a href="#" title="mdo" data-content="https://twitter.com/mdo">@mdo</a>')
+    var done = assert.async()
+    $('<a href="#" title="mdo" data-content="https://twitter.com/mdo">@mdo</a>')
       .appendTo('#qunit-fixture')
+      .on('shown.bs.popover', function () {
+        assert.notEqual($('.popover').length, 0, 'popover was inserted')
+        $(this).bootstrapPopover('hide')
+      })
+      .on('hidden.bs.popover', function () {
+        assert.strictEqual($('.popover').length, 0, 'popover removed')
+        done()
+      })
       .bootstrapPopover('show')
-
-    assert.notEqual($('.popover').length, 0, 'popover was inserted')
-    $popover.bootstrapPopover('hide')
-    assert.strictEqual($('.popover').length, 0, 'popover removed')
   })
 
   QUnit.test('should store popover instance in popover data object', function (assert) {
index 0bb90156b9e170fb79dc59dfad6ec3519b541118..f47a97e30c24b36a8f7530c269daf37fa57f8473 100644 (file)
@@ -383,8 +383,6 @@ $(function () {
         var $tooltip = $($(this).data('bs.tooltip').tip)
         assert.ok($tooltip.hasClass('bs-tooltip-right'))
         assert.ok($tooltip.attr('style') === undefined)
-        $(this).bootstrapTooltip('hide')
-        $container.remove()
         $styles.remove()
         done()
       })
@@ -475,32 +473,19 @@ $(function () {
       })
       .appendTo('#qunit-fixture')
 
-    $('#qunit-fixture').css({
-      position : 'relative',
-      top : '0px',
-      left : '0px'
-    })
-
-    var $trigger = $container
+    $container
       .find('a')
       .css('margin-top', 200)
       .bootstrapTooltip({
         placement: 'top',
         animate: false
       })
-      .bootstrapTooltip('show')
-
-    var $tooltip = $($trigger.data('bs.tooltip').tip)
-
-    setTimeout(function () {
-      assert.ok(Math.round($tooltip.offset().top + $tooltip.outerHeight()) <= Math.round($trigger.offset().top))
-      $('#qunit-fixture').css({
-        position : 'absolute',
-        top : '-10000px',
-        left : '-10000px'
+      .on('shown.bs.tooltip', function () {
+        var $tooltip = $($(this).data('bs.tooltip').tip)
+        assert.ok(Math.round($tooltip.offset().top + $tooltip.outerHeight()) >= Math.round($(this).offset().top))
+        done()
       })
-      done()
-    }, 0)
+      .bootstrapTooltip('show')
   })
 
   QUnit.test('should show tooltip if leave event hasn\'t occurred before delay expires', function (assert) {
@@ -702,43 +687,6 @@ $(function () {
     assert.strictEqual(currentUid, $('#tt-content').text())
   })
 
-  QUnit.test('should correctly position tooltips on transformed elements', function (assert) {
-    var styleProps = document.documentElement.style
-    if (!('transform' in styleProps) && !('webkitTransform' in styleProps) && !('msTransform' in styleProps)) {
-      assert.expect(0)
-      return
-    }
-    assert.expect(2)
-
-    var done = assert.async()
-
-    var styles = '<style>'
-        + '#qunit-fixture { top: 0; left: 0; }'
-        + '.tooltip, .tooltip *, .tooltip *:before, .tooltip *:after { box-sizing: border-box; }'
-        + '.tooltip { position: absolute; }'
-        + '.tooltip .tooltip-inner { width: 24px; height: 24px; font-family: Helvetica; }'
-        + '#target { position: absolute; top: 100px; left: 50px; width: 100px; height: 200px; -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); }'
-        + '</style>'
-    var $styles = $(styles).appendTo('head')
-
-    var $element = $('<div id="target" title="1"/>').appendTo('#qunit-fixture')
-
-    $element
-      .on('shown.bs.tooltip', function () {
-        var offset = $('.tooltip').offset()
-        $styles.remove()
-        assert.ok(Math.abs(offset.left - 88) <= 1, 'tooltip has correct horizontal location')
-        assert.ok(Math.abs(offset.top - 126) <= 1, 'tooltip has correct vertical location')
-        $element.bootstrapTooltip('hide')
-        done()
-      })
-      .bootstrapTooltip({
-        trigger: 'manual'
-      })
-
-    $element.bootstrapTooltip('show')
-  })
-
   QUnit.test('should do nothing when an attempt is made to hide an uninitialized tooltip', function (assert) {
     assert.expect(1)
 
index 9fbd196b6faab3cc3ae557fe154c529df4193a66..c45926eba98e2b0e5ec3a99aa86ba63a5751f603 100644 (file)
@@ -5,6 +5,19 @@
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
     <title>Tooltip</title>
+    <style>
+      #target {
+        border: 1px solid;
+        width: 100px;
+        height: 50px;
+        border: 1px solid;
+        margin-left: 50px;
+        -webkit-transform: rotate(270deg);
+        -ms-transform: rotate(270deg);
+        transform: rotate(270deg);
+        margin-top: 100px;
+      }
+    </style>
   </head>
   <body>
     <div class="container">
@@ -34,6 +47,7 @@
           <circle cx="15" cy="10" r="10" fill="#62448F" data-toggle="tooltip" data-placement="top" title="Tooltip on SVG" />
         </svg>
       </p>
+      <div id="target" title="Test tooltip on transformed element"></div>
     </div>
 
     <script src="../../../docs/assets/js/vendor/jquery-slim.min.js"></script>
     <script>
       $(function () {
         $('[data-toggle="tooltip"]').tooltip()
+        $('#target').tooltip({
+          placement : 'top',
+          trigger : 'manual'
+        }).tooltip('show')
       })
     </script>
   </body>
index 2c57f0209c65e5afcdce71d9bfa085d1e7d891ca..4f0e6fcce6e951abab9499a3da03fb29523d1013 100644 (file)
 //
 // Just add .dropup after the standard .dropdown class and you're set.
 
-.dropup {}
+//.dropup {}