UNPKG

tippy.js

Version:

Highly customizable tooltip and popover library

3 lines (2 loc) 21.8 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@popperjs/core")):"function"==typeof define&&define.amd?define(["exports","@popperjs/core"],e):e((t=t||self).tippy={},t.Popper)}(this,(function(t,e){"use strict";var n="undefined"!=typeof window&&"undefined"!=typeof document,r=n?navigator.userAgent:"",i=/MSIE |Trident\//.test(r),o=n&&/iPhone|iPad|iPod/.test(navigator.platform);function a(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function s(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function p(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout((function(){t(r)}),e)};var n}function u(t,e){var n=Object.assign({},t);return e.forEach((function(t){delete n[t]})),n}function c(t){return[].concat(t)}function f(t,e){-1===t.indexOf(e)&&t.push(e)}function l(t,e){return t.filter((function(t){return t.name===e})).reduce((function(t,e){return Object.assign({},t,{},e,{options:Object.assign({},t.options,{},e.options)})}),{})}function d(t){return t.split("-")[0]}function m(t){return[].slice.call(t)}var v=Object.assign({appendTo:function(){return document.body},aria:"describedby",content:"",delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),g=Object.keys(v);function h(t){var e=(t.plugins||[]).reduce((function(e,n){var r=n.name,i=n.defaultValue;return r&&(e[r]=void 0!==t[r]?t[r]:i),e}),{});return Object.assign({},t,{},e)}function b(t,e){var n=Object.assign({},e,{},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(h(Object.assign({},v,{plugins:e}))):g).reduce((function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e}),{})}(t,e.plugins));return n.interactive&&(n.aria=null),n}var y={passive:!0};function w(){return document.createElement("div")}function x(t){return s(t,"Element")}function T(t){return s(t,"MouseEvent")}function E(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function A(t){return x(t)?[t]:function(t){return s(t,"NodeList")}(t)?m(t):Array.isArray(t)?t:m(document.querySelectorAll(t))}function O(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function C(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function D(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null}function L(t){var e=c(t)[0];return e&&e.ownerDocument||document}function k(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[r](e,n)}))}var P={isTouch:!1},V=0;function j(){P.isTouch||(P.isTouch=!0,window.performance&&document.addEventListener("mousemove",M))}function M(){var t=performance.now();t-V<20&&(P.isTouch=!1,document.removeEventListener("mousemove",M)),V=t}function R(){var t=document.activeElement;if(E(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function S(t,e){t.innerHTML=e}function I(t){var e=w();return!0===t?e.className="tippy-arrow":(e.className="tippy-svg-arrow",x(t)?e.appendChild(t):S(e,t)),e}function B(t,e){var n=e.props,r=e.reference,i="function"==typeof n.content?n.content(r):n.content;x(i)?(S(t,""),t.appendChild(i)):n.allowHTML?S(t,i):t.textContent=i}function N(t){var e=t.firstElementChild,n=m(e.children);return{box:e,content:n.find((function(t){return t.classList.contains("tippy-content")})),arrow:n.find((function(t){return t.classList.contains("tippy-arrow")||t.classList.contains("tippy-svg-arrow")}))||null,backdrop:n.find((function(t){return t.classList.contains("tippy-backdrop")}))||null}}function H(t){var e=w(),n=w();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=w();function i(n,r){var i=N(e),o=i.box,a=i.content,s=i.arrow;e.style.zIndex=""+r.zIndex,r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content!==r.content&&B(a,t),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(I(r.arrow))):o.appendChild(I(r.arrow)):s&&o.removeChild(s)}return r.className="tippy-content",r.setAttribute("data-state","hidden"),B(r,t),e.appendChild(n),n.appendChild(r),i(t.props,t.props),{popper:e,update:i}}function _(t){return t.$$tippy}H.$$tippy=!0;var z=1,U=[],q=[];function F(t,n){var r,s,u,g,x,E,A,V,j=b(t,Object.assign({},v,{},h(n))),M=!1,R=!1,S=!1,I=[],B=p(ht,j.interactiveDebounce),H=L(j.triggerTarget||t),F=z++,W=(V=j.plugins).filter((function(t,e){return V.indexOf(t)===e})),X={id:F,reference:t,popper:w(),popperInstance:null,props:j,state:{currentPlacement:null,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:W,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(s),cancelAnimationFrame(u)},setProps:function(e){if(X.state.isDestroyed)return;ot("onBeforeUpdate",[X,e]),vt();var n=X.props,r=b(t,Object.assign({},X.props,{},e,{ignoreAttributes:!0}));X.props=r,mt(),n.interactiveDebounce!==r.interactiveDebounce&&(pt(),B=p(ht,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?c(n.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):r.triggerTarget&&t.removeAttribute("aria-expanded");st(),rt(),J&&J(n,r);X.popperInstance&&xt();ot("onAfterUpdate",[X,e])},setContent:function(t){X.setProps({content:t})},show:function(){var t=X.state.isVisible,e=X.state.isDestroyed,n=!X.state.isEnabled,r=P.isTouch&&!X.props.touch,i=a(X.props.duration,0,v.duration);if(t||e||n||r)return;if(tt().hasAttribute("disabled"))return;if(ot("onShow",[X],!1),!1===X.props.onShow(X))return;X.state.isVisible=!0,$.style.visibility="visible",rt(),ct(),$.style.transition="none",E=function(){if(X.state.isVisible&&!S){if(S=!0,$.offsetHeight,$.style.transition=X.props.moveTransition,_(X.props.render)){var t=et(),e=t.box,n=t.content;X.props.animation&&(O([e,n],i),C([e,n],"visible"))}at(),st(),f(q,X),it(!0),X.state.isMounted=!0,ot("onMount",[X]),X.props.animation&&_(X.props.render)&&function(t,e){lt(t,e)}(i,(function(){X.state.isShown=!0,ot("onShown",[X])}))}},function(){var t,e=X.props.appendTo,n=tt();X.props.interactive&&e===v.appendTo||"parent"===e?t=n.parentNode:(i=[n],t="function"==typeof(r=e)?r.apply(void 0,i):r);var r,i;t.contains($)||t.appendChild($);xt()}()},hide:function(){var t=!X.state.isVisible,e=X.state.isDestroyed,n=!X.state.isEnabled,r=a(X.props.duration,1,v.duration);if(t||e||n)return;if(ot("onHide",[X],!1),!1===X.props.onHide(X))return;if(X.state.isVisible=!1,X.state.isShown=!1,$.style.visibility="hidden",S=!1,pt(),ft(),rt(),_(X.props.render)){var i=et(),o=i.box,s=i.content;X.props.animation&&(O([o,s],r),C([o,s],"hidden"))}at(),st(),X.props.animation&&_(X.props.render)&&function(t,e){lt(t,(function(){!X.state.isVisible&&$.parentNode&&$.parentNode.contains($)&&e()}))}(r,Ct)},enable:function(){X.state.isEnabled=!0},disable:function(){X.hide(),X.state.isEnabled=!1},unmount:Ct,destroy:function(){if(X.state.isDestroyed)return;X.clearDelayTimeouts(),X.unmount(),vt(),delete t._tippy,X.state.isDestroyed=!0,ot("onDestroy",[X])}};if(!j.render)return X;var Y=j.render(X),$=Y.popper,J=Y.update;$.setAttribute("data-tippy-root",""),$.id="tippy-"+X.id,X.popper=$,t._tippy=X,$._tippy=X;var G=W.map((function(t){return t.fn(X)})),K=t.hasAttribute("aria-expanded");return mt(),st(),ot("onCreate",[X]),j.showOnCreate&&At(),$.addEventListener("mouseenter",(function(){X.props.interactive&&X.state.isVisible&&X.clearDelayTimeouts()})),$.addEventListener("mouseleave",(function(){X.props.interactive&&X.props.trigger.indexOf("mouseenter")>=0&&H.addEventListener("mousemove",B)})),X;function Q(){var t=X.props.touch;return Array.isArray(t)?t:[t,0]}function Z(){return"hold"===Q()[0]}function tt(){return A||t}function et(){return N($)}function nt(t){return X.state.isMounted&&!X.state.isVisible||P.isTouch||g&&"focus"===g.type?0:a(X.props.delay,t?0:1,v.delay)}function rt(){$.style.pointerEvents=X.props.interactive&&X.state.isVisible?"":"none"}function it(t){var e=t&&o&&P.isTouch;H.body.classList[e?"add":"remove"]("tippy-iOS")}function ot(t,e,n){var r;(void 0===n&&(n=!0),G.forEach((function(n){n[t]&&n[t].apply(void 0,e)})),n)&&(r=X.props)[t].apply(r,e)}function at(){var e=X.props.aria;if(e){var n="aria-"+e,r=$.id;c(X.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(n);if(X.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var i=e&&e.replace(r,"").trim();i?t.setAttribute(n,i):t.removeAttribute(n)}}))}}function st(){K||c(X.props.triggerTarget||t).forEach((function(t){X.props.interactive?t.setAttribute("aria-expanded",X.state.isVisible&&t===tt()?"true":"false"):t.removeAttribute("aria-expanded")}))}function pt(){H.body.removeEventListener("mouseleave",Ot),H.removeEventListener("mousemove",B),U=U.filter((function(t){return t!==B}))}function ut(t){if(!X.props.interactive||!$.contains(t.target)){if(tt().contains(t.target)){if(P.isTouch)return;if(X.state.isVisible&&X.props.trigger.indexOf("click")>=0)return}!0===X.props.hideOnClick&&(M=!1,X.clearDelayTimeouts(),X.hide(),R=!0,setTimeout((function(){R=!1})),X.state.isMounted||ft())}}function ct(){H.addEventListener("mousedown",ut,!0)}function ft(){H.removeEventListener("mousedown",ut,!0)}function lt(t,e){var n=et().box;function r(t){t.target===n&&(k(n,"remove",r),e())}if(0===t)return e();k(n,"remove",x),k(n,"add",r),x=r}function dt(e,n,r){void 0===r&&(r=!1),c(X.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,n,r),I.push({node:t,eventType:e,handler:n,options:r})}))}function mt(){var t;Z()&&(dt("touchstart",gt,y),dt("touchend",bt,y)),(t=X.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(dt(t,gt),t){case"mouseenter":dt("mouseleave",bt);break;case"focus":dt(i?"focusout":"blur",yt);break;case"focusin":dt("focusout",yt)}}))}function vt(){I.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)})),I=[]}function gt(t){var e=!1;if(X.state.isEnabled&&!wt(t)&&!R){if(g=t,A=t.currentTarget,st(),!X.state.isVisible&&T(t)&&U.forEach((function(e){return e(t)})),"click"===t.type&&(X.props.trigger.indexOf("mouseenter")<0||M)&&!1!==X.props.hideOnClick&&X.state.isVisible)e=!0;else{var n=Q(),i=n[0],o=n[1];P.isTouch&&"hold"===i&&o?r=setTimeout((function(){At(t)}),o):At(t)}"click"===t.type&&(M=!e),e&&Ot(t)}}function ht(e){D(e.target,(function(e){return e===t||e===$}))||function(t,e){var n=e.clientX,r=e.clientY;return t.every((function(t){var e=t.basePlacement,i=t.popperRect,o=t.props,a=t.offsetData,s=o.interactiveBorder,p="bottom"===e?a.top.y:0,u="top"===e?a.bottom.y:0,c="right"===e?a.left.x:0,f="left"===e?a.right.x:0,l=i.top-r+p>s,d=r-i.bottom-u>s,m=i.left-n+c>s,v=n-i.right-f>s;return l||d||m||v}))}(Et().concat($).map((function(t){var e=t._tippy;return e.popperInstance?{popperRect:t.getBoundingClientRect(),basePlacement:d(e.state.currentPlacement),offsetData:e.popperInstance.state.modifiersData.offset,props:j}:null})).filter(Boolean),e)&&(pt(),Ot(e))}function bt(t){if(!(wt(t)||X.props.trigger.indexOf("click")>=0&&M))return X.props.interactive?(H.body.addEventListener("mouseleave",Ot),H.addEventListener("mousemove",B),void f(U,B)):void Ot(t)}function yt(t){X.props.trigger.indexOf("focusin")<0&&t.target!==tt()||X.props.interactive&&t.relatedTarget&&$.contains(t.relatedTarget)||Ot(t)}function wt(t){var e="ontouchstart"in window,n=t.type.indexOf("touch")>=0,r=Z();return e&&P.isTouch&&r&&!n||P.isTouch&&!r&&n}function xt(){Tt();var n=X.props,r=n.popperOptions,i=n.placement,o=n.offset,a=n.getReferenceClientRect,s=n.moveTransition,p=_(X.props.render)?N($).arrow:null,u=a?{getBoundingClientRect:a}:t,c={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;_(X.props.render)&&(delete e.attributes.popper["data-popper-placement"],et().box.setAttribute("data-placement",e.placement)),X.state.currentPlacement=e.placement}},f={name:"arrow",enabled:!!p,options:{element:p,padding:3}},d=[].concat((null==r?void 0:r.modifiers)||[],[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"computeStyles",options:{adaptive:!s}},c]).concat(_(X.props.render)?[f]:[]);X.popperInstance=e.createPopper(u,$,Object.assign({},r,{placement:i,onFirstUpdate:E,modifiers:[l(d,"offset"),l(d,"arrow"),l(d,"preventOverflow"),l(d,"flip"),l(d,"computeStyles")].concat(d)}))}function Tt(){X.popperInstance&&(X.popperInstance.destroy(),X.popperInstance=null)}function Et(){return m($.querySelectorAll("[data-tippy-root]"))}function At(t){X.clearDelayTimeouts(),t&&ot("onTrigger",[X,t]),ct();var e=nt(!0);e?r=setTimeout((function(){X.show()}),e):X.show()}function Ot(t){if(X.clearDelayTimeouts(),ot("onUntrigger",[X,t]),X.state.isVisible){if(!(X.props.trigger.indexOf("mouseenter")>=0&&X.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&M)){var e=nt(!1);e?s=setTimeout((function(){X.state.isVisible&&X.hide()}),e):u=requestAnimationFrame((function(){X.hide()}))}}else ft()}function Ct(){Tt(),Et().forEach((function(t){t._tippy.unmount()})),$.parentNode&&$.parentNode.removeChild($),0===(q=q.filter((function(t){return t!==X}))).length&&it(!1),X.state.isMounted=!1,ot("onHidden",[X])}}function W(t,e){void 0===e&&(e={});var n=v.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",j,Object.assign({},y,{capture:!0})),window.addEventListener("blur",R);var r=Object.assign({},e,{plugins:n}),i=A(t).reduce((function(t,e){var n=e&&F(e,r);return n&&t.push(n),t}),[]);return x(t)?i[0]:i}W.defaultProps=v,W.setDefaultProps=function(t){Object.keys(t).forEach((function(e){v[e]=t[e]}))},W.currentInput=P;var X={mouseover:"mouseenter",focusin:"focus",click:"click"};var Y={name:"animateFill",defaultValue:!1,fn:function(t){var e=N(t.popper),n=e.box,r=e.content,i=t.props.animateFill?function(){var t=w();return t.className="tippy-backdrop",C([t],"hidden"),t}():null;return{onCreate:function(){i&&(n.insertBefore(i,n.firstElementChild),n.setAttribute("data-animatefill",""),n.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(i){var t=n.style.transitionDuration,e=Number(t.replace("ms",""));r.style.transitionDelay=Math.round(e/10)+"ms",i.style.transitionDuration=t,C([i],"visible")}},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&C([i],"hidden")}}}};var $={name:"followCursor",defaultValue:!1,fn:function(t){var e,n=t.reference,r=L(t.props.triggerTarget||n),i=null;function o(){return"manual"===t.props.trigger.trim()}function a(){var e=!!o()||null!==i&&!(0===i.clientX&&0===i.clientY);return t.props.followCursor&&e}function s(){t.setProps({getReferenceClientRect:null})}function p(){a()?r.addEventListener("mousemove",c):s()}function u(){r.removeEventListener("mousemove",c)}function c(r){var i=e=r,o=i.clientX,a=i.clientY,s=D(r.target,(function(t){return t===n})),p=t.props.followCursor;!s&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=n.getBoundingClientRect();return{width:0,height:0,top:"horizontal"===p?t.top:a,bottom:"horizontal"===p?t.bottom:a,left:"vertical"===p?t.left:o,right:"vertical"===p?t.right:o}}}),(P.isTouch||"initial"===t.props.followCursor&&t.state.isVisible)&&u()}return{onMount:function(){a()&&c(e)},onShow:function(){o()&&(e=i={clientX:0,clientY:0},p())},onTrigger:function(t,n){i||(T(n)&&(i={clientX:n.clientX,clientY:n.clientY},e=n),p())},onUntrigger:function(){t.state.isVisible||(u(),i=null)},onHidden:function(){u(),s(),i=null}}}},J={name:"inlinePositioning",defaultValue:!1,fn:function(t){var e,n=t.reference;var r={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(r){var i=r.state;t.props.inlinePositioning&&(e!==i.placement&&t.setProps({getReferenceClientRect:function(){return function(t){return function(t,e,n){if(n.length<2||null===t)return e;switch(t){case"top":case"bottom":var r=n[0],i=n[n.length-1],o="top"===t,a=r.top,s=i.bottom,p=o?r.left:i.left,u=o?r.right:i.right;return{top:a,bottom:s,left:p,right:u,width:u-p,height:s-a};case"left":case"right":var c=Math.min.apply(Math,n.map((function(t){return t.left}))),f=Math.max.apply(Math,n.map((function(t){return t.right}))),l=n.filter((function(e){return"left"===t?e.left===c:e.right===f})),d=l[0].top,m=l[l.length-1].bottom;return{top:d,bottom:m,left:c,right:f,width:f-c,height:m-d};default:return e}}(d(t),n.getBoundingClientRect(),m(n.getClientRects()))}(i.placement)}}),e=i.placement)}};return{onCreate:function(){var e;t.setProps({popperOptions:{modifiers:[].concat((null==(e=t.popperInstance)?void 0:e.state.options.modifiers)||[],[r])}})}}}};var G={name:"sticky",defaultValue:!1,fn:function(t){var e=t.reference,n=t.popper;function r(e){return!0===t.props.sticky||t.props.sticky===e}var i=null,o=null;function a(){var s=r("reference")?(t.popperInstance?t.popperInstance.state.elements.reference:e).getBoundingClientRect():null,p=r("popper")?n.getBoundingClientRect():null;(s&&K(i,s)||p&&K(o,p))&&t.popperInstance&&t.popperInstance.update(),i=s,o=p,t.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){t.props.sticky&&a()}}}};function K(t,e){return!t||!e||(t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left)}n&&function(t){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var n=document.head,r=document.querySelector("head>style,head>link");r?n.insertBefore(e,r):n.appendChild(e)}('.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-width:8px 8px 0;border-top-color:#333;bottom:-7px;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;border-width:0 8px 8px;border-bottom-color:#333;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:#333;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:#333;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow,.tippy-arrow:before{position:absolute}.tippy-arrow{pointer-events:none;width:16px;height:16px}.tippy-arrow:before{content:"";border-color:transparent;border-style:solid;pointer-events:auto}.tippy-content{padding:5px 9px}'),W.setDefaultProps({plugins:[Y,$,J,G],render:H}),W.createSingleton=function(t,e){var n;void 0===e&&(e={}),t.forEach((function(t){t.disable()}));var r=t.map((function(t){return t.reference})),i={fn:function(){return{onDestroy:function(){t.forEach((function(t){t.enable()}))},onTrigger:function(i,o){var a=o.currentTarget,s=r.indexOf(a);if(a!==n){n=a;var p=(e.overrides||[]).concat("content").reduce((function(e,n){return e[n]=t[s].props[n],e}),{});i.setProps(Object.assign({},p,{getReferenceClientRect:function(){return a.getBoundingClientRect()}}))}}}}};return W(w(),Object.assign({},u(e,["overrides"]),{plugins:[i].concat(e.plugins||[]),triggerTarget:r}))},W.delegate=function(t,e){var n=[],r=[],i=e.target,o=u(e,["target"]),a=Object.assign({},o,{trigger:"manual"}),s=Object.assign({},o,{showOnCreate:!0}),p=W(t,a);function f(t){if(t.target){var n=t.target.closest(i);if(n)if(!((n.getAttribute("data-tippy-trigger")||e.trigger||v.trigger).indexOf(X[t.type])<0||n._tippy)){var o=W(n,s);o&&(r=r.concat(o))}}}function l(t,e,r,i){void 0===i&&(i=!1),t.addEventListener(e,r,i),n.push({node:t,eventType:e,handler:r,options:i})}return c(p).forEach((function(t){var e=t.destroy;t.destroy=function(t){void 0===t&&(t=!0),t&&r.forEach((function(t){t.destroy()})),r=[],n.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)})),n=[],e()},function(t){var e=t.reference;l(e,"mouseover",f),l(e,"focusin",f),l(e,"click",f)}(t)})),p},W.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,r=e.duration;q.forEach((function(t){var e=!1;if(n&&(e=E(n)?t.reference===n:t.popper===n.popper),!e){var i=t.props.duration;t.setProps({duration:r}),t.hide(),t.setProps({duration:i})}}))},W.roundArrow='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',t.default=W})); //# sourceMappingURL=tippy-bundle.umd.min.js.map