Draws the different elements of the Tooltip box
@return void
@private
428238
function drawTooltip(){
            tooltipTextContainer = svg.selectAll('.tooltip-group')
              .append('g')
                .classed('tooltip-text', true);

            tooltip = tooltipTextContainer
              .append('rect')
                .classed('tooltip-text-container', true)
                .attr('x', -tooltipWidth / 4 + 8)
                .attr('y', 0)
                .attr('width', tooltipWidth)
                .attr('height', tooltipHeight)
                .attr('rx', tooltipBorderRadius)
                .attr('ry', tooltipBorderRadius)
                .style('fill', bodyFillColor)
                .style('stroke', borderStrokeColor)
                .style('stroke-width', 1);

            tooltipTitle = tooltipTextContainer
              .append('text')
                .classed('tooltip-title', true)
                .attr('x', -tooltipWidth / 4 + 16)
                .attr('dy', '.35em')
                .attr('y', 16)
                .style('fill', titleFillColor);

            tooltipDivider = tooltipTextContainer
              .append('line')
                .classed('tooltip-divider', true)
                .attr('x1', -tooltipWidth / 4 + 16)
                .attr('x2', 265)
                .attr('y1', 31)
                .attr('y2', 31)
                .style('stroke', borderStrokeColor);

            tooltipBody = tooltipTextContainer
              .append('g')
                .classed('tooltip-body', true)
                .style('transform', 'translateY(8px)')
                .style('fill', textFillColor);
        }
1240920
function(event_name, event_object) {

		this._tooltip.set('x', event_object.page.x); // left
		this._tooltip.set('y', event_object.page.y); // top

	}
1358628
function() {
		
		var self = this,
			$el = self._$tooltip.find('.tooltipster-content'),
			formattedContent = self.__Content,
			format = function(content) {
				formattedContent = content;
			};
		
		self._trigger({
			type: 'format',
			content: self.__Content,
			format: format
		});
		
		if (self.__options.functionFormat) {
			
			formattedContent = self.__options.functionFormat.call(
				self,
				self,
				{ origin: self._$origin[0] },
				self.__Content
			);
		}
		
		if (typeof formattedContent === 'string' && !self.__options.contentAsHTML) {
			$el.text(formattedContent);
		}
		else {
			$el
				.empty()
				.append(formattedContent);
		}
		
		return self;
	}
1342756
function () {

      function draw(color, n) {
        n = Math.max(parseInt(n), 0);

        write(' ');
        write('\u001b[' + color + 'm' + n + '\u001b[0m');
        write('\n');
      }

      draw(colors.green, this.passed);
      draw(colors.fail, this.failed);
      draw(colors.pending, this.pending + ' ');
      write('\n');

      cursor.up(this.numberOfLines);
    }
996697
function(easingValue) {
		var me = this;
		var tooltip = me.tooltip;
		var args = {
			tooltip: tooltip,
			easingValue: easingValue
		};

		if (core_plugins.notify(me, 'beforeTooltipDraw', [args]) === false) {
			return;
		}

		tooltip.draw();

		core_plugins.notify(me, 'afterTooltipDraw', [args]);
	}
438422
function() {
            if(this.$input.is(':visible')) {
				this.$input.focus();
				$.fn.editableutils.setCursorPosition(this.$input.get(0), this.$input.val().length);

					var self = this;
					var val = parseInt(this.$input.val());
					var width = this.options.slider.width || 200;
					var options = $.extend(this.options.slider , {
						value:val,
						slide: function( event, ui ) {
							var val = parseInt(ui.value);
							self.$input.val(val);
							
							if(ui.handle.firstChild == null) {/* no tooltips attached to it */
								$(ui.handle).append("<div class='tooltip top in' style='display:none;top:-38px;left:-5px;'><div class='tooltip-arrow'></div><div class='tooltip-inner'></div></div>");
							}
							$(ui.handle.firstChild).show().children().eq(1).text(val);
						}
					});

					this.$input.parent().addClass('editable-slider').css('width', width+'px').slider(options);
            }
       }
