UNPKG

quoslibero

Version:

FusionCharts JavaScript charting framework

1 lines 57.1 kB
!function(t){"object"==typeof module&&"undefined"!=typeof module.exports?module.exports=t:t()}(function(){(window.webpackJsonpFusionCharts=window.webpackJsonpFusionCharts||[]).push([[8],{1044:function(t,e,i){"use strict";e.__esModule=!0,e.Treemap=undefined;var n,r=i(1045),o=(n=r)&&n.__esModule?n:{"default":n};e.Treemap=o["default"],e["default"]={name:"treemap",type:"package",requiresFusionCharts:!0,extension:function(t){return t.addDep(o["default"])}}},1045:function(t,e,i){"use strict";e.__esModule=!0;var n,r=i(1046),o=(n=r)&&n.__esModule?n:{"default":n};e["default"]=o["default"]},1046:function(t,e,i){"use strict";e.__esModule=!0;var n=b(i(360)),r=i(136),o=i(125),a=i(250),l=b(i(1047)),s=b(i(1049)),h=i(132),c=b(i(430)),d=i(459),g=b(i(461)),f=b(i(899)),u=b(i(903)),p=b(i(428)),v=b(i(273));function b(t){return t&&t.__esModule?t:{"default":t}}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):function(t,e){for(var i=Object.getOwnPropertyNames(e),n=0;n<i.length;n++){var r=i[n],o=Object.getOwnPropertyDescriptor(e,r);o&&o.configurable&&t[r]===undefined&&Object.defineProperty(t,r,o)}}(t,e))}var y=(0,h.getDep)("redraphael","plugin");(0,v["default"])(y),y.addSymbol({backIcon:function(t,e,i){var n=i-1,r=e+n,o=r-n/2,a=t+n,l=o-n;return["M",t,e-n,"L",t-n,e,t,r,t,o,a,o,a,l,a-n,l,"Z"]},homeIcon:function(t,e,i){var n=i-1,r=2*n,o=t-n,a=o+r/6,l=e+n,s=a+r/4,h=l-n/2,c=s+r/6,d=h+n/2,g=c+r/4,f=d-n;return["M",t,e-n,"L",o,e,a,e,a,l,s,l,s,h,c,h,c,d,g,d,g,f,g+r/6,f,"Z"]}});var x=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return i._lastAttached={},i.hasGradientLegend=!0,i.addToEnv("ref",(0,s["default"])()),i.registerFactory("legend",g["default"]),i.registerFactory("legend",u["default"],["canvas"]),i.registerFactory("colormanager-decider",f["default"],["legend"]),i.registerFactory("mouseTracker",p["default"]),i.registerFactory("dataset",c["default"],["vCanvas"]),i}return m(e,t),e.getName=function(){return"TreeMap"},e.prototype.getName=function(){return"TreeMap"},e.prototype.__setDefaultConfig=function(){t.prototype.__setDefaultConfig.call(this),this.config.enablemousetracking=!0,this.config.skipCanvasDrawing=!0,this.config.valuefontbold=0},e.prototype.configureAttributes=function(t){this.config.skipConfigureIteration={},this.config.valuesset=!1,this.parseChartAttr(t),this.createComponent(t),this.setTooltipStyle(),this.configureChildren(),this._createToolBox()},e.prototype.mouseoutHandler=function(t,e,i){var n=this.config.datasetOrder||this.getDatasets(),r=this.getChildren("mouseTracker")[0];n[e]._firePlotEvent("fc-mouseout",i,t),delete r._lastDatasetIndex,delete r._lastPointIndex},e.prototype._mouseEvtHandler=function(t,e){var i=this,n=e.mouseTracker,r=t.originalEvent,a=i.config,l=a.canvasLeft,s=a.canvasRight,h=a.canvasBottom,c=a.canvasTop,d=a.datasetOrder||i.getDatasets(),g=(0,o.getMouseCoordinate)(i.getFromEnv("chart-container"),r,i),f=g.chartX,u=g.chartY,p=void 0,v=void 0,b=!1,m=d.length,y=void 0,x=void 0,k=void 0,w=n._lastDatasetIndex,C=n._lastPointIndex;if(f>l&&f<s&&u>c&&u<h||i.config.plotOverFlow)for(;m--&&!b;)(p=d[m])&&(v=p._getHoveredPlot&&p._getHoveredPlot(f,u))&&v.hovered&&(b=!0,v.datasetIndex=m,k=n.getMouseEvents(t,v.datasetIndex,v.pointIndex));if((!b||k&&k.fireOut)&&w!==undefined&&d[w]&&d[w]._firePlotEvent&&(k&&!k.events.length?n.mouseoutTimer=setTimeout(function(){i.mouseoutHandler(t,w,C)},20):(i.mouseoutHandler(t,w,C),clearTimeout(n.mouseoutTimer))),b)for((x=k.events&&k.events.length)&&(n._lastDatasetIndex=v.datasetIndex,C=n._lastPointIndex=v.pointIndex),y=0;y<x;y+=1)p&&p._firePlotEvent&&p._firePlotEvent(k.events[y],C,t)},e.prototype._checkInvalidSpecificData=function(){if(!this.getFromEnv("dataSource").data)return!0},e.prototype.addData=function(){var t=this.getFromEnv("ref").algorithmFactory,e=Array.prototype.slice.call(arguments,0);e.unshift("addData"),e.unshift(this._getCleanValue()),t.realTimeUpdate.apply(this,e)},e.prototype.removeData=function(){var t=this.getFromEnv("ref").algorithmFactory,e=Array.prototype.slice.call(arguments,0);e.unshift("deleteData"),e.unshift(this._getCleanValue()),t.realTimeUpdate.apply(this,e)},e.prototype.triggerKDTreePartioning=function(){var t=this.getDatasets()[0];t.addJob("partitioning",t.kdTreePartioning.bind(t),r.priorityList.tracker)},e.prototype.resetSingleTracker=function(){var t=this.getDatasets()[0],e=t&&t.graphics&&t.graphics.singleTracker;e&&e.attr({x:0,y:0,width:0,height:0,stroke:"rgba(255,255,255,0)","fill-opacity":0})},e.prototype._manageLegendSpace=function(){d._manageLegendSpace.call(this)},e.prototype.manageGradientLegendSpace=function(t){return d.manageGradientLegendSpace.call(this,t)},e.prototype.flushKDTree=function(){this.getDatasets()[0].kdTree={}},e.prototype._createToolBox=function(){t.prototype._createToolBox.call(this);var e="t"===this.config.toolbarVAlign?"chartMenuBar":"actionBar",i=this.getFromEnv("tool-config"),n=void 0;n=this.getChildren(e)[0];for(var r=0;r<2;r++)n.attachChild(a.Tool,"tool",(0===r?"home":"back")+"-"+n.getId()+"-"+this.getId());n.getChild("back-"+n.getId()+"-"+this.getId()).configure(Object.assign({},i,{name:"backIcon",isHidden:!0})),n.getChild("home-"+n.getId()+"-"+this.getId()).configure(Object.assign({},i,{name:"homeIcon",isHidden:!0})),this.addToEnv("toolbarBtns",{back:n.getChild("back-"+n.getId()+"-"+this.getId()),home:n.getChild("home-"+n.getId()+"-"+this.getId())})},e.prototype._getCleanValue=function(){var t=this.getFromEnv("number-formatter");return function(e){return t.getCleanValue(e)}},e.prototype.getDSdef=function(){return l["default"]},e}(n["default"]);e["default"]=x},1047:function(t,e,i){"use strict";e.__esModule=!0;var n,r=i(138),o=i(136),a=i(125),l=i(132),s=i(1048),h=(n=s)&&n.__esModule?n:{"default":n};function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):function(t,e){for(var i=Object.getOwnPropertyNames(e),n=0;n<i.length;n++){var r=i[n],o=Object.getOwnPropertyDescriptor(e,r);o&&o.configurable&&t[r]===undefined&&Object.defineProperty(t,r,o)}}(t,e))}var d=a.preDefStr.DEFAULT,g=function(t,e,i){return i.getFromEnv("animationManager").setAnimation({el:"group",attr:{name:t},container:e,state:"appearing",component:i,doNotRemove:!0,label:"group"})},f=function(t){var e,i,n=t&&t[0]&&t[0].plotDetails.rect||5,r=Math.max,o=Math.floor,a=Math.sqrt,l=Math.min,s=Math.log,h=Math.exp,c=Math.pow;for(e=(t=t||[]).length;e--;)t[e].r>n&&(n=t[e].r),t[e].x=+t[e].plotDetails.rect.x,t[e].y=+t[e].plotDetails.rect.y;function d(t,e,i){return t>=e&&t<=i}function g(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}return i={tree:function f(t,e,i,n){var c,d={},u=n?"y":"x";return e===i?(d.point=t[e],d):i-e==1?(t[e][u]>t[i][u]?(d.point=t[e],d.left={point:t[i]}):(d.point=t[i],d.left={point:t[e]}),d):(c=e+i>>1,n?function p(t,e,i,n){for(var c,d,f,u,v,b,m,y,x,k;n>i;){for(n-i>600&&(d=e-i+1,f=s(c=n-i+1),u=.5*h(2*f/3),v=.5*a(f*u*(c-u)/c)*(d-c/2<0?-1:1),b=r(i,o(e-d*u/c+v)),m=l(n,o(e+(c-d)*u/c+v)),p(t,e,b,m)),y=t[e],x=i,k=n,g(t,i,e),t[n].y>y.y&&g(t,i,n);x<k;){for(g(t,x,k),x++,k--;t[x].y<y.y;)x++;for(;t[k].y>y.y;)k--}t[i].y===y.y?g(t,i,k):g(t,++k,n),k<=e&&(i=k+1),e<=k&&(n=k-1)}}(t,c,e,i):function v(t,e,i,n){for(var c,d,f,u,p,b,m,y,x,k;n>i;){for(n-i>600&&(d=e-i+1,f=s(c=n-i+1),u=.5*h(2*f/3),p=.5*a(f*u*(c-u)/c)*(d-c/2<0?-1:1),b=r(i,o(e-d*u/c+p)),m=l(n,o(e+(c-d)*u/c+p)),v(t,e,b,m)),y=t[e],x=i,k=n,g(t,i,e),t[n].x>y.x&&g(t,i,n);x<k;){for(g(t,x,k),x++,k--;t[x].x<y.x;)x++;for(;t[k].x>y.x;)k--}t[i].x===y.x?g(t,i,k):g(t,++k,n),k<=e&&(i=k+1),e<=k&&(n=k-1)}}(t,c,e,i),d.point=t[c],d.left=f(t,e,c-1,!n),d.right=f(t,c+1,i,!n),d)}(t,0,t.length-1,!1),search:function(t,e){function i(i){var n=d(t,i.x1,i.x2)&&d(e,i.y1,i.y2),r=function(t,e,i,n){return a(c(t-i,2)+c(e-n,2))}(t,e,i.point.x,i.point.y);if(!l)return l=i,p=n,void(v=r);n?p?i.point.i>l.point.i&&(l=i,p=n,v=r):(l=i,p=n,v=r):p||r<v&&(l=i,p=n,v=r)}function r(t){t&&t.point&&(d(t.point.x,h,g)&&d(t.point.y,f,u)&&i(t),h<=t.point.x&&o(t.left),g>=t.point.x&&o(t.right))}function o(t){t&&t.point&&(d(t.point.x,h,g)&&d(t.point.y,f,u)&&i(t),f<=t.point.y&&r(t.left),u>=t.point.y&&r(t.right))}var l,s=this.tree,h=t-n,g=t+n,f=e-n,u=e+n,p=!1,v=0;return r(s),l&&l.point||l},searchTreemap:function(t,e){var i;return function n(r,o){if(r&&r.point){var a=r.point.x,l=a+r.point.plotDetails.rect.width,s=r.point.y,h=s+r.point.plotDetails.rect.height;r.point.x2=l,r.point.y2=h,t>=a&&t<=l&&e>=s&&e<=h&&function(t){i?t.i>i.i&&(i=t):i=t}(r.point),n(r.left,!o),n(r.right,!o)}}(this.tree,!1),i}},t.sort(function(t,e){return t.i-e.i}),i};(0,l.addDep)({name:"treeMapAnimation",type:"animationRule",extension:h["default"]});var u=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this)),n=i;return n.components={},n.conf={},n.graphics={elemStore:{rect:[],label:[],highlight:[],hot:[],polypath:[]}},i}return c(e,t),e.prototype.getName=function(){return"treeMap"},e.prototype.configureAttributes=function(t){if(t){this.config.JSONData=t.data[0];var e,i,n=void 0,r=this.getFromEnv("chart"),o=this.conf,l=r.getFromEnv("chart-attrib");o.metaTreeInf={},n=l.algorithm||"squarified",o.algorithm=n.toLowerCase(),o.range=undefined,o.horizontalPadding=(0,a.pluckNumber)(l.horizontalpadding,5),o.horizontalPadding=o.horizontalPadding<0?0:o.horizontalPadding,o.verticalPadding=(0,a.pluckNumber)(l.verticalpadding,5),o.verticalPadding=o.verticalPadding<0?0:o.verticalPadding,o.showParent=(0,a.pluckNumber)(l.showparent,1),o.showChildLabels=(0,a.pluckNumber)(l.showchildlabels,0),o.showHoverEffect=(0,a.pluckNumber)(l.showhovereffect,1),o.highlightParentsOnHover=(0,a.pluckNumber)(l.highlightparentsonhover,0),o.defaultParentBGColor=(0,a.pluck)(l.defaultparentbgcolor,undefined),o.defaultNavigationBarBGColor=(0,a.pluck)(l.defaultnavigationbarbgcolor,o.defaultParentBGColor),o.showTooltip=(0,a.pluckNumber)(l.showtooltip,1),o.baseFontSize=(0,a.pluckNumber)(l.basefontsize,10),o.baseFontSize=o.baseFontSize<1?1:o.baseFontSize,o.labelFontSize=(0,a.pluckNumber)(l.labelfontsize,undefined),o.labelFontSize=o.labelFontSize<1?1:o.labelFontSize,o.baseFont=(0,a.pluck)(l.basefont,"Verdana, Sans"),o.labelFont=(0,a.pluck)(l.labelfont,undefined),o.baseFontColor=(0,a.pluck)(l.basefontcolor,"#000000").replace(/^#?([a-f0-9]+)/gi,"#$1"),o.labelFontColor=(0,a.pluck)(l.labelfontcolor,undefined),o.labelFontColor&&(o.labelFontColor=o.labelFontColor.replace(/^#?([a-f0-9]+)/gi,"#$1")),o.labelFontBold=(0,a.pluckNumber)(l.labelfontbold,0),o.labelFontItalic=(0,a.pluckNumber)(l.labelfontitalic,0),o.plotBorderThickness=(0,a.pluckNumber)(l.plotborderthickness,1),o.plotBorderThickness=o.plotBorderThickness<0?0:o.plotBorderThickness>5?5:o.plotBorderThickness,o.plotBorderColor=(0,a.pluck)(l.plotbordercolor,"#000000").replace(/^#?([a-f0-9]+)/gi,"#$1"),o.tooltipSeparationCharacter=(0,a.pluck)(l.tooltipsepchar,","),o.plotToolText=(0,a.parseUnsafeString)((0,a.pluck)(l.plottooltext,"")),o.parentLabelLineHeight=(0,a.pluckNumber)(l.parentlabellineheight,12),o.parentLabelLineHeight=o.parentLabelLineHeight<0?0:o.parentLabelLineHeight,o.labelGlow=(0,a.pluckNumber)(l.labelglow,1),o.labelGlowIntensity=(0,a.pluckNumber)(l.labelglowintensity,100)/100,o.labelGlowIntensity=o.labelGlowIntensity<0?0:o.labelGlowIntensity>1?1:o.labelGlowIntensity,o.labelGlowColor=(0,a.pluck)(l.labelglowcolor,"#ffffff").replace(/^#?([a-f0-9]+)/gi,"#$1"),o.labelGlowRadius=(0,a.pluckNumber)(l.labelglowradius,2),o.labelGlowRadius=o.labelGlowRadius<0?0:o.labelGlowRadius>10?10:o.labelGlowRadius,o.btnResetChartTooltext=(0,a.pluck)(l.btnresetcharttooltext,"Back to Top"),o.btnBackChartTooltext=(0,a.pluck)(l.btnbackcharttooltext,"Back to Parent"),o.rangeOutBgColor=(0,a.pluck)(l.rangeoutbgcolor,"#808080").replace(/^#?([a-f0-9]+)/gi,"#$1"),o.rangeOutBgAlpha=(0,a.pluckNumber)(l.rangeoutbgalpha,100),o.rangeOutBgAlpha=o.rangeOutBgAlpha<1||o.rangeOutBgAlpha>100?100:o.rangeOutBgAlpha,e=(0,a.pluckNumber)(l.maxdepth),o.maxDepth=e!==undefined?Math.max(e,1):undefined,i=o.showNavigationBar=(0,a.pluckNumber)(l.shownavigationbar,1),o.slicingMode=(0,a.pluck)(l.slicingmode,"alternate"),o.navigationBarHeight=(0,a.pluckNumber)(l.navigationbarheight),o.navigationBarHeightRatio=(0,a.pluckNumber)(l.navigationbarheightratio),o.navigationBarBorderColor=(0,a.pluck)(l.navigationbarbordercolor,o.plotBorderColor).replace(/^#?([a-f0-9]+)/gi,"#$1"),o.navigationBarBorderThickness=i?(0,a.pluckNumber)(l.navigationbarborderthickness,o.plotBorderThickness):0,o.seperatorAngle=(0,a.pluckNumber)(l.seperatorangle)*(Math.PI/180),o.isConfigured=!0,this.setState("dirty",!0)}},e.prototype.createContainer=function(){var t,e,i,n,r=this.getLinkedParent().getChildContainer();t=this.getContainer("plots")||this.addContainer("plots",g("plots",r.defaultGroup,this)),e=this.getContainer("datalabels")||this.addContainer("datalabels",g("datalabels",r.defaultGroup,this).insertAfter(t)),i=this.getContainer("tracker")||this.addContainer("tracker",g("tracker",r.defaultGroup,this)),!this.getContainer("line-hot")&&this.addContainer("line-hot",g("line-hot",i,this)),n=this.getContainer("labelhighlight")||this.addContainer("labelhighlight",g("labelhighlight",e,this)),!this.getContainer("labelfloat")&&this.addContainer("labelfloat",g("labelfloat",e,this).insertAfter(n))},e.prototype._getHoveredPlot=function(t,e){var i,n,r,o=this.config.kdTree||{};for(n=(r=Object.keys(o)).length-1;n>-1;n--)if(this.config.kdTree[r[n]].searchTreemap(t,e)){i=this.config.kdTree[r[n]].searchTreemap(t,e);break}if(i)return this.pointObj=i,{pointIndex:i.i||i.index,hovered:!0,pointObj:i}},e.prototype.kdTreePartioning=function(){var t,e,i=this.getFromEnv("chartConfig").trackerConfig,n={};for(t=i.length;t--;)i[t].i=t,n[i[t].node.meta.depth]===undefined&&(n[i[t].node.meta.depth]=[]),n[i[t].node.meta.depth].push(i[t]);for(this.config.kdTree={},t=(e=Object.keys(n)).length-1;t>-1;t--)this.config.kdTree[e[t]]=f&&f(n[e[t]])},e.prototype._rolloverResponseSetter=function(t,e,i){var n=t.getData(),r=i.getFromEnv("animationManager"),o=this.getFromEnv("chart");n&&0!==n.showHoverEffect&&(o.getState("drill")||(r.setAnimationState("mouseOver"),r.setAnimation({el:t,label:"rect",component:i,attr:t.getData().setRolloverAttr})),o.plotEventHandler(t,e,"DataPlotRollOver"))},e.prototype._rolloutResponseSetter=function(t,e,i){var n=t.getData(),r=i.getFromEnv("animationManager"),o=this.getFromEnv("chart");n&&0!==n.showHoverEffect&&(o.getState("drill")||(r.setAnimationState("mouseOut"),r.setAnimation({el:t,label:"rect",component:i,doNotRemove:!0,attr:t.getData().setRolloutAttr})),o.plotEventHandler(t,e,"DataPlotRollOut"))},e.prototype._getParentNode=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=this.conf.navigationBarNodes||[],i=void 0,n=e.length,r=t.length,o=t[r-2],a=t[r-1],l=!1;if(r<2)return!1;for(i=0;i<n;i++)if(e[i].id===o.id){l=!0;break}return l?a:o},e.prototype._firePlotEvent=function(t,e,i){var n,r=this.config.currentToolTip,l=this.getFromEnv("chartConfig").trackerConfig[e||0],s=this.getContainer("tracker"),h=l&&l.node&&l.node.plotItem,c=l&&l.plotDetails&&l.plotDetails.toolText,g=this.getFromEnv("toolTipController"),f=i.originalEvent,u=this.graphics.singleTracker,p=this.pointObj.plotDetails,v=this.conf.showHoverEffect,b=this.conf.highlightParentsOnHover,m=l&&l.node.path,y=this._getParentNode(m),x=y&&y.rect;if(h?n=b&&y?{x:x.x,y:x.y,width:x.width,height:x.height,stroke:"rgba(255,255,255,0)"}:{x:p.rect.x||0,y:p.rect.y||0,width:p.rect.width||0,height:p.rect.height||0,stroke:"rgba(255,255,255,0)"}:(h=l&&(l.node.plotItem||l.node.polyPathItem),(p={}).rect={}),u=this.graphics.singleTracker=this.getFromEnv("animationManager").setAnimation({el:this.graphics.singleTracker||"rect",attr:n,component:this,label:"tracker",container:s,doNotRemove:!0}).toFront(),h)switch(h.node.style.cursor="pointer",u.node.style.cursor="pointer",t){case"fc-mouseover":v?l.evtFns.hover[0](u):u.attr("fill",a.TRACKER_FILL),c&&(r?g.draw(f,c,r):r=this.config.currentToolTip=g.draw(f,c));break;case"fc-mouseout":h.node.style.cursor=d,u.node.style.cursor="pointer",u.attr({x:0,y:0,width:0,height:0,stroke:"#ffffff","stroke-width":"0px"}),u.toFront(),g.hide(r),this._rolloutResponseSetter(h,i,this);break;case"fc-click":l&&l.evtFns&&l.evtFns.click&&l.evtFns.click[0](),this.config.kdTree={},this.addJob("click",this.kdTreePartioning.bind(this),o.priorityList.tracker);break;case"fc-mousemove":c&&(r?g.draw(f,c,r):r=this.config.currentToolTip=g.draw(f,c))}},e.prototype.draw=function(){var t,e,i,n,r,l,s,h,c,d=this,g=d.conf,f=d.getFromEnv("chart"),u=d.getFromEnv("chartConfig"),p=u.trackerConfig,v=u.canvasLeft,b=u.canvasRight,m=u.canvasBottom,y=u.canvasTop,x=d.getFromEnv("chart-attrib"),k=g.metaTreeInf,w=d.graphics.elemStore,C={},P=g._graphicPool||(g._graphicPool={}),I={},T=["fontFamily","fontSize","fontWeight","fontStyle"],_={},A=g,F=d.getFromEnv("colorManager"),S=this.getFromEnv("ref"),E=d.getFromEnv("animationManager"),N=S.containerManager,R=S.algorithmFactory,B={};for(p&&(p.length=0),d.createContainer(),h=(0,a.parsexAxisStyles)({},{},x,{fontFamily:"Verdana,sans",fontSize:"10px"}),l=0,s=T.length;l<s;l++)(c=T[l])in h&&(_[c]=h[c]);N.remove(),t=d.getContainer("plots"),d.getContainer("datalabels").css(_),e=d.getContainer("labelhighlight"),i=d.getContainer("labelfloat"),g.colorRange=F,k.effectiveWidth=b-v,k.effectiveHeight=m-y,k.startX=v,k.startY=y,I.x=k.effectiveWidth/2,I.y=k.effectiveHeight/2,I.x=k.effectiveWidth/2,I.y=k.effectiveHeight/2,C.drawPolyPath=function(e,i,n){var r,o=f.getState("drill")?"updating":"appearing";return B[n.id]&&delete B[n.id],(r=E.setAnimation({el:C.graphicPool(!1,"polyPathItem")||"path",container:t,attr:{path:e.path},css:i,state:o,label:"path",component:d}))&&w.polypath.push(r),r},C.drawRect=function(e,i,n,r,o){var l,s,h={},c={};for(l in s=f.getState("drill")?"updating":"appearing",B[o.id]&&delete B[o.id],e)e[l]<0&&(e[l]=0,c.visibility="hidden");return(0,a.extend2)(h,e),h.x=I.x,h.y=I.y,h.height=0,h.width=0,E.setAnimation({el:C.graphicPool(!1,"plotItem")||"rect",container:t,attr:e,css:Object.assign(i,c),state:s,props:o.__props,label:"rect",component:d}).toFront()},C.drawText=function(t,n,r,o){var l,s,h,c,g=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{},u=arguments[5],p={},v=r.textAttrs,b=r.highlightAttrs;return l=f.getState("drill")?"updating":"appearing",B[u.id]&&delete B[u.id],(0,a.extend2)(p,v),delete p.fill,p["stroke-linejoin"]="round",delete g.opacity,t=n.x<0||n.y<0?a.BLANKSTRING:t,(s=E.setAnimation({el:C.graphicPool(!1,"labelItem")||C.graphicPool(!1,"pathlabelItem")||"text",container:i,component:d,attr:Object.assign({},v,g,{text:t,x:n.x,y:n.y,visibility:"visible"}),state:l,label:"labelItem"})).show(),c="hidden"!==b.visibility,delete b.visibility,h=E.setAnimation({el:C.graphicPool(!1,"highlightItem")||C.graphicPool(!1,"pathhighlightItem")||"text",container:e,component:d,attr:Object.assign({},g,b,{x:n.x,y:n.y,text:c?t:"",visibility:"visible"}),css:{lineHeight:1.2*p.fontSize+"px"},state:l,label:"highlightItem"}),d.prevLabelGlowVisibility!==c&&!0===c&&h.show(),d.prevLabelGlowVisibility=c,w.label.push(void 0),w.highlight.push(void 0),{label:s,highlightMask:h}},C.disposeItems=function(t,e){var i,n,r,o=e||["plotItem","labelItem","hotItem","highlightItem","polyPathItem","pathlabelItem","pathhighlightItem","stackedpolyPathItem","stackedpathlabelItem","stackedpathhighlightItem"];for(i=0;i<o.length;i+=1)(n=t[r=o[i]])&&"text"===n.type&&n.attr({text:"","text-bound":[]}),n&&!n.removed&&(n=E.setAnimation({el:n,component:d})),t[r]=void 0},C.disposeChild=function(){var t,e=function(){return t.disposeItems};return function(i){var n=i.getParent();t||(t=this,e=e()),n?t.disposeChild(n):function r(t,i){var n;for(e(t),n=0;n<(t.getChildren()||[]).length;n++)n=r(t.getChildren()[n],n);return i}(i,0)}}(),C.disposeSelectedChildren=function(){var t,e=function(){return t.addRemovalNodes};return function(i){var n=i.getParent();t||(t=this,e=e()),n?t.addRemovalNodes(n):function r(t,i){var n;for(e(t),n=0;n<(t.getChildren()||[]).length;++n)n=r(t.getChildren()[n],n);return i}(i,0)}}(),C.addRemovalNodes=function(t){B[t.id]=t},C.hideNodes=function(){var t,e,i,n,r=["plotItem","labelItem","hotItem","highlightItem","polyPathItem","pathlabelItem","pathhighlightItem","stackedpolyPathItem","stackedpathlabelItem","stackedpathhighlightItem"];for(var o in B)for(i=B[o],t=0;t<r.length;t+=1)(e=i[n=r[t]])&&"text"===e.type&&e.attr({text:"","text-bound":[]}),e=e&&!e.removed&&E.setAnimation({el:e,component:d,label:"gen"}),i[n]=void 0},C.graphicPool=function(t,e,i){var n,r=P[e];if(r||(r=P[e]=[]),"hotItem"!==e&&"pathhotItem"!==e||i.remove(),t)r.push(i);else if(n=r.splice(0,1)[0])return n.show(),n},C.disposeComplimentary=function(t){var e,i,n=t.getParent(),r=t.getSiblingCount("left");n&&(e=(i=n.getChildren()).splice(r,1)[0],this.disposeChild(t),i.splice(r,0,e)),this.removeLayers()},C.removeLayers=function(){var t,e,i,n;for(e=(n=w.hot).length,t=0;t<e;t++)(i=n[t])&&i.remove();n.length=0},d.getState("dirty")&&(R.init(g.algorithm,!0,g.maxDepth),n=R.plotOnCanvas(d.config.JSONData,f._getCleanValue()),N.init(d,k,C,void 0,n)),N.draw(),r=R.applyShadeFiltering({fill:A.rangeOutBgColor,opacity:.01*A.rangeOutBgAlpha},function(t){this.plotItem&&this.plotItem.css(t)}),d.addExtEventListener("legendUpdate",function(t,e){r.call(this,{start:e.maxMinArray[0].min,end:e.maxMinArray[0].max}),g.range={min:e.maxMinArray[0].min,max:e.maxMinArray[0].max}},d.getFromEnv("colorManager")),g.isConfigured=!1,d.addJob("buildKDTreeID",d.kdTreePartioning.bind(d),o.priorityList.tracker)},e.prototype.getType=function(){return"dataset"},e.prototype.setJSONIndex=function(t){this.config.index=t},e.prototype.getJSONIndex=function(){return this.config.index||0},e}(r.ComponentInterface);e["default"]=u},1048:function(t,e,i){"use strict";e.__esModule=!0,e["default"]={"*.dataset.treeMap":function(){var t=this.getFromEnv("canvasConfig"),e=t.canvasLeft+t.canvasHeight/2,i=t.canvasWidth/2+t.canvasTop,n={appearing:[{initialAttr:{opacity:0},finalAttr:{opacity:1},slot:"final"}],updating:[{initialAttr:{opacity:0},finalAttr:{opacity:1},slot:"final"}],disappearing:[{initialAttr:{opacity:1},finalAttr:{opacity:0},slot:"initial"}]},r={appearing:[{initialAttr:{opacity:0},finalAttr:{opacity:1},slot:"final"}],updating:function(t){return[{initialAttr:{opacity:0,path:"string"!=typeof t.el?t.el.attr("path"):t.attr.path},finalAttr:{opacity:1,path:t.attr.path},slot:"final"}]}},o={appearing:function(){return[{initialAttr:{x:i,y:e,width:0,height:0,opacity:0},finalAttr:{opacity:1},slot:"plot"}]},disappearing:[{finalAttr:{opacity:0},slot:"initial"}],updating:function(t){var e=t.props.prev&&t.props.prev.x===t.attr.x,i=t.props.prev&&t.props.prev.y===t.attr.y,n=t.props.prev&&t.props.prev.height===t.attr.height,r=t.props.prev&&t.props.prev.width===t.attr.width;return e&&i&&n&&r?[{initialAttr:{opacity:0},finalAttr:{opacity:1},slot:"final"}]:t.props.prev?[{initialAttr:{x:t.props.prev.x,y:t.props.prev.y,width:t.props.prev.width,height:t.props.prev.height},slot:"plot"}]:[{initialAttr:{x:t.attr.x,y:t.attr.y,width:t.attr.width,height:t.attr.height},slot:"plot"}]}};return{"rect.appearing":o.appearing,"rect.updating":o.updating,"rect.disappearing":o.disappearing,"path.appearing":r.appearing,"path.updating":r.updating,"path.disappearing":o.disappearing,"labelItem.appearing":n.appearing,"labelItem.updating":n.updating,"labelItem.disappearing":n.disappearing,"highlightItem.appearing":n.appearing,"highlightItem.updating":n.updating,"highlightItem.disappearing":n.disappearing,"gen.disappearing":n.disappearing,"*":null}}}},1049:function(t,e,i){"use strict";e.__esModule=!0;var n=i(125),r=i(136);function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):function(t,e){for(var i=Object.getOwnPropertyNames(e),n=0;n<i.length;n++){var r=i[n],o=Object.getOwnPropertyDescriptor(e,r);o&&o.configurable&&t[r]===undefined&&Object.defineProperty(t,r,o)}}(t,e))}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var l="drillup",s=1,h=function(t,e){var i,s,h,d,g,f,u,p=t.AbstractTreeMaker;function v(t){for(var e=t.getChildren(),i=void 0,n=0,r=0;r<(e&&e.length);r++)v(i=e[r]),n+=i.getValue()||0;isNaN(t.value)&&(t.value=n)}i={sliceanddice:{areaBaseCalculator:function(t,e){var i=t,n=e;return function(t,e,r){var o,a,l,s,h,c,d,g={},f=0;if(t)return r&&(f=r.textMargin||f),d=f,o=t.getParent(),a=t.getSibling("left"),o?(l=o.getValue(),s=(c=o.rect).height-2*n-d,h=c.width-2*i,g.effectiveRect={height:s,width:h,x:c.x+i,y:c.y+n+d},g.effectiveArea=s*h,g.ratio=t.getValue()/l,a?e.call(t,g,a,o):(g.lastIsParent=!0,e.call(t,g,o))):null}},applyShadeFiltering:function(t,e,i){return t.setRangeOutEffect(e,i),this.applyShadeFiltering.reset=function(){t.resetPointers()},function(e){t.moveLowerShadePointer(e.start),t.moveHigherShadePointer(e.end)}},alternateModeManager:function(){return function(t,e){var i,n,r,o,a,l=t.effectiveArea*t.ratio,s=t.effectiveRect,h=e.rect;return t.lastIsParent?(o=s.x,a=s.y,i=s.height,n=s.width,r=this.isDirectionVertical=!0):(i=s.height+s.y-(h.height+h.y),n=s.width+s.x-(h.width+h.x),r=this.isDirectionVertical=!e.isDirectionVertical),r?(n=l/i,o=o!==undefined?o:h.x,a=a!==undefined?a:h.y+h.height):(i=l/n,o=o!==undefined?o:h.x+h.width,a=a!==undefined?a:h.y),{height:i,width:n,x:o,y:a}}},horizontalVerticalManager:function(t){var e=Boolean("vertical"===t);return function(t,i){var n,r,o,a,l,s=t.effectiveArea*t.ratio,h=t.effectiveRect,c=i.rect;return t.lastIsParent?(a=h.x,l=h.y,n=h.height,r=h.width,o=this.isDirectionVertical=!i.isDirectionVertical):(n=h.height+h.y-(c.height+c.y),r=h.width+h.x-(c.width+c.x),o=this.isDirectionVertical=!arguments[2].isDirectionVertical),(o=e?o:!o)?(0===n&&(n=h.height,a=a!==undefined?a:c.x+c.width,l=l!==undefined?l:c.y),r=s/n,a=a!==undefined?a:c.x,l=l!==undefined?l:c.y+c.height):(0===r&&(r=h.width,a=a!==undefined?a:c.x,l=l!==undefined?l:c.y+c.height),n=s/r,a=a!==undefined?a:c.x+c.width,l=l!==undefined?l:c.y),{height:n,width:r,x:a,y:l}}},drawTree:function(e,i,o,a){var s,h,c,d,g,p,b,m,y=i.getFromEnv("chart"),x=y.config||(y.config={}),k=x.trackerConfig||(x.trackerConfig=[]),w=i.getFromEnv("number-formatter"),C=i.getFromEnv("toolbarBtns"),P=a.drawRect,I=a.drawText,T=a.drawHot,_=o.horizontalPadding,A=o.verticalPadding,F=i.getFromEnv("smartLabel"),S=(0,t.iterator)(this).df,E=e.areaBaseCalculator(_,A),N=i.conf,R=N.highlightParentsOnHover,B=t.context,M=t.visibilityController,O=i.conf.colorRange,V=t.mapColorManager(N,O),L=t.abstractEventRegisterer(e,i,o,a),D=L.click,H=L.mouseover,z=L.mouseout,j=N.slicingMode,G=e["alternate"===j?"alternateModeManager":"horizontalVerticalManager"](j),W=y._intSR;for(m=(b=B.getInstance("ClickedState").get("VisibileRoot")||{}).node,b.node&&b.state&&(b.state.toLowerCase()===l?m instanceof Array?M.controlPreAnimVisibility(m[0].virginNode,m[1]):M.controlPreAnimVisibility(m.virginNode):M.displayAll(b.node.virginNode)),s=N.parentLabelLineHeight,c=t.initConfigurationForlabel({x:5,y:5},s,N),d=h=S.next(u=t.setMaxDepth(this.getDepth()+f));d.getParent();)d=d.getParent();!x.valuesset&&v(d),x.valuesset=!0,N.showNavigationBar?(C.home.hide(),C.back.hide()):d!=h?(C.home.show(),C.back.show()):(C.home.hide(),C.back.hide()),F.useEllipsesOnOverflow(y.config.useEllipsesWhenOverflow),F.setStyle(N._setStyle={fontSize:(N.labelFontSize||N.baseFontSize)+"px",fontFamily:N.labelFont||N.baseFont,lineHeight:1.2*(N.labelFontSize||N.baseFontSize)+"px"}),p=W.backToParent,g=W.resetTree,y.addJob("attachEventToBtns",function(){y._lastAttached.backToParent&&C.back&&C.back.removeEventListener("fc-click",y._lastAttached.backToParent),y._lastAttached.resetTree&&C.home&&C.home.removeEventListener("fc-click",y._lastAttached.resetTree),y._lastAttached.backToParent=p.bind(h),y._lastAttached.resetTree=g.bind(h),C.back&&C.back.addEventListener("fc-click",y._lastAttached.backToParent),C.home&&C.home.addEventListener("fc-click",y._lastAttached.resetTree)},r.priorityList.kdTree),function U(t,e){var r,o,l,s,d,g,f,p,v,b,m,y,x,C,_,A,M={},O={},L={},j="";t&&t.value&&(_=w.yAxis(t.getValue()),A=w.sYAxis(t.getColorValue()),t.setPath(),o=t.rect||{},l=t.textRect||{},p=t.rect={},t.textRect={},p.width=e.width,p.height=e.height,p.x=e.x,p.y=e.y,C=V(t,undefined,i.conf),(x=t.plotItem)&&a.graphicPool(!0,"plotItem",x,o),t.__props||(t.__props={}),t.__props.curr=Object.assign({},p),t.__props.node=Object.assign({},t),x=t.plotItem=P(p,Object.assign({},C,t.getColorValue()&&{fill:t.presentColor}||{}),o,t.overAttr,t),t.__props.prev=Object.assign({},p),t.cssConf=C,m=(b=c(t,p)).conf,M.textMargin=m.rectShiftY,v=t.textRect=m.textRect,y=F.getSmartText(m.label,v.width,v.height).text,t.plotItem=x,(d=t.labelItem)?(g=t.highlightItem,a.graphicPool(!0,"labelItem",d,o),a.graphicPool(!0,"highlightItem",g,o)):l=l||{},f=I(y,v,{textAttrs:b.attr,highlightAttrs:b.highlight},l,t.overAttr,t),t.labelItem=f.label,t.highlightItem=f.highlightMask,O.virginNode=t,O.plotItem=x,O.textItem=f,O.virginNode.dirtyNode=O,t.getColorValue()&&(j=N.tooltipSeparationCharacter+A),N.showTooltip?O.toolText=(0,n.parseTooltext)(N.plotToolText,[1,2,3,119,122],{label:t.getLabel(),formattedValue:_,formattedsValue:A},{value:t.getValue(),svalue:t.getColorValue()})||t.getLabel()+N.tooltipSeparationCharacter+_+j:O.toolText=n.BLANKSTRING,O.rect=p,L.hover=[function(t){var e,i,r,o,a;r=B.getInstance("hover"),i=this.virginNode,e=R&&!i.next?i.getParent()||i:this.virginNode,r.set("element",e),o=e.cssConf,a=(0,n.convertColor)((0,n.getLightColor)(o.fill,80),60),t.attr({fill:a}),H(this)}.bind(O),function(){var t,e,i;e=(t=B.getInstance("hover").get("element")).cssConf,i=(0,n.convertColor)(e.fill||"#fff",0),t.plotItem.tracker.attr({fill:i}),z(this)}.bind(O)],L.tooltip=[O.toolText],L.click=[function(){D(this,h)}.bind(O)],(s=t.hotItem)&&a.graphicPool(!0,"hotItem",s,o),k.push({node:t,key:"hotItem",plotDetails:O,evtFns:L,callback:T}),U(r=S.next(u),E(r,G,M)))}(h,o)}},squarified:{orderNodes:function(){return this.sort(function(t,e){return parseFloat(t.value,10)<parseFloat(e.value,10)?1:-1})},areaBaseCalculator:function(t,e){var i=t,n=e;return function(t,e,r){var o,a,l,s,h,c,d={},g=0;if(t&&0!==t.length)return r&&(g=r.textMargin||g),s=g,(o=(h=t[0]).getParent())?(a=(c=o.rect).height-2*n-s,l=c.width-2*i,d.effectiveRect={height:a,width:l,x:c.x+i,y:c.y+n+s},d.effectiveArea=a*l,e.call(h,d,o)):null}},layoutManager:{RowLayout:function(){function t(e,i){a(this,t),this.totalValue=i,this._rHeight=e.height,this._rWidth=e.width,this._rx=e.x,this._ry=e.y,this._rTotalArea=e.height*e.width,this.nodes=[],this._prevAR=undefined,this._rHeight<this._rWidth&&(this._hSegmented=!0)}return t.prototype.addNode=function(t){var e,i,n,r,o,a,l,s,h,c,d,g,f,u,p,v,b,m=this._rTotalArea,y=this._hSegmented,x=this._rx,k=this._ry,w=0;for(this.nodes.push(t),r=0,a=this.nodes.length;r<a;r++)w+=parseFloat(this.nodes[r].getValue(),10);for(e=m*(w/this.totalValue),y?(n=this._rHeight,d=x+(i=e/n),g=k,u=this._rHeight,p=this._rWidth-i):(i=this._rWidth,d=x,g=k+(n=e/i),u=this._rHeight-n,p=this._rWidth),r=0,o=this.nodes.length;r<o;r++)l=(t=this.nodes[r]).getValue()/w*e,t.hRect=t.rect||{},t._hRect=t._rect||{},c=t.rect={},y?(c.width=h=i,c.height=s=l/h,c.x=x,c.y=k,k+=s):(c.height=s=n,c.width=h=l/s,c.x=x,c.y=k,x+=h),v=Math.max(c.height,c.width)/Math.min(c.height,c.width),!isFinite(v)&&(v=0),t.aspectRatio=v;if(this.nodes.length>1){if(this.prevAR<t.aspectRatio){for(this.nodes.pop().rect={},r=0,a=this.nodes.length;r<a;r++)1===a&&this.nodes[r].firstPassed?this.nodes[r].rect=this.nodes[r]._hRect:this.nodes[r].rect=this.nodes[r].hRect,f=this.nodes[r]._rect={},b=this.nodes[r].rect,f.width=b.width,f.height=b.height,f.x=b.x,f.y=b.y;return!1}}else t&&(f=t._rect={},b=t.rect,f.width=b.width,f.height=b.height,f.x=b.x,f.y=b.y,t.firstPassed=!0);return this.prevAR=t.aspectRatio,this.height=n,this.width=i,this.getNextLogicalDivision=function(){return{height:u,width:p,x:d,y:g}},t},t}()},applyShadeFiltering:function(t,e,i){return t.setRangeOutEffect(e,i),this.applyShadeFiltering.reset=function(){t.resetPointers()},function(e){t.moveLowerShadePointer(e.start),t.moveHigherShadePointer(e.end)}},drawTree:function(e,i,o,a){var s,h,c,d,g,p,b,m,y=i.getFromEnv("chart"),x=i.getFromEnv("chartConfig"),k=x.trackerConfig||(x.trackerConfig=[]),w=i.getFromEnv("number-formatter"),C=i.getFromEnv("toolbarBtns"),P=o.horizontalPadding,I=o.verticalPadding,T=e.areaBaseCalculator(P,I),_=e.layoutManager.RowLayout,A=i.getFromEnv("smartLabel"),F=a.drawRect,S=a.drawText,E=a.drawHot,N=(0,t.iterator)(this).bf,R=i.conf,B=R.highlightParentsOnHover,M=t.context,O=i.conf.colorRange,V=t.mapColorManager(R,O),L=t.abstractEventRegisterer(e,i,o,a),D=L.click,H=L.mouseover,z=L.mouseout,j=y._intSR,G=t.visibilityController;for(m=(b=M.getInstance("ClickedState").get("VisibileRoot")||{}).node,b.node&&b.state&&(b.state.toLowerCase()===l?m instanceof Array?G.controlPreAnimVisibility(m[0].virginNode,m[1]):G.controlPreAnimVisibility(m.virginNode):G.displayAll(b.node.virginNode)),s=R.parentLabelLineHeight,c=t.initConfigurationForlabel({x:5,y:5},s,R),d=h=N.next(u=t.setMaxDepth(this.getDepth()+f));d.getParent();)d=d.getParent();!x.valuesset&&v(d),x.valuesset=!0,R.showNavigationBar?(C.home.hide(),C.back.hide()):d!==h?(C.home.show(),C.back.show()):(C.home.hide(),C.back.hide()),A.useEllipsesOnOverflow(y.config.useEllipsesWhenOverflow),A.setStyle(R._setStyle={fontSize:(R.labelFontSize||R.baseFontSize)+"px",fontFamily:R.labelFont||R.baseFont,lineHeight:1.2*(R.labelFontSize||R.baseFontSize)+"px"}),g=j.backToParent,p=j.resetTree,y.addJob("attachEventToBtns",function(){y._lastAttached.backToParent&&C.back&&C.back.removeEventListener("fc-click",y._lastAttached.backToParent),y._lastAttached.resetTree&&C.home&&C.home.removeEventListener("fc-click",y._lastAttached.resetTree),y._lastAttached.backToParent=g.bind(h),y._lastAttached.resetTree=p.bind(h),C.back&&C.back.addEventListener("fc-click",y._lastAttached.backToParent),C.home&&C.home.addEventListener("fc-click",y._lastAttached.resetTree)},r.priorityList.kdTree),function W(t,e){var r,o,l,s,d,g,f,p,v,b,m,y,x,C,P,I,N,O,L,j={},G=0,U={},Y={},J={},K="";if(t&&t.value&&(O=w.yAxis(t.getValue()),L=w.sYAxis(t.getColorValue()),t.setPath(),(r=t.__initRect)&&(j.x=r.x,j.y=r.y,j.width=r.width,j.height=r.height),d=t.textRect||{},r=t.rect=t.__initRect={},t.textRect={},r.width=e.width,r.height=e.height,r.x=e.x,r.y=e.y,N=V(t,undefined,i.conf),(x=t.plotItem)&&a.graphicPool(!0,"plotItem",x,j),t.__props||(t.__props={}),t.__props.curr=Object.assign({},r),t.__props.node=Object.assign({},t),x=t.plotItem=F(r,Object.assign({},N,t.getColorValue()&&{fill:t.presentColor}||{}),j,t.overAttr,t),t.__props.prev=Object.assign({},r),t.cssConf=N,C=(I=c(t,r)).conf,U.textMargin=C.rectShiftY,g=t.textRect=C.textRect,P=A.getSmartText(C.label,g.width,g.height).text,(s=t.labelItem)?(o=t.highlightItem,a.graphicPool(!0,"labelItem",s,j),a.graphicPool(!0,"highlightItem",o,j)):d=d||{},p=S(P,g,{textAttrs:I.attr,highlightAttrs:I.highlight},d,t.overAttr,t),t.labelItem=p.label,t.highlightItem=p.highlightMask,t.plotItem=x,Y.virginNode=t,Y.plotItem=x,Y.textItem=p,Y.virginNode.dirtyNode=Y,t.getColorValue()&&(K=R.tooltipSeparationCharacter+L),R.showTooltip?Y.toolText=(0,n.parseTooltext)(R.plotToolText,[1,2,3,119,122],{label:t.getLabel(),formattedValue:O,formattedsValue:L},{value:t.getValue(),svalue:t.getColorValue()})||t.getLabel()+R.tooltipSeparationCharacter+O+K:Y.toolText=n.BLANKSTRING,Y.rect=r,J.hover=[function(t){var e,i,r,o,a;r=M.getInstance("hover"),i=this.virginNode,e=B&&!i.next?i.getParent()||i:this.virginNode,r.set("element",e),o=e.cssConf,a=(0,n.convertColor)(o.fill&&(0,n.getLightColor)(o.fill,80),60),t.attr({fill:a}),H(this)}.bind(Y),function(t){var e,i;e=M.getInstance("hover").get("element").cssConf,i=(0,n.convertColor)(e.fill||"#fff",0),t.attr({fill:i}),z(this)}.bind(Y)],J.tooltip=[Y.toolText],J.click=[function(){D(this,h)}.bind(Y)],(l=t.hotItem)&&a.graphicPool(!0,"hotItem",l,j),k.push({node:t,key:"hotItem",plotDetails:Y,evtFns:J,callback:E}),f=u!==undefined&&t.getDepth()>=u?undefined:t.getChildren()))for(v=0,b=(m=T(f,function(t,e){var i,n,r,o,a=0,l=[];for(i=new _({width:t.effectiveRect.width,height:t.effectiveRect.height,x:t.effectiveRect.x,y:t.effectiveRect.y},e.getValue()),n=f.length;a++!==n;)r=f[a-1],!1===i.addNode(r)?(o=i.getNextLogicalDivision(),i=new _(o,e.getValue()-G),a--):(G+=parseFloat(r.getValue(),10),l.push(r));return l},U)).length;v<b;v++)W(y=m[v],y.rect)}(h,o)}}};var b=function(t){function e(){return a(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return o(e,t),e.getName=function(){return"TreeMaker"},e.prototype.order=function(t){var e=i[s],n=e.orderNodes;return n?n.apply(t,[e]):t},e}(p);function m(e,i,n){var r;return r=(h=new b(e,g,i)).get(),!1!==n&&(d=r),t.setVisibleRoot(r),r}function y(){var n,r=i[s];e.realTimeUpdate=x.apply(this,arguments),(n=Array.prototype.slice.call(arguments,0)).unshift(r),r.drawTree.apply(t.getVisibleRoot(),n)}function x(){var t,e,n=i[s];return(e=Array.prototype.slice.call(arguments,0)).unshift(n),t=e.slice(-1)[0],function(){var i=Array.prototype.slice.call(arguments,0),r=i.shift(),o=i.shift();c(d,function(t){n.drawTree.apply(t||d,e)},t,r)[o].apply(this,i)}}return e.init=function(e,n,r){return s=e,g=n,f=t.setMaxDepth(r),i[s]},e.plotOnCanvas=function(t,e){return d=m(t,e),y},e.applyShadeFiltering=function(t,e){var n,r,o=i[s];return r=o.applyShadeFiltering(h.getBucket(),t,e),function(t){(n=Array.prototype.slice.call(arguments,0)).unshift(t),r.apply(h.getBucket(),n)}},e.setTreeBase=function(t){return t&&(d=t)},e.realTimeUpdate=x,e.makeTree=m,e},c=function(t,e,i,n){var r;function o(e){var i,n=0,o=t;if(!e.length)return t;for(;o;){if(i=a.call(o,e[n]),n===e.length-1&&i)return r=i.getValue(),i;o=i,n+=1}}function a(t){var e,i,n,r=this.getChildren()||[],o=r.length,a=function(t){return t.toLowerCase().trim()};for(e=0;e<o;e+=1)if(a((n=r[e]).label)===a(t)){i=n;break}return i}return{deleteData:function(t,n){var a=o(t),l=(void 0).iterator(a).df,s=a&&a.getParent(),h=a&&a.getSiblingCount("left"),c=s&&s.getChildren(),d=(void 0).getVisibleRoot();if(a&&s){for(c.splice(h,1),a===d&&(d=a.getParent()||d);a;)i.disposeItems(a),a=l.next();for(;s;)s.setValue(-r,!0),s=s.getParent();n&&e(d)}},addData:function(t,i,r,a){for(var l,s,h,c,d=0,g=!0,f=(void 0).getVisibleRoot();t.length;)if(l=t.pop(),d=(s=(void 0).makeTree(l,n,!1)).getValue(),h=o(i||[]))for(h.getChildren()||(c=h.getValue(),g=!1),h.addChildren(s,a);h;)h.setValue(d,g),c&&(d-=c,c=undefined,g=!0),h=h.getParent();r&&e(f)}}},d=function(t,e){var i,r,o,s,h,c,d,g,f=!1,u=function(r,a){var c,d,g,f,u,p,b,y,x,k,C,P,I,T,_=s.colorRange,A=t.mapColorManager(s,_,!0),F={get:function(t,e,i){var n={y:t.startY,height:t.effectiveHeight},r=c[e],o=r.getParent();return P?(n._x=t.startX+t.effectiveWidth,n._width=0):(n._x=t.startX,n._width=t.effectiveWidth),n.x=P||(P=t.startX),P+=n.width=i?t.effectiveWidth*(r.getValue()/o.getValue()):t.effectiveWidth/d,n},resetAllocation:function(){P=undefined}},S=s.parentLabelLineHeight,E=t.initConfigurationForlabel({x:5,y:5},S,s),N=h.drawPolyPath,R=h.drawText,B=h.drawHot,M={navigationHistory:{path:"polyPathItem",label:"pathlabelItem",highlightItem:"pathhighlightItem",hotItem:"pathhotItem"}},O=i.getFromEnv("chart"),V=O.config.trackerConfig,L=i.getFromEnv("smartLabel"),D=function(i){return function(){var n=t.context,r=O.getFromEnv("animationManager"),o=n.getInstance("ClickedState").get("VisibileRoot")||{};V.length=0,o.state=l,o.node=[{virginNode:t.getVisibleRoot()},i],h.disposeChild(i),r.setAnimationState("drill"),O.setState("drill",!0),e.draw([i,i,i]),r.onAnimationComplete(function(){O.setState("drill",!1)}),O.resetSingleTracker()}},H=function(t){return s.showTooltip?t.getLabel():n.BLANKSTRING},z=s._setStyle,j=v.get().navigationBar,G=2*m("navigationBar"),W=j*o.effectiveHeight,U=Math.min(W-(G+6),z.fontSize.replace(/\D+/g,"")),Y=U+"px";for(M.stacked={path:"stacked"+M.navigationHistory.path,label:"stacked"+M.navigationHistory.label,highlightItem:"stacked"+M.navigationHistory.highlightItem,hotItem:"stacked"+M.navigationHistory.hotItem},F.resetAllocation(),function(e){var i=t.getVisibleRoot();(c=e?i.getChildren():s.navigationBarNodes=i.getPath()||[].concat(i)).pop(),d=c.length}(a),L.setStyle({fontSize:Y,lineHeight:Y}),g=0;g<d;g+=1)p=c[g],f=(u=w(b=F.get(r,g,a),a?"both":(I=g,T=d,1===T?"both":0===I?"left":I<T-1?"no":"right"),undefined)).offset,p[M[a?"stacked":"navigationHistory"].path]=N(u,A(p,!0,s),p),(C=(x=(y=E(p,b,!0)).conf).textRect).width-=2*f,C.y=b.y+b.height/2,k=R(L.getSmartText(x.label,C.width,Math.max(U,C.height)).text,C,{textAttrs:y.attr,highlightAttrs:y.highlight},{y:b.height/10,"font-size":s._setStyle.fontSize,"font-family":s._setStyle.fontFamily},(a?"stacked":"")+"path",p),p[M[a?"stacked":"navigationHistory"].label]=k.label,p[M[a?"stacked":"navigationHistory"].highlightItem]=k.highlightMask,V.push({node:p,key:M[a?"stacked":"navigationHistory"].hotItem,plotDetails:{rect:b},evtFns:{click:[D(p)],hover:[function(){},function(){}],tooltip:[H(p)]},callback:B})},p=function(t){return{treeMap:k,navigationBar:u,stackedNavigation:C}[t]},v=(d={treeMap:1,navigationBar:0,stackedNavigation:0},{set:function(t){var e,i=(0,n.pluckNumber)(s.navigationBarHeightRatio,s.navigationBarHeight/o.effectiveHeight,.15);e=(6+(s.labelFontSize?Math.max(s.labelFontSize,s.baseFontSize):s.baseFontSize)+2*m("navigationBar"))/o.effectiveHeight,(i=Math.max(e,i))<.1?i=.1:i>.15&&(i=.15),s.navigationBarHeightRatio=i,d=t?{treeMap:1-i,navigationBar:i,stackedNavigation:0}:{treeMap:1,navigationBar:0,stackedNavigation:0}},get:function(){return d}}),b=0,m=function(t){var e=s.verticalPadding,i=s.plotBorderThickness,n=s.navigationBarBorderThickness;return e+("navigationBar"===t?n:i)},y=function(t){var e=o.effectiveWidth,i=o.effectiveHeight,n=m(t),r=v.get()[t];return b>=1&&(b=0),b+=r,{effectiveHeight:Math.round(r*i*100)/100-n,effectiveWidth:e,startX:o.startX,startY:o.startY+n+Math.round((b-r)*i*100)/100}},x=function(){function t(){a(this,t)}return t.prototype.init=function(t,e){(this.conf||(this.conf={})).name=t.name,this.setDrawingArea(t.drawingAreaMeasurement),this.draw=this.draw(e)},t.prototype.setDrawingArea=function(t){this.conf.drawingAreaMeasurement=t},t.prototype.draw=function(t){return function(){var e=this.conf;e.drawingAreaMeasurement.effectiveHeight>0&&t(e.drawingAreaMeasurement)}},t.prototype.eventCallback=function(){},t}();function k(e){var n=s.plotBorderThickness;f&&(s.plotBorderThickness=0),r.apply(t.getVisibleRoot(),[i,{width:e.effectiveWidth,height:e.effectiveHeight,x:e.startX,y:e.startY,horizontalPadding:s.horizontalPadding,verticalPadding:s.verticalPadding},h]),s.plotBorderThickness=n}function w(t,e,i){var r=t.x,o=t.y,a=t.width,l=t.height,h=s.seperatorAngle/2,c=["M",r,o],d=(0,n.pluckNumber)(h?l/2*(1-Math.tan(h)):i,15),g=["M",t._x,o],f=function(t){return{both:["h",t,"v",l/2,"v",l/2,"h",-t,"v",-l/2,"v",-l/2],right:["h",t,"v",l/2,"v",l/2,"h",-t,"l",d,-l/2,"l",-d,-l/2],no:["h",t,"l",d,l/2,"l",-d,l/2,"h",-t,"l",d,-l/2,"l",-d,-l/2],left:["h",t,"l",d,l/2,"l",-d,l/2,"h",-t,"v",-l/2,"v",-l/2]}};return{path:c.concat(f(a)[e]),_path:g.concat(f(t._width).both),offset:d}}function C(){var t=Array.prototype.splice.call(arguments,0);t.push(!0),p("navigationBar").apply(this,t)}return g=[],c={get:function(){return g},set:function(t){var e;return t?((e=new x).init({name:t.type,drawingAreaMeasurement:t.drawingArea},t.drawFn),g.push(e)):g.length=0,g}},e.init=function(){var t,e=["navigationBar","treeMap","stackedNavigation"],n=Array.prototype.slice.call(arguments,0);for(i=n[0],o=n[1],s=i.conf,h=n[2],r=n[4],c.get().length>=e.length&&c.set();e.length;)t=e.shift(),c.set({type:t,drawFn:p(t),drawingArea:y(t)})},e.draw=function(i){var n,r,o,a=t.getVisibleRoot();for(h.disposeSelectedChildren(a,i?i[1]:a),i&&(a=i[1]),a.getParent()?s.showNavigationBar&&e.heightProportion.set(!0):e.heightProportion.set(!1),r=c.get(),n=0;n<r.length;n+=1)(o=r[n]).setDrawingArea(y(o.conf.name)),i&&t.setVisibleRoot(i[n]),o.draw();h.hideNodes()},e.heightProportion=v,e.remove=function(){var e=t.getVisibleRoot();e&&h.disposeChild(e)},e},g=function(t){return t?t.replace(/^#*/,"#"):"#"+f},f="E5E5E5",u=function(){function t(){a(this,t),this._b=[],this._css=undefined,this.rangeOurEffectApplyFn=n.stubFN,this.statePointerLow={value:undefined,index:undefined},this.statePointerHigh={value:undefined,index:undefined}}return t.prototype.resetPointers=function(){this.statePointerLow={value:undefined,index:undefined},this.statePointerHigh={value:undefined,index:undefined}},t.prototype.setRangeOutEffect=function(t,e){this._css=t,this.rangeOurEffectApplyFn=e},t.prototype.addInBucket=function(t){var e,i=this._b,n=t.getColorValue(),r=0,o=i.length-1;n&&(e=function(){for(var t,a;r<=o;)if(e=t=(r+o)/2|0,(a=i[t].getColorValue())<n)r=t+1;else{if(!(a>n))return t;o=t-1}return~o}(),i.splice(Math.abs(e),0,t))},t.prototype.moveLowerShadePointer=function(t){var e,i,n=this._b,r=this.statePointerLow,o=r.index,a=r.value,l=!1;if(e=o=o!==undefined?o:0,t!==(a=a!==undefined?a:Number.NEGATIVE_INFINITY)){if(a<=t){for(;!(t<((i=n[e++])?i.getColorValue():0))&&i;)l=!0,i.rangeOutEffect=this._css,this.rangeOurEffectApplyFn.call(i,this._css);e=l?e-2:e-1}else{for(;!(t>=((i=n[e--])?i.getColorValue():0))&&i;)i.cssConf=i.cssConf||{},l=!0,delete i.rangeOutEffect,i.cssConf.opacity=1,this.rangeOurEffectApplyFn.call(i,i.cssConf);e=l?e+2:e+1}r.index=e,r.value=t}},t.prototype.moveHigherShadePointer=function(t){var e,i,n=this._b,r=n.length,o=this.statePointerHigh,a=o.index,l=o.value,s=!1;if(e=a=a!==undefined?a:r-1,t!==(l=l!==undefined?l:Number.POSITIVE_INFINITY)){if(l>t){for(;!(t>=((i=n[e--])?i.getColorValue():0))&&i;)s=!0,i.rangeOutEffect=this._css,this.rangeOurEffectApplyFn.call(i,this._css);e=s?e+2:e+1}else{for(;!(t<((i=n[e++])?i.getColorValue():0))&&i;)i.cssConf=i.cssConf||{},s=!0,delete i.rangeOutEffect,i.cssConf.opacity=1,this.rangeOurEffectApplyFn.call(i,i.cssConf);e=s?e-2:e-1}o.index=e,o.value=t}},t}(),p=function(){function t(e,i,n){a(this,t),this.label=e,this.id=s++,this.value=parseFloat(i,10),this.colorValue=parseFloat(n,10),this.next=undefined,this.prev=undefined,this.meta={}}return t.prototype.getCSSconf=function(){return this.cssConf},t.prototype.getPath=function(){return this.path},t.prototype.setPath=function(){var t=this.getParent();this.path=(t?t.getPath():[]).concat(this)},t.prototype.addChild=function(e){return e instanceof t&&(this.next=this.next||[],[].push.call(this.next,e),e.setParent(this)),this.next},t.prototype.getChildren=function(){return this.next},t.prototype.addChildren=function(t,e){var i=this.getChildren()||(this.next=[]),n=i.length;e||(e=n-1),e=e>n-1?n-1:e<0?0:e,i.splice(e,0,t),t.setParent(this)},t.prototype.getDepth=function(){return this.meta.depth},t.prototype.isLeaf=function(t){return(!t||this.getDepth()<t)&&this.next},t.prototype.setParent=function(e){return e instanceof t&&(this.prev=e),this},t.prototype.getSiblingCount=function(e){var i,n=0,r=this;if(this instanceof t){if(i=this.getParent(),e){for(;r;)(r=r.getSibling(e))&&(n+=1);return n}return i?i.getChildren().length:void 0}},t.prototype.getParent=function(){return this.prev},t.prototype.getLabel=function(){return this.label},t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(t,e){e?this.value+=t:this.value=t},t.prototype.getColorValue=function(){return this.colorValue},t.prototype.getSibling=function(t){var e,i,n=t.toLowerCase(),r=this.getParent(),o=this.getLabel();if(r)for(e=r.getChildren(),i=0;i<e.length;i++)if(e[i].getLabel()===o)switch(n){case"left":return e[i-1];case"right":return e[i+1]}},t.prototype.setMeta=function(t,e){this.meta[t]=e},t.prototype.setDepth=function(t){this.meta.depth=t},t.prototype.getMeta=function(t){return t?this.meta[t]:this.meta},t}();e["default"]=function(){var t={},e={};return{afAPI:function(t,e){var i,n,o,s,h,c,d,f,v,b=function(){function t(e,i,n){a(this,t),this.node=e,this.bucket=i?new u:undefined,this.cleansingFn=n}return t.prototype.get=function(){var t=this.order,e=this.bucket,i=this.cleansingFn;return function n(r,o){var a,l,s,h,c,d=["label","value","data","svalue"];if(r)for(c in a=new p(r.label,i(r.value),i(r.svalue)),0===(s=r.data||[]).length&&e&&e.addInBucket(a),a.setDepth(o),r)-1===d.indexOf(c)&&a.setMeta(c,r[c]);for(t&&(s=t(s)),l=0;l<s.length;l++)h=n(s[l],o+1),a.addChild(h);return a}(this.node,0)},t.prototype.getBucket=function(){return this.bucket},t.getMaxDepth=function(){return n},t}();function m(t){o=t}return i=function(t,e){var i={},n=e&&e.exception,r=function(){function t(e){a(this,t),this.iterAPI=e}return t.prototype.initWith=function(t){return this.iterAPI(t)},t}();return i.df=function(t){var e=t,i=[],r=!1;return i.push(e),{next:function(t){var e,o;if(!r){if(o=i.shift(),!n||o!==n||(o=i.shift()))return(e=t!==undefined&&o.getDepth()>=t?[]:o.getChildren())&&e.length&&[].unshift.apply(i,e),0===i.length&&(r=!0),o;r=!0}},reset:function(){r=!1,e=t,i.length=0,i.push(e)}}},i.b