text: class Tooltip{constructor(t,o){this.element=t,this.props=o;const n=this.props.label.length;this.props.position=this.props.position?this.props.position:"top",this.props.color=this.props.color?this.props.color:"#444";const i=Math.random().toString(36).substring(2,6);let s=`<span class = "label-${i}">${this.props.label}</span>\n            <style>\n                .tooltip{\n                    position: relative;\n                    display: inline-block;\n                }\n                .tooltip .label-${i}{\n                    font-family: Arial, Helvetica, sans-serif !important;\n                    font-weight: 300;\n                    cursor: pointer;\n                    visibility: hidden;\n                    opacity: 0;\n                    text-align: center;\n                    font-size: 10pt;\n                    width: ${n}ex;\n                    position: absolute;\n                    background-color: ${this.props.color};\n                    color: white;\n                    border-radius: 3px;\n                    padding: 7px 10px;\n                    left: 50%;\n                    ${"top"==this.props.position?"bottom":"top"}: 170%;\n                    margin-left: -${n/2+1}ex;\n                    transition: 0.3s;\n                    z-index: 1000 !important;\n                }\n                .tooltip .label-${i}::after{\n                    content: "";\n                    position: absolute;\n                    ${"top"==this.props.position?"bottom":"top"}: -50%;\n                    left: 50%;\n                    margin-${"top"==this.props.position?"bottom":"top"}: 0px;\n                    margin-left: -10px;\n                    border-width: 10px;\n                    border-style: solid;\n                    border-color: ${"top"==this.props.position?this.props.color:"transparent"} transparent ${"top"==this.props.position?"transparent":this.props.color} transparent;\n                }\n                .tooltip:hover > .label-${i}{\n                    visibility: visible;\n                    ${"top"==this.props.position?"bottom":"top"}: 150%;\n                    opacity: 1;\n                }\n            </style>`;this.element.insertAdjacentHTML("beforeend",s),this.element.classList.add("tooltip")}}