906445
function drawDataPoints() {
            let circles = svg.select('.chart-group')
                .attr('clip-path', `url(#${maskingRectangleId})`)
                .selectAll('circle')
                .data(dataPoints)
                .enter();

            if (isAnimated) {
                circles
                    .append('circle')
                    .attr('class', 'data-point data-point-highlighter')
                    .transition()
                    .delay(delay)
                    .duration(duration)
                    .ease(ease)
                    .style('stroke', (d) => nameColorMap[d.name])
                    .attr('fill', (d) => (
                        hasHollowCircles ? hollowColor : nameColorMap[d.name]
                    ))
                    .attr('fill-opacity', circleOpacity)
                    .attr('r', (d) => areaScale(d.y))
                    .attr('cx', (d) => xScale(d.x))
                    .attr('cy', (d) => yScale(d.y))
                    .style('cursor', 'pointer');
            } else {
                circles
                    .append('circle')
                    .attr('class', 'point')
                    .attr('class', 'data-point-highlighter')
                    .style('stroke', (d) => nameColorMap[d.name])
                    .attr('fill', (d) => (
                        hasHollowCircles ? hollowColor : nameColorMap[d.name]
                    ))
                    .attr('fill-opacity', circleOpacity)
                    .attr('r', (d) => areaScale(d.y))
                    .attr('cx', (d) => xScale(d.x))
                    .attr('cy', (d) => yScale(d.y))
                    .style('cursor', 'pointer');
            }
        }
329174
function drawSelection(dataArray) {
		var firstItem = (dataArray && dataArray.length > 0 ? dataArray.slice(0, 1) : []),
			firstItemX = (dataArray && dataArray.length > 0 ? valueX(dataArray[0]) : 0),
			lastItemX = (dataArray && dataArray.length > 0 ? valueX(dataArray[dataArray.length - 1]) : 0),
			width = (lastItemX - firstItemX) + xBar.rangeBand();
		var selectBar = parent.svgHoverRoot.selectAll('rect.selectionbar').data(firstItem);
		selectBar.attr('x', firstItemX)
				.attr('width', width);
		selectBar.enter().append('rect')
				.attr('x', firstItemX)
				.attr('y', 0)
				.attr('height', parent.height)
				.attr('width', width)
				.classed('selectionbar clickable', true);
		selectBar.exit().remove();
	}
1118867
function() {
        var changed = this._changedObjs;
        // Adjust the viewport
        if (this._dirtyViewport) {
            this._setViewport();
            this._dirtyViewport = false;
        }

        //if no objects have been changed, stop
        if (!changed.length) return;

        var i = 0,
            k = changed.length;
        //loop over all DOM elements needing updating
        for (; i < k; ++i) {
            changed[i].draw()._changed = false;
        }

        //reset DOM array
        changed.length = 0;
    }
785793
function() {
        var gl = this.context;
        gl.bindBuffer(gl.ARRAY_BUFFER, this._attributeBuffer);
        gl.bufferData(gl.ARRAY_BUFFER, this._attributeArray, gl.STATIC_DRAW);
        gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indexBuffer);
        gl.bufferData(
            gl.ELEMENT_ARRAY_BUFFER,
            this._indexArray,
            gl.STATIC_DRAW
        );
        gl.drawElements(gl.TRIANGLES, this.index_pointer, gl.UNSIGNED_SHORT, 0);
    }
