!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 i(e){return e&&"[object Function]"==={}.toString.call(e)}function y(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function h(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function m(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=y(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/(auto|scroll|overlay)/.test(n+r+o)?e:m(h(e))}function g(e){return e&&e.referenceNode?e.referenceNode:e}function v(e){return 11===e?q:10!==e&&q||z}function w(e){if(!e)return document.documentElement;for(var t=v(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var o=n&&n.nodeName;return o&&"BODY"!==o&&"HTML"!==o?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===y(n,"position")?w(n):n:e?e.ownerDocument.documentElement:document.documentElement}function l(e){return null===e.parentNode?e:l(e.parentNode)}function b(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=n?e:t,r=n?t:e,i=document.createRange();i.setStart(o,0),i.setEnd(r,0);var s,f,a=i.commonAncestorContainer;if(e!==a&&t!==a||o.contains(r))return"BODY"===(f=(s=a).nodeName)||"HTML"!==f&&w(s.firstElementChild)!==s?w(a):a;var p=l(e);return p.host?b(p.host,t):b(e,l(t).host)}function E(e,t){var n="top"===(1=o.clientWidth&&n>=o.clientHeight}),u=0a[e]&&!o.escapeWithReference&&(n=W(l[t],a[e]-("right"===e?l.width:l.height))),S({},t,n)}};return p.forEach(function(e){var t=-1===["left","top"].indexOf(e)?"secondary":"primary";l=X({},l,u[t](e))}),e.offsets.popper=l,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,o=t.reference,r=e.placement.split("-")[0],i=j,s=-1!==["top","bottom"].indexOf(r),f=s?"right":"bottom",a=s?"left":"top",p=s?"width":"height";return n[f]i(o[f])&&(e.offsets.popper[a]=i(o[f])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!M(e.instance.modifiers,"arrow","keepTogether"))return e;var o=t.element;if("string"==typeof o){if(!(o=e.instance.popper.querySelector(o)))return e}else if(!e.instance.popper.contains(o))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],i=e.offsets,s=i.popper,f=i.reference,a=-1!==["left","right"].indexOf(r),p=a?"height":"width",l=a?"Top":"Left",u=l.toLowerCase(),d=a?"left":"top",c=a?"bottom":"right",h=N(o)[p];f[c]-hs[c]&&(e.offsets.popper[u]+=f[u]+h-s[c]),e.offsets.popper=O(e.offsets.popper);var m=f[u]+f[p]/2-h/2,g=y(e.instance.popper),v=parseFloat(g["margin"+l]),b=parseFloat(g["border"+l+"Width"]),w=m-e.offsets.popper[u]-v-b,w=R(W(s[p]-h,w),0);return e.arrowElement=o,e.offsets.arrow=(S(n={},u,I(w)),S(n,d,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(g,v){if(e(g.instance.modifiers,"inner"))return g;if(g.flipped&&g.placement===g.originalPlacement)return g;var b=c(g.instance.popper,g.instance.reference,v.padding,v.boundariesElement,g.positionFixed),w=g.placement.split("-")[0],y=F(w),E=g.placement.split("-")[1]||"",x=[];switch(v.behavior){case Z:x=[w,y];break;case $:x=o(w);break;case ee:x=o(w,!0);break;default:x=v.behavior}return x.forEach(function(e,t){if(w!==e||x.length===t+1)return g;w=g.placement.split("-")[0],y=F(w);var n,o=g.offsets.popper,r=g.offsets.reference,i=j,s="left"===w&&i(o.right)>i(r.left)||"right"===w&&i(o.left)i(r.top)||"bottom"===w&&i(o.top)i(b.right),p=i(o.top)i(b.bottom),u="left"===w&&f||"right"===w&&a||"top"===w&&p||"bottom"===w&&l,d=-1!==["top","bottom"].indexOf(w),c=!!v.flipVariations&&(d&&"start"===E&&f||d&&"end"===E&&a||!d&&"start"===E&&p||!d&&"end"===E&&l),h=!!v.flipVariationsByContent&&(d&&"start"===E&&a||d&&"end"===E&&f||!d&&"start"===E&&l||!d&&"end"===E&&p),m=c||h;(s||u||m)&&(g.flipped=!0,(s||u)&&(w=x[t+1]),m&&(E="end"===(n=E)?"start":"start"===n?"end":n),g.placement=w+(E?"-"+E:""),g.offsets.popper=X({},g.offsets.popper,k(g.instance.popper,g.offsets.reference,g.placement)),g=C(g.instance.modifiers,g,"flip"))}),g},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],o=e.offsets,r=o.popper,i=o.reference,s=-1!==["left","right"].indexOf(n),f=-1===["top","left"].indexOf(n);return r[s?"left":"top"]=i[n]-(f?r[s?"width":"height"]:0),e.placement=F(t),e.offsets.popper=O(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!M(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=H(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right