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(Oe){return''!==Oe&&!isNaN(parseFloat(Oe))&&isFinite(Oe)}function r(Oe,Le){Object.keys(Le).forEach(function(Se){var Ce='';-1!==['width','height','top','right','bottom','left'].indexOf(Se)&&o(Le[Se])&&(Ce='px'),Oe.style[Se]=Le[Se]+Ce})}function s(Oe){for(var Le=[!1,'ms','webkit','moz','o'],Se=Oe.charAt(0).toUpperCase()+Oe.slice(1),Ce=0;CeCe[He]&&!Le.escapeWithReference&&(ke=_Mathmin(Ne[Pe],Ce[He]-('right'===He?Ne.width:Ne.height))),ce({},Pe,ke)}};return Te.forEach(function(De){var He=-1===['left','top'].indexOf(De)?'secondary':'primary';Ne=he({},Ne,We[He](De))}),Oe.offsets.popper=Ne,Oe},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(Oe){var Le=w(Oe.offsets.popper),Se=Oe.offsets.reference,Ce=Oe.placement.split('-')[0],Te=_Mathfloor,Ne=-1!==['top','bottom'].indexOf(Ce),We=Ne?'right':'bottom',De=Ne?'left':'top',He=Ne?'width':'height';return Le[We]Te(Se[We])&&(Oe.offsets.popper[De]=Te(Se[We])),Oe}},arrow:{order:500,enabled:!0,fn:function(Oe,Le){if(!K(Oe.instance.modifiers,'arrow','keepTogether'))return Oe;var Se=Le.element;if('string'==typeof Se){if(Se=Oe.instance.popper.querySelector(Se),!Se)return Oe;}else if(!Oe.instance.popper.contains(Se))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),Oe;var Ce=Oe.placement.split('-')[0],Te=w(Oe.offsets.popper),Ne=Oe.offsets.reference,We=-1!==['left','right'].indexOf(Ce),De=We?'height':'width',He=We?'top':'left',Pe=We?'left':'top',ke=We?'bottom':'right',Be=C(Se)[De];Ne[ke]-BeTe[ke]&&(Oe.offsets.popper[He]+=Ne[He]+Be-Te[ke]);var Me=Ne[He]+Ne[De]/2-Be/2,Ie=Me-w(Oe.offsets.popper)[He];return Ie=_Mathmax(_Mathmin(Te[De]-Be,Ie),0),Oe.arrowElement=Se,Oe.offsets.arrow={},Oe.offsets.arrow[He]=Ie,Oe.offsets.arrow[Pe]='',Oe},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(Oe,Le){if(I(Oe.instance.modifiers,'inner'))return Oe;if(Oe.flipped&&Oe.placement===Oe.originalPlacement)return Oe;var Se=Y(Oe.instance.popper,Oe.instance.reference,Le.padding,Le.boundariesElement),Ce=Oe.placement.split('-')[0],Te=T(Ce),Ne=Oe.placement.split('-')[1]||'',We=[];switch(Le.behavior){case Ee.FLIP:We=[Ce,Te];break;case Ee.CLOCKWISE:We=V(Ce);break;case Ee.COUNTERCLOCKWISE:We=V(Ce,!0);break;default:We=Le.behavior;}return We.forEach(function(De,He){if(Ce!==De||We.length===He+1)return Oe;Ce=Oe.placement.split('-')[0],Te=T(Ce);var Pe=w(Oe.offsets.popper),ke=Oe.offsets.reference,Be=_Mathfloor,Me='left'===Ce&&Be(Pe.right)>Be(ke.left)||'right'===Ce&&Be(Pe.left)Be(ke.top)||'bottom'===Ce&&Be(Pe.top)Be(Se.right),Ue=Be(Pe.top)Be(Se.bottom),Re='left'===Ce&&Ie||'right'===Ce&&Ae||'top'===Ce&&Ue||'bottom'===Ce&&Ye,Fe=-1!==['top','bottom'].indexOf(Ce),je=!!Le.flipVariations&&(Fe&&'start'===Ne&&Ie||Fe&&'end'===Ne&&Ae||!Fe&&'start'===Ne&&Ue||!Fe&&'end'===Ne&&Ye);(Me||Re||je)&&(Oe.flipped=!0,(Me||Re)&&(Ce=We[He+1]),je&&(Ne=_(Ne)),Oe.placement=Ce+(Ne?'-'+Ne:''),Oe.offsets.popper=N(Oe.instance.state.position,Oe.instance.popper,Oe.offsets.reference,Oe.placement),Oe=M(Oe.instance.modifiers,Oe,'flip'))}),Oe},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(Oe){var Le=Oe.placement,Se=Le.split('-')[0],Ce=w(Oe.offsets.popper),Te=w(Oe.offsets.reference),Ne=-1!==['left','right'].indexOf(Se),We=-1===['top','left'].indexOf(Se);return Ce[Ne?'left':'top']=Te[Le]-(We?Ce[Ne?'width':'height']:0),Oe.placement=T(Le),Oe.offsets.popper=w(Ce),Oe}},hide:{order:800,enabled:!0,fn:function(Oe){if(!K(Oe.instance.modifiers,'hide','preventOverflow'))return Oe;var Le=Oe.offsets.reference,Se=k(Oe.instance.modifiers,function(Ce){return'preventOverflow'===Ce.name}).boundaries;if(Le.bottomSe.right||Le.top>Se.bottom||Le.right