194970
public function preview()
	{
		$selector = 'ctrl_textarea' . $this->id;

		if ($this->canChangeHighlight)
		{
			$strPreview = '<div class="widget" style="padding-top:10px;"><h3 style="margin: 0;"><label>' . $GLOBALS['TL_LANG']['tl_pattern']['highlight'][0] . '</label></h3>';
			$strPreview .= '<select class="tl_select" style="width: 412px;">';
			$strPreview .= '<option value="">-</option><option value="HTML">HTML</option><option value="HTML5">HTML5</option><option value="XML">XML</option><option value="JavaScript">JavaScript</option><option value="CSS">CSS</option><option value="SCSS">SCSS</option><option value="PHP">PHP</option><option value="JSON">JSON</option><option value="Markdown">Markdown</option>';
			$strPreview .= '</select><p title="" class="tl_help tl_tip">' . $GLOBALS['TL_LANG']['tl_pattern']['highlight'][1] . '</p></div>';
		}

		$strPreview .= '<div class="widget" style="padding-top:10px;"><h3 style="margin: 0;"><label>' . $this->label . '</label></h3>';
		$strPreview .= '<textarea id="' . $selector . '" aria-hidden="true" class="tl_textarea noresize" rows="12" cols="80"></textarea>';
		
		$objTemplate = new \BackendTemplate('be_ace');
		$objTemplate->selector = $selector;
		$objTemplate->type = strtolower($this->highlight);
		
		$strPreview .= $objTemplate->parse();
		
		$strPreview .= '<p title="" class="tl_help tl_tip">' . $this->description . '</p></div>';	

		return $strPreview;
	}
1345696
function() {
        var html = this.root.getHtml(),
            el = this.getEl();
        el.innerHTML = html;
        if (!this._hasEvents) {
            Event.on(el, 'click', this._onClickEvent, this, true);
            Event.on(el, 'dblclick', this._onDblClickEvent, this, true);
            Event.on(el, 'mouseover', this._onMouseOverEvent, this, true);
            Event.on(el, 'mouseout', this._onMouseOutEvent, this, true);
            Event.on(el, 'keydown', this._onKeyDownEvent, this, true);
        }
        this._hasEvents = true;
    }
1363401
function drawSlices() {
            // Not ideal, we need to figure out how to call exit for nested elements
            if (slices) {
                svg.selectAll('g.arc').remove();
            }

            slices = svg.select('.chart-group')
                .selectAll('g.arc')
                .data(layout(data));

            let newSlices = slices.enter()
                .append('g')
                  .each(storeAngle)
                  .each(reduceOuterRadius)
                  .classed('arc', true)
                  .append('path');

            if (isAnimated) {
                newSlices.merge(slices)
                    .attr('fill', getSliceFill)
                    .on('mouseover', function(d) {
                        handleMouseOver(this, d, chartWidth, chartHeight);
                    })
                    .on('mousemove', function(d) {
                        handleMouseMove(this, d, chartWidth, chartHeight);
                    })
                    .on('mouseout', function(d) {
                        handleMouseOut(this, d, chartWidth, chartHeight);
                    })
                    .on('click', function(d) {
                        handleClick(this, d, chartWidth, chartHeight);
                    })
                    .transition()
                    .ease(ease)
                    .duration(pieDrawingTransitionDuration)
                    .attrTween('d', tweenLoading);
            } else {
                newSlices.merge(slices)
                    .attr('fill', getSliceFill)
                    .attr('d', shape)
                    .on('mouseover', function(d) {
                        handleMouseOver(this, d, chartWidth, chartHeight);
                    })
                    .on('mousemove', function(d) {
                        handleMouseMove(this, d, chartWidth, chartHeight);
                    })
                    .on('mouseout', function(d) {
                        handleMouseOut(this, d, chartWidth, chartHeight);
                    })
                    .on('click', function(d) {
                        handleClick(this, d, chartWidth, chartHeight);
                    });
            }

            slices.exit().remove();
        }
21123
function() {
		if(this.qtip.rendered < 1 || this.drawing) { return this; }

		var tooltip = this.qtip.tooltip,
			style = this.qtip.options.style,
			container = this.qtip.options.position.container,
			perc, width, max, min;

		// Set drawing flag
		this.qtip.drawing = 1;

		// If tooltip has a set height/width, just set it... like a boss!
		if(style.height) { tooltip.css(HEIGHT, style.height); }
		if(style.width) { tooltip.css(WIDTH, style.width); }

		// Simulate max/min width if not set width present...
		else {
			// Reset width and add fluid class
			tooltip.css(WIDTH, '').appendTo(this.redrawContainer);

			// Grab our tooltip width (add 1 if odd so we don't get wrapping problems.. huzzah!)
			width = tooltip.width();
			if(width % 2 < 1) { width += 1; }

			// Grab our max/min properties
			max = tooltip.css('maxWidth') || '';
			min = tooltip.css('minWidth') || '';

			// Parse into proper pixel values
			perc = (max + min).indexOf('%') > -1 ? container.width() / 100 : 0;
			max = (max.indexOf('%') > -1 ? perc : 1 * parseInt(max, 10)) || width;
			min = (min.indexOf('%') > -1 ? perc : 1 * parseInt(min, 10)) || 0;

			// Determine new dimension size based on max/min/current values
			width = max + min ? Math.min(Math.max(width, min), max) : width;

			// Set the newly calculated width and remvoe fluid class
			tooltip.css(WIDTH, Math.round(width)).appendTo(container);
		}

		// Set drawing flag
		this.drawing = 0;

		return this;
	}
