New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hpcc-js/html

Package Overview
Dependencies
Maintainers
1
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hpcc-js/html - npm Package Compare versions

Comparing version 2.42.3 to 2.42.4

4

dist/index.es6.js

@@ -5,4 +5,4 @@ import { select, HTMLWidget, format } from '@hpcc-js/common';

var PKG_NAME = "@hpcc-js/html";
var PKG_VERSION = "2.42.3";
var BUILD_VERSION = "2.104.5";
var PKG_VERSION = "2.42.4";
var BUILD_VERSION = "2.104.7";

@@ -9,0 +9,0 @@ /******************************************************************************

@@ -8,4 +8,4 @@ (function (global, factory) {

var PKG_NAME = "@hpcc-js/html";
var PKG_VERSION = "2.42.3";
var BUILD_VERSION = "2.104.5";
var PKG_VERSION = "2.42.4";
var BUILD_VERSION = "2.104.7";

@@ -12,0 +12,0 @@ /******************************************************************************

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/util")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/util"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/html"]={},t["@hpcc-js/common"],t["@hpcc-js/util"])}(this,(function(t,e,o){"use strict";var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var r=function(t){function n(){var e=t.call(this)||this;return e._tooltipHTMLCallback=function(t){return"<b>_tooltipHTMLCallback is undefined</b>"},e._logger=o.scopedLogger("html/HTMLTooltip"),e._closing=!1,e.visible(!1),e}return i(n,t),n.prototype.tooltipHTML=function(t){return this._tooltipHTMLCallback=t,this},n.prototype.tooltipContent=function(t){return arguments.length?(this._contentNode=t,this):this._contentNode},n.prototype.triggerElement=function(t){return this._triggerElement=t,this},n.prototype.enter=function(o,n){t.prototype.enter.call(this,o,n);var i=e.select("body");this._tooltipElement=i.append("div").attr("class","tooltip-div").style("z-index","2147483638").style("position","fixed"),this._arrowElement=i.append("div").attr("class","arrow-div").style("z-index","2147483638").style("position","fixed")},n.prototype.update=function(e,o){var n=this;if(t.prototype.update.call(this,e,o),this._contentNode!==this._prevContentNode){var i=this._tooltipElement.node();(function(t,e,o){if(o||2===arguments.length)for(var n,i=0,r=e.length;i<r;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))})([],i.querySelectorAll("*"),!0).map((function(t){return t.__data__})).filter((function(t){return t})).forEach((function(t){"function"==typeof t.target&&t.target(null),"function"==typeof t.exit&&t.exit()})),i.innerHTML="",i.appendChild(this._contentNode),this._prevContentNode=this._contentNode}if(this._contentNode?this.onShowContent(this._contentNode):this._tooltipElement.html((function(){return n._tooltipHTMLCallback(n.data())})),this.fitContent()){this._tooltipElement.style("width","auto").style("height","auto").style("padding","0px").style("box-sizing","content-box");var r=this._tooltipElement.node().getBoundingClientRect();this.tooltipWidth_default(r.width),this.tooltipHeight_default(r.height)}this._closing=!1,this._tooltipElement.style("background-color",this.tooltipColor()).style("color",this.fontColor()).style("width",this.tooltipWidth()+"px").style("height",this.tooltipHeight()+"px").style("opacity",1).style("padding",this.padding()+"px").style("pointer-events",this.enablePointerEvents()?"all":"none").style("box-sizing","content-box"),this._arrowElement.style("opacity",1).style("pointer-events","none"),this.updateTooltipPosition()},n.prototype.onShowContent=function(t){},n.prototype.updateTooltipPosition=function(){var t=this.calcReferenceBBox(),e=this.calcTooltipDirection(t),o=t[e];return this._tooltipElement.style("top",o.y+"px").style("left",o.x+"px"),this.setArrowPosition(o,e),o},n.prototype.calcTooltipDirection=function(t){var e=Object.keys(t),o=this.direction();e.sort((function(t,e){return t===o?-1:1}));for(var n={top:0,left:0,width:window.innerWidth,height:window.innerHeight},i=0;i<e.length;i++){var r={top:t[e[i]].y,left:t[e[i]].x,width:this.tooltipWidth(),height:this.tooltipHeight()};if(this.rectFits(r,n))return e[i]}return this._logger.warning("Tooltip doesn't fit in the window for any of the directions. Defaulting to '".concat(o,"'")),this._logger.debug(n),this._logger.debug({top:t[o].y,left:t[o].x,width:this.tooltipWidth(),height:this.tooltipHeight()}),o},n.prototype.rectFits=function(t,e){return t.top>=e.top&&t.left>=e.left&&t.width+t.left<=e.width+e.left&&t.height+t.top<=e.height+e.top},n.prototype.setArrowPosition=function(t,e){var o,n,i="border-top-color";switch(this._arrowElement.style("border","".concat(this.arrowHeight(),"px solid ").concat(this.tooltipColor())).style("border-top-color","transparent").style("border-right-color","transparent").style("border-bottom-color","transparent").style("border-left-color","transparent"),e){case"n":o=t.y+this.tooltipHeight()+2*this.padding(),n=t.x+this.tooltipWidth()/2-this.arrowWidth()/2+this.padding(),i="border-top-color",this._arrowElement.style("border-top-width","".concat(this.arrowHeight(),"px")).style("border-bottom-width","0px").style("border-left-width","".concat(this.arrowWidth()/2,"px")).style("border-right-width","".concat(this.arrowWidth()/2,"px"));break;case"s":o=t.y-this.arrowHeight(),n=t.x+this.padding()+this.tooltipWidth()/2-this.arrowWidth()/2,i="border-bottom-color",this._arrowElement.style("border-top-width","0px").style("border-bottom-width","".concat(this.arrowHeight(),"px")).style("border-left-width","".concat(this.arrowWidth()/2,"px")).style("border-right-width","".concat(this.arrowWidth()/2,"px"));break;case"e":o=t.y+this.tooltipHeight()/2+this.padding()-this.arrowWidth()/2,n=t.x-this.arrowHeight(),i="border-right-color",this._arrowElement.style("border-top-width","".concat(this.arrowWidth()/2,"px")).style("border-bottom-width","".concat(this.arrowWidth()/2,"px")).style("border-left-width","0px").style("border-right-width","".concat(this.arrowHeight(),"px"));break;case"w":o=t.y+this.tooltipHeight()/2-this.arrowWidth()/2+this.padding(),n=t.x+this.tooltipWidth()+2*this.padding(),i="border-left-color",this._arrowElement.style("border-top-width","".concat(this.arrowWidth()/2,"px")).style("border-bottom-width","".concat(this.arrowWidth()/2,"px")).style("border-left-width","".concat(this.arrowHeight(),"px")).style("border-right-width","0px")}return void 0!==o&&void 0!==n?this._arrowElement.style("top",o+"px").style("left",n+"px").style(i,this.tooltipColor()).style("opacity",1):this._arrowElement.style("opacity",0),t},n.prototype.getReferenceNode=function(){return this._triggerElement?this._triggerElement.node():this.element().node().parentNode.parentNode},n.prototype.calcReferenceBBox=function(){var t=this.getReferenceNode().getBoundingClientRect(),e=t.top,o=t.left,n=t.width,i=t.height,r=this.tooltipWidth(),l=this.tooltipHeight(),s=r/2,a=l/2,p=this.arrowHeight(),h=this.padding(),c=2*h;return this.followCursor()&&this._cursorLoc&&(o=this._cursorLoc[0],e=this._cursorLoc[1],n=1,i=1),{n:{x:o+n/2-s-h,y:e-l-p-c},e:{x:o+n+p,y:e+i/2-a-h},s:{x:o+n/2-s-h,y:e+i+p},w:{x:o-r-p-c,y:e+i/2-a-h},nw:{x:o-r-c,y:e-l-c},ne:{x:o+n,y:e-l-c},se:{x:o+n,y:e+i},sw:{x:o-r-c,y:e+i}}},n.prototype.mouseout=function(){var t=this;this._closing=!0,this._tooltipElement.on("mouseover",(function(){t._closing=!1})),this._tooltipElement.on("mouseout",(function(){t.mouseout()})),setTimeout((function(){t._closing&&t.visible(!1)}),this.closeDelay())},n.prototype.visible=function(e){return arguments.length?(this._arrowElement&&(this._arrowElement.style("visibility",e?"visible":"hidden"),this._tooltipElement.style("visibility",e?"visible":"hidden")),t.prototype.visible.call(this,e),this):t.prototype.visible.call(this)},n.prototype.exit=function(e,o){this._arrowElement&&(this._arrowElement.remove(),this._tooltipElement.remove()),t.prototype.exit.call(this,e,o)},n}(e.HTMLWidget);r.prototype._class+=" html_HTMLTooltip",r.prototype.publish("fitContent",!1,"boolean","If true, tooltip will grow to fit its html content"),r.prototype.publish("followCursor",!1,"boolean","If true, tooltip will display relative to cursor location"),r.prototype.publish("closeDelay",400,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),r.prototype.publish("direction","n","set","Direction in which to display the tooltip",["n","s","e","w","ne","nw","se","sw"]),r.prototype.publish("padding",8,"number","Padding (pixels)"),r.prototype.publish("arrowWidth",16,"number","Width (or height depending on direction) of the tooltip arrow (pixels)"),r.prototype.publish("arrowHeight",8,"number","Height (or width depending on direction) of the tooltip arrow (pixels)"),r.prototype.publish("fontColor","#FFF","html-color","The default font color for text in the tooltip"),r.prototype.publish("tooltipColor","#000000EE","html-color","Background color of the tooltip"),r.prototype.publish("tooltipWidth",200,"number","Width of the tooltip (not including arrow) (pixels)"),r.prototype.publish("tooltipHeight",200,"number","Height of the tooltip (not including arrow) (pixels)"),r.prototype.publish("enablePointerEvents",!1,"boolean","If true, the 'pointer-events: all' style will be used");var l=function(t){function o(){return t.call(this)||this}return i(o,t),o.prototype.transformData=function(){return this.data()},o.prototype.enter=function(e,o){t.prototype.enter.call(this,e,o),this._table=o.append("table"),this._thead=this._table.append("thead"),this._theadRow=this._thead.append("tr"),this._tbody=this._table.append("tbody")},o.prototype.update=function(o,n){t.prototype.update.call(this,o,n),this._table.style("width",this.autoWidth()?"auto":"100%");var i=this._theadRow.selectAll("th").data(this.columns());i.enter().append("th").attr("class",(function(t,e){return"th-".concat(e)})).merge(i).text((function(t){return t.toString()})),i.exit().remove();var r=this._tbody.selectAll("tr").data(this.transformData());r.enter().append("tr").merge(r).each((function(t){var o=e.select(this).selectAll("td").data(t);o.enter().append("td").attr("class",(function(t,e){return"col-".concat(e)})).merge(o).text((function(t){return t.toString()})),o.exit().remove()})),r.exit().remove()},o}(e.HTMLWidget);l.prototype._class+=" html_SimpleTable",l.prototype.publish("autoWidth",!1,"boolean","If true, table width will be set to 'auto'. If false, the width is set to '100%'");var s=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.applyStyleObject=function(t,e){Object.keys(e).forEach((function(o){t.style(o,e[o])}))},e.prototype.update=function(e,o){var n=this;t.prototype.update.call(this,e,o),o.selectAll("tr,th,td").attr("style","").style("font-family",this.fontFamily()).style("color",this.fontColor()),this.theadColumnStyles().forEach((function(t,e){n.applyStyleObject(o.select(".th-".concat(e)),t)})),this.tbodyColumnStyles().forEach((function(t,e){n.applyStyleObject(o.selectAll(".col-".concat(e)),t)}));var i=Object.keys(this.evenRowStyles()).length>0,r=Object.keys(this.lastRowStyles()).length>0,l=o.selectAll("tbody > tr");if(i){var s=l.select((function(t,e){return e%2?this:null}));this.applyStyleObject(s,this.evenRowStyles())}if(r){var a=l.select((function(t,e,o){return e===o.length-1?this:null}));this.applyStyleObject(a,this.lastRowStyles())}},e}(l);s.prototype._class+=" html_StyledTable",s.prototype.publish("fontFamily","Verdana","string","Base font-family used within the table"),s.prototype.publish("fontColor","#333","string","Base font color used within the table"),s.prototype.publish("theadColumnStyles",[],"array",'Array of objects containing styles for the thead columns (ex: [{"color":"red"},{"color":"blue"}])'),s.prototype.publish("tbodyColumnStyles",[],"array",'Array of objects containing styles for the tbody columns (ex: [{"color":"red"},{"color":"blue"}])'),s.prototype.publish("lastRowStyles",{},"object",'Object containing styles for the last row (ex: {"color":"red"})'),s.prototype.publish("evenRowStyles",{},"object",'Object containing styles for even rows (ex: {"background-color":"#AAA"})');var a=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.transformData=function(){var t=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount();return this.breakdownData(t)},e.prototype.breakdownData=function(t){var e=this.data().length,o=this.data().reduce((function(t,e){return t+e[1]}),0),n=[],i=0;this.data().sort((function(t,e){return t[1]>e[1]?-1:1}));var r=e-t>0;if(this.data().filter((function(e,o){return!r||o<t-1})).forEach((function(t){var e=Math.round(t[1]/o*100);i+=e,n.push([t[0],e+"%"])})),r){var l="".concat(this.otherLabel()," (").concat(e-t+1,")"),s="~"+(100-i)+"%";n.push([l,s])}return n},e.prototype.calculateRowCount=function(){var t=this.columns().length>0?this.thFontSize()+5:0,e=this.fontSize()+5,o=this.height()-t;return Math.floor(o/e)},e.prototype.enter=function(e,o){var n=this;t.prototype.enter.call(this,e,o),this._tooltip=(new r).target(e),this._tooltip.tooltipHTML((function(t){var e=n.useCalculatedRowCount()?n.calculateRowCount():n.rowCount(),o=n.fontSize(),i=Math.max.apply(Math,t.map((function(t){return n.textSize(t[0],"Verdana",n.fontSize()).width}))),r=2*(i+30)+2*n._tooltip.padding(),l=o*Math.ceil((t.length-e)/2)+2*n._tooltip.padding();n._tooltip.tooltipWidth(r),n._tooltip.tooltipHeight(l);var s=n.breakdownData(n.data().length).slice(e-1);return'<div style="\n width: 100%;\n height: 100%;\n font-size: '.concat(n.fontSize(),'px\n ">').concat(s.map((function(t){return'<div style="\n float:left;\n width:'.concat(Math.floor(49.5),'%;\n ">').concat(t[0],": ").concat(t[1],"</div>")})).join(""),"</div>")}))},e.prototype.update=function(e,o){if(this.theadColumnStyles_default([{color:this.thFirstColor(),"font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.labelAlignment(),width:"auto",padding:"0px"},{width:"1%","font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.percentageAlignment(),padding:"0px"}]),this.tbodyColumnStyles_default([{color:this.topLabelColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.topPercentageColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),this.lastRowStyles_default([{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherLabelBold()?"bold":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherPercentageBold()?"bold":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),t.prototype.update.call(this,e,o),(this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount())<this.data().length){var n=o.select("tbody > tr:last-child"),i=this;n.on("mouseout.tooltip",(function(t){i._tooltip._triggerElement=n,i._tooltip.visible(!1).render()})).on("mouseenter.tooltip",(function(t){i._tooltip._triggerElement=n,i._tooltip.direction("n").data(i.data()).visible(!0).render()}))}},e}(s);a.prototype._class+=" html_BreakdownTable",a.prototype.publish("useCalculatedRowCount",!0,"boolean","If true, rowCount will be calculated and its default will be overwritten"),a.prototype.publish("rowCount",5,"number","Number of total rows to display (including the 'other' row)",void 0,{disable:function(t){return t.useCalculatedRowCount()}}),a.prototype.publish("fontSize",14,"number","Font size (pixels)"),a.prototype.publish("labelAlignment","left","set","Alignment of the label column text",["left","center","right"]),a.prototype.publish("percentageAlignment","center","set","Alignment of the percentage column text",["left","center","right"]),a.prototype.publish("topLabelColor","#333","html-color","Color of displayed 'top' labels"),a.prototype.publish("topPercentageColor","#1A99D5","html-color","Color of displayed 'top' percentages"),a.prototype.publish("topPercentageBold",!0,"html-color","If true, the 'top' percentages will be bold"),a.prototype.publish("otherLabel","Other","string","Label text for the 'other' row"),a.prototype.publish("otherLabelColor","#AAA","html-color","Color of the 'other' label"),a.prototype.publish("otherLabelBold",!1,"html-color","If true, the 'other' label will be bold"),a.prototype.publish("otherPercentageColor","#AAA","html-color","Color of the 'other' percentage"),a.prototype.publish("otherPercentageBold",!1,"html-color","If true, the 'other' percentage will be bold"),a.prototype.publish("thFontWeight","bold","string","Font weight for th elements"),a.prototype.publish("thFontSize",26,"number","Font size for th elements"),a.prototype.publish("thFirstColor","#333","html-color","Text color of the first th element"),a.prototype.publish("thLastColor","#333","html-color","Text color of the last th element");var p,h,c,u,d,_={},f=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function g(t,e){for(var o in e)t[o]=e[o];return t}function m(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,o){var n,i,r,l={};for(r in e)"key"==r?n=e[r]:"ref"==r?i=e[r]:l[r]=e[r];if(arguments.length>2&&(l.children=arguments.length>3?p.call(arguments,2):o),"function"==typeof t&&null!=t.defaultProps)for(r in t.defaultProps)void 0===l[r]&&(l[r]=t.defaultProps[r]);return v(t,l,n,i,null)}function v(t,e,o,n,i){var r={type:t,props:e,key:o,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++c:i};return null==i&&null!=h.vnode&&h.vnode(r),r}function w(t){return t.children}function x(t,e){this.props=t,this.context=e}function C(t,e){if(null==e)return t.__?C(t.__,t.__.__k.indexOf(t)+1):null;for(var o;e<t.__k.length;e++)if(null!=(o=t.__k[e])&&null!=o.__e)return o.__e;return"function"==typeof t.type?C(t):null}function k(t){var e,o;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(o=t.__k[e])&&null!=o.__e){t.__e=t.__c.base=o.__e;break}return k(t)}}function S(t){(!t.__d&&(t.__d=!0)&&u.push(t)&&!T.__r++||d!==h.debounceRendering)&&((d=h.debounceRendering)||setTimeout)(T)}function T(){for(var t;T.__r=u.length;)t=u.sort((function(t,e){return t.__v.__b-e.__v.__b})),u=[],t.some((function(t){var e,o,n,i,r,l;t.__d&&(r=(i=(e=t).__v).__e,(l=e.__P)&&(o=[],(n=g({},i)).__v=i.__v+1,L(l,i,n,e.__n,void 0!==l.ownerSVGElement,null!=i.__h?[r]:null,o,null==r?C(i):r,i.__h),N(o,i),i.__e!=r&&k(i)))}))}function E(t,e,o,n,i,r,l,s,a,p){var h,c,u,d,y,g,m,b=n&&n.__k||f,x=b.length;for(o.__k=[],h=0;h<e.length;h++)if(null!=(d=o.__k[h]=null==(d=e[h])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?v(null,d,null,null,d):Array.isArray(d)?v(w,{children:d},null,null,null):d.__b>0?v(d.type,d.props,d.key,null,d.__v):d)){if(d.__=o,d.__b=o.__b+1,null===(u=b[h])||u&&d.key==u.key&&d.type===u.type)b[h]=void 0;else for(c=0;c<x;c++){if((u=b[c])&&d.key==u.key&&d.type===u.type){b[c]=void 0;break}u=null}L(t,d,u=u||_,i,r,l,s,a,p),y=d.__e,(c=d.ref)&&u.ref!=c&&(m||(m=[]),u.ref&&m.push(u.ref,null,d),m.push(c,d.__c||y,d)),null!=y?(null==g&&(g=y),"function"==typeof d.type&&d.__k===u.__k?d.__d=a=W(d,a,t):a=A(t,d,u,b,y,a),"function"==typeof o.type&&(o.__d=a)):a&&u.__e==a&&a.parentNode!=t&&(a=C(u))}for(o.__e=g,h=x;h--;)null!=b[h]&&("function"==typeof o.type&&null!=b[h].__e&&b[h].__e==o.__d&&(o.__d=C(n,h+1)),D(b[h],b[h]));if(m)for(h=0;h<m.length;h++)M(m[h],m[++h],m[++h])}function W(t,e,o){for(var n,i=t.__k,r=0;i&&r<i.length;r++)(n=i[r])&&(n.__=t,e="function"==typeof n.type?W(n,e,o):A(o,n,n,i,n.__e,e));return e}function A(t,e,o,n,i,r){var l,s,a;if(void 0!==e.__d)l=e.__d,e.__d=void 0;else if(null==o||i!=r||null==i.parentNode)t:if(null==r||r.parentNode!==t)t.appendChild(i),l=null;else{for(s=r,a=0;(s=s.nextSibling)&&a<n.length;a+=2)if(s==i)break t;t.insertBefore(i,r),l=r}return void 0!==l?l:i.nextSibling}function H(t,e,o){"-"===e[0]?t.setProperty(e,o):t[e]=null==o?"":"number"!=typeof o||y.test(e)?o:o+"px"}function B(t,e,o,n,i){var r;t:if("style"===e)if("string"==typeof o)t.style.cssText=o;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)o&&e in o||H(t.style,e,"");if(o)for(e in o)n&&o[e]===n[e]||H(t.style,e,o[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=o,o?n||t.addEventListener(e,r?F:R,r):t.removeEventListener(e,r?F:R,r);else if("dangerouslySetInnerHTML"!==e){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==o?"":o;break t}catch(t){}"function"==typeof o||(null!=o&&(!1!==o||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,o):t.removeAttribute(e))}}function R(t){this.l[t.type+!1](h.event?h.event(t):t)}function F(t){this.l[t.type+!0](h.event?h.event(t):t)}function L(t,e,o,n,i,r,l,s,a){var p,c,u,d,_,f,y,m,b,v,C,k,S,T=e.type;if(void 0!==e.constructor)return null;null!=o.__h&&(a=o.__h,s=e.__e=o.__e,e.__h=null,r=[s]),(p=h.__b)&&p(e);try{t:if("function"==typeof T){if(m=e.props,b=(p=T.contextType)&&n[p.__c],v=p?b?b.props.value:p.__:n,o.__c?y=(c=e.__c=o.__c).__=c.__E:("prototype"in T&&T.prototype.render?e.__c=c=new T(m,v):(e.__c=c=new x(m,v),c.constructor=T,c.render=j),b&&b.sub(c),c.props=m,c.state||(c.state={}),c.context=v,c.__n=n,u=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=T.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=g({},c.__s)),g(c.__s,T.getDerivedStateFromProps(m,c.__s))),d=c.props,_=c.state,u)null==T.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==T.getDerivedStateFromProps&&m!==d&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(m,v),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(m,c.__s,v)||e.__v===o.__v){c.props=m,c.state=c.__s,e.__v!==o.__v&&(c.__d=!1),c.__v=e,e.__e=o.__e,e.__k=o.__k,e.__k.forEach((function(t){t&&(t.__=e)})),c.__h.length&&l.push(c);break t}null!=c.componentWillUpdate&&c.componentWillUpdate(m,c.__s,v),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(d,_,f)}))}if(c.context=v,c.props=m,c.__v=e,c.__P=t,C=h.__r,k=0,"prototype"in T&&T.prototype.render)c.state=c.__s,c.__d=!1,C&&C(e),p=c.render(c.props,c.state,c.context);else do{c.__d=!1,C&&C(e),p=c.render(c.props,c.state,c.context),c.state=c.__s}while(c.__d&&++k<25);c.state=c.__s,null!=c.getChildContext&&(n=g(g({},n),c.getChildContext())),u||null==c.getSnapshotBeforeUpdate||(f=c.getSnapshotBeforeUpdate(d,_)),S=null!=p&&p.type===w&&null==p.key?p.props.children:p,E(t,Array.isArray(S)?S:[S],e,o,n,i,r,l,s,a),c.base=e.__e,e.__h=null,c.__h.length&&l.push(c),y&&(c.__E=c.__=null),c.__e=!1}else null==r&&e.__v===o.__v?(e.__k=o.__k,e.__e=o.__e):e.__e=P(o.__e,e,o,n,i,r,l,a);(p=h.diffed)&&p(e)}catch(t){e.__v=null,(a||null!=r)&&(e.__e=s,e.__h=!!a,r[r.indexOf(s)]=null),h.__e(t,e,o)}}function N(t,e){h.__c&&h.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){h.__e(t,e.__v)}}))}function P(t,e,o,n,i,r,l,s){var a,h,c,u=o.props,d=e.props,f=e.type,y=0;if("svg"===f&&(i=!0),null!=r)for(;y<r.length;y++)if((a=r[y])&&"setAttribute"in a==!!f&&(f?a.localName===f:3===a.nodeType)){t=a,r[y]=null;break}if(null==t){if(null===f)return document.createTextNode(d);t=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,d.is&&d),r=null,s=!1}if(null===f)u===d||s&&t.data===d||(t.data=d);else{if(r=r&&p.call(t.childNodes),h=(u=o.props||_).dangerouslySetInnerHTML,c=d.dangerouslySetInnerHTML,!s){if(null!=r)for(u={},y=0;y<t.attributes.length;y++)u[t.attributes[y].name]=t.attributes[y].value;(c||h)&&(c&&(h&&c.__html==h.__html||c.__html===t.innerHTML)||(t.innerHTML=c&&c.__html||""))}if(function(t,e,o,n,i){var r;for(r in o)"children"===r||"key"===r||r in e||B(t,r,null,o[r],n);for(r in e)i&&"function"!=typeof e[r]||"children"===r||"key"===r||"value"===r||"checked"===r||o[r]===e[r]||B(t,r,e[r],o[r],n)}(t,d,u,i,s),c)e.__k=[];else if(y=e.props.children,E(t,Array.isArray(y)?y:[y],e,o,n,i&&"foreignObject"!==f,r,l,r?r[0]:o.__k&&C(o,0),s),null!=r)for(y=r.length;y--;)null!=r[y]&&m(r[y]);s||("value"in d&&void 0!==(y=d.value)&&(y!==t.value||"progress"===f&&!y||"option"===f&&y!==u.value)&&B(t,"value",y,u.value,!1),"checked"in d&&void 0!==(y=d.checked)&&y!==t.checked&&B(t,"checked",y,u.checked,!1))}return t}function M(t,e,o){try{"function"==typeof t?t(e):t.current=e}catch(t){h.__e(t,o)}}function D(t,e,o){var n,i;if(h.unmount&&h.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||M(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){h.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&D(n[i],e,"function"!=typeof t.type);o||null==t.__e||m(t.__e),t.__e=t.__d=void 0}function j(t,e,o){return this.constructor(t,o)}p=f.slice,h={__e:function(t,e,o,n){for(var i,r,l;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(t)),l=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,n||{}),l=i.__d),l)return i.__E=i}catch(e){t=e}throw t}},c=0,x.prototype.setState=function(t,e){var o;o=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=g({},this.state),"function"==typeof t&&(t=t(g({},o),this.props)),t&&g(o,t),null!=t&&this.__v&&(e&&this.__h.push(e),S(this))},x.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),S(this))},x.prototype.render=w,u=[],T.__r=0;var z,O,I,U=[],V=[],q=h.__b,G=h.__r,$=h.diffed,J=h.__c,K=h.unmount;function X(){for(var t;t=U.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Y),t.__H.__h.forEach(Z),t.__H.__h=[]}catch(e){t.__H.__h=[],h.__e(e,t.__v)}}h.__b=function(t){z=null,q&&q(t)},h.__r=function(t){G&&G(t);var e=(z=t.__c).__H;e&&(O===z?(e.__h=[],z.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=V,t.__N=t.i=void 0}))):(e.__h.forEach(Y),e.__h.forEach(Z),e.__h=[])),O=z},h.diffed=function(t){$&&$(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==U.push(e)&&I===h.requestAnimationFrame||((I=h.requestAnimationFrame)||function(t){var e,o=function(){clearTimeout(n),Q&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(o,100);Q&&(e=requestAnimationFrame(o))})(X)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==V&&(t.__=t.__V),t.i=void 0,t.__V=V}))),O=z=null},h.__c=function(t,e){e.some((function(t){try{t.__h.forEach(Y),t.__h=t.__h.filter((function(t){return!t.__||Z(t)}))}catch(o){e.some((function(t){t.__h&&(t.__h=[])})),e=[],h.__e(o,t.__v)}})),J&&J(t,e)},h.unmount=function(t){K&&K(t);var e,o=t.__c;o&&o.__H&&(o.__H.__.forEach((function(t){try{Y(t)}catch(t){e=t}})),e&&h.__e(e,o.__v))};var Q="function"==typeof requestAnimationFrame;function Y(t){var e=z,o=t.__c;"function"==typeof o&&(t.__c=void 0,o()),z=e}function Z(t){var e=z;t.__c=t.__(),z=e}var tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.jsxRender=function(t,e){this.rootNode=function(t,e,o){var n,i,r;h.__&&h.__(t,e),i=(n="function"==typeof o)?null:o&&o.__k||e.__k,r=[],L(e,t=(!n&&o||e).__k=b(w,null,[t]),i||_,_,void 0!==e.ownerSVGElement,!n&&o?[o]:i?null:e.firstChild?p.call(e.childNodes):null,r,!n&&o?o:i?i.__e:e.firstChild,n),N(r,t)}(t,e,this.rootNode)},e.Component=x,e.createElement=b,e}(e.HTMLWidget);tt.prototype._class+=" html_JSXWidget";var et=function(){function t(t,e){this._attrs=t,this._children=e}return t.prototype.type=function(){return"div"},t.prototype.attrs=function(){return this._attrs},t.prototype.attr=function(t){return this._attrs[t]},t.prototype.children=function(){return this._children},t.prototype.update=function(t){for(var e in this._attrs)t.attr(e,this._attrs[e])},t.prototype.render=function(t){var o=t.selectAll("".concat(t.node().tagName," > *")).data([this]);return o.exit().remove(),o.enter().append(this.type()).attr("reactd3",0).merge(o).each((function(t){var o=e.select(this);t.update(o),t.renderChildren(o)}))},t.prototype.renderChildren=function(t){var o=t.selectAll("".concat(t.node().tagName," > *")).data(this._children);return o.exit().remove(),o.enter().append((function(t){return document.createElement(t.type())})).attr("reactd3",(function(t,e){return e})).merge(o).each((function(t){var o=e.select(this);t.update(o),t.renderChildren(o)}))},t}(),ot=function(t){function e(e,o,n){var i=t.call(this,o,n)||this;return i._type=e,i}return i(e,t),e.prototype.type=function(){return this._type},e}(et),nt=function(t){function e(e){var o=t.call(this,{},[])||this;return o._text=e,o}return i(e,t),e.prototype.type=function(){return"span"},e.prototype.update=function(e){t.prototype.update.call(this,e),e.text(this._text)},e}(et);function it(t){return"function"==typeof t}function rt(t){return t.prototype&&t.prototype instanceof et}var lt=function(){function t(){}return t.createElement=function(t,e){for(var o=[],n=2;n<arguments.length;n++)o[n-2]=arguments[n];return rt(t)?new t(e):it(t)?t(e):new ot(t,e,o.map((function(t){return"string"==typeof t?new nt(t):t})))},t.render=function(t,e){t.render(e)},t}(),st=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.refreshProps=function(){for(var t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])},e.prototype.componentDidMount=function(){this.widget=(new this.props.type).target(this.base),this.refreshProps(),this.widget.render()},e.prototype.componentWillUnmount=function(){this.widget.target(null).render()},e.prototype.render=function(){return b("div",{style:this.props.style})},e.prototype.componentDidUpdate=function(){this.refreshProps(),this.widget.render()},e}(tt.Component),at=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.refreshProps=function(){for(var t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])},e.prototype.componentDidMount=function(){this.widget=this.props.instance.target(this.base),this.refreshProps(),this.widget.render()},e.prototype.componentWillUnmount=function(){this.widget.target(null).render()},e.prototype.render=function(){return b("div",{style:this.props.style})},e.prototype.componentDidUpdate=function(){this.refreshProps(),this.widget.render()},e}(tt.Component),pt=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return i(o,t),o.prototype.transformData=function(){var t=this,o=[["Total",0,0]],n=this.data();return n.forEach((function(t){o[0][1]+=t[1],o[0][2]+=t[2]})),n.concat(o).map((function(o){return[o[0],t.secondColumnFormat_exists()?e.format(t.secondColumnFormat())(o[1]):o[1],t.thirdColumnFormat_exists()?e.format(t.thirdColumnFormat())(o[2]):o[2]]}))},o.prototype.update=function(e,o){this.tbodyColumnStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left"},{width:this.secondColumnWidth(),"text-align":"right"},{width:this.thirdColumnWidth(),"text-align":"right"}]),this.evenRowStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.secondColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.thirdColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()}]),this.lastRowStyles_default({"font-weight":"bold"}),t.prototype.update.call(this,e,o)},o}(s);pt.prototype._class+=" html_StatsTable",pt.prototype.publish("labelColor","#333","html-color","Color of the text in the first column"),pt.prototype.publish("primaryValueColor","#333","html-color","Color of the text in the second column"),pt.prototype.publish("secondaryValueColor","#333","html-color","Color of the text in the third column"),pt.prototype.publish("evenRowBackgroundColor","#333","html-color","Background color of the even rows"),pt.prototype.publish("evenRowFontColor","#333","html-color","Font color of the even rows"),pt.prototype.publish("firstColumnWidth","auto","string","CSS style applied as the 'width' for the first column (ex: 40px)"),pt.prototype.publish("secondColumnWidth","1%","string","CSS style applied as the 'width' for the second column (ex: 40px)"),pt.prototype.publish("thirdColumnWidth","1%","string","CSS style applied as the 'width' for the third column (ex: 40px)"),pt.prototype.publish("secondColumnFormat","$,.0f","string","d3-format specifier applied to the second column's values",void 0,{optional:!0}),pt.prototype.publish("thirdColumnFormat",null,"string","d3-format specifier applied to the third column's values",void 0,{optional:!0});!function(t,e){void 0===e&&(e={});var o=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}("#wrap{width:100%}#left,#right{padding:5px}#left{background-color:red;display:block;overflow:hidden;text-align:left;text-overflow:ellipsis}#left,#right{white-space:nowrap}#right{background-color:orange;float:right;text-align:right}.html_TitleBar>.main{display:block;width:100%}.html_TitleBar .title{display:block;font-size:20px;font-weight:700;overflow:hidden;padding:4px;text-align:left;text-overflow:ellipsis;white-space:nowrap}.html_TitleBar .icon-bar{float:right;line-height:28px;padding:4px;text-align:right;white-space:nowrap}.html_TitleBar .icon-bar-item,.html_TitleBar .icon-bar-item>div{display:inline}.html_TitleBar .icon-bar a{color:#a9a9a9;padding-bottom:4px;padding-top:4px;text-align:center;transition:all .3s ease}.html_TitleBar .icon-bar a:hover{background-color:#f5f5f5}.html_TitleBar .icon-bar a.selected{background-color:#efe5e5}.html_TitleBar .icon-bar a.spacer{color:none;padding-bottom:0;padding-left:8px;padding-top:2px;text-align:center}.html_TitleBar .icon-bar a.spacer:hover{background-color:transparent}.html_TitleBar .icon-bar .active{background-color:#4caf50}");var ht=function(t){function e(e){var o=t.call(this)||this;return o._owner=e,o._tag="a",o}return i(e,t),e}(e.HTMLWidget),ct=function(t){function e(e,o){var n=t.call(this,e)||this;return n._icon=o,n}return i(e,t),e.prototype.icon=function(){return this._icon},e.prototype.enter=function(e,o){var n=this;t.prototype.enter.call(this,e,o),o.attr("href","#").on("click",(function(t,e,o){return n._owner.titleBarClick(n,t,e,o)})).append("i").attr("class","fa ".concat(this._icon," fa-lg fa-fw"))},e}(ht),ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.enter=function(e,o){var n=this;o.on("click.sel",(function(t,e,o){n.selected(!n.selected()),n.render()})),t.prototype.enter.call(this,e,o)},e.prototype.update=function(e,o){t.prototype.update.call(this,e,o),this._element.classed("selected",this.selected())},e}(ct);ut.prototype.publish("selected",!1,"boolean");var dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.enter=function(e,o){t.prototype.enter.call(this,e,o),o.attr("class","spacer").attr("href","#").append("i")},e}(ht),_t=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.enter=function(e,o){t.prototype.enter.call(this,e,o),this._divMain=o.append("div").attr("class","main"),this._divIconBar=this._divMain.append("div").attr("class","icon-bar"),this._divTitle=this._divMain.append("div").attr("class","title")},e.prototype.update=function(e,o){t.prototype.update.call(this,e,o),this._divTitle.text(this.title());var n=this._divIconBar.selectAll(".icon-bar-item").data(this.buttons());n.enter().append("div").attr("class","icon-bar-item").each((function(t){t.target(this)})).merge(n).each((function(t){t.render()})),n.exit().each((function(t){t.target(null)})).remove(),n.order()},e}(tt);_t.prototype._class+=" html_TitleBar",_t.prototype.publish("title","","string"),_t.prototype.publish("buttons",[],"widgetArray"),t.BUILD_VERSION="2.104.5",t.BreakdownTable=a,t.Button=ct,t.HTMLTooltip=r,t.Item=ht,t.JSXWidget=tt,t.PKG_NAME="@hpcc-js/html",t.PKG_VERSION="2.42.3",t.ReactD3=lt,t.SimpleTable=l,t.Spacer=dt,t.StatsTable=pt,t.StyledTable=s,t.TitleBar=_t,t.ToggleButton=ut,t.VNode=et,t.VizComponent=st,t.VizInstance=at,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/util")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/util"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/html"]={},t["@hpcc-js/common"],t["@hpcc-js/util"])}(this,(function(t,e,o){"use strict";var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var r=function(t){function n(){var e=t.call(this)||this;return e._tooltipHTMLCallback=function(t){return"<b>_tooltipHTMLCallback is undefined</b>"},e._logger=o.scopedLogger("html/HTMLTooltip"),e._closing=!1,e.visible(!1),e}return i(n,t),n.prototype.tooltipHTML=function(t){return this._tooltipHTMLCallback=t,this},n.prototype.tooltipContent=function(t){return arguments.length?(this._contentNode=t,this):this._contentNode},n.prototype.triggerElement=function(t){return this._triggerElement=t,this},n.prototype.enter=function(o,n){t.prototype.enter.call(this,o,n);var i=e.select("body");this._tooltipElement=i.append("div").attr("class","tooltip-div").style("z-index","2147483638").style("position","fixed"),this._arrowElement=i.append("div").attr("class","arrow-div").style("z-index","2147483638").style("position","fixed")},n.prototype.update=function(e,o){var n=this;if(t.prototype.update.call(this,e,o),this._contentNode!==this._prevContentNode){var i=this._tooltipElement.node();(function(t,e,o){if(o||2===arguments.length)for(var n,i=0,r=e.length;i<r;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))})([],i.querySelectorAll("*"),!0).map((function(t){return t.__data__})).filter((function(t){return t})).forEach((function(t){"function"==typeof t.target&&t.target(null),"function"==typeof t.exit&&t.exit()})),i.innerHTML="",i.appendChild(this._contentNode),this._prevContentNode=this._contentNode}if(this._contentNode?this.onShowContent(this._contentNode):this._tooltipElement.html((function(){return n._tooltipHTMLCallback(n.data())})),this.fitContent()){this._tooltipElement.style("width","auto").style("height","auto").style("padding","0px").style("box-sizing","content-box");var r=this._tooltipElement.node().getBoundingClientRect();this.tooltipWidth_default(r.width),this.tooltipHeight_default(r.height)}this._closing=!1,this._tooltipElement.style("background-color",this.tooltipColor()).style("color",this.fontColor()).style("width",this.tooltipWidth()+"px").style("height",this.tooltipHeight()+"px").style("opacity",1).style("padding",this.padding()+"px").style("pointer-events",this.enablePointerEvents()?"all":"none").style("box-sizing","content-box"),this._arrowElement.style("opacity",1).style("pointer-events","none"),this.updateTooltipPosition()},n.prototype.onShowContent=function(t){},n.prototype.updateTooltipPosition=function(){var t=this.calcReferenceBBox(),e=this.calcTooltipDirection(t),o=t[e];return this._tooltipElement.style("top",o.y+"px").style("left",o.x+"px"),this.setArrowPosition(o,e),o},n.prototype.calcTooltipDirection=function(t){var e=Object.keys(t),o=this.direction();e.sort((function(t,e){return t===o?-1:1}));for(var n={top:0,left:0,width:window.innerWidth,height:window.innerHeight},i=0;i<e.length;i++){var r={top:t[e[i]].y,left:t[e[i]].x,width:this.tooltipWidth(),height:this.tooltipHeight()};if(this.rectFits(r,n))return e[i]}return this._logger.warning("Tooltip doesn't fit in the window for any of the directions. Defaulting to '".concat(o,"'")),this._logger.debug(n),this._logger.debug({top:t[o].y,left:t[o].x,width:this.tooltipWidth(),height:this.tooltipHeight()}),o},n.prototype.rectFits=function(t,e){return t.top>=e.top&&t.left>=e.left&&t.width+t.left<=e.width+e.left&&t.height+t.top<=e.height+e.top},n.prototype.setArrowPosition=function(t,e){var o,n,i="border-top-color";switch(this._arrowElement.style("border","".concat(this.arrowHeight(),"px solid ").concat(this.tooltipColor())).style("border-top-color","transparent").style("border-right-color","transparent").style("border-bottom-color","transparent").style("border-left-color","transparent"),e){case"n":o=t.y+this.tooltipHeight()+2*this.padding(),n=t.x+this.tooltipWidth()/2-this.arrowWidth()/2+this.padding(),i="border-top-color",this._arrowElement.style("border-top-width","".concat(this.arrowHeight(),"px")).style("border-bottom-width","0px").style("border-left-width","".concat(this.arrowWidth()/2,"px")).style("border-right-width","".concat(this.arrowWidth()/2,"px"));break;case"s":o=t.y-this.arrowHeight(),n=t.x+this.padding()+this.tooltipWidth()/2-this.arrowWidth()/2,i="border-bottom-color",this._arrowElement.style("border-top-width","0px").style("border-bottom-width","".concat(this.arrowHeight(),"px")).style("border-left-width","".concat(this.arrowWidth()/2,"px")).style("border-right-width","".concat(this.arrowWidth()/2,"px"));break;case"e":o=t.y+this.tooltipHeight()/2+this.padding()-this.arrowWidth()/2,n=t.x-this.arrowHeight(),i="border-right-color",this._arrowElement.style("border-top-width","".concat(this.arrowWidth()/2,"px")).style("border-bottom-width","".concat(this.arrowWidth()/2,"px")).style("border-left-width","0px").style("border-right-width","".concat(this.arrowHeight(),"px"));break;case"w":o=t.y+this.tooltipHeight()/2-this.arrowWidth()/2+this.padding(),n=t.x+this.tooltipWidth()+2*this.padding(),i="border-left-color",this._arrowElement.style("border-top-width","".concat(this.arrowWidth()/2,"px")).style("border-bottom-width","".concat(this.arrowWidth()/2,"px")).style("border-left-width","".concat(this.arrowHeight(),"px")).style("border-right-width","0px")}return void 0!==o&&void 0!==n?this._arrowElement.style("top",o+"px").style("left",n+"px").style(i,this.tooltipColor()).style("opacity",1):this._arrowElement.style("opacity",0),t},n.prototype.getReferenceNode=function(){return this._triggerElement?this._triggerElement.node():this.element().node().parentNode.parentNode},n.prototype.calcReferenceBBox=function(){var t=this.getReferenceNode().getBoundingClientRect(),e=t.top,o=t.left,n=t.width,i=t.height,r=this.tooltipWidth(),l=this.tooltipHeight(),s=r/2,a=l/2,p=this.arrowHeight(),h=this.padding(),c=2*h;return this.followCursor()&&this._cursorLoc&&(o=this._cursorLoc[0],e=this._cursorLoc[1],n=1,i=1),{n:{x:o+n/2-s-h,y:e-l-p-c},e:{x:o+n+p,y:e+i/2-a-h},s:{x:o+n/2-s-h,y:e+i+p},w:{x:o-r-p-c,y:e+i/2-a-h},nw:{x:o-r-c,y:e-l-c},ne:{x:o+n,y:e-l-c},se:{x:o+n,y:e+i},sw:{x:o-r-c,y:e+i}}},n.prototype.mouseout=function(){var t=this;this._closing=!0,this._tooltipElement.on("mouseover",(function(){t._closing=!1})),this._tooltipElement.on("mouseout",(function(){t.mouseout()})),setTimeout((function(){t._closing&&t.visible(!1)}),this.closeDelay())},n.prototype.visible=function(e){return arguments.length?(this._arrowElement&&(this._arrowElement.style("visibility",e?"visible":"hidden"),this._tooltipElement.style("visibility",e?"visible":"hidden")),t.prototype.visible.call(this,e),this):t.prototype.visible.call(this)},n.prototype.exit=function(e,o){this._arrowElement&&(this._arrowElement.remove(),this._tooltipElement.remove()),t.prototype.exit.call(this,e,o)},n}(e.HTMLWidget);r.prototype._class+=" html_HTMLTooltip",r.prototype.publish("fitContent",!1,"boolean","If true, tooltip will grow to fit its html content"),r.prototype.publish("followCursor",!1,"boolean","If true, tooltip will display relative to cursor location"),r.prototype.publish("closeDelay",400,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),r.prototype.publish("direction","n","set","Direction in which to display the tooltip",["n","s","e","w","ne","nw","se","sw"]),r.prototype.publish("padding",8,"number","Padding (pixels)"),r.prototype.publish("arrowWidth",16,"number","Width (or height depending on direction) of the tooltip arrow (pixels)"),r.prototype.publish("arrowHeight",8,"number","Height (or width depending on direction) of the tooltip arrow (pixels)"),r.prototype.publish("fontColor","#FFF","html-color","The default font color for text in the tooltip"),r.prototype.publish("tooltipColor","#000000EE","html-color","Background color of the tooltip"),r.prototype.publish("tooltipWidth",200,"number","Width of the tooltip (not including arrow) (pixels)"),r.prototype.publish("tooltipHeight",200,"number","Height of the tooltip (not including arrow) (pixels)"),r.prototype.publish("enablePointerEvents",!1,"boolean","If true, the 'pointer-events: all' style will be used");var l=function(t){function o(){return t.call(this)||this}return i(o,t),o.prototype.transformData=function(){return this.data()},o.prototype.enter=function(e,o){t.prototype.enter.call(this,e,o),this._table=o.append("table"),this._thead=this._table.append("thead"),this._theadRow=this._thead.append("tr"),this._tbody=this._table.append("tbody")},o.prototype.update=function(o,n){t.prototype.update.call(this,o,n),this._table.style("width",this.autoWidth()?"auto":"100%");var i=this._theadRow.selectAll("th").data(this.columns());i.enter().append("th").attr("class",(function(t,e){return"th-".concat(e)})).merge(i).text((function(t){return t.toString()})),i.exit().remove();var r=this._tbody.selectAll("tr").data(this.transformData());r.enter().append("tr").merge(r).each((function(t){var o=e.select(this).selectAll("td").data(t);o.enter().append("td").attr("class",(function(t,e){return"col-".concat(e)})).merge(o).text((function(t){return t.toString()})),o.exit().remove()})),r.exit().remove()},o}(e.HTMLWidget);l.prototype._class+=" html_SimpleTable",l.prototype.publish("autoWidth",!1,"boolean","If true, table width will be set to 'auto'. If false, the width is set to '100%'");var s=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.applyStyleObject=function(t,e){Object.keys(e).forEach((function(o){t.style(o,e[o])}))},e.prototype.update=function(e,o){var n=this;t.prototype.update.call(this,e,o),o.selectAll("tr,th,td").attr("style","").style("font-family",this.fontFamily()).style("color",this.fontColor()),this.theadColumnStyles().forEach((function(t,e){n.applyStyleObject(o.select(".th-".concat(e)),t)})),this.tbodyColumnStyles().forEach((function(t,e){n.applyStyleObject(o.selectAll(".col-".concat(e)),t)}));var i=Object.keys(this.evenRowStyles()).length>0,r=Object.keys(this.lastRowStyles()).length>0,l=o.selectAll("tbody > tr");if(i){var s=l.select((function(t,e){return e%2?this:null}));this.applyStyleObject(s,this.evenRowStyles())}if(r){var a=l.select((function(t,e,o){return e===o.length-1?this:null}));this.applyStyleObject(a,this.lastRowStyles())}},e}(l);s.prototype._class+=" html_StyledTable",s.prototype.publish("fontFamily","Verdana","string","Base font-family used within the table"),s.prototype.publish("fontColor","#333","string","Base font color used within the table"),s.prototype.publish("theadColumnStyles",[],"array",'Array of objects containing styles for the thead columns (ex: [{"color":"red"},{"color":"blue"}])'),s.prototype.publish("tbodyColumnStyles",[],"array",'Array of objects containing styles for the tbody columns (ex: [{"color":"red"},{"color":"blue"}])'),s.prototype.publish("lastRowStyles",{},"object",'Object containing styles for the last row (ex: {"color":"red"})'),s.prototype.publish("evenRowStyles",{},"object",'Object containing styles for even rows (ex: {"background-color":"#AAA"})');var a=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.transformData=function(){var t=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount();return this.breakdownData(t)},e.prototype.breakdownData=function(t){var e=this.data().length,o=this.data().reduce((function(t,e){return t+e[1]}),0),n=[],i=0;this.data().sort((function(t,e){return t[1]>e[1]?-1:1}));var r=e-t>0;if(this.data().filter((function(e,o){return!r||o<t-1})).forEach((function(t){var e=Math.round(t[1]/o*100);i+=e,n.push([t[0],e+"%"])})),r){var l="".concat(this.otherLabel()," (").concat(e-t+1,")"),s="~"+(100-i)+"%";n.push([l,s])}return n},e.prototype.calculateRowCount=function(){var t=this.columns().length>0?this.thFontSize()+5:0,e=this.fontSize()+5,o=this.height()-t;return Math.floor(o/e)},e.prototype.enter=function(e,o){var n=this;t.prototype.enter.call(this,e,o),this._tooltip=(new r).target(e),this._tooltip.tooltipHTML((function(t){var e=n.useCalculatedRowCount()?n.calculateRowCount():n.rowCount(),o=n.fontSize(),i=Math.max.apply(Math,t.map((function(t){return n.textSize(t[0],"Verdana",n.fontSize()).width}))),r=2*(i+30)+2*n._tooltip.padding(),l=o*Math.ceil((t.length-e)/2)+2*n._tooltip.padding();n._tooltip.tooltipWidth(r),n._tooltip.tooltipHeight(l);var s=n.breakdownData(n.data().length).slice(e-1);return'<div style="\n width: 100%;\n height: 100%;\n font-size: '.concat(n.fontSize(),'px\n ">').concat(s.map((function(t){return'<div style="\n float:left;\n width:'.concat(Math.floor(49.5),'%;\n ">').concat(t[0],": ").concat(t[1],"</div>")})).join(""),"</div>")}))},e.prototype.update=function(e,o){if(this.theadColumnStyles_default([{color:this.thFirstColor(),"font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.labelAlignment(),width:"auto",padding:"0px"},{width:"1%","font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.percentageAlignment(),padding:"0px"}]),this.tbodyColumnStyles_default([{color:this.topLabelColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.topPercentageColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),this.lastRowStyles_default([{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherLabelBold()?"bold":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherPercentageBold()?"bold":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),t.prototype.update.call(this,e,o),(this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount())<this.data().length){var n=o.select("tbody > tr:last-child"),i=this;n.on("mouseout.tooltip",(function(t){i._tooltip._triggerElement=n,i._tooltip.visible(!1).render()})).on("mouseenter.tooltip",(function(t){i._tooltip._triggerElement=n,i._tooltip.direction("n").data(i.data()).visible(!0).render()}))}},e}(s);a.prototype._class+=" html_BreakdownTable",a.prototype.publish("useCalculatedRowCount",!0,"boolean","If true, rowCount will be calculated and its default will be overwritten"),a.prototype.publish("rowCount",5,"number","Number of total rows to display (including the 'other' row)",void 0,{disable:function(t){return t.useCalculatedRowCount()}}),a.prototype.publish("fontSize",14,"number","Font size (pixels)"),a.prototype.publish("labelAlignment","left","set","Alignment of the label column text",["left","center","right"]),a.prototype.publish("percentageAlignment","center","set","Alignment of the percentage column text",["left","center","right"]),a.prototype.publish("topLabelColor","#333","html-color","Color of displayed 'top' labels"),a.prototype.publish("topPercentageColor","#1A99D5","html-color","Color of displayed 'top' percentages"),a.prototype.publish("topPercentageBold",!0,"html-color","If true, the 'top' percentages will be bold"),a.prototype.publish("otherLabel","Other","string","Label text for the 'other' row"),a.prototype.publish("otherLabelColor","#AAA","html-color","Color of the 'other' label"),a.prototype.publish("otherLabelBold",!1,"html-color","If true, the 'other' label will be bold"),a.prototype.publish("otherPercentageColor","#AAA","html-color","Color of the 'other' percentage"),a.prototype.publish("otherPercentageBold",!1,"html-color","If true, the 'other' percentage will be bold"),a.prototype.publish("thFontWeight","bold","string","Font weight for th elements"),a.prototype.publish("thFontSize",26,"number","Font size for th elements"),a.prototype.publish("thFirstColor","#333","html-color","Text color of the first th element"),a.prototype.publish("thLastColor","#333","html-color","Text color of the last th element");var p,h,c,u,d,_={},f=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function g(t,e){for(var o in e)t[o]=e[o];return t}function m(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,o){var n,i,r,l={};for(r in e)"key"==r?n=e[r]:"ref"==r?i=e[r]:l[r]=e[r];if(arguments.length>2&&(l.children=arguments.length>3?p.call(arguments,2):o),"function"==typeof t&&null!=t.defaultProps)for(r in t.defaultProps)void 0===l[r]&&(l[r]=t.defaultProps[r]);return v(t,l,n,i,null)}function v(t,e,o,n,i){var r={type:t,props:e,key:o,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++c:i};return null==i&&null!=h.vnode&&h.vnode(r),r}function w(t){return t.children}function x(t,e){this.props=t,this.context=e}function C(t,e){if(null==e)return t.__?C(t.__,t.__.__k.indexOf(t)+1):null;for(var o;e<t.__k.length;e++)if(null!=(o=t.__k[e])&&null!=o.__e)return o.__e;return"function"==typeof t.type?C(t):null}function k(t){var e,o;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(o=t.__k[e])&&null!=o.__e){t.__e=t.__c.base=o.__e;break}return k(t)}}function S(t){(!t.__d&&(t.__d=!0)&&u.push(t)&&!T.__r++||d!==h.debounceRendering)&&((d=h.debounceRendering)||setTimeout)(T)}function T(){for(var t;T.__r=u.length;)t=u.sort((function(t,e){return t.__v.__b-e.__v.__b})),u=[],t.some((function(t){var e,o,n,i,r,l;t.__d&&(r=(i=(e=t).__v).__e,(l=e.__P)&&(o=[],(n=g({},i)).__v=i.__v+1,L(l,i,n,e.__n,void 0!==l.ownerSVGElement,null!=i.__h?[r]:null,o,null==r?C(i):r,i.__h),N(o,i),i.__e!=r&&k(i)))}))}function E(t,e,o,n,i,r,l,s,a,p){var h,c,u,d,y,g,m,b=n&&n.__k||f,x=b.length;for(o.__k=[],h=0;h<e.length;h++)if(null!=(d=o.__k[h]=null==(d=e[h])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?v(null,d,null,null,d):Array.isArray(d)?v(w,{children:d},null,null,null):d.__b>0?v(d.type,d.props,d.key,null,d.__v):d)){if(d.__=o,d.__b=o.__b+1,null===(u=b[h])||u&&d.key==u.key&&d.type===u.type)b[h]=void 0;else for(c=0;c<x;c++){if((u=b[c])&&d.key==u.key&&d.type===u.type){b[c]=void 0;break}u=null}L(t,d,u=u||_,i,r,l,s,a,p),y=d.__e,(c=d.ref)&&u.ref!=c&&(m||(m=[]),u.ref&&m.push(u.ref,null,d),m.push(c,d.__c||y,d)),null!=y?(null==g&&(g=y),"function"==typeof d.type&&d.__k===u.__k?d.__d=a=W(d,a,t):a=A(t,d,u,b,y,a),"function"==typeof o.type&&(o.__d=a)):a&&u.__e==a&&a.parentNode!=t&&(a=C(u))}for(o.__e=g,h=x;h--;)null!=b[h]&&("function"==typeof o.type&&null!=b[h].__e&&b[h].__e==o.__d&&(o.__d=C(n,h+1)),D(b[h],b[h]));if(m)for(h=0;h<m.length;h++)M(m[h],m[++h],m[++h])}function W(t,e,o){for(var n,i=t.__k,r=0;i&&r<i.length;r++)(n=i[r])&&(n.__=t,e="function"==typeof n.type?W(n,e,o):A(o,n,n,i,n.__e,e));return e}function A(t,e,o,n,i,r){var l,s,a;if(void 0!==e.__d)l=e.__d,e.__d=void 0;else if(null==o||i!=r||null==i.parentNode)t:if(null==r||r.parentNode!==t)t.appendChild(i),l=null;else{for(s=r,a=0;(s=s.nextSibling)&&a<n.length;a+=2)if(s==i)break t;t.insertBefore(i,r),l=r}return void 0!==l?l:i.nextSibling}function H(t,e,o){"-"===e[0]?t.setProperty(e,o):t[e]=null==o?"":"number"!=typeof o||y.test(e)?o:o+"px"}function B(t,e,o,n,i){var r;t:if("style"===e)if("string"==typeof o)t.style.cssText=o;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)o&&e in o||H(t.style,e,"");if(o)for(e in o)n&&o[e]===n[e]||H(t.style,e,o[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=o,o?n||t.addEventListener(e,r?F:R,r):t.removeEventListener(e,r?F:R,r);else if("dangerouslySetInnerHTML"!==e){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==o?"":o;break t}catch(t){}"function"==typeof o||(null!=o&&(!1!==o||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,o):t.removeAttribute(e))}}function R(t){this.l[t.type+!1](h.event?h.event(t):t)}function F(t){this.l[t.type+!0](h.event?h.event(t):t)}function L(t,e,o,n,i,r,l,s,a){var p,c,u,d,_,f,y,m,b,v,C,k,S,T=e.type;if(void 0!==e.constructor)return null;null!=o.__h&&(a=o.__h,s=e.__e=o.__e,e.__h=null,r=[s]),(p=h.__b)&&p(e);try{t:if("function"==typeof T){if(m=e.props,b=(p=T.contextType)&&n[p.__c],v=p?b?b.props.value:p.__:n,o.__c?y=(c=e.__c=o.__c).__=c.__E:("prototype"in T&&T.prototype.render?e.__c=c=new T(m,v):(e.__c=c=new x(m,v),c.constructor=T,c.render=j),b&&b.sub(c),c.props=m,c.state||(c.state={}),c.context=v,c.__n=n,u=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=T.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=g({},c.__s)),g(c.__s,T.getDerivedStateFromProps(m,c.__s))),d=c.props,_=c.state,u)null==T.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==T.getDerivedStateFromProps&&m!==d&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(m,v),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(m,c.__s,v)||e.__v===o.__v){c.props=m,c.state=c.__s,e.__v!==o.__v&&(c.__d=!1),c.__v=e,e.__e=o.__e,e.__k=o.__k,e.__k.forEach((function(t){t&&(t.__=e)})),c.__h.length&&l.push(c);break t}null!=c.componentWillUpdate&&c.componentWillUpdate(m,c.__s,v),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(d,_,f)}))}if(c.context=v,c.props=m,c.__v=e,c.__P=t,C=h.__r,k=0,"prototype"in T&&T.prototype.render)c.state=c.__s,c.__d=!1,C&&C(e),p=c.render(c.props,c.state,c.context);else do{c.__d=!1,C&&C(e),p=c.render(c.props,c.state,c.context),c.state=c.__s}while(c.__d&&++k<25);c.state=c.__s,null!=c.getChildContext&&(n=g(g({},n),c.getChildContext())),u||null==c.getSnapshotBeforeUpdate||(f=c.getSnapshotBeforeUpdate(d,_)),S=null!=p&&p.type===w&&null==p.key?p.props.children:p,E(t,Array.isArray(S)?S:[S],e,o,n,i,r,l,s,a),c.base=e.__e,e.__h=null,c.__h.length&&l.push(c),y&&(c.__E=c.__=null),c.__e=!1}else null==r&&e.__v===o.__v?(e.__k=o.__k,e.__e=o.__e):e.__e=P(o.__e,e,o,n,i,r,l,a);(p=h.diffed)&&p(e)}catch(t){e.__v=null,(a||null!=r)&&(e.__e=s,e.__h=!!a,r[r.indexOf(s)]=null),h.__e(t,e,o)}}function N(t,e){h.__c&&h.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){h.__e(t,e.__v)}}))}function P(t,e,o,n,i,r,l,s){var a,h,c,u=o.props,d=e.props,f=e.type,y=0;if("svg"===f&&(i=!0),null!=r)for(;y<r.length;y++)if((a=r[y])&&"setAttribute"in a==!!f&&(f?a.localName===f:3===a.nodeType)){t=a,r[y]=null;break}if(null==t){if(null===f)return document.createTextNode(d);t=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,d.is&&d),r=null,s=!1}if(null===f)u===d||s&&t.data===d||(t.data=d);else{if(r=r&&p.call(t.childNodes),h=(u=o.props||_).dangerouslySetInnerHTML,c=d.dangerouslySetInnerHTML,!s){if(null!=r)for(u={},y=0;y<t.attributes.length;y++)u[t.attributes[y].name]=t.attributes[y].value;(c||h)&&(c&&(h&&c.__html==h.__html||c.__html===t.innerHTML)||(t.innerHTML=c&&c.__html||""))}if(function(t,e,o,n,i){var r;for(r in o)"children"===r||"key"===r||r in e||B(t,r,null,o[r],n);for(r in e)i&&"function"!=typeof e[r]||"children"===r||"key"===r||"value"===r||"checked"===r||o[r]===e[r]||B(t,r,e[r],o[r],n)}(t,d,u,i,s),c)e.__k=[];else if(y=e.props.children,E(t,Array.isArray(y)?y:[y],e,o,n,i&&"foreignObject"!==f,r,l,r?r[0]:o.__k&&C(o,0),s),null!=r)for(y=r.length;y--;)null!=r[y]&&m(r[y]);s||("value"in d&&void 0!==(y=d.value)&&(y!==t.value||"progress"===f&&!y||"option"===f&&y!==u.value)&&B(t,"value",y,u.value,!1),"checked"in d&&void 0!==(y=d.checked)&&y!==t.checked&&B(t,"checked",y,u.checked,!1))}return t}function M(t,e,o){try{"function"==typeof t?t(e):t.current=e}catch(t){h.__e(t,o)}}function D(t,e,o){var n,i;if(h.unmount&&h.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||M(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){h.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&D(n[i],e,"function"!=typeof t.type);o||null==t.__e||m(t.__e),t.__e=t.__d=void 0}function j(t,e,o){return this.constructor(t,o)}p=f.slice,h={__e:function(t,e,o,n){for(var i,r,l;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(t)),l=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,n||{}),l=i.__d),l)return i.__E=i}catch(e){t=e}throw t}},c=0,x.prototype.setState=function(t,e){var o;o=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=g({},this.state),"function"==typeof t&&(t=t(g({},o),this.props)),t&&g(o,t),null!=t&&this.__v&&(e&&this.__h.push(e),S(this))},x.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),S(this))},x.prototype.render=w,u=[],T.__r=0;var z,O,I,U=[],V=[],q=h.__b,G=h.__r,$=h.diffed,J=h.__c,K=h.unmount;function X(){for(var t;t=U.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Y),t.__H.__h.forEach(Z),t.__H.__h=[]}catch(e){t.__H.__h=[],h.__e(e,t.__v)}}h.__b=function(t){z=null,q&&q(t)},h.__r=function(t){G&&G(t);var e=(z=t.__c).__H;e&&(O===z?(e.__h=[],z.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=V,t.__N=t.i=void 0}))):(e.__h.forEach(Y),e.__h.forEach(Z),e.__h=[])),O=z},h.diffed=function(t){$&&$(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==U.push(e)&&I===h.requestAnimationFrame||((I=h.requestAnimationFrame)||function(t){var e,o=function(){clearTimeout(n),Q&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(o,100);Q&&(e=requestAnimationFrame(o))})(X)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==V&&(t.__=t.__V),t.i=void 0,t.__V=V}))),O=z=null},h.__c=function(t,e){e.some((function(t){try{t.__h.forEach(Y),t.__h=t.__h.filter((function(t){return!t.__||Z(t)}))}catch(o){e.some((function(t){t.__h&&(t.__h=[])})),e=[],h.__e(o,t.__v)}})),J&&J(t,e)},h.unmount=function(t){K&&K(t);var e,o=t.__c;o&&o.__H&&(o.__H.__.forEach((function(t){try{Y(t)}catch(t){e=t}})),e&&h.__e(e,o.__v))};var Q="function"==typeof requestAnimationFrame;function Y(t){var e=z,o=t.__c;"function"==typeof o&&(t.__c=void 0,o()),z=e}function Z(t){var e=z;t.__c=t.__(),z=e}var tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.jsxRender=function(t,e){this.rootNode=function(t,e,o){var n,i,r;h.__&&h.__(t,e),i=(n="function"==typeof o)?null:o&&o.__k||e.__k,r=[],L(e,t=(!n&&o||e).__k=b(w,null,[t]),i||_,_,void 0!==e.ownerSVGElement,!n&&o?[o]:i?null:e.firstChild?p.call(e.childNodes):null,r,!n&&o?o:i?i.__e:e.firstChild,n),N(r,t)}(t,e,this.rootNode)},e.Component=x,e.createElement=b,e}(e.HTMLWidget);tt.prototype._class+=" html_JSXWidget";var et=function(){function t(t,e){this._attrs=t,this._children=e}return t.prototype.type=function(){return"div"},t.prototype.attrs=function(){return this._attrs},t.prototype.attr=function(t){return this._attrs[t]},t.prototype.children=function(){return this._children},t.prototype.update=function(t){for(var e in this._attrs)t.attr(e,this._attrs[e])},t.prototype.render=function(t){var o=t.selectAll("".concat(t.node().tagName," > *")).data([this]);return o.exit().remove(),o.enter().append(this.type()).attr("reactd3",0).merge(o).each((function(t){var o=e.select(this);t.update(o),t.renderChildren(o)}))},t.prototype.renderChildren=function(t){var o=t.selectAll("".concat(t.node().tagName," > *")).data(this._children);return o.exit().remove(),o.enter().append((function(t){return document.createElement(t.type())})).attr("reactd3",(function(t,e){return e})).merge(o).each((function(t){var o=e.select(this);t.update(o),t.renderChildren(o)}))},t}(),ot=function(t){function e(e,o,n){var i=t.call(this,o,n)||this;return i._type=e,i}return i(e,t),e.prototype.type=function(){return this._type},e}(et),nt=function(t){function e(e){var o=t.call(this,{},[])||this;return o._text=e,o}return i(e,t),e.prototype.type=function(){return"span"},e.prototype.update=function(e){t.prototype.update.call(this,e),e.text(this._text)},e}(et);function it(t){return"function"==typeof t}function rt(t){return t.prototype&&t.prototype instanceof et}var lt=function(){function t(){}return t.createElement=function(t,e){for(var o=[],n=2;n<arguments.length;n++)o[n-2]=arguments[n];return rt(t)?new t(e):it(t)?t(e):new ot(t,e,o.map((function(t){return"string"==typeof t?new nt(t):t})))},t.render=function(t,e){t.render(e)},t}(),st=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.refreshProps=function(){for(var t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])},e.prototype.componentDidMount=function(){this.widget=(new this.props.type).target(this.base),this.refreshProps(),this.widget.render()},e.prototype.componentWillUnmount=function(){this.widget.target(null).render()},e.prototype.render=function(){return b("div",{style:this.props.style})},e.prototype.componentDidUpdate=function(){this.refreshProps(),this.widget.render()},e}(tt.Component),at=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.refreshProps=function(){for(var t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])},e.prototype.componentDidMount=function(){this.widget=this.props.instance.target(this.base),this.refreshProps(),this.widget.render()},e.prototype.componentWillUnmount=function(){this.widget.target(null).render()},e.prototype.render=function(){return b("div",{style:this.props.style})},e.prototype.componentDidUpdate=function(){this.refreshProps(),this.widget.render()},e}(tt.Component),pt=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return i(o,t),o.prototype.transformData=function(){var t=this,o=[["Total",0,0]],n=this.data();return n.forEach((function(t){o[0][1]+=t[1],o[0][2]+=t[2]})),n.concat(o).map((function(o){return[o[0],t.secondColumnFormat_exists()?e.format(t.secondColumnFormat())(o[1]):o[1],t.thirdColumnFormat_exists()?e.format(t.thirdColumnFormat())(o[2]):o[2]]}))},o.prototype.update=function(e,o){this.tbodyColumnStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left"},{width:this.secondColumnWidth(),"text-align":"right"},{width:this.thirdColumnWidth(),"text-align":"right"}]),this.evenRowStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.secondColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.thirdColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()}]),this.lastRowStyles_default({"font-weight":"bold"}),t.prototype.update.call(this,e,o)},o}(s);pt.prototype._class+=" html_StatsTable",pt.prototype.publish("labelColor","#333","html-color","Color of the text in the first column"),pt.prototype.publish("primaryValueColor","#333","html-color","Color of the text in the second column"),pt.prototype.publish("secondaryValueColor","#333","html-color","Color of the text in the third column"),pt.prototype.publish("evenRowBackgroundColor","#333","html-color","Background color of the even rows"),pt.prototype.publish("evenRowFontColor","#333","html-color","Font color of the even rows"),pt.prototype.publish("firstColumnWidth","auto","string","CSS style applied as the 'width' for the first column (ex: 40px)"),pt.prototype.publish("secondColumnWidth","1%","string","CSS style applied as the 'width' for the second column (ex: 40px)"),pt.prototype.publish("thirdColumnWidth","1%","string","CSS style applied as the 'width' for the third column (ex: 40px)"),pt.prototype.publish("secondColumnFormat","$,.0f","string","d3-format specifier applied to the second column's values",void 0,{optional:!0}),pt.prototype.publish("thirdColumnFormat",null,"string","d3-format specifier applied to the third column's values",void 0,{optional:!0});!function(t,e){void 0===e&&(e={});var o=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}("#wrap{width:100%}#left,#right{padding:5px}#left{background-color:red;display:block;overflow:hidden;text-align:left;text-overflow:ellipsis}#left,#right{white-space:nowrap}#right{background-color:orange;float:right;text-align:right}.html_TitleBar>.main{display:block;width:100%}.html_TitleBar .title{display:block;font-size:20px;font-weight:700;overflow:hidden;padding:4px;text-align:left;text-overflow:ellipsis;white-space:nowrap}.html_TitleBar .icon-bar{float:right;line-height:28px;padding:4px;text-align:right;white-space:nowrap}.html_TitleBar .icon-bar-item,.html_TitleBar .icon-bar-item>div{display:inline}.html_TitleBar .icon-bar a{color:#a9a9a9;padding-bottom:4px;padding-top:4px;text-align:center;transition:all .3s ease}.html_TitleBar .icon-bar a:hover{background-color:#f5f5f5}.html_TitleBar .icon-bar a.selected{background-color:#efe5e5}.html_TitleBar .icon-bar a.spacer{color:none;padding-bottom:0;padding-left:8px;padding-top:2px;text-align:center}.html_TitleBar .icon-bar a.spacer:hover{background-color:transparent}.html_TitleBar .icon-bar .active{background-color:#4caf50}");var ht=function(t){function e(e){var o=t.call(this)||this;return o._owner=e,o._tag="a",o}return i(e,t),e}(e.HTMLWidget),ct=function(t){function e(e,o){var n=t.call(this,e)||this;return n._icon=o,n}return i(e,t),e.prototype.icon=function(){return this._icon},e.prototype.enter=function(e,o){var n=this;t.prototype.enter.call(this,e,o),o.attr("href","#").on("click",(function(t,e,o){return n._owner.titleBarClick(n,t,e,o)})).append("i").attr("class","fa ".concat(this._icon," fa-lg fa-fw"))},e}(ht),ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.enter=function(e,o){var n=this;o.on("click.sel",(function(t,e,o){n.selected(!n.selected()),n.render()})),t.prototype.enter.call(this,e,o)},e.prototype.update=function(e,o){t.prototype.update.call(this,e,o),this._element.classed("selected",this.selected())},e}(ct);ut.prototype.publish("selected",!1,"boolean");var dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.enter=function(e,o){t.prototype.enter.call(this,e,o),o.attr("class","spacer").attr("href","#").append("i")},e}(ht),_t=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.enter=function(e,o){t.prototype.enter.call(this,e,o),this._divMain=o.append("div").attr("class","main"),this._divIconBar=this._divMain.append("div").attr("class","icon-bar"),this._divTitle=this._divMain.append("div").attr("class","title")},e.prototype.update=function(e,o){t.prototype.update.call(this,e,o),this._divTitle.text(this.title());var n=this._divIconBar.selectAll(".icon-bar-item").data(this.buttons());n.enter().append("div").attr("class","icon-bar-item").each((function(t){t.target(this)})).merge(n).each((function(t){t.render()})),n.exit().each((function(t){t.target(null)})).remove(),n.order()},e}(tt);_t.prototype._class+=" html_TitleBar",_t.prototype.publish("title","","string"),_t.prototype.publish("buttons",[],"widgetArray"),t.BUILD_VERSION="2.104.7",t.BreakdownTable=a,t.Button=ct,t.HTMLTooltip=r,t.Item=ht,t.JSXWidget=tt,t.PKG_NAME="@hpcc-js/html",t.PKG_VERSION="2.42.4",t.ReactD3=lt,t.SimpleTable=l,t.Spacer=dt,t.StatsTable=pt,t.StyledTable=s,t.TitleBar=_t,t.ToggleButton=ut,t.VNode=et,t.VizComponent=st,t.VizInstance=at,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=index.min.js.map
{
"name": "@hpcc-js/html",
"version": "2.42.3",
"version": "2.42.4",
"description": "hpcc-js - Viz HTML",

@@ -41,3 +41,3 @@ "main": "dist/index.js",

"dependencies": {
"@hpcc-js/common": "^2.71.2",
"@hpcc-js/common": "^2.71.3",
"@hpcc-js/preact-shim": "^2.16.2",

@@ -63,3 +63,3 @@ "@hpcc-js/util": "^2.49.1"

"homepage": "https://github.com/hpcc-systems/Visualization",
"gitHead": "0fd6fdaaa8b870631c36f8f2e80ddf39065127b8"
"gitHead": "0b196092f8781f2f56a7f688496d1ae9bc229ace"
}
export const PKG_NAME = "@hpcc-js/html";
export const PKG_VERSION = "2.42.3";
export const BUILD_VERSION = "2.104.5";
export const PKG_VERSION = "2.42.4";
export const BUILD_VERSION = "2.104.7";
export declare const PKG_NAME = "@hpcc-js/html";
export declare const PKG_VERSION = "2.42.3";
export declare const BUILD_VERSION = "2.104.5";
export declare const PKG_VERSION = "2.42.4";
export declare const BUILD_VERSION = "2.104.7";
//# sourceMappingURL=__package__.d.ts.map
export declare const PKG_NAME = "@hpcc-js/html";
export declare const PKG_VERSION = "2.42.3";
export declare const BUILD_VERSION = "2.104.5";
export declare const PKG_VERSION = "2.42.4";
export declare const BUILD_VERSION = "2.104.7";
//# sourceMappingURL=__package__.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc