!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.tippy=e()}(this,(function(){"use strict";function t(t){return"[object Object]"==={}.toString.call(t)}function e(t){return[].slice.call(t)}function i(i){if(i instanceof Element||t(i))return[i];if(i instanceof NodeList)return e(i);if(Array.isArray(i))return i;try{return e(document.querySelectorAll(i))}catch(t){return[]}}function n(t){for(var e=["","webkit"],i=t.charAt(0).toUpperCase()+t.slice(1),n=0;n'):s.classList.add("tippy-arrow"),a.appendChild(s)}if(i.animateFill){a.setAttribute("data-animatefill","");var l=r();l.classList.add("tippy-backdrop"),l.setAttribute("data-state","hidden"),a.appendChild(l)}i.inertia&&a.setAttribute("data-inertia",""),i.interactive&&a.setAttribute("data-interactive","");var c,f=i.html;f?(f instanceof Element?(p.appendChild(f),c="#"+(f.id||"tippy-html-template")):(p.innerHTML=document.querySelector(f).innerHTML,c=f),o.setAttribute("data-html",""),a.setAttribute("data-template-id",c),i.interactive&&o.setAttribute("tabindex","-1")):p[i.allowTitleHTML?"innerHTML":"textContent"]=e;return a.appendChild(p),o.appendChild(a),o}function a(t){var e=function(e){return t.querySelector(e)};return{tooltip:e(Ct.TOOLTIP),backdrop:e(Ct.BACKDROP),content:e(Ct.CONTENT),arrow:e(Ct.ARROW)||e(Ct.ROUND_ARROW)}}function p(t){var e=t.getAttribute("title");e&&t.setAttribute("data-original-title",e),t.removeAttribute("title")}function s(t){return t&&"[object Function]"==={}.toString.call(t)}function l(t,e){if(1!==t.nodeType)return[];var i=getComputedStyle(t,null);return e?i[e]:i}function c(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function f(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=l(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/(auto|scroll|overlay)/.test(i+r+n)?t:f(c(t))}function d(t){return 11===t?Rt:10===t?_t:Rt||_t}function u(t){if(!t)return document.documentElement;for(var e=d(10)?document.body:null,i=t.offsetParent;i===e&&t.nextElementSibling;)i=(t=t.nextElementSibling).offsetParent;var n=i&&i.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TD","TABLE"].indexOf(i.nodeName)&&"static"===l(i,"position")?u(i):i:t?t.ownerDocument.documentElement:document.documentElement}function m(t){return null===t.parentNode?t:m(t.parentNode)}function h(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var i=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=i?t:e,r=i?e:t,o=document.createRange();o.setStart(n,0),o.setEnd(r,0);var a=o.commonAncestorContainer;if(t!==a&&e!==a||n.contains(r))return function(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||u(t.firstElementChild)===t)}(a)?a:u(a);var p=m(t);return p.host?h(p.host,e):h(t,m(e).host)}function b(t){var e=1=i.clientWidth&&n>=i.clientHeight})),c=0o,bottom:r-p.bottom>o,left:p.left-n>o,right:n-p.right>o};return"top"===s?c.top=p.top-r>l:"bottom"===s?c.bottom=r-p.bottom>l:"left"===s?c.left=p.left-n>l:"right"===s&&(c.right=n-p.right>l),c.top||c.bottom||c.left||c.right}(n,t.popper,t.options)&&(document.body.removeEventListener("mouseleave",i),document.removeEventListener("mousemove",e),lt.call(t,e))}))}lt.call(t)}},onBlur:function(e){if(e.target===t.reference&&!Yt.usingTouch){if(t.options.interactive){if(!e.relatedTarget)return;if(et(e.relatedTarget,Ct.POPPER))return}lt.call(t)}},onDelegateShow:function(e){et(e.target,t.options.target)&&st.call(t,e)},onDelegateHide:function(e){et(e.target,t.options.target)&<.call(t)}}}function ft(){var t=this,e=this.popper,i=this.reference,n=this.options,r=a(e).tooltip,o=n.popperOptions,p="round"===n.arrowType?Ct.ROUND_ARROW:Ct.ARROW,s=r.querySelector(p),l=Dt({placement:n.placement},o||{},{modifiers:Dt({},o?o.modifiers:{},{arrow:Dt({element:p},o&&o.modifiers?o.modifiers.arrow:{}),flip:Dt({enabled:n.flip,padding:n.distance+5,behavior:n.flipBehavior},o&&o.modifiers?o.modifiers.flip:{}),offset:Dt({offset:n.offset},o&&o.modifiers?o.modifiers.offset:{})}),onCreate:function(){r.style[J(e)]=tt(n.distance),s&&n.arrowTransform&&$(e,s,n.arrowTransform)},onUpdate:function(){var t=r.style;t.top="",t.bottom="",t.left="",t.right="",t[J(e)]=tt(n.distance),s&&n.arrowTransform&&$(e,s,n.arrowTransform)}});return bt.call(this,{target:e,callback:function(){t.popperInstance.update()},options:{childList:!0,subtree:!0,characterData:!0}}),new Jt(i,e,l)}function dt(t){var e=this.options;if(this.popperInstance?(this.popperInstance.scheduleUpdate(),e.livePlacement&&!at.call(this)&&this.popperInstance.enableEventListeners()):(this.popperInstance=ft.call(this),!e.livePlacement&&this.popperInstance.disableEventListeners()),!at.call(this)){var i=a(this.popper).arrow;i&&(i.style.margin=""),this.popperInstance.reference=this.reference}(function(t,e,i){var n=t.popper,r=t.options,o=r.onCreate,a=r.onUpdate;r.onCreate=r.onUpdate=function(){(function(t){t.offsetHeight})(n),e&&e(),a(),r.onCreate=o,r.onUpdate=a},i||t.scheduleUpdate()})(this.popperInstance,t,!0),e.appendTo.contains(this.popper)||e.appendTo.appendChild(this.popper)}function ut(){var t=this._(te),e=t.showTimeout,i=t.hideTimeout;clearTimeout(e),clearTimeout(i)}function mt(){var t=this;this._(te).followCursorListener=function(e){var i=t._(te).lastMouseMoveEvent=e,n=i.clientX,r=i.clientY;t.popperInstance&&(t.popperInstance.reference={getBoundingClientRect:function(){return{width:0,height:0,top:r,left:n,right:n,bottom:r}},clientWidth:0,clientHeight:0},t.popperInstance.scheduleUpdate())}}function ht(){var t=this;!function e(){t.popperInstance&&t.popperInstance.update(),t.popper.style[n("transitionDuration")]=t.options.updateDuration+"ms",t.state.visible?requestAnimationFrame(e):t.popper.style[n("transitionDuration")]=""}()}function bt(t){var e=t.target,i=t.callback,n=t.options;if(window.MutationObserver){var r=new MutationObserver(i);r.observe(e,n),this._(te).mutationObservers.push(r)}}function yt(t,e){if(!t)return e();var i=a(this.popper).tooltip,n=function(t,e){e&&i[t+"EventListener"]("transition"in document.body.style?"transitionend":"webkitTransitionEnd",e)},r=function t(r){r.target===i&&(n("remove",t),e())};n("remove",this._(te).transitionendListener),n("add",r),this._(te).transitionendListener=r}function vt(t,e){return t.reduce((function(t,i){var n=ie,r=function(t,e){return e.arrow&&(e.animateFill=!1),e.appendTo&&"function"==typeof e.appendTo&&(e.appendTo=e.appendTo()),"function"==typeof e.html&&(e.html=e.html(t)),e}(i,e.performance?e:function(t,e){var i=Pt.reduce((function(i,n){var r=t.getAttribute("data-tippy-"+n.toLowerCase())||e[n];return"false"===r&&(r=!1),"true"===r&&(r=!0),isFinite(r)&&!isNaN(parseFloat(r))&&(r=parseFloat(r)),"target"!==n&&"string"==typeof r&&"["===r.trim().charAt(0)&&(r=JSON.parse(r)),i[n]=r,i}),{});return Dt({},e,i)}(i,e)),s=i.getAttribute("title");if(!(s||r.target||r.html||r.dynamicTitle))return t;i.setAttribute(r.target?"data-tippy-delegate":"data-tippy",""),p(i);var l=o(n,s,r),c=new ee({id:n,reference:i,popper:l,options:r,title:s,popperInstance:null});r.createPopperInstanceOnInit&&(c.popperInstance=ft.call(c),c.popperInstance.disableEventListeners());var f=ct.call(c);return c.listeners=r.trigger.trim().split(" ").reduce((function(t,e){return t.concat(function(t,e,i,n){var r=i.onTrigger,o=i.onMouseLeave,a=i.onBlur,p=i.onDelegateShow,s=i.onDelegateHide,l=[];if("manual"===t)return l;var c=function(t,i){e.addEventListener(t,i),l.push({event:t,handler:i})};return n.target?(Yt.supportsTouch&&n.touchHold&&(c("touchstart",p),c("touchend",s)),"mouseenter"===t&&(c("mouseover",p),c("mouseout",s)),"focus"===t&&(c("focusin",p),c("focusout",s)),"click"===t&&c("click",p)):(c(t,r),Yt.supportsTouch&&n.touchHold&&(c("touchstart",r),c("touchend",o)),"mouseenter"===t&&c("mouseleave",o),"focus"===t&&c(At?"focusout":"blur",a)),l}(e,i,f,r))}),[]),r.dynamicTitle&&bt.call(c,{target:i,callback:function(){var t=a(l).content,e=i.getAttribute("title");e&&(t[r.allowTitleHTML?"innerHTML":"textContent"]=c.title=e,p(i))},options:{attributes:!0}}),i._tippy=c,l._tippy=c,l._reference=i,t.push(c),ie++,t}),[])}function gt(t){e(document.querySelectorAll(Ct.POPPER)).forEach((function(e){var i=e._tippy;if(i){var n=i.options;(!0===n.hideOnClick||-1e-t&&(Yt.usingTouch=!1,document.removeEventListener("mousemove",i),!Yt.iOS&&document.body.classList.remove("tippy-touch"),Yt.onUserInputChange("mouse")),t=e}}();document.addEventListener("click",(function(t){if(!(t.target instanceof Element))return gt();var e=et(t.target,Ct.REFERENCE),i=et(t.target,Ct.POPPER);if(!(i&&i._tippy&&i._tippy.options.interactive)){if(e&&e._tippy){var n=e._tippy.options,r=-1s[t]&&!e.escapeWithReference&&(n=kt(c[i],s[t]-("right"===t?c.width:c.height))),zt({},i,n)}};return l.forEach((function(t){var e=-1===["left","top"].indexOf(t)?"secondary":"primary";c=Ut({},c,f[e](t))})),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,i=e.popper,n=e.reference,r=t.placement.split("-")[0],o=Tt,a=-1!==["top","bottom"].indexOf(r),p=a?"right":"bottom",s=a?"left":"top",l=a?"width":"height";return i[p]o(n[p])&&(t.offsets.popper[s]=o(n[p])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var i;if(!G(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var r=t.placement.split("-")[0],o=t.offsets,a=o.popper,p=o.reference,s=-1!==["left","right"].indexOf(r),c=s?"height":"width",f=s?"Top":"Left",d=f.toLowerCase(),u=s?"left":"top",m=s?"bottom":"right",h=P(n)[c];p[m]-ha[m]&&(t.offsets.popper[d]+=p[d]+h-a[m]),t.offsets.popper=x(t.offsets.popper);var b=p[d]+p[c]/2-h/2,y=l(t.instance.popper),v=parseFloat(y["margin"+f],10),g=parseFloat(y["border"+f+"Width"],10),w=b-t.offsets.popper[d]-v-g;return w=Ot(kt(a[c]-h,w),0),t.arrowElement=n,t.offsets.arrow=(zt(i={},d,Et(w)),zt(i,u,""),i),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(F(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var i=A(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),n=t.placement.split("-")[0],r=S(n),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case Gt:a=[n,r];break;case Vt:a=V(n);break;case Kt:a=V(n,!0);break;default:a=e.behavior}return a.forEach((function(p,s){if(n!==p||a.length===s+1)return t;n=t.placement.split("-")[0],r=S(n);var l=t.offsets.popper,c=t.offsets.reference,f=Tt,d="left"===n&&f(l.right)>f(c.left)||"right"===n&&f(l.left)f(c.top)||"bottom"===n&&f(l.top)f(i.right),h=f(l.top)f(i.bottom),y="left"===n&&u||"right"===n&&m||"top"===n&&h||"bottom"===n&&b,v=-1!==["top","bottom"].indexOf(n),g=!!e.flipVariations&&(v&&"start"===o&&u||v&&"end"===o&&m||!v&&"start"===o&&h||!v&&"end"===o&&b);(d||y||g)&&(t.flipped=!0,(d||y)&&(n=a[s+1]),g&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=n+(o?"-"+o:""),t.offsets.popper=Ut({},t.offsets.popper,D(t.instance.popper,t.offsets.reference,t.placement)),t=I(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,i=e.split("-")[0],n=t.offsets,r=n.popper,o=n.reference,a=-1!==["left","right"].indexOf(i),p=-1===["top","left"].indexOf(i);return r[a?"left":"top"]=o[i]-(p?r[a?"width":"height"]:0),t.placement=S(e),t.offsets.popper=x(r),t}},hide:{order:800,enabled:!0,fn:function(t){if(!G(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,i=N(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomi.right||e.top>i.bottom||e.right