108357
function(data){

			//Declare segments as a static property to prevent inheriting across the Chart type prototype
			this.segments = [];
			this.outerRadius = (helpers.min([this.chart.width,this.chart.height]) -	this.options.segmentStrokeWidth/2)/2;

			this.SegmentArc = Chart.Arc.extend({
				ctx : this.chart.ctx,
				x : this.chart.width/2,
				y : this.chart.height/2
			});

			//Set up tooltip events on the chart
			if (this.options.showTooltips){
				helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
					var activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];

					helpers.each(this.segments,function(segment){
						segment.restore(["fillColor"]);
					});
					helpers.each(activeSegments,function(activeSegment){
						activeSegment.fillColor = activeSegment.highlightColor;
					});
					this.showTooltip(activeSegments);
				});
			}
			this.calculateTotal(data);

			helpers.each(data,function(datapoint, index){
				this.addData(datapoint, index, true);
			},this);

			this.render();
		}
1338310
public function render()
    {
        $uid = helpers_Random::generateString(24);

        $this->addClass('viewable-hiddenbox-input');
        $this->addAttribute('data-identifier', $uid);

        $value = _dh($this->value);

        $html = <<<HTML
<span class="viewable-hiddenbox">
    {$this->renderLabel()}
    <input type='password' name='{$this->name}' id='{$this->name}' {$this->renderAttributes()} value='{$value}'/>
    <span class="viewable-hiddenbox-toggle" data-identifier="{$uid}"></span>
</span>
HTML;

        $script = <<<SCRIPT
<script type="text/javascript">
    (function() {
        var input = document.querySelector('input[data-identifier="$uid"]'),
            toggle = document.querySelector('.viewable-hiddenbox-toggle[data-identifier="$uid"]'),
            
            iconView = document.createElement('span'),
            iconHide = document.createElement('span');
        
        var show = function() {
            if (iconView.parentElement) {
                toggle.removeChild(iconView);
            }
            if (!iconHide.parentElement) {
                toggle.appendChild(iconHide);
            }
            input.type = 'text';
            input.autocomplete = 'off';
            window.addEventListener('mousedown', autoHide); // make sure always submit the form with an password input
            input.focus();
        };
        
        var hide = function() {
            if (!iconView.parentElement) {
                toggle.appendChild(iconView);
            }
            if (iconHide.parentElement) {
                toggle.removeChild(iconHide);
            }
            input.type = 'password';
            input.autocomplete = 'on';
            window.removeEventListener('mousedown', autoHide);
        };
        
        var autoHide = function(event) {
            if (!event.target.isSameNode(input) && !event.target.isSameNode(iconHide) && !event.target.isSameNode(toggle)) {
                hide();
            }
        };
        
        iconView.classList.add('icon-preview');
        iconHide.classList.add('icon-eye-slash');
        hide();
        
        toggle.addEventListener('click', function() {
            if (input.type === 'password') {
                show();
            } else {
                hide();
            }
        });
    })();
</script>
SCRIPT;

        return (string) ($html . $script);
    }
326516
function drawEndMarker(){
            if (circle) {
                svg.selectAll('.sparkline-circle').remove();
            }

            circle = svg.selectAll('.chart-group')
              .append('circle')
                .attr('class', 'sparkline-circle')
                .attr('cx', xScale(data[data.length - 1].date))
                .attr('cy', yScale(data[data.length - 1].value))
                .attr('r', markerSize);